/* Dojoon Store: the back office and the platform console.

   One tinted frame (the menu and the top bar, no rule between them) around
   a white sheet where the work is. The chrome carries no colour: bottle
   green is kept for the data (today's bars, a till that is connected) and
   for the mark. The one filled button is near-black.

   Written with logical properties: the same rules read right-to-left in
   Arabic and left-to-right in English. */

:root {
  --ground: #f3f6f4;        /* the frame: a green-grey step of the bottle green */
  --surface: #ffffff;
  --raised: #f5f7f6;
  --active: #e5eae7;
  --border: #e3e8e5;
  --rule: #eef1ef;
  --control: #c6cdc9;
  --text: #131614;
  --ink: #131614;
  --muted: #59605c;
  --primary: #1b1e1c;
  --accent: #1b5a4d;
  --chart-1: #1b5a4d;
  --chart-muted: #cfd6d2;
  --grid: #e6eae8;
  --axis-ink: #59605c;
  --positive: #1e7b4f;
  --negative: #c4242a;
  --pill-positive-bg: #dcf5e6; --pill-positive-ink: #0b3d24;
  --pill-negative-bg: #ffedea; --pill-negative-ink: #831c1e;
  --pill-warning-bg: #fff7dd;  --pill-warning-ink: #7a4a05;
  --pill-neutral-bg: #e9edeb;  --pill-neutral-ink: #2f3532;
  --radius-card: 8px;
  --radius-control: 6px;
  --radius-sheet: 16px;
  --gap: 24px;
  --pad: 24px;
  --control-height: 32px;
  --side: 228px;
  --font: 'IBM Plex Sans', 'IBM Plex Sans Arabic', system-ui, 'Segoe UI', Tahoma, sans-serif;
  --mono: 'IBM Plex Mono', 'IBM Plex Sans Arabic', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { font-size: 14px; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 20px;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
[dir='rtl'] body { line-height: 22px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 22px; font-weight: 600; line-height: 28px; letter-spacing: -0.01em; }
h2 { font-size: 16px; font-weight: 600; line-height: 24px; }
h3 { font-size: 14px; font-weight: 600; margin-block: 24px 8px; }
a { color: var(--text); text-underline-offset: 3px; }
small { font-size: 12px; }
.muted { color: var(--muted); }
.num, td.num, th.num { font-variant-numeric: tabular-nums; text-align: end; white-space: nowrap; }
.minus { color: var(--negative); }
.id { font-family: var(--mono); font-size: 13px; direction: ltr; unicode-bidi: isolate; }
[dir='rtl'] small.id { text-align: right; }

:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

/* ----------------------------------------------------------- controls */
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea {
  width: 100%;
  padding: 6px 10px;
  background: var(--surface);
  border: 1px solid var(--control);
  border-radius: var(--radius-control);
  min-height: 38px;
}
input::placeholder { color: var(--muted); }
input:hover, select:hover, textarea:hover { border-color: #9aa39e; }
input[type='checkbox'], input[type='radio'] { width: 16px; height: 16px; min-height: 0; padding: 0; accent-color: var(--primary); flex: none; }
input[type='number'] { font-variant-numeric: tabular-nums; }

button {
  cursor: pointer; border-radius: var(--radius-control); border: 1px solid transparent;
  padding: 0 12px; min-height: var(--control-height); background: none; white-space: nowrap; font-weight: 500;
}
button:disabled { opacity: 0.55; cursor: default; }
button:active:not(:disabled) { transform: translateY(1px); }
button.primary { background: var(--primary); color: #fff; }
button.primary:hover:not(:disabled) { background: #000; }
button.quiet { border-color: var(--control); background: var(--surface); }
button.quiet:hover:not(:disabled) { border-color: var(--text); }
button.quiet.danger, button.danger { color: var(--negative); }
button.quiet.danger:hover:not(:disabled) { border-color: var(--negative); }
button.ghost { padding-inline: 8px; color: var(--muted); }
button.ghost:hover { color: var(--text); background: var(--active); }
button.link { padding: 0; min-height: 0; text-decoration: underline; text-underline-offset: 3px; font-weight: 400; }
button.big { width: 100%; min-height: 40px; }
a.button { display: inline-flex; align-items: center; min-height: var(--control-height); padding: 0 12px; border-radius: var(--radius-control); font-weight: 500; text-decoration: none; white-space: nowrap; border: 1px solid var(--control); background: var(--surface); }
a.button:hover { border-color: var(--text); }
a.button.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
a.button.primary:hover { background: #000; }
label.file { display: inline-flex; align-items: center; cursor: pointer; border: 1px solid var(--control); border-radius: var(--radius-control); padding: 0 12px; min-height: var(--control-height); background: var(--surface); font-weight: 500; }

.field { display: block; margin-block-end: 16px; }
.field-label { display: block; font-weight: 500; margin-block-end: 8px; }
.field-label em { color: var(--negative); font-style: normal; }
.field .hint { display: block; color: var(--muted); margin-block-start: 6px; }
.field .error { display: block; color: var(--negative); margin-block-start: 6px; }
.field.invalid input, .field.invalid select { border-color: var(--negative); }
.field.check, label.check { display: flex; align-items: center; gap: 8px; }
label.check { white-space: nowrap; min-height: var(--control-height); }
.checks { border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); }
.check-row { display: flex; gap: 10px; padding: 10px 12px; align-items: flex-start; cursor: pointer; }
.check-row + .check-row { border-block-start: 1px solid var(--rule); }
.check-row input { margin-block-start: 3px; }
.check-row strong { font-weight: 500; }
.check-row small { display: block; color: var(--muted); }
.lines .mini { margin-block-start: 8px; }
table.mini { width: 100%; border-collapse: collapse; }
table.mini td, table.mini th { padding: 4px; text-align: start; font-weight: 500; }
td.narrow { width: 104px; }
td.narrow input { min-height: 32px; padding: 4px 8px; }
td.tight { width: 36px; }
form.inline { display: flex; gap: 8px; margin-block-start: 8px; }
form.inline input { max-width: 160px; min-height: var(--control-height); }

/* A choice of a few: a track with the chosen one lifted. */
.segmented { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 2px; background: var(--active); border-radius: 8px; margin-block: 12px; }
.segmented button { min-height: 30px; color: var(--muted); }
.segmented button.on { background: var(--surface); color: var(--text); }
.till-pay .segmented { display: grid; }

/* Tabs on a rule. */
.tabs { display: flex; gap: 20px; border-block-end: 1px solid var(--border); margin-block-end: 20px; overflow-x: auto; }
.tabs button { display: inline-flex; align-items: center; gap: 6px; padding: 0; min-height: 36px; border-radius: 0; color: var(--muted); border-block-end: 2px solid transparent; margin-block-end: -1px; }
.tabs button.on { color: var(--text); border-block-end-color: var(--text); font-weight: 600; }

/* -------------------------------------------------------------- picker */
.picker { position: relative; margin-block-end: 12px; }
.picker-list {
  position: absolute; inset-inline: 0; z-index: 5; margin: 4px 0 0; padding: 4px; list-style: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
  box-shadow: 0 8px 24px rgba(19, 22, 20, 0.12);
}
.picker-list li { display: flex; gap: 16px; padding: 8px 10px; border-radius: 4px; cursor: pointer; }
.picker-list li > :first-child { flex: 1; }
.picker-list li:hover { background: var(--active); }

/* ------------------------------------------------------------ the mark */
.brand { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--text); }
.brand svg { flex: none; color: var(--accent); }
.brand small { font-size: 12px; font-weight: 500; color: var(--muted); padding: 1px 6px; background: var(--active); border-radius: 4px; }

/* ---------------------------------------------------------------- gate */
.boot { min-height: 100vh; }
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--ground); }
.gate-card { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sheet); padding: 32px; }
.gate-card h1 { margin-block: 28px 24px; }
.gate-card h1:has(+ p) { margin-block-end: 4px; }
.gate-card h1 + p { color: var(--muted); margin-block-end: 24px; }
.gate-error { color: var(--pill-negative-ink); background: var(--pill-negative-bg); padding: 8px 12px; border-radius: var(--radius-control); margin-block-end: 16px; }
.gate-links { display: flex; justify-content: space-between; margin-block-start: 20px; color: var(--muted); }
.gate-done { display: grid; gap: 4px; padding: 14px 16px; background: var(--raised); border-radius: var(--radius-card); margin-block: 16px 20px; }
.gate-done strong { font-size: 22px; line-height: 28px; font-weight: 500; font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------- shell */
.shell {
  display: grid; grid-template-columns: var(--side) minmax(0, 1fr); grid-template-rows: 48px minmax(0, 1fr);
  height: 100vh; background: var(--ground);
}
.side { grid-row: 1 / 3; overflow-y: auto; padding: 14px 10px 24px; }
.side .brand { padding-inline: 10px; min-height: 28px; }
.side-scope { margin: 14px 0 0; padding: 8px 10px; border-radius: var(--radius-card); background: var(--active); }
.side-scope strong { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-scope span { display: block; color: var(--muted); font-size: 12px; }
.side-group { margin-block-start: 20px; }
.side-group h3 { margin: 0 0 4px; padding-inline: 10px; font-size: 12px; font-weight: 400; color: var(--muted); }
.side a { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; padding: 0 10px; margin-block-end: 2px; border-radius: 8px; color: var(--muted); text-decoration: none; }
.side a:hover { color: var(--text); }
.side a.on { background: var(--active); color: var(--text); font-weight: 500; }
.side a .count { background: var(--surface); }

.top { grid-column: 2; display: flex; align-items: center; gap: 8px; padding-inline: 4px 16px; min-width: 0; }
.top .spacer { flex: 1; }
.top-title { font-weight: 600; display: none; }
.branch-switch { width: auto; min-width: 176px; min-height: var(--control-height); padding-block: 4px; font-weight: 500; }
.branch-name { font-weight: 500; padding-inline: 8px; }
.me { display: flex; flex-direction: column; line-height: 16px; text-align: end; padding-inline: 8px; }
.me strong { font-weight: 500; }
.me small { color: var(--muted); }
.menu-toggle { display: none; }
.busy { width: 8px; height: 8px; border-radius: 50%; background: transparent; }
.busy.on { background: var(--accent); }

.canvas {
  grid-column: 2; min-width: 0; overflow-y: auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sheet);
  margin-inline-end: 8px; margin-block-end: 8px;
}
.page { padding: var(--pad); max-width: 1360px; }
.narrow-page { max-width: 760px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-block-end: var(--gap); min-height: 36px; }
.page-head p { margin-block-start: 2px; max-width: 72ch; color: var(--muted); }
.page-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.page-actions select { width: auto; min-height: var(--control-height); padding-block: 4px; }
.stamp { color: var(--muted); font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-block-end: 16px; }
.filters input, .filters select { min-height: var(--control-height); padding-block: 4px; }
.filters > input[type='search'] { max-width: 316px; }
.filters select { width: auto; }
.filters .total { margin-inline-start: auto; color: var(--muted); }
.period { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.period input { width: auto; }

/* --------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: start; font-weight: 400; color: var(--muted); font-size: 12px; padding: 8px 12px; white-space: nowrap; }
.table td { padding: 0 12px; height: 48px; border-block-start: 1px solid var(--rule); vertical-align: middle; }
.table th:first-child, .table td:first-child { padding-inline-start: 0; }
.table th:last-child, .table td:last-child { padding-inline-end: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--raised); }
.table tr.faded td { color: var(--muted); }
.table td small { display: block; color: var(--muted); line-height: 16px; }
.row-actions { text-align: end; white-space: nowrap; width: 1%; }
.row-actions button { min-height: 28px; padding-inline: 10px; }
.row-actions button + button { margin-inline-start: 6px; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--control); border-radius: var(--radius-card); }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-block-start: 16px; }

.badge { display: inline-flex; align-items: center; flex: none; height: 20px; padding-inline: 8px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--pill-neutral-bg); color: var(--pill-neutral-ink); white-space: nowrap; }
.badge.good { background: var(--pill-positive-bg); color: var(--pill-positive-ink); }
.badge.warn { background: var(--pill-warning-bg); color: var(--pill-warning-ink); }
.badge.bad { background: var(--pill-negative-bg); color: var(--pill-negative-ink); }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding-inline: 6px; border-radius: 999px; background: var(--pill-neutral-bg); color: var(--pill-neutral-ink); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.count.warn { background: var(--pill-warning-bg); color: var(--pill-warning-ink); }

/* --------------------------------------------------------------- sheets */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(19, 22, 20, 0.32); z-index: 20; display: flex; justify-content: flex-end; }
.sheet { width: min(480px, 100%); background: var(--surface); display: flex; flex-direction: column; height: 100%; box-shadow: 0 0 40px rgba(19, 22, 20, 0.16); animation: sheet-in 0.18s ease-out; }
.sheet.wide { width: min(840px, 100%); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 24px; border-block-end: 1px solid var(--border); }
.sheet-body { padding: 24px; overflow-y: auto; flex: 1; }
.sheet-foot { display: flex; gap: 8px; padding: 12px 24px; border-block-start: 1px solid var(--border); }
@keyframes sheet-in { from { transform: translateX(24px); opacity: 0; } }
[dir='rtl'] .sheet { animation-name: sheet-in-rtl; }
@keyframes sheet-in-rtl { from { transform: translateX(-24px); opacity: 0; } }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px 24px; margin: 0 0 20px; }
.facts dt, .totals dt { color: var(--muted); font-size: 12px; }
.facts dd, .totals dd { margin: 0; font-weight: 500; }
.totals { margin: 12px 0; margin-inline-start: auto; max-width: 320px; }
.totals > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-block: 4px; }
.totals dt { font-size: 14px; }
.totals dd { font-variant-numeric: tabular-nums; }
.totals .grand { border-block-start: 1px solid var(--text); margin-block-start: 6px; padding-block-start: 10px; font-size: 18px; }
.totals .grand dt { color: var(--text); font-size: inherit; font-weight: 600; }
.totals input { width: 104px; min-height: 32px; padding: 4px 8px; text-align: end; }
.detail-actions { display: flex; gap: 8px; margin-block-start: 20px; }
.note { background: var(--raised); border-radius: var(--radius-card); padding: 10px 14px; }
.notice { background: var(--raised); border-radius: var(--radius-card); padding: 14px 16px; margin-block-end: 16px; }
.notice.warn { background: var(--pill-warning-bg); color: var(--pill-warning-ink); border: 1px solid #f3dc9a; }
.notice ul { margin: 6px 0 0; padding-inline-start: 18px; }
.notice p { margin-block-end: 12px; }
.product-top { display: flex; gap: 16px; align-items: center; margin-block-end: 8px; }
.product-top img { width: 72px; height: 72px; object-fit: contain; background: var(--raised); border-radius: var(--radius-card); }

/* ----------------------------------------------------- figures, panels */
/* The headline numbers: one container, divided. The first is the answer. */
.figures { display: flex; flex-wrap: wrap; border: 1px solid var(--border); border-radius: var(--radius-card); margin-block-end: var(--gap); }
.figure { flex: 1 1 150px; padding: 16px 20px; border-inline-end: 1px solid var(--border); min-width: 0; }
.figure.lead { flex: 1.5 1 230px; }
.figure:last-child { border-inline-end: 0; }
.figure span { display: block; color: var(--muted); font-size: 13px; }
.figure strong { display: block; font-size: 22px; font-weight: 400; font-variant-numeric: tabular-nums; line-height: 32px; margin-block-start: 2px; white-space: nowrap; }
.figure small { display: block; color: var(--muted); }
[dir='rtl'] .figure strong { direction: ltr; text-align: right; }
.pager .num { direction: ltr; unicode-bidi: isolate; }
.side-lang { display: none; margin: 20px 10px 0; }
.figure.lead strong { font-size: 30px; font-weight: 500; letter-spacing: -0.01em; }
.figure strong .unit { display: inline; color: var(--muted); font-size: 14px; font-weight: 400; margin-inline-start: 4px; }

.panel { border: 1px solid var(--border); border-radius: var(--radius-card); padding: 20px; margin-block-end: var(--gap); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-block-end: 12px; }
.panel-head h2 { display: flex; align-items: center; gap: 8px; }
.panel-head a, .panel-head small { color: var(--muted); font-size: 13px; }
.panel > h2 { margin-block-end: 12px; display: flex; align-items: center; gap: 8px; }
.panel h2 + .muted { margin-block: -8px 14px; }
.panel > h2:not(:first-child) { margin-block-start: 24px; }
.panel .table tbody tr:first-child td { border-block-start: 0; }
.panel .table thead + tbody tr:first-child td { border-block-start: 1px solid var(--rule); }
.panel > :last-child { margin-block-end: 0; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--gap); align-items: start; }
.two > .panel { margin-block-end: 0; }
.two { margin-block-end: var(--gap); }
.more { display: inline-block; margin-block-start: 12px; color: var(--muted); }

