:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --text: #1c1b19;
  --muted: #6b6862;
  --border: #e3e0da;
  --accent: #e8590c;
  --accent-text: #ffffff;
  --ready: #2f9e44;
  --ready-soft: #e6f6ea;
  --danger: #c92a2a;
  --radius: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141412;
    --surface: #1f1e1b;
    --text: #f1efe9;
    --muted: #a19d94;
    --border: #34322d;
    --ready-soft: #16301d;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

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

main { max-width: 1100px; margin: 0 auto; padding: 24px 16px 48px; }

h1, h2 { margin: 0 0 12px; line-height: 1.15; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

button, .button {
  font: inherit;
  font-weight: 600;
  border: 0;
  border-radius: 10px;
  padding: 12px 18px;
  cursor: pointer;
  background: var(--accent);
  color: var(--accent-text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
button.secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
button.ready { background: var(--ready); }
button.danger { background: transparent; color: var(--danger); border: 1px solid var(--border); }
button:disabled { opacity: .5; cursor: default; }

input[type="checkbox"] { width: auto; margin: 0; accent-color: var(--accent); }
input:not([type="checkbox"]) {
  font: inherit;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  width: 100%;
}

/* --- Landing ------------------------------------------------------------- */

.hero { text-align: center; padding: 48px 0; }
.hero p { max-width: 560px; margin: 0 auto 24px; }
.steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 32px; }
.steps b { display: block; font-size: 28px; color: var(--accent); }

/* --- Staff --------------------------------------------------------------- */

.staff-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.staff-main { max-width: 1280px; }
.staff-header h1 { font-size: 26px; margin: 0; }
.header-actions { display: flex; gap: 8px; }
.lang-toggle { font-weight: 600; }
.corner-toggle { position: absolute; top: 12px; inset-inline-end: 12px; padding: 8px 14px; font-size: 14px; z-index: 1; }
body.state-ready .corner-toggle { color: #fff; border-color: rgba(255, 255, 255, .5); }
/* Arabic: system Arabic fonts are a little small at the same size. */
:root[lang="ar"] body { font-size: 17px; }

.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.tabs button { background: transparent; color: var(--text); padding: 10px 16px; }
.tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-text); }
.badge { display: inline-block; min-width: 22px; padding: 1px 6px; border-radius: 999px; font-size: 13px; background: var(--border); color: var(--text); }
.tabs button[aria-selected="true"] .badge { background: rgba(255, 255, 255, .25); color: inherit; }

.error { color: var(--danger); font-size: 14px; min-height: 1em; }
.link-button { background: transparent; color: var(--muted); font-weight: 500; text-decoration: underline; padding: 6px; }

/* Cashier screen: menu buttons on the left, the running order on the right. */
.pos { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); align-items: start; }
@media (max-width: 820px) { .pos { grid-template-columns: minmax(0, 1fr); } }
.pos-category h3 { margin: 4px 0 10px; font-size: 15px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.pos-category + .pos-category { margin-top: 20px; }
.pos-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.pos-item {
  position: relative;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 92px;
  padding: 14px;
  text-align: start;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.pos-item:active { transform: scale(.98); }
.pos-item.in-cart { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.pos-item-name { font-size: 16px; line-height: 1.25; }
.pos-item-price { font-weight: 500; color: var(--muted); }
.pos-item-qty {
  position: absolute; top: 8px; inset-inline-end: 8px; min-width: 26px; height: 26px; padding: 0 6px;
  display: grid; place-items: center; border-radius: 999px; background: var(--accent); color: var(--accent-text); font-size: 14px;
}
.empty-menu { text-align: center; padding: 32px 20px; }

.cart { display: grid; gap: 12px; position: sticky; top: 16px; }
.cart h2 { margin: 0; }
.cart-lines { display: grid; gap: 8px; }
.cart-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; }
.cart-name { overflow-wrap: anywhere; }
.cart-options, .menu-options { display: block; font-size: 13px; color: var(--muted); }
.item-options { color: var(--muted); }
.cart-price { min-width: 72px; text-align: end; font-variant-numeric: tabular-nums; }
.stepper { display: inline-flex; align-items: center; gap: 6px; }
.stepper button { width: 34px; height: 34px; padding: 0; font-size: 18px; }
.cart-qty { min-width: 20px; text-align: center; font-weight: 700; }
.cart-total { display: flex; justify-content: space-between; font-size: 22px; font-weight: 800; padding-top: 12px; border-top: 1px solid var(--border); font-variant-numeric: tabular-nums; }
button.submit { font-size: 18px; padding: 16px; }

/* QR shown to the customer after submitting. */
.qr-dialog {
  border: 0; border-radius: 20px; padding: 24px; width: min(420px, calc(100vw - 32px));
  background: var(--surface); color: var(--text); text-align: center;
}
.qr-dialog::backdrop { background: rgba(0, 0, 0, .55); }
.qr-dialog img { width: 100%; max-width: 300px; aspect-ratio: 1; background: #fff; border-radius: 12px; padding: 8px; margin: 12px 0 8px; }
.qr-dialog .big-number { font-size: 56px; font-weight: 800; line-height: 1.1; }
.qr-total { font-size: 22px; font-weight: 700; }
.qr-dialog form button { width: 100%; }
.qr-warning {
  text-align: start;
  font-size: 14px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

/* The cash drawer */
.drawer-bar {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
}
.drawer-bar #drawer-status { flex: 1; font-size: 14px; color: var(--muted); }
.drawer-open { grid-column: 1 / -1; max-width: 460px; justify-self: center; width: 100%; }
.drawer-open h2 { margin-top: 0; }
.pos.needs-drawer > .pos-menu, .pos.needs-drawer > .cart { display: none; }
.notes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 12px; margin-top: 8px; }
.note-row { display: grid; grid-template-columns: 1fr auto 72px; gap: 6px; align-items: center; font-size: 14px; color: var(--text); }
.note-row input { padding: 6px 8px; }
.drawer-dialog form { display: grid; gap: 12px; }
.drawer-dialog label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.drawer-rows { display: grid; gap: 6px; }
.drawer-row { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.drawer-row.strong { font-weight: 700; }
.drawer-row.muted { color: var(--muted); font-size: 14px; }
.drawer-difference { text-align: center; padding: 14px; border-radius: 12px; font-weight: 700; }
.drawer-difference .big { font-size: 32px; }
.drawer-difference.even { background: var(--ready-soft); color: var(--ready); }
.drawer-difference.short { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.drawer-difference.over { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.report-table .short { color: var(--danger); font-weight: 600; }
.report-table .over { color: var(--accent); font-weight: 600; }

/* Picking an item's options at the counter */
.options-dialog { border: 0; border-radius: 20px; padding: 24px; width: min(560px, calc(100vw - 32px)); background: var(--surface); color: var(--text); }
.options-dialog::backdrop { background: rgba(0, 0, 0, .55); }
.options-dialog form { display: grid; gap: 16px; }
.options-dialog h2 { margin: 0; }
#options-groups { display: grid; gap: 14px; max-height: 60vh; overflow-y: auto; }
.option-group { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.option-group legend { padding: 0; margin-bottom: 8px; font-weight: 700; }
.option-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.option-choice {
  display: grid; gap: 2px; min-height: 56px; padding: 10px 12px; text-align: start;
  background: transparent; color: var(--text); border: 2px solid var(--border); font-weight: 600;
}
.option-choice[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.option-price { font-size: 13px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Menu editor */
.menu-editor { display: grid; gap: 20px; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); align-items: start; }
@media (max-width: 820px) { .menu-editor { grid-template-columns: minmax(0, 1fr); } }
.item-form { display: grid; gap: 12px; }
.item-form label, .menu-editor > .card > label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.menu-editor > .card > label + label { margin-top: 12px; }
.form-actions button { flex: 1; }
.menu-editor hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
select { font: inherit; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); width: 100%; }
.menu-list { display: grid; gap: 16px; }
.menu-group h3 { margin: 0 0 8px; font-size: 15px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.menu-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); }
.menu-row button { padding: 8px 12px; font-size: 14px; }
.menu-row.sold-out .menu-name, .menu-row.sold-out .menu-price { color: var(--muted); text-decoration: line-through; }
.menu-price { font-variant-numeric: tabular-nums; }
.item-options-editor { display: grid; gap: 10px; }
.option-edit-title { display: grid; gap: 2px; }
.option-edit-group { border: 1px solid var(--border); border-radius: 12px; padding: 10px; margin: 0; display: grid; gap: 8px; }
.option-edit-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.option-edit-head > input { flex: 1 1 100%; font-weight: 600; }
.option-edit-head select { width: auto; flex: 1; }
.option-edit-choice { display: grid; grid-template-columns: minmax(0, 1fr) 96px auto; gap: 8px; align-items: center; }
.option-edit-group input, .option-edit-group select { padding: 8px 10px; }
.option-copy { flex: 1; width: auto; }
.toggle { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; color: var(--muted); }
@media (max-width: 560px) {
  .menu-row { grid-template-columns: minmax(0, 1fr) auto; }
  .menu-row .toggle { grid-column: 1; }
}

.columns { display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 520px) { .columns { grid-template-columns: minmax(0, 1fr); } }
.column h2 { font-size: 18px; display: flex; justify-content: space-between; }
.order-list { display: grid; gap: 10px; }
.order-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}
.order-row .num { font-size: 26px; font-weight: 800; grid-row: span 2; min-width: 56px; text-align: center; }
.order-row .items { font-weight: 600; overflow-wrap: anywhere; }
.order-row .meta { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.order-row .actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.order-row .actions button { padding: 8px 12px; font-size: 14px; }
.order-row.is-ready { border-color: var(--ready); background: var(--ready-soft); }
.empty { color: var(--muted); font-size: 14px; padding: 12px 0; }

/* --- Payment toggle and other small controls ----------------------------- */

.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.segmented button { background: transparent; color: var(--text); padding: 8px 14px; font-weight: 600; }
.segmented button[aria-checked="true"], .segmented button[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); }
.cart .segmented { display: flex; }
.cart .segmented button { flex: 1; }
.qr-print { width: 100%; margin-bottom: 10px; }
.void-dialog { border: 0; border-radius: 20px; padding: 24px; width: min(460px, calc(100vw - 32px)); background: var(--surface); color: var(--text); }
.void-dialog::backdrop { background: rgba(0, 0, 0, .55); }
.void-dialog form { display: grid; gap: 12px; }
.void-dialog h2 { margin: 0; }
.reason-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.reason-chips button { padding: 8px 12px; font-size: 14px; font-weight: 500; }
.reason-chips button[aria-pressed="true"] { border-color: var(--danger); color: var(--danger); }
button.danger-solid { background: var(--danger); color: #fff; }
.small-button { padding: 6px 10px; font-size: 13px; }
.show-more { width: 100%; margin-top: 12px; }
.cart .toggle { justify-content: center; }

/* --- People: PIN pad, who's signed in, Staff tab ------------------------------- */

.who { font-size: 14px; font-weight: 600; padding: 8px 4px; white-space: nowrap; }
.pin-lock { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; background: var(--bg); }
.pin-card { width: min(340px, 100%); display: grid; gap: 14px; text-align: center; }
.pin-card h2 { margin: 0; }
.pin-dots { font-size: 28px; letter-spacing: .4em; min-height: 40px; }
.pin-message { min-height: 1.4em; color: var(--danger); font-size: 14px; }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pin-pad button { font-size: 26px; padding: 18px 0; background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.pin-pad button.secondary { font-size: 20px; color: var(--muted); }
.pin-pad button:active { background: var(--border); }
.staff-tab #staff-body { display: grid; gap: 16px; max-width: 760px; }
.staff-card h2 { margin-top: 0; }
.role-list { margin: 0 0 12px; padding-inline-start: 20px; display: grid; gap: 4px; }
.staff-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); }
.staff-row select { width: auto; padding: 8px 10px; }
.staff-row.inactive .staff-name { color: var(--muted); text-decoration: line-through; }
.pin-change { display: grid; gap: 10px; margin-top: 12px; padding: 12px; border-radius: 12px; border: 1px dashed var(--border); }
.lock-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.inline-field { display: inline-flex; gap: 8px; align-items: center; }
.inline-field input { width: 80px; }
@media (max-width: 560px) { .staff-row { grid-template-columns: minmax(0, 1fr) auto; } }
/* Managers: the menu only to mark items sold out; reports for today only. */
#tab-menu.limited > .card:first-child, #tab-menu.limited .menu-row button { display: none; }
#tab-menu.limited { grid-template-columns: minmax(0, 1fr); }
#tab-reports.today-only #range-presets button:not([data-range="today"]),
#tab-reports.today-only .date-range, #tab-reports.today-only .export-buttons { display: none; }
#void-approval { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
#void-approval.hidden { display: none; }

/* --- Offline ------------------------------------------------------------- */

.offline-banner {
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center;
  margin: -8px 0 16px; padding: 10px 14px; border-radius: 12px; font-size: 14px; font-weight: 600;
  background: color-mix(in srgb, var(--ready) 14%, var(--surface)); border: 1px solid var(--ready);
}
.offline-banner.is-offline { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); border-color: var(--accent); }
.offline-banner .refused { color: var(--danger); }
.qr-pending { margin-top: 8px; padding: 8px 10px; border-radius: 10px; font-size: 13px; background: color-mix(in srgb, var(--accent) 12%, transparent); }

/* --- Reports -------------------------------------------------------------- */

.reports { display: grid; gap: 16px; }
.report-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.date-range { display: inline-flex; align-items: center; gap: 6px; }
.date-range input { width: auto; padding: 8px 10px; }
.export-buttons { display: flex; gap: 8px; flex-wrap: wrap; margin-inline-start: auto; }
.export-buttons button { padding: 8px 12px; font-size: 14px; }
#report-body { display: grid; gap: 16px; }
.report-loading { font-size: 14px; }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.kpi { padding: 16px; }
.kpi-label { font-size: 14px; color: var(--muted); }
.kpi-value { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 4px; }
.kpi-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.chart-card h3, .table-card h3 { margin: 0 0 12px; font-size: 16px; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
/* Single-series bars: one hue, thin, 4px rounded tops on a baseline, 2px gaps. */
.bars { display: flex; align-items: flex-end; gap: 2px; height: 180px; margin-bottom: 24px; border-bottom: 1px solid var(--border); }
.bar-slot { position: relative; flex: 1; min-width: 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; border-radius: 4px; outline-offset: 2px; }
.bar { width: 100%; max-width: 36px; min-height: 0; background: var(--accent); border-radius: 4px 4px 0 0; }
.bar-slot:hover .bar, .bar-slot:focus .bar { opacity: .75; }
.bar-label { position: absolute; top: calc(100% + 4px); font-size: 11px; color: var(--muted); white-space: nowrap; }
.chart-tooltip {
  position: absolute; z-index: 10; pointer-events: none; white-space: pre-line;
  padding: 8px 10px; border-radius: 8px; font-size: 13px; line-height: 1.4;
  background: var(--text); color: var(--bg); box-shadow: 0 4px 16px rgba(0, 0, 0, .2);
}
.report-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
.report-stack { display: grid; gap: 16px; }
@media (max-width: 820px) { .report-grid { grid-template-columns: minmax(0, 1fr); } }
.table-scroll { overflow-x: auto; }
.report-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.report-table th { text-align: start; font-weight: 600; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--border); }
.report-table td { padding: 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.report-table tr:last-child td { border-bottom: 0; }
.report-table:not(.orders-table) td:not(:first-child), .report-table:not(.orders-table) th:not(:first-child) { text-align: end; }
.orders-table tr.voided td { color: var(--muted); }
.orders-table tr.voided td:nth-child(5) { text-decoration: line-through; }

/* --- Printed receipt (only this prints) --------------------------------------- */

.print-receipt { display: none; }
@media print {
  @page { size: 80mm auto; margin: 3mm; }
  html, body { background: #fff !important; }
  body > *:not(#print-receipt) { display: none !important; }
  .print-receipt { display: block; width: 72mm; margin: 0 auto; color: #000; font: 12px/1.35 system-ui, sans-serif; text-align: center; }
  .print-receipt .r-name { font-size: 16px; font-weight: 800; }
  .print-receipt .r-muted { color: #000; font-size: 11px; }
  .print-receipt .r-label { margin-top: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
  .print-receipt .r-number { font-size: 40px; font-weight: 800; line-height: 1.1; }
  .print-receipt .r-rule { border-top: 1px dashed #000; margin: 6px 0; }
  .print-receipt .r-line { display: flex; justify-content: space-between; gap: 8px; text-align: start; }
  .print-receipt .r-total { font-weight: 800; font-size: 14px; margin-top: 4px; }
  .print-receipt .r-qr { width: 38mm; height: 38mm; margin: 4px auto 2px; display: block; }
  .print-receipt .r-scan { font-size: 11px; }
}

/* --- Pickup screen ------------------------------------------------------- */

.pickup-main { max-width: 1100px; }
.pickup-search { font-size: 20px; padding: 14px 16px; margin-bottom: 12px; }
.pickup-tabs { margin-bottom: 14px; }
.pickup-tabs button { flex: 1; }
.pickup-columns { display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
#col-results { grid-column: 1 / -1; }
.col-title { font-size: 18px; }
.pickup-list { display: grid; gap: 12px; }
.pickup-card { display: grid; gap: 8px; padding: 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.pickup-card.is-ready { border-color: var(--ready); background: var(--ready-soft); }
.pickup-number { font-size: 44px; font-weight: 800; line-height: 1; }
.pickup-items { margin: 0; padding-inline-start: 20px; font-size: 17px; }
.pickup-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
button.big { flex: 1; font-size: 20px; padding: 16px; min-height: 60px; }
.toast {
  position: fixed; inset-inline: 16px; bottom: 16px; margin: 0 auto; max-width: 480px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 18px; border-radius: 14px; background: var(--text); color: var(--bg); box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}
.toast .link-button { color: var(--bg); font-weight: 700; }
.small { font-size: 14px; }
.code-box { padding: 12px; border-radius: 10px; border: 1px dashed var(--accent); margin-bottom: 12px; }
.code-box .code { font-size: 24px; font-weight: 800; letter-spacing: .08em; font-family: ui-monospace, Menlo, Consolas, monospace; }
/* Wide screens show both lists side by side; phones show one at a time with tabs. */
@media (min-width: 761px) { .pickup-tabs { display: none; } }
@media (max-width: 760px) {
  .pickup-columns { grid-template-columns: minmax(0, 1fr); }
  .col-title { display: none; }
  #col-results .col-title { display: block; }
  #board[data-showing="ready"] #col-preparing, #board[data-showing="preparing"] #col-ready { display: none; }
}

/* --- Customer ------------------------------------------------------------ */

.order-page { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; text-align: center; max-width: 480px; }
.order-page .label { text-transform: uppercase; letter-spacing: .12em; font-size: 13px; color: var(--muted); }
.order-page .number { font-size: clamp(72px, 28vw, 140px); font-weight: 800; line-height: 1; margin: 8px 0 16px; }
.status-pill { display: inline-block; padding: 8px 16px; border-radius: 999px; font-weight: 700; background: var(--surface); border: 1px solid var(--border); }
.order-page .message { font-size: 20px; margin: 20px 0 28px; }
.receipt { text-align: start; margin: -8px 0 28px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); display: grid; gap: 6px; font-variant-numeric: tabular-nums; }
.receipt-row { display: flex; justify-content: space-between; gap: 12px; }
.receipt-total { font-weight: 800; padding-top: 8px; margin-top: 2px; border-top: 1px solid var(--border); }
body.state-ready .receipt { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); }
.order-page .notify { display: grid; gap: 10px; }
.order-page .hint { font-size: 14px; color: var(--muted); }

body.state-ready { background: var(--ready); color: #fff; }
body.state-void .status-pill { color: var(--danger); }
body.state-void .number { color: var(--muted); text-decoration: line-through; }
body.state-ready .label, body.state-ready .hint, body.state-ready .muted { color: rgba(255, 255, 255, .85); }
body.state-ready .status-pill { background: #fff; color: var(--ready); border-color: transparent; }
body.state-ready .notify { display: none; }

.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }

/* Admin page */
.admin { display: grid; gap: 20px; }
.admin h2 { margin-top: 0; }
.admin-add { display: grid; gap: 12px; grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 1.4fr) auto; align-items: end; }
.admin-add label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
@media (max-width: 820px) { .admin-add { grid-template-columns: minmax(0, 1fr); } }
.admin-list-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.admin-list-head h2 { margin: 0; }
.admin-list-head input { max-width: 260px; }
.admin-row { display: grid; gap: 10px; padding: 14px 0; border-top: 1px solid var(--border); }
.admin-row.paused .admin-name strong { color: var(--muted); }
.admin-name { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.admin-name .muted { flex-basis: 100%; }
.paused-badge { background: var(--danger); color: #fff; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.admin-stat { display: grid; gap: 2px; font-variant-numeric: tabular-nums; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-actions button { padding: 8px 12px; font-size: 14px; }
.big-code { font-size: 26px; font-weight: 800; letter-spacing: .08em; text-align: center; font-family: ui-monospace, Menlo, Consolas, monospace; user-select: all; }
pre.code-box { font-family: ui-monospace, Menlo, Consolas, monospace; }
