:root {
  --navy: #12306b;
  --blue: #1f4ea1;
  --blue-soft: #e9f0fb;
  --gold: #c9a227;
  --gold-soft: #fbf5e3;
  --ink: #1d2740;
  --body: #46506a;
  --muted: #7a8297;
  --line: #e3e8f1;
  --bg: #f4f6fb;
  --white: #fff;
  --green: #1e8e5a;
  --green-soft: #e6f5ee;
  --red: #c0392b;
  --red-soft: #fdecea;
  --amber: #b7791f;
  --amber-soft: #fdf3e1;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(18, 48, 107, .05), 0 8px 24px rgba(18, 48, 107, .06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--body); background: var(--bg); font-size: 15px; line-height: 1.55; }
a { color: var(--blue); }
h1, h2, h3, h4 { color: var(--ink); margin: 0; line-height: 1.25; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }

/* ---------- Header ---------- */
.site-header { background: var(--white); border-bottom: 3px solid var(--gold); }
.header-inner { max-width: 1100px; margin: 0 auto; padding: 22px 20px 14px; display: grid; grid-template-columns: 200px 1fr 200px; align-items: center; gap: 16px; }
.logo-left, .logo-right { display: flex; align-items: center; }
.logo-right { justify-content: flex-end; }
.logo-img { max-width: 195px; max-height: 120px; width: auto; height: auto; display: block; }
.logo-placeholder { width: 140px; height: 84px; border: 1.5px dashed #c5cfe2; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--navy); background: linear-gradient(135deg, #fff, var(--blue-soft)); text-align: center; line-height: 1.1; }
.ph-big { font-size: 24px; font-weight: 700; letter-spacing: 1px; }
.ph-small { font-size: 10px; color: var(--gold); text-transform: uppercase; letter-spacing: 1.5px; margin-top: 3px; }
.header-title { text-align: center; }
.header-title h1 { font-size: 30px; font-weight: 700; color: var(--blue); letter-spacing: .3px; }
.event-dates { margin: 4px 0 0; font-size: 18px; font-weight: 600; color: var(--navy); }
.event-venue { margin: 0; font-size: 16px; color: var(--blue); }
.header-org { max-width: 1100px; margin: 0 auto; padding: 0 20px 16px; text-align: center; font-size: 13px; color: var(--body); display: flex; flex-direction: column; gap: 1px; }
.header-org strong { color: var(--ink); font-size: 14px; letter-spacing: .4px; text-transform: uppercase; }

/* ---------- Layout ---------- */
.container { max-width: 1100px; margin: 0 auto; padding: 26px 20px 40px; }
.form-intro { background: linear-gradient(90deg, var(--navy), var(--blue)); color: #fff; border-radius: var(--radius); padding: 22px 26px; margin-bottom: 22px; position: relative; overflow: hidden; }
.form-intro::after { content: ''; position: absolute; right: -40px; top: -60px; width: 200px; height: 200px; border-radius: 50%; border: 26px solid rgba(201, 162, 39, .25); }
.form-intro h2 { color: #fff; font-size: 24px; letter-spacing: .5px; text-transform: uppercase; }
.form-intro p { margin: 6px 0 0; opacity: .9; max-width: 640px; font-size: 14px; }
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; margin-bottom: 20px; border: 1px solid #edf0f6; }
.card.narrow { max-width: 480px; margin-left: auto; margin-right: auto; }
.card-title { font-size: 19px; display: flex; align-items: center; gap: 12px; margin-bottom: 20px; color: var(--navy); }
.card-title .num { display: inline-flex; width: 34px; height: 34px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); font-size: 13px; font-weight: 700; align-items: center; justify-content: center; flex-shrink: 0; }
.small-title { font-size: 16px; margin-bottom: 14px; }
.hint { margin: -8px 0 18px; color: var(--muted); font-size: 14px; }

/* ---------- Stepper ---------- */
.stepper { display: flex; align-items: center; margin: 0 0 22px; padding: 0 4px; }
.step-item { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 500; white-space: nowrap; }
.step-item .dot { width: 32px; height: 32px; border-radius: 50%; background: var(--white); border: 2px solid #cfd7e6; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; color: var(--muted); transition: .2s; }
.step-item.active { color: var(--navy); }
.step-item.active .dot { border-color: var(--blue); background: var(--blue); color: #fff; box-shadow: 0 0 0 4px rgba(31, 78, 161, .15); }
.step-item.done { color: var(--navy); cursor: pointer; }
.step-item.done .dot { border-color: var(--gold); background: var(--gold); color: #fff; }
.step-line { flex: 1; height: 2px; background: #d7deea; margin: 0 10px; min-width: 14px; }

/* ---------- Form ---------- */
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.field { margin-bottom: 16px; }
.lbl { display: block; font-size: 13.5px; font-weight: 500; color: var(--ink); margin-bottom: 6px; }
.req { color: var(--red); }
.opt { color: var(--muted); font-weight: 400; font-size: 12.5px; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=password], select, textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: #fbfcfe; border: 1.5px solid #d8dfeb; border-radius: 10px; padding: 11px 13px; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31, 78, 161, .12); background: #fff; }
input.caps, textarea.caps { text-transform: uppercase; }
input.caps::placeholder { text-transform: none; }
input[type=file] { font: inherit; font-size: 14px; width: 100%; padding: 10px; border: 1.5px dashed #c8d1e2; border-radius: 10px; background: #fbfcfe; }
textarea { resize: vertical; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--red); background: #fffafa; }
.field.invalid .choice span { border-color: #eab3ad; }
.field-error { color: var(--red); font-size: 12.5px; margin: 5px 0 0; }
.field-note { color: var(--amber); font-size: 12.5px; margin: 5px 0 0; }
.field-help { color: var(--muted); font-size: 12.5px; margin: 5px 0 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 16px; }
.grid-4 { display: grid; grid-template-columns: 1.2fr .7fr 1fr 1fr; gap: 0 14px; }
.choice-row { display: flex; gap: 10px; flex-wrap: wrap; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1.5px solid #d8dfeb; border-radius: 10px; background: #fbfcfe; font-size: 14.5px; color: var(--ink); transition: .15s; user-select: none; }
.choice span::before { content: ''; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #b9c3d6; background: #fff; flex-shrink: 0; transition: .15s; }
.choice input:checked + span { border-color: var(--blue); background: var(--blue-soft); color: var(--navy); font-weight: 500; }
.choice input:checked + span::before { border-color: var(--blue); background: radial-gradient(circle, var(--blue) 45%, #fff 50%); }
.choice input:focus-visible + span { box-shadow: 0 0 0 3px rgba(31, 78, 161, .2); }
.choice-row.compact .choice span { padding: 8px 14px; }
.hp { position: absolute !important; left: -9999px !important; }

.delegate { border: 1.5px solid var(--line); border-radius: 12px; padding: 18px 18px 4px; margin-bottom: 14px; background: #fdfdff; position: relative; }
.delegate:first-child { border-color: #cdd9ef; background: linear-gradient(180deg, #f7faff, #fff 80px); }
.delegate-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.delegate-no { font-weight: 600; color: var(--navy); font-size: 14.5px; }
.delegate-fee { margin-left: auto; white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--gold); background: var(--gold-soft); padding: 3px 10px; border-radius: 20px; }
.delegate-fee:empty { display: none; }
.link-btn { background: none; border: none; color: var(--blue); font: inherit; font-size: 13.5px; cursor: pointer; padding: 4px; text-decoration: underline; text-underline-offset: 3px; }
.link-btn.remove { color: var(--red); }
.delegate-fee:empty + .remove { margin-left: auto; }
.btn-add { width: 100%; margin-bottom: 22px; border-style: dashed !important; }
.logistics { padding-top: 18px; border-top: 1px solid var(--line); }

.declare { display: flex; gap: 12px; align-items: flex-start; background: var(--gold-soft); border-radius: 10px; padding: 14px 16px; margin: 18px 0 6px; font-size: 13.5px; color: var(--ink); cursor: pointer; }
.declare input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blue); flex-shrink: 0; }
.declare.invalid, .field.invalid.declare { outline: 1.5px solid var(--red); }

.step-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 15px; font-weight: 500; padding: 12px 22px; border-radius: 10px; border: 1.5px solid #cfd7e6; background: #fff; color: var(--navy); cursor: pointer; text-decoration: none; transition: .15s; line-height: 1.2; }
.btn:hover { border-color: var(--blue); }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 4px 12px rgba(31, 78, 161, .25); }
.btn-primary:hover { background: var(--navy); border-color: var(--navy); }
.btn-primary:disabled { opacity: .6; cursor: wait; }
.btn-ghost { background: transparent; }
.btn-lg { padding: 14px 26px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn-green { background: var(--green); border-color: var(--green); color: #fff; }
.btn-red { background: #fff; border-color: #e6b4ae; color: var(--red); }
.btn-red:hover { background: var(--red); color: #fff; border-color: var(--red); }

/* ---------- Fee panel ---------- */
.fee-panel { position: sticky; top: 18px; }
.fee-panel-inner { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.fee-panel-inner::before { content: ''; position: absolute; right: -50px; bottom: -70px; width: 160px; height: 160px; border-radius: 50%; border: 20px solid rgba(201, 162, 39, .18); }
.fee-head { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 14px; }
.fee-lines { border-bottom: 1px solid rgba(255, 255, 255, .15); padding-bottom: 10px; margin-bottom: 10px; }
.fee-lines .muted { color: rgba(255, 255, 255, .65); margin: 0; }
.fee-line { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; padding: 5px 0; }
.fee-line span:first-child { overflow: hidden; text-overflow: ellipsis; }
.fee-line em { display: block; font-style: normal; font-size: 11.5px; color: rgba(255, 255, 255, .6); }
.fee-row { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; color: rgba(255, 255, 255, .85); position: relative; }
.fee-total { font-size: 18px; font-weight: 700; color: #fff; padding-top: 10px; margin-top: 6px; border-top: 1px solid rgba(255, 255, 255, .15); }
.fee-toggle { display: none; }

.fee-table-card .fee-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.fee-grid div { background: var(--blue-soft); border-radius: 10px; padding: 14px; font-size: 13.5px; }
.fee-grid strong { display: block; color: var(--navy); margin-bottom: 4px; }

/* ---------- Review ---------- */
.review-block { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; }
.review-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.review-head h4 { font-size: 15px; color: var(--navy); }
.review-list { display: grid; grid-template-columns: 170px 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.review-list dt { color: var(--muted); }
.review-list dd { margin: 0; color: var(--ink); word-break: break-word; }
.review-delegates .rd { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.review-delegates .rd:last-child { border-bottom: none; }
.rd strong { display: block; color: var(--ink); }
.rd span { color: var(--muted); font-size: 13px; }
.rd-fee { font-weight: 600; color: var(--navy); white-space: nowrap; }
.review-total { background: var(--blue-soft); border-radius: 12px; padding: 14px 18px; margin-top: 12px; }
.review-total div { display: flex; justify-content: space-between; padding: 3px 0; font-size: 14px; }
.review-total .grand { font-size: 18px; font-weight: 700; color: var(--navy); border-top: 1px solid #cbd8ef; margin-top: 6px; padding-top: 10px; }

/* ---------- Alerts / badges ---------- */
.alert { border-radius: 10px; padding: 14px 16px; margin: 0 0 18px; font-size: 14px; }
.alert ul { margin: 6px 0 0; padding-left: 20px; }
.alert-error { background: var(--red-soft); color: #8e2a20; border: 1px solid #f3c7c1; }
.alert-success { background: var(--green-soft); color: #166b44; border: 1px solid #bfe5d1; }
.alert-info { background: var(--blue-soft); color: var(--navy); border: 1px solid #cddcf3; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 20px; white-space: nowrap; }
.badge-pending_payment { background: #eef1f6; color: #5d6782; }
.badge-pending_verification { background: var(--amber-soft); color: var(--amber); }
.badge-confirmed { background: var(--green-soft); color: var(--green); }
.badge-rejected { background: var(--red-soft); color: var(--red); }

/* ---------- Payment page ---------- */
.guest-card { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; border-left: 5px solid var(--gold); }
.guest-id-box { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-right: 26px; border-right: 1px solid var(--line); }
.guest-id-box .label { font-size: 11.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.guest-id { font-size: 30px; color: var(--navy); letter-spacing: 1px; line-height: 1; }
.guest-meta p { margin: 2px 0; }
.pay-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.amount-box { background: var(--navy); color: #fff; border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; margin-bottom: 18px; }
.amount-box span { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold); }
.amount-box strong { font-size: 32px; line-height: 1.2; }
.amount-box small { color: rgba(255, 255, 255, .7); }
.qr-box { text-align: center; padding: 6px 0 4px; }
.qr-img { width: 240px; max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); padding: 8px; background: #fff; }
.qr-placeholder { width: 220px; height: 220px; margin: 0 auto; border: 2px dashed #c5cfe2; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); background: repeating-linear-gradient(45deg, #fbfcfe, #fbfcfe 10px, #f3f6fb 10px, #f3f6fb 20px); }
.qr-caption { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.pay-steps { font-size: 14px; padding-left: 22px; margin: 18px 0; }
.pay-steps li { margin: 6px 0; }
.bank-details { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; font-size: 14px; }
.bank-details summary { cursor: pointer; color: var(--blue); font-weight: 500; }
.bank-details dl { display: grid; grid-template-columns: 120px 1fr; gap: 4px 12px; margin: 12px 0 6px; }
.bank-details dt { color: var(--muted); }
.bank-details dd { margin: 0; color: var(--ink); font-weight: 500; }
.confirmed-card .tick { width: 64px; height: 64px; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 32px; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }

/* ---------- Footer ---------- */
.site-footer { text-align: center; font-size: 13px; color: var(--muted); padding: 10px 20px 34px; }
.site-footer p { margin: 4px 0; }
.site-footer .copy { font-size: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .form-layout { grid-template-columns: minmax(0, 1fr); }
  .reg-form, .step { min-width: 0; }
  .fee-panel { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 50; }
  .fee-panel-inner { border-radius: 16px 16px 0 0; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 24px rgba(18, 48, 107, .2); }
  .fee-panel-inner::before { display: none; }
  .fee-head, .fee-lines, .fee-row:not(.fee-total) { display: none; }
  .fee-panel.open .fee-head, .fee-panel.open .fee-lines, .fee-panel.open .fee-row { display: flex; }
  .fee-panel.open .fee-lines { display: block; max-height: 40vh; overflow: auto; }
  .fee-total { border-top: none; margin: 0; padding: 4px 70px 4px 0; font-size: 17px; }
  .fee-panel.open .fee-total { border-top: 1px solid rgba(255, 255, 255, .15); padding-top: 10px; margin-top: 6px; }
  .fee-toggle { display: block; position: absolute; right: 16px; bottom: calc(14px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .12); border: none; color: #fff; font: inherit; font-size: 13px; padding: 5px 12px; border-radius: 20px; cursor: pointer; }
  body:has(.fee-panel) .site-footer { padding-bottom: 90px; }
  .pay-layout { grid-template-columns: 1fr; }
  .fee-table-card .fee-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 14.5px; }
  .header-inner { grid-template-columns: 1fr 1fr; padding: 12px 14px 6px; gap: 6px 10px; }
  .logo-left { order: 1; }
  .logo-right { order: 2; }
  .header-title { order: 3; grid-column: 1 / -1; }
  .header-title h1 { font-size: 19px; letter-spacing: 0; }
  .event-dates { font-size: 14.5px; margin-top: 2px; }
  .event-venue { font-size: 13.5px; }
  .logo-img { max-width: 135px; max-height: 80px; }
  .logo-placeholder { width: 112px; height: 64px; }
  .ph-big { font-size: 19px; }
  .header-org { font-size: 11px; padding: 0 14px 10px; }
  .header-org strong { font-size: 11px; letter-spacing: .2px; }
  .header-org span { display: none; }
  .container { padding: 18px 12px 30px; }
  .form-intro { padding: 18px; }
  .form-intro h2 { font-size: 19px; }
  .card { padding: 20px 16px; border-radius: 12px; }
  .card-title { font-size: 17px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .step-item .lbl { display: none; }
  .step-item.active .lbl { display: inline; font-size: 13px; }
  .step-line { margin: 0 6px; }
  .step-actions { flex-direction: column-reverse; align-items: stretch; }
  .step-actions .btn { width: 100%; }
  .step-actions > span:empty { display: none; }
  .review-list { grid-template-columns: 1fr; gap: 0; }
  .review-list dt { margin-top: 8px; font-size: 12.5px; }
  .delegate { padding: 14px 12px 2px; }
  .guest-id-box { border-right: none; padding-right: 0; }
  .guest-card { gap: 12px; }
  .guest-id { font-size: 26px; }
  .choice span { padding: 10px 13px; }
  .small-title { flex-wrap: wrap; gap: 2px 8px; }
  .small-title .muted { font-size: 13px; width: 100%; }
  .delegate-no { font-size: 14px; }
}
@media (max-width: 370px) {
  .header-title h1 { font-size: 17px; }
  .logo-img { max-width: 120px; max-height: 70px; }
}

/* ---------- Hotel & travel ---------- */
.sub-title { font-size: 15.5px; color: var(--navy); margin: 22px 0 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.tariff-box .sub-title { margin-top: 6px; }
.prefs-hint { margin: 10px 0 0; }
.card-title .opt { font-size: 13px; font-weight: 400; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 10px; margin: 6px 0 8px; }
table.tariff { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
table.tariff th { background: var(--navy); color: #fff; text-align: left; padding: 9px 12px; font-weight: 500; font-size: 12.5px; white-space: nowrap; }
table.tariff td { padding: 8px 12px; border-top: 1px solid var(--line); color: var(--ink); }
table.tariff tbody tr:nth-child(even) td { background: var(--gold-soft); }
.prefs { margin-top: 12px; }
.swipe-hint { display: none; font-size: 12.5px; color: var(--muted); margin: 4px 0 0; }
.travel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.travel-head { font-weight: 600; color: var(--navy); margin: 0 0 8px; font-size: 14px; }
.child-question { padding-top: 16px; border-top: 1px solid var(--line); }
#adultLimit { margin-top: 4px; }
@media (max-width: 720px) {
  .travel-grid { grid-template-columns: 1fr; }
  .travel-col + .travel-col { margin-top: 6px; }
  table.tariff { font-size: 12.5px; }
  .swipe-hint { display: block; }
}

/* ---------- Terms page ---------- */
.terms-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 34px; }
.terms h4 { font-size: 15px; color: var(--navy); margin: 16px 0 6px; }
.terms h4:first-child { margin-top: 0; }
.terms p, .terms li { font-size: 14px; }
.terms p { margin: 0 0 6px; }
.terms ul { padding-left: 20px; margin: 0; }
.terms li { margin: 6px 0; }
.terms-contact { margin-top: 22px; padding: 14px 18px; background: var(--blue-soft); border-radius: 10px; font-size: 14px; color: var(--ink); }
@media (max-width: 720px) { .terms-grid { grid-template-columns: 1fr; } }
