/* FinFlow × Organic — design tokens, component layer, app shell and workspace screens.
   Derived from the Organic design system (Claude Design handoff, round 1 wireframes):
   cream-and-sand ground, terracotta accent, sage second accent, Caprasimo over Figtree,
   over-rounded containers and pill controls. Every page links this one stylesheet. */
/* Caprasimo and Figtree are Latin-only, so each stack names a Cyrillic partner right after it
   (docs/DESIGN_LANGUAGE.md §2 Typography). The browser falls back per glyph: Latin, digits and
   the FinFlow wordmark stay in Caprasimo / Figtree; only Bulgarian letters come from the partner.
   Bitter Black matches Caprasimo's soft heavy serifs and colour; Onest matches Figtree's width,
   x-height and weight almost exactly. Google Fonts serves them with unicode-range subsets, so a
   page with no Cyrillic never downloads them. Bitter loads only at 900: the heading weight token
   is 400 (Caprasimo's single weight) and font matching then picks the one Bitter face there is. */
@import url('https://fonts.googleapis.com/css2?family=Caprasimo:wght@400&family=Figtree:wght@400;500;600;700&family=Bitter:wght@900&family=Onest:wght@400;500;600;700&display=swap');

/* =========================================================================
   1. TOKENS
   ========================================================================= */
:root {
  color-scheme: light;
  --color-bg: #f5ead8;
  --color-surface: #ebddc5;
  --color-paper: #fff8ee;
  --color-text: #201e1d;
  --color-text-muted: #645c50;
  --color-accent: #c67139;
  --color-accent-2: #7a8a5e;
  --color-on-accent: #fff8ee;
  /* Filled accent surfaces that carry text: #a35626 keeps on-accent text at 5.1:1 (WCAG AA). */
  --color-accent-fill: #a35626;
  --color-divider: color-mix(in srgb, #201e1d 16%, transparent);
  --color-hairline: color-mix(in srgb, #201e1d 8%, transparent);
  --color-warn: #a86b12;
  --color-warn-bg: #fbecc8;
  --color-danger: #b4432f;
  --color-danger-bg: #fbded6;
  --color-code-bg: #2e2b25;
  --color-code-text: #efe4d2;
  --color-ink-panel: #201e1d;
  --color-ink-panel-text: #f5ead8;

  --color-neutral-100: #f9f4ed;
  --color-neutral-200: #eee7db;
  --color-neutral-300: #dcd3c4;
  --color-neutral-400: #c0b6a5;
  --color-neutral-500: #a19786;
  --color-neutral-600: #82796a;
  --color-neutral-700: #645c50;
  --color-neutral-800: #474238;
  --color-neutral-900: #2e2b25;

  --color-accent-100: #fff2eb;
  --color-accent-200: #ffe1d0;
  --color-accent-300: #ffc6a5;
  --color-accent-400: #f6a06b;
  --color-accent-500: #d67f48;
  --color-accent-600: #b2622d;
  --color-accent-700: #8c491a;
  --color-accent-800: #643312;
  --color-accent-900: #402310;

  --color-accent-2-100: #f0fae1;
  --color-accent-2-200: #e1eecc;
  --color-accent-2-300: #ccdbb2;
  --color-accent-2-400: #aebf92;
  --color-accent-2-500: #8fa073;
  --color-accent-2-600: #728157;
  --color-accent-2-700: #56633f;
  --color-accent-2-800: #3d472b;
  --color-accent-2-900: #272e1b;

  --font-heading: "Caprasimo", "Bitter", "Cooper Black", Georgia, serif;
  --font-heading-weight: 400;
  --font-body: "Figtree", "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --space-1: 4.4px;
  --space-2: 8.8px;
  --space-3: 13.2px;
  --space-4: 17.6px;
  --space-6: 26.4px;
  --space-8: 35.2px;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --radius-card: calc(var(--radius-lg) * 1.15);
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px color-mix(in srgb, #2e2b25 14%, transparent);
  --shadow-md: 0 3px 10px color-mix(in srgb, #2e2b25 16%, transparent);
  --shadow-lg: 0 12px 32px color-mix(in srgb, #2e2b25 22%, transparent);

  --sidebar-w: 230px;
  --appbar-h: 72px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Semantic roles (DESIGN_LANGUAGE §2). Components use these, not raw ramp steps. */
  --attention-bg: var(--color-accent-200);
  --attention-fg: var(--color-accent-900);
  --done-bg: var(--color-accent-2-200);
  --done-fg: var(--color-accent-2-900);
  --info-bg: var(--color-surface);
  --info-fg: var(--color-text);
  --locked-bg: var(--color-neutral-300);
  --locked-fg: var(--color-neutral-800);
  --ink-bg: var(--color-text);
  --ink-fg: var(--color-bg);
  --accent-text: var(--color-accent-700);
  --drawer-bg: var(--color-neutral-100);
  --overlay: color-mix(in srgb, var(--color-text) 40%, transparent);
  --focus-ring: var(--color-accent);
  --disabled-opacity: 0.45;

  /* Interaction ramps (§5): hover one step lighter, pressed accent-600 on light ground. */
  --primary-hover: var(--color-accent-700);
  --primary-pressed: var(--color-accent-800);
  --neutral-hover: color-mix(in srgb, var(--color-text) 7%, transparent);
  --neutral-pressed: color-mix(in srgb, var(--color-text) 14%, transparent);

  /* Sizes (§3, §8) */
  --hit-min: 44px;
  --row-h-mobile: 52px;
  --pay-tile-h: 72px;
  --key-h: 84px;
  --ticket-w: 380px;
  --drawer-w: 440px;
  --radius-sheet: 32px;

  /* Type scale (§2) */
  --fs-hero: 92px;
  --fs-hero-mobile: 62px;
  --fs-title: 34px;
  --fs-section: 21px;
  --fs-body: 15px;
  --fs-meta: 13px;

  /* Legacy token bridge — the pre-Organic markup reads these names. */
  --bg-app: var(--color-bg);
  --bg-surface: var(--color-surface);
  --bg-card: var(--color-bg);
  --bg-elevated: color-mix(in srgb, var(--color-text) 7%, transparent);
  --text-primary: var(--color-text);
  --text-secondary: var(--color-text-muted);
  --accent-primary: var(--color-accent-700);
  --accent-sky: var(--color-accent-700);
  --accent-emerald: var(--color-accent-2-700);
  --accent-amber: var(--color-warn);
  --accent-rose: var(--color-danger);
  --accent-violet: var(--color-accent-2-800);
  --border-subtle: var(--color-divider);
  --chart-line: var(--color-accent);
  --chart-area: color-mix(in srgb, var(--color-accent) 18%, transparent);
}

/* Warm dark theme — same roles, ramps flipped so 100–300 stay "tinted fills". */
:root[data-theme="dark"] {
  color-scheme: dark;
  --color-bg: #1c1916;
  --color-surface: #29241f;
  --color-paper: #322b25;
  --color-text: #f3e9da;
  --color-text-muted: #b5aa99;
  --color-accent: #e08a50;
  --color-accent-2: #a3b383;
  --color-on-accent: #1c1916;
  --color-accent-fill: var(--color-accent);
  --primary-hover: var(--color-accent-400);
  --primary-pressed: var(--color-accent-500);
  --color-divider: color-mix(in srgb, #f3e9da 16%, transparent);
  --color-hairline: color-mix(in srgb, #f3e9da 8%, transparent);
  --color-warn: #e8b457;
  --color-warn-bg: #3d3018;
  --color-danger: #f08a72;
  --color-danger-bg: #43231c;
  --color-code-bg: #12100e;
  --color-code-text: #efe4d2;
  --color-ink-panel: #0f0d0b;
  --color-ink-panel-text: #f3e9da;

  --color-neutral-100: #221f1b;
  --color-neutral-200: #2a2622;
  --color-neutral-300: #3a342d;
  --color-neutral-400: #4e473e;
  --color-neutral-500: #6d6559;
  --color-neutral-600: #8c8375;
  --color-neutral-700: #b5aa99;
  --color-neutral-800: #d3cabc;
  --color-neutral-900: #ece4d7;

  --color-accent-100: #3a2618;
  --color-accent-200: #4a2e1a;
  --color-accent-300: #6b4023;
  --color-accent-400: #a9602f;
  --color-accent-500: #d67f48;
  --color-accent-600: #e8955f;
  --color-accent-700: #f4ad7f;
  --color-accent-800: #ffcba8;
  --color-accent-900: #ffe6d4;

  --color-accent-2-100: #22291a;
  --color-accent-2-200: #2d3721;
  --color-accent-2-300: #3e4b2c;
  --color-accent-2-400: #5f7044;
  --color-accent-2-500: #8fa073;
  --color-accent-2-600: #a7b88b;
  --color-accent-2-700: #c0d0a4;
  --color-accent-2-800: #d9e7c1;
  --color-accent-2-900: #eef6e1;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
  --shadow-md: 0 0 0 1px color-mix(in srgb, #f3e9da 6%, transparent), 0 4px 14px rgb(0 0 0 / 0.45);
  --shadow-lg: 0 0 0 1px color-mix(in srgb, #f3e9da 7%, transparent), 0 16px 40px rgb(0 0 0 / 0.55);
}

/* =========================================================================
   2. BASE
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; }
a { color: var(--color-accent-700); text-underline-offset: 3px; }
a:hover { color: var(--color-accent-900); }
img, svg { display: block; max-width: 100%; }
code { font-family: var(--font-mono); font-size: 0.92em; }
button { font: inherit; color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted, .text-muted { color: var(--color-text-muted); }
.num { font-variant-numeric: tabular-nums; }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.75; stroke-linecap: round; stroke-linejoin: round; display: inline-block; }
.ico-sm { width: 16px; height: 16px; }
.ico-lg { width: 24px; height: 24px; }

/* =========================================================================
   3. COMPONENTS
   ========================================================================= */

/* — buttons (Organic + legacy variants) — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none; white-space: nowrap; text-align: center;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 14px; line-height: 1.2; letter-spacing: 0.005em;
  color: var(--color-on-accent); background: var(--color-accent-fill);
  border: 1px solid transparent; border-radius: var(--radius-pill);
  padding: 9px 17px; min-height: 38px;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.btn:hover { background: var(--primary-hover); color: var(--color-on-accent); }
.btn:active { background: var(--primary-pressed); transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: var(--disabled-opacity); cursor: not-allowed; transform: none; pointer-events: none; }
.btn-primary, .btn.sky { background: var(--color-accent-fill); color: var(--color-on-accent); }
.btn-secondary, .btn.secondary {
  background: transparent; color: var(--color-text); border-color: var(--color-divider);
}
.btn-secondary:hover, .btn.secondary:hover { background: var(--neutral-hover); color: var(--color-text); }
.btn-secondary:active, .btn.secondary:active { background: var(--neutral-pressed); }
.btn.emerald, .btn.ok, .btn-sage { background: var(--color-accent-2); color: #fbf7ef; }
.btn.emerald:hover, .btn.ok:hover, .btn-sage:hover { background: var(--color-accent-2-600); color: #fbf7ef; }
.btn.emerald:active, .btn.ok:active, .btn-sage:active { background: var(--color-accent-2-700); }
.btn.amber { background: var(--color-accent-200); color: var(--color-accent-900); }
.btn.amber:hover { background: var(--color-accent-300); color: var(--color-accent-900); }
.btn.danger { background: var(--color-danger); color: #fff8ee; }
.btn.danger:hover { background: color-mix(in srgb, var(--color-danger) 85%, black); }
.btn-ghost { background: transparent; color: var(--color-accent-700); padding-inline: 10px; }
.btn-ghost:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); color: var(--color-accent-800); }
.btn-ghost:active { background: color-mix(in srgb, var(--color-accent) 18%, transparent); }
.btn-ink { background: var(--color-text); color: var(--color-bg); }
.btn-ink:hover { background: var(--color-neutral-800); color: var(--color-bg); }
.btn-ink:active { background: var(--color-neutral-700); }
.btn-sage-soft { background: var(--done-bg); color: var(--done-fg); }
.btn-sage-soft:hover { background: var(--color-accent-2-100); color: var(--done-fg); }
.btn-sage-soft:active { background: var(--color-accent-2-300); }
.btn-icon { width: 40px; height: 40px; min-height: 40px; padding: 0; flex: none; }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 24px; font-size: 17px; min-height: 52px; }
.btn-sm { padding: 5px 12px; font-size: 13px; min-height: 30px; }

/* — tags & legacy badges — */
.tag, .badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-body); font-size: 12px; font-weight: 600; line-height: 1.3;
  letter-spacing: 0.02em; padding: 3px 10px; border-radius: var(--radius-pill);
  background: var(--color-neutral-100); color: var(--color-neutral-800);
  white-space: nowrap;
}
.tag-accent, .badge.sky, .badge.warn { background: var(--color-accent-100); color: var(--color-accent-800); }
.tag-accent-2, .badge.ok { background: var(--color-accent-2-100); color: var(--color-accent-2-800); }
.tag-neutral { background: var(--color-neutral-100); color: var(--color-neutral-800); }
.tag-outline { background: transparent; border: 1px solid var(--color-accent); color: var(--color-accent-700); }
.tag-danger, .badge.danger, .badge.bad { background: var(--color-danger-bg); color: var(--color-danger); }
.tag-warn { background: var(--color-warn-bg); color: var(--color-warn); }
.tag-lg { font-size: 14px; padding: 7px 15px; }
button.tag { border: 1px solid transparent; cursor: pointer; }
button.tag-outline:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); }
button.tag[aria-pressed="true"] { background: var(--color-accent-fill); color: var(--color-on-accent); border-color: var(--color-accent); }

/* legacy status pill */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  padding: 6px 12px; border-radius: var(--radius-pill);
  border: 1px solid var(--color-divider); background: transparent; color: var(--color-text);
  text-decoration: none; cursor: default;
}
button.pill, a.pill { cursor: pointer; }
button.pill:hover, a.pill:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); color: var(--color-text); }
.pill.emerald { color: var(--color-accent-2-800); background: var(--color-accent-2-100); border-color: transparent; }
.pill.sky { color: var(--color-accent-800); background: var(--color-accent-100); border-color: transparent; }
.pill.ok { color: var(--color-accent-2-800); background: var(--color-accent-2-100); border-color: transparent; white-space: nowrap; }
.pill.danger { color: var(--color-danger); background: var(--color-danger-bg); border-color: transparent; white-space: nowrap; }
#offline-queue-badge { background: var(--color-warn); color: #fff8ee; padding: 0 7px; }

/* — status dot — */
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--color-neutral-400); display: inline-block; }
.dot-accent { background: var(--color-accent); }
.dot-sage { background: var(--color-accent-2); }
.dot-warn { background: var(--color-warn); }

