/* GSC staff app. The shop's own look: warm paper, ink, and a colour for each job, like shelf tags.
   Orders are pink, stock and requests teal, buying yellow, the office blue. Light and dark. */
@font-face {
  font-family: 'GSOpenSans';
  src: url('/img/os.woff2') format('woff2');
  font-weight: 300 800;
  font-display: swap;
}
@font-face {
  font-family: 'GSMontserrat';
  src: url('/img/ms.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #F3F1EE;
  --paper: #FFFFFF;
  --soft: #F3F1EE;
  --raise: #EDE9E3;
  --line: #E6E1DA;
  --line2: #CFC6BA;
  --ink: #1D1A16;
  --ink2: #3A352F;
  --on-ink: #FFFFFF;
  --mute: #6B635A;
  --mute2: #8E857C;
  --accent: #FA4362;
  --accent-ink: #C21E3C;
  --accent-soft: #FFE4E9;
  --accent-line: #F7C3CD;
  --orders: #C21E3C; --orders-ink: #C21E3C; --orders-soft: #FFE4E9; --on-orders: #FFFFFF;
  --stock: #0E7A72; --stock-ink: #0A5F59; --stock-soft: #D9F0EC; --on-stock: #FFFFFF;
  --buying: #F2D129; --buying-ink: #7A5A00; --buying-soft: #FFF4C2; --on-buying: #1D1A16;
  --office: #2F55C9; --office-ink: #2F55C9; --office-soft: #E3E9FA; --on-office: #FFFFFF;
  --chart-now: #2F55C9; --chart-ly: #C2761B;   /* sales this year / last year (checked for colour blindness) */
  --ok: #1F7A4C;
  --ok-soft: #E6F3EC;
  --warn: #9A5B00;
  --warn-soft: #FFF2DB;
  --bad: #B3261E;
  --bad-soft: #FCE8E6;
  --info: #2C3E73;
  --info-soft: #EEF1F8;
  --info-line: #D5DCEE;
  --wa: #1DA851;
  --veil: rgba(22, 19, 15, 0.62);
  --scrim: rgba(22, 19, 15, 0.45);
  --radius: 18px;
  --tab-h: 78px;
  --head-h: 64px;
  --head-font: 'GSMontserrat', 'GSOpenSans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
  font-family: 'GSOpenSans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 100%;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

/* Dark: the same shop after hours. Tags keep their colour and get dark writing. */
:root[data-theme="dark"] {
  --bg: #16130F;
  --paper: #211D18;
  --soft: #2C2721;
  --raise: #3A342C;
  --line: #3A342C;
  --line2: #4A433A;
  --ink: #F6F1EA;
  --ink2: #E9DFD2;
  --on-ink: #16130F;
  --mute: #B8AEA2;
  --mute2: #8E857C;
  --accent: #FA4362;
  --accent-ink: #FF7088;
  --accent-soft: #2A1C1F;
  --accent-line: #4A2830;
  --orders: #FA4362; --orders-ink: #FF7088; --orders-soft: #2A1C1F; --on-orders: #16130F;
  --stock: #3CC4B4; --stock-ink: #5FD3C5; --stock-soft: #173230; --on-stock: #16130F;
  --buying: #F2D129; --buying-ink: #F2D129; --buying-soft: #2B2716; --on-buying: #16130F;
  --office: #7C9BFF; --office-ink: #9DB3FF; --office-soft: #1C2235; --on-office: #16130F;
  --chart-now: #5B7FE6; --chart-ly: #C2761B;
  --ok: #5CC98E;
  --ok-soft: #16301F;
  --warn: #F2B544;
  --warn-soft: #2E2412;
  --bad: #FF8A80;
  --bad-soft: #3A1D1B;
  --info: #A9B8E8;
  --info-soft: #1E2333;
  --info-line: #2E3A5E;
  --scrim: rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { min-height: 100dvh; background: var(--bg); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0; font-family: var(--head-font); }
h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: 1.05rem; font-weight: 800; }
h3 { font-size: 0.95rem; font-weight: 800; }
p { margin: 0; }
a { color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.visually-hidden {
  position: absolute; clip-path: inset(50%); overflow: hidden; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0; white-space: nowrap;
}

/* The logo: ink on light, cream on dark. */
.logo-light { display: none; }
:root[data-theme="dark"] .logo-ink { display: none; }
:root[data-theme="dark"] .logo-light { display: block; }

/* ---------- app shell ---------- */
.top {
  position: sticky; top: 0; z-index: 5;
  height: calc(var(--head-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 12px 0 16px;
  display: flex; align-items: center; gap: 8px;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.top .brand { flex: none; display: block; }
.top .brand img { height: 26px; width: auto; }
.top .spacer { flex: 1; }
.testflag {
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--warn); background: var(--warn-soft); border-radius: 4px; padding: 3px 7px; flex: none;
}
.top-shop { min-width: 0; display: flex; }
.shoppill {
  display: inline-flex; align-items: center; gap: 6px; min-width: 0; height: 44px; padding: 0 12px 0 14px; border-radius: 999px; border: 0;
  background: var(--soft); color: var(--ink); font-weight: 700; font-size: 0.875rem; cursor: pointer;
}
.shoppill .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shoppill svg { width: 16px; height: 16px; flex: none; }
.shoppill.static { cursor: default; padding: 0 14px; }
.iconbtn {
  min-width: 44px; min-height: 44px; border: 0; background: transparent; border-radius: 12px; color: var(--ink);
  display: inline-grid; place-items: center; cursor: pointer;
}
.iconbtn:hover { background: var(--soft); }
.iconbtn svg { width: 22px; height: 22px; }
.iconbtn.round { border-radius: 999px; background: var(--soft); flex: none; }
.iconbtn.round:hover { background: var(--raise); }
.iconbtn.round svg { width: 20px; height: 20px; }
.top .me {
  flex: none; width: 44px; height: 44px; border-radius: 999px; background: var(--ink); color: var(--on-ink);
  display: grid; place-items: center; text-decoration: none; font: 800 1rem var(--head-font);
}
.top .me[aria-current="page"] { outline: 3px solid var(--accent); outline-offset: 2px; }

main {
  max-width: 760px; margin: 0 auto;
  padding: 16px 16px calc(var(--tab-h) + env(safe-area-inset-bottom) + 28px);
}
main.bare { padding-bottom: 40px; }
#view:focus { outline: none; }

/* Bottom bar: Today, your three buttons, and Scan (or Find) in the middle. */
.tabs {
  position: fixed; inset: auto 0 0 0; z-index: 5;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding: 0 4px env(safe-area-inset-bottom);
  background: var(--paper); border-top: 1px solid var(--line);
}
.tabs ul { list-style: none; margin: 0 auto; padding: 0 0 8px; max-width: 560px; height: var(--tab-h); display: flex; align-items: center; justify-content: space-around; }
.tabs li { flex: 1; display: flex; justify-content: center; min-width: 0; }
.tabs a {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; max-width: 76px; padding-top: 6px;
  text-decoration: none; color: var(--ink); font-size: 0.6875rem; font-weight: 700;
}
.tabs a .ico { width: 52px; height: 30px; border-radius: 999px; display: grid; place-items: center; color: var(--mute); }
.tabs a.job-orders .ico { color: var(--orders-ink); }
.tabs a.job-stock .ico { color: var(--stock-ink); }
.tabs a.job-buying .ico { color: var(--buying-ink); }
.tabs a.job-office .ico { color: var(--office-ink); }
.tabs a.job-ink .ico { color: var(--ink); }
.tabs a svg { width: 22px; height: 22px; }
.tabs a .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tabs a[aria-current="page"] { font-weight: 800; }
.tabs a[aria-current="page"] .ico { background: var(--raise); }
.tabs .count {
  position: absolute; top: 0; left: calc(50% + 8px); min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 4px; background: var(--ink); color: var(--on-ink); font: 800 0.6875rem/18px var(--head-font); text-align: center;
}
.tabs .job-orders .count { background: var(--orders); color: var(--on-orders); }
.tabs .job-stock .count { background: var(--stock); color: var(--on-stock); }
.tabs .job-buying .count { background: var(--buying); color: var(--on-buying); }
.tabs .job-office .count { background: var(--office); color: var(--on-office); }
.tabs li.centre { flex: 0 0 auto; padding: 0 2px; }
.centre-btn {
  position: relative; top: -12px; width: 60px; height: 60px; border-radius: 999px; border: 4px solid var(--bg);
  background: var(--ink); color: var(--on-ink); display: grid; place-items: center; cursor: pointer; flex: none;
  box-shadow: 0 6px 16px rgba(22, 19, 15, 0.22);
}
.centre-btn svg { width: 26px; height: 26px; }
.centre-btn:active { transform: scale(0.96); }

/* ---------- building blocks ---------- */
.stack > * + * { margin-top: 12px; }
.stack-lg > * + * { margin-top: 22px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--mute); }
.small { font-size: 0.85rem; }
.tiny { font-size: 0.75rem; }
.pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
/* Buttons that don't fit beside the heading go under it, and onto a second line, rather than off the side of a phone. */
.pagehead > .row { flex-wrap: wrap; }
.pagehead h1 { flex: 1; }
.back { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--mute); text-decoration: none; min-height: 44px; }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; display: block;
}
a.card { color: inherit; text-decoration: none; }
a.card:hover { border-color: var(--mute2); }
.card.flat { padding: 0; overflow: hidden; }
.card h2 + * { margin-top: 6px; }
.card.alert { border-color: var(--accent-line); background: var(--accent-soft); }

.list { list-style: none; margin: 0; padding: 0; }
.list > li + li { border-top: 1px solid var(--line); }
.item { display: flex; gap: 12px; align-items: center; padding: 12px 14px; color: inherit; text-decoration: none; min-height: 56px; }
a.item:hover { background: var(--soft); }
.item .main { flex: 1; min-width: 0; }
.item .title { font-weight: 700; }
.item .sub { font-size: 0.85rem; color: var(--mute); }
.chev { color: var(--mute2); flex: none; width: 20px; height: 20px; }
.item svg:not(.chev) { width: 22px; height: 22px; }

.section-title { font-family: var(--head-font); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); margin: 22px 2px 8px; }
.section-title:first-child { margin-top: 0; }

.chip {
  display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 9px;
  font-size: 0.75rem; font-weight: 700; white-space: nowrap; background: var(--soft); color: var(--mute); border: 1px solid var(--line);
}
.chip.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.chip.pink { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.chip.info { background: var(--info-soft); color: var(--info); border-color: transparent; }

.shot {
  width: 48px; height: 56px; flex: none; border-radius: 8px; background: #fff; border: 1px solid var(--line);
  object-fit: contain; padding: 2px;
}
.shot.big { width: 64px; height: 78px; }
.shot.none { display: grid; place-items: center; color: var(--mute2); }

/* Today tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.tile { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; color: inherit; text-decoration: none; display: grid; gap: 4px; min-height: 116px; align-content: start; }
.tile:hover { border-color: var(--mute2); }
.tile .big { font-size: 2rem; font-weight: 800; line-height: 1; }
.tile .label { font-weight: 700; }
.tile .note { font-size: 0.82rem; color: var(--mute); }
.tile.hot { border-color: var(--accent-line); background: var(--accent-soft); }
.tile.hot .big { color: var(--accent-ink); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 18px; border-radius: 12px; border: 1.5px solid var(--line2);
  background: var(--paper); color: var(--ink); font-family: var(--head-font); font-weight: 800; font-size: 0.9rem; text-decoration: none; cursor: pointer;
  touch-action: manipulation;
}
.btn:hover { background: var(--soft); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.btn.primary:hover { background: var(--ink2); border-color: var(--ink2); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.accent:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn.wa { background: #1DA851; border-color: #1DA851; color: #fff; }
.btn.wa:hover { background: #168a42; }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--mute); }
.btn.small { min-height: 40px; padding: 6px 12px; font-size: 0.9rem; border-radius: 10px; }
.btn.block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.btn svg { width: 20px; height: 20px; }
.actions { display: grid; gap: 10px; margin-top: 16px; }
.actions.two { grid-template-columns: 1fr 1fr; }

.sticky-actions {
  position: sticky; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 8px); z-index: 3;
  background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(6px); padding: 10px 0 2px; margin-top: 16px;
  display: grid; gap: 10px;
}

/* Segmented control */
.seg { display: flex; background: var(--raise); border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 14px; overflow-x: auto; }
.seg a, .seg button {
  flex: 1; min-height: 40px; display: grid; place-items: center; border-radius: 9px; border: 0; background: transparent;
  font-weight: 700; color: var(--mute); text-decoration: none; white-space: nowrap; padding: 0 8px; cursor: pointer; font-size: 0.88rem;
}
.seg [aria-current="page"], .seg [aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(22, 19, 15, 0.12); }

/* Steppers */
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); flex: none; }
.stepper button { width: 44px; height: 44px; border: 0; background: transparent; font-size: 1.35rem; font-weight: 700; cursor: pointer; border-radius: 10px; touch-action: manipulation; }
.stepper button:hover { background: var(--soft); }
.stepper output, .stepper input { min-width: 44px; text-align: center; font-weight: 800; font-size: 1.05rem; }
.stepper input { width: 52px; border: 0; background: transparent; padding: 0; height: 44px; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.of { font-size: 0.85rem; color: var(--mute); white-space: nowrap; }
.done-line { background: var(--ok-soft); }
.done-line .title::after { content: ' ✓'; color: var(--ok); }

/* Forms */
.field { display: grid; gap: 6px; }
.field + .field { margin-top: 14px; }
.field > label, .field > .label { font-weight: 700; font-size: 0.92rem; }
.hint { font-size: 0.82rem; color: var(--mute); }
input[type="text"], input[type="password"], input[type="search"], input[type="tel"], input[type="email"], input[type="date"], input[type="time"], input[type="number"], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 1.5px solid var(--line2); border-radius: 12px; background: var(--paper); font-size: 1rem;
}
textarea { min-height: 84px; resize: vertical; }
/* Every select drawn as a box like the others, with a small chevron (Nathan, 10 Nov 2026: "the selector which looks
   horrible on safari": Safari drew its own grey button, ignoring the border and corners). */
select {
  -webkit-appearance: none; appearance: none; padding-right: 38px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--mute) 50%), linear-gradient(135deg, var(--mute) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat;
}
select[multiple], select[size]:not([size="1"]) { background-image: none; padding-right: 12px; }
/* Safari on the phone centres a date and lets an empty one shrink: left, and the box's full height. */
input[type="date"]::-webkit-date-and-time-value { text-align: left; }
@supports (-webkit-touch-callout: none) {
  input[type="date"] { display: block; -webkit-appearance: none; }
}
/* The supplier, found by typing (screens/papers.js): the one chosen, in a box like the others, with Change. */
.suppick { display: grid; gap: 6px; }
.suppicked { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 6px 6px 12px; border: 1.5px solid var(--line2); border-radius: 12px; background: var(--paper); }
.suppicked strong { min-width: 0; overflow-wrap: anywhere; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--ink); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 700; font-size: 0.92rem; padding: 0; margin-bottom: 6px; }
.choices { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span {
  display: grid; place-items: center; text-align: center; min-height: 48px; padding: 8px 10px; border: 1.5px solid var(--line2); border-radius: 12px; background: var(--paper); font-weight: 700;
}
.choice input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--on-ink); }
.choice input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; padding-top: 10px; }
.check input { width: 22px; height: 22px; accent-color: var(--ink); margin: 0; flex: none; }

/* Search results */
.results { margin-top: 8px; max-height: 50vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.results:empty { display: none; }
.results button { width: 100%; text-align: left; border: 0; background: transparent; display: flex; gap: 10px; align-items: center; padding: 8px 10px; min-height: 52px; cursor: pointer; }
.results button + button { border-top: 1px solid var(--line); }
.results button:hover, .results button:focus-visible { background: var(--soft); }

/* Status steps */
.steps { display: flex; gap: 4px; margin: 10px 0 2px; }
.steps span { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.steps span.on { background: var(--ink); }
.steps span.now { background: var(--accent); }
.steplabels { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--mute); }

/* History */
.history { list-style: none; padding: 0; margin: 0; font-size: 0.85rem; }
.history li { padding: 6px 0 6px 16px; border-left: 2px solid var(--line); position: relative; }
.history li::before { content: ''; position: absolute; left: -5px; top: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--mute2); }

/* Today: the "turn on notifications" card (public/js/screens/notify.js); takes no room until it has something to say. */
.notify-slot:empty { display: none; }
.notify-card { border-color: var(--line); }

/* The packing shelf (public/js/shelf.js): 18 slots of 20 cm on four levels (A top to D bottom), drawn like the real shelf. The drawing
   scrolls sideways on a phone; the level names stay put on the left. */
