/* Tajer app styles. Brand: "Cedar ledger" (Tajer design system, chosen by Fahd 22 Nov 2026):
   cedar green, limestone ground, saffron for "now", pomegranate for late; Schibsted Grotesk ExtraBold
   for titles and lead numbers, Figtree for everything people read and tap; lists are ledgers, settled
   totals get the ledger double rule. Redesign 5 Dec 2026: built for computers first (dense tables,
   page headers, side panels), still simple on phones; light, dark or automatic. */
[hidden] { display: none !important; }

@font-face { font-family: Figtree; font-weight: 400; font-display: swap; src: url(fonts/figtree-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: Figtree; font-weight: 500; font-display: swap; src: url(fonts/figtree-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: Figtree; font-weight: 600; font-display: swap; src: url(fonts/figtree-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: Figtree; font-weight: 700 900; font-display: swap; src: url(fonts/figtree-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 800; font-display: swap; src: url(fonts/schibsted-grotesk-latin-800-normal.woff2) format("woff2"); }

/* ---------- tokens ---------- */
:root {
  color-scheme: light;
  --bg: #EEF0EC;          /* limestone */
  --card: #FFFFFF;        /* paper */
  --raise: #F7F8F5;       /* hover and table heads */
  --ink: #17231F; --mut: #5E6B66;
  --rule: #D7DBD5; --rule-soft: #E7EAE5; --line: #87938C;
  --ce: #0B5D47; --ced: #074A39; --cel: #E2EFE9; --ce-ink: #0B5D47; --on-ce: #FFFFFF;
  --sa: #F0A202; --sal: #FDEBC4; --sad: #6B4600;
  --po: #B23A2E; --pol: #FBE7E4;
  --wa: #1B6B3D; --wal: #E3F4E8;
  --scrim: rgba(16,26,22,.42);
  --sh-up: 0 18px 48px rgba(23,35,31,.16), 0 2px 6px rgba(23,35,31,.06);
  --ui: Figtree, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Schibsted Grotesk", Figtree, system-ui, sans-serif;
  --ease: cubic-bezier(.2,.8,.2,1);
  --hdr: 56px; --nav-b: 0px; --side: 0px;
}
/* dark: same brand, read at night in the office or the van */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0E1512; --card: #151E1A; --raise: #1B2621;
  --ink: #E6ECE8; --mut: #9AA7A1;
  --rule: #26322C; --rule-soft: #1F2925; --line: #5D6B64;
  --ce: #13785C; --ced: #0F664E; --cel: #17332A; --ce-ink: #5CC79D; --on-ce: #FFFFFF;
  --sa: #F0A202; --sal: #3A2C0B; --sad: #F4C35A;
  --po: #F08A7E; --pol: #3A1C19;
  --wa: #5CC48A; --wal: #15301F;
  --scrim: rgba(0,0,0,.55);
  --sh-up: 0 18px 48px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.04);
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 var(--ui); -webkit-font-smoothing: antialiased; }
@media (min-width: 960px) { html, body { font-size: 15px; } }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--ce-ink); }
::selection { background: var(--sal); color: var(--ink); }
:focus-visible { outline: 2.5px solid var(--sa); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }

/* ---------- frame: top bar, places (bottom bar on phones, sidebar on computers) ---------- */
body[data-side="supplier"], body[data-side="cafe"], body[data-side="admin"] { --nav-b: calc(62px + env(safe-area-inset-bottom)); }
@media (min-width: 960px) { body[data-side="supplier"], body[data-side="cafe"], body[data-side="admin"] { --nav-b: 0px; --side: 224px; } }
body { padding-top: calc(var(--hdr) + env(safe-area-inset-top)); padding-left: var(--side); }

