/* One stylesheet for every page. Colours are set once here as variables. */
:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --text: #1f2328;
  --muted: #6b7076;
  --border: #e2ded6;
  --accent: #a52218;      /* the red of the Steff's Creation logo */
  --gold: #e9c98f;        /* the cream-gold of the logo */
  --brand-dark: #7d1810;
  --ok: #1d7a46;
  --warn: #9a6400;
  --danger: #b42318;
  --ok-bg: #e3f4ea;
  --warn-bg: #fff3d6;
  --danger-bg: #fde7e5;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17181a; --surface: #222326; --text: #ececec; --muted: #9a9ea4; --border: #34363a;
    --accent: #e8735f; --brand-dark: #4a0f0a; --ok: #5ccf8b; --warn: #f0b84a; --danger: #ff7a6e;
    --ok-bg: #173523; --warn-bg: #3a2e12; --danger-bg: #3d1a17;
  }
}

* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
main { max-width: 1000px; margin: 0 auto; padding: 16px; }
main.wide { max-width: 1400px; }
h1 { margin: 8px 0 12px; }
h2 { font-size: 1.2rem; margin: 0 0 10px; }
h3 { font-size: 1rem; margin: 16px 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
a { color: var(--accent); }

nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50; }
.nav-links { display: flex; flex-wrap: wrap; gap: 4px; }
nav .nav-links a { white-space: nowrap; }
nav a { padding: 6px 10px; border-radius: 6px; text-decoration: none; color: var(--text); }
nav a.active { background: var(--accent); color: #fff; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.narrow { max-width: 480px; margin-left: auto; margin-right: auto; }
.sticky { position: sticky; top: calc(var(--nav-h, 56px) + 8px); }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
/* Let wide tables scroll inside their column instead of pushing the page wider than the screen. */
.two-col > *, .board > *, .stats > * { min-width: 0; }
@media (max-width: 900px) { .two-col { grid-template-columns: minmax(0, 1fr); } .sticky { position: static; } }
.row { display: flex; gap: 8px; align-items: end; margin-top: 12px; }
.row.wrap { flex-wrap: wrap; }

label { display: block; margin: 8px 0; font-size: .9rem; color: var(--muted); }
label.inline { display: flex; gap: 8px; align-items: center; color: var(--text); }
input, select { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px; }
input[type=checkbox], input[type=radio] { width: auto; margin: 0; flex: none; }
.small-input { display: inline-block; width: 90px; margin: 0; }

button { font: inherit; padding: 8px 14px; border-radius: 6px; border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; }
button:disabled { opacity: .4; cursor: not-allowed; }
button.big { width: 100%; padding: 12px; font-size: 1.05rem; margin-top: 8px; }
button.plain { background: transparent; color: var(--text); border-color: var(--border); }
button.ok { background: var(--ok); border-color: var(--ok); }
button.danger { background: transparent; color: var(--danger); border-color: var(--danger); }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--bg); }
.badge.ok, .badge.s-ready { background: var(--ok-bg); color: var(--ok); }
.badge.warn, .badge.s-awaiting_payment { background: var(--warn-bg); color: var(--warn); }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.s-preparing { background: var(--warn-bg); color: var(--warn); }

/* Home page */
.hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.hub a { display: block; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; text-decoration: none; color: var(--text); }
.hub a:hover { border-color: var(--accent); }
.hub b { display: block; font-size: 1.15rem; color: var(--accent); }
.hub span { color: var(--muted); font-size: .9rem; }

