/* DUKES Order Hub — dashboard design language taken from Enterprise Eye (DESIGN.md there): neutral translucent surfaces,
   rounded corners, one soft layered elevation, one restrained accent (DUKES bronze), quiet motion. The accent GRADIENT is
   kept for three spots only: the brand mark, primary buttons and the active KPI badge. Two complete themes: "Graphite"
   (dark) and "Paper" (light). Every colour is a token; no inline styles anywhere (strict CSP). System fonts: SF Pro on
   Mac, Segoe UI on Windows, so nothing is downloaded. */

:root {
  color-scheme: light;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Inter, system-ui, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Inter, system-ui, sans-serif;

  /* ---- "Paper" ---- */
  --bg: #f6f5f3; --bg-glow: rgba(168, 149, 115, .16);
  --glass: rgba(255, 255, 255, .80); --glass-2: #ffffff; --side: rgba(255, 255, 255, .66);
  --line: #e6e2dc; --line-2: #d4cdc4;
  --ink: #1d1b19; --ink-2: #4b4640; --ink-3: #706961; --placeholder: #7b746c;
  --ov1: rgba(40, 30, 20, .035); --ov2: rgba(40, 30, 20, .06); --ov3: rgba(40, 30, 20, .09); --ov4: rgba(40, 30, 20, .14);
  --pane: rgba(255, 255, 255, .42); --pane-edge: rgba(255, 255, 255, .85); --pane-line: rgba(60, 45, 25, .08); --pane-hover: rgba(255, 255, 255, .62);
  --input-bg: #ffffff;
  --accent: #8a6a42; --accent-hi: #74572f; --accent-ink: #6d522c;
  --accent-wash: color-mix(in srgb, var(--accent) 11%, transparent);
  --accent-grad: linear-gradient(135deg, #c3a272, #8a6a42 55%, #5e4628);
  --top-bg: rgba(246, 245, 243, .78);
  --card-shadow: 0 1px 1px rgba(40, 25, 10, .04), 0 2px 4px rgba(40, 25, 10, .04), 0 14px 32px -18px rgba(40, 25, 10, .22);
  --card-shadow-hi: 0 1px 1px rgba(40, 25, 10, .05), 0 4px 10px rgba(40, 25, 10, .06), 0 22px 44px -20px rgba(40, 25, 10, .30);
  --bevel: inset 0 1px 0 rgba(255, 255, 255, .9);
  --good: #18794a; --good-ink: #0f5c37; --warn: #9a6408; --warn-ink: #7a4e05; --crit: #b42318; --crit-ink: #912018;
  --r-lg: 14px; --r-md: 10px; --r-sm: 8px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --dur-in: .18s; --dur-out: .12s;  /* things arrive a little slower than they leave */
}
:root[data-theme="dark"] {
  color-scheme: dark;
  /* ---- "Graphite" ---- */
  --bg: #1b1a19; --bg-glow: rgba(196, 167, 125, .10);
  --glass: rgba(41, 40, 38, .74); --glass-2: #2b2a28; --side: rgba(33, 32, 30, .72);
  --line: rgba(255, 255, 255, .09); --line-2: rgba(255, 255, 255, .16);
  --ink: #f6f4f1; --ink-2: #d6d0c8; --ink-3: #a39c93; --placeholder: #a8a198;
  --ov1: rgba(255, 255, 255, .04); --ov2: rgba(255, 255, 255, .07); --ov3: rgba(255, 255, 255, .11); --ov4: rgba(255, 255, 255, .17);
  --pane: rgba(255, 255, 255, .035); --pane-edge: rgba(255, 255, 255, .07); --pane-line: rgba(255, 255, 255, .07); --pane-hover: rgba(255, 255, 255, .06);
  --input-bg: rgba(255, 255, 255, .05);
  --accent: #c9ab7e; --accent-hi: #dcc196; --accent-ink: #e0c9a2;
  --accent-wash: color-mix(in srgb, var(--accent) 14%, transparent);
  --accent-grad: linear-gradient(135deg, #d6b98a, #a2814f 55%, #6b522f);
  --top-bg: rgba(27, 26, 25, .72);
  --card-shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 12px 34px -16px rgba(0, 0, 0, .65);
  --card-shadow-hi: 0 2px 4px rgba(0, 0, 0, .3), 0 22px 48px -18px rgba(0, 0, 0, .75);
  --bevel: inset 0 1px 0 rgba(255, 255, 255, .06);
  --good: #4ade80; --good-ink: #93ebb4; --warn: #f2b84b; --warn-ink: #f7d48f; --crit: #ff6b6b; --crit-ink: #ffb1ac;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  color-scheme: dark;
  --bg: #1b1a19; --bg-glow: rgba(196, 167, 125, .10);
  --glass: rgba(41, 40, 38, .74); --glass-2: #2b2a28; --side: rgba(33, 32, 30, .72);
  --line: rgba(255, 255, 255, .09); --line-2: rgba(255, 255, 255, .16);
  --ink: #f6f4f1; --ink-2: #d6d0c8; --ink-3: #a39c93; --placeholder: #a8a198;
  --ov1: rgba(255, 255, 255, .04); --ov2: rgba(255, 255, 255, .07); --ov3: rgba(255, 255, 255, .11); --ov4: rgba(255, 255, 255, .17);
  --pane: rgba(255, 255, 255, .035); --pane-edge: rgba(255, 255, 255, .07); --pane-line: rgba(255, 255, 255, .07); --pane-hover: rgba(255, 255, 255, .06);
  --input-bg: rgba(255, 255, 255, .05);
  --accent: #c9ab7e; --accent-hi: #dcc196; --accent-ink: #e0c9a2;
  --accent-wash: color-mix(in srgb, var(--accent) 14%, transparent);
  --accent-grad: linear-gradient(135deg, #d6b98a, #a2814f 55%, #6b522f);
  --top-bg: rgba(27, 26, 25, .72);
  --card-shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 12px 34px -16px rgba(0, 0, 0, .65);
  --card-shadow-hi: 0 2px 4px rgba(0, 0, 0, .3), 0 22px 48px -18px rgba(0, 0, 0, .75);
  --bevel: inset 0 1px 0 rgba(255, 255, 255, .06);
  --good: #4ade80; --good-ink: #93ebb4; --warn: #f2b84b; --warn-ink: #f7d48f; --crit: #ff6b6b; --crit-ink: #ffb1ac;
} }

/* ------------------------------------------------------------------ base */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { scrollbar-gutter: stable; }  /* locking the page behind a pop-up never makes it jump sideways */
body { margin: 0; color: var(--ink); font: 400 14.5px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden;
  background: radial-gradient(900px 520px at 100% -8%, var(--bg-glow), transparent 70%), radial-gradient(700px 480px at -10% 110%, var(--bg-glow), transparent 70%), var(--bg);
  background-attachment: fixed; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 700; letter-spacing: -.015em; color: var(--ink); }
h1 { font-size: 26px; line-height: 1.15; letter-spacing: -.022em; }
h2 { font-size: 15px; line-height: 1.3; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent-wash); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--ov4); border-radius: 10px; border: 2px solid transparent; background-clip: content-box; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 4px; }
.muted { color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums; }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------------ surfaces */
.card { position: relative; background: var(--glass); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; min-width: 0;
  box-shadow: var(--card-shadow), var(--bevel); }
/* a card that just changed (e.g. an order packed) glows gold once, so the eye finds it; it is never hidden while it updates */
.card.flash { animation: flash 1.2s var(--ease) both; }
@keyframes flash { from { background-color: color-mix(in srgb, var(--accent) 16%, var(--glass-2)); border-color: color-mix(in srgb, var(--accent) 55%, transparent); } }
.card-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-h .sub { color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }

/* ------------------------------------------------------------------ buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: var(--r-md);
  border: 1px solid var(--line-2); background: var(--glass-2); color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none;
  white-space: nowrap; box-shadow: 0 1px 2px rgba(0, 0, 0, .06), var(--bevel); transition: transform .15s var(--ease), background .2s, border-color .2s, box-shadow .2s; }
.btn:hover { background: var(--ov2); border-color: var(--ov4); }
.btn:active { transform: scale(.97); }
.btn.primary { border: 0; color: #fff; background: var(--accent-grad); box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--accent) 90%, #000), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn.primary:hover { filter: brightness(1.08); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .btn.primary:hover:not(:active) { transform: translateY(-1px); } }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-3); }
.btn.ghost:hover { background: var(--ov2); color: var(--ink); }
.btn.block { display: flex; width: 100%; height: 40px; }
.btn.icon { width: 36px; padding: 0; } .btn.icon.sm { width: 32px; height: 32px; }
.btn:disabled, .btn.htmx-request { opacity: .55; cursor: progress; }
/* the Appearance button shows the mode in use: automatic (half-filled circle), light (sun) or dark (moon) */
[data-theme-toggle] .th-light, [data-theme-toggle] .th-dark { display: none; }
:root[data-theme="light"] [data-theme-toggle] .th-light, :root[data-theme="dark"] [data-theme-toggle] .th-dark { display: block; }
:root[data-theme] [data-theme-toggle] .th-auto { display: none; }

/* ------------------------------------------------------------------ chips */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12.5px; font-weight: 600;
  white-space: nowrap; background: var(--ov2); border: 1px solid var(--line); color: var(--ink-2); }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.chip.good { color: var(--good-ink); background: color-mix(in srgb, var(--good) 13%, transparent); border-color: color-mix(in srgb, var(--good) 38%, transparent); }
.chip.warn { color: var(--warn-ink); background: color-mix(in srgb, var(--warn) 14%, transparent); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.chip.neg { color: var(--crit-ink); background: color-mix(in srgb, var(--crit) 13%, transparent); border-color: color-mix(in srgb, var(--crit) 42%, transparent); }
.env-pill { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 99px; font-size: 12.5px; font-weight: 650;
  color: var(--warn-ink); background: color-mix(in srgb, var(--warn) 13%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 38%, transparent); }
.env-pill .ico { width: 15px; height: 15px; }

/* ------------------------------------------------------------------ brand */
.mark { display: grid; place-items: center; width: var(--lk, 42px); height: var(--lk, 42px); flex: none; border-radius: calc(var(--lk, 42px) * .28);
  background: var(--accent-grad); color: #fff; box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--accent) 85%, #000), inset 0 1px 0 rgba(255, 255, 255, .3); }
.mark svg { width: 52%; height: 52%; }
.lockup { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lockup-text { line-height: 1.1; min-width: 0; }
.lockup-text b { display: block; font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: .14em; color: var(--ink); }
.lockup-text small { display: block; margin-top: 5px; color: var(--ink-3); font-size: 11.5px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; }
.lockup.stack { --lk: 60px; flex-direction: column; text-align: center; gap: 14px; }
.lockup.stack .lockup-text b { font-size: 24px; }

/* ------------------------------------------------------------------ shell */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: 4px; padding: 16px 12px 12px;
  background: var(--side); border-right: 1px solid var(--line); -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%); overflow-y: auto; }
.brand { display: flex; padding: 2px 8px 10px; text-decoration: none; border-radius: var(--r-md); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-h { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); padding: 14px 10px 4px; margin: 0; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-md); text-decoration: none; color: var(--ink-2); font-weight: 500;
  transition: background .18s, color .18s; }
.nav a .ico { color: var(--ink-3); transition: color .18s; }
.nav a:hover { background: var(--ov2); color: var(--ink); } .nav a:hover .ico { color: var(--ink-2); }
.nav a:active, .tabs a:active, .act-chip:active, .alerts-list a:active, .nav-fly a:active, .tbl tr.row-link:active td { background: var(--ov3); transition-duration: 0s; }
.nav a, .tabs a, .act-chip, .alerts-list a, .nav-fly a, .tbl tr.row-link, .btn { -webkit-tap-highlight-color: transparent; }
.nav a[aria-current="page"] { color: var(--accent-ink); font-weight: 650; background: var(--accent-wash);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 26%, transparent); }
.nav a[aria-current="page"] .ico { color: var(--accent); }
.side-foot { margin-top: auto; padding-top: 14px; }
.me-chip { display: flex; align-items: center; gap: 10px; padding: 9px 9px 9px 10px; border-radius: var(--r-md); background: var(--ov1); border: 1px solid var(--line); }
.avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; color: #fff;
  background: var(--accent-grad); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .2); }
.me-chip .who { min-width: 0; flex: 1; line-height: 1.25; }
.me-chip .who b, .me-chip .who small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-chip .who b { font-size: 13.5px; } .me-chip .who small { color: var(--ink-3); font-size: 12.5px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 28px;
  background: var(--top-bg); border-bottom: 1px solid var(--line); -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%); }
.top .ttl { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; white-space: nowrap; }
.top .crumb, .top .sep { color: var(--ink-3); } .top .ttl b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; }
.top .sp { flex: 1; }
.page { width: 100%; max-width: 1480px; margin: 0 auto; padding: 24px 28px 56px; }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.lede { margin-top: 4px; color: var(--ink-3); max-width: 70ch; font-size: 14px; }

/* ------------------------------------------------------------------ grids */
.grid { display: grid; gap: 16px; }
.g-kpi { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.g-21 { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.mt { margin-top: 16px; }

/* ------------------------------------------------------------------ KPI tiles */
.tile { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; transition: transform .25s var(--ease), box-shadow .25s, border-color .25s; }
.tile:hover { box-shadow: var(--card-shadow-hi), var(--bevel); border-color: var(--line-2); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .tile:hover { transform: translateY(-2px); } }
.tile-h { display: flex; align-items: center; gap: 10px; }
.tile .k { color: var(--ink-3); font-size: 12.5px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.tile .v { white-space: nowrap; font-family: var(--font-display); font-size: clamp(26px, 2.3vw, 34px); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; margin-top: 10px; }
.tile .d { color: var(--ink-3); font-size: 13px; }
.tile-link { margin-top: auto; padding-top: 10px; display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; font-size: 13px; font-weight: 600;
  color: var(--accent-ink); text-decoration: none; }
.tile-link .ico { width: 15px; height: 15px; transition: transform .2s var(--ease); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .tile-link:hover .ico { transform: translateX(3px); } }
.badge-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; flex: none; color: var(--accent);
  background: var(--accent-wash); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent); }
.badge-ico .ico { width: 17px; height: 17px; }
.badge-ico.sm { width: 32px; height: 32px; border-radius: 9px; }

/* ------------------------------------------------------------------ lists, stats, empty states */
.status-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.status-list li { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: var(--r-md); background: var(--ov1); border: 1px solid var(--line); }
.status-list .grow { flex: 1; min-width: 0; line-height: 1.3; }
.status-list b { display: block; font-size: 14px; font-weight: 600; } .status-list small { color: var(--ink-3); font-size: 12.5px; }
.jobs { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0; }
.stats div { padding: 10px; border-radius: var(--r-md); background: var(--ov1); border: 1px solid var(--line); text-align: center; }
.stats dt { color: var(--ink-3); font-size: 12px; } .stats dd { margin: 2px 0 0; font-size: 20px; font-weight: 700; }
.stats .bad { color: var(--crit-ink); border-color: color-mix(in srgb, var(--crit) 40%, transparent); background: color-mix(in srgb, var(--crit) 10%, transparent); }
.empty { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 40px 20px; color: var(--ink-3); }
.empty b { color: var(--ink); font-size: 16px; } .empty p { max-width: 46ch; }
.empty .btn { margin-top: 10px; }
.big-ico { display: grid; place-items: center; width: 60px; height: 60px; margin-bottom: 6px; border-radius: 18px; color: var(--accent);
  background: var(--accent-wash); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent); }
.big-ico .ico { width: 28px; height: 28px; stroke-width: 1.6; }

/* ------------------------------------------------------------------ tables, people */
.card.flush { padding: 0; overflow: hidden; overflow: clip; }
.tbl-wrap { overflow-x: auto; overscroll-behavior-x: contain; position: relative; }  /* relative: hidden labels (.sr) stay inside the scroll, never widen the page */  /* a sideways swipe on a wide table never turns into the browser's Back */
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3);
  padding: 10px 14px; border-bottom: 1px solid var(--line-2); white-space: nowrap; background: var(--ov1); }
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .15s; } .tbl tbody tr:hover { background: var(--ov1); }
.tbl tr.dim td { opacity: .62; }
.tbl .r { text-align: right; }
.person { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.person b { display: block; font-weight: 600; line-height: 1.25; } .person small { color: var(--ink-3); font-size: 12.5px; }
.person:hover b { color: var(--accent-ink); }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; } .avatar.lg { width: 56px; height: 56px; font-size: 19px; }
.chip.tiny { height: 20px; padding: 0 8px; font-size: 11.5px; } .chip.tiny::before { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hint { margin-top: 10px; color: var(--ink-3); font-size: 13px; }
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; color: var(--ink-3); text-decoration: none; font-size: 13.5px; font-weight: 600; }
.back .ico { width: 16px; height: 16px; } .back:hover { color: var(--accent-ink); }
.who-h { display: flex; align-items: center; gap: 16px; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; }
.note { border-radius: var(--r-md); padding: 9px 12px; margin: 0 0 14px; background: var(--accent-wash); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); color: var(--ink); }
.note.good { background: color-mix(in srgb, var(--good) 11%, transparent); border-color: color-mix(in srgb, var(--good) 35%, transparent); color: var(--good-ink); }
.note.bad { background: color-mix(in srgb, var(--crit) 10%, transparent); border-color: color-mix(in srgb, var(--crit) 38%, transparent); color: var(--crit-ink); }
.result:empty { display: none; }
.g-12 { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
.stack-col { display: grid; gap: 16px; align-content: start; }

/* permission tick-boxes */
.perm-group { border: 0; padding: 0; margin: 0 0 14px; display: grid; gap: 6px; min-width: 0; }
.perm-group legend { padding: 0; margin-bottom: 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
.perm { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; color: var(--ink); font-size: 14px; font-weight: 400; letter-spacing: 0; padding: 11px 14px; border-radius: var(--r-md);
  background: var(--ov1); border: 1px solid var(--line); cursor: pointer; transition: background .15s, border-color .15s; }
.perm:hover { background: var(--ov2); }
.perm:has(input:checked) { border-color: color-mix(in srgb, var(--accent) 32%, transparent); background: var(--accent-wash); }
.perm:has(input:disabled) { cursor: default; }
.perm-t b { display: block; font-size: 14px; font-weight: 600; } .perm-t small { display: block; color: var(--ink-3); font-size: 12.5px; line-height: 1.4; }
/* Switches: a pill track with a pill-shaped knob that slides (owner's reference, 14 Oct), in the hub's colours: gold when on */
input.switch { appearance: none; -webkit-appearance: none; width: 38px; height: 22px; min-height: 0; margin: 0; padding: 0; border: 0;
  border-radius: 999px; position: relative; cursor: pointer; flex: none; background: var(--switch-off);
  box-shadow: inset 0 0 0 1px var(--line-2); transition: background .25s ease, box-shadow .25s ease; }
input.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 16px; border-radius: 999px; background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .18), 0 0 0 .5px rgba(0, 0, 0, .06); transition: transform .25s cubic-bezier(.3, .7, .4, 1); }
input.switch:checked { background: var(--accent-grad); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 60%, transparent); }
input.switch:checked::after { transform: translateX(10px); }
input.switch:disabled { cursor: default; opacity: .7; }
input.switch:disabled:not(:checked) { opacity: .45; }
input.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
:root { --switch-off: color-mix(in srgb, var(--ink) 12%, transparent); }
.perm { grid-template-columns: minmax(0, 1fr) auto auto; }
.perm input.switch { order: 3; } .perm .chip { order: 2; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 6px; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 16px; }
.form-foot p { max-width: 52ch; font-size: 13px; }
.reset-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; }
ul.actions { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
ul.actions li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border-radius: var(--r-md); background: var(--ov1); border: 1px solid var(--line); }
ul.actions li > span { min-width: 0; } ul.actions b { display: block; font-size: 14px; font-weight: 600; } ul.actions small { display: block; color: var(--ink-3); font-size: 12.5px; line-height: 1.4; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; } .btn.sm .ico { width: 15px; height: 15px; }
.btn.danger { color: var(--crit-ink); border-color: color-mix(in srgb, var(--crit) 40%, transparent); background: color-mix(in srgb, var(--crit) 8%, var(--glass-2)); }
.btn.danger:hover { background: color-mix(in srgb, var(--crit) 16%, var(--glass-2)); }
select { width: 100%; min-height: 38px; padding: 7px 34px 7px 12px; border-radius: var(--r-md); border: 1px solid var(--line-2); background-color: var(--input-bg);
  color: var(--ink); font-size: 15px; appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; }
select:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 24%, transparent); }
select:disabled { opacity: .6; cursor: not-allowed; }
.temp-pw { display: grid; gap: 10px; justify-items: start; }
.kv { display: grid; gap: 10px; margin: 4px 0; width: 100%; } .kv dt { font-size: 12px; color: var(--ink-3); } .kv dd { margin: 2px 0 0; }
code { font: 500 13px/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--ov2); border: 1px solid var(--line); padding: 2px 7px; border-radius: 6px; }
code.pw { font-size: 17px; letter-spacing: .04em; padding: 6px 10px; user-select: all; }

/* ------------------------------------------------------------------ orders */
.sync-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chip.info { color: var(--accent-ink); background: var(--accent-wash); border-color: color-mix(in srgb, var(--accent) 32%, transparent); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; padding: 4px; border-radius: 12px; background: var(--ov1); border: 1px solid var(--line); }
.tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 9px; text-decoration: none; color: var(--ink-2);
  font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.tabs a em { font-style: normal; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tabs a:hover { background: var(--ov2); color: var(--ink); }
.tabs a[aria-current="page"] { background: var(--glass-2); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08), inset 0 0 0 1px var(--line-2); }
.tabs a[aria-current="page"] em { color: var(--accent-ink); }
.search { position: relative; display: block; width: min(300px, 100%); font-weight: 400; letter-spacing: 0; }
.search .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); width: 17px; height: 17px; }
.search input { padding-left: 38px; border-radius: 99px; min-height: 38px; font-size: 14px; }
.tbl.orders td { vertical-align: top; white-space: normal; }
.tbl.orders .status { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 150px; }
.tbl.orders .status small { width: 100%; margin-top: -2px; }
.tbl.orders td.cust { min-width: 150px; }
.tbl.orders td.r, .order-link small, .order-link b { white-space: nowrap; }
.order-link { text-decoration: none; display: block; } .order-link b { display: block; font-weight: 700; } .order-link:hover b { color: var(--accent-ink); }
.order-link small, .cust small { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }
.cust b { font-weight: 600; } .tbl td.items { white-space: normal; min-width: 170px; max-width: 260px; }
.tbl td.tags { white-space: normal; min-width: 120px; }
.tag { display: inline-block; margin: 0 4px 4px 0; padding: 2px 8px; border-radius: 6px; font-size: 12px; background: var(--ov2); border: 1px solid var(--line); color: var(--ink-2); }
.tag.add { color: var(--good-ink); border-color: color-mix(in srgb, var(--good) 35%, transparent); background: color-mix(in srgb, var(--good) 9%, transparent); }
.tag.del { color: var(--crit-ink); border-color: color-mix(in srgb, var(--crit) 35%, transparent); background: color-mix(in srgb, var(--crit) 8%, transparent); text-decoration: line-through; }
.pager { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
ul.lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
ul.lines li { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: var(--r-md); background: var(--ov1); border: 1px solid var(--line); }
ul.lines li.removed { opacity: .55; }
ul.lines img, ul.lines .noimg { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; background: var(--ov2); display: grid; place-items: center; color: var(--ink-3); }
ul.lines .grow { flex: 1; min-width: 0; } ul.lines b { display: block; font-weight: 600; } ul.lines small { color: var(--ink-3); font-size: 12.5px; }
ul.lines .qty { color: var(--ink-2); font-weight: 600; } ul.lines .price { min-width: 90px; text-align: right; font-weight: 600; }
dl.totals { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
dl.totals div { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-2); } dl.totals dd { margin: 0; }
dl.totals .big { color: var(--ink); font-size: 17px; font-weight: 700; }
.kv dd { color: var(--ink); overflow-wrap: anywhere; }
ol.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; display: grid; gap: 12px; border-left: 2px solid var(--line-2); }
ol.timeline li { position: relative; display: grid; gap: 4px; }
ol.timeline li::before { content: ""; position: absolute; left: -24px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--glass-2); }
ol.timeline .when { font-size: 12.5px; color: var(--ink-3); }
ul.pipe { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
ul.pipe a { display: grid; grid-template-columns: 120px minmax(0, 1fr) 44px; align-items: center; gap: 14px; padding: 8px 10px; border-radius: var(--r-md); text-decoration: none; }
ul.pipe a:hover { background: var(--ov2); }
.pl { font-size: 14px; font-weight: 600; color: var(--ink-2); } .pn { text-align: right; font-weight: 700; font-size: 15px; }
.bar { height: 10px; border-radius: 99px; background: var(--ov2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent-grad); }
.bar .w0 { width: 0%; } .bar .w1 { width: 5%; } .bar .w2 { width: 10%; } .bar .w3 { width: 15%; } .bar .w4 { width: 20%; } .bar .w5 { width: 25%; } .bar .w6 { width: 30%; } .bar .w7 { width: 35%; } .bar .w8 { width: 40%; } .bar .w9 { width: 45%; } .bar .w10 { width: 50%; } .bar .w11 { width: 55%; } .bar .w12 { width: 60%; } .bar .w13 { width: 65%; } .bar .w14 { width: 70%; } .bar .w15 { width: 75%; } .bar .w16 { width: 80%; } .bar .w17 { width: 85%; } .bar .w18 { width: 90%; } .bar .w19 { width: 95%; } .bar .w20 { width: 100%; }

/* sheet codes, shipments, import, reports */
.code { font: 600 11px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .02em; color: var(--ink-3); padding: 4px 6px;
  border-radius: 6px; border: 1px dashed var(--line-2); white-space: nowrap; }
.code:empty { display: none; }
.tbl.orders .next { width: 100%; color: var(--accent-ink); font-size: 12.5px; font-weight: 600; }
a.next.go { color: var(--accent-ink); font-size: 12.5px; font-weight: 600; text-decoration: none; }  /* Next: leads to the screen where it is done */
a.next.go:hover { text-decoration: underline; text-underline-offset: 3px; } .tbl.orders a.next.go { display: block; }
.tbl.orders td.ship { min-width: 130px; } .tbl.orders td.ship b { display: block; font-weight: 600; }
.tbl.orders td.ship small { display: block; font-size: 12px; color: var(--ink-3); }
.xpay-tbl .mono { font-size: 12px; white-space: nowrap; }  /* Payment IDs are long: keep the Result column in view */
.xpay-tbl td.xm, .xpay-tbl td.xr { white-space: normal; min-width: 105px; }  /* method, and the bank check / why to check it */
.xpay-tbl td.xr { min-width: 130px; } .xpay-tbl .xv-btn { margin-top: 2px; } .rp.picking .xpay-tbl .xv-btn { display: none; }  /* ticking: "Verify together" instead */ .xpay-tbl td.xr small { margin-top: 3px; }
.xv-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.xv-fee { margin: 8px 0 12px; font-size: 13.5px; color: var(--ink-2); } .xv-fee.over { color: var(--crit-ink); font-weight: 600; } .xpay-tbl .late { color: var(--warn-ink); font-weight: 650; }
/* return pickup's progress (hub/orders/pickups.py): on the return, the Returns list and Warehouse › Returns in */
.pk-status { margin: 4px 0 14px; } .pk-cancel { margin: -6px 0 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .pk-status p { margin: 0 0 4px; } .pk-status small + small { margin-top: 2px; }
.pk-status .late, .tbl td small.late, .ships small.late { color: var(--warn-ink); font-weight: 600; }
.xv-tbl .mono { font-size: 12px; } .btn.danger-t { color: var(--crit-ink); } .modal-f .xv-undo { margin-right: auto; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .02em; }
ul.ships { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
ul.ships li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); background: var(--ov1); border: 1px solid var(--line); }
ul.ships li.cancelled { opacity: .6; } ul.ships li.cancelled .mono { text-decoration: line-through; }
ul.ships small.event { display: block; color: var(--ink); font-weight: 500; margin: 2px 0; }
ul.ships .grow { flex: 1; min-width: 0; } ul.ships b { display: block; font-weight: 600; } ul.ships small { color: var(--ink-3); font-size: 12.5px; }
ol.steps { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 6px; color: var(--ink-2); }
.stats.two { grid-template-columns: repeat(2, 1fr); margin-top: 10px; }
ul.plain-list { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13.5px; }
input[type=file] { padding: 9px 10px; min-height: 0; font-size: 13.5px; cursor: pointer; background: var(--ov1); border-style: dashed; }
input[type=file]::file-selector-button { font: 600 13px var(--font); margin-right: 12px; padding: 7px 12px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--glass-2); color: var(--ink); cursor: pointer; }
.tbl.report th[scope=row] { text-align: left; font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--ink); background: none;
  font-weight: 600; border-bottom: 1px solid var(--line); }
.tbl.report tr.sum td, .tbl.report tr.sum th { font-weight: 700; background: var(--ov1); border-top: 1px solid var(--line-2); }

/* pop-up (tracking) */
dialog.modal { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--line-2); border-radius: 18px;
  background: var(--glass-2); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .55); overflow: hidden; display: flex; flex-direction: column; }
dialog.modal:not([open]) { display: none; }
dialog.modal { opacity: 0; transform: scale(.98);
  transition: opacity var(--dur-out) ease-in, transform var(--dur-out) ease-in, overlay var(--dur-out) allow-discrete, display var(--dur-out) allow-discrete; }
dialog.modal[open] { opacity: 1; transform: none; transition-duration: var(--dur-in); transition-timing-function: var(--ease); }
@starting-style { dialog.modal[open] { opacity: 0; transform: scale(.98); } }
dialog.modal::backdrop { background: rgba(10, 8, 6, .45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0;
  transition: opacity var(--dur-out), overlay var(--dur-out) allow-discrete, display var(--dur-out) allow-discrete; }
dialog.modal[open]::backdrop { opacity: 1; transition-duration: var(--dur-in); }
@starting-style { dialog.modal[open]::backdrop { opacity: 0; } }
body:has(dialog.modal[open]) { overflow: hidden; }  /* scrolling a pop-up never scrolls the page behind it */
dialog.modal .modal-b { overscroll-behavior: contain; }
.modal-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); }
.modal-h h2 { font-size: 19px; } .modal-b { padding: 18px 22px; overflow-y: auto; display: grid; gap: 14px; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--ov1); }
.modal .note { margin: 0; }
ol.stepbar { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
ol.stepbar li { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 12px; font-weight: 600; color: var(--ink-3); position: relative; }
ol.stepbar li span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--ov2); border: 1px solid var(--line-2); color: var(--ink-3); font-size: 13px; }
ol.stepbar li.done { color: var(--ink); } ol.stepbar li.done span { background: var(--accent-grad); color: #fff; border-color: transparent; }
ol.stepbar li.rto span { border-color: color-mix(in srgb, var(--crit) 45%, transparent); }
.current { display: grid; gap: 4px; padding: 12px 14px; border-radius: var(--r-md); background: var(--ov1); border: 1px solid var(--line); }
.current.good { background: color-mix(in srgb, var(--good) 10%, transparent); border-color: color-mix(in srgb, var(--good) 35%, transparent); }
.current.bad { background: color-mix(in srgb, var(--crit) 9%, transparent); border-color: color-mix(in srgb, var(--crit) 35%, transparent); }
.current small { color: var(--ink-3); } .current .quiet, .quiet { color: var(--warn-ink); font-weight: 600; }
.sect-h { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); }
.kv.grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.ship-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.track-btn .busy { display: none; } .track-btn.htmx-request .busy { display: inline; } .track-btn.htmx-request .idle { display: none; }
.track-btn.htmx-request { cursor: progress; }
.ship-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
/* when the parcel list is narrow (tablet, phone, side-by-side windows) the buttons move under the details instead of squeezing them */
ul.ships { container-type: inline-size; }
@container (max-width: 640px) { ul.ships li { flex-wrap: wrap; } ul.ships li > .ship-side { width: 100%; align-items: flex-start; }
  ul.ships li > .grow { flex-basis: calc(100% - 52px); }  /* the text keeps its row; a chip beside it goes underneath (3 Nov 2026) */
  ul.ships li > .chip { margin-left: 44px; }
  ul.ships li > .ship-side .ship-actions { justify-content: flex-start; } }
@media (max-width: 560px) { ol.stepbar { grid-template-columns: repeat(5, minmax(0, 1fr)); font-size: 11px; } .kv.grid2 { grid-template-columns: 1fr; }
  ul.ships li { flex-wrap: wrap; } .ship-side { align-items: flex-start; width: 100%; } }

/* tickets */
textarea { width: 100%; padding: 8px 12px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--input-bg); color: var(--ink);
  font: 400 14px/1.5 var(--font); letter-spacing: 0; resize: vertical; }
textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 24%, transparent); }
.modal form.modal-b { display: grid; gap: 14px; }
.mb { margin-bottom: 14px; } .mb-s { margin: 22px 0 10px; } .block { display: block; }
.ticket-text { margin: 0; white-space: pre-wrap; font: 13.5px/1.55 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--ink);
  background: var(--ov1); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; max-height: 360px; overflow: auto; }
.send-steps { border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.send-steps ol.steps { display: grid; gap: 14px; margin: 0; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; font-weight: 400; letter-spacing: 0; }
.inline-form input { flex: 1; min-width: 180px; min-height: 36px; padding: 8px 12px; font-size: 14px; }
ol.timeline li.tn-courier_reply .tn-text { display: block; padding: 10px 12px; border-radius: var(--r-md); background: var(--accent-wash);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent); white-space: pre-wrap; }
ol.timeline li.tn-note .tn-text { white-space: pre-wrap; }
ol.timeline li.tn-status .tn-text { color: var(--ink-2); }
a.chip { text-decoration: none; }

/* ------------------------------------------------------------------ sign-in and setup */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.auth-box { width: min(420px, 100%); display: grid; gap: 22px; }
.auth-brand { display: flex; justify-content: center; }
.auth-card { display: grid; gap: 18px; padding: 28px; border-radius: 18px; }
.auth-head h1 { font-size: 24px; } .auth-head .muted { margin-top: 6px; }
.auth-env { display: flex; justify-content: center; }
form.stack { display: grid; gap: 12px; }
label { display: grid; gap: 5px; font-size: 12.5px; font-weight: 650; letter-spacing: .02em; color: var(--ink-3); }
input { width: 100%; min-height: 38px; padding: 7px 12px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--input-bg);
  color: var(--ink); font-size: 14px; font-weight: 400; letter-spacing: 0; transition: border-color .2s, box-shadow .2s; }
input::placeholder { color: var(--placeholder); }
input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 24%, transparent); }
.error { color: var(--crit-ink); font-size: 13.5px; min-height: 1.2em; }
.qr { width: 200px; height: 200px; justify-self: center; background: #fff; padding: 8px; border-radius: var(--r-md); border: 1px solid var(--line); }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1080px) { .g-21, .g-12 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) {
  .shell { grid-template-columns: 68px minmax(0, 1fr); }
  .side { padding: 16px 10px 12px; align-items: stretch; }
  .brand { justify-content: center; padding: 0 0 12px; } .brand .lockup-text { display: none; }
  .nav-h { display: none; } .nav { gap: 4px; } .nav a { justify-content: center; padding: 11px 0; } .nav a .t { display: none; }
  .me-chip { flex-direction: column; padding: 8px 0; background: none; border: 0; } .me-chip .who { display: none; }
  .top { padding: 0 16px; } .top .crumb, .top .sep { display: none; }
  .page { padding: 20px 16px 48px; }
  h1 { font-size: 23px; }
}
@media (max-width: 560px) {
  .env-pill span { display: none; } .env-pill { padding: 0 8px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .who-h { align-items: flex-start; } .avatar.lg { width: 44px; height: 44px; font-size: 15px; }
  ul.actions li { flex-direction: column; align-items: stretch; }
  ul.pipe a { grid-template-columns: 96px minmax(0, 1fr) 36px; gap: 10px; }
  .search { width: 100%; }
}
/* reduced motion: nothing slides, grows or lifts; short fades and colour changes stay (they say what changed), and so does the
   busy spinner (it says work is still going) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-property: opacity, color, background-color, border-color, box-shadow, outline-color, visibility, display, overlay !important;
    scroll-behavior: auto !important; }
  .btn:active { transform: none; }
  .nav-fly { animation-name: fade-in; }
}
@keyframes fade-in { from { opacity: 0; } }

/* courier decisions */
.decisions { display: grid; gap: 16px; }
.decision.open { border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.decision h2 a { color: inherit; }
form.decide { display: grid; gap: 10px; margin-top: 14px; }
fieldset.choices { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
label.choice { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border-radius: var(--r-md); border: 1px solid var(--line-2);
  background: var(--ov1); cursor: pointer; letter-spacing: 0; font-size: 13.5px; font-weight: 400; color: var(--ink); }
label.choice b { display: block; } label.choice small { color: var(--ink-3); }
label.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-wash); }
label.choice input { width: 18px; min-height: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); box-shadow: none; }
.remit { color: var(--ink-2); } .remit b { color: var(--good-ink); }
@media (max-width: 560px) { fieldset.choices { grid-template-columns: 1fr; } }
a.note.warn-bar { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--warn-ink);
  background: color-mix(in srgb, var(--warn) 12%, transparent); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
