/* ═══════════════════════════════════════════════════════════════════════════
   FleetHub — "Settlement Terminal"
   A light payments-operations console. Each withdrawal reads like a bank slip:
   tabular rupee figures, monospace reference numbers, and a rubber-stamp
   verdict for the UTR check.
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  --paper: #f4f6f9;
  --paper-2: #eef1f6;
  --card: #ffffff;
  --ink: #10151c;
  --ink-2: #3c4655;
  --muted: #626c7a;
  --faint: #98a2b1;
  --line: #e6e9ef;
  --line-2: #d7dce4;

  --accent: #2f44ff;
  --accent-ink: #1b2bcc;
  --accent-wash: #eef0ff;
  --paid: #0e9f6e;
  --paid-wash: #e6f6ef;
  --warn: #b46e00;
  --warn-wash: #fbf1df;
  --bad: #e02d3c;
  --bad-wash: #fdecec;
  --purple: #7c4dff;
  --purple-wash: #f0ebff;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(16, 21, 28, .05), 0 1px 3px rgba(16, 21, 28, .06);
  --shadow: 0 4px 16px rgba(16, 21, 28, .08);
  --shadow-lg: 0 24px 60px rgba(16, 21, 28, .16);

  --sans: "Inter", ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--accent-ink); text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cfd5de; border-radius: 8px; border: 2px solid var(--paper); }
::-webkit-scrollbar-thumb:hover { background: #b9c0cc; }
.tnum { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* ── login ───────────────────────────────────────────────────────────────── */
.login-wrap { display: grid; place-items: center; min-height: 100vh; padding: 20px;
  background:
    radial-gradient(1200px 500px at 50% -10%, #ffffff 0%, rgba(255,255,255,0) 60%),
    var(--paper); }
.login-card {
  width: 360px; padding: 34px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
}
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.login-card h1 { margin: 0; font-size: 20px; letter-spacing: -.02em; font-weight: 750; }
.login-sub { color: var(--muted); font-size: 13px; margin: -14px 0 22px; }
.login-card label { display: block; font-size: 12px; color: var(--muted); margin: 0 0 6px; font-weight: 550; }
.login-card input {
  width: 100%; margin-bottom: 16px; padding: 11px 13px; background: var(--paper);
  border: 1px solid var(--line-2); border-radius: var(--r-sm); outline: none; transition: border-color .12s, box-shadow .12s;
}
.login-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); background: #fff; }
.login-card button {
  width: 100%; padding: 12px; background: var(--ink); border: 0; border-radius: var(--r-sm);
  color: #fff; font-weight: 650; cursor: pointer; letter-spacing: .01em; transition: transform .06s, background .15s;
}
.login-card button:hover { background: #000; }
.login-card button:active { transform: translateY(1px); }
.login-hint {
  margin-top: 18px; padding: 11px 13px; background: var(--accent-wash); border-radius: var(--r-sm);
  font-size: 12.5px; color: var(--accent-ink); display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.login-hint b { font-family: var(--mono); }
.login-err { color: var(--bad); font-size: 13px; min-height: 18px; margin-top: 12px; }

/* ── logo mark ───────────────────────────────────────────────────────────── */
.mark { width: 26px; height: 26px; border-radius: 7px; background: var(--ink); position: relative; flex: none; display: grid; place-items: center; }
.mark::before { content: "₹"; color: #fff; font-weight: 800; font-size: 15px; line-height: 1; }
.mark.sm { width: 22px; height: 22px; border-radius: 6px; }
.mark.sm::before { font-size: 13px; }

/* ═══ shell ════════════════════════════════════════════════════════════════ */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.shell.kiosk { grid-template-columns: 1fr; }
.shell.kiosk .side { display: none; }

.side {
  background: var(--card); border-right: 1px solid var(--line); padding: 20px 14px;
  display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; }
.brand b { font-size: 17px; letter-spacing: -.02em; font-weight: 750; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: var(--r-sm);
  color: var(--ink-2); cursor: pointer; user-select: none; font-weight: 550; transition: background .12s, color .12s;
}
.nav-item:hover { background: var(--paper-2); color: var(--ink); }
.nav-item.active { background: var(--ink); color: #fff; }
.nav-item.active .nav-ico { opacity: 1; }
.nav-ico { width: 17px; text-align: center; opacity: .7; font-size: 15px; }
.nav-item .nav-count {
  margin-left: auto; font-size: 11px; padding: 1px 8px; border-radius: 20px;
  background: var(--paper-2); color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600;
}
.nav-item.active .nav-count { background: rgba(255,255,255,.16); color: #fff; }
.nav-count.bad { background: var(--bad-wash); color: var(--bad); }
.nav-sep { height: 1px; background: var(--line); margin: 10px 8px; }
.side-foot { margin-top: auto; padding: 10px 8px 2px; font-size: 12px; color: var(--faint); }
.side-foot .row { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; }

.main { min-width: 0; padding: 22px 26px 44px; }
.topbar { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.topbar h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; font-weight: 720; }
.topbar .crumb { color: var(--faint); font-size: 13px; }
.spacer { flex: 1; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--paid); box-shadow: 0 0 0 3px var(--paid-wash); }
.live-dot.off { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-wash); }
.pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .4 } }
.clock { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }

/* ── controls ────────────────────────────────────────────────────────────── */
select, .btn, input[type=text], input[type=date], input[type=number], input[type=search] {
  background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 8px 12px;
  outline: none; color: var(--ink); transition: border-color .12s, box-shadow .12s, background .12s;
}
select { cursor: pointer; padding-right: 30px; -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%23626c7a' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
select:focus, input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.btn { cursor: pointer; font-weight: 550; box-shadow: var(--shadow-sm); }
.btn:hover { background: var(--paper); border-color: var(--line-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: #000; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.accent:hover { background: var(--accent-ink); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: var(--r-sm); }
.btn.danger { color: var(--bad); border-color: var(--bad-wash); }
.btn.danger:hover { background: var(--bad-wash); }
.btn.ghost { box-shadow: none; background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--paper-2); }

/* ── KPI cards ───────────────────────────────────────────────────────────── */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: 13px; margin-bottom: 20px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 15px 16px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--line-2); }
.kpi.ok::after { background: var(--paid); }
.kpi.warn::after { background: var(--warn); }
.kpi.bad::after { background: var(--bad); }
.kpi.accent::after { background: var(--accent); }
.kpi .label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.kpi .value { font-size: 27px; font-weight: 750; letter-spacing: -.03em; margin-top: 7px; font-variant-numeric: tabular-nums; line-height: 1.05; }
.kpi.ok .value { color: var(--paid); }
.kpi.warn .value { color: var(--warn); }
.kpi.bad .value { color: var(--bad); }
.kpi .sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.col-stack { display: grid; gap: 16px; }

/* ── panels ──────────────────────────────────────────────────────────────── */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-sm); }
.panel > header {
  display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line);
  font-weight: 650; font-size: 13.5px;
}
.panel > header .hint { font-weight: 400; color: var(--faint); font-size: 12px; }
.panel-body { max-height: 72vh; overflow: auto; }
.panel-body.tall { max-height: none; }