/* — cards — */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  padding: 22px 24px;
  border: none;
  min-width: 0;
}
.card + .card { margin-top: 0; }
.card-header {
  display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap;
  gap: 10px 14px; margin-bottom: 16px;
}
.card-header > div:first-child { min-width: 0; flex: 1 1 260px; }
.card-header h2, .card-header h3, .card-title { font-size: 19px; line-height: 1.2; }
.card-header p { margin-top: 4px; }
.card-kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent-700); }
.card-inset { background: var(--color-bg); border-radius: var(--radius-md); padding: 14px 16px; }
.card-tint { background: var(--color-accent-2-200); color: var(--color-accent-2-900); }
.card-tint-accent { background: var(--color-accent-200); color: var(--color-accent-900); }
.elev-sm { box-shadow: var(--shadow-sm); }
.elev-md { box-shadow: var(--shadow-md); }
.elev-lg { box-shadow: var(--shadow-lg); }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 18px; margin-bottom: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; margin-bottom: 18px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; align-items: center; gap: 10px; }
.spacer { flex: 1; }

/* — forms — */
label { display: block; font-size: 13px; font-weight: 600; color: var(--color-text-muted); margin-bottom: 5px; }
input, select, textarea {
  width: 100%; min-height: 40px; font: inherit; font-size: 14px;
  color: var(--color-text); caret-color: var(--color-accent);
  background: var(--color-bg);
  border: 1px solid var(--color-divider); border-radius: var(--radius-pill);
  padding: 8px 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
select {
  appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23645c50' stroke-width='2.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
textarea { border-radius: var(--radius-md); min-height: 90px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--color-text) 40%, transparent); }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  border-color: var(--color-accent); outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 22%, transparent);
}
input[type="checkbox"], input[type="radio"] { width: 18px; min-height: 18px; height: 18px; padding: 0; accent-color: var(--color-accent); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px; margin-bottom: 14px; }
.field { display: flex; flex-direction: column; }

.seg {
  display: inline-flex; padding: 4px; gap: 2px;
  background: var(--color-surface); border-radius: var(--radius-pill);
}
.seg-opt {
  border: 0; background: transparent; cursor: pointer; color: var(--color-text);
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  padding: 7px 15px; border-radius: var(--radius-pill); white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.seg-opt:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.seg-opt[aria-pressed="true"], .seg-opt.is-active { background: var(--color-accent-fill); color: var(--color-on-accent); }
.seg-ink .seg-opt[aria-pressed="true"] { background: var(--color-text); color: var(--color-bg); }
.on-surface .seg, .card .seg { background: var(--color-bg); }
/* LanguageSwitch: the БГ / EN control on the standalone pages (KDS, landing, legal), a .seg variant. */
.seg-lang .seg-opt { min-width: 44px; padding: 6px 12px; font-size: 13px; }
@media (pointer: coarse) { .seg-lang .seg-opt { min-height: 44px; } }

/* — tables — */
.table-wrapper, .table-container {
  overflow: auto; max-width: 100%; max-height: min(460px, 75vh);
  container-type: inline-size;
  border-radius: var(--radius-md); background: var(--color-bg);
}
.table-container { max-height: none; }
table, .table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
thead { position: sticky; top: 0; z-index: 2; background: var(--color-bg); }
th, td { padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--color-hairline); vertical-align: middle; }
thead th {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--color-text-muted); border-bottom: 1px solid var(--color-divider); white-space: nowrap;
}
tbody th { font-weight: 600; background: transparent; }
tbody tr { transition: background-color 0.12s ease; }
tbody tr:hover { background: color-mix(in srgb, var(--color-text) 4%, transparent); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
.table-wrapper table { --label-1: "Item"; --label-2: "Qty / Sold"; --label-3: "Price / Rev"; --label-4: "Cost / Status"; --label-5: "Profit / Action"; }
@container (width < 560px) {
  .table-wrapper table, .table-wrapper thead, .table-wrapper tbody, .table-wrapper tr, .table-wrapper th, .table-wrapper td { display: block; }
  .table-wrapper thead { display: none; }
  .table-wrapper tr { padding: 10px 4px; border-bottom: 1px solid var(--color-divider); }
  .table-wrapper td, .table-wrapper th { border: 0; padding: 3px 10px; }
  .table-wrapper td:nth-child(2)::before { content: var(--label-2) ": "; font-weight: 600; color: var(--color-text-muted); }
  .table-wrapper td:nth-child(3)::before { content: var(--label-3) ": "; font-weight: 600; color: var(--color-text-muted); }
  .table-wrapper td:nth-child(4)::before { content: var(--label-4) ": "; font-weight: 600; color: var(--color-text-muted); }
  .table-wrapper td:nth-child(5)::before { content: var(--label-5) ": "; font-weight: 600; color: var(--color-text-muted); }
}

/* — code / output blocks — */
pre.code-output, .code-output {
  background: var(--color-code-bg); color: var(--color-code-text);
  border-radius: var(--radius-md); padding: 14px 16px; margin-top: 12px;
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.55;
  overflow: auto; white-space: pre-wrap; word-break: break-word; max-height: 280px; border: 0;
}

/* — alerts — */
.alert-banner {
  background: var(--color-accent-100); color: var(--color-accent-900);
  border-radius: var(--radius-md); padding: 12px 16px; margin-bottom: 10px; font-size: 14px;
  border: 0; border-left: 5px solid var(--color-accent);
}
.alert-banner strong { color: inherit; }
.callout {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: var(--radius-md); font-size: 14px;
  background: var(--color-accent-2-100); color: var(--color-accent-2-900);
}
.callout-accent { background: var(--color-accent-100); color: var(--color-accent-900); }

/* — legacy content blocks — */
.menu-card {
  background: var(--color-bg); border-radius: var(--radius-lg); padding: 18px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 12px;
  border: 0; transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.menu-card:hover { box-shadow: var(--shadow-md); }
.menu-card h3, .menu-card h4 { font-size: 17px; }
.menu-card.is-selected { box-shadow: 0 0 0 2px var(--color-accent); background: var(--color-accent-100); }
.price-tag { font-family: var(--font-heading); font-size: 22px; color: var(--color-accent-700); font-weight: 400; }
.chart-box { background: var(--color-bg); border-radius: var(--radius-lg); padding: 18px; display: flex; flex-direction: column; gap: 12px; border: 0; }
.chart-box svg { width: 100%; height: auto; }

/* =========================================================================
   4. OVERLAYS — modal, drawer, toast, command palette, popover
   ========================================================================= */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 210; display: none;
  align-items: center; justify-content: center; padding: 16px;
  background: color-mix(in srgb, var(--color-neutral-900) 50%, transparent);
  backdrop-filter: blur(4px);
}
.modal-backdrop.is-open { display: flex; }
.modal {
  position: relative; width: min(680px, 100%); max-height: 92vh; overflow-y: auto;
  background: var(--color-surface); color: var(--color-text);
  border-radius: var(--radius-card); padding: 28px; box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s var(--ease-out);
}
.modal-wide { width: min(880px, 100%); }
.modal-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 20px; padding-right: 40px; }
.modal-head h2 { font-size: 26px; }
.modal-head p { color: var(--color-text-muted); font-size: 14px; margin-top: 4px; }
.modal-icon {
  width: 52px; height: 52px; border-radius: 50%; flex: none;
  display: grid; place-items: center; background: var(--color-accent-200); color: var(--color-accent-800);
}
.modal-icon.sage { background: var(--color-accent-2-200); color: var(--color-accent-2-800); }
.modal-close { position: absolute; top: 18px; right: 18px; }
.modal-section { background: var(--color-bg); border-radius: var(--radius-lg); padding: 16px 18px; }
.modal-section-label { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-muted); margin-bottom: 10px; display: block; }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }

.toast-stack {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast-item {
  pointer-events: auto; min-width: 280px; max-width: 420px;
  padding: 13px 18px; border-radius: var(--radius-lg);
  background: var(--color-text); color: var(--color-bg);
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 12px;
  font-size: 14px; font-weight: 500;
  animation: toastSlideIn 0.25s var(--ease-out); transition: opacity 0.2s, transform 0.2s;
}
.toast-item.success { border-left: 6px solid var(--color-accent-2); }
.toast-item.error { border-left: 6px solid var(--color-danger); }
.toast-item.warn { border-left: 6px solid var(--color-warn); }
.toast-item.info { border-left: 6px solid var(--color-accent); }
@keyframes toastSlideIn { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }

.cmd-palette-backdrop {
  position: fixed; inset: 0; z-index: 10000; display: none;
  align-items: flex-start; justify-content: center; padding: 12vh 16px 16px;
  background: color-mix(in srgb, var(--color-neutral-900) 50%, transparent); backdrop-filter: blur(4px);
}
.cmd-palette { width: min(600px, 100%); background: var(--color-surface); border-radius: var(--radius-card); box-shadow: var(--shadow-lg); overflow: hidden; }
.cmd-search { display: flex; align-items: center; gap: 10px; padding: 8px 18px; color: var(--color-text-muted); }
.cmd-input { flex: 1; border: 0; background: transparent; border-radius: 0; font-size: 17px; padding: 12px 0; min-height: 50px; color: var(--color-text); }
.cmd-input:focus-visible { box-shadow: none; }
.cmd-list { max-height: 360px; overflow-y: auto; padding: 6px 10px 12px; }
.cmd-item {
  padding: 11px 14px; border-radius: var(--radius-md); display: flex; justify-content: space-between; align-items: center; gap: 10px;
  cursor: pointer; font-size: 15px;
}
.cmd-item:hover, .cmd-item.active { background: var(--color-bg); color: var(--color-accent-700); }
.cmd-kbd { font-size: 12px; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--color-bg); color: var(--color-text-muted); white-space: nowrap; }

