/* One stylesheet for the whole app. Mobile first. Brand colors come from
   --brand and --accent, injected by the server from config. */

:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --ink: #1c1f1e;
  --ink-2: #545a58;
  --ink-3: #8a908d;
  --line: #e3e1da;
  --ok: #1d7a46;
  --warn: #a35f00;
  --bad: #b3261e;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 24, 22, .06), 0 4px 16px rgba(20, 24, 22, .05);
  --brand-soft: color-mix(in srgb, var(--brand) 9%, white);
  --brand-line: color-mix(in srgb, var(--brand) 35%, white);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
}
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.01em; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
p { margin: 0 0 .75rem; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.hidden { display: none !important; }

/* ---- Demo banner ------------------------------------------------------ */
.demo-banner {
  position: sticky; top: 0; z-index: 50;
  background: repeating-linear-gradient(-45deg, #ffd666, #ffd666 12px, #ffcc40 12px, #ffcc40 24px);
  color: #3d2b00;
  text-align: center;
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .04em;
  padding: .35rem .75rem;
  text-transform: uppercase;
}

/* ---- Header ------------------------------------------------------------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: .75rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); font-weight: 700; }
.brand-logo { height: 28px; width: auto; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px; background: var(--brand); position: relative; flex: none;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 7px; border: 2.5px solid #fff; border-radius: 50%;
}
.topbar-actions { display: flex; gap: .5rem; align-items: center; font-size: .9rem; }

/* ---- Layout ------------------------------------------------------------- */
.page { max-width: 560px; margin: 0 auto; padding: 1rem 1rem 7rem; }
.page-wide { max-width: 1000px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.1rem;
}
.stack > * + * { margin-top: .75rem; }

/* ---- Stepper ----------------------------------------------------------- */
.stepper { margin: .25rem 0 1rem; }
.stepper-label { font-size: .8rem; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.stepper-bar { height: 4px; border-radius: 4px; background: var(--line); margin-top: .4rem; overflow: hidden; }
.stepper-fill { height: 100%; background: var(--brand); width: 0; transition: width .25s ease; }

/* ---- Choice cards ------------------------------------------------------- */
.choices { display: grid; gap: .6rem; }
.choice {
  display: flex; align-items: center; gap: .9rem; width: 100%;
  text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: .95rem 1rem; min-height: 64px;
  transition: border-color .15s, background .15s, transform .05s;
}
.choice:hover { border-color: var(--brand-line); }
.choice:active { transform: scale(.995); }
.choice[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); }
.choice:focus-visible, .btn:focus-visible, .slot:focus-visible, .date-chip:focus-visible, input:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px;
}
.choice-main { flex: 1; min-width: 0; }
.choice-title { font-weight: 650; display: block; }
.choice-sub { color: var(--ink-2); font-size: .875rem; display: block; margin-top: .1rem; }
.choice-price { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.choice-icon {
  flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-weight: 800; font-size: .8rem;
}

/* ---- Dates & slots ---------------------------------------------------- */
.dates { display: flex; gap: .5rem; overflow-x: auto; padding: .1rem .1rem .6rem; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.date-chip {
  flex: none; scroll-snap-align: start; cursor: pointer; font: inherit; color: inherit;
  min-width: 64px; padding: .5rem .6rem; border-radius: var(--radius-sm);
  background: var(--surface); border: 1.5px solid var(--line); text-align: center;
}
.date-chip .dow { display: block; font-size: .75rem; color: var(--ink-2); text-transform: capitalize; }
.date-chip .day { display: block; font-size: 1.15rem; font-weight: 700; }
.date-chip .mon { display: block; font-size: .72rem; color: var(--ink-3); text-transform: capitalize; }
.date-chip[aria-pressed="true"] { border-color: var(--brand); background: var(--brand); color: #fff; }
.date-chip[aria-pressed="true"] .dow, .date-chip[aria-pressed="true"] .mon { color: rgba(255,255,255,.85); }

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .5rem; }
.slot {
  font: inherit; color: inherit; cursor: pointer; padding: .55rem .4rem; border-radius: var(--radius-sm);
  background: var(--surface); border: 1.5px solid var(--line); text-align: center;
}
.slot .time { display: block; font-weight: 700; font-variant-numeric: tabular-nums; }
.slot .left { display: block; font-size: .72rem; color: var(--ok); }
.slot.low .left { color: var(--warn); }
.slot[disabled] { cursor: not-allowed; background: #f0efea; color: var(--ink-3); border-style: dashed; }
.slot[disabled] .left { color: var(--ink-3); }
.slot[aria-pressed="true"] { border-color: var(--brand); background: var(--brand); color: #fff; }
.slot[aria-pressed="true"] .left { color: rgba(255,255,255,.9); }
.live { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; color: var(--ink-2); }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .3 } }

/* ---- Forms ------------------------------------------------------------- */
.field { display: block; }
.field + .field { margin-top: .9rem; }
.field-label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .3rem; }
.field-help { display: block; font-size: .8rem; color: var(--ink-3); margin-top: .25rem; }
.field-error { display: block; font-size: .82rem; color: var(--bad); margin-top: .25rem; }
input[type=text], input[type=search], input[type=tel], input[type=email], input[type=password], input[type=date], select {
  width: 100%; font: inherit; font-size: 1rem; padding: .75rem .85rem; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
}
input[aria-invalid="true"] { border-color: var(--bad); }
input.upper { text-transform: uppercase; }

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 650; cursor: pointer; text-decoration: none;
  padding: .85rem 1.2rem; border-radius: 12px; border: 1.5px solid transparent; min-height: 50px;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 88%, black); }