.bars { display: flex; align-items: flex-end; gap: 3px; height: 176px; padding-block-start: 8px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; }
.bar-fill { width: 100%; max-width: 36px; background: var(--chart-1); min-height: 1px; }
.bar-label { font-size: 11px; color: var(--muted); margin-block-start: 6px; font-variant-numeric: tabular-nums; }
.chart { direction: ltr; }
.chart text { font-family: var(--font); }

/* ------------------------------------------------------------ dashboard */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 344px; gap: var(--gap); align-items: start; }
.dash-main > :last-child { margin-block-end: 0; }

/* What is waiting for someone: a short list, each line a way in. */
.todo { border: 1px solid var(--border); border-radius: var(--radius-card); margin-block-end: var(--gap); }
.todo-item { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px; color: var(--text); text-decoration: none; }
.todo-item + .todo-item { border-block-start: 1px solid var(--rule); }
a.todo-item:hover { background: var(--raised); }
.todo-item strong { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 20px; padding-inline: 6px; border-radius: 999px; background: var(--pill-neutral-bg); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.todo-item.warn strong { background: var(--pill-warning-bg); color: var(--pill-warning-ink); }
.todo-item.bad strong { background: var(--pill-negative-bg); color: var(--pill-negative-ink); }
.todo-item.zero { color: var(--muted); }
.todo-item .go { margin-inline-start: auto; color: var(--muted); font-size: 13px; }

.people { list-style: none; margin: 0; padding: 0; }
.people li { display: grid; grid-template-columns: 8px 1.2fr 1.4fr 1fr; gap: 12px; align-items: center; min-height: 44px; border-block-start: 1px solid var(--rule); }
.people li:first-child { border-block-start: 0; }
.people .who strong { font-weight: 500; }
.people .who small { color: var(--muted); margin-inline-start: 4px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.dot.off { background: transparent; box-shadow: inset 0 0 0 1.5px var(--control); }

/* The tape: receipts as the tills print them, newest on top, one roll. */
.tape { position: sticky; top: 24px; border: 1px solid var(--border); border-radius: var(--radius-card); max-height: calc(100vh - 152px); display: flex; flex-direction: column; }
.tape > h2, .tape > .panel-head { padding: 16px 20px 12px; margin: 0; }
.tape-roll { overflow-y: auto; }
.tape-empty { padding: 4px 20px 20px; }
.receipt { padding: 12px 20px 14px; border-block-start: 1px solid var(--rule); }
.receipt header, .receipt footer, .receipt li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.receipt header { color: var(--muted); font-size: 12px; }
.receipt-no { font-family: var(--mono); font-size: 12px; color: var(--text); direction: ltr; unicode-bidi: isolate; }
.receipt-who { font-weight: 500; margin-block: 2px 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.receipt-who small { font-weight: 400; color: var(--muted); font-size: 13px; }
.receipt .tag { display: inline-flex; align-items: center; height: 18px; padding-inline: 6px; border-radius: 4px; background: var(--pill-neutral-bg); font-size: 11px; font-weight: 500; }
.receipt ul { list-style: none; margin: 0; padding: 0; color: var(--muted); font-size: 13px; }
.receipt li > :first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.receipt li > :last-child, .receipt footer strong, .receipt time { font-variant-numeric: tabular-nums; white-space: nowrap; }
.receipt footer { padding-block-start: 6px; color: var(--muted); font-size: 13px; }
.receipt footer strong { color: var(--text); font-size: 15px; font-weight: 600; }
.receipt.voided footer strong, .receipt.voided li { text-decoration: line-through; }
.receipt.voided footer strong { color: var(--muted); }
.receipt.voided footer span { color: var(--negative); }
.receipt-flag { display: inline-flex; align-items: center; height: 20px; padding-inline: 8px; margin-block-start: 8px; border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--pill-warning-ink); background: var(--pill-warning-bg); }
.receipt.fresh { animation: print 0.5s ease-out; }
@keyframes print { from { transform: translateY(-12px); opacity: 0; background: var(--pill-positive-bg); } 60% { background: var(--pill-positive-bg); } }

/* ----------------------------------------------------------------- till */
.till { display: grid; grid-template-columns: minmax(0, 1fr) 344px; gap: var(--gap); align-items: start; }
.till-pay { border: 1px solid var(--border); border-radius: var(--radius-card); padding: 20px; position: sticky; top: 24px; }
.till-pay .totals { max-width: none; }

/* ------------------------------------------------- the platform console */
/* A store's tills, one mark each: filled while the till is connected. */
.tills { display: inline-flex; flex-wrap: wrap; gap: 3px; vertical-align: middle; direction: ltr; }
.tills i { width: 8px; height: 14px; border-radius: 2px; background: var(--chart-muted); }
.tills i.on { background: var(--chart-1); }
.tills-note { display: inline-block; direction: ltr; unicode-bidi: isolate; color: var(--muted); font-size: 12px; margin-inline-start: 8px; font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 12px; list-style: none; margin: 0; padding: 0; font-weight: 400; }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 10px; border-radius: 2px; background: var(--chart-muted); }
.legend i.on { background: var(--chart-1); }

.health { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.health .dot { width: 6px; height: 6px; background: var(--positive); }
.health.down { color: var(--negative); }
.health.down .dot { background: var(--negative); }

.store-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-card); margin-block-end: 20px; }
.store-head h3 { margin: 0; font-size: 18px; line-height: 24px; display: flex; align-items: center; gap: 8px; }
.store-head p { color: var(--muted); font-size: 13px; }
.store-head .page-actions { flex-wrap: wrap; justify-content: flex-end; }

