/* AppCompanion EPOS demo. Measurements are taken from a 1280x720 screen recording.
   1rem = 16px at 1280x720; the root size scales with the viewport so the till layout
   stays proportional on any screen (min/max clamped), with a stacked phone layout below 760px. */

:root {
  --bg: #09090b;
  --topbar: #050506;
  --rail: #131316;
  --panel: #0e0e11;
  --card: #111114;
  --raised: #18181b;
  --field: #121214;
  --border: #222227;
  --border-strong: #2e2e35;
  --text: #fafafa;
  --muted: #a1a1aa;
  --dim: #71717a;
  --accent: #a78bfa;
  --accent-strong: #8b5cf6;
  --accent-line: #7c6af7;
  --red: #ef4444;
  --blue: #3b82f6;
  --amber: #f59e0b;
  --green: #22c55e;
  --green-solid: #059669;
  --radius: 0.5rem;
  --font: system-ui, "Segoe UI", -apple-system, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
  font-size: clamp(12px, calc(min(100vw, 177.78vh) / 80), 24px);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.8125rem;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
input { user-select: text; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }

.icon { width: 1.125rem; height: 1.125rem; flex: none; }
.spin { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Shell ------------------------------------------------------------------------ */

.app { height: 100vh; height: 100dvh; }
.shell {
  display: grid;
  grid-template-columns: 4rem 1fr;
  grid-template-rows: 3.2rem 1fr;
  grid-template-areas: "top top" "rail main";
  height: 100vh;
  height: 100dvh;
}

.topbar {
  grid-area: top;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 1rem 0 0.9rem;
  background: var(--topbar);
  border-bottom: 2px solid var(--accent-line);
  min-width: 0;
}
.venue { font-size: 1.06rem; font-weight: 700; letter-spacing: -0.01em; margin-left: 0.4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 1.45rem; }
.top-item { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 600; color: #e4e4e7; white-space: nowrap; }
.top-item .icon { color: #d4d4d8; }
.avatar {
  width: 1.4rem; height: 1.4rem; border-radius: 50%;
  display: inline-grid; place-items: center;
  font-size: 0.66rem; font-weight: 700; color: #fff;
}
.icon-btn {
  display: inline-grid; place-items: center;
  width: 1.9rem; height: 1.9rem; border-radius: 0.4rem;
  color: #d4d4d8; position: relative;
}
.icon-btn:hover { background: #1c1c20; }
.icon-btn.sync .badge {
  position: absolute; top: -0.25rem; right: -0.35rem;
  min-width: 1rem; height: 1rem; padding: 0 0.25rem;
  border-radius: 999px; background: #991b1b; color: #fff;
  font-size: 0.62rem; font-weight: 700; display: grid; place-items: center;
}
.btn-plain:hover { color: #fff; }

.rail {
  grid-area: rail;
  background: var(--rail);
  border-right: 1px solid #1a1a1e;
  display: flex; flex-direction: column; align-items: center;
  padding: 1.55rem 0 0.75rem;
  gap: 0;
  z-index: 20;
}
.rail-group { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; padding: 0.6rem 0; }
.rail-group:first-child { padding-top: 0; }
.rail-group + .rail-group { border-top: 1px solid #222227; }
.rail-item {
  width: 2.75rem; height: 2.75rem; border-radius: 0.65rem;
  display: grid; place-items: center; color: #a1a1aa;
  border: 1.5px solid transparent;
}
.rail-item .icon { width: 1.2rem; height: 1.2rem; }
.rail-item:hover { color: #e4e4e7; background: #1b1b20; }
.rail-item.mode { color: var(--accent); background: #19181f; border-color: #2b2836; }
.rail-item.mode.active { border-color: #5b4d9a; background: #1e1b2b; }
.rail-item.active { color: #fafafa; border-color: #4a4a55; background: #1c1c21; }
.rail-label { display: none; }
.rail-expand { margin-top: auto; color: #a1a1aa; padding: 0.4rem; border-radius: 0.4rem; }
.rail-expand:hover { color: #fafafa; background: #1b1b20; }
.rail-heading { display: none; }

/* Expanded rail (as on the till): ORDER / OPERATIONS / ADMIN sections, icon + label rows,
   and a full-width Collapse bar at the bottom. */
.shell { transition: grid-template-columns 0.2s ease; }
.shell.rail-wide { grid-template-columns: 13.75rem 1fr; }
.shell.rail-wide .rail { align-items: stretch; padding: 1.35rem 0 0; }
.shell.rail-wide .rail-group { align-items: stretch; gap: 0.15rem; padding: 0 0.4rem 1rem; }
.shell.rail-wide .rail-group + .rail-group { border-top: 0; }
.shell.rail-wide .rail-heading { display: block; padding: 0 0.55rem 0.45rem; font-size: 0.66rem; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: #a1a1aa; }
.shell.rail-wide .rail-item {
  width: auto; height: 2.8rem; display: flex; align-items: center; justify-content: flex-start; gap: 0.75rem;
  padding: 0 0.75rem; border-radius: 0.55rem; border: 1.5px solid transparent; background: none; color: #d4d4d8;
}
.shell.rail-wide .rail-item:hover { background: #1b1b20; }
.shell.rail-wide .rail-item.mode .icon { color: var(--accent); }
.shell.rail-wide .rail-item.active { border-color: #6656c4; background: #1d1a29; }
.shell.rail-wide .rail-item.na:disabled { color: #3a3a42; }
.shell.rail-wide .rail-item.na:disabled .icon { color: inherit; }
.shell.rail-wide .rail-label { display: inline; font-weight: 600; font-size: 0.8rem; color: #f4f4f5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shell.rail-wide .rail-item.na:disabled .rail-label { color: inherit; }
.shell.rail-wide .rail-expand {
  align-self: stretch; display: flex; align-items: center; gap: 0.65rem; height: 2.8rem; padding: 0 1rem;
  border: 1px solid #3f3f46; border-bottom: 0; border-radius: 0.45rem 0.45rem 0 0; background: #111113; color: #a1a1aa;
}
.shell.rail-wide .rail-expand .rail-label { color: inherit; }
.shell.rail-wide .rail-expand:hover { color: #fafafa; background: #18181b; }
.menu-btn { color: #e4e4e7; }
.rail-scrim { display: none; }

.main { grid-area: main; min-width: 0; min-height: 0; overflow: hidden; background: var(--bg); }

/* ---- Buttons ------------------------------------------------------------------------- */

.btn-dark, .btn-outline, .btn-white, .btn-solid {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  height: 2rem; padding: 0 0.85rem; border-radius: 0.4rem;
  font-weight: 600; font-size: 0.78rem; white-space: nowrap;
}
.btn-dark { background: #050506; border: 1px solid var(--border-strong); color: #f4f4f5; }
.btn-dark:not(:disabled):hover { background: #141418; }
.btn-outline { background: #0c0c0e; border: 1px solid var(--border-strong); color: #f4f4f5; }
.btn-outline:hover { background: #16161a; }
.btn-outline.small { height: 1.9rem; font-size: 0.75rem; }
.btn-white { background: #f4f4f5; color: #09090b; border: 1px solid #f4f4f5; }
.btn-white:hover { background: #fff; }
.btn-solid { color: #fff; border: 0; }
.btn-solid.red { background: var(--red); }
.btn-solid.blue { background: var(--blue); }
.btn-solid.amber { background: var(--amber); }
.btn-solid.green { background: var(--green-solid); }
.btn-solid.pay { background: #a594f9; }
.btn-solid:disabled, .btn-dark:disabled { opacity: 0.45; }
.btn-solid.pay.placing { opacity: 0.6; }
.full { width: 100%; }
.tall { height: 2.45rem; }
.link-btn { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--muted); font-size: 0.75rem; }
.link-btn:hover { color: #fff; }
.link-btn.strong { color: #f4f4f5; font-weight: 600; }
.link-btn.danger { color: #f87171; }
.link-btn .icon { width: 0.85rem; height: 0.85rem; }

/* ---- POS: catalogue -------------------------------------------------------------------- */

.pos { display: grid; grid-template-columns: 1fr 18.7rem; height: 100%; min-height: 0; }
.catalogue { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.cat-toolbar {
  display: flex; align-items: center; gap: 0.75rem;
  height: 3.25rem; flex: none;
  margin: 0 0.75rem 0 0.7rem; padding-top: 0.1rem;
  border-bottom: 1px solid #16161a;
}
.back-btn { display: inline-flex; align-items: center; gap: 0.3rem; font-weight: 600; color: #e4e4e7; padding: 0.4rem 0.4rem 0.4rem 0.6rem; }
.back-btn .icon { width: 0.95rem; height: 0.95rem; }
.crumbs { display: flex; align-items: center; gap: 0.45rem; border-left: 1px solid #27272a; padding-left: 0.85rem; white-space: nowrap; }
.crumb-home { color: var(--muted); display: grid; }
.crumb-home .icon { width: 0.95rem; height: 0.95rem; }
.crumb-sep { color: var(--dim); }
.crumb { color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; }
.crumb.current { color: var(--accent); }
.search { flex: 1; display: flex; align-items: center; gap: 0.6rem; min-width: 6rem; color: var(--muted); }
.search .icon { width: 1rem; height: 1rem; margin-left: 0.4rem; }
.search input {
  flex: 1; min-width: 0; height: 1.95rem;
  background: var(--field); border: 1px solid #232328; border-radius: 0.4rem;
  padding: 0 0.6rem; color: var(--text); outline: none;
}
.search input::placeholder { color: #8b8b94; }
.search input:focus { border-color: #3f3f46; }
.custom-item { height: 2.3rem; padding: 0 1rem; border-radius: 0.5rem; font-size: 0.82rem; }

.grid-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 1.25rem 0.75rem 1rem 0.7rem; scrollbar-color: #3f3f46 transparent; }
.tile-grid { display: grid; grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr)); grid-auto-rows: 6.5rem; gap: 0.75rem; }
.tile {
  --c: #64748b;
  position: relative;
  border-radius: 0.5rem;
  border: 1px solid color-mix(in srgb, var(--c) 72%, transparent);
  background:
    radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--c) 11%, transparent), transparent 70%),
    color-mix(in srgb, var(--c) 5%, #09090b);
  color: #f4f4f5; font-weight: 700; font-size: 0.875rem; line-height: 1.25;
  padding: 0.75rem;
  transition: transform 0.06s ease, filter 0.12s ease;
}
.tile:hover { filter: brightness(1.25); }
.tile:active { transform: scale(0.98); }
.tile-category { display: grid; place-items: center; text-align: center; text-transform: uppercase; hyphens: auto; overflow-wrap: break-word; }
.tile-product { display: flex; flex-direction: column; justify-content: space-between; text-align: center; }
.tile-name { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.tile-price { align-self: flex-end; }
.grid-empty { grid-column: 1 / -1; color: var(--muted); text-align: center; padding: 3rem 0; }

/* ---- POS: order panel ------------------------------------------------------------------ */

.order-panel { display: flex; flex-direction: column; min-height: 0; background: var(--panel); border-left: 1px solid #1c1c20; }
.order-head { display: flex; align-items: center; gap: 0.5rem; height: 3.1rem; padding: 0.35rem 1rem 0 0.95rem; flex: none; }
.order-head h2 { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.82rem; font-weight: 600; }
.order-head h2 .icon { width: 1rem; height: 1rem; }
.order-head .link-btn { margin-left: auto; }
.sheet-close { display: none; }
.order-lines { flex: 1; min-height: 0; overflow-y: auto; padding: 0.75rem 0.95rem 0; }
.order-empty { color: var(--muted); font-size: 0.72rem; text-align: center; margin-top: 11.5rem; }
.order-line { border-bottom: 1px solid #1a1a1e; }
.line-main { width: 100%; display: grid; grid-template-columns: 1.15rem 1fr auto; align-items: start; gap: 0.65rem; padding: 0.6rem 0 0.6rem 0.1rem; text-align: left; }
.order-line.selected .line-main { color: #fff; }
.qty { display: grid; place-items: center; width: 1.15rem; height: 1.15rem; border: 1px solid #3a3a42; border-radius: 0.25rem; font-size: 0.68rem; font-weight: 600; color: #e4e4e7; margin-top: 0.05rem; }
.line-name { font-weight: 600; font-size: 0.82rem; overflow-wrap: anywhere; }
.line-name small { display: block; font-size: 0.66rem; color: var(--muted); font-weight: 500; margin-top: 0.15rem; text-transform: uppercase; }
.line-price { font-weight: 600; font-size: 0.82rem; }
.order-line.selected { margin: 0.1rem -0.45rem; padding: 0 0.45rem 0.55rem; border-radius: 0.4rem; border-bottom-color: transparent; background: #141417; }
.order-line .r-line-ctrl, .order-line .r-line-actions { padding-inline: 0; }

.order-foot { flex: none; padding: 0.75rem 0.95rem 0.75rem; display: flex; flex-direction: column; gap: 0.45rem; }
.totals .row { display: flex; justify-content: space-between; }
.totals .sub { color: var(--muted); font-size: 0.75rem; }
.totals .total { font-size: 1rem; font-weight: 700; margin-top: 0.25rem; }
.order-foot > .btn-dark.full { height: 2rem; font-size: 0.75rem; }
.order-foot .icon { width: 0.95rem; height: 0.95rem; }
.btn-row { display: grid; gap: 0.5rem; }
.btn-row.three { grid-template-columns: repeat(3, 1fr); }
.btn-row.two { grid-template-columns: 1fr 1fr; }
/* Every button in a row takes the row's full height: no fixed heights, so the grid stretches each one to the
   tallest. A row with a coloured action in it is a row of main actions, so a greyed-out button there (retail's
   Item) is sized like its neighbours rather than like the smaller Discount / Notes / Staff/Waste row. */
.btn-row.three > button { height: auto; min-height: 1.95rem; font-size: 0.72rem; padding: 0 0.3rem; }
.btn-row.three > .btn-solid, .btn-row.three:has(> .btn-solid) > button { min-height: 2.5rem; font-size: 0.8rem; }
.pay-row { grid-template-columns: minmax(5.25rem, auto) 1fr; } /* wider when a translation of "Tab" needs it */
.pay-row > button { height: 2.75rem; font-size: 0.9rem; }
.tab-btn { color: #93c5fd; }
.order-summary-bar { display: none; }

/* ---- Modals ---------------------------------------------------------------------------------- */

#modal-root[hidden] { display: none; }
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0, 0, 0, 0.62);
  display: grid; place-items: center;
  padding: 1rem;
  animation: fade 0.12s ease;
}
@keyframes fade { from { opacity: 0; } }
.modal:focus { outline: none; }
.modal {
  width: min(28rem, 100%);
  max-height: calc(100dvh - 2rem);
  display: flex; flex-direction: column;
  background: #0f0f12;
  border: 1px solid #26262c;
  border-radius: 0.6rem;
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.6);
  animation: pop 0.14s ease;
}
@keyframes pop { from { transform: scale(0.97); opacity: 0; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 0.95rem 1rem 0.85rem 0.95rem; border-bottom: 1px solid #1f1f24; }
.modal-head h2 { font-size: 0.95rem; font-weight: 600; }
.modal-body { padding: 1rem 0.95rem; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 0.6rem; padding: 0.95rem; border-top: 1px solid #1f1f24; }
.field-label { font-size: 0.75rem; font-weight: 600; margin-bottom: 0.7rem; }

.modal-variant { width: min(45rem, 100%); }
.variant-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.55rem; }
.variant {
  display: flex; align-items: center; gap: 1rem;
  height: 5.5rem; padding: 0 1.4rem 0 1.5rem;
  border-radius: 0.45rem;
  border: 1px solid color-mix(in srgb, var(--c) 75%, transparent);
  background: color-mix(in srgb, var(--c) 12%, #0d0d10);
  text-align: left;
}
.variant:hover { filter: brightness(1.2); }
.variant-bar { width: 0.28rem; height: 2.25rem; border-radius: 1rem; background: var(--c); flex: none; }
.variant-name { flex: 1; font-size: 1.06rem; font-weight: 700; text-transform: uppercase; }
.variant-price { font-size: 0.95rem; font-weight: 600; color: #d4d4d8; }

/* Payment */
.modal-payment { width: min(45rem, 100%); }
.payment-body { display: grid; grid-template-columns: 21rem 1fr; gap: 0.95rem; }
.pay-left { display: flex; flex-direction: column; gap: 0.55rem; }
.pay-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.pay-card { height: 3.6rem; border-radius: 0.4rem; background: var(--raised); border: 1px solid var(--raised); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.1rem; }
.pay-card span { font-size: 0.75rem; color: var(--muted); }
.pay-card strong { font-size: 0.95rem; }
.pay-card.outstanding { background: #3b1406; border-color: #c2410c; }
.pay-card.outstanding span, .pay-card.outstanding strong { color: #fb923c; }
.pay-card.paid { background: #052e16; border-color: #15803d; }
.pay-card.paid span, .pay-card.paid strong { color: #4ade80; }
.pay-card.paid .icon { width: 1.1rem; height: 1.1rem; stroke-width: 3; }
.amount-display { height: 3.45rem; border-radius: 0.4rem; background: #050506; border: 1px solid #232328; display: grid; place-items: center; margin-bottom: 0.1rem; }
.amount { font-size: 1.65rem; font-weight: 700; }
.amount.placeholder { font-size: 0.8rem; font-weight: 400; color: var(--muted); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.45rem; }
.key { height: 2.5rem; border-radius: 0.4rem; background: #0a0a0c; border: 1px solid #1d1d21; font-size: 0.9rem; font-weight: 700; display: grid; place-items: center; }
.key:not(:disabled):hover { background: #151519; }
.key-grey { background: #27272a; border-color: #27272a; color: #a1a1aa; }
.key:disabled { opacity: 0.45; }
.quick-cash { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.45rem; margin-top: 0.15rem; }
.tender-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.1rem; }
.tender { height: 2.7rem; border-radius: 0.4rem; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; font-weight: 600; }
.tender .icon { width: 1rem; height: 1rem; }
.tender.cash { background: #04140b; border: 1px solid #166534; color: #4ade80; }
.tender.card { background: #050c1c; border: 1px solid #1e40af; color: #60a5fa; }
.tender:not(:disabled):hover { filter: brightness(1.3); }
.tender:disabled { opacity: 0.45; }
.pay-right { display: flex; flex-direction: column; min-height: 0; }
.payments-head { display: flex; align-items: center; justify-content: space-between; height: 1.6rem; margin-bottom: 0.45rem; }
.payments-head h3 { font-size: 0.82rem; font-weight: 600; }
.payments-box { flex: 1; min-height: 12rem; border: 1px solid #1f1f24; border-radius: 0.5rem; background: #0a0a0c; display: flex; flex-direction: column; padding: 0.55rem; }
.payments-empty { margin: auto; color: var(--muted); font-size: 0.72rem; }
.payment-list { flex: 1; display: flex; flex-direction: column; gap: 0.4rem; overflow-y: auto; }
.payment-item { display: flex; align-items: center; gap: 0.6rem; background: #141417; border-radius: 0.4rem; padding: 0.45rem 0.4rem 0.45rem 0.6rem; }
.payment-amount { margin-left: auto; font-weight: 700; text-align: right; }
.payment-amount small { display: block; font-size: 0.62rem; font-weight: 500; color: var(--muted); }
.payment-item .icon-btn { width: 1.4rem; height: 1.4rem; color: var(--muted); }
.payment-item .icon-btn .icon { width: 0.85rem; height: 0.85rem; }
.method { display: inline-flex; align-items: center; gap: 0.5rem; }
.method .icon { width: 0.95rem; height: 0.95rem; }
.method.m-cash .icon { color: #4ade80; }
.method.m-card .icon { color: #60a5fa; }
.total-paid { display: flex; justify-content: space-between; align-items: center; background: #141417; border-radius: 0.4rem; padding: 0.55rem 0.6rem; margin-top: 0.4rem; }
.total-paid span { color: var(--muted); }
.modal-payment .modal-foot { border-top: 0; padding-top: 0.2rem; }
.modal-payment .btn-solid.pay { padding: 0 1rem; }

/* Payment complete */
.modal-complete { width: min(26rem, 100%); }
.summary-box { background: #141417; border-radius: 0.45rem; padding: 0.2rem 0.75rem; margin-bottom: 1.1rem; }
.summary-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.55rem 0; font-size: 0.78rem; }
.summary-row + .summary-row { border-top: 1px solid #1f1f24; }
.summary-row > span { color: var(--muted); }
.summary-row small { color: var(--dim); text-transform: uppercase; font-size: 0.66rem; }
.summary-row .method { color: #f4f4f5; }
.summary-row.change strong { color: #4ade80; }
.summary-row.total span, .summary-row.total strong { color: #fff; font-weight: 700; }
.mono { font-variant-numeric: tabular-nums; }
.receipt-q { color: var(--muted); margin-bottom: 0.6rem; }
.modal-complete .btn-row.two > button { height: 2.1rem; }

/* Forms (dialogs not in the recording, styled to match) */
.modal-form.wide { width: min(36rem, 100%); }
.form { display: flex; flex-direction: column; gap: 0.85rem; }
.field { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 600; font-size: 0.78rem; }
.field input { height: 2.2rem; background: var(--field); border: 1px solid #26262c; border-radius: 0.4rem; padding: 0 0.7rem; font-weight: 400; outline: none; }
.field input:focus { border-color: #4a4a55; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; }
.segmented button { height: 2.2rem; border-radius: 0.4rem; border: 1px solid var(--border-strong); background: #050506; display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; font-weight: 600; color: var(--muted); }
.segmented button.on { background: #f4f4f5; color: #09090b; border-color: #f4f4f5; }
.muted { color: var(--muted); }
.small { font-size: 0.7rem; }
.center { text-align: center; }
.warn-text { color: #fbbf24; margin-top: 0.8rem; }
.demo-info p { margin-bottom: 0.7rem; line-height: 1.5; }
.demo-info h3 { font-size: 0.82rem; margin: 0.9rem 0 0.4rem; }
.demo-info ul { margin: 0; padding-left: 1.1rem; color: #d4d4d8; line-height: 1.6; }

/* ---- Toasts ---------------------------------------------------------------------------------- */

#toast-root { position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 0.5rem; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 2rem); }
.toast {
  display: flex; align-items: center; gap: 0.55rem;
  background: #18181b; border: 1px solid #2e2e35; border-radius: 0.5rem;
  padding: 0.65rem 0.9rem; font-size: 0.78rem; box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.5);
  opacity: 0; transform: translateY(0.5rem); transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: none; }
.toast .icon { width: 1rem; height: 1rem; color: var(--accent); }
.toast-success .icon { color: #4ade80; }
.toast-warn .icon { color: #fbbf24; }

/* ---- Pages (reports, tables, management) -------------------------------------------------------- */

.page { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.page-head { display: flex; align-items: center; gap: 0.75rem; height: 3.25rem; padding: 0 0.95rem 0 1.4rem; border-bottom: 1px solid #16161a; flex: none; }
.page-head h1 { font-size: 1.06rem; font-weight: 600; }
.page-head .push { margin-left: auto; }
.page-body { flex: 1; min-height: 0; overflow-y: auto; padding: 1rem 0.95rem 1rem 0.95rem; }
.center-body { display: grid; place-items: center; }
.split { flex: 1; min-height: 0; display: grid; grid-template-columns: 11.65rem 1fr; }
.subnav { border-right: 1px solid #1c1c20; padding: 0.5rem 0.45rem; display: flex; flex-direction: column; gap: 0.3rem; overflow-y: auto; }
.subnav a { display: flex; align-items: center; gap: 0.6rem; height: 2.3rem; padding: 0 0.75rem; border-radius: 0.4rem; color: #d4d4d8; font-weight: 600; }
.subnav a .icon { width: 0.95rem; height: 0.95rem; }
.subnav a:hover { background: #17171b; }
.subnav a.active { background: #f4f4f5; color: #09090b; }
.split-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: 0.5rem 0.95rem 0 0.95rem; }

.report-head { display: flex; align-items: center; justify-content: space-between; height: 2.4rem; margin-bottom: 0.5rem; flex: none; }
.report-head h2 { font-size: 0.95rem; font-weight: 600; }
.report-scroll { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 1rem; padding-bottom: 1rem; padding-right: 0.2rem; }
.card { background: var(--card); border: 1px solid #1f1f24; border-radius: 0.5rem; padding: 0.95rem 1rem; }
.card h3 { font-size: 0.82rem; font-weight: 600; margin-bottom: 0.6rem; }
.card.two-col { display: grid; grid-template-columns: 1fr 1fr; }
.card.two-col .label { display: block; font-size: 0.7rem; color: var(--muted); margin-bottom: 0.1rem; }
.kv { display: flex; justify-content: space-between; gap: 1rem; padding: 0.35rem 0; }
.kv span { color: var(--muted); }
.kv strong { font-weight: 600; text-align: right; }
.cat-table { width: 100%; border-collapse: collapse; }
.cat-table th { font-size: 0.72rem; color: var(--muted); font-weight: 500; text-align: left; padding: 0.3rem 0; border-bottom: 1px solid #1f1f24; }
.cat-table td { padding: 0.5rem 0; border-bottom: 1px solid #1a1a1e; }
.cat-table tr:last-child td { border-bottom: 0; }
.cat-table th:nth-child(2), .cat-table td:nth-child(2) { text-align: center; }
.cat-table th:nth-child(3), .cat-table td:nth-child(3) { text-align: right; }
.report-scroll > .btn-dark, .report-scroll > .btn-white { flex: none; }

.status-tabs { display: flex; gap: 0.3rem; flex-wrap: wrap; padding: 0.35rem 0 0.75rem; border-bottom: 1px solid #16161a; flex: none; }
.status-tabs button { height: 2.4rem; padding: 0 0.75rem; border-radius: 0.4rem; font-size: 0.75rem; font-weight: 500; color: #e4e4e7; }
.status-tabs button.on { background: var(--accent-strong); color: #fff; }
.filters { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; padding: 0.75rem 0; flex: none; }
.filter-day { font-weight: 600; min-width: 4.5rem; text-align: center; }
.filters .icon-btn { border: 1px solid #222227; }
.date-input, .select { height: 1.95rem; background: #0c0c0e; border: 1px solid #222227; border-radius: 0.4rem; padding: 0 0.6rem; color: #e4e4e7; font-size: 0.75rem; }
.pills { display: inline-flex; gap: 0.2rem; }
.pills button { height: 1.75rem; padding: 0 0.55rem; border-radius: 0.35rem; font-size: 0.72rem; font-weight: 600; color: #d4d4d8; }
.pills button.on { background: #f4f4f5; color: #09090b; }
.order-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 0.45rem; padding-bottom: 1rem; }
.order-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 1rem; min-height: 3.8rem; padding: 0.55rem 1rem; border: 1px solid #1f1f24; border-radius: 0.5rem; background: var(--card); text-align: left; }
.order-row:hover { background: #151519; }
.order-row > div { display: flex; flex-direction: column; gap: 0.15rem; }
.order-row .muted { font-size: 0.72rem; }
.order-row-right { align-items: flex-end; }
.status-pill { display: inline-block; font-size: 0.66rem; font-weight: 600; padding: 0.15rem 0.5rem; border-radius: 999px; background: #1f1f24; color: #d4d4d8; }
.status-pill.tendered { background: #052e16; color: #4ade80; }
.empty-state { margin: auto; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 0.35rem; padding: 2rem 1rem; max-width: 26rem; }
.empty-state .icon { width: 1.6rem; height: 1.6rem; color: #d4d4d8; margin-bottom: 0.3rem; }
.empty-title { color: #f4f4f5; font-weight: 600; }
.empty-state.big .icon { width: 2.2rem; height: 2.2rem; }
.list { display: flex; flex-direction: column; gap: 0.45rem; }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.7rem 0.85rem; border: 1px solid #1f1f24; border-radius: 0.45rem; }
.list-row > div { display: flex; flex-direction: column; gap: 0.15rem; }
.list-row .muted { font-size: 0.72rem; }

.area-tabs { display: flex; gap: 0.5rem; margin: 0.45rem 0 0.9rem 0.3rem; }
.area-tab { height: 2.75rem; padding: 0 1.1rem; border-radius: 0.45rem; border: 1px solid #3a3a42; background: #141417; font-weight: 600; }
.area-tab span { color: var(--muted); font-weight: 500; margin-left: 0.25rem; font-size: 0.72rem; }
.table-grid { display: grid; grid-template-columns: repeat(auto-fill, 11.75rem); gap: 0.75rem; margin-left: 0.3rem; }
.table-card { height: 6.2rem; border-radius: 0.45rem; border: 1px solid #15803d; background: color-mix(in srgb, #16a34a 8%, #08090a); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3rem; }
.table-card strong { font-size: 0.88rem; }
.seats { display: inline-flex; align-items: center; gap: 0.25rem; color: var(--muted); font-size: 0.72rem; }
.seats .icon { width: 0.8rem; height: 0.8rem; }
.table-status { font-size: 0.62rem; font-weight: 600; color: #4ade80; background: #052e16; border: 1px solid #14532d; padding: 0.1rem 0.45rem; border-radius: 0.3rem; }
.table-card.plain { border-color: #2a2a30; background: #141417; width: auto; }
.onshift { gap: 0.5rem; padding: 0.75rem 0.7rem; }
.onshift-head { display: flex; justify-content: space-between; align-items: center; font-size: 0.72rem; font-weight: 600; color: var(--muted); margin-bottom: 1rem; }
.hint-banner { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; border: 1px dashed #2a3a2a; border-radius: 0.5rem; padding: 0.75rem; color: #d4d4d8; margin: 0.5rem 0 1.2rem; }
.area-label { font-size: 0.75rem; font-weight: 600; color: var(--muted); margin-bottom: 0.6rem; }

/* ---- Responsive -------------------------------------------------------------------------------- */

/* Narrow tills / tablets in portrait: fewer catalogue columns, slimmer order panel. */
@media (max-width: 1100px) {
  .tile-grid { --cols: 4; }
}
@media (max-width: 900px) {
  .tile-grid { --cols: 3; }
  .pos { grid-template-columns: 1fr 16.5rem; }
  .payment-body { grid-template-columns: 1fr; }
  .payments-box { min-height: 6rem; }
}

/* Phones: rail becomes a drawer, order panel becomes a bottom sheet. */
@media (max-width: 760px) {
  :root { font-size: 14px; }
  .shell { grid-template-columns: 1fr; grid-template-areas: "top" "main"; grid-template-rows: 3.4rem 1fr; }
  .top-actions { gap: 0.4rem; }
  .top-actions .label, .top-item.cash { display: none; }
  .rail {
    position: fixed; top: 3.4rem; bottom: 0; left: 0; width: 15rem;
    align-items: stretch; padding: 1rem 0.75rem;
    transform: translateX(-100%); transition: transform 0.2s ease;
  }
  .rail.open { transform: none; }
  .rail { z-index: 40; } /* above the order bar and sheet */
  .rail.open ~ .rail-scrim { display: block; position: fixed; inset: 3.4rem 0 0 0; background: rgba(0, 0, 0, 0.5); z-index: 35; }
  .rail-group { align-items: stretch; }
  .rail-item { width: auto; display: flex; gap: 0.75rem; padding: 0 0.85rem; justify-content: flex-start; }
  .rail-label { display: inline; font-weight: 600; }
  .rail-expand { display: none; }
  .shell.rail-wide { grid-template-columns: 1fr; }
  .shell.rail-wide .rail-expand { display: none; }
  .shell.rail-wide .rail { padding: 1rem 0.75rem; }
  .rail-heading { display: block; padding: 0.15rem 0.85rem 0.4rem; font-size: 0.66rem; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: #a1a1aa; }
  .rail-group + .rail-group { border-top: 0; }

  .pos { grid-template-columns: 1fr; position: relative; }
  .cat-toolbar { flex-wrap: wrap; height: auto; padding: 0.6rem 0; gap: 0.5rem; margin: 0 0.75rem; }
  .search { order: 3; flex-basis: 100%; }
  .search .icon { margin-left: 0; }
  .custom-item { margin-left: auto; height: 2.1rem; }
  .grid-scroll { padding: 0.75rem 0.75rem 5rem; scroll-padding-bottom: 4.5rem; } /* clear of the order bar */
  .tile-grid { --cols: 2; grid-auto-rows: 5.5rem; gap: 0.6rem; }
  .order-panel {
    position: fixed; inset: 3.4rem 0 0 0; z-index: 30;
    transform: translateY(100%); transition: transform 0.22s ease;
    border-left: 0;
  }
  .order-panel.sheet-open { transform: none; }
  .sheet-close { display: grid; margin-left: 0.25rem; }
  .order-head .link-btn { margin-left: auto; }
  .order-empty { margin-top: 30vh; }
  .order-summary-bar {
    display: flex; align-items: center; justify-content: space-between;
    position: fixed; left: 0.75rem; right: 0.75rem; bottom: max(0.75rem, env(safe-area-inset-bottom));
    height: 3.2rem; padding: 0 1rem; z-index: 25;
    border-radius: 0.6rem; background: #a594f9; color: #fff; font-weight: 600;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.5);
  }
  .order-summary-bar[hidden] { display: none; }
  .order-summary-bar span { display: inline-flex; align-items: center; gap: 0.5rem; }

  .modal-backdrop { padding: 0; place-items: end stretch; }
  .modal { width: 100%; max-height: 92dvh; border-radius: 0.9rem 0.9rem 0 0; }
  .variant { height: 4.5rem; }
  .split { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .subnav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid #1c1c20; }
  .subnav a { white-space: nowrap; }
  .card.two-col { grid-template-columns: 1fr; gap: 0.6rem; }
  .page-head { padding-left: 0.75rem; }
  .page-head .btn-outline, .page-head .btn-white { padding: 0 0.6rem; }
  .table-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-row { grid-template-columns: 1fr auto; }
  .order-row .status-pill { grid-column: 1 / -1; justify-self: start; }
}

/* ---- Unavailable in the demo: greyed out ------------------------------------------------------ */

button.na:disabled, button.na:disabled:hover {
  background: #17171a; border-color: #222226; color: #4b4b54; box-shadow: none; filter: none; opacity: 1; cursor: not-allowed;
}
button.na:disabled .icon { color: inherit; }
.rail-item.na:disabled, .icon-btn.na:disabled, .top-item.na:disabled, .link-btn.na:disabled, .rail-expand.na:disabled { background: none; border-color: transparent; color: #3a3a42; }
.tile.na:disabled { border-color: #222226; background: #0d0d10; color: #4b4b54; }
.tile.na:disabled .tile-icon-box { background: #141417; color: #3a3a42; }
.key.na:disabled { background: #111114; border-color: #18181b; color: #3a3a42; }
.link-btn:disabled { opacity: 0.4; cursor: default; }

/* ---- Retail till: catalogue | ticket | keypad panel (from the retail recording) -------------------- */

.pos.retail { grid-template-columns: 1fr 38rem; }
.pos.retail .tile-grid { grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); } /* as many columns as fit */
.order-panel.retail-panel { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); }
.sheet-bar { display: none; }
.tile-icon { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.55rem; padding: 0.6rem; font-size: 0.82rem; }
.tile-icon-box { width: min(72%, 6.5rem); height: 3.4rem; border-radius: 0.4rem; display: grid; place-items: center; background: #16202c; color: #38bdf8; }
.tile-icon-box .icon { width: 1.6rem; height: 1.6rem; }

.ticket { display: flex; flex-direction: column; min-height: 0; }
.ticket-head { display: grid; grid-template-columns: 1.6rem 1fr 3.4rem 4rem; gap: 0.5rem; padding: 1.15rem 0.95rem 0.45rem; font-size: 0.72rem; font-weight: 600; color: #a1a1aa; }
.ticket-head span:nth-child(3), .ticket-head span:nth-child(4) { text-align: right; }
.ticket-lines { flex: 1; min-height: 0; overflow-y: auto; padding: 0 0.7rem; }
.r-line { border-radius: 0.4rem; }
.r-line.selected { background: #141417; padding-bottom: 0.55rem; margin: 0.1rem 0; }
.r-line-main { width: 100%; display: grid; grid-template-columns: 1.6rem 1fr 3.4rem 4rem; gap: 0.5rem; align-items: center; padding: 0.5rem 0.25rem; text-align: left; }
.r-line .qty { background: #27272a; border-color: #27272a; }
.r-name { font-weight: 600; font-size: 0.82rem; overflow-wrap: anywhere; }
.r-name small { display: block; font-size: 0.64rem; color: var(--muted); font-weight: 500; text-transform: uppercase; }
.r-unit { text-align: right; color: #8b8b94; font-size: 0.72rem; }
.r-total { text-align: right; font-weight: 700; font-size: 0.82rem; }
.r-line-ctrl { display: flex; align-items: center; gap: 0.75rem; padding: 0.15rem 0.5rem 0.55rem; }
.r-line-ctrl .key { width: 2.25rem; height: 2.25rem; }
.r-line-ctrl > span { min-width: 1.6rem; text-align: center; font-weight: 700; }
.r-line-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.45rem; padding: 0 0.5rem; }
.r-line-actions .key { height: 1.95rem; }
.key .icon { width: 1rem; height: 1rem; }
.key.danger { background: none; border-color: transparent; color: #ef4444; }
.ticket-foot { padding: 0.7rem 0.95rem 0.95rem; border-top: 1px solid #16161a; }
.ticket-foot .row.sub { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.75rem; }
.total-bar { display: flex; justify-content: space-between; align-items: center; height: 3rem; margin-top: 0.45rem; padding: 0 1rem; border-radius: 0.4rem; background: #a594f9; color: #fff; font-size: 1.3rem; font-weight: 800; }

.side { display: flex; flex-direction: column; gap: 0.45rem; min-height: 0; overflow-y: auto; padding: 0 0.7rem 0.75rem; background: var(--panel); border-left: 1px solid #1c1c20; }
.side .order-head { padding: 0.35rem 0.2rem 0; height: 2.75rem; }
.quick-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.quick-row .btn-solid { height: 3.25rem; font-size: 0.85rem; }
.quick-row .wide { grid-column: 1 / -1; }
.btn-solid.violet { background: #9333ea; }
.side-spacer { flex: 1; min-height: 0.5rem; }
.sale-row { display: grid; grid-template-columns: 1fr 0.55fr; gap: 0.5rem; }
.sale-btn { height: 2.6rem; border-radius: 0.35rem; background: #e4e4e7; color: #18181b; font-weight: 600; }
.sale-btn:disabled { background: #8f8f96; color: #3f3f46; }
.sale-amount { display: flex; align-items: center; justify-content: flex-end; padding: 0 0.6rem; border-radius: 0.35rem; background: #050506; border: 1px solid #1d1d21; font-weight: 800; font-size: 1.05rem; }
.side-keypad { gap: 0.35rem; }
.side-keypad .key { height: 2.55rem; }

/* Payment window: slate */
.slate-btn { display: inline-flex; align-items: center; gap: 0.5rem; width: fit-content; height: 2.2rem; padding: 0 0.9rem; border-radius: 0.4rem; border: 1px solid #2a2a30; background: #050506; font-weight: 600; font-size: 0.78rem; }
.slate-btn .icon { width: 1rem; height: 1rem; }
.slate-btn.on { border-color: var(--accent); color: var(--accent); }
.slate-btn:disabled { opacity: 0.45; }
.method.m-slate .icon { color: #c4b5fd; }
.slate-pick { gap: 0.5rem; }
.slate-list { flex: 1; min-height: 0; max-height: 15rem; overflow-y: auto; display: flex; flex-direction: column; gap: 0.15rem; }
.slate-row[hidden] { display: none; }
.slate-new { display: grid; grid-template-columns: 1fr 0.8fr auto; gap: 0.4rem; border-top: 1px solid #1f1f24; padding-top: 0.55rem; }
.slate-new input { min-width: 0; height: 2.2rem; border-radius: 0.4rem; border: 1px solid #26262c; background: var(--field); padding: 0 0.6rem; outline: none; }
.slate-new input:focus { border-color: #4a4a55; }
.slate-new .btn-white { height: 2.2rem; }

/* ---- Slates (customer accounts) ---------------------------------------------------------------- */

.page-head h1.with-icon { display: inline-flex; align-items: center; gap: 0.6rem; }
.slates-split { flex: 1; min-height: 0; display: grid; grid-template-columns: 22.5rem 1fr; }
.slates-list { border-right: 1px solid #1c1c20; padding: 1rem 0.95rem; overflow-y: auto; display: flex; flex-direction: column; gap: 0.55rem; background: #0b0b0e; }
.slate-search { display: flex; align-items: center; gap: 0.6rem; height: 2.4rem; padding: 0 0.75rem; border-radius: 0.45rem; background: #0f0f12; border: 1px solid #26262c; color: var(--muted); }
.slate-search.big { height: 2.75rem; }
.slate-search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--text); font-size: 0.88rem; }
.slates-summary { font-size: 0.78rem; margin-bottom: 0.4rem; }
.slates-row, .slate-row { display: flex; align-items: center; gap: 0.85rem; width: 100%; padding: 0.7rem 0.55rem; border-radius: 0.45rem; border-left: 2px solid transparent; text-align: left; }
.slates-row:hover, .slate-row:hover { background: #141417; }
.slates-row.on { background: #18181b; border-left-color: #f4f4f5; }
.avatar-lg { width: 2.4rem; height: 2.4rem; flex: none; border-radius: 50%; background: #1f1f24; display: grid; place-items: center; font-weight: 700; font-size: 0.82rem; }
.slate-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.slate-who strong { font-weight: 600; }
.slate-who small { color: var(--muted); font-size: 0.75rem; }
.slate-bal { color: var(--muted); font-size: 0.88rem; white-space: nowrap; }
.slate-bal.owes { color: #fbbf24; font-weight: 700; }
.slates-detail { min-width: 0; overflow-y: auto; padding: 1.4rem 1.4rem 2rem; display: flex; flex-direction: column; }
.slate-person { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.3rem; }
.slate-person h2 { font-size: 1.4rem; font-weight: 600; }
.slate-person p { display: flex; align-items: center; gap: 0.4rem; }
.slate-person .push { margin-left: auto; }
.icon-btn.small { width: 1.5rem; height: 1.5rem; }
.avatar-xl { width: 3.75rem; height: 3.75rem; flex: none; border-radius: 50%; background: #1f1f24; display: grid; place-items: center; font-size: 1.1rem; font-weight: 700; }
.owes-card { display: flex; flex-direction: column; gap: 0.5rem; padding: 1.4rem; }
.owes-card .label { color: var(--muted); font-size: 0.8rem; }
.owes-card .take { margin-top: 0.8rem; }
.owes-settled { display: inline-flex; align-items: center; gap: 0.6rem; color: #4ade80; font-size: 2rem; font-weight: 600; }
.owes-settled .icon { width: 1.7rem; height: 1.7rem; }
.owes-amount { color: #fbbf24; font-size: 2rem; font-weight: 700; }
.slate-pay { height: 3.25rem; border-radius: 0.4rem; background: #050506; border: 1px solid #2a2a30; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; font-weight: 600; }
.slate-pay:not(:disabled):hover { background: #18181b; }
.slate-pay:disabled { color: #71717a; cursor: default; }
.slate-pay.idle:disabled { background: #8f8f96; border-color: #8f8f96; color: #3f3f46; }
.history-title { font-size: 1.06rem; margin: 1.6rem 0 0.4rem; }
.history-day { color: var(--muted); font-size: 0.78rem; padding: 0.6rem 0; border-bottom: 1px solid #222227; }
.history-row { display: grid; grid-template-columns: 2.4rem 1fr auto; gap: 0.9rem; align-items: center; padding: 0.85rem 0; border-bottom: 1px solid #18181b; }
.history-row > div { display: flex; flex-direction: column; }
.history-row small { color: var(--muted); font-size: 0.75rem; }
.history-icon { width: 2.25rem; height: 2.25rem; border-radius: 0.45rem; background: #141417; display: grid; place-items: center; color: #a1a1aa; }
.history-icon.pay { background: #052e16; color: #4ade80; }
.history-amt { align-items: flex-end; text-align: right; }
.history-amt .neg { color: #4ade80; }

/* ---- Refusals ------------------------------------------------------------------------------------ */

.refusals { padding-top: 0.6rem; overflow-y: auto; }
.refusals h2 { font-size: 0.95rem; font-weight: 600; }
.refusals > p.muted { font-size: 0.75rem; margin-top: 0.15rem; }
.refusal-filters { display: flex; align-items: flex-end; gap: 0.6rem; flex-wrap: wrap; margin: 1rem 0; }
.refusal-filters label { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.8rem; }
.refusal-filters .date-input { height: 2.25rem; width: 9.2rem; }
.refusal-filters .btn-dark { height: 2.1rem; }
.data-card { border: 1px solid #222227; border-radius: 0.4rem; overflow: hidden; }
.data-card-head, .data-card-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; padding: 0.75rem 1rem; }
.data-card-head { background: #1b1b1f; font-size: 0.78rem; font-weight: 600; color: #d4d4d8; }
.data-card-head span:nth-child(2) { text-align: center; }
.data-card-empty { text-align: center; padding: 1.6rem 1rem; font-size: 0.8rem; color: #d4d4d8; }

/* ---- Below RRP ------------------------------------------------------------------------------------- */

.rrp-tabs { display: flex; gap: 1.4rem; border-bottom: 1px solid #1f1f24; margin: 0.2rem 0 0.9rem; flex: none; }
.rrp-tabs button { padding: 0.6rem 0.2rem 0.7rem; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.rrp-tabs button.on { color: #fff; border-color: #fff; }
.rrp-toolbar { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; margin-bottom: 0.75rem; flex: none; }
.rrp-search { flex: 1; min-width: 12rem; display: flex; align-items: center; gap: 0.5rem; height: 2.25rem; padding: 0 0.75rem; border: 1px solid #232328; border-radius: 0.4rem; background: #0c0c0e; color: var(--muted); }
.rrp-search .icon { width: 0.95rem; height: 0.95rem; }
.rrp-search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--text); font-size: 0.8rem; }
.rrp-toolbar .muted { font-size: 0.75rem; }
.btn-keep { height: 2.25rem; padding: 0 0.85rem; border-radius: 0.35rem; background: #f4f4f5; color: #09090b; font-weight: 600; font-size: 0.78rem; }
.btn-keep:disabled { background: #3f3f46; color: #a1a1aa; }
.rrp-scroll { flex: 1; min-height: 0; overflow: auto; padding-bottom: 1rem; display: flex; flex-direction: column; gap: 1rem; }
.rrp-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.rrp-table thead th { position: sticky; top: 0; z-index: 1; background: #1b1b1f; text-align: left; font-size: 0.75rem; font-weight: 600; color: #d4d4d8; padding: 0.55rem 0.75rem; }
.rrp-table td { padding: 0.7rem 0.75rem; border-bottom: 1px solid #18181b; }
.rrp-table .num { text-align: right; white-space: nowrap; }
.rrp-table .gap { color: #f59e0b; font-weight: 700; }
.rrp-table .c-name { font-weight: 600; }
.rrp-table .c-check { width: 5.2rem; }
.rrp-table .c-check label { display: flex; align-items: center; gap: 0.5rem; }
.rrp-table .c-check label span { font-size: 0.7rem; line-height: 1.15; width: 3rem; }
.rrp-group td { background: #111114; padding: 0.6rem 0.75rem; }
.rrp-group td > div { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 0.78rem; }
.rrp-group .muted { font-weight: 500; }
input[type="checkbox"] { width: 1rem; height: 1rem; accent-color: #f4f4f5; cursor: pointer; }

/* Order history rows (layout from the retail recording) */
.status-pill { display: inline-flex; align-items: center; gap: 0.3rem; }
.status-pill .icon { width: 0.8rem; height: 0.8rem; }
.status-pill.tendered { border: 1px solid #166534; }
.paid-text { color: #4ade80; font-weight: 600; }
.area-tab { display: inline-flex; align-items: center; }

/* ---- Experience chooser ------------------------------------------------------------------------- */

.chooser {
  min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.55rem;
  padding: 2rem 1rem; text-align: center; overflow-y: auto;
  background: radial-gradient(60% 50% at 50% 28%, #1a1530, #050506 72%);
}
.brand-mark { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; margin-bottom: 1.1rem; }
.brand-mark img { width: 5.5rem; height: auto; }
.brand-mark span { font-size: 0.62rem; letter-spacing: 0.32em; font-weight: 700; color: #d43ab8; }
.brand-mark span b { color: #1aa6e4; font-weight: 700; margin-left: 0.32em; }
.brand-mark.small { margin-bottom: 0.4rem; }
.brand-mark.small img { width: 4.6rem; }
.chooser h1 { font-size: 1.65rem; letter-spacing: -0.02em; }
.chooser-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 15.5rem)); gap: 1rem; margin-top: 1.4rem; }
.chooser-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem; padding: 1.4rem 1.3rem;
  border-radius: 0.85rem; border: 1px solid #2a2a33; background: #0f0f13; text-align: left;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.chooser-card:hover, .chooser-card:focus-visible { border-color: #7c6af7; background: #141225; transform: translateY(-2px); }
.chooser-card.last { border-color: #3d3560; }
.chooser-icon { width: 2.7rem; height: 2.7rem; border-radius: 0.65rem; display: grid; place-items: center; background: #1e1b2b; color: var(--accent); margin-bottom: 0.45rem; }
.chooser-icon .icon { width: 1.35rem; height: 1.35rem; }
.chooser-card strong { font-size: 1.15rem; }
.chooser-card .muted { font-size: 0.78rem; }
.chooser-foot { margin-top: 1.3rem; font-size: 0.72rem; }

/* ---- Staff sign-in (as recorded) ------------------------------------------------------------------- */

.signin { min-height: 100%; display: flex; flex-direction: column; background: #050506; }
.signin-head { display: flex; justify-content: space-between; align-items: center; height: 3.25rem; padding: 0 1rem; border-bottom: 1px solid #18181b; font-weight: 700; font-size: 0.95rem; }
.signin-actions { display: flex; align-items: center; gap: 1rem; font-weight: 600; font-size: 0.8rem; }
.signin-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.7rem; padding: 1rem; }
.lock-circle { width: 3.25rem; height: 3.25rem; border-radius: 50%; background: #1c1a24; display: grid; place-items: center; color: var(--accent); }
.pin-dots { display: flex; gap: 0.75rem; margin: 0.4rem 0 1rem; }
.pin-dots span { width: 0.78rem; height: 0.78rem; border-radius: 50%; border: 1.5px solid #71717a; }
.pin-dots span.on { background: var(--accent); border-color: var(--accent); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 5.1rem); gap: 0.5rem; }
.pin-pad .key { height: 3.25rem; font-size: 1rem; }
.pin-pad .key.plain { background: none; border-color: transparent; }
.signin-version { text-align: center; color: #71717a; font-size: 0.72rem; padding: 1rem; }

/* ---- Responsive additions ------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .pos.retail { grid-template-columns: 1fr 34rem; }
  .slates-split { grid-template-columns: 18rem 1fr; }
}
@media (max-width: 760px) {
  .pos.retail { grid-template-columns: 1fr; }
  .pos.retail .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-panel.retail-panel { display: flex; flex-direction: column; overflow-y: auto; }
  .retail-panel .ticket { flex: none; }
  .retail-panel .ticket-lines { min-height: 6rem; }
  .retail-panel .ticket .order-empty { margin-top: 1.5rem; }
  .retail-panel .side { flex: none; overflow: visible; border-left: 0; border-top: 1px solid #1c1c20; padding-top: 0.5rem; }
  .retail-panel .side-spacer { display: none; }
  .retail-panel .side .order-head { display: none; }
  .sheet-bar { display: flex; align-items: center; justify-content: space-between; flex: none; height: 3.1rem; padding: 0 0.75rem 0 0.95rem; border-bottom: 1px solid #16161a; }
  .sheet-bar h2 { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.9rem; font-weight: 600; }
  .slates-split { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .slates-list { border-right: 0; border-bottom: 1px solid #1c1c20; max-height: 40vh; }
  .chooser-cards { grid-template-columns: 1fr; width: 100%; max-width: 22rem; }
  .data-card-head, .data-card-row { grid-template-columns: 1fr 1fr; }
  .data-card-head span:nth-child(3), .data-card-row span:nth-child(3) { display: none; }
}

/* ---- Autoplay (?autoplay=1, the website's card machine section) ------------------------------------ */

body.autoplay { pointer-events: none; }
/* A fingertip on the button being pressed, and the button lit while it's pressed. */
.ap-touch {
  position: fixed; z-index: 100; left: 0; top: 0; width: 3rem; height: 3rem; margin: -1.5rem 0 0 -1.5rem;
  border-radius: 50%; background: rgba(255, 255, 255, 0.28); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.55), 0 0 1.5rem rgba(167, 139, 250, 0.7);
  opacity: 0; pointer-events: none;
}
.ap-touch.on { animation: ap-touch 0.65s ease-out; }
@keyframes ap-touch {
  0% { opacity: 0; transform: scale(1.5); }
  25% { opacity: 1; transform: scale(0.85); }
  100% { opacity: 0; transform: scale(1.15); }
}
.ap-press { transform: scale(0.96); filter: brightness(1.6); }
.tender.card.waiting:disabled { opacity: 1; border-color: #60a5fa; box-shadow: 0 0 0 1px #60a5fa, 0 0 1.2rem rgba(96, 165, 250, 0.45); }
/* Phone layout: autoplay never types an amount, so the payment sheet leaves out the keypad and quick cash and
   the totals, Card and Complete Payment all fit on screen at once. Messages show at the top, clear of the
   sheet's buttons. */
@media (max-width: 760px) {
  body.autoplay .modal-payment .keypad, body.autoplay .modal-payment .quick-cash { display: none; }
  body.autoplay #toast-root { top: 4.15rem; bottom: auto; }
}