.btn-primary[disabled] { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line); }
.btn-link { background: none; border: 0; color: var(--brand); padding: .4rem 0; min-height: 0; font-weight: 600; cursor: pointer; font: inherit; }
.btn-block { width: 100%; }
.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
}
.actionbar-inner { max-width: 560px; margin: 0 auto; display: flex; gap: .6rem; }
.actionbar-inner .btn-primary { flex: 1; }

/* ---- Summary ----------------------------------------------------------- */
.summary dl { display: grid; grid-template-columns: auto 1fr; gap: .45rem 1rem; margin: 0; }
.summary dt { color: var(--ink-2); font-size: .92rem; }
.summary dd { margin: 0; text-align: right; font-weight: 600; }
.summary hr { border: 0; border-top: 1px dashed var(--line); margin: .9rem 0; }
.amount { font-variant-numeric: tabular-nums; white-space: nowrap; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.15rem; font-weight: 800; }
.methods { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.method {
  font: inherit; cursor: pointer; padding: .9rem .5rem; border-radius: var(--radius); background: var(--surface);
  border: 2px solid var(--line); font-weight: 700; display: flex; flex-direction: column; align-items: center; gap: .35rem;
}
.method .dot { width: 34px; height: 34px; border-radius: 50%; }
.method-wave .dot { background: #1dc3ff; }
.method-orange_money .dot { background: #ff7900; }
.method[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); }

/* ---- Notices ----------------------------------------------------------- */
.notice { padding: .75rem .9rem; border-radius: var(--radius-sm); background: var(--brand-soft); color: var(--ink); font-size: .92rem; }
.notice-warn { background: #fff4e0; color: #5c3700; }
.notice-bad { background: #fdecea; color: #6b140f; }
.notice-ok { background: #e6f4ec; color: #0f4527; }

/* ---- Status / confirmation -------------------------------------------- */
.status-page { text-align: center; padding-top: 2rem; }
.spinner {
  width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 1.25rem;
  border: 5px solid var(--brand-soft); border-top-color: var(--brand); animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg) } }
.status-icon { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 1rem; display: grid; place-items: center; font-size: 2rem; color: #fff; }
.status-icon.ok { background: var(--ok); }
.status-icon.bad { background: var(--bad); }
.status-icon.warn { background: var(--warn); }
.ticket { text-align: center; }
.ticket-ref {
  font: 800 2rem/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .08em;
  margin: .35rem 0 1rem; color: var(--brand);
}
.ticket-qr { width: 210px; height: 210px; margin: 0 auto 1rem; padding: 10px; background: #fff; border-radius: 12px; border: 1px solid var(--line); }
.ticket-qr img { width: 100%; height: 100%; display: block; }
.ticket-divider { border: 0; border-top: 2px dashed var(--line); margin: 1.1rem -1.1rem; }
.badge { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--brand-soft); color: var(--brand); }
.badge-ok { background: #e6f4ec; color: var(--ok); }

/* ---- Tables (admin) -------------------------------------------------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 700; }
td.nowrap { white-space: nowrap; }
.msg-body { max-width: 52ch; }

/* ---- Simulator ------------------------------------------------------- */
.sim-wrap { max-width: 420px; margin: 2rem auto; padding: 0 1rem; }
.sim-card { background: #fff; border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); padding: 1.4rem; }
.sim-card form + form { margin-top: .6rem; }
.sim-provider { font-weight: 800; font-size: 1.1rem; margin-bottom: 1rem; display: flex; align-items: center; gap: .5rem; }
.sim-provider::before { content: ""; width: 22px; height: 22px; border-radius: 50%; background: #999; }
.sim-wave::before { background: #1dc3ff; }
.sim-orange_money::before { background: #ff7900; }
.sim-details { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; margin: 0 0 1.25rem; }
.sim-details dt { color: var(--ink-2); }
.sim-details dd { margin: 0; text-align: right; font-weight: 600; }
.sim-amount { font-size: 1.4rem; font-weight: 800 !important; }

@media (min-width: 720px) {
  h1 { font-size: 1.75rem; }
  .page { padding-top: 2rem; }
  .actionbar { position: static; background: none; border: 0; padding: 1rem 0 0; backdrop-filter: none; }
  .actionbar-inner { max-width: none; }
  .page { padding-bottom: 3rem; }
}

/* ======================================================================
   Staff screens (Milestones 2 to 4)
   ====================================================================== */
.topnav { display: flex; align-items: center; gap: .15rem; flex-wrap: wrap; justify-content: flex-end; }
.nav-link { text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .9rem; padding: .4rem .6rem; border-radius: 8px; }
.nav-link:hover { background: var(--brand-soft); color: var(--ink); }
.nav-link[aria-current="page"] { color: var(--brand); background: var(--brand-soft); }
.nav-logout { margin-left: .4rem; font-size: .9rem; }
@media (max-width: 719px) {
  .topbar { flex-wrap: wrap; gap: .4rem; }
  .topnav { width: 100%; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
}

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.page-head h1 { margin: 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.toolbar input[type=date], .toolbar select { width: auto; padding: .5rem .6rem; font-size: .9rem; }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.seg button { font: inherit; font-size: .85rem; font-weight: 600; padding: .45rem .7rem; border: 0; background: none; cursor: pointer; color: var(--ink-2); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.btn-sm { min-height: 38px; padding: .45rem .8rem; font-size: .88rem; border-radius: 10px; }
.btn-outline { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--brand-line); }
.btn-danger { background: var(--surface); border-color: #f1c7c4; color: var(--bad); }
.btn-accent { background: var(--accent); color: #2b1a00; }

.grid { display: grid; gap: 1rem; }
.grid-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
@media (min-width: 720px) { .grid-kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.grid-2 { grid-template-columns: 1fr; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-2-1 { grid-template-columns: 2fr 1fr; } }
.page-xl { max-width: 1280px; }

.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; min-width: 0; }
.kpi-label { font-size: .78rem; color: var(--ink-2); font-weight: 600; display: block; }
.kpi-value { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; display: block; margin-top: .15rem; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-sub { font-size: .76rem; color: var(--ink-3); display: block; margin-top: .1rem; }
.kpi.hero { background: var(--brand); border-color: var(--brand); color: #fff; }
.kpi.hero .kpi-label, .kpi.hero .kpi-sub { color: rgba(255,255,255,.82); }
.kpi.flash { animation: flash 1.2s ease; }
@keyframes flash { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 70%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.panel-head h2 { font-size: 1rem; margin: 0; }
.chart-box { position: relative; height: 240px; }
.chart-box.tall { height: 280px; }

/* Payment method share: one bar per method, labels in text color */
.share { display: grid; gap: .7rem; }
.share-row { display: grid; grid-template-columns: 9.5rem 1fr auto; gap: .6rem; align-items: center; font-size: .9rem; }
.share-track { height: 12px; background: #efede7; border-radius: 4px; overflow: hidden; }
.share-fill { height: 100%; border-radius: 0 4px 4px 0; min-width: 2px; transition: width .4s ease; }
.share-val { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.share-val small { font-weight: 500; color: var(--ink-3); margin-left: .35rem; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .4rem; vertical-align: 0; }

.feed { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow-y: auto; }
.feed li { display: grid; grid-template-columns: auto 1fr auto; gap: .65rem; align-items: center; padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.feed li.new { animation: slidein .5s ease; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 18%, transparent), transparent); }
@keyframes slidein { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.feed .dot { width: 10px; height: 10px; border-radius: 50%; }
.feed .meta { color: var(--ink-3); font-size: .78rem; display: block; }
.feed .amt { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.live-pill { font-size: .75rem; font-weight: 700; color: var(--ok); display: inline-flex; align-items: center; gap: .35rem; }
.live-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.6s infinite; }
.live-pill.off { color: var(--warn); }

.fin dl { display: grid; grid-template-columns: 1fr auto; gap: .45rem 1rem; margin: 0; font-size: .92rem; }
.fin dt { color: var(--ink-2); }
.fin dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.fin .sep { grid-column: 1 / -1; border-top: 1px dashed var(--line); margin: .2rem 0; }
.fin .strong dt, .fin .strong dd { color: var(--ink); font-weight: 800; }
.sim-on { background: var(--accent); color: #2b1a00; border-color: var(--accent); }

.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin: 1rem 0; overflow-x: auto; }
.tab { font: inherit; font-weight: 650; font-size: .92rem; background: none; border: 0; padding: .65rem .8rem; color: var(--ink-2); border-bottom: 2.5px solid transparent; cursor: pointer; white-space: nowrap; }
.tab[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); }

.balance-card { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; background: var(--brand); color: #fff; border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.balance-card .kpi-label { color: rgba(255,255,255,.85); }
.balance-card .big { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.balance-card .actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.balance-card .btn-outline { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.35); }

.status { display: inline-block; font-size: .74rem; font-weight: 700; padding: .18rem .55rem; border-radius: 999px; background: #eceae4; color: var(--ink-2); white-space: nowrap; }
.status-paid, .status-approved { background: #e6f0fb; color: #1d5fae; }
.status-checked_in { background: #fff1d6; color: #7a4a00; }
.status-completed { background: #e6f4ec; color: var(--ok); }
.status-contre_visite_required, .status-no_show, .status-rejected, .status-suspended { background: #fdecea; color: var(--bad); }
.status-pending { background: #fff1d6; color: #7a4a00; }
.amount-pos { color: var(--ok); }
.amount-neg { color: var(--ink); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.row-select td:first-child { width: 2.2rem; }
input[type=checkbox] { width: 1.15rem; height: 1.15rem; accent-color: var(--brand); }
textarea { width: 100%; font: inherit; font-size: .95rem; padding: .7rem .8rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); min-height: 140px; resize: vertical; }
.inline-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; }
.inline-form .field { flex: 1 1 160px; margin: 0; }
.inline-form .field + .field { margin-top: 0; }

dialog { border: 0; border-radius: 16px; padding: 1.25rem; width: min(460px, calc(100vw - 2rem)); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(20,24,22,.45); }
dialog h2 { margin-bottom: .75rem; }
.dialog-actions { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1rem; }

/* ---- Check-in ------------------------------------------------------- */
.agent-bar { position: sticky; top: 0; z-index: 30; background: var(--bg); padding: .75rem 0 .5rem; }
.agent-search { display: flex; gap: .5rem; }
.agent-search input { font-size: 1.1rem; text-transform: uppercase; }
.net { font-size: .8rem; font-weight: 700; padding: .45rem .7rem; border-radius: 10px; margin-top: .5rem; }
.net-off { background: #fff1d6; color: #5c3700; }
.net-ok { background: #e6f4ec; color: #0f4527; }
.visit-list { display: grid; gap: .6rem; }
.visit { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; }
.visit.highlight { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.visit-top { display: flex; justify-content: space-between; gap: .5rem; align-items: flex-start; }
.visit-time { font-weight: 800; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.visit-plate { font: 700 1.05rem/1.2 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .03em; }
.visit-ref { font: 600 .82rem ui-monospace, Menlo, Consolas, monospace; color: var(--ink-3); }
.visit-meta { font-size: .85rem; color: var(--ink-2); margin-top: .2rem; }
.visit-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin-top: .7rem; }
.visit-actions .btn { min-height: 46px; padding: .5rem .3rem; font-size: .85rem; }
.queued { font-size: .74rem; color: var(--warn); font-weight: 700; }
.scanner { position: relative; border-radius: var(--radius); overflow: hidden; background: #000; margin-top: .6rem; }
.scanner video { width: 100%; display: block; max-height: 320px; object-fit: cover; }
.scanner::after { content: ""; position: absolute; inset: 18% 22%; border: 3px solid rgba(255,255,255,.85); border-radius: 14px; }

@media print {
  .demo-banner, .topbar, .no-print { display: none !important; }
  body { background: #fff; }
  .card, .panel { box-shadow: none; border-color: #ccc; }
}

.grid-2-1 > .panel { display: flex; flex-direction: column; }
.grid-2-1 .chart-box.tall { flex: 1; min-height: 280px; }
.kpi.hero .kpi-value { font-size: 1.5rem; }
@media (max-width: 719px) {
  .kpi-value { white-space: normal; overflow: visible; font-size: 1.12rem; line-height: 1.2; }
  .kpi.hero .kpi-value { font-size: 1.25rem; }
  .nav-link, .nav-logout { white-space: nowrap; }
}
@media (max-width: 719px) {
  .grid-kpi .kpi.hero { grid-column: span 2; }
  .kpi-value { font-size: 1.02rem; }
}
/* iOS Safari paints button text blue by default: keep labels in the text color. */
.method, .slot, .date-chip, .choice, .tab, .btn-outline, .btn-ghost { color: var(--ink); }
.method[aria-pressed="true"] { color: var(--ink); }