/* A link and its Copy button, joined. */
.link-box { display: flex; margin-block: 8px 12px; }
.link-box input { border-start-end-radius: 0; border-end-end-radius: 0; font-family: var(--mono); font-size: 13px; direction: ltr; }
.link-box button { border-start-start-radius: 0; border-end-start-radius: 0; margin-inline-start: -1px; min-height: 38px; }
.choice { display: grid; gap: 8px; margin-block-end: 20px; }
.choice label { display: flex; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-card); cursor: pointer; }
.choice label:has(input:checked) { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.choice input { margin-block-start: 2px; }
.choice strong { display: block; font-weight: 500; }
.choice small { color: var(--muted); font-size: 13px; }

/* --------------------------------------------------------------- toasts */
.toasts { position: fixed; inset-block-end: 20px; inset-inline-start: 50%; transform: translateX(-50%); z-index: 40; display: grid; gap: 8px; justify-items: center; }
[dir='rtl'] .toasts { transform: translateX(50%); }
.toast { background: var(--primary); color: #fff; padding: 8px 14px; border-radius: var(--radius-card); max-width: min(540px, 92vw); box-shadow: 0 8px 24px rgba(19, 22, 20, 0.18); }
.toast.error { background: var(--negative); }

/* ---------------------------------------------------------------- small */
@media (max-width: 1180px) {
  .dash-grid, .till { grid-template-columns: minmax(0, 1fr); }
  .tape, .till-pay { position: static; max-height: 520px; }
}
@media (max-width: 860px) {
  /* The frame goes: the sheet is the screen, under a bar with the menu. */
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; position: fixed; inset: 48px 0 0; z-index: 30; background: var(--ground); padding-inline: 16px; }
  .shell.menu-open .side { display: block; }
  .side a { min-height: 44px; }
  .top, .canvas { grid-column: 1; }
  .top { padding-inline: 8px; }
  .top-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .menu-toggle { display: inline-flex; align-items: center; min-height: 40px; }
  .me, .top .branch-name, .top-lang { display: none; }
  .side-lang { display: inline-flex; align-items: center; }
  .top-title { flex: 0 1 auto; min-width: 0; }
  .branch-switch { min-width: 0; max-width: 150px; }
  .canvas { margin: 0; border-radius: 0; border-inline: 0; border-block-end: 0; }
  .page { padding: 20px 16px; }
  .page-head { flex-wrap: wrap; }
  .figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figure { border-inline-end: 0; border-block-start: 1px solid var(--border); padding: 12px 16px; }
  .figure:nth-child(even) { border-inline-end: 1px solid var(--border); }
  .figure.lead { grid-column: 1 / -1; border-block-start: 0; border-inline-end: 0; }
  .figures:not(:has(.lead)) .figure:nth-child(even) { border-inline-end: 0; }
  .figures:not(:has(.lead)) .figure:nth-child(odd) { border-inline-end: 1px solid var(--border); }
  .figures:not(:has(.lead)) .figure:nth-child(-n+2) { border-block-start: 0; }
  .figure:last-child { border-inline-end: 0 !important; }
  .people li { grid-template-columns: 8px 1fr; min-height: 0; padding-block: 10px; row-gap: 0; }
  .people li .where, .people li .muted { grid-column: 2; font-size: 13px; }
  .store-head { flex-direction: column; align-items: stretch; }
  .store-head .page-actions { justify-content: flex-start; }
  .filters > input[type='search'] { max-width: none; flex-basis: 100%; }
  button, .branch-switch { min-height: 36px; }
}
@media (max-width: 640px) {
  /* Tables become lists: the name and the key number on the first line,
     the other fields running on under them. */
  .table.stack thead { display: none; }
  .table.stack tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; padding-block: 12px; border-block-start: 1px solid var(--rule); }
  .table.stack tbody tr:first-child { border-block-start: 0; }
  .table.stack td { height: auto; padding: 0; border: 0; text-align: start; white-space: normal; order: 3; color: var(--muted); font-size: 13px; }
  .table.stack td:empty { display: none; }
  .table.stack td:first-child { order: 1; flex: 1 1 55%; font-weight: 500; font-size: 14px; color: var(--text); }
  .table.stack td.lead-num { order: 2; flex: none; font-size: 14px; color: var(--text); }
  .table.stack td:first-child small { font-weight: 400; }
  .table.stack td[data-label]:not(:first-child):not(:empty)::before { content: attr(data-label) ' '; }
  .table.stack td.row-actions { order: 4; flex: 1 1 100%; width: auto; padding-block-start: 8px; }
  .table.stack tr.clickable:hover td { background: none; }
  .table.stack tr::after { content: ''; order: 2; flex: 0 0 100%; height: 0; }
  .table.stack tr:has(td.lead-num)::after { order: 3; }
  .tabs { gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .sheet, .receipt.fresh { animation: none; }
  button:active:not(:disabled) { transform: none; }
}
