/* LSS Kaduna - app styles. Mobile first, no framework, no web fonts (system stack = fast on 3G). */

:root {
  color-scheme: light;
  --bg: #f0f5f1;
  --surface: #ffffff;
  --surface-2: #e7efe9;
  --ink: #0c2217;
  --ink-2: #435e4f;
  --muted: #667d71;
  --line: #d2e0d7;
  --brand: #15803d;          /* primary actions: 5:1 against white text */
  --brand-hover: #116b32;
  --brand-ink: #ffffff;
  --deep: #0b3d2e;           /* header / hero green */
  --deep-2: #0f6b3e;
  --lime: #c6f432;           /* energetic accent, always paired with --deep text */
  --lime-ink: #0b3d2e;
  --good: #0f7a34;
  --good-bg: #dff3e6;
  --warn: #8a5300;
  --warn-bg: #fff1cf;
  --bad: #b3261e;
  --bad-bg: #fde7e5;
  --chart: #15803d;
  --chart-dim: #9bc9ac;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(8, 40, 22, .06), 0 8px 24px rgba(8, 40, 22, .07);
  --nav-h: 64px;
  --bar-h: 56px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #07130d; --surface: #0e1f16; --surface-2: #163024; --ink: #e8f5ed; --ink-2: #aac4b5; --muted: #84a291; --line: #24412f;
    --brand: #22c55e; --brand-hover: #4ade80; --brand-ink: #03210f; --deep: #0a2a1f; --deep-2: #0f4a2e;
    --good: #4ade80; --good-bg: #123a25; --warn: #fbbf24; --warn-bg: #3a2c0a; --bad: #f87171; --bad-bg: #3d1614;
    --chart: #34d399; --chart-dim: #2b6a50;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07130d; --surface: #0e1f16; --surface-2: #163024; --ink: #e8f5ed; --ink-2: #aac4b5; --muted: #84a291; --line: #24412f;
  --brand: #22c55e; --brand-hover: #4ade80; --brand-ink: #03210f; --deep: #0a2a1f; --deep-2: #0f4a2e;
  --good: #4ade80; --good-bg: #123a25; --warn: #fbbf24; --warn-bg: #3a2c0a; --bad: #f87171; --bad-bg: #3d1614;
  --chart: #34d399; --chart-dim: #2b6a50;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font);
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
}
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 900; }
h2 { font-size: 20px; font-weight: 800; }
h3 { font-size: 16px; font-weight: 800; }
p { margin: 0 0 8px; }
a { color: var(--brand); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.mt { margin-top: 16px; } .mt-s { margin-top: 8px; } .mb { margin-bottom: 16px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- boot splash ---------- */
.boot { min-height: 70vh; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--muted); }
.spin { width: 38px; height: 38px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2.5s; } * { scroll-behavior: auto !important; } }