a.note.warn-bar .go { margin-left: auto; display: inline-flex; gap: 4px; align-items: center; font-weight: 650; white-space: nowrap; }
a.note.warn-bar:hover { border-color: var(--warn); }
.remit svg { width: 14px; height: 14px; vertical-align: -2px; }

/* warehouse */
.wh-list { display: grid; gap: 16px; }
.wh-order.repack { border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.wh-order h2 a, .card h2 a { color: inherit; }
.repack-diff { margin: 0 0 12px; padding: 10px 12px; border-radius: var(--r-md); background: color-mix(in srgb, var(--warn) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); color: var(--ink); font-size: 14px; }
.qty.big { font-size: 22px; color: var(--ink); }
.specials { margin: 12px 0 0; padding: 10px 12px; border-radius: var(--r-md); background: var(--accent-wash); white-space: pre-wrap; }
.specials b { margin-right: 6px; }
.btn.big-btn { min-height: 48px; padding: 0 22px; font-size: 15px; }
em.count { font-style: normal; color: var(--ink-3); font-weight: 500; margin-left: 4px; }
.card-h.pad { padding: 18px 20px 0; }
.pick-prod { display: inline-flex; gap: 10px; align-items: center; } .pick-prod img { border-radius: 8px; object-fit: cover; }
.big-n { font-size: 20px; }
ul.ships li.wrap { flex-wrap: wrap; } form.decide.full { flex-basis: 100%; margin-top: 4px; }
fieldset.choices.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.inline-form select, select { min-height: 36px; padding: 6px 10px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--input-bg);
  color: var(--ink); font: 400 14px var(--font); }
.mt { margin-top: 16px; }
@media (max-width: 560px) { fieldset.choices.three { grid-template-columns: 1fr; } }