.popover {
  position: absolute; z-index: 150; min-width: 280px; max-width: min(340px, calc(100vw - 24px));
  background: var(--color-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 10px; display: none;
}
.popover.is-open { display: block; animation: modalIn 0.18s var(--ease-out); }
.popover-section { padding: 8px 8px 10px; }
.popover-section + .popover-section { border-top: 1px solid var(--color-hairline); }
.popover-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-muted); margin-bottom: 8px; }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border: 0; background: transparent; border-radius: var(--radius-md);
  color: var(--color-text); text-decoration: none; text-align: left; cursor: pointer; font-size: 14px; font-weight: 500;
}
.menu-item:hover { background: var(--color-bg); color: var(--color-text); }
.menu-item .ico { color: var(--color-text-muted); }
.menu-item .tail { margin-left: auto; color: var(--color-text-muted); font-size: 12px; }
.status-row { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 4px 2px; }

/* AI CFO copilot */
.ai-launcher {
  position: fixed; right: 24px; bottom: 24px; z-index: 100;
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--color-text); color: var(--color-bg); border: 0;
  border-radius: var(--radius-pill); padding: 12px 20px 12px 16px;
  font-family: var(--font-heading); font-size: 15px; box-shadow: var(--shadow-lg);
  transition: transform 0.15s ease;
}
.ai-launcher:hover { transform: translateY(-2px); }
.ai-drawer {
  position: fixed; right: 24px; bottom: 88px; z-index: 101; display: none; flex-direction: column;
  width: min(440px, calc(100vw - 32px)); height: min(560px, calc(100vh - 120px));
  background: var(--color-surface); border-radius: var(--radius-card); box-shadow: var(--shadow-lg); overflow: hidden;
}
.ai-drawer-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px 10px; }
.ai-drawer-head h3 { font-size: 19px; }
.ai-chips { display: flex; gap: 6px; padding: 4px 16px 10px; overflow-x: auto; }
.ai-chips .tag { cursor: pointer; border: 0; }
.ai-messages { flex: 1; overflow-y: auto; padding: 8px 16px 16px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.ai-msg { max-width: 88%; padding: 10px 14px; border-radius: 20px; background: var(--color-bg); align-self: flex-start; white-space: pre-wrap; }
.ai-msg.user { align-self: flex-end; background: var(--color-accent-fill); color: var(--color-on-accent); }
.ai-compose { display: flex; gap: 8px; padding: 12px 14px; background: var(--color-bg); }

/* Component inspector (side guide) */
.finflow-inspector-sidebar {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 120; width: 380px; max-width: 92vw;
  background: var(--color-surface); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; transform: translateX(0); transition: transform 0.3s var(--ease-out);
}
.finflow-inspector-sidebar.collapsed { transform: translateX(105%); }
.inspector-header { padding: 20px 20px 12px; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.inspector-header h3 { font-size: 20px; }
.inspector-body { flex: 1; padding: 6px 20px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.inspector-section { background: var(--color-bg); border-radius: var(--radius-lg); padding: 14px 16px; }
.inspector-section.tip-box { background: var(--color-accent-2-200); color: var(--color-accent-2-900); }
.inspector-section-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-accent-700); margin-bottom: 6px; }
.inspector-section.tip-box .inspector-section-label { color: var(--color-accent-2-800); }
.inspector-section-text { font-size: 14px; line-height: 1.55; white-space: pre-line; }
@media (min-width: 1500px) { body.inspector-open .app { padding-right: 380px; } }

/* Cookie banner */
.cookie-banner {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 99999;
  width: min(940px, calc(100% - 32px)); display: none;
  background: var(--color-text); color: var(--color-bg);
  border-radius: var(--radius-card); padding: 18px 22px; box-shadow: var(--shadow-lg);
}
.cookie-banner a { color: var(--color-accent-300); }
.cookie-banner .btn-secondary { color: var(--color-bg); border-color: color-mix(in srgb, var(--color-bg) 30%, transparent); }
.cookie-banner .btn-secondary:hover { background: color-mix(in srgb, var(--color-bg) 12%, transparent); color: var(--color-bg); }

/* Tour */
.tour-backdrop { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 20px; background: color-mix(in srgb, var(--color-neutral-900) 50%, transparent); backdrop-filter: blur(4px); }
.tour-card { width: min(540px, 100%); background: var(--color-surface); border-radius: var(--radius-card); padding: 28px; box-shadow: var(--shadow-lg); }
.tour-dots { display: flex; gap: 6px; }
.tour-dots span { width: 8px; height: 8px; border-radius: 999px; background: var(--color-neutral-400); transition: width 0.2s ease; }
.tour-dots span.on { width: 22px; background: var(--color-accent); }

/* Slip preview (fiscal printer emulation) */
.slip-preview {
  background: var(--color-paper); color: #2e2b25; border-radius: var(--radius-md);
  padding: 16px; margin: 0; font-family: "Courier New", Courier, monospace; font-size: 12.5px; line-height: 1.4;
  max-height: 280px; overflow-y: auto; white-space: pre; box-shadow: inset 0 0 0 1px var(--color-hairline);
}
:root[data-theme="dark"] .slip-preview { background: #f4ead9; }

/* =========================================================================
   5. APP SHELL — 1a Command center (sidebar) / 1b Flow (top pill nav)
   ========================================================================= */
.app { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }

.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--color-surface); padding: 26px 16px 18px;
  display: flex; flex-direction: column; gap: 2px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 22px; text-decoration: none; color: var(--color-text); }
.brand-name { font-family: var(--font-heading); font-size: 26px; line-height: 1; }
.brand-sub { display: block; font-size: 12px; color: var(--color-text-muted); margin-top: 3px; }
.nav-group-label { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-text-muted); padding: 14px 16px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  border: 0; background: transparent; color: var(--color-text); cursor: pointer; text-align: left; text-decoration: none;
  padding: 10px 16px; border-radius: var(--radius-pill); font-size: 15px; font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.nav-item:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); color: var(--color-text); }
.nav-item[aria-current="page"] { background: var(--color-accent-fill); color: var(--color-on-accent); font-weight: 600; }
.nav-item[aria-current="page"] .ico { color: inherit; }
.nav-item .ico { color: var(--color-text-muted); }
.nav-item .count { margin-left: auto; font-size: 12px; font-weight: 700; background: var(--color-accent-200); color: var(--color-accent-800); border-radius: 999px; padding: 1px 8px; }
.nav-item[aria-current="page"] .count { background: color-mix(in srgb, var(--color-bg) 25%, transparent); color: inherit; }
.nav-sub { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 4px; }
.nav-sub .nav-item { padding: 6px 16px 6px 48px; font-size: 14px; }
.nav-sub .nav-item[aria-current="page"] { background: transparent; color: var(--color-text); font-weight: 700; }
.sidebar-foot { margin-top: auto; padding-top: 14px; display: flex; flex-direction: column; gap: 4px; }
.user-chip {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 8px 10px; border: 0; border-radius: var(--radius-pill); background: transparent; cursor: pointer; color: var(--color-text);
}
.user-chip:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--color-accent-2-300); color: var(--color-accent-2-900); font-size: 18px;
}
.user-chip-text { min-width: 0; line-height: 1.25; font-size: 14px; }
.user-chip-text b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip-text .badge { margin-top: 3px; }