/* ---------- app bar ---------- */
.appbar {
  position: sticky; top: 0; z-index: 20; height: var(--bar-h); display: flex; align-items: center; gap: 10px;
  padding: 0 12px; padding-top: env(safe-area-inset-top);
  background: linear-gradient(135deg, var(--deep), var(--deep-2)); color: #fff;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; min-width: 0; }
.brand .logo { width: 36px; height: 36px; flex: none; }
.brand b { font-weight: 900; letter-spacing: .02em; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar .spacer { flex: 1; }
.iconbtn {
  width: 44px; height: 44px; border-radius: 12px; border: 0; background: rgba(255, 255, 255, .12); color: #fff;
  display: inline-grid; place-items: center; cursor: pointer; font-weight: 800; font-size: 13px; letter-spacing: .04em;
}
.iconbtn:hover { background: rgba(255, 255, 255, .2); }
.iconbtn:focus-visible, .btn:focus-visible, .slot:focus-visible, .day:focus-visible, .tab:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }

/* ---------- page ---------- */
.page { max-width: 640px; margin: 0 auto; padding: 14px 14px 24px; }
.page.wide { max-width: 1040px; }
.banner { padding: 10px 14px; font-size: 14px; font-weight: 600; text-align: center; }
.banner.offline { background: var(--warn-bg); color: var(--warn); }
.banner.demo { background: var(--lime); color: var(--lime-ink); }

/* ---------- bottom nav ---------- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); display: flex; background: var(--surface); border-top: 1px solid var(--line);
}
.tab {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 700; border: 0; background: none; cursor: pointer; position: relative;
}
.tab svg { width: 24px; height: 24px; }
.tab[aria-current="page"] { color: var(--brand); }
.tab[aria-current="page"]::before { content: ""; position: absolute; top: 0; width: 34px; height: 4px; border-radius: 0 0 4px 4px; background: var(--brand); }
@media (min-width: 900px) {
  body { padding-bottom: 0; padding-left: 88px; }
  .tabs { top: 0; right: auto; width: 88px; height: auto; flex-direction: column; justify-content: flex-start; padding-top: calc(var(--bar-h) + 12px); border-top: 0; border-right: 1px solid var(--line); }
  .tab { flex: none; height: 76px; }
  .tab[aria-current="page"]::before { top: 20px; left: 0; width: 4px; height: 36px; border-radius: 0 4px 4px 0; }
  .appbar { margin-left: -88px; padding-left: 100px; }
  .sumbar { left: 88px; bottom: 0; }
  .toasts { bottom: 96px; }
}

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; border-radius: 14px;
  border: 2px solid transparent; font-weight: 800; font-size: 16px; cursor: pointer; text-decoration: none; text-align: center;
  background: var(--brand); color: var(--brand-ink); transition: transform .06s, background .15s;
}
.btn:hover { background: var(--brand-hover); }
.btn:active { transform: scale(.98); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn.block { display: flex; width: 100%; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.soft { background: var(--surface-2); color: var(--ink); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.lime { background: var(--lime); color: var(--lime-ink); }
.btn.sm { min-height: 44px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.btn svg { width: 20px; height: 20px; }

label.field { display: block; margin-top: 14px; font-weight: 700; font-size: 14px; color: var(--ink-2); }
.input {
  display: block; width: 100%; min-height: 52px; margin-top: 6px; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line);
  background: var(--surface); font-size: 17px; color: var(--ink);
}
.input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.input.code { text-align: center; font-size: 28px; letter-spacing: .5em; font-weight: 800; padding-left: .5em; }
.phone { display: flex; align-items: stretch; gap: 8px; margin-top: 6px; }
.phone .pre { display: grid; place-items: center; padding: 0 14px; border-radius: 14px; background: var(--surface-2); font-weight: 800; }
.phone .input { margin-top: 0; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.err { color: var(--bad); font-weight: 600; font-size: 14px; margin-top: 8px; }
.check { display: flex; align-items: center; gap: 10px; margin-top: 14px; min-height: 44px; font-weight: 600; }
.check input { width: 22px; height: 22px; accent-color: var(--brand); }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card + .card { margin-top: 14px; }
.card.flat { box-shadow: none; }
.pad0 { padding: 0; overflow: hidden; }
.hero {
  position: relative; overflow: hidden; border-radius: 20px; padding: 20px 18px 22px; color: #fff; margin-bottom: 14px;
  background: linear-gradient(140deg, var(--deep) 0%, var(--deep-2) 100%);
}
.hero::after {   /* pitch markings */
  content: ""; position: absolute; inset: 0; opacity: .16; pointer-events: none;
  background:
    radial-gradient(circle at 100% 50%, transparent 52px, #fff 53px, #fff 55px, transparent 56px),
    linear-gradient(#fff, #fff) right 0 top 0 / 2px 100% no-repeat;
  background-position: right -30px top 0, right 0 top 0;
}
.hero h1 { position: relative; z-index: 1; }
.hero p { position: relative; z-index: 1; opacity: .9; margin-top: 6px; max-width: 28ch; }
.hero .tag { display: inline-block; position: relative; z-index: 1; background: var(--lime); color: var(--lime-ink); font-weight: 900; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 99px; margin-bottom: 10px; }

/* ---------- chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 800; letter-spacing: .02em; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.chip svg { width: 13px; height: 13px; }
.chip.good { background: var(--good-bg); color: var(--good); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }

/* ---------- date strip ---------- */
.datestrip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; margin: 0 -14px; padding-left: 14px; padding-right: 14px; scroll-snap-type: x proximity; scrollbar-width: none; }
.datestrip::-webkit-scrollbar { display: none; }
.day {
  flex: none; width: 62px; min-height: 76px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; cursor: pointer; scroll-snap-align: start;
}
.day small { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.day b { font-size: 22px; font-weight: 900; line-height: 1.1; }
.day[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.day[aria-pressed="true"] small { color: inherit; opacity: .85; }
.day.we small::after { content: "•"; margin-left: 2px; color: var(--lime); }

/* ---------- slots ---------- */
.pitch-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.pitch-head p { margin: 0; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
@media (min-width: 520px) { .slots { grid-template-columns: repeat(4, 1fr); } }
.slot {
  min-height: 62px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 6px 4px; color: var(--ink);
}
.slot b { font-size: 17px; font-weight: 900; font-variant-numeric: tabular-nums; }
.slot span { font-size: 12px; font-weight: 700; color: var(--muted); }
.slot.peak span { color: var(--warn); }
.slot:hover:not(:disabled) { border-color: var(--brand); }
.slot[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.slot[aria-pressed="true"] span { color: inherit; opacity: .9; }
.slot:disabled { cursor: not-allowed; }
.slot.held, .slot.booked, .slot.blocked, .slot.past {   /* hatch = not available, never colour alone */
  background-image: repeating-linear-gradient(135deg, transparent 0 7px, color-mix(in srgb, var(--muted) 18%, transparent) 7px 9px);
  background-color: var(--surface-2); border-color: transparent; color: var(--muted);
}
.slot.held { background-color: var(--warn-bg); }
.slot.past { opacity: .5; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 4px 0 12px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 5px; border: 2px solid var(--line); background: var(--surface); }
.legend i.sel { background: var(--brand); border-color: var(--brand); }
.legend i.hatch { border-color: transparent; background: repeating-linear-gradient(135deg, var(--surface-2) 0 3px, color-mix(in srgb, var(--muted) 35%, transparent) 3px 5px); }

/* sticky booking summary */
.sumbar {
  position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); z-index: 25; padding: 10px 14px;
  background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(8, 40, 22, .12);
}
.sumbar .in { max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.sumbar .txt { flex: 1; min-width: 0; }
.sumbar .txt b { display: block; font-size: 20px; font-weight: 900; }
body.has-sumbar .page { padding-bottom: 96px; }

/* ---------- list rows ---------- */
.item { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); text-decoration: none; color: inherit; cursor: pointer; width: 100%; text-align: left; }
.item + .item { margin-top: 10px; }
.item .when { flex: none; width: 54px; text-align: center; border-radius: 12px; background: var(--surface-2); padding: 6px 0; }
.item .when b { display: block; font-size: 22px; font-weight: 900; line-height: 1; }
.item .when small { font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--muted); }
.item .meta { flex: 1; min-width: 0; }
.item .meta b { display: block; }
.item .meta span { font-size: 13px; color: var(--muted); }
.seg { display: flex; background: var(--surface-2); border-radius: 14px; padding: 4px; gap: 4px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 1; min-height: 44px; border: 0; background: transparent; border-radius: 10px; font-weight: 800; color: var(--ink-2); cursor: pointer; padding: 0 12px; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }

/* ---------- ticket ---------- */
.ticket { text-align: center; padding: 0; overflow: hidden; }
.ticket .top { padding: 16px; background: linear-gradient(140deg, var(--deep), var(--deep-2)); color: #fff; }
.ticket .top h2 { font-size: 22px; }
.ticket .qrwrap { padding: 20px 16px 8px; }
.qr-box { display: inline-block; background: #fff; padding: 14px; border-radius: 18px; border: 1px solid var(--line); line-height: 0; position: relative; }
.qr-box svg { width: min(72vw, 280px); height: auto; display: block; }
.qr-box.used svg { opacity: .12; }
.qr-box .stamp { position: absolute; inset: 0; display: grid; place-content: center; line-height: 1.2; font-weight: 900; color: #b3261e; font-size: 22px; transform: rotate(-12deg); text-transform: uppercase; }
.ticket .code { font-size: 26px; font-weight: 900; letter-spacing: .12em; margin-top: 10px; font-variant-numeric: tabular-nums; }
.ticket .tear { height: 18px; margin: 12px 0 0; background: radial-gradient(circle at 9px 9px, var(--bg) 8px, transparent 9px) 0 0 / 28px 18px repeat-x; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; text-align: left; padding: 14px 16px 16px; }
.kv dt { color: var(--muted); font-size: 13px; font-weight: 700; }
.kv dd { margin: 0; font-weight: 700; text-align: right; }
.price-lines { margin: 10px 0 0; }
.price-lines div { display: flex; justify-content: space-between; padding: 5px 0; }
.price-lines .tot { border-top: 2px solid var(--line); margin-top: 6px; padding-top: 10px; font-size: 20px; font-weight: 900; }

/* ---------- sheet / toast ---------- */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(4, 20, 12, .55); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; background: var(--surface); border-radius: 22px 22px 0 0; padding: 8px 18px calc(22px + env(safe-area-inset-bottom)); animation: up .2s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: .5; } }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 6px auto 14px; }
@media (min-width: 700px) { .scrim { align-items: center; } .sheet { border-radius: 22px; } }
.toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + 76px + env(safe-area-inset-bottom)); z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 14px; }
.toast { pointer-events: auto; background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 14px; font-weight: 700; max-width: 420px; box-shadow: var(--shadow); animation: up .2s; }
.toast.bad { background: var(--bad); color: #fff; }
.toast.good { background: var(--good); color: #fff; }
:root[data-theme="dark"] .toast.good, :root:not([data-theme="light"]) .toast.good { color: #03210f; }

.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty svg { width: 56px; height: 56px; opacity: .5; margin-bottom: 8px; }
.skel { height: 120px; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.skel + .skel { margin-top: 14px; }

/* ---------- admin ---------- */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.kpi small { display: block; color: var(--muted); font-weight: 700; font-size: 13px; }
.kpi b { display: block; font-size: 26px; font-weight: 900; line-height: 1.2; margin-top: 2px; }
.kpi span { font-size: 12px; color: var(--muted); }
.kpi.hero-kpi { grid-column: 1 / -1; background: linear-gradient(140deg, var(--deep), var(--deep-2)); color: #fff; border: 0; }
.kpi.hero-kpi small, .kpi.hero-kpi span { color: rgba(255, 255, 255, .8); }
.kpi.hero-kpi b { font-size: 44px; letter-spacing: -.02em; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .gridline { stroke: var(--line); stroke-width: 1; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .bar { fill: var(--chart); }
.chart .bar.dim { fill: var(--chart-dim); }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .hit:hover + .bar, .chart .hit:focus + .bar { filter: brightness(1.15); }
.tip { position: fixed; z-index: 90; pointer-events: none; background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 700; padding: 6px 10px; border-radius: 10px; box-shadow: var(--shadow); white-space: nowrap; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 8px 6px; border-bottom: 2px solid var(--line); }
table.tbl td { padding: 10px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.tbl td.r, table.tbl th.r { text-align: right; font-variant-numeric: tabular-nums; }
.tablewrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.grid2 { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.sched { overflow-x: auto; }
.sched table { border-collapse: separate; border-spacing: 4px; min-width: 100%; }
.sched th { font-size: 12px; color: var(--muted); font-weight: 800; padding: 4px; }
.sched td { min-width: 108px; height: 54px; border-radius: 10px; font-size: 12px; font-weight: 700; padding: 4px 6px; vertical-align: middle; }
.sched td.free { background: var(--surface); border: 2px dashed var(--line); color: var(--muted); cursor: pointer; text-align: center; }
.sched td.bk { background: var(--good-bg); color: var(--good); cursor: pointer; }
.sched td.hold { background: var(--warn-bg); color: var(--warn); cursor: pointer; }
.sched td.blk { background: var(--surface-2); color: var(--muted); }
.sched td.hr { min-width: 56px; background: none; border: 0; color: var(--muted); text-align: right; cursor: default; }

/* ---------- scanner ---------- */
.scanner { position: fixed; inset: 0; z-index: 28; background: #000; display: flex; flex-direction: column; color: #fff; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .scanner { left: 88px; padding-bottom: 0; } }
.scanner .top { display: flex; align-items: center; gap: 8px; padding: 10px 12px; padding-top: calc(10px + env(safe-area-inset-top)); background: #0b1d14; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; font-size: 12px; font-weight: 800; background: rgba(255, 255, 255, .14); }
.pill.good { background: #14532d; color: #bbf7d0; }
.pill.warn { background: #713f12; color: #fde68a; }
.pill.bad { background: #7f1d1d; color: #fecaca; }
.view { position: relative; flex: 1; min-height: 0; overflow: hidden; display: grid; place-items: center; }
.view video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.view .frame { position: relative; width: min(68vw, 300px); aspect-ratio: 1; border-radius: 24px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .55); }
.view .frame::before, .view .frame::after { content: ""; position: absolute; width: 38px; height: 38px; border: 5px solid var(--lime); }
.view .frame::before { top: -3px; left: -3px; border-right: 0; border-bottom: 0; border-radius: 24px 0 0 0; }
.view .frame::after { bottom: -3px; right: -3px; border-left: 0; border-top: 0; border-radius: 0 0 24px 0; }
.view .msg { position: relative; z-index: 2; text-align: center; padding: 24px; }
.scanner .bottom { background: #0b1d14; padding: 10px 12px; display: flex; gap: 8px; }
.scanner .bottom .input { margin: 0; min-height: 48px; background: #14291e; border-color: #24412f; color: #fff; text-transform: uppercase; font-weight: 800; letter-spacing: .08em; }
.result { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; gap: 8px; animation: fade .12s; }
.result.ok { background: #0f7a34; }
.result.bad { background: #b3261e; }
.result.warn { background: #b45309; }
.result .big { width: 96px; height: 96px; }
.result .big svg { width: 100%; height: 100%; stroke-width: 2.5; }
.result h2 { font-size: 34px; font-weight: 900; text-transform: uppercase; }
.result .who { font-size: 22px; font-weight: 800; }
.result .sub { opacity: .92; font-size: 16px; }
.result .due { margin-top: 6px; background: #fff; color: #7a3c00; padding: 8px 16px; border-radius: 12px; font-weight: 900; font-size: 20px; }
.result .btn { margin-top: 14px; background: #fff; color: #111; min-width: 180px; }
.recent { max-height: 22vh; overflow: auto; background: #0b1d14; padding: 4px 12px; font-size: 13px; }
.recent div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid #1b3326; }

/* ---------- misc ---------- */
.steps { display: flex; gap: 6px; margin: 4px 0 16px; }
.steps i { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.steps i.on { background: var(--brand); }
.countdown { font-variant-numeric: tabular-nums; font-weight: 900; font-size: 30px; }
.big-ok { width: 84px; height: 84px; border-radius: 50%; background: var(--good-bg); color: var(--good); display: grid; place-items: center; margin: 0 auto 12px; }
.big-ok svg { width: 44px; height: 44px; }
.big-ok.bad { background: var(--bad-bg); color: var(--bad); }
.big-ok.warn { background: var(--warn-bg); color: var(--warn); }
@media print { .appbar, .tabs, .sumbar, .toasts { display: none !important; } body { padding: 0; } }
@media (forced-colors: active) { .slot[aria-pressed="true"], .day[aria-pressed="true"] { outline: 3px solid Highlight; } }

/* ---------- split payment + reschedule ---------- */
.progress { height: 12px; border-radius: 6px; background: var(--surface-2); overflow: hidden; margin-top: 8px; }
.progress i { display: block; height: 100%; border-radius: 6px; background: var(--brand); transition: width .4s; }
.contribs { margin-top: 10px; display: grid; gap: 4px; }
.contribs svg { width: 14px; height: 14px; vertical-align: -2px; color: var(--good); }
.copyrow { display: flex; gap: 8px; align-items: center; }
.copyrow .input { margin-top: 6px; font-size: 14px; min-height: 48px; }
.copyrow .btn { margin-top: 6px; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chipbtn { min-height: 44px; min-width: 48px; padding: 0 14px; border-radius: 99px; border: 2px solid var(--line); background: var(--surface); font-weight: 800; cursor: pointer; color: var(--ink); }
.chipbtn[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.slot.current { outline: 2px dashed var(--brand); outline-offset: -4px; }