.shelf-wrap { display: grid; grid-template-columns: auto 1fr; gap: 6px; align-items: start; position: relative; }
/* The shelf on the Orders screen, to look at: empty slots are quiet; a box opens a small card saying which order it is. */
.shelf-look .shelf-empty .shelf-hit { cursor: default; }
.shelf-fit { display: block; }
.shelf-fit-svg { display: block; width: 100%; height: auto; }
.shelf-level-letter { font-size: 20px; font-weight: 800; fill: var(--mute); }
.shelf-fit .shelf-label { font-size: 12px; }
.shelf-fit .shelf-code { font-size: 11px; }
.shelf-look .shelf-empty:hover .shelf-hit { fill: transparent; }
.shelf-pop { position: absolute; z-index: 5; width: 240px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.18); padding: 8px 10px; display: grid; gap: 6px; }
.shelf-pop[hidden] { display: none; }
.shelf-pop-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.shelf-pop-order { display: grid; gap: 1px; padding: 6px 8px; border-radius: 8px; background: var(--soft); color: inherit; text-decoration: none; }
.shelf-pop-order .title { font-weight: 700; }
.shelf-pop-order .sub { font-size: 0.8rem; color: var(--mute); }
.shelf-levels { display: grid; grid-template-rows: 22px repeat(4, 69px); padding-top: 4px; font-size: 0.72rem; font-weight: 700; color: var(--mute); }
.shelf-levels span { align-self: center; padding-bottom: 7px; }
.shelf-levels span:nth-child(1) { grid-row: 2; }
.shelf-levels span:nth-child(2) { grid-row: 3; }
.shelf-levels span:nth-child(3) { grid-row: 4; }
.shelf-levels span:nth-child(4) { grid-row: 5; }
.shelf-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 10px; background: var(--soft); padding: 4px 4px 0; }
.shelf-svg { display: block; }
.shelf-num { font-size: 11px; fill: var(--mute); font-weight: 700; }
.shelf-label { font-size: 10px; fill: var(--mute); font-weight: 700; pointer-events: none; }
.shelf-post { fill: #6E6A64; }
.shelf-board { fill: #B98A55; }
.shelf-hit { fill: transparent; cursor: pointer; }
.shelf-cell:hover .shelf-hit, .shelf-cell:focus-visible .shelf-hit { fill: var(--accent-soft); }
.shelf-cell:focus { outline: none; }
.shelf-cell:focus-visible .shelf-hit { stroke: var(--accent); stroke-width: 2; }
.shelf-box { fill: #D8B07A; stroke: #8C6A3E; stroke-width: 1; }
.shelf-tape { fill: #E9CFA3; }
.shelf-code { font-size: 8.5px; font-weight: 700; fill: #3A2A14; }
.shelf-sel { fill: var(--accent); fill-opacity: 0.88; }
.shelf-check { fill: none; stroke: #fff; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.shelf-said { font-weight: 700; min-height: 1.4em; }
:root[data-theme="dark"] .shelf-post { fill: #8D877F; }
:root[data-theme="dark"] .shelf-board { fill: #8A6A45; }

/* The order page: paid / edit / cancel under the message card. */
.order-more { margin-top: 12px; }

pre.message {
  white-space: pre-wrap; font: inherit; font-size: 0.92rem; background: var(--ok-soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 0;
  overflow-wrap: anywhere;   /* a long link (the supplier portal's sign-in) wraps instead of running off */
}

.empty { text-align: center; padding: 28px 16px; color: var(--mute); }
.empty strong { display: block; color: var(--ink); font-size: 1.05rem; margin-bottom: 4px; }

/* ---------- sign-in ---------- */
.auth { max-width: 420px; margin: 0 auto; padding: 28px 18px 40px; }
.auth .logo { width: min(280px, 80%); margin: 6px auto 22px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.people button {
  min-height: 72px; border-radius: var(--radius); border: 1.5px solid var(--line); background: var(--paper);
  font-weight: 800; font-size: 1.05rem; cursor: pointer; display: grid; place-items: center; gap: 2px; padding: 8px;
}
.people button small { font-weight: 600; color: var(--mute); font-size: 0.75rem; }
.people button:hover { border-color: var(--ink); }
.pindots { display: flex; justify-content: center; gap: 16px; margin: 18px 0 8px; }
.pindots span { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink); }
.pindots span.on { background: var(--ink); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 300px; margin: 14px auto 0; }
.keypad button {
  height: 64px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--paper); font-size: 1.5rem; font-weight: 800; cursor: pointer; touch-action: manipulation;
}
.keypad button:active { background: var(--soft); }
.keypad .del { font-size: 1rem; }
.pinerr { min-height: 1.5em; text-align: center; color: var(--bad); font-weight: 700; }

/* ---------- dialogs ---------- */
dialog {
  border: 0; padding: 0; border-radius: 18px; width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 32px);
  background: var(--paper); color: var(--ink); box-shadow: 0 20px 60px rgba(22, 19, 15, 0.3);
}
dialog::backdrop { background: rgba(22, 19, 15, 0.45); }
dialog .dhead { display: flex; align-items: center; gap: 8px; padding: 14px 14px 6px 18px; }
dialog .dhead h2 { flex: 1; font-size: 1.15rem; }
dialog .dbody { padding: 6px 18px 18px; overflow: auto; max-height: calc(100dvh - 120px); }
@media (max-width: 600px) {
  dialog { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 18px 18px 0 0; max-height: 92dvh; padding-bottom: env(safe-area-inset-bottom); }
  dialog .dbody { max-height: calc(92dvh - 70px); }
}
dialog.scanner { background: #000; color: #fff; }
dialog.scanner .dhead h2 { color: #fff; }
dialog.scanner .iconbtn { color: #fff; }
.viewfinder { position: relative; aspect-ratio: 4 / 3; background: #111; border-radius: 14px; overflow: hidden; }
.viewfinder video { width: 100%; height: 100%; object-fit: cover; }
.viewfinder::after { content: ''; position: absolute; left: 10%; right: 10%; top: 38%; bottom: 38%; border: 3px solid var(--accent); border-radius: 10px; box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.25); }
.scanlast { min-height: 3em; margin-top: 10px; font-weight: 700; }
dialog.scanner input { background: #1d1d1d; color: #fff; border-color: #444; }

/* ---------- toasts ---------- */
.toasts { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 12px); z-index: 50; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast {
  pointer-events: auto; max-width: 520px; width: fit-content; margin: 0 auto; border: 0; padding: 12px 14px 12px 16px; border-radius: 14px;
  background: var(--ink); color: var(--on-ink); font-weight: 700; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  display: flex; gap: 12px; align-items: center;
}
.toast.bad { background: var(--bad); }
.toast.ok { background: var(--ok); }
.toast button { border: 0; background: transparent; color: inherit; font-weight: 800; min-height: 32px; cursor: pointer; }
/* As a manual popover the toast sits in the top layer, above any open dialog. */
.toast[popover] { position: fixed; inset: auto 12px calc(var(--tab-h) + env(safe-area-inset-bottom) + 12px); margin: 0 auto; }
.toast[popover]:is(:popover-open, .\:popover-open) { display: flex; }

.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
/* A website order's step still going into the order book (picking.js watchBook). */
.spinner.small { width: 18px; height: 18px; border-width: 2px; margin: 2px 0 0; flex: none; }
.book-wait { display: flex; gap: 12px; align-items: flex-start; background: var(--info-soft); border-color: var(--info-line); }
.book-wait p { margin: 4px 0 0; }
.item.book-pending { opacity: 0.65; }

@media (min-width: 900px) {
  main { padding-top: 24px; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
}
.center { text-align: center; }
.item.diff { background: var(--accent-soft); }
button.btnitem { width: 100%; border: 0; background: transparent; text-align: left; cursor: pointer; font: inherit; }
button.btnitem:hover { background: var(--soft); }
details > summary { cursor: pointer; min-height: 32px; list-style-position: inside; }
details[open] > summary { margin-bottom: 8px; }
.card ul { margin: 6px 0 0; padding-left: 18px; }
.card ul.list { padding-left: 0; margin: 0; }
.back svg { width: 20px; height: 20px; }
.actions-area { display: grid; gap: 10px; margin-top: 16px; }
.invite-code { font-size: 2.2rem; font-weight: 800; letter-spacing: 0.12em; text-align: center; margin: 8px 0 14px; }

/* ---------- sidebar (computers) ----------
   Every area this person may open, grouped by job in the job's colour. The light/dark switch and
   the person sit at the bottom. Phones keep the bottom bar. */
:root { --side-w: 248px; }
.side { display: none; }
@media (min-width: 1000px) {
  body.signed-in .side:not([hidden]) {
    display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 6;
    background: var(--paper); border-right: 1px solid var(--line); padding: 20px 14px 16px;
  }
  body.signed-in .top, body.signed-in main, body.signed-in .toasts { margin-left: var(--side-w); }
  body.signed-in .tabs { display: none; }
  body.signed-in { --tab-h: 0px; }
  body.signed-in .top .brand, body.signed-in .top .top-shop, body.signed-in .top .top-theme, body.signed-in .top .me { display: none; }
  body.signed-in .top { height: 56px; background: transparent; border-bottom: 0; position: absolute; right: 0; left: 0; padding-right: 24px; }
  body.signed-in main { padding-bottom: 48px; }
  body.signed-in .toast[popover] { inset: auto 12px 18px calc(var(--side-w) + 12px); }
}
.side-brand { display: block; padding: 2px 6px 16px; }
.side-brand img { height: 30px; width: auto; }
.side-shop { display: grid; margin-bottom: 10px; }
.side-shop .shoppill { justify-content: space-between; width: 100%; }
.side nav { display: flex; flex-direction: column; gap: 2px; overflow: auto; flex: 1; min-height: 0; }
/* A short screen scrolls the list: a thin bar in the sidebar's right margin with no arrow buttons, so it doesn't
   squeeze the names (Nathan, 11 Nov 2026: the Windows bar looked bad). */
.side nav { margin-right: -10px; padding-right: 4px; scrollbar-gutter: stable; }
.side nav::-webkit-scrollbar { width: 6px; }
.side nav::-webkit-scrollbar-track, .side nav::-webkit-scrollbar-corner { background: transparent; }
.side nav::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 3px; }
.side nav:hover::-webkit-scrollbar-thumb { background: var(--mute2); }
.side nav::-webkit-scrollbar-button { display: none; }
@supports not selector(::-webkit-scrollbar) { .side nav { scrollbar-width: thin; scrollbar-color: var(--line2) transparent; } }
.side-group {
  font: 800 0.6875rem var(--head-font); letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute);
  margin: 12px 12px 3px;
}
.side-group.job-orders { color: var(--orders-ink); }
.side-group.job-stock { color: var(--stock-ink); }
.side-group.job-buying { color: var(--buying-ink); }
.side-group.job-office { color: var(--office-ink); }
.side nav a {
  display: flex; align-items: center; gap: 12px; min-height: 38px; padding: 0 12px; border-radius: 12px; flex: none;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.9375rem; position: relative;
}
.side nav a svg { width: 22px; height: 22px; flex: none; }
.side nav a:hover { background: var(--soft); }
.side nav a[aria-current="page"] { background: var(--raise); font-weight: 800; }
/* The page you're on is bold. Each name keeps room for its bold self (a hidden bold copy in the same spot, nav.js),
   so picking a page never wraps its name or moves the list (Nathan, 11 Nov 2026: Order Recommendation jumped to two lines). */
.side nav a .label { flex: 1; display: grid; min-width: 0; }
.side nav a .label > span, .side nav a .label::after { grid-area: 1 / 1; }
.side nav a .label::after { content: attr(data-text); font-weight: 800; visibility: hidden; pointer-events: none; }
.side nav a.soon { color: var(--mute); }
.soon-tag {
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute);
  border: 1px solid var(--line2); border-radius: 4px; padding: 1px 5px; margin-left: 6px; vertical-align: 2px;
}
.side nav .count, .hubnav .count {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 4px; background: var(--ink); color: var(--on-ink);
  font: 800 0.75rem/22px var(--head-font); text-align: center;
}
.side nav .job-orders .count { background: var(--orders); color: var(--on-orders); }
.side nav .job-stock .count { background: var(--stock); color: var(--on-stock); }
.side nav .job-buying .count { background: var(--buying); color: var(--on-buying); }
.side nav .job-office .count { background: var(--office); color: var(--on-office); }
.menu-go .count {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 4px; background: var(--ink); color: var(--on-ink);
  font: 800 0.75rem/22px var(--head-font); text-align: center; margin-right: 6px; flex: none;
}
.menu-go .job-orders .count { background: var(--orders); color: var(--on-orders); }
.menu-go .job-stock .count { background: var(--stock); color: var(--on-stock); }
.menu-go .job-buying .count { background: var(--buying); color: var(--on-buying); }
.menu-go .job-office .count { background: var(--office); color: var(--on-office); }
/* The Menu's list of everything: shorter rows than other lists, so more fits on a phone. */
.menu-go .item { padding-top: 10px; padding-bottom: 10px; min-height: 0; }
.menu-go .title { font-weight: 600; }
/* Six on the bar (with Menu): narrower button backs so they fit a small phone. */
.tabs ul[data-n="6"] a .ico { width: 44px; }
.side-theme {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; margin: 10px 0 8px; border-radius: 12px; border: 0;
  background: var(--soft); color: var(--ink); font-weight: 600; font-size: 0.875rem; cursor: pointer; text-align: left;
}
.side-theme svg { width: 18px; height: 18px; flex: none; }
:root[data-theme="dark"] .side-theme svg { color: var(--buying); }
.side-foot { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding: 12px 6px 0; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; font: 800 0.95rem var(--head-font); flex: none; }
.side-foot .who { display: grid; line-height: 1.25; min-width: 0; flex: 1; }
.side-foot .who strong { font-size: 0.875rem; }
.side-foot .who span { font-size: 0.75rem; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .iconbtn { width: 40px; height: 40px; min-width: 40px; min-height: 40px; }
.side-foot .iconbtn[aria-current="page"] { background: var(--raise); }


main.wide { max-width: 1280px; }
@media (min-width: 1000px) { main.wide { padding-left: 28px; padding-right: 28px; } }

/* ---------- dashboard pieces (Prices) ---------- */
.dash-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 16px; margin-bottom: 14px; }
.dash-head .titles { flex: 1; min-width: 220px; }
.dash-head h1 { font-size: 1.5rem; }
.dash-head .subtitle { color: var(--mute); margin-top: 4px; font-size: 0.92rem; }
.dash-head .tools { display: flex; flex-wrap: wrap; gap: 8px; }

.statusrow { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 11px; font-size: 0.8rem; font-weight: 700;
  background: var(--paper); border: 1px solid var(--line); color: var(--ink); white-space: nowrap;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mute2); flex: none; }
.pill.ok .dot { background: var(--ok); }
.pill.warn .dot { background: var(--warn); }
.pill.bad .dot { background: var(--bad); }
.pill .when { color: var(--mute); font-weight: 600; }

.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 16px; }
.stat {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 6px;
  color: inherit; text-decoration: none; box-shadow: 0 1px 2px rgba(22, 19, 15, 0.04);
}
a.stat:hover { border-color: var(--mute2); }
.stat .lbl { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }
.stat .val { font-size: 1.9rem; font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stat .val small { font-size: 0.95rem; font-weight: 700; color: var(--mute); }
.stat .sub { font-size: 0.82rem; color: var(--mute); }
.stat.hot .val { color: var(--accent-ink); }

.delta {
  display: inline-flex; align-items: center; gap: 3px; border-radius: 999px; padding: 2px 8px; font-size: 0.74rem; font-weight: 800;
  white-space: nowrap; font-variant-numeric: tabular-nums; width: fit-content;
}
.delta.down { background: var(--bad-soft); color: var(--bad); }     /* a shop is cheaper / their price dropped */
.delta.up { background: var(--ok-soft); color: var(--ok); }         /* we are cheaper / their price went up */
.delta.flat { background: var(--soft); color: var(--mute); border: 1px solid var(--line); }

.cols { display: grid; gap: 16px; margin-bottom: 16px; }
@media (min-width: 1000px) { .cols.two { grid-template-columns: 1.15fr 1fr; align-items: stretch; } }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.panel + .panel { margin-top: 0; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 1rem; flex: 1; }
.panel-head .badge { min-width: 24px; height: 24px; padding: 0 8px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); font-size: 0.78rem; font-weight: 800; display: grid; place-items: center; }
.panel-head .note { font-size: 0.8rem; color: var(--mute); }
.panel-body { padding: 12px 16px; }
.panel.attn .panel-head { background: var(--accent-soft); }
.panel .seg { margin: 10px 16px 0; }

.rows { list-style: none; margin: 0; padding: 0; }
.rows > li + li { border-top: 1px solid var(--line); }
.prow { display: flex; align-items: center; gap: 12px; padding: 11px 16px; color: inherit; text-decoration: none; min-height: 58px; }
a.prow:hover, button.prow:hover { background: var(--soft); }
button.prow { width: 100%; border: 0; background: transparent; text-align: left; cursor: pointer; font: inherit; }
.prow .main { flex: 1; min-width: 0; }
.prow .title { font-weight: 700; }
.prow .sub { font-size: 0.84rem; color: var(--mute); }
.prow .right { display: grid; justify-items: end; gap: 3px; text-align: right; flex: none; }
.money { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.strike { text-decoration: line-through; color: var(--mute2); font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 0.8rem; color: var(--mute); margin: 8px 2px 0; }

/* Data tables */
.tablewrap { overflow: auto; max-height: min(72vh, 900px); border-top: 1px solid var(--line); }
table.data { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 0.88rem; }
table.data th, table.data td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data thead th {
  position: sticky; top: 0; z-index: 2; background: var(--soft); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--mute);
}
table.data tbody tr:hover > * { background: var(--soft); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
.linkbtn { border: 0; background: transparent; padding: 0; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; text-align: left; }
.linkbtn:hover { color: var(--accent-ink); text-decoration: underline; }
table.data tbody th { font-weight: 700; }
.item .right { display: grid; justify-items: end; gap: 2px; text-align: right; flex: none; }
.item.muted .money { color: var(--mute2); }
/* The page area takes focus after each move (for screen readers); it needs no ring of its own. */
main:focus { outline: none; }
/* On a computer the page sits centred in the space beside the sidebar. */
@media (min-width: 1000px) {
  body.signed-in main {
    --content: 860px; max-width: none; margin: 0 0 0 var(--side-w);
    padding-left: max(28px, calc((100vw - var(--side-w) - var(--content)) / 2));
    padding-right: max(28px, calc((100vw - var(--side-w) - var(--content)) / 2));
  }
  body.signed-in main.wide { --content: 1280px; }
}

/* ---------- Prices: all wines ---------- */
.filters { display: grid; gap: 8px; grid-template-columns: 1fr; margin-bottom: 10px; }
@media (min-width: 760px) { .filters { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.filters select { min-height: 44px; }
.ptable-wrap { container-type: inline-size; }
.ptable { display: none; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.pcards { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@container (min-width: 820px) { .ptable { display: block; } .pcards { display: none; } }
/* Shop names wrap onto two lines ("Norman / Goodfellows") so each column is only as wide as its prices. */
table.compare thead th.num { white-space: normal; width: 1%; min-width: 64px; line-height: 1.3; vertical-align: bottom; }
table.compare th[scope="row"] { position: sticky; left: 0; z-index: 1; background: var(--paper); min-width: 220px; max-width: 300px; white-space: normal; }
table.compare thead th:first-child { left: 0; z-index: 3; }
table.compare .rowsub { display: block; font-weight: 600; }
table.compare td.pcell a { color: inherit; text-decoration: none; display: inline-block; padding: 2px 6px; border-radius: 6px; }
table.compare td.pcell a:hover { text-decoration: underline; }
table.compare td.cheaper { background: var(--accent-soft); color: var(--accent-ink); font-weight: 800; }
table.compare td.dearer { color: var(--ok); }
table.compare td.stale { color: var(--mute2); }
table.compare tbody tr:hover > td.cheaper { background: var(--accent-line); }
.pcard-head { display: flex; gap: 10px; align-items: baseline; color: inherit; text-decoration: none; margin-bottom: 6px; }
.pcard-head .title { font-weight: 800; }
.shopchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.shopchip {
  display: inline-flex; align-items: center; border-radius: 8px; padding: 3px 8px; font-size: 0.8rem; font-weight: 700;
  background: var(--soft); border: 1px solid var(--line); color: var(--ink); text-decoration: none; white-space: nowrap; font-variant-numeric: tabular-nums;
}
a.shopchip:hover { border-color: var(--mute2); }
.shopchip.cheaper { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-ink); }
.shopchip.stale { color: var(--mute2); }
.panel-foot { padding: 10px 16px; border-top: 1px solid var(--line); font-size: 0.88rem; font-weight: 700; }
.panel-foot a { color: var(--accent-ink); }

/* ---------- Prices: one wine ---------- */
.stat .val-chip { font-size: 1rem; }
.stat .val-chip .delta { font-size: 0.9rem; padding: 4px 10px; }
.prow .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex: none; }
li.prow { flex-wrap: wrap; }
@media (max-width: 600px) { li.prow .acts { width: 100%; justify-content: flex-start; } }
.prow.faded .title, .prow.faded .money { color: var(--mute2); }
svg.chart { width: 100%; height: auto; display: block; }
.chart-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 0; margin: 10px 0 0; font-size: 0.82rem; }
.chart-legend li { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 14px; height: 4px; border-radius: 2px; background: var(--mute2); display: inline-block; }
.swatch.ours { background: repeating-linear-gradient(90deg, #FA4362 0 6px, transparent 6px 10px); }
.swatch[data-c="0"] { background: #C21E3C; } .swatch[data-c="1"] { background: var(--ink); } .swatch[data-c="2"] { background: #1F7A4C; }
.swatch[data-c="3"] { background: #B26B00; } .swatch[data-c="4"] { background: #2C4FA3; } .swatch[data-c="5"] { background: #7A3FA0; }
.swatch[data-c="6"] { background: #0E7C86; } .swatch[data-c="7"] { background: #8E857C; } .swatch[data-c="8"] { background: #D4571C; }

/* Case prices: under the bottle price, pink when a bottle in the case is cheaper */
.casep { display: block; font-size: 0.72rem; font-weight: 600; color: var(--mute); white-space: nowrap; }
.casep.deal { color: var(--accent-ink); font-weight: 800; }
.prow .right .casep { text-align: right; line-height: 1.25; }

/* Prices from a PDF: tick the wines to save */
.importrow { cursor: pointer; align-items: flex-start; }
.importrow input[type="checkbox"] { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.importrow .right { display: grid; justify-items: end; gap: 2px; text-align: right; flex: none; }
input[type="file"] { font-size: 0.95rem; max-width: 100%; }
input[type="url"] { width: 100%; min-height: 48px; padding: 10px 12px; border: 1.5px solid var(--line2); border-radius: 12px; background: var(--paper); font-size: 1rem; }

/* Wine details in the wine editor */
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0 0 12px; font-size: 0.875rem; }
dl.facts dt { color: var(--mute); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
.warnbox { background: var(--warn-soft); color: var(--warn); border-radius: 8px; padding: 8px 10px; }

/* ---------- Leave (admin office) ----------
   Each person keeps one highlighter colour, like the paper calendar it replaces. Waiting
   requests are striped. Everything prints in greyscale: every bar carries the person's name. */
.pc0 { --c: #F8C3CF; } .pc1 { --c: #BCE0F4; } .pc2 { --c: #C9EDBF; } .pc3 { --c: #DCC6F1; } .pc4 { --c: #F9CFAE; }
.pc5 { --c: #F5EE7E; } .pc6 { --c: #B2E6DE; } .pc7 { --c: #D9D3CB; } .pc8 { --c: #F3B0A8; } .pc9 { --c: #DDEE9F; }
.pdot { width: 12px; height: 12px; border-radius: 50%; background: var(--c, var(--line)); border: 1px solid rgba(22, 19, 15, 0.25); flex: none; display: inline-block; }
.item .pdot { width: 14px; height: 14px; }
.pagehead .pdot { width: 18px; height: 18px; align-self: center; }
.wait-swatch { background: repeating-linear-gradient(135deg, #CFC6BA 0 3px, #fff 3px 6px); }
.hol-swatch { background: #E3E8F5; border-color: #C3CCE4; }
.lwait-note { padding: 0 14px 8px 40px; }
.lwait-acts { padding: 0 14px 12px 40px; }
.lform > * + * { margin-top: 14px; }
.lform .field + .field, .lform .ldates { margin-top: 14px; }
.lform .ldates .field + .field { margin-top: 0; }
h1.withdot { display: flex; align-items: center; gap: 10px; }
.lwaitline { margin-top: 10px; }
.info-card { background: var(--info-soft); border-color: #D5DCEE; margin-bottom: 4px; }
.lfoot { margin-top: 14px; }
.bad-text { color: var(--bad); font-weight: 700; }
.ok-text { color: var(--ok); font-weight: 600; }
.so-diffs ul { margin: 0 0 8px; padding-inline-start: 18px; }
.so-diffs p { margin-block-end: 2px; }
.good-text { color: var(--ok); font-weight: 700; }
.lsum { background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-top: 14px; display: grid; gap: 4px; }
.ldates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.ldates .field + .field { margin-top: 0; }
.lkinds { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
.lhead { margin-bottom: 8px; }
.card.alert h2 + * { margin-top: 6px; }

/* the month calendar */
.monthbar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.monthbar h2 { font-size: 1.15rem; min-width: 9.5em; text-align: center; }
.llegend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 0; margin: 0 0 10px; font-size: 0.82rem; font-weight: 700; }
.llegend li { display: inline-flex; align-items: center; gap: 6px; }
.lcal { --lane-h: 22px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.lcal-head { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--soft); border-bottom: 1px solid var(--line); }
.lcal-head div { padding: 6px 4px; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute); text-align: center; }
.lweek { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 3px; min-height: 66px; border-bottom: 1px solid var(--line); }
.lweek:last-child { border-bottom: 0; }
.lday { grid-row: 1 / -1; border-left: 1px solid var(--line); padding: 2px 3px; display: flex; flex-direction: column; min-width: 0; }
.lday:first-child { border-left: 0; }
.lday.sun { background: #FBF9F6; }
.lday.out { background: #F5F1EB; }
.lday.out .lnum { color: var(--mute2); }
.lday.hol { background: #E9EDF7; }
.lnum {
  align-self: flex-start; border: 0; background: transparent; font: inherit; font-weight: 800; font-size: 0.8rem;
  min-width: 26px; height: 26px; border-radius: 13px; cursor: pointer; padding: 0 5px;
}
.lnum:hover { background: var(--soft); }
.lday.today .lnum { background: var(--accent); color: #fff; }
.lhol { font-size: 0.62rem; color: #2C3E73; font-weight: 700; line-height: 1.1; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; padding: 0 2px; }
.lbar {
  position: relative; z-index: 1; margin: 0 2px; min-width: 0; height: var(--lane-h); border: 0; border-radius: 6px;
  background: var(--c); color: var(--ink); font: inherit; font-size: 0.72rem; font-weight: 700; text-align: left; padding: 0 6px;
  cursor: pointer; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(22, 19, 15, 0.12);
}
.lbar span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lbar.cont-l { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 0; }
.lbar.cont-r { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: 0; }
.lbar.wait { background: repeating-linear-gradient(135deg, var(--c) 0 6px, rgba(255, 255, 255, 0.8) 6px 11px); box-shadow: inset 0 0 0 1.5px rgba(22, 19, 15, 0.4); }
.lbar:hover { filter: brightness(0.95); }
@media (max-width: 600px) {
  .lcal { --lane-h: 20px; }
  .lbar { font-size: 0.64rem; padding: 0 3px; margin: 0 1px; }
  .lcal-head div { font-size: 0.6rem; letter-spacing: 0; padding: 6px 1px; }
  .lhol { font-size: 0.56rem; }
  .monthbar h2 { min-width: 0; flex: 1; }
}

/* people and balances */
.lpeople { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 760px) { .lpeople { grid-template-columns: 1fr 1fr; } }
.lperson { display: grid; gap: 7px; height: 100%; }
.lperson.faded { opacity: 0.65; }
.lbal { display: grid; grid-template-columns: 4.4em 1fr; align-items: center; gap: 2px 8px; font-size: 0.86rem; }
.lbal-k { font-weight: 700; color: var(--mute); grid-row: span 2; }
.lbal-v { font-weight: 800; }
.lbal-v .muted { font-weight: 600; }
.lmeter { height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; display: block; }
.lmeter span { display: block; height: 100%; background: var(--ink); border-radius: 3px; }
.lbal.over .lbal-v { color: var(--bad); }
.lbal.over .lmeter span { background: var(--bad); }
.lwd { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.lwd .choice span { min-height: 44px; padding: 4px 2px; font-size: 0.85rem; }
.lallow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.lallow .field + .field { margin-top: 0; }
.lallow .field > label { font-size: 0.82rem; }
.lcolours { display: flex; flex-wrap: wrap; gap: 8px; }
.lcolour { position: relative; }
.lcolour input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.lcolour span { display: block; width: 38px; height: 38px; border-radius: 50%; background: var(--c); border: 2px solid rgba(22, 19, 15, 0.15); }
.lcolour input:checked + span { border: 3px solid var(--ink); }
.lcolour input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

/* the admin office's Today card */
.lofftoday { margin-bottom: 14px; }
.lofftoday .row h2 { flex: 1; }
.card ul.loff { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.loff li { display: flex; align-items: center; gap: 8px; font-size: 0.92rem; flex-wrap: wrap; }

.print-only { display: none; }
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  :root, body { background: #fff !important; }
  .side, .top, .tabs, .toasts, .toast, .seg, .pagehead, .monthbar, .no-print, .back, dialog { display: none !important; }
  body.signed-in .top, body.signed-in main, main, body.signed-in main.wide { margin: 0 !important; padding: 0 !important; max-width: none !important; }
  .print-only { display: block; }
  .lprint-title { font-weight: 800; font-size: 14pt; margin-bottom: 6px; }
  .lcal { border-color: #000; --lane-h: 18px; border-radius: 0; }
  .lweek { min-height: 72px; border-color: #888; break-inside: avoid; }
  .lday { border-color: #888; }
  .lbar, .pdot, .lday.hol { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .lbar { box-shadow: none; border: 1px solid #000; }
  .lbar.wait span::after { content: ' (waiting)'; }
  .lday.today .lnum { background: none; color: inherit; text-decoration: underline; }
  .card { border-color: #888; }
  .list > li { break-inside: avoid; }
  .item .chev { display: none; }
}

/* sign-in page */
.pwrow { position: relative; }
.pwrow input { padding-right: 76px; width: 100%; }
.pwshow { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); min-height: 40px; }
.auth .card h1 { font-size: 1.5rem; }
.auth > .btn.ghost { color: var(--accent-ink); }

/* Sign out sits in the top bar on every screen */
.top .signout { min-height: 40px; padding: 6px 12px; gap: 6px; border-color: var(--line); font-size: 0.88rem; }
.top .signout svg { width: 18px; height: 18px; }
@media (max-width: 360px) { .top .signout { padding: 6px 8px; } }

/* =====================================================================
   The new look (5 Oct 2026): header, Today, section pills, Requests,
   Wines, Find, Office and My buttons. Job colours: orders pink, stock
   and requests teal, buying yellow, office blue.
   ===================================================================== */

/* header on phones: logo, shop, light/dark, sign out, your initial */
.top .signout {
  width: 44px; min-height: 44px; height: 44px; padding: 0; gap: 6px; border-radius: 999px; border: 0;
  background: var(--soft); color: var(--ink); flex: none; font-family: inherit; font-weight: 700;
}
.top .signout svg { width: 20px; height: 20px; }
.top .signout .lbl { display: none; }
/* Light/dark sits in the header when there is room; it is always under Menu too. */
@media (max-width: 459px) { .top .top-theme { display: none; } }
@media (max-width: 459px) { .top { gap: 6px; } .top .brand img { height: 22px; } .testflag { padding: 3px 5px; font-size: 0.625rem; } }
@media (max-width: 379px) {
  .top { gap: 6px; padding-left: 12px; padding-right: 10px; }
  .top .brand img { height: 22px; }
}
@media (min-width: 1000px) {
  body.signed-in .top { position: sticky; height: 56px; background: var(--bg); border-bottom: 0; padding: 0 28px; }
  body.signed-in main { padding-top: 4px; }
  .top .signout { width: auto; padding: 0 14px; border: 1px solid var(--line); background: var(--paper); font-size: 0.875rem; }
  .top .signout .lbl { display: inline; }
}
.wide-only { display: none; }
@media (min-width: 1000px) { .wide-only { display: inline; } div.wide-only { display: grid; } }

/* pills above a section's lists */
.hubnav { display: flex; gap: 8px; overflow-x: auto; margin: 0 0 16px; padding: 2px 0; scrollbar-width: none; }
/* Four pills don't fit a phone: wrap to a second line rather than hide the last one off the edge (4 Nov 2026). */
@media (max-width: 459px) { .hubnav { flex-wrap: wrap; overflow-x: visible; } }
.hubnav::-webkit-scrollbar { display: none; }
.hubnav a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px; flex: none;
  background: var(--paper); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.875rem; white-space: nowrap;
}
.hubnav a:hover { border-color: var(--line2); }
.hubnav a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.hubnav a[aria-current="page"] .count { background: var(--on-ink); color: var(--ink); }

/* Today */
.today { display: flex; flex-direction: column; gap: 14px; }
.today > .hero { order: 1; }
.today > .findbar { order: 2; }
.today > * { order: 3; }
@media (min-width: 1000px) { .today { gap: 20px; } .today > .findbar { order: 0; } }
.findbar { display: flex; gap: 10px; align-items: center; }
.findbar.inpage { margin-bottom: 12px; }
.searchpill {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 16px; border-radius: 999px;
  background: var(--paper); border: 1px solid var(--line); color: var(--mute); text-decoration: none; font-size: 0.9375rem; cursor: text;
}
.searchpill:hover { border-color: var(--line2); }
.searchpill svg { width: 20px; height: 20px; flex: none; }
.searchpill > span:not(.visually-hidden) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.searchpill input[type="search"] { flex: 1; min-width: 0; min-height: 0; height: 100%; border: 0; padding: 0; background: transparent; color: var(--ink); font-size: 1rem; }
.searchpill input[type="search"]:focus-visible { outline: none; }
.searchpill:focus-within { outline: 3px solid var(--accent); outline-offset: 1px; }
.scanbtn {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; min-width: 50px; padding: 0 18px; border-radius: 999px; border: 0;
  background: var(--ink); color: var(--on-ink); font: 800 0.875rem var(--head-font); cursor: pointer;
}
.scanbtn svg { width: 20px; height: 20px; }
@media (max-width: 999px) {
  .today .scanbtn { padding: 0; width: 50px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
  .today .scanbtn .lbl { display: none; }
}

.hero {
  position: relative; isolation: isolate; overflow: hidden; border-radius: 18px; min-height: 124px; padding: 14px 18px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; color: #fff;
  background: #2C2721 url('/img/shelf.webp') center 38% / cover no-repeat;
}
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--veil); }
.hero .eyebrow { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #E9DFD2; }
.hero h1 { font-size: 1.7rem; line-height: 1.1; color: #fff; }
.hero-sub { font-weight: 600; font-size: 0.875rem; color: #F2D129; }
@media (min-width: 1000px) {
  .hero { min-height: 150px; padding: 22px 28px; gap: 6px; border-radius: 20px; }
  .hero h1 { font-size: 2.125rem; }
  .hero .eyebrow { font-size: 0.75rem; }
  .hero-sub { font-size: 0.95rem; }
}

.tiles2 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.tile2 {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; border: 1px solid transparent;
  background: var(--soft); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.875rem; line-height: 1.3;
}
.tile2 b { flex: none; width: 46px; height: 46px; border-radius: 6px; display: grid; place-items: center; font: 800 1.25rem var(--head-font); background: var(--ink); color: var(--on-ink); }
.tile2:hover { border-color: var(--line2); }
.tile2.job-orders { background: var(--orders-soft); } .tile2.job-orders b { background: var(--orders); color: var(--on-orders); }
.tile2.job-stock { background: var(--stock-soft); } .tile2.job-stock b { background: var(--stock); color: var(--on-stock); }
.tile2.job-buying { background: var(--buying-soft); } .tile2.job-buying b { background: var(--buying); color: var(--on-buying); }
.tile2.job-office { background: var(--office-soft); } .tile2.job-office b { background: var(--office); color: var(--on-office); }
:root[data-theme="dark"] .tile2.job-orders { border-color: #4A2830; }
:root[data-theme="dark"] .tile2.job-stock { border-color: #23504B; }
:root[data-theme="dark"] .tile2.job-buying { border-color: #4A4220; }
:root[data-theme="dark"] .tile2.job-office { border-color: #2E3A5E; }

.todaycols { display: grid; gap: 18px; }
.col-side { display: none; }
@media (min-width: 1000px) {
  .todaycols { grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); gap: 24px; align-items: start; }
  .col-side { display: grid; gap: 8px; }
}
.sechead { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 0 2px 10px; }
.sechead h2 { font-size: 1rem; }
.sechead .n { font-weight: 600; font-size: 0.8125rem; color: var(--mute); }
.col-main > .sechead ~ .sechead, .jobs + .sechead, .card + .sechead { margin-top: 22px; }

/* to-do cards with a shelf tag */
.jobs { display: grid; gap: 8px; }
.job {
  display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 10px 14px 10px 10px; border-radius: 18px;
  background: var(--paper); color: var(--ink); text-decoration: none; border: 1px solid transparent;
}
:root[data-theme="dark"] .job { border-color: var(--line); }
.job:hover { border-color: var(--line2); }
.jtext { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.jt { font-weight: 700; font-size: 0.9375rem; line-height: 1.3; }
.js { font-size: 0.8125rem; color: var(--mute); }
.jact { flex: none; font: 800 0.8125rem var(--head-font); color: var(--ink); }
.job-orders .jact { color: var(--orders-ink); }
.job-stock .jact { color: var(--stock-ink); }
.job-buying .jact { color: var(--buying-ink); }
.job-office .jact { color: var(--office-ink); }
@media (min-width: 1000px) {
  .job { gap: 14px; }
  .jt { font-size: 1rem; }
  .js { font-size: 0.875rem; }
  .jact { height: 42px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line2); display: grid; place-items: center; font-family: inherit; font-weight: 700; font-size: 0.875rem; color: var(--ink); }
  .jobs:not(.quiet) > .job:first-child .jact { border-color: transparent; font-family: var(--head-font); font-weight: 800; background: var(--ink); color: var(--on-ink); }
  .jobs:not(.quiet) > .job-orders:first-child .jact { background: var(--orders); color: var(--on-orders); }
  .jobs:not(.quiet) > .job-stock:first-child .jact { background: var(--stock); color: var(--on-stock); }
  .jobs:not(.quiet) > .job-buying:first-child .jact { background: var(--buying); color: var(--on-buying); }
  .jobs:not(.quiet) > .job-office:first-child .jact { background: var(--office); color: var(--on-office); }
}
.stag {
  flex: none; width: 52px; height: 52px; border-radius: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
  background: var(--ink); color: var(--on-ink);
}
.stag b { font: 800 1.3rem var(--head-font); }
.stag small { font-size: 0.625rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-top: 3px; }
.stag.job-orders { background: var(--orders); color: var(--on-orders); }
.stag.job-stock { background: var(--stock); color: var(--on-stock); }
.stag.job-buying { background: var(--buying); color: var(--on-buying); }
.stag.job-office { background: var(--office); color: var(--on-office); }
/* waiting on others: the same tag, hollow */
.jobs.quiet .stag { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px currentColor; }
.jobs.quiet .stag.job-orders { color: var(--orders-ink); }
.jobs.quiet .stag.job-stock { color: var(--stock-ink); }
.jobs.quiet .stag.job-buying { color: var(--buying-ink); }
.jobs.quiet .stag.job-office { color: var(--office-ink); }
.jobs.quiet .jact { color: var(--mute); }

/* how far along a request is */
.dots { display: flex; gap: 4px; margin-top: 6px; max-width: 360px; }
.dots > span { flex: 1; display: grid; gap: 3px; min-width: 0; }
.dots i { display: block; height: 5px; border-radius: 3px; background: var(--line); }
.dots .done i { background: var(--stock); }
.dots .now i { background: var(--ink); }
.dots em { font-style: normal; font-size: 0.625rem; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dots .now em { color: var(--ink); font-weight: 700; }
@media (max-width: 599px) { .dots em { visibility: hidden; } .dots .now em { visibility: visible; overflow: visible; } }

/* At the shop today (computer) */
.sidecard { padding: 16px 18px; }
.sidecard + .sidecard { margin-top: 4px; }
.sidecard h3 { font-size: 0.95rem; margin-bottom: 2px; }
.card ul.plain, ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li + li { border-top: 1px solid var(--line); }
ul.plain a { display: grid; gap: 2px; padding: 10px 0; color: inherit; text-decoration: none; }
ul.plain a:hover .nm { text-decoration: underline; }
ul.plain .nm { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.9375rem; }
ul.plain .sub { font-size: 0.8125rem; color: var(--mute); }
.npill { font-size: 0.75rem; font-weight: 700; padding: 3px 8px; border-radius: 4px; background: var(--ink); color: var(--on-ink); white-space: nowrap; }
.npill.job-orders { background: var(--orders); color: var(--on-orders); }
.npill.job-stock { background: var(--stock); color: var(--on-stock); }
.npill.job-buying { background: var(--buying); color: var(--on-buying); }

/* Requests */
.askrow { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); margin-bottom: 22px; }
.ask { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.ask:hover { border-color: var(--line2); }
.ask svg { width: 22px; height: 22px; padding: 11px; box-sizing: content-box; border-radius: 12px; flex: none; }
.ask.job-stock svg { background: var(--stock-soft); color: var(--stock-ink); }
.ask.job-buying svg { background: var(--buying-soft); color: var(--buying-ink); }
.ask > span { display: grid; gap: 2px; min-width: 0; }
.ask small { color: var(--mute); font-size: 0.8125rem; }

/* a wine's page */
.winehead { display: flex; gap: 16px; align-items: flex-start; margin: 4px 0 16px; }
.winehead h1 { font-size: 1.4rem; margin-bottom: 4px; }
.wineacts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.wineacts .btn { flex: 1 1 auto; }
.item .money { flex: none; }

/* Office */
.officecard { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
a.officecard:hover { border-color: var(--line2); }
.officecard .oico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--office-soft); color: var(--office-ink); flex: none; }
.officecard .oico svg { width: 24px; height: 24px; }
.officecard strong { display: block; font-family: var(--head-font); font-size: 1.05rem; }
.officecard .sub { display: block; color: var(--mute); font-size: 0.875rem; margin-top: 2px; }
.officecard.soon { background: transparent; border-style: dashed; border-color: var(--line2); align-items: flex-start; }
.officecard.soon .oico { background: var(--soft); color: var(--mute); }
.nextgrid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-bottom: 12px; }
.count-pill { min-width: 26px; height: 26px; padding: 0 8px; border-radius: 4px; background: var(--office); color: var(--on-office); font: 800 0.8rem/26px var(--head-font); text-align: center; flex: none; }

/* My buttons */
.barpreview {
  list-style: none; margin: 0 0 4px; padding: 16px 6px 12px; display: flex; align-items: flex-end; justify-content: space-around;
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
}
.barpreview li { display: grid; justify-items: center; gap: 4px; font-size: 0.6875rem; font-weight: 700; flex: 1; min-width: 0; }
.barpreview .ico { width: 52px; height: 30px; display: grid; place-items: center; border-radius: 999px; }
.barpreview .ico svg { width: 22px; height: 22px; }
.barpreview li.empty { color: var(--mute2); }
.barpreview li.empty .ico { border: 1.5px dashed var(--line2); }
.barpreview li.job-orders .ico { color: var(--orders-ink); }
.barpreview li.job-stock .ico { color: var(--stock-ink); }
.barpreview li.job-buying .ico { color: var(--buying-ink); }
.barpreview li.job-office .ico { color: var(--office-ink); }
.barpreview li.centre { flex: none; }
.barpreview .centre-btn { top: -4px; cursor: default; border-color: var(--paper); }
.btnopts { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-bottom: 8px; }
.btnopt {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px 10px 10px; border-radius: 16px; border: 2px solid var(--line);
  background: var(--paper); color: var(--ink); text-align: left; cursor: pointer;
}
.btnopt .ico { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--soft); flex: none; }
.btnopt .ico svg { width: 22px; height: 22px; }
.btnopt strong { display: block; }
.btnopt small { display: block; color: var(--mute); font-size: 0.8125rem; }
.btnopt .pos { width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; flex: none; font: 800 0.85rem var(--head-font); border: 1.5px solid var(--line2); color: var(--mute); }
.btnopt.on { border-color: var(--ink); }
.btnopt.on .pos { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.btnopt.job-orders .ico { background: var(--orders-soft); color: var(--orders-ink); }
.btnopt.job-stock .ico { background: var(--stock-soft); color: var(--stock-ink); }
.btnopt.job-buying .ico { background: var(--buying-soft); color: var(--buying-ink); }
.btnopt.job-office .ico { background: var(--office-soft); color: var(--office-ink); }
.btnopt.on.job-orders { border-color: var(--orders); } .btnopt.on.job-stock { border-color: var(--stock); }
.btnopt.on.job-buying { border-color: var(--buying); } .btnopt.on.job-office { border-color: var(--office); }
.btnopt[disabled] { opacity: 0.45; cursor: not-allowed; }

/* The sign-in page logo, and the bits drawn before the dark look existed */
:root[data-theme="dark"] .auth .logo { filter: invert(0.94); }
:root[data-theme="dark"] .lbar { color: #16130F; }
:root[data-theme="dark"] .lday.sun { background: #1C1915; }
:root[data-theme="dark"] .lday.out { background: #1A1713; }
:root[data-theme="dark"] .lday.hol, :root[data-theme="dark"] .hol-swatch { background: var(--info-soft); border-color: var(--info-line); }
:root[data-theme="dark"] .lhol { color: var(--info); }
:root[data-theme="dark"] .info-card { border-color: var(--info-line); }
:root[data-theme="dark"] .wait-swatch { background: repeating-linear-gradient(135deg, var(--line2) 0 3px, var(--paper) 3px 6px); }
:root[data-theme="dark"] .pdot { border-color: rgba(255, 255, 255, 0.3); }
:root[data-theme="dark"] svg.chart text { fill: var(--mute); }
:root[data-theme="dark"] svg.chart line[stroke="#E7E0D6"] { stroke: var(--line); }
:root[data-theme="dark"] svg.chart [stroke="#16130F"] { stroke: var(--ink); }
:root[data-theme="dark"] .shot { border-color: transparent; }
:root[data-theme="dark"] .card.alert, :root[data-theme="dark"] .tile.hot { border-color: var(--accent-line); }
:root[data-theme="dark"] dialog { border: 1px solid var(--line); }

/* Paper is always light, even from dark mode. */
@media print {
  :root[data-theme="dark"] {
    --bg: #FFFFFF; --paper: #FFFFFF; --soft: #F3F1EE; --raise: #EDE9E3; --line: #E6E1DA; --line2: #CFC6BA;
    --ink: #1D1A16; --on-ink: #FFFFFF; --mute: #6B635A; --mute2: #8E857C; --info-soft: #EEF1F8; --info: #2C3E73;
    color-scheme: light;
  }
  :root[data-theme="dark"] .lbar { color: #16130F; }
  .hubnav { display: none !important; }
}

/* ---------- From the IQ link: stock, sales, revenue to purchase ---------- */
.stockchips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.stockchip {
  display: inline-flex; align-items: center; border-radius: 6px; padding: 2px 7px; font-size: 0.78rem; font-weight: 700; white-space: nowrap;
  font-variant-numeric: tabular-nums; background: var(--soft); border: 1px solid var(--line); color: var(--ink2);
}
.stockchips.compact .stockchip { font-size: 0.72rem; padding: 1px 6px; }
.stockchip.has { background: var(--stock-soft); border-color: transparent; color: var(--stock-ink); }
.stockchip.low { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.stockchip.zero { color: var(--mute2); }
.stockchip.neg { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.stockchip.here { outline: 2px solid var(--stock); outline-offset: 0; }
.stockline { display: block; margin-top: 2px; }
.stocklist .item { align-items: center; }
.stocklist .rowlink { display: flex; gap: 12px; align-items: flex-start; color: inherit; text-decoration: none; min-width: 0; }
.stocklist .rowlink .main { min-width: 0; }
.item a.title { display: block; color: inherit; text-decoration: none; }
.item a.title:hover { text-decoration: underline; }
table.stocktable { margin-top: 4px; }
table.stocktable tr.here th { color: var(--stock-ink); }
table.data td.neg, table.data td.under { color: var(--bad); font-weight: 700; }
table.data tfoot th, table.data tfoot td { font-weight: 800; border-top: 2px solid var(--line2); border-bottom: 0; background: var(--paper); position: sticky; bottom: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 8px; }
.rangeform { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; margin: 0 0 12px; }
.rangeform label { display: grid; gap: 4px; font-size: 0.82rem; font-weight: 700; color: var(--mute); }
.rangeform input, .rangeform select { min-height: 40px; }
.rangeform select { min-width: 11.5em; }
.chartwrap { position: relative; }
.salesbars rect[data-i]:focus { outline: none; }
.salesbars rect[data-i]:focus-visible { stroke: var(--ink); stroke-width: 1; }
.charttip {
  position: absolute; top: 4px; transform: translateX(-50%); pointer-events: none; z-index: 2;
  display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; font-size: 0.8rem; white-space: nowrap;
  background: var(--paper); border: 1px solid var(--line2); box-shadow: 0 4px 14px rgba(22, 19, 15, 0.14); color: var(--ink);
}
.charttip span { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.swatch.now { background: var(--chart-now); width: 10px; height: 10px; border-radius: 3px; }
.swatch.ly { background: var(--chart-ly); }
.daytable { margin-top: 12px; }
.daytable summary { cursor: pointer; font-weight: 700; font-size: 0.88rem; }
.daytable table { margin-top: 8px; }
.r2pdetail > summary { cursor: pointer; font-weight: 700; font-size: 0.92rem; padding: 14px 16px; }
.r2pdetail[open] > summary { border-bottom: 1px solid var(--line); }
tr.notyet td { font-style: italic; }
.r2p { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; }
.r2p .bar { position: relative; width: 56px; height: 6px; border-radius: 3px; background: var(--raise); }
.r2p .bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--stock); }
.r2p.over .bar i { background: var(--bad); }
.r2p .bar b { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); }
.r2p.over { color: var(--bad); font-weight: 800; }
.stat .val .delta { font-size: 0.95rem; }
dd.bad { color: var(--bad); }
svg.salesbars .grid { stroke: var(--line); stroke-width: 1; }
svg.salesbars .tick { fill: var(--mute); font-size: 11px; }
svg.salesbars .bar { fill: var(--chart-now); }
svg.salesbars .lyline { fill: none; stroke: var(--chart-ly); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; pointer-events: none; }
svg.salesbars .hit { fill: transparent; }
svg.salesbars .hit:hover { fill: rgba(127, 127, 127, 0.08); }
@media (max-width: 600px) {
  .stats.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stats.compact .stat { padding: 12px; }
  .stats.compact .stat .val { font-size: 1.35rem; }
  .stats.compact .stat .val-chip .delta { font-size: 0.78rem; padding: 3px 7px; }
  .stats.compact .stat .sub { font-size: 0.75rem; }
}
dl.facts.stack { grid-template-columns: 1fr; gap: 0; }
dl.facts.stack dt { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.04em; margin-top: 8px; }
table.stocktable { table-layout: fixed; }
table.stocktable th, table.stocktable td { white-space: normal; padding: 8px 6px; }
table.stocktable thead th { line-height: 1.25; vertical-align: bottom; }
table.stocktable th:first-child, table.stocktable td:first-child { width: 34%; }

/* A GP % to compare with, and this period's difference from it (Sales and GP tables). */
.gpbeside { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.gpbeside .delta { font-size: 0.8em; }
.panel-note { padding: 8px 16px 12px; margin: 0; }
/* GP % month by month: the shop names stay put while the months scroll on a phone. */
table.trend tbody th, table.trend tfoot th { position: sticky; left: 0; z-index: 1; background: var(--paper); }
table.trend thead th:first-child { left: 0; z-index: 3; }

/* Clocking in and out (#/clock). Big tiles, so a name is easy to hit on a shop tablet. */
.clockgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 6px 0 14px; }
.clocktile { display: flex; align-items: center; gap: 12px; padding: 14px 14px; min-height: 64px; text-align: left; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--paper); color: var(--ink); font: inherit; cursor: pointer; }
.clocktile:hover { background: var(--soft); }
.clocktile strong { display: block; }
.clocktile .sub { display: block; font-size: 0.85rem; color: var(--mute); }
.clockdot { width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--line2); }
.clockdot.in { background: var(--ok); }
.clockdot.break { background: var(--warn); }
.clockme h2 { margin: 0; }
input.pin { font-size: 1.6rem; letter-spacing: 0.5em; text-align: center; max-width: 9em; }
.hero .clocklink { margin-top: 12px; display: inline-flex; width: auto; }
table.data.mini { margin: 6px 0 4px; font-size: 0.85rem; }
table.data.mini td { padding: 4px 8px; }
.clockdays summary { cursor: pointer; }
input.dayinput { width: auto; max-width: 12em; }
table.data th .rowsub { display: block; font-weight: 600; }

/* Clocking › Month: everyone down the side, the days across. */
table.month th.mh { text-align: center; padding: 6px 2px; min-width: 2.6em; line-height: 1.1; }
table.month th.mh span { display: block; font-size: 0.8rem; color: var(--ink); }
table.month th.mh small { display: block; font-size: 0.65rem; }
table.month th.mh.now span { color: var(--accent-ink); }
table.month td.mc { padding: 0; text-align: center; border-left: 1px solid var(--line); }
table.month td.mc button { width: 100%; min-height: 40px; padding: 4px 2px; border: 0; background: transparent; color: inherit; font: inherit;
  font-size: 0.8rem; font-variant-numeric: tabular-nums; cursor: pointer; position: relative; }
table.month td.mc button:hover { background: var(--soft); }
table.month .wkend { background: var(--raise); }
table.month td.work { color: var(--ink); }
table.month td.inow { color: var(--ok); font-weight: 700; }
table.month td.noout, .mk.noout { color: var(--bad); font-weight: 800; }
table.month td.miss, .mk.miss { color: var(--bad); }
table.month td.leave, .mk.leave { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
table.month td.hol, table.month th.hol, .mk.hol { background: var(--info-soft); color: var(--info); font-weight: 700; }
table.month td.future button { cursor: default; }
.mdot { position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); display: inline-block; }
.monthlegend .mk { display: inline-block; min-width: 1.8em; padding: 0 4px; text-align: center; border-radius: 4px; position: relative; }
.monthlegend .mk .mdot { position: static; vertical-align: middle; }
.monthname { font-size: 1.05rem; }

/* New order (phone / WhatsApp / in the shop) */
input.price-input { width: 6.5em; min-width: 0; text-align: right; }
.order-line { align-items: flex-start; }
.order-line .line-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 8px; }
.order-line .price-wrap { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.total-line { font-weight: 600; text-align: right; margin: 0; }
.total-line:empty { display: none; }
.more-fields summary { cursor: pointer; font-weight: 600; margin: 4px 0 8px; }

/* Sales order (Picking → an app order → Sales order), laid out like IQ's own. Paper is always light. */
.so-page { background: #fff; color: #111; border: 1px solid var(--line); border-radius: 8px; padding: 18px; font-size: 0.86rem; max-width: 820px; page: so; }
.so-page h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; text-align: center; margin: 0 0 6px; }
.so-title { border: 1px solid #111; text-align: center; font-weight: 800; padding: 3px; margin-bottom: 8px; }
.so-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.so-box { border: 1px solid #111; border-radius: 12px; padding: 8px 12px; min-height: 92px; }
.so-strong { font-weight: 700; }
.so-gap { height: 12px; }
.so-kv { display: flex; gap: 10px; justify-content: space-between; }
.so-kv span { font-weight: 700; }
.so-kv strong { font-weight: 600; text-align: right; }
.so-fromrow { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.so-logo { width: 110px; height: auto; }
.so-page table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.so-page th { text-align: left; font-weight: 800; padding: 3px 4px; }
.so-page td { padding: 3px 4px; vertical-align: top; }
.so-page .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.so-lines thead tr { border: 1px solid #111; }
.so-lines tbody tr:last-child td { padding-bottom: 40px; }
.so-foot { margin-top: 20px; break-inside: avoid; }
.so-policy { text-align: center; margin-bottom: 8px; }
.so-boxes { display: grid; grid-template-columns: 1.3fr 0.8fr 1.3fr; gap: 8px; }
.so-boxes .so-box { border-radius: 0; }
.so-bank { font-size: 0.95rem; line-height: 1.6; }
.so-count { text-align: center; display: flex; flex-direction: column; justify-content: space-between; }
.so-big { font-size: 1.1rem; font-weight: 700; }
.so-totals .so-kv strong { font-weight: 700; }
.so-created { text-align: center; font-size: 0.78rem; margin-top: 10px; }
@media (max-width: 640px) {
  .so-grid, .so-boxes { grid-template-columns: 1fr; }
  .so-page { padding: 10px; font-size: 0.8rem; }
  .so-meta th:nth-child(2), .so-meta td:nth-child(2) { display: none; }
}
@media print {
  @page so { size: A4 portrait; margin: 10mm; }
  .so-page { border: 0; padding: 0; max-width: none; font-size: 9.5pt; }
  .so-box, .so-title, .so-lines thead tr { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.printing-so .hubnav { display: none !important; }
}

/* ---------- 27 Oct: reorder, slow stock, suppliers, labels, costs, order changes ---------- */
.stack-actions { display: grid; gap: 6px; justify-items: end; flex: none; }
.stack-actions .btn { white-space: nowrap; }
.card.linkcard { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.item.nosup select { margin-top: 6px; max-width: 100%; }
.item.nosup .title { text-decoration: none; color: var(--ink); }
.nocost { display: grid; gap: 6px; margin: 10px 0 4px; }
.nocost p { margin: 0; }

/* Cost controller */
table.costgrid th, table.costgrid td { padding: 6px 8px; }
table.costgrid tbody th, table.costgrid thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--paper); min-width: 170px; max-width: 220px; white-space: normal; }
table.costgrid thead th:first-child { z-index: 3; background: var(--soft); }
table.costgrid .grouprow td { background: var(--soft); }
table.costgrid th.now { color: var(--ink); box-shadow: inset 0 -3px 0 var(--accent); }
table.costgrid th.closed { color: var(--mute2); }
table.costgrid .grouprow th { background: var(--soft); font: 800 0.7rem var(--head-font); letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }
table.costgrid tr.strong > * { font-weight: 800; }
table.costgrid tr.muted > * { color: var(--mute); }
table.costgrid td.locked { background: var(--soft); }
table.costgrid .neg { color: var(--bad); }
table.costgrid .pos { color: var(--ok); }
input.costcell { width: 6.2em; min-width: 0; text-align: right; padding: 4px 6px; min-height: 34px; font-size: 0.86rem; font-variant-numeric: tabular-nums; }
input.costcell:disabled { background: transparent; border-color: transparent; color: var(--ink); opacity: 1; }
input.costcell.saved { border-color: var(--ok); box-shadow: 0 0 0 2px var(--ok-soft); }
.lockrow td { border-bottom: 0; }

/* Shelf labels: IQ's shelf label size (74 × 27.5 mm, measured 11 Nov 2026 from Nathan's photo of one in the strip; was
   67.5 × 24), paper always light (screens/labels.js LABEL). Then (Nathan, 11 Nov 2026: "Bit bigger especially the
   number. And straight corners and thicker borders"): square corners, a thick black border to cut along (1.2 mm; "thick border"), the name
   11 pt and the price 30 pt (26 pt from R1,000 and 23 pt from R10,000, so it never runs into the barcode). */
.slab {
  width: 74mm; height: 27.5mm; box-sizing: border-box; padding: 1.1mm 2mm 0.7mm; position: relative; overflow: hidden;
  background: #fff; color: #111; border: 1.2mm solid #111; border-radius: 0; display: flex; flex-direction: column;
  font-family: var(--head-font); -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.slab-name { font-weight: 800; font-size: 11pt; line-height: 1.05; max-height: 2.1em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; padding-right: 1mm; }
.slab-vin { font-weight: 600; }
.slab.special .slab-name { padding-right: 17mm; }
.slab-tag { position: absolute; top: 0; right: 0; background: #111; color: #fff; font: 800 7pt/1 var(--head-font); letter-spacing: 0.08em; text-transform: uppercase; padding: 1.3mm 2.2mm 1.1mm; border-radius: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.slab-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5mm; }
.slab-left { display: grid; min-width: 0; }
.slab-price { font-weight: 800; font-size: 30pt; line-height: 0.88; letter-spacing: -0.025em; white-space: nowrap; font-variant-numeric: lining-nums; }
.slab-price.long { font-size: 26pt; }
.slab-price.xlong { font-size: 23pt; }
.slab-price.long, .slab-price.xlong { padding-bottom: 0.9mm; }   /* room for the comma's tail above the name of the shop */
.slab-price .r { font-size: 0.55em; margin-right: 0.3mm; vertical-align: 0.5em; }
.slab-price sup { font-size: 0.45em; vertical-align: 0.95em; margin-left: 0.3mm; line-height: 0; }
.slab-was { font: 600 7pt/1.15 var(--head-font); color: #333; }
.slab-brand { font: 700 5pt/1.3 var(--head-font); letter-spacing: 0.12em; text-transform: uppercase; color: #666; margin-top: 0.5mm; }
.slab-code { display: grid; justify-items: end; flex: none; }
.slab-code .barcode { display: block; }
.slab-iq { font: 700 7pt/1.2 'GSOpenSans', system-ui, sans-serif; color: #222; letter-spacing: 0.04em; }
.slab-preview { display: flex; flex-wrap: wrap; gap: 10px; }
.slab-preview:empty { display: none; }
#label-print { display: none; }
@media print {
  @page labels { size: A4 portrait; margin: 0; }
  body.printing-labels > *:not(#label-print) { display: none !important; }
  body.printing-labels #label-print { display: block; }
  .slab-sheet { page: labels; width: 210mm; height: 296mm; position: relative; break-after: page; overflow: hidden; }
  .slab-sheet:last-child { break-after: auto; }
  .slab-sheet .slab { position: absolute; }
}

.row.toolbar { margin: 4px 0 12px; }
select#slab-start { width: auto; min-width: 5em; }

/* ---------- 27 Oct: delivery paperwork (invoice photos, signed delivery note) ---------- */
.paperwork h2 { margin: 0; }
.papers { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.paper { position: relative; }
.paper-open { display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; cursor: zoom-in; }
.paper-open img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.paper-x { position: absolute; top: 4px; right: 4px; background: var(--paper); border-radius: 50%; min-height: 32px; min-width: 32px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); }
img.paper-full { display: block; width: 100%; height: auto; border-radius: 8px; background: #fff; }
dialog.wide { width: min(900px, calc(100vw - 24px)); }
canvas.sigpad { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; background: #fff; border: 1.5px dashed var(--line); border-radius: 12px; touch-action: none; cursor: crosshair; }
img.sigshow { display: block; width: min(360px, 100%); height: auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.grn .grn-sign { margin-top: 22px; break-inside: avoid; }
.grn .grn-sig { display: block; width: 260px; height: auto; }
.grn .grn-line { border-top: 1px solid #111; padding-top: 4px; margin-top: 2px; font-weight: 600; max-width: 520px; }
.grn tr.grn-total td { border-top: 1px solid #111; font-weight: 800; padding-bottom: 6px; }
.grn .so-lines tbody tr:last-child td { padding-bottom: 6px; }

/* Rehearsal fixes (27 Oct) */
.card.linkcard svg { width: 22px; height: 22px; flex: none; }
.card.linkcard .grow { min-width: 0; }
.card.linkcard .chev { width: 18px; height: 18px; }
.showall { margin: 6px 0 0; }
.note-warn { margin: 0; }
/* The par table on a wine's page fits a phone: cells wrap, tighter padding (restock.js parCard). */
@media (max-width: 459px) {
  table.data.par th, table.data.par td { white-space: normal; padding: 8px 6px; }
  table.data.par td .chip { margin: 0 4px 4px 0; }
}
/* A chip that carries a sentence (a warning, "Still to come: …") wraps instead of running off a phone's screen
   (4 Nov 2026 walk-through: receiving a transfer at another shop made the page 685px wide). Short chips are unchanged. */
p.chip { white-space: normal; max-width: 100%; border-radius: 10px; padding-top: 4px; padding-bottom: 4px; }

/* ---------- 27 Oct: stock control (Book in IQ, stock counts) ---------- */
ul.diffs { margin: 0; padding-left: 18px; }
.bookside { border-top: 1px solid var(--line); padding-top: 8px; gap: 6px; }
.stats.countstats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.stats.countstats .stat .val { font-size: 1.4rem; }
table.countdiff td.pos { color: var(--ok); font-weight: 700; }
table.countdiff td.neg { color: var(--bad); font-weight: 700; }
.countlist .item .main .row .of { min-width: 0; }
table.countdiff tbody th { white-space: normal; min-width: 130px; max-width: 220px; }
table.countdiff tbody th .muted { display: block; }
.panel > p.pad { padding: 12px 16px; margin: 0; }

/* ---------- 28 Oct: The Courier Guy on an order (public/js/courier.js) ---------- */
.card.courier > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.card.courier > .stack { margin-top: 10px; }
.courier-ship { border-top: 1px solid var(--line); padding-top: 10px; gap: 6px; }
.courier-ship:first-child { border-top: 0; padding-top: 0; }
.courier-ship.final { opacity: 0.8; }
.courier-ship p { margin: 0; }
.tcg-quote .field + .field { margin-top: 0; }
.tcg-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 10px; align-items: end; }
.tcg-box { justify-content: space-between; gap: 10px; min-height: 52px; }
.tcg-box + .tcg-box { border-top: 1px solid var(--line); }
.rates { display: grid; gap: 8px; }
.rate { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 12px; border: 1.5px solid var(--line2); border-radius: 12px; background: var(--paper); cursor: pointer; }
.rate input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--ink); }
.rate .main { display: grid; gap: 2px; flex: 1; min-width: 0; }
.rate:has(input:checked) { border-color: var(--ink); }
.rate:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- 28 Oct: Tell customers (public/js/screens/alerts.js) ---------- */
.alert-items .alert-thumb { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; background: #fff; flex: none; }
.alert-preview { display: grid; gap: 4px; padding: 12px 14px; border-radius: 18px; background: var(--soft); border: 1px solid var(--line); max-width: 420px; }
.alert-preview .pv-head { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--mute); }
.alert-preview .pv-icon { width: 20px; height: 20px; border-radius: 5px; }
.alert-preview .pv-title { font-size: 0.98rem; }
.alert-preview .pv-body { font-size: 0.92rem; }
.alert-preview .pv-img { width: 100%; max-height: 220px; object-fit: contain; background: #fff; border-radius: 12px; margin-top: 6px; }
.alert-preview .pv-img[hidden] { display: none; }
.pv-link { margin: 6px 0 0; word-break: break-all; }
.alert-actions { margin-top: 12px; }
.alert-items .alert-sent { color: var(--accent-ink); font-weight: 700; }
.alert-items .alert-thumb[hidden] { display: none; }
.alert-wording { margin: 10px 0 18px; }

/* ---------- 28 Oct: the bell in the top bar, and its page (public/js/screens/notices.js) ---------- */
.top .top-bell { position: relative; text-decoration: none; }
.top .top-bell .bell-count {
  position: absolute; top: -3px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--orders); color: var(--on-orders); font: 800 0.6875rem/20px var(--head-font); text-align: center;
  box-shadow: 0 0 0 2px var(--paper);
}
.top .top-bell[aria-current="page"] { outline: 3px solid var(--accent); outline-offset: 2px; }
.notices .notice { gap: 10px; }
.notices .notice-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: transparent; }
.notices .notice.unread .notice-dot { background: var(--orders); }
.notices .notice.unread .title { font-weight: 800; }
@media (max-width: 379px) { .top .top-bell { min-width: 40px; min-height: 40px; } }
/* With the bell, phones need a little more room for the shop's name: smaller logo, round buttons and gaps. */
@media (max-width: 459px) {
  .top { gap: 4px; padding-left: 12px; padding-right: 8px; }
  .top .brand img { height: 19px; }
  .top .top-bell, .top .signout, .top .me { width: 40px; min-width: 40px; height: 40px; min-height: 40px; }
  .top .top-bell svg, .top .signout svg { width: 19px; height: 19px; }
  .shoppill { height: 40px; padding: 0 8px 0 11px; gap: 3px; font-size: 0.8125rem; }
  .shoppill svg { width: 14px; height: 14px; }
}
@media (max-width: 379px) {
  .top { gap: 3px; padding-left: 10px; padding-right: 6px; }
  .top .brand img { height: 17px; }
  .testflag { padding: 2px 4px; font-size: 0.5625rem; letter-spacing: 0.04em; }
}

/* All orders (public/js/screens/ordertable.js) and reading a WhatsApp order (New order). */
.filters { gap: 10px; align-items: flex-end; }
.filters .field { margin: 0; min-width: 150px; }
.filters .field.grow { flex: 1 1 220px; }
.orders-table table.data th button.sorter { all: unset; cursor: pointer; font: inherit; font-weight: 700; }
.orders-table table.data th button.sorter:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.orders-table td.wrap-cell { white-space: normal; min-width: 220px; max-width: 360px; }
.orders-table tr.test-row td, .orders-table tr.test-row th { opacity: 0.6; }
.read-lines { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.read-lines .row { margin-top: 4px; gap: 6px; }
.order-stock { margin-top: 6px; gap: 6px; }
.order-stock .row { gap: 6px; align-items: center; }
.for-whom { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 2px; }
.each-request summary { cursor: pointer; color: var(--mute); }
.each-request .list { margin-top: 6px; }
/* A customer's orders: the status and total at the right (screens/customers.js). */
.item .stack.end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
/* The Shop's list (screens/shop.js). */
.card.warn-card { background: var(--warn-soft); border-color: transparent; }
.seg.wrap { flex-wrap: wrap; overflow-x: visible; }
.seg.wrap button { flex: 1 1 auto; }
.typed-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.small-field { display: grid; gap: 4px; align-content: start; font-weight: 700; font-size: 0.86rem; }
.small-field input { width: 100%; }
.shop-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
input[type="datetime-local"] { width: 100%; min-height: 48px; padding: 10px 12px; border: 1.5px solid var(--line2); border-radius: 12px; background: var(--paper); color: var(--ink); font-size: 1rem; }
.locker-pin { background: var(--raise); border-radius: 12px; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.locker-pin .pin-qr { width: 168px; height: 168px; flex: none; background: #fff; border-radius: 8px; padding: 4px; }
.locker-pin .pin-qr svg { width: 100%; height: 100%; display: block; }
.locker-pin .pin-qr svg rect { fill: #fff; }
.locker-pin .pin-qr svg path { fill: #000; }
.locker-pin > div { display: grid; gap: 2px; }
.locker-pin .pin-digits { font-size: 2rem; letter-spacing: 0.18em; font-variant-numeric: tabular-nums; }

/* Monthly sales targets (public/js/targets.js): each shop's sales so far against its target. */
.card.targets { display: grid; gap: .75rem; }
.targets .tgt-head { justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; }
.targets .tgt-head h2, .targets .tgt-head h3 { margin: 0; font-size: 1.05rem; }
.targets .tgt { display: grid; gap: .3rem; }
.targets .tgt-top { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.targets .tgt-nums { font-variant-numeric: tabular-nums; }
.targets .tgt-nums b { font-size: 1.1rem; }
.targets .tgt-bar { position: relative; height: 10px; border-radius: 5px; background: var(--raise); overflow: hidden; }
.targets .tgt-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--ok); }
.targets .tgt-sub { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .875rem; }
.targets .tgt-sub .chip { font-size: .75rem; }

/* From the supplier's paper (public/js/screens/papers.js): the photo to read, and the pages kept with a delivery. */
img.paper-preview { display: block; width: 100%; max-height: 60vh; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.paper-thumb { position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
.paper-thumb img { width: 84px; height: 112px; object-fit: cover; background: #fff; border: 1px solid var(--line); border-radius: 8px; }

/* Payments (public/js/screens/payments.js) */
.pay-amount { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.paypick { display: grid; gap: 8px; margin: 0 0 12px; }
.paypick label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; min-height: 44px; }
.paypick label:has(input:checked) { border-color: var(--ink); background: var(--raise); }
.paypick input { width: 20px; height: 20px; accent-color: var(--ink); margin: 2px 0 0; flex: none; }
.paypick .why { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.paypick .why .chip { font-size: .75rem; }
.paynote:empty, .payerr:empty { display: none; }
.paynote { color: var(--warn); }
.payerr { color: var(--bad); }
/* Bottles to pick (public/js/screens/picking.js): which orders want each wine, and what is picked */
.pick-summary .sub .chip { margin-left: 6px; font-size: .75rem; }
.pick-summary .pick-orders { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 2px; }
.pick-summary .pick-orders a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.pick-summary .pick-orders a.done { color: var(--ok); }

/* Restock: the par lists (public/js/screens/restock.js) */
.row.spread { justify-content: space-between; align-items: baseline; }
.list .item.done { opacity: .62; }
input.qty { width: 5.5em; text-align: right; font-variant-numeric: tabular-nums; }
.row.tags { gap: 4px; margin-top: 4px; }
.row.tags .chip { font-size: .75rem; }
.row.qtyline { gap: 8px; margin-top: 8px; }

/* Payments on a phone: the amount and the day on one line, the reference under it; Add payments, a line each */
.paycard .pay-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.paycard .pay-ref { overflow-wrap: anywhere; }
.pop-list .title { overflow-wrap: anywhere; }
.pop-files li { align-items: center; }
.pop-file { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; }
.pop-file svg { width: 20px; height: 20px; flex: none; }
.pop-list .sub .chip { margin-left: 6px; font-size: .75rem; }
.paylines .payline { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.paylines .payline.dup { border-color: var(--warn); background: var(--warn-soft); }
.paylines .payline-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
.paylines .payline input, .paylines .payline select { width: 100%; min-width: 0; }
.paste-box summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.paste-box textarea { width: 100%; font-family: inherit; }

/* The Shop card form: the picture's preview beside its upload button. */
.shop-pic-row { align-items: center; gap: 12px; margin-bottom: 6px; }

/* The shop's POS login: who is using the till (public/js/pos.js). */
.pos-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 12px; border-radius: 999px; background: var(--raise);
  font-weight: 700; font-size: .85rem; white-space: nowrap; }
.pos-chip.acting { background: var(--stock); color: var(--on-stock); }
.pos-chip button { border: 0; border-radius: 999px; padding: 4px 10px; font: inherit; cursor: pointer; background: transparent; color: inherit; }
.pos-chip .pos-done { background: var(--bg); color: var(--ink); margin-left: 4px; }
.pos-chip .pos-left { font-weight: 400; opacity: .85; }
/* On a phone or small tablet the chip gives way, so the Menu button stays on the screen (4 Nov 2026 walk-through). */
.pos-chip { min-width: 0; flex: 0 1 auto; }
.pos-chip .pos-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 459px) {
  .pos-chip { padding: 2px 4px 2px 8px; font-size: .8rem; }
  .pos-chip .pos-tag { display: none; }
  .pos-chip button { padding: 4px 6px; }
}
.pos-names { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

/* Cases over bottles on a supplier order's line (Nathan, 4 Nov 2026: "show case and bottle"). */
.qty-pair { display: flex; flex-direction: column; align-items: flex-end; text-align: right; line-height: 1.25; white-space: nowrap; }
.qty-pair .small { font-size: .8rem; }
.pp-cases { min-width: 4.5em; }
/* Expected deliveries in groups by day (Nathan, 4 Nov 2026: "better organised"). */
.group-title { margin: .9rem 0 .35rem; font-size: .82rem; font-weight: 700; letter-spacing: .02em; color: var(--mute); }
.stack > .group-title:first-child { margin-top: .2rem; }
/* To order: filter buttons (Nathan, 4 Nov 2026: urgent, deadlines, low stock, sells fast). */
.req-filters { gap: 6px; margin: 2px 0 10px; }
.req-filters .btn { padding-inline: 12px; }

/* A count's chat (5 Nov 2026, public/js/screens/counts.js): "doesn't look right" on a wine, and messages about the count. */
.flagbtn { color: var(--warn); }
.flagbtn svg { width: 18px; height: 18px; flex: none; }
.btn.flagbtn { gap: 6px; }
table.countdiff tbody th .flagbtn { min-width: 36px; min-height: 36px; vertical-align: middle; }
table.countdiff tbody th .chip { margin: 4px 4px 0 0; }
.quickpicks { gap: 6px; }
.quickpicks .btn { font-weight: 600; }
.countchat-card h2 { margin: 0; font-size: 1.05rem; }
.countchat-card .btn svg, .chat-bubble .chip svg { width: 16px; height: 16px; }
.querylist li { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; }
.querylist svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--warn); }
.openqs li { padding: 10px 0; align-items: flex-start; }
.openqs .btn svg { width: 16px; height: 16px; }
.stack-tight > * + * { margin-top: 3px; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
ol.chat { list-style: none; margin: 14px 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.chat-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: min(560px, 92%); min-width: 0; }
.chat-msg.mine { align-self: flex-end; align-items: flex-end; }
.chat-who { font-size: .78rem; color: var(--mute); margin: 0 8px 3px; }
.chat-bubble { background: var(--paper); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 10px 14px;
  display: flex; flex-direction: column; gap: 6px; min-width: 0; max-width: 100%; }
.chat-msg.mine .chat-bubble { background: var(--stock-soft); border-color: transparent; border-radius: 16px 16px 4px 16px; }
.chat-msg.query .chat-bubble { border: 2px solid var(--warn); }
.chat-bubble p { margin: 0; }
.chat-wine { font-weight: 700; font-size: .9rem; }
.chat-wine a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.chat-wine .muted { font-weight: 400; }
.chat-event { align-self: center; display: flex; gap: 6px; align-items: flex-start; font-size: .84rem; color: var(--mute); max-width: 92%; }
.chat-event svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--ok); }
.chat-event.again svg { color: var(--warn); }
.chat-compose label.row { align-items: flex-start; gap: 10px; }
.chat-compose input[type="checkbox"] { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--ink); }
.countlist .line-top { align-items: flex-start; gap: 4px; }
.countlist .line-top .flagbtn { min-width: 40px; min-height: 40px; margin: -8px -6px 0 0; }
.ns-code input { flex: 1; min-width: 0; }
.ns-code .btn { flex: none; white-space: nowrap; }
/* Signing off a stock count (5 Nov 2026): who counted what, and who confirmed it was them. */
.signofflist li { padding: 6px 0; gap: 6px; }
.signofflist .chip svg { width: 14px; height: 14px; }
.signoffs .btn svg { width: 18px; height: 18px; }
.count-by { margin: 10px 0 4px; font-size: 10pt; }
.count-by ul { margin: 4px 0 0; padding-left: 18px; }

/* IQ's sales orders (Orders → Sales orders, screens/iqsales.js) */
.so-views a, .so-views button { display: inline-flex; gap: 6px; align-items: center; justify-content: center; }
.segcount { min-width: 20px; height: 20px; padding: 0 5px; border-radius: 4px; background: var(--line); color: var(--ink); font: 800 0.7rem/20px var(--head-font); text-align: center; }
.btn .count { min-width: 20px; height: 20px; padding: 0 5px; border-radius: 4px; background: var(--orders); color: var(--on-orders); font: 800 0.7rem/20px var(--head-font); text-align: center; margin-left: 2px; }
.so-line { display: flex; align-items: center; }
.so-line > .item { flex: 1; min-width: 0; }
.so-tick { display: flex; align-items: center; padding-left: 14px; min-height: 44px; }
.so-tick input { width: 22px; height: 22px; accent-color: var(--ink); margin: 0; }
.so-suggest { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 0 14px 12px; font-size: 0.85rem; }
.so-bulk { margin-bottom: 10px; }
.so-facts.stack > * + * { margin-top: 6px; }
.so-fact { display: grid; grid-template-columns: 8.5em 1fr; gap: 10px; }
.so-fact > :last-child { overflow-wrap: anywhere; }
.so-decision .seg { margin-bottom: 0; }
.so-sugg { background: var(--soft); }
button.item.so-pick { width: 100%; border: 0; background: transparent; text-align: left; font: inherit; color: inherit; cursor: pointer; }
button.item.so-pick:hover, button.item.so-pick:focus-visible { background: var(--soft); }

/* One page per supplier order (5 Nov 2026): the step line under the heading. */
.po-steps { padding: 10px 14px; }
.po-steps .dots { max-width: none; margin-top: 0; }
.chip[aria-current="true"] { outline: 2px solid var(--ink); outline-offset: 1px; }
/* A row that opens a page, with its own button beside it (the Supplier orders list). */
a.rowlink { color: inherit; text-decoration: none; }
a.rowlink:hover .title, a.rowlink:focus-visible .title { text-decoration: underline; }
/* Checked together (two people check every delivery, 5 Nov 2026): each checker's signature, name and how they proved it. */
.together .checker { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.together img.sigshow.small { width: 120px; flex: none; border-radius: 8px; }
.together .sealcode { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0.04em; }
.grn-checkers { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 10px; }
.grn-checkers img { display: block; width: 100%; max-width: 260px; height: auto; border-bottom: 1px solid #999; }
.grn-seal { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.8rem; margin-top: 8px; }

/* Orders (6 Nov 2026: "more organised and easier to read"): the steps as tabs, each step's orders under their day, and
   on a computer each order's pieces in columns. */
.steptabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.steptab {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  background: var(--paper); border: 1px solid var(--line); color: var(--ink); font: inherit; font-weight: 700; font-size: 0.875rem; white-space: nowrap;
}
.steptab .n { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 6px; background: var(--soft); color: var(--ink); font-size: 0.75rem; line-height: 20px; text-align: center; }
.steptab.none { color: var(--mute); }
.steptab.none .n { color: var(--mute); }
.steptab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.steptab[aria-selected="true"] .n { background: var(--on-ink); color: var(--ink); }
.order-group .daygroup + .daygroup { margin-top: 4px; }
.order-group .group-title.bad-text { color: var(--bad); }
.olist .ohead { display: none; }
.olist .orow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; position: relative; padding-right: 40px; }
.orow .oc-name { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; }
.orow .oc-break { flex-basis: 100%; height: 0; }
.orow .oc-code, .orow .oc-btl, .orow .oc-amt { font-size: 0.85rem; color: var(--mute); }
.orow .oc-btl::before, .orow .oc-amt::before { content: '· '; }
.orow .oc-pay:empty, .orow .oc-amt:empty { display: none; }
.orow > .chev { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }
@media (min-width: 1000px) {
  .olist .orow, .olist .ohead {
    display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.9fr) 92px 116px 150px 96px 20px;
    grid-template-areas: "name code btl amt pay ful chev"; align-items: center; column-gap: 12px; padding-right: 14px;
  }
  .olist .oc-name { grid-area: name; } .olist .oc-code { grid-area: code; } .olist .oc-btl { grid-area: btl; } .olist .oc-amt { grid-area: amt; }
  .olist .oc-pay { grid-area: pay; } .olist .oc-ful { grid-area: ful; } .olist .oc-break { display: none; }
  .olist .orow > .chev, .olist .ohead > :last-child { grid-area: chev; position: static; transform: none; display: block; }
  .orow .oc-btl::before, .orow .oc-amt::before { content: none; }
  .orow .oc-btl, .orow .oc-amt, .ohead .oc-btl, .ohead .oc-amt { text-align: right; font-variant-numeric: tabular-nums; }
  .orow .oc-code, .orow .oc-btl, .orow .oc-amt { color: var(--ink); font-size: 0.9rem; }
  .orow .oc-pay:empty, .orow .oc-amt:empty { display: block; }
  .olist .ohead { padding-top: 8px; padding-bottom: 8px; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); border-bottom: 1px solid var(--line); }
  .ordercards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
  .ordercards > * { margin: 0; }
}
.olist .dayrow { display: flex; align-items: baseline; gap: 8px; padding: 10px 14px 6px; background: var(--soft); border-bottom: 1px solid var(--line); }
.olist .dayrow h3 { margin: 0; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute); }
.olist .dayrow .n { font-size: 0.8rem; font-weight: 700; color: var(--mute); }
.olist .dayrow.bad h3, .olist .dayrow.bad .n { color: var(--bad); }
@media (min-width: 1000px) { .olist .ohead { padding-left: 14px; } }
/* Orders (Nathan, 10 Nov 2026): each day a bar that opens and closes (details.trtop), and each order's ⋮ beside its row
   (screens/picking.js rowMenu), the same width on every row so the columns stay lined up with their titles. */
.trtop .olist .orow { padding-right: 40px; }
.olist .orow.nochev { padding-right: 14px; }
.olist .trrow > .dotmenu, .olist .trrow > .rowgap { flex: none; width: 52px; box-sizing: border-box; }
.olist .trrow > .rowgap { align-self: stretch; border-left: 1px solid var(--line); }
@media (min-width: 1000px) {
  .trtop .olist .orow, .olist .orow.nochev { padding-right: 14px; }
  .olist.withmenu .ohead { padding-right: 66px; }
}
.steptab .short { display: none; }
@media (max-width: 599px) {
  .steptab { flex: none; padding: 0 12px; gap: 6px; }
  .steptab .long { display: none; }
  .steptab .short { display: inline; }
}

/* Supplier orders (Nathan, 6 Nov 2026: fewer layers on top): the shop switch small, in the heading */
.seg.mini { margin: 0; padding: 3px; border-radius: 10px; flex: none; }
.seg.mini button { min-height: 32px; padding: 0 10px; font-size: 0.8rem; flex: none; }
.pagehead > .row { align-items: center; gap: 8px; }
/* The row opens the order; its button (Not here yet, Invoice) sits under it, its own tap; beside it on a computer */
.list .item > a.main.rowlink { display: block; min-width: 0; }
.list .item.has-act { flex-wrap: wrap; row-gap: 8px; }
.list .item.has-act > .rowact { flex-basis: 100%; display: flex; gap: 8px; }
@media (min-width: 900px) {
  .list .item.has-act { flex-wrap: nowrap; }
  .list .item.has-act > .rowact { flex-basis: auto; order: 1; flex: none; }
  .list .item.has-act > .chev { order: 2; }
}
/* Add: which kind, each saying what it does */
button.card.linkcard.addopt { width: 100%; text-align: left; font: inherit; cursor: pointer; border: 1px solid var(--line); }
.addopt .grow { display: grid; gap: 2px; }
.addopt:hover, .addopt:focus-visible { border-color: var(--ink); }
/* The invoice, page by page */
figure.paperpage { margin: 0 0 14px; display: grid; gap: 6px; }
img.paper-thumb-img { width: 64px; height: 84px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: #fff; }

/* Today (Nathan, 7 Nov 2026: "getting saturated"): follow-ups as rows that open, and "With others" folded */
button.job { width: 100%; font: inherit; text-align: left; cursor: pointer; }
.job .stag small { white-space: nowrap; }
details.others-fold { margin-top: 22px; }
details.others-fold > summary { list-style: none; cursor: pointer; margin-bottom: 0; padding: 12px 14px; border-radius: 14px; background: var(--raise); }
details.others-fold > summary::-webkit-details-marker { display: none; }
details.others-fold > summary h2 { flex: none; }
details.others-fold > summary .n { flex: 1; }
details.others-fold > summary .chev { transform: rotate(90deg); transition: transform .15s; align-self: center; }
details.others-fold[open] > summary .chev { transform: rotate(-90deg); }
details.others-fold[open] > summary { margin-bottom: 10px; }
/* Only the first of Needs you now has the filled button */
@media (min-width: 1000px) {
  .jobs.fu > .job:first-child .jact { background: none; border-color: var(--line2); color: var(--ink); font-family: inherit; font-weight: 700; }
}
.job-ink .stag, .stag.job-ink { background: var(--ink); color: var(--on-ink); }
/* Today folded by kind of work (Nathan, 7 Nov 2026: "maybe just collapse some things") */
details.fold > summary { list-style: none; cursor: pointer; }
details.fold > summary::-webkit-details-marker { display: none; }
.foldhead { min-height: 64px; }
.foldhead .js { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.foldhead .chev, .morelink .chev { transform: rotate(90deg); transition: transform .15s; }
details.fold[open] > summary .foldhead .chev, details.fold[open] > summary .morelink .chev { transform: rotate(-90deg); }
details.fold[open] > summary .foldhead { border-color: var(--line2); }
details.fold > .jobs { margin: 8px 0 0 14px; padding-left: 12px; border-left: 3px solid var(--line); }
.stag.long small { font-size: 0.5rem; letter-spacing: 0.02em; }
details.fold.more { margin-top: 6px; }
details.fold.more > summary .morelink { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--mute); }
details.fold.more > summary .morelink .chev { width: 16px; height: 16px; }
/* A folded line's long text stays inside the column */
.jobs > *, details.fold, details.fold > summary, .foldhead { min-width: 0; }
.col-main { min-width: 0; }
/* A heading that opens and closes its list (Nathan, 7 Nov 2026: "headers like these need to be drop downs"; Shelf labels). */
details.secfold { margin: 0 0 6px; }
details.secfold > summary { list-style: none; display: flex; align-items: center; gap: 6px; min-height: 44px; margin: 10px 2px 4px; }
details.secfold > summary::-webkit-details-marker { display: none; }
details.secfold > summary .chev { width: 16px; height: 16px; flex: none; transition: transform .15s; }
details.secfold[open] > summary .chev { transform: rotate(90deg); }
details.secfold > summary .secfold-n { text-transform: none; letter-spacing: 0; font-weight: 700; color: var(--ink); }
details.secfold:first-child > summary { margin-top: 0; }
/* A card whose head opens and closes it (Restock's suppliers and transfer routes; public/js/fold.js). */
details.secfold-card > summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; min-height: 44px; }
details.secfold-card > summary::-webkit-details-marker { display: none; }
details.secfold-card > summary .chev { width: 16px; height: 16px; flex: none; transition: transform .15s; color: var(--mute); }
details.secfold-card[open] > summary .chev { transform: rotate(90deg); }
details.secfold-card > summary > .row { flex: 1; min-width: 0; }
details.secfold-card > summary .section-title { margin: 0; }
details.secfold-card[open] > summary { margin-bottom: 8px; }

/* My to-do list on Today (src/todos.js): each person's own. */
.mytodo { margin-top: 16px; padding: 14px 16px; }
.mytodo .sechead { margin: 0 0 4px; }
.mytodo .todos li { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--line); }
.mytodo .todos li:last-child { border-bottom: 0; }
.mytodo .todos label { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 0; cursor: pointer; }
.mytodo .todos input[type="checkbox"] { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--ink); }
.mytodo .todos .tt { overflow-wrap: anywhere; }
.mytodo .todos li.done .tt { text-decoration: line-through; color: var(--mute); }
.mytodo .todos .iconbtn { color: var(--mute); }
.mytodo .todoadd { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.mytodo .todoadd input { flex: 1; min-width: 0; }

/* Variances under a count on the list (src/counts.js countVariances). */
details.varfold { margin: -8px 14px 0 14px; padding-bottom: 6px; }
details.varfold > summary { list-style: none; display: inline-flex; align-items: center; gap: 4px; min-height: 40px; cursor: pointer; font-size: 0.85rem; font-weight: 600; color: var(--ink2); }
details.varfold > summary::-webkit-details-marker { display: none; }
details.varfold > summary .chev { width: 16px; height: 16px; transition: transform .15s; }
details.varfold[open] > summary .chev { transform: rotate(90deg); }
details.varfold .varbody > p { margin: 0 0 6px; }
details.varfold .tablewrap { max-height: 50vh; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; }
details.varfold table.countdiff tbody th { min-width: 110px; font-weight: 500; }

/* Main variances at the top of Stock counts (src/counts.js listCounts main_variances). */
.mainvar { margin: 4px 0 18px; }
.mainvar .mvhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 12px 14px 10px; }
.mainvar .mvhead h2 { font-size: 1rem; }
.mainvar .tablewrap { max-height: none; }
.mainvar table.countdiff tbody th { min-width: 100px; font-weight: 500; }
.mainvar .mvmore { margin: 0; padding: 8px 14px 12px; border-top: 1px solid var(--line); }

/* Transfers (10 Nov 2026): Ask for stock big in the middle; what went wrong at the top. */
.askwrap { display: flex; justify-content: center; margin: 4px 0 18px; }
/* Much bigger, above Open / Finished (Nathan, 10 Nov 2026). */
.askbig { width: 100%; min-height: 96px; justify-content: center; gap: 12px; font-size: 1.6rem; border-radius: 20px; }
.askbig svg { width: 34px; height: 34px; }
.trtop { margin-bottom: 16px; }
.trtop > h2 { font-size: 1rem; padding: 12px 14px 8px; border-bottom: 1px solid var(--line); }
details.trtop > summary { padding: 6px 14px; }
.trtop > summary h2 { font-size: 1rem; }
.trtop > summary h2.redhead { color: var(--bad); }   /* Transfers' variances and not-enough-stock headings (Nathan, 10 Nov 2026) */
details.trtop[open] > summary { margin-bottom: 0; border-bottom: 1px solid var(--line); }
.trtop .item { min-height: 52px; padding: 10px 14px; }
.trtop > .foldbody { padding: 10px; }
.trtop > .foldbody > .card { box-shadow: none; }
.trtop > p.foldbody { margin: 0; padding: 12px 14px; }
.trdiff { flex: none; font-size: 1.05rem; min-width: 2.5em; text-align: right; }

/* Incoming stock deliveries (10 Nov 2026): En Route / Arrived; Arrived's ⋮ menu for Unprocessed or Processed. */
.routebar { margin: 0 0 12px; }
.arrivedhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 2px 8px; }
.arrivedhead h2 { font-size: 1.05rem; }
.dotmenu { position: relative; }
.dotmenu > summary { list-style: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; cursor: pointer; color: var(--ink); }
.dotmenu > summary::-webkit-details-marker { display: none; }
.dotmenu > summary:hover, .dotmenu[open] > summary { background: var(--soft); }
.dotmenu > summary svg { width: 22px; height: 22px; stroke-width: 3.5; }
.dotlist { position: absolute; right: 0; top: 48px; z-index: 30; min-width: 190px; display: grid; padding: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); }
.dotlist button { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.dotlist button:hover { background: var(--soft); }
.dotlist button svg, .dotlist .dotgap { width: 18px; height: 18px; flex: none; }

/* Incoming stock deliveries' cards (10 Nov 2026): Company / shop / ⋮; cases / date; bottles / invoice; See more. */
.inccard { padding: 10px 10px 2px 16px; }
.incgrid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 40px; column-gap: 12px; row-gap: 0; align-items: center; }
/* A computer: the second column close to the first, not across the page (Nathan, 10 Nov 2026: too much empty space). */
@media (min-width: 700px) { .incgrid { grid-template-columns: minmax(0, 17rem) minmax(0, 1fr) 40px; column-gap: 20px; } }
.incgrid > span { font-size: 0.9rem; color: var(--ink2); min-width: 0; overflow-wrap: anywhere; }
.incname { font-size: 1.02rem; min-width: 0; overflow-wrap: anywhere; }
.incgrid .dotmenu { justify-self: end; }
.incnote { margin: 8px 0 0; padding: 6px 10px; border-radius: 10px; background: var(--soft); }
/* Build order (screens/buildorder.js, Nathan, 10 Nov 2026): each wine with − / + a case at a time, the bottles bar held
   above the tabs. */
.buildrow { align-items: center; }
.buildrow.picked { background: color-mix(in srgb, var(--info-soft) 55%, transparent); }
.buildrow .main { min-width: 0; }
.buildrow .stock-chips, .buildrow .buildhints { margin-top: 4px; }
.buildhints { gap: 6px; }
.bqty { flex: none; display: grid; justify-items: center; gap: 2px; }
.bqty .stepper input { width: 56px; text-align: center; font-weight: 700; }
button.chipbtn { border: 0; cursor: pointer; font: inherit; }
.buildbar { position: sticky; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 8px); z-index: 3; display: flex; align-items: center; gap: 12px; padding: 10px 12px; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18); }
.buildbar .grow { min-width: 0; }
@media (max-width: 520px) { .buildrow { flex-wrap: wrap; } .buildrow .bqty { margin-left: auto; } }
/* Each transfer on the Transfers list, bigger overall (Nathan, 10 Nov 2026: "make this bigger overall"). */
.trtop .trlist .item { min-height: 68px; padding: 14px 16px; }
.trlist .item .title { font-size: 1.15rem; }
.trlist .item .sub { font-size: 1rem; margin-top: 2px; }
.trlist .item .chip { font-size: 0.85rem; }
.trlist .item .sub.trnote { margin-top: 8px; font-size: 0.95rem; }
/* A transfer's note on its row (Nathan, 10 Nov 2026: "leave a note"), like a delivery card's. */
.sub.trnote { margin-top: 6px; padding: 4px 10px; border-radius: 8px; background: var(--soft); color: var(--ink); overflow-wrap: anywhere; }
.incchips { margin-top: 4px; gap: 6px; }
.incfold > summary { list-style: none; display: inline-flex; align-items: center; gap: 4px; min-height: 36px; cursor: pointer; font-size: 0.88rem; font-weight: 700; color: var(--ink2); }
.incfold > summary::-webkit-details-marker { display: none; }
.incfold > summary .chev { width: 16px; height: 16px; transition: transform .15s; }
.incfold[open] > summary .chev { transform: rotate(90deg); }
.incmore { padding: 0 0 10px; }
.incmore > p { margin: 0; }
.incwines { margin: 0; padding-left: 18px; }
.dotlist a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--ink); font-weight: 600; text-decoration: none; }
.dotlist a:hover { background: var(--soft); }
.dotlist .danger { color: var(--bad); }

/* Wines with no supplier (10 Nov 2026): each wine on its own, the supplier found by typing, Problems. */
.nosuptop { margin: 10px 0; align-items: center; }
.nosuptop input[type="search"] { width: 100%; }
.nosuptop > .grow { flex: 1 1 240px; }
.nosupacts { gap: 8px; align-items: flex-start; }
.supsearch { flex: 1 1 260px; min-width: 0; gap: 6px; }
.supresults { display: grid; gap: 4px; }
.supopt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.supopt:hover { border-color: var(--line2); background: var(--soft); }
.probnote { padding: 6px 10px; border-radius: 10px; background: var(--bad-soft); }

/* Transfers: each open one's ⋮, outside its link and behind a line, so a tap meant for it never opens the transfer
   (Nathan, 10 Nov 2026: "make sure we cant fat finger into the transfer"). The cards let the menu hang out of them. */
details.card.trtop { overflow: visible; }
details.card.trtop > .list > li:last-child > a.item { border-bottom-left-radius: var(--radius); }
details.card.trtop > .list > li:last-child:not(.trrow) > a.item { border-bottom-right-radius: var(--radius); }
.trrow { display: flex; align-items: center; }
.trrow > a.item { flex: 1; min-width: 0; }
.trrow > .dotmenu { flex: none; align-self: stretch; display: grid; place-items: center; padding: 0 6px 0 8px; border-left: 1px solid var(--line); }
.trrow > .dotmenu > .dotlist { top: calc(50% + 24px); right: 6px; }

/* An open ⋮ doesn't push the page down (details[open] > summary has a margin). */
.dotmenu[open] > summary { margin-bottom: 0; }

/* A ⋮ with a word beside it ("Actions"). */
.dotmenu.withtext > summary { width: auto; gap: 6px; padding: 0 8px 0 12px; font-weight: 700; display: flex; align-items: center; }

/* Transfer Request: the shops as the one chosen; a tap opens the others. */
.shoppicks { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.shoppickf { display: grid; gap: 6px; min-width: 0; }
.shoppickf .lbl { font-weight: 700; font-size: 0.95rem; }
.dotmenu.pick > summary { width: 100%; height: 48px; display: flex; justify-content: center; gap: 8px; padding: 0 14px; border: 1.5px solid var(--ink);
  border-radius: 12px; background: var(--ink); color: var(--on-ink); font-weight: 700; }
.dotmenu.pick > summary:hover, .dotmenu.pick[open] > summary { background: var(--ink); opacity: 0.92; }
.dotmenu.pick > summary svg { width: 18px; height: 18px; stroke-width: 2.5; }
.dotmenu.pick > .dotlist { left: 0; right: 0; top: 54px; }

/* Transfer Request: what a pasted list didn't make clear. */
.pastecheck .pastelines > li { padding: 10px 0; }
.pastecheck .pastelines > li:first-child { padding-top: 4px; }
.pastechoices .btn { justify-content: space-between; text-align: left; width: 100%; }

/* A transfer's own buttons (Change the request, Rush, Schedule a date): side by side while they fit. */
.actions.trbtns { display: flex; flex-wrap: wrap; }
.actions.trbtns > .btn { flex: 1 1 150px; }

/* A transfer's wine sent short: why, under its number (Nathan, 10 Nov 2026). */
.shortbox { padding: 10px 12px; border: 1px solid var(--line2); border-radius: 12px; background: var(--soft); gap: 8px; }
.shortbox .shorthead { font-weight: 700; color: var(--bad); }
.shortbox select, .shortbox input[type="text"] { flex: 1 1 180px; min-height: 44px; }

/* Recording a delivery from its paper: each wine plainly (Nathan, 10 Nov 2026: "super over whelming for some"). */
.ppline .main { gap: 10px; }
.pp-head { align-items: flex-start; gap: 12px; }
.pp-head .title { font-weight: 700; font-size: 1.02rem; }
.pp-ok { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ok-soft, rgba(46, 160, 67, 0.18)); color: var(--ok, #2ea043); flex: none; }
.pp-ok svg { width: 16px; height: 16px; stroke-width: 3; }
.pp-acts { gap: 14px; }
.pp-acts:empty { display: none; }
.pp-qty { gap: 10px 18px; align-items: center; }
.pp-qty .pp-label { font-weight: 700; color: var(--ink); font-size: 0.95rem; }
.pp-paper { gap: 8px; }
.ppline .linkbtn { font-size: 0.85rem; font-weight: 600; color: var(--mute); text-decoration: underline; text-underline-offset: 3px; }
.pp-acts { margin-top: 6px; }
.pp-status { margin-top: 6px; }
.chipbtn { border: 0; cursor: pointer; font: inherit; font-size: 0.78rem; }
.chipbtn::after { content: ' ›'; }
.pp-head .dotmenu { margin: -8px -8px 0 0; }
.pp-paper { gap: 8px; }
.card.flat.pplist { overflow: visible; }   /* each wine's ⋮ hangs out of the list */
.pp-head .dotlist { min-width: 240px; }

/* To order: each wine asked for, its ⋮ at the top right (Nathan, 10 Nov 2026). */
.reqrow { align-items: flex-start; }
.reqrow > .dotmenu { flex: none; margin: -6px -8px 0 0; }
.reqrow .reqchips:empty { display: none; }
.reqrow .reqchips { margin-top: 4px; }

/* Stock Deliveries, En Route's calendar, under the list (Nathan, 10 Nov 2026). */
.encal { margin-top: 20px; }
.dcal { padding: 12px; }
.dcal-head { align-items: center; gap: 8px; margin-bottom: 10px; }
.dcal-title { font-size: 1.05rem; }
.dcal-fwd svg { transform: rotate(180deg); }
.dcal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.dcal-wd { text-align: center; font-size: 0.72rem; font-weight: 700; color: var(--mute); padding-bottom: 2px; }
.dcal-cell { min-width: 0; min-height: 62px; display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: 4px;
  border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.dcal-cell.empty { border: 0; cursor: default; }
.dcal-cell.has { background: var(--info-soft); border-color: transparent; }
.dcal-cell.late { background: var(--bad-soft); }
.dcal-cell.today { box-shadow: inset 0 0 0 2px var(--accent); }
.dcal-cell.picked { box-shadow: inset 0 0 0 2px var(--ink); }
.dcal-n { font-size: 0.78rem; font-weight: 700; }
.dcal-pill { display: block; font-size: 0.66rem; line-height: 1.25; font-weight: 600; color: var(--info); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dcal-cell.late .dcal-pill { color: var(--bad); }
.dcal-more { font-size: 0.66rem; color: var(--mute); }
@media (min-width: 700px) { .dcal-cell { min-height: 84px; padding: 6px; } .dcal-pill { font-size: 0.74rem; } }

/* Orders: the team's note under the customer's name. On a computer the name's tags (the shelf spot, bottles to come,
   waiting …) are short coloured lines under the name, not pills squeezed into the column (Nathan, 10 Nov 2026: "not
   looking nice"). */
.orow .oc-name .onote { flex-basis: 100%; font-size: 0.8rem; color: var(--mute); font-style: italic; overflow-wrap: anywhere; }
.orow .oc-name .chip { max-width: 100%; }
@media (min-width: 1000px) {
  .orow .oc-name { flex-direction: column; align-items: flex-start; gap: 2px; }
  .orow .oc-name .chip { padding: 0; border: 0; border-radius: 0; background: none; white-space: normal; font-size: 0.78rem; line-height: 1.3; text-align: left; }
  .orow .oc-name .chip:not(.info):not(.warn):not(.bad):not(.ok) { color: var(--mute); }
}
.so-picklist { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.so-picklist:empty { display: none; }

/* Stock Deliveries cards: the wines in each delivery, by farm (Nathan, 10 Nov 2026). */
.cardwines { margin: 8px 0 2px; padding: 6px 12px; border-radius: 10px; background: var(--soft); font-size: 0.9rem; }
.cardwines > summary { list-style: none; display: flex; align-items: center; gap: 6px; min-height: 32px; cursor: pointer; }
.cardwines > summary::-webkit-details-marker { display: none; }
.cardwines > summary .chev { width: 14px; height: 14px; flex: none; transition: transform .15s; color: var(--mute); }
.cardwines[open] > summary .chev { transform: rotate(90deg); }
.cardwines[open] > summary { margin-bottom: 6px; }
.cardwines .cardfarm + .cardfarm { margin-top: 8px; }
.cardwines .cardfarm:last-child { margin-bottom: 4px; }
.cardwines ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.cardwines li { overflow-wrap: anywhere; }
.cardwines li strong { font-variant-numeric: tabular-nums; }
.cardfarmname { font-weight: 800; font-size: 0.88rem; margin-bottom: 2px; }
.cardwines p { margin: 0; }

/* Price deviations (Nathan, 10 Nov 2026): a supplier's price against IQ's cost, the GRV or an agreed price. */
.pdgroup { margin-bottom: 18px; }
.pdgtitle { font-size: 1rem; margin: 0; overflow-wrap: anywhere; }
.pdghead { align-items: center; gap: 6px; }
.pdghead:empty { display: none; }
.pdchips { margin-bottom: 10px; }
.pdpick ul:empty { display: none; }
.pdtop { align-items: flex-start; gap: 10px; }
.pdtop .title { font-weight: 700; color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.pdtop .row { gap: 6px; margin-top: 4px; }
.pdprices { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--soft); }
.pdprices > div { display: grid; gap: 1px; min-width: 0; }
.pdprices strong, .pdprices span:not(.tiny) { font-variant-numeric: tabular-nums; }
.pdprices .pdup strong { color: var(--bad); }
.pdprices .pddown strong { color: var(--ok); }
.pdtotals { gap: 6px; margin-bottom: 10px; }
.pdtable { width: 100%; border-collapse: collapse; }
.pdtable th, .pdtable td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.pdtable th { color: var(--mute); font-weight: 600; }

/* Can't pick yet: the reasons to choose from, one under the other; the chosen one dark (Nathan, 10 Nov 2026). */
.choice-list { display: grid; gap: 8px; margin-bottom: 12px; }
.choice-list .btn { justify-content: flex-start; }
.choice-list .btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.hold-card { border-left: 4px solid var(--warn, #d08a00); }

/* Prices (10 Nov 2026): a row with an action beside it ("Ask to match"), and IQ wines already watched on Add wines. */
.prow-wrap { display: flex; align-items: center; flex-wrap: wrap; }
.prow-wrap > .prow { flex: 1 1 260px; min-width: 0; }
.prow-wrap > .btn { margin: 0 16px 10px auto; flex: none; }
.item.faded .title, .item.faded .money { color: var(--mute2); }
.prow .title .chip, .item .title .chip { margin-left: 6px; vertical-align: 1px; }
.addwines .check { align-items: center; padding-top: 0; }
.addwines .check .main > span { display: block; }
/* Shelf labels (10 Nov 2026): specials and normal prices are separate print runs (specials go on yellow paper). */
/* Shelf labels (Nathan, 11 Nov 2026): tabs To print / Groups / Printed, one print bar at the foot, own groups. */
.slab-tabs { margin-bottom: 12px; }
.slab-tabs button { display: flex; align-items: center; justify-content: center; gap: 6px; }
.slab-paper-dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--line2); background: #fff; flex: none; vertical-align: -1px; }
.slab-paper-dot.paper-yellow { background: #F6D84A; border-color: #C9A900; }
.trtop > summary h2 .slab-paper-dot { margin-left: 8px; }
.trtop > summary h2 .slab-n { font-family: var(--body-font, inherit); font-weight: 600; }
.slab-findrow { align-items: center; gap: 10px; margin-bottom: 8px; }
.slab-findrow input[type="search"] { width: 100%; }
.slab-findrow.wrap > .grow { flex: 1 1 220px; }
.slab-findrow p { margin: 0; }
.slab-intro { margin: 0 2px 10px; }
.slab-tick { margin: 0 0 10px; }
.slab-list > .trtop { margin-bottom: 10px; }
.slab-howto { margin-top: 16px; }
.slab-row .title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.slab-row.off .title, .slab-pickrow.off .title { color: var(--mute); }
.chip.slab-yellow { background: #FCEFA8; color: #6B5600; border-color: #E7CF52; font-size: 0.7rem; padding: 1px 7px; }
.slab-bar { flex-wrap: wrap; margin-top: 14px; }
.slab-bar .grow { flex: 1 1 160px; }
.slab-bar strong { white-space: nowrap; }
.slab-bar-papers { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.slab-bar-btns { gap: 8px; margin-left: auto; align-items: center; }
.slab-bar-btns .btn svg { width: 18px; height: 18px; }
.slab-again { margin-top: 8px; }
.slab-again svg { width: 18px; height: 18px; }
.slab-paper-note { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.slab-paper-note label { margin: 0; }
.slab-paper-note select { width: auto; min-width: 5em; }
dialog .slab-preview { margin-top: 10px; overflow-x: auto; flex-wrap: nowrap; }
dialog .slab-preview .slab { flex: none; }
.slab-groups .item { min-height: 64px; }
.slab-gicon { width: 40px; height: 40px; border-radius: 10px; background: var(--stock-soft, var(--soft)); color: var(--stock-ink, var(--ink)); display: grid; place-items: center; flex: none; }
.slab-gicon svg { width: 20px !important; height: 20px !important; }
.slab-gmeta { margin: -6px 0 10px; }
.slab-gtools { gap: 8px; margin-bottom: 14px; }
.slab-gtools .btn svg { width: 18px; height: 18px; }
.btn.slab-del { color: var(--bad); }
/* Choosing wines: one by one, or a whole department, supplier or farm. */
dialog.slab-pick .dbody { padding-bottom: 0; }
.slab-pickmodes { margin-bottom: 12px; }
.slab-pickpane { min-height: 220px; }
.slab-stockonly { margin: 4px 0 2px; }
.slab-pickresults .toolbar { margin: 8px 0 4px; }
.slab-picklist { border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.slab-pickrow { cursor: pointer; min-height: 48px; padding: 8px 12px; gap: 10px; }
.slab-pickrow input { width: 22px; height: 22px; accent-color: var(--ink); margin: 0; flex: none; }
.slab-pickrow:hover { background: var(--soft); }
.slab-pickfoot { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  background: var(--paper); border-top: 1px solid var(--line); margin: 14px -18px 0; padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); }


/* Price requests (screens/pricereq.js): the row's wine and words open the request; the chip and Approve sit beside. */
.item .prlink { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.item .prlink:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.item .prchip { margin-top: 4px; }

/* The promo calculator (screens/promo.js; Nathan, 11 Nov 2026, for Ben). Kept compact (Nathan: "does stuff need to be
   so big?"): each wine's shops in a small table, one facts line, the three boxes small with the result beside them,
   the case deal on one line, and the plan's details in one card. */
.pc-plan { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px 12px; padding: 12px 14px; }
.pc-plan .field { margin: 0; min-width: 0; }
.pc-plan .field input { width: 100%; min-width: 0; }
/* Finding a wine on a long plan (Nathan, 12 Nov 2026: "a search bar in the calculator and department selector that
   follows when scrolled away"): it stays just under the header while the wines scroll by. */
.pc-filter { position: sticky; top: calc(var(--head-h) + env(safe-area-inset-top)); z-index: 4; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
  margin: 0 -6px 8px; padding: 8px 6px; background: var(--bg); border-bottom: 1px solid var(--line); }
.pc-filter input[type="search"] { flex: 1 1 180px; min-width: 0; min-height: 38px; padding: 6px 10px; border-radius: 9px; }
.pc-filter select { flex: 1 1 150px; min-width: 0; min-height: 38px; padding: 6px 8px; border-radius: 9px; }
.pc-filtermeta { display: flex; align-items: center; gap: 8px; flex: 1 1 100%; min-width: 0; }
.pc-filtermeta .pc-showing { margin-right: auto; }
.pc-filtermeta .btn.small { min-height: 34px; padding: 4px 10px; }
@media (min-width: 700px) { .pc-filtermeta { flex: 0 1 auto; } }
@media (min-width: 1000px) { body.signed-in .pc-filter { top: 56px; } }
.pc-plan label, .pc-plan legend, .pc-inputs label { font-size: 0.78rem; color: var(--mute); font-weight: 600; margin-bottom: 3px; }
.pc-plan input, .pc-inputs input, .pc-deal input { min-height: 38px; padding: 6px 10px; border-radius: 9px; font-size: 0.95rem; }
.pc-planshops { grid-column: 1 / 3; margin: 0; padding: 0; border: 0; min-width: 0; }
.pc-plannote { grid-column: 3 / 4; }
.pc-shopticks { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pc-shopticks .choice span { min-height: 38px; padding: 6px 8px; font-size: 0.88rem; border-radius: 9px; }
@media (max-width: 640px) {
  .pc-plan { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pc-planname, .pc-planshops, .pc-plannote { grid-column: 1 / -1; }
}
.pc-line-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px 14px; }
.pc-lines:not(:empty) { margin-bottom: 14px; }
.pc-line-card p { margin: 0; }
.pc-head { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 10px; }
.pc-head .pc-name { font-weight: 700; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.pc-head .pc-name:hover { text-decoration: underline; }
.pc-head .iconbtn { margin-left: auto; }
.pc-shops { display: block; overflow-x: auto; width: 100%; max-width: 640px; border-collapse: collapse; font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.pc-shops th, .pc-shops td { text-align: left; padding: 3px 8px 3px 0; white-space: nowrap; }
.pc-shops thead th { font-size: 0.72rem; font-weight: 600; color: var(--mute); }
.pc-shops tbody th { font-weight: 600; }
.pc-shops tbody tr + tr > * { border-top: 1px solid var(--line); }
.pc-shops .pc-promo { color: var(--warn); font-weight: 700; }
/* On a phone the shop table fits the wine's card (cells wrap, a new shelf price goes under the shelf price) instead of
   scrolling sideways inside each wine (Nathan, 11 Nov 2026: "annoying side scroll bar in each wine selected"). */
@media (max-width: 640px) {
  .pc-shops { font-size: 0.8rem; }   /* still display: block + overflow-x: auto: a scroll only if it can't fit at all */
  .pc-shops th, .pc-shops td { white-space: normal; padding-right: 6px; vertical-align: top; }
  .pc-shops .pc-up, .pc-shops td > .pc-bad { display: block; white-space: nowrap; }
}
@media (max-width: 380px) {
  .pc-shops { font-size: 0.74rem; }
  .pc-shops th, .pc-shops td { padding-right: 4px; }
}
.pc-calc { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 16px; padding-top: 8px; border-top: 1px solid var(--line); }
.pc-inputs { display: grid; grid-template-columns: repeat(3, minmax(0, 96px)); gap: 8px; align-items: end; }
.pc-inputs .field { margin: 0; min-width: 0; }
.pc-inputs input { width: 100%; min-width: 0; font-variant-numeric: tabular-nums; }
.pc-result { flex: 1 1 220px; display: grid; gap: 2px; min-width: 0; padding-bottom: 4px; }
.pc-line { font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.pc-line .pc-num { font-size: 1.25rem; font-weight: 800; color: var(--ink); }
.pc-bad { color: var(--bad); font-weight: 600; margin: 0; font-size: 0.88rem; }
.pc-deal { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.pc-dealh { flex-basis: 100%; font-weight: 600; font-size: 0.78rem; color: var(--mute); }
.pc-dealh .muted { font-weight: 400; }
.pc-dealrow { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pc-dealrow label { font-weight: 700; min-width: 2.2em; margin: 0; }
.pc-dealrow input { width: 96px; flex: none; }
.pc-foot { display: grid; gap: 6px; margin-top: 12px; padding: 12px 14px; }
.pc-foot p { margin: 0; }
.pc-totals { display: flex; flex-wrap: wrap; gap: 4px 16px; font-variant-numeric: tabular-nums; }
.pc-buttons { gap: 8px; }
.pc-buttons .btn { flex: 1 1 140px; justify-content: center; }

/* Order Recommendation (public/js/screens/stock.js, 11 Nov 2026): what to order, one row per wine with a cell per shop
   (IQ's bottles now, and +n to order there; a box to type in once the wine is ticked). On a phone the shops go under the
   wine, each with its letter. */
.rec-views { margin-bottom: 10px; }
.rec-controls { gap: 10px 18px; align-items: center; margin: 0 0 12px; }
.rec-controls > .row { gap: 8px; align-items: center; flex-wrap: nowrap; }
.rec-controls select { min-height: 36px; border-radius: 10px; }
.rec-findbox { min-width: 220px; }
.rec-findbox input { width: 100%; min-height: 38px; }
.rec-sum { margin: 2px 2px 10px; color: var(--ink2); font-weight: 600; }
.rec-group { padding: 6px 14px; margin-bottom: 10px; }
.rec-group > summary .section-title { font-size: 1rem; }
.rec-tools { gap: 8px; margin: 2px 0 4px; align-items: center; }
.rec-rows { margin: 0; }
.rec-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 70px auto 70px; gap: 4px 14px; align-items: center; padding: 10px 2px; }
.rec-row.picked { background: var(--soft); }
.rec-tick { align-self: start; padding-top: 2px; }
.rec-tick .check { margin: 0; padding-top: 0; min-height: 0; }
.rec-wine { min-width: 0; }
.rec-wine .title { font-weight: 700; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.rec-wine .title:hover { text-decoration: underline; }
.rec-wine .sub { font-size: .82rem; margin-top: 1px; }
.rec-wine .tags { margin-top: 5px; gap: 4px; }
.rec-act { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.rec-sells { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.rec-sells .k { display: none; }
.rec-shops { display: grid; grid-template-columns: repeat(3, 76px); gap: 8px; align-items: center; }
.rec-row.one .rec-shops { grid-template-columns: 76px 128px; }
.rec-shop { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-variant-numeric: tabular-nums; }
.rec-shop .k { display: none; }
.rec-shop .v { font-weight: 700; }
.rec-shop.ok .v { color: var(--ink2); }
.rec-shop.low .v { color: var(--bad); }
.rec-shop.neg .v { color: var(--bad); text-decoration: underline dotted; }
.rec-shop.none .v, .rec-shop.zero .v { color: var(--mute2); font-weight: 400; }
.rec-add { font-size: .8rem; font-weight: 800; color: var(--stock-ink); }
.rec-row input.rec-qty { width: 64px; height: 34px; min-height: 34px; padding: 2px 8px; font-size: .92rem; text-align: right; border-radius: 8px; }
.rec-others { font-size: .78rem; color: var(--mute); }
.rec-order { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; }
.rec-head { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--mute); font-weight: 800; padding: 6px 2px 4px; }
.rec-head .rec-shop, .rec-head .rec-sells, .rec-head .rec-order { font-weight: 800; color: var(--mute); }
.rec-head .rec-shops > * { text-align: right; }
.rec-supline { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.rec-supline .check { min-height: 36px; padding-top: 6px; }
.rec-onto { margin-top: 6px; }
.rec-links { margin-top: 16px; }
.rec-bar { flex-wrap: wrap; }
.rec-bar strong { white-space: nowrap; }
.rec-bar .grow { flex: 1 1 180px; }
.rec-barbtns { gap: 8px; margin-left: auto; align-items: center; }
@media (max-width: 760px) {
  .rec-head { display: none; }
  .rec-row { grid-template-columns: 28px minmax(0, 1fr) auto; grid-template-areas: "tick wine order" ". sells sells" ". shops shops"; gap: 4px 10px; }
  .rec-tick { grid-area: tick; }
  .rec-wine { grid-area: wine; }
  .rec-order { grid-area: order; align-self: start; }
  .rec-sells { grid-area: sells; text-align: left; font-weight: 400; font-size: .8rem; color: var(--mute); }
  .rec-sells .k { display: inline; }
  .rec-shops, .rec-row.one .rec-shops { grid-area: shops; display: flex; flex-wrap: wrap; gap: 6px 14px; }
  .rec-shop { flex-direction: row; align-items: center; gap: 5px; }
  .rec-shop .k { display: inline; color: var(--mute); font-size: .8rem; font-weight: 700; }
  .rec-controls > .row { flex-wrap: wrap; }
  .rec-controls > .rec-sortby { flex-wrap: nowrap; }
  .rec-sortby select { width: auto; min-width: 170px; }
  .rec-groupby .seg { max-width: 100%; }
  .rec-findbox { min-width: 0; flex-basis: 100%; }
}

/* The stock controller's Today: his dashboard (public/js/screens/stockdesk.js, 10 Nov 2026) */
.sdbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 2px 2px 0; }
.sdbar h2 { font-size: 1rem; }
.sdbar .sdedit { margin-left: auto; }
.sdedit .sdnarrow { display: none; }
@media (max-width: 459px) { .sdedit .sdwide { display: none; } .sdedit .sdnarrow { display: inline; } }
.sdbar .sdedit { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.sdbar .sdedit svg { width: 18px; height: 18px; }
.sdgrid { display: grid; gap: 12px; }
.sdgrid > * { min-width: 0; margin: 0; }
@media (min-width: 1000px) {
  .sdgrid { display: block; columns: 2; column-gap: 20px; }
  .sdgrid > * { break-inside: avoid; margin: 0 0 20px; display: block; }
}
.sdblock { padding: 0; }
.sdblock > summary { list-style: none; cursor: pointer; }
.sdblock > summary::-webkit-details-marker { display: none; }
.sdhead { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 12px 14px 12px 16px; }
.sdhead h2 { flex: 1; min-width: 0; font-size: 1rem; }
.sdmark { flex: none; width: 6px; height: 24px; border-radius: 3px; background: var(--ink); }
.sdblock.sd-orders .sdmark { background: var(--orders); }
.sdblock.sd-stock .sdmark { background: var(--stock); }
.sdblock.sd-buying .sdmark { background: var(--buying); }
.sdblock.sd-office .sdmark { background: var(--office); }
.sdcount { flex: none; font: 800 0.8125rem var(--head-font); padding: 3px 9px; border-radius: 999px; background: var(--soft); color: var(--ink2); white-space: nowrap; }
.sdcount.alert { background: var(--accent-soft); color: var(--accent-ink); }
.sdhead .chev { transform: rotate(-90deg); transition: transform .15s; }
.sdblock:not([open]) .sdhead .chev { transform: rotate(90deg); }
.sdbody { padding: 0 16px 14px; }
.sdline { font-size: 0.8125rem; font-weight: 600; color: var(--mute); margin: -4px 0 6px; }
.sdempty { padding: 4px 0 2px; }
ul.sdrows { list-style: none; margin: 0; padding: 0; }
ul.sdrows > li + li { border-top: 1px solid var(--line); }
.sdrow { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 9px 0; color: var(--ink); text-decoration: none; }
.sdrow:hover .sdt { text-decoration: underline; }
.sdmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sdt { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-weight: 700; font-size: 0.9375rem; line-height: 1.3; overflow-wrap: anywhere; }
.sds { font-size: 0.8125rem; color: var(--mute); overflow-wrap: anywhere; }
.sdside { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; max-width: 42%; }
.sdshop { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.03em; padding: 2px 7px; border-radius: 4px; background: var(--raise); color: var(--ink2); white-space: nowrap; }
.sdnum { font: 800 1.05rem var(--head-font); line-height: 1.1; white-space: nowrap; }
.sdnum small { display: block; font-family: 'GSOpenSans', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 0.6875rem; font-weight: 600; color: var(--mute); margin-top: 1px; }
.sdnum.short { color: var(--bad); }
.sdnum.over { color: var(--warn); }
.sdnum.good { color: var(--ok); }
.sdpill { font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.03em; padding: 2px 7px; border-radius: 4px; background: var(--ink); color: var(--on-ink); white-space: nowrap; }
.sdpill.orders { background: var(--orders); color: var(--on-orders); }
.sdpill.stock { background: var(--stock); color: var(--on-stock); }
.sdpill.buying { background: var(--buying); color: var(--on-buying); }
.sdpill.office { background: var(--office); color: var(--on-office); }
.sdpill.bad { background: var(--bad); color: #fff; }
:root[data-theme="dark"] .sdpill.bad { color: #16130F; }
.sdlink { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 4px; font-weight: 700; font-size: 0.875rem; color: var(--ink); text-decoration: none; }
.sdlink:hover { text-decoration: underline; }
.sdlink svg { width: 16px; height: 16px; }
details.sdmore > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; min-height: 40px; font-weight: 700; font-size: 0.875rem; color: var(--mute); }
details.sdmore > summary::-webkit-details-marker { display: none; }
details.sdmore > summary .chev { width: 16px; height: 16px; transform: rotate(90deg); transition: transform .15s; }
details.sdmore[open] > summary .chev { transform: rotate(-90deg); }
details.sdmore[open] > summary { border-top: 1px solid var(--line); width: 100%; }
.sdchips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.sdchips .chip { text-decoration: none; min-height: 32px; padding: 4px 11px; }
.sdblock .jobs { gap: 6px; }
.sdblock .job { border-color: var(--line); min-height: 62px; }
.stockdesk .mytodo.sdtodo { margin-top: 0; }
/* The to-do list's star (on everyone's list) */
.mytodo .todos .star { color: var(--mute2); }
.mytodo .todos .star svg { width: 20px; height: 20px; }
.mytodo .todos .star.on { color: var(--buying-ink); }
.mytodo .todos .star.on svg { fill: var(--buying); }
.mytodo .todos li.starred .tt { font-weight: 700; }
/* Edit my dashboard */
ol.sdeditlist { list-style: none; margin: 0; padding: 0; }
ol.sdeditlist li { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); }
ol.sdeditlist label { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 0; cursor: pointer; }
ol.sdeditlist input[type="checkbox"] { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--ink); }
ol.sdeditlist label > span { display: flex; flex-direction: column; min-width: 0; }
ol.sdeditlist small { font-size: 0.8125rem; color: var(--mute); }
ol.sdeditlist li.off strong { color: var(--mute); }
.sdmove { flex: none; display: flex; }
.sdmove .iconbtn[disabled] { opacity: 0.3; cursor: default; }
.sdrowsfield { max-width: 260px; }
/* A manager's projected cost on a wine (Nathan, 11 Nov 2026: "change the cost as a future projected costs with deals coming"). */
.pc-projected { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 0.88rem; }
.pc-projected label { font-weight: 600; font-size: 0.78rem; color: var(--mute); margin: 0; }
.pc-projected input { min-height: 34px; padding: 4px 10px; border-radius: 9px; font-size: 0.92rem; }
.pc-projected input[id^="pc-cost-"] { width: 110px; flex: none; font-variant-numeric: tabular-nums; }
.pc-projected input[id^="pc-costwhy-"] { flex: 1 1 200px; min-width: 0; }
/* Inflationary shelf prices (Nathan, 11 Nov 2026: "it will be individually for each wine"): a new shelf price on each
   wine's line, the shelf going to it per shop, and a note on the plan when any wine has one. */
.pc-projected input[id^="pc-shelf-"] { width: 110px; flex: none; font-variant-numeric: tabular-nums; }
.pc-newshelf > span { flex: 1 1 200px; min-width: 0; }
.pc-plan .pc-upnote { grid-column: 1 / -1; margin: 0; }
.pc-shops .pc-up { font-weight: 700; }

/* Choosing a day (public/js/daypick.js; 12 Nov 2026: "make it dd/mm/yyyy but also easier to use"): the coming week as
   buttons, "Later" for a month, the chosen day in full above them. */
.dp { display: grid; gap: 10px; }
.dp-said { margin: 0; font-size: 1rem; }
.dp-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.dp-day {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; padding: 6px 4px;
  border-radius: 12px; border: 1.5px solid var(--line2); background: var(--paper); color: var(--ink); font-family: var(--head-font);
  cursor: pointer; touch-action: manipulation;
}
.dp-day:hover { background: var(--soft); }
.dp-day[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.dp-top { font-weight: 800; font-size: 0.85rem; }
.dp-num { font-size: 0.8rem; opacity: 0.8; }
.dp-later { font-weight: 800; font-size: 0.85rem; }
.dp-later svg { width: 18px; height: 18px; }
.dp-month { border: 1.5px solid var(--line); border-radius: 12px; padding: 8px; }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.dp-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.dp-wd { text-align: center; font-size: 0.75rem; color: var(--mute); font-weight: 700; }
.dp-cell {
  min-height: 40px; border-radius: 10px; border: 1.5px solid transparent; background: transparent; color: var(--ink);
  font-family: var(--head-font); font-weight: 700; cursor: pointer; touch-action: manipulation;
}
.dp-cell:hover:not([disabled]) { background: var(--soft); }
.dp-cell.dp-today { border-color: var(--line2); }
.dp-cell[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.dp-cell[disabled] { opacity: 0.3; cursor: default; }
.dp-none { justify-self: start; }
.dp-none[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }

/* Offline payments (public/js/screens/offline.js): a card a day and shop, a line a payment */
.offday-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.offday-head h2 { flex: 1; min-width: 0; margin: 0; }
.offday-total { font-variant-numeric: tabular-nums; font-weight: 700; }
.offlist > li { padding: 12px 0; }
.offlist > li:first-child { padding-top: 4px; }
.offlist > li:last-child { padding-bottom: 0; }
.offrow > * + * { margin-top: 6px; }
.offrow .off-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.offrow .tags .chip svg { width: 14px; height: 14px; vertical-align: -2px; }
.offrow a.chip { text-decoration: none; }
.offacts { gap: 6px; }
.offacts > .dotmenu { margin-left: auto; }
.offday-tick { justify-content: flex-end; }
.offacts:empty { display: none; }

/* Marketing stock (public/js/screens/marketing.js): a list a month; logging several wines at once */
.mktlist > li { padding: 12px 14px; }
.mktrow > * + * { margin-top: 6px; }
.mktrow .mkt-top { display: flex; gap: 10px; align-items: baseline; }
.mktrow .mkt-top > .dotmenu { align-self: flex-start; margin: -10px -8px 0 0; }
.mktrow .mkt-qty { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 2.6em; }
.mktrow .title { font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.mktrow a.title { text-decoration: none; }
.mktrow .tags .chip svg { width: 14px; height: 14px; vertical-align: -2px; }
.mktlines:empty, .mktlines[hidden] { display: none; }
.mktlines > li { padding: 8px 10px; gap: 8px; }
.mktlines .qty { width: 4.5em; flex: none; }
.mktlines input[type="text"] { min-width: 0; }
.mkt-pick { margin-bottom: 0; }
.mkt-pick label { position: relative; color: var(--mute); flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 6px 10px; border-radius: 9px; cursor: pointer; font-weight: 600; white-space: normal; text-align: center; line-height: 1.2; }
.mkt-pick input { position: absolute; opacity: 0; pointer-events: none; }
.mkt-pick label:has(input:checked) { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(22, 19, 15, 0.12); }
.mkt-pick label:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 1px; }