.app-main { min-width: 0; display: flex; flex-direction: column; }
.appbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 14px; min-height: var(--appbar-h);
  padding: 14px 36px; background: color-mix(in srgb, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.appbar-title { min-width: 0; }
.appbar-title h1 { font-size: 30px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar-title p { font-size: 14px; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search-trigger {
  display: inline-flex; align-items: center; gap: 10px; min-width: 200px; white-space: nowrap;
  border: 0; background: var(--color-surface); color: var(--color-text-muted); cursor: pointer;
  border-radius: var(--radius-pill); padding: 9px 14px 9px 16px; font-size: 14px;
}
.search-trigger:hover { color: var(--color-text); }
.search-trigger kbd { margin-left: auto; font-family: var(--font-body); font-size: 12px; background: var(--color-bg); border-radius: 999px; padding: 1px 8px; }
.venue-chip { border: 0; background: var(--color-surface); border-radius: var(--radius-pill); padding: 9px 16px; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; color: var(--color-text); }
.venue-chip:hover { background: color-mix(in srgb, var(--color-text) 10%, var(--color-surface)); }
.device-chip { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
body[data-active-view="pos"] .ai-launcher { display: none; }
.icon-btn {
  width: 42px; height: 42px; flex: none; border: 0; border-radius: 50%; cursor: pointer;
  display: inline-grid; place-items: center; background: var(--color-surface); color: var(--color-text);
  position: relative;
}
.icon-btn:hover { background: color-mix(in srgb, var(--color-text) 10%, var(--color-surface)); }
.icon-btn .badge-dot { position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--color-accent); box-shadow: 0 0 0 2px var(--color-surface); }
.menu-toggle { display: none; }

main.container { width: 100%; max-width: 1440px; padding: 8px 36px 120px; margin: 0; }

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: viewIn 0.28s var(--ease-out); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.view-head { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px 16px; margin-bottom: 22px; }
.view-head h2 { font-size: 34px; }
.view-head .eyebrow { color: var(--color-text-muted); font-size: 15px; }
.legacy-intro { margin-bottom: 18px; }

:root:not([data-currency="dual"]) .bgn-only { display: none !important; }

/* onboarding wizard step indicator */
.wiz-ind { text-align: center; font-size: 14px; font-weight: 700; color: var(--color-text-muted); padding-bottom: 8px; border-bottom: 4px solid var(--color-neutral-300); border-radius: 2px; }
.wiz-ind.is-on { color: var(--color-accent-700); border-bottom-color: var(--color-accent); }

/* mobile tab bar */
.tabbar { display: none; }
.scrim { display: none; }

/* =========================================================================
   6. SCREENS
   ========================================================================= */

/* — Dashboard 1a — */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.kpi { background: var(--color-surface); border-radius: var(--radius-card); padding: 18px 20px; display: flex; flex-direction: column; gap: 2px; min-width: 0; text-align: left; border: 0; color: var(--color-text); }
button.kpi { cursor: pointer; transition: box-shadow 0.15s ease, transform 0.15s ease; }
button.kpi:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kpi-label { font-size: 14px; color: var(--color-text-muted); }
.kpi-value { font-size: 28px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-sub { font-size: 14px; color: var(--color-text-muted); }
.kpi-sub.up { color: var(--color-accent-2-700); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; }
.dash-side { display: flex; flex-direction: column; gap: 16px; }
.chart-card { display: flex; flex-direction: column; gap: 14px; min-height: 340px; }
.bars { flex: 1; display: flex; align-items: flex-end; gap: 10px; padding-top: 10px; min-height: 220px; }
.bar-pair { flex: 1; display: flex; gap: 3px; align-items: flex-end; height: 100%; position: relative; }
.bar { flex: 1; border-radius: 8px 8px 0 0; background: var(--color-accent-400); min-height: 4px; transition: height 0.5s var(--ease-out); }
.bar.out { background: var(--color-accent-2-400); }
.bar-pair.is-today .bar { background: var(--color-accent); }
.bar-pair.is-today .bar.out { background: var(--color-accent-2); }
.bar-label { position: absolute; bottom: -22px; left: 0; right: 0; text-align: center; font-size: 12px; color: var(--color-text-muted); }
.bars-wrap { padding-bottom: 24px; display: flex; flex-direction: column; flex: 1; }
.legend { display: flex; gap: 6px; align-items: center; }
.attention-list { display: flex; flex-direction: column; gap: 4px; }
.attention-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 0 -10px;
  border: 0; background: transparent; border-radius: var(--radius-md); cursor: pointer; text-align: left; color: var(--color-text); font-size: 15px; width: calc(100% + 20px);
}
.attention-item:hover { background: var(--color-bg); }
.attention-item .ico { margin-left: auto; color: var(--color-text-muted); }
.euro-card { background: var(--color-accent-2-200); color: var(--color-accent-2-900); border-radius: var(--radius-card); padding: 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.euro-card b { font-size: 17px; }
.euro-card .btn-secondary { color: var(--color-accent-2-900); border-color: color-mix(in srgb, var(--color-accent-2-900) 25%, transparent); align-self: flex-start; }
.getting-started { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 16px; }
.getting-started > div:nth-child(2) { flex: 1 1 420px; }
.peek { display: none; }
.getting-started .spacer { min-width: 10px; }

/* — Dashboard 1b (Flow) — */
.flow-dash { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.flow-hero { display: flex; flex-direction: column; gap: 16px; }
.hero-number { font-family: var(--font-heading); font-size: clamp(64px, 8vw, 104px); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.hero-sub { font-size: 20px; color: var(--color-text-muted); margin-top: -6px; }
.hourly { background: var(--color-surface); border-radius: var(--radius-card); display: flex; align-items: flex-end; gap: 6px; padding: 24px; height: 280px; margin-top: 10px; }
.hourly .pill-bar { flex: 1; background: var(--color-accent-300); border-radius: 999px; min-height: 12px; transition: height 0.5s var(--ease-out); }
.hourly .pill-bar.mid { background: var(--color-accent-400); }
.hourly .pill-bar.peak { background: var(--color-accent); }
.hourly .pill-bar.future { background: var(--color-neutral-300); }
.next-steps { display: flex; flex-direction: column; gap: 14px; }
.next-steps h3 { font-family: var(--font-body); font-weight: 700; font-size: 20px; }
.step-card { border-radius: var(--radius-card); background: var(--color-surface); padding: 16px 18px; display: flex; gap: 16px; align-items: center; }
.step-card .blob { width: 48px; height: 48px; border-radius: 50%; flex: none; background: var(--color-accent-200); color: var(--color-accent-800); display: grid; place-items: center; }
.step-card .blob.sage { background: var(--color-accent-2-200); color: var(--color-accent-2-800); }
.step-card .body { flex: 1; min-width: 0; }
.step-card .body b { display: block; }
.step-card .body span { font-size: 15px; color: var(--color-text-muted); }
.step-card .btn { flex: none; white-space: nowrap; }
.step-card.tint { background: var(--color-accent-2-200); color: var(--color-accent-2-900); cursor: pointer; border: 0; text-align: left; width: 100%; }
.step-card.tint .body span { color: inherit; }
.carousel-dots { display: none; gap: 8px; justify-content: center; }
.carousel-dots span { width: 8px; height: 8px; border-radius: 999px; background: var(--color-neutral-400); transition: width 0.2s ease; }
.carousel-dots span.on { width: 20px; background: var(--color-accent); }

/* — POS: shared — */
.pos-screen { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 0; background: var(--color-bg); border-radius: var(--radius-card); overflow: hidden; min-height: calc(100vh - 170px); box-shadow: var(--shadow-md); }
.pos-main { padding: 24px; display: flex; flex-direction: column; gap: 18px; min-width: 0; background: var(--color-bg); }
.pos-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.pos-toolbar h3 { font-size: 30px; }
.pos-legend { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }

/* — POS 1a: restaurant floor — */
.floor {
  flex: 1; background: var(--color-surface); border-radius: var(--radius-card);
  padding: 34px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-rows: 124px; gap: 26px 22px; align-content: start; align-items: center;
}
.table-btn {
  border: 0; cursor: pointer; color: var(--color-text); font-family: var(--font-body);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: 50%; aspect-ratio: 1; width: min(100%, 118px); justify-self: center;
  background: var(--color-accent-2-300); transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.table-btn:hover { transform: scale(1.04); }
.table-btn b { font-size: 22px; }
.table-btn span { font-size: 13px; }
.table-btn.long { grid-column: span 2; aspect-ratio: auto; width: 100%; border-radius: var(--radius-pill); height: 96px; }
.table-btn.seated { background: var(--color-accent-300); }
.table-btn.bill { background: var(--color-neutral-300); }
.table-btn.is-selected { background: var(--color-accent-fill); color: var(--color-on-accent); box-shadow: 0 0 0 5px var(--color-accent-800); }
.ticket {
  background: var(--color-paper); padding: 26px; display: flex; flex-direction: column; gap: 14px;
  box-shadow: var(--shadow-md); min-width: 0;
}
.ticket-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ticket-head h3 { font-size: 28px; }
.ticket-lines { flex: 1; display: flex; flex-direction: column; gap: 6px; font-size: 16px; overflow-y: auto; min-height: 120px; }
.ticket-line { display: flex; gap: 10px; align-items: center; padding: 4px 0; }
.ticket-line .qty { min-width: 28px; font-variant-numeric: tabular-nums; }
.ticket-line .name { flex: 1; min-width: 0; }
.ticket-line .amt { font-variant-numeric: tabular-nums; }
.qty-ctrl { display: inline-flex; gap: 2px; opacity: 0; transition: opacity 0.12s ease; }
.ticket-line:hover .qty-ctrl, .ticket-line:focus-within .qty-ctrl { opacity: 1; }
.qty-ctrl button { width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--color-surface); cursor: pointer; display: grid; place-items: center; color: var(--color-text); }
.qty-ctrl button:hover { background: var(--color-accent-200); }
.ticket-empty { color: var(--color-text-muted); font-size: 15px; padding: 18px 0; }
.ticket-tax { display: flex; font-size: 15px; color: var(--color-text-muted); }
.ticket-total { display: flex; align-items: baseline; gap: 10px; }
.ticket-total b:first-child { flex: 1; font-size: 20px; }
.ticket-total .big { font-size: 32px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bgn-line { text-align: right; color: var(--color-text-muted); margin-top: -10px; font-variant-numeric: tabular-nums; }
.ticket-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ticket-actions .btn-primary { grid-column: span 2; }

/* — POS 1b: retail counter — */
.search-bar { flex: 1; display: flex; align-items: center; gap: 10px; background: var(--color-surface); border-radius: var(--radius-pill); padding: 4px 8px 4px 20px; color: var(--color-text-muted); min-width: 220px; }
.search-bar input { border: 0; background: transparent; padding: 10px 0; font-size: 17px; min-height: 46px; }
.search-bar input:focus-visible { box-shadow: none; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-content: start; }
.product-tile {
  border: 0; cursor: pointer; text-align: left; color: var(--color-text); font-family: var(--font-body);
  border-radius: var(--radius-card); background: var(--color-surface); padding: 14px;
  display: flex; flex-direction: column; gap: 6px; min-height: 196px; transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.product-tile:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.product-tile:active { transform: none; }
.product-tile .thumb { flex: 1; border-radius: var(--radius-md); background: var(--color-neutral-300); min-height: 90px; display: grid; place-items: center; font-size: 38px; }
.product-tile b { font-size: 15px; line-height: 1.25; }
.product-tile .meta { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 15px; }
.product-tile.quick { background: transparent; border: 2px dashed var(--color-neutral-400); align-items: center; justify-content: center; color: var(--color-text-muted); }
.product-tile[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.cart { background: var(--color-ink-panel); color: var(--color-ink-panel-text); padding: 26px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cart h3 { font-size: 28px; }
.cart .muted { color: color-mix(in srgb, var(--color-ink-panel-text) 65%, transparent); }
.cart-lines { flex: 1; display: flex; flex-direction: column; gap: 12px; font-size: 16px; overflow-y: auto; min-height: 120px; }
.cart-line { display: flex; gap: 12px; align-items: center; }
.cart-line .qty { border-radius: 999px; background: color-mix(in srgb, var(--color-ink-panel-text) 14%, transparent); padding: 2px 10px; font-variant-numeric: tabular-nums; min-width: 34px; text-align: center; }
.cart-line .name { flex: 1; min-width: 0; }
.cart-line .rm { border: 0; background: transparent; color: inherit; opacity: 0.55; cursor: pointer; padding: 4px; border-radius: 50%; }
.cart-line .rm:hover { opacity: 1; background: color-mix(in srgb, var(--color-ink-panel-text) 12%, transparent); }
.cash-box { border-radius: var(--radius-md); background: color-mix(in srgb, var(--color-ink-panel-text) 10%, transparent); padding: 14px; font-size: 14px; display: flex; flex-direction: column; gap: 8px; }
.cash-box .row { gap: 8px; }
.cash-box input { background: color-mix(in srgb, var(--color-ink-panel-text) 8%, transparent); color: inherit; border-color: color-mix(in srgb, var(--color-ink-panel-text) 25%, transparent); min-height: 36px; padding: 6px 12px; }
.cash-box .seg { background: color-mix(in srgb, var(--color-ink-panel-text) 10%, transparent); }
.cash-box .seg-opt { color: inherit; padding: 4px 12px; font-size: 13px; }
.cart .ticket-total .big { font-size: 38px; }
.cart .bgn-line { color: color-mix(in srgb, var(--color-ink-panel-text) 65%, transparent); }
.pay-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay-pair button { border: 0; cursor: pointer; border-radius: var(--radius-pill); padding: 14px; font-family: var(--font-heading); font-size: 16px; background: color-mix(in srgb, var(--color-ink-panel-text) 14%, transparent); color: inherit; }
.pay-pair button:hover { background: color-mix(in srgb, var(--color-ink-panel-text) 22%, transparent); }
.pay-pair button.primary { background: var(--color-accent-fill); color: var(--color-on-accent); }
.pay-pair button.primary:hover { background: var(--color-accent-600); }
.pay-pair button:disabled { opacity: 0.4; cursor: not-allowed; }
.scan-area { display: none; }

/* checkout sheet */
.pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pay-method { border: 0; cursor: pointer; border-radius: var(--radius-md); background: var(--color-bg); padding: 18px 0; text-align: center; font-size: 16px; color: var(--color-text); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pay-method[aria-pressed="true"] { background: var(--color-accent-200); box-shadow: 0 0 0 2px var(--color-accent); font-weight: 700; color: var(--color-accent-900); }
.check-row { display: flex; gap: 10px; align-items: center; font-size: 15px; cursor: pointer; }

/* — Books 1a: journal + audit readiness — */
.books-screen { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.journal-card { padding: 10px 20px 14px; }
.journal-card table { font-size: 15px; }
.journal-card td.amt, .journal-card th.amt { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.journal-card .doc { font-family: var(--font-mono); font-size: 13px; color: var(--color-text-muted); white-space: nowrap; }
.journal-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.journal-tools .search-bar { max-width: 280px; padding-left: 16px; }
.journal-tools .search-bar input { font-size: 15px; min-height: 40px; padding: 6px 0; }
.readiness { position: sticky; top: calc(var(--appbar-h) + 10px); display: flex; flex-direction: column; gap: 16px; }
.gauge { width: 92px; height: 92px; border-radius: 50%; flex: none; display: grid; place-items: center; background: conic-gradient(var(--color-accent-2) 0 calc(var(--pct, 0) * 1%), var(--color-neutral-300) calc(var(--pct, 0) * 1%) 100%); transition: background 0.6s ease; }
.gauge > div { width: 68px; height: 68px; border-radius: 50%; background: var(--color-surface); display: grid; place-items: center; font-weight: 700; font-size: 20px; }
.check-list { display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.check-list div { display: flex; gap: 10px; align-items: flex-start; }
.check-list .ok { color: var(--color-accent-2-700); font-weight: 700; }
.check-list .no { color: var(--color-accent-700); font-weight: 700; }
.activity { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--color-text-muted); }

/* — Books 1b: month-end close board — */
.close-head { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px 16px; margin-bottom: 22px; }
.close-head h2 { font-size: 44px; }
.close-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.close-col { border-radius: var(--radius-card); background: var(--color-surface); padding: 18px; display: flex; flex-direction: column; gap: 12px; min-height: 380px; }
.close-col.is-active { background: var(--color-accent-200); box-shadow: 0 0 0 2px var(--color-accent); }
.close-col.is-locked { opacity: 0.72; }
.close-col-head { display: flex; align-items: center; gap: 8px; }
.step-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff8ee; background: var(--color-neutral-400); flex: none; font-size: 14px; }
.close-col.is-done .step-num { background: var(--color-accent-2); }
.close-col.is-active .step-num { background: var(--color-accent-fill); }
.close-item { background: var(--color-bg); border-radius: var(--radius-md); padding: 12px 14px; font-size: 15px; }
.close-item b { display: block; }

/* — Euro conversion preview — */
.conv-table td.up { color: var(--color-accent-700); font-weight: 700; }

/* =========================================================================
   6b. ROUND 2 COMPONENTS (docs/DESIGN_LANGUAGE.md §4) — rendered by static/ui.js
   ========================================================================= */

/* — interaction states shared by every control (§5) — */
.seg-opt:active, .nav-item:active, .menu-item:active, .attention-item:active, button.tag:active { background: var(--neutral-pressed); }
.seg-opt:disabled, .nav-item:disabled, .menu-item:disabled, button.tag:disabled, .icon-btn:disabled,
.pay-method:disabled, .tip-pill:disabled, .key:disabled, .chip:disabled, .row-btn:disabled,
[aria-disabled="true"] { opacity: var(--disabled-opacity); cursor: not-allowed; }
.icon-btn:active { background: var(--neutral-pressed); }

/* — Settings switch (showBgn and other boolean preferences) — */
.switch-row { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 10px; margin: 0 0 6px; border-radius: var(--radius-md); cursor: pointer; color: var(--color-text); font-weight: 500; }
.switch-row:hover { background: var(--neutral-hover); }
.switch-row > .ico { color: var(--color-text-muted); }
.switch-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.switch-row .hint { font-size: 13px; color: var(--color-text-muted); font-weight: 400; line-height: 1.35; }
.switch { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 999px; background: var(--color-neutral-400); position: relative; cursor: pointer; flex: none; margin: 0; transition: background-color 0.15s ease; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform 0.15s var(--ease-out); }
.switch:checked { background: var(--color-accent); }
.switch:checked::after { transform: translateX(18px); }
.switch:hover { background: var(--color-neutral-500); }
.switch:checked:hover { background: var(--primary-hover); }
.switch:active::after { width: 24px; }
.switch:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.switch:disabled { opacity: var(--disabled-opacity); cursor: not-allowed; }

/* — LocationPicker / PeriodControl (header pickers) — */
.picker {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 16px;
  border: 0; border-radius: var(--radius-pill); background: var(--color-surface); color: var(--color-text);
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.picker:hover { background: color-mix(in srgb, var(--color-text) 6%, var(--color-surface)); }
.picker:active { background: color-mix(in srgb, var(--color-text) 12%, var(--color-surface)); }
.picker .ico-sm { color: var(--color-text-muted); }
.seg-ink .seg-opt[aria-pressed="true"]:hover { background: var(--color-neutral-800); }

/* — MoneyAmount — */
.money { display: inline-flex; flex-direction: column; line-height: 1.1; font-variant-numeric: tabular-nums; min-width: 0; }
.money-eur { white-space: nowrap; }
.money-bgn { font-size: 0.5em; color: var(--color-neutral-700); font-weight: 500; margin-top: 4px; white-space: nowrap; }
.money.size-hero .money-eur { font-family: var(--font-heading); font-size: var(--fs-hero); letter-spacing: -0.02em; line-height: 1; }
.money.size-hero .money-bgn { font-size: 18px; font-family: var(--font-body); }
.money.size-lg .money-eur { font-size: 28px; font-weight: 700; }
.money.size-lg .money-bgn { font-size: 14px; }
.money.size-md .money-eur { font-size: 20px; font-weight: 700; }
.money.size-md .money-bgn { font-size: 13px; }
.money.size-sm .money-eur { font-size: 15px; }
.money.size-sm .money-bgn { font-size: 12px; margin-top: 2px; }
.money.align-end { align-items: flex-end; text-align: right; }
:root:not([data-currency="dual"]) .money-bgn:not(.always) { display: none; }

/* — KpiCard / TrendBadge — */
.kpi-row { display: grid; grid-template-columns: minmax(0, 1.25fr) repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.kpi-card {
  background: var(--color-surface); border-radius: var(--radius-card); padding: 20px 22px; border: 0;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; min-width: 0; text-align: left;
  color: var(--color-text); font: inherit; min-height: 144px;
}
button.kpi-card { cursor: pointer; transition: box-shadow 0.15s ease, background-color 0.15s ease; }
button.kpi-card:hover { box-shadow: var(--shadow-md); }
button.kpi-card:active { box-shadow: var(--shadow-sm); background: color-mix(in srgb, var(--color-text) 5%, var(--color-surface)); }
.kpi-card .kpi-label { font-size: 15px; color: var(--color-text-muted); }
.kpi-card.hero { background: var(--attention-bg); color: var(--attention-fg); justify-content: space-between; }
.kpi-card.hero .kpi-label { color: var(--attention-fg); }
.kpi-card.hero .money.size-hero .money-eur { font-size: clamp(44px, 4.4vw, 60px); }
.kpi-card.hero .money-bgn { color: var(--color-accent-800); }
.trend { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 700; white-space: nowrap; }
.trend.up { color: var(--color-accent-2-800); }
.trend.down { color: var(--color-accent-800); }
.kpi-card.hero .trend { color: var(--attention-fg); }

/* — BarChart — */
.chart { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.chart-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.chart-head b { font-size: 18px; }
.chart-legend { margin-left: auto; display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; color: var(--color-text); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: none; }
.swatch.in { background: var(--color-accent); }
.swatch.out { background: var(--color-accent-2); }
.swatch.forecast { border: 1.5px dashed var(--color-neutral-600); }
.chart-body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; flex: 1; min-height: 240px; }
.chart-y { display: flex; flex-direction: column-reverse; justify-content: space-between; font-size: 12px; color: var(--color-text-muted); text-align: right; padding-bottom: 18px; margin-top: 22px; }
.chart-plot { position: relative; display: flex; align-items: stretch; gap: 10px; padding-bottom: 26px; margin-top: 30px; }
.chart-col { flex: 1; position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 4px; border-radius: var(--radius-md) var(--radius-md) 0 0; border: 0; background: transparent; padding: 0 4px; cursor: default; color: inherit; font: inherit; }
.chart-col.is-now { background: var(--color-accent-100); }
.chart-bar { flex: 1; max-width: 32px; border-radius: 10px 10px 0 0; min-height: 3px; background: var(--color-accent); transition: height 0.5s var(--ease-out); }
.chart-bar.out { background: var(--color-accent-2); }
.chart-bar.forecast { background: transparent; border: 1.5px dashed var(--color-accent-500); border-bottom: 0; }
.chart-bar.forecast.out { border-color: var(--color-accent-2-500); }
.chart-bar.pill { border-radius: 999px; max-width: 64px; background: var(--color-accent-300); }
.chart-bar.pill.mid { background: var(--color-accent-400); }
.chart-bar.pill.peak { background: var(--color-accent); }
.chart-bar.pill.forecast { background: transparent; border: 1.5px dashed var(--color-accent-500); }
.chart-x { position: absolute; bottom: -24px; left: 0; right: 0; text-align: center; font-size: 13px; color: var(--color-text-muted); white-space: nowrap; }
.chart-col.is-now .chart-x { color: var(--accent-text); font-weight: 700; }
.chart-now-line { position: absolute; top: 0; bottom: 26px; width: 2px; background: var(--color-text); }
.chart-now-tag { position: absolute; top: -4px; left: 6px; background: var(--ink-bg); color: var(--ink-fg); border-radius: var(--radius-pill); padding: 2px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.chart-tip {
  position: absolute; top: -6px; left: 50%; transform: translate(-50%, -100%); z-index: 2;
  background: var(--ink-bg); color: var(--ink-fg); border-radius: var(--radius-pill); padding: 5px 12px;
  font-size: 13px; font-weight: 600; white-space: nowrap; pointer-events: none; display: none;
}
.chart-col.is-now .chart-tip, .chart-col:hover .chart-tip, .chart-col:focus-visible .chart-tip { display: block; }
.chart-col:hover .chart-tip ~ * { opacity: 1; }
.chart-plot:hover .chart-col.is-now:not(:hover) .chart-tip { display: none; }

/* — TaskCard (+ swipe variant) — */
.task-card { border-radius: var(--radius-card); background: var(--color-surface); padding: 16px 18px; display: flex; gap: 16px; align-items: center; min-width: 0; }
.task-card .blob { width: 48px; height: 48px; border-radius: 50%; flex: none; background: var(--attention-bg); color: var(--color-accent-800); display: grid; place-items: center; }
.task-card .blob.sage { background: var(--done-bg); color: var(--color-accent-2-800); }
.task-card .body { flex: 1; min-width: 0; }
.task-card .body b { display: block; font-size: 16px; }
.task-card .body span { font-size: 15px; color: var(--color-text-muted); }
.task-card .btn { flex: none; }
.task-card.tint { background: var(--done-bg); color: var(--done-fg); }
.task-card.tint .body span { color: inherit; }
button.task-card { border: 0; width: 100%; text-align: left; cursor: pointer; font: inherit; }
button.task-card:hover { box-shadow: var(--shadow-md); }
button.task-card:active { box-shadow: var(--shadow-sm); }
.swipe-stack { position: relative; min-height: 220px; touch-action: pan-y; }
.swipe-stack .swipe-card {
  position: absolute; inset: 0; border-radius: var(--radius-card); background: var(--color-surface); padding: 24px;
  display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-md); transition: transform 0.25s var(--ease-out), opacity 0.25s ease;
  user-select: none;
}
.swipe-stack .swipe-card.behind { transform: translate(8px, 10px) rotate(1.5deg); box-shadow: var(--shadow-sm); background: color-mix(in srgb, var(--color-text) 6%, var(--color-surface)); }
.swipe-stack .swipe-card b { font-size: 22px; line-height: 1.25; }
.swipe-stack .swipe-card .hints { margin-top: auto; display: flex; justify-content: space-between; font-weight: 700; font-size: 16px; }
.swipe-stack .swipe-card .hints .ret { color: var(--color-accent-800); }
.swipe-stack .swipe-card .hints .ok { color: var(--color-accent-2-800); }
.swipe-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.swipe-actions .btn { min-height: 56px; font-family: var(--font-body); font-weight: 700; font-size: 17px; }

/* — AlertRow — */
.alert-row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 8px 10px; margin: 0 -10px; width: calc(100% + 20px);
  border: 0; border-radius: var(--radius-md); background: transparent; color: var(--color-text); text-align: left; cursor: pointer; font: inherit; font-size: 15px;
}
.alert-row:hover { background: var(--neutral-hover); }
.alert-row:active { background: var(--neutral-pressed); }
.alert-row .ico:first-child { color: var(--accent-text); }
.alert-row.ok .ico:first-child { color: var(--color-accent-2-700); }
.alert-row.attention { color: var(--color-accent-800); }
.alert-row .chev { margin-left: auto; color: var(--color-text-muted); }

/* — StatusTag / PeriodLockChip — */
.status { display: inline-flex; align-items: center; gap: 5px; border-radius: var(--radius-pill); padding: 3px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.status .ico { width: 13px; height: 13px; stroke-width: 3; }
.status.posted, .status.matched, .status.done { background: var(--color-accent-2-100); color: var(--color-accent-2-800); }
.status.review, .status.pending { background: transparent; color: var(--color-accent-800); box-shadow: inset 0 0 0 1px var(--color-accent-500); }
.status.review { background: var(--color-accent-100); box-shadow: none; }
.status.rounding { background: var(--color-neutral-200); color: var(--color-neutral-800); }
.status.locked { background: var(--locked-bg); color: var(--locked-fg); }
.status.open { background: var(--attention-bg); color: var(--attention-fg); }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 14px; border-radius: var(--radius-pill); border: 0; background: var(--color-surface); color: var(--color-text); font: inherit; font-size: 15px; white-space: nowrap; }
.chip.locked { background: var(--locked-bg); color: var(--locked-fg); }
.chip.open { background: var(--attention-bg); color: var(--attention-fg); }
.chip.light { background: var(--color-neutral-100); font-size: 13px; min-height: 28px; padding: 3px 12px; }
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-chip { border: 1px solid var(--color-accent-500); background: transparent; color: var(--accent-text); border-radius: var(--radius-pill); padding: 4px 12px; min-height: 30px; font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.filter-chip:hover { background: var(--color-accent-100); }
.filter-chip:active { background: var(--color-accent-200); }
.filter-chip[aria-pressed="true"] { background: var(--color-neutral-100); border-color: transparent; color: var(--color-text); font-weight: 600; }

/* — Floor: TableStateBadge (§5 shape + icon) — */
.floor-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; align-items: center; }
.floor-legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend-mark { width: 18px; height: 18px; border-radius: 50%; display: inline-block; flex: none; }
.legend-mark.free { border: 2px dashed var(--color-accent-2-600); }
.legend-mark.seated { background: var(--color-accent-300); }
.legend-mark.bill { background: var(--ink-bg); }
.legend-mark.overdue { background: var(--color-accent-300); box-shadow: inset 0 0 0 3px var(--color-accent); }
.legend-mark.selected { background: var(--color-accent); box-shadow: inset 0 0 0 3px var(--color-accent-800); }
.table-btn { background: transparent; border: 3px dashed var(--color-accent-2-600); color: var(--color-accent-2-800); text-align: center; line-height: 1.25; }
.table-btn b { font-size: 21px; }
.table-btn .meta { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.table-btn .meta .ico { width: 14px; height: 14px; }
.table-btn.seated { background: var(--color-accent-300); border: 0; color: var(--color-accent-900); }
.table-btn.overdue { background: var(--color-accent-300); border: 0; box-shadow: inset 0 0 0 4px var(--color-accent); color: var(--color-accent-900); }
.table-btn.bill { background: var(--ink-bg); border: 0; color: var(--ink-fg); }
.table-btn.is-selected { background: var(--color-accent-fill); border: 0; color: var(--color-on-accent); box-shadow: 0 0 0 5px var(--color-accent-800); }
.table-btn:hover { transform: scale(1.03); }
.table-btn:active { transform: scale(0.98); }
.table-btn.free:hover { background: var(--color-accent-2-100); }
.printer-status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--color-text); white-space: nowrap; border: 0; background: transparent; cursor: pointer; padding: 6px 10px; border-radius: var(--radius-pill); }
.printer-status:hover { background: var(--neutral-hover); }
.printer-status.bad { color: var(--color-accent-800); }

/* — PaymentMethodPicker / TipPicker — */
.pay-methods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pay-method { min-height: var(--pay-tile-h); border: 0; cursor: pointer; border-radius: var(--radius-lg); background: var(--color-surface); color: var(--color-text); font: inherit; font-size: 17px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px; }
.pay-method:hover { background: color-mix(in srgb, var(--color-text) 6%, var(--color-surface)); }
.pay-method:active { background: color-mix(in srgb, var(--color-text) 12%, var(--color-surface)); }
.pay-method[aria-pressed="true"] { background: var(--attention-bg); box-shadow: inset 0 0 0 2px var(--color-accent); color: var(--attention-fg); font-weight: 700; }
.tip-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tip-pill { min-height: 52px; border: 0; border-radius: var(--radius-pill); background: var(--color-surface); color: var(--color-text); font: inherit; font-size: 17px; cursor: pointer; }
.tip-pill:hover { background: color-mix(in srgb, var(--color-text) 6%, var(--color-surface)); }
.tip-pill:active { background: color-mix(in srgb, var(--color-text) 12%, var(--color-surface)); }
.tip-pill[aria-pressed="true"] { background: var(--ink-bg); color: var(--ink-fg); }

/* — CashPayment / Keypad — */
.cash-screen { display: grid; grid-template-columns: minmax(0, 1fr) 360px; min-height: calc(100vh - 170px); border-radius: var(--radius-card); overflow: hidden; background: var(--color-bg); box-shadow: var(--shadow-md); }
.cash-main { padding: 28px 32px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.cash-main h2 { font-size: 32px; display: flex; align-items: center; gap: 14px; }
.cash-panels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.cash-panel { border-radius: var(--radius-lg); background: var(--color-surface); padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; min-width: 0; border: 0; text-align: left; font: inherit; color: var(--color-text); }
.cash-panel .lbl { font-size: 14px; color: var(--color-text-muted); }
.cash-panel .big { font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cash-panel .sub { font-size: 14px; color: var(--color-text-muted); }
.cash-panel.is-active { box-shadow: inset 0 0 0 2px var(--color-accent); }
.cash-panel.change { background: var(--done-bg); color: var(--done-fg); }
.cash-panel.change .lbl, .cash-panel.change .sub { color: var(--done-fg); }
.cash-panel.short { background: var(--attention-bg); color: var(--attention-fg); }
.cash-panel.short .lbl, .cash-panel.short .sub { color: var(--attention-fg); }
.quick-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.quick-chip { min-height: 44px; padding: 8px 20px; border-radius: var(--radius-pill); border: 1px solid var(--color-accent-500); background: transparent; color: var(--accent-text); font: inherit; font-size: 15px; cursor: pointer; }
.quick-chip:hover { background: var(--color-accent-100); }
.quick-chip:active, .quick-chip[aria-pressed="true"] { background: var(--color-accent-200); color: var(--attention-fg); }
.info-note { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--color-text-muted); max-width: 640px; }
.info-note .ico { flex: none; margin-top: 1px; }
.keypad-wrap { background: var(--color-surface); display: flex; align-items: center; justify-content: center; padding: 24px; }
.keypad { display: grid; grid-template-columns: repeat(3, minmax(72px, 1fr)); gap: 12px; width: 100%; max-width: 312px; }
.key { min-height: var(--key-h); border: 0; border-radius: var(--radius-lg); background: var(--color-neutral-100); color: var(--color-text); font: inherit; font-size: 28px; cursor: pointer; display: grid; place-items: center; }
.key:hover { background: var(--color-bg); }
.key:active { background: var(--color-accent-200); }
.cash-foot { margin-top: auto; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* — DataTable (Organic .table) — */
.data-card { background: var(--color-surface); border-radius: var(--radius-card); padding: 12px 20px 16px; min-width: 0; }
.data-card .table-container { background: transparent; }
.data-card thead { background: var(--color-surface); }
.data-table { font-size: 15px; }
.data-table th.num, .data-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table tbody tr.is-clickable { cursor: pointer; }
.data-table tbody tr.is-clickable:hover { background: color-mix(in srgb, var(--color-text) 5%, transparent); }
.data-table tbody tr.is-clickable:active { background: color-mix(in srgb, var(--color-text) 9%, transparent); }
.data-table tbody tr[aria-selected="true"] { background: var(--attention-bg); font-weight: 700; }
.data-table tbody tr:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.data-table tr.total td { background: var(--done-bg); color: var(--done-fg); font-weight: 700; }
.data-table tr.strong td { font-weight: 700; }

/* — Banner (full-width pill) — */
.banner { display: flex; align-items: center; gap: 12px; border-radius: var(--radius-pill); padding: 12px 20px; font-size: 15px; min-width: 0; }
.banner.info, .banner.audit { background: var(--done-bg); color: var(--done-fg); }
.banner.offline { background: var(--ink-bg); color: var(--ink-fg); border-radius: var(--radius-lg); padding: 16px 22px; }
.banner.attention { background: var(--attention-bg); color: var(--attention-fg); }
.banner .grow { flex: 1; min-width: 0; }
.banner b { font-weight: 700; }
.banner .btn-ghost { color: inherit; font-family: var(--font-body); font-weight: 700; }

/* — EntryDrawer — */
.drawer-backdrop { position: fixed; inset: 0; z-index: 180; background: var(--overlay); display: none; }
.drawer-backdrop.is-open { display: block; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 190; width: min(var(--drawer-w), 100vw);
  background: var(--drawer-bg); box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
  transform: translateX(105%); transition: transform 0.28s var(--ease-out); visibility: hidden;
}
.drawer.is-open { transform: none; visibility: visible; }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 24px 24px 12px; }
.drawer-head h2 { font-family: var(--font-body); font-weight: 700; font-size: 22px; flex: 1; min-width: 0; }
.drawer-body { flex: 1; overflow-y: auto; padding: 4px 24px 18px; display: flex; flex-direction: column; gap: 18px; }
.drawer-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px 24px 24px; }
.doc-meta { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; align-items: start; }
.doc-thumb { aspect-ratio: 3 / 4; border-radius: var(--radius-md); background: var(--color-neutral-300); display: grid; place-items: center; color: var(--color-neutral-700); border: 0; cursor: pointer; }
.doc-thumb:hover { background: var(--color-neutral-400); }
.doc-meta dl { margin: 0; display: grid; gap: 6px; font-size: 14px; }
.doc-meta dt { font-weight: 700; display: inline; }
.doc-meta dd { margin: 0; display: inline; }
.lines-table { font-size: 14px; }
.history { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--color-text-muted); }
.history b { color: var(--color-text); font-size: 16px; }

/* — CommentThread — */
.comment-thread { display: flex; flex-direction: column; gap: 10px; }
.comment { display: flex; gap: 10px; align-items: flex-start; }
.comment .avatar { width: 30px; height: 30px; font-size: 13px; font-weight: 700; }
.comment .bubble { background: var(--color-neutral-100); border-radius: 18px; padding: 8px 14px; font-size: 14px; max-width: 520px; }
.comment-form { display: flex; gap: 8px; }

/* — Stepper (board) — */
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.board-col { border-radius: var(--radius-card); background: var(--color-surface); padding: 18px; display: flex; flex-direction: column; gap: 12px; min-height: 420px; min-width: 0; }
.board-col.is-current { background: var(--attention-bg); box-shadow: inset 0 0 0 2px var(--color-accent); }
.board-head { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.step-dot { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 14px; background: var(--color-neutral-500); color: var(--color-neutral-100); }
.step-dot .ico { width: 16px; height: 16px; stroke-width: 3.2; }
.is-done > .board-head .step-dot, .step-dot.done { background: var(--color-accent-2); color: #fff; }
.is-current > .board-head .step-dot, .step-dot.current { background: var(--color-accent-fill); color: var(--color-on-accent); }
.board-item { background: var(--color-bg); border-radius: var(--radius-md); padding: 12px 14px; font-size: 15px; }
.board-col.is-current .board-item { background: color-mix(in srgb, var(--color-bg) 70%, var(--attention-bg)); }
.board-item b { display: block; }
.board-item .note { display: flex; gap: 6px; align-items: center; color: var(--color-accent-800); font-size: 14px; margin-top: 6px; }

/* — Stepper (wizard) — */
.wizard { display: grid; grid-template-columns: 360px minmax(0, 1fr); min-height: calc(100vh - 140px); border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow-md); background: var(--color-bg); }
.wizard-side { background: var(--done-bg); color: var(--done-fg); padding: 40px 36px; display: flex; flex-direction: column; gap: 10px; }
.wizard-side .brand-name { margin-bottom: 18px; }
.wizard-step { display: flex; align-items: center; gap: 14px; border: 0; background: transparent; color: inherit; font: inherit; font-size: 16px; text-align: left; cursor: pointer; padding: 8px 10px; border-radius: var(--radius-pill); min-height: 48px; }
.wizard-step:hover { background: color-mix(in srgb, var(--done-fg) 8%, transparent); }
.wizard-step:active { background: color-mix(in srgb, var(--done-fg) 14%, transparent); }
.wizard-step .step-dot { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; width: 32px; height: 32px; }
.wizard-step.done .step-dot { background: var(--color-accent-2); color: #fff; box-shadow: none; }
.wizard-step[aria-current="step"] { font-weight: 700; }
.wizard-step[aria-current="step"] .step-dot { background: var(--ink-bg); color: var(--ink-fg); box-shadow: none; }
.wizard-main { padding: 48px 72px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.wizard-main h2 { font-size: 44px; }
.wizard-main .lead { font-size: 18px; color: var(--color-text-muted); max-width: 640px; }
.device-card { display: flex; align-items: center; gap: 16px; padding: 22px 24px; border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: inset 0 0 0 2px var(--color-accent-2); max-width: 680px; }
.device-card .blob { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--color-bg); flex: none; }
.wizard-foot { margin-top: auto; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* — StockLevelBar — */
.stock-level { display: flex; align-items: center; gap: 12px; min-width: 0; }
.stock-bar { width: 120px; height: 10px; border-radius: 999px; background: var(--color-neutral-300); overflow: hidden; flex: none; }
.stock-bar > span { display: block; height: 100%; border-radius: 999px; background: var(--color-accent-2); }
.stock-level.low .stock-bar > span { background: var(--color-accent); }
.stock-level .qty { white-space: nowrap; }
.stock-level.low .qty { font-weight: 700; }

/* — BottomSheet — */
.sheet-backdrop { position: fixed; inset: 0; z-index: 220; background: var(--overlay); display: none; align-items: flex-end; justify-content: center; }
.sheet-backdrop.is-open { display: flex; }
.sheet { width: min(560px, 100%); background: var(--color-bg); border-radius: var(--radius-sheet) var(--radius-sheet) 0 0; padding: 28px 24px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-lg); animation: sheetIn 0.25s var(--ease-out); }
@media (min-width: 641px) { .sheet-backdrop { align-items: center; } .sheet { border-radius: var(--radius-sheet); } }
.sheet .blob { width: 64px; height: 64px; border-radius: 50%; background: var(--attention-bg); color: var(--color-accent-800); display: grid; place-items: center; }
.sheet h2 { font-family: var(--font-body); font-weight: 700; font-size: 24px; }
.sheet p { color: var(--color-text-muted); font-size: 16px; line-height: 1.55; }
.sheet .btn-lg { min-height: 56px; }
@keyframes sheetIn { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* — EmptyState — */
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; padding: 24px 8px; }
.empty-state .blob { width: 120px; height: 120px; border-radius: 50%; background: var(--attention-bg); color: var(--color-accent-800); display: grid; place-items: center; }
.empty-state .blob .ico { width: 48px; height: 48px; }
.empty-state h3 { font-family: var(--font-body); font-weight: 700; font-size: 20px; }
.checklist { display: flex; flex-direction: column; width: 100%; max-width: 420px; text-align: left; }
.checklist-item { display: flex; align-items: center; gap: 14px; min-height: var(--row-h-mobile); border: 0; background: transparent; font: inherit; font-size: 17px; color: var(--color-text); cursor: pointer; border-radius: var(--radius-md); padding: 4px 6px; }
.checklist-item:hover { background: var(--neutral-hover); }
.checklist-item:active { background: var(--neutral-pressed); }
.checklist-item .ring { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 2.5px var(--color-text); flex: none; }
.checklist-item.done { cursor: default; }
.checklist-item.done .ico:first-child { color: var(--color-accent-2-700); }
.checklist-item .chev { margin-left: auto; }

/* — ResultScreen — */
.result-screen { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; background: var(--done-bg); color: var(--done-fg); border-radius: var(--radius-card); padding: 48px 24px 24px; min-height: 560px; }
.result-screen .check { width: 96px; height: 96px; border-radius: 50%; background: var(--color-accent-2); color: #fff; display: grid; place-items: center; }
.result-screen .check .ico { width: 44px; height: 44px; stroke-width: 3.2; }
.result-screen .amount { font-family: var(--font-heading); font-size: 56px; line-height: 1; }
.result-screen .ref { font-size: 16px; }
.result-screen .actions { margin-top: auto; width: 100%; max-width: 420px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.result-screen .actions .btn-primary { grid-column: span 2; }
.result-screen .btn-secondary { color: var(--done-fg); border-color: color-mix(in srgb, var(--done-fg) 25%, transparent); min-height: 52px; }

/* — Reports / Accountant layouts (list + content) — */
.split-view { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 24px; align-items: start; }
.side-list { background: var(--color-surface); border-radius: var(--radius-card); padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: calc(var(--appbar-h) + 8px); }
.side-list .nav-item { min-height: 44px; }
.side-list .nav-item .badge-count { margin-left: auto; min-width: 24px; height: 24px; padding: 0 8px; border-radius: 999px; background: var(--color-neutral-100); color: var(--color-text); font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.side-list .nav-item[aria-current="page"] .badge-count { background: var(--color-bg); color: var(--color-accent-800); }
.queue { display: flex; flex-direction: column; gap: 12px; }
.queue-item { background: var(--color-surface); border-radius: var(--radius-card); padding: 18px 22px; display: flex; flex-direction: column; gap: 12px; }
.queue-item .top { display: flex; align-items: center; gap: 16px; }
.queue-item .top > .ico { flex: none; color: var(--color-text); }
.queue-item .top .body { flex: 1; min-width: 0; }
.queue-item .top .body b { display: block; }
.queue-item .top .body span { color: var(--color-text-muted); font-size: 14px; }
.queue-item .acts { display: flex; gap: 10px; flex: none; align-items: center; flex-wrap: wrap; }
.queue-item.is-done { opacity: 0.7; }
.page-head { display: flex; align-items: flex-end; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h2 { font-size: 40px; }
.page-head .eyebrow { display: block; color: var(--color-text-muted); font-size: 15px; margin-bottom: 4px; }
.page-head .actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.summary-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, max-content)); gap: 14px; margin-bottom: 18px; }
.summary-tile { background: var(--color-surface); border-radius: var(--radius-lg); padding: 16px 20px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.summary-tile .lbl { font-size: 14px; color: var(--color-text-muted); }
.summary-tile b { font-size: 24px; }
.summary-tile.attention { background: var(--attention-bg); color: var(--attention-fg); }
.summary-tile.attention .lbl { color: var(--attention-fg); }
.sign-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; font-size: 14px; color: var(--color-text-muted); }
.sign-bar .grow { flex: 1; min-width: 240px; }

/* — Mobile (2a) screens — */
.mobile-only { display: none !important; }
.m-tiles { display: grid; gap: 14px; }
.m-tile { border-radius: var(--radius-card); background: var(--color-surface); padding: 22px; display: flex; flex-direction: column; gap: 6px; border: 0; text-align: left; font: inherit; color: var(--color-text); }
.m-tile.hero { background: var(--attention-bg); color: var(--attention-fg); }
.m-tile .money.size-hero .money-eur { font-size: var(--fs-hero-mobile); }
.m-context { display: flex; align-items: center; gap: 10px; min-height: 48px; width: 100%; border: 0; background: transparent; font: inherit; font-size: 18px; font-weight: 700; color: var(--color-text); padding: 0; cursor: pointer; }
.m-context .chev { margin-left: auto; }
.fab { position: fixed; right: 20px; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 55; min-height: 56px; padding: 14px 24px; font-size: 18px; box-shadow: var(--shadow-md); }
.mobile-sale-total { display: flex; align-items: baseline; gap: 10px; }
.mobile-sale-total b:first-child { flex: 1; font-size: 17px; }
.mobile-sale-total .money-eur { font-size: 40px; font-weight: 700; }
.qty-circle { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--color-surface); flex: none; font-weight: 600; border: 0; font: inherit; cursor: pointer; color: var(--color-text); }
.qty-circle.is-last { background: var(--color-accent-fill); color: var(--color-on-accent); }
.torch-btn { position: absolute; top: 14px; right: 14px; z-index: 2; width: 48px; height: 48px; border-radius: 50%; border: 0; background: color-mix(in srgb, var(--color-bg) 22%, transparent); color: var(--color-bg); display: grid; place-items: center; cursor: pointer; }
.torch-btn:hover { background: color-mix(in srgb, var(--color-bg) 32%, transparent); }
.torch-btn[aria-pressed="true"] { background: var(--color-bg); color: var(--color-text); }

/* — 2a shell additions — */
.header-pickers { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; }
.appbar-title { min-width: 0; }
.appbar-title h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar .appbar-title h1 { font-size: clamp(24px, 2.2vw, 30px); }
.chart-card > .chart { flex: 1; }
.chart-card > .chart .chart-body { min-height: 280px; }
.seg-opt .ico { margin-right: 6px; vertical-align: -4px; }
@media (max-width: 1440px) { .header-pickers:not([hidden]) ~ .search-trigger { display: none; } }
.header-pickers[hidden] { display: none; }
.nav-group-label { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-muted); padding: 14px 16px 4px; }
.nav-item-sm { min-height: 40px; font-size: 15px; }
.sidebar [hidden] { display: none !important; }
.desktop-contents { display: contents; }
.section-title { font-family: var(--font-body); font-weight: 700; font-size: 20px; margin: 22px 0 12px; }
.card-title { font-family: var(--font-body); font-weight: 700; font-size: 17px; margin-bottom: 8px; }
.task-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
.attention-card .alert-row { color: var(--color-accent-800); }
.attention-card .alert-row.ok { color: var(--color-text); }
.euro-card b { display: inline-flex; align-items: center; gap: 8px; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sheet textarea { width: 100%; }
.drawer-status { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.legacy-heading { margin-top: 32px; }
#range-popover label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 600; }
.next-steps { margin-top: 8px; }

/* =========================================================================
   7. RESPONSIVE
   ========================================================================= */
@media (max-width: 1560px) {
  .search-trigger { min-width: 0; }
  .search-trigger .label, .search-trigger kbd, .device-chip .label { display: none; }
}
@media (max-width: 1280px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .floor { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .close-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-trigger { min-width: 0; }
  .search-trigger .label, .search-trigger kbd { display: none; }
}
@media (max-width: 1100px) {
  .dash-grid, .flow-dash, .books-screen { grid-template-columns: minmax(0, 1fr); }
  .flow-dash { gap: 28px; }
  .pos-screen { grid-template-columns: minmax(0, 1fr) 340px; }
  .readiness { position: static; }
  .venue-chip { display: none; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; z-index: 160; left: 0; top: 0; bottom: 0; width: min(300px, 86vw);
    transform: translateX(-105%); transition: transform 0.28s var(--ease-out); box-shadow: var(--shadow-lg);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 155; background: color-mix(in srgb, var(--color-neutral-900) 40%, transparent); }
  .menu-toggle { display: inline-grid; }
  .appbar { padding: 12px 18px; gap: 10px; }
  .appbar-title h1 { font-size: 24px; }
  main.container { padding: 4px 18px 120px; }
  .pos-screen { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .ticket, .cart { position: sticky; bottom: 0; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .floor { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 22px; gap: 18px; grid-auto-rows: 100px; }
  .device-chip .label { display: none; }
}

/* Phone — mirrors the 390px mobile wireframes */
@media (max-width: 640px) {
  div.mobile-only, section.mobile-only { display: block !important; }
  button.mobile-only.m-context { display: flex !important; }
  .btn.fab.mobile-only { display: inline-flex !important; }
  .desktop-only, .desktop-contents, .header-pickers { display: none !important; }
  .kpi-row { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .kpi-card { min-height: 0; padding: 22px; }
  .kpi-card.hero .money.size-hero .money-eur { font-size: var(--fs-hero-mobile); }
  .dash-side .euro-card { display: none; }
  .attention-card { background: transparent; padding: 0; box-shadow: none; }
  .attention-card .card-title { font-size: 20px; margin: 10px 0 4px; }
  .attention-card .alert-row { min-height: var(--row-h-mobile); font-size: 17px; }
  .next-steps > .section-title { display: none; }
  .swipe-stack { min-height: 230px; margin-top: 4px; }
  body[data-active-view="dashboard"] .ai-launcher { bottom: calc(168px + env(safe-area-inset-bottom)); }
  body { font-size: 15px; }
  .appbar { min-height: 64px; }
  .appbar-title p { display: none; }
  .appbar-actions .search-trigger, .appbar-actions .device-chip { display: none; }
  #network-status-text { display: none; }
  .card { padding: 18px; border-radius: var(--radius-lg); }
  .kpi { padding: 16px; border-radius: var(--radius-lg); }
  .kpi-value { font-size: 22px; }
  .kpi-sub { font-size: 13px; }
  .kpi-label { font-size: 13px; }
  .kpi-grid { gap: 12px; }
  .dash-grid .chart-card { display: none; }
  .view-head h2 { font-size: 28px; }
  .close-head h2 { font-size: 34px; }
  .close-board { grid-template-columns: minmax(0, 1fr); }
  .close-col { min-height: 0; }
  .hero-number { font-size: 64px; }
  .hourly { height: 160px; padding: 16px; }
  .next-steps .steps-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; scrollbar-width: none; }
  .next-steps .steps-track::-webkit-scrollbar { display: none; }
  .next-steps .steps-track > * { flex: 0 0 100%; scroll-snap-align: start; flex-direction: column; align-items: stretch; }
  .next-steps .steps-track .blob { display: none; }
  .carousel-dots { display: flex; }
  .toast-stack { left: 16px; right: 16px; bottom: 96px; }
  .toast-item { min-width: 0; }
  .ai-launcher { bottom: 92px; right: 16px; padding: 12px; }
  .ai-launcher .label { display: none; }
  .ai-drawer { right: 16px; left: 16px; width: auto; bottom: 150px; height: calc(100vh - 230px); }
  .modal { padding: 22px 18px; border-radius: var(--radius-lg); }
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal-backdrop .modal { border-radius: var(--radius-lg) var(--radius-lg) 0 0; max-height: 94vh; width: 100%; }
  .pos-main { padding: 16px; }
  .pos-toolbar h3 { font-size: 24px; }
  .pos-legend { display: none; }
  .floor { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 96px; gap: 14px 10px; padding: 18px 14px; }
  .table-btn { width: min(100%, 92px); }
  .table-btn b { font-size: 19px; }
  .table-btn span { font-size: 11.5px; }
  .table-btn.long { height: 76px; }
  #tab-pos .view-head .btn-secondary { display: none; }
  .peek {
    display: flex; align-items: center; gap: 12px; position: sticky; z-index: 5;
    bottom: calc(92px + env(safe-area-inset-bottom)); margin-top: 4px;
    background: var(--color-text); color: var(--color-bg); border-radius: var(--radius-pill);
    padding: 8px 8px 8px 20px; box-shadow: var(--shadow-lg); font-size: 15px;
  }
  .peek b { font-variant-numeric: tabular-nums; }
  .peek .btn { margin-left: auto; }
  .peek[hidden] { display: none; }
  .ticket, .cart { padding: 20px; }
  .journal-card { padding: 6px 12px 10px; }

  /* 1a bottom tab bar */
  .tabbar {
    display: flex; justify-content: space-around; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--color-surface); padding: 10px 6px calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 -6px 20px color-mix(in srgb, #2e2b25 10%, transparent);
  }
  .tabbar button { border: 0; background: transparent; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; color: var(--color-text); padding: 4px 10px; border-radius: 14px; min-width: 56px; }
  .tabbar button[aria-current="page"] { color: var(--color-accent-700); }
  .tabbar button[aria-current="page"] .ico { stroke: var(--color-accent); }
  /* 1b floating dark pill */
  .tabbar.flow {
    left: 50%; right: auto; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%);
    background: var(--color-text); border-radius: 999px; padding: 6px; gap: 4px; box-shadow: var(--shadow-lg);
  }
  .tabbar.flow button { flex-direction: row; color: var(--color-bg); font-size: 14px; padding: 10px 14px; min-width: 0; border-radius: 999px; }
  .tabbar.flow button .ico { display: none; }
  .tabbar.flow button[aria-current="page"] { background: var(--color-bg); color: var(--color-text); }

  /* POS as mobile checkout */
  .pos-screen { border-radius: var(--radius-lg); box-shadow: none; background: transparent; }
  .pos-main { background: transparent; padding: 0 0 16px; }
  .ticket { border-radius: var(--radius-lg); position: static; }
  .scan-area { display: flex; }
  .scan-area {
    position: relative; height: 230px; border-radius: var(--radius-lg); background: var(--color-ink-panel);
    align-items: center; justify-content: center; overflow: hidden;
  }
  .scan-area video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
  .scan-frame { width: 230px; height: 140px; border-radius: var(--radius-lg); box-shadow: 0 0 0 3px var(--color-accent); position: relative; z-index: 1; }
  .scan-hint { position: absolute; bottom: 14px; color: var(--color-neutral-300); font-size: 14px; z-index: 1; }
  .cart { border-radius: 32px 32px var(--radius-lg) var(--radius-lg); background: var(--color-surface); color: var(--color-text); position: static; }
  .cart .muted, .cart .bgn-line { color: var(--color-text-muted); }
  .cart-line .qty { background: var(--color-bg); }
  .cash-box { background: var(--color-bg); }
  .cash-box input { background: var(--color-surface); border-color: var(--color-divider); }
  .cash-box .seg { background: var(--color-surface); }
  .pay-pair button { background: var(--color-bg); }
  .pay-pair button:hover { background: var(--color-neutral-300); }
  .cart::before { content: ""; width: 44px; height: 5px; border-radius: 999px; background: var(--color-neutral-400); align-self: center; margin-top: -10px; }
  .retail .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-tile { min-height: 150px; }
  .product-tile .thumb { min-height: 64px; font-size: 30px; }
}

/* =========================================================================
   8. PRINT
   ========================================================================= */
@media print {
  .sidebar, .appbar, .tabbar, .btn, .ai-launcher, .ai-drawer, .toast-stack, .cmd-palette-backdrop, .finflow-inspector-sidebar, .cookie-banner { display: none !important; }
  .app { display: block; }
  body { background: #fff !important; color: #000 !important; }
  .card { background: #fff !important; box-shadow: none !important; border: 1px solid #ccc !important; break-inside: avoid; margin-bottom: 18px !important; }
  .tab-panel { display: block !important; }
}

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

/* POS round 2 modals: cash screen and receipt fill the viewport on phones */
.modal-backdrop.modal-full { padding: 24px; }
.modal-backdrop.modal-full .cash-screen { width: min(1180px, 100%); }
.result-wrap { width: min(520px, 100%); }
#pos-offline:empty { display: none; }
#pos-offline { margin-bottom: 14px; }
.checkout-lines { display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.checkout-total { padding-top: 12px; border-top: 1px solid var(--border-subtle); }
#pos-floor-status:empty, #pos-floor-legend:empty { display: none; }
@media (max-width: 640px) {
  .modal-backdrop.modal-full { padding: 0; align-items: stretch; }
  .modal-backdrop.modal-full .cash-screen { grid-template-columns: 1fr; min-height: 100vh; border-radius: 0; }
  .cash-main { padding: 20px 16px; }
  .cash-main h2 { font-size: 24px; }
  .cash-panels { grid-template-columns: 1fr; }
  .result-wrap { width: 100%; }
  .result-wrap .result-screen { border-radius: 0; min-height: 100vh; }
}
/* Retail cart and restaurant ticket stay in view while the product grid scrolls */
@media (min-width: 901px) {
  .pos-screen { overflow: clip; }
  .pos-screen > .cart, .pos-screen > .ticket { position: sticky; top: 96px; align-self: start; height: calc(100vh - 112px); max-height: 820px; }
}
.cart-line .rm { min-width: 36px; min-height: 36px; display: grid; place-items: center; }
.cart-line .rm:focus-visible { outline: 2px solid var(--color-ink-panel-text); outline-offset: 2px; opacity: 1; }
@media (pointer: coarse) { .cart-line .rm { min-width: 44px; min-height: 44px; } }

/* 2a Accounting — journal */
.journal-screen { display: flex; flex-direction: column; gap: 16px; }
.journal-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.journal-head .search-bar { max-width: 360px; flex: 1; }
.chip-filter { border: 1px solid var(--color-accent); background: transparent; color: var(--color-accent-800); cursor: pointer; font-size: 14px; }
.chip-filter:hover { background: var(--attention-bg); }
.chip-filter:active { background: color-mix(in srgb, var(--color-accent) 22%, transparent); }
.chip-filter[aria-pressed="true"] { background: var(--color-bg); border-color: transparent; color: var(--color-text); font-weight: 700; box-shadow: var(--shadow-sm); }
.journal-card { padding: 8px 18px 12px; }
.journal-card .doc { font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table tbody tr.is-attention:not([aria-selected="true"]) td:first-child { box-shadow: inset 3px 0 0 var(--color-accent); }
.journal-hint { font-size: 13px; }
@media (max-width: 900px) { .journal-hint { display: none; } }

/* 2b Close */
.close-head { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.close-head h2 { font-size: clamp(30px, 3.4vw, 44px); }
.board-item .comment-thread { margin-top: 10px; }
.board-item .comment .bubble { background: var(--color-surface); }
.board-item .comment-form input { min-height: 36px; padding: 4px 12px; font-size: 14px; min-width: 0; flex: 1; }
.match-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; font-size: 14px; }
.match-row span { flex: 1 1 100%; }
.match-row input { min-height: 36px; padding: 4px 12px; flex: 1; min-width: 0; }
@media (max-width: 1100px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .board { grid-template-columns: 1fr; } .board-col { min-height: 0; } }
.drawer-foot .btn { padding-inline: 12px; font-size: 15px; min-width: 0; white-space: normal; }
.board-item .comment .avatar { display: none; }
.board-item .comment .bubble { padding: 6px 12px; font-size: 13px; max-width: none; }
@media (max-width: 640px) {
  .journal-head .search-bar { max-width: none; flex: 1 1 100%; }
  .journal-card { padding: 4px 8px 8px; }
  .journal-card .data-table th:nth-child(2), .journal-card .data-table td:nth-child(2) { display: none; }
  .journal-card .data-table td, .journal-card .data-table th { padding-inline: 8px; }
}

/* 2c screens */
.page-head h2 .light { font-family: var(--font-body); font-weight: 400; font-size: 0.72em; }
.page-head h2.h-sm { font-family: var(--font-body); font-weight: 700; font-size: 22px; }
.queue-item .linkish { flex: 1; min-width: 0; border: 0; background: transparent; padding: 4px 6px; margin: -4px -6px; text-align: left; font: inherit; color: inherit; border-radius: var(--radius-md); cursor: pointer; }
.queue-item .linkish:hover:not(:disabled) { background: var(--neutral-hover); }
.queue-item .linkish:active:not(:disabled) { background: color-mix(in srgb, var(--color-text) 9%, transparent); }
.queue-item .linkish:disabled { cursor: default; }
.queue-item .linkish b { display: block; }
.queue-item .linkish span { color: var(--color-text-muted); font-size: 14px; }
.queue-item .comment-thread { padding-left: 40px; }
.side-list .search-bar { margin-bottom: 8px; }
.found-card { display: flex; align-items: center; gap: 16px; padding: 20px 22px; border-radius: var(--radius-card); background: var(--color-surface); box-shadow: inset 0 0 0 2px var(--color-accent-2); max-width: 680px; }
.found-card > .ico { width: 56px; height: 56px; padding: 14px; border-radius: 50%; background: var(--color-bg); flex: none; }
.found-card .grow { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; max-width: 680px; align-items: end; }
.field-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 15px; margin: 0; }
.field-grid input:invalid:not(:placeholder-shown) { box-shadow: inset 0 0 0 2px var(--color-accent); }
.field-grid .field-error, .field-grid .ok-line, .field-grid .btn { grid-column: 1 / -1; justify-self: start; }
.field-error { display: flex; gap: 8px; align-items: center; color: var(--color-accent-800); font-size: 14px; }
.ok-line { display: flex; gap: 8px; align-items: center; font-size: 15px; }
.ok-line .ico { color: var(--color-accent-2); }
.report-card .data-table td:first-child { white-space: nowrap; }
@media (max-width: 900px) {
  .split-view { grid-template-columns: 1fr; }
  .side-list { position: static; flex-direction: row; overflow-x: auto; }
  .side-list .search-bar { min-width: 200px; margin: 0; }
  .side-list .nav-item { white-space: nowrap; flex: none; }
  .wizard { grid-template-columns: 1fr; }
  .wizard-side { padding: 20px; }
  .wizard-main { padding: 24px 16px; }
  .wizard-main h2 { font-size: 30px; }
  .field-grid { grid-template-columns: 1fr; }
  .summary-tiles { grid-template-columns: 1fr; }
  .page-head h2 { font-size: 30px; }
}
@media print {
  .sidebar, .app-header, .appbar, .side-list, .page-head .actions, .tabbar, .ai-launcher { display: none !important; }
  .split-view { display: block; }
}
#dash-empty:empty { display: none; }
#tab-dashboard.is-empty .chart-card, #tab-dashboard.is-empty .next-steps, #tab-dashboard.is-empty .euro-card { display: none; }
#tab-dashboard.is-empty .kpi-card.hero .money-eur { color: var(--color-neutral-700); }
#dash-empty .empty-state { max-width: 520px; margin: 8px auto 0; }
@media (max-width: 640px) {
  #tab-dashboard.is-empty .attention-card, #tab-dashboard.is-empty .fab, #tab-dashboard.is-empty .getting-started { display: none !important; }
  .queue-item { padding: 16px; }
  .queue-item .top { flex-wrap: wrap; }
  .queue-item .acts { width: 100%; padding-left: 40px; }
  .queue-item .comment-thread { padding-left: 0; }
  .side-list { background: transparent; padding: 0; }
  .wizard-steps { display: flex; gap: 6px; flex-wrap: wrap; }
  .wizard-step { padding: 4px; }
  .wizard-step:not([aria-current="step"]) > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .wizard-side .brand-name { display: none; }
}

/* — states the legacy views were missing (§5): pressed, disabled, read-only — */
.btn.amber:active { background: var(--color-accent-400); }
.btn.danger:active { background: color-mix(in srgb, var(--color-danger) 72%, black); }
button.pill:active, a.pill:active, .printer-status:active, .qty-ctrl button:active { background: var(--neutral-pressed); }
.qty-ctrl button:disabled, .printer-status:disabled, .chip-filter:disabled, .wizard-step:disabled, .cart-line .rm:disabled,
button.pill:disabled { opacity: var(--disabled-opacity); cursor: not-allowed; }
input:disabled, select:disabled, textarea:disabled { opacity: var(--disabled-opacity); cursor: not-allowed; background: var(--color-surface); }
input:disabled:hover, select:disabled:hover, textarea:disabled:hover { border-color: var(--color-divider); }
input[readonly] { background: var(--color-surface); }

/* — touch targets (§5, §11): every control is at least 44×44px on phones and touch screens — */
@media (max-width: 900px), (pointer: coarse) {
  .btn, .btn-sm, .seg-opt, .chip, .chip.light, .nav-item, .nav-item-sm, .printer-status, button.pill, a.pill, button.tag,
  input:not([type="checkbox"]):not([type="radio"]), select { min-height: 44px; }
  .btn-icon, .icon-btn { width: 44px; height: 44px; min-height: 44px; }
  button.pill, a.pill { min-width: 44px; justify-content: center; }
  .wizard-step, .cart-line .rm { min-width: 44px; min-height: 44px; }
  .qty-ctrl { opacity: 1; gap: 4px; }
  .qty-ctrl button { width: 44px; height: 44px; }
}