.top { position: fixed; top: 0; left: 0; right: 0; z-index: 8; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  height: calc(var(--hdr) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 16px 0; background: var(--card); border-bottom: 1px solid var(--rule); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo { width: 30px; height: 30px; border-radius: 8px; flex: none; }
.wordmark { font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: -.035em; color: var(--ce-ink); text-transform: lowercase; }
.biz { color: var(--ink); font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 12px; border-left: 1px solid var(--rule); }
.biz:empty { display: none; }
.demo-badge { padding: 2px 8px; border-radius: 6px; background: var(--sal); color: var(--sad); font-size: 12.5px; font-weight: 700; }
.top-act { display: flex; gap: 6px; align-items: center; }
.top .btn.sm { flex: none; }
#themeBtn { width: 36px; padding: 0; }
#themeBtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
#helpBtn .q { display: none; font-weight: 800; }
@media (max-width: 560px) {
  #helpBtn .hw { display: none; } #helpBtn .q { display: inline; } #helpBtn { width: 36px; padding-left: 0; padding-right: 0; }
  .top .biz { max-width: 28vw; } .wordmark { display: none; }
  #modeBtn { max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

.nav { position: fixed; z-index: 7; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around;
  padding: 6px 6px calc(4px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--rule); }
.nav button { flex: 1; max-width: 120px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 2px 0;
  border: 0; background: none; color: var(--mut); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.nav .ic { position: relative; display: grid; place-items: center; width: 56px; height: 30px; border-radius: 999px; }
.nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.nav .lb { font-size: 12px; font-weight: 600; }
.nav button.on { color: var(--ce-ink); }
.nav button.on .ic { background: var(--cel); }
.count { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: var(--po); color: #fff; font-size: 11.5px; font-weight: 700; font-style: normal; line-height: 1; font-variant-numeric: tabular-nums; }
:root[data-theme="dark"] .count { background: #C9473A; }
.nav .count { position: absolute; top: -3px; left: 34px; box-shadow: 0 0 0 2px var(--card); }
@media (min-width: 960px) {
  .nav { top: calc(var(--hdr) + env(safe-area-inset-top)); right: auto; width: var(--side); flex-direction: column; justify-content: flex-start;
    gap: 1px; padding: 14px 10px; background: var(--bg); border-top: 0; border-right: 1px solid var(--rule); }
  .nav button { max-width: none; flex: none; flex-direction: row; justify-content: flex-start; gap: 11px; padding: 8px 10px; border-radius: 8px; color: var(--ink); }
  .nav button:hover { background: var(--rule-soft); }
  .nav .ic { display: contents; }
  .nav svg { width: 20px; height: 20px; color: var(--mut); }
  .nav .lb { font-size: 14.5px; font-weight: 600; }
  .nav button.on { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule); }
  .nav button.on svg { color: var(--ce-ink); }
  .nav .count { position: static; margin-left: auto; box-shadow: none; order: 3; }
}

/* screens inside one place (Orders | Vans): underline tabs */
.subnav { position: sticky; top: calc(var(--hdr) + env(safe-area-inset-top)); z-index: 6; padding: 0 16px; background: var(--bg); border-bottom: 1px solid var(--rule); }
.segbar { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; }
.segbar button { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 13px 1px 11px; border: 0; border-bottom: 2px solid transparent;
  margin-bottom: -1px; background: none; color: var(--mut); font-weight: 600; font-size: 15px; cursor: pointer; white-space: nowrap; }
.segbar button:hover { color: var(--ink); }
.segbar button.on { color: var(--ink); border-bottom-color: var(--ce-ink); }
.segbar .count { min-width: 18px; height: 18px; font-size: 11px; }
@media (min-width: 960px) { .subnav { padding: 0 32px; } }

/* ---------- page ---------- */
main#view { max-width: 760px; margin: 0 auto; padding: 18px 16px calc(100px + var(--nav-b)); }
@media (min-width: 960px) { main#view { max-width: 1240px; margin: 0; padding: 26px 32px 90px; } }
@media (min-width: 960px) { body[data-side=""] main#view, body:not([data-side]) main#view { margin: 0 auto; } } /* signed out or setting up: no side menu, so centre the page */
main#view.enter { animation: fade .18s ease; }
.loading { color: var(--mut); padding: 40px 0; text-align: center; }
h1 { font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1.1; letter-spacing: -.02em; margin: 4px 0 18px; }
h2 { font-size: 17px; font-weight: 700; margin: 30px 0 10px; }
h2 .muted, h2 small { font-weight: 500; font-size: 14px; }
@media (min-width: 960px) { h1 { font-size: 30px; } h2 { font-size: 16px; } }
p.sub { color: var(--mut); margin: -10px 0 18px; font-size: 15px; max-width: 70ch; }
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin: 4px 0 18px; }
.ph h1 { margin: 0; }
.ph .ph-act { display: flex; gap: 8px; flex-wrap: wrap; }
.ph + p.sub { margin-top: -8px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.muted { color: var(--mut); }
.small { font-size: 14px; }
.mono { font-variant-numeric: tabular-nums; }
.grow { flex: 1; min-width: 0; }

/* ---------- ledgers: lists of rows on paper ---------- */
.card { background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.card .foot { padding: 10px 14px; font-size: 14px; color: var(--mut); border-top: 1px solid var(--rule-soft); }
.list { display: grid; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; }
.list:has(> .empty:only-child) { background: none; border: 0; }
.item { display: flex; gap: 14px; align-items: center; padding: 13px 16px; background: var(--card); cursor: pointer; position: relative; }
.list > .item + .item { border-top: 1px solid var(--rule-soft); }
@media (hover: hover) { .list > .item:hover { background: var(--raise); } }
.item .grow { flex: 1; min-width: 0; }
.item .title { font-weight: 700; }
.item .meta { color: var(--mut); font-size: 14px; margin-top: 2px; }
.item .meta.late { color: var(--po); font-weight: 600; }
.item .price { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.item .amt { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.item.off { opacity: .55; }
.chev { color: var(--line); font-size: 22px; line-height: 1; }
/* no initials circles: the name is enough. Problems and late money keep a small marker. */
.avatar { display: none; }
.avatar.warnav { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; flex: none; background: var(--pol); color: var(--po); font-weight: 800; font-size: 13px; }
.empty { text-align: center; padding: 34px 18px; color: var(--mut); background: var(--card); border: 1px dashed var(--rule); border-radius: 12px; }
.empty strong { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.calm { color: var(--mut); background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 18px; margin-top: 16px; }

/* status: a word with a small mark, never colour alone */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; background: var(--raise); color: var(--ink); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--line); flex: none; }
.pill.green { background: var(--cel); color: var(--ce-ink); } .pill.green::before { background: var(--ce-ink); }
.pill.amber { background: var(--sal); color: var(--sad); } .pill.amber::before { background: var(--sa); }
.pill.red { background: var(--pol); color: var(--po); } .pill.red::before { background: var(--po); }
.pill.grey { color: var(--mut); }
.tag { font-size: 13px; padding: 2px 8px; border-radius: 6px; background: var(--raise); border: 1px solid var(--rule); white-space: nowrap; }
.tag.soft { color: var(--mut); background: transparent; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 18px; border-radius: 10px;
  border: 0; background: var(--ce); color: var(--on-ce); font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .12s; }
.btn:hover { background: var(--ced); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover { background: var(--raise); }
.btn.wa { background: #25D366; color: #08321A; }
.btn.danger { background: var(--pol); color: var(--po); }
.btn.block { width: 100%; }
.btn.sm { min-height: 34px; padding: 6px 12px; font-size: 14px; border-radius: 8px; }
@media (min-width: 960px) { .btn { min-height: 38px; padding: 8px 16px; font-size: 14.5px; } .btn.sm { min-height: 32px; } }
.link { background: none; border: 0; color: var(--ce-ink); font-weight: 600; cursor: pointer; padding: 4px; }
button.icon { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); font-weight: 800; cursor: pointer; color: var(--ce-ink); }
button.icon:disabled { opacity: .35; cursor: default; }

/* ---------- forms ---------- */
label.f { display: block; margin-bottom: 14px; }
label.f > span { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 5px; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=tel], input[type=number], input[type=time], input[type=date], select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); outline: none; min-height: 44px; }
@media (min-width: 960px) { input[type=text], input[type=email], input[type=password], input[type=search], input[type=tel], input[type=number], input[type=time], input[type=date], select { min-height: 38px; padding: 8px 11px; } }
input:focus, select:focus, textarea:focus { border-color: var(--ce-ink); box-shadow: 0 0 0 3px var(--cel); }
textarea { resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.code { letter-spacing: 8px; font-size: 24px; text-align: center; font-variant-numeric: tabular-nums; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; margin: 6px 0 18px; }
.check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--ce); flex: none; }
.seg { display: inline-flex; background: var(--raise); border: 1px solid var(--rule); border-radius: 10px; padding: 3px; gap: 3px; margin: 10px 0; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 7px; cursor: pointer; font-weight: 600; color: var(--mut); }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 0 0 1px var(--rule), 0 1px 2px rgba(0,0,0,.06); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips.scroll .chip { flex: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--rule); background: var(--card); cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink); }
.chip:hover { border-color: var(--line); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip b { font-weight: 700; color: inherit; opacity: .7; font-variant-numeric: tabular-nums; }
.chip .x { margin-left: 2px; opacity: .7; }
.chip.day { display: flex; flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.25; }
.chip.day small { font-weight: 500; opacity: .75; font-size: 12px; }
.hint { font-size: 14px; color: var(--mut); margin-top: 5px; }
.err { background: var(--pol); color: var(--po); padding: 10px 13px; border-radius: 10px; margin-bottom: 14px; font-size: 15px; }
.warn { background: var(--sal); color: var(--sad); padding: 10px 13px; border-radius: 10px; margin: 0 0 14px; font-size: 15px; }
.note { background: var(--card); border: 1px solid var(--rule); border-left: 3px solid var(--sa); padding: 9px 12px; border-radius: 8px; margin-bottom: 12px; font-size: 15px; }
.f.search { margin: 0 0 12px; }
.f.search input { padding-left: 36px; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2387938C' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m16 16 4.5 4.5'/%3E%3C/svg%3E") no-repeat 11px 50% / 17px; }

/* ---------- tables: the ledger on computers ---------- */
table { width: 100%; border-collapse: collapse; background: var(--card); font-size: 14.5px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--rule-soft); vertical-align: middle; }
th { font-size: 13px; font-weight: 600; color: var(--mut); background: var(--raise); white-space: nowrap; border-bottom-color: var(--rule); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td .sm2, td .small { font-size: 13.5px; color: var(--mut); }
td input { padding: 6px 9px; width: 100px; text-align: right; min-height: 34px; }
tr:last-child td { border-bottom: 0; }
tr.tap { cursor: pointer; }
@media (hover: hover) { tr.tap:hover td { background: var(--raise); } }
/* the ledger double rule under a settled total */
tr.tot td { font-weight: 800; border-top: 0; border-bottom: 0; background-image: linear-gradient(var(--ink), var(--ink)), linear-gradient(var(--ink), var(--ink));
  background-size: 100% 2px, 100% 2px; background-position: 0 0, 0 4px; background-repeat: no-repeat; padding-top: 14px; }
.dbl { display: block; height: 6px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; }
.tbl-wrap { background: var(--card); border: 1px solid var(--rule); border-radius: 12px; overflow: auto; }
.tbl-wrap table { min-width: 100%; }
td .t { font-weight: 700; }
td .s { color: var(--mut); font-size: 13.5px; margin-top: 1px; }
td.act { text-align: right; white-space: nowrap; width: 1%; }
td.act .btn + .btn { margin-left: 6px; }
/* phones: table rows stack into ledger rows */
@media (max-width: 720px) {
  table.rt, table.rt tbody, table.rt tr, table.rt td { display: block; width: 100%; }
  table.rt thead, table.rt tr.h { display: none; }
  table.rt tr { padding: 12px 14px; border-bottom: 1px solid var(--rule-soft); display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; }
  table.rt tr:last-child { border-bottom: 0; }
  table.rt td { padding: 0; border: 0; background: none !important; }
  table.rt td:first-child { grid-column: 1; }
  table.rt td.num { grid-column: 2; grid-row: 1; font-weight: 700; }
  table.rt td.hide-s { display: none; }
  table.rt td.act { grid-column: 1 / -1; text-align: left; margin-top: 8px; }
  table.rt td.meta-s { grid-column: 1; color: var(--mut); font-size: 14px; }
}

/* ---------- stat strip (Today, Money, Reports) ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--card); border: 1px solid var(--rule); border-radius: 12px; margin: 0 0 4px; overflow: hidden; }
.tiles.three { grid-template-columns: repeat(3, 1fr); }
.tiles.two { grid-template-columns: 1fr 1fr; }
.tile { position: relative; border: 0; background: none; padding: 14px 18px 15px; text-align: left; display: flex; flex-direction: column; gap: 3px; font: inherit; color: inherit; border-left: 1px solid var(--rule-soft); }
.tile:first-child { border-left: 0; }
button.tile { cursor: pointer; }
@media (hover: hover) { button.tile:hover { background: var(--raise); } }
.tile .n { order: 2; font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tile .n small { font-family: var(--ui); font-size: 14px; font-weight: 600; letter-spacing: 0; }
.tile .w { order: 1; color: var(--mut); font-size: 14px; font-weight: 600; }
.tile .w .chg { display: block; margin: 2px 0 0; }
.tile.hot::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--sa); }
.tile.hot .w { color: var(--ink); }
@media (max-width: 720px) {
  .tiles { grid-template-columns: 1fr 1fr; }
  .tile:nth-child(3) { border-left: 0; }
  .tile:nth-child(n+3) { border-top: 1px solid var(--rule-soft); }
  .tiles.three .tile:nth-child(3) { grid-column: 1 / -1; }
  .tile .n { font-size: 24px; }
}

/* ---------- sheets: a bottom sheet on phones, a side panel on computers ---------- */
.sheet-bg { position: fixed; inset: 0; background: var(--scrim); z-index: 20; animation: fade .18s ease; }
.sheet { position: fixed; z-index: 21; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow: auto; background: var(--bg);
  border-radius: 18px 18px 0 0; padding: 26px 18px 28px; box-shadow: var(--sh-up); animation: up .28s var(--ease); }
.sheet::before { content: ""; position: absolute; top: 8px; left: 50%; width: 38px; height: 5px; margin-left: -19px; border-radius: 9px; background: var(--rule); }
.sheet h3 { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -.01em; line-height: 1.15; margin: 0 0 16px; padding-right: 36px; }
.sheet .actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.sheet .actions .btn { flex: 1; }
.sheet-x { position: absolute; top: 16px; right: 14px; width: 34px; height: 34px; border-radius: 8px; border: 0; background: none; color: var(--mut); cursor: pointer; display: none; place-items: center; font-size: 22px; line-height: 1; }
.sheet-x:hover { background: var(--raise); color: var(--ink); }
@media (min-width: 760px) {
  .sheet { left: auto; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); max-height: none; border-radius: 0; padding: 24px 26px 32px;
    border-left: 1px solid var(--rule); animation: slide .24s var(--ease); }
  .sheet.wide { width: min(860px, 100vw); }
  .sheet::before { display: none; }
  .sheet-x { display: grid; }
  .sheet .actions { position: sticky; bottom: -32px; background: var(--bg); padding: 12px 0 16px; margin-bottom: -16px; }
}
@keyframes up { from { transform: translateY(30%); opacity: .5; } to { transform: none; opacity: 1; } }
@keyframes slide { from { transform: translateX(32px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { transform: translate(-50%, 8px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* an order is a slip: paper with a perforated top edge */
.slip { position: relative; background: var(--card); border-radius: 0 0 10px 10px; padding: 18px 16px 14px; margin-top: 10px; border: 1px solid var(--rule); border-top: 0; }
.slip::before { content: ""; position: absolute; left: -1px; right: -1px; top: -7px; height: 8px;
  background: radial-gradient(circle at 6px 0, transparent 4.5px, var(--card) 5px) 0 0 / 12px 8px repeat-x; }

.toast { position: fixed; left: calc(50% + var(--side) / 2); bottom: calc(22px + var(--nav-b)); transform: translateX(-50%); background: var(--ink); color: var(--bg);
  padding: 11px 18px; border-radius: 10px; z-index: 30; font-weight: 600; box-shadow: var(--sh-up); animation: pop .22s var(--ease); max-width: calc(100% - 32px); }
.toast.bad { background: var(--po); color: #fff; }

@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } h1 { font-size: 26px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- sign-in and first setup ---------- */
.auth { max-width: 420px; margin: 6vh auto 0; }
.auth .card { padding: 26px; }
.setup { margin: 0 0 18px; }
.setup .bar { height: 6px; background: var(--rule-soft); border-radius: 9px; margin: 10px 0 8px; overflow: hidden; }
.setup .bar i { display: block; height: 100%; background: var(--ce-ink); border-radius: 9px; }
.step { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 2px; border: 0; background: none; text-align: left; cursor: pointer; font-weight: 600; }
.step:disabled { cursor: default; }
.step.done { color: var(--mut); font-weight: 500; text-decoration: line-through; }
.step .tick { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--raise); border: 1px solid var(--rule); font-size: 13px; flex: none; }
.step.done .tick { background: var(--cel); color: var(--ce-ink); border-color: transparent; }
.step .chev { margin-left: auto; }
.alerts-card { margin: 0 0 16px; }
.alerts-card strong { display: block; margin-bottom: 4px; }
.demo-try { border-color: var(--sa); }
.demo-card { margin-top: 24px; }
.fee-card { margin-top: 18px; }
.fee-card .small { margin-top: 4px; line-height: 1.45; }

/* ---------- cafe ordering ---------- */
.again { display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; gap: 12px; border: 1px solid var(--rule);
  background: var(--card); border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; cursor: pointer; font: inherit; color: inherit; }
.again:hover { border-color: var(--line); }
.prod .shelf { display: inline-block; margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--ce-ink); }
.shelf-t { color: var(--ce-ink); }
.prod.in { background: var(--cel); }
.prod.in::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--ce-ink); }
.buy { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.buy .price { font-weight: 700; font-variant-numeric: tabular-nums; }
.buy .vat { font-size: 12px; color: var(--mut); font-weight: 600; margin-left: 3px; }
.stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.stepper button { width: 40px; height: 40px; border: 0; background: none; font-size: 20px; font-weight: 700; color: var(--ce-ink); cursor: pointer; }
.stepper .q { width: 46px; min-height: 0; padding: 6px 2px; text-align: center; border: 0; background: transparent; font-weight: 700; box-shadow: none; font-variant-numeric: tabular-nums; }
.stepper .q::-webkit-inner-spin-button { -webkit-appearance: none; }
@media (min-width: 960px) { .stepper button { width: 34px; height: 34px; } }
.cartbar { position: fixed; left: calc(50% + var(--side) / 2); transform: translateX(-50%); bottom: calc(14px + var(--nav-b)); width: min(560px, calc(100% - 24px - var(--side))); z-index: 7;
  background: var(--ink); color: var(--bg); border-radius: 14px; padding: 10px 10px 10px 18px; display: flex; justify-content: space-between;
  align-items: center; gap: 12px; box-shadow: var(--sh-up); }
.cartbar .muted { color: inherit; opacity: .72; }
.cartbar .btn { background: var(--sa); color: #2A1B00; }
.big-tick { width: 64px; height: 64px; border-radius: 50%; background: var(--cel); color: var(--ce-ink); display: grid; place-items: center;
  font-size: 30px; font-weight: 800; margin: 4px auto 10px; }
.track { display: flex; gap: 4px; margin-top: 8px; }
.track span { flex: 1; font-size: 12px; color: var(--mut); border-top: 3px solid var(--rule); padding-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track span.on { color: var(--ce-ink); border-color: var(--ce-ink); font-weight: 700; }
.track span.now { border-color: var(--sa); color: var(--ink); font-weight: 700; }

/* cafe on a computer: suppliers | products | basket */
.shop { display: block; }
.shop-side, .basket { display: none; }
@media (min-width: 1100px) {
  body[data-side="cafe"] main#view.shopping { max-width: none; }
  .shop { display: grid; grid-template-columns: 220px minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
  .shop-side { display: block; position: sticky; top: calc(var(--hdr) + 70px); }
  .shop-side h4, .basket h4 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--mut); }
  .shop-side button { display: block; width: 100%; text-align: left; padding: 9px 10px; border: 0; border-radius: 8px; background: none; cursor: pointer; font-weight: 600; color: var(--ink); }
  .shop-side button small { display: block; font-weight: 500; color: var(--mut); font-size: 13px; }
  .shop-side button:hover { background: var(--rule-soft); }
  .shop-side button.on { background: var(--card); box-shadow: inset 0 0 0 1px var(--rule); }
  .basket { display: block; position: sticky; top: calc(var(--hdr) + 70px); background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 16px; }
  .basket .bl { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--rule-soft); font-size: 14.5px; }
  .basket .bl span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
  .basket .btot { display: flex; justify-content: space-between; font-weight: 800; font-size: 17px; margin-top: 12px; padding-bottom: 8px; }
  .basket .btot + .dbl { color: var(--ink); margin-bottom: 14px; }
  .basket .empty-b { color: var(--mut); font-size: 14.5px; padding: 6px 0 2px; }
  body[data-side="cafe"] .cartbar.has-basket { display: none; }
  .shop .prods table td.q { width: 150px; }
}

/* ---------- vans and the driver view ---------- */
.plan-cta { margin-top: 14px; border-left: 3px solid var(--sa); }
.card.van { margin-top: 14px; }
.van .bar, .drv-bar { height: 6px; background: var(--rule-soft); border-radius: 9px; margin: 10px 0 4px; overflow: hidden; }
.van .bar i, .drv-bar i { display: block; height: 100%; background: var(--ce-ink); border-radius: 9px; transition: width .3s; }
.van-name { font-size: 16px; }
.van-in { max-width: 220px; font-weight: 700; }
.van-actions { margin-top: 12px; justify-content: flex-end; flex-wrap: wrap; }
.van-now { color: var(--ce-ink); font-weight: 700; }
ol.stops { list-style: none; margin: 10px 0 0; padding: 0; }
ol.stops li { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-top: 1px solid var(--rule-soft); cursor: pointer; }
ol.stops li .grow { flex: 1; min-width: 0; }
ol.stops.edit li { cursor: default; flex-wrap: wrap; }
ol.stops.edit li .grow { flex: 1 1 calc(100% - 40px); }
ol.stops.edit .ctl { display: flex; gap: 6px; align-items: center; justify-content: flex-end; width: 100%; padding-left: 36px; }
ol.stops.edit .ctl select.mv { margin-left: auto; }
.seq { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--cel); color: var(--ce-ink); font-weight: 800; font-size: 13px; flex: none; font-variant-numeric: tabular-nums; }
.seq.big { width: 36px; height: 36px; font-size: 15px; }
.seq.huge { width: 48px; height: 48px; font-size: 22px; background: var(--ce); color: var(--on-ce); }
select.mv { width: auto; padding: 6px 8px; font-size: 14px; min-height: 34px; }
.plan-bar .stepper .q { display: inline-block; text-align: center; padding: 6px 4px; }
.sticky-actions { position: sticky; bottom: calc(10px + var(--nav-b)); display: flex; gap: 10px; margin-top: 16px; background: var(--bg); padding: 8px 0; flex-wrap: wrap; }
.sticky-actions .btn { flex: 1; }
.drv-head { margin-top: -6px; }
.drv-stop { margin-top: 14px; border: 2px solid var(--ce-ink); }
.drv-stop .btn.big-go { margin-top: 10px; padding: 16px; font-size: 17px; }
.drv-stop .actions { display: flex; gap: 10px; margin-top: 10px; }
.drv-stop .actions .btn { flex: 1; }
.drv-done { margin-top: 18px; }
.inv-line { margin-top: 12px; }
@media (min-width: 960px) { .vans-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; } .vans-grid .card.van { margin-top: 0; } }

/* ---------- money ---------- */
.stmt { overflow-x: auto; }
.stmt table td, .stmt table th { white-space: nowrap; }
.stmt table td:nth-child(2) { white-space: normal; }
.cash-box { margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--raise); border: 1px solid var(--rule-soft); }
.cash-box .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cash-box .f { margin: 0; }
.diff { font-weight: 700; margin-top: 6px; }
.diff.ok { color: var(--ce-ink); }
.diff.bad { color: var(--po); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.card.export { margin-top: 26px; }

/* ---------- reports and charts ---------- */
.chg { display: inline-block; margin-left: 4px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chg.up { color: var(--ce-ink); }
.chg.down { color: var(--po); }
.chg.flat { color: var(--mut); font-weight: 500; }
.chart { position: relative; display: grid; grid-template-columns: 48px 1fr; grid-template-rows: 180px auto; column-gap: 8px; }
.ch-grid { grid-column: 1 / 3; grid-row: 1; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.ch-grid span { position: relative; height: 0; border-top: 1px solid var(--rule-soft); }
.ch-grid span:last-child { border-top-color: var(--line); }
.ch-grid i { position: absolute; left: 0; top: -8px; font-style: normal; font-size: 12px; color: var(--mut); background: var(--card); padding-right: 4px; font-variant-numeric: tabular-nums; }
.ch-bars { grid-column: 2; grid-row: 1; display: flex; align-items: flex-end; gap: 2px; height: 180px; }
.ch-bar { flex: 1; height: 100%; display: flex; align-items: flex-end; padding: 0; border: 0; background: none; cursor: pointer; min-width: 0; }
.ch-bar i { display: block; width: 100%; max-width: 22px; margin: 0 auto; background: var(--ce); border-radius: 4px 4px 0 0; }
.ch-bar:hover i, .ch-bar.on i { background: var(--ce-ink); outline: 2px solid var(--sa); outline-offset: 1px; }
.ch-x { grid-column: 2; grid-row: 2; display: flex; justify-content: space-between; font-size: 12px; color: var(--mut); padding-top: 6px; }
.ch-tip { position: absolute; z-index: 40; background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 8px; pointer-events: none; white-space: nowrap; box-shadow: var(--sh-up); }
.list.rank .item { cursor: default; padding: 11px 16px; }
.share { height: 6px; background: var(--rule-soft); border-radius: 4px; margin: 7px 0 5px; overflow: hidden; }
.share i { display: block; height: 100%; background: var(--ce-ink); border-radius: 4px; opacity: .8; }
.link.more { margin-top: 8px; }

/* ---------- find suppliers (cafe) ---------- */
#exCats { margin-bottom: 14px; }
.sup-grid { display: grid; gap: 12px; }
@media (min-width: 960px) { .sup-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); } }
.sup-card { cursor: pointer; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.sup-card:hover { border-color: var(--line); }
.sup-card .title { font-weight: 700; }
.sup-card .meta { color: var(--mut); font-size: 14px; }
.sc-prods { display: flex; flex-wrap: wrap; gap: 6px; }
.invite-sup { display: flex; gap: 12px; align-items: center; margin-top: 16px; }
.invite-sup .grow { flex: 1; }
.sc-head { display: flex; gap: 12px; align-items: center; }
.sc-head .grow { flex: 1; min-width: 0; }
.sc-head > .btn, .sc-head > .pill { flex: none; white-space: nowrap; }

/* ---------- photos ---------- */
.photo-th { display: inline-block; width: 72px; height: 72px; padding: 0; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; background: var(--raise); cursor: zoom-in; vertical-align: middle; }
.photo-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-th.none { display: none; }
.photo-full { position: fixed; inset: 0; z-index: 200; background: rgba(10,14,12,.9); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 20px; }
.photo-full img { max-width: 100%; max-height: calc(100% - 70px); border-radius: 10px; }
.photo-full .btn { background: #fff; color: #17231F; }
.photo-pick { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.photo-pick .prev img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; display: block; }
.proof-photo { display: flex; gap: 10px; align-items: center; margin-top: 8px; }

/* ---------- help tickets ---------- */
.thread { display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 85%; align-self: flex-start; }
.msg .b { background: var(--card); border: 1px solid var(--rule); border-radius: 12px 12px 12px 4px; padding: 9px 12px; white-space: pre-wrap; }
.msg.me { align-self: flex-end; text-align: right; }
.msg.me .b { background: var(--ce); color: var(--on-ce); border-color: var(--ce); border-radius: 12px 12px 4px 12px; text-align: left; }
.item .amt .pill { margin-top: 4px; }

/* ---------- list view | map view switch (wholesalers) ---------- */
.viewsw { display: inline-flex; background: var(--raise); border: 1px solid var(--rule); border-radius: 9px; padding: 2px; gap: 2px; }
.viewsw button { border: 0; background: none; padding: 5px 11px; border-radius: 7px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--mut); display: inline-flex; gap: 6px; align-items: center; }
.viewsw button.on { background: var(--card); color: var(--ink); box-shadow: 0 0 0 1px var(--rule); }
.viewsw svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 560px) { .viewsw .lbw { display: none; } }

/* ---------- phase 4: map view ---------- */
#mapWrap { display: none; position: fixed; left: var(--side); right: 0; bottom: var(--nav-b); top: calc(var(--hdr) + env(safe-area-inset-top)); z-index: 3; background: #0a1430; }
body.map-on #mapWrap { display: block; }
body.map-on main#view { padding: 0; min-height: 0; }
#mapEl { position: absolute; inset: 0; }
.glass { position: absolute; z-index: 2; background: rgba(12, 22, 52, 0.62); color: #E9EEFF; border: 1px solid rgba(160, 185, 255, 0.28);
  border-radius: 14px; backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }
#mapWrap:not(.night) .glass { background: rgba(255, 255, 255, 0.78); color: var(--ink); border-color: rgba(23, 35, 31, 0.12); box-shadow: 0 8px 24px rgba(23,35,31,.15); }
.mp-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 700; opacity: .9; }
.mono { font-variant-numeric: tabular-nums; }
.mp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.mp-grid button { background: rgba(255,255,255,.07); border: 1px solid rgba(160,185,255,.2); border-radius: 10px; padding: 7px 4px; color: inherit; cursor: pointer; text-align: center; }
#mapWrap:not(.night) .mp-grid button { background: rgba(11,93,71,.06); border-color: rgba(11,93,71,.15); }
.mp-grid b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.mp-grid small { font-size: 10.5px; opacity: .8; }
.mp-note { margin-top: 8px; font-size: 12px; opacity: .85; }
.map-msg { position: absolute; z-index: 3; left: 50%; top: 45%; transform: translate(-50%, -50%); background: rgba(12,22,52,.85); color: #fff; padding: 12px 16px; border-radius: 12px; font-weight: 600; text-align: center; max-width: 80%; }
.map-badge { display: flex; align-items: center; gap: 7px; padding: 5px 10px 5px 6px; border-radius: 12px; background: rgba(12,22,52,.8); color: #fff;
  border: 1px solid rgba(160,185,255,.45); box-shadow: 0 0 18px rgba(93,134,255,.45); font-size: 12px; line-height: 1.15; cursor: pointer; white-space: nowrap; }
.map-badge b { display: block; font-size: 12.5px; }
.map-badge small { opacity: .8; font-size: 11px; }
.map-badge .ic { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: rgba(54,224,160,.2); font-size: 14px; }
.map-badge.hq { border-color: rgba(240,162,2,.7); box-shadow: 0 0 22px rgba(240,162,2,.5); cursor: default; }
.map-badge.hq .ic { background: rgba(240,162,2,.25); color: #F0A202; }
.maplibregl-ctrl-attrib { font-size: 10px; }

/* ---------- map, second pass: camera, pins, filter legend, cafe card, minimap ---------- */
.map-top { position: absolute; z-index: 2; top: 12px; left: 12px; right: 12px; display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: space-between; align-items: flex-start; pointer-events: none; }
.map-top > * { pointer-events: auto; }
.map-top .glass { position: relative; }
.map-panel { width: 340px; max-width: 100%; padding: 10px 12px 12px; }
.mp-grid button.hot { background: rgba(240,162,2,.22); border-color: rgba(240,162,2,.6); }
#mapWrap:not(.night) .mp-grid button.hot { background: var(--sal); border-color: var(--sa); }
.map-tools { display: flex; gap: 8px; margin-left: auto; }
.map-3d { width: 40px; height: 40px; padding: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: 13px; }
.map-fit { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; cursor: pointer; font: inherit; }
.map-fit svg, .mc-x svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 700px) { .map-panel { width: 100%; } }

.map-legend { left: 12px; bottom: 24px; padding: 6px; display: flex; flex-direction: column; gap: 1px; font-size: 12px; }
.map-legend button { display: flex; align-items: center; gap: 8px; border: 0; background: none; color: inherit; font: inherit; font-size: 12.5px;
  padding: 5px 8px; border-radius: 9px; cursor: pointer; white-space: nowrap; text-align: left; transition: opacity .15s, background .15s; }
.map-legend button:hover { background: rgba(255,255,255,.1); }
#mapWrap:not(.night) .map-legend button:hover { background: rgba(11,93,71,.07); }
.map-legend button.on { background: rgba(255,255,255,.18); }
#mapWrap:not(.night) .map-legend button.on { background: var(--cel); color: var(--ce); }
.map-legend.filtering button:not(.on):not(.all) { opacity: .5; }
.map-legend button.all { font-weight: 700; color: #F0A202; }
#mapWrap:not(.night) .map-legend button.all { color: var(--ce); }
.map-legend i { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 8px currentColor; flex: none; }
.map-legend b { margin-left: auto; padding-left: 10px; font-variant-numeric: tabular-nums; }
@media (max-width: 959px) {
  .map-legend { left: 12px; right: 44px; bottom: 12px; flex-direction: row; overflow-x: auto; scrollbar-width: none; gap: 2px; }
  .map-legend button { flex: none; }
  .map-legend b { margin-left: 0; padding-left: 2px; }
}

.map-card { z-index: 3; left: 12px; right: 12px; bottom: 64px; padding: 14px 14px 12px; animation: up-card .28s var(--ease); }
@media (min-width: 960px) { .map-card { left: auto; right: 12px; top: 64px; bottom: auto; width: 340px; } }
@keyframes up-card { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.mc-head { display: flex; align-items: center; gap: 10px; }
.mc-head .grow { flex: 1; min-width: 0; }
.mc-head b { display: block; font-size: 16px; }
.mc-head small { opacity: .8; font-size: 12.5px; }
.mc-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: 0 0 10px currentColor; }
.mc-x { width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: inherit; display: grid; place-items: center; cursor: pointer; flex: none; }
#mapWrap:not(.night) .mc-x { background: rgba(23,35,31,.07); }
.mc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.mc-grid > div { background: rgba(255,255,255,.07); border-radius: 10px; padding: 8px 10px; }
#mapWrap:not(.night) .mc-grid > div { background: rgba(11,93,71,.06); }
.mc-grid small { display: block; font-size: 12.5px; opacity: .75; }
.mc-grid b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.mc-grid em { display: block; font-style: normal; font-size: 12px; font-weight: 700; color: #FF8A80; }
#mapWrap:not(.night) .mc-grid em { color: var(--po); }
.mc-grid em.soft { color: inherit; opacity: .75; font-weight: 500; }
.mc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.mc-actions .btn { flex: 1; white-space: nowrap; }
#mapWrap.night .mc-actions .btn.ghost { background: rgba(255,255,255,.1); color: #fff; box-shadow: inset 0 0 0 1px rgba(160,185,255,.3); }
#mapWrap.night .mc-actions .btn:not(.ghost) { background: #F0A202; color: #2A1B00; }

.map-badge .ic svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.map-badge .ic { color: #36E0A0; }


/* Today: needs you | what to load */
.today-grid { display: grid; gap: 0 24px; }
@media (min-width: 1180px) { .today-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.today-grid h2 { margin-top: 26px; }
td input[type=checkbox], th input[type=checkbox] { width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--ce); vertical-align: middle; }
.tile .n { font-variant-numeric: normal; }
#sForm { max-width: 760px; }
.money-grid { display: grid; gap: 0 24px; }
@media (min-width: 1180px) { .money-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
/* cafe product table */
tr.prod.in td { background: var(--cel); }
tr.prod.in td:first-child { box-shadow: inset 3px 0 0 var(--ce-ink); }
.shop-t td.qcell { width: 1%; text-align: right; }
.shop-t .stepper { display: inline-flex; }
.shop-t .shelf-s { display: none; }
.shop-t .shelf-t { font-size: 13.5px; font-weight: 600; }
.vat { font-size: 12px; color: var(--mut); font-weight: 600; }
@media (min-width: 1100px) { .sup-chips { display: none; } }
@media (max-width: 720px) {
  .shop-t .shelf-s { display: block; color: var(--ce-ink); font-weight: 600; }
  .shop-t td.qcell { grid-column: 2; grid-row: 2 / 4; align-self: end; width: auto; }
}
.show-s { display: none; }
@media (max-width: 720px) { .show-s { display: block; } }
.tile .w::first-letter { text-transform: uppercase; }

/* ---------- map view: the map stays, screens open as panels over it ---------- */
body.pane-open main#view { position: fixed; z-index: 5; top: calc(var(--hdr) + env(safe-area-inset-top) + var(--subh, 0px)); right: 0; bottom: var(--nav-b);
  width: min(640px, calc(100vw - var(--side))); max-width: none; margin: 0; overflow: auto; background: var(--bg); border-left: 1px solid var(--rule);
  box-shadow: var(--sh-up); padding: 22px 26px 48px; animation: slide .22s var(--ease); }
body.pane-open.pane-wide main#view { width: min(1080px, calc(100vw - var(--side) - 72px)); }
body.pane-open.has-sub { --subh: 49px; }
body.pane-open .subnav { position: fixed; top: calc(var(--hdr) + env(safe-area-inset-top)); right: 0; left: auto; width: min(640px, calc(100vw - var(--side))); padding: 0 26px; border-left: 1px solid var(--rule); z-index: 6; }
body.pane-open.pane-wide .subnav { width: min(1080px, calc(100vw - var(--side) - 72px)); }
#paneX { display: none; }
body.pane-open #paneX { display: grid; place-items: center; position: fixed; z-index: 7; top: calc(var(--hdr) + env(safe-area-inset-top) + var(--subh, 0px) + 16px); right: 18px;
  width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--rule); background: var(--card); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; }
body.pane-open main#view .ph { padding-right: 46px; }
body.pane-open main#view .today-grid, body.pane-open:not(.pane-wide) main#view .money-grid { grid-template-columns: 1fr; }
body.pane-open:not(.pane-wide) .tiles { grid-template-columns: 1fr 1fr; }
body.pane-open:not(.pane-wide) .tile:nth-child(3) { border-left: 0; }
body.pane-open:not(.pane-wide) .tile:nth-child(n+3) { border-top: 1px solid var(--rule-soft); }

/* map panel: Needs you */
.mp-needs { margin-top: 10px; border-top: 1px solid rgba(160,185,255,.2); padding-top: 8px; }
#mapWrap:not(.night) .mp-needs { border-top-color: rgba(23,35,31,.1); }
.mp-h { font-size: 13px; font-weight: 700; margin-bottom: 4px; display: flex; gap: 6px; align-items: center; }
.mp-h span { font-variant-numeric: tabular-nums; opacity: .7; }
.mp-calm { font-size: 13px; opacity: .8; }
.mp-row { display: flex; align-items: center; gap: 6px; padding: 5px 0; }
.mp-row + .mp-row { border-top: 1px solid rgba(160,185,255,.12); }
#mapWrap:not(.night) .mp-row + .mp-row { border-top-color: rgba(23,35,31,.07); }
.mp-name { flex: 1; min-width: 0; text-align: left; background: none; border: 0; color: inherit; padding: 2px 0; cursor: pointer; font: inherit; }
.mp-name b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-name small { display: block; font-size: 12px; opacity: .78; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-btn { flex: none; border: 0; border-radius: 7px; padding: 6px 10px; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; background: #F0A202; color: #2A1B00; }
.mp-btn.ghost { background: rgba(255,255,255,.12); color: inherit; }
#mapWrap:not(.night) .mp-btn { background: var(--ce); color: #fff; }
#mapWrap:not(.night) .mp-btn.ghost { background: rgba(23,35,31,.07); color: var(--ink); }
.mp-more { margin-top: 4px; border: 0; background: none; color: inherit; font: inherit; font-size: 12.5px; font-weight: 700; opacity: .85; cursor: pointer; padding: 2px 0; text-decoration: underline; }
.map-panel { font-family: var(--ui); }
@media (max-width: 760px) {
  body.pane-open main#view, body.pane-open.pane-wide main#view, body.pane-open .subnav, body.pane-open.pane-wide .subnav { width: 100vw; border-left: 0; }
  body.pane-open main#view { padding: 18px 16px 40px; }
  body.pane-open #paneX { right: 12px; }
}
/* The map's day look always uses light colours, even when the app is in dark mode (fixes white-on-white buttons) */
#mapWrap:not(.night) { color-scheme: light; --card: #FFFFFF; --raise: #F7F8F5; --ink: #17231F; --mut: #5E6B66; --rule: #D7DBD5; --rule-soft: #E7EAE5;
  --ce: #0B5D47; --ced: #074A39; --cel: #E2EFE9; --ce-ink: #0B5D47; --sal: #FDEBC4; --sad: #6B4600; --po: #B23A2E; --pol: #FBE7E4; color: var(--ink); }

/* ================= Wholesaler workspace (Fahd, 5 Dec 2026): the map is the screen ================= */
/* Strategy-game layout: numbers across the top, alerts under them, the "Right now" list on the right,
   map modes and the minimap bottom right, screens open as a panel on the left. */
@keyframes slide-l { from { transform: translateX(-28px); opacity: 0; } to { transform: none; opacity: 1; } }
body.ws { --paneW: min(680px, calc(100vw - var(--side) - 340px)); }
body.ws.pane-wide { --paneW: min(1040px, calc(100vw - var(--side) - 96px)); }

/* top bar of numbers (computers) */
.ws-bar { display: none; }
@media (min-width: 960px) {
  body.ws { --side: 84px; }
  body.ws .ws-bar { display: flex; align-items: center; gap: 10px; flex: 1; justify-content: center; min-width: 0; margin: 0 12px; }
  .ws-bar .wb-group { display: flex; align-items: center; gap: 2px; background: var(--bg); border: 1px solid var(--rule-soft); border-radius: 12px; padding: 3px; }
  .ws-bar .wb { display: flex; align-items: center; gap: 8px; border: 0; background: none; color: var(--ink); cursor: pointer; padding: 4px 12px 4px 5px; border-radius: 9px; font: inherit; text-align: left; white-space: nowrap; }
  .ws-bar .wb:hover { background: var(--card); box-shadow: 0 1px 3px rgba(23,35,31,.1); }
  .ws-bar .wb-i { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--cel); color: var(--ce-ink); flex: none; }
  .ws-bar .wb-i svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .ws-bar .wb.now .wb-i { background: var(--sa); color: #2A1B00; }
  .ws-bar .wb.urgent .wb-i { background: var(--pol); color: var(--po); }
  .ws-bar .wb-t { display: grid; line-height: 1.15; }
  .ws-bar .wb b { font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
  .ws-bar .wb small { font-size: 11.5px; color: var(--mut); font-weight: 500; }
  .ws-bar .wb-time { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--mut); white-space: nowrap; font-variant-numeric: tabular-nums; }
  .ws-bar .wb-time svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  /* narrower screens keep the words (they say what each number is) and drop the icons, the clock, then the sales figure */
  /* supplier-ws.js fitBar() adds fit1..fit7 until nothing overlaps the name or the buttons (Fahd, 6 Dec) */
  .ws-bar { justify-content: safe center; overflow: hidden; }
  .ws-bar.fit1 .wb-time { display: none; }
  .ws-bar.fit2 .wb-i { display: none; } .ws-bar.fit2 .wb { padding: 4px 10px; }
  .ws-bar.fit3 .wb b em { display: none; }
  .ws-bar.fit4 [data-tip="sales"] { display: none; }
  .ws-bar.fit5 [data-tip="load"] { display: none; }
  .ws-bar.fit6 [data-tip="vans"] { display: none; }
  .ws-bar.fit7 { visibility: hidden; }
  body.ws header.top .biz { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* the menu rail: icon over a short word */
  body.ws .nav { padding: 10px 6px; gap: 4px; background: var(--card); }
  body.ws .nav button { flex-direction: column; justify-content: center; gap: 3px; padding: 9px 2px 7px; position: relative; }
  body.ws .nav .ic { display: block; position: relative; width: 28px; height: 24px; margin: 0 auto; }
  body.ws .nav svg { width: 22px; height: 22px; display: block; margin: 0 auto; }
  body.ws .nav .lb { font-size: 11.5px; font-weight: 600; }
  body.ws .nav .count { position: absolute; top: -7px; left: 19px; margin: 0; box-shadow: 0 0 0 2px var(--card); }
  body.ws .nav button.on { background: var(--cel); box-shadow: none; color: var(--ce-ink); }
}
/* the left panel */
body.ws.pane-open main#view { left: var(--side); right: auto; width: var(--paneW); border-left: 0; border-right: 1px solid var(--rule); animation: slide-l .2s var(--ease);
  top: calc(var(--hdr) + env(safe-area-inset-top) + var(--subh, 0px)); }
body.ws.pane-open .subnav { left: var(--side); right: auto; width: var(--paneW); border-left: 0; border-right: 1px solid var(--rule); }
body.ws.pane-open #paneX { right: auto; left: calc(var(--side) + var(--paneW) - 54px); }
@media (max-width: 959px) { body.ws.pane-open main#view, body.ws.pane-open .subnav { left: 0; width: 100vw; border-right: 0; } body.ws.pane-open #paneX { left: auto; right: 12px; } }

/* "Right now": the outliner */
.ws-out { position: fixed; z-index: 4; right: 12px; top: calc(var(--hdr) + env(safe-area-inset-top) + 12px); width: 300px; background: var(--card); color: var(--ink);
  border: 1px solid var(--rule); border-radius: 12px; box-shadow: 0 8px 24px rgba(23,35,31,.14); display: flex; flex-direction: column;
  max-height: calc(100vh - var(--hdr) - env(safe-area-inset-top) - 24px - 64px); min-height: 0; overflow: hidden; }
.ws-out.shut { width: auto; }
body.pane-wide .ws-out { display: none; }
.wo-top { display: flex; align-items: center; padding: 8px 10px 6px 14px; border-bottom: 1px solid var(--rule-soft); }
.ws-out.shut .wo-top { border-bottom: 0; padding: 4px; }
.wo-x { border: 0; background: none; font: inherit; font-family: var(--display); font-weight: 800; font-size: 15px; color: var(--ink); cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.wo-x b { font-family: var(--ui); font-size: 12px; background: var(--sa); color: #2A1B00; border-radius: 999px; padding: 1px 7px; margin-left: 4px; }
.wo-x:hover { background: var(--raise); }
.wo-list { overflow: auto; padding: 4px 0 8px; }
.wo-s + .wo-s { border-top: 1px solid var(--rule-soft); }
.wo-h { display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--mut);
  padding: 8px 14px 4px 10px; cursor: pointer; text-align: left; }
.wo-h svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; transform: rotate(90deg); transition: transform .15s; }
.wo-s.fold .wo-h svg { transform: none; }
.wo-s.fold .wo-b { display: none; }
.wo-h b { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--ink); }
.wo-r { display: grid; width: 100%; border: 0; background: none; font: inherit; color: inherit; text-align: left; padding: 6px 14px; cursor: pointer; gap: 1px; }
.wo-r:hover, .wo-go:hover { background: var(--raise); }
.wo-r.row { grid-template-columns: 1fr auto; align-items: center; gap: 8px; padding: 0 10px 0 0; cursor: default; }
.wo-go { border: 0; background: none; font: inherit; color: inherit; text-align: left; padding: 6px 0 6px 14px; cursor: pointer; display: grid; gap: 1px; min-width: 0; border-radius: 0 8px 8px 0; }
.wo-t { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wo-m { font-size: 12px; color: var(--mut); }
.wo-m em, .wo-t em { font-style: normal; color: var(--po); font-weight: 600; }
.wo-bar { height: 4px; border-radius: 2px; background: var(--rule-soft); margin-top: 4px; overflow: hidden; }
.wo-bar i { display: block; height: 100%; background: var(--ce); border-radius: 2px; }
.wo-btn { border: 0; border-radius: 8px; background: var(--ce); color: var(--on-ce); font: inherit; font-size: 12.5px; font-weight: 700; padding: 6px 10px; cursor: pointer; }
.wo-btn.ghost { background: var(--raise); color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule); }
.wo-btn:disabled { opacity: .6; }
.wo-empty { font-size: 12.5px; color: var(--mut); padding: 2px 14px 6px; }
.ws-sheet .wo-s { margin: 0 -14px; }


/* map views: one small button at the bottom right (Fahd, 5 Dec); the views, colour key and light open above it */
#mapWrap .map-modes { right: 12px; bottom: 12px; left: auto; top: auto; width: auto; padding: 0; overflow: visible; border-radius: 10px; }
.mm-cur { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; color: inherit; font: inherit; font-size: 13px; font-weight: 600; padding: 8px 12px; cursor: pointer; border-radius: 10px; }
.mm-cur svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
.mm-cur .mm-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sa); }
.mm-pop { display: none; position: absolute; right: 0; bottom: calc(100% + 8px); width: 270px; background: var(--card); color: var(--ink); border: 1px solid var(--rule);
  border-radius: 12px; box-shadow: 0 12px 32px rgba(23,35,31,.18); padding: 6px; }
#mapWrap.night .mm-pop { background: rgba(10,20,48,.94); color: #E8EEF8; border-color: rgba(255,255,255,.12); }
.map-modes.open .mm-pop { display: block; }
.mm-tabs { display: flex; flex-direction: column; gap: 1px; padding-bottom: 6px; border-bottom: 1px solid rgba(127,140,150,.25); }
.mm-tabs button { border: 0; background: none; color: inherit; font: inherit; font-size: 13.5px; font-weight: 600; padding: 7px 10px; border-radius: 8px; cursor: pointer; text-align: left; }
.mm-tabs button:hover { background: rgba(127,140,150,.12); }
.mm-tabs button.on { background: var(--cel); color: var(--ce-ink); }
#mapWrap.night .mm-tabs button.on { background: rgba(54,224,160,.16); color: #7CF0C4; }
#mapWrap .map-modes .map-legend { position: static; inset: auto; border: 0; box-shadow: none; background: none; border-radius: 0; display: flex; flex-direction: column; gap: 1px; padding: 6px 0; border-bottom: 1px solid rgba(127,140,150,.25); }
#mapWrap .map-modes .map-legend button { font-size: 12.5px; padding: 5px 10px; }
#mapWrap .map-modes .map-legend i { box-shadow: none; }
.mm-foot { display: flex; flex-direction: column; gap: 1px; padding-top: 6px; }
.mm-b { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; padding: 7px 10px; text-align: left; }
.mm-b:hover { background: rgba(127,140,150,.12); }
.mm-b svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* the cafe card: top left of the map, beside the panel when one is open */
#mapWrap .map-card { left: 12px; right: auto; top: 64px; bottom: auto; width: 340px; }
body.pane-open #mapWrap .map-card { left: calc(var(--paneW) + 12px); }

/* tooltips */
.tip { position: fixed; z-index: 40; max-width: 320px; min-width: 220px; background: var(--ink); color: var(--bg); border-radius: 10px; padding: 10px 12px; font-size: 12.5px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); pointer-events: none; }
.tip-h { font-weight: 700; margin-bottom: 6px; }
.tip-r { display: flex; justify-content: space-between; gap: 14px; padding: 2px 0; }
.tip-r span { opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tip-r b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tip-f { margin-top: 6px; opacity: .7; }

/* phones: alerts strip at the top, "Right now" as a button, map modes fold into one button */
.ws-phone { display: none; }
@media (max-width: 959px) {
  .ws-out { display: none !important; }
  body.ws .ws-phone:not([hidden]) { display: inline-flex; align-items: center; gap: 6px; position: fixed; z-index: 4; left: 12px; bottom: calc(var(--nav-b) + 12px);
    border: 1px solid var(--rule); background: var(--card); color: var(--ink); border-radius: 999px; padding: 9px 14px; font: inherit; font-weight: 700; font-size: 14px; box-shadow: 0 6px 18px rgba(23,35,31,.15); }
  .ws-phone b { background: var(--sa); color: #2A1B00; border-radius: 999px; padding: 0 7px; font-size: 12px; }
  body.pane-open .ws-phone { display: none !important; }
  #mapWrap .map-card { left: 12px; right: 12px; top: auto; bottom: 64px; width: auto; }
}
@media (max-width: 959px) { body:has(#mapModes.open) .ws-phone { display: none !important; } }
@media (max-width: 959px) {
  #mapWrap:has(#mapCard:not([hidden])) .map-modes, body:has(#mapCard:not([hidden])) .ws-phone { display: none !important; }
  #mapWrap .map-card { bottom: 12px; }
}

/* Insights: the business dashboard */
.ins-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--mut); margin-bottom: 10px; }
.ins-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ins-legend i { width: 10px; height: 10px; border-radius: 3px; }
.ins-chart .ch-bars { gap: 0; }
.ins-m { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 2px; height: 100%; padding: 0 6%; min-width: 0; }
.ins-m .ch-bar { flex: 0 1 26px; }
.ins-m .ch-bar i { max-width: 26px; }
.ins-x { justify-content: space-around; }
.ins-x span { flex: 1; text-align: center; }
.ins-table { margin-top: 10px; font-size: 14px; }
.ins-table summary { cursor: pointer; color: var(--ce-ink); font-weight: 600; }
.ins-table table { margin-top: 8px; width: 100%; }
.tile .w.small { font-size: 12.5px; font-weight: 500; order: 3; }
.tile .w.bad { color: var(--po); font-weight: 700; }
.ins-seg { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--card); border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; }
.ins-s { padding: 12px 16px; border-left: 1px solid var(--rule-soft); display: flex; flex-direction: column; gap: 2px; border-top: 3px solid transparent; }
.ins-s:first-child { border-left: 0; }
.ins-s b { font-family: var(--display); font-size: 24px; font-variant-numeric: tabular-nums; }
.ins-s span { color: var(--mut); font-size: 13.5px; font-weight: 600; }
.ins-s.active { border-top-color: var(--wa); } .ins-s.slipping { border-top-color: var(--sa); } .ins-s.lost { border-top-color: var(--po); } .ins-s.never { border-top-color: var(--line); }
.ins-h3 { font-size: 15px; margin: 16px 0 6px; }
.ins-big { font-family: var(--display); font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
#iPot .card { margin-bottom: 0; }
#iPot .card p { margin: 6px 0 10px; }
#iPot .tiny { font-size: 11.5px; margin: 10px 0 0; }
#iMap { margin-top: 14px; }
@media (max-width: 760px) { .ins-seg { grid-template-columns: 1fr 1fr; } .ins-s:nth-child(3) { border-left: 0; } }
@media (min-width: 960px) { body:has(#mapModes.open) .ws-out { visibility: hidden; } } /* the map menu opens over the "Right now" list for a moment */

/* ---------- workspace panels, second pass (5 Dec research: Onfleet, Cloudscape split view, Paradox) ----------
   One compact header bar (tabs or title, then close); no repeated big page title; denser rows; a soft edge onto the map. */
body.ws.pane-open { --subh: 52px; }
body.ws.pane-open .subnav { height: 52px; padding: 0 8px 0 20px; background: var(--card); border-bottom: 1px solid var(--rule); display: flex; align-items: stretch; }
.pn-head { display: flex; align-items: stretch; gap: 12px; width: 100%; }
.pn-head .segbar { gap: 20px; align-self: stretch; }
.pn-head .segbar button { padding: 0 1px; font-size: 15px; height: 100%; }
.pn-t { margin: 0; align-self: center; font-family: var(--display); font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.pn-x { margin-left: auto; align-self: center; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--mut); cursor: pointer; }
.pn-x:hover { background: var(--raise); color: var(--ink); }
.pn-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
body.ws #paneX { display: none !important; }
body.ws.pane-open main#view { padding: 16px 20px 40px; box-shadow: 14px 0 32px -14px rgba(23,35,31,.28); }
:root[data-theme="dark"] body.ws.pane-open main#view { box-shadow: 14px 0 32px -10px rgba(0,0,0,.6); }
body.ws.pane-open main#view .ph { padding-right: 0; margin: 0 0 12px; align-items: center; }
body.ws.pane-open main#view .ph h1 { display: none; }
body.ws.pane-open main#view .ph:not(:has(.ph-act)) { display: none; }
body.ws.pane-open main#view .ph .ph-act { margin-left: auto; }
body.ws.pane-open main#view h2 { font-size: 15px; margin: 20px 0 8px; }
body.ws.pane-open main#view th, body.ws.pane-open main#view td { padding: 8px 12px; }
body.ws.pane-open main#view th { position: sticky; top: -16px; z-index: 1; background: var(--raise); font-size: 12.5px; }
body.ws.pane-open main#view .tile { padding: 11px 14px 12px; }
body.ws.pane-open main#view .tile .n { font-size: 22px; }
@media (max-width: 959px) { body.ws.pane-open .subnav { padding: 0 6px 0 16px; } body.ws.pane-open main#view { padding: 14px 14px 32px; } }
.pn-head .pn-act { margin-left: auto; align-self: center; display: flex; gap: 8px; }
.pn-head .pn-act + .pn-x { margin-left: 4px; }
.pn-head .pn-act .btn { padding: 7px 14px; min-height: 34px; font-size: 14px; }
.bell { display: inline-flex; align-items: center; gap: 6px; }
.bell svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bell::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--sa); margin-left: -2px; align-self: flex-start; }
@media (max-width: 1600px) { .bell .hw { display: none; } }

/* ---------- Pin your shop ---------- */
.pin-nudge, .pin-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.pin-nudge { border-color: #F0A202; background: color-mix(in srgb, #F0A202 9%, var(--card)); }
.pin-nudge p.sub, .pin-row p.sub { margin: 3px 0 0; }
.pinshop { position: fixed; inset: 0; z-index: 90; background: var(--bg); display: flex; flex-direction: column; }
body.pinshop-on { overflow: hidden; }
.pinshop header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--rule); background: var(--card); }
.pinshop header h2 { margin: 0; font-size: 18px; }
.pinshop .pn-x { background: none; border: 0; padding: 6px; cursor: pointer; color: var(--ink); }
.pinshop .pn-x svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; fill: none; }
.ps-bar { display: flex; gap: 8px; padding: 10px 16px; flex-wrap: wrap; background: var(--card); border-bottom: 1px solid var(--rule); }
.ps-bar form { display: flex; gap: 8px; flex: 1; min-width: 240px; }
.ps-bar input { flex: 1; min-width: 0; }
.ps-res { max-height: 40vh; overflow: auto; background: var(--card); border-bottom: 1px solid var(--rule); }
.ps-res button { display: block; width: 100%; text-align: left; padding: 10px 16px; background: none; border: 0; border-bottom: 1px solid var(--rule); color: var(--ink); cursor: pointer; font: inherit; }
.ps-res button:hover, .ps-res button:focus-visible { background: var(--cel); }
.ps-res p.sub { padding: 10px 16px; margin: 0; }
.ps-map { position: relative; flex: 1; min-height: 0; }
.ps-say { position: absolute; z-index: 5; top: 12px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 9px 14px; border-radius: 10px;
  background: var(--card); color: var(--ink); border: 1px solid var(--rule); box-shadow: 0 4px 14px rgba(0,0,0,.14); font-weight: 600; text-align: center; }
.ps-foot { display: flex; align-items: center; gap: 8px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--rule); flex-wrap: wrap; }
.mc-note { margin: 6px 0 0; font-size: 12.5px; color: var(--mut); }
@media (max-width: 560px) { .pin-nudge, .pin-row { flex-wrap: wrap; } .pin-nudge .btn, .pin-row .btn { width: 100%; } }

/* Depot marker on the map: a small round badge, name on hover (5 Dec) */
.map-badge.hq.mini { padding: 3px; border-radius: 50%; gap: 0; box-shadow: 0 0 14px rgba(240,162,2,.45); }
.map-badge.hq.mini .ic { width: 26px; height: 26px; border-radius: 50%; }
.map-badge.hq.mini > span:last-child { position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); white-space: nowrap;
  padding: 4px 9px; border-radius: 8px; background: rgba(12,22,52,.92); display: none; pointer-events: none; }
.map-badge.hq.mini:hover > span:last-child, .map-badge.hq.mini:focus-within > span:last-child { display: block; }
.map-badge.van.mini { padding: 3px; gap: 0; border-radius: 50%; }
.map-badge.van.mini > span:last-child { display: none; }

/* ---------- Phone header: one menu instead of four buttons (Fahd, 5 Dec) ---------- */
#moreBtn { display: none; }
#moreBtn svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.more-menu { position: fixed; z-index: 60; top: calc(env(safe-area-inset-top) + 58px); right: 10px; min-width: 230px; background: var(--card); border: 1px solid var(--rule);
  border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.28); padding: 6px; }
.more-menu .mm-who { padding: 8px 12px 6px; font-weight: 700; font-size: 13px; color: var(--mut); }
.more-menu button { display: block; width: 100%; text-align: left; padding: 11px 12px; border: 0; background: none; color: var(--ink); font: inherit; font-size: 15px; border-radius: 8px; cursor: pointer; }
.more-menu button:hover, .more-menu button:focus-visible { background: var(--raise); }
.more-menu button[data-m="out"] { color: var(--po); }
@media (max-width: 959px) {
  header.top:has(#signOut:not([hidden])) #themeBtn, header.top:has(#signOut:not([hidden])) #helpBtn,
  header.top:has(#signOut:not([hidden])) #signOut, header.top:has(#signOut:not([hidden])) #bellBtn, header.top:has(#signOut:not([hidden])) #modeBtn { display: none !important; }
  header.top:has(#signOut:not([hidden])) #moreBtn { display: inline-flex; align-items: center; justify-content: center; width: 40px; padding: 0; }
  header.top .biz { max-width: none !important; }
}

/* ---------- Panel tables (5 Dec pass): short values never wrap; phones get two-line ledger rows ---------- */
body.ws.pane-open main#view td:not(:first-child) { white-space: nowrap; }
body.ws.pane-open main#view td:first-child { min-width: 150px; }
body.ws.pane-open main#view td .t { white-space: normal; }
@media (max-width: 720px) {
  table.rt tr { display: flex !important; flex-wrap: wrap; align-items: center; gap: 3px 12px; padding: 11px 14px; }
  table.rt td { width: auto !important; }
  table.rt td:first-child { flex: 1 0 calc(100% - 130px); min-width: 0 !important; order: 0; }
  table.rt td.num { order: 1; flex: 0 0 auto; margin-left: auto; text-align: right; }
  table.rt td.meta-s { order: 2; flex: 0 0 auto; font-size: 13.5px; }
  table.rt td.act { order: 3; flex: 0 0 auto; margin: 0 0 0 auto !important; width: auto !important; }
  table.rt td .s { font-size: 13px; }
  table.rt tr.tot { justify-content: space-between; }
}
@media (max-width: 720px) { table.rt tr.h, table.rt thead { display: none !important; } table.rt tr { padding: 10px 14px; } }
.tile .tsub { order: 3; color: var(--mut); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 1180px) { .money-grid { grid-template-columns: 1fr 1fr; } }
table.owe td.act .btn { padding-left: 10px; padding-right: 10px; }
.seg-chips { margin: 0 0 6px; flex-wrap: wrap; }
.seg-note { margin: 4px 0 12px; color: var(--mut); font-size: 13.5px; max-width: 70ch; }
.ask-box { margin-bottom: 18px; }
.offer-list { display: grid; gap: 10px; margin-bottom: 6px; }
.card.offer { border-color: #F0A202; cursor: pointer; }
.offer-msg { margin: 10px 0 0; white-space: pre-wrap; }

/* ---------- Products: categories and icons ---------- */
.cat-ic { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--cel); color: var(--ce-ink); flex: 0 0 auto; }
.cat-ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.chip .cat-ic { width: 20px; height: 20px; border-radius: 6px; margin: -2px 6px -2px -4px; background: transparent; }
.chip .cat-ic svg { width: 15px; height: 15px; }
.prod-cell { display: flex; align-items: center; gap: 11px; }
table.prods tr.grp td { background: var(--raise); font-size: 13px; padding-top: 7px; padding-bottom: 7px; }
table.prods tr.grp td .cat-ic { width: 22px; height: 22px; margin-right: 8px; vertical-align: middle; background: transparent; }
table.prods tr.grp td .cat-ic svg { width: 16px; height: 16px; }
.prod-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.prod-bar .f.search { margin: 0; flex: 0 1 280px; }
.prod-bar .chips { flex: 1 1 300px; min-width: 0; }
.card.sugg { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; border-color: var(--ce); }
.card.sugg p.sub { margin: 3px 0 0; }
.cat-edit { display: grid; gap: 8px; margin-bottom: 16px; }
.cat-row { display: flex; align-items: center; gap: 10px; }
.cat-row input { flex: 1; }
.cat-move { display: grid; gap: 6px; max-height: 40vh; overflow: auto; }
.cat-mv { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; }
.cat-mv select { max-width: 55%; }
@media (max-width: 720px) {
  table.rt.prods tr.grp { display: block !important; padding: 6px 14px; background: var(--raise); }
  table.rt.prods tr.grp td { background: none; padding: 0; }
  .card.sugg { flex-wrap: wrap; } .card.sugg .grow { flex-basis: 100%; }
}

/* ---------- Vans (5 Dec pass): one-line days, a day summary, cards with a route line ---------- */
.chip.day1 { white-space: nowrap; position: relative; }
.chip.day1 .dot-plan { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #F0A202; margin-left: 6px; vertical-align: middle; }
.van-sum { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 12px; padding: 10px 14px; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; font-size: 13.5px; color: var(--mut); }
.van-sum b { color: var(--ink); font-size: 15px; margin-right: 3px; }
.vans-grid { display: grid; gap: 12px; }
@media (min-width: 960px) { body.pane-wide .vans-grid { grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); } }
.vans-grid .card.van { margin-top: 0; padding: 14px 16px; }
.van-head { display: flex; align-items: center; gap: 12px; }
.van-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--cel); color: var(--ce-ink); flex: 0 0 auto; }
.van-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.card.van.st-planned .van-ic { background: color-mix(in srgb, #F0A202 18%, var(--card)); color: #C98500; }
.card.van .bar { margin: 12px 0 2px; }
.card.van ol.stops { margin-top: 8px; }
.card.van ol.stops li { position: relative; border-top: 0; padding: 7px 2px; }
.card.van ol.stops li::before { content: ''; position: absolute; left: 13px; top: -7px; height: 14px; width: 2px; background: var(--rule); }
.card.van ol.stops li:first-child::before { display: none; }
.card.van ol.stops li .seq { position: relative; z-index: 1; width: 28px; height: 28px; flex: 0 0 auto; }
.card.van ol.stops li .grow { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.card.van ol.stops li .grow b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.van ol.stops li .grow .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.van ol.stops li.done .seq { background: var(--ce); color: #fff; }
.card.van ol.stops li > :last-child { white-space: nowrap; }
.card.van .van-actions { border-top: 1px solid var(--rule-soft); padding-top: 12px; margin-top: 8px; }
@media (hover: hover) { .card.van ol.stops li:hover { background: var(--raise); border-radius: 8px; } }
@media (max-width: 720px) {
  body.ws.pane-open main#view table.rt td { padding: 0; }
  body.ws.pane-open main#view table.rt td.act:empty { display: none; }
  #importX { display: none; }
  .pn-act .btn { padding-left: 12px; padding-right: 12px; }
}
.card.van ol.stops li .grow b, .card.van ol.stops li .grow .small { min-width: 0; flex: 0 1 auto; }
.card.van { min-width: 0; overflow: hidden; }
@media (max-width: 720px) { .card.van ol.stops li .grow .small { display: none; } table.owe td.act .btn { font-size: 13px; padding: 5px 10px; } }

/* ---------- Standing rule (Fahd, 5 Dec): nothing in a panel ever scrolls sideways, at any width ----------
   Panels measure their own width (container queries): columns marked hide-m drop out when a panel is narrow,
   and below 600 px every table turns into two-line ledger rows, like on phones. */
body.ws.pane-open main#view { container-type: inline-size; container-name: pane; }
body.ws.pane-open main#view th, body.ws.pane-open main#view td { padding-left: 10px; padding-right: 10px; }
body.ws.pane-open main#view .tbl-wrap { overflow-x: hidden; }
body.ws.pane-open main#view td.act .btn + .btn { margin-left: 4px; }
@container pane (max-width: 760px) { .hide-m { display: none !important; } }
@container pane (max-width: 600px) {
  table.rt, table.rt tbody { display: block; width: 100%; }
  table.rt thead, table.rt tr.h { display: none !important; }
  table.rt tr { display: flex !important; flex-wrap: wrap; align-items: center; gap: 3px 12px; padding: 10px 14px; border-bottom: 1px solid var(--rule-soft); }
  table.rt td { display: block; width: auto !important; padding: 0 !important; border: 0; background: none !important; }
  table.rt td:first-child { flex: 1 0 calc(100% - 130px); min-width: 0 !important; }
  table.rt td.num { order: 1; flex: 0 0 auto; margin-left: auto; text-align: right; }
  table.rt td.meta-s { order: 2; flex: 0 0 auto; font-size: 13.5px; }
  table.rt td.act { order: 3; flex: 0 0 auto; margin-left: auto !important; }
  table.rt td.act:empty, table.rt td.hide-s { display: none; }
}
.tile .tsub { white-space: normal; }
.tile { min-width: 0; }

/* Product category tiles: one hue per kind of product (icons from Tabler, stroke 1.75) */
.cat-ic svg { stroke-width: 1.75; }
.cat-ic { width: 34px; height: 34px; border-radius: 9px; }
.cat-ic svg { width: 20px; height: 20px; }
.cat-ic[data-ic="milk"] { color: #2F6FB0; background: color-mix(in srgb, #2F6FB0 13%, var(--card)); }
:root[data-theme="dark"] .cat-ic[data-ic="milk"] { color: #8CC0F2; background: color-mix(in srgb, #8CC0F2 16%, var(--card)); }
.cat-ic[data-ic="cheese"] { color: #B07A00; background: color-mix(in srgb, #B07A00 13%, var(--card)); }
:root[data-theme="dark"] .cat-ic[data-ic="cheese"] { color: #F2C25B; background: color-mix(in srgb, #F2C25B 16%, var(--card)); }
.cat-ic[data-ic="jar"] { color: #0F7F78; background: color-mix(in srgb, #0F7F78 13%, var(--card)); }
:root[data-theme="dark"] .cat-ic[data-ic="jar"] { color: #6FD6CC; background: color-mix(in srgb, #6FD6CC 16%, var(--card)); }
.cat-ic[data-ic="butter"] { color: #9A7B00; background: color-mix(in srgb, #9A7B00 13%, var(--card)); }
:root[data-theme="dark"] .cat-ic[data-ic="butter"] { color: #EBD36A; background: color-mix(in srgb, #EBD36A 16%, var(--card)); }
.cat-ic[data-ic="leaf"] { color: #3C7F2A; background: color-mix(in srgb, #3C7F2A 13%, var(--card)); }
:root[data-theme="dark"] .cat-ic[data-ic="leaf"] { color: #9AD98A; background: color-mix(in srgb, #9AD98A 16%, var(--card)); }
.cat-ic[data-ic="coffee"] { color: #7A4E2D; background: color-mix(in srgb, #7A4E2D 13%, var(--card)); }
:root[data-theme="dark"] .cat-ic[data-ic="coffee"] { color: #D9A47E; background: color-mix(in srgb, #D9A47E 16%, var(--card)); }
.cat-ic[data-ic="syrup"] { color: #A8325A; background: color-mix(in srgb, #A8325A 13%, var(--card)); }
:root[data-theme="dark"] .cat-ic[data-ic="syrup"] { color: #F29BB8; background: color-mix(in srgb, #F29BB8 16%, var(--card)); }
.cat-ic[data-ic="cup"] { color: #4E5D73; background: color-mix(in srgb, #4E5D73 13%, var(--card)); }
:root[data-theme="dark"] .cat-ic[data-ic="cup"] { color: #AEBBD0; background: color-mix(in srgb, #AEBBD0 16%, var(--card)); }
.cat-ic[data-ic="bread"] { color: #B5561C; background: color-mix(in srgb, #B5561C 13%, var(--card)); }
:root[data-theme="dark"] .cat-ic[data-ic="bread"] { color: #F2A877; background: color-mix(in srgb, #F2A877 16%, var(--card)); }
.cat-ic[data-ic="box"] { color: #5E6B66; background: color-mix(in srgb, #5E6B66 13%, var(--card)); }
:root[data-theme="dark"] .cat-ic[data-ic="box"] { color: #B7C2BD; background: color-mix(in srgb, #B7C2BD 16%, var(--card)); }
.chip .cat-ic, table.prods tr.grp td .cat-ic { background: transparent !important; }
/* the name cell (the one with a title) may wrap; every short cell stays on one line; a checkbox column stays narrow */
body.ws.pane-open main#view td:first-child { min-width: 0; }
body.ws.pane-open main#view td:not(:first-child) { white-space: normal; }
body.ws.pane-open main#view td:not(:has(.t)) { white-space: nowrap; }
body.ws.pane-open main#view td:has(> .t), body.ws.pane-open main#view td:has(> .prod-cell) { min-width: 150px; }
body.ws.pane-open main#view td:has(> input[type="checkbox"]), body.ws.pane-open main#view th:has(> input[type="checkbox"]) { width: 1%; }

/* ================= 5 Dec ~22:10: smoother panels, one panel width (Fahd) ================= */
@keyframes pane-out { from { transform: none; opacity: 1; } to { transform: translateX(-32px); opacity: 0; } }
@keyframes wo-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes wo-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-6px); } }
body.ws.pane-open main#view { animation: slide-l .24s var(--ease); }
body.ws.pane-open .subnav { animation: slide-l .24s var(--ease); }
body.ws.pane-leave main#view, body.ws.pane-leave .subnav, body.ws.pane-leave #paneX { animation: pane-out .17s ease-in forwards; }
.ws-out:not([hidden]) { animation: fade .22s var(--ease); }
.ws-out .wo-list.enter { animation: wo-in .22s var(--ease); }
.ws-out .wo-list.leave { animation: wo-out .16s ease-in forwards; }
.ws-out .wo-s.unfold .wo-b { animation: wo-in .18s var(--ease); }
@media (min-width: 960px) { .ws-out { transition: opacity .15s, visibility .15s; } body:has(#mapModes.open) .ws-out { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  body.ws.pane-open main#view, body.ws.pane-open .subnav, .ws-out, .ws-out .wo-list, .ws-out .wo-s .wo-b { animation: none !important; transition: none !important; }
}
#sForm { max-width: none; }
.home-link { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; border-radius: 10px; padding: 2px 4px 2px 2px; margin: -2px -4px -2px -2px; }
.home-link:hover { opacity: .85; }
.home-link:focus-visible { outline: 2px solid var(--ce); outline-offset: 2px; }
.map-badge.hq, .map-badge.van { cursor: pointer; }
.map-badge.hq:focus-visible, .map-badge.van:focus-visible { outline: 2px solid #F0A202; outline-offset: 2px; }
.map-badge.van.live .ic { box-shadow: 0 0 0 2px #36E0A0; }
.dep-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dep-stats > div { background: var(--raise); border: 1px solid var(--rule-soft); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.dep-stats b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.dep-stats span { font-size: 12.5px; color: var(--mut); }
.drv-live { margin: 6px 0 2px; }
button.item { width: 100%; text-align: left; font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ================= 5 Dec ~22:45 QA sweep (Fahd: overlapping plan bar, vans dates, insights boxes) ================= */
/* A sticky action bar is a solid footer: nothing shows through or around it */
.sticky-actions { z-index: 6; bottom: var(--nav-b); background: var(--card); margin: 16px -16px 0; padding: 10px 16px; border-top: 1px solid var(--rule);
  box-shadow: 0 -8px 18px rgba(23,35,31,.08); }
.sticky-actions .btn { flex: 1 1 140px; }
@media (max-width: 520px) { .sticky-actions .btn#dSave, .sticky-actions .btn.primary-last:last-child { flex-basis: 100%; order: -1; } }
/* Planner rows: one line when there is room (name left, order buttons and van choice right) */
ol.stops.edit .ctl { width: auto; padding-left: 0; margin-left: auto; flex: none; }
.card.van ol.stops.edit li .grow { flex: 1 1 220px; display: block; }
.card.van ol.stops.edit li .grow b { display: inline; white-space: normal; }
.card.van ol.stops.edit li .grow > span.small { display: inline; margin-left: 6px; }
.card.van ol.stops.edit li .grow > div.small { display: block; white-space: normal; }
@container pane (max-width: 520px) { ol.stops.edit .ctl { width: 100%; padding-left: 38px; } }
@media (max-width: 520px) { ol.stops.edit .ctl { width: 100%; padding-left: 38px; } }
/* Vans: a week strip (Fahd, 5 Dec: dates were unclear and "Mon 7 Dec 3" read like a date) */
.vday-wrap { margin: 2px 0 12px; }
.vday-month { font-size: 13px; font-weight: 700; color: var(--mut); margin: 0 0 6px 2px; }
.vdays { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.vdays::-webkit-scrollbar { display: none; }
.vday { flex: 1 0 74px; display: grid; justify-items: center; gap: 1px; padding: 7px 6px 8px; border: 1px solid var(--rule); border-radius: 12px; background: var(--card);
  color: var(--ink); font: inherit; cursor: pointer; position: relative; }
.vday:hover { border-color: var(--ce); }
.vday .vd-w { font-size: 12px; font-weight: 600; color: var(--mut); }
.vday .vd-n { font-size: 20px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; font-family: var(--display); }
.vday .vd-v { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--ce-ink); min-height: 16px; }
.vday .vd-v .van-g { width: 15px; height: 15px; }
.vday .vd-none { font-style: normal; color: var(--mut); font-size: 11px; }
.vday.today .vd-w { color: var(--ce-ink); }
.vday.on { background: var(--ce); border-color: var(--ce); color: #fff; }
.vday.on .vd-w, .vday.on .vd-v, .vday.on .vd-none { color: rgba(255,255,255,.9); }
.vday .dot-plan { position: absolute; top: 6px; right: 6px; }
.van-g { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.van-sum > span:first-child { display: inline-flex; align-items: center; gap: 5px; }
.van-sum > span:first-child .van-g { color: var(--ce-ink); }
.card.van .spread > .van-ic { flex: none; margin-right: 8px; }
.card.van .spread > .van-in { flex: 1 1 160px; min-width: 0; }
.vday .dot-plan { display: block; width: 7px; height: 7px; border-radius: 50%; background: #F0A202; }
body.ws.pane-open .sticky-actions { bottom: 0; }
/* Sticky bars sit flush on the panel's bottom edge (the panel's bottom padding used to leave a see-through gap under them) */
body.ws.pane-open main#view { padding-bottom: 0; }
body.ws.pane-open main#view::after { content: ''; display: block; height: 40px; }
.card.van .spread:has(> .van-ic) { justify-content: flex-start; gap: 10px; }
.card.van .spread:has(> .van-ic) > .van-in { flex: 0 1 240px; }
.card.van .spread:has(> .van-ic) > :last-child { margin-left: auto; text-align: right; }
/* extra category icons (picker, 5 Dec) */
.cat-ic[data-ic="egg"] { color: #A07A2C; background: color-mix(in srgb, #A07A2C 13%, var(--card)); }
:root[data-theme="dark"] .cat-ic[data-ic="egg"] { color: #E8C987; background: color-mix(in srgb, #E8C987 16%, var(--card)); }
.cat-ic[data-ic="icecream"] { color: #B0457E; background: color-mix(in srgb, #B0457E 13%, var(--card)); }
:root[data-theme="dark"] .cat-ic[data-ic="icecream"] { color: #F0A3CB; background: color-mix(in srgb, #F0A3CB 16%, var(--card)); }
.cat-ic[data-ic="cookie"] { color: #8A5A2B; background: color-mix(in srgb, #8A5A2B 13%, var(--card)); }
:root[data-theme="dark"] .cat-ic[data-ic="cookie"] { color: #DDB089; background: color-mix(in srgb, #DDB089 16%, var(--card)); }
.cat-ic[data-ic="juice"] { color: #C46A00; background: color-mix(in srgb, #C46A00 13%, var(--card)); }
:root[data-theme="dark"] .cat-ic[data-ic="juice"] { color: #F7B860; background: color-mix(in srgb, #F7B860 16%, var(--card)); }
.cat-ic[data-ic="mug"] { color: #6B5A2E; background: color-mix(in srgb, #6B5A2E 13%, var(--card)); }
:root[data-theme="dark"] .cat-ic[data-ic="mug"] { color: #D3C08A; background: color-mix(in srgb, #D3C08A 16%, var(--card)); }
.cat-ic[data-ic="candy"] { color: #B03A6A; background: color-mix(in srgb, #B03A6A 13%, var(--card)); }
:root[data-theme="dark"] .cat-ic[data-ic="candy"] { color: #F29BC0; background: color-mix(in srgb, #F29BC0 16%, var(--card)); }
.cat-ic[data-ic="water"] { color: #1F7FB8; background: color-mix(in srgb, #1F7FB8 13%, var(--card)); }
:root[data-theme="dark"] .cat-ic[data-ic="water"] { color: #7DC6F0; background: color-mix(in srgb, #7DC6F0 16%, var(--card)); }
.cat-ic[data-ic="fruit"] { color: #B33A2E; background: color-mix(in srgb, #B33A2E 13%, var(--card)); }
:root[data-theme="dark"] .cat-ic[data-ic="fruit"] { color: #F2958A; background: color-mix(in srgb, #F2958A 16%, var(--card)); }
.cat-ic[data-ic="frozen"] { color: #2E7FA8; background: color-mix(in srgb, #2E7FA8 13%, var(--card)); }
:root[data-theme="dark"] .cat-ic[data-ic="frozen"] { color: #9AD6F2; background: color-mix(in srgb, #9AD6F2 16%, var(--card)); }
.cat-ic[data-ic="salad"] { color: #3C7F2A; background: color-mix(in srgb, #3C7F2A 13%, var(--card)); }
:root[data-theme="dark"] .cat-ic[data-ic="salad"] { color: #9AD98A; background: color-mix(in srgb, #9AD98A 16%, var(--card)); }
.cat-ic[data-ic="meat"] { color: #A33A3A; background: color-mix(in srgb, #A33A3A 13%, var(--card)); }
:root[data-theme="dark"] .cat-ic[data-ic="meat"] { color: #F09A9A; background: color-mix(in srgb, #F09A9A 16%, var(--card)); }
.cat-ic[data-ic="cake"] { color: #A8508F; background: color-mix(in srgb, #A8508F 13%, var(--card)); }
:root[data-theme="dark"] .cat-ic[data-ic="cake"] { color: #E8A3D3; background: color-mix(in srgb, #E8A3D3 16%, var(--card)); }
.cat-ic[data-ic="wheat"] { color: #9A7B00; background: color-mix(in srgb, #9A7B00 13%, var(--card)); }
:root[data-theme="dark"] .cat-ic[data-ic="wheat"] { color: #EBD36A; background: color-mix(in srgb, #EBD36A 16%, var(--card)); }
.cat-ic[data-ic="bag"] { color: #7A5E3E; background: color-mix(in srgb, #7A5E3E 13%, var(--card)); }
:root[data-theme="dark"] .cat-ic[data-ic="bag"] { color: #D3B795; background: color-mix(in srgb, #D3B795 16%, var(--card)); }
.cat-ic[data-ic="clean"] { color: #2E6F8F; background: color-mix(in srgb, #2E6F8F 13%, var(--card)); }
:root[data-theme="dark"] .cat-ic[data-ic="clean"] { color: #8CC6E2; background: color-mix(in srgb, #8CC6E2 16%, var(--card)); }
.cat-ic[data-ic="basket"] { color: #5E6B66; background: color-mix(in srgb, #5E6B66 13%, var(--card)); }
:root[data-theme="dark"] .cat-ic[data-ic="basket"] { color: #B7C2BD; background: color-mix(in srgb, #B7C2BD 16%, var(--card)); }
.cat-ic-btn { border: 1px dashed transparent; background: none; padding: 2px; border-radius: 12px; cursor: pointer; }
.cat-ic-btn:hover, .cat-ic-btn:focus-visible { border-color: var(--ce); }
.ic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; padding: 10px; margin: 4px 0 10px; background: var(--raise); border: 1px solid var(--rule); border-radius: 12px; }
.ic-grid[hidden] { display: none; }
.ic-grid button { display: grid; justify-items: center; gap: 4px; padding: 8px 4px; border: 1px solid transparent; border-radius: 10px; background: none; cursor: pointer; font: inherit; color: var(--ink); }
.ic-grid button:hover { background: var(--card); }
.ic-grid button.on { border-color: var(--ce); background: var(--card); }
.ic-grid small { font-size: 11.5px; color: var(--mut); }
.cat-new { margin: 8px 0 4px; gap: 8px; }
.cat-new input { flex: 1; min-width: 0; }
/* Insights (Fahd, 5 Dec): label and comparison on the left, the main figure on the right */
#view .tiles.ins-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile.ins-tile { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--rule-soft); }
.ins-tiles .tile.ins-tile:nth-child(-n+2) { border-top: 0; }
.ins-tiles .tile.ins-tile:nth-child(odd) { border-left: 0; }
.tile.ins-tile .it-l { display: grid; gap: 3px; min-width: 0; }
.tile.ins-tile .w { order: 0; }
.tile.ins-tile .it-s { font-size: 13px; color: var(--mut); }
.tile.ins-tile .it-s.bad { color: var(--po); font-weight: 600; }
.tile.ins-tile .it-s .chg { margin-left: 2px; }
.tile.ins-tile .n { order: 0; text-align: right; white-space: nowrap; flex: none; }
@container pane (max-width: 520px) { #view .tiles.ins-tiles { grid-template-columns: 1fr; } .ins-tiles .tile.ins-tile { border-left: 0; } .ins-tiles .tile.ins-tile:nth-child(2) { border-top: 1px solid var(--rule-soft); } }
@media (max-width: 520px) { #view .tiles.ins-tiles { grid-template-columns: 1fr; } .ins-tiles .tile.ins-tile { border-left: 0; } .ins-tiles .tile.ins-tile:nth-child(2) { border-top: 1px solid var(--rule-soft); } }
.ins-sec { margin-top: 22px; }
.ins-sh { align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.ins-sh h2 { margin: 0; }
.ins-sec .seg-chips { margin: 8px 0 10px; }
.list.tapl .item { width: 100%; display: flex; align-items: center; gap: 12px; cursor: pointer; text-align: left; }
@media (hover: hover) { .list.tapl .item:hover { background: var(--raise); } }
.list.tapl .rk { width: 24px; flex: none; color: var(--mut); font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.list.tapl .price { display: grid; justify-items: end; gap: 3px; white-space: nowrap; font-weight: 700; font-variant-numeric: tabular-nums; }
.list.tapl .price .chg { margin: 0; font-size: 12px; }
.list.tapl .price .pill { font-size: 11.5px; font-weight: 600; }
.list.tapl .chev { color: var(--mut); font-size: 20px; flex: none; }
.more-btn { margin-top: 8px; }
.seg.seg-full { display: flex; width: 100%; margin-top: 0; }
.seg.seg-full button { flex: 1; }
.d-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.d-sum > div { background: var(--card); border: 1px solid var(--rule-soft); border-radius: 10px; padding: 9px 11px; min-width: 0; display: grid; gap: 2px; }
.d-sum span { font-size: 12px; color: var(--mut); }
.d-sum b { font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-sum b .chg { margin: 0; font-size: 15px; }
@media (max-width: 520px) { .d-sum { grid-template-columns: 1fr 1fr; } }
.d-chart .ch-bars { gap: 3px; }
.d-chart .ch-x span { flex: 1; text-align: center; white-space: nowrap; overflow: visible; min-width: 0; }
.d-chart { margin-top: 14px; }
.d-chart .ch-x span:last-child { text-align: right; direction: rtl; }
/* Settings: Shop location card and delivery areas (Fahd, 5 Dec) */
.card.pin-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.card.pin-row .grow { flex: 1 1 220px; min-width: 0; display: grid; gap: 3px; }
.card.pin-row > .btn { flex: none; }
.pr-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pr-top b { font-size: 16px; }
.pr-addr { font-weight: 600; font-size: 14px; }
.pr-thumb { width: 64px; height: 64px; flex: none; border-radius: 12px; background: var(--raise); border: 1px solid var(--rule-soft); display: grid; place-items: center; overflow: hidden; }
.pr-thumb svg { width: 100%; height: 100%; }
.pr-thumb .bld { fill: color-mix(in srgb, #F0A202 30%, var(--card)); stroke: #C98A00; stroke-width: 2; stroke-linejoin: round; }
.pr-thumb .door { fill: #E8590C; stroke: var(--card); stroke-width: 2; }
.pr-thumb.none svg { width: 30px; height: 30px; fill: none; stroke: var(--mut); stroke-width: 1.8; }
@media (max-width: 520px) { .card.pin-row > .btn { width: 100%; } }
.f-l { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.area-box { border: 1px solid var(--rule); border-radius: 12px; padding: 12px; background: var(--raise); }
.area-act { margin-top: 10px; gap: 12px; align-items: center; flex-wrap: wrap; }
.area-act .btn .i { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; vertical-align: -3px; margin-right: 4px; }
.ap-map { height: 300px; border-radius: 12px; overflow: hidden; border: 1px solid var(--rule); background: var(--raise); position: relative; }
.ap-map[hidden] { display: none; }
.ap-load { position: absolute; inset: 0; display: grid; place-items: center; color: var(--mut); font-size: 14px; }
.ap-tools { display: flex; align-items: center; gap: 12px; margin: 12px 0 8px; flex-wrap: wrap; }
.ap-tools input { flex: 1 1 180px; min-width: 0; }
.ap-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.ap-i { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 10px; background: var(--card); cursor: pointer; font-size: 14px; min-width: 0; }
.ap-i span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-i.on { border-color: var(--ce); background: var(--cel); color: var(--ce-ink); font-weight: 600; }
.ap-i input { margin: 0; accent-color: var(--ce); }
#pCats.chips.wrap { flex-wrap: wrap; overflow: visible; }
body.ws.pane-open .sticky-actions { margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px; }
@media (max-width: 959px) { body.ws.pane-open .sticky-actions { margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; } }
@container pane (max-width: 600px) { #view label.f.search { flex: 1 1 100%; width: 100%; max-width: none; } }
@media (max-width: 600px) { #view label.f.search { flex: 1 1 100%; width: 100%; max-width: none; } }
/* Top bar: label above the figure (6 Dec) */
.ws-bar .wb small { line-height: 1.2; }
.ws-bar .wb b { font-size: 14.5px; }
.ws-bar .wb b em { font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--po); margin-left: 4px; }
/* Reports lists: rank numbers on every list, tappable or not (6 Dec) */
.list.rank .item:has(> .rk) { display: flex; align-items: center; gap: 12px; }
.list.rank .rk { width: 24px; flex: none; color: var(--mut); font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.list.rank button.item { width: 100%; font: inherit; color: inherit; border: 0; background: none; }
/* Products: search and one category picker side by side (6 Dec) */
.prod-bar { flex-wrap: nowrap; }
.prod-bar .f.search { flex: 1 1 auto; min-width: 0; max-width: none; }
.prod-bar .f.pcat { margin: 0; flex: 0 1 240px; min-width: 0; }
.prod-bar .f.pcat select { width: 100%; }
.prod-bar .link { white-space: nowrap; }
@media (max-width: 600px) { #view .prod-bar { gap: 8px; } #view .prod-bar label.f.search { flex: 1 1 55%; width: auto; } #view .prod-bar .f.pcat { flex: 0 1 45%; } }
@container pane (max-width: 600px) { #view .prod-bar label.f.search { flex: 1 1 55%; width: auto; } #view .prod-bar .f.pcat { flex: 0 1 45%; } }
.prod-bar .f.pcat select { text-overflow: ellipsis; }
/* Vans day strip: fade the side that has more days, instead of a hard cut (6 Dec) */
.vdays { position: relative; }
.vdays.more-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
.vdays.more-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px); mask-image: linear-gradient(90deg, transparent, #000 36px); }
.vdays.more-l.more-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); }
/* Vans on the map: a top-down van that turns to face where it drives, name beside it (6 Dec) */
.van-mk { position: relative; width: 34px; height: 34px; cursor: pointer; }
.van-mk .vm-chip { position: absolute; inset: 0; border-radius: 50%; background: var(--vc, #0B5D47); box-shadow: 0 0 0 2.5px #fff, 0 3px 10px rgba(0,0,0,.35); display: grid; place-items: center; }
.van-mk.live .vm-chip { box-shadow: 0 0 0 2.5px #fff, 0 0 0 5px rgba(54,224,160,.45), 0 3px 10px rgba(0,0,0,.35); }
.van-mk .vm-dir { width: 26px; height: 26px; display: grid; place-items: center; transition: transform .35s linear; will-change: transform; }
.van-mk .vm-dir svg { width: 24px; height: 24px; }
.van-mk .vt-body { fill: #fff; }
.van-mk .vt-glass { fill: var(--vc, #0B5D47); }
.van-mk .vt-roof { fill: #E4E9E6; }
.van-mk .vm-name { position: absolute; left: calc(100% + 6px); top: 50%; transform: translateY(-50%); white-space: nowrap; font-size: 12px; font-weight: 700; color: #17231F;
  background: #fff; padding: 2px 7px; border-radius: 7px; box-shadow: 0 1px 4px rgba(0,0,0,.25); pointer-events: none; }
:root[data-theme="dark"] .van-mk .vm-name { background: #1E2436; color: #fff; }
.van-mk:focus-visible { outline: 2px solid #F0A202; outline-offset: 3px; border-radius: 50%; }
/* zoomed in, the 3D van shows the direction; the chip steps aside and only the name stays, above it */
.van-mk.mini .vm-chip { display: none; }
.van-mk.mini .vm-name { left: 50%; top: auto; bottom: calc(100% + 16px); transform: translateX(-50%); }
@media (prefers-reduced-motion: reduce) { .van-mk .vm-dir { transition: none; } }
/* Any sheet: the first heading never runs under the close button (6 Dec) */
#sheet > .sheet-x + h3, #sheet > .sheet-x + * > :first-child:not(.wo-s) { padding-right: 44px; }
/* Van card (6 Dec) */
.vs-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.vs-head h3 { margin: 0; }
.vs-head .sub { margin: 2px 0 0; }
.vs-ic { width: 44px; height: 44px; flex: none; border-radius: 50%; background: #0B5D47; display: grid; place-items: center; }
.vs-ic svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vs-ic.on { box-shadow: 0 0 0 4px rgba(54,224,160,.35); }
.vs-where { display: flex; gap: 9px; align-items: flex-start; background: var(--raise); border: 1px solid var(--rule-soft); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; font-size: 14px; }
.vs-where i { width: 9px; height: 9px; border-radius: 50%; background: var(--mut); flex: none; margin-top: 6px; }
.vs-where.live i { background: #1FA971; box-shadow: 0 0 0 4px rgba(31,169,113,.18); }
.vs-bar { height: 6px; border-radius: 3px; background: var(--rule-soft); margin: 12px 0 4px; overflow: hidden; }
.vs-bar i { display: block; height: 100%; background: var(--ce); border-radius: 3px; }
.vs-h { margin: 16px 0 6px; }
.vs-stops { list-style: none; margin: 0; padding: 0; position: relative; }
.vs-stops::before { content: ''; position: absolute; left: 15px; top: 18px; bottom: 18px; width: 2px; background: var(--rule); }
.vs-stops li button { position: relative; width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 6px 9px 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: 10px; }
@media (hover: hover) { .vs-stops li button:hover { background: var(--raise); } }
.vs-n { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 2px solid var(--rule); font-weight: 700; font-size: 13px; z-index: 1; font-variant-numeric: tabular-nums; }
.vs-stops li.done .vs-n { background: var(--cel); border-color: var(--cel); color: var(--ce-ink); }
.vs-stops li.done .title { color: var(--mut); }
.vs-stops li.next .vs-n { border-color: #F0A202; background: #FFF4DC; color: #6B4500; }
:root[data-theme="dark"] .vs-stops li.next .vs-n { background: #3A2E12; color: #F7C65A; }
.vs-stops .grow { display: grid; min-width: 0; }
.vs-stops .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-stops .meta { font-size: 12.5px; color: var(--mut); }

/* Van colours (6 Dec) */
.vc-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.vc-pick button { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--vc); cursor: pointer; box-shadow: 0 0 0 2px var(--card), 0 0 0 3px var(--rule); position: relative; }
.vc-pick button.on { box-shadow: 0 0 0 2px var(--card), 0 0 0 4.5px var(--ink); }
.vc-pick button.on::after { content: ''; position: absolute; left: 12px; top: 8px; width: 7px; height: 13px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.vc-pick button:focus-visible { outline: 2px solid #F0A202; outline-offset: 4px; }
.vc-pick .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.vs-col { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; font-size: 14px; font-weight: 600; }
.vs-col .vc-pick { margin: 0; gap: 6px; }
.vs-col .vc-pick button { width: 26px; height: 26px; }
.vs-col .vc-pick button.on::after { left: 8.5px; top: 4.5px; width: 6px; height: 11px; }
.vc-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--vc); flex: none; margin-right: 10px; display: inline-block; }
button.van-ic { border: 0; cursor: pointer; }
button.van-ic:hover { filter: brightness(1.08); }
button.van-ic:focus-visible { outline: 2px solid #F0A202; outline-offset: 2px; }
/* Vans: smaller as the map zooms out */
.van-mk { transition: width .2s, height .2s; }
.van-mk.far { width: 24px; height: 24px; }
.van-mk.far .vm-dir svg { width: 17px; height: 17px; }
.van-mk.far .vm-name { display: none; }
.van-mk.farther { width: 12px; height: 12px; }
.van-mk.farther .vm-dir { display: none; }
.van-mk.farther .vm-chip { box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0,0,0,.35); }
/* Map menu: show or hide vans */
.mm-sw { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer; }
.mm-sw:hover { background: rgba(127,140,150,.12); }
.mm-sw input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand, #0B5D47); flex: none; }
/* Vans: week heading */
.vday-month { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.vw-arrow { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line, rgba(127,140,150,.3)); background: none; color: inherit; font: inherit; font-size: 18px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0; }
.vw-arrow:hover { background: rgba(127,140,150,.12); }
.vw-today { margin-left: 4px; font-size: 13px; }

/* ---------- Cafe app (rebuilt 6 Dec 2026): Today, Order by each supplier's next delivery, My cafe ---------- */
.cf { max-width: 760px; }
.cf h2.cf-h { margin: 26px 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--mut); }
.cf .cf-h2 { margin: 26px 0 10px; align-items: center; } .cf .cf-h2 h2.cf-h { margin: 0; }
.cf-hi { display: flex; gap: 14px; align-items: center; margin-bottom: 6px; }
.cf-hi h1 { margin: 0; } .cf-hi .sub { color: var(--mut); font-size: 15px; }
.cf-me { width: 46px; height: 46px; border-radius: 12px; border: 0; background: var(--ce); color: var(--on-ce); font: 800 18px var(--display); cursor: pointer; flex: none; }
.cf-me:hover { background: var(--ced); }
.cf-stack { display: grid; gap: 10px; }
.cf-row { display: flex; gap: 12px; align-items: flex-start; }
.cf-row .grow, .cf-sh-head .grow, .cf-line .grow { flex: 1; min-width: 0; }
.cf .t, .cf-sup .t { font-weight: 700; }
.cf .meta, .cf-sup .meta { color: var(--mut); font-size: 14px; margin-top: 2px; overflow-wrap: anywhere; }
.cf-av { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--cel); color: var(--ce-ink); font: 800 13px var(--display); }
.cf-av.amber { background: var(--sal); color: var(--sad); } .cf-av.red { background: var(--pol); color: var(--po); }
.cf-q { margin: 12px 0 10px; font-weight: 600; }
.cf-btns { display: flex; gap: 8px; margin-top: 10px; } .cf-btns .btn { flex: 1 1 0; padding-left: 10px; padding-right: 10px; }
.cf-check { border-left: 3px solid var(--ce-ink); } .cf-chg { border-left: 3px solid var(--sa); }
.cf-when { font-weight: 600; font-size: 14px; white-space: nowrap; }
.cf-van { margin-top: 8px; background: var(--cel); color: var(--ce-ink); border-radius: 8px; padding: 7px 10px; font-size: 14px; }
.cf-soon { color: var(--sad) !important; font-weight: 600; }
[data-theme="dark"] .cf-soon { color: var(--sa) !important; }
.cf-owe { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.cf-owe:hover { border-color: var(--line); }
.cf-big { font: 700 24px var(--ui); font-variant-numeric: tabular-nums; margin-top: 2px; }
.cf-sh { margin: 20px 0 8px; font-size: 15px; }
.cf-add { margin-top: 14px; }
/* Order */
.cf-order .ph { margin-bottom: 0; }
.cf-lead { margin: 4px 0 14px !important; }
.cf-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.cf-tools .cf-search { flex: 1 1 200px; margin: 0; }
.seg2 { display: inline-flex; background: var(--rule-soft); border-radius: 10px; padding: 3px; gap: 3px; flex: none; }
.seg2 button { border: 0; background: none; padding: 8px 12px; border-radius: 8px; font: 600 14px var(--ui); color: var(--mut); cursor: pointer; white-space: nowrap; }
.seg2 button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.cf-sup { padding: 0; margin-bottom: 12px; overflow: hidden; scroll-margin-top: 80px; }
.cf-sup > .loading, .cf-sup > .err, .cf-sup > .empty { margin: 14px; }
.cf-sup > .warn, .cf-sup > .note { margin: 0 14px 12px; }
.cf-sh-head { display: flex; gap: 12px; align-items: center; padding: 14px; }
.cf-sh-head .btn { flex: none; }
.cf-days { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 14px 12px; }
.cf-lines.none { display: none; }
.cf-line { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--rule-soft); }
.cf-line.in { background: color-mix(in srgb, var(--cel) 45%, transparent); }
.cf-line .stepper { flex: none; }
.cf-usual { color: var(--ce-ink) !important; font-weight: 600; }
.cf-up { color: var(--po); font-weight: 600; } .cf-down { color: var(--wa); font-weight: 600; }
.cf-sup-foot { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid var(--rule-soft); background: var(--raise); }
.cf-sup-foot .grow { flex: 1; }
.cf-sub { font-weight: 700; font-variant-numeric: tabular-nums; } .cf-sub.bad { color: var(--po); }
.cf-space { height: 70px; }
.cf-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-b) + 14px + env(safe-area-inset-bottom)); z-index: 12;
  width: min(728px, calc(100% - 24px)); display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--ce); color: var(--on-ce); border-radius: 14px; padding: 10px 10px 10px 16px; box-shadow: var(--sh-up); }
.cf-bar > div { display: flex; flex-direction: column; min-width: 0; } .cf-bar strong { font-size: 14px; } .cf-bar span { font: 700 18px var(--ui); font-variant-numeric: tabular-nums; }
.cf-bar .btn { background: var(--card); color: var(--ce-ink); flex: none; } .cf-bar .btn:hover { background: var(--raise); }
@media (min-width: 960px) { .cf-bar { left: calc(var(--side) + 32px + 380px); } }
.cf-rv { border: 1px solid var(--rule); border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.cf-rv table { margin: 8px 0; } .cf-rv.bad { opacity: .75; }
.cf-rv .cf-note { width: 100%; }
.cf-done { text-align: left; margin: 6px 0 12px; } .cf-done-r { padding: 6px 0; border-bottom: 1px solid var(--rule-soft); }
@media (max-width: 420px) { .cf-line { gap: 8px; padding: 10px 12px; } .cf-sh-head { padding: 12px; } .seg2 button { padding: 8px 9px; } }
/* ---------- Phones (6 Dec): easy closing, sheets, week strip, spacing ---------- */
.sheet-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
@media (max-width: 759px) {
  /* Every sheet gets a visible close button (44 px touch target, Apple HIG) next to the drag handle */
  .sheet-x { display: grid; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; background: var(--raise); color: var(--ink); }
  .sheet { padding-top: 24px; touch-action: pan-y; transition: transform .2s var(--ease); }
  .sheet::before { width: 44px; }
  .ws-sheet .wo-s { margin: 0 -18px; }
  .ws-sheet .wo-h, .ws-sheet .wo-r, .ws-sheet .wo-empty { padding-left: 18px; padding-right: 18px; }
  .ws-sheet .wo-r.row { padding-right: 14px; }
  .ws-sheet .wo-go { padding-left: 18px; }
  .ws-sheet .wo-t { font-size: 15px; }
  .ws-sheet .wo-m { font-size: 13px; }
  .ws-sheet .wo-r, .ws-sheet .wo-go { min-height: 48px; align-content: center; }
}
@media (max-width: 959px) {
  /* Page header on phones: a clear round close button */
  body.ws.pane-open .subnav { padding: 0 12px 0 16px; }
  .pn-x { width: 40px; height: 40px; border-radius: 50%; background: var(--raise); color: var(--ink); }
  .pn-head { min-height: 52px; }
}
/* Vans week: all 7 days always fit, never scroll sideways */
.vdays { overflow: visible; }
.vday { flex: 1 1 0; min-width: 0; }
@media (max-width: 520px) {
  .vdays { gap: 4px; padding: 2px 0; }
  .vday { padding: 6px 2px 7px; border-radius: 10px; }
  .vday .vd-n { font-size: 18px; }
  .vday .vd-none { font-size: 0; }
  .vday .vd-none::before { content: "\2013"; font-size: 12px; color: var(--mut); font-style: normal; }
  .vday .vd-v { font-size: 11px; }
  .grid2 { gap: 10px 12px; }
}

/* Chains (6 Dec 2026): warehouse stock hints in buying mode, stock table */
.cf-stock.red { color: var(--po); font-weight: 600; }
.cf-stock.amber, .st-exp { color: var(--sad); }
[data-theme="dark"] .cf-stock.amber, [data-theme="dark"] .st-exp { color: var(--sa); }
.sh-h { margin: 18px 0 8px; font-size: 14px; }
.inline-f { margin-top: 10px; }
