/* ==========================================================================
   Mindanao Adlai Summit and Expo 2026
   Mobile-first: phones get an app shell (app bar + bottom tab bar);
   from 960px the same pages become a website / dashboard layout.
   ========================================================================== */

:root {
  --green-950: #0a2a20;
  --green-900: #0f3d2e;
  --green-800: #134b37;
  --green-700: #17603f;
  --green-600: #1f7a4d;
  --green-100: #dcefe3;
  --green-50: #eef7f1;
  --gold-600: #b7791f;
  --gold-500: #d9a521;
  --gold-400: #e8bd45;
  --gold-200: #f6d77a;
  --gold-100: #fbf1d6;
  --cream: #f6f3ea;
  --paper: #ffffff;
  --ink: #17221c;
  --ink-2: #33423a;
  --muted: #5e6b63;
  --line: #e6e0d2;
  --line-2: #efeadf;
  --success: #17803d;
  --success-bg: #e3f4e8;
  --warning: #9a5b00;
  --warning-bg: #fdf0d5;
  --danger: #b42318;
  --danger-bg: #fdecea;
  --info: #1d5f9a;
  --info-bg: #e5f0fa;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --shadow-sm: 0 1px 2px rgb(15 61 46 / 6%), 0 1px 1px rgb(15 61 46 / 4%);
  --shadow: 0 2px 6px rgb(15 61 46 / 6%), 0 8px 24px rgb(15 61 46 / 7%);
  --shadow-lg: 0 18px 50px rgb(10 42 32 / 18%);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --appbar-h: 56px;
  --tabbar-h: 64px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --gutter: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

/* ── Base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.5; color: var(--ink);
  background: var(--cream); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; margin: 0; letter-spacing: -0.015em; }
p { margin: 0; }
a { color: var(--green-700); text-underline-offset: 2px; }
a:hover { color: var(--green-900); }
button { font: inherit; color: inherit; }
code, .mono { font-family: var(--mono); font-size: .92em; letter-spacing: .01em; }
code { background: var(--line-2); padding: .1em .35em; border-radius: 6px; }
.break { word-break: break-word; overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid var(--gold-400); outline-offset: 2px; border-radius: 6px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.icon-xs { width: 1em; height: 1em; display: inline-block; vertical-align: -0.15em; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; }
.skip-link:focus { top: calc(var(--safe-top) + 8px); }
.hp { position: absolute; left: -9999px; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.center { text-align: center; }
.tone-success { color: var(--success); }
.tone-warning { color: var(--warning); }
.tone-danger { color: var(--danger); }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding-inline: var(--gutter); }
.narrow { max-width: 560px; margin-inline: auto; }
.page-pad { padding-top: 16px; padding-bottom: 28px; }
.stack > * + * { margin-top: 14px; }
.stack-lg > * + * { margin-top: 22px; }

/* Smooth app-like page changes (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: 160ms ease-out both vt-out; }
  ::view-transition-new(root) { animation: 220ms var(--ease) both vt-in; }
  @keyframes vt-out { to { opacity: 0; } }
  @keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }
}
.tab-bar { view-transition-name: tab-bar; }
.app-bar { view-transition-name: app-bar; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  --bg: var(--paper); --fg: var(--ink); --bd: var(--line);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: var(--radius); border: 1px solid var(--bd);
  background: var(--bg); color: var(--fg); font-weight: 650; font-size: .98rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation;
  transition: transform .12s var(--ease), background-color .15s, box-shadow .15s, opacity .15s;
}
.btn:hover { color: var(--fg); filter: brightness(.98); }
.btn:active { transform: scale(.97); }
.btn .icon { width: 1.15em; height: 1.15em; }
.btn-primary { --bg: var(--green-700); --fg: #fff; --bd: var(--green-700); box-shadow: 0 6px 16px rgb(23 96 63 / 22%); }
.btn-primary:hover { --bg: var(--green-800); }
.btn-gold { --bg: var(--gold-500); --fg: var(--green-950); --bd: var(--gold-500); box-shadow: 0 6px 18px rgb(217 165 33 / 30%); }
.btn-gold:hover { --bg: var(--gold-400); }
.btn-success { --bg: var(--success); --fg: #fff; --bd: var(--success); box-shadow: 0 6px 16px rgb(23 128 61 / 25%); }
.btn-danger { --bg: var(--danger); --fg: #fff; --bd: var(--danger); }
.btn-danger-ghost { --bg: var(--paper); --fg: var(--danger); --bd: #f2c7c2; }
.btn-ghost { --bg: var(--paper); --fg: var(--green-800); --bd: var(--line); }
.btn-on-dark { --bg: rgb(255 255 255 / 10%); --fg: #fff; --bd: rgb(255 255 255 / 28%); }
.btn-on-dark:hover { --bg: rgb(255 255 255 / 18%); }
.btn-disabled, .btn:disabled { opacity: .55; pointer-events: none; box-shadow: none; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .88rem; border-radius: 11px; }
.btn-lg { min-height: 52px; padding: 14px 22px; font-size: 1.04rem; border-radius: 16px; }
.btn-xl { min-height: 60px; padding: 16px 24px; font-size: 1.12rem; border-radius: 18px; }
.btn-block { width: 100%; }
.btn[aria-busy="true"] { pointer-events: none; opacity: .85; }
.btn[aria-busy="true"] .icon { display: none; }
.btn[aria-busy="true"]::before {
  content: ""; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite;
}
.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 0;
  background: transparent; color: inherit; cursor: pointer;
}
.icon-btn:hover { background: rgb(0 0 0 / 6%); }
.icon-btn-dark { background: rgb(255 255 255 / 12%); color: #fff; }
.copy-btn {
  display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 4px 9px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--paper); font-size: .78rem; font-weight: 650; color: var(--green-700);
  cursor: pointer; vertical-align: middle; font-family: var(--font);
}
.copy-btn .icon { width: 14px; height: 14px; }
.copy-btn.copied { background: var(--success-bg); border-color: transparent; color: var(--success); }

.spinner { display: inline-block; width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--green-100); border-top-color: var(--green-700); animation: spin .8s linear infinite; }
.spinner-lg { width: 54px; height: 54px; border-width: 5px; margin: 6px auto 4px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Chips, badges, alerts ──────────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px;
  font-size: .78rem; font-weight: 700; line-height: 1.2; white-space: nowrap; background: var(--line-2); color: var(--ink-2);
}
.chip-lg { padding: 7px 14px; font-size: .88rem; }
.chip-success { background: var(--success-bg); color: var(--success); }
.chip-warning { background: var(--warning-bg); color: var(--warning); }
.chip-danger { background: var(--danger-bg); color: var(--danger); }
.chip-gold { background: var(--gold-100); color: #7a5300; }
.chip-neutral { background: var(--line-2); color: var(--muted); }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .72rem; font-weight: 800; margin-left: auto; }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); margin: 14px 0; font-size: .95rem; }
.alert > .icon { margin-top: 1px; width: 22px; height: 22px; }
.alert > div > p + p { margin-top: 4px; }
.alert-danger { background: var(--danger-bg); color: #7a1a12; }
.alert-danger > .icon { color: var(--danger); }
.alert-warning { background: var(--warning-bg); color: #5f3a00; }
.alert-success { background: var(--success-bg); color: #0f4f26; }

.toasts {
  position: fixed; z-index: 80; left: 0; right: 0; top: calc(var(--safe-top) + 10px);
  display: grid; gap: 8px; padding-inline: 12px; pointer-events: none; justify-items: center;
}
.toast {
  pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; width: min(520px, 100%);
  padding: 13px 12px 13px 16px; border-radius: 16px; background: var(--ink); color: #fff;
  box-shadow: var(--shadow-lg); font-size: .94rem; animation: toast-in .35s var(--ease) both;
}
.toast p { flex: 1; padding-top: 1px; }
.toast > .icon { width: 22px; height: 22px; }
.toast-success > .icon { color: #7ee0a2; }
.toast-danger { background: #5c140e; }
.toast-danger > .icon { color: #ffb4a8; }
.toast-info > .icon { color: var(--gold-200); }
.toast-close { border: 0; background: transparent; color: rgb(255 255 255 / 70%); padding: 2px; cursor: pointer; }
.toast.hide { animation: toast-out .3s ease-in both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-14px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-14px); } }

/* ── Cards & lists ──────────────────────────────────────────────────────── */
.card { background: var(--paper); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm); border: 1px solid var(--line-2); }
.card > * + * { margin-top: 12px; }
.card-title { font-size: 1.08rem; font-weight: 750; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-accent { background: linear-gradient(160deg, var(--green-50), var(--paper) 60%); }
.section-title { font-size: 1.25rem; font-weight: 800; margin-bottom: 14px; }
.page-head h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); font-weight: 850; margin-top: 4px; }
.lede { font-size: 1.06rem; color: var(--ink-2); margin-top: 8px; max-width: 62ch; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-200); }
.eyebrow-dark { color: var(--gold-600); }

