/*
 * Pluto design tokens.
 * Neutral base; the café's colour (--brand) is an accent only. Text never sits on the raw brand
 * colour: --brand-ink is a darkened version that stays readable with white text, whatever colour
 * the café picked. Status colours carry meaning: ok (green), warn (amber, call out), bad (red, failed).
 */
:root {
  --brand: #3b5bdb;
  --brand-ink: color-mix(in oklab, var(--brand) 62%, #000);
  --brand-text: color-mix(in oklab, var(--brand) 70%, #000);
  --brand-wash: color-mix(in oklab, var(--brand) 7%, var(--bg));

  --bg: #f5f5f2;
  --surface: #ffffff;
  --surface-2: #eeeeea;
  --ink: #18181b;
  --ink-2: #5e5f66;
  --ink-3: #8b8c93;
  --line: #e3e3de;

  --action: #18181b;
  --on-action: #ffffff;

  --ok: #1d7a4c;
  --ok-bg: #e2f3e9;
  --warn: #965a00;
  --warn-bg: #fcefd8;
  --bad: #bf2f25;
  --bad-bg: #fde5e2;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 1px 2px rgb(24 24 27 / 5%), 0 4px 16px rgb(24 24 27 / 5%);
  --font: 'Readex Pro', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand-text: color-mix(in oklab, var(--brand) 65%, #fff);
    --brand-wash: color-mix(in oklab, var(--brand) 9%, var(--bg));
    --bg: #0f0f11;
    --surface: #18181b;
    --surface-2: #232327;
    --ink: #f2f2ef;
    --ink-2: #a3a3aa;
    --ink-3: #74747b;
    --line: #2a2a2f;
    --action: #f2f2ef;
    --on-action: #111113;
    --ok: #5cc994;
    --ok-bg: #13291e;
    --warn: #f0b457;
    --warn-bg: #2c2110;
    --bad: #ff7b70;
    --bad-bg: #351713;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body > main { flex: 1; }
a { color: var(--brand-text); text-underline-offset: 3px; }
h1 { font-size: 1.6rem; font-weight: 600; margin: 0 0 1rem; line-height: 1.25; letter-spacing: -.01em; }
h2 { font-size: 1rem; font-weight: 600; margin: 0 0 .75rem; }
code { font-size: .82em; background: var(--surface-2); padding: .15em .45em; border-radius: 6px; word-break: break-all; }
[hidden] { display: none !important; }

.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.error { color: var(--bad); background: var(--bad-bg); padding: .65rem .85rem; border-radius: var(--radius-sm); margin: 0; }
.notice { color: var(--ok); background: var(--ok-bg); padding: .65rem .85rem; border-radius: var(--radius-sm); }

/* ---------- buttons & forms ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .5rem 1.1rem;
  border: 0; border-radius: 12px;
  font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap;
  background: var(--surface-2); color: var(--ink);
  transition: transform .08s ease, background-color .15s ease, opacity .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: default; }
.btn:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 2px; }
.btn-primary { background: var(--action); color: var(--on-action); }
.btn-primary:hover { opacity: .9; }
.btn-soft { background: var(--surface-2); color: var(--ink); }
.btn-soft:hover { background: var(--line); }
.btn-brand { background: var(--brand-ink); color: #fff; }
.btn-brand:hover { opacity: .92; }
.btn-light { background: #fff; color: #111; }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: var(--bad-bg); color: var(--bad); }
.btn-small { min-height: 36px; padding: .3rem .75rem; font-size: .875rem; }
.btn-block { width: 100%; min-height: 56px; font-size: 1.05rem; border-radius: 14px; }
.btn-icon { width: 44px; min-height: 44px; padding: 0; background: transparent; color: var(--ink-3); font-size: 1rem; }
.btn-icon:hover { background: var(--surface-2); color: var(--ink); }

.stack { display: flex; flex-direction: column; gap: .8rem; }
.row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.row-between h1 { margin: 0; }
label { display: flex; flex-direction: column; gap: .35rem; font-weight: 500; font-size: .92rem; color: var(--ink-2); }
label.check { flex-direction: row; align-items: center; }
input, select {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .6rem .8rem; min-height: 46px;
}
input[type='color'] { padding: .25rem; width: 4.5rem; }
input:focus, select:focus { outline: 2px solid var(--brand-text); outline-offset: 0; border-color: transparent; }

/* ---------- shared bits ---------- */

.foot { text-align: center; padding: 1.25rem 1rem 1.5rem; color: var(--ink-3); font-size: .82rem; }
.foot a { color: inherit; }

.centered > main { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 2rem 16px; text-align: center; }

.landing { max-width: 34rem; margin: 0 auto; }
.landing h1 { font-size: 2rem; margin-bottom: .25rem; }
.landing .lead { font-size: 1.2rem; color: var(--ink-2); margin-top: 0; }
.mark { width: 64px; height: 64px; margin: 0 auto 1rem; display: block; }

.login { width: 100%; max-width: 22rem; margin: 0 auto; }
.login form { text-align: start; }
.pin-input { font-size: 1.75rem; letter-spacing: .5em; text-align: center; direction: ltr; padding-inline-start: 1.25rem; }

.shop-head { display: flex; align-items: center; gap: .7rem; justify-content: center; margin-bottom: 1.25rem; }
.logo { width: 48px; height: 48px; border-radius: 14px; object-fit: cover; background: var(--surface); flex: none; }
.logo-sm { width: 40px; height: 40px; border-radius: 12px; }
.logo-letter { display: grid; place-items: center; background: var(--brand-ink); color: #fff; font-weight: 600; font-size: 1.3rem; }
.logo-sm.logo-letter { font-size: 1.1rem; }
.shop-name { font-weight: 600; font-size: 1.15rem; }

.banner {
  position: fixed; inset-inline: 12px; bottom: 12px; z-index: 30; max-width: 30rem; margin: 0 auto;
  background: var(--ink); color: var(--bg); padding: .8rem 1rem; border-radius: 14px; text-align: center; font-size: .95rem;
}

.ico { width: 1.1em; height: 1.1em; flex: none; background: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.ico-clock { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
.ico-queue { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='6' cy='8' r='2.5'/%3E%3Ccircle cx='12' cy='8' r='2.5'/%3E%3Ccircle cx='18' cy='8' r='2.5'/%3E%3Cpath d='M3 18c0-2 1.5-3.5 3-3.5s3 1.5 3 3.5M9 18c0-2 1.5-3.5 3-3.5s3 1.5 3 3.5M15 18c0-2 1.5-3.5 3-3.5s3 1.5 3 3.5'/%3E%3C/svg%3E"); }
.bell { width: 1.2em; height: 1.2em; background: currentColor; -webkit-mask: url(/static/bell.svg) center / contain no-repeat; mask: url(/static/bell.svg) center / contain no-repeat; }

/* ---------- customer ---------- */

/* The pager: the number sits inside a ring that fills as the wait goes by, with a small moon at its tip. */
.customer { background: var(--surface); }
.ticket { width: 100%; max-width: 25rem; margin: 0 auto; padding: 1.75rem 16px 1rem; display: flex; flex-direction: column; gap: .9rem; }
.card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 1.25rem; }
.customer .card { background: var(--bg); box-shadow: none; }

.pager-hero { text-align: center; }
.orbit { --ring: color-mix(in oklab, var(--brand) 16%, var(--surface)); position: relative; width: min(76vw, 18.5rem); aspect-ratio: 1; margin: 0 auto 1.1rem; }
.orbit-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); fill: none; stroke-width: 7; }
.orbit-track { stroke: var(--ring); }
/* 339.3 = the ring's length (2π × 54); customer.js shortens the gap to show progress. */
.orbit-fill { stroke: var(--brand-text); stroke-linecap: round; stroke-dasharray: 339.3; stroke-dashoffset: 339.3; transition: stroke-dashoffset 1s ease, stroke .3s ease; }
/* The moon rides the tip of the ring (customer.js sets --turn) and sends out a soft pulse. */
.orbit-moon { position: absolute; inset: 0; display: none; transform: rotate(calc(var(--turn, 0) * 1turn)); transition: transform 1s ease; }
.orbit-moon::before, .orbit-moon::after {
  content: ''; position: absolute; top: calc(5% - 8px); inset-inline-start: calc(50% - 8px); width: 16px; height: 16px;
  border-radius: 50%; background: var(--brand-text);
}
.orbit-moon::after { box-shadow: 0 0 0 4px var(--surface); }
.orbit-moon::before { animation: moon-pulse 1.8s ease-out infinite; }
.ticket[data-status='waiting'] .orbit-moon, .ticket[data-status='out'] .orbit-moon { display: block; }
@keyframes moon-pulse { from { transform: scale(1); opacity: .6; } to { transform: scale(2.2); opacity: 0; } }
.orbit-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.orbit .label { color: var(--ink-2); font-size: .95rem; }
.big-number {
  font-size: clamp(4.25rem, 23vw, 6.25rem); font-weight: 600; line-height: 1; margin: .15rem 0 .35rem;
  color: var(--brand-text); font-variant-numeric: tabular-nums; letter-spacing: -.03em; direction: ltr;
}
.table-line { margin-top: -.1rem; padding: .1rem .6rem; border-radius: 999px; background: var(--surface-2); color: var(--ink); font-size: .9rem; font-weight: 600; }
.status { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font-size: 1.1rem; font-weight: 600; color: var(--ink); }
.status::before { content: ''; width: .5rem; height: .5rem; border-radius: 50%; background: var(--warn); }
.ticket[data-status='waiting'] .status::before { animation: breathe 1.8s ease-in-out infinite; }
.wait { display: flex; justify-content: center; flex-wrap: wrap; gap: .4rem 1.1rem; margin-top: .6rem; color: var(--ink-2); font-size: .95rem; }
.wait-item { display: inline-flex; align-items: center; gap: .4rem; }
@keyframes breathe { 50% { opacity: .35; } }

.ticket[data-status='ready'] .status { display: block; color: var(--brand-text); font-size: 1.25rem; line-height: 1.4; text-wrap: balance; }
.ticket[data-status='ready'] .status::before { display: none; }
.ticket[data-status='collected'] .orbit-fill { stroke: var(--ok); }
.ticket[data-status='collected'] .status::before { background: var(--ok); }
.ticket[data-status='collected'] .big-number, .ticket[data-status='cancelled'] .big-number, .ticket[data-status='expired'] .big-number { color: var(--ink-3); }
.ticket[data-status='cancelled'] .status::before, .ticket[data-status='expired'] .status::before { background: var(--ink-3); }

.alerts { display: flex; flex-direction: column; gap: .7rem; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: .4rem; }
.steps li { display: flex; flex-direction: column; gap: .4rem; font-size: .82rem; color: var(--ink-3); text-align: center; }
.steps li::before { content: ''; height: 5px; border-radius: 3px; background: var(--line); }
.steps li.done::before, .steps li.current::before { background: var(--brand-text); }
.steps li.current { color: var(--ink); font-weight: 600; }
.order-lines ul { list-style: none; margin: 0; padding: 0; }
.order-lines li { display: flex; justify-content: space-between; gap: .75rem; padding: .45rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.order-lines li span:last-child, .order-total b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.order-total { display: flex; justify-content: space-between; padding-top: .6rem; font-size: 1.05rem; }
.alert-msg { margin: 0; padding: .75rem .9rem; border-radius: 12px; background: var(--ok-bg); color: var(--ok); font-weight: 500; font-size: .95rem; }
.alert-msg.warn { background: var(--warn-bg); color: var(--warn); }
.hint { margin: 0; color: var(--ink-2); font-size: .88rem; text-align: center; }
.shop-message { text-align: center; color: var(--ink-2); margin: .25rem 0 0; }

.ready-overlay {
  position: fixed; inset: 0; z-index: 40; background: var(--brand-ink); color: #fff;
  display: grid; place-items: center; padding: 24px; text-align: center; overflow: hidden;
}
.ready-inner { position: relative; width: 100%; max-width: 22rem; }
/* Ready: the ring is full and sends out pings, like the Pluto icon. */
.ready-orbit {
  position: relative; width: min(70vw, 17rem); aspect-ratio: 1; margin: 0 auto; border-radius: 50%;
  border: 7px solid #fff; display: grid; place-items: center;
}
.ready-ping { position: absolute; inset: -7px; border-radius: 50%; border: 3px solid rgb(255 255 255 / 70%); animation: ping 2s ease-out infinite; }
.ready-ping + .ready-ping { animation-delay: 1s; }
@keyframes ping { from { transform: scale(1); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.ready-number { font-size: clamp(5rem, 28vw, 8.5rem); font-weight: 600; line-height: 1; letter-spacing: -.04em; direction: ltr; }
.ready-title { font-size: 1.75rem; font-weight: 600; margin: 2rem 0 2.25rem; }

@media (prefers-reduced-motion: reduce) {
  .orbit-moon::before, .ticket[data-status] .status::before { animation: none; }
  .ready-ping { display: none; }
}

/* ---------- customer menu ---------- */

/* A warmer page than the staff screens: cream paper, café colour for what you can tap. */
.menu-body {
  --bg: #f6f1e9;
  --surface: #fffdf9;
  --surface-2: #f0e9de;
  --line: #e9e0d2;
  --ink-2: #6b655c;
  --ink-3: #9a9388;
  --shadow: 0 1px 2px rgb(60 40 20 / 6%), 0 6px 20px rgb(60 40 20 / 7%);
  background: var(--bg);
}
@media (prefers-color-scheme: dark) {
  .menu-body {
    --bg: #131210;
    --surface: #1d1b18;
    --surface-2: #27241f;
    --line: #2f2b25;
    --ink-2: #b0a999;
    --ink-3: #7f786c;
    --shadow: none;
  }
}
.menu { width: 100%; max-width: 40rem; margin: 0 auto; padding: 0 0 6.5rem; }
/* One slim bar that stays on top; the category tabs stick right under it. */
.menu-body { --menu-bar-h: 62px; }
.menu-bar {
  position: sticky; top: 0; z-index: 11; height: var(--menu-bar-h); display: flex; align-items: center; gap: 10px; padding: 0 16px;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.menu-logo { width: 40px; height: 40px; flex: none; border-radius: 12px; object-fit: cover; background: var(--surface); }
.menu-logo.letter { display: grid; place-items: center; background: var(--brand-ink); color: #fff; font-weight: 700; font-size: 1.15rem; }
.menu-bar-text { flex: 1; min-width: 0; }
.menu-bar h1 { margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--ink); line-height: 1.35; }
.menu-bar h1, .menu-status { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-status { margin: 0; font-size: .78rem; color: var(--ink-2); }
.menu-status.open::before, .menu-status.closed::before {
  content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-inline-end: 5px; vertical-align: 1px; background: var(--ok);
}
.menu-status.closed::before { background: var(--ink-3); }
.menu-bar-btn {
  flex: none; height: 38px; min-width: 38px; padding: 0 12px; border-radius: 999px; border: 0; background: var(--surface-2); color: var(--ink);
  display: grid; place-items: center; font: inherit; font-size: .85rem; text-decoration: none; cursor: pointer;
}
.menu-bar-btn:hover { background: var(--line); }
.menu-bar-btn[data-search-open] { padding: 0; }
.menu-note { margin: .7rem 16px 0; font-size: .85rem; color: var(--ink-3); }
.menu-paused { margin: .75rem 16px 0; padding: .75rem .9rem; border-radius: 14px; background: var(--warn-bg); color: var(--warn); font-weight: 500; }
.menu-open-order {
  display: flex; justify-content: space-between; align-items: center; margin: .75rem 16px 0; padding: .85rem 1.05rem;
  border-radius: 16px; background: var(--brand-ink); color: #fff; text-decoration: none; font-weight: 600;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--brand-ink) 28%, transparent);
}
.menu-search { padding: .8rem 16px 0; scroll-margin-top: var(--menu-bar-h); }
.menu-search input {
  width: 100%; padding-inline-start: 2.6rem; background: var(--surface) no-repeat .85rem center / 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b8c93' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E");
}
[dir='rtl'] .menu-search input { background-position: calc(100% - .85rem) center; }
.menu-nomatch { margin: 1rem 16px; color: var(--ink-2); }

.popular { padding: 1rem 0 .2rem; }
.popular-head { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; padding: 0 16px .6rem; }
.popular-head h2 { margin: 0; font-size: 1.02rem; font-weight: 700; color: var(--ink); }
.popular-head span { font-size: .74rem; color: var(--ink-3); }
.popular-row { display: flex; gap: 12px; padding: 0 16px .4rem; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.popular-row::-webkit-scrollbar { display: none; }
.pop-card { flex: none; width: 132px; display: flex; flex-direction: column; gap: .3rem; cursor: pointer; scroll-snap-align: start; }
.pop-thumb { position: relative; width: 132px; height: 116px; border-radius: 16px; overflow: hidden; }
.pop-card h3 { margin: .1rem 0 0; font-size: .88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pop-card .menu-price { font-size: .8rem; font-weight: 500; color: var(--ink-2); }
.pop-thumb .qty-slot { position: absolute; bottom: 7px; inset-inline-end: 7px; }

.menu-tabs {
  position: sticky; top: var(--menu-bar-h); z-index: 10; display: flex; gap: 1.2rem; overflow-x: auto; scrollbar-width: none;
  padding: .6rem 16px 0; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.menu-tabs::-webkit-scrollbar { display: none; }
.menu-tab {
  flex: none; padding: .35rem 0 .65rem; color: var(--ink-3); text-decoration: none; font-size: .92rem; font-weight: 500;
  border-bottom: 2.5px solid transparent; transition: color .2s, border-color .2s;
}
.menu-tab.active { color: var(--ink); font-weight: 600; border-bottom-color: var(--brand-ink); }
@media (prefers-color-scheme: dark) { .menu-tab.active { border-bottom-color: var(--brand-text); } }
.menu-section { padding: 0 16px; scroll-margin-top: calc(var(--menu-bar-h) + 3.4rem); }
.menu-section h2 { color: var(--ink); font-size: 1.1rem; margin: 1.1rem 0 .1rem; }
.menu-item { display: flex; gap: .9rem; padding: .85rem 0 1rem; border-bottom: 1px solid var(--line); cursor: pointer; }
.menu-section .menu-item:last-child { border-bottom: 0; }
.menu-item.sold-out { cursor: default; }
.menu-item.sold-out .menu-item-body, .menu-item.sold-out .menu-photo { opacity: .5; }
.menu-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.menu-badge {
  align-self: flex-start; font-size: .72rem; font-weight: 700; padding: .12rem .5rem; border-radius: 999px;
  background: color-mix(in srgb, #f5a524 20%, var(--surface)); color: color-mix(in srgb, #b26b00 85%, var(--ink));
}
.menu-item h3 { margin: 0; font-size: 1rem; font-weight: 600; }
.menu-desc { margin: 0; color: var(--ink-2); font-size: .84rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.menu-price { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); margin-top: .15rem; }
.menu-thumb { position: relative; flex: none; width: 88px; height: 88px; }
.menu-thumb .menu-photo { border-radius: 14px; overflow: hidden; }
.menu-thumb .qty-slot { position: absolute; bottom: -8px; inset-inline-end: -6px; }
.menu-photo { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--surface-2); }
.menu-photo.placeholder {
  display: grid; place-items: center;
  background: linear-gradient(var(--angle, 135deg), color-mix(in oklab, var(--brand) 26%, var(--surface)), color-mix(in oklab, var(--brand) 7%, var(--surface)));
  color: color-mix(in oklab, var(--brand) 60%, var(--ink));
}
.menu-photo.placeholder span { font-size: 2.2rem; font-weight: 600; line-height: 1; opacity: .8; transform: translateY(-.05em); }
.menu-ribbon {
  position: absolute; bottom: -6px; inset-inline-end: -4px; padding: .25rem .6rem; border-radius: 999px;
  background: var(--surface); color: var(--ink-2); font-size: .7rem; font-weight: 600; box-shadow: 0 2px 8px rgb(0 0 0 / 12%);
}
.qty-slot { display: flex; align-items: center; gap: 4px; }
.add {
  width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface); color: var(--brand-text); font-size: 1.4rem; line-height: 1; cursor: pointer;
  box-shadow: 0 2px 10px rgb(0 0 0 / 18%); transition: transform .15s ease;
}
.add:active { transform: scale(.9); }
/* On the dark page a dark circle disappears, so flip it to a light one. */
@media (prefers-color-scheme: dark) {
  .add { background: #f6f1e9; color: var(--brand-ink); box-shadow: 0 2px 10px rgb(0 0 0 / 45%); }
}
.stepper {
  display: flex; align-items: center; gap: 2px; height: 36px; padding: 0 3px; border-radius: 999px; background: var(--brand-ink); color: #fff;
  box-shadow: 0 2px 10px rgb(0 0 0 / 18%); font-weight: 700; font-size: .9rem;
}
.stepper button { width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: #fff; font: inherit; font-size: 1.15rem; cursor: pointer; }
.stepper span { min-width: 1.1rem; text-align: center; }
.qty-badge {
  min-width: 26px; height: 26px; padding: 0 6px; border-radius: 999px; background: var(--brand-ink); color: #fff;
  display: grid; place-items: center; font-size: .8rem; font-weight: 700; box-shadow: 0 2px 8px rgb(0 0 0 / 16%);
}

.cart-bar {
  position: fixed; inset-inline: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 20; max-width: 38rem; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .9rem 1.1rem;
  border: 0; border-radius: 16px; background: var(--brand-ink); color: #fff; font: inherit; font-weight: 600; font-size: 1rem; cursor: pointer;
  box-shadow: 0 10px 28px color-mix(in srgb, var(--brand-ink) 35%, transparent);
}
.cart-count { background: rgb(255 255 255 / 20%); border-radius: 999px; min-width: 1.7rem; height: 1.7rem; display: grid; place-items: center; font-size: .9rem; }

.sheet-backdrop { position: fixed; inset: 0; z-index: 30; background: rgb(0 0 0 / 45%); display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  position: relative; width: 100%; max-width: 32rem; max-height: 92dvh; display: flex; flex-direction: column;
  background: var(--surface); border-radius: 24px 24px 0 0; overflow: hidden;
}
body.sheet-open { overflow: hidden; }
.sheet-hero { position: relative; flex: none; height: 220px; }
.sheet-hero::after { content: ''; position: absolute; inset: auto 0 0; height: 70px; background: linear-gradient(transparent, var(--surface)); pointer-events: none; }
.sheet-photo { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--surface-2); }
.sheet-photo.placeholder {
  display: grid; place-items: center;
  background: linear-gradient(135deg, color-mix(in oklab, var(--brand) 26%, var(--surface)), color-mix(in oklab, var(--brand) 6%, var(--surface)));
  color: color-mix(in oklab, var(--brand) 60%, var(--ink));
}
.sheet-photo.placeholder span { font-size: 4.5rem; font-weight: 600; opacity: .75; }
.sheet-close { position: absolute; top: 12px; inset-inline-end: 12px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--surface); color: var(--ink); font-size: 1rem; cursor: pointer; box-shadow: var(--shadow); z-index: 1; }
.sheet-body { padding: 1.1rem 1.1rem .5rem; overflow-y: auto; display: flex; flex-direction: column; gap: .75rem; }
.sheet-body > * { flex-shrink: 0; }
.sheet-body h2 { margin: 0; font-size: 1.25rem; color: var(--ink); padding-inline-end: 2.5rem; }
.sheet-body textarea { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .6rem .75rem; resize: vertical; }
.sheet-group { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; }
.sheet-group legend { padding: 0; margin-bottom: .35rem; font-weight: 600; }
.sheet-group legend small { color: var(--ink-3); font-weight: 400; }
.choice { flex-direction: row; align-items: center; gap: .65rem; padding: .7rem .65rem; margin: 0 -.65rem; border-radius: 12px; color: var(--ink); font-size: 1rem; font-weight: 400; cursor: pointer; transition: background-color .15s; }
.choice + .choice { margin-top: 2px; }
.choice:has(input:checked) { background: color-mix(in oklab, var(--brand) 11%, var(--surface)); }
.choice:has(input:checked) .choice-name { font-weight: 600; }
.choice input { width: 20px; height: 20px; margin: 0; accent-color: var(--brand-ink); min-height: 0; }
.choice-name { flex: 1; }
.choice-extra { color: var(--ink-2); font-size: .9rem; }
.sheet-foot { display: flex; gap: .75rem; align-items: center; padding: .9rem 1.1rem max(1.1rem, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.sheet-foot.column { flex-direction: column; align-items: stretch; text-align: center; }
.sheet-add { flex: 1; justify-content: space-between; min-height: 52px; font-size: 1rem; font-weight: 600; }
.qty { display: flex; align-items: center; gap: .6rem; background: var(--bg); border-radius: 12px; padding: .25rem; }
.qty button { width: 40px; height: 40px; border: 0; border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 1.2rem; cursor: pointer; }
.small-qty button { width: 32px; height: 32px; font-size: 1rem; }
.qty-value { min-width: 1.4rem; text-align: center; font-weight: 600; }
.cart-lines { list-style: none; margin: 0; padding: 0; }
.cart-line { display: grid; grid-template-columns: 1fr auto auto; gap: .6rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.cart-line.unavailable { opacity: .5; }
.cart-line-main { display: flex; flex-direction: column; min-width: 0; }
.cart-line-main small { color: var(--ink-2); }
.cart-line-price { font-weight: 600; font-variant-numeric: tabular-nums; }
.cart-total { display: flex; justify-content: space-between; font-size: 1.1rem; padding-top: .25rem; }

/* ---------- staff sheets (counter order, sold out) ---------- */

.staff-sheet { align-items: center; padding: 16px; }
.staff-sheet .sheet { border-radius: 20px; max-height: calc(100dvh - 32px); }
.sheet-wide { max-width: 64rem; }
.sheet-list { max-width: 30rem; }
.sheet-fee { max-width: 24rem; }
.sheet-fee .sheet-body { padding-bottom: 1.1rem; }
.sheet-fee h2 { margin: 0; padding-inline-end: 2.5rem; }
.sheet-fee p { margin: 0; }
.sheet-fee input { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.counter-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); min-height: 0; flex: 1; }
.counter-menu { overflow-y: auto; padding: 1.1rem; display: flex; flex-direction: column; gap: .75rem; }
.counter-menu h2 { margin: 0; font-size: 1.25rem; padding-inline-end: 2.5rem; }
.counter-menu h3 { margin: .5rem 0 .4rem; font-size: .95rem; color: var(--ink-2); }
.counter-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .5rem; }
.counter-item {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: .35rem; min-height: 4.6rem;
  padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--ink);
  font: inherit; text-align: start; cursor: pointer;
}
.counter-item:active { transform: scale(.98); }
.counter-item:disabled { opacity: .45; cursor: default; }
.counter-item-name { font-weight: 600; line-height: 1.25; }
.counter-item-price { color: var(--ink-2); font-size: .88rem; font-variant-numeric: tabular-nums; }
.counter-back { align-self: flex-start; }
.counter-pick-foot { display: flex; gap: .75rem; align-items: center; margin-top: auto; padding-top: .5rem; }
.counter-order {
  display: flex; flex-direction: column; gap: .7rem; padding: 3.4rem 1.1rem 1.1rem; overflow-y: auto;
  border-inline-start: 1px solid var(--line); background: var(--surface);
}
.counter-order textarea { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .6rem .75rem; resize: vertical; }
.counter-start { min-height: 52px; font-size: 1.05rem; font-weight: 600; }
.soldout-cat h3 { margin: .75rem 0 .25rem; font-size: .95rem; color: var(--ink-2); }
.soldout-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.btn-warn { background: color-mix(in srgb, var(--warn) 18%, var(--surface)); color: var(--warn); border-color: transparent; }
@media (max-width: 760px) {
  .staff-sheet { padding: 0; align-items: flex-end; }
  .staff-sheet .sheet { border-radius: 24px 24px 0 0; max-height: 94dvh; }
  .counter-grid { grid-template-columns: 1fr; overflow-y: auto; }
  .counter-menu, .counter-order { overflow: visible; }
  .counter-order { border-inline-start: 0; border-top: 1px solid var(--line); padding-top: 1.1rem; }
}

/* ---------- cashier ---------- */

.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap;
  padding: .65rem 16px; background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.bar-shop { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.bar-title { font-weight: 600; font-size: 1.05rem; color: var(--ink); text-decoration: none; line-height: 1.3; }
.bar-sub { color: var(--ink-3); font-size: .82rem; }
.bar-actions { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; min-width: 0; max-width: 100%; }
.bar form { margin: 0; }

.board { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; padding: 1.25rem 16px; align-items: start; }
.col-done { grid-column: 1 / -1; }
.col h2 { display: flex; align-items: center; gap: .5rem; color: var(--ink-2); font-size: .9rem; text-transform: uppercase; letter-spacing: .04em; }
:lang(ar) .col h2 { text-transform: none; letter-spacing: 0; font-size: .95rem; }
.col-dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--warn); }
.col-dot-ready { background: var(--ok); }
.count { background: var(--surface-2); color: var(--ink); border-radius: 999px; padding: 0 .55rem; font-size: .82rem; font-weight: 600; }
.cards { display: flex; flex-direction: column; gap: .6rem; }
.empty { color: var(--ink-3); padding: 1.25rem; text-align: center; border: 1.5px dashed var(--line); border-radius: var(--radius); }

.tcard {
  position: relative; overflow: hidden;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: .8rem .8rem .8rem 1rem; border: 1px solid var(--line);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .9rem;
  transition: background-color .2s ease, border-color .2s ease;
}
.tcard .num { font-size: 2.4rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; min-width: 2.2ch; text-align: center; letter-spacing: -.02em; direction: ltr; }
.tcard .meta { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.tcard .age { color: var(--ink-3); font-size: .85rem; font-variant-numeric: tabular-nums; direction: ltr; align-self: flex-start; }
.tcard .actions { display: flex; align-items: center; gap: .3rem; }
.btn-act { min-height: 52px; min-width: 7.5rem; font-size: 1.05rem; font-weight: 600; border-radius: 12px; }

.status-line { display: inline-flex; align-items: center; gap: .45rem; font-size: .9rem; font-weight: 500; color: var(--ink-2); min-width: 0; }
.status-line span { min-width: 0; line-height: 1.25; }
.status-line .dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--ink-3); flex: none; }
.status-line.ok { color: var(--ok); } .status-line.ok .dot { background: var(--ok); }
.status-line.warn { color: var(--warn); } .status-line.warn .dot { background: var(--warn); }
.status-line.bad { color: var(--bad); font-weight: 600; } .status-line.bad .dot { background: var(--bad); }
.status-line.neutral .dot { animation: breathe 1.2s ease-in-out infinite; }

.tcard.is-warn { border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.tcard.is-new { border-color: color-mix(in srgb, var(--brand-text) 55%, var(--line)); box-shadow: 0 4px 16px color-mix(in srgb, var(--brand-text) 12%, transparent); }
.tcard .lines { order: 1; grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: .55rem; display: flex; flex-direction: column; gap: .35rem; }
.tcard .lines ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .2rem; font-size: .92rem; }
.tcard .lines li { display: flex; justify-content: space-between; gap: .75rem; }
.tcard .line-price { color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tcard .note { margin: 0; font-size: .88rem; color: var(--warn); background: var(--warn-bg); border-radius: 8px; padding: .35rem .6rem; }
.tcard .line-total { margin: 0; font-weight: 600; text-align: end; }
.col-dot-new { background: var(--brand-text); }
.board.with-new .col-new { grid-column: 1 / -1; }
@media (min-width: 1100px) {
  .board.with-new { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .board.with-new .col-new { grid-column: auto; }
}
.ordering-switch.paused { background: var(--warn-bg); color: var(--warn); }
.tcard.is-flag { background: var(--bad-bg); border-color: var(--bad); animation: flag 1.2s ease-in-out infinite; }
@keyframes flag { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--bad) 25%, transparent); } }

.done-strip { display: flex; flex-wrap: wrap; gap: .5rem; }
.done-strip .empty { flex: 1; padding: .75rem; }
.chip { display: inline-flex; align-items: center; gap: .5rem; padding: .3rem .35rem .3rem .8rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
:dir(rtl) .chip { padding: .3rem .8rem .3rem .35rem; }
.chip-num { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.chip-label { color: var(--ink-3); font-size: .85rem; }
.chip.cancelled .chip-num { text-decoration: line-through; color: var(--ink-3); }
.chip-undo { font: inherit; font-size: .82rem; border: 0; border-radius: 999px; padding: .3rem .7rem; background: var(--surface-2); color: var(--ink); cursor: pointer; }
.chip-undo:hover { background: var(--line); }
.print-btn { color: var(--ink-2); }
.print-btn:hover { color: var(--ink); }
.chip .print-btn { width: 32px; min-height: 32px; }
.chip .print-btn svg { width: 17px; height: 17px; }

.toast {
  position: fixed; inset-inline: 12px; top: 76px; z-index: 30; margin: 0 auto; max-width: 26rem;
  background: var(--ink); color: var(--bg); padding: 1rem 1.25rem; border-radius: var(--radius); text-align: center; font-size: 1.1rem; font-weight: 500;
  box-shadow: 0 12px 32px rgb(0 0 0 / 22%);
}

@media (max-width: 760px) {
  .board, .board.with-new { grid-template-columns: 1fr; }
}
/* A narrow card (a phone, or three or four columns on a laptop) puts its buttons on a row of their own. */
.cards { container-type: inline-size; }
@container (max-width: 440px) {
  .tcard { grid-template-columns: auto minmax(0, 1fr); }
  .tcard .actions { grid-column: 1 / -1; }
  .tcard .actions .btn-act { flex: 1; }
}

/* ---------- owner settings ---------- */

.admin-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: .55rem 16px; background: var(--ink); color: var(--bg); font-size: .9rem;
}
.admin-bar a { color: inherit; font-weight: 600; }

/* ---------- owner page ---------- */

body.owner { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.owner-shell { flex: 1; display: flex; }
.owner-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.owner-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem 16px .25rem; width: 100%; max-width: 46rem; margin: 0 auto; }
.owner-head form { margin: 0; }
.owner-main { width: 100%; max-width: 46rem; margin: 0 auto; padding: .75rem 16px 2rem; display: flex; flex-direction: column; gap: .85rem; }
.owner-main .panel { margin-bottom: 0; }
.owner-main h2 { font-size: 1rem; margin: 0; }
.owner-title h1 { margin: 0; font-size: 1.45rem; }
.owner-title p { margin: .15rem 0 0; font-size: .92rem; }
.owner-title-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.ic { width: 22px; height: 22px; flex: none; }
.btn .ic { width: 18px; height: 18px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* bottom bar on phones, side bar on computers */
.owner-nav {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 30;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  background: var(--surface); border-top: 1px solid var(--line);
  padding: 6px 4px calc(8px + env(safe-area-inset-bottom));
}
.owner-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 48px; justify-content: center;
  color: var(--ink-3); text-decoration: none; font-size: .72rem; border-radius: 12px;
}
.owner-nav a[aria-current='page'] { color: var(--brand-text); font-weight: 600; }
.owner-nav a[aria-current='page'] .ic { stroke-width: 2.1; }
.owner-nav-shop { display: none; }
@media (min-width: 900px) {
  body.owner { padding-bottom: 0; }
  .owner-nav {
    position: sticky; top: 0; inset-inline: auto; bottom: auto; height: 100dvh; width: 15rem; flex: none;
    display: flex; flex-direction: column; gap: .2rem; padding: 1.25rem .75rem;
    border-top: 0; border-inline-end: 1px solid var(--line);
  }
  .owner-nav-shop { display: flex; align-items: center; gap: .6rem; padding: 0 .5rem 1.25rem; font-weight: 600; }
  .owner-nav a { flex-direction: row; justify-content: flex-start; gap: .75rem; padding: .55rem .75rem; font-size: .95rem; min-height: 44px; }
  .owner-nav a:hover { background: var(--surface-2); color: var(--ink); }
  .owner-nav a[aria-current='page'] { background: var(--brand-wash); }
  .owner-head .bar-shop .logo { display: none; }
  .owner-head .bar-title { font-size: 1.2rem; }
}

/* Today */
.status-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.status-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: .45rem; padding: .7rem .75rem;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--ink-2); text-decoration: none; font-size: .82rem;
}
.status-card .pill { font-size: .78rem; font-weight: 600; }
.card-label { color: var(--ink-2); font-weight: 500 !important; font-size: .92rem !important; }
.numbers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem .75rem; margin-top: .75rem; }
.numbers div { display: flex; flex-direction: column; align-items: center; gap: .1rem; min-width: 0; text-align: center; }
.numbers b { font-size: 1.6rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.numbers b small { font-size: .85rem; font-weight: 500; color: var(--ink-2); }
.numbers b.accent { color: var(--brand-text); }
.numbers span { color: var(--ink-2); font-size: .82rem; }
@media (min-width: 640px) { .numbers { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.shortcuts { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: .5rem; }
.shortcuts a {
  display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: .85rem .4rem; min-height: 44px;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; font-size: .85rem;
}
.shortcuts .ic { color: var(--brand-text); }
.button-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.button-pair .btn { white-space: normal; text-align: center; font-size: .92rem; gap: .4rem; padding-inline: .6rem; }
.btn-outline { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-outline:hover { background: var(--surface-2); }
.todo { list-style: none; margin: .4rem 0 0; padding: 0; }
.todo li { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .6rem 0; border-top: 1px solid var(--line); font-size: .92rem; }
.todo li:first-child { border-top: 0; }
.todo a { font-weight: 600; text-decoration: none; white-space: nowrap; }

/* settings cards */
.owner-main .card { display: flex; flex-direction: column; gap: .85rem; padding: 1rem 1.1rem; }
.owner-main .card > p { margin: 0; }
.owner-main .card > h2 + p.muted { margin-top: -.55rem; }
.settings { display: flex; flex-direction: column; gap: .85rem; }
.switch-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.switch-row p { margin: .2rem 0 0; }
.switch {
  appearance: none; -webkit-appearance: none; flex: none; width: 52px; height: 32px; min-height: 0; padding: 0; margin: 0;
  border: 0; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; transition: background-color .15s ease;
}
.switch::after {
  content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 20%); transition: transform .15s ease;
}
.switch:checked { background: var(--brand-ink); }
.switch:checked::after { transform: translateX(20px); }
[dir='rtl'] .switch:checked::after { transform: translateX(-20px); }
.switch:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 2px; }
.inline-field { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: .75rem; padding-top: .75rem; border-top: 1px solid var(--line); }
.inline-field select, .inline-field input { min-width: 0; }
.inline-field .short { width: 6rem; text-align: center; }
.card > h2 + .inline-field, .inline-field.plain { border-top: 0; padding-top: 0; }
.opts { display: flex; flex-wrap: wrap; gap: .5rem; }
.card > .opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opt { position: relative; display: block; cursor: pointer; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt span {
  display: flex; align-items: center; justify-content: center; gap: .35rem; min-height: 44px; padding: .45rem .9rem;
  border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2); font-weight: 500;
}
.opt input:checked + span { border-color: var(--brand-text); background: var(--brand-wash); color: var(--brand-text); font-weight: 600; }
.opt input:checked + span::before { content: '✓'; }
.opt input:focus-visible + span { outline: 2px solid var(--brand-text); outline-offset: 2px; }
/* As many equal columns as boxes shown (the fixed fee hides while the cashier sets it). */
.money-grid { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: .5rem; align-items: end; }
.money-grid label { font-size: .78rem; min-width: 0; }
.money-grid input { width: 100%; min-width: 0; padding: .55rem .6rem; }
.money-grid + p { margin: -.4rem 0 0; }
.more { font-weight: 600; text-decoration: none; }
.segmented-field { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.segmented-field legend { padding: 0; margin-bottom: .45rem; font-weight: 500; font-size: .92rem; color: var(--ink-2); }
.segmented-field p { margin: 0; }
.segmented { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); }
.segmented label, .segmented a { flex: 1; position: relative; display: block; color: var(--ink-2); font-size: .85rem; font-weight: 500; text-decoration: none; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented span, .segmented a { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 40px; padding: .3rem .4rem; border-radius: 9px; }
.segmented input:checked + span, .segmented a[aria-current='page'] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgb(0 0 0 / 8%); }
.segmented input:focus-visible + span { outline: 2px solid var(--brand-text); }
.savebar {
  position: sticky; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .55rem .6rem .55rem 1rem; border-radius: 16px; background: var(--ink); color: var(--bg); box-shadow: 0 8px 24px rgb(0 0 0 / 18%);
}
[dir='rtl'] .savebar { padding: .55rem 1rem .55rem .6rem; }
.savebar span { font-size: .9rem; }
.savebar .btn { min-height: 40px; }
form.is-clean .savebar { display: none; }
@media (min-width: 900px) { .savebar { bottom: 16px; } }

.hours-days { display: flex; flex-direction: column; gap: .5rem; }
.hours-row { display: grid; grid-template-columns: 5.5rem auto 1fr; align-items: center; gap: .5rem .75rem; padding: .45rem 0; border-top: 1px solid var(--line); }
.hours-row:first-child { border-top: 0; }
.hours-day { font-size: .92rem; }
.hours-row label.check { font-size: .85rem; color: var(--ink-2); }
.hours-shifts { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem; justify-content: flex-end; }
.hours-shift { display: inline-flex; align-items: center; gap: .3rem; }
.hours-shift input { min-height: 40px; padding: .3rem .4rem; font-size: .9rem; width: 7.6rem; }
.hours-row:has(input[name$='_closed']:checked) .hours-shifts { opacity: .35; pointer-events: none; }
.hours-days > [data-copy-days] { align-self: flex-start; }
@media (max-width: 420px) { .hours-row { grid-template-columns: 1fr auto; } .hours-shifts { grid-column: 1 / -1; justify-content: flex-start; } }

/* Team */
.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; align-items: center; gap: .75rem; padding: .55rem 0; border-top: 1px solid var(--line); }
.people li:first-child { border-top: 0; }
.people form { margin: 0; }
.grow { flex: 1; min-width: 0; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--brand-wash); color: var(--brand-text); font-weight: 600; }
.add-form { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; padding-top: .85rem; border-top: 1px solid var(--line); }
.add-form label { flex: 1 1 9rem; }
.add-form .error { flex-basis: 100%; }
.note { margin: 0; }

/* Café */
.link-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.link-list li { display: flex; flex-direction: column; gap: .3rem; }
.link-list a { font-weight: 500; }
.link-copy { display: flex; align-items: center; gap: .5rem; }
.link-copy code { flex: 1; min-width: 0; padding: .45rem .6rem; }
.card > .btn { align-self: flex-start; }
.changes { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.changes li { display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.changes li:last-child { border-bottom: 0; }

/* Menu */
.search input { width: 100%; padding-inline-start: 2.6rem; background: var(--surface) no-repeat 0.85rem center / 18px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b8c93' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E"); }
[dir='rtl'] .search input { background-position: calc(100% - .85rem) center; }
.om-preview-btn { flex: none; }
.om-cat { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.om-cat.is-hidden { opacity: .75; }
.om-cat > summary { list-style: none; display: flex; align-items: center; gap: .6rem; padding: .9rem 1.1rem; cursor: pointer; min-height: 52px; }
.om-cat > summary::-webkit-details-marker { display: none; }
.om-cat-name { flex: 1; font-weight: 600; }
.om-cat-name .muted { font-weight: 400; }
.chev { width: 18px; height: 18px; color: var(--ink-2); transition: transform .15s ease; }
.om-cat[open] .chev { transform: rotate(180deg); }
.om-empty { margin: 0; padding: 0 1.1rem .75rem; }
.om-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.om-items li { display: flex; align-items: center; gap: .6rem; padding: .55rem 1.1rem; border-top: 1px solid var(--line); }
.om-items form { margin: 0; }
.om-thumb { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; flex: none; background: var(--surface-2); }
.om-thumb.letter { display: grid; place-items: center; background: var(--brand-wash); color: var(--brand-text); font-weight: 700; font-size: 1.1rem; }
.om-thumb.big { width: 96px; height: 96px; }
.om-item-name { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--ink); text-decoration: none; }
.om-item-name span { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.om-item-name small { color: var(--ink-2); font-size: .8rem; }
.om-item-name:hover span { text-decoration: underline; }
.status-select { min-height: 32px; padding: .15rem 1.6rem .15rem .6rem; font-size: .78rem; font-weight: 600; border-radius: 999px; border: 0; }
[dir='rtl'] .status-select { padding: .15rem .6rem .15rem 1.6rem; }
.status-select[data-state='available'] { background-color: var(--ok-bg); color: var(--ok); }
.status-select[data-state='soldout'] { background-color: var(--warn-bg); color: var(--warn); }
.status-select[data-state='hidden'] { background-color: var(--surface-2); color: var(--ink-2); }
.om-row-actions, .om-cat-actions { display: flex; gap: 0; align-items: center; }
.om-row-actions form, .om-cat-actions form { margin: 0; }
.om-row-actions .btn-icon { width: 32px; min-height: 36px; }
.om-cat-settings { border-top: 1px solid var(--line); padding: .6rem 1.1rem; font-size: .9rem; }
.om-cat-settings > summary { cursor: pointer; color: var(--ink-2); padding: .2rem 0; }
.om-cat-settings[open] { display: flex; flex-direction: column; gap: .5rem; }
.om-cat-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .5rem; }
.om-cat-form input:not([type='checkbox']) { flex: 1 1 9rem; min-height: 40px; padding: .4rem .6rem; }
.om-groups { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.om-groups li { display: flex; flex-direction: column; gap: .15rem; padding: .6rem 0; border-top: 1px solid var(--line); }
.om-groups li:first-child { border-top: 0; }
.om-groups a { color: var(--ink); text-decoration: none; }
.om-fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .6rem .8rem; display: flex; flex-direction: column; gap: .35rem; }
.om-fieldset legend { padding: 0 .3rem; font-weight: 500; color: var(--ink-2); font-size: .92rem; }
.om-fieldset label.check { flex-direction: row; color: var(--ink); }
.om-best { align-items: flex-start !important; gap: .6rem; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink); }
.om-best input { margin-top: .2rem; }
.om-best span { display: flex; flex-direction: column; gap: .1rem; }
.om-choices { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) minmax(3.6rem, 1fr) auto; gap: .4rem; align-items: center; }
.om-choices input { min-height: 40px; padding: .4rem .45rem; }
.om-choices input[type='radio'] { width: 20px; height: 20px; min-height: 0; justify-self: center; accent-color: var(--brand-ink); }
.action-bar { position: sticky; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 15; display: flex; gap: .5rem; }
.action-bar .btn:first-child { flex: 1; }
.action-bar .btn { box-shadow: 0 6px 18px rgb(0 0 0 / 12%); }
@media (min-width: 900px) { .action-bar { bottom: 16px; } }
.pill.warn { background: var(--warn-bg); color: var(--warn); }


/* Reports */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; padding: .85rem .9rem; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.tile-label { color: var(--ink-2); font-size: .82rem; }
.tile-value { font-size: 1.4rem; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.tile-value small { font-size: .82rem; font-weight: 500; color: var(--ink-2); }
.delta { font-size: .75rem; font-weight: 600; padding: .1rem .5rem; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.delta.up { background: var(--ok-bg); color: var(--ok); }
.delta.down { background: var(--bad-bg); color: var(--bad); }
.vs { margin: -.4rem 0 0; }
.chart { position: relative; display: grid; grid-template-columns: auto 1fr; gap: .5rem; height: 190px; padding-bottom: 1.4rem; }
.chart-grid { display: flex; flex-direction: column; justify-content: space-between; font-size: .7rem; color: var(--ink-3); text-align: end; font-variant-numeric: tabular-nums; line-height: 1; margin-bottom: -.35rem; }
.chart-cols {
  list-style: none; margin: 0; padding: 0; position: relative; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 2px; align-items: end;
  background: linear-gradient(var(--line), var(--line)) top / 100% 1px no-repeat, linear-gradient(var(--line), var(--line)) center / 100% 1px no-repeat;
  border-bottom: 1px solid var(--ink-3);
}
.chart-cols li { position: relative; height: 100%; display: flex; justify-content: center; align-items: flex-end; outline: none; cursor: default; }
.col-bar { width: min(24px, 70%); min-height: 2px; border-radius: 4px 4px 0 0; background: var(--brand-text); transition: opacity .12s ease; }
.chart-cols:hover .col-bar { opacity: .45; }
.chart-cols li:hover .col-bar, .chart-cols li:focus-visible .col-bar { opacity: 1; }
.col-axis { position: absolute; top: calc(100% + .3rem); font-size: .68rem; color: var(--ink-3); white-space: nowrap; }
.col-tip {
  position: absolute; bottom: calc(100% + 6px); z-index: 5; display: none; white-space: nowrap;
  padding: .35rem .6rem; border-radius: 8px; background: var(--ink); color: var(--bg); font-size: .78rem; pointer-events: none;
}
.chart-cols li:hover .col-tip, .chart-cols li:focus .col-tip { display: block; }
.chart-cols li.tip-start .col-tip { inset-inline-start: 0; }
.chart-cols li.tip-end .col-tip { inset-inline-end: 0; }
.chart-cols li { --tip: 0; }
.chart-cols li:not(.tip-start):not(.tip-end) .col-tip { left: 50%; transform: translateX(-50%); }
.meters { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.meters li { display: grid; grid-template-columns: 1fr auto; gap: .3rem .75rem; font-size: .9rem; }
.meter-value { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.meter { grid-column: 1 / -1; height: 8px; border-radius: 999px; background: color-mix(in oklab, var(--brand-text) 16%, var(--surface)); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 999px; background: var(--brand-text); min-width: 2px; }
.fold > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: '▾'; color: var(--ink-2); transition: transform .15s ease; }
.fold[open] > summary::after { transform: rotate(180deg); }
.share-link { display: flex; flex-direction: column; gap: .35rem; padding: .7rem .8rem; border-radius: 12px; background: var(--brand-wash); }
.share-link p { margin: 0; }
.share-link code { background: var(--surface); }
.owner-nav a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* ---------- admin ---------- */

.admin-main { width: 100%; max-width: 52rem; margin: 0 auto; padding: 1.5rem 16px 2rem; }
.admin-main > p:first-child { margin-top: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.35rem; margin-bottom: 1rem; }
.form { max-width: 34rem; }
.shop-list, .staff-list, .links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.shop-list a { display: flex; align-items: center; gap: .75rem; padding: .95rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; font-weight: 500; }
.shop-list a:hover { border-color: var(--ink-3); }
.swatch { width: 18px; height: 18px; border-radius: 6px; flex: none; }
.shop-list-main { display: flex; flex-direction: column; gap: .1rem; flex: 1; min-width: 0; }
.pills { display: flex; gap: .35rem; flex-wrap: wrap; }
.pill { font-size: .78rem; font-weight: 500; padding: .15rem .55rem; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.new-pin-box { background: var(--ok-bg); color: var(--ok); border-radius: var(--radius); padding: .9rem 1rem; margin-bottom: .75rem; }
.new-pin-box p { margin: 0; }
.new-pin { font-size: 2rem; font-weight: 600; letter-spacing: .25em; color: var(--ink); margin-top: .35rem !important; }
.staff-list li { display: flex; justify-content: space-between; align-items: center; padding: .4rem 0; border-bottom: 1px solid var(--line); }
.staff-list form { margin: 0; }
.staff-list + .form { margin-top: 1rem; }
.links li { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: .55rem .6rem; text-align: start; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--ink-2); font-weight: 500; }

/* ---------- poster ---------- */

/* A4, sized in cqi (1% of the poster's width) so the screen preview and the print match. */
.poster-body { background: #e8e8e4; align-items: center; padding: 16px; color: #111; }
.poster-body > .btn { margin-bottom: 16px; }
.poster {
  --bg: #fff; --surface: #fff; --ink: #111; --ink-2: #555;
  --brand-text: color-mix(in oklab, var(--brand) 70%, #000);
  container-type: inline-size; width: 100%; max-width: 210mm; aspect-ratio: 210 / 297;
  background: #fff; color: #111; box-shadow: 0 10px 40px rgb(0 0 0 / 12%);
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.poster-in {
  height: 100%; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 6cqi 7cqi 4cqi; border-top: 3cqi solid var(--brand);
}
.poster .shop-head { margin: 0 0 3cqi; gap: 2.2cqi; }
.poster .logo { width: 9.5cqi; height: 9.5cqi; border-radius: 2.6cqi; }
.poster .logo-letter { font-size: 4.8cqi; }
.poster .shop-name { font-size: 4.4cqi; color: #111; }
.poster-title { font-size: 5.4cqi; line-height: 1.25; margin: 0; color: #111; text-wrap: balance; }
.poster-title-en { margin: 1cqi 0 0; font-size: 3.3cqi; font-weight: 500; color: #555; }
.qr-frame { position: relative; width: 50cqi; padding: 3.8cqi; margin: 4.5cqi 0 3cqi; }
.qr svg { width: 100%; height: auto; display: block; }
.qr-corner { position: absolute; width: 11cqi; height: 11cqi; border: 1.3cqi solid var(--brand); }
.qr-corner.tl { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 3.5cqi; }
.qr-corner.tr { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 3.5cqi; }
.qr-corner.bl { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 3.5cqi; }
.qr-corner.br { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 3.5cqi; }
.poster-chip {
  margin: 0; padding: 1cqi 3cqi; border-radius: 99px; font-size: 2.6cqi; font-weight: 500;
  background: color-mix(in oklab, var(--brand) 10%, #fff); color: var(--brand-text);
}
.poster-steps { list-style: none; margin: auto 0 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3cqi; }
.poster-step { display: flex; flex-direction: column; align-items: center; gap: .6cqi; }
.poster-step-ico {
  width: 10.5cqi; height: 10.5cqi; padding: 2.3cqi; margin-bottom: 1cqi; border-radius: 50%;
  background: color-mix(in oklab, var(--brand) 10%, #fff);
  fill: none; stroke: var(--brand-text); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.poster-step b { font-size: 3cqi; font-weight: 600; line-height: 1.35; text-wrap: balance; }
.poster-step span { font-size: 2.3cqi; line-height: 1.35; color: #666; text-wrap: balance; }
.poster-foot { margin: 3cqi 0 0; color: #999; font-size: 2.1cqi; }
@media print {
  @page { size: A4; margin: 0; }
  .no-print { display: none !important; }
  .poster-body { background: #fff; padding: 0; }
  .poster { box-shadow: none; max-width: none; width: 210mm; height: 297mm; }
}

/* ---------- kitchen ---------- */

.kitchen-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; padding: 1.25rem 16px; align-items: start; align-content: start; }
.kitchen-board > .empty { grid-column: 1 / -1; }
.kcard {
  display: flex; flex-direction: column; gap: .7rem; padding: 1rem 1.1rem 1.1rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.kcard-head { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; }
.kcard-num { font-size: 2.6rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; direction: ltr; }
/* Table numbers: where a menu order goes (staff carry it over), or Takeaway. */
.table-tag {
  align-self: flex-start; display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-weight: 700; font-size: 1rem;
  background: color-mix(in srgb, var(--brand-text) 14%, var(--surface)); color: var(--brand-text); font-variant-numeric: tabular-nums;
}
.table-tag.takeaway { background: var(--surface-2); color: var(--ink-2); font-weight: 600; font-size: .9rem; }
.kcard-head .table-tag { align-self: center; font-size: 1.35rem; padding: .2rem .8rem; }
.kcard-head .table-tag.takeaway { font-size: 1.05rem; }
.kcard-age { color: var(--ink-2); font-size: 1rem; font-variant-numeric: tabular-nums; }
.kcard-lines { list-style: none; margin: 0; padding: .6rem 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: .45rem; font-size: 1.2rem; font-weight: 500; color: var(--ink); }
.kcard-note { margin: 0; padding: .55rem .7rem; border-radius: 10px; font-size: 1.05rem; background: color-mix(in srgb, var(--warn) 14%, var(--surface)); color: var(--ink); }
.kcard-ready { min-height: 60px; font-size: 1.2rem; font-weight: 600; margin-top: auto; }
.sound-hint { display: block; width: 100%; border: 0; font: inherit; cursor: pointer; }
.toast .btn { margin-inline-start: .75rem; }

.demo-menu { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
/* ---------- home orders on staff cards ---------- */
.tcard .home-info { order: 1; grid-column: 1 / -1; display: flex; flex-direction: column; gap: .3rem; padding-top: .55rem; border-top: 1px solid var(--line); font-size: .92rem; }
.home-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.home-tag { font-size: .78rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; background: var(--surface-2); color: var(--ink); }
.home-tag.delivery { background: color-mix(in srgb, var(--brand-text) 16%, var(--surface)); color: var(--brand-text); }
.home-phone { color: var(--brand-text); font-variant-numeric: tabular-nums; }
.home-where, .home-note, .home-foot { margin: 0; color: var(--ink-2); }
.home-note { font-style: italic; }
.home-foot { display: flex; justify-content: space-between; gap: .75rem; }
.home-map { font-weight: 600; color: var(--brand-text); }

/* ---------- ordering from home (cart) ---------- */
.home-how { display: flex; flex-direction: column; gap: .5rem; padding-top: .25rem; }
.segmented { display: flex; gap: .3rem; padding: .25rem; border-radius: 14px; background: var(--surface-2); }
.segmented button {
  flex: 1; min-height: 42px; border: 0; border-radius: 11px; background: transparent; color: var(--ink-2);
  font: inherit; font-size: .92rem; font-weight: 500; cursor: pointer;
}
.segmented button.active { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
/* ---------- table numbers (cart) ---------- */
.table-pick { display: flex; flex-direction: column; gap: .5rem; padding-top: .25rem; }
.table-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: .4rem; }
.table-grid button {
  min-height: 46px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--ink);
  font: inherit; font-size: 1rem; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer;
}
.table-grid button.table-takeaway { grid-column: 1 / -1; font-size: .92rem; font-weight: 500; }
.table-grid button.active { border-color: var(--brand-text); background: color-mix(in srgb, var(--brand-text) 12%, var(--surface)); color: var(--brand-text); }
.table-grid button:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 2px; }
.home-form { display: flex; flex-direction: column; gap: .6rem; }
.home-field { display: flex; flex-direction: column; gap: .3rem; font-size: .88rem; color: var(--ink-2); }
.home-field input { font: inherit; font-size: 1rem; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .6rem .75rem; min-height: 44px; }
.home-locate { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.cart-extra { display: flex; justify-content: space-between; color: var(--ink-2); }
.cart-hint { margin: -.5rem 0 0; font-size: .85rem; color: var(--ink-3); }
.order-extra { display: flex; justify-content: space-between; margin: .35rem 0 0; color: var(--ink-2); }
.call-cafe { margin-top: .25rem; }

/* ---------- driver page ---------- */
.driver-board { display: flex; flex-direction: column; gap: 1rem; padding: 1rem 16px 2rem; width: 100%; max-width: 40rem; margin: 0 auto; box-sizing: border-box; }
.driver-board h2 { color: var(--ink-2); font-size: .95rem; margin: .5rem 0 .6rem; }
.shift-switch {
  width: 100%; min-height: 56px; border: 0; border-radius: 16px; font: inherit; font-size: 1.1rem; font-weight: 700; cursor: pointer;
  background: var(--surface-2); color: var(--ink-2);
}
.shift-switch.on { background: var(--ok); color: #fff; }
.driver-cash { margin: 0; padding: .8rem 1rem; border-radius: 14px; background: var(--warn-bg); color: var(--warn); font-weight: 600; text-align: center; }
.dcard { gap: .55rem; }
.dcard-status { color: var(--ink-2); font-size: .9rem; }
.dcard-area { margin: 0; font-size: 1.1rem; font-weight: 600; }
.dcard-name { font-size: 1.05rem; }
.dcard-address { margin: 0; font-size: 1.05rem; }
.dcard-foot { margin: 0; display: flex; align-items: center; gap: .6rem; justify-content: space-between; color: var(--ink-2); }
.dcard-foot b { color: var(--ink); font-size: 1.1rem; }
.dcard-links { display: flex; gap: .5rem; flex-wrap: wrap; }
.dcard-links .btn { flex: 1; min-height: 48px; justify-content: center; }
.dcard-actions { display: flex; gap: .5rem; }
.dcard-main { flex: 1; min-height: 56px; font-size: 1.1rem; font-weight: 600; }
.col-dot-out { background: #2f6fd1; }
@media (min-width: 900px) { .board.with-out:not(.with-new) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .board.with-new.with-out { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.col-out .tcard { border-color: color-mix(in srgb, #2f6fd1 35%, var(--line)); }
.drivers-btn { gap: .5rem; }
.drivers-btn.has-cash { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--warn) 55%, transparent); }
.drivers-btn .cash-badge { font-size: .78rem; font-weight: 700; padding: .12rem .5rem; border-radius: 999px; background: var(--warn-bg); color: var(--warn); }
.drawer-backdrop { position: fixed; inset: 0; z-index: 40; background: rgb(0 0 0 / 40%); display: flex; justify-content: flex-end; }
.drawer {
  width: min(440px, 100%); height: 100%; background: var(--surface); display: flex; flex-direction: column;
  box-shadow: 0 0 32px rgb(0 0 0 / 22%);
}
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.25rem .6rem; }
.drawer-head h2 { margin: 0; font-size: 1.25rem; }
.drawer-head p { margin: .15rem 0 0; }
.drawer-close { background: var(--surface-2); border-radius: 50%; font-size: 1.3rem; color: var(--ink); }
.drawer-body { flex: 1; overflow-y: auto; padding: .25rem 1rem 1rem; display: flex; flex-direction: column; gap: .75rem; }
.drawer-foot { padding: .8rem 1rem 1rem; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }
.driver-card { border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem; display: flex; flex-direction: column; gap: .65rem; }
.driver-card.off { opacity: .7; }
.driver-top { display: flex; align-items: center; gap: .65rem; }
.driver-top .grow { display: flex; flex-direction: column; min-width: 0; }
.driver-top .grow a { text-decoration: none; }
.driver-orders { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; font-size: .9rem; }
.driver-orders li { display: flex; justify-content: space-between; gap: .75rem; padding: .45rem .65rem; border-radius: 10px; background: var(--surface-2); }
.driver-orders li.is-out { background: color-mix(in srgb, #2f6fd1 10%, var(--surface)); }
.driver-orders .late { color: var(--warn); font-weight: 600; }
.driver-foot { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding-top: .65rem; border-top: 1px solid var(--line); }
.driver-foot > div { display: flex; flex-direction: column; }
.driver-foot b { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.home-driver { margin: 0; display: flex; align-items: center; gap: .4rem; font-weight: 600; color: var(--brand-text); }
@media (prefers-color-scheme: dark) { .shift-switch.on { background: #1d7a4c; } }

/* ---------- home page (/) ---------- */

/* Pluto's own look, the same in light and dark: the icon's sun yellow, ink black and white. */
.site { --sun: #ffd43b; --ink-b: #141414; --night: #1e2a6e; --soft: #f4f4f1; --display: 'Lalezar', 'Readex Pro', system-ui, sans-serif;
  background: #fff; color: var(--ink-b); color-scheme: light; }
.site .foot { color: #6b6b70; background: #fff; }
.site h1, .site h2 { font-family: var(--display); font-weight: 400; letter-spacing: 0; line-height: 1.08; margin: 0; text-wrap: balance; }
.site-in { width: 100%; max-width: 68rem; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.site-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: .7rem 1.4rem; border-radius: 999px; font-weight: 600; text-decoration: none; }
.site-btn-ink { background: var(--ink-b); color: var(--sun); }
.site-btn-line { color: var(--ink-b); box-shadow: inset 0 0 0 2px var(--ink-b); }
.site-btn-sun { background: var(--sun); color: var(--ink-b); }
.site-btn:hover { opacity: .9; }
.site a:focus-visible { outline: 3px solid var(--night); outline-offset: 3px; }

.site-hero { background: var(--sun); }
.site-top { display: flex; justify-content: space-between; align-items: center; padding-block: 1.1rem; }
.site-top a { color: var(--ink-b); font-size: .92rem; }
.site-logo { display: flex; align-items: center; gap: .55rem; font-weight: 700; font-size: 1.2rem; }
.site-logo img { width: 34px; height: 34px; }
.site-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 18rem); gap: 2rem; align-items: end; padding-top: 1rem; }
.site-hero-text { padding-bottom: 2.75rem; }
.site-hero h1 { font-size: clamp(3rem, 9vw, 6.2rem); }
.site-hero p { font-size: 1.15rem; line-height: 1.75; max-width: 30rem; margin: 1rem 0 0; }
.site-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.6rem; }

/* The drawn phones: a dark frame, cut off at the section's edge. */
.site-phone { background: var(--ink-b); border-radius: 34px 34px 0 0; padding: 11px 11px 0; width: 100%; max-width: 17rem; justify-self: center; }
.site-screen { background: #fff; border-radius: 24px 24px 0 0; color: var(--ink-b); }
.site-ready { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 1.6rem 1rem 2rem; text-align: center; }
.site-ready small { color: #666; font-size: .85rem; }
.site-ready b { font-family: var(--display); font-weight: 400; font-size: 7rem; line-height: .9; color: var(--night); }
.site-ring { display: inline-flex; align-items: center; gap: .5rem; background: #e2f3e9; color: #1d7a4c; font-weight: 600; padding: .45rem .9rem; border-radius: 999px; }
.site-ring i { width: 10px; height: 10px; border-radius: 50%; background: #1d7a4c; animation: site-ring 1.6s infinite; }
@keyframes site-ring { from { box-shadow: 0 0 0 0 rgb(29 122 76 / 50%); } to { box-shadow: 0 0 0 12px rgb(29 122 76 / 0%); } }
@media (prefers-reduced-motion: reduce) { .site-ring i { animation: none; } }

.site-steps { background: var(--ink-b); color: #fff; }
.site-steps ol { list-style: none; margin: 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); counter-reset: step; }
.site-steps li { counter-increment: step; padding: 1.6rem 1.5rem 1.8rem; border-inline-start: 1px solid #333; }
.site-steps li:first-child { border-inline-start: 0; padding-inline-start: 0; }
.site-steps li::before { content: counter(step); display: block; font-family: var(--display); font-size: 2.3rem; line-height: 1; color: var(--sun); }
:lang(ar) .site-steps li::before { content: counter(step, arabic-indic); }
.site-steps b { display: block; font-size: 1.1rem; margin-top: .35rem; }
.site-steps p { margin: .3rem 0 0; color: #c8c8c8; line-height: 1.7; font-size: .95rem; }

.site-menu { background: #fff; }
.site-menu-grid { display: grid; grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); gap: 3rem; align-items: end; padding-top: 3.25rem; }
.site-menu-text { padding-bottom: 3.25rem; }
.site-menu h2 { font-size: clamp(2.3rem, 5.6vw, 4.2rem); }
.site-menu-text p { font-size: 1.08rem; line-height: 1.8; max-width: 34rem; margin: 1rem 0 0; color: #333; }
.site-ticks { list-style: none; margin: 1.1rem 0 0; padding: 0; display: grid; gap: .6rem; }
.site-ticks li { display: flex; gap: .7rem; align-items: center; font-weight: 500; }
.site-ticks li::before { content: ""; flex: none; width: 11px; height: 11px; border-radius: 3px; background: var(--sun); box-shadow: 0 0 0 2px var(--ink-b); }
.site-phone-menu .site-screen { background: #f6f6f4; padding: 1rem .85rem 1.1rem; display: grid; gap: .6rem; }
.site-m-head { display: flex; align-items: center; gap: .6rem; }
.site-m-head img, .site-m-head span { width: 38px; height: 38px; border-radius: 10px; flex: none; }
.site-m-head span { display: grid; place-items: center; color: #fff; font-weight: 700; }
.site-m-head b { display: block; font-size: .95rem; }
.site-m-head small, .site-m-item small { display: block; color: #777; font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-m-head div, .site-m-item div { min-width: 0; }
.site-m-tabs { display: flex; gap: .35rem; overflow: hidden; }
.site-m-tabs span { white-space: nowrap; font-size: .76rem; padding: .2rem .6rem; border-radius: 999px; background: #e8e8e4; }
.site-m-tabs .on { background: var(--ink-b); color: #fff; }
.site-m-item { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; gap: .6rem; align-items: center; background: #fff; border-radius: 12px; padding: .45rem; }
.site-m-item img, .site-m-pic { width: 50px; height: 50px; border-radius: 9px; object-fit: cover; background: #e8e8e4; display: block; }
.site-m-item b { display: block; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-m-item em { font-style: normal; font-size: .76rem; font-weight: 600; }
.site-m-item i { font-style: normal; width: 28px; height: 28px; border-radius: 50%; background: var(--sun); display: grid; place-items: center; font-weight: 700; }
.site-m-item.off { opacity: .45; }
.site-m-cart { display: flex; justify-content: space-between; gap: .5rem; background: var(--ink-b); color: #fff; border-radius: 12px; padding: .65rem .85rem; font-size: .82rem; }

.site-also { background: var(--soft); border-block: 1px solid #e4e4df; }
.site-also .site-in { padding-block: 2rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1.5rem; }
.site-also h2 { font-size: 1.5rem; }
.site-also p { margin: 0; font-size: 1.12rem; color: #333; }
.site-also p span:not([aria-hidden]) { white-space: nowrap; }

.site-demo .site-in { padding-block: 3.25rem; }
.site-demo-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem 2rem; }
.site-demo h2 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.site-demo-head p { margin: .5rem 0 0; color: #444; }
.site-pin { display: inline-flex; align-items: center; gap: .7rem; margin: 0; font-weight: 600; }
.site-pin code { font-family: var(--display); font-size: 1.9rem; line-height: 1; letter-spacing: .1em; padding: .45rem .9rem .25rem; background: var(--sun); color: var(--ink-b); border-radius: 10px; }
.site-demos { margin-top: 1.75rem; border-top: 2px solid var(--ink-b); }
.site-demo-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem 2rem; padding-block: 1.15rem; border-bottom: 1px solid #ddd; }
.site-demo-name { display: flex; align-items: center; gap: .8rem; }
.site-demo-name img, .site-demo-name span { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.site-demo-name span { display: grid; place-items: center; color: #fff; font-weight: 700; }
.site-demo-name b { display: block; font-size: 1.1rem; }
.site-demo-name small { color: #666; }
.site-links { display: flex; flex-wrap: wrap; gap: .45rem; }
.site-links a { display: inline-flex; align-items: center; min-height: 40px; padding: .3rem .95rem; border-radius: 999px; color: var(--ink-b); text-decoration: none; font-weight: 500; box-shadow: inset 0 0 0 1.5px #cfcfca; }
.site-links a:hover { box-shadow: inset 0 0 0 1.5px var(--ink-b); }
.site-links a.main { background: var(--ink-b); color: var(--sun); box-shadow: none; }
.site-note { margin: 1rem 0 0; color: #666; font-size: .9rem; }

.site-contact { background: var(--ink-b); color: #fff; }
.site-contact .site-in { padding-block: 2.5rem; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.25rem; }
.site-contact h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); color: var(--sun); }
.site-contact p { margin: .4rem 0 0; color: #c8c8c8; }

@media (max-width: 760px) {
  .site-hero-grid, .site-menu-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .site-hero-text { padding-bottom: 2rem; }
  .site-phone { max-width: 15.5rem; }
  .site-menu-text { order: -1; padding-bottom: 2rem; }
  .site-steps ol { grid-template-columns: minmax(0, 1fr); }
  .site-steps li, .site-steps li:first-child { border-inline-start: 0; border-top: 1px solid #333; padding-inline: 0; }
  .site-steps li:first-child { border-top: 0; }
}

/* Built-in demos: the PIN on sign-in screens, and the fixed team on the owner page. */
.demo-pin { margin: 0; text-align: center; color: var(--ok); background: var(--ok-bg); border-radius: var(--radius-sm); padding: .5rem .8rem; }
.demo-pin b { letter-spacing: .12em; }
.demo-pin p { margin: 0 0 .5rem; }
.demo-people { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; }
.demo-person { font: inherit; color: var(--ink); background: var(--surface); border: 1.5px solid transparent; border-radius: 999px; padding: .35rem .8rem; cursor: pointer; }
.demo-person b { color: var(--ok); margin-inline-start: .25rem; }
.demo-person[aria-pressed="true"] { border-color: var(--ok); font-weight: 600; }
.note-demo { margin: 0 0 1rem; color: var(--ok); background: var(--ok-bg); border-radius: var(--radius-sm); padding: .6rem .85rem; }

/* Admin: the home page's WhatsApp number. */
#contact.card { margin-top: 1.5rem; display: flex; flex-direction: column; gap: .5rem; }
#contact.card h2, #contact.card p { margin: 0; }
.row-form { display: flex; flex-wrap: wrap; gap: .5rem; }
.row-form input { flex: 1 1 14rem; min-width: 0; }
.ok-note { margin: 0; color: var(--ok); }
