/* RTP99 POS-next: prototype styles.
   Mock designs only. These variables are the seed of the real design tokens.
   The default look is "Ember". Other looks are in themes.css and only change variables (plus a few touches). */
@import url("themes.css");
/* Brand font: Plus Jakarta Sans (free, SIL Open Font License), weights 400-800. */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400..800&display=swap");

/* ---------- 1. Design tokens (Ember, the default) ---------- */
:root {
  /* Brand */
  --brand: #d9480f;          /* tomato orange: primary actions */
  --brand-hover: #c23d0b;
  --brand-soft: #fff0e8;     /* tinted backgrounds */
  --brand-ink: #ffffff;      /* text on brand */
  --brand-text: #8a2c06;     /* text on brand-soft */

  /* Neutrals */
  --ink: #1d1b19;            /* main text */
  --ink-2: #57524c;          /* secondary text */
  --ink-3: #8a847c;          /* hints, placeholders */
  --line: #e6e1da;           /* borders */
  --bg: #f6f3ef;             /* app background */
  --surface: #ffffff;        /* cards, panels */
  --surface-2: #faf8f5;      /* subtle fills */

  /* Dark brand panel (sign-in, sign-up) */
  --panel: #1d1b19; --panel-ink: #ffffff; --panel-muted: #c9c3bb;
  --panel-accent: var(--brand); --panel-accent-ink: var(--brand-ink);   /* buttons and logo on the dark panel */

  /* Status */
  --ok: #2b8a3e;   --ok-soft: #ebfbee;
  --warn: #e67700; --warn-soft: #fff4e6;
  --bad: #c92a2a;  --bad-soft: #fff5f5; --bad-ink: #ffffff;   /* text on a red button */
  --info: #1864ab; --info-soft: #e7f5ff;

  /* Type */
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: var(--font);
  --head-weight: 700;
  --head-tracking: -0.01em;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --fs-xs: 12px; --fs-sm: 14px; --fs-md: 16px; --fs-lg: 20px; --fs-xl: 28px; --fs-2xl: 40px;

  /* Space, shape, depth */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --r-sm: 8px; --r-md: 10px; --r-lg: 16px; --r-pill: 999px;
  --r-btn: 10px; --r-input: 10px;
  --shadow: 0 1px 2px rgb(0 0 0 / .06), 0 4px 16px rgb(0 0 0 / .06);

  /* Control sizes (owner screens; the cashier and kitchen tablets will use larger ones) */
  --btn-h: 40px; --btn-h-lg: 48px; --btn-h-sm: 32px; --input-h: 42px;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: var(--fs-md); color: var(--ink); background: #2a2724; line-height: 1.45; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { font-family: var(--font-head); font-weight: var(--head-weight); letter-spacing: var(--head-tracking); }
h1 { font-size: var(--fs-xl); line-height: 1.2; }
h2 { font-size: var(--fs-lg); }
h3 { font-size: var(--fs-md); }
.muted { color: var(--ink-2); }
.hint { color: var(--ink-3); font-size: var(--fs-sm); }
.mono { font-family: var(--mono); }

/* ---------- 3. Prototype chrome (not part of the product) ---------- */
.proto-bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap;
  padding: var(--s2) var(--s4); background: #141210; color: #eee; font: 14px/1.4 system-ui, sans-serif;
}
.proto-bar a { color: #ccc; text-decoration: none; }
.proto-bar a:hover { color: #fff; }
.proto-bar .title { font-weight: 600; color: #fff; }
.proto-bar .steps { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.proto-bar .steps a { padding: 2px 8px; border-radius: 999px; background: #2e2a26; }
.proto-bar .steps a[aria-current="page"] { background: #d9480f; color: #fff; }
.proto-note { color: #aaa; font-style: italic; }
.theme-pick { display: inline-flex; align-items: center; gap: 6px; color: #aaa; font: 13px system-ui, sans-serif; }
.theme-pick select { background: #2e2a26; color: #fff; border: 1px solid #4a443d; border-radius: 6px; padding: 3px 6px; font: inherit; }
.proto-link { display: block; text-align: center; font-size: var(--fs-xs); color: var(--ink-3); border: 1px dashed var(--line); border-radius: var(--r-sm); padding: 8px; text-decoration: none; }

.stage { padding: var(--s6) var(--s4); overflow-x: auto; }
.device {
  margin: 0 auto; background: var(--bg); color: var(--ink); border-radius: 14px; overflow: hidden;
  box-shadow: 0 0 0 10px #0d0c0b, 0 20px 60px rgb(0 0 0 / .5);
  display: flex; flex-direction: column;
}
.device.laptop { width: 1280px; height: 800px; }
.device.tablet { width: 1180px; height: 820px; border-radius: 22px; }
.device.phone  { width: 390px;  height: 844px; border-radius: 36px; }
.device.tv     { width: 1280px; height: 720px; border-radius: 6px; }
.device-label { text-align: center; color: #888; font: 12px system-ui, sans-serif; margin-top: var(--s4); }

/* Embedded in the comparison page: show only the device screen */
.embed body { background: transparent; }
.embed .proto-bar, .embed .device-label { display: none; }
.embed .stage { padding: 0; overflow: hidden; }
.embed .device { box-shadow: none; border-radius: 0; zoom: 1 !important; }

/* ---------- 4. Components ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: var(--btn-h); padding: 0 var(--s4); border-radius: var(--r-btn);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: 600 var(--fs-sm)/1 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand-hover); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.lg { min-height: var(--btn-h-lg); font-size: var(--fs-md); padding: 0 var(--s5); }
.btn.sm { min-height: var(--btn-h-sm); padding: 0 var(--s3); font-size: var(--fs-sm); }
.btn.block { width: 100%; }
.btn.disabled { opacity: .45; pointer-events: none; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s5); }
.card.flat { box-shadow: none; }
.card.raised { box-shadow: var(--shadow); border-color: transparent; }

.field { display: grid; gap: 6px; }
.field label { font-size: var(--fs-sm); font-weight: 600; }
.input {
  min-height: var(--input-h); padding: 0 var(--s3); border: 1px solid var(--line); border-radius: var(--r-input);
  background: var(--surface); font-size: var(--fs-md); display: flex; align-items: center; color: var(--ink);
}
.input.placeholder { color: var(--ink-3); }
.input.focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.input .suffix { margin-left: auto; color: var(--ink-3); }
.input .prefix { margin-right: var(--s2); color: var(--ink-3); }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 600; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.badge.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.badge.brand { background: var(--brand-soft); color: var(--brand-text); border-color: transparent; }

.choice {
  display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s4); border: 1px solid var(--line);
  border-radius: var(--r-md); background: var(--surface); text-decoration: none; color: inherit;
}
.choice.selected { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.choice .dot { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); margin-top: 2px; }
.choice.selected .dot { border-color: var(--brand); background: radial-gradient(var(--brand) 45%, transparent 50%); }
.choice .check { flex: none; width: 20px; height: 20px; border-radius: 5px; border: 2px solid var(--line); margin-top: 2px; }
.choice.selected .check { border-color: var(--brand); background: var(--brand); }

.toggle { display: inline-block; width: 40px; height: 24px; border-radius: var(--r-pill); background: var(--line); position: relative; flex: none; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .2); }
.toggle.on { background: var(--brand); }
.toggle.on::after { left: 19px; }

.row { display: flex; gap: var(--s3); align-items: center; }
.row.between { justify-content: space-between; }
.stack { display: grid; gap: var(--s4); }
.stack.tight { gap: var(--s2); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); }
.spacer { flex: 1; }
.divider { height: 1px; background: var(--line); margin: var(--s2) 0; }

.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th { text-align: left; color: var(--ink-3); font-weight: 600; padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); }
.table td { padding: var(--s3); border-bottom: 1px solid var(--line); }

.callout { display: block; padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--info-soft); color: var(--info); font-size: var(--fs-sm); }
.callout.brand { background: var(--brand-soft); color: var(--brand-text); }
.callout.ok { background: var(--ok-soft); color: var(--ok); }

.logo { display: inline-flex; align-items: center; gap: var(--s2); font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.logo .mark { width: 28px; height: 28px; border-radius: var(--r-sm); background: var(--brand); display: grid; place-items: center; color: var(--brand-ink); font-size: 14px; }

.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-text); display: grid; place-items: center; font-weight: 700; font-size: var(--fs-sm); flex: none; }

/* ---------- 5. Layout: owner setup wizard ---------- */
.setup { display: grid; grid-template-columns: 280px 1fr; height: 100%; }
.setup-side { background: var(--surface); border-right: 1px solid var(--line); padding: var(--s5); display: flex; flex-direction: column; gap: var(--s6); }
.setup-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.setup-steps li a { display: flex; align-items: center; gap: var(--s3); padding: 10px var(--s3); border-radius: var(--r-sm); text-decoration: none; color: var(--ink-2); font-size: var(--fs-sm); font-weight: 600; }
.setup-steps .num { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: var(--fs-xs); flex: none; }
.setup-steps li.done .num { background: var(--ok); border-color: var(--ok); color: #fff; }
.setup-steps li.current a { background: var(--brand-soft); color: var(--ink); }
.setup-steps li.current .num { border-color: var(--brand); color: var(--brand); }
.setup-main { display: flex; flex-direction: column; min-height: 0; }
.setup-body { flex: 1; overflow: auto; padding: var(--s7) var(--s7) var(--s6); }
.setup-body .inner { max-width: 760px; display: grid; gap: var(--s5); }
.setup-foot { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s7); border-top: 1px solid var(--line); background: var(--surface); }
.progress { height: 6px; border-radius: var(--r-pill); background: var(--line); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--brand); }

/* Modal over a dimmed screen */
.scrim { position: absolute; inset: 0; background: rgb(0 0 0 / .45); display: grid; place-items: center; }
.modal { width: 560px; background: var(--surface); border-radius: var(--r-lg); box-shadow: 0 20px 60px rgb(0 0 0 / .3); display: grid; }
.modal-head { padding: var(--s5) var(--s5) 0; }
.modal-body { padding: var(--s5); display: grid; gap: var(--s4); }
.modal-foot { padding: var(--s4) var(--s5); border-top: 1px solid var(--line); display: flex; gap: var(--s3); justify-content: flex-end; }

/* ---------- 6. Layout: sign-in and system screens ---------- */
.auth { display: grid; grid-template-columns: 1fr 1fr; height: 100%; }
.auth-brand { background: var(--panel); color: var(--panel-ink); padding: 56px; display: flex; flex-direction: column; }
.auth-brand .pitch { margin: auto 0; display: grid; gap: 20px; }   /* vertically centred */
.auth-brand .pitch p { color: var(--panel-muted); font-size: var(--fs-lg); }
.auth-brand .pitch ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 12px; color: var(--panel-muted); }
.auth-brand .logo .mark { background: var(--panel-accent); color: var(--panel-accent-ink); }
.auth-brand .foot { color: var(--panel-muted); opacity: .7; font-size: var(--fs-sm); }
.auth-form { display: grid; place-items: center; padding: 56px; background: var(--surface); }
.auth-box { width: 400px; display: grid; gap: 18px; }

/* Centred single card (forgot password, errors, device pairing) */
.center-page { height: 100%; display: grid; place-items: center; padding: 40px; background: var(--bg); }
.center-card { width: 440px; display: grid; gap: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 36px; box-shadow: var(--shadow); }
.center-card.wide { width: 600px; }
.center-card.status { text-align: center; justify-items: center; }   /* icon + message screens */
.center-card.status > * { width: 100%; }
.center-card.status > .icon-circle { width: 64px; }
.center-card.status .row { justify-content: center; }
.icon-circle { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; background: var(--brand-soft); color: var(--brand); }
.icon-circle.ok { background: var(--ok-soft); color: var(--ok); }
.icon-circle.bad { background: var(--bad-soft); color: var(--bad); }
.icon-circle.muted { background: var(--surface-2); color: var(--ink-2); }
.code-boxes { display: flex; gap: 10px; justify-content: center; }
.code-boxes span { width: 48px; height: 60px; border: 2px solid var(--line); border-radius: var(--r-input); display: grid; place-items: center; font: 700 26px var(--mono); background: var(--surface); }
.center-card.wide .code-boxes span { width: 64px; height: 76px; font-size: 32px; }
.code-boxes span.filled { border-color: var(--ink-2); }
.code-boxes span.cursor { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.code-boxes .gap { width: 12px; border: 0 !important; background: none !important; }

/* Wider two-column dialog (e.g. Add item) and stacked dialogs */
.modal.wide { width: 900px; }
.modal-body.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); align-items: start; }
.modal.confirm { width: 460px; }
.modal-body.scroll { max-height: 520px; overflow: auto; }

/* Photo upload: big drop area + thumbnails */
.dropzone { display: grid; place-items: center; gap: 6px; text-align: center; padding: var(--s5); border: 2px dashed var(--line); border-radius: var(--r-lg); background: var(--surface-2); color: var(--ink-2); text-decoration: none; min-height: 132px; }
.dropzone:hover { border-color: var(--brand); background: var(--brand-soft); }
.dropzone .big { font-size: 28px; }
.dropzone strong { color: var(--ink); }
.thumbs { display: flex; gap: var(--s2); flex-wrap: wrap; }
.thumb-photo { position: relative; width: 76px; height: 76px; border-radius: var(--r-md); display: grid; place-items: center; font-size: 30px; background: linear-gradient(135deg, #f7d9b5, #e9a86a); border: 1px solid var(--line); }
.thumb-photo.alt { background: linear-gradient(135deg, #f2e6c9, #d9b46c); }
.thumb-photo .x { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: var(--surface); font-size: 11px; display: grid; place-items: center; text-decoration: none; }
.thumb-photo .cover { position: absolute; left: 4px; bottom: 4px; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: var(--r-pill); background: var(--surface); color: var(--ink); }

/* ---------- 6b. Layout: owner app (home, settings, …) ---------- */
.app { display: grid; grid-template-columns: 232px 1fr; height: 100%; }
.app-side { background: var(--surface); border-right: 1px solid var(--line); padding: var(--s5) var(--s4); display: flex; flex-direction: column; gap: var(--s5); }
.app-nav { display: grid; gap: 2px; }
.app-nav a { display: flex; align-items: center; gap: var(--s3); padding: 10px var(--s3); border-radius: var(--r-sm); text-decoration: none; color: var(--ink-2); font-size: var(--fs-sm); font-weight: 600; }
.app-nav a .i { width: 20px; text-align: center; }
.app-nav a.on { background: var(--brand-soft); color: var(--ink); }
.app-main { display: flex; flex-direction: column; min-height: 0; }
.app-top { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s6); border-bottom: 1px solid var(--line); background: var(--surface); }
.app-body { flex: 1; overflow: auto; padding: var(--s6); display: grid; gap: var(--s5); align-content: start; }

/* Numbers at a glance */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s4); }
.kpis.two { grid-template-columns: 1fr 1fr; gap: var(--s3); }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s4) var(--s5); display: grid; gap: 4px; }
.kpi .label { color: var(--ink-3); font-size: var(--fs-sm); }
.kpi .value { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -0.02em; }
.kpi.empty .value { color: var(--ink-3); }
.delta { font-size: var(--fs-xs); font-weight: 600; color: var(--ink-3); }
.delta.up { color: var(--ok); }
.delta.down { color: var(--bad); }
.delta.warn { color: var(--warn); }

/* Card with a header row, and simple list rows inside cards */
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s3); }
.list-row { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.list-row:last-child { border-bottom: 0; padding-bottom: 0; }
.tick { width: 24px; height: 24px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-size: 13px; flex: none; }
.tick.todo { background: transparent; border: 2px solid var(--line); color: transparent; }

/* Tiny bar chart (sales by hour) */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; }
.bars span { flex: 1; background: var(--brand-soft); border-radius: 4px 4px 0 0; min-height: 4px; }
.bars span.now { background: var(--brand); }
.bars span.future { background: transparent; border: 1px dashed var(--line); border-bottom: 0; }
.bars-x { display: flex; gap: 6px; font-size: 11px; color: var(--ink-3); margin-top: 6px; }
.bars-x span { flex: 1; text-align: center; }

/* Owner app on a phone */
.phone-app { display: flex; flex-direction: column; height: 100%; background: var(--bg); }
.phone-top { padding: 52px 20px 12px; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: var(--s3); }
.phone-body { flex: 1; overflow: auto; padding: var(--s4); display: grid; gap: var(--s4); align-content: start; }
.phone-body .kpi { padding: var(--s3) var(--s4); }
.phone-body .kpi .value { font-size: var(--fs-lg); }
.phone-body .card { padding: var(--s4); }
.tabbar { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: var(--surface); padding: 8px 0 26px; }
.tabbar a { display: grid; justify-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--ink-3); text-decoration: none; }
.tabbar a .i { font-size: 20px; }
.tabbar a.on { color: var(--brand); }

/* Settings: section list + form, inside the owner app */
.settings { display: grid; grid-template-columns: 200px 1fr; gap: var(--s6); align-items: start; }
.settings-nav { display: grid; gap: 2px; position: sticky; top: 0; }
.settings-nav a { padding: 10px var(--s3); border-radius: var(--r-sm); text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: var(--fs-sm); }
.settings-nav a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.settings-form { display: grid; gap: var(--s5); max-width: 720px; }
.save-bar { display: flex; align-items: center; gap: var(--s3); justify-content: flex-end; padding: var(--s3) var(--s6); border-top: 1px solid var(--line); background: var(--surface); }
.btn.danger { color: var(--bad); border-color: var(--bad-soft); }

/* ---------- 6c. Layout: register (cashier tablet) ---------- */
.reg { display: flex; flex-direction: column; height: 100%; position: relative; }
.reg-top { display: flex; align-items: center; gap: var(--s3); padding: 10px var(--s5); background: var(--surface); border-bottom: 1px solid var(--line); }
.reg-main { flex: 1; display: grid; grid-template-columns: 1fr 380px; min-height: 0; }
.reg-menu { display: flex; flex-direction: column; min-height: 0; padding: var(--s4) var(--s5); gap: var(--s4); }
.chips { display: flex; gap: var(--s2); flex-wrap: wrap; }
.chip { min-height: 44px; padding: 0 18px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); display: inline-flex; align-items: center; font-weight: 600; text-decoration: none; color: var(--ink-2); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3); overflow: auto; align-content: start; }
.tile { display: grid; gap: 4px; align-content: start; min-height: 112px; padding: var(--s4); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); position: relative; }
.tile .e { font-size: 30px; }
.tile .name { font-weight: 700; }
.tile .price { color: var(--ink-2); font-size: var(--fs-sm); }
.tile.sold-out { opacity: .5; }
.tile .corner { position: absolute; top: 10px; right: 10px; }
.cart { display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line); min-height: 0; }
.cart-head { padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line); display: grid; gap: var(--s3); }
.cart-lines { flex: 1; overflow: auto; padding: 0 var(--s5); }
.cart-line { display: grid; grid-template-columns: 28px 1fr auto; gap: 2px var(--s2); padding: var(--s3) 0; border-bottom: 1px solid var(--line); font-size: var(--fs-md); }
.cart-line .qty { font-weight: 700; }
.cart-line .mods { color: var(--ink-3); font-size: var(--fs-sm); grid-column: 2 / 4; }
.cart-foot { padding: var(--s4) var(--s5); border-top: 1px solid var(--line); display: grid; gap: var(--s2); }
.sum-row { display: flex; justify-content: space-between; font-size: var(--fs-sm); color: var(--ink-2); }
.sum-row.total { font-size: var(--fs-lg); color: var(--ink); font-weight: 700; }
.btn.xl { min-height: 64px; font-size: var(--fs-lg); border-radius: var(--r-lg); padding: 0 var(--s6); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 3px; }
.seg a { min-height: 40px; display: grid; place-items: center; border-radius: calc(var(--r-md) - 3px); text-decoration: none; font-weight: 600; color: var(--ink-2); font-size: var(--fs-sm); }
.seg a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* Keypad (staff PIN, cash amount) */
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); }
.key { min-height: 72px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; font-size: 26px; font-weight: 600; text-decoration: none; color: var(--ink); }
.key.muted { background: transparent; border-color: transparent; color: var(--ink-2); font-size: var(--fs-md); }
.pin-dots { display: flex; gap: 16px; justify-content: center; }
.pin-dots span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--ink-3); }
.pin-dots span.on { background: var(--ink); border-color: var(--ink); }
.big-amount { font-size: 56px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); }
.stepper a { width: 48px; height: 48px; display: grid; place-items: center; text-decoration: none; font-size: 22px; color: var(--ink); }
.stepper span { min-width: 36px; text-align: center; font-weight: 700; }
.toast { position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%); background: #1d1b19; color: #fff; padding: 12px 18px; border-radius: var(--r-md); display: flex; gap: var(--s4); align-items: center; box-shadow: 0 10px 30px rgb(0 0 0 / .25); font-weight: 600; white-space: nowrap; }
.toast a { color: #ffb38a; }

/* ---------- 6d. Layout: kitchen screen ----------
   Four lanes, left to right: New → To do → Cooking → Ready.
   Every card shows ONE big next-step button, coloured by lane: Accept (blue), Start (brand), Ready (green), Picked up (plain).
   Everything else (out of stock, swap, cancel) sits behind the ⋯ button, so the main tap is never ambiguous. */
.kds { display: flex; flex-direction: column; height: 100%; background: var(--bg); position: relative; }
.kds-top { display: flex; align-items: center; gap: var(--s3); padding: 10px var(--s4); background: #1d1b19; color: #fff; }
.kds-top .btn { background: rgb(255 255 255 / .1); border-color: transparent; color: #fff; }
.kds-top .btn .n { background: var(--bad); color: #fff; border-radius: var(--r-pill); padding: 0 7px; font-size: 12px; margin-left: 4px; }
.kds-bell { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: var(--r-pill); background: var(--info); color: #fff; font-weight: 800; font-size: var(--fs-sm); }
.kds-totals { display: flex; gap: var(--s2); align-items: center; padding: 8px var(--s4); background: var(--surface); border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; font-size: var(--fs-sm); }
.kds-totals .label { font-weight: 800; text-transform: uppercase; letter-spacing: .04em; font-size: 12px; color: var(--ink-3); margin-right: 4px; }
.kds-totals .tot { padding: 3px 10px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--line); font-weight: 600; }
.kds-totals .tot b { font-size: 15px; margin-right: 2px; }
.lanes { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr 1.2fr .85fr; gap: var(--s3); padding: var(--s3); }
.lane { min-height: 0; display: flex; flex-direction: column; gap: var(--s3); padding: var(--s2) var(--s2) var(--s3); border-radius: var(--r-lg); background: rgb(0 0 0 / .035); overflow-y: auto; }
.lane-head { white-space: nowrap; display: flex; align-items: center; gap: var(--s2); padding: 2px 6px; font-size: 13px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
.lane-head .count { min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; display: grid; place-items: center; background: var(--ink-2); color: var(--surface); font-size: 13px; letter-spacing: 0; }
.lane-head .sub { margin-left: auto; overflow: hidden; text-overflow: ellipsis; font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--ink-3); }
.lane.new .lane-head { color: var(--info); }      .lane.new .count { background: var(--info); color: #fff; }
.lane.cooking .lane-head { color: var(--brand-text); } .lane.cooking .count { background: var(--brand); color: var(--brand-ink); }
.lane.ready .lane-head { color: var(--ok); }      .lane.ready .count { background: var(--ok); color: #fff; }
.lane-empty { padding: var(--s5) var(--s3); border: 2px dashed var(--line); border-radius: var(--r-md); text-align: center; color: var(--ink-3); font-size: var(--fs-sm); }

/* A ticket card. Left stripe = how long it has waited: ok (green) → warn (amber) → late (red). */
.tk { flex: none; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--ok); border-radius: var(--r-md); box-shadow: var(--shadow); overflow: hidden; }
.tk.warn { border-left-color: var(--warn); }
.tk.late { border-left-color: var(--bad); }
.tk.fresh { box-shadow: 0 0 0 3px var(--info), var(--shadow); }           /* just arrived, not seen yet */
.tk.hold { border-left-color: var(--warn); background: repeating-linear-gradient(-45deg, var(--surface) 0 12px, var(--warn-soft) 12px 24px); }
.tk.slim .tk-items { display: none; }
.tk-head { display: flex; align-items: baseline; gap: var(--s2); padding: 8px 12px 2px; color: inherit; text-decoration: none; }
.tk-head .num { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.tk-head .who { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.tk-head .timer { margin-left: auto; font: 700 16px var(--mono); color: var(--ok); }
.tk.warn .timer, .tk.hold .timer { color: var(--warn); }
.tk.late .timer { color: var(--bad); }
.tk-tags { display: flex; gap: 6px; flex-wrap: wrap; padding: 2px 12px 6px; }
.tk-items { display: grid; gap: 6px; padding: 4px 12px 8px; }
.tk-item { display: flex; gap: 8px; align-items: flex-start; font-size: 17px; font-weight: 700; line-height: 1.25; color: inherit; text-decoration: none; }
.tk-item .q { flex: none; min-width: 22px; }
.tk-item .box { flex: none; width: 22px; height: 22px; margin-top: 1px; border: 2px solid var(--line); border-radius: 6px; display: grid; place-items: center; font-size: 14px; color: #fff; }
.tk-item small { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.tk-item .allergy { display: block; font-size: 13px; font-weight: 800; color: var(--bad); }
.tk-item.done { color: var(--ink-3); }
.tk-item.done .name { text-decoration: line-through; }
.tk-item.done .box { background: var(--ok); border-color: var(--ok); }
.tk-item.out { color: var(--bad); }
.tk-item.out .name { text-decoration: line-through; }
.tk-item.swapped .name::after { content: "SWAPPED"; margin-left: 6px; padding: 1px 6px; border-radius: 4px; background: var(--info-soft); color: var(--info); font-size: 11px; vertical-align: 2px; }
.tk-extra { padding: 0 12px 6px; font-size: 13px; color: var(--ink-3); }
.tk-msg { margin: 0 12px 8px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--warn-soft); color: var(--warn); font-size: 13px; font-weight: 700; line-height: 1.35; }
.tk-msg.info { background: var(--info-soft); color: var(--info); }
.tk-foot { display: flex; gap: var(--s2); padding: 4px 12px 12px; margin-top: auto; }
.tk-foot .btn { flex: 1; min-height: 52px; font-size: 18px; font-weight: 800; }
.tk-foot .btn.more { flex: none; width: 52px; padding: 0; font-size: 22px; }
.tk.slim .tk-foot .btn { min-height: 44px; font-size: 16px; }
.tk.slim .tk-foot .btn.more { width: 44px; }

/* Next-step buttons, one colour per lane */
.btn.accept { background: var(--info); border-color: var(--info); color: #fff; }
.btn.start  { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.ready  { background: var(--ok); border-color: var(--ok); color: #fff; }

/* Ticket drawer (tap a ticket or ⋯): slides in from the right over the board */
.drawer-scrim { position: absolute; inset: 0; background: rgb(0 0 0 / .45); display: flex; justify-content: flex-end; }
.drawer { width: 520px; height: 100%; background: var(--surface); display: flex; flex-direction: column; box-shadow: -20px 0 60px rgb(0 0 0 / .25); }
.drawer-head { padding: var(--s5) var(--s5) var(--s3); border-bottom: 1px solid var(--line); display: grid; gap: var(--s2); }
.drawer-body { flex: 1; overflow: auto; padding: var(--s4) var(--s5); display: grid; gap: var(--s3); align-content: start; }
.drawer-foot { padding: var(--s4) var(--s5); border-top: 1px solid var(--line); display: grid; gap: var(--s3); }
.item-row { display: flex; align-items: center; gap: var(--s3); padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); }
.item-row .what { flex: 1; font-size: 20px; font-weight: 800; line-height: 1.25; }
.item-row .what small { display: block; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.item-row .what .allergy { display: block; font-size: 14px; font-weight: 800; color: var(--bad); }

.kds-done { display: flex; gap: var(--s3); align-items: center; padding: var(--s3) var(--s5); background: var(--surface); border-top: 1px solid var(--line); overflow: hidden; white-space: nowrap; }
.banner { display: flex; align-items: center; gap: var(--s3); padding: 12px var(--s5); font-weight: 700; }
.banner.bad { background: var(--bad); color: #fff; }

/* ---------- 6e. Layout: order status TV (always dark, faces customers) ---------- */
.tv { display: flex; flex-direction: column; height: 100%; background: #1d1b19; color: #fff; position: relative; }
.tv-top { display: flex; align-items: center; justify-content: space-between; padding: 24px 48px; }
.tv-cols { flex: 1; display: grid; grid-template-columns: 1fr 1.3fr; }
.tv-col { padding: 8px 48px 32px; display: flex; flex-direction: column; gap: 20px; }
.tv-col + .tv-col { border-left: 2px solid rgb(255 255 255 / .12); }
.tv-col h2 { font-size: 34px; letter-spacing: .04em; text-transform: uppercase; color: #c9c3bb; }
.tv-col.ready h2 { color: #8ce99a; }
.tv-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-content: start; }
.tv-num { padding: 18px 22px; border-radius: 16px; background: rgb(255 255 255 / .08); font-size: 40px; font-weight: 800; display: flex; gap: 14px; align-items: baseline; }
.tv-num small { font-size: 22px; font-weight: 600; opacity: .75; }
.tv-col.ready .tv-num { background: #2b8a3e; }
.tv-foot { padding: 18px 48px; font-size: 22px; color: #c9c3bb; text-align: center; }
.tv-callout { position: absolute; inset: 0; background: rgb(0 0 0 / .72); display: grid; place-items: center; }
.tv-callout .box { background: #2b8a3e; border-radius: 32px; padding: 56px 96px; text-align: center; display: grid; gap: 12px; color: #fff; }
.tv-callout .big { font-size: 120px; font-weight: 900; line-height: 1; }

/* ---------- 7. Flow map (index.html) and comparison page: prototype chrome ---------- */
.map { max-width: 1200px; margin: 0 auto; padding: var(--s6) var(--s4) var(--s7); color: #eee; font-family: system-ui, sans-serif; }
.map h1, .map h2 { color: #fff; font-family: system-ui, sans-serif; }
.map .lede { color: #bbb; margin-top: var(--s2); max-width: 760px; }
.map .logo .mark { background: #d9480f; color: #fff; }
.flow { margin-top: var(--s6); background: #1f1c1a; border: 1px solid #3a3530; border-radius: 16px; padding: var(--s5); }
.flow-head { display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; }
.flow-head .who { color: #aaa; font-size: var(--fs-sm); }
.flow-steps { display: flex; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s4); align-items: center; }
.flow-steps a, .flow-steps span.todo { display: grid; gap: 2px; padding: var(--s3) var(--s4); border-radius: 10px; background: #2e2a26; text-decoration: none; color: #fff; min-width: 140px; }
.flow-steps a:hover { background: #d9480f; }
.flow-steps small { color: #aaa; font-size: var(--fs-xs); }
.flow-steps a:hover small { color: #ffe3d6; }
.flow-steps .arrow { color: #666; }
.flow-steps span.todo { color: #777; border: 1px dashed #444; background: transparent; }
.status-pill { font-size: var(--fs-xs); padding: 2px 10px; border-radius: 999px; font-weight: 600; }
.status-pill.review { background: #3b2a12; color: #ffb366; }
.status-pill.todo { background: #2e2a26; color: #999; }
.status-pill.approved { background: #14301b; color: #8ce99a; }

/* Scale big device frames down on smaller screens so the whole screen stays visible. */
@media (max-width: 1360px) { .device.laptop, .device.tablet, .device.tv, .device.web { zoom: .8; } }
@media (max-width: 1100px) { .device.laptop, .device.tablet, .device.tv, .device.web { zoom: .62; } }
@media (max-width: 860px)  { .device.laptop, .device.tablet, .device.tv, .device.web { zoom: .5; } }
@media (max-width: 680px)  { .device.laptop, .device.tablet, .device.tv, .device.web { zoom: .3; } }

/* Prototype-only: full-screen view (toggle with the "Full screen" button or the F key).
   The screen fills the browser window instead of sitting in a device frame. */
.full-toggle { background: #2e2a26; color: #fff; border: 1px solid #4a443d; border-radius: 6px; padding: 3px 10px; font: 13px system-ui, sans-serif; cursor: pointer; }
.full-toggle:hover { background: #3a3530; }
.full-exit { display: none; }
.full .proto-bar, .full .device-label { display: none; }
.full .stage { padding: 0; overflow: visible; }
.full .device { box-shadow: none; border-radius: 0; zoom: 1 !important; }
.full .device.laptop, .full .device.tablet, .full .device.tv { width: 100vw; height: 100vh; }
.full .device.web { width: 100vw; }
.full .device.phone { height: 100vh; }
.full .full-exit {
  display: block; position: fixed; right: 12px; bottom: 12px; z-index: 9999; opacity: .35;
  background: #141210; color: #fff; border: 1px solid #4a443d; border-radius: 999px; padding: 6px 12px;
  font: 12px system-ui, sans-serif; cursor: pointer;
}
.full .full-exit:hover { opacity: 1; }

/* ---------- 8. Interactive demo (demo.js): real form controls, states, new components ---------- */
.device { position: relative; }
/* Real inputs that look exactly like the mock .input boxes */
input.input, select.input, textarea.input { width: 100%; font: inherit; font-size: var(--fs-md); color: var(--ink); outline: none; }
textarea.input { padding: 10px var(--s3); min-height: 84px; resize: vertical; line-height: 1.4; }
select.input { appearance: none; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238a847c' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 12px center; padding-right: 32px; cursor: pointer; }
input.input:focus, select.input:focus, textarea.input:focus, .input:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
input.input:disabled { background: var(--surface-2); color: var(--ink-2); }
.input input.bare { flex: 1; min-width: 0; height: 100%; min-height: calc(var(--input-h) - 2px); border: 0; outline: 0; background: none; font: inherit; color: inherit; padding: 0; }
.input.invalid, input.input.invalid, select.input.invalid { border-color: var(--bad); }
.field .err { color: var(--bad); font-size: var(--fs-xs); font-weight: 600; }
.field .err:empty { display: none; }
button.btn, button.key, button.chip, button.tile { font-family: inherit; }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.danger:hover { background: var(--bad-soft); }

/* Empty states */
.empty { display: grid; justify-items: center; text-align: center; gap: var(--s3); padding: var(--s7) var(--s5); border: 2px dashed var(--line); border-radius: var(--r-lg); color: var(--ink-2); background: var(--surface-2); }
.empty .icon { font-size: 40px; line-height: 1; }
.empty h3 { color: var(--ink); font-size: var(--fs-lg); }
.empty p { max-width: 460px; }
.empty .row { justify-content: center; flex-wrap: wrap; }
.empty.slim { padding: var(--s5); gap: var(--s2); }
.empty.slim .icon { font-size: 28px; }
.empty.slim h3 { font-size: var(--fs-md); }
/* Data switch (top bar): static screens mark parts as sample-only or empty-only */
html.data-empty [data-sample] { display: none !important; }
html:not(.data-empty) [data-empty] { display: none !important; }

/* Menu manager: categories on the left, the chosen category's items on the right (drag to reorder) */
.handle { cursor: grab; color: var(--ink-3); font-size: 14px; letter-spacing: -2px; user-select: none; }
.thumb { width: 64px; height: 48px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; font-size: 20px; overflow: hidden; color: var(--ink-3); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.dashed { border-style: dashed; }
.numtag { font-weight: 800; font-size: 13px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; text-align: center; font-variant-numeric: tabular-nums; }
.desc { color: var(--ink-3); font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photo-drop { position: relative; cursor: pointer; overflow: hidden; }
.photo-drop.has-photo { padding: 0; border-style: solid; min-height: 0; aspect-ratio: 4 / 3; }
.photo-drop img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-drop input { display: none; }

/* Register: search, photo tiles, cart controls */
.reg-search { display: flex; align-items: center; gap: var(--s2); min-height: 52px; padding: 0 var(--s4); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); cursor: text; }
.reg-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 18px; color: var(--ink); }
.reg-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.reg-search .kbd { font-size: var(--fs-xs); color: var(--ink-3); white-space: nowrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
.chips.scroll .chip { flex: none; }
button.chip { cursor: pointer; font-size: inherit; }
.reg-main { grid-template-columns: minmax(0, 1fr) 380px; }
.reg-menu > .reg-search, .reg-menu > .chips { flex: none; }
.reg-menu > .mb-body { flex: 1; min-height: 0; overflow: auto; }
.chips.scroll { scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar { display: none; }
.tile.photo { display: flex; flex-direction: column; align-items: stretch; padding: 0; gap: 0; overflow: hidden; cursor: pointer; text-align: left; font-size: inherit; min-height: 0; transition: transform .08s, box-shadow .15s; }
.tile.photo:active { transform: scale(.97); }
.tile.photo.bump { box-shadow: 0 0 0 3px var(--brand); }
.tile .ph { flex: none; height: 120px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.tile .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .noimg { font-size: 26px; font-weight: 800; color: var(--ink-3); letter-spacing: .02em; }
.tile .body { display: grid; gap: 2px; padding: 8px 12px 12px; }
.tile .name { line-height: 1.25; }
.tile .num { position: absolute; top: 8px; left: 8px; padding: 2px 8px; border-radius: var(--r-pill); background: rgb(0 0 0 / .72); color: #fff; font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; }
.tile.sold-out { cursor: not-allowed; }
.tile.sold-out .ph img { filter: grayscale(1); }
.tiles .empty { grid-column: 1 / -1; }
.cart-line { cursor: pointer; margin: 0 calc(-1 * var(--s5)); padding-left: var(--s5); padding-right: var(--s5); }
.cart-line:hover { background: var(--surface-2); }
.cart-line .mods { grid-column: 2 / 3; font-style: italic; }
.cart-line .mini { grid-column: 3 / 4; justify-self: end; display: inline-flex; gap: 6px; }
.mini button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 700 16px/1 var(--font); cursor: pointer; display: grid; place-items: center; }
.mini button:hover { border-color: var(--ink-3); }
.cart-empty { display: grid; justify-items: center; gap: var(--s2); text-align: center; color: var(--ink-3); padding: var(--s7) var(--s4); }
.cart-empty .icon { font-size: 32px; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; }
.quick button { padding: 6px 12px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface-2); font: 600 var(--fs-sm) var(--font); color: var(--ink-2); cursor: pointer; }
.quick button:hover { border-color: var(--brand); color: var(--ink); }
.stepper button { width: 48px; height: 48px; border: 0; background: none; font: 400 22px var(--font); color: var(--ink); cursor: pointer; }
.demo-toast { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; }

/* PIN */
button.key { cursor: pointer; }
button.key:active { background: var(--surface-2); }
.pin-error { color: var(--bad); font-weight: 600; font-size: var(--fs-sm); min-height: 20px; }
.pin-dots.shake { animation: shake .35s; }
.pin-dots.bad span { border-color: var(--bad); background: var(--bad); }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.choice[aria-disabled] { opacity: .6; cursor: default; }
button.choice { cursor: pointer; text-align: left; font: inherit; width: 100%; }

/* Roles */
.feat-group { display: grid; gap: var(--s2); }
.feat-group h3 { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.feat-group .choice { padding: var(--s3) var(--s4); align-items: center; }
.feat-group .choice .check { margin-top: 0; }
.role-row { display: flex; align-items: center; gap: var(--s4); padding: var(--s4) 0; border-bottom: 1px solid var(--line); }
.role-row:last-child { border-bottom: 0; padding-bottom: 0; }
.feat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.feat-chips span { font-size: var(--fs-xs); font-weight: 600; padding: 2px 8px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }

/* Payments: one row per thing, same shape every time */
.step-dot { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--surface); display: grid; place-items: center; font-weight: 800; font-size: var(--fs-sm); flex: none; }
.step-dot.done { background: var(--ok); color: #fff; }
.pay-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) 150px; gap: var(--s4); align-items: center; padding: var(--s4) 0; border-bottom: 1px solid var(--line); }
.pay-row:last-child { border-bottom: 0; padding-bottom: 0; }
.pay-row .ic { width: 48px; height: 48px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; font-size: 22px; }
.pay-row .act { justify-self: stretch; display: grid; }
.pay-row.locked .ic, .pay-row.locked strong, .pay-row.locked .hint { opacity: .5; }
.steps-line { display: flex; gap: var(--s2); justify-content: center; }
.steps-line span { width: 28px; height: 4px; border-radius: 2px; background: var(--line); }
.steps-line span.on { background: var(--brand); }
.spinner { width: 40px; height: 40px; border-radius: 50%; border: 4px solid var(--brand-soft); border-top-color: var(--brand); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Import review: every cell is editable */
.table.edit td { padding: 4px; vertical-align: middle; }
.table.edit th { padding: var(--s2) 6px; }
.cell { width: 100%; border: 1px solid transparent; border-radius: 6px; padding: 7px 8px; font: inherit; background: transparent; color: var(--ink); }
.cell:hover { border-color: var(--line); }
.cell:focus { border-color: var(--brand); outline: 0; background: var(--surface); box-shadow: 0 0 0 3px var(--brand-soft); }
.cell.bad { border-color: var(--warn); background: var(--warn-soft); }
.table.edit tr.problem td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.x-btn { width: 30px; height: 30px; border-radius: 50%; border: 0; background: none; color: var(--ink-3); cursor: pointer; font-size: 14px; }
.x-btn:hover { background: var(--bad-soft); color: var(--bad); }
.feat-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--s2); }
.choice > span { text-align: left; }
/* Dialogs never grow past the screen; long ones scroll inside */
.scrim .modal { max-width: calc(100% - 32px); max-height: calc(100% - 32px); overflow: auto; }
.photo-drop.has-photo { max-height: 260px; }
/* Page headers with buttons wrap instead of squeezing the title */
.setup-body .inner > .row.between, .app-body > .row.between { flex-wrap: wrap; }
.setup-body .inner > .row.between > .stack, .app-body > .row.between > .stack { flex: 1 1 320px; }

/* ---------- 9. Round 3 fixes ---------- */
/* Dialog columns never overflow; narrow dialogs drop to one column */
.modal { container-type: inline-size; }
.modal-body.two-col { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.modal-body.two-col > * { min-width: 0; }
.modal .field { min-width: 0; }
@container (max-width: 760px) { .modal-body.two-col { grid-template-columns: minmax(0, 1fr); } }
/* Spinner keeps its round size inside centred status cards */
.center-card.status > .spinner { width: 40px; height: 40px; }
/* One search icon everywhere */
.ic-search { width: 18px; height: 18px; flex: none; color: var(--ink-3); display: block; }
.input .ic-search { margin-right: var(--s2); }
/* Page title row inside the owner app body (the header above it is the same on every page) */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.page-head .row { flex-wrap: wrap; }
/* Staff list: the same rows in setup and in the owner app */
.person { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.2fr) 170px auto; gap: var(--s4); align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.person:last-child { border-bottom: 0; }
.person.head { padding-top: 10px; padding-bottom: 10px; font-size: var(--fs-xs); font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.person select.input { min-height: 38px; }
/* Register: your name opens a small menu (Change my PIN, Switch user) */
.me-btn { display: inline-flex; align-items: center; gap: var(--s2); padding: 4px 10px 4px 4px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); font: 600 var(--fs-sm) var(--font); color: var(--ink); cursor: pointer; }
.me-btn:hover { background: var(--surface-2); }
.me-btn .avatar { width: 30px; height: 30px; font-size: 12px; }
.me-menu { position: absolute; top: 58px; right: 16px; z-index: 40; width: 240px; padding: 8px; display: grid; gap: 2px; }
.me-menu .btn { justify-content: flex-start; }
/* Devices: one row per kind of device, connected devices listed under it */
.dev-type { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: var(--s4); align-items: center; padding: 14px 16px; border-top: 1px solid var(--line); }
.dev-type:first-child { border-top: 0; }
.dev-type .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; font-size: 20px; }
.dev-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: var(--s3); align-items: center; padding: 8px 16px 12px; }
.dev-row + .dev-row { padding-top: 0; }

/* ---------- 10. Register ↔ kitchen (round 3) ---------- */
/* Small counters on buttons and tabs */
.cnt { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-2); font-size: 12px; font-weight: 800; }
.cnt:empty { display: none; }
.cnt.hot { background: var(--bad); color: #fff; }
.seg a .cnt { margin-left: 4px; }
/* Kitchen question on the register: a slim strip, never a blocking dialog */
.ask-banner { display: flex; align-items: center; gap: var(--s3); padding: 8px var(--s5); background: var(--warn-soft); color: var(--ink); border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.ask-banner span { flex: 1; }
/* Notes on the register */
.link-btn { justify-self: start; border: 0; background: none; padding: 2px 0; font: 600 var(--fs-sm) var(--font); color: var(--brand-text); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.cart-line .mods { font-style: normal; }
.add-note { color: var(--brand-text); font-size: var(--fs-xs); font-weight: 700; opacity: .75; }
.cart-line:hover .add-note { opacity: 1; text-decoration: underline; }
.note-chip { display: inline-block; padding: 1px 8px; border-radius: var(--r-pill); background: var(--warn-soft); color: var(--ink); font-size: var(--fs-xs); font-weight: 600; }
.cart-head textarea.input { min-height: 56px; }
.quick button.on { background: var(--brand-soft); border-color: var(--brand); color: var(--ink); }
/* Orders panel (register) */
.orders-drawer { width: 560px; }
.orders-drawer .drawer-head .seg a { font-size: 13px; }
.ord-card { display: grid; gap: var(--s2); padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.ord-card.asking { border-color: var(--warn); box-shadow: 0 0 0 2px var(--warn-soft); }
.ord-card.focus { box-shadow: 0 0 0 3px var(--brand); }
.ord-lines { display: grid; gap: 4px; }
.ord-line { display: flex; gap: var(--s2); font-size: var(--fs-sm); }
.ord-line .q { font-weight: 800; min-width: 24px; }
.ord-line small, .tk-item small { display: block; color: var(--ink-3); font-size: 12px; font-weight: 600; }
.ord-card .tk-msg { margin: 0; }
.struck { text-decoration: line-through; color: var(--ink-3); }
.ask-box { display: grid; gap: var(--s3); padding: var(--s3); border-radius: var(--r-md); background: var(--warn-soft); }
.ask-item { display: grid; gap: var(--s2); padding: var(--s3); border-radius: var(--r-md); background: var(--surface); }
.chef-says { font-size: var(--fs-sm); font-style: italic; color: var(--ink-2); }
.ask-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.ask-actions .btn { min-height: 36px; }
button.toggle { border: 0; cursor: pointer; padding: 0; }

/* Kitchen: same surfaces as the register */
.kds .reg-top { flex-wrap: wrap; }
.kds .kds-bell { background: var(--info); }
.kds-totals { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.lane { background: var(--surface-2); border: 1px solid var(--line); }
.tk { border-radius: var(--r-lg); border-left-width: 6px; }
.tk-head .timer { font: 700 15px var(--font); }
.tk-item .name { font-weight: 700; }
.tk-item.gone { color: var(--ink-3); }
.tk-item.gone .name { text-decoration: line-through; }
.tk-item.out .name { color: var(--bad); }
.tk-item .was { color: var(--info); }
.tk-item[data-tick] { cursor: pointer; }
.tk-msg.ok { background: var(--ok-soft); color: var(--ok); }
.tk-foot .btn { border-radius: var(--r-btn); }
/* Out of stock, several items at once */
.oos { display: grid; gap: 0; border-radius: var(--r-md); }
.oos.on { border: 2px solid var(--bad); }
.oos.on .item-row { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.oos-panel { display: grid; gap: var(--s2); padding: 12px 14px; background: var(--bad-soft); border-radius: 0 0 var(--r-md) var(--r-md); }
.check-row { display: flex; align-items: center; gap: var(--s2); border: 0; background: none; padding: 4px 0; font: 600 var(--fs-sm) var(--font); color: var(--ink); cursor: pointer; text-align: left; }
.check-row .cb { width: 20px; height: 20px; border-radius: 5px; border: 2px solid var(--line); background: var(--surface); flex: none; }
.check-row.on .cb { background: var(--brand); border-color: var(--brand); box-shadow: inset 0 0 0 3px var(--surface); }
.item-row .what small { display: block; font-size: 14px; font-weight: 600; color: var(--ink-2); }
/* Inputs inside an .input box shrink with their column (browsers give inputs a 20-character default width) */
.input input.bare { width: 0; }
.field > .input, .field > select.input { min-width: 0; }

/* Roles: several per person; role editor grid of features × actions */
.role-cell { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; min-width: 0; }
.perm-grid { display: grid; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.perm-row { display: grid; grid-template-columns: 240px 1fr; gap: var(--s4); align-items: center; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
.perm-row:last-child { border-bottom: 0; }
.perm-acts { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); }
.check-row[disabled] { cursor: default; opacity: .8; }

/* ---------- 11. Pilot scope round (2026-10-11) ---------- */
/* Register offline: amber, because selling still works (cash only) */
.offline-banner { display: flex; align-items: center; gap: var(--s3); padding: 8px var(--s5); background: var(--warn-soft); color: var(--ink); border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.offline-banner > span { flex: 1; }
.callout.bad { background: var(--bad-soft); color: var(--bad); }
.callout.warn { background: var(--warn-soft); color: var(--ink); }
/* Hidden menu items stay in the list, greyed */
.show-row { padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
/* Tip prompt (customer-facing) */
.tip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3); }
.tip-grid .btn { display: grid; gap: 2px; place-content: center; min-height: 88px; }
.tip-grid .btn b { font-size: var(--fs-xl); }
.tip-grid .btn span { font-size: var(--fs-sm); color: var(--ink-2); }
/* Activity log */
.act-day { display: grid; gap: 0; }
.act-day > h3 { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); padding: var(--s3) 0 var(--s2); }
.act-row { display: grid; grid-template-columns: 72px 28px minmax(0, 1fr) auto; gap: var(--s3); align-items: start; padding: var(--s3) 0; border-top: 1px solid var(--line); }
.act-row .t { font: 600 var(--fs-sm) var(--mono); color: var(--ink-3); padding-top: 1px; }
.act-row .ic { font-size: 18px; line-height: 1.2; }
.act-row .what { display: grid; gap: 2px; }
.act-row .what small { color: var(--ink-3); font-size: var(--fs-xs); }
.act-row.problem .what > span:first-child { color: var(--bad); font-weight: 700; }
.problems-banner { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--bad-soft); color: var(--ink); }
.problems-banner b { color: var(--bad); }
.problems-banner > span { flex: 1; }
/* Reports */
.rep-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--s5); align-items: start; }
.money-row { display: flex; justify-content: space-between; padding: var(--s2) 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.money-row:last-child { border-bottom: 0; }
.money-row.total { font-weight: 700; font-size: var(--fs-md); }
/* Prototype-only small link button inside a screen */
.proto-mini { border: 1px dashed var(--ink-3); background: transparent; color: var(--ink-3); border-radius: var(--r-pill); padding: 2px 10px; font: 12px system-ui, sans-serif; cursor: pointer; white-space: nowrap; }
.proto-mini:hover { color: var(--ink); border-color: var(--ink); }

/* ---------- 12. Review tracker (prototype chrome, D-47) ---------- */
.rv-btn { background: #2e2a26; color: #fff; border: 1px solid #4a443d; border-radius: 999px; padding: 3px 12px; font: 600 13px system-ui, sans-serif; cursor: pointer; }
.rv-btn.done { background: #14301b; border-color: #2b8a3e; color: #8ce99a; }
.rv-btn.changes { background: #3b2a12; border-color: #e67700; color: #ffb366; }
.rv-pop { position: fixed; top: 44px; right: 12px; z-index: 10000; width: 340px; background: #1f1c1a; color: #eee; border: 1px solid #4a443d; border-radius: 12px; padding: 14px; display: grid; gap: 10px; font: 14px/1.4 system-ui, sans-serif; box-shadow: 0 12px 40px rgb(0 0 0 / .5); }
.rv-pop strong { color: #fff; }
.rv-pop .rv-row { display: flex; gap: 8px; flex-wrap: wrap; }
.rv-pop button { background: #2e2a26; color: #fff; border: 1px solid #4a443d; border-radius: 8px; padding: 6px 10px; font: 600 13px system-ui, sans-serif; cursor: pointer; }
.rv-pop button.on-done { background: #2b8a3e; border-color: #2b8a3e; }
.rv-pop button.on-changes { background: #e67700; border-color: #e67700; }
.rv-pop textarea { width: 100%; min-height: 90px; background: #141210; color: #fff; border: 1px solid #4a443d; border-radius: 8px; padding: 8px; font: 14px/1.4 system-ui, sans-serif; resize: vertical; }
.rv-pop .rv-hint { color: #aaa; font-size: 12px; }
.full .rv-pop { top: 12px; }
/* Flow map: marks, round tags, progress */
.flow-steps a { position: relative; }
.flow-steps a .rv-mark { position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.flow-steps a .rv-mark.done { background: #2b8a3e; color: #fff; }
.flow-steps a .rv-mark.changes { background: #e67700; color: #fff; }
.flow-steps a .rv-tag { justify-self: start; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 1px 6px; border-radius: 4px; }
.flow-steps a .rv-tag.new { background: #1864ab; color: #fff; }
.flow-steps a .rv-tag.changed { background: #5c3b8a; color: #fff; }
.flow-steps a.rv-dim { opacity: .35; }
.rv-progress { color: #aaa; font-size: var(--fs-xs); margin-left: auto; }
.rv-panel { margin-top: var(--s5); background: #1f1c1a; border: 1px solid #3a3530; border-radius: 16px; padding: var(--s4) var(--s5); display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; color: #ddd; }
.rv-panel .rv-count { font-weight: 700; color: #fff; }
.rv-panel button, .rv-panel select { background: #2e2a26; color: #fff; border: 1px solid #4a443d; border-radius: 8px; padding: 6px 12px; font: 600 13px system-ui, sans-serif; cursor: pointer; }
.rv-panel textarea { width: 100%; min-height: 140px; background: #141210; color: #fff; border: 1px solid #4a443d; border-radius: 8px; padding: 8px; font: 13px/1.4 ui-monospace, monospace; }

/* ----- Category picker in the item dialog (an item can be in several categories) ----- */
.chips.pick .chip { min-height: var(--btn-h-sm); padding: 0 14px; font-size: var(--fs-sm); cursor: pointer; }

/* ----- Opening hours editor ----- */
.hours { display: grid; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.hours-day { display: grid; grid-template-columns: 110px 48px minmax(0, 1fr) auto; align-items: start; gap: var(--s3); padding: var(--s3) var(--s4); border-top: 1px solid var(--line); }
.hours-day:first-child { border-top: 0; }
.hours-day > strong, .hours-day > .toggle, .hours-day > .btn { margin-top: 9px; }
.hours-day > .toggle { cursor: pointer; border: 0; padding: 0; }
.hours-day.closed > strong { color: var(--ink-3); }
.hours-ranges { display: grid; gap: var(--s2); }
.hours-range { display: flex; align-items: center; gap: var(--s2); }
.hours-range select.input { width: 128px; height: 38px; }
.hours-closed { padding-top: 10px; }

/* ----- Address search with a map pin ----- */
.addr-suggest { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.addr-suggest button { display: flex; gap: var(--s2); width: 100%; padding: 10px 12px; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.addr-suggest button:first-child { border-top: 0; }
.addr-suggest button:hover { background: var(--surface-2); }
.map-pick { position: relative; height: 200px; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; cursor: crosshair; touch-action: none; user-select: none; }
.map-pick svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-pick .m-land { fill: var(--surface-2); }
.map-pick .m-park { fill: var(--ok-soft); }
.map-pick .m-water { fill: var(--info-soft); }
.map-pick .m-street path { stroke: var(--line); stroke-width: 1.4; fill: none; }
.map-pick .m-main { stroke: var(--surface); stroke-width: 3; fill: none; }
.map-pin { position: absolute; width: 28px; height: 28px; margin: -28px 0 0 -14px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--brand); box-shadow: var(--shadow); cursor: grab; transition: margin .12s; }
.map-pin::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--brand-ink); }
.map-pin.lifted { margin-top: -36px; cursor: grabbing; }
.map-tip { position: absolute; left: var(--s2); bottom: var(--s2); padding: 4px 10px; border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--shadow); font-size: var(--fs-xs); color: var(--ink-2); pointer-events: none; }

/* ----- Item dialog: one column, photo as a compact row ----- */
.modal.item { width: 640px; }
.modal.item .photo-row { display: flex; align-items: center; gap: var(--s3); }
.modal.item .photo-row .photo-drop.has-photo { width: 120px; flex: none; border-radius: var(--r-md); }
.modal.item .photo-drop:not(.has-photo) { display: flex; justify-content: flex-start; gap: var(--s3); min-height: 0; padding: var(--s3) var(--s4); text-align: left; border-radius: var(--r-md); }

/* ----- Filter bar: a date range and one Filters button (Orders, Reports, Activity) ----- */
.fbar { display: grid; gap: var(--s2); }
.fbar-row { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.fb-anchor { position: relative; }
.fb-search { width: 300px; min-height: var(--btn-h); }
.fbar .btn .cnt { min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--brand); color: var(--brand-ink); font-size: var(--fs-xs); display: inline-grid; place-items: center; }
.fbar .btn .cmp { font-weight: 400; color: var(--ink-3); }
.fb-active { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.fb-active:empty { display: none; }
.fchip { display: inline-flex; align-items: center; gap: 6px; min-height: var(--btn-h-sm); padding: 0 10px 0 12px; border: 0; border-radius: var(--r-pill); background: var(--brand-soft); color: var(--brand-text); font: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; }
.fchip .x { opacity: .7; }
.fchip:hover .x { opacity: 1; }
.pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; display: grid; gap: var(--s4); padding: var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.pop-foot { display: flex; align-items: center; gap: var(--s2); padding-top: var(--s3); border-top: 1px solid var(--line); }
.pop.dates { grid-template-columns: 170px 300px; width: max-content; }
.pop.dates .pop-foot { grid-column: 1 / -1; }
.pop.filters { width: 460px; max-height: 560px; overflow: auto; }
.presets { display: grid; gap: 2px; align-content: start; }
.presets button { padding: 8px 10px; border: 0; border-radius: var(--r-sm); background: none; font: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); text-align: left; cursor: pointer; }
.presets button:hover { background: var(--surface-2); }
.presets button.on { background: var(--brand-soft); color: var(--brand-text); }
.cal { display: grid; gap: var(--s2); align-content: start; }
.cal-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px 0; text-align: center; }
.cal-grid .dow { padding: 4px 0; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-3); }
.cal-grid button { height: 36px; border: 0; border-radius: var(--r-sm); background: none; font: inherit; font-size: var(--fs-sm); color: var(--ink); cursor: pointer; }
.cal-grid button:hover { background: var(--surface-2); }
.cal-grid button.in { border-radius: 0; background: var(--brand-soft); color: var(--brand-text); }
.cal-grid button.end { border-radius: var(--r-sm); background: var(--brand); color: var(--brand-ink); font-weight: 700; }
.cal-grid button.today:not(.end) { box-shadow: inset 0 0 0 1px var(--brand); }
.cal-grid button:disabled { background: none; color: var(--ink-3); opacity: .45; cursor: default; }
.fgroup { display: grid; gap: var(--s2); }
.fgroup h4 { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.fgroup .input { min-height: 40px; }
[data-f][hidden], [data-day][hidden] { display: none !important; }

/* ----- Menu browser: one part for register, Menu, setup, Sold out today and the item picker ----- */
.mb { display: grid; gap: var(--s4); }
.reg-search.sm { min-height: var(--input-h); border-radius: var(--r-input); }
.reg-search.sm input { font-size: var(--fs-md); }
.app-body .mb > .reg-search { max-width: 460px; min-height: var(--btn-h-lg); }
.app-body .mb > .reg-search input, .setup-body .mb > .reg-search input { font-size: var(--fs-md); }
.mb .chips .chip { cursor: pointer; }
.app-body .mb .chips .chip, .setup-body .mb .chips .chip { min-height: 40px; }
.mb .chips .chip[draggable="true"] { cursor: grab; }
.mb .chip .n { margin-left: 6px; font-weight: 400; opacity: .7; }
.mb .chip.add { border-style: dashed; color: var(--ink-3); }
.mb .chip.drop-before { box-shadow: inset 3px 0 0 var(--brand); }
.mb .chip.drop-after { box-shadow: inset -3px 0 0 var(--brand); }
.mb .chip.drop-into { outline: 2px dashed var(--brand); outline-offset: 2px; }
.mb .chip.dragging { opacity: .4; }
.mb-body { display: grid; gap: var(--s5); align-content: start; }
.mb-body.scroll { max-height: 440px; overflow: auto; }
.mb-group { display: grid; gap: var(--s3); }
.mb-head { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.mb-head h3 { font-size: var(--fs-md); }
.mb-body .tiles { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); overflow: visible; }
.item-rows { display: grid; gap: 4px; }
.item-row { display: flex; align-items: center; gap: var(--s3); padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); font: inherit; color: inherit; text-align: left; width: 100%; }
.item-row .thumb { width: 52px; height: 40px; font-size: var(--fs-sm); font-weight: 800; }
.item-row.off strong { color: var(--ink-3); }
button.item-row { cursor: pointer; }
button.item-row:hover:not(:disabled) { border-color: var(--brand); }
button.item-row:disabled { opacity: .5; cursor: not-allowed; }
.tile.edit { cursor: grab; }
.tile.edit:hover { box-shadow: 0 0 0 2px var(--brand); }
.tile.edit .ph { pointer-events: none; }
.tile.edit.dragging { opacity: .4; }
.tile.is-hidden .ph, .tile.is-hidden .body { opacity: .5; }
.tile.drop-before::before, .tile.drop-after::before { content: ""; position: absolute; top: 0; bottom: 0; width: 4px; z-index: 2; background: var(--brand); }
.tile.drop-before::before { left: 0; }
.tile.drop-after::before { right: 0; }
.tile.add { display: grid; place-items: center; align-content: center; gap: 4px; min-height: 190px; border: 2px dashed var(--line); background: var(--surface-2); color: var(--ink-3); font: inherit; font-weight: 600; cursor: pointer; }
.tile.add .big { font-size: 28px; line-height: 1; }
.tile.add:hover { color: var(--brand-text); border-color: var(--brand); }

/* Destructive confirm: the action button is red */
.btn.primary.destructive { background: var(--bad); border-color: var(--bad); color: var(--bad-ink); }
.btn.primary.destructive:hover { filter: brightness(.92); }

/* ----- Owner home: notices the owner can hide, quick actions ----- */
.notice-row .x { color: var(--ink-3); }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.quick-grid a { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); text-decoration: none; font-weight: 600; font-size: var(--fs-sm); }
.quick-grid a:hover { border-color: var(--brand); }
.quick-grid a .i { font-size: 20px; }
[data-fb-none][hidden], [data-fb-list][hidden] { display: none !important; }

/* ----- Person cell and compact device row (Staff, PIN screen, Settings → Devices, owner home) ----- */
.pcell { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.pcell .avatar { flex: none; }
.pcell-text { display: grid; gap: 0; min-width: 0; }
.pcell-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dev-row.compact { grid-template-columns: 36px minmax(0, 1fr) auto; padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.dev-row.compact:last-child { border-bottom: 0; }
.dev-row.compact .ico { width: 36px; height: 36px; border-radius: var(--r-pill); background: var(--surface-2); display: grid; place-items: center; }

/* ----- Owner order list as cards (phone) ----- */
a.ord-card.owner { text-decoration: none; color: inherit; gap: 4px; padding: var(--s3) var(--s4); }

/* ----- Owner pages on a phone: the same parts, narrower ----- */
.phone-app .fbar { position: relative; }
.phone-app .fb-anchor { position: static; }
.phone-app .fb-search { width: 100%; }
.phone-app .pop { left: 0; right: 0; width: auto; max-height: 560px; overflow: auto; }
.phone-app .pop.dates { grid-template-columns: 1fr; width: auto; }
.phone-app .presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.phone-app .pop-foot { flex-wrap: wrap; }
.phone-app .mb .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.phone-app .mb .chips .chip { flex: none; min-height: 40px; }
.phone-app .mb > .reg-search { min-height: var(--btn-h-lg); }
.phone-app .mb > .reg-search input { font-size: var(--fs-md); }
.phone-app .mb-body .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.phone-app .tile .ph { height: 100px; }
.phone-app .tile.add { min-height: 150px; }
.phone-app .page-head { align-items: center; }
.device.phone .scrim { z-index: 30; }
.device.phone .scrim .modal { width: calc(100% - 24px); max-height: calc(100% - 48px); }
@container (max-width: 480px) {
  .modal.item .modal-body > div:first-child { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; }
  .modal.item .modal-body > div:first-child > .field:nth-child(2) { grid-column: 1 / -1; order: -1; }
  .modal-foot { flex-wrap: wrap; }
}

/* ----- Order summary (register Orders panel, kitchen Done today, owner order detail) ----- */
.os-title { font-size: var(--fs-lg); }
.ord-line .amt { margin-left: auto; }
.ord-lines.detail { gap: var(--s2); padding-bottom: var(--s2); border-bottom: 1px solid var(--line); }
.ord-lines.detail .ord-line { font-size: var(--fs-md); }