/* packing slips (print) */
.print-page { background: #fff; color: #111; padding: 24px; }
.print-bar { display: flex; gap: 12px; align-items: center; margin: 0 auto 20px; max-width: 760px; }
.slip { max-width: 760px; margin: 0 auto 24px; padding: 22px 24px; border: 1px solid #ccc; border-radius: 10px; background: #fff; color: #111;
  break-after: page; page-break-after: always; }
.slip-h { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #111; padding-bottom: 10px; }
.slip-h .lockup { --lk: 34px; } .slip-h .lockup-text b, .slip-h .lockup-text small { color: #111; }
.slip-no { text-align: right; } .slip-no b { display: block; font-size: 24px; } .slip-no small { color: #555; }
.slip-to { margin: 12px 0; font-size: 15px; }
.slip-t { width: 100%; border-collapse: collapse; font-size: 14px; }
.slip-t th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #555; border-bottom: 1px solid #bbb; padding: 6px; }
.slip-t td { border-bottom: 1px solid #e3e3e3; padding: 8px 6px; vertical-align: middle; } .slip-t img { border-radius: 6px; object-fit: cover; }
.slip-t .num { text-align: right; } .slip-t td.num { font-size: 18px; }
.tick-box { display: inline-block; width: 22px; height: 22px; border: 2px solid #111; border-radius: 4px; }
.slip-sp { margin: 12px 0 0; padding: 10px; border: 1px dashed #999; border-radius: 6px; white-space: pre-wrap; }
.slip-f { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; margin-top: 26px; font-size: 13px; color: #333; }
@media print { .no-print { display: none !important; } .print-page { padding: 0; } .slip { border: 0; margin: 0; max-width: none; } }
ul.ships small.quiet { display: block; margin-top: 4px; font-weight: 500; }
.ship-side .inline-form { flex-wrap: nowrap; margin-top: 0; }

/* dispatch */
.tbl.dsp td { vertical-align: top; } .tbl.dsp td.who { min-width: 220px; white-space: normal; } .tbl.dsp td.who small { display: block; }
.tbl.dsp input:not([type=checkbox]) { min-height: 36px; padding: 6px 10px; font-size: 14px; min-width: 130px; width: 100%; }
.tbl.dsp input.need { border-color: var(--warn); }
/* City and instructions columns only as wide as they need; the parcel column takes the rest. Under the city
   box: its code / how it was found and the Fix city pencil, on one short line (cells don't wrap by default). */
.tbl.dsp td, .tbl.dsp th { padding-left: 10px; padding-right: 10px; }
.tbl.dsp th.city, .tbl.dsp td.city { width: 190px; min-width: 172px; white-space: normal; }
.tbl.dsp td.city input { min-width: 0; padding-left: 8px; padding-right: 8px; }
.tbl.dsp th.instr, .tbl.dsp td.instr { width: 210px; min-width: 120px; white-space: normal; }
.tbl.dsp td.instr small { display: block; margin-top: 4px; }
.tbl.dsp td.instr input::-webkit-calendar-picker-indicator { opacity: .7; display: block; cursor: pointer; }  /* the list arrow shows before hover: a box to pick from */
.city-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 5px; min-height: 26px; }
.city-meta .btn.sm.city-fix { margin: 0; }
.tbl.dsp .ck { width: 34px; } input[type=checkbox]:not(.switch) { width: 18px; min-height: 18px; height: 18px; accent-color: var(--accent); box-shadow: none; }
.tbl.dsp tr.st-failed, .tbl.dsp tr.st-unsure { background: color-mix(in srgb, var(--crit) 6%, transparent); }
small.err { display: block; color: var(--crit-ink); font-weight: 600; }
.row-actions.pad, .inline-form.pad, .result.pad, p.pad { padding: 0 20px 16px; }
ul.plain { margin: 6px 0 0; padding-left: 18px; }
.tbl tr.cancelled td { opacity: .6; }
details.cancel summary { cursor: pointer; color: var(--ink-3); font-size: 13px; }
/* A5 rider sheets */
.print-page.a5 .slip { max-width: 560px; }
.pay { margin: 12px 0; padding: 10px 12px; border: 2px solid #111; border-radius: 8px; font-size: 20px; font-weight: 800; text-align: center; letter-spacing: .02em; }
.pay.paid { border-color: #1b7a3a; color: #1b7a3a; }
dl.to { display: grid; gap: 6px; margin: 0 0 12px; } dl.to div { display: grid; grid-template-columns: 80px 1fr; gap: 8px; }
dl.to dt { color: #555; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; } dl.to dd { margin: 0; font-size: 15px; }
.slip-t td.num, .slip-t th.num { white-space: nowrap; }
/* payments */
fieldset.choices.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { fieldset.choices.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tbl details summary { cursor: pointer; font-size: 12.5px; margin-top: 4px; }
.tbl .inline-form input { min-width: 120px; }
dl.slip-sum { display: grid; gap: 4px; max-width: 520px; margin: 0 0 12px; }
dl.slip-sum div { display: flex; justify-content: space-between; gap: 16px; } dl.slip-sum dt { color: var(--ink-2); } dl.slip-sum dd { margin: 0; }
dl.slip-sum div.total { border-top: 1px solid var(--line-2); padding-top: 6px; font-weight: 700; }
.remit details { margin: 6px 0; } .remit details summary { cursor: pointer; color: var(--ink-2); font-size: 13.5px; }
ul.actions li.danger-row > span { flex: 1; } ul.actions li.danger-row .inline-form input { max-width: 260px; }

/* the hub's own "Are you sure?" window */
dialog.modal.confirm { width: min(420px, calc(100vw - 32px)); }
.confirm-q { margin: 0; font-size: 15.5px; line-height: 1.5; color: var(--ink); }
ul.ships li .hint.full { flex-basis: 100%; margin: 0; } ul.ships li.wrap > .grow { flex: 1 1 320px; }
/* confirmation desk */
.desk-actions { display: grid; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.desk-actions .inline-form { margin-top: 0; } .desk-actions .inline-form input { flex: 1; }
.desk-actions select { width: auto; flex: 0 0 auto; max-width: 220px; } .desk-actions .inline-form input { min-width: 160px; }
.watch-warn { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 12px; } .watch-warn svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
/* returns */
ul.qc { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
ul.qc li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--ov1); }
ul.qc li > span { flex: 1; } label.choice.sm { padding: 4px 10px; font-size: 13px; gap: 6px; align-items: center; }
fieldset.sub-fields { border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 12px 10px; margin: 0; }
fieldset.sub-fields legend { font-size: 12px; color: var(--ink-3); padding: 0 4px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; } .thumbs img { border-radius: 8px; object-fit: cover; border: 1px solid var(--line); }
/* admin tools */
form.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; } form.filters label { min-width: 150px; }
form.filters input, form.filters select { min-height: 36px; padding: 6px 10px; font-size: 14px; }
.filters-go { display: flex; gap: 6px; }
.tbl.audit td.detail span { display: inline-block; margin: 0 8px 2px 0; font-size: 12.5px; color: var(--ink-2); } .tbl.audit td.detail b { color: var(--ink-3); font-weight: 600; }
.tbl tr.warn-row td { background: color-mix(in srgb, var(--warn) 7%, transparent); } td.nowrap { white-space: nowrap; }
.pager { display: flex; gap: 8px; padding-top: 12px; }
.stat.bad .v { color: var(--crit-ink); }
/* reports */
ul.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
ul.bars li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-radius: var(--r-md); background: var(--ov1); border: 1px solid var(--line); }
.neg-t { color: var(--crit-ink); font-weight: 600; } form.filters.card { padding: 14px 16px; }

/* phone widths (design pass 14 Oct): nothing may push the page wider than the screen */
.card-h > div { min-width: 0; }
ul.ships li .grow, ul.lines li .grow, ul.status-list li .grow { min-width: 0; overflow-wrap: break-word; }
@media (max-width: 560px) {
  .chip { height: auto; min-height: 24px; white-space: normal; line-height: 1.3; padding: 3px 10px; max-width: 100%; border-radius: 12px; }  /* a chip that wraps is a rounded box, not a stretched pill */
  .card-h { flex-wrap: wrap; }
  ul.status-list li, ul.lines li { flex-wrap: wrap; }
  ul.status-list li .grow { flex-basis: calc(100% - 48px); }  /* the text keeps the row; the chip / button goes under it */
  ul.lines li .price { min-width: 0; margin-left: auto; }
  .page-h { flex-wrap: wrap; gap: 12px; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; } .tabs a { flex: none; }
}

/* phone menu: the sidebar becomes a drawer */
.menu-btn, .side-backdrop { display: none; }
@media (max-width: 560px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .menu-btn { display: inline-flex; margin-left: -6px; }
  .side { position: fixed; z-index: 60; left: 0; top: 0; width: min(280px, 84vw); padding: 18px 14px 14px; align-items: stretch;
    transform: translateX(-102%); transition: transform .25s var(--ease); box-shadow: 0 0 40px rgba(0, 0, 0, .35); overflow-y: auto; }
  :root[data-menu="open"] .side { transform: none; }
  .side-backdrop { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(10, 8, 6, .45); opacity: 0; visibility: hidden;
    pointer-events: none; transition: opacity .25s var(--ease), visibility 0s .25s; }
  :root[data-menu="open"] .side-backdrop { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .25s var(--ease); }
  .side { touch-action: pan-y; overscroll-behavior: contain; } .side.dragging { transition: none; }
  :root[data-menu="open"] body { overflow: hidden; }  /* the page behind the open menu stays still */  /* sideways moves go to the swipe (app.js) */
  .brand { justify-content: flex-start; padding: 0 4px 12px; } .brand .lockup-text { display: block; }
  .nav-h { display: block; } .nav a { justify-content: flex-start; padding: 10px 12px; } .nav a .t { display: inline; }
  .me-chip { flex-direction: row; padding: 8px 10px; } .me-chip .who { display: flex; flex-direction: column; }
  ul.lines li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; column-gap: 12px; }
  ul.lines img, ul.lines .noimg { width: 56px; height: 56px; grid-row: span 2; }
  ul.lines li .grow { grid-column: 2 / 4; }
  ul.lines li .qty { grid-column: 2; } ul.lines li .price { grid-column: 3; text-align: right; }
}

/* desktop: the menu collapses to an icon rail. The button sits in the menu itself, beside the logo; when collapsed it takes the
   logo's place only while the pointer is over the logo (or it has keyboard focus). ⌘B / Ctrl+B does the same; remembered per browser. */
.side-h { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.side-h .brand { flex: 1; min-width: 0; }
.nav-btn { display: none; position: relative; flex: none; margin-top: 2px; }
.nav-btn .tip { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; display: flex; align-items: center; gap: 6px; padding: 7px 8px 7px 12px;
  border-radius: var(--r-md); background: var(--glass-2); border: 1px solid var(--line-2); box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
  color: var(--ink); font-size: 13px; font-weight: 500; white-space: nowrap; opacity: 0; transform: translateY(-3px); pointer-events: none;
  transition: opacity .15s, transform .15s; }
.nav-btn:hover .tip, .nav-btn:focus-visible .tip { opacity: 1; transform: none; transition-delay: .35s; }
.nav-btn .tip kbd { min-width: 22px; height: 22px; display: inline-grid; place-items: center; padding: 0 5px; border-radius: 6px; background: var(--ov2);
  border: 1px solid var(--line); color: var(--ink-2); font-size: 12px; font-weight: 600; line-height: 1; font-family: inherit; }
.nav-btn .tip kbd:first-of-type { margin-left: 4px; }
.nav-btn .when-closed, :root[data-nav="collapsed"] .nav-btn .when-open { display: none; }
:root[data-nav="collapsed"] .nav-btn .when-closed { display: inline; }
@media (min-width: 901px) {
  .nav-btn { display: inline-flex; }
  /* the tooltip may reach past the menu's edge: only the link list scrolls, the menu itself doesn't clip */
  .side { overflow: visible; z-index: 30; } .nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
  :root[data-nav="collapsed"] .shell { grid-template-columns: 68px minmax(0, 1fr); }
  :root[data-nav="collapsed"] .side { padding: 16px 10px 12px; align-items: stretch; }
  :root[data-nav="collapsed"] .side-h { justify-content: center; }
  :root[data-nav="collapsed"] .brand { justify-content: center; padding: 0 0 12px; transition: opacity .15s; }
  :root[data-nav="collapsed"] .brand .lockup-text { display: none; }
  :root[data-nav="collapsed"] .nav-btn { position: absolute; left: 50%; top: 0; margin: 0; width: 42px; height: 42px; transform: translateX(-50%);
    opacity: 0; transition: opacity .15s; }
  :root[data-nav="collapsed"] .side-h:hover .nav-btn, :root[data-nav="collapsed"] .nav-btn:focus-visible { opacity: 1; }
  :root[data-nav="collapsed"] .side-h:hover .brand, :root[data-nav="collapsed"] .side-h:has(.nav-btn:focus-visible) .brand { opacity: 0; }
  :root[data-nav="collapsed"] .nav-btn .tip { right: auto; left: calc(100% + 10px); top: 50%; transform: translate(-3px, -50%); }
  :root[data-nav="collapsed"] .nav-btn:hover .tip, :root[data-nav="collapsed"] .nav-btn:focus-visible .tip { transform: translate(0, -50%); }
  :root[data-nav="collapsed"] .nav-h { display: none; } :root[data-nav="collapsed"] .nav { gap: 4px; }
  :root[data-nav="collapsed"] .nav a { justify-content: center; padding: 11px 0; } :root[data-nav="collapsed"] .nav a .t { display: none; }
  :root[data-nav="collapsed"] .me-chip { flex-direction: column; padding: 8px 0; background: none; border: 0; }
  :root[data-nav="collapsed"] .me-chip .who { display: none; }
}

/* alerts: the bell beside the light / dark switch, a count badge, and a panel of links to where each alert came from */
.alerts-wrap { position: relative; }
.alerts-btn { position: relative; }
.bell-n { transition: opacity var(--dur-in) var(--ease), transform var(--dur-in) var(--ease); }
@starting-style { .bell-n { opacity: 0; transform: scale(.6); } }  /* the count arrives after the page: it grows in, not pops */
.bell-n { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; display: grid; place-items: center;
  background: var(--crit); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; box-shadow: 0 0 0 2px var(--bg); }
.alerts-btn .tip { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; padding: 7px 12px; border-radius: var(--r-md); background: var(--glass-2);
  border: 1px solid var(--line-2); box-shadow: 0 10px 30px rgba(0, 0, 0, .28); color: var(--ink); font-size: 13px; font-weight: 500; white-space: nowrap;
  opacity: 0; transform: translateY(-3px); pointer-events: none; transition: opacity .15s, transform .15s; }
.alerts-btn:hover .tip, .alerts-btn:focus-visible .tip { opacity: 1; transform: none; transition-delay: .35s; }
:root[data-alerts="open"] .alerts-btn .tip { display: none; }
:root[data-alerts="open"] .alerts-btn { background: var(--ov3); }
.alerts-panel { display: none; position: absolute; right: 0; top: calc(100% + 10px); z-index: 45; width: min(400px, calc(100vw - 24px)); max-height: min(70vh, 560px);
  overflow-y: auto; padding: 8px; border-radius: var(--r-lg, 16px); background: var(--glass-2); border: 1px solid var(--line-2);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35); }
:root[data-alerts="open"] .alerts-panel { display: block; }
.alerts-panel { transform-origin: top right; opacity: 0; transform: scale(.97) translateY(-4px);
  transition: opacity var(--dur-out) ease-in, transform var(--dur-out) ease-in, display var(--dur-out) allow-discrete; }
:root[data-alerts="open"] .alerts-panel { opacity: 1; transform: none; transition-duration: var(--dur-in); transition-timing-function: var(--ease); }
@starting-style { :root[data-alerts="open"] .alerts-panel { opacity: 0; transform: scale(.97) translateY(-4px); } }
.alerts-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 8px 10px 10px; }
.alerts-h b { font-size: 15px; } .alerts-h small { color: var(--ink-3); font-size: 12.5px; }
.alerts-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.alerts-list a { display: flex; align-items: flex-start; gap: 10px; padding: 10px; border-radius: var(--r-md); color: var(--ink); text-decoration: none; }
.alerts-list a:hover, .alerts-list a:focus-visible { background: var(--ov2); }
.alerts-list a > .ico { flex: none; margin-top: 2px; color: var(--ink-3); }
.alerts-list .grow { flex: 1; min-width: 0; overflow-wrap: break-word; }
.alerts-list b { display: block; font-size: 13.5px; font-weight: 600; } .alerts-list small { display: block; margin-top: 2px; color: var(--ink-3); font-size: 12.5px; }
.alerts-list .a-ico { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; }
.alerts-list .bad .a-ico { color: var(--crit-ink); background: color-mix(in srgb, var(--crit) 14%, transparent); }
.alerts-list .warn .a-ico { color: var(--warn-ink); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.alerts-empty { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px; color: var(--ink-3); font-size: 13.5px; }
@media (max-width: 560px) { .alerts-panel { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; } }
/* arriving from a link to one item (an alert, #d-12, #j-18): clear of the sticky top bar, and outlined in gold */
[id] { scroll-margin-top: 80px; }
li:target, section:target, .card:target { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- Today (dashboard): flow strip, needs action, money, today so far, 14-day charts, health ---- */
.flow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 6px; border-radius: var(--r-lg, 16px); background: var(--ov1);
  border: 1px solid var(--line); }
.flow a { display: flex; align-items: baseline; gap: 8px; padding: 8px 14px; border-radius: var(--r-md); text-decoration: none; color: var(--ink-3); font-weight: 500; }
.flow a b { font-size: 17px; color: var(--ink-3); } .flow a.has { color: var(--ink-2); } .flow a.has b { color: var(--accent-ink); }
.flow a:hover { background: var(--ov2); } .fl-arrow { color: var(--ink-3); opacity: .5; display: inline-flex; }
.money-list { margin: 0; display: grid; gap: 4px; }
.money-list div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.money-list div:last-child { border-bottom: 0; }
.money-list dt { font-weight: 600; font-size: 14px; } .money-list dt small { display: block; color: var(--ink-3); font-weight: 400; font-size: 12.5px; margin-top: 2px; }
.money-list dd { margin: 0; font-family: var(--font-display); font-size: 19px; font-weight: 700; white-space: nowrap; }
.day-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.day-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: var(--r-md); background: var(--ov1); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; }
.day-tile:hover { background: var(--ov2); }
.day-tile .k { color: var(--ink-3); font-size: 12.5px; font-weight: 600; letter-spacing: .04em; }
.day-tile b { font-family: var(--font-display); font-size: 30px; line-height: 1.1; font-weight: 700; }
.day-tile small { color: var(--ink-3); font-size: 12px; }
.day-tile .up { color: var(--good-ink); font-weight: 600; } .day-tile .down { color: var(--crit-ink); font-weight: 600; } .day-tile .same { color: var(--ink-3); }
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.chart { margin: 0; } .chart figcaption { color: var(--ink-3); font-size: 13px; margin-bottom: 8px; } .chart figcaption b { color: var(--ink); font-size: 15px; }
.chart svg { display: block; width: 100%; height: auto; }
.bar-o, .bar-d { fill: var(--accent); } .bar-r { fill: var(--crit); opacity: .85; } .bar-base { fill: var(--line-2); }
.bar-o:hover, .bar-d:hover, .bar-r:hover { opacity: .75; }
.chart-x { display: flex; justify-content: space-between; color: var(--ink-3); font-size: 11.5px; margin-top: 4px; }
.bad-ink { color: var(--crit-ink); }
.health { list-style: none; margin: 0; padding: 0; display: grid; }
.health li { display: grid; grid-template-columns: minmax(0, 1fr) 64px 76px; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.health li:last-child { border-bottom: 0; }
.health .grow b { display: block; font-weight: 600; font-size: 14px; } .health .grow small { color: var(--ink-3); font-size: 12px; }
.health .hv { font-family: var(--font-display); font-size: 19px; font-weight: 700; min-width: 54px; text-align: right; }
.trend { min-width: 68px; text-align: right; font-size: 12.5px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.trend.good { color: var(--good-ink); } .trend.bad { color: var(--crit-ink); }
@media (max-width: 1080px) { .day-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .charts { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .day-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { gap: 2px; } .flow a { padding: 6px 10px; } .fl-arrow { display: none; }
}

/* Needs action: one highlighted strip of chips under the greeting (gold; red when something is overdue; green when all clear) */
.act-band { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 12px 10px 16px; border-radius: var(--r-lg, 16px);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-wash); }
.act-band.late { border-color: color-mix(in srgb, var(--crit) 45%, transparent); background: color-mix(in srgb, var(--crit) 8%, transparent); }
.act-band.clear { border-color: color-mix(in srgb, var(--good) 40%, transparent); background: color-mix(in srgb, var(--good) 8%, transparent); }
.act-band-h { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 700; letter-spacing: .02em; color: var(--accent-ink); white-space: nowrap; }
.act-band.late .act-band-h { color: var(--crit-ink); } .act-band.clear .act-band-h { color: var(--good-ink); }
.act-chips { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; min-width: 0; }
.act-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 10px; border-radius: 999px; background: var(--glass-2);
  border: 1px solid var(--line-2); color: var(--ink); text-decoration: none; font-size: 13.5px; font-weight: 500; transition: background .15s, border-color .15s; }
.act-chip:hover { background: var(--ov3); border-color: var(--accent); }
.act-chip > .ico { color: var(--ink-3); width: 16px; height: 16px; }
.act-chip b { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--accent-ink); }
.act-chip small { color: var(--ink-3); font-size: 12px; }
.act-chip.late { border-color: color-mix(in srgb, var(--crit) 55%, transparent); }
.act-chip.late b, .act-chip.late small, .act-chip.late > .ico { color: var(--crit-ink); } .act-chip.late small { font-weight: 600; }
.act-none { margin: 0; color: var(--ink-2); font-size: 13.5px; }
.g-11 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .g-11 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .act-band { padding: 10px 12px; } .act-chip { font-size: 13px; } .health li { grid-template-columns: minmax(0, 1fr) 54px 66px; } }
/* order page: record an AME rider's result right under the parcel */

/* Handbook */
.hb { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
.hb-toc { position: sticky; top: 72px; padding: 14px; }
.hb-toc ol { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; font-size: 13px; }
.hb-toc a { color: var(--ink-2); text-decoration: none; } .hb-toc a:hover { color: var(--accent-ink); }
.hb-add { display: grid; gap: 6px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.hb-body { display: grid; gap: 16px; min-width: 0; }
.hb-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.hb-text { line-height: 1.6; color: var(--ink-2); overflow-wrap: break-word; }
.hb-text h3 { font-size: 16px; margin: 18px 0 6px; color: var(--ink); } .hb-text h4 { font-size: 14px; margin: 14px 0 4px; color: var(--ink); }
.hb-text p { margin: 0 0 10px; } .hb-text b { color: var(--ink); }
.hb-text ul, .hb-text ol { margin: 0 0 12px; padding-left: 22px; display: grid; gap: 4px; }
.hb-text code, .hb-help code { font-family: var(--font-mono, ui-monospace, monospace); font-size: 12.5px; padding: 1px 6px; border-radius: 6px; background: var(--ov2); color: var(--ink); }
.hb-table { width: 100%; border-collapse: collapse; margin: 6px 0 12px; font-size: 13.5px; display: block; overflow-x: auto; }
.hb-table th { text-align: left; font-weight: 650; color: var(--ink); padding: 8px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.hb-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.hb-edit { font-family: var(--font-mono, ui-monospace, monospace); font-size: 13px; line-height: 1.55; min-height: 420px; }
.hb-help { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.ostat { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
@media (max-width: 900px) { .hb { grid-template-columns: minmax(0, 1fr); } .hb-toc { position: static; } }

/* a person's permissions: one dropdown per group, closed by default */
.perm-drop { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--ov1); margin-bottom: 8px; }
.perm-drop > summary { display: flex; align-items: center; gap: 12px; padding: 13px 16px; cursor: pointer; list-style: none; border-radius: var(--r-md); }
.perm-drop > summary::-webkit-details-marker { display: none; }
.perm-drop > summary:hover { background: var(--ov2); }
.perm-drop .pd-name { flex: 1; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
.perm-drop .pd-meta { display: flex; align-items: center; gap: 8px; }
.perm-drop .pd-count { color: var(--ink-3); font-size: 13px; }
.perm-drop > summary > .ico { color: var(--ink-3); transition: transform .2s; flex: none; }
.perm-drop[open] > summary > .ico { transform: rotate(180deg); }
.perm-drop[open] > summary { border-bottom: 1px solid var(--line); border-radius: var(--r-md) var(--r-md) 0 0; }
.perm-drop > .perm-group { padding: 10px; margin: 0; }
/* your name and avatar in the menu open My account */
.me-chip a.who, .me-chip a.avatar { color: inherit; text-decoration: none; }
.me-chip a.who:hover b { color: var(--accent-ink); } .me-chip a.avatar:hover { filter: brightness(1.1); }
/* Operate as: a red bar on every page while an Owner uses the hub as someone else */
.operate-bar { position: sticky; top: 60px; z-index: 19; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 30px;
  background: color-mix(in srgb, var(--crit) 16%, var(--bg)); border-bottom: 1px solid color-mix(in srgb, var(--crit) 45%, transparent);
  color: var(--crit-ink); font-size: 13.5px; }
.operate-bar > span { flex: 1; min-width: 0; } .operate-bar b { color: var(--ink); }
@media (max-width: 900px) { .operate-bar { padding: 10px 16px; } }
.code-confirm { margin-top: 12px; } .kv-line { margin: 0 0 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.warn-note { border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.auth-qr { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: center; max-width: 720px; }
@media (max-width: 560px) { .auth-qr { grid-template-columns: 1fr; } }
.muted.small, p.small { font-size: 12.5px; }
.mt-s { margin-top: 8px; }
.auth-alt { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.rem-tbl input[type=number] { width: 90px; }
/* "Try another way" at sign-in */
.ways { display: grid; gap: 8px; margin-bottom: 12px; }
.way { display: grid; gap: 2px; text-align: left; width: 100%; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line-2);
  background: var(--ov1); color: var(--ink); text-decoration: none; font: inherit; cursor: pointer; }
.way:hover { background: var(--ov2); border-color: var(--accent); } .way b { font-weight: 650; } .way small { color: var(--ink-3); font-size: 13px; }
/* paid before delivery */
.adv-new { margin-top: 10px; } .adv-new summary { cursor: pointer; font-weight: 600; color: var(--accent-ink); font-size: 13.5px; }
.adv-new[open] summary { margin-bottom: 12px; }
.adv-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .adv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .adv-grid { grid-template-columns: 1fr; } }
.adv-decide { margin-top: 8px; }
small.hold { display: block; color: var(--warn-ink); font-weight: 600; margin-top: 2px; }
.adv-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } @media (max-width: 560px) { .adv-grid.two { grid-template-columns: 1fr; } }
.doc-links { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
dialog.modal.wide { width: min(1080px, calc(100vw - 32px)); }
/* Dispatch > Booked */
.booked-tbl td { vertical-align: middle; } .booked-tbl th.ck, .booked-tbl td.ck { width: 34px; padding-right: 0; }
.bulk-bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 20px;
  background: color-mix(in srgb, var(--accent) 11%, var(--glass-2)); border-top: 1px solid var(--line-2); }
.bulk-bar .bulk-r { flex-basis: 100%; } .bulk-bar .bulk-r:empty { display: none; }
.bulk-bar[hidden] { display: none; } .bulk-n { font-weight: 650; margin-right: 6px; color: var(--accent-ink); }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px 20px 16px; }
h2 em.count, .btn em.count { font-style: normal; font-size: .85em; color: var(--ink-3); margin-left: 4px; }
/* Orders list: Select mode */
.tbl th.sel, .tbl td.sel { display: none; width: 34px; padding-right: 0; }
:root[data-select="on"] .tbl th.sel, :root[data-select="on"] .tbl td.sel { display: table-cell; }
.bulk-orders { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0; padding: 10px 14px; border-radius: var(--r-md);
  background: var(--accent-wash); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); position: sticky; top: 70px; z-index: 5; }
.bulk-orders[hidden] { display: none; } .bulk-orders .inline-form { margin: 0; }
.bulk-list { margin: 8px 0; padding-left: 18px; display: grid; gap: 2px; font-size: 13.5px; } .bulk-list .no { color: var(--crit-ink); }
/* "What to do?" after an action that couldn't be done */
a.linkish { color: var(--accent-ink); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; margin-left: 6px; }
.next-step { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--ov1); }
.next-step > div:first-child { flex: 1 1 260px; min-width: 0; } .next-step b { display: block; } .next-step small { display: block; color: var(--ink-3); margin-top: 2px; }

/* Orders › Cancelled (17 Oct 2026): kept apart from the order count, filtered by reason */
.tabs a.tab-apart { margin-left: 8px; position: relative; }
.tabs a.tab-apart::before { content: ""; position: absolute; left: -7px; top: 7px; bottom: 7px; width: 1px; background: var(--line-2); }
.cx-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
.reason-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.reason-chips .chip em { font-style: normal; font-weight: 500; opacity: .75; font-variant-numeric: tabular-nums; }
.reason-chips .chip:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.reason-chips .chip.on { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--ink); }
.cx-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.bulk-orders select optgroup { font-weight: 600; }
.reason-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 18px; }
.reason-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
small.acct { display: block; margin-top: 2px; }
small.acct.warn-text { color: var(--warn-ink); }

/* Orders header (owner, 19 Oct 2026): refresh icon beside the title, last checks small and light on the right */
.orders-h .grow { flex: 1 1 auto; min-width: 0; }
.h1-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.h1-row .h1-act, .h-act { color: var(--ink-3); }
.h1-row .h1-act:hover, .h-act:hover { color: var(--accent-ink); }
.h1-row .h1-act.htmx-request .ico, .h-act.htmx-request .ico { animation: spin 1s linear infinite; }
/* the same refresh icon beside a card's title (Payments › Leopard, 29 Oct 2026) */
.h2-row { display: flex; align-items: center; gap: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.sync-meta { margin: 0 0 0 auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }
.sync-meta span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sync-meta span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.sync-meta .ok::before { background: var(--good); }
.sync-meta .bad { color: var(--crit-ink); } .sync-meta .warn { color: var(--warn-ink); }
.h1-new { margin-left: auto; white-space: nowrap; } .h1-new + .h1-push { margin-left: 0; }
.h1-push { margin: 0 0 0 auto; } .h1-push .btn { white-space: nowrap; }
/* Orders: the lede on the left, when the hub last checked Shopify / tracked parcels on the right (owner, 28 Oct 2026) */
.lede-row { display: flex; align-items: baseline; gap: 6px 18px; flex-wrap: wrap; margin-top: 4px; }
.lede-row .lede { flex: 1 1 360px; min-width: 0; margin: 0; }

/* Stage tabs: only stages with orders; one line, the rest under "More" */
.tabs.tabs-fit { flex: 0 1 auto; min-width: 0; flex-wrap: nowrap; align-items: center; overflow: visible; }
.tabs-fit .tabs-row { display: flex; gap: 4px; flex-wrap: nowrap; overflow: hidden; min-width: 0; flex: 0 1 auto; }
.tabs-fit .tabs-row a { flex: none; }
.tabs-more { position: relative; flex: none; }
.tabs-more[hidden] { display: none; }
.tabs-more summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 9px; cursor: pointer;
  font-size: 13.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.tabs-more summary::-webkit-details-marker { display: none; }
.tabs-more summary em { font-style: normal; font-size: 12px; color: var(--ink-3); }
.tabs-more summary .ico { width: 14px; height: 14px; transition: transform .15s; }
.tabs-more[open] summary { background: var(--ov2); color: var(--ink); }
.tabs-more[open] summary .ico { transform: rotate(180deg); }
.tabs-more.has-current summary { color: var(--accent-ink); }
.tabs-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; display: grid; gap: 2px; min-width: 210px; padding: 6px;
  border-radius: 12px; background: var(--glass-2); border: 1px solid var(--line-2); box-shadow: 0 18px 50px rgba(0, 0, 0, .25); }
.tabs-menu a { justify-content: space-between; }
.tabs-menu a.tab-apart { margin-left: 0; } .tabs-menu a.tab-apart::before { display: none; }
@media (max-width: 640px) { .sync-meta { margin-left: 0; width: 100%; } }
.toolbar.one-line { flex-wrap: nowrap; }
.toolbar.one-line .search { flex: 0 0 auto; width: 260px; }
.toolbar.one-line > .btn { flex: none; }
@media (max-width: 640px) { .toolbar.one-line { flex-wrap: wrap; } .toolbar.one-line .search { width: 100%; } }

/* Dispatch: one courier at a time (owner, 20 Oct 2026) */
.courier-tabs { flex: none; align-self: flex-end; }
@media (max-width: 640px) { .courier-tabs { width: 100%; } }
.slip.rider .slip-t tfoot tr.less td { border-top: 2px solid #111; font-size: 13px; color: #333; }
.slip.rider .slip-t tfoot tr.less + tr td { border-top: 1px solid #bbb; }
/* AME rider slip (owner, 20 Oct 2026): a third of an A4 page, black and white */
.slip.rider { box-sizing: border-box; padding: 12px 14px; font-size: 12.5px; line-height: 1.35; margin-bottom: 14px; }
.slip.rider h3 { margin: 0 0 3px; font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: #555; font-weight: 700; }
.rs-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 6px; border-bottom: 2px solid #111; }
.rs-brand { font-size: 26px; font-weight: 800; letter-spacing: .2em; line-height: 1; }
.rs-no { text-align: right; } .rs-no b { display: block; font-size: 22px; line-height: 1.15; } .rs-no small { color: #444; font-size: 11px; }
.rs-to { margin-top: 6px; border: 1.5px solid #111; border-radius: 6px; padding: 4px 10px 5px; }
.rs-to-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rs-to .who { font-size: 15.5px; } .rs-to .ph { font-size: 16px; letter-spacing: .03em; white-space: nowrap; }
.rs-to .addr { margin: 2px 0 0; font-size: 12.5px; }
.rs-items { margin-top: 5px; }
.rs-items table { width: 100%; border-collapse: collapse; }
.rs-items td { padding: 2px 0; vertical-align: middle; }
.rs-items td.pic { width: 20mm; } .rs-items td.pic img { display: block; width: 17mm; height: 17mm; object-fit: cover; border-radius: 5px; border: 1px solid #ccc; }
.rs-items.many td.pic { width: 14mm; } .rs-items.many td.pic img { width: 11mm; height: 11mm; }
.rs-items.many td { padding: 1px 0; }
.rs-items td b { font-size: 13.5px; } .rs-items td small { display: block; font-size: 11.5px; color: #333; }
.rs-items td.amt { text-align: right; white-space: nowrap; font-size: 13px; width: 32mm; }
.rs-items tr.collect td { padding-top: 4px; border-top: 1px solid #ddd; vertical-align: middle; }
.rs-items tr.collect td.sp { font-size: 11px; padding-right: 10px; }
.rs-items tr.collect td.amt { width: auto; }
.rs-items .adj { font-size: 12px; color: #333; margin-right: 10px; }
.rs-pay { display: inline-flex; align-items: baseline; gap: 10px; border: 2px solid #111; border-radius: 6px; padding: 3px 10px; }
.rs-pay small { font-size: 9.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.rs-pay b { font-size: 21px; line-height: 1.1; white-space: nowrap; }
.rs-pay.paid { border-color: #1b7a3a; color: #1b7a3a; } .rs-pay.paid small { letter-spacing: 0; text-transform: none; font-weight: 600; font-size: 11px; }
.rs-bank { margin: 5px 0 0; padding-top: 4px; border-top: 1px dashed #999; font-size: 11px; color: #222; }
.rs-bank .hl { font-family: ui-monospace, Menlo, monospace; font-weight: 800; white-space: nowrap; padding: 0 3px; background: #e6e6e6; color: #000;
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }  /* highlighted, no box; prints even with background graphics off */
.rs-f { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 14px; margin-top: 8px; font-size: 12px; color: #222; }
@media (max-width: 560px) { .rs-to-line { flex-wrap: wrap; } }
/* order page: cancelled bookings folded away once a new parcel replaced them (owner, 20 Oct 2026) */
details.old-ships { margin-top: 10px; }
details.old-ships > summary { cursor: pointer; color: var(--ink-3); font-size: 13px; padding: 4px 0; }
details.old-ships > summary:hover { color: var(--ink-2); }
details.old-ships .ships { margin-top: 8px; }

/* Today header: Needs action beside the greeting, small (owner, 20 Oct 2026) */
.today-h { align-items: flex-start; }
.act-mini { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; max-width: 60%; }
.act-mini h2 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
.act-mini h2 .ico { width: 14px; height: 14px; }
.act-mini.late h2 { color: var(--crit-ink); } .act-mini.clear h2 { color: var(--good-ink); }
.act-mini .act-chips { justify-content: flex-end; flex: none; gap: 6px; }
.act-mini .act-chip { padding: 4px 10px 4px 8px; font-size: 12.5px; gap: 6px; }
.act-mini .act-chip b { font-size: 13.5px; }
.act-mini .act-chip > .ico { width: 14px; height: 14px; }
.act-mini .act-chip.late { border-color: color-mix(in srgb, var(--crit) 45%, transparent); }
.act-mini .act-chip.late b { color: var(--crit-ink); }
.act-mini .act-none { margin: 0; font-size: 13px; color: var(--ink-3); }
@media (max-width: 760px) { .act-mini { align-items: flex-start; max-width: none; } .act-mini .act-chips { justify-content: flex-start; } }

/* The store at a glance (Today): range, four figures with their charts */
.glance { overflow: visible; padding: 16px 20px 18px; min-height: 132px; z-index: 5; }
.gl-top { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.gl-range { position: relative; }
.gl-range > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; font-weight: 600;
  padding: 4px 8px; margin-left: -8px; border-radius: 8px; color: var(--ink); }
.gl-range > summary::-webkit-details-marker { display: none; }
.gl-range > summary:hover, .gl-range[open] > summary { background: var(--ov2); }
.gl-range > summary .ico { width: 15px; height: 15px; color: var(--ink-3); }
.gl-range-menu { position: absolute; left: -8px; top: calc(100% + 6px); z-index: 50; display: grid; gap: 2px; width: 250px; padding: 8px;
  border-radius: 12px; background: var(--glass-2); border: 1px solid var(--line-2); box-shadow: 0 18px 50px rgba(0, 0, 0, .22); }
.gl-range-menu a { padding: 6px 10px; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-size: 13.5px; }
.gl-range-menu a:hover { background: var(--ov2); color: var(--ink); }
.gl-range-menu a[aria-current] { background: var(--ov3); color: var(--ink); font-weight: 600; }
.gl-custom { display: grid; gap: 6px; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12.5px; }
.gl-custom label { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.gl-live { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-3); }
.gl-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 20%, transparent); }
.gl-live b { color: var(--ink-2); }
.gl-metrics { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
/* each figure: a paper-thin frosted pane (owner, 20 Oct 2026), the hub's warm tones, just enough to set the figures apart */
.gl-m { display: grid; gap: 6px; padding: 12px 16px 13px; border-radius: 12px; cursor: default; outline: none; min-width: 0;
  background: var(--pane); border: 1px solid var(--pane-line);
  box-shadow: inset 0 1px 0 var(--pane-edge), 0 1px 2px rgba(0, 0, 0, .04);
  transition: background .15s, border-color .15s; }
.gl-m:hover, .gl-m:focus-within { background: var(--pane-hover); border-color: color-mix(in srgb, var(--accent) 28%, var(--pane-line)); }
.gl-m:focus-visible { box-shadow: inset 0 1px 0 var(--pane-edge), 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); }
.gl-l { font-size: 12.5px; color: var(--ink-3); border-bottom: 1px dashed var(--line-2); justify-self: start; }
.gl-top-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; min-width: 0; }
.gl-top-row .gl-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.gl-v { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gl-v .gl-spark { width: 44px; height: 16px; }
.gl-v b { font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--ink); }
.gl-m.waiting .gl-v b { color: var(--ink-3); }
.gl-spark { overflow: visible; } .gl-spark path { fill: none; stroke-width: 1.6; stroke: var(--ink-3); }
.gl-spark.good path { stroke: var(--good); } .gl-spark.bad path { stroke: var(--crit); }
.gl-d { font-size: 12px; font-weight: 600; color: var(--ink-3); } .gl-d.good { color: var(--good-ink); } .gl-d.bad { color: var(--crit-ink); }
/* the chart pop-up: placed by app.js on the page's top layer, below the figure (centred), or above it / edge-aligned when there
   isn't room (owner, 20 Oct 2026) */
.gl-pop { display: none; position: fixed; left: 0; top: 0; width: min(600px, calc(100vw - 24px)); z-index: 1000; }
.gl-pop.live { display: block; opacity: 1; transform: none; transition: opacity var(--dur-in) var(--ease), transform var(--dur-in) var(--ease); }
.gl-pop[data-side="below"] { transform-origin: top center; } .gl-pop[data-side="above"] { transform-origin: bottom center; }
@starting-style { .gl-pop.live { opacity: 0; transform: scale(.97); } }
.gl-pop > * { position: relative; }
.gl-pop::before { content: ""; position: absolute; inset: 0; border-radius: 16px; background: var(--glass-2); border: 1px solid var(--line-2);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .18); }
.gl-pop-h { display: flex; justify-content: space-between; gap: 12px; padding: 18px 20px 4px; }
.gl-big { margin: 0; } .gl-big b { font-family: var(--font-display); font-size: 26px; } .gl-big .gl-d { font-size: 16px; margin-left: 4px; }
.gl-t { margin: 4px 0 0; font-weight: 700; font-size: 13px; } .gl-desc { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-3); }
.gl-chart { display: block; width: calc(100% - 24px); margin: 6px 12px 0; height: auto; overflow: visible; }
.gl-grid { stroke: var(--line); stroke-width: 1; }
.gl-yl { font-size: 10px; fill: var(--ink-3); text-anchor: end; } .gl-xl { font-size: 10px; fill: var(--ink-3); text-anchor: middle; }
.gl-cur { fill: none; stroke: #3b8fd6; stroke-width: 2.2; stroke-linecap: round; }
.gl-prev { fill: none; stroke: #79c7ef; stroke-width: 1.8; stroke-dasharray: 3 4; stroke-linecap: round; }
.gl-legend { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 2px 0 0; padding: 0 0 16px; font-size: 12px; color: var(--ink-3); }
.gl-legend span { display: inline-block; width: 8px; height: 8px; border-radius: 50%; } .gl-legend .cur { background: #3b8fd6; }
.gl-legend .prev { background: #79c7ef; margin-left: 10px; }
.gl-wait { display: flex; gap: 8px; align-items: flex-start; margin: 8px 20px 20px; font-size: 13px; color: var(--ink-2); }
.gl-wait .ico { flex: none; width: 18px; height: 18px; color: var(--ink-3); }
.gl-pick { position: relative; flex: none; }
.gl-pick > summary { list-style: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; cursor: pointer; color: var(--ink-3); }
.gl-pick > summary::-webkit-details-marker { display: none; }
.gl-pick > summary:hover, .gl-pick[open] > summary { background: var(--ov2); color: var(--ink); }
.gl-pick > summary .ico { width: 16px; height: 16px; }
.gl-pick-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 60; width: min(440px, 86vw); padding: 12px; border-radius: 12px;
  background: var(--glass-2); border: 1px solid var(--line-2); box-shadow: 0 18px 50px rgba(0, 0, 0, .22); }
.gl-pick-h { margin: 0 0 8px; font-weight: 700; font-size: 13px; }
.gl-pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; }
.gl-pick-grid button { display: flex; align-items: center; gap: 7px; text-align: left; border: 0; background: none; padding: 6px 8px; border-radius: 8px;
  font: inherit; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.gl-pick-grid button .ico { width: 14px; height: 14px; color: var(--ink-3); flex: none; }
.gl-pick-grid button:hover:not(:disabled) { background: var(--ov2); color: var(--ink); }
.gl-pick-grid button[aria-pressed="true"] { background: var(--ov3); color: var(--ink); font-weight: 600; }
.gl-pick-grid button:disabled { opacity: .55; cursor: not-allowed; } .gl-pick-grid button small { color: var(--ink-3); font-size: 11px; }
@media (max-width: 1100px) { .gl-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .gl-metrics { grid-template-columns: 1fr 1fr; gap: 8px; } .gl-m:last-child { grid-column: 1 / -1; }
  .gl-pick-grid { grid-template-columns: 1fr; }
}
.gl-live { gap: 16px; } .gl-live > span { display: inline-flex; align-items: center; gap: 6px; }
.gl-live .gl-last { color: var(--ink-3); }
/* Settings menu (owner, 20 Oct 2026): one "Settings" item at the foot of the main menu; inside Settings the menu switches */
.nav { flex: 1 1 auto; min-height: 0; }
.nav a.nav-settings-link { margin-top: auto; border-top: 0; position: relative; }
.nav a.nav-settings-link::before { content: ""; position: absolute; left: 12px; right: 12px; top: -6px; border-top: 1px solid var(--line); }
.nav a.nav-back { color: var(--ink-3); font-size: 13.5px; padding: 7px 12px; margin-bottom: 2px; }
.nav a.nav-back:hover { color: var(--ink); }
.nav-title { margin: 6px 12px 0; font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.nav-settings .nav-h { padding-top: 14px; }
:root[data-nav="collapsed"] .nav-title { display: none; }
@media (max-width: 1080px) and (min-width: 761px) { .nav-title { display: none; } }
/* side menu "More" (owner, 20 Oct 2026): pages used now and then, folded after Dispatch; the button always comes last */
.nav-more { display: flex; flex-direction: column; gap: 2px; }
.nav-more-items { display: none; flex-direction: column; gap: 2px; }
.nav-more.open .nav-more-items { display: flex; }
.nav-more-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 12px; border: 0; border-radius: var(--r-md); background: none;
  cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 500; color: var(--ink-3); text-align: left; }
.nav-more-btn:hover { background: var(--ov2); color: var(--ink-2); }
.nav-more-btn .ico { transition: transform .18s; }
.nav-more.open .nav-more-btn .ico { transform: rotate(180deg); }
.nav-more-btn .when-open { display: none; }
.nav-more.open .nav-more-btn .when-open { display: inline; } .nav-more.open .nav-more-btn .when-shut { display: none; }
@media (max-width: 1080px) and (min-width: 761px) { .nav-more-btn { justify-content: center; padding: 11px 0; } .nav-more-btn .t { display: none !important; } }
:root[data-nav="collapsed"] .nav-more-btn { justify-content: center; padding: 11px 0; } :root[data-nav="collapsed"] .nav-more-btn .t { display: none !important; }

/* collapsed side menu: the card beside a hovered icon (owner, 20 Oct 2026, like Shopify's): a name, or a short list; all clickable */
.nav-fly { position: fixed; z-index: 1000; max-width: 240px; padding: 3px; border-radius: 8px; background: var(--glass-2);
  border: 1px solid var(--line-2); box-shadow: 0 8px 22px rgba(0, 0, 0, .18); line-height: 1.4; animation: fly-in .12s ease-out; }
@keyframes fly-in { from { opacity: 0; transform: translateX(-4px); } }
.nav-fly a { display: block; padding: 4px 9px; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.nav-fly a:hover, .nav-fly a:focus-visible { background: var(--ov2); outline: none; }
.nav-fly a[aria-current="page"] { color: var(--accent-ink); background: var(--accent-wash); font-weight: 650; }
.nav-fly.list { padding: 4px; min-width: 150px; }
.nav-fly-h { margin: 2px 9px 3px; font-size: 11.5px; font-weight: 700; color: var(--ink-3); }
.nav-fly-g { margin: 6px 9px 2px; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.nav-fly-g:first-child { margin-top: 3px; }
/* the profile card (owner, 20 Oct 2026): My account and Sign out, opened by hovering the profile at the foot of the menu */
.nav-fly-who { margin: 3px 9px 5px; line-height: 1.3; } .nav-fly-who b { display: block; font-size: 13px; } .nav-fly-who small { color: var(--ink-3); font-size: 11.5px; }
.nav-fly a .ico, .nav-fly-out .ico { width: 15px; height: 15px; color: var(--ink-3); }
.nav-fly a:has(.ico) { display: flex; align-items: center; gap: 8px; }
.nav-fly-out { display: flex; align-items: center; gap: 8px; width: 100%; padding: 5px 9px; border: 0; border-top: 1px solid var(--line); margin-top: 3px;
  border-radius: 0 0 6px 6px; background: none; font: inherit; font-size: 12.5px; font-weight: 500; color: var(--crit-ink); cursor: pointer; text-align: left; }
.nav-fly-out:hover { background: color-mix(in srgb, var(--crit) 9%, transparent); } .nav-fly-out .ico { color: currentColor; }
.me-chip { cursor: default; }

/* Today row: the stages, then "Needs a check" on the right (owner, 21 Oct 2026) */
.flow { justify-content: space-between; position: relative; z-index: 6; }
.flow-stages { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.flow-stages a.late { color: var(--ink-2); } .flow-stages a.late b { color: var(--crit-ink); }
.flow-check { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px 7px 12px; border-radius: var(--r-md);
  color: var(--ink-3); font-weight: 500; cursor: default; outline: none; }
.flow-check > .ico { width: 16px; height: 16px; color: var(--ink-3); }
.flow-check .fc-n { min-width: 22px; height: 22px; display: inline-grid; place-items: center; padding: 0 6px; border-radius: 6px; font-size: 12.5px;
  font-weight: 700; background: var(--ov2); color: var(--ink-3); }
.flow-check:hover, .flow-check:focus-visible { background: var(--ov2); }
.flow-check.has { color: var(--crit-ink); background: color-mix(in srgb, var(--crit) 8%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--crit) 28%, transparent); }
.flow-check.has > .ico { color: var(--crit); }
.flow-check.has .fc-n { background: var(--crit); color: #fff; }
.flow-check.has:hover, .flow-check.has:focus-visible { background: color-mix(in srgb, var(--crit) 13%, transparent); }
.flow-check-pop { display: none; position: absolute; right: 0; top: 100%; padding-top: 6px; width: min(300px, calc(100vw - 32px)); z-index: 70; }
.flow-check:hover .flow-check-pop, .flow-check:focus-within .flow-check-pop { display: block; }
.flow-check-pop::before { content: ""; position: absolute; inset: 6px 0 0; border-radius: 12px; background: var(--glass-2); border: 1px solid var(--line-2);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .2); }
.flow-check-pop > * { position: relative; }
.flow-check-pop .fcp-h { margin: 0; padding: 10px 12px 2px; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.flow-check-pop a.fcp-i { display: grid; grid-template-columns: minmax(0, 1fr) 14px; align-items: center; gap: 10px; margin: 0 4px; padding: 7px 8px;
  border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 500; }
.flow-check-pop a.fcp-i:last-child { margin-bottom: 4px; }
.flow-check-pop a.fcp-i:hover { background: var(--ov2); }
.flow-check-pop a.fcp-i .ico { width: 14px; height: 14px; color: var(--ink-3); }
.flow-check-pop a.fcp-i b { display: block; font-size: 13px; font-weight: 600; }
.flow-check-pop a.fcp-i small { display: block; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flow-check-pop a.fcp-i.late b .num, .flow-check-pop a.fcp-i.late small { color: var(--crit-ink); }
.flow-check-pop a.fcp-i:hover > .ico { color: var(--accent); }
.flow-check-pop .fcp-none { display: flex; align-items: center; gap: 8px; margin: 0; padding: 12px; font-size: 12.5px; color: var(--ink-2); }
.flow-check-pop .fcp-none .ico { color: var(--good); width: 16px; height: 16px; }
@media (max-width: 760px) { .flow-check { width: 100%; } .flow-check-pop { left: 0; right: auto; } }
/* a customer's other orders (owner, 21 Oct 2026) */
.note.hist { display: flex; gap: 10px; align-items: flex-start; }
.note.hist > .ico { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.note.hist.good { border-color: color-mix(in srgb, var(--good) 35%, transparent); background: color-mix(in srgb, var(--good) 7%, transparent); }
.note.hist.good > .ico { color: var(--good); }
.hist-list { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 2px; font-size: 13.5px; }
.hist-list a { font-weight: 600; }
.hist-neg { color: var(--crit-ink); font-weight: 600; } .hist-warn { color: var(--warn-ink); font-weight: 600; } .hist-good { color: var(--good-ink); }
.hist-do { margin: 6px 0 0; font-size: 13px; }
.note.hist.warn { background: color-mix(in srgb, var(--warn) 9%, transparent); border-color: color-mix(in srgb, var(--warn) 38%, transparent); color: var(--ink); }
.note.hist.warn > .ico { color: var(--warn); } .note.hist.warn b { color: var(--warn-ink); }
.note.hist.bad { color: var(--ink); } .note.hist.bad > .ico, .note.hist.bad > div > b { color: var(--crit-ink); }
.note.hist.good { color: var(--ink); } .note.hist.good > div > b { color: var(--good-ink); }

/* forms on their own page (Settings, Export) stay a readable width instead of stretching across the screen (owner, 21 Oct 2026) */
.g-form { max-width: 880px; }
fieldset.choices > legend:not(.sr) { padding: 0; margin-bottom: 5px; font-size: 12.5px; font-weight: 650; letter-spacing: .02em; color: var(--ink-3); }
fieldset.choices.three label.choice { align-items: center; padding: 8px 12px; }

/* the × on an alert (owner, 21 Oct 2026): dismiss a failed job, or hide an alert until something new happens */
.alerts-list li { display: flex; align-items: flex-start; gap: 2px; border-radius: var(--r-md); }
.alerts-list li:hover { background: var(--ov2); } .alerts-list li > a:hover { background: none; }
.alerts-list li > a { flex: 1; min-width: 0; padding-right: 4px; }
.a-x { flex: none; display: grid; place-items: center; width: 26px; height: 26px; margin: 10px 6px 0 0; padding: 0; border: 0; border-radius: 7px;
  background: none; color: var(--ink-3); cursor: pointer; opacity: .55; transition: opacity .15s, background .15s, color .15s; }
.a-x .ico { width: 14px; height: 14px; }
.alerts-list li:hover .a-x, .a-x:focus-visible { opacity: 1; }
.a-x:hover { background: var(--ov3); color: var(--ink); }
.a-x.htmx-request { opacity: .3; cursor: progress; }
@media (hover: none) { .a-x { opacity: 1; } }
.jobs-dismissed { margin-top: 12px; } .jobs-dismissed summary { cursor: pointer; color: var(--ink-3); font-size: 13px; font-weight: 600; }
.jobs-dismissed ul.ships { margin-top: 8px; opacity: .8; }

/* top bar, compact (owner, 21 Oct 2026): a small "Dev · test data" tag instead of the big pill (gone in production), 32px icon
   buttons, and the bell centred (the empty count holder no longer takes a gap beside the icon) */
.env-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--warn-ink); white-space: nowrap; opacity: .85; cursor: default; }
.env-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }
.top { height: 52px; gap: 8px; }
.top .btn.icon { width: 32px; height: 32px; border-radius: 9px; }
.top .btn.icon .ico { width: 17px; height: 17px; }
.alerts-btn .badge-slot { display: contents; }
.bell-n { top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; font-size: 11px; }
@media (max-width: 560px) { .env-tag { font-size: 0; gap: 0; } }

/* compact pass 2 (owner, 21 Oct 2026: "squeeze the really big things, clean and minimal") */
.brand .lockup { --lk: 36px; gap: 10px; }
.brand .lockup-text b { font-size: 16px; } .brand .lockup-text small { margin-top: 3px; font-size: 10px; }
:root[data-nav="collapsed"] .brand .lockup { --lk: 32px; }
@media (max-width: 900px) { .brand .lockup { --lk: 32px; } }
.me-chip { padding: 7px 8px; gap: 9px; } .me-chip .avatar { width: 30px; height: 30px; font-size: 11.5px; }
.tabs { padding: 3px; border-radius: 10px; gap: 2px; }
.tabs a, .tabs-more summary { padding: 5px 10px; border-radius: 7px; font-size: 13px; }
.tabs a em, .tabs-more summary em { font-size: 11.5px; }
.tile { padding: 16px 18px; gap: 4px; }
.tile .k { font-size: 11.5px; letter-spacing: .06em; }
.tile .v { font-size: clamp(22px, 1.9vw, 28px); margin-top: 6px; }
.tile-link { padding-top: 8px; font-size: 12.5px; }
.badge-ico { width: 30px; height: 30px; border-radius: 9px; } .badge-ico .ico { width: 15px; height: 15px; }
.badge-ico.sm { width: 28px; height: 28px; border-radius: 8px; }
.empty { padding: 30px 20px; gap: 6px; } .empty b { font-size: 15px; } .empty p { font-size: 13.5px; }
.big-ico { width: 46px; height: 46px; border-radius: 14px; margin-bottom: 4px; } .big-ico .ico { width: 22px; height: 22px; }
.chip { height: 22px; padding: 0 9px; font-size: 12px; gap: 5px; }
.stats div { padding: 8px; } .stats dd { font-size: 18px; }
.modal-h { padding: 16px 20px 12px; } .modal-h h2 { font-size: 17px; }
.modal-b { padding: 16px 20px; gap: 12px; } .modal form.modal-b { gap: 12px; }
.modal-f { padding: 12px 20px; }
dialog.modal { border-radius: 14px; }
.gl-v b { white-space: nowrap; }
.gl-last { white-space: nowrap; }
@media (max-width: 560px) { .gl-v b { font-size: 16px; } .gl-v .gl-spark { width: 32px; } .gl-m { padding: 10px 12px; }
  .gl-live .gl-last { display: none; } }

/* Warehouse To pack (owner, 21 Oct 2026; Pick list merged in): 1. collect from the shelf, 2. pack each order */
.wh-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; font-size: 13.5px; color: var(--ink-2); }
.wh-pick { margin-bottom: 16px; }
.wh-pick > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 18px; cursor: pointer; }
.wh-pick > summary::-webkit-details-marker { display: none; }
.wh-pick > summary .grow { flex: 1; min-width: 0; } .wh-pick > summary b { display: block; font-size: 15px; }
.wh-pick > summary small { color: var(--ink-3); font-size: 12.5px; }
.wh-pick > summary > .ico { width: 16px; height: 16px; color: var(--ink-3); transition: transform .15s; }
.wh-pick[open] > summary > .ico { transform: rotate(180deg); }
.wh-pick-n { font-size: 12.5px; font-weight: 650; color: var(--ink-3); white-space: nowrap; }
.wh-pick.all-in .wh-pick-n { color: var(--good-ink); }
.wh-picks, .wh-items { list-style: none; margin: 0; padding: 0; }
.wh-picks { border-top: 1px solid var(--line); }
.wh-picks li + li { border-top: 1px solid var(--line); }
.wh-picks label, .wh-items label { display: flex; align-items: center; gap: 12px; padding: 8px 20px; cursor: pointer; letter-spacing: 0;
  font-size: 14px; font-weight: 400; color: var(--ink); transition: background .15s, opacity .15s; }
.wh-picks label:hover, .wh-items label:hover { background: var(--ov1); }
.wh-picks input[type=checkbox], .wh-items input[type=checkbox] { width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0; flex: none; accent-color: var(--accent); }
.wh-picks img, .wh-picks .noimg { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; background: var(--ov2); display: grid; place-items: center; color: var(--ink-3); }
.wh-items img, .wh-items .noimg { width: 48px; height: 48px; border-radius: 9px; object-fit: cover; flex: none; background: var(--ov2); display: grid; place-items: center; color: var(--ink-3); }
.wh-picks .noimg .ico, .wh-items .noimg .ico { width: 18px; height: 18px; }
.wh-picks .grow, .wh-items .grow { flex: 1; min-width: 0; } .wh-picks b, .wh-items b { display: block; font-weight: 600; }
.wh-picks small, .wh-items small { color: var(--ink-3); font-size: 12px; }
.wh-for { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; max-width: 45%; }
.wh-for span { padding: 1px 7px; border-radius: 6px; background: var(--ov2); border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.wh-take { min-width: 44px; text-align: right; font-size: 18px; font-weight: 700; font-family: var(--font-display); color: var(--ink); }
.wh-picks label:has(input:checked), .wh-items label:has(input:checked) { opacity: .5; }
.wh-picks label:has(input:checked) b, .wh-items label:has(input:checked) b { text-decoration: line-through; }
.wh-step { margin: 4px 0 10px; }
.wh-list { gap: 12px; }
.wh-items { margin: 0 -20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.wh-items li + li { border-top: 1px solid var(--line); }
.wh-order .specials { margin-top: 10px; }
.wh-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.wh-in { margin-left: auto; font-size: 12.5px; }
.wh-order.all-in { border-color: color-mix(in srgb, var(--good) 45%, transparent); }
.wh-order.all-in .wh-in { color: var(--good-ink); font-weight: 650; }
.wh-done { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-color: color-mix(in srgb, var(--good) 35%, transparent);
  background: color-mix(in srgb, var(--good) 6%, var(--glass)); }
.wh-done .grow { flex: 1; min-width: 0; line-height: 1.35; } .wh-done small { display: block; color: var(--ink-3); font-size: 12.5px; }
.wh-done small a { color: var(--accent-ink); }
.wh-done-ico { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; flex: none; color: var(--good-ink);
  background: color-mix(in srgb, var(--good) 16%, transparent); } .wh-done-ico .ico { width: 15px; height: 15px; }
@media (max-width: 560px) {
  .wh-picks label { flex-wrap: wrap; } .wh-for { order: 5; max-width: none; width: 100%; justify-content: flex-start; padding-left: 82px; }
  .wh-in { margin-left: 0; width: 100%; }
}
.wh-for span.done { text-decoration: line-through; opacity: .45; }
.wh-how { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0 0; font-size: 13px; color: var(--ink-2); }
.wh-how .ico { width: 15px; height: 15px; margin-top: 2px; color: var(--accent); flex: none; }

/* a now-and-then section with work in it shows in the menu with its count (owner, 21 Oct 2026) */
.nav a { position: relative; }
.nav-n { margin-left: auto; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center;
  font-style: normal; font-size: 11px; font-weight: 700; color: var(--accent-ink); background: var(--accent-wash);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent); }
:root[data-nav="collapsed"] .nav-n { position: absolute; top: 3px; right: 8px; min-width: 8px; width: 8px; height: 8px; padding: 0; font-size: 0; background: var(--accent); }
@media (max-width: 900px) and (min-width: 561px) { .nav-n { position: absolute; top: 3px; right: 8px; min-width: 8px; width: 8px; height: 8px; padding: 0; font-size: 0; background: var(--accent); } }

/* courier payment page (owner, 21 Oct 2026): its way to the bank, the summary, and the two tables of Leopard's cheque detail */
.mono-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.pay-steps { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pay-steps li { position: relative; padding: 10px 14px 10px 34px; border-radius: var(--r-md); background: var(--ov1); border: 1px solid var(--line); line-height: 1.35; }
.pay-steps li::before { content: ""; position: absolute; left: 13px; top: 15px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--glass); }
.pay-steps li.done::before { border-color: var(--good); background: var(--good); }
.pay-steps li.late { border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 8%, transparent); }
.pay-steps li.late::before { border-color: var(--warn); }
.pay-steps b { display: block; font-size: 13.5px; } .pay-steps small { color: var(--ink-3); font-size: 12.5px; }
dl.slip-sum div.sub-total { border-top: 1px dashed var(--line-2); padding-top: 4px; font-weight: 600; }
dl.slip-sum div.bank { margin-top: 6px; align-items: center; } dl.slip-sum div.bank dd { display: flex; gap: 8px; align-items: center; }
.tbl tfoot td { padding: 10px 14px; border-top: 1px solid var(--line-2); background: var(--ov1); font-variant-numeric: tabular-nums; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.pay-list .late { color: var(--warn-ink); font-weight: 650; }
/* even tables (owner, 29 Oct 2026; hub/templates/payments.html): each column hugs its content, the empty spacer cells share the
   spare width so the gaps stay even at any width, and the outer edges line up with the card's title (20px) */
.tbl-even .ev-fit { width: 1%; }
.tbl.tbl-even th, .tbl.tbl-even td { padding-left: 12px; padding-right: 12px; }
.tbl.tbl-even .ev-sp { padding: 0; }
.tbl.tbl-even .ev-gap { padding-left: 28px; }  /* a little more room after a right-aligned number */
.tbl.tbl-even th:first-child, .tbl.tbl-even td:first-child { padding-left: 20px; }
.tbl.tbl-even th:last-child, .tbl.tbl-even td:last-child { padding-right: 20px; }
.tbl-even th.ev-wrap { white-space: normal; line-height: 1.35; }
/* Payments › Overview › By courier (owner, 2 Nov 2026): when the card is too narrow for every heading on one line (1024px with the
   menu open, tablets), the longer headings take two lines and the cells close up a little, so the table still fits without scrolling */
.pc-wrap { container-type: inline-size; }
.pc-tbl th.pc-2l span { white-space: nowrap; }
@container (max-width: 880px) {
  .pc-tbl th.pc-2l { white-space: normal; line-height: 1.35; }
  .tbl.pc-tbl th, .tbl.pc-tbl td { padding-left: 8px; padding-right: 8px; }
  .tbl.pc-tbl td { font-size: 13px; }
}
/* In the bank: the day it arrived and who checked it, green when the amount matches, amber when it doesn't */
.bank-ok, .bank-off { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.bank-ok { color: var(--good-ink); } .bank-off { color: var(--warn-ink); }
.bank-ok .ico, .bank-off .ico { width: 15px; height: 15px; stroke-width: 2.2; }
.pl-key { font-size: 12.5px; padding: 10px 20px 14px; margin: 0; border-top: 1px solid var(--line); }
.tbl.pay-list th:first-child, .tbl.pay-list td:first-child { padding-left: 20px; }
.tbl.pay-list th:last-child, .tbl.pay-list td:last-child { padding-right: 20px; }
.neg-n { color: var(--crit-ink); }
@media (max-width: 760px) { .pay-steps { grid-template-columns: 1fr; } }
.pay-filter { padding: 0 20px 12px; }
.bank-edit { margin-top: 10px; } .bank-edit > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none;
  font-size: 13px; font-weight: 600; color: var(--accent-ink); } .bank-edit > summary::-webkit-details-marker { display: none; }
.bank-edit > summary .ico { width: 14px; height: 14px; } .bank-edit[open] > summary { margin-bottom: 10px; }

/* Payments, one tab per courier (owner, 21 Oct 2026): the courier at a glance, and its rows on the Overview open it */
dl.cour-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin-top: 0; }
dl.cour-sum div { padding: 10px 14px; border-radius: var(--r-md); background: var(--glass); border: 1px solid var(--line); }
dl.cour-sum dt { font-size: 12px; color: var(--ink-3); } dl.cour-sum dd { margin: 2px 0 0; font-size: 17px; font-weight: 700; font-family: var(--font-display); }
dl.cour-sum dd small { display: block; margin-top: 1px; font-family: var(--font); font-weight: 500; font-size: 12px; line-height: 1.35; }
dl.cour-sum div.good dd { color: var(--good-ink); } dl.cour-sum div.warn { border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.tbl tr.row-link a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); }
.tbl tr.row-link a .ico { width: 14px; height: 14px; color: var(--ink-3); transition: transform .15s; }
.tbl tr.row-link:hover a .ico { color: var(--accent); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .tbl tr.row-link:hover a .ico { transform: translateX(2px); } }

/* Payments › AME rider (owner, 21 Oct 2026): parcels out with riders in one compact list; Select shows tick boxes, ticking shows
   Cash / Transfer, which open a pop-up with each parcel's amount and the running total */
.rp .rp-c { width: 34px; padding-right: 0; } .rp .rp-c input { width: 16px; height: 16px; min-height: 0; margin: 0; padding: 0; accent-color: var(--accent); }
.rp:not(.picking) .rp-c { display: none; }
.rp .rp-sel .ico { width: 15px; height: 15px; } .rp.picking .rp-sel { background: var(--accent-wash); color: var(--accent-ink); }
.rp-tbl td, .rp-tbl th { padding-top: 8px; padding-bottom: 8px; }
.rp-tbl tr:has(input:checked) td { background: var(--accent-wash); }
.rp-tbl .rp-nd { font-size: 12px; color: var(--ink-3); white-space: nowrap; } .rp-tbl .rp-nd:hover { color: var(--accent-ink); }
.rp-bar { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 20px; border-top: 1px solid var(--line-2); background: var(--glass-2); font-size: 13.5px; }
.rp-bar[hidden] { display: none; }
.bulk-bar, .rp-bar, .bulk-orders { transition: opacity var(--dur-out) ease-in, transform var(--dur-out) ease-in, display var(--dur-out) allow-discrete; }
.bulk-bar:not([hidden]), .rp-bar:not([hidden]), .bulk-orders:not([hidden]) { transition-duration: var(--dur-in); transition-timing-function: var(--ease); }
.bulk-bar[hidden], .rp-bar[hidden] { opacity: 0; transform: translateY(8px); } .bulk-orders[hidden] { opacity: 0; transform: translateY(-6px); }
@starting-style { .bulk-bar:not([hidden]), .rp-bar:not([hidden]) { opacity: 0; transform: translateY(8px); } .bulk-orders:not([hidden]) { opacity: 0; transform: translateY(-6px); } } .rp-acts { display: flex; gap: 8px; }
.ab-tbl input { min-height: 32px; padding: 5px 9px; font-size: 13.5px; } .ab-tbl td.num input { width: 110px; text-align: right; }
.ab-tbl tfoot small.over, .ab-tbl tfoot small.under { color: var(--warn-ink); font-weight: 650; } .ab-tbl tfoot small.ok { color: var(--good-ink); font-weight: 650; }

/* sign-in pages (owner, 22 Oct 2026, after Google / Apple): secondary choices are quiet links, not full-width buttons */
.link-btn { display: inline; padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--accent-ink); cursor: pointer; }
.link-btn:hover { text-decoration: underline; } .link-btn:disabled { color: var(--ink-3); cursor: default; text-decoration: none; }
.code-help { margin: -6px 0 0; font-size: 13px; color: var(--ink-3); }
.auth-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 2px; padding-top: 14px;
  border-top: 1px solid var(--line); font-size: 13px; }
.auth-foot a, .auth-foot .link-btn { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); font-weight: 600; text-decoration: none; }
.auth-foot a:hover, .auth-foot .link-btn:hover { color: var(--accent-ink); text-decoration: none; }
.auth-foot .ico { width: 14px; height: 14px; }
.code-note { margin: -8px 0 0; font-size: 12.5px; color: var(--ink-2); } .code-note:empty { display: none; }
.auth-card .error:empty { display: none; }

/* AME rider result on the order page (owner, 22 Oct 2026): buttons first, the fields open once one is pressed */
form.ame-q { flex-basis: 100%; margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--line-2); display: grid; gap: 8px; }
.ame-q-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ame-q-t { font-size: 13px; font-weight: 600; color: var(--ink-2); } .ame-q-t small { display: block; font-weight: 400; color: var(--ink-3); }
form.ame-q fieldset { border: 0; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
form.ame-q fieldset label { display: block; cursor: pointer; letter-spacing: 0; }
form.ame-q fieldset input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; pointer-events: none; }
form.ame-q fieldset span { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--r-md);
  border: 1px solid var(--line-2); background: var(--glass-2); color: var(--ink-2); font-size: 13px; font-weight: 600; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s; }
form.ame-q fieldset span .ico { width: 15px; height: 15px; }
form.ame-q fieldset label:hover span { border-color: var(--accent); color: var(--ink); }
form.ame-q fieldset input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 20%, var(--glass-2));
  color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--accent); }
form.ame-q fieldset input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
form.ame-q label.nd span { border-color: transparent; background: none; color: var(--ink-3); font-weight: 500; }
form.ame-q .ame-details { display: none; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; align-items: end; padding: 10px;
  border-radius: var(--r-md); background: var(--glass); border: 1px solid var(--line); }
form.ame-q:has(input[name=outcome]:checked) .ame-details { display: grid; }
form.ame-q .ame-details label { gap: 4px; font-size: 12px; }
form.ame-q .ame-details > .btn { justify-self: start; height: 38px; }
form.ame-q .when-cash, form.ame-q .when-transfer, form.ame-q .when-nd, form.ame-q .when-pay { display: none; }
form.ame-q:has(input[value=cash]:checked) .when-cash, form.ame-q:has(input[value=transfer]:checked) .when-transfer,
form.ame-q:has(input[value=cash]:checked) .when-pay, form.ame-q:has(input[value=transfer]:checked) .when-pay { display: grid; }
form.ame-q:has(input[value=nd]:checked) .when-nd { display: flex; }
form.ame-q:has(input[value=nd]:checked) label.when-nd { display: grid; }

/* ---- materials for people who ask the system for less see-through or more contrast (apple-motion review, 23 Oct 2026) ---- */
@media (prefers-reduced-transparency: reduce) {
  .side, .top { background: var(--glass-2); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .card { background: var(--glass-2); }
  dialog.modal::backdrop { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(10, 8, 6, .6); }
}
@media (prefers-contrast: more) {
  .side, .top, .card, .gl-m { background: var(--glass-2); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .card, .side, .top, dialog.modal, .alerts-panel, .gl-m { border-color: var(--ink-3); }
}
/* light / dark: a short cross-fade instead of a sudden flash (app.js uses the browser's page transition where it has one) */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; animation-timing-function: ease; }

/* ---- phones (apple-look review, 23 Oct 2026): a tab bar where the thumb is, lists instead of sideways tables, fields that don't
   zoom the page, and tap areas of at least 44 px. The hub's own bar material, gold for "you are here". ---- */
.tabbar { display: none; }
@media (max-width: 560px) {
  :root { --tabbar-h: 58px; }
  .menu-btn { display: none; }  /* "Menu" lives in the tab bar */
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; position: fixed; z-index: 50; left: 0; right: 0; bottom: 0;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding: 5px max(6px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(6px, env(safe-area-inset-left));
    background: var(--top-bg); border-top: 1px solid var(--line); -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; min-height: 44px; padding: 0 2px;
    border: 0; border-radius: 12px; background: none; color: var(--ink-3); font: 600 11px/1.15 var(--font); text-decoration: none; cursor: pointer;
    -webkit-tap-highlight-color: transparent; transition: color .15s, background .15s; }
  .tabbar span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar .ico { width: 46px; height: 28px; padding: 3px 12px; border-radius: 999px; transition: background .15s; }
  .tabbar [aria-current="page"], .tabbar .here { color: var(--accent-ink); font-weight: 700; }
  .tabbar [aria-current="page"] .ico, .tabbar .here .ico { background: var(--accent-wash); }  /* a shape as well as a colour says "here" */
  .tabbar a:active, .tabbar button:active { background: var(--ov2); transition-duration: 0s; }
  .page { padding-bottom: calc(48px + var(--tabbar-h) + env(safe-area-inset-bottom)); }
  .bulk-bar, .rp-bar { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }  /* action bars sit just above the tab bar */

  /* the page's big title is the title; the small one in the top bar fades in once the big one has scrolled away (app.js) */
  .top .ttl { opacity: 0; transition: opacity .15s; }
  :root[data-title="on"] .top .ttl { opacity: 1; }

  /* typing never zooms the page: iPhone zooms into any field whose text is under 16 px */
  input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: 16px !important; }

  /* Orders: each order is one row of a list (order and total, customer, items, status, courier); the whole row opens it */
  .tbl.orders, .tbl.orders tbody { display: block; }
  .tbl.orders thead { display: none; }
  .tbl.orders tbody tr { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; row-gap: 3px; padding: 13px 16px;
    border-bottom: 1px solid var(--line); }
  .tbl.orders tbody tr:last-child { border-bottom: 0; }
  .tbl.orders td { display: block; padding: 0; border: 0; min-width: 0 !important; }
  .tbl.orders td:nth-child(2) { grid-column: 2; grid-row: 1; }
  .tbl.orders td:nth-child(5) { grid-column: 3; grid-row: 1; padding-left: 12px; font-weight: 700; }
  .tbl.orders td:nth-child(3) { grid-column: 2 / 4; grid-row: 2; }
  .tbl.orders td:nth-child(4) { grid-column: 2 / 4; grid-row: 3; color: var(--ink-2); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tbl.orders td:nth-child(6) { grid-column: 2 / 4; grid-row: 4; margin-top: 5px; }
  .tbl.orders td:nth-child(7) { grid-column: 2 / 4; grid-row: 5; }
  .tbl.orders td.ship b, .tbl.orders td.ship small { display: inline; } .tbl.orders td.ship small { margin-left: 6px; }
  .tbl.orders .order-link { display: flex; align-items: baseline; gap: 8px; }
  .tbl.orders .order-link small { margin: 0; }
  .tbl.orders .order-link { position: static; }
  .tbl.orders .order-link::after { content: ""; position: absolute; inset: 0; }  /* the whole row is the link */
  .tbl.orders tbody tr:active { background: var(--ov2); }
  .tbl.orders td.sel { display: none; grid-column: 1; grid-row: 1 / span 5; align-self: stretch; align-items: center; margin: -13px 0 -13px -16px; padding-left: 16px; position: relative; z-index: 1; padding-right: 14px; }
  :root[data-select="on"] .tbl.orders td.sel { display: flex; }
  :root[data-select="on"] .tbl.orders thead { display: block; }
  :root[data-select="on"] .tbl.orders thead tr { display: flex; padding: 10px 16px; }
  :root[data-select="on"] .tbl.orders thead th { display: none; }
  :root[data-select="on"] .tbl.orders thead th.sel { display: flex; align-items: center; gap: 12px; padding: 0; border: 0; background: none; }

  /* Payments > XPay: one order per row (order and amount, method, Payment ID, what the bank check says) */
  .xpay-tbl, .xpay-tbl tbody, .xpay-tbl tfoot { display: block; }
  .xpay-tbl thead { display: none; }
  .rp.picking .xpay-tbl thead { display: block; } .rp.picking .xpay-tbl thead tr { display: flex; padding: 10px 16px; }
  .rp.picking .xpay-tbl thead th { display: none; } .rp.picking .xpay-tbl thead th.rp-c { display: flex; align-items: center; gap: 12px; width: auto; padding: 0; border: 0; background: none; }
  .rp.picking .xpay-tbl thead th.rp-c::after { content: "Tick all still to verify"; font-size: 13px; letter-spacing: 0; text-transform: none; font-weight: 600; color: var(--ink-2); }
  .xpay-tbl tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; row-gap: 4px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
  .xpay-tbl tbody tr:last-child { border-bottom: 0; }
  .xpay-tbl td { display: block; padding: 0; border: 0; text-align: left; min-width: 0 !important; }
  .xpay-tbl td.rp-c { grid-column: 1; grid-row: 1 / span 4; padding-right: 12px; }
  .xpay-tbl td.xo { grid-column: 2; grid-row: 1; }
  .xpay-tbl td.xa { grid-column: 3; grid-row: 1; text-align: right; padding-left: 12px; }
  .xpay-tbl td.xm, .xpay-tbl td.xi, .xpay-tbl td.xr { grid-column: 2 / 4; }
  .xpay-tbl td .mono { word-break: break-all; }
  .xpay-tbl tfoot tr { border-top: 1px solid var(--line); border-bottom: 0; }
  .xpay-tbl tfoot td:first-child, .xpay-tbl tfoot td:last-child { display: none; }
  .xpay-tbl tfoot td:nth-child(2) { grid-column: 1 / 3; }
  .xv-fields { grid-template-columns: 1fr; }

  /* Dispatch > Booked: the same, one parcel per row (order and state, courier and tracking, when and its sheet) */
  .booked-tbl, .booked-tbl tbody { display: block; }
  .booked-tbl thead { display: block; } .booked-tbl thead tr { display: flex; padding: 10px 16px; border-bottom: 1px solid var(--line); }
  .booked-tbl thead th { display: none; }
  .booked-tbl thead th.ck { display: flex; align-items: center; gap: 12px; width: auto; padding: 0; border: 0; background: none; }
  .booked-tbl thead th.ck::after, :root[data-select="on"] .tbl.orders thead th.sel::after { content: "Tick all on this page"; font-size: 13px; letter-spacing: 0;
    text-transform: none; font-weight: 600; color: var(--ink-2); }
  .booked-tbl tbody tr { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; row-gap: 4px; padding: 12px 16px;
    border-bottom: 1px solid var(--line); }
  .booked-tbl tbody tr:last-child { border-bottom: 0; }
  .booked-tbl td { display: block; padding: 0; border: 0; white-space: normal; }
  .booked-tbl td:nth-child(1) { grid-column: 1; grid-row: 1 / span 4; align-self: stretch; display: flex; align-items: center; width: auto;
    margin: -12px 0 -12px -16px; padding: 0 14px 0 16px; }  /* the whole left edge of the row is the tick */
  .booked-tbl td:nth-child(2) { grid-column: 2 / 4; grid-row: 1; font-weight: 700; }
  .booked-tbl td:nth-child(2) small { display: inline; margin-left: 6px; font-weight: 400; }
  .booked-tbl td:nth-child(7) { grid-column: 4; grid-row: 1; justify-self: end; }
  .booked-tbl td:nth-child(7) small { text-align: right; }
  .booked-tbl td:nth-child(3) { grid-column: 2; grid-row: 2; color: var(--ink-2); }
  .booked-tbl td:nth-child(4) { grid-column: 3 / 5; grid-row: 2; padding-left: 6px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
  .booked-tbl td:nth-child(5) { grid-column: 2 / 4; grid-row: 3; font-size: 13px; color: var(--ink-3); }
  .booked-tbl td:nth-child(5) small { display: inline; margin-left: 4px; }
  .booked-tbl td:nth-child(6) { grid-column: 4; grid-row: 3; justify-self: end; }
  .booked-tbl td:nth-child(8) { grid-column: 2 / 5; grid-row: 4; }
  .booked-tbl td:nth-child(8):not(:has(details)) { display: none; }
}

/* touch screens: small controls keep their look but get a tap area of about 44 px (an invisible margin around them) */
@media (pointer: coarse) {
  .btn.icon, .btn.sm, .tabs a, .tile-link, .back, .tbl td a:not(.btn), .tabs-more summary, details.cancel > summary { position: relative; }
  .btn.icon::after { content: ""; position: absolute; inset: -6px; }
  .btn.sm::after, .tabs a::after { content: ""; position: absolute; inset: -6px 0; }
  .tile-link::after, .back::after { content: ""; position: absolute; inset: -10px -8px; }
  .tbl td a:not(.btn)::after { content: ""; position: absolute; inset: -13px -6px; }
  .tabs-more summary, details.cancel > summary { padding-block: 10px; }
  input[type=checkbox], input[type=radio] { width: 22px; height: 22px; }
  td.ck, td.sel, td.rp-c, th.ck, th.sel, th.rp-c { cursor: pointer; }  /* tapping anywhere in a tick cell ticks it (app.js) */
}
@media (prefers-reduced-transparency: reduce) { .tabbar { background: var(--glass-2); -webkit-backdrop-filter: none; backdrop-filter: none; } }
@media (prefers-contrast: more) { .tabbar { background: var(--glass-2); -webkit-backdrop-filter: none; backdrop-filter: none; border-color: var(--ink-3); } }
@media (max-width: 560px) {
  .tabs.more-r { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); }
  .tabs.more-l { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 36px), transparent); }
  .tabs.more-l.more-r { -webkit-mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent);
    mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent); }
}

/* Appearance menu (owner, 23 Oct 2026): opens from the button's corner like the alerts panel */
.theme-wrap { position: relative; }
:root[data-theme-menu="open"] [data-theme-toggle] { background: var(--ov3); }
.theme-menu { display: none; position: absolute; right: 0; top: calc(100% + 10px); z-index: 45; width: 268px; padding: 6px; border-radius: var(--r-lg);
  background: var(--glass-2); border: 1px solid var(--line-2); box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
  transform-origin: top right; opacity: 0; transform: scale(.97) translateY(-4px);
  transition: opacity var(--dur-out) ease-in, transform var(--dur-out) ease-in, display var(--dur-out) allow-discrete; }
:root[data-theme-menu="open"] .theme-menu { display: grid; gap: 2px; opacity: 1; transform: none; transition-duration: var(--dur-in); transition-timing-function: var(--ease); }
@starting-style { :root[data-theme-menu="open"] .theme-menu { opacity: 0; transform: scale(.97) translateY(-4px); } }
.theme-menu button { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 10px; border: 0; border-radius: var(--r-md); background: none;
  color: var(--ink); font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.theme-menu button:hover, .theme-menu button:focus-visible { background: var(--ov2); outline: none; }
.theme-menu button:active { background: var(--ov3); }
.theme-menu button > .ico { color: var(--ink-3); }
.theme-menu span { flex: 1; min-width: 0; } .theme-menu b { display: block; font-size: 14px; font-weight: 600; }
.theme-menu small { display: block; margin-top: 1px; color: var(--ink-3); font-size: 12.5px; line-height: 1.35; }
.theme-menu .tick { color: var(--accent-ink); visibility: hidden; }
.theme-menu [aria-checked="true"] .tick { visibility: visible; }
.theme-menu [aria-checked="true"] > .ico:first-child { color: var(--accent-ink); }
@media (max-width: 560px) { .theme-menu { position: fixed; top: 64px; right: 12px; width: min(300px, calc(100vw - 24px)); } }

/* return pickup (owner, 23 Oct 2026): the courier pickup first, the other ways folded under it */
.pickup-h { margin: 16px 0 8px; }
.pickup-card { padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--ov1); display: grid; gap: 10px; }
.pickup-card p { margin: 0; }
.pickup-other { margin-top: 12px; }
.pickup-other > summary { cursor: pointer; color: var(--ink-2); font-size: 13.5px; }
.pickup-other > form { margin-top: 10px; }

/* return slips (return_slips.html): the customer's copy and the warehouse's */
.slip.ret .rs-no small { display: block; }
.slip.ret .rs-to p { margin: 3px 0 0; font-size: 12.5px; } .slip.ret .rs-to p.big { font-size: 15px; }
.slip.ret .mono { font-family: ui-monospace, Menlo, monospace; font-weight: 700; }
.ret-do, .ret-qc { margin-top: 6px; } .ret-do ul, .ret-qc ul { margin: 2px 0 0; padding-left: 16px; font-size: 12px; }
.ret-qc ul { list-style: none; padding: 0; columns: 2; column-gap: 14px; } .ret-qc li { display: flex; gap: 6px; align-items: center; break-inside: avoid; }
.ret-next { margin: 6px 0 0; font-size: 12px; }
.ret-qc .tick-box { width: 12px; height: 12px; border-width: 1.5px; flex: none; }
.slip-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pk-sheet { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -4px 0 12px; }  /* a Leopard pickup's load sheet, on the return */
.decide .tcs-new { display: none; } .decide:has(input[value="F2"]:checked, input[value="F3"]:checked) .tcs-new { display: block; }  /* TCS: a corrected / new address */
.xpay-tbl .xs { font-size: 12px; color: var(--ink-2); margin-bottom: 4px; }
.xpay-tbl .in-bank { color: var(--good-ink); font-size: 15px; }
.pay-period { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 13px; }
/* Settings › Shopify updates (owner, 27 Oct 2026) */
.sp-kinds { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sp-kinds .choice small { display: block; } .sp-time input { max-width: 160px; }
.sp-off { opacity: .6; }
.sp-tbl td:nth-child(2) { min-width: 260px; }

/* Settings › WhatsApp (owner, 28 Oct 2026) */
.wa-st { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 6px; }
.wa-hours { display: grid; gap: 6px; align-content: start; } .wa-hours .lbl { font-size: 13px; font-weight: 600; }
.wa-hours .row { display: flex; gap: 8px; align-items: center; } .wa-hours input { max-width: 130px; }
.wa-previews { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 10px; }
.wa-msg { display: grid; gap: 8px; align-content: start; padding: 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--glass); }
.wa-msg h3 { margin: 0; font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.wa-bubble { margin: 0; padding: 6px; border-radius: 4px 12px 12px 12px; background: var(--accent-wash); font-size: 14px; line-height: 1.45; }
.wa-bubble p { margin: 0; padding: 4px 6px; white-space: pre-line; }
.wa-photo { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; margin-bottom: 4px; background: var(--glass-2); }
.wa-btns { margin: 0; display: grid; gap: 4px; }
.wa-btns span { display: flex; gap: 6px; justify-content: center; align-items: center; padding: 7px; border-radius: var(--r-md); border: 1px solid var(--line-2); color: var(--accent-ink); font-size: 13px; font-weight: 600; }
.wa-btns .ico { width: 15px; height: 15px; }
/* Order page: send the WhatsApp confirmation / review request by hand (owner, 28 Oct 2026) */
.row-actions form.wa-send { display: contents; }
/* the page heading's buttons stay on the right, also when they wrap under the heading (owner, 28 Oct 2026) */
.page-h > .row-actions { margin-left: auto; justify-content: flex-end; }
.confirm-warn-h { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-weight: 700; color: var(--warn-ink); }
.confirm-warn-h::before { content: "!"; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn-ink); font-size: 14px; font-weight: 800; }
.wa-last { margin: 2px 0 0; font-size: 13px; }
/* Order page header in two rows (owner, 28 Oct 2026): number + order actions, then status + messages / Shopify */
.order-h > .grow { flex: 1 1 100%; min-width: 0; }  /* full width, so both rows' buttons end at the right edge */
.order-h .h1-acts { margin: 0 0 0 auto; justify-content: flex-end; }
.order-sub { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; margin-top: 8px; }
.order-sub .chips { margin: 0; flex: 1 1 320px; min-width: 0; }
.order-sub .linked { flex-basis: 100%; }
.order-sub .linked a { font-weight: 600; color: var(--ink); }
.order-sub .row-actions { margin: 0 0 0 auto; justify-content: flex-end; }
/* Payments › Leopard: email the unpaid list to Leopard (owner, 28 Oct 2026) */
.lu-acts { margin: 0; justify-content: flex-end; }
.lu-sent { margin: 0; padding: 0 20px 12px; font-size: 13px; }
.lm-head { margin: 10px 0; } .lm-head dd { overflow-wrap: anywhere; }
.lm-body { display: grid; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--glass); font-size: 14px; min-width: 0; }
.lm-body p { margin: 0; } .lm-logo { width: 110px; height: auto; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lm-logo { filter: invert(1); } }
:root[data-theme="dark"] .lm-logo { filter: invert(1); }
.lm-tbl { font-size: 12.5px; } .lm-tbl th, .lm-tbl td { white-space: nowrap; }
/* PIN sign-in on a trusted device (owner, 28 Oct 2026) */
input.readonly, input[readonly] { background: var(--ov1); color: var(--ink-2); }
fieldset.pin-field { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.pin-field legend { padding: 0; margin-bottom: 5px; font-size: 12.5px; font-weight: 650; letter-spacing: .02em; color: var(--ink-3); }
.pin-boxes { display: flex; gap: 8px; justify-content: space-between; }
.pin-boxes input { flex: 1 1 0; min-width: 0; max-width: 48px; height: 52px; padding: 0; text-align: center; font-size: 22px; font-weight: 700;
  font-variant-numeric: tabular-nums; caret-color: transparent; }
.pin-boxes input:focus { border-color: var(--accent); }
.pin-boxes:has(input:nth-child(9)) { gap: 5px; } .pin-boxes:has(input:nth-child(9)) input { height: 46px; font-size: 19px; }
.auth-alt { margin: 14px 0 0; text-align: center; font-size: 13.5px; }
.dv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dv-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-md); }
.dv-list form { margin: 0; }
/* Reorder (owner, 29 Oct 2026): compact, two columns, the footer always visible */
dialog.modal.ro-dialog { width: min(640px, calc(100vw - 32px)); }
.ro-step, .ro-form { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.ro-form .modal-b { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.ro-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .ro-cols { grid-template-columns: 1fr; } }
.ro-col { min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--glass); display: grid; gap: 8px; align-content: start; }
.ro-edit > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.ro-edit > summary::-webkit-details-marker { display: none; }
.ro-h { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); }
.ro-pen { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--ink-3); }
.ro-pen:hover, .ro-edit[open] .ro-pen { color: var(--accent-ink); background: var(--accent-wash); }
.ro-pen .ico { width: 15px; height: 15px; }
.ro-edit[open] + .ro-read { display: none; }
.ro-fields { display: grid; gap: 8px; margin-top: 8px; }
.ro-read { display: grid; gap: 2px; font-size: 13.5px; line-height: 1.45; min-width: 0; overflow-wrap: anywhere; }
.ro-lines, .ro-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ro-lines li, .ro-items li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ro-lines img { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; background: var(--ov1); flex: none; }
.ro-lines .grow, .ro-items .grow { flex: 1; min-width: 0; }
.ro-items { margin-top: 8px; }
.ro-qty input { width: 64px; text-align: center; }
.ro-add { margin-top: 8px; }
.ro-disc { margin: 0; }
.ro-total { margin: 0; display: grid; gap: 4px; padding: 10px 14px; border-radius: var(--r-md); background: var(--ov1); font-variant-numeric: tabular-nums; }
.ro-total div { display: flex; justify-content: space-between; gap: 12px; } .ro-total dt, .ro-total dd { margin: 0; }
.ro-total .grand { font-weight: 700; font-size: 15px; }
.ro-channel select { max-width: 260px; }
.ro-thumb { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; background: var(--ov1); flex: none; }
.ro-pay { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .ro-pay legend { padding: 0; margin-bottom: 5px; font-size: 12.5px; font-weight: 650; color: var(--ink-3); }
@media (max-width: 560px) { .ro-pay { grid-template-columns: 1fr; } }

/* The pencil beside a city the hub can't read (Fix city pop-up, `_city_modal.html`): gold so it is seen on a busy row */
.btn.sm.city-fix { height: 26px; padding: 0 9px; gap: 5px; margin: 0 2px; vertical-align: middle; font-size: 12.5px; color: var(--accent-ink);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-wash); }
.btn.sm.city-fix.icon { width: 26px; padding: 0; }
.btn.sm.city-fix:hover { border-color: var(--accent); color: var(--accent-hi); }
.btn.sm.city-fix .ico { width: 14px; height: 14px; }
.city-close { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.city-close .chip { cursor: pointer; }

/* "Learn more" beside a page title (owner, 3 Nov 2026): a quiet link to that page's Handbook section */
h1 .learn { font-family: var(--font); font-size: 13px; font-weight: 600; letter-spacing: 0; color: var(--accent-ink);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; margin-left: 6px; white-space: nowrap;
  vertical-align: 3px; }
h1 .learn:hover { text-decoration-thickness: 2px; }

/* Handbook by permission (3 Nov 2026): an index of sections, one section per page, screenshots in the text */
.hb-index { display: grid; gap: 16px; max-width: 860px; }
.hb-list { list-style: none; margin: 0; padding: 0; }
.hb-list li + li { border-top: 1px solid var(--line); }
.hb-list a { display: flex; align-items: center; gap: 12px; padding: 12px 2px; color: var(--ink); text-decoration: none; }
.hb-list a .grow { flex: 1; min-width: 0; } .hb-list a small { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }
.hb-list a .ico { width: 16px; height: 16px; color: var(--ink-3); transform: rotate(-90deg); flex: none; }
.hb-list a:hover b { color: var(--accent-ink); }
.hb-toc .eyebrow + ol { margin-bottom: 14px; }
.hb-toc a[aria-current="page"] { color: var(--accent-ink); font-weight: 650; }
.hb-fig { margin: 14px 0 18px; text-align: center; }
.hb-fig img { display: block; margin: 0 auto; width: 100%; max-width: 360px; height: auto; border-radius: 14px; border: 1px solid var(--line-2);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .10); background: var(--bg-2, var(--ov2)); }
.hb-fig.wide img { max-width: 100%; }
.hb-fig figcaption { margin-top: 8px; font-size: 13px; color: var(--ink-3); }
.hb-shot { display: grid; gap: 6px; text-decoration: none; min-width: 0; }
.hb-shot span { font-size: 11.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); text-align: center; }
.hb-shots { display: grid; grid-template-columns: minmax(0, 2.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.hb-pair img { max-width: 100%; } .hb-shot.desk img { border-radius: 10px; }
@media (max-width: 640px) { .hb-shots { grid-template-columns: minmax(0, 1fr); gap: 18px; } .hb-shot.phone img { max-width: 280px; } }
.hb-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hb-pn a { display: grid; gap: 4px; padding: 12px 14px; text-decoration: none; color: var(--ink); min-width: 0; }
.hb-pn a small { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); font-size: 12.5px; }
.hb-pn a small .ico { width: 14px; height: 14px; } .hb-pn a.next { text-align: right; } .hb-pn a.next small { justify-content: flex-end; }
.hb-pn a:hover b { color: var(--accent-ink); }
.hb-who { border: 0; padding: 0; margin: 6px 0 0; display: grid; gap: 8px; }
.hb-who legend { font-weight: 650; color: var(--ink); padding: 0; margin-bottom: 2px; }
.hb-who-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
@media (max-width: 900px) { .hb > .hb-toc { order: 2; } }
@media (max-width: 560px) { .hb-pn { grid-template-columns: 1fr; } .hb-pn a.next { text-align: left; } .hb-pn a.next small { justify-content: flex-start; } }

.card.solo > .card-h { margin-bottom: 0; }  /* a card that is only its header (Delivery charge on the order page) */

/* Change order (owner, 18 Nov 2026): what changed, as big buttons; then that change's form */
dialog.modal.ch-dialog { width: min(560px, calc(100vw - 32px)); }
.ch-kinds { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ch-kind { display: grid; gap: 2px; width: 100%; text-align: left; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line-2);
  background: var(--ov1); color: var(--ink); font: inherit; cursor: pointer; }
.ch-kind b { font-size: 14.5px; } .ch-kind small { color: var(--ink-3); font-size: 13px; }
.ch-kind:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-wash); }
.ch-kind:disabled { cursor: not-allowed; opacity: .6; }
.ch-step-h { margin: 0; font-size: 15px; }