.screen-head { margin: 6px 0 16px; }
.screen-head h1 { font-size: 1.65rem; font-weight: 850; }
.screen-head p { margin-top: 4px; }

.empty { text-align: center; padding: 34px 22px; display: grid; justify-items: center; gap: 10px; }
.empty > * + * { margin-top: 0; }
.empty p { max-width: 42ch; color: var(--muted); }
.empty-icon, .result-icon {
  display: grid; place-items: center; width: 64px; height: 64px; border-radius: 22px; background: var(--green-50); color: var(--green-700);
}
.empty-icon .icon, .result-icon .icon { width: 30px; height: 30px; }
.empty-icon.tone-warning { background: var(--warning-bg); color: var(--warning); }
.empty-icon.tone-danger { background: var(--danger-bg); color: var(--danger); }
.empty-icon.tone-success { background: var(--success-bg); color: var(--success); }
.empty-title { font-size: 1.3rem; font-weight: 800; }
.empty .form { width: 100%; max-width: 380px; text-align: left; }

.result { text-align: center; padding: 30px 20px; display: grid; justify-items: center; gap: 12px; }
.result > * + * { margin-top: 0; }
.result .summary { width: 100%; text-align: left; margin: 6px 0; }
.result-icon { width: 76px; height: 76px; border-radius: 50%; }
.result-icon .icon { width: 38px; height: 38px; stroke-width: 2.4; }
.result-success { background: var(--success); color: #fff; box-shadow: 0 10px 30px rgb(23 128 61 / 30%); }
.result-warning { background: var(--warning-bg); color: var(--warning); }
.result-danger { background: var(--danger-bg); color: var(--danger); }
.result-info { background: var(--info-bg); color: var(--info); }
.result-title { font-size: 1.5rem; font-weight: 850; }
.result-text { color: var(--ink-2); max-width: 44ch; }
.pop { animation: pop .5s var(--ease) both; }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); } }

.summary { display: grid; }
.summary-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2); font-size: .95rem; }
.summary-row:last-child { border-bottom: 0; }
.summary-row > span:first-child { color: var(--muted); }
.summary-row > strong { text-align: right; }
.summary-total { font-size: 1.05rem; }
.summary-total strong { font-size: 1.25rem; color: var(--green-800); }
.card.summary { padding-block: 8px; }