/* Menu picker */
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.menu-item { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.picker-tools .diet-filter { padding-bottom: 0; }
.diet-filter .chip { padding: 6px 11px; font-size: .85rem; }
.not-ready-head { color: var(--muted, #6b5d4f); }
.diet-hint { margin: 2px 0 8px; }
.badge.diet-lacto_vegetarian { background: #e3f1dc; color: #2f6b1f; }
.badge.diet-vegan { background: #d4efe6; color: #0f5c45; }
.badge.diet-carnivore { background: #f6e1d6; color: #8a3517; }
.dish-description { margin: 2px 0 4px; font-size: 0.85rem; color: var(--muted, #6b5d4f); line-height: 1.3; }
.menu-item-body { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px; flex: 1; }
.dish-photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--bg); }
.dish-photo.placeholder { display: flex; align-items: center; justify-content: center; font-size: 2.5rem; font-weight: 700; color: var(--border); }
.menu-grid:has(.with-photo) { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.photo-box { display: flex; gap: 12px; align-items: center; margin: 8px 0; }
.photo-box img, .photo-box .dish-photo { width: 120px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; vertical-align: middle; margin-right: 8px; }
.menu-item.soldout { opacity: .8; }
.menu-item.soldout .dish-photo { opacity: .3; filter: grayscale(.7); }
.oos-list { display: flex; flex-wrap: wrap; gap: 8px; }
.qty { display: flex; align-items: center; gap: 8px; }
.qty button { width: 36px; height: 36px; padding: 0; font-size: 1.2rem; }
.qty span { min-width: 1.2em; text-align: center; font-weight: 600; }

[hidden] { display: none !important; }

/* Version 19: search and section buttons above the dishes, drawn pictures,
   steam over hot dishes, and a compact two-across layout on phones. */
.picker-tools { position: sticky; top: var(--tools-top, 0px); z-index: 20; background: var(--bg); padding: 8px 0 6px; margin-bottom: 4px; }
.picker-search, .list-search { width: 100%; box-sizing: border-box; padding: 10px 12px 10px 36px; font: inherit; border: 1px solid var(--border);
  border-radius: 999px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23888' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 4 4'/%3E%3C/svg%3E") no-repeat 13px center; color: var(--text); }
.list-search { max-width: 420px; margin: 0 0 10px; display: block; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 6px 14px; border-radius: 999px; background: var(--surface); color: var(--text); border: 1px solid var(--border); font-size: .9rem; }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.picker-list h3 { margin: 14px 0 8px; }
.menu-item-text { min-width: 0; }
.menu-item .price { font-weight: 700; color: var(--accent); }
.menu-item.in-cart { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.dish-pic { position: relative; overflow: hidden; }
.dish-art { display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 58%, #fff 0 34%, #f3e6d6 35% 37%, transparent 38%), linear-gradient(135deg, #f7c873, #e2742f); }
.dish-art span { font-size: clamp(2.4rem, 11vw, 4.2rem); line-height: 1; filter: drop-shadow(0 4px 6px rgba(0,0,0,.25)); transform: translateY(4%); }
.dish-art.art-breakfast { background: radial-gradient(circle at 50% 58%, #fff 0 34%, #f3e6d6 35% 37%, transparent 38%), linear-gradient(135deg, #ffe08a, #f29a3a); }
.dish-art.art-mains, .dish-art.art-lunch { background: radial-gradient(circle at 50% 58%, #fff 0 34%, #f3e6d6 35% 37%, transparent 38%), linear-gradient(135deg, #e0623f, #8f1d14); }
.dish-art.art-sides { background: radial-gradient(circle at 50% 58%, #fff 0 34%, #f3e6d6 35% 37%, transparent 38%), linear-gradient(135deg, #f4d35e, #c7861d); }
.dish-art.art-specials, .dish-art.art-desserts { background: radial-gradient(circle at 50% 58%, #fff 0 34%, #f6e1e6 35% 37%, transparent 38%), linear-gradient(135deg, #f9c6d3, #b54a6f); }
.dish-art.art-drinks { background: linear-gradient(135deg, #9fe3e0, #1f7a8c); }
.steam { position: absolute; left: 20%; right: 20%; top: 0; height: 55%; pointer-events: none; overflow: visible; }
.steam path { fill: none; stroke: rgba(255,255,255,.85); stroke-width: 7; stroke-linecap: round; filter: blur(3px); opacity: 0;
  animation: steam-rise 3.6s ease-in-out infinite; }
.steam path:nth-child(2) { animation-delay: 1.2s; }
.steam path:nth-child(3) { animation-delay: 2.4s; }
@keyframes steam-rise { 0% { opacity: 0; transform: translateY(18%) scaleY(.7); } 30% { opacity: .9; } 100% { opacity: 0; transform: translateY(-22%) scaleY(1.15); } }
@media (prefers-reduced-motion: reduce) { .steam path { animation: none; opacity: .6; } }
.pic-note { margin: 0; padding: 3px 8px; font-size: .68rem; line-height: 1.25; color: var(--muted); background: var(--bg); font-style: italic; }
.cart-bar { display: none; }
/* The order box (see orderPanel in common.js). Laptops: pinned right column that
   scrolls on its own if it is taller than the screen. */
.op-head { display: none; }
.order-panel.sticky { top: calc(var(--nav-h, 0px) + 8px); max-height: calc(100vh - var(--nav-h, 0px) - 16px); overflow-y: auto; }
/* Phones and tablets: pinned at the top, folded to one line until tapped. */
@media (max-width: 999px) {
  .two-col.has-panel { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
  .two-col.has-panel > * { width: 100%; min-width: 0; }
  .order-panel, .order-panel.sticky { order: -1; position: sticky; top: var(--nav-h, 0px); z-index: 40; padding: 0; max-height: none;
    overflow: hidden; box-shadow: 0 6px 16px rgba(0,0,0,.18); }
  .order-panel .op-head { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px;
    border: 0; border-radius: 0; background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
  .order-panel.has-items .op-head { background: var(--accent); color: #fff; }
  .op-toggle { font-weight: 700; white-space: nowrap; }
  .order-panel .op-body { display: none; padding: 8px 16px 16px; max-height: calc(100dvh - var(--nav-h, 0px) - 60px); overflow-y: auto; }
  .order-panel.open .op-body { display: block; }
  .picker-tools { top: calc(var(--tools-top, 0px) + var(--panel-h, 0px)); }
}
@media (max-width: 600px) {
  .menu-grid, .menu-grid:has(.with-photo) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .menu-item-body { flex-direction: column; align-items: stretch; padding: 8px; gap: 6px; }
  .menu-item-text b { font-size: .92rem; line-height: 1.2; display: block; }
  .menu-item .badge { font-size: .7rem; padding: 1px 6px; }
  .menu-grid .dish-photo { aspect-ratio: 3 / 2; }
  .pic-note { font-size: .62rem; padding: 2px 6px; }
  .dish-description { font-size: .78rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .menu-item .qty { justify-content: space-between; }
  .qty button { width: 40px; height: 36px; }
  .picker-list h3 { margin: 10px 0 6px; font-size: 1.05rem; }
}

.lines { list-style: none; padding: 0; margin: 0; }
.lines li, .total { display: flex; justify-content: space-between; padding: 4px 0; }
.total { font-weight: 700; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 8px; }

/* Tables */
table.list { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 16px; }
table.list th, table.list td { padding: 10px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
table.list th { font-size: .8rem; text-transform: uppercase; color: var(--muted); }
table.list tbody tr[data-id] { cursor: pointer; }
table.list tr.selected { background: var(--warn-bg); }
table.list tr.low td:first-child { box-shadow: inset 4px 0 var(--warn); }
@media (max-width: 1000px) { table.list { display: block; overflow-x: auto; } }

.recipe-row { display: grid; grid-template-columns: 1fr 90px 40px; gap: 6px; margin-bottom: 6px; }
.recipe-row input, .recipe-row select { margin: 0; }
.recipe-row button { padding: 0; }

/* Payment panel */
.tabs { display: flex; gap: 4px; margin-bottom: 10px; flex-wrap: wrap; }
.tabs button { background: transparent; color: var(--text); border-color: var(--border); }
.tabs button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
img.qr { display: block; margin: 10px auto; width: 240px; height: 240px; background: #fff; padding: 8px; border-radius: 8px; }

/* Order progress for online customers */
.progress { list-style: none; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.progress li { flex: 1; min-width: 90px; text-align: center; padding: 8px; border-radius: 6px; background: var(--bg); color: var(--muted); }
.progress li.done { background: var(--ok-bg); color: var(--ok); font-weight: 600; }

/* Kitchen board */
.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 800px) { .board { grid-template-columns: 1fr; } }
.board section { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px; min-height: 200px; }
.ticket { border: 1px solid var(--border); border-left: 6px solid var(--accent); border-radius: 8px; padding: 10px; margin-bottom: 10px; background: var(--bg); }
.ticket.online { border-left-color: #2f6fb5; }
.ticket.walk_in { border-left-color: #b5832f; }
.ticket header { display: flex; justify-content: space-between; gap: 8px; }
.ticket ul { margin: 8px 0; padding-left: 18px; font-size: 1.05rem; }
.ticket .note { margin: 6px 0; padding: 6px 8px; background: var(--warn-bg); color: var(--warn); border-radius: 6px; }
.ticket footer { display: flex; gap: 6px; }

.flash { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); padding: 12px 18px; border-radius: 8px; color: #fff; background: #1d7a46; z-index: 10; box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.flash.danger { background: #b42318; }

/* ---- Version 2: logins, finance, costing ---- */
nav .brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--accent); padding: 2px 10px 2px 0; }
nav .brand img { width: 32px; height: 32px; border-radius: 6px; }
nav .who { margin-left: auto; padding: 6px 0; color: var(--muted); font-size: .9rem; }
nav .who a { padding: 0 0 0 8px; color: var(--accent); }
.takings { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; padding: 12px 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.stat .label { color: var(--muted); font-size: .85rem; }
.stat .value { font-size: 1.4rem; font-weight: 700; margin-top: 2px; }
.stat .value.pos { color: var(--ok); }
.stat .value.neg { color: var(--danger); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
table.list td.num, table.list th.num { text-align: right; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0 12px; align-items: end; }
.grid-form button { margin: 8px 0; }
.page-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.page-tabs button { background: transparent; color: var(--text); border: none; border-bottom: 3px solid transparent; border-radius: 0; }
.page-tabs button.active { border-bottom-color: var(--accent); color: var(--accent); font-weight: 600; }
.range { display: flex; flex-wrap: wrap; gap: 6px; align-items: end; margin-bottom: 16px; }
.range label { margin: 0; }
.range input { width: 160px; }
.tables-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.table-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.table-card h2 { display: flex; justify-content: space-between; align-items: center; }
.table-card.has-ready { border: 2px solid var(--ok); }
.order-block { border-top: 1px solid var(--border); padding-top: 8px; margin-top: 8px; }
.markup-good { color: var(--ok); font-weight: 600; }
.markup-low { color: var(--danger); font-weight: 600; }
.login-page main { max-width: 420px; padding-top: 10vh; }
.hint { font-size: .85rem; color: var(--muted); }
tr.clickable { cursor: pointer; }
tr.detail td { background: var(--bg); }

/* ---- Version 4: logo, brand header, poster slideshow ---- */
.brand-header { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--accent); color: var(--gold);
  border-bottom: 3px solid var(--gold); }
@media (prefers-color-scheme: dark) { .brand-header { background: var(--brand-dark); } }
.brand-mark { width: 72px; height: 72px; border-radius: 10px; flex: none; }
.brand-name { font-family: Georgia, "Times New Roman", serif; font-size: 1.7rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; line-height: 1.1; }
.brand-tagline { font-size: .95rem; color: #fff; opacity: .92; }
.brand-phone { font-size: .9rem; color: #fff; opacity: .92; }
.brand-phone a { color: var(--gold); font-weight: 600; }
@media (max-width: 500px) { .brand-mark { width: 56px; height: 56px; } .brand-name { font-size: 1.3rem; } }

.slider { position: relative; overflow: hidden; border-radius: 12px; margin: 4px 0 16px; background: #1a0d0a; }
.slides { display: flex; transition: transform .8s cubic-bezier(.65, 0, .35, 1); will-change: transform; }
.slides.no-anim { transition: none; }
@media (prefers-reduced-motion: reduce) { .slides { transition: none; } }
.slide { position: relative; flex: 0 0 100%; height: clamp(320px, 62vh, 600px); overflow: hidden; display: block; }
.slide-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(24px) brightness(.5); transform: scale(1.2); }
.slide-img { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; }
.slide-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; padding: 0; border-radius: 50%;
  font-size: 1.8rem; line-height: 1; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.4); color: #fff; }
.slide-arrow.prev { left: 10px; }
.slide-arrow.next { right: 10px; }
.slide-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.slide-dots button { width: 10px; height: 10px; padding: 0; border-radius: 50%; background: rgba(255,255,255,.45); border: none; }
.slide-dots button.active { background: var(--gold); }

.login-logo { display: block; width: 100%; max-width: 280px; margin: 0 auto 8px; border-radius: 10px; }
.login-page h1 { text-align: center; }
.login-page h1 + p { text-align: center; }

.poster-row { display: flex; gap: 14px; align-items: flex-start; }
.poster-thumb { width: 110px; height: 150px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.poster-fields { flex: 1; }
.poster-preview { display: block; max-width: 100%; max-height: 260px; margin: 8px auto; border-radius: 8px; }

/* ---- Version 5: pickup / delivery, activity log ---- */
.badge.delivery { background: #e6eefb; color: #1f4f99; }
@media (prefers-color-scheme: dark) { .badge.delivery { background: #1c2b45; color: #8db4f0; } }
fieldset.choice { border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; margin: 10px 0; }
fieldset.choice legend { font-size: .9rem; color: var(--muted); padding: 0 4px; }
fieldset.choice label.inline { margin: 6px 0; }
textarea { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px; resize: vertical; }
[hidden] { display: none !important; }
.delivery-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.delivery-card { margin: 0; }
.delivery-card .address { font-size: 1.1rem; font-weight: 600; margin: 8px 0 4px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.collect { padding: 8px 10px; border-radius: 6px; background: var(--ok-bg); color: var(--ok); }
.collect.due { background: var(--warn-bg); color: var(--warn); }
.gps-note { padding: 8px 10px; border-radius: 6px; background: var(--ok-bg); color: var(--ok); }
.gps-note.bad { background: var(--warn-bg); color: var(--warn); }
.handover { list-style: none; padding: 0; margin: 8px 0; }
.handover li { padding: 2px 0; color: var(--muted, #666); }
.handover li.done { color: var(--ok); font-weight: 600; }
.big-button { font-size: 1.15rem; padding: 12px 22px; }
.zone-list { display: grid; gap: 6px; margin: 6px 0 10px; }
.zone-list label { display: flex; gap: 8px; align-items: center; font-weight: normal; }
.zone-rows .row { margin-bottom: 6px; }
#track-map { height: 300px; border-radius: 8px; margin: 10px 0; z-index: 0; }
a.button { display: inline-block; padding: 8px 14px; border-radius: 6px; border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.badge.s-out_for_delivery { background: #e6eefb; color: #1f4f99; }

/* Phones: the menu stays pinned at the top. Name and log-out on one line, the screens in a
   single row underneath that you swipe sideways, so it never covers half the screen. */
@media (max-width: 800px) {
  nav { padding: 6px 10px; gap: 2px 4px; }
  nav .brand { font-size: .95rem; }
  nav .brand img { width: 26px; height: 26px; }
  nav .who { font-size: .8rem; white-space: nowrap; }
  nav .who-name { display: none; }
  .nav-links { order: 3; flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    -webkit-overflow-scrolling: touch; mask-image: linear-gradient(to right, #000 90%, transparent); }
  .nav-links::-webkit-scrollbar { display: none; }
}

/* Safety net: nothing may make the page scroll sideways on a phone or tablet, because that
   un-pins the top menu. 'clip' (unlike 'hidden') keeps the menu's sticky position working. */
html, body { overflow-x: clip; }

/* ---- Website look: centred banner, and a home page that fills a wide screen ---- */
.brand-header { justify-content: center; }
@media (min-width: 900px) {
  .brand-header { padding: 18px 24px; gap: 20px; }
  .brand-mark { width: 92px; height: 92px; }
  .brand-name { font-size: 2.3rem; }
  .brand-tagline { font-size: 1.05rem; }
}
.customer-home main { max-width: 1280px; padding: 20px 24px 40px; }
.customer-home .slide { height: clamp(340px, calc(100vh - 340px), 700px); }
.home-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.home-actions a { padding: 28px 24px; text-align: center; border-width: 2px; }
.home-actions a b { font-size: 1.5rem; margin-bottom: 4px; }
.home-actions a span { font-size: 1rem; }
.home-actions a:first-child { background: #a52218; border-color: #a52218; }
.home-actions a:first-child b, .home-actions a:first-child span { color: #fff; }
.home-actions a:first-child:hover { filter: brightness(1.08); }
@media (max-width: 500px) { .home-actions { grid-template-columns: 1fr; } }

/* ---- Footer and information pages (contact, privacy, refunds) ---- */
.site-footer { max-width: 1280px; margin: 24px auto 0; padding: 20px 16px 32px; border-top: 1px solid var(--border); text-align: center; color: var(--muted); font-size: .9rem; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; margin-bottom: 8px; padding: 0; background: none; border: 0; position: static; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }
.info-page { max-width: 760px; line-height: 1.6; }
.info-page h2 { margin-top: 28px; }
.info-page .updated { color: var(--muted); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }

.two-step-qr { display: flex; justify-content: center; margin: 12px 0; }
.two-step-qr img { background: #fff; padding: 8px; border-radius: 8px; }
.steps { padding-left: 20px; line-height: 1.5; }

/* Working without internet (offline.js) */
#offline-bar { padding: 8px 16px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#offline-bar.offline { background: #b42318; color: #fff; }
#offline-bar.waiting { background: #f9eeda; color: #5c3b00; }
#offline-bar button.plain { color: inherit; border-color: currentColor; padding: 4px 10px; }
#offline-bar ul { flex-basis: 100%; margin: 4px 0 0; padding-left: 18px; }
#offline-bar li { margin: 4px 0; }
.offline-choice { border: 2px solid #b42318; }

/* "Install the app" bar (common.js) */
#install-bar {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 1000;
  max-width: 560px; margin: 0 auto; padding: 10px 12px;
  display: flex; align-items: center; gap: 10px;
  background: var(--brand-dark); color: #fff; border: 2px solid var(--gold);
  border-radius: 12px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3); font-size: 14px; line-height: 1.35;
}
#install-bar img { border-radius: 8px; flex: none; }
#install-bar span { flex: 1; }
#install-bar #install-yes { background: var(--gold); color: var(--brand-dark); border: none; font-weight: 700; flex: none; }
#install-bar #install-no { color: #fff; border: none; font-size: 22px; padding: 2px 8px; flex: none; }

/* Receipt (printReceipt in common.js): hidden on screen, the only thing printed. */
#receipt { display: none; }
@media print {
  @page { size: 80mm auto; margin: 3mm; }
  body { background: #fff !important; }
  body > *:not(#receipt) { display: none !important; }
  #receipt { display: block; width: 72mm; margin: 0 auto; font: 12px/1.35 Arial, sans-serif; color: #000; text-align: center; }
  #receipt img { width: 22mm; height: auto; }
  #receipt h2 { font-size: 16px; margin: 2px 0; }
  #receipt p { margin: 2px 0; }
  #receipt hr { border: none; border-top: 1px dashed #000; margin: 6px 0; }
  #receipt table { width: 100%; border-collapse: collapse; text-align: left; }
  #receipt td { padding: 1px 0; vertical-align: top; }
  #receipt td + td { text-align: right; white-space: nowrap; padding-left: 6px; }
  #receipt tr.rc-total td { font-weight: 700; font-size: 14px; border-top: 1px solid #000; padding-top: 3px; }
  #receipt .paid { font-weight: 700; margin-top: 6px; }
  #receipt .rc-copy { break-after: page; page-break-after: always; }
  #receipt .rc-copy:last-child { break-after: auto; page-break-after: auto; }
  #receipt .rc-label { font-weight: 700; letter-spacing: 1px; border: 1px solid #000; padding: 2px 0; margin-bottom: 4px; }
}

/* Order sounds button (OrderSound in common.js), bottom left of staff screens. */
#sound-button {
  position: fixed; left: 12px; bottom: 12px; z-index: 900;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 14px; box-shadow: 0 2px 10px rgba(0, 0, 0, .15); font-size: 14px;
}
#sound-button.waiting { background: var(--accent); color: #fff; border-color: var(--accent); animation: sound-pulse 1.6s infinite; }
@keyframes sound-pulse { 50% { transform: scale(1.06); } }
@media print { #sound-button { display: none !important; } }
/* The customer's "your order is ready" banner on the order page. */
.ready-alert { background: var(--ok); color: #fff; font-size: 20px; font-weight: 700; text-align: center;
  padding: 16px; border-radius: 12px; margin: 12px 0; animation: sound-pulse 1.2s 4; }

/* Customer reviews */
.stars { color: #d99a00; letter-spacing: 1px; white-space: nowrap; }
.stars-off { color: #d6d0c4; }
.reviews-box { margin-top: 24px; }
.review-average { font-size: 18px; }
.review-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.review { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.review p { margin: 6px 0 0; }
.review-reply { background: var(--bg); border-left: 3px solid var(--accent); padding: 6px 10px; border-radius: 6px; font-size: 14px; }
.star-picker { display: flex; gap: 4px; font-size: 40px; line-height: 1; }
.star-picker button { background: none; border: none; padding: 0 2px; color: #d6d0c4; font-size: inherit; cursor: pointer; }
.star-picker button.on { color: #d99a00; }

/* Big on-screen alerts (bigAlert in common.js) */
#big-alerts { position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 12px; padding: 16px; background: rgba(0, 0, 0, .55); }
#big-alerts:empty { display: none; }
.big-alert { width: min(640px, 100%); border: 4px solid var(--gold); border-radius: 18px; padding: 24px 20px;
  color: #fff; display: flex; flex-direction: column; gap: 8px; text-align: center; cursor: pointer;
  animation: sound-pulse 1.2s 6; box-shadow: 0 10px 40px rgba(0, 0, 0, .4); }
.big-alert.new { background: var(--accent); }
.big-alert.ready { background: var(--ok); }
.big-alert b { font-size: clamp(32px, 8vw, 56px); line-height: 1.1; text-transform: uppercase; letter-spacing: 1px; }
.big-alert span { font-size: clamp(18px, 4.5vw, 26px); }
.big-alert small { opacity: .8; font-size: 14px; }
@media print { #big-alerts { display: none !important; } }

/* Daily Count screen */
.big-number { font-size: 1.3rem; }
.choose-list { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 10px; }
#rows input[data-notes] { margin-top: 4px; min-width: 140px; }
/* On a phone each item becomes a small card, so "Should Be Left" is always in view. */
@media (max-width: 700px) {
  #count-table, #count-table tbody, #count-table tr, #count-table td { display: block; width: 100%; }
  #count-table thead { display: none; }
  #count-table tr { border-bottom: 2px solid var(--border); padding: 6px 0; }
  #count-table td { border: 0; padding: 4px 10px; text-align: left; }
  #count-table td[data-label] { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
  #count-table td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: .8rem; text-transform: uppercase; }
  #count-table td[data-label]:empty { display: none; }
  #count-table td[data-label] br { display: none; }
}
.cat-off{display:none!important}
/* Home page: screens grouped into columns (Orders, Money, Food and Stock, Admin). */
.hub-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; align-items: start; }
.hub-group h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; }
.hub-group .hub { grid-template-columns: 1fr; gap: 10px; }
.hub-group .hub a { padding: 14px 16px; }
/* Top menu grouped like the Home page: group name above, a line between groups. */
.nav-links { align-items: flex-end; row-gap: 6px; }
.nav-group { display: flex; flex-direction: column; padding: 0 6px; border-left: 1px solid var(--border); }
.nav-group.nav-home { border-left: 0; padding-left: 0; }
.nav-group-name { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 0 10px 2px; white-space: nowrap; }
.nav-group-links { display: flex; gap: 2px; }
@media (max-width: 600px) { .nav-group-name { font-size: .62rem; } .nav-group { padding: 0 3px; } }
/* Tablets: the four groups as a 2 x 2 block (not 3 + 1). Phones: groups stacked, two tiles across. */
@media (min-width: 601px) and (max-width: 1099px) { .hub-groups { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) {
  .hub-groups { grid-template-columns: 1fr; gap: 14px; }
  .hub-group .hub { grid-template-columns: 1fr 1fr; gap: 8px; }
  .hub-group .hub a { padding: 10px 12px; }
  .hub-group .hub b { font-size: 1rem; }
  .hub-group .hub span { font-size: .8rem; }
}
/* ☰ menu: phones and tablets get one button that drops down the grouped list of screens. */
.menu-btn, .nav-menu { display: none; }
@media (max-width: 1099px) {
  nav { position: sticky; }
  nav .nav-links { display: none; }
  .menu-btn { display: inline-flex; align-items: center; gap: 8px; order: 2; margin-left: 8px; padding: 6px 12px; border-radius: 8px;
    border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
  .menu-btn .menu-icon { font-size: 1.2rem; line-height: 1; }
  .menu-btn.open { background: var(--accent); border-color: var(--accent); color: #fff; }
  .nav-menu:not([hidden]) { display: block; position: absolute; left: 0; right: 0; top: 100%; z-index: 60; max-height: calc(100vh - 70px); overflow-y: auto;
    background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: 0 10px 24px rgba(0,0,0,.25); padding: 12px 16px 16px; }
  .nav-menu > a { display: inline-block; margin-bottom: 6px; }
  .nav-menu-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px 20px; }
  .nav-menu section { display: flex; flex-direction: column; border-top: 1px solid var(--border); padding-top: 8px; }
  .nav-menu h3 { margin: 0 0 4px; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
  .nav-menu a { padding: 9px 10px; }
  .nav-menu a:not(.active):hover { background: var(--bg); }
}
@media (max-width: 600px) { .menu-btn { order: 3; margin-left: 0; } }
.map-emoji { font-size: 26px; line-height: 32px; text-align: center; background: none; border: none; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.hint.danger-text { color: var(--danger); }
.driver-pick { display: block; margin: .4rem 0; }