/* ── feed rows ───────────────────────────────────────────────────────────── */
.feed-item { display: flex; gap: 13px; padding: 13px 16px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .1s; }
.feed-item:last-child { border-bottom: 0; }
.feed-item:hover { background: var(--paper); }
.feed-item.flash { animation: flash 1.8s ease-out; }
@keyframes flash { from { background: var(--accent-wash); } to { background: transparent; } }
.thumb { width: 52px; height: 52px; border-radius: 9px; object-fit: cover; background: var(--paper-2); border: 1px solid var(--line); flex: none; }
.thumb.placeholder { display: grid; place-items: center; color: var(--faint); font-size: 17px; }
.feed-main { min-width: 0; flex: 1; }
.feed-l1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.feed-l2, .feed-l3 { color: var(--muted); font-size: 12.5px; margin-top: 3px; display: flex; gap: 12px; flex-wrap: wrap; }
.feed-l3 { color: var(--faint); }
.amount { font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.time { color: var(--faint); font-size: 12px; white-space: nowrap; }

/* ── tags ────────────────────────────────────────────────────────────────── */
.tag { font-size: 11px; padding: 2px 9px; border-radius: 20px; white-space: nowrap; font-weight: 600;
  background: var(--paper-2); color: var(--muted); letter-spacing: .01em; }
.tag.ok { background: var(--paid-wash); color: var(--paid); }
.tag.bad { background: var(--bad-wash); color: var(--bad); }
.tag.warn { background: var(--warn-wash); color: var(--warn); }
.tag.info { background: var(--accent-wash); color: var(--accent-ink); }
.tag.purple { background: var(--purple-wash); color: var(--purple); }

/* ── tables ──────────────────────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); z-index: 1; }
td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr { cursor: pointer; transition: background .1s; }
tbody tr:hover { background: var(--paper); }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.bar { height: 6px; border-radius: 4px; background: var(--paper-2); overflow: hidden; min-width: 54px; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }

.filters { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 15px; align-items: center; }
.filters input[type=search] { min-width: 300px; }

/* ── drawer ──────────────────────────────────────────────────────────────── */
.drawer-bg { position: fixed; inset: 0; background: rgba(16, 21, 28, .38); backdrop-filter: blur(2px); z-index: 40; animation: fade .15s; }
@keyframes fade { from { opacity: 0 } }
.drawer { position: fixed; top: 0; right: 0; height: 100vh; width: min(700px, 96vw); background: var(--paper);
  border-left: 1px solid var(--line); z-index: 41; overflow: auto; box-shadow: var(--shadow-lg); animation: slide .2s cubic-bezier(.2,.7,.3,1); }
@keyframes slide { from { transform: translateX(30px); opacity: .3 } }
.drawer header { display: flex; align-items: center; gap: 10px; padding: 16px 22px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--card); z-index: 2; }
.drawer h3 { margin: 0; font-size: 17px; font-family: var(--mono); letter-spacing: -.01em; }
.drawer section { padding: 18px 22px; border-bottom: 1px solid var(--line); background: var(--card); margin-bottom: 8px; }
.drawer section:first-of-type { margin-top: 0; }
.section-h { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; margin-bottom: 10px; }
.kv { display: grid; grid-template-columns: 132px 1fr; gap: 9px 14px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.shot { width: 100%; border-radius: var(--r); border: 1px solid var(--line-2); background: #fff; box-shadow: var(--shadow-sm); }
.utrbox { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.utrbox > div { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.utrbox .h { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.utrbox .v { font-family: var(--mono); font-size: 16px; margin-top: 5px; word-break: break-all; font-weight: 600; }
.ocr-raw { white-space: pre-wrap; font-family: var(--mono); font-size: 11.5px; color: var(--muted);
  max-height: 220px; overflow: auto; background: var(--paper); padding: 12px; border-radius: var(--r-sm); border: 1px solid var(--line); }

/* ── chart ───────────────────────────────────────────────────────────────── */
.chart { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding: 14px 16px 6px; }
.chart .col { flex: 1; background: var(--accent-wash); border-radius: 3px 3px 0 0; position: relative; min-height: 2px; transition: background .12s; }
.chart .col:hover { background: var(--accent); }
.chart-x { display: flex; gap: 3px; padding: 0 16px 12px; color: var(--faint); font-size: 10px; }
.chart-x span { flex: 1; text-align: center; font-variant-numeric: tabular-nums; }

.empty { padding: 44px 20px; text-align: center; color: var(--faint); }
.code { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 13px;
  font-family: var(--mono); font-size: 12px; white-space: pre-wrap; word-break: break-all; color: var(--ink-2); }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff;
  padding: 12px 18px; border-radius: 30px; box-shadow: var(--shadow-lg); z-index: 60; animation: toast .25s; font-size: 13px; font-weight: 500; }
@keyframes toast { from { transform: translate(-50%, 12px); opacity: 0 } }
.hidden { display: none !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   KIOSK — the full-screen live board. One withdrawal at a time.
   ═══════════════════════════════════════════════════════════════════════════ */
.kioskbar { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-bottom: 1px solid var(--line);
  background: var(--card); position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.kioskbar b { font-weight: 750; letter-spacing: -.02em; font-size: 16px; }
.kioskbar .seg { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; }
.iconbtn { padding: 6px 9px; line-height: 1; }
.ticker { display: flex; align-items: center; gap: 14px; padding: 5px 13px; background: var(--paper); border: 1px solid var(--line);
  border-radius: 30px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ticker b { font-size: 12.5px; font-weight: 700; color: var(--ink); letter-spacing: 0; }
.ticker .sep { width: 1px; height: 13px; background: var(--line-2); }
.ticker .bad { color: var(--bad); }
.newpill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 30px;
  background: var(--paid); color: #fff; font-size: 12.5px; font-weight: 650; box-shadow: 0 4px 14px rgba(14,159,110,.35); }
.newpill .d { width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.switch { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); cursor: pointer; user-select: none; }
.switch input { appearance: none; -webkit-appearance: none; width: 34px; height: 19px; border-radius: 20px; background: var(--line-2);
  position: relative; cursor: pointer; transition: background .15s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%;
  background: #fff; box-shadow: var(--shadow-sm); transition: transform .15s; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(15px); }
.stage.paused .stage-progress { opacity: .3; }
.upnext { position: absolute; right: clamp(18px, 3vw, 40px); bottom: clamp(60px, 9vh, 96px); display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 30px; padding: 7px 14px 7px 12px; box-shadow: var(--shadow);
  color: var(--muted); font-size: 12.5px; }
.upnext .lbl { text-transform: uppercase; letter-spacing: .06em; font-size: 10px; font-weight: 700; color: var(--faint); }
.upnext .amt { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }

.stage {
  position: relative; min-height: calc(100vh - 60px); overflow: hidden;
  display: grid; place-items: center; padding: 3vh 4vw;
  background:
    radial-gradient(1400px 700px at 50% -20%, #ffffff, rgba(255,255,255,0) 55%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
}
.stage-progress { position: absolute; top: 0; left: 0; height: 4px; background: linear-gradient(90deg, var(--accent), var(--purple)); width: 0; z-index: 3; }
.stage-progress.run { transition: width linear; }

/* the slip */
.slip { width: min(1140px, 96vw); background: var(--card); border: 1px solid var(--line);
  border-radius: 22px; box-shadow: var(--shadow-lg); overflow: hidden;
  display: grid; grid-template-columns: 1.15fr .85fr; }
.slip.enter { animation: slipIn .5s cubic-bezier(.16,.84,.32,1); }
.slip.leave { animation: slipOut .4s cubic-bezier(.5,0,.75,0) forwards; }
@keyframes slipIn { from { opacity: 0; transform: translateY(34px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes slipOut { to { opacity: 0; transform: translateY(-26px) scale(.99); } }

.slip-l { padding: clamp(24px, 3.4vw, 48px); display: flex; flex-direction: column; min-width: 0; }
.slip-eyebrow { display: flex; align-items: center; gap: 10px; font-size: 12px; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.slip-eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.slip-amount { font-size: clamp(52px, 8.5vw, 132px); font-weight: 800; letter-spacing: -.045em; line-height: .95;
  margin: clamp(14px, 2.4vw, 30px) 0 6px; font-variant-numeric: tabular-nums; }
.slip-amount .rs { color: var(--faint); font-weight: 650; letter-spacing: -.02em; }
.slip-status-row { display: flex; align-items: center; gap: 10px; margin-bottom: clamp(18px, 2.6vw, 32px); flex-wrap: wrap; }
.slip-name { font-size: clamp(20px, 2.3vw, 30px); font-weight: 700; letter-spacing: -.02em; margin-bottom: 4px; }
.slip-human { font-size: clamp(13px, 1.35vw, 16px); color: var(--muted); margin-bottom: clamp(14px, 2vw, 26px); }
.slip-human b { color: var(--ink); font-weight: 650; }
.slip-rows { display: grid; gap: 11px; margin-top: auto; }
.slip-row { display: flex; align-items: baseline; gap: 14px; padding-top: 11px; border-top: 1px dashed var(--line-2); }
.slip-row:first-child { border-top: 0; padding-top: 0; }
.slip-row .k { width: 110px; flex: none; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); font-weight: 600; }
.slip-row .val { font-size: clamp(15px, 1.5vw, 19px); font-weight: 600; min-width: 0; word-break: break-word; }
.slip-row .val.mono { font-family: var(--mono); letter-spacing: -.01em; }

.slip-r { position: relative; background: var(--paper-2); border-left: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; padding: clamp(20px, 2.6vw, 40px); }
.slip-shot { max-width: 100%; max-height: 62vh; border-radius: 14px; border: 1px solid var(--line-2);
  box-shadow: 0 16px 40px rgba(16,21,28,.14); background: #fff; }
.slip-shot.none { width: 78%; aspect-ratio: 3/4; display: grid; place-items: center; color: var(--faint);
  font-size: 14px; text-align: center; gap: 10px; box-shadow: none; }
.slip-shot.none .big { font-size: 40px; }

/* the rubber stamp — signature element */
.stamp {
  position: absolute; top: clamp(28px, 4vw, 54px); right: clamp(20px, 3vw, 44px);
  transform: rotate(-13deg) scale(1); transform-origin: center;
  border: 4px double currentColor; border-radius: 10px; padding: 8px 16px 6px;
  font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .9;
  display: flex; flex-direction: column; align-items: center; line-height: 1.05;
  background: rgba(255,255,255,.35); box-shadow: inset 0 0 0 1px rgba(255,255,255,.4);
}
.stamp.ok { color: var(--paid); }
.stamp.bad { color: var(--bad); }
.stamp.warn { color: var(--warn); }
.stamp.muted { color: var(--faint); }
.stamp .top { font-size: clamp(18px, 2vw, 27px); }
.stamp .sub { font-size: 10px; letter-spacing: .12em; opacity: .85; margin-top: 2px; }
.stamp.thunk { animation: thunk .38s cubic-bezier(.2,1.5,.4,1) .18s both; }
@keyframes thunk { 0% { opacity: 0; transform: rotate(-13deg) scale(1.9); } 60% { opacity: .95; } 100% { opacity: .9; transform: rotate(-13deg) scale(1); } }

.slip-foot { position: absolute; left: 0; right: 0; bottom: clamp(14px, 2.4vh, 26px);
  display: flex; align-items: center; justify-content: center; gap: 22px; color: var(--muted); font-size: 13px; }
.dots { display: flex; gap: 7px; align-items: center; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); transition: all .2s; }
.dots i.on { background: var(--accent); width: 22px; border-radius: 4px; }
.next-in { font-variant-numeric: tabular-nums; color: var(--faint); }
.live-flag { display: inline-flex; align-items: center; gap: 7px; color: var(--paid); font-weight: 650; }
.live-flag .d { width: 8px; height: 8px; border-radius: 50%; background: var(--paid); box-shadow: 0 0 0 3px var(--paid-wash); }

.kiosk-idle { text-align: center; color: var(--muted); }
.kiosk-idle .big { font-size: 34px; font-weight: 750; letter-spacing: -.02em; color: var(--ink); margin-bottom: 8px; }

/* ── responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .shell { grid-template-columns: 68px 1fr; }
  .brand b, .nav-item span.txt { display: none; }
  .nav-item { justify-content: center; }
  .nav-item .nav-count { position: absolute; margin: 0; transform: translate(14px, -12px); }
  .nav-item { position: relative; }
  .side-foot { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .slip { grid-template-columns: 1fr; }
  .slip-r { border-left: 0; border-top: 1px solid var(--line); }
  .slip-shot { max-height: 44vh; }
}

/* completed-only live board bits */
.slip-eyebrow .just { color: var(--paid); font-weight: 800; letter-spacing: .05em; }
.slip-foot .dotsep { color: var(--line-2); }

/* ── phone-optimised live board ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .kioskbar { padding: 10px 13px; gap: 9px; }
  .kioskbar b { font-size: 15px; }
  .kioskbar .seg#kiosk-state, .kioskbar #kiosk-state { font-size: 12px; }
  .kioskbar .clock { display: none; }
  .kioskbar .ticker { order: 5; width: 100%; justify-content: center; margin-top: 2px; }
  .kioskbar select { max-width: 140px; }

  .stage { padding: 12px; min-height: auto; }
  .slip { border-radius: 18px; box-shadow: var(--shadow); }
  .slip-l { padding: 22px 20px 18px; }
  .slip-eyebrow { font-size: 11px; }
  .slip-amount { font-size: clamp(46px, 15vw, 74px); margin: 12px 0 8px; }
  .slip-status-row { margin-bottom: 16px; }
  .slip-name { font-size: 22px; }
  .slip-human { font-size: 13px; margin-bottom: 16px; }
  .slip-row .k { width: 84px; font-size: 11px; }
  .slip-row .val { font-size: 15px; }
  .slip-r { padding: 16px; }
  .slip-shot { max-height: 46vh; }
  .slip-shot.none { width: 70%; }
  .stamp { top: 16px; right: 14px; padding: 6px 12px 5px; }
  .stamp .top { font-size: 17px; }
  .stamp .sub { font-size: 8px; }
  .slip-foot { position: static; margin: 12px 4px 4px; flex-wrap: wrap; justify-content: center; gap: 8px; font-size: 12px; }
  .kiosk-idle .big { font-size: 24px; }

  /* app chrome on phones */
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; bottom: 0; left: 0; right: 0; top: auto; height: auto; flex-direction: row;
    border-right: 0; border-top: 1px solid var(--line); padding: 6px; z-index: 30; overflow-x: auto; }
  .brand, .nav-sep, .side-foot { display: none; }
  .nav-item { flex-direction: column; gap: 2px; padding: 7px 12px; font-size: 11px; white-space: nowrap; }
  .nav-item .txt { display: inline; }
  .nav-item.active { box-shadow: none; }
  .main { padding: 14px 14px 76px; }
  .grid-2 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .filters input[type=search] { min-width: 100%; }
  table { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .slip.enter, .slip.leave, .stamp.thunk, .pulse, .feed-item.flash { animation: none !important; }
  .stage-progress.run { transition: none; }
}
