/* The Data Guys(TM) Digital Bridge Lab: navigator console and check-in screens */
@font-face { font-family: 'Satoshi'; src: url('fonts/satoshi-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Satoshi'; src: url('fonts/satoshi-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Satoshi'; src: url('fonts/satoshi-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Satoshi'; src: url('fonts/satoshi-900.woff2') format('woff2'); font-weight: 900; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('fonts/jetbrainsmono-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  --paper: #f3f6f5; --paper-2: #e4ecea; --card: #fbfdfc; --ink: #002c4a; --ink-2: #24435a; --muted: #546a78;
  --line: rgba(0,44,74,.13); --teal: #15bfb2; --blue: #0a7f79; --blue-ink: #076660; --blue-soft: #d5f1ee; --cyan: #00aede;
  --navy: #002c4a; --navy-2: #063b5e; --gold: #b88a2e; --gold-soft: #f6ecd2; --red: #b3261e; --red-soft: #fdecea; --green: #1b7f4b; --green-soft: #def3e6;
  --r: 14px; --shadow: 0 1px 2px rgba(0,30,50,.06), 0 14px 34px -22px rgba(0,30,50,.35);
  --font: 'Satoshi', 'Inter', system-ui, sans-serif; --mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--paper); color: var(--ink); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--blue-ink); }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.01em; line-height: 1.15; }
h1 { font-weight: 900; font-size: 1.6rem; } h2 { font-weight: 900; font-size: 1.25rem; } h3 { font-weight: 700; font-size: 1.02rem; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .mono { font-family: var(--mono); }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Brand bar */
.topbar { position: sticky; top: 0; z-index: 30; background: var(--navy); color: #fff; }
.topbar-in { display: flex; align-items: center; gap: 1rem; padding: .6rem 1.2rem; max-width: 1400px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: #fff; }
.brand img.m { height: 34px; } .brand img.w { height: 15px; }
.brand .prod { font-weight: 700; font-size: .92rem; padding-left: .7rem; border-left: 1px solid rgba(255,255,255,.25); color: #bdf3ec; white-space: nowrap; }
.topbar .sp { flex: 1; }
.shift { display: flex; align-items: center; gap: .6rem; }
.shift .st { font-family: var(--mono); font-size: .85rem; color: #bdf3ec; }
.me { font-size: .85rem; color: rgba(255,255,255,.8); }
.accent { height: 3px; background: linear-gradient(90deg, var(--teal), var(--cyan), #7fe3d6); }

.tabs { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 53px; z-index: 20; }
.tabs-in { display: flex; gap: .2rem; overflow-x: auto; padding: .35rem 1.2rem; max-width: 1400px; margin: 0 auto; scrollbar-width: none; }
.tabs a { text-decoration: none; color: var(--ink-2); font-weight: 700; font-size: .9rem; padding: .55rem .85rem; border-radius: 999px; white-space: nowrap; display: inline-flex; gap: .4rem; align-items: center; }
.tabs a:hover { background: var(--paper); }
.tabs a.on { background: var(--navy); color: #fff; }
.tabs .badge { background: var(--teal); color: var(--navy); border-radius: 999px; font-size: .72rem; padding: 0 .45rem; min-width: 1.3rem; text-align: center; }
.tabs a.on .badge { background: #fff; }

main { max-width: 1400px; margin: 0 auto; padding: 1.4rem 1.2rem 4rem; }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.page-h p { margin: .3rem 0 0; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.2rem; align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 1000px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 1.5px solid transparent; border-radius: 999px; padding: .55rem 1rem; font-weight: 700; font-size: .9rem; cursor: pointer; text-decoration: none; min-height: 40px; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s; }
.btn:active { transform: translateY(1px); }
.btn.p { background: var(--blue); color: #fff; } .btn.p:hover { background: var(--blue-ink); }
.btn.n { background: var(--navy); color: #fff; }
.btn.g { background: #fff; color: var(--ink); border-color: var(--line); } .btn.g:hover { border-color: var(--blue); }
.btn.t { background: var(--teal); color: var(--navy); }
.btn.w { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.25); }
.btn.d { background: #fff; color: var(--red); border-color: rgba(179,38,30,.3); }
.btn.sm { min-height: 32px; padding: .3rem .7rem; font-size: .8rem; }
.btn.lg { min-height: 52px; padding: .8rem 1.4rem; font-size: 1rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 1.1rem 1.2rem; }
.card + .card { margin-top: 1rem; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: .8rem; margin-bottom: .8rem; flex-wrap: wrap; }
.empty { text-align: center; padding: 2rem 1rem; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-size: 1rem; margin-bottom: .3rem; }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: .9rem 1rem; display: grid; gap: .15rem; }
.kpi b { font-size: 1.75rem; font-weight: 900; line-height: 1.05; font-variant-numeric: tabular-nums; }
.kpi span { font-size: .8rem; color: var(--muted); font-weight: 500; }
.kpi .tag { justify-self: start; font-family: var(--mono); font-size: .65rem; text-transform: uppercase; letter-spacing: .06em; padding: .1rem .45rem; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); }
.kpi .tag.out { background: var(--blue-soft); color: var(--blue-ink); }
.kpi.hl { background: var(--navy); color: #fff; border-color: var(--navy); } .kpi.hl span { color: rgba(255,255,255,.75); } .kpi.hl .tag { background: rgba(255,255,255,.14); color: #bdf3ec; }

/* Queue items */
.q { display: grid; grid-template-columns: 1fr auto; gap: .5rem 1rem; padding: .95rem 0; border-top: 1px solid var(--line); }
.q:first-child { border-top: 0; padding-top: .2rem; }
.q-name { font-weight: 900; font-size: 1.05rem; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.q-meta { font-size: .8rem; color: var(--muted); }
.q-det { font-size: .9rem; color: var(--ink-2); margin: .25rem 0 0; }
.q-act { display: flex; gap: .4rem; align-items: flex-start; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 700px) { .q { grid-template-columns: 1fr; } .q-act { justify-content: flex-start; } }
.pill { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 700; padding: .12rem .5rem; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.pill.teal { background: var(--blue-soft); color: var(--blue-ink); } .pill.gold { background: var(--gold-soft); color: #7a5a14; }
.pill.red { background: var(--red-soft); color: var(--red); } .pill.green { background: var(--green-soft); color: var(--green); } .pill.navy { background: var(--navy); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; }
.timer { font-family: var(--mono); font-size: .85rem; color: var(--blue-ink); }

/* Tap chips (close-out sheet) */
.tap { display: flex; flex-wrap: wrap; gap: .45rem; }
.tap button { border: 1.5px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: .5rem .85rem; font-weight: 600; font-size: .86rem; cursor: pointer; min-height: 40px; }
.tap button:hover { border-color: var(--blue); }
.tap button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.tap.green button.on { background: var(--blue); border-color: var(--blue); }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: none; padding: .5rem 1rem; font-weight: 700; cursor: pointer; min-height: 40px; color: var(--ink-2); }
.seg button.on { background: var(--navy); color: #fff; }
.sheet-sec { padding: 1rem 0; border-top: 1px solid var(--line); display: grid; gap: .6rem; }
.sheet-sec:first-of-type { border-top: 0; padding-top: 0; }
.sheet-sec > label, .lbl { font-weight: 700; font-size: .85rem; color: var(--ink-2); }

/* Forms */
.f { display: grid; gap: .3rem; font-size: .85rem; font-weight: 700; color: var(--ink-2); }
.f input, .f select, .f textarea, input.in, select.in, textarea.in { font: inherit; font-size: .95rem; font-weight: 400; color: var(--ink); background: #fff; border: 1.5px solid rgba(0,44,74,.18); border-radius: 10px; padding: .55rem .7rem; min-height: 42px; width: 100%; }
.f textarea, textarea.in { min-height: 80px; resize: vertical; }
.f input:focus, .f select:focus, .f textarea:focus, .in:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21,191,178,.2); }
.fgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
.fgrid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .fgrid { grid-template-columns: 1fr; } }
.check { display: flex; gap: .5rem; align-items: center; font-weight: 600; font-size: .88rem; }
.check input { width: 1.1rem; height: 1.1rem; accent-color: var(--blue); }

/* Tables */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
th, td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; background: var(--paper); position: sticky; top: 0; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(21,191,178,.05); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.click { cursor: pointer; }

/* Bars */
.bars { display: grid; gap: .45rem; }
.bar { display: grid; grid-template-columns: minmax(120px, 210px) 1fr 3rem; gap: .6rem; align-items: center; font-size: .84rem; }
.bar .tr { height: 12px; border-radius: 999px; background: var(--paper-2); overflow: hidden; }
.bar .fi { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue), var(--teal)); }
.bar .v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.spark { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding-top: .5rem; }
.spark div { flex: 1; background: linear-gradient(180deg, var(--teal), var(--blue)); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.spark-l { display: flex; gap: 4px; font-size: .65rem; color: var(--muted); font-family: var(--mono); }
.spark-l span { flex: 1; text-align: center; overflow: hidden; }
.progress { height: 16px; border-radius: 999px; background: var(--paper-2); overflow: hidden; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--teal), var(--cyan)); }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(0,20,35,.55); z-index: 60; display: grid; place-items: center; padding: 1rem; }
.modal { background: var(--card); border-radius: 18px; width: min(760px, 100%); max-height: calc(100vh - 2rem); overflow: auto; box-shadow: 0 40px 100px -30px rgba(0,0,0,.6); }
.modal-h { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.3rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); z-index: 1; }
.modal-b { padding: 1.1rem 1.3rem; }
.modal-f { display: flex; justify-content: flex-end; gap: .6rem; padding: 1rem 1.3rem; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--card); flex-wrap: wrap; }
.x { background: none; border: 0; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--muted); padding: .2rem .5rem; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 1.4rem; transform: translateX(-50%); background: var(--navy); color: #fff; padding: .75rem 1.1rem; border-radius: 999px; font-weight: 700; font-size: .9rem; z-index: 80; box-shadow: 0 20px 40px -20px rgba(0,0,0,.6); }
.toast.err { background: var(--red); }

/* Sign in */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-l { background: var(--navy); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-l::after { content: ''; position: absolute; inset: auto 0 0 0; height: 4px; background: linear-gradient(90deg, var(--teal), var(--cyan), #7fe3d6); }
.auth-l h1 { font-size: clamp(2rem, 1.2rem + 2.4vw, 3.2rem); line-height: 1.02; margin-top: 2rem; }
.auth-l h1 span { color: var(--teal); display: block; }
.auth-l p { color: rgba(255,255,255,.78); max-width: 44ch; }
.auth-r { display: grid; place-items: center; padding: 2rem; }
.auth-box { width: min(420px, 100%); display: grid; gap: 1rem; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-l { padding: 2rem; } }

/* QR */
.qr { display: grid; justify-items: center; gap: .6rem; text-align: center; }
.qr svg { width: 260px; height: 260px; background: #fff; padding: 10px; border-radius: 14px; border: 1px solid var(--line); }
.qr.big svg { width: min(420px, 80vw); height: min(420px, 80vw); }
.qr .url { font-family: var(--mono); font-size: .78rem; color: var(--muted); word-break: break-all; }

/* Kiosk and resident screens */
.kiosk { min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); }
.kiosk-top { background: var(--navy); color: #fff; padding: 1rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.kiosk-top .brand img.m { height: 40px; } .kiosk-top .brand img.w { height: 17px; }
.kiosk-main { flex: 1; width: min(860px, 100%); margin: 0 auto; padding: 2rem 1.25rem 3rem; display: grid; gap: 1.4rem; align-content: start; }
.kiosk h1 { font-size: clamp(1.8rem, 1.2rem + 2vw, 2.6rem); line-height: 1.08; }
.kiosk h1 span { color: var(--blue); }
.kiosk .lead { font-size: 1.12rem; color: var(--ink-2); margin: 0; }
.big-tap { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .7rem; }
.big-tap button { text-align: left; border: 2px solid var(--line); background: #fff; border-radius: 16px; padding: 1rem 1.1rem; font-weight: 700; font-size: 1.02rem; color: var(--ink); cursor: pointer; min-height: 72px; display: grid; gap: .15rem; }
.big-tap button span { font-weight: 500; font-size: .82rem; color: var(--muted); }
.big-tap button.on { border-color: var(--navy); background: var(--navy); color: #fff; }
.big-tap button.on span { color: rgba(255,255,255,.75); }
.scale5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; }
.scale5 button { min-height: 64px; border-radius: 14px; border: 2px solid var(--line); background: #fff; font-size: 1.4rem; font-weight: 900; color: var(--ink); cursor: pointer; }
.scale5 button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.scale-ends { display: flex; justify-content: space-between; font-size: .85rem; color: var(--muted); }
.kiosk .f input, .kiosk .f select { min-height: 54px; font-size: 1.1rem; border-radius: 12px; }
.kiosk .f { font-size: .95rem; }
.kiosk-done { text-align: center; display: grid; gap: 1rem; justify-items: center; padding-top: 2rem; }
.kiosk-done .ic { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue-ink); font-size: 2.6rem; font-weight: 900; }
.code-big { font-family: var(--mono); font-size: clamp(2rem, 1.4rem + 3vw, 3.2rem); letter-spacing: .08em; padding: .5rem 1.2rem; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
.kiosk-foot { text-align: center; font-size: .8rem; color: var(--muted); padding: 1rem; }
.err { padding: .75rem 1rem; border-radius: 12px; background: var(--red-soft); color: var(--red); font-weight: 600; font-size: .92rem; }

@media print {
  .topbar, .tabs, .no-print { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; }
}
.kloc { color: #bdf3ec; text-align: right; }
@media (max-width: 640px) {
  .kloc { display: none; }
  .brand img.w { display: none; }
  .brand .prod { border-left: 0; padding-left: 0; }
  .topbar .me { display: none; }
  .topbar-in { padding: .55rem .8rem; gap: .5rem; }
}
