:root {
  /* Three colours and neutrals. Black frames the staff app (the top bar, the text); blue is for what staff do
     (buttons, links, charts); red is the brand's accent and anything that wants attention (the stripe under
     the bar, counts of new orders). Red stays the action colour on the guests' side, where blue would read as
     a bank rather than a restaurant. */
  --topbar: #111316;
  --brand: #1d4ed8;
  --brand-ink: #ffffff;
  --brand-soft: #e8eefc;
  --accent: #d0312d;
  --accent-ink: #ffffff;
  --staff: #1d4ed8;
  --staff-deep: #1e3a8a;
  --staff-edge: #111316;
  --staff-soft: #e8eefc;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --ink: #111316;
  --muted: #5d6470;
  --line: #e3e6eb;
  --grid: #eceef2;
  --veg: #1a8a3a;
  --nonveg: #a52a1a;
  --ok: #1a7f45;
  --ok-soft: #e3f4ea;
  --ok-ink: #146b3a;
  --warn: #8a5a00;
  --warn-soft: #fff1d6;
  --danger: #b3261e;
  --danger-soft: #fde8e6;
  --chart: #1d4ed8;
  --chart-active: #1e3a8a;
  --shadow: 0 1px 2px rgba(17, 19, 22, .06), 0 2px 10px rgba(17, 19, 22, .05);
  --radius: 12px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --topbar: #15171b;
    --brand: #5b8def;
    --brand-ink: #0b0c0e;
    --brand-soft: #17223a;
    --accent: #ef5350;
    --accent-ink: #0b0c0e;
    --staff: #5b8def;
    --staff-deep: #1e3a8a;
    --staff-edge: #000000;
    --staff-soft: #17223a;
    --bg: #0b0c0e;
    --surface: #15171b;
    --surface-2: #1c1f24;
    --ink: #eef0f3;
    --muted: #9aa1ad;
    --line: #2b2f36;
    --grid: #23262c;
    --veg: #3fbf62;
    --nonveg: #ef6a55;
    --ok: #53c983;
    --ok-soft: #173325;
    --ok-ink: #53c983;
    --warn: #f2bf5e;
    --warn-soft: #3a2c10;
    --danger: #ff8a80;
    --danger-soft: #3d1a17;
    --chart: #5b8def;
    --chart-active: #9bb8f5;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}

h1, h2, h3, p { margin: 0; }
h1 { font-size: 22px; line-height: 1.2; }
h2 { font-size: 16px; line-height: 1.3; }
a { color: var(--brand); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
code { font-size: 12px; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; word-break: break-all; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--staff) 60%, transparent); outline-offset: 2px; }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.capitalize { text-transform: capitalize; }
[hidden] { display: none !important; }

/* ---------- primitives ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 0 14px; border-radius: 9px; border: 1px solid transparent;
  font-weight: 600; text-decoration: none; white-space: nowrap;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-sm { min-height: 30px; padding: 0 10px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); }
.btn-text-danger { color: var(--danger); }

.icon-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); flex: none;
}

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stack { display: flex; flex-direction: column; gap: 12px; }

.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; font-weight: 600; font-size: 13px; border: 0; padding: 0; margin: 0; }
.field em { font-style: normal; font-weight: 400; color: var(--muted); }
.field legend { padding: 0; margin-bottom: 4px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 38px; padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface-2); font-weight: 400;
}
.field textarea { resize: vertical; }
.field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.field-row .field { flex: 1 1 180px; }
.field-row .field-narrow { flex: 0 1 110px; }
.radio-row { display: flex; gap: 18px; font-weight: 400; }
.radio { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }

.form-error { color: var(--danger); font-size: 13px; }

.pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.pill-paid { background: var(--ok-soft); color: var(--ok-ink); }
.pill-unpaid { background: var(--warn-soft); color: var(--warn); }
.pill-delivered { background: var(--ok-soft); color: var(--ok-ink); }
.pill-cancelled { background: var(--danger-soft); color: var(--danger); }
.pill-muted { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }

.badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700;
}

.spinner {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--brand);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.center-screen { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.center-block { display: grid; place-items: center; padding: 64px 16px; }

.veg-mark {
  display: inline-grid; place-items: center; flex: none;
  width: 14px; height: 14px; border: 1.5px solid var(--veg); border-radius: 3px;
}
.veg-mark::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--veg); }
.veg-mark.nonveg { border-color: var(--nonveg); }
.veg-mark.nonveg::after { border-radius: 0; background: var(--nonveg); width: 8px; height: 7px; clip-path: polygon(50% 0, 100% 100%, 0 100%); }

.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 100;
  max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 10px;
  background: var(--ink); color: var(--bg); box-shadow: 0 6px 24px rgba(0, 0, 0, .25); font-weight: 500;
}
.toast-new { background: var(--ok); color: #fff; }
.toast-error { background: var(--danger); color: #fff; }

.empty { text-align: center; padding: 48px 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.notice { margin-bottom: 12px; padding: 10px 14px; border-radius: 10px; background: var(--warn-soft); color: var(--ink); }

/* position: relative keeps absolutely positioned bits (visually hidden labels) inside the scroll box,
   so a wide table scrolls on its own instead of widening the whole page on a phone */
