/* Layout: one working screen, menu on the left and the open ticket always on the right; on a phone the ticket slides up from a bar. Colours and fonts are bees-x.com's. */
:root {
  color-scheme: light;
  --text: 1; --size: 1;
  --bg: #f3f4f6; --raised: #ffffff; --sunk: #e9ebee; --fg: #111820; --muted: #56606b; --line: #dcdfe3;
  --brand-honey: #e8b200;
  --honey: var(--brand-honey); --honey-text: #7a5900; --honey-wash: #fdf6dc; --on-honey: #111820;
  --focus: #111820; --focus-surface: #111820;
  --option-hover-border: color-mix(in srgb, var(--line) 75%, var(--muted));
  --option-selected-border: var(--fg); --option-selected-bg: var(--sunk);
  --good: #176f41; --good-wash: #e3f4ea; --bad: #b3261e; --bad-wash: #fbe9e7;
  --display: "Schibsted Grotesk", "Segoe UI", system-ui, sans-serif;
  --body: "Public Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0c131a; --raised: #16222d; --sunk: #101a23; --fg: #e8ecef; --muted: #9aa6b2; --line: #2a3845;
  --honey-text: #f2c230; --honey-wash: #2a2410; --focus: var(--brand-honey); --focus-surface: var(--brand-honey);
  --good: #5fd39a; --good-wash: #12301f; --bad: #ff8a80; --bad-wash: #3a1a18; color-scheme: dark;
} }
:root[data-theme="dark"] {
  --bg: #0c131a; --raised: #16222d; --sunk: #101a23; --fg: #e8ecef; --muted: #9aa6b2; --line: #2a3845;
  --honey-text: #f2c230; --honey-wash: #2a2410; --focus: var(--brand-honey); --focus-surface: var(--brand-honey);
  --good: #5fd39a; --good-wash: #12301f; --bad: #ff8a80; --bad-wash: #3a1a18; color-scheme: dark;
}
html, body { height: 100%; }
body { background: var(--bg); color: var(--fg); font: calc(15px * var(--text))/1.4 var(--body); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
* { box-sizing: border-box; }
button, input, select, textarea { font: inherit; color: inherit; }
/* Kerem 66758: a typing field under 16px makes iPhones and iPads zoom the page when it is tapped. Every field is at
   least 16px; one set larger, or inside larger text, keeps its size. */
input, select, textarea { font-size: max(16px, var(--field-font-size, 1em)) !important; }
[data-feedback-invalid][aria-invalid="true"] { border-color: var(--bad) !important; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.app { height: 100%; display: flex; flex-direction: column; gap: 10px; padding-block: 10px; }

.top { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; }
.brand { font: 700 calc(18px * var(--text)) var(--display); display: flex; align-items: center; gap: 8px; }
.brand i { width: 14px; height: 16px; background: var(--honey); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); display: block; }
.tabs { display: flex; gap: 4px; background: var(--sunk); padding: 4px; border-radius: 10px; }
.tabs button { border: 0; background: none; padding: 8px 14px; border-radius: 7px; font-weight: 600; min-height: calc(40px * var(--size)); }
.tabs button[aria-current="page"] { background: var(--raised); box-shadow: 0 1px 2px #0002; }
.who { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: calc(13px * var(--text)); }
.ticket-heading .till-end-day { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: none; background: var(--raised); border-color: var(--muted); font-size: calc(15px * var(--text)); font-weight: 600; }
.ticket-footer .ticket-clear, .tbar-dock .ticket-clear { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: none; min-width: 44px; min-height: max(44px, calc(44px * var(--size))); padding: 0 8px; color: var(--bad); background: transparent; border: 0; }
.ticket-footer .ticket-clear:hover, .tbar-dock .ticket-clear:hover { background: var(--bad-wash); }
.ticket-heading .till-end-day:hover:not([aria-disabled="true"]) { background: var(--sunk); border-color: var(--fg); }
.ticket-heading .till-end-day[aria-disabled="true"] { color: var(--muted); border-color: var(--line); }
.chip { display: inline-block; border-radius: 99px; padding: 2px 10px; font-size: calc(12px * var(--text)); font-weight: 600; background: var(--sunk); color: var(--muted); white-space: nowrap; }
.chip.good { background: var(--good-wash); color: var(--good); }
.chip.bad { background: var(--bad-wash); color: var(--bad); }
.chip.honey { background: var(--honey-wash); color: var(--honey-text); }
.chip.message { white-space: normal; overflow-wrap: anywhere; }
.ghost { background: none; border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; min-height: calc(40px * var(--size)); font-weight: 500; }
.ghost.till-back { display: grid; place-items: center; flex: none; min-width: 44px; min-height: 44px; padding: 0; border: 0; background: transparent; }
.ghost.till-back:hover { background: var(--sunk); }
.tip { position: relative; flex: none; width: 20px; height: 20px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: none; color: var(--muted); font: 500 calc(12px * var(--text)) var(--mono); display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; cursor: help; }
.tip::after { content: ""; position: absolute; inset: -10px; }
.tip:hover { color: var(--fg); border-color: var(--muted); }
#bubble { position: fixed; z-index: 20; max-width: 260px; padding: 8px 10px; border-radius: 8px; background: var(--fg); color: var(--bg); font: 500 calc(13px * var(--text))/1.35 var(--body); pointer-events: none; box-shadow: 0 4px 14px #0004; }
.titled { display: flex; align-items: center; gap: 8px; }

[id="till-main"] { flex: 1; min-height: 0; }
.till { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) clamp(320px, 30vw, 440px); gap: 12px; }
.menu { min-height: 0; display: flex; flex-direction: column; gap: 10px; container: till-menu / inline-size; }
.till-menu-toolbar { display: flex; align-items: flex-start; gap: 12px; min-width: 0; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.till-menu-toolbar .till-kind { flex: none; width: 156px; max-width: 100%; margin: 0 0 0 auto; padding: 0; }
.till-menu-edit { display: inline-flex; align-items: center; justify-content: center; flex: none; gap: 6px; min-height: 44px; white-space: nowrap; }
.till-menu-edit[aria-pressed="true"] { background: var(--fg); color: var(--raised); border-color: var(--fg); }
.till-category-scroll { flex: 1; min-width: 0; }
.till-mobile-filters, .mobile-ticket-head { display: none; }
.cats { display: flex; flex: 1; gap: 4px; min-width: 0; max-width: 100%; }
/* The code box: shown only when items have codes, a scanner or a typed code adds the item. */
.till-code { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; margin-bottom: 8px; }
.till-code input { min-height: calc(44px * var(--size)); }
/* The code box sits flush with the scrolling sell area, which cut the top and left of an outside ring (Codex CLI-VIS-04):
   its ring is drawn inside the box instead, the same 3px and colour. */
.till-code input:focus-visible { outline-offset: -3px; }
.cats > button, .cats > .category-tab > button { flex: none; border: 0; background: var(--raised); color: var(--fg); padding: 4px 10px; border-radius: 8px; font-size: calc(15px * var(--text)); font-weight: 600; min-height: calc(44px * var(--size)); white-space: nowrap; outline-offset: -3px; }
.cats button.category-other { background-color: var(--sunk); }
.cats button.add-category { display: grid; place-items: center; min-width: 44px; }
.cats>button:hover { box-shadow: inset 0 0 0 1px var(--muted); }
.cats>button[aria-pressed="true"] { box-shadow: inset 0 -2px 0 var(--cat, var(--honey-text)); }
.till .grid { --tile-columns: repeat(auto-fill, minmax(calc(clamp(116px, 14vw, 220px) * var(--size)), 1fr)); flex: 1; min-height: 0; overflow-y: auto; scrollbar-gutter: stable; display: grid; grid-template-columns: var(--tile-columns); grid-auto-rows: max-content; gap: 6px; align-content: start; padding: 2px; }
.tile { text-align: left; background: var(--raised); border: 1px solid var(--line); border-radius: 10px; min-height: calc(64px * var(--size)); padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.tile-shell { position: relative; display: grid; min-width: 0; }
.tile-shell > .tile { width: 100%; height: 100%; }
.till .tile-shell > .tile > div { padding-right: 48px; }
.tile-catalogue-edit { position: absolute; top: 2px; right: 2px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--fg); }
.grid:not(.pics) .tile-shell .tile b { overflow-wrap: anywhere; }
/* Centre the pencil on the first name line while keeping its full 44px touch target. */
.grid:not(.pics) .tile-catalogue-edit { top: 1px; align-items: start; padding-top: calc(var(--tile-title-padding, 7px) + (var(--tile-title-size, 15px) * var(--text) * 1.25 - 18px) / 2); }
.tile-catalogue-edit:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.till .tile-catalogue-add { align-items: center; justify-content: center; gap: 6px; padding: 10px 14px; background: var(--sunk); border-left: 6px solid var(--muted); text-align: center; }
.tile img { display: block; flex: none; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: var(--sunk); }
.tile div { padding: 7px 9px 8px; display: flex; flex-direction: column; gap: 3px; flex: 1 0 auto; justify-content: space-between; }
.till-actions { grid-column: 1 / -1; display: grid; grid-template-columns: var(--tile-columns); gap: 6px; }
.till .till-actions .tile-action { background: var(--sunk); border-left: 6px solid var(--muted); align-items: center; justify-content: center; padding: 10px 14px; white-space: nowrap; }
.till .grid > .empty { grid-column: 1 / -1; }
@media (min-width: 1100px) {
  .till .grid { --tile-title-padding: 12px; --tile-title-size: 20px; }
  .till .tile { min-height: calc(110px * var(--size)); }
  .till .tile > div { padding: 12px 14px; gap: 8px; }
  .till .tile b { font-size: calc(20px * var(--text)); }
  .till .tile span { font-size: calc(15px * var(--text)); }
  .till .tile .num { font-size: calc(22px * var(--text)); }
}
/* Colour by category: eight colours, a solid edge and a light wash of the same colour over the tile's own surface, so
   the text keeps its contrast in light and dark. Forced colours drops the wash and the system draws the edge. */
.c0 { --cat: #d99a00; } .c1 { --cat: #e4572e; } .c2 { --cat: #2f80ed; } .c3 { --cat: #2e9e5b; } .c4 { --cat: #7a5af8; } .c5 { --cat: #0fa3a3; } .c6 { --cat: #d6457a; } .c7 { --cat: #64748b; }
.tile[class*=" c"] { border-left: 6px solid var(--cat); }
.till .tile.category-coloured { border-left: 6px solid var(--cat); background-color: color-mix(in srgb,var(--cat) 15%,var(--raised)); }
.till .tile[data-category-neutral] { border-left: 6px solid var(--muted); background-color: var(--sunk); }
@supports (background: color-mix(in srgb, red 10%, white)) {
  .tile[class*=" c"], .cats>button[class^="c"]:not(.category-other) { background-color: color-mix(in srgb, var(--cat) 15%, var(--raised)); }
}
.tile:active:not(:disabled) { background: var(--honey-wash); }
.tile b { font-weight: 600; line-height: 1.25; }
.tile span { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; font-size: calc(13px * var(--text)); }
.tile .num { min-width: 0; font-size: calc(16px * var(--text)); font-weight: 600; overflow-wrap: anywhere; }
.tile small { color: var(--muted); font-size: calc(12px * var(--text)); white-space: nowrap; }
.tile:disabled { opacity: .55; }

.ticket { min-height: 0; background: var(--raised); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; container-type: inline-size; }
.ticket-heading { flex: none; display: flex; justify-content: flex-end; padding: 10px 10px 0; }
.ticket-footer { flex: none; position: sticky; bottom: 0; z-index: 1; padding: 0; background: var(--raised); border-top: 1px solid var(--line); }
.ticket-clear-row { display: flex; justify-content: flex-start; padding: 4px 10px; }
.thead { padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; border-bottom: 1px solid var(--line); }
.thead .ghost { min-height: calc(34px * var(--size)); padding: 4px 10px; }
.thead .seg button { min-height: calc(34px * var(--size)); padding: 4px; }
.thead > div:first-child { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--sunk); border-radius: 8px; padding: 3px; }
.seg button { border: 0; background: none; padding: 8px; border-radius: 6px; font-weight: 600; min-height: calc(44px * var(--size)); }
/* On a sheet (Cash or Card machine on the pay sheet) the two sides are full touch targets. */
.sheet .seg button { min-height: calc(44px * var(--size)); }
.seg button[aria-pressed="true"] { background: var(--raised); box-shadow: 0 1px 2px #0002; }
.lines { flex: 1; min-height: 0; overflow-y: auto; scrollbar-gutter: stable; display: grid; grid-template-columns: minmax(0,1fr) auto auto auto auto; column-gap: 6px; align-content: start; }
.lines.is-empty { display: flex; align-items: center; justify-content: center; }
.line { min-width: 0; width: 100%; text-align: left; background: none; }
.line:hover { background: var(--sunk); }
.line small { grid-column: 1 / -1; color: var(--muted); font-size: calc(12px * var(--text)); }
.ticket-entry { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; padding: 6px 10px; }
.ticket-row { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; align-items: center; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.ticket-name { min-width: 0; overflow-wrap: anywhere; white-space: normal; font-size: inherit; font-weight: 700; }
.ticket-amount { text-align: right; white-space: nowrap; font-weight: 700; }
.ticket-adjustment .ticket-delete { grid-column: 4; }
.ticket-adjustment .ticket-edit { grid-column: 5; }
.ticket-edit, .ticket-delete { display: inline-flex; align-items: center; justify-content: center; width: calc(44px * var(--size)); min-width: calc(44px * var(--size)); min-height: calc(44px * var(--size)); padding: 8px; }
.ticket-delete { margin-inline-start: 8px; color: var(--bad); }
.ticket-row .ticket-quantity { justify-self: start; flex-wrap: nowrap; gap: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--raised); }
.ticket-row .ticket-quantity button { border: 0; border-radius: 7px; padding: 0; background: transparent; outline-offset: -3px; }
.ticket-row .ticket-quantity b { min-width: 14px; text-align: center; }
@media (max-width: 520px) {
  .lines { grid-template-columns: minmax(0,1fr) auto auto; }
  .ticket-name { grid-column: 1 / 3; }
  .ticket-adjustment .ticket-delete { grid-column: 2; }
  .ticket-adjustment .ticket-edit { grid-column: 3; }
}
@container (max-width: 380px) {
  .lines { grid-template-columns: minmax(0,1fr) auto auto; }
  .ticket-name { grid-column: 1 / 3; }
  .ticket-adjustment .ticket-delete { grid-column: 2; }
  .ticket-adjustment .ticket-edit { grid-column: 3; }
}
.empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.totals { padding: 6px 10px; font-size: calc(13px * var(--text)); color: var(--muted); }
.totals div { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.charge { flex: none; width: 100%; margin: 0; border: 0; border-radius: 0; background: var(--honey); color: var(--on-honey); font: 700 calc(18px * var(--text)) var(--display); padding: 12px 18px; display: flex; justify-content: space-between; align-items: center; min-height: calc(52px * var(--size)); }
.ticket .charge[aria-disabled="true"] { opacity: .45; }
/* The ticket footer stays outside the scrolling lines. */
/* Till PIN: the lock screen is one centred column; names are big buttons, and the dots show how many digits are in. */
.lock { max-width: 360px; margin-inline: auto; text-align: center; }
.lock .lock-people { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.lock .lock-people .opt { min-height: calc(56px * var(--size)); font-size: calc(18px * var(--text)); }
.lock .lock-dots { min-height: 1.4em; letter-spacing: .3em; }
.ttools { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; padding: 8px 10px; }
/* Customer and Stamp card keep the same gutter as Charge. */
.ticket-footer > .ghost[data-a="customer"], .ticket-footer > .ghost[data-a="stampcard"] { width: calc(100% - 20px); margin: 0 10px 8px; }
.tbar-dock, .tbar { display: none; }
.tclose { display: none; }

.page { height: 100%; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding-bottom: 12px; }
.card { background: var(--raised); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.queue-problem code, .queue-reference { overflow-wrap: anywhere; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 8px; align-items: start; }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; }
.row.sum { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 8px; font-weight: 600; }
[data-screen="shift"] .row { flex-wrap: wrap; align-items: baseline; }
[data-screen="shift"] .row > * { min-width: 0; overflow-wrap: anywhere; }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: calc(14px * var(--text)); }
th { text-align: left; color: var(--muted); font-size: calc(12px * var(--text)); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 7px 8px; border-bottom: 1px solid var(--line); }
td.r, th.r { text-align: right; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover { background: var(--sunk); }
.closedbox { max-width: 440px; margin: 40px auto; }

dialog { --till-sheet-max-height: min(600px, calc(100dvh - 64px)); box-sizing: border-box; border: 1px solid var(--line); border-radius: 14px; background: var(--raised); color: var(--fg); padding: 18px; margin: auto; width: min(460px, calc(100vw - 32px)); max-height: var(--till-sheet-max-height); overflow-y: auto; }
dialog::backdrop { background: #0008; }
dialog[open] { max-height: var(--till-sheet-max-height); }
dialog:focus { outline: none; }
.sheet { display: flex; flex-direction: column; gap: 12px; }
dialog .sheet > p { margin: 0; }
.sheet header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.sheet-actions { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; }
.sheet-footnote { display: block; margin: 0; color: var(--muted); font-size: calc(13px * var(--text)); line-height: 1.4; }
.sheet-actions > button { display: inline-flex; align-items: center; justify-content: center; min-height: calc(50px * var(--size)); }
.sheet-action-list { display: flex; flex-direction: column; }
.sheet-action-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: calc(48px * var(--size)); padding: 10px 0; border: 0; border-radius: 6px; background: transparent; color: var(--fg); text-align: left; font: 500 calc(16px * var(--text)) var(--body); }
.sheet-action-row + .sheet-action-row { border-top: 1px solid var(--line); border-radius: 0 0 6px 6px; }
.sheet-action-row > svg { flex: none; }
.sheet-action-arrow { margin-left: auto; color: var(--muted); }
.sheet-action-row:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
/* Payment keeps its method tabs and final action fixed; only the content scrolls on a short screen. */
dialog.cash-payment-dialog { padding: 0; border: 0; background: transparent; overflow: hidden; max-height: var(--till-sheet-max-height); }
.cash-payment-dialog > .sheet { gap: 0; max-height: var(--till-sheet-max-height); min-height: 0; }
.cash-payment-dialog .cash-payment-head { flex: none; align-items: center; padding: 12px 18px 0; background: var(--raised); }
.cash-payment-head h2 { min-width: 0; }
.sheet .cash-payment-head { align-items: center; }
.cash-payment-head .tip-title { flex: 1; }
.payment-tabs { display: flex; align-items: center; gap: 4px; }
.payment-tabs button { min-height: 44px; min-width: 64px; padding: 6px 14px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: 600 calc(16px * var(--text)) var(--body); }
.payment-tabs button[aria-pressed="true"] { color: var(--fg); box-shadow: inset 0 -2px 0 var(--honey-text); }
.payment-tabs button:hover { background: var(--sunk); }
.payment-tabs button:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.payment-method-tabs { flex: 1; min-width: 0; gap: 2px; }
.payment-method-tabs button { min-width: 0; padding: 6px 8px; font-size: calc(16px * var(--text)); }
@media (max-width: 380px) { .payment-method-tabs button { padding-inline: 4px; white-space: nowrap; } }
.cash-payment-head .cash-payment-close { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; background: none; }
.cash-payment-close:hover svg { stroke-width: 2.6; }
.cash-payment-body { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 18px 16px; background: var(--raised); }
.cash-payment-body p { margin: 0; }
.voucher-activity { display: grid; gap: 10px; }
.voucher-activity article { display: grid; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.voucher-activity small { color: var(--muted); }
.voucher-activity .chip { justify-self: start; }
.voucher-manual { align-self: start; min-height: 44px; background: none; border: 0; padding: 8px 0; text-decoration: underline; color: var(--fg); }
.payment-due-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.payment-due-heading > .ghost { flex: none; min-height: 44px; white-space: nowrap; }
.cash-payment-footer { flex: none; background: var(--raised); }
.cash-confirm-copy { text-align: left; white-space: normal; line-height: 1.35; }
.cash-tender-choices .opt[aria-pressed="true"], .discount-choices .opt[aria-pressed="true"], .tip-choices .opt[aria-pressed="true"], .option-choices .opt[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--raised); }
.opts.cash-tender-choices { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0,1fr); gap: 4px; }
.cash-tender-choices .opt { min-width: 0; padding-inline: 2px; }
.discount-price { display: inline-flex; align-items: baseline; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.discount-price del { color: var(--muted); }
.discount-choices[aria-invalid="true"], .option-choices[aria-invalid="true"] { outline: 2px solid var(--bad); outline-offset: 2px; border-radius: 8px; }
.cash-payment-footer .charge[aria-disabled="true"] { opacity: 1; background: color-mix(in srgb, var(--honey) 45%, var(--raised)); color: color-mix(in srgb, var(--on-honey) 45%, var(--raised)); }
.big { font: 700 calc(34px * var(--text)) var(--display); }
/* A big amount with its name above it, so two amounts on one sheet cannot be mixed up (evening audit E3). */
.amount { display: grid; gap: 2px; }
.amount-label { color: var(--muted); font-size: calc(14px * var(--text)); font-weight: 600; }
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 6px; }
.opt { border: 1px solid var(--line); background: var(--raised); border-radius: 8px; padding: 10px 8px; min-height: calc(48px * var(--size)); font-weight: 600; text-align: center; }
.opt[aria-pressed="true"] { border-color: var(--honey); background: var(--honey-wash); }
.opt:disabled { opacity: .45; }
.primary { border: 0; border-radius: 10px; background: var(--honey); color: var(--on-honey); font: 700 calc(16px * var(--text)) var(--display); padding: 14px; min-height: calc(50px * var(--size)); }
.primary:disabled { opacity: .45; }
.primary[aria-disabled="true"] { background: var(--sunk); color: var(--muted); border: 1px solid var(--line); }
.danger { color: var(--bad); border-color: var(--bad); }
.stepper { display: inline-flex; align-items: center; gap: 8px; }
.stepper { flex-wrap: wrap; }
.stepper button { width: calc(44px * var(--size)); height: calc(44px * var(--size)); border: 1px solid var(--line); background: var(--raised); border-radius: 8px; font-size: calc(20px * var(--text)); font-weight: 600; }
.stepper button:disabled { opacity: .4; }
.stepper b { min-width: 26px; text-align: center; }
.stepper .ghost { width: auto; }
label.field { display: flex; flex-direction: column; gap: 4px; font-size: calc(13px * var(--text)); font-weight: 600; }
/* One field for the till, and in its sheets for names, phones, searches, emails and codes whatever their type (Codex TC-VIS-01). */
input[type="text"], input[inputmode="decimal"], select, textarea, dialog label.field input:not([type]), dialog label.field input[type="tel"], dialog label.field input[type="search"], dialog label.field input[type="email"] { --field-font-size: calc(16px * var(--text)); background: var(--raised); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; min-height: calc(46px * var(--size)); width: 100%; font-weight: 400; font-size: max(16px, calc(16px * var(--text))); resize: vertical; }
/* A try that is being sent again shows its details fixed, with a dashed edge. */
dialog label.field input[readonly] { background: transparent; border-style: dashed; }
.split { display: flex; gap: 8px; align-items: end; }
.split > :first-child { flex: 1; min-width: 0; }
.paper { background: #fff; color: #111820; font: 13px/1.5 var(--mono); padding: 18px 16px; border-radius: 6px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.paper .r2 { display: flex; justify-content: space-between; gap: 10px; }
.paper .r2 > :first-child { min-width: 0; overflow-wrap: anywhere; }
.paper .r2 > :last-child { flex: none; white-space: nowrap; }
.paper hr { border: 0; border-top: 1px dashed #8a929a; margin: 2px 0; width: 100%; }
.paper h3 { font: 700 calc(16px * var(--text)) var(--mono); text-align: center; }
.paper p { margin: 0; text-align: center; }
.paper small { color: #56606b; }

/* Three equal columns whatever a key says: a wide "Delete" at large text or on a zoomed phone no longer squeezes the digits. */
.pad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pad button { min-width: 0; }
.pad button.pad-word { font-family: inherit; font-size: calc(15px * var(--text)); font-weight: 600; }
.pad button { min-height: calc(50px * var(--size)); border: 1px solid var(--line); border-radius: 8px; background: var(--raised); font: 500 calc(18px * var(--text)) var(--mono); }
.pad button:active { background: var(--honey-wash); }
.dens { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.den { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.den button { border: 0; background: var(--raised); min-height: calc(48px * var(--size)); }
.den button:first-child { flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 0 10px; font-family: var(--mono); }
.den button:first-child b { color: var(--honey-text); }
.den button:last-child { width: 38px; border-left: 1px solid var(--line); font-size: calc(18px * var(--text)); }
.den button:last-child:disabled { opacity: .35; }
.subtabs { display: inline-flex; align-self: start; gap: 4px; background: var(--sunk); padding: 3px; border-radius: 8px; }
.subtabs button { border: 0; background: none; padding: 6px 14px; min-height: calc(36px * var(--size)); border-radius: 6px; font-weight: 600; }
.subtabs button[aria-pressed="true"] { background: var(--raised); box-shadow: 0 1px 2px #0002; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.conn { text-align: left; border: 1px solid var(--line); border-radius: 10px; background: var(--raised); padding: 12px; display: flex; flex-direction: column; gap: 6px; min-height: calc(84px * var(--size)); }
.conn:hover { border-color: var(--honey); }
.sheet ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.stat { background: var(--raised); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.stat small { color: var(--muted); display: block; }
.stat b { font: 700 calc(26px * var(--text)) var(--display); display: block; margin-top: 2px; }
.todo { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 10px 2px; min-height: calc(44px * var(--size)); }
.todo:last-child { border-bottom: 0; }
.todo:hover { background: var(--sunk); }
.thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; display: block; background: var(--sunk); }
.algs { display: flex; flex-wrap: wrap; gap: 3px; }
.shift-cell { width: 100%; min-width: 58px; min-height: calc(40px * var(--size)); border: 1px solid var(--line); border-radius: 7px; background: var(--raised); font: 500 calc(12px * var(--text)) var(--mono); }
.shift-cell.off { color: var(--muted); background: none; border-style: dashed; }
.shift-cell:disabled { cursor: not-allowed; }
td.rota { padding: 3px; }

@media (max-width: 760px) {
  .tabs button { padding: 8px 10px; font-size: calc(14px * var(--text)); }
  .who { margin-left: 0; width: 100%; flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .who::-webkit-scrollbar { display: none; }
  .who > * { flex: none; }
  .who .ghost { min-height: calc(34px * var(--size)); padding: 4px 10px; }
  .top { gap: 6px; }
  .brand { width: 100%; }
  .hide-phone { display: none; }
}
@media (prefers-reduced-motion: no-preference) { .tile { transition: transform .12s ease; } .tile-catalogue-edit svg, .sheet-action-arrow { transition: transform .12s ease; } .opt, .charge { transition: background .12s, border-color .12s; } }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) { .tile:hover:not(:disabled):not([aria-disabled="true"]) { transform: scale(1.01); } .tile-catalogue-edit:hover svg { transform: scale(1.08); } .sheet-action-row:hover:not([aria-disabled="true"]) .sheet-action-arrow { transform: translateX(2px); } }

.brand-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; align-items: start; }
.logo-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.logo-pick img, .logo-empty { width: 56px; height: 56px; border-radius: 10px; object-fit: contain; background: var(--sunk); border: 1px solid var(--line); }
.logo-empty { display: flex; align-items: center; justify-content: center; font: 700 calc(20px * var(--text)) var(--display); color: var(--muted); }
.pv { border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #fff; color: #111820; }
.pv-band { height: 8px; }
.pv-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; font-size: calc(13px * var(--text)); }
.pv-name { font: 700 calc(16px * var(--text)) var(--display); display: flex; align-items: center; gap: 8px; }
.pv-name img { width: 28px; height: 28px; object-fit: contain; border-radius: 6px; }
.pv-total { font: 700 calc(28px * var(--text)) var(--display); }
.pv small { color: #56606b; }
.paper .brand-logo { display: block; margin: 0 auto; width: 56px; height: 56px; object-fit: contain; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatch { width: calc(40px * var(--size)); height: calc(40px * var(--size)); border-radius: 50%; border: 2px solid var(--line); padding: 0; }
.swatch[aria-pressed="true"] { outline: 3px solid var(--fg); outline-offset: 2px; }
.swatch.default { background: none; font-size: calc(11px * var(--text)); color: var(--muted); }
input[type="color"] { width: calc(40px * var(--size)); height: calc(40px * var(--size)); border: 1px solid var(--line); border-radius: 8px; background: none; padding: 2px; cursor: pointer; }

/* Screens only the connected till has. */
html, body, #till { height: 100%; margin: 0; }
.app > [data-body] { height: 100%; display: flex; flex-direction: column; gap: 10px; }
/* A form that stands in for the till (shop details, opening a shift, the lock) sits close under the till bar (Kerem 66208). */
.gate { max-width: 460px; margin: 12px auto 24px; display: flex; flex-direction: column; gap: 12px; text-align: center; }
.gate p { margin: 0; color: var(--muted); }
.gate .primary, .gate .ghost { display: inline-block; text-decoration: none; text-align: center; }
.gate form { text-align: left; }
/* The screen scrolls, so anything at its very edge is cut off there. These forms sat flush with the left edge and lost
   that side of the focus ring (Kerem 66077). Room for the ring on both sides, and a little more air under each label. */
.gate, .closedbox { padding-inline: 8px; }
.gate label.field { gap: 6px; }
.opening-shift { display: grid; gap: 12px; }
.opening-shift form { grid-template-columns: minmax(0, 460px); }
.opening-amount{display:flex;align-items:center;gap:10px;border:1px solid var(--line);border-radius:8px;padding:8px 14px;background:var(--raised);font:600 30px/1.3 var(--mono)}
.opening-amount:focus-within{border-color:var(--honey-text);box-shadow:inset 0 0 0 1px var(--honey-text)}
.opening-amount:has([data-feedback-invalid][aria-invalid="true"]){border-color:var(--bad);box-shadow:inset 0 0 0 1px var(--bad)}
.opening-amount input{--field-font-size:1em;width:100%;min-width:0;padding:0;border:0;border-radius:0;background:none;font:inherit;font-size:max(16px,1em);color:var(--fg);outline:0;box-shadow:none}
.till-setup-banner{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;padding:10px 12px;border:1px solid var(--line);border-radius:8px;background:var(--honey-wash);color:var(--honey-text);font-size:14px}
.till-setup-banner .ghost{flex:none;min-height:44px}
.ticket.open { display: flex; position: static; }

/* Personal appearance is independent of the shop's brand and receipt paper. */
.appearance { width: min(100%, 720px); margin-inline: auto; gap: 20px; }
.appearance h1 { font-size: calc(25px * var(--text)); }
.appearance p { margin: 0; }
.appearance fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.appearance legend { margin-bottom: 8px; font-weight: 700; }
.appearance .opts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.appearance .opt { overflow-wrap: anywhere; }
.appearance .opt[aria-pressed="true"] { outline: 2px solid var(--honey-text); outline-offset: -2px; }
.appearance-preview { display: flex; flex-direction: column; align-items: start; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--sunk); }
.preference-warning { color: var(--bad); }
.team-page { width: min(100%, 800px); margin-inline: auto; }
.stock-page { width: min(100%, 800px); margin-inline: auto; }
.cash-page { display: grid; gap: 12px; }
.cash-page p { margin: 0; }
.cash-record, .cash-page h2 { min-width: 0; overflow-wrap: anywhere; }
.cash-record h2 { margin: 0; font-size: 1rem; }
.cash-report-heading { display: flex; align-items: center; gap: 8px; }
.cash-report-header { flex-wrap: wrap; }
.cash-record .row { flex-wrap: wrap; align-items: baseline; gap: 8px 16px; }
.cash-record .row > * { min-width: 0; overflow-wrap: anywhere; }
.cash-warning { padding: 12px; border: 1px solid var(--honey-text); border-radius: 8px; }
.stock-page p { margin: 0; }
.stock-record, .stock-reference, .stock-page h2, .stock-page h3 { min-width: 0; overflow-wrap: anywhere; }
.stock-record h2, .stock-record h3 { margin: 0; }
.stock-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.stock-actions > button { flex: 1 1 150px; }
.stock-adjustment { display: grid; gap: 14px; min-width: 0; overflow-wrap: anywhere; }
.stock-adjustment h2, .stock-adjustment h3, .stock-adjustment p { margin: 0; }
.stock-adjustment textarea { width: 100%; min-width: 0; resize: vertical; min-height: 100px; }
.stock-reason { white-space: pre-wrap; overflow-wrap: anywhere; }
.stock-details summary { cursor: pointer; min-height: calc(44px * var(--size)); padding-block: 10px; }
.stock-details p { margin-block: 8px; }
.stock-page input[type="search"] { width: 100%; min-width: 0; min-height: calc(46px * var(--size)); padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--raised); }
.team-page p, .team-store p { margin: 0; }
.team-person, .team-store { min-width: 0; overflow-wrap: anywhere; }
.team-email { overflow-wrap: anywhere; }
.team-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.team-actions > button, .team-actions > a { flex: 1 1 160px; }
.team-actions > a.primary { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.team-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.team-roles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.team-filters .opt[aria-pressed="true"], .team-roles .opt[aria-pressed="true"] { outline: 2px solid var(--honey-text); outline-offset: -2px; }
.team-store fieldset { min-width: 0; border: 0; padding: 0; margin: 0; }
.team-store legend { margin-bottom: 8px; font-weight: 700; }
.team-store h3 { margin: 0; }
.availability { min-width: 0; margin: 0; padding: 0; border: 0; }
.availability legend { margin-bottom: 8px; font-weight: 700; }
.sales-screen { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; container: sales / inline-size; }
.sales-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 44px; }
.sales-heading h1 { margin: 0; }
.sales-heading-actions { display: flex; align-items: center; gap: 8px; }
.sales-heading .sales-filter-reset { border-color: transparent; color: var(--muted); white-space: nowrap; }
.sales-heading .sales-filter-reset:hover { color: var(--fg); }
.sales-heading button, .sales-filters button { min-height: 44px; }
:where(:not(.sales-screen)) > .sales-search { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.sales-search .field { flex: 0 1 240px; min-width: 0; }
.sales-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.sales-toolbar .sales-search { flex: 1 1 340px; width: 100%; min-width: 0; max-width: 420px; }
.sales-search-field { display: flex; align-items: center; gap: 8px; width: 100%; padding-inline: 12px; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--raised); color: var(--muted); }
.sales-search-field svg { width: 18px; height: 18px; flex: none; }
.sales-search-field:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.sales-toolbar .sales-search-field input { flex: 1; min-width: 0; min-height: 42px; padding: 4px 0; border: 0; outline: none; background: transparent; color: var(--fg); font-size: max(16px, calc(16px * var(--text))); }
.sales-filters, .sales-filters [role="group"] { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sales-filters { column-gap: 12px; }
.sales-filters .sales-filter { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 10px; border-radius: 999px; white-space: nowrap; background: var(--raised); }
.sales-filters .sales-filter:hover { background: var(--sunk); }
.sales-filters .sales-filter:is([aria-pressed="true"], [data-active]) { color: var(--raised); background: var(--fg); border-color: var(--fg); }
.sales-toolbar .sales-filter-open, .sales-heading .sales-menu-button, .sales-filter-tags:not(.has-extra) { display: none; }
.sales-menu-button { inline-size: 44px; padding: 0; place-items: center; }
.sales-heading .sales-menu { position: fixed; inset: auto; margin: 0; }
.sales-filter-tags { display: flex; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.sales-filter-tags .sales-filter-tag { display: inline-flex; flex: none; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; border-radius: 999px; font-size: calc(13px * var(--text)); white-space: nowrap; }
.sales-filter-tag svg { width: 14px; height: 14px; }
.sales-filter-tag:focus-visible { outline-offset: -3px; }
.sales-table { --sales-time-size: 90px; --sales-columns: var(--sales-time-size) minmax(0, 1fr) minmax(96px, 15%) minmax(110px, 14%) minmax(75px, 10%) minmax(106px, 11%); border: 1px solid var(--line); border-radius: 12px; background: var(--raised); }
.sales-table-by-total { --sales-time-size: minmax(132px, 16%); }
.sales-column-head, .sales-row { display: grid; grid-template-columns: var(--sales-columns); gap: 4px 12px; align-items: center; width: 100%; padding-inline: 12px; text-align: start; }
.sales-column { display: inline-flex; align-items: center; justify-self: start; gap: 5px; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: calc(13px * var(--text)); text-align: start; }
button.sales-column:hover, .sales-column[data-sorted] { color: var(--fg); }
.sales-column[data-sorted] { font-weight: 700; }
.sales-column:is([data-sales-column="total"], [data-sales-column="ticket"]) { justify-self: end; text-align: end; }
.sales-column svg, .sales-filter svg, .sales-payment-label svg, .sales-pagination svg { flex: none; width: 16px; height: 16px; }
.sales-payment-label { display: inline-flex; align-items: center; gap: 5px; }
.sales-payment-label:is([data-payment-tone="cash"], [data-payment-tone="card"], [data-payment-tone="mixed"]) { border-radius: 5px; padding: 2px 6px; color: var(--fg); white-space: nowrap; }
.sales-payment-label[data-payment-tone="cash"] { background: var(--good-wash); }
.sales-payment-label[data-payment-tone="card"] { background: color-mix(in srgb, #3970b8 17%, var(--raised)); }
.sales-payment-label[data-payment-tone="mixed"] { background: color-mix(in srgb, #22867d 17%, var(--raised)); }
.chip.sales-refunded, .sales-refund-detail { background: color-mix(in srgb, #8553b5 18%, var(--raised)); color: var(--fg); }
.sales-group-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin: 0; padding: 8px 12px; border-top: 1px solid var(--line); background: var(--sunk); font-size: calc(14px * var(--text)); }
.sales-group-heading .muted { font-size: calc(12px * var(--text)); font-weight: 400; }
.sales-row { grid-template-areas: var(--sales-row-areas, 'time item person payment total ticket'); align-items: baseline; min-height: 56px; border: 0; border-top: 1px solid var(--line); padding-block: 10px; background: transparent; color: var(--fg); }
.sales-row-details { display: contents; }
.sales-table > .sales-row:last-child, .sales-group:last-child > .sales-row:last-child { border-radius: 0 0 12px 12px; }
.sales-row:hover, .sales-row[aria-busy="true"] { background: var(--sunk); }
.sales-row:focus-visible { outline-offset: -3px; }
.sales-time, .sales-pay, .sales-person, .sales-ticket-num { color: var(--muted); font-size: calc(13px * var(--text)); }
.sales-ticket-num { grid-area: ticket; text-align: end; white-space: nowrap; }
.sales-pay { grid-area: payment; }
.sales-row .sales-payment-label { align-items: baseline; }
.sales-row .sales-payment-label svg { align-self: center; }
.sales-item, .sales-person { min-width: 0; }
.sales-person { grid-area: person; overflow-wrap: anywhere; }
.sales-item { grid-area: item; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.sales-item-preview { display: flex; align-items: baseline; gap: 6px; max-width: 100%; min-width: 0; font-size: calc(14px * var(--text)); }
.sales-item-badge { justify-self: start; min-width: 0; max-width: 100%; padding: 2px 7px; border-radius: 5px; border-inline-start: 3px solid var(--cat, var(--muted)); background: color-mix(in srgb, var(--cat) 15%, var(--raised)); }
.sales-item-badge[data-category-neutral] { background: var(--sunk); }
.sales-item-name { min-width: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; font-weight: 500; }
.sales-item-more { flex: none; white-space: nowrap; color: var(--muted); font-size: calc(12px * var(--text)); }
.sales-total, .sales-time { font-variant-numeric: tabular-nums; }
.sales-total { text-align: end; }
.sales-total { grid-area: total; white-space: nowrap; }
.sales-total s { color: var(--muted); }
.sales-total small { display: block; font-size: calc(12px * var(--text)); }
.sales-time { grid-area: time; overflow-wrap: anywhere; }
.sales-pagination, .sales-pagination label, .sales-pagination nav { display: flex; align-items: center; gap: 8px; }
.sales-pagination { position: sticky; bottom: 0; z-index: 1; flex-wrap: wrap; padding-block-end: 4px; background: var(--bg); font-size: calc(13px * var(--text)); }
.sales-pagination label { color: var(--muted); }
.sales-page-size-label, .sales-pagination > span { white-space: nowrap; }
.sales-pagination nav { margin-inline-start: auto; }
.sales-pagination button, .sales-pagination .dev-choice-trigger { min-height: 44px; }
.sales-pagination button { display: inline-flex; align-items: center; gap: 4px; }
.sales-page:has(.sales-pagination) { padding-block-end: 0; }
.sales-empty, .sales-error { padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--raised); }
.sales-skeleton { display: grid; gap: 8px; }
.sales-skeleton .bx-skel { height: 48px; }
.sales-access-options { display: grid; gap: 8px; }
.sales-access-options .sales-access-option { display: flex; align-items: center; gap: 10px; min-height: 56px; text-align: start; border: 2px solid var(--line); }
.sales-access-option span:last-child { display: grid; gap: 3px; }
.sales-access-dot { flex: none; width: 16px; height: 16px; border: 1px solid currentColor; border-radius: 50%; display: grid; place-items: center; }
.sales-access-options .sales-access-option[aria-pressed="true"] { border-color: var(--fg); background: var(--sunk); }
.sales-access-option[aria-pressed="true"] .sales-access-dot::before { content: ''; background: currentColor; border-radius: 50%; width: 8px; height: 8px; }
.staff-sales-fields .bx-access-switch { min-height: 44px; padding-inline: 4px; }
.staff-sales-fields .bx-access-switch + .bx-access-switch { border-top: 1px solid var(--line); }
dialog:is(.sales-drawer, .sales-filter-dialog) {
  --till-sheet-max-height: min(600px, calc(100dvh - var(--workspace-header-bottom, 0px) - var(--workspace-phone-nav-offset, 0px) - 24px));
}
dialog.sales-drawer {
  left: auto;
  margin: 0;
  width: min(560px, 100%);
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
}
dialog.sales-drawer:not([open]) { display: none; }
dialog:is(.sales-drawer, .sales-filter-dialog)::backdrop {
  background: #111820a6;
  clip-path: inset(var(--workspace-header-bottom, 0px) 0 var(--workspace-phone-nav-offset, 0px));
}
.sales-drawer > .sheet { flex: 1; min-width: 0; min-height: 0; gap: 0; }
.sales-drawer .sales-drawer-head { align-items: center; }
.sales-drawer-head h2, .sales-receipt-meta h3, .sales-receipt-meta p { margin: 0; }
.sales-receipt-meta { display: grid; gap: 4px; }
.sales-drawer .sales-drawer-body { gap: 10px; padding-block: 12px; overscroll-behavior: contain; }
.sales-drawer-body:focus-visible { outline-offset: -3px; }
.sales-drawer-body .r2 { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: baseline; }
.sales-drawer-body .r2 > :first-child { overflow-wrap: anywhere; }
.sales-drawer-body .r2 > :last-child { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sales-receipt-lines { display: grid; gap: 10px; padding-block: 10px; border-block: 1px solid var(--line); }
.sales-receipt-lines .sales-item-name { display: block; }
.sales-receipt-lines small, .sales-refund-detail small { display: block; margin-top: 4px; }
.sales-receipt-disclosure { border-bottom: 1px solid var(--line); }
.sales-receipt-disclosure summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  gap: 8px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.sales-receipt-disclosure summary::-webkit-details-marker { display: none; }
.sales-receipt-disclosure summary svg { flex: none; }
.sales-receipt-disclosure[open] summary svg { transform: rotate(90deg); }
.sales-receipt-disclosure > div { display: grid; gap: 8px; padding-bottom: 12px; }
.sales-receipt-disclosure dl { display: grid; gap: 6px; margin: 0; overflow-wrap: anywhere; }
.sales-receipt-disclosure dt { font-weight: 600; }
.sales-receipt-disclosure dd { margin: 0; }
.sales-detail-item + .sales-detail-item { border-top: 1px solid var(--line); padding-top: 8px; }
.sales-detail-item h3 { margin: 0 0 6px; font-size: inherit; overflow-wrap: anywhere; }
.sales-refund-detail { border: 1px solid var(--line); border-inline-start: 3px solid #8553b5; border-radius: 8px; padding: 10px; }
.sales-drawer .sales-drawer-actions { flex-wrap: wrap; align-items: center; }
.sales-drawer-transactions, .sales-drawer-outputs { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.sales-drawer-outputs { margin-inline-start: auto; }
.sales-drawer-actions button { min-height: 44px; }
.sales-drawer-actions button[aria-disabled="true"] { opacity: .6; }
.sales-action-compact { display: none; }
dialog.sales-filter-dialog {
  position: fixed;
  inset: auto 0 var(--workspace-phone-nav-offset, 0px);
  margin: 0 auto;
  max-width: 100%;
  width: min(460px, 100%);
  border-radius: 14px 14px 0 0;
}
.sales-filter-dialog .action-toast { bottom: max(24px, calc(var(--workspace-phone-nav-offset, 0px) + 19px)); }
dialog.sales-filter-dialog > .sheet { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
#sales-filter-form { display: grid; gap: 12px; }
.sales-filter-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.sales-filter-group legend { padding: 0; margin-bottom: 5px; font-weight: 650; }
.sales-filter-group > div { display: flex; flex-wrap: wrap; gap: 6px; }
.sales-filter-pick { position: relative; cursor: pointer; }
.sales-filter-pick span { display: flex; align-items: center; min-height: 44px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: calc(14px * var(--text)); }
.sales-filter-pick:hover span { background: var(--sunk); }
.sales-filter-pick input:checked + span { background: var(--fg); border-color: var(--fg); color: var(--raised); }
.sales-filter-pick input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (max-width: 365px) {
  .sales-filter-dialog .cash-payment-body { padding-inline: 0; scrollbar-width: thin; }
  .sales-filter-dialog .sales-filter-group { padding-inline: 16px; }
}
@media (width > 1024px) {
  dialog.sales-drawer { --till-sheet-max-height: none; height: calc(100dvh - var(--workspace-header-bottom, 0px)); }
  dialog.sales-filter-dialog { inset: 0; margin: auto; width: min(480px, calc(100% - 32px)); border-radius: 14px; }
}
@media (max-width: 1024px) {
  dialog.sales-drawer {
    inset: auto 0 var(--workspace-phone-nav-offset, 0px);
    margin-inline: auto;
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -12px 40px #0003;
  }
  .workspace-app:has(.an-phone) .sales-drawer .sales-drawer-actions { padding-bottom: 12px; }
  .sales-drawer .sales-drawer-actions button { min-width: 44px; padding-inline: 10px; white-space: nowrap; }
  .sales-action-full { display: none; }
  .sales-action-compact { display: inline; }
  .sales-drawer .action-toast { bottom: max(24px, calc(var(--workspace-phone-nav-offset, 0px) + 19px)); }
}
@container sales (width <= 880px) {
  .sales-toolbar { flex-wrap: nowrap; gap: 8px; }
  .sales-toolbar .sales-search { flex: 1 1 0; max-width: none; }
  .sales-toolbar .sales-filter-open { display: inline-flex; flex: none; align-items: center; gap: 6px; min-height: 44px; }
  .sales-heading .sales-menu-button { display: inline-grid; }
  .sales-filter-tags:not(.has-extra) { display: flex; }
  .sales-column-head, .sales-toolbar .sales-filters, .sales-heading .sales-staff-access { display: none; }
  .sales-row { grid-template: 'time payment total' auto 'item item item' auto 'person ticket ticket' auto / minmax(0, 1fr) auto auto; gap: 4px 8px; }
  .sales-table > .sales-row:first-of-type, .sales-group:first-of-type > .sales-group-heading { border-top: 0; }
  .sales-group:first-of-type > .sales-group-heading { border-radius: 11px 11px 0 0; }
  .sales-item-name { -webkit-line-clamp: 3; }
  .sales-pagination nav button { min-width: 44px; justify-content: center; }
  .sales-pagination nav button span { display: none; }
}
@container sales (width <= 380px) {
  .sales-pagination:has(nav button + button) .sales-page-size-label { display: none; }
}
@container sales (width <= 310px) {
  .sales-page-size-label { display: none; }
}
@container sales (width > 880px) {
  .sales-toolbar, .sales-filters, .sales-filters [role="group"] { flex-wrap: nowrap; }
  .sales-filters { flex: none; }
  .sales-heading .sales-menu { display: none; }
  .sales-filter-tags .sales-filter-tag:not(.is-extra) { display: none; }
}
.skip-link { position: fixed; z-index: 50; inset: 8px auto auto 8px; padding: 12px 16px; background: var(--raised); color: var(--fg); border: 2px solid var(--fg); border-radius: 8px; transform: translateY(-160%); }
.skip-link:focus { transform: none; }
/* One focus colour, readable on every surface: Night on light, honey on dark (3:1 or better). */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
/* Headings, messages and main regions the app moves focus to so screen readers announce them.
   They are not controls, so they show no ring. Shared here: pages do not add their own. */
:is(h1, h2, h3, main, [role="alert"], [id="till-main"])[tabindex="-1"]:focus { outline: none; }
[id="till-main"] { overflow-y: auto; }
.brand { min-width: 0; overflow-wrap: anywhere; }
.tabs button, .ghost { min-height: calc(44px * var(--size)); }
button.chip { min-height: 44px; border: 1px solid currentColor; display: inline-flex; align-items: center; }
.line { min-height: calc(48px * var(--size)); }
.location-context { overflow-wrap: anywhere; }
dialog { overscroll-behavior: contain; }
@media (max-width: 760px) {
  .who { flex-wrap: wrap; overflow-x: visible; }
  .who > * { flex: initial; }
  .who .ghost { min-height: calc(44px * var(--size)); }
  .location-context { flex-basis: 100%; }
  .who .location-context { order: 2; }
  .page { height: auto; min-height: 100%; }
}
@media (max-width: 380px) {
  .appearance .opts { grid-template-columns: minmax(0, 1fr); }
  .team-roles { grid-template-columns: minmax(0, 1fr); }
}

/* QA B-030: the open shift's sales, refunds and cash moves, with what the drawer should hold. */
.cash-drawer-page { scrollbar-gutter: stable; }
.cash-drawer-page > * { width: min(100%, 720px); margin: 0 auto; flex: none; }
.drawer-section-head, .drawer-actions { display: flex; align-items: center; gap: 8px; }
.drawer-section-head { justify-content: space-between; }
.drawer-section-head h1, .cash-drawer-card h2, .cash-drawer-card p { margin: 0; }
.cash-drawer-card { display: grid; gap: 12px; padding: 16px; }
.cash-drawer-card h2 { font-size: 1rem; }
.drawer-expected { font-size: clamp(2rem, 5vw, 2.75rem); font-weight: 750; line-height: 1.12; }
.drawer-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; margin: 0; }
.drawer-figures dt, .drawer-log small { color: var(--muted); font-size: .875rem; }
.drawer-figures dd { margin: 4px 0 0; font-weight: 650; overflow-wrap: anywhere; }
.drawer-outside { margin: 0; padding-top: 10px; border-top: 1px solid var(--line); }
.drawer-load-warning { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--honey-text); border-radius: 8px; }
.drawer-load-warning svg { flex: none; color: var(--honey-text); }
.drawer-load-warning p { flex: 1 1 205px; }
.drawer-log { margin: 0; padding: 0; list-style: none; }
.drawer-log li { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.drawer-log li > div { flex: 1 1 130px; min-width: 0; overflow-wrap: anywhere; }
.drawer-log small { display: block; }
.drawer-log .num { white-space: nowrap; }
.drawer-close-action { display: grid; gap: 6px; text-align: center; }
.drawer-close-action .primary { min-height: 52px; border-radius: 10px; background: var(--brand-honey); color: var(--on-honey); }
.drawer-close-action p { margin: 0; color: var(--muted); font-size: .875rem; }
.drawer-count-mode { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.drawer-count-mode .sales-access-option { padding: 8px; }
.drawer-count-mode small { font-size: .75rem; font-weight: 400; }
.opts.drawer-reasons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.drawer-count-totals { padding: 8px 18px; border-top: 1px solid var(--line); }
.drawer-count-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.drawer-count-summary .num { white-space: nowrap; }
.drawer-footer-hint { margin: 0; padding: 6px 18px; border-top: 1px solid var(--line); }
.cash-payment-footer .drawer-confirm[aria-disabled="true"] { background: var(--sunk); color: var(--muted); }
.drawer-float .opening-amount { min-height: 44px; }
.drawer-float .opening-amount input, .drawer-float .opening-amount > span { font-size: 1rem; }
.drawer-float p { margin: 4px 0 0; }
.drawer-denominations { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 128px), 1fr)); gap: 8px; }
.drawer-denomination { display: grid; align-content: start; gap: 4px; min-width: 0; }
.drawer-denomination .field { margin: 0; }
.drawer-denomination-stepper { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--raised); }
.drawer-denomination-stepper button { width: 44px; height: 44px; border: 0; padding: 0; background: transparent; outline-offset: -3px; }
.drawer-denomination-stepper button:hover:not([aria-disabled="true"]) { background: var(--sunk); }
.drawer-denomination-stepper button[aria-disabled="true"] { color: var(--muted); }
.drawer-denomination-stepper input { width: 100%; min-width: 0; min-height: 44px; padding: 4px; border-block: 0; border-radius: 0; text-align: center; }
[data-count-subtotal] { min-height: 1.15em; overflow-wrap: anywhere; font-size: .75rem; }
[data-drawer-movement-preview]:empty, [data-drawer-count-note][hidden], [data-drawer-remainder]:empty { display: none; }
.till-more { position: relative; flex: none; }
.till-more summary { display: grid; place-items: center; width: 44px; min-height: 44px; padding: 0; cursor: pointer; list-style: none; }
.till-more summary::-webkit-details-marker { display: none; }
.till-more .card { display: grid; gap: 4px; position: absolute; z-index: 5; top: calc(100% + 4px); right: 0; width: max-content; max-width: 85vw; margin: 0; padding: 4px; box-shadow: 0 6px 18px #0003; }
@media (max-width: 600px) {
  .cash-drawer-card .drawer-section-head { flex-wrap: wrap; }
  .cash-drawer-card .drawer-actions { width: 100%; }
  .cash-drawer-card .drawer-actions button { flex: 1; }
}

/* Compact tablets use the same category picker as phones, while retaining the side ticket above 860px. */
@media (max-width: 1024px) {
  .till-menu-toolbar { display: none; }
  .till-mobile-filters { display: flex; align-items: flex-start; gap: 8px; flex: none; }
  .till-mobile-filters>.field { flex: .85; min-width: 0; margin: 0; }
  .mobile-category-filter { display: flex; flex: 1.15; min-width: 0; gap: 6px; }
  .mobile-category-filter>.field { flex: 1; min-width: 0; margin: 0; }
  .till-mobile-filters .dev-choice-trigger { width: 100%; min-width: 0; }
}

/* Mobile has one catalogue scroller and a review bar; the existing ticket opens in the same available frame. */
@media (max-width: 860px) {
  [id="till-main"]:has(>.till) { overflow: hidden; }
  .till { position: relative; display: flex; flex-direction: column; gap: 0; height: 100%; }
  .till>.menu { flex: 1; min-height: 0; padding: 12px; }
  .till .grid { flex: 1; min-height: 0; max-height: none; }
  .till .tile-shell>.tile>div { padding-right: 9px; }
  .till .tile-shell>.tile>div>b { padding-right: 32px; }
  .till>.ticket { display: none; }
  .till>.ticket.open { position: absolute; inset: 0; z-index: 8; display: flex; border: 0; border-radius: 0; padding: 0; }
  .mobile-ticket-head { display: flex; align-items: center; gap: 8px; flex: none; padding: 8px 10px; border-bottom: 1px solid var(--line); }
  .mobile-ticket-head h2 { font-size: 20px; }
  .till>.tbar-dock { display: block; flex: none; background: var(--raised); border-top: 1px solid var(--line); }
  .tbar { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 8px; width: 100%; min-height: 56px; padding: 12px 16px; border: 0; border-radius: 0; background: var(--honey); color: var(--on-honey); font-size: 15px; }
  .tbar>:first-child { text-align: left; font-size: 13px; }
  .tbar.is-empty { background: var(--sunk); color: var(--muted); }
  .tbar>.num { text-align: right; white-space: nowrap; font-size: 18px; font-weight: 700; }
  .reviewing-ticket>.menu, .reviewing-ticket>.tbar-dock { visibility: hidden; pointer-events: none; }
}

/* Audit A5, A6: Eat in / Take away and the category chips are a full 44px to tap. The chosen side of a two-way switch
   is filled like a chosen category: a white pill on pale grey was too faint to trust, and the wrong side of Eat in /
   Take away changes the VAT. */
.cats > button, .cats > .category-tab > button { min-height: calc(44px * var(--size)); }
.thead .seg button { min-height: calc(44px * var(--size)); padding: 4px 10px; }
.seg button[aria-pressed="true"] { background: var(--fg); color: var(--bg); box-shadow: none; }

/* Audit A4: Windows high contrast drops background colours, so a chosen state shown only by its fill disappears.
   The chosen one takes the system's highlight colours there, and the pay buttons keep an edge. */
@media (forced-colors: active) {
  .cats button[aria-pressed="true"], .seg button[aria-pressed="true"], .subtabs button[aria-pressed="true"], .tabs button[aria-current="page"], .opt[aria-pressed="true"], .cash-tender-choices .opt[aria-pressed="true"], .discount-choices .opt[aria-pressed="true"] { forced-color-adjust: none; background: Highlight; color: HighlightText; border-color: Highlight; }
  .seg button, .subtabs button { border: 1px solid ButtonText; }
  .charge, .tbar, .primary { border: 2px solid ButtonText; }
  .ticket .charge[aria-disabled="true"], .tbar-dock .tbar[aria-disabled="true"], .primary:disabled { border-color: GrayText; color: GrayText; opacity: 1; }
}
/* The two sides share the width equally, so the switch reads as one control with two halves. */
.thead > .seg:first-child { display: grid; gap: 0; }

/* Audit A9: item photos on the tiles. The picture space holds the item's initials, and the photo covers them when it
   arrives, so a tile never changes size. */
.tile .ph { position: relative; display: grid; place-items: center; place-content: center; flex: none; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; background: var(--sunk); color: var(--muted); font: 600 calc(20px * var(--text)) var(--display); letter-spacing: .02em; }
.tile .ph img { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; background: var(--sunk); }
@media (max-width: 760px) {
  /* On a phone a photo above each name would leave room for four items. With photos the items become a list: a small
     photo, the name on one line where it fits, and the price at the end. */
  .till .grid.pics { grid-template-columns: 1fr; }
  .grid.pics > .tile { flex-direction: row; align-items: center; gap: 10px; min-height: calc(60px * var(--size)); padding: 6px 12px 6px 6px; }
  .grid.pics .tile .ph { width: calc(48px * var(--size)); aspect-ratio: 1; border-radius: 7px; font-size: calc(15px * var(--text)); }
  .grid.pics .tile div { flex: 1 1 0; min-width: 0; flex-direction: row; align-items: center; gap: 10px; padding: 0; }
  .grid.pics .tile b { min-width: 0; overflow-wrap: anywhere; }
}
@media (forced-colors: active) { .tile .ph { border-bottom: 1px solid ButtonText; } .grid.pics .tile .ph { border: 1px solid ButtonText; } }

/* One skeleton vocabulary, also used before a route or category form is ready. */
.bx-skel{display:block;border-radius:6px;background:var(--sunk);background-image:linear-gradient(90deg,transparent,color-mix(in srgb,var(--raised) 60%,transparent),transparent);background-size:200% 100%;animation:bx-skel 1.4s ease-in-out infinite}
@keyframes bx-skel{from{background-position:150% 0}to{background-position:-50% 0}}
@media(prefers-reduced-motion:reduce){.bx-skel{animation:none;background-image:none}}
.sell-skeleton { display:grid; grid-template-columns:minmax(0,1fr) clamp(320px,30vw,440px); gap:12px; height:100%; min-height:0; overflow:hidden; }
.sell-skeleton-menu { display:flex; flex-direction:column; gap:12px; min-width:0; }
.sell-skeleton-filters { display:flex; gap:8px; }.sell-skeleton-filters>.bx-skel { height:44px; width:110px; }
.sell-skeleton-tiles { display:grid; grid-template-columns:repeat(auto-fill,minmax(clamp(116px,14vw,220px),1fr)); gap:6px; }
.sell-skeleton-tiles>.bx-skel { height:calc(64px * var(--size,1)); border-radius:10px; }
@media(min-width:1100px){.sell-skeleton-tiles>.bx-skel{height:calc(110px * var(--size,1))}}
.sell-skeleton-ticket { display:flex; flex-direction:column; justify-content:space-between; padding:12px; border:1px solid var(--line); border-radius:12px; background:var(--raised); }
.sell-skeleton-ticket>.bx-skel { height:56px; }.sell-skeleton-review { display:none; }
.form-skeleton>div { display:grid; gap:12px; }.form-skeleton .bx-skel:nth-child(odd) { width:32%; height:16px; }.form-skeleton .bx-skel:nth-child(even) { height:44px; }
@media (max-width:860px) {
 .sell-skeleton { display:flex; flex-direction:column; gap:0; }.sell-skeleton-menu { flex:1; padding:12px; overflow:hidden; }.sell-skeleton-filters>.bx-skel { flex:1; }.sell-skeleton-ticket { display:none; }.sell-skeleton-review { display:block; flex:none; height:56px; border-radius:0; }
}
@media (min-width:600px) and (max-width:1099px) and (pointer:coarse) {
 .till .grid { --tile-title-size: 18px; }
 .till .grid { --tile-columns:repeat(auto-fill,minmax(calc(180px * var(--size)),1fr)); }
 .sell-skeleton-tiles { grid-template-columns:repeat(auto-fill,minmax(calc(180px * var(--size,1)),1fr)); }.sell-skeleton-tiles>.bx-skel { height:calc(96px * var(--size,1)); }
 .till .tile { min-height:calc(96px * var(--size)); }.till .tile b { font-size:calc(18px * var(--text)); }.till .tile .num { font-size:calc(20px * var(--text)); }
}

.ticket-allergens{display:grid;gap:6px;padding-block:12px;border-block:1px solid var(--line)}.ticket-allergens h3{font-size:15px;margin:0}.ticket-allergens p{margin:0;line-height:1.5}

.option-choices .opt{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;min-height:52px}.option-choices .opt small{font-size:12px}