.list-card { background: var(--paper); border-radius: var(--radius-lg); border: 1px solid var(--line-2); box-shadow: var(--shadow-sm); overflow: hidden; }
.list-card-title { font-size: .76rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 14px 16px 4px; }
.list-row {
  display: flex; align-items: center; gap: 14px; padding: 13px 16px; min-height: 56px; color: var(--ink); text-decoration: none;
  border-top: 1px solid var(--line-2);
}
.list-card-title + .list-row { border-top: 0; }
.list-row > .icon:first-child { color: var(--green-700); width: 22px; height: 22px; }
.list-row > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.list-row small { display: block; color: var(--muted); font-size: .78rem; }
a.list-row:active { background: var(--line-2); }
.chev { color: #b4bab5; width: 18px; height: 18px; margin-left: auto; }
.link-row { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; text-decoration: none; padding: 8px 0; }

.banner-cta {
  display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--radius-lg); text-decoration: none;
  background: var(--green-700); color: #fff; box-shadow: 0 10px 26px rgb(23 96 63 / 25%); margin-bottom: 14px;
}
.banner-cta:hover { color: #fff; filter: brightness(1.05); }
.banner-cta > .icon:first-child { width: 28px; height: 28px; }
.banner-cta span { flex: 1; }
.banner-cta strong, .banner-cta small { display: block; }
.banner-cta small { opacity: .85; font-size: .84rem; }
.banner-cta .chev { color: currentColor; opacity: .7; }
.banner-cta-gold { background: linear-gradient(135deg, var(--gold-500), var(--gold-400)); color: var(--green-950); box-shadow: 0 10px 26px rgb(217 165 33 / 30%); }
.banner-cta-gold:hover { color: var(--green-950); }
.banner-cta-warning { background: var(--warning-bg); color: #5f3a00; box-shadow: none; border: 1px solid #f4dba6; }
.banner-cta-warning:hover { color: #5f3a00; }
.banner-cta-danger { background: var(--danger-bg); color: #7a1a12; box-shadow: none; border: 1px solid #f5c9c3; }
.banner-cta-danger:hover { color: #7a1a12; }

.tip { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); background: var(--gold-100); color: #5d4300; font-size: .92rem; margin-top: 18px; }
.tip > .icon { width: 22px; height: 22px; color: var(--gold-600); }

.avatar {
  display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 50%;
  background: var(--green-100); color: var(--green-800); font-weight: 800;
}
.avatar-lg { width: 60px; height: 60px; font-size: 1.5rem; }
.profile-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 6px 0 8px; }
.profile-head h1 { font-size: 1.35rem; font-weight: 850; }
.profile-head > div { flex: 1; min-width: 160px; }

/* ── Forms ──────────────────────────────────────────────────────────────── */
.form > * + * { margin-top: 16px; }
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > label, .field > legend { font-weight: 650; font-size: .93rem; color: var(--ink-2); padding: 0; }
.optional { font-weight: 500; color: var(--muted); }
input[type="text"], input[type="email"], input[type="tel"], input[type="search"], input[type="password"], input:not([type]), textarea, select {
  width: 100%; min-height: 52px; padding: 13px 15px; border-radius: var(--radius); border: 1.5px solid var(--line);
  background: #fdfcf9; color: var(--ink); font: inherit; font-size: 16px; /* 16px stops iOS zoom-on-focus */
  transition: border-color .15s, box-shadow .15s, background-color .15s; appearance: none; -webkit-appearance: none;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
input::placeholder, textarea::placeholder { color: #a3aaa5; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--green-600); background: #fff; box-shadow: 0 0 0 4px rgb(31 122 77 / 15%); }
[aria-invalid="true"] { border-color: var(--danger) !important; background: #fffafa; }
input:autofill { box-shadow: 0 0 0 100px #fffbea inset; }
.hint { font-size: .82rem; color: var(--muted); }
.error { font-size: .85rem; color: var(--danger); font-weight: 600; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .92rem; color: var(--ink-2); cursor: pointer; padding: 4px 0; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--green-700); }
.check-invalid { color: var(--danger); }
.pw { position: relative; }
.pw input { padding-right: 52px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border: 0; background: transparent; color: var(--muted); border-radius: 10px; cursor: pointer; display: grid; place-items: center; }
.pw-toggle[aria-pressed="true"] { color: var(--green-700); }
.form-inline { display: grid; gap: 12px; }

.sticky-cta { position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 10px); z-index: 5; padding-top: 4px; }

.drop {
  position: relative; display: block; border: 2px dashed #cfc8b6; border-radius: var(--radius-lg); background: #fbfaf5;
  padding: 26px 16px; text-align: center; cursor: pointer; transition: border-color .15s, background-color .15s;
}
.drop:hover, .drop.is-over { border-color: var(--green-600); background: var(--green-50); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.drop:focus-within { outline: 3px solid var(--gold-400); outline-offset: 2px; }
.drop-empty { display: grid; justify-items: center; gap: 6px; }
.drop-empty small { color: var(--muted); }
.drop-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: var(--green-100); color: var(--green-700); }
.drop-icon .icon { width: 26px; height: 26px; }
.drop-preview { display: grid; justify-items: center; gap: 8px; }
.drop-preview img { max-height: 260px; border-radius: 12px; box-shadow: var(--shadow); }
.drop-file { font-weight: 650; word-break: break-all; }
.drop-change { font-size: .85rem; color: var(--green-700); font-weight: 700; }
.drop.has-file { border-style: solid; border-color: var(--green-600); background: var(--paper); }

/* ── Stepper ────────────────────────────────────────────────────────────── */
.stepper { margin: 4px 0 18px; }
.stepper-count { font-size: .84rem; color: var(--muted); margin-bottom: 10px; }
.stepper-count strong { color: var(--ink); }
.stepper-track { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stepper-track li { display: grid; gap: 6px; }
.stepper-track li::before { content: ""; height: 5px; border-radius: 99px; background: var(--line); }
.stepper-track li.done::before, .stepper-track li.current::before { background: var(--green-600); }
.stepper-track li.current::before { background: linear-gradient(90deg, var(--green-600), var(--gold-500)); }
.stepper-dot, .stepper-label { display: none; }

/* ── Registration bits ──────────────────────────────────────────────────── */
.fee-banner {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding: 18px 20px; margin-bottom: 14px;
  border-radius: var(--radius-lg); background: radial-gradient(120% 140% at 100% 0%, var(--green-700), var(--green-900) 70%); color: #fff;
}
.fee-banner-label { font-size: .8rem; opacity: .85; font-weight: 650; }
.fee-banner-amount { font-size: 2.1rem; font-weight: 850; letter-spacing: -0.03em; line-height: 1.05; }
.fee-banner-note { font-size: .8rem; opacity: .85; text-align: right; max-width: 15ch; }

.methods { border: 0; margin: 0; padding: 0; display: grid; gap: 12px; }
.method {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--radius-lg);
  background: var(--paper); border: 2px solid var(--line-2); box-shadow: var(--shadow-sm); cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .12s;
}
.method:active { transform: scale(.99); }
.method input { position: absolute; opacity: 0; pointer-events: none; }
.method:has(input:checked) { border-color: var(--green-600); box-shadow: 0 0 0 4px rgb(31 122 77 / 12%); }
.method:has(input:focus-visible) { outline: 3px solid var(--gold-400); outline-offset: 2px; }
.method-off { opacity: .55; cursor: not-allowed; }
.method-text { flex: 1; display: grid; gap: 2px; }
.method-text small { color: var(--muted); font-size: .84rem; line-height: 1.35; }
.method-radio { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #c8c2b2; flex: none; transition: all .15s; }
.method:has(input:checked) .method-radio { border: 7px solid var(--green-600); }
.method-logo {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; flex: none;
  font-weight: 900; font-size: 1rem; letter-spacing: -0.02em; color: #fff;
}
.method-maya { background: #0b0b0b; color: #3fdd7f; font-size: .82rem; }
.method-gcash { background: #0a5ad6; font-size: 1.4rem; }
.method-head { display: flex; align-items: center; gap: 12px; }

.gcash { display: grid; gap: 16px; }
.gcash > * + * { margin-top: 0; }
.gcash-amount { display: grid; justify-items: center; gap: 2px; padding: 16px; border-radius: var(--radius); background: var(--green-50); text-align: center; }
.gcash-amount span { font-size: .84rem; color: var(--muted); font-weight: 650; }
.gcash-amount strong { font-size: 2.2rem; font-weight: 850; letter-spacing: -0.03em; color: var(--green-900); }
.gcash-qr { margin: 0; display: grid; justify-items: center; gap: 8px; }
.gcash-qr img { width: min(240px, 70vw); height: auto; border-radius: 16px; border: 1px solid var(--line); background: #fff; padding: 8px; }
.gcash-qr figcaption { font-size: .84rem; color: var(--muted); }
.gcash-details { margin: 0; display: grid; }
.gcash-details > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.gcash-details dt { color: var(--muted); font-size: .9rem; }
.gcash-details dd { margin: 0; font-weight: 750; text-align: right; }

.chips-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-pick button { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 7px 12px; font-size: .84rem; font-weight: 600; cursor: pointer; }
.chips-pick button:active { background: var(--line-2); }

/* ── Home ───────────────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(90% 70% at 100% 0%, rgb(217 165 33 / 28%), transparent 60%),
    radial-gradient(70% 60% at 0% 100%, rgb(31 122 77 / 55%), transparent 70%),
    var(--green-900);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .14;
  background-image: url("../img/grain-pattern.svg"); background-size: 180px;
}
.hero-inner { position: relative; z-index: 1; display: grid; gap: 22px; padding-top: 26px; padding-bottom: 26px; }
.hero h1 { font-size: clamp(2rem, 8.5vw, 3.6rem); font-weight: 900; letter-spacing: -0.035em; line-height: 1.02; margin-top: 10px; }
.hero h1 span { display: block; color: var(--gold-200); }
.hero-lede { margin-top: 14px; font-size: 1.04rem; color: rgb(255 255 255 / 84%); max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero-actions .btn { flex: 1 1 200px; }
.hero-card {
  background: rgb(255 255 255 / 96%); color: var(--ink); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-lg);
}
.hero-card-row { display: flex; justify-content: space-between; align-items: center; }
.hero-card-meta { font-size: .84rem; font-weight: 700; color: var(--green-700); }
.hero-price { font-size: 2.8rem; font-weight: 900; letter-spacing: -0.04em; margin-top: 8px; color: var(--green-900); line-height: 1; }
.hero-price small { font-size: .9rem; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 6px; }
.hero-card-note { display: flex; gap: 8px; align-items: flex-start; font-size: .88rem; color: var(--ink-2); margin-top: 12px; }
.hero-card-note .icon { color: var(--gold-600); margin-top: 1px; }
.hero-includes { list-style: none; padding: 14px 0 0; margin: 14px 0 0; border-top: 1px solid var(--line-2); display: grid; gap: 8px; font-size: .92rem; }
.hero-includes li { display: flex; gap: 10px; align-items: center; }
.hero-includes .icon { color: var(--success); stroke-width: 2.6; width: 18px; height: 18px; }

.day-strip { display: grid; gap: 12px; }
.day-card { display: flex; gap: 14px; align-items: center; padding: 14px; background: var(--paper); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); border: 1px solid var(--line-2); }
.day-date {
  display: grid; place-items: center; width: 60px; height: 64px; flex: none; border-radius: 16px; background: var(--green-900); color: #fff; line-height: 1;
}
.day-date span { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-200); }
.day-date strong { font-size: 1.7rem; font-weight: 850; }
.day-kicker { font-size: .78rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-600); }
.day-title { font-weight: 750; }

.quick-grid { display: grid; gap: 10px; }
.quick {
  display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--radius-lg); background: var(--paper);
  border: 1px solid var(--line-2); box-shadow: var(--shadow-sm); text-decoration: none; color: var(--ink);
  transition: transform .12s, box-shadow .15s;
}
.quick:active { transform: scale(.985); }
.quick:hover { color: var(--ink); box-shadow: var(--shadow); }
.quick > span:nth-child(2) { flex: 1; min-width: 0; }
.quick strong, .quick small { display: block; }
.quick small { color: var(--muted); font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; flex: none; background: var(--green-50); color: var(--green-700); }
.quick-icon .icon { width: 24px; height: 24px; }

.how-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.how-steps li { display: flex; gap: 14px; padding: 16px; background: var(--paper); border-radius: var(--radius-lg); border: 1px solid var(--line-2); }
.how-steps p { color: var(--muted); font-size: .92rem; margin-top: 2px; }
.how-num { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none; background: var(--gold-100); color: #7a5300; font-weight: 850; }

/* Event page */
.two-col { display: grid; gap: 16px; }
.facts { margin: 0; display: grid; gap: 14px; }
.facts dt { display: flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.facts dt .icon { color: var(--green-700); }
.facts dd { margin: 2px 0 0; font-weight: 650; }
.price-list { list-style: none; margin: 0; padding: 0; }
.price-list li { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.price-list small { display: block; color: var(--muted); font-size: .82rem; }
.price-list strong { font-size: 1.25rem; }
.timeline { display: grid; gap: 16px; }
.timeline-day { border-left: 3px solid var(--gold-400); padding-left: 14px; }
.timeline-date { color: var(--green-800); }
.timeline ul { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); }
.timeline li + li { margin-top: 3px; }
.faq details { border-top: 1px solid var(--line-2); }
.faq details:first-child { border-top: 0; }
.faq summary { list-style: none; cursor: pointer; font-weight: 650; padding: 14px 28px 14px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: 1.4rem; color: var(--green-700); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 14px; color: var(--ink-2); }
.list-steps { margin: 0; padding-left: 22px; display: grid; gap: 8px; color: var(--ink-2); }
.list-check { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.list-check li { display: flex; gap: 10px; }
.list-check .icon { color: var(--success); stroke-width: 2.6; margin-top: 2px; }

/* ── Tickets ────────────────────────────────────────────────────────────── */
.tickets-head { display: flex; align-items: flex-end; justify-content: space-between; }
.segmented {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; margin-bottom: 16px;
  border-radius: 14px; background: #e9e4d6;
}
.segmented button, .segmented a {
  border: 0; background: transparent; border-radius: 11px; min-height: 44px; padding: 6px 10px; font-weight: 700; cursor: pointer;
  color: var(--ink-2); text-decoration: none; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: .95rem;
}
.segmented small { font-weight: 600; color: var(--muted); }
.segmented [aria-selected="true"], .segmented [aria-current="page"] { background: var(--paper); color: var(--green-900); box-shadow: var(--shadow-sm); }
.segmented .badge { margin-left: 4px; }

.tickets {
  display: grid; grid-auto-flow: column; grid-auto-columns: 100%; gap: 16px; overflow-x: auto;
  scroll-snap-type: x mandatory; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); padding-bottom: 8px;
}
.tickets::-webkit-scrollbar { display: none; }
.ticket {
  --accent: var(--green-700); --accent-2: var(--green-900);
  scroll-snap-align: center; position: relative; background: var(--paper); border-radius: 24px; overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--line-2);
}
.ticket-day2 { --accent: #a86b12; --accent-2: #7a4c09; }
.ticket-top { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.ticket-day-label { font-size: .8rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; opacity: .85; }
.ticket-date { font-size: 1.15rem; font-weight: 800; }
.ticket-body { display: grid; justify-items: center; padding: 18px 20px 6px; gap: 12px; }
.ticket-event { font-weight: 750; color: var(--ink-2); text-align: center; font-size: .95rem; }
.ticket-qr { position: relative; padding: 10px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.ticket-qr img { width: min(270px, 68vw); height: auto; image-rendering: pixelated; }
.ticket-used .ticket-qr img { opacity: .25; }
.ticket-stamp {
  position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.2rem; font-weight: 900; letter-spacing: .2em;
  color: var(--danger); transform: rotate(-14deg); text-shadow: 0 2px 0 #fff;
}
.ticket-tear { position: relative; height: 26px; margin: 8px 0 0; }
.ticket-tear::before { content: ""; position: absolute; left: 22px; right: 22px; top: 50%; border-top: 2px dashed var(--line); }
.ticket-tear::after {
  content: ""; position: absolute; inset: 0 -13px; background:
    radial-gradient(circle at 0 50%, var(--cream) 12px, transparent 13px),
    radial-gradient(circle at 100% 50%, var(--cream) 12px, transparent 13px);
}
.ticket-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 0; padding: 4px 20px 16px; }
.ticket-meta dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
.ticket-meta dd { margin: 2px 0 0; font-weight: 700; font-size: .95rem; overflow-wrap: anywhere; }
.ticket-actions { display: flex; gap: 10px; padding: 0 20px 20px; }
.ticket-actions .btn { flex: 1; }

/* ── App shell (mobile) ─────────────────────────────────────────────────── */
.site-header, .site-footer { display: none; }
.app-bar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 8px;
  height: calc(var(--appbar-h) + var(--safe-top)); padding: var(--safe-top) 8px 0;
  background: rgb(246 243 234 / 88%); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid rgb(0 0 0 / 5%);
}
.tab-home .app-bar { background: var(--green-900); color: #fff; border-bottom-color: transparent; }
.app-bar-title { flex: 1; text-align: center; font-weight: 750; font-size: 1.04rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.app-bar-back, .app-bar-logo, .app-bar-spacer { width: 44px; height: 44px; display: grid; place-items: center; flex: none; color: inherit; border-radius: 12px; }
.app-bar-back .icon { width: 26px; height: 26px; }
.app-bar-spacer { width: auto; min-width: 44px; }
.main { min-height: calc(100dvh - var(--appbar-h) - var(--tabbar-h)); padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 12px); }

.tab-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  height: calc(var(--tabbar-h) + var(--safe-bottom)); padding-bottom: var(--safe-bottom);
  background: rgb(255 255 255 / 92%); backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border-top: 1px solid rgb(0 0 0 / 7%);
}
.tab {
  display: grid; justify-items: center; align-content: center; gap: 3px; text-decoration: none; color: #7b857f;
  font-size: .68rem; font-weight: 650; letter-spacing: .01em; -webkit-touch-callout: none; position: relative;
}
.tab-icon { position: relative; display: grid; place-items: center; width: 50px; height: 30px; border-radius: 99px; transition: background-color .2s; }
.tab-icon .icon { width: 24px; height: 24px; }
.tab[aria-current="page"] { color: var(--green-800); }
.tab[aria-current="page"] .tab-icon { background: var(--green-100); }
.tab[aria-current="page"] .icon { stroke-width: 2.3; }
.tab:active .tab-icon { transform: scale(.92); }
.tab-primary .tab-icon { background: var(--green-700); color: #fff; width: 46px; height: 32px; }
.tab-primary[aria-current="page"] .tab-icon { background: var(--green-900); color: var(--gold-200); }
.tab-badge { position: absolute; top: -4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--danger); color: #fff; font-size: .66rem; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; }

/* Bottom sheet dialogs */
dialog.sheet {
  padding: 0; border: 0; width: 100%; max-width: 100%; margin: auto 0 0; max-height: 92dvh; border-radius: 24px 24px 0 0;
  background: var(--paper); color: var(--ink); box-shadow: var(--shadow-lg);
}
dialog.sheet[open] { animation: sheet-up .32s var(--ease) both; }
dialog.sheet::backdrop { background: rgb(10 22 16 / 45%); backdrop-filter: blur(2px); }
dialog:modal { overscroll-behavior: contain; }
dialog::backdrop { overflow: hidden; overscroll-behavior: contain; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
.sheet-body { display: grid; gap: 14px; padding: 10px 20px calc(20px + var(--safe-bottom)); }
.sheet-grabber { justify-self: center; width: 42px; height: 5px; border-radius: 99px; background: var(--line); }
.sheet-icon { justify-self: center; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--gold-100); color: var(--gold-600); }
.sheet-icon .icon { width: 28px; height: 28px; }
.sheet-icon.danger { background: var(--danger-bg); color: var(--danger); }
.sheet-title { font-size: 1.25rem; font-weight: 800; text-align: center; }
.sheet-text { color: var(--muted); text-align: center; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }

/* ── Desktop website layout ─────────────────────────────────────────────── */
@media (min-width: 960px) {
  :root { --gutter: 28px; }
  body.site .app-bar, body.site .tab-bar { display: none; }
  .site-header {
    display: block; position: sticky; top: 0; z-index: 40; background: rgb(15 61 46 / 96%);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: #fff;
  }
  .site-header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
  .site-nav { display: flex; align-items: center; gap: 6px; }
  .site-nav a:not(.btn) { color: rgb(255 255 255 / 82%); text-decoration: none; font-weight: 600; padding: 8px 14px; border-radius: 10px; }
  .site-nav a:not(.btn):hover, .site-nav a[aria-current="page"] { color: #fff; background: rgb(255 255 255 / 10%); }
  .site-nav .btn { margin-left: 10px; }
  .main { min-height: calc(100dvh - 72px - 120px); padding-bottom: 48px; }
  .site-footer { display: block; background: var(--green-950); color: rgb(255 255 255 / 75%); padding: 30px 0; font-size: .9rem; }
  .site-footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
  .site-footer strong { color: #fff; }
  .site-footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
  .site-footer a { color: var(--gold-200); text-decoration: none; }
  .toasts { top: 84px; }
  .page-pad { padding-top: 36px; padding-bottom: 48px; }
  .sticky-cta { position: static; }

  .hero { border-radius: 0; }
  .hero-inner { grid-template-columns: 1.35fr .9fr; align-items: center; gap: 48px; padding-top: 72px; padding-bottom: 80px; }
  .hero-actions .btn { flex: 0 0 auto; }
  .day-strip { grid-template-columns: 1fr 1fr; margin-top: -36px; position: relative; z-index: 2; }
  .day-card { padding: 20px; box-shadow: var(--shadow); }
  .quick-grid { grid-template-columns: repeat(4, 1fr); }
  .quick { flex-direction: column; align-items: flex-start; padding: 20px; }
  .quick .chev { display: none; }
  .quick small { white-space: normal; }
  .how-steps { grid-template-columns: repeat(4, 1fr); }
  .how-steps li { flex-direction: column; }
  .two-col { grid-template-columns: 1.5fr 1fr; align-items: start; gap: 24px; }
  .two-col > aside { position: sticky; top: 92px; }

  .stepper-track li { grid-template-columns: auto 1fr; align-items: center; gap: 8px; }
  .stepper-track li::before { display: none; }
  .stepper-count { display: none; }
  .stepper-track { gap: 10px; }
  .stepper-dot { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--line); color: var(--muted); font-weight: 800; font-size: .85rem; }
  .stepper-dot .icon { width: 16px; height: 16px; stroke-width: 3; }
  .stepper-label { display: block; font-size: .86rem; font-weight: 650; color: var(--muted); }
  .done .stepper-dot { background: var(--green-600); color: #fff; }
  .current .stepper-dot { background: var(--green-900); color: var(--gold-200); box-shadow: 0 0 0 4px var(--green-100); }
  .current .stepper-label { color: var(--ink); }

  .tickets { grid-auto-flow: row; grid-template-columns: 1fr 1fr; overflow: visible; margin: 0; padding: 0; gap: 24px; }
  .segmented[data-ticket-tabs] { display: none; }
  dialog.sheet { margin: auto; max-width: 460px; border-radius: 24px; }
  dialog.sheet[open] { animation-name: sheet-pop; }
  .sheet-grabber { display: none; }
  .sheet-body { padding: 26px; }
}
@keyframes sheet-pop { from { transform: scale(.96); opacity: 0; } }

/* ── Brand ──────────────────────────────────────────────────────────────── */
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand:hover { color: inherit; }
.brand-text { display: grid; line-height: 1.1; }
.brand-text strong { font-size: 1rem; font-weight: 850; letter-spacing: -0.01em; }
.brand-text span { font-size: .76rem; opacity: .75; font-weight: 600; }
.brand-light { color: #fff; }

/* ==========================================================================
   Admin console
   ========================================================================== */
body.admin { background: #f3f1ea; }
.admin-side { display: none; }
.admin-main { padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 16px); }
.admin-content { padding: 14px var(--gutter) 24px; max-width: 1240px; margin: 0 auto; }
.admin-content > * + * { margin-top: 16px; }
.app-bar-admin { background: rgb(243 241 234 / 90%); }

.admin-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.admin-head h1 { font-size: 1.55rem; font-weight: 850; }
.admin-head p { margin-top: 2px; }
.admin-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back-link { display: none; align-items: center; gap: 4px; font-size: .88rem; font-weight: 650; text-decoration: none; margin-bottom: 6px; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat {
  display: grid; gap: 4px; align-content: start; padding: 14px; border-radius: var(--radius-lg); background: var(--paper);
  border: 1px solid var(--line-2); box-shadow: var(--shadow-sm); text-decoration: none; color: var(--ink); position: relative; overflow: hidden;
}
a.stat:hover { color: var(--ink); box-shadow: var(--shadow); }
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--green-600); opacity: .0; }
.stat-success::before { background: var(--success); opacity: 1; }
.stat-warning::before { background: var(--gold-500); opacity: 1; }
.stat-danger::before { background: var(--danger); opacity: 1; }
.stat-label { font-size: .78rem; font-weight: 700; color: var(--muted); }
.stat-value { font-size: 1.8rem; font-weight: 850; letter-spacing: -0.03em; line-height: 1.1; }
.stat-value small { font-size: 1rem; color: var(--muted); font-weight: 650; }
.stat-sub { font-size: .76rem; color: var(--muted); }
.stat-wide { grid-column: 1 / -1; }
.stat-money { background: linear-gradient(135deg, var(--green-800), var(--green-900)); color: #fff; border: 0; }
.stat-money .stat-label, .stat-money .stat-sub { color: rgb(255 255 255 / 75%); }
.stat-money .stat-value { color: var(--gold-200); font-size: 2.1rem; }
.stats-compact .stat-value { font-size: 1.5rem; }
.meter { display: block; height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; margin-top: 4px; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--green-600), var(--gold-500)); border-radius: inherit; }

.panel { background: var(--paper); border-radius: var(--radius-lg); border: 1px solid var(--line-2); box-shadow: var(--shadow-sm); overflow: hidden; }
.panel.pad { padding: 16px; }
.panel.pad > * + * { margin-top: 10px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.panel-head h2 { font-size: 1rem; font-weight: 800; }
.panel-head a { font-size: .86rem; font-weight: 650; text-decoration: none; }
.panel-danger .panel-head h2 { color: var(--danger); }
.pad { padding: 14px 16px; }
.pad-top-0 { padding-top: 0; }
.admin-grid { display: grid; gap: 16px; align-items: start; }

.rows { list-style: none; margin: 0; padding: 0; }
.rows > li + li { border-top: 1px solid var(--line-2); }
.row, .row-link { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 60px; text-decoration: none; color: var(--ink); }
.row-link:active, .row-link:hover { background: #faf8f2; color: var(--ink); }
.row-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.row-main strong { overflow: hidden; text-overflow: ellipsis; }
.row-main small { color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.rows-compact .row { min-height: 0; padding-block: 9px; }
.row-muted { opacity: .55; }
.ticket-mini { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--green-900); color: var(--gold-200); font-weight: 850; font-size: .85rem; flex: none; }

.search { position: relative; }
.search > .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { padding-left: 44px; background: var(--paper); }
.pills { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); padding-bottom: 2px; }
.pills::-webkit-scrollbar { display: none; }
.pills a {
  flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--paper);
  border: 1px solid var(--line); text-decoration: none; color: var(--ink-2); font-weight: 650; font-size: .88rem; min-height: 38px;
}
.pills a[aria-current="true"] { background: var(--green-900); border-color: var(--green-900); color: #fff; }
.pill-count { font-size: .75rem; opacity: .7; }
.segmented-links { display: grid; }

/* Tables become cards on phones */
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 750; padding: 12px 14px; background: #faf8f2; border-bottom: 1px solid var(--line-2); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.table td > span, .table td > a { display: block; }
.table td > .chip { display: inline-flex; margin-bottom: 3px; }
.cell-title { font-weight: 750; color: var(--ink); text-decoration: none; }
.cell-chev { color: #b4bab5; width: 30px; }
tr[data-href] { cursor: pointer; }
tr[data-href]:hover td { background: #fcfbf7; }
.checkins { display: flex !important; gap: 4px; }
.dot { display: inline-grid; place-items: center; min-width: 30px; height: 24px; border-radius: 7px; background: var(--line-2); color: #9aa29d; font-size: .7rem; font-weight: 800; }
.dot.on { background: var(--success); color: #fff; }

@media (max-width: 959px) {
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr { position: relative; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
  .table-cards td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; text-align: right; }
  .table-cards td > span, .table-cards td > a { display: inline; }
  .table-cards td::before { content: attr(data-label); font-size: .78rem; color: var(--muted); font-weight: 650; text-align: left; flex: none; }
  .table-cards td:first-child { display: block; text-align: left; padding-bottom: 6px; padding-right: 26px; }
  .table-cards td:first-child::before { display: none; }
  .table-cards td:first-child > * { display: block; }
  .table-cards td > .small, .table-cards td > .muted { display: block; }
  .table-cards td.cell-chev { position: absolute; right: 12px; top: 14px; width: auto; padding: 0; }
  .table-cards td.cell-chev::before { display: none; }
  .table-cards td > span + span { margin-left: 6px; }
}

.pager { display: flex; justify-content: center; align-items: center; gap: 12px; }

/* GCash verification */
.pay-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pay-item { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: var(--radius-lg); background: var(--paper); border: 1px solid var(--line-2); box-shadow: var(--shadow-sm); text-decoration: none; color: var(--ink); }
.pay-item:hover { color: var(--ink); box-shadow: var(--shadow); }
.pay-item:active { transform: scale(.99); }
.pay-thumb { width: 58px; height: 72px; border-radius: 10px; overflow: hidden; flex: none; background: var(--line-2); display: grid; place-items: center; }
.pay-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.pay-pdf { display: grid; justify-items: center; font-size: .7rem; font-weight: 800; color: var(--muted); }
.pay-amount { font-weight: 850; font-size: 1.08rem; color: var(--green-800); }
.verify { display: grid; gap: 16px; align-items: start; }
.receipt-frame { display: block; background: #2b2f2d; padding: 12px; }
.receipt-frame img { margin: 0 auto; max-height: 70vh; width: auto; border-radius: 8px; }
.decision .form > * + * { margin-top: 12px; }

.export-grid { display: grid; gap: 10px; }
.export { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--radius-lg); background: var(--paper); border: 1px solid var(--line-2); box-shadow: var(--shadow-sm); text-decoration: none; color: var(--ink); }
.export:hover { color: var(--ink); box-shadow: var(--shadow); }

.day-pick { display: grid; gap: 14px; }
.day-pick-card { display: grid; gap: 8px; padding: 18px; border-radius: var(--radius-xl); background: var(--paper); border: 2px solid var(--line-2); box-shadow: var(--shadow-sm); text-decoration: none; color: var(--ink); }
.day-pick-card:hover { color: var(--ink); }
.day-pick-card.is-today { border-color: var(--gold-500); box-shadow: 0 0 0 4px var(--gold-100), var(--shadow); }
.day-pick-top { display: flex; justify-content: space-between; align-items: flex-start; }
.day-pick-title { font-size: 1.3rem; font-weight: 850; }
.day-pick-count { font-size: .92rem; color: var(--ink-2); }
.day-pick-count strong { font-size: 1.2rem; color: var(--green-800); }
.day-pick .btn { margin-top: 6px; }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.checklist li small { display: block; color: var(--muted); }
.checklist .ok .icon { color: var(--success); }
.checklist .bad .icon { color: var(--danger); }

/* Auth pages */
body.auth { min-height: 100dvh; background: radial-gradient(100% 60% at 100% 0%, rgb(217 165 33 / 25%), transparent 60%), var(--green-900); }
.auth-main { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 22px; padding: calc(var(--safe-top) + 24px) 16px calc(var(--safe-bottom) + 24px); }
.auth-card { width: min(420px, calc(100vw - 32px)); background: var(--paper); border-radius: var(--radius-xl); padding: 26px 22px; box-shadow: var(--shadow-lg); }
.auth-card > * + * { margin-top: 14px; }
.auth-card h1 { font-size: 1.5rem; font-weight: 850; }
.auth-card-wide { width: min(560px, calc(100vw - 32px)); }

/* ── Scanner ────────────────────────────────────────────────────────────── */
body:has(.scanner) { background: #0b1511; }
body:has(.scanner) .app-bar, body:has(.scanner) .tab-bar { display: none; }
body:has(.scanner) .admin-main { padding: 0; }
body:has(.scanner) .admin-content { padding: 0; max-width: none; }
.scanner { min-height: 100dvh; display: flex; flex-direction: column; color: #fff; background: #0b1511; }
.scanner-head { display: flex; align-items: center; gap: 12px; padding: calc(var(--safe-top) + 10px) 14px 10px; }
.scanner-title { flex: 1; display: grid; line-height: 1.2; }
.scanner-title strong { font-size: 1.08rem; }
.scanner-title span { font-size: .8rem; opacity: .7; }
.scanner-count { display: flex; align-items: baseline; gap: 3px; padding: 6px 12px; border-radius: 12px; background: rgb(255 255 255 / 10%); font-variant-numeric: tabular-nums; }
.scanner-count strong { font-size: 1.3rem; color: var(--gold-200); }
.scanner-count span { font-size: .85rem; opacity: .75; }
.scanner-warn { display: flex; gap: 10px; align-items: flex-start; margin: 0 14px 10px; padding: 10px 14px; border-radius: 12px; background: #4a3405; color: #ffe2a3; font-size: .88rem; }
.scanner-stage { position: relative; flex: 1; min-height: 56vh; margin: 0 10px; border-radius: 22px; overflow: hidden; background: #000; }
.scanner-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scanner-frame { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.scanner-frame span {
  width: min(68vw, 300px); aspect-ratio: 1; border-radius: 26px; box-shadow: 0 0 0 100vmax rgb(0 0 0 / 45%);
  border: 3px solid rgb(255 255 255 / 85%); position: relative;
}
.scanner-frame span::after { content: ""; position: absolute; left: 8%; right: 8%; height: 3px; top: 50%; border-radius: 99px; background: var(--gold-400); box-shadow: 0 0 18px var(--gold-400); animation: scanline 2.2s ease-in-out infinite; }
@keyframes scanline { 0%, 100% { transform: translateY(-110px); opacity: .4; } 50% { transform: translateY(110px); opacity: 1; } }
.scanner.idle .scanner-frame { display: none; }
.scanner-idle { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center; padding: 20px; background: radial-gradient(circle at 50% 30%, #17382b, #0b1511 70%); }
.scanner:not(.idle) .scanner-idle { display: none; }
.scanner-idle-icon { display: grid; place-items: center; width: 74px; height: 74px; border-radius: 24px; background: rgb(255 255 255 / 8%); color: var(--gold-200); }
.scanner-idle-icon .icon { width: 36px; height: 36px; }
.scanner-hint { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; font-size: .92rem; font-weight: 600; text-shadow: 0 1px 6px rgb(0 0 0 / 60%); }
.scanner-controls { display: flex; justify-content: center; gap: 12px; padding: 14px 14px 6px; }
.ctrl {
  display: grid; justify-items: center; gap: 4px; min-width: 84px; padding: 10px 12px; border: 0; border-radius: 16px;
  background: rgb(255 255 255 / 10%); color: #fff; font-size: .78rem; font-weight: 650; cursor: pointer;
}
.ctrl .icon { width: 24px; height: 24px; }
.ctrl[aria-pressed="true"] { background: var(--gold-500); color: var(--green-950); }
.scanner-recent { padding: 10px 16px calc(var(--safe-bottom) + 18px); }
.scanner-recent h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; opacity: .6; margin-bottom: 8px; }
.scanner-recent ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.scanner-recent li { display: flex; align-items: center; gap: 10px; font-size: .88rem; }
.scanner-recent li .rdot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.scanner-recent li .rname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scanner-recent li .rtime { opacity: .55; font-variant-numeric: tabular-nums; }
.scanner-recent .muted { color: rgb(255 255 255 / 50%); }
.r-valid { background: #3ad07a; } .r-duplicate { background: #f2b33d; } .r-invalid, .r-wrong_date, .r-unpaid, .r-error { background: #ff6b5e; }

.scan-result { position: fixed; inset: 0; z-index: 90; display: grid; place-items: end center; padding: 12px; background: rgb(0 0 0 / 35%); }
.scan-result-card {
  width: min(520px, 100%); border-radius: 28px; padding: 26px 22px calc(18px + var(--safe-bottom)); text-align: center; color: #fff;
  display: grid; justify-items: center; gap: 10px; box-shadow: var(--shadow-lg); animation: sheet-up .25s var(--ease) both; position: relative; overflow: hidden;
}
.scan-result[data-tone="valid"] .scan-result-card { background: linear-gradient(160deg, #1b9a4c, #0f6b33); }
.scan-result[data-tone="duplicate"] .scan-result-card { background: linear-gradient(160deg, #d18a0c, #965f00); }
.scan-result[data-tone="error"] .scan-result-card { background: linear-gradient(160deg, #d33a2c, #8f1d14); }
.scan-result-icon { display: grid; place-items: center; width: 88px; height: 88px; border-radius: 50%; background: rgb(255 255 255 / 18%); }
.scan-result-icon .icon { width: 50px; height: 50px; stroke-width: 2.6; }
.scan-result-title { font-size: 1.7rem; font-weight: 900; letter-spacing: -0.02em; }
.scan-result-msg { font-size: 1rem; opacity: .92; max-width: 34ch; }
.scan-result-person { display: grid; gap: 2px; width: 100%; padding: 12px; border-radius: 16px; background: rgb(0 0 0 / 18%); }
.scan-result-person strong { font-size: 1.25rem; }
.scan-result-person span { opacity: .85; font-size: .9rem; }
.scan-result-btn { --bg: #fff; --fg: var(--ink); --bd: #fff; margin-top: 6px; }
.scan-result-timer { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; }
.scan-result-timer span { display: block; height: 100%; background: rgb(255 255 255 / 70%); transform-origin: left; }
.scan-result-timer.run span { animation: timer var(--dur, 2s) linear both; }
@keyframes timer { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ── Admin desktop dashboard ────────────────────────────────────────────── */
@media (min-width: 960px) {
  body.admin .app-bar, body.admin .tab-bar { display: none; }
  .admin-side {
    display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: 252px; z-index: 30;
    background: var(--green-950); color: #fff; padding: 20px 14px;
  }
  .side-nav { display: grid; gap: 2px; margin-top: 26px; }
  .side-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; color: rgb(255 255 255 / 72%); text-decoration: none; font-weight: 600; font-size: .94rem; }
  .side-nav a:hover { background: rgb(255 255 255 / 7%); color: #fff; }
  .side-nav a[aria-current="page"] { background: rgb(255 255 255 / 11%); color: #fff; box-shadow: inset 3px 0 0 var(--gold-400); }
  .side-nav .icon { width: 20px; height: 20px; }
  .side-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 6px 0; border-top: 1px solid rgb(255 255 255 / 10%); }
  .side-user .avatar { background: var(--gold-500); color: var(--green-950); }
  .side-user-text { flex: 1; display: grid; line-height: 1.2; min-width: 0; }
  .side-user-text strong { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .side-user-text span { font-size: .76rem; opacity: .65; }
  .side-user .icon-btn { color: rgb(255 255 255 / 70%); }
  .side-user .icon-btn:hover { background: rgb(255 255 255 / 10%); color: #fff; }
  .admin-main { margin-left: 252px; padding-bottom: 40px; }
  .admin-content { padding: 32px 36px; }
  .admin-content > * + * { margin-top: 20px; }
  .back-link { display: inline-flex; }
  .admin-head h1 { font-size: 1.9rem; }
  .stats { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .stat { padding: 18px; }
  .stat-wide { grid-column: span 2; }
  .stats-compact { grid-template-columns: repeat(7, 1fr); }
  .admin-grid { grid-template-columns: 1.4fr 1fr; gap: 20px; }
  .verify { grid-template-columns: 1.2fr 1fr; gap: 20px; }
  .verify-receipt { position: sticky; top: 24px; }
  .export-grid { grid-template-columns: repeat(3, 1fr); }
  .day-pick { grid-template-columns: 1fr 1fr; max-width: 820px; }
  .pills { margin: 0; padding: 0; flex-wrap: wrap; }
  .segmented-links { display: inline-grid; min-width: 420px; }
  .toasts { left: 252px; }

  body:has(.scanner) .admin-main { margin-left: 252px; }
  .scanner { display: grid; grid-template-columns: 1fr 320px; grid-template-rows: auto auto 1fr auto; min-height: 100dvh; }
  .scanner-head, .scanner-warn { grid-column: 1 / -1; }
  .scanner-stage { grid-column: 1; grid-row: 3; margin: 0 0 0 20px; min-height: 0; }
  .scanner-controls { grid-column: 1; grid-row: 4; }
  .scanner-recent { grid-column: 2; grid-row: 3 / span 2; border-left: 1px solid rgb(255 255 255 / 8%); margin-left: 20px; }
  .scan-result { place-items: center; }
}

@media (min-width: 600px) and (max-width: 959px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stats-compact { grid-template-columns: repeat(4, 1fr); }
  .export-grid, .day-pick, .quick-grid { grid-template-columns: 1fr 1fr; }
  .tickets { grid-auto-columns: min(440px, 88%); justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media print {
  .app-bar, .tab-bar, .site-header, .site-footer, .segmented, .ticket-actions, .tip, .toasts { display: none !important; }
  body { background: #fff; }
  .tickets { display: block; overflow: visible; margin: 0; padding: 0; }
  .ticket { break-inside: avoid; margin-bottom: 20px; box-shadow: none; border: 2px solid #000; }
}