.table-wrap { overflow-x: auto; position: relative; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table th { font-weight: 600; color: var(--muted); font-size: 12px; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- auth ---------- */

.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card {
  width: min(100%, 460px); display: flex; flex-direction: column; gap: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px 24px; box-shadow: var(--shadow);
}
.auth-card .brand { display: flex; align-items: center; gap: 10px; }
.auth-card .brand img { width: 40px; height: 35px; }
/* The name as the logo writes it: "restro" in black, "bistro" in blue, so the one long word reads as two */
.wordmark { font-weight: 800; font-size: 24px; letter-spacing: -.02em; color: var(--ink); }
.wordmark span { color: var(--brand); }
.auth-switch { text-align: center; color: var(--muted); }

/* ---------- shell ---------- */

.topbar {
  position: sticky; top: 0; z-index: 20; border-bottom: 2px solid var(--accent);
  background: var(--topbar); color: #fff;
}
.topbar .muted, .topbar .small { color: rgba(255, 255, 255, .72); }
.topbar .btn-ghost {
  background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .28); color: #fff;
}
.topbar .btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .22); }
.topbar .icon-btn { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .28); color: #fff; }
.topbar :focus-visible { outline-color: #fff; }
.topbar-inner, .tabs { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px; }
.brand-block { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-block .brand { width: 34px; height: 34px; border-radius: 8px; flex: none; }
.brand-block strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-block .muted { display: block; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.live.is-live { color: var(--ok); }
.live.is-live::before { animation: pulse 2s ease-in-out infinite; }
.live.is-polling { color: var(--warn); }
.live.is-off { color: var(--muted); }
@keyframes pulse { 50% { opacity: .35; } }

.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px;
  color: var(--muted); text-decoration: none; font-weight: 600; white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.tabs a { color: rgba(255, 255, 255, .78); }
.tabs a:hover { color: #fff; }
.tabs a.active { color: #fff; border-bottom-color: #fff; }
/* the live dot has to stay readable on the black */
.topbar .live.is-live { color: #8ff0b5; }
.topbar .live.is-polling { color: #ffd98a; }
.topbar .live.is-off { color: rgba(255, 255, 255, .6); }
.topbar .badge { background: var(--accent); color: var(--accent-ink); }

.view { max-width: 1280px; margin: 0 auto; padding: 20px 16px 48px; display: flex; flex-direction: column; gap: 16px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.page-head p { margin-top: 4px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- orders board ---------- */

.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
.column { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 10px; min-height: 160px; }
.column h2 { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 2px 4px; }
.column .count { color: var(--muted); font-weight: 600; }
.column-pending { border-top: 3px solid var(--brand); }
.column-ready { border-top: 3px solid var(--ok); }
.column-empty { padding: 20px 4px; text-align: center; }

.ticket { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); }
.ticket.is-new { animation: arrive 1.8s ease-out; }
@keyframes arrive { 0%, 40% { box-shadow: 0 0 0 3px var(--brand); } }
.ticket-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ticket-table { font-size: 17px; font-weight: 700; }
.ticket-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ticket-items li { font-size: 14px; }
.item-note { display: block; margin-left: 22px; color: var(--muted); font-size: 12px; font-style: italic; }
.ticket-note { padding: 6px 8px; border-radius: 6px; background: var(--warn-soft); font-size: 13px; }
.ticket-total { display: flex; justify-content: space-between; align-items: center; font-weight: 700; border-top: 1px dashed var(--line); padding-top: 8px; }
.ticket-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.ticket-actions .btn-primary { flex: 1 1 auto; }

.completed { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.completed .table-wrap { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }

/* ---------- occupied tables (dining sessions) ---------- */

.open-tables { display: flex; flex-direction: column; gap: 8px; }
.open-tables-empty { margin: 0; }
.section-title { font-size: 14px; display: flex; align-items: center; gap: 8px; }
.section-title .count { color: var(--muted); font-weight: 600; }
.table-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.table-card {
  display: flex; flex-direction: column; gap: 4px; padding: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.table-card header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.table-card header strong { font-size: 16px; }
.table-card.wants-bill { border-color: var(--warn); box-shadow: 0 0 0 2px var(--warn-soft); }
.table-due { margin: 4px 0; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.table-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.pill-bill { align-self: flex-start; background: var(--warn-soft); color: var(--warn); }

.ticket-items li.is-rejected { color: var(--muted); }
.ticket-items li.is-rejected .item-note { color: var(--danger); font-style: normal; }

.check-list { display: flex; flex-direction: column; gap: 6px; font-weight: 400; }
.check {
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
}
.check:has(input:checked) { border-color: var(--danger); background: var(--danger-soft); }
.data-table tfoot th { text-align: left; font-weight: 600; color: var(--ink); }
.data-table tfoot .bill-due th, .data-table tfoot .bill-due td { font-size: 15px; font-weight: 700; }

/* ---------- menu ---------- */

.menu-category-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.menu-category-head > div:first-child { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.menu-category.is-hidden { opacity: .8; border-style: dashed; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.menu-items { list-style: none; margin: 0; padding: 0; }
.menu-item {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; gap: 12px; align-items: center;
  padding: 10px 0; border-top: 1px solid var(--line);
}
.menu-item-main { display: flex; flex-direction: column; min-width: 0; }
.menu-item-main .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-item-price {
  font-weight: 600; font-variant-numeric: tabular-nums;
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
}
/* Portions left on a counted dish; "Track stock" on the rest is quiet so sixty rows don't shout */
.stock-chip {
  font: inherit; font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap; cursor: pointer;
  min-height: 28px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink);
}
.stock-chip.is-uncounted { border-style: dashed; background: transparent; color: var(--muted); font-weight: 500; }
.stock-chip.is-low { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.stock-chip.is-out { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.stock-chip:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }
.menu-item.is-off .stock-chip { text-decoration: none; }
.menu-item.is-off .menu-item-main strong, .menu-item.is-off .menu-item-price { color: var(--muted); text-decoration: line-through; }

.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; position: relative; }
.switch input { position: absolute; opacity: 0; width: 36px; height: 20px; margin: 0; cursor: pointer; }
.switch-track { width: 36px; height: 20px; border-radius: 999px; background: var(--line); position: relative; transition: background .15s; flex: none; }
.switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.switch input:checked + .switch-track { background: var(--ok); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-track { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }
.switch-label { min-width: 58px; color: var(--muted); }

/* ---------- import dishes ---------- */

/* The review needs more room than a form; with the photo beside it, most of a laptop screen */
.modal.import-modal { width: min(100% - 24px, 760px); }
.modal.import-modal.has-photo { width: min(100% - 24px, 1240px); }
.import-source, .import-review { display: flex; flex-direction: column; gap: 12px; }
.import-summary { margin: 0; font-weight: 600; }
.import-summary:empty { display: none; }
.import-progress progress { width: 100%; height: 10px; accent-color: var(--staff); }
.import-progress p { margin: 4px 0 0; }

.segmented { display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.segmented [role=tab] {
  flex: 1; min-height: 40px; border: 0; border-radius: 8px; background: transparent; color: var(--muted);
  font: inherit; font-weight: 600; cursor: pointer;
}
.segmented [role=tab][aria-selected=true] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

.import-layout { display: grid; gap: 14px; }
.has-photo .import-layout { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
.import-photo { margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.import-photo-frame {
  max-height: 64vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2);
}
.import-photo-inner { position: relative; }
.import-photo-inner img { display: block; width: 100%; height: auto; }
/* The line on the photo that the focused row was read from */
.import-mark {
  position: absolute; pointer-events: none; border: 3px solid var(--staff); border-radius: 6px;
  background: color-mix(in srgb, var(--staff) 14%, transparent); box-shadow: 0 0 0 9999px rgba(0, 0, 0, .12);
}
.import-pages { display: flex; gap: 6px; flex-wrap: wrap; }
.import-pages [aria-pressed=true] { background: var(--staff-soft); border-color: var(--staff); }

.import-rows-wrap { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.import-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.field-inline { flex-direction: row; align-items: center; gap: 8px; flex: 0 1 auto; }
.field-inline select { min-height: 36px; padding: 4px 8px; width: auto; max-width: 220px; }
.import-grid { max-height: 58vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.import-more { display: flex; gap: 8px; flex-wrap: wrap; }

/* One dish: tick, name, price, category, veg, remove — then its description and anything to check */
.ir-row {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) 100px minmax(0, 150px) 96px 34px; gap: 6px 8px;
  align-items: center; padding: 8px 10px 8px 6px; border-bottom: 1px solid var(--line); border-left: 4px solid transparent;
}
.ir-row:last-child { border-bottom: 0; }
.ir-row input:not([type=checkbox]), .ir-row select {
  width: 100%; min-height: 36px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 16px;
}
.ir-include { width: 20px; height: 20px; margin: 0; accent-color: var(--staff); }
.ir-price { display: flex; align-items: center; gap: 4px; font-weight: 600; }
.ir-desc { grid-column: 2 / -1; font-size: 14px !important; color: var(--muted) !important; }
.ir-del { width: 34px; height: 34px; }
.ir-notes { grid-column: 2 / -1; margin: 0; padding: 0; list-style: none; font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.ir-notes .is-warn { color: var(--warn); font-weight: 600; }
.ir-notes .is-warn::before { content: "⚠ "; }
.ir-notes .is-bad { color: var(--danger); font-weight: 600; }
.ir-notes .is-muted { color: var(--muted); }
.ir-row.is-flagged { border-left-color: #d99a00; background: color-mix(in srgb, var(--warn-soft) 55%, transparent); }
.ir-row.is-bad { border-left-color: var(--danger); background: var(--danger-soft); }
.ir-row.is-off > :not(.ir-include):not(.ir-del) { opacity: .5; }
.ir-veg.is-unmarked { border-style: dashed !important; border-color: #d99a00 !important; }

@media (max-width: 900px) {
  .has-photo .import-layout { grid-template-columns: 1fr; }
  .import-photo-frame { max-height: 34vh; }
}
@media (max-width: 640px) {
  .stock-chip { min-height: 40px; padding: 0 12px; } /* a thumb, not a mouse pointer */
  .ir-row { grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1fr) 34px; }
  .ir-include { grid-row: 1; grid-column: 1; }
  .ir-name { grid-row: 1; grid-column: 2 / 4; }
  .ir-del { grid-row: 1; grid-column: 4; }
  .ir-price { grid-row: 2; grid-column: 2; }
  .ir-veg { grid-row: 2; grid-column: 3 / 5; }
  .ir-cat { grid-row: 3; grid-column: 2 / 5; }
  .ir-desc, .ir-notes { grid-column: 2 / 5; }
  .import-grid { max-height: none; }
}

/* ---------- tables & QR ---------- */

.add-table { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.add-table .field { flex: 1 1 160px; }
.add-table .form-error { flex-basis: 100%; }
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.qr-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.qr-image { width: 180px; height: 180px; display: grid; place-items: center; background: #fff; border-radius: 8px; }
.qr-image img { width: 100%; height: 100%; image-rendering: pixelated; }
.qr-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.qr-print-name, .qr-print-hint, .qr-print-logo { display: none; }

/* ---------- analytics ---------- */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); }
.stat-label { color: var(--muted); font-size: 13px; }
.stat-value { font-size: 26px; font-weight: 650; line-height: 1.2; }
.stat-sub { font-size: 12px; }

.chart-card { display: flex; flex-direction: column; gap: 12px; }
.chart { position: relative; width: 100%; min-height: 240px; }
.chart svg { display: block; }
.chart .grid { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.chart .axis { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .bar { fill: var(--chart); }
.chart .hit { fill: transparent; }
.chart .col { outline: none; cursor: default; }
.chart .col.is-active .bar { fill: var(--chart-active); }
.chart .col.is-active .hit, .chart .col:focus-visible .hit { fill: color-mix(in srgb, var(--ink) 5%, transparent); }
.chart-tip {
  position: absolute; pointer-events: none; z-index: 2;
  display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
  font-size: 12px; white-space: nowrap;
}
.chart-table summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.chart-table .table-wrap { max-height: 280px; overflow-y: auto; margin-top: 8px; }
.empty-inline { padding: 16px 0; }

/* ---------- settings ---------- */

.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; align-items: start; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; }
.details dt { color: var(--muted); }
.details dd { margin: 0; min-width: 0; }

/* ---------- modal ---------- */

.modal {
  width: min(100% - 24px, 520px); max-height: calc(100vh - 32px); padding: 0; border: 0;
  border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
.modal::backdrop { background: rgba(18, 12, 9, .55); }
.modal-form { display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.modal-body { display: flex; flex-direction: column; gap: 12px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .board { grid-template-columns: 1fr; }
  .brand-block .muted { display: none; }
  .menu-item { grid-template-columns: auto minmax(0, 1fr) auto; }
  .menu-item .switch { grid-column: 2; }
  .menu-item .row-actions { grid-column: 3; justify-self: end; }
  .stat-value { font-size: 22px; }
}

/* ---------- notifications ---------- */

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.bell-wrap { position: relative; }
.bell { position: relative; display: inline-grid; place-items: center; font-size: 16px; line-height: 1; }
.bell.has-unread { border-color: var(--brand); background: var(--brand-soft); }
.bell-badge { position: absolute; top: -6px; right: -8px; min-width: 18px; height: 18px; padding: 0 5px; font-size: 11px; }

.notice-panel {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 30;
  width: min(400px, calc(100vw - 32px)); max-height: min(72vh, 580px);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .2);
}
.notice-panel:focus { outline: none; }
.notice-head, .notice-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; }
.notice-head { border-bottom: 1px solid var(--line); }
.notice-foot { border-top: 1px solid var(--line); flex-wrap: wrap; }
.notice-list { overflow-y: auto; overscroll-behavior: contain; flex: 1; }
.notice-item {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start;
  padding: 10px 12px; border-bottom: 1px solid var(--line);
}
.notice-item:last-child { border-bottom: 0; }
.notice-item.is-unread { background: var(--brand-soft); }
.notice-item.is-unread .notice-title { font-weight: 700; }
.notice-item.is-staff .notice-icon { opacity: .6; }
.notice-icon { font-size: 18px; line-height: 1.3; }
.notice-title { font-weight: 600; overflow-wrap: anywhere; }
.notice-text p + p { margin-top: 2px; }
.notice-text .muted { overflow-wrap: anywhere; }
.notice-empty { padding: 28px 16px; text-align: center; }

/* tables waiting for their bill: under the tabs on every page */
.attention { background: var(--warn-soft); border-top: 1px solid var(--line); }
/* The subscription reminder: a week before the paid-until date, and redder in the grace week after it */
.plan-due { background: var(--warn-soft); color: var(--ink); border-top: 1px solid var(--line); padding: 8px 16px; font-size: 14px; text-align: center; }
.plan-due a { color: inherit; font-weight: 600; }
.plan-due.is-late { background: var(--danger-soft); }
/* A button on the light bar keeps the light bar's colours, not the black top bar's */
.topbar .plan-due .btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); margin-left: 6px; }
.attention-inner { max-width: 1280px; margin: 0 auto; padding: 6px 16px; display: flex; flex-direction: column; gap: 4px; }
.attention-item { display: flex; justify-content: space-between; align-items: center; gap: 6px 12px; flex-wrap: wrap; }
.attention-actions { display: flex; gap: 6px; }

.section-link { margin-left: auto; font-weight: 600; }

/* ---------- table occupancy on the QR cards ---------- */

.how-tables summary { cursor: pointer; font-weight: 600; }
.how-tables ol { margin: 10px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--muted); }
.how-tables strong { color: var(--ink); }
.table-state {
  align-self: stretch; text-align: left; display: flex; flex-direction: column; gap: 4px;
  padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px dashed var(--line);
}
.state-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.state-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.state-dot.is-free { background: var(--ok); }
.state-dot.is-busy { background: var(--brand); }
.state-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.qr-card.is-occupied { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.qr-card.wants-bill { border-color: var(--warn); box-shadow: 0 0 0 2px var(--warn-soft); }

/* ---------- sessions ---------- */

.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filters .field { flex: 1 1 150px; }
.filters .field-grow { flex: 2 1 240px; }
.segmented {
  display: inline-flex; gap: 2px; margin: 0; padding: 2px; flex: none;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2);
}
.segmented label { position: relative; }
.segmented input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.segmented span { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 8px; font-weight: 600; color: var(--muted); }
.segmented input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.segmented input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 1px; }

.visit-list { display: flex; flex-direction: column; gap: 8px; }
.visit {
  display: grid; gap: 8px 16px; align-items: start; padding: 12px 14px;
  /* fixed outer tracks, so the columns line up from one row to the next */
  grid-template-columns: 110px minmax(0, 1.3fr) minmax(0, 1.1fr) minmax(0, .9fr) 250px;
  background: var(--surface); border: 1px solid var(--line); border-left-width: 3px; border-radius: var(--radius); box-shadow: var(--shadow);
}
.visit.is-open { border-left-color: var(--brand); }
.visit.wants-bill { border-color: var(--warn); }
.visit-table { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.visit-table strong { font-size: 15px; }
.visit-guests p { display: flex; flex-wrap: wrap; gap: 0 10px; }
.visit-guests p + p, .visit-time p + p, .visit-bill p + p { margin-top: 2px; }
.visit-guests .call { color: var(--muted); text-decoration: none; white-space: nowrap; }
.visit-guests .call:hover { color: var(--brand); text-decoration: underline; }
.visit-bill { font-variant-numeric: tabular-nums; }
.visit-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.visits-more { align-self: center; margin-top: 8px; }
#visits { display: flex; flex-direction: column; }
.pill-open { background: var(--brand-soft); color: var(--brand); }
mark { background: var(--warn-soft); color: inherit; border-radius: 3px; padding: 0 1px; box-shadow: inset 0 -2px 0 var(--warn); }

@media (max-width: 960px) {
  .visit { grid-template-columns: 1fr 1fr; }
  .visit-actions, .visit-progress { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 640px) {
  .live { font-size: 0; gap: 0; }
  .notice-panel { position: fixed; top: 64px; left: 16px; right: 16px; width: auto; }
  .visit { grid-template-columns: 1fr; }
  .segmented { width: 100%; }
  .segmented label { flex: 1; }
  .segmented span { justify-content: center; width: 100%; }
}

/* ---------- kitchen timers & table progress ---------- */

:root {
  --st-new: var(--brand);
  --st-accepted: #2f6fb3;
  --st-preparing: #c98a00;
  --st-ready: #1f8f8a;
  --st-served: var(--ok);
}
@media (prefers-color-scheme: dark) {
  :root { --st-accepted: #6ea8e6; --st-preparing: #f2bf5e; --st-ready: #4fc7c0; }
}

.stage {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; flex: none;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
}
.stage-slow { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.stage-late { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.late-count { margin-left: auto; padding: 1px 8px; border-radius: 999px; background: var(--danger-soft); color: var(--danger); font-size: 12px; }
.by-staff { color: var(--ink); font-weight: 600; }

.progress {
  display: flex; height: 10px; margin-top: 4px; overflow: hidden;
  border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line);
}
.seg { height: 100%; }
.seg + .seg { border-left: 2px solid var(--surface); }
.progress-legend { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12px; color: var(--muted); }
.key { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.key::before { content: ""; width: 8px; height: 8px; border-radius: 2px; }
.seg-delivered, .key-delivered::before { background: var(--st-served); }
.seg-ready, .key-ready::before { background: var(--st-ready); }
.seg-preparing, .key-preparing::before { background: var(--st-preparing); }
.seg-confirmed, .key-confirmed::before { background: var(--st-accepted); }
.seg-pending, .key-pending::before { background: var(--st-new); }
.slowest { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--muted); }
.visit-progress { grid-column: 2 / 5; display: flex; flex-direction: column; gap: 2px; }

/* ---------- orders taken by staff ---------- */

.staff-menu { max-height: 36vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 2px 10px 6px; }
.staff-cat { margin: 10px 0 2px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.staff-dish {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 8px; align-items: center;
  padding: 6px 0; border-top: 1px solid var(--line);
}
.staff-cat + .staff-dish { border-top: 0; }
.staff-dish.is-off { opacity: .6; }
.qty-stepper { display: inline-flex; align-items: center; gap: 6px; }
.qty-stepper .icon-btn { width: 30px; height: 30px; font-weight: 700; }
.qty-stepper .icon-btn:disabled { opacity: .4; cursor: not-allowed; }
.qty-stepper output { min-width: 18px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.staff-total { font-weight: 700; }
.check-inline { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; cursor: pointer; }
.check-inline input, .field .check-inline input {
  width: auto; min-height: 0; margin: 3px 0 0; padding: 0; accent-color: var(--brand); flex: none;
}
.check-inline em { font-style: normal; }

/* ---------- bills on WhatsApp / SMS ---------- */

.send-bill { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px dashed var(--line); }
.send-bill h3 { font-size: 14px; }
.send-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.send-actions a[aria-disabled="true"] { opacity: .55; }
.send-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.send-log:empty { display: none; }
.send-log li { display: flex; justify-content: space-between; gap: 8px; }

/* ---------- settings ---------- */

.targets-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.input-suffix { display: flex; align-items: center; gap: 6px; }
.input-suffix input { flex: 1; min-width: 0; }
.input-suffix span { color: var(--muted); font-weight: 400; }
fieldset:disabled { opacity: .6; }
.speed-slow { color: var(--warn); }
.speed-late { color: var(--danger); }

/* ---------- print: QR cards only ---------- */

@media print {
  :root { color-scheme: light; --surface: #fff; --ink: #000; --line: #ccc; }
  body { background: #fff; }
  .topbar, .page-head, .add-table, .notice, .qr-actions, .toast,
  .how-tables, .table-state, .open-tables { display: none !important; }
  .qr-card.is-occupied, .qr-card.wants-bill { border-color: #999; box-shadow: none; }
  .view { padding: 0; max-width: none; }
  .qr-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .qr-card { box-shadow: none; border: 1.5px dashed #999; break-inside: avoid; padding: 20px; }
  .qr-image { width: 220px; height: 220px; }
  .qr-print-name { display: block; font-size: 18px; font-weight: 700; }
  .qr-print-logo { display: block; margin: 0 auto 4px; max-width: 120px; max-height: 56px; object-fit: contain; }
  .qr-print-hint { display: block; font-size: 13px; }
  .qr-card h2 { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.ticket-meta .call { color: inherit; text-decoration: none; white-space: nowrap; }
.ticket-meta .call:hover { color: var(--brand); text-decoration: underline; }

/* ---------- GST, invoices, guests, feedback ---------- */

.visit-badge {
  display: inline-block; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--brand-soft, var(--surface-2)); color: var(--brand); border: 1px solid var(--line); white-space: nowrap;
}
.menu-item-main .pairs { display: block; }
.pairs-field .field-row .field { flex: 1 1 150px; }
.invoice-box { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.invoice-box h3 { font-size: 15px; margin: 0; }
.invoice-list { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 6px; }
.invoice-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; }
.gst-filters .field { flex: 0 1 170px; }
.rating-dist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-width: 420px; }
.rating-dist li { display: grid; grid-template-columns: 36px 1fr 32px; gap: 8px; align-items: center; font-size: 13px; }
.rating-bar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.rating-bar i { display: block; height: 100%; background: #e3a008; }
.feedback-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.feedback-list li { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.feedback-list li.is-low { border-left: 3px solid var(--danger); }
.stars-small { color: #e3a008; letter-spacing: .08em; }
.guest-table td { white-space: nowrap; }
.guest-table td:first-child { white-space: normal; }

/* ---------- logo ---------- */
.brand-logo { display: block; width: 36px; height: 36px; object-fit: contain; border-radius: 8px; }
.logo-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.logo-preview { width: 120px; height: 80px; display: grid; place-items: center; border: 1px dashed var(--line);
  border-radius: 10px; background: var(--surface-2); overflow: hidden; }
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.btn-file { position: relative; cursor: pointer; }
.btn-file:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- analytics ---------- */
.seg-group { display: flex; gap: 6px; flex-wrap: wrap; }
.seg-group .is-on { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.highlight-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.highlight { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border-left: 3px solid var(--line); }
.highlight.is-warn { border-left-color: var(--danger); }
.highlight.is-good { border-left-color: var(--ok); }
.highlight.is-info { border-left-color: var(--brand); }
@media (max-width: 560px) { .highlight { grid-template-columns: auto minmax(0, 1fr); } .highlight .btn { grid-column: 2; justify-self: start; } }
.trend { font-size: 13px; font-weight: 600; white-space: nowrap; }
.trend.good { color: var(--ok); }
.trend.bad { color: var(--danger); }
.trend.flat { color: var(--muted); font-weight: 400; }
.split-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.split-row h3 { font-size: 15px; margin: 0 0 6px; }
.mix-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--surface-2); margin-bottom: 6px; }
.mix-bar i { display: block; height: 100%; }
.mix-online { background: var(--ok); }
.mix-counter { background: var(--brand); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: middle; }
.losses ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 2px; }
.heatmap { border-collapse: separate; border-spacing: 3px; font-size: 12px; }
.heatmap th { font-weight: 500; color: var(--muted); padding: 0 4px; text-align: center; }
.heatmap tbody th { text-align: left; }
.heatmap td { min-width: 30px; height: 28px; text-align: center; border-radius: 5px; font-variant-numeric: tabular-nums;
  background: color-mix(in srgb, var(--brand) var(--heat, 0%), var(--surface-2)); color: var(--ink); }
.heatmap td.heat-none { background: var(--surface-2); }
.menu-perf td .pill { margin-left: 6px; }
.menu-perf tr.is-unsold td { color: var(--muted); }
.pair-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pair-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- accounts ---------- */
.role-staff .admin-only { display: none !important; }
.signin-mode { margin: 4px 0 8px; }
.user-chip { display: inline-flex; gap: 6px; align-items: center; max-width: 180px; }
.user-chip span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) { .user-chip span:last-child { display: none; } }
.form-ok { color: var(--ok); font-size: 14px; margin: 0; }
.copy-row { display: flex; gap: 8px; align-items: stretch; }
.copy-row input { flex: 1; min-width: 0; }
.team-table tr.is-off td { color: var(--muted); }
.team-table .row-actions { white-space: nowrap; }

/* ---------------------------------------------------------------- the dashboard on a phone
   Staff work standing up, one-handed: 40px targets everywhere, 16px fields so iOS doesn't
   zoom in when they tap one, and inline links that are still easy to hit. */
@media (max-width: 640px) {
  .field input, .field select, .field textarea { min-height: 44px; font-size: 16px; }
  .btn { min-height: 40px; }
  .btn-sm { min-height: 40px; padding: 0 12px; }
  .icon-btn, .qty-stepper .icon-btn { width: 40px; height: 40px; }
  .tabs a { min-height: 40px; }
  summary { min-height: 24px; }
  .section-link, .call { display: inline-flex; align-items: center; min-height: 24px; }
  .switch { min-height: 40px; }
  .switch input { inset: 0; width: auto; height: auto; }
}

/* ---------------------------------------------------------------- the table code
   A guest asks "what's the code?" and a waiter reads it off this card, so it is the biggest
   thing on an occupied table: tabular digits, spaced, nothing else competing with it. */
.table-code {
  display: flex; align-items: baseline; gap: 10px; margin: 6px 0 2px;
  padding: 8px 12px; border-radius: 10px;
  background: var(--staff-soft); border: 1px solid color-mix(in srgb, var(--staff) 25%, transparent);
}
.table-code-label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.table-code-digits {
  font-size: 26px; line-height: 1.1; font-weight: 700; letter-spacing: .14em;
  font-variant-numeric: tabular-nums; color: var(--staff); margin-left: auto;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .table-code-digits { color: #a8c0ff; }
}

/* ---------- kitchen printer ---------- */

/* Shown only on a device that prints tickets (or failed to): what this page knows about printing */
.topbar .printer-pill {
  min-height: 30px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: transparent; border: 1px solid rgba(255, 255, 255, .4); color: #fff;
}
.topbar .printer-pill.is-ok { color: #8ff0b5; }
.topbar .printer-pill.is-warn { color: #ffd98a; }
.topbar .printer-pill.is-bad { background: var(--danger); border-color: var(--danger); color: #fff; }
.check.printer-auto { grid-template-columns: auto 1fr; align-items: start; }
.check.printer-auto:has(input:checked) { border-color: var(--ok); background: var(--ok-soft); }
.check.printer-auto .muted { display: block; margin-top: 2px; font-weight: 400; }
.printer-help summary { cursor: pointer; font-weight: 600; }
.printer-help ol { padding-left: 20px; margin: 8px 0 0; display: flex; flex-direction: column; gap: 8px; }
.printer-help code {
  display: inline-block; max-width: 100%; overflow-wrap: anywhere; font-size: 12px; margin: 4px 0;
  padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); user-select: all;
}