/* ---- the apps page (owner, 19 Nov 2026): the first screen after signing in, one square tile per app, the hub's own glass cards and
   gold; the badge counts work waiting on this person in that app (red when some is overdue) ---- */
/* standalone (owner, 19 Nov 2026): no side menu, no top bar, no phone tab bar; logo top left, the person's circle top right */
.apps-body { min-height: 100vh; display: flex; flex-direction: column; }
.apps-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 32px; }
.apps-top .brand { text-decoration: none; }
.apps-me { position: relative; }
.apps-me-btn { width: 40px; height: 40px; border: 0; cursor: pointer; font: 700 13.5px/1 var(--font); }
.apps-me-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* hover (computer) or tap (phone: the button takes focus) opens it; the gap above is bridged so the pointer can travel down */
.apps-me-menu { position: absolute; top: 100%; right: 0; z-index: 30; min-width: 196px; margin-top: 8px; padding: 4px; border-radius: 12px;
  background: var(--glass-2); border: 1px solid var(--line-2); box-shadow: var(--card-shadow-hi); visibility: hidden; opacity: 0;
  transform: translateY(-4px); transition: opacity var(--dur-out), transform var(--dur-out), visibility 0s linear var(--dur-out); }
.apps-me-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
@media (hover: hover) { .apps-me:hover .apps-me-menu { visibility: visible; opacity: 1; transform: none; transition: opacity var(--dur-in), transform var(--dur-in) var(--ease), visibility 0s; } }
.apps-me.open .apps-me-menu { visibility: visible; opacity: 1; transform: none;
  transition: opacity var(--dur-in), transform var(--dur-in) var(--ease), visibility 0s; }
