:root {
  --navy-950: #0E1013; --navy-900: #16191E; --navy-800: #1F232A; --navy-700: #2B3039; --navy-600: #3B424D;
  --ink: #14181E; --muted: #5F6773; --muted-dark: #A3ABB8;
  --pt-red: #E30613; --pt-grey: #6D6E71; --line: #E2E7EE; --bg: #F3F5F8; --card: #FFFFFF;
  --brand: #1F5FC9; --brand-600: #194FA8; --brand-50: #EBF1FB;
  --ok: #10A15A; --ok-50: #E7F7EE; --bad: #D92D20; --bad-50: #FDECEA; --warn: #D98306; --warn-50: #FEF4E2;
  --r: 12px; --r-lg: 18px;
  --shadow: 0 1px 2px rgba(14,26,40,.06), 0 4px 16px rgba(14,26,40,.06);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { overflow: hidden; }
#app { height: 100dvh; display: flex; flex-direction: column; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 16px; font-weight: 650; }
a { color: var(--brand); }
.muted { color: var(--muted); font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.right { text-align: right; white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }

/* ---------- buttons & form ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); cursor: pointer; font-weight: 600; font-size: 14px; text-decoration: none; color: var(--ink);
  transition: background .15s, border-color .15s, transform .05s; white-space: nowrap; }
.btn:hover { background: #F7F9FC; border-color: #CDD5E0; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); border-color: var(--brand-600); }
.btn-sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 13px 20px; font-size: 16px; }
.btn-xl { padding: 18px 30px; font-size: 20px; border-radius: 14px; }
.btn-light { background: #fff; color: var(--ink); border-color: transparent; }
.btn-ghost-dark { background: transparent; color: #DDE7F3; border-color: var(--navy-600); }
.btn-ghost-dark:hover { background: var(--navy-800); border-color: var(--navy-600); }
.btn-danger-ghost { color: var(--bad); }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: rgba(0,0,0,.05); }
.icon-btn-dark { color: #C6D4E5; }
.icon-btn-dark:hover { background: rgba(255,255,255,.08); }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid #CFD7E2; border-radius: 10px; background: #fff; font-size: 15px; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: 3px solid var(--brand-50); }
input:disabled { background: #F2F4F7; }
label { font-size: 13px; font-weight: 600; color: #34465C; }
label.check { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 14px; }
label.check input { width: 18px; height: 18px; }
.form-msg { color: var(--bad); min-height: 1em; margin: 4px 0; font-size: 14px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack-sm { display: flex; flex-direction: column; gap: 6px; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.kv > span { color: var(--muted); }
.kv > b { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
code { background: #F1F4F8; padding: 2px 6px; border-radius: 6px; font-size: 13px; }
code.key { overflow-wrap: anywhere; user-select: all; }

.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 750; font-size: 18px; letter-spacing: -0.02em; }
.brand svg { color: var(--brand); }
.brand-lg { font-size: 26px; }
.edition { font-size: .5em; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; padding: 3px 8px; border-radius: 6px; background: #F59E0B; color: #2B1A00; align-self: center; }
.landing-switch { grid-column: 1 / -1; text-align: center; color: #8BB9F7; font-size: 14px; text-decoration: none; margin-top: 4px; }
.landing-switch:hover { text-decoration: underline; }
.k-vehicle { display: flex; flex-direction: column; gap: 6px; }
.k-vehicle label { color: #C9D7E7; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.k-vehicle label span { color: var(--muted-dark); font-weight: 500; }
.k-vehicle-input { font-size: 22px; padding: 12px 16px; border-radius: 12px; background: var(--navy-900); border: 2px solid var(--navy-700); color: #fff; text-transform: uppercase; letter-spacing: .08em; font-weight: 650; }
.k-vehicle-input::placeholder { color: #4D6683; letter-spacing: 0; font-weight: 500; text-transform: none; }
.k-result-vehicle { display: inline-flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; letter-spacing: .06em; padding: 4px 14px; border-radius: 8px; background: rgba(0,0,0,.2); }

.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.pill-pass { background: var(--ok-50); color: #087A42; }
.pill-fail { background: var(--bad); color: #fff; }
.pill-invalid { background: var(--warn-50); color: #9A5B00; }
.avatar { border-radius: 50%; object-fit: cover; flex: none; background: #DCE5F0; }
.avatar-initials { display: grid; place-items: center; font-weight: 700; color: #2A4B73; background: linear-gradient(135deg, #DCE7F5, #C7D6EA); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot-ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-50); }
.dot-bad { background: #A9B4C2; }
.chip { border: 1px solid var(--navy-600); background: var(--navy-800); color: #DDE7F3; border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 13px; cursor: pointer; }
.chip:hover { background: var(--navy-700); }
.chip-ok { border-color: #1E7F52; background: #0F3B2A; }
.chip-bad { border-color: #8E2A22; background: #3D1714; }
.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading, .empty { padding: 32px; text-align: center; color: var(--muted); display: flex; gap: 10px; justify-content: center; align-items: center; }
.link-quiet { color: var(--muted); font-size: 14px; text-decoration: none; text-align: center; }

#toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; width: min(92vw, 420px); }
.toast { padding: 12px 16px; border-radius: 12px; background: var(--navy-900); color: #fff; box-shadow: 0 8px 30px rgba(0,0,0,.25); font-size: 14px; animation: rise .2s ease-out; }
.toast-ok { background: #0B6B3D; } .toast-bad { background: #A1231A; } .toast-warn { background: #8A5400; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

.modal-back { position: fixed; inset: 0; background: rgba(6,17,29,.55); display: grid; place-items: center; z-index: 50; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; color: var(--ink); border-radius: var(--r-lg); width: min(640px, 100%); max-height: 92dvh; display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(0,0,0,.3); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 8px; }
.modal-head h3 { font-size: 18px; }
.modal-body { padding: 8px 18px 16px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--line); }
.scan-wrap video { width: 100%; border-radius: 12px; background: #000; }

/* ---------- landing & setup ---------- */
.landing, .setup { flex: 1; display: grid; place-items: center; align-content: center; gap: 14px; padding: 24px; background: radial-gradient(1100px 560px at 15% -10%, #2A2F37 0%, var(--navy-950) 62%); color: #fff; overflow: auto; }
.landing .muted { color: var(--muted-dark); font-size: 15px; text-align: center; }
.landing-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 300px)); gap: 16px; margin-top: 12px; justify-content: center; width: 100%; }
.landing-card { display: flex; flex-direction: column; gap: 8px; padding: 24px; border-radius: var(--r-lg); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); color: #fff; text-decoration: none; transition: background .15s, transform .15s; }
.landing-card:hover { background: rgba(255,255,255,.1); transform: translateY(-2px); }
.landing-card svg { color: #6FA8F5; }
.landing-card p { margin: 0; color: var(--muted-dark); font-size: 14px; }
.setup-light { background: var(--bg); color: var(--ink); }
.setup-card { width: min(440px, 100%); background: #fff; color: var(--ink); border-radius: var(--r-lg); padding: 28px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.setup-light .setup-card { box-shadow: var(--shadow); border: 1px solid var(--line); }
.setup-card h1 { font-size: 22px; margin-top: 6px; }
.setup-card .muted { margin: 0 0 6px; }

/* ======================= KIOSK (dark) ======================= */
.kiosk { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--navy-950); color: #EAF1F9; }
.k-head { display: flex; align-items: center; gap: 16px; padding: 12px 20px; background: var(--navy-900); border-bottom: 1px solid var(--navy-800); flex-wrap: wrap; }
.k-head .brand svg { color: #6FA8F5; }
.k-station { color: var(--muted-dark); font-size: 15px; flex: 1; min-width: 160px; }
.k-station strong { color: #fff; }
.k-head-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.k-clock { font-variant-numeric: tabular-nums; font-weight: 650; font-size: 18px; margin-right: 6px; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 650; border: 1px solid transparent; background: transparent; }
button.status { cursor: pointer; }
.status-ok { color: #6EE7A8; border-color: #1E5A3F; background: #0C2A1E; }
.status-bad { color: #FFB4AB; border-color: #6B2620; background: #2C1210; }
.status-warn { color: #FFD38A; border-color: #6B4A12; background: #2B1F08; }
.k-main { flex: 1; min-height: 0; overflow: auto; display: flex; padding: 24px; }
.k-main > * { margin: auto; }
.k-foot { text-align: center; font-size: 12px; color: #5F7590; padding: 8px; }

.k-idle { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; width: min(640px, 100%); }
.k-idle-icon { width: 104px; height: 104px; border-radius: 28px; display: grid; place-items: center; background: linear-gradient(135deg, #17345A, #0E2140); color: #8BB9F7; border: 1px solid var(--navy-700); }
.k-title { font-size: clamp(26px, 4vw, 40px); font-weight: 750; }
.k-sub { margin: 0; color: var(--muted-dark); font-size: clamp(16px, 2vw, 20px); }
.k-id-form { display: flex; gap: 10px; width: 100%; margin-top: 8px; }
.k-id-input { flex: 1; font-size: 26px; padding: 16px 20px; border-radius: 14px; background: var(--navy-900); border: 2px solid var(--navy-700); color: #fff; text-transform: uppercase; letter-spacing: .06em; font-weight: 650; }
.k-id-input::placeholder { color: #4D6683; text-transform: none; letter-spacing: 0; font-weight: 500; }
.k-id-input:focus { border-color: #4C8FEA; outline: 4px solid rgba(76,143,234,.25); }
.k-demo-ids { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; color: #7891AE; font-size: 13px; }
.k-banner { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; font-size: 15px; font-weight: 600; text-align: left; width: 100%; }
.k-banner-warn { background: #2B1F08; color: #FFD38A; border: 1px solid #6B4A12; }
.k-banner-bad { background: #2C1210; color: #FFB4AB; border: 1px solid #6B2620; }

.k-ready { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; width: min(1100px, 100%); align-items: stretch; }
.k-cam { align-self: start; position: relative; border-radius: var(--r-lg); overflow: hidden; background: #000 linear-gradient(135deg, #0E2140, #06111D); aspect-ratio: 4/3; border: 1px solid var(--navy-700); }
.k-video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
.k-cam-guide { position: absolute; left: 50%; top: 46%; width: 42%; aspect-ratio: 3/4; transform: translate(-50%, -50%); border: 3px dashed rgba(255,255,255,.55); border-radius: 50%; }
.k-cam-label { position: absolute; left: 12px; bottom: 12px; display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px; background: rgba(6,17,29,.7); font-size: 13px; font-weight: 600; }
.k-ready-side { display: flex; flex-direction: column; gap: 16px; }
.k-person { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: var(--r); background: var(--navy-900); border: 1px solid var(--navy-800); }
.k-person-name { font-size: 22px; font-weight: 700; }
.k-person-meta { color: var(--muted-dark); font-size: 14px; margin-top: 2px; }
.k-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; font-size: 17px; color: #C9D7E7; }
.k-steps b { color: #fff; }
.k-wait { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: var(--r); background: linear-gradient(135deg, #12305A, #0D2240); border: 1px solid #24508A; }
.k-wait-t { font-weight: 700; font-size: 17px; }
.k-wait-s { color: var(--muted-dark); font-size: 14px; font-variant-numeric: tabular-nums; }
.k-pulse { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #1D6FE0; color: #fff; flex: none; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(29,111,224,.6); } 50% { box-shadow: 0 0 0 14px rgba(29,111,224,0); } }

.k-result { width: min(720px, 100%); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 36px 28px; border-radius: 24px; animation: pop .25s ease-out; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
.k-result-pass { background: linear-gradient(160deg, #0F8A4F, #076138); }
.k-result-fail { background: linear-gradient(160deg, #D92D20, #8E1B13); }
.k-result-invalid { background: linear-gradient(160deg, #C27406, #7E4A00); }
.k-result-icon { width: 112px; height: 112px; border-radius: 50%; background: rgba(255,255,255,.18); display: grid; place-items: center; }
.k-result-big { font-size: clamp(56px, 10vw, 96px); font-weight: 850; letter-spacing: .04em; line-height: 1; }
.k-result-name { font-size: 24px; font-weight: 700; }
.k-result-value { font-size: 20px; font-variant-numeric: tabular-nums; opacity: .92; }
.k-result-msg { font-size: 18px; margin: 4px 0; max-width: 520px; }
.k-result-meta { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; font-size: 13px; opacity: .85; }
.k-result-meta span { display: inline-flex; gap: 5px; align-items: center; }
.k-sync { display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border-radius: 999px; background: rgba(0,0,0,.2); font-size: 14px; font-weight: 600; margin: 6px 0 10px; }

.k-demo { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 10px; background: #0B1626; border-top: 1px dashed #2A4B73; }
.k-demo-label { color: #7891AE; font-size: 13px; font-weight: 600; }

/* ======================= DASHBOARD (light) ======================= */
.dash { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--bg); }
.d-head { display: flex; align-items: center; gap: 18px; padding: 10px 20px; background: #fff; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.d-tabs { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.d-tab { border: 0; background: transparent; padding: 8px 14px; border-radius: 8px; font-weight: 600; color: var(--muted); cursor: pointer; font-size: 14px; white-space: nowrap; }
.d-tab:hover { background: #F2F5F9; color: var(--ink); }
.d-tab.active { background: var(--brand-50); color: var(--brand-600); }
.d-head-right { display: flex; align-items: center; gap: 10px; }
.d-user { font-size: 14px; font-weight: 600; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: #B9C3CF; }
.live-dot.on { background: var(--ok); animation: pulse-ok 2s infinite; }
@keyframes pulse-ok { 0%, 100% { box-shadow: 0 0 0 0 rgba(16,161,90,.5); } 50% { box-shadow: 0 0 0 6px rgba(16,161,90,0); } }
.d-alerts { display: flex; flex-direction: column; }
.d-alert { display: flex; align-items: center; gap: 10px; padding: 10px 20px; background: var(--bad); color: #fff; font-size: 14px; flex-wrap: wrap; animation: rise .2s; }
.d-alert .btn { margin-left: auto; }
.d-body { flex: 1; min-height: 0; overflow: auto; padding: 20px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--shadow); }
.tile-v { font-size: 32px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.tile-l { color: var(--muted); font-size: 13px; font-weight: 600; margin-top: 2px; }
.tile-bad { border-color: #F5B5AE; background: var(--bad-50); } .tile-bad .tile-v { color: var(--bad); }
.tile-warn .tile-v { color: var(--warn); }
.tile-ok .tile-v { color: var(--ok); }
.d-live-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.feed { display: flex; flex-direction: column; gap: 8px; }
.feed-item { display: grid; grid-template-columns: auto minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; text-align: left; cursor: pointer; border-left-width: 4px; }
.feed-item:hover { background: #F9FBFD; }
.fi-pass { border-left-color: var(--ok); } .fi-fail { border-left-color: var(--bad); background: #FFF8F7; } .fi-invalid { border-left-color: var(--warn); }
.fi-name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fi-main .muted, .fi-mid .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fi-val { font-weight: 650; font-variant-numeric: tabular-nums; }
.fi-val-m { display: none; font-weight: 650; font-size: 13px; }
.fi-side { text-align: right; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.flash { animation: flash 1.8s ease-out; }
@keyframes flash { from { background: #FFF6D6; } }
.st-list { display: flex; flex-direction: column; }
.st-row { display: flex; gap: 12px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.st-row:last-child { border-bottom: 0; }
.st-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.st-main .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.mini { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; font-weight: 650; padding: 2px 8px; border-radius: 999px; }
.mini-ok { background: var(--ok-50); color: #087A42; } .mini-bad { background: var(--bad-50); color: var(--bad); }

.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filters input, .filters select { width: auto; padding: 7px 10px; font-size: 14px; }
.filters input[type=search] { min-width: 200px; flex: 1; max-width: 300px; }
.grow-right { margin-left: auto; display: flex; gap: 8px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 650; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr[tabindex] { cursor: pointer; }
.table tbody tr[tabindex]:hover { background: #F7FAFD; }
.row-dim { opacity: .5; }
.cell-person { display: flex; gap: 10px; align-items: center; }
.pager { display: flex; justify-content: space-between; align-items: center; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }

.test-detail { display: flex; flex-direction: column; gap: 14px; }
.td-banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; }
.td-pass { background: var(--ok-50); } .td-fail { background: var(--bad-50); } .td-invalid { background: var(--warn-50); }
.td-val { font-size: 20px; font-weight: 750; font-variant-numeric: tabular-nums; }
.td-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; }
.td-photo img { width: 100%; border-radius: 12px; display: block; transform: scaleX(-1); }
.td-nophoto { aspect-ratio: 3/4; border-radius: 12px; background: #F2F5F9; display: grid; place-items: center; align-content: center; gap: 8px; }
details summary { cursor: pointer; font-weight: 600; font-size: 14px; }
pre.raw-live { min-height: 120px; max-height: 260px; font-size: 11px; margin: 6px 0; }
details.monitor { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
details.monitor > summary { margin-bottom: 6px; }
.parsed-box { margin-bottom: 8px; }
pre.raw { white-space: pre-wrap; font-size: 12px; background: #0B1626; color: #C9E3FF; padding: 12px; border-radius: 10px; max-height: 220px; overflow: auto; }

/* ======================= DEMO SHELL ======================= */
.demo-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 14px; background: #fff; border-bottom: 1px solid var(--line); }
.demo-brand { display: flex; align-items: center; gap: 8px; }
.demo-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-600); background: var(--brand-50); padding: 3px 8px; border-radius: 999px; }
.seg { display: inline-flex; background: #EEF2F7; border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed=true] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.demo-panes { flex: 1; min-height: 0; display: flex; }
.demo-pane { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
#app[data-view=kiosk] .demo-dash, #app[data-view=dash] .demo-kiosk { display: none; }
#app[data-view=both] .demo-kiosk { flex: 1.05; border-right: 1px solid var(--navy-800); }
#app[data-view=both] .k-ready { grid-template-columns: 1fr; }
#app[data-view=both] .k-cam { max-height: 34vh; aspect-ratio: auto; height: 34vh; }
#app[data-view=both] .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#app[data-view=both] .d-live-grid { grid-template-columns: 1fr; }
@media (max-width: 1099px) { .seg-wide { display: none; } }

/* ======================= RESPONSIVE ======================= */
@media (max-width: 900px) {
  .k-ready { grid-template-columns: 1fr; }
  .k-cam { aspect-ratio: auto; height: 36vh; }
  .d-live-grid { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .td-grid { grid-template-columns: 1fr; }
  .td-photo img, .td-nophoto { max-width: 240px; margin: 0 auto; }
}
@media (max-width: 600px) {
  .k-head { padding: 10px 12px; gap: 8px; }
  .k-station { order: 3; flex-basis: 100%; font-size: 13px; }
  .k-clock { display: none; }
  .k-main { padding: 14px; }
  .k-id-form { flex-direction: column; }
  .k-id-input { font-size: 22px; }
  .k-idle-icon { width: 76px; height: 76px; border-radius: 22px; }
  .k-idle-icon svg { width: 40px; height: 40px; }
  .k-steps { font-size: 15px; }
  .k-cam { height: 24vh; }
  .k-ready-side { gap: 12px; }
  .k-result { padding: 26px 16px; }
  .k-result-icon { width: 80px; height: 80px; } .k-result-icon svg { width: 52px; height: 52px; }
  .d-head { padding: 8px 12px; gap: 6px; }
  .d-tabs { order: 3; flex-basis: 100%; }
  .d-user { display: none; }
  .d-body { padding: 12px; }
  .tile-v { font-size: 26px; }
  .feed-item { grid-template-columns: auto minmax(0, 1fr) auto; }
  .fi-mid { display: none; }
  .fi-val-m { display: block; }
  .demo-pane .k-head .brand, .demo-pane .d-head .brand { display: none; }
  .demo-brand { display: flex; align-items: center; gap: 8px; }
  .demo-tag { display: none; }
  .demo-top { padding: 8px 10px; }
  .demo-brand .brand { font-size: 16px; }
  .filters input[type=search] { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ======================= PRESENTATION SPLIT VIEW ======================= */
.split { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.1fr 1fr; background: #06111D; position: relative; }
.split iframe { width: 100%; height: 100%; border: 0; display: block; }
.split iframe + iframe { border-left: 2px solid #1A3657; }
.split-tools { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 6px; opacity: .35; transition: opacity .2s; }
.split-tools:hover { opacity: 1; }
.split-btn { width: 34px; height: 34px; border-radius: 8px; border: 1px solid #2A4B73; background: #0A1A2C; color: #C6D4E5; cursor: pointer; font-size: 16px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; } .split iframe + iframe { border-left: 0; border-top: 2px solid #1A3657; } }

.qr-box { display: grid; place-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.qr-box svg { width: min(260px, 70vw); height: auto; display: block; }
.trust-steps { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.trust-steps li { line-height: 1.5; }
.trust-steps code { background: #0A1A2C; color: #9CC7FF; padding: 3px 8px; border-radius: 6px; font-size: 15px; user-select: all; }

/* face enrolment */
.enroll-cam { border-radius: 12px; overflow: hidden; background: #0A1A2C; aspect-ratio: 4/3; max-height: 300px; display: grid; place-items: center; }
.enroll-video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.enroll-status { font-size: 14px; color: #34465C; min-height: 1.4em; }
.enroll-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.enroll-actions label.btn input { display: none; }
.enroll-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.enroll-thumb { position: relative; width: 72px; height: 88px; border-radius: 10px; overflow: hidden; background: #EEF2F7; border: 2px solid var(--ok); }
.enroll-thumb.pending { border-color: var(--brand); }
.enroll-thumb img { width: 100%; height: 100%; object-fit: cover; }
.enroll-nophoto { display: grid; place-items: center; height: 100%; color: var(--ok); font-weight: 700; }
.enroll-x { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; line-height: 1; }
/* kiosk face panel */
.k-face { position: relative; width: min(420px, 100%); aspect-ratio: 4/3; border-radius: 18px; overflow: hidden; background: #0A1A2C linear-gradient(135deg, #0E2140, #06111D); border: 2px solid var(--navy-700); }
.k-face video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
.k-face.seen { border-color: #4C8FEA; }
.k-face.match { border-color: var(--ok); box-shadow: 0 0 0 4px rgba(16,161,90,.35); }
.k-face-status { position: absolute; left: 10px; right: 10px; bottom: 10px; padding: 8px 12px; border-radius: 10px; background: rgba(6,17,29,.78); font-size: 15px; font-weight: 600; text-align: center; }
.k-idle-split { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 32px; align-items: center; width: min(1100px, 100%); text-align: left; }
.k-idle-split .k-idle { align-items: flex-start; text-align: left; }
.k-face-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: #0C2A1E; color: #6EE7A8; font-size: 13px; font-weight: 650; border: 1px solid #1E5A3F; }
@media (max-width: 900px) { .k-idle-split { grid-template-columns: 1fr; text-align: center; justify-items: center; } .k-idle-split .k-idle { align-items: center; text-align: center; } .k-face { width: min(360px, 100%); } }

.btn-face { border-color: var(--brand); color: var(--brand-600); background: var(--brand-50); }

/* ======================= REPORTS ======================= */
.report-wrap { display: flex; flex-direction: column; gap: 16px; }
.stack-lg { display: flex; flex-direction: column; gap: 16px; }
.report-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 4px 2px; }
.report-head h1 { font-size: 24px; margin: 2px 0 4px; }
.report-org { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-600); }
.report-meta { text-align: right; font-size: 12px; }
.tiles-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0; }
.tile-s { color: var(--muted); font-size: 12px; margin-top: 2px; }
.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.table-compact td, .table-compact th { padding: 7px 10px; }
.table th.num { text-align: right; } .table td.num { text-align: right; }
.txt-bad { color: var(--bad); }
.legend { display: flex; gap: 14px; font-size: 13px; color: #34465C; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.sw-pass { background: var(--ok); } .sw-fail { background: var(--bad); } .sw-invalid { background: var(--warn); }
.chart-wrap { position: relative; }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: #E8ECF1; stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 11px; }
.chart .bar-pass { fill: var(--ok); } .chart .bar-fail { fill: var(--bad); } .chart .bar-invalid { fill: var(--warn); }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover { fill: rgba(14,26,40,.04); }
.chart-tip { position: absolute; top: 6px; transform: translateX(-50%); background: var(--navy-900); color: #fff; padding: 8px 10px; border-radius: 8px; font-size: 12px; pointer-events: none; white-space: nowrap; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.report-foot { font-size: 12px; padding: 0 2px; }
@media (max-width: 1100px) { .tiles-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .report-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .tiles-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .report-head { flex-direction: column; align-items: flex-start; } .report-meta { text-align: left; } }

/* Print / Save as PDF: just the report, A4-friendly */
@media print {
  @page { size: A4; margin: 12mm; }
  html, body, #app { height: auto !important; overflow: visible !important; background: #fff !important; }
  .d-head, .d-alerts, .no-print, #toasts, .split-tools { display: none !important; }
  .dash, .d-body { overflow: visible !important; padding: 0 !important; background: #fff !important; }
  .panel, .tile { box-shadow: none !important; border-color: #DDE3EA !important; break-inside: avoid; }
  .tiles-6 { grid-template-columns: repeat(3, 1fr); }
  .report-grid { grid-template-columns: 1fr 1fr; }
  .chart-tip { display: none !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.login-org { margin: -4px 0 6px; font-weight: 600; }
.landing-org { color: #fff; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; margin: 0; opacity: .85; }

/* ======================= PLANETRONICS BRANDING ======================= */
.brand-logo { display: inline-flex; align-items: center; gap: 12px; }
.brand-img { display: block; width: auto; }
.brand-sep { width: 1px; height: 1.3em; background: var(--line); }
.brand-product { font-weight: 750; letter-spacing: -0.02em; color: var(--ink); }
.d-head, .k-head, .demo-top { border-top: 3px solid var(--pt-red); }
.k-head { background: var(--navy-900); }
.k-wait { background: linear-gradient(135deg, #1B2533, #151B24); border-color: #2C3E5A; }
.landing-card svg { color: #9FB4D3; }
.landing { gap: 18px; }
.landing .brand-lg .brand-product { font-size: 30px; }

/* sign-in layout (dashboard + Android app) */
.auth { flex: 1; min-height: 0; height: 100%; display: grid; grid-template-columns: minmax(340px, 0.95fr) 1.05fr; grid-template-rows: 100%; overflow: hidden; background: var(--bg); }
.auth-brand { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 40px 44px; color: #fff; overflow: hidden;
  background: radial-gradient(900px 500px at 0% 0%, #2A2F37 0%, #121418 60%), #121418; border-top: 3px solid var(--pt-red); }
.auth-brand::after { content: ''; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(227,6,19,.07); pointer-events: none; }
.auth-brand .brand-product { font-size: 26px; }
.auth-pitch h2 { font-size: clamp(24px, 2.6vw, 34px); line-height: 1.15; margin-bottom: 18px; max-width: 440px; }
.auth-pitch p { color: var(--muted-dark); font-size: 16px; max-width: 440px; line-height: 1.55; }
.auth-feats { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; max-width: 460px; }
.auth-feats li { display: flex; gap: 14px; align-items: flex-start; }
.auth-feats b { display: block; font-size: 15px; }
.auth-feats span:not(.auth-feat-ic) { color: var(--muted-dark); font-size: 14px; }
.auth-feat-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); color: #fff; }
.auth-foot { color: #7D8593; font-size: 12px; }
.auth-main { display: grid; place-items: center; padding: 40px 24px; overflow: auto; }
.auth-card { width: min(420px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 32px; box-shadow: 0 20px 50px rgba(20,24,30,.08); display: flex; flex-direction: column; gap: 10px; }
.auth-card h1 { font-size: 24px; margin-top: 2px; }
.auth-card .muted { margin: 0 0 8px; font-size: 14px; }
.auth-org { font-size: 12px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: var(--pt-red); min-height: 1em; }
.auth-alt { margin-top: 10px; text-align: center; }
.link-btn { background: none; border: 0; color: var(--brand-600); font-weight: 600; cursor: pointer; font-size: 14px; padding: 6px; }
.btn-block { width: 100%; }
.gate-list { display: grid; gap: 10px; max-height: min(52vh, 440px); overflow: auto; padding: 2px; }
.gate-card { position: relative; text-align: left; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.gate-card:hover { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.gate-card-name { font-weight: 700; font-size: 16px; }
.gate-card .dot { position: absolute; right: 16px; top: 18px; }
.gate-new { border: 1px dashed #CBD3DE; border-radius: 14px; padding: 12px 14px; }
.gate-new summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.report-logo { height: 30px; width: auto; display: block; margin-bottom: 10px; }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; overflow: auto; height: auto; min-height: 100%; }
  .auth-brand { padding: 16px 18px 14px; gap: 10px; }
  .auth-brand .brand-img { height: 26px !important; }
  .auth-brand .brand-product { font-size: 20px; }
  .auth-brand .brand-logo { flex-wrap: wrap; gap: 10px; }
  .auth-brand::after { display: none; }
  .auth-main { overflow: visible; }
  .gate-list { max-height: none; }
  .auth-pitch, .auth-foot { display: none; }
  .auth-main { padding: 20px 14px 32px; place-items: start center; }
  .auth-card { padding: 22px; }
}
@media (max-width: 600px) { .k-head .brand-img { height: 22px !important; } .k-head .brand-sep { display: none; } }

/* kiosk idle with face panel: ID entry stacks so the field keeps its full width */
.k-idle-split .k-id-form { flex-direction: column; }
.k-idle-split .k-id-input { width: 100%; }
.k-idle-split .k-title { font-size: clamp(26px, 3vw, 36px); }

/* demo: one logo in the top bar is enough */
.demo-pane .k-head .brand-logo, .demo-pane .d-head .brand-logo { display: none; }

/* =====================================================================
   REFINEMENT PASS — light surfaces for the logo, flat fills, tighter radii
   ===================================================================== */
:root { --r: 8px; --r-lg: 12px; --line: #E3E7EC; --shadow: 0 1px 2px rgba(20,24,30,.05); }

/* buttons: consistent heights, modest corners, no heavy rounding */
.btn { border-radius: 6px; font-weight: 600; padding: 8px 14px; border-color: #D5DBE2; box-shadow: 0 1px 0 rgba(20,24,30,.03); }
.btn-sm { border-radius: 6px; padding: 5px 10px; }
.btn-lg { border-radius: 8px; padding: 11px 18px; font-size: 15px; }
.btn-xl { border-radius: 8px; padding: 15px 26px; font-size: 18px; }
.btn-primary { box-shadow: none; }
.btn-primary:focus-visible { outline-color: rgba(31,95,201,.45); }
.btn-face { border-color: #BFD0EE; }
.icon-btn { border-radius: 6px; }
input, select, textarea { border-radius: 6px; border-color: #D0D6DE; }
.pill { border-radius: 4px; padding: 2px 8px; font-size: 11px; letter-spacing: .04em; }
.chip { border-radius: 6px; padding: 6px 12px; }
.mini { border-radius: 4px; }
.edition { border-radius: 4px; padding: 3px 7px; background: #FFF4E0; color: #8A5300; border: 1px solid #F0D7A6; font-size: 10px; letter-spacing: .1em; }
.demo-tag { border-radius: 4px; }
.toast { border-radius: 8px; }
.modal { border-radius: 14px; }
.tile, .panel { border-radius: 12px; box-shadow: var(--shadow); }
.feed-item { border-radius: 10px; }
.avatar-initials { background: #E8ECF1; color: #3B4552; }

/* logo: always original colours on white/light */
.brand-logo { gap: 14px; }
.logo-link { display: inline-flex; align-items: center; border-radius: 4px; }
.logo-link:hover { opacity: .88; }
.brand-product { font-size: 18px; }
.brand-lg .brand-product { font-size: 24px; }
.brand-sep { height: 26px; background: #D8DDE3; }

/* contact line */
.contact-line { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 12px; }
.contact-line a { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
.contact-line a:hover { color: var(--brand-600); text-decoration: underline; }
.contact-line-dark a:hover { color: #fff; }

/* dashboard footer */
.d-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 20px; border-top: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 12px; }

/* sign-in: brand panel is LIGHT so the logo keeps its real colours */
.auth { background: #F4F6F8; }
.auth-brand { background: #fff; color: var(--ink); border-top: 3px solid var(--pt-red); border-right: 1px solid var(--line); }
.auth-brand::after { display: none; }
.auth-pitch h2 { color: var(--ink); font-weight: 700; }
.auth-pitch p, .auth-feats span:not(.auth-feat-ic) { color: var(--muted); }
.auth-feat-ic { background: #F3F5F8; border: 1px solid var(--line); color: #3B4552; border-radius: 8px; }
.auth-foot { color: var(--muted); display: flex; flex-direction: column; gap: 8px; }
.auth-card { border-radius: 14px; box-shadow: 0 1px 2px rgba(20,24,30,.05), 0 12px 32px rgba(20,24,30,.06); }
.auth-org { color: var(--muted); letter-spacing: .08em; }
.gate-card { border-radius: 10px; }

/* landing: light, calm */
.landing { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; padding: 0; background: #F4F6F8; color: var(--ink); overflow: auto; }
.landing-top { background: #fff; border-top: 3px solid var(--pt-red); border-bottom: 1px solid var(--line); padding: 12px 24px; }
.landing-main { flex: 1; width: min(880px, 100%); margin: 0 auto; padding: 56px 24px 32px; display: flex; flex-direction: column; gap: 14px; }
.landing-main h1 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.02em; }
.landing-lead { color: var(--muted); font-size: 16px; margin: 0 0 12px; }
.landing-org { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin: 0; opacity: 1; }
.landing-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0; }
.landing-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 20px; border-radius: 12px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; transform: none; }
.landing-card:hover { background: #fff; border-color: #B9C7DB; box-shadow: 0 4px 14px rgba(20,24,30,.06); transform: none; }
.landing-card h2 { font-size: 17px; margin-bottom: 4px; }
.landing-card p { color: var(--muted); font-size: 14px; margin: 0; }
.landing-ic { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: #F3F5F8; border: 1px solid var(--line); color: #3B4552; }
.landing-card svg { color: inherit; }
.landing-go { color: #9AA3AF; display: inline-flex; }
.landing-card:hover .landing-go { color: var(--brand-600); }
.landing-links { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; font-size: 14px; }
.landing-links a { color: var(--brand-600); text-decoration: none; }
.landing-links a:hover { text-decoration: underline; }
.landing-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 12px; }
.setup { background: #F4F6F8; color: var(--ink); }
.setup-card { box-shadow: 0 1px 2px rgba(20,24,30,.05), 0 12px 32px rgba(20,24,30,.06); border: 1px solid var(--line); border-radius: 14px; }

/* kiosk: white header carries the logo; the body stays dark for big, glanceable results */
.k-head { background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); border-top: 3px solid var(--pt-red); padding: 10px 20px; }
.k-station { color: var(--muted); }
.k-station strong { color: var(--ink); }
.k-clock { color: var(--ink); }
.k-head .status { border-radius: 6px; padding: 5px 10px; }
.k-head .status-ok { color: #0B6B3A; background: #E8F6EE; border-color: #BFE3CD; }
.k-head .status-bad { color: #B42318; background: #FDEDEB; border-color: #F4C7C1; }
.k-head .status-warn { color: #8A5300; background: #FEF4E2; border-color: #F0D7A6; }
.k-head .icon-btn-dark { color: #3B4552; }
.k-head .icon-btn-dark:hover { background: #F1F3F5; }
.k-idle-icon { background: #1F232A; border: 1px solid #2B3039; border-radius: 14px; color: #C9D2DE; }
.k-id-input { border-radius: 8px; background: #16191E; border-color: #2F353E; }
.k-id-input:focus { border-color: #5B8DEF; outline-color: rgba(91,141,239,.25); }
.k-vehicle-input { border-radius: 8px; background: #16191E; border-color: #2F353E; }
.k-person { border-radius: 12px; background: #16191E; border-color: #262B33; }
.k-cam, .k-face { border-radius: 14px; border-color: #2B3039; }
.k-wait { background: #16191E; border: 1px solid #2B3039; border-radius: 12px; }
.k-pulse { background: #1F5FC9; width: 48px; height: 48px; }
.k-banner { border-radius: 8px; }
.k-result { border-radius: 18px; }
.k-result-pass { background: #0E7C47; }
.k-result-fail { background: #C2281D; }
.k-result-invalid { background: #A66105; }
.k-result-icon { background: rgba(255,255,255,.14); }
.k-sync { border-radius: 6px; }
.k-foot { display: flex; justify-content: center; align-items: center; gap: 8px 18px; flex-wrap: wrap; color: #7D8593; }
.contact-line-dark { color: #8E96A3; }
.k-demo { background: #121418; border-top: 1px solid #262B33; }
.chip { background: #1F232A; border-color: #333944; }
.chip-ok { background: #10291D; border-color: #1E5A3F; }
.chip-bad { background: #2E1412; border-color: #6B2620; }
@media print { .d-foot { display: none !important; } .report-contact { margin-top: 6px; } }
@media (max-width: 860px) { .landing-cards { grid-template-columns: 1fr; } .landing-main { padding-top: 28px; } }
@media (max-width: 600px) { .d-foot { justify-content: center; text-align: center; } .k-head .brand-img { height: 24px !important; } }

.setup-foot { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; color: var(--muted); }
.split-btn { display: inline-grid; place-items: center; }
.btn-primary { border-color: var(--brand); }

.enroll-video.no-mirror, .cam-back .k-video, .cam-back .k-face video { transform: none; }

/* ---- video evidence ---- */
.k-cam { position: relative; }
.k-rec { position: absolute; top: 12px; left: 12px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 6px;
  background: rgba(0,0,0,.6); color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.k-rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #E5322D; animation: recblink 1.2s steps(2, start) infinite; }
@keyframes recblink { to { visibility: hidden; } }
.k-flag { background: rgba(0,0,0,.25); }
.k-extend { text-align: center; align-items: center; }
.k-extend-ic { color: #A66105; }
.k-extend-lead { font-size: 18px; margin: 0; }
.pill-ok { background: var(--ok-50); color: #087A42; display: inline-flex; align-items: center; gap: 4px; }
.pill-warn { background: #FEF4E2; color: #8A5300; display: inline-flex; align-items: center; gap: 4px; }
.td-media { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.td-video { width: 100%; border-radius: 10px; background: #000; display: block; aspect-ratio: 4/3; }
.td-evidence { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.td-evidence a { display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: var(--muted); font-size: 11px; }
.td-evidence img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 6px; transform: scaleX(-1); border: 1px solid var(--line); }
.td-novideo { font-size: 12px; }
.td-grid { grid-template-columns: 300px minmax(0, 1fr); }
.kv .pill, .fi-side .pill-warn { text-transform: none; letter-spacing: 0; font-size: 12px; white-space: nowrap; }

/* ---- bigger idle camera, tap-to-start ---- */
.k-face { width: min(600px, 100%); }
.k-idle-split { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); width: min(1200px, 100%); }
.k-face-tap { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: rgba(14,16,19,.72); color: #fff; border: 0; cursor: pointer; font: inherit; }
.k-face-tap b { font-size: 22px; }
.k-face-tap span { color: #AEB6C2; font-size: 14px; }
.k-face-tap svg { color: #fff; opacity: .9; }
.k-face-tap:active { background: rgba(14,16,19,.6); }
.k-face-status:empty { display: none; }
@media (max-width: 900px) { .k-face { width: min(520px, 100%); } }

/* ---- screening positive: active test required ---- */
.k-active-needed { display: flex; flex-direction: column; gap: 10px; align-items: center; max-width: 640px; margin: 4px auto 6px; padding: 16px 20px;
  border-radius: 12px; background: rgba(0,0,0,.22); text-align: center; }
.k-active-needed b { font-size: 22px; letter-spacing: .01em; }
.k-active-needed span { font-size: 16px; opacity: .95; }

/* ---- alerts ---- */
.d-alert { align-items: center; }
.d-alert-text { flex: 1; min-width: 0; }
.d-alert-confirm { background: #FEF4E2; border-color: #F0D7A6; color: #6B4100; }
.pill-mode { background: #EEF1F5; color: #3B4552; text-transform: none; letter-spacing: 0; font-size: 11px; }
td .pill + .pill { margin-left: 4px; }
.k-result-big-sm { font-size: clamp(48px, 9vw, 96px) !important; }

/* ---- "Tap to start" camera cover (replaces the WebView's default video placeholder) ---- */
.k-face video:not([src]) { background: transparent; }
.k-face-tap { background: radial-gradient(120% 90% at 50% 35%, #232832 0%, #15181D 60%, #101215 100%); gap: 10px; }
.k-face-tap-ic { width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: rgba(227,6,19,.14); border: 1px solid rgba(227,6,19,.45); box-shadow: 0 0 0 10px rgba(227,6,19,.06); animation: tapPulse 2.4s ease-in-out infinite; }
.k-face-tap-ic svg { stroke-width: 1.5; }
@keyframes tapPulse { 0%, 100% { box-shadow: 0 0 0 10px rgba(227,6,19,.06); } 50% { box-shadow: 0 0 0 18px rgba(227,6,19,.03); } }
.k-face-tap b { font-size: 24px; margin-top: 6px; }
/* Measurement mode column */
.td-mode { white-space: nowrap; }
.td-mode .pill + .pill { margin-left: 4px; }
.pill-mode.mode-active { background: #E3EEFB; color: #12457E; font-weight: 600; }
.pill-mode.mode-passive { background: #F1EEF8; color: #4A3A73; }
.pill-mode.mode-passive-auto { background: #EEF1F5; color: #3B4552; }