.apps-me-menu a { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 13.5px; font-weight: 500; }
.apps-me-menu a:hover, .apps-me-menu a:focus-visible { background: var(--ov2); outline: none; }
.apps-me-menu a .ico { width: 16px; height: 16px; color: var(--ink-3); }
.apps-me-menu .nav-fly-out { padding: 8px 10px; font-size: 13.5px; border-radius: 8px; }
.apps-me-menu .nav-fly-who { margin: 6px 10px 6px; }
.apps-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 8px 24px 12vh; }
.apps-hello { text-align: center; }
.apps-env { margin: 0; }
@media (max-width: 560px) { .apps-env { display: none; } }
.apps-operate { position: static; }
.apps { display: grid; grid-template-columns: repeat(auto-fit, 196px); justify-content: center; gap: 18px; width: 100%; max-width: 900px; }
.app-tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; aspect-ratio: 1 / .92;
  padding: 22px 16px 18px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); box-shadow: var(--card-shadow), var(--bevel);
  color: var(--ink); text-decoration: none; text-align: center; transition: box-shadow var(--dur-in) var(--ease), border-color var(--dur-in), transform var(--dur-in) var(--ease); }
.app-tile b { font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.app-ico { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 16px; background: var(--accent-wash); color: var(--accent-ink);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
.app-ico .ico { width: 28px; height: 28px; }
.app-go { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 12px; border-radius: 99px; font-size: 12.5px; font-weight: 650;
  color: var(--accent-ink); background: var(--ov1); border: 1px solid var(--line); }
.app-go .ico { width: 14px; height: 14px; transition: transform var(--dur-in) var(--ease); }
.app-n { position: absolute; top: 12px; right: 12px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 99px; display: inline-grid; place-items: center;
  font: 700 12.5px/1 var(--font); font-style: normal; font-variant-numeric: tabular-nums; color: #fff; background: var(--accent-grad); }
.app-n.late { background: var(--crit); }
a.app-tile:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--card-shadow-hi), var(--bevel); }
a.app-tile:hover .app-go { background: var(--accent-wash); }
a.app-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { a.app-tile:hover { transform: translateY(-3px); } a.app-tile:hover .app-go .ico { transform: translateX(2px); } }
.app-tile.soon { opacity: .62; box-shadow: none; background: var(--pane); border-style: dashed; }
.app-tile.soon .app-go { color: var(--ink-3); }
@media (max-width: 560px) {
  .apps-top { padding: 16px 16px; }
  .apps-main { gap: 22px; padding: 12px 16px 10vh; }
  .apps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .app-tile { aspect-ratio: auto; min-height: 150px; padding: 18px 10px 14px; gap: 10px; border-radius: 16px; }
  .app-tile b { font-size: 15.5px; } .app-ico { width: 52px; height: 52px; border-radius: 14px; } .app-ico .ico { width: 25px; height: 25px; }
  .app-go { display: none; } .app-tile.soon .app-go { display: inline-flex; }
}

/* ---- Corporate orders (owner, 19 Nov 2026) ---- */
.co-wrap { max-width: 920px; }
.co-kind { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border: 0; margin: 0 0 12px; padding: 0; }
.co-who { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, .9fr); gap: 10px; }
.co-lines { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.co-line { display: grid; grid-template-columns: minmax(0, 1.3fr) 92px minmax(0, 1.6fr) minmax(0, .9fr); gap: 12px; align-items: end;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--glass); }
.co-line.bad { border-color: color-mix(in srgb, var(--crit) 45%, transparent); }
.co-bag { display: grid; gap: 2px; align-self: center; min-width: 0; } .co-bag b { overflow-wrap: anywhere; }
.co-qty input { width: 100%; text-align: center; }
.co-disc, .co-billd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.co-billd { max-width: 520px; }
.co-sum { display: grid; justify-items: end; gap: 2px; align-self: center; font-variant-numeric: tabular-nums; }
.co-add { display: block; max-width: 420px; margin-top: 4px; }
.co-pay { margin: 0 0 10px; }
.co-paid { display: block; max-width: 260px; margin-bottom: 10px; }
.co-notes { display: block; } .co-notes textarea { width: 100%; }
.co-problems { margin: 10px 0 0; padding-left: 18px; color: var(--crit-ink); font-size: 13.5px; display: grid; gap: 2px; }
.co-save { justify-content: flex-end; margin-top: 12px; }
.co-orderdl { margin: 12px 20px 18px; }
.co-pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.co-payform { display: grid; gap: 8px; margin-top: 12px; } .co-payform .btn { justify-self: start; }
.co-cancel > summary { cursor: pointer; font-weight: 650; color: var(--ink-3); }
.co-cancel form { display: grid; gap: 8px; margin-top: 10px; } .co-cancel .btn { justify-self: start; }
.co-month { display: flex; gap: 8px; align-items: center; }
.co-h2 { font-size: 18px; margin: 0 0 12px; }
.co-split { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.co-split .tbl { width: 100%; } .co-split .tbl th[scope="row"] { font-weight: 600; text-transform: none; letter-spacing: 0; font-size: 13.5px; color: var(--ink); white-space: normal; }
.tbl.report tr.here th, .tbl.report tr.here td { background: var(--accent-wash); }
.co-tbl td.items { white-space: normal; min-width: 180px; }
.co-prices { display: grid; padding: 4px 0 8px; }
.co-prow { display: grid; grid-template-columns: minmax(0, 1.4fr) 130px 130px 110px 110px 80px; gap: 12px; align-items: center; padding: 10px 20px;
  border-bottom: 1px solid var(--line); margin: 0; }
.co-prow:last-child { border-bottom: 0; }
.co-prow.head { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); padding-top: 4px; padding-bottom: 8px; }
.co-prow.dim > :not(.co-on):not(span) { opacity: .6; }
.co-prow input[inputmode] { width: 100%; }
.co-pl { display: none; font-size: 12px; font-weight: 650; color: var(--ink-3); }
.co-on { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.co-padd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 150px 150px auto; gap: 10px; align-items: end; }
@media (max-width: 900px) {
  .co-line { grid-template-columns: minmax(0, 1fr) 92px; }
  .co-line .co-disc { grid-column: 1 / -1; } .co-line .co-sum { grid-column: 1 / -1; justify-items: start; }
  .co-split { grid-template-columns: 1fr; }
  .co-prow { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; } .co-prow > b { grid-column: 1 / -1; }
  .co-prow.head { display: none; } .co-pl { display: block; margin-bottom: 4px; }
  .co-padd { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .co-kind, .co-who { grid-template-columns: 1fr; }
  .co-prow { grid-template-columns: 1fr 1fr; padding: 10px 16px; }
  .co-padd { grid-template-columns: 1fr; }
}
.co-find { flex: 1 1 320px; } .co-find input { width: 100%; }
.note.co-scope { display: flex; gap: 10px; align-items: flex-start; } .note.co-scope > .ico { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--accent-ink); }

/* ---- Stock (owner, 20 Nov 2026) ---- */
.st-tbl th[scope="row"] { text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink); font-weight: 600; white-space: normal; }
.st-tbl td small { font-weight: 400; }
.st-move { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.4fr) 100px minmax(0, 1.3fr) 150px; gap: 10px; align-items: end; }
.st-move .st-note { grid-column: 1 / -2; } .st-move > div { grid-column: -2; }
.st-acts form { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.st-count { display: grid; gap: 14px; max-width: 640px; }
.st-day { max-width: 220px; }
.st-bags { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.st-bags li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--glass); }
.st-bags .grow { flex: 1; min-width: 0; } .st-bags input { width: 110px; text-align: center; }
.st-save { justify-content: flex-end; }
@media (max-width: 900px) { .st-move { grid-template-columns: 1fr 1fr; } .st-move .st-note, .st-move > div { grid-column: auto; } }
@media (max-width: 560px) { .st-move { grid-template-columns: 1fr; } }
.st-tbl th[scope="row"] { background: none; min-width: 170px; } .st-tbl tfoot th[scope="row"] { background: var(--ov1); }
.inf-list { list-style: none; margin: 0; padding: 0; }
.inf-list li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 8px 16px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line); }
.inf-list li.inf-blacklisted { background: color-mix(in srgb, var(--crit) 6%, transparent); }
.inf-who b { margin-right: 6px; } .inf-bags { display: grid; gap: 2px; font-size: 13.5px; }
.inf-tag { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; } .inf-tag input { width: 170px; }
.inf-add { padding-top: 12px; padding-bottom: 16px; border-top: 1px solid var(--line); }
.inf-add > summary { cursor: pointer; font-weight: 650; display: inline-flex; gap: 6px; align-items: center; color: var(--accent-ink); }
.inf-add > summary .ico { width: 16px; height: 16px; } .inf-add form { display: grid; gap: 10px; margin-top: 12px; }
.inf-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) 150px 150px minmax(0, 1.4fr) auto; gap: 10px; align-items: end; }
.st-num { width: 80px; text-align: center; }
@media (max-width: 900px) { .inf-list li { grid-template-columns: 1fr; } .inf-tag { justify-content: flex-start; } .inf-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .inf-grid { grid-template-columns: 1fr; } .inf-tag input { width: 100%; } }
.st-tbl td.r label { justify-items: end; } .inf-tag input { width: 190px; }
/* the defective reserve: a compact table, numbers next to the names (owner, 20 Nov 2026) */
.st-res-form { display: grid; gap: 12px; justify-items: start; padding: 0 20px 18px; }
.st-res { border-collapse: collapse; width: 100%; max-width: 520px; font-size: 14px; }
.st-res th, .st-res td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.st-res thead th { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.st-res tbody th { font-weight: 600; color: var(--ink); } .st-res .r { text-align: right; }
.st-res td label { display: inline-grid; } .st-res .st-num { width: 72px; min-height: 34px; padding: 4px 8px; }
.st-res tfoot th, .st-res tfoot td { font-weight: 700; background: var(--ov1); border-bottom: 0; }
.st-res tfoot td.r { padding-right: 20px; } .st-res tbody td.r:nth-child(3) { padding-right: 20px; }
.inf-add { padding-left: 20px; padding-right: 20px; }
@media (max-width: 560px) { .st-res-form { padding: 0 16px 16px; } .st-res th, .st-res td { padding: 8px 6px; } .inf-add { padding-left: 16px; padding-right: 16px; } }
.st-tbl tfoot tr.sum th, .st-tbl tfoot tr.sum td { background: var(--ov1); font-weight: 700; }
.st-web small .ico { width: 12px; height: 12px; vertical-align: -1px; margin-right: 3px; }
.good-t { color: var(--good-ink); } .warn-t { color: var(--warn-ink); font-weight: 600; }
.st-tbl th, .st-tbl td { padding: 10px 10px; } .st-tbl th:first-child, .st-tbl td:first-child { padding-left: 20px; }
.st-tbl th:last-child, .st-tbl td:last-child { padding-right: 20px; } .st-tbl thead th { white-space: normal; vertical-align: bottom; }
.st-tbl th[scope="row"] { min-width: 150px; } .st-web { min-width: 112px; }
