/* ============================ TOKENS ============================ */
:root{
  /* Light — "Ink" (2026-10-06): Sellevry blue accent (the se. logo tile), its
     violet as the second colour, on neutrals tinted toward the brand navy. White
     topbar with a blue → violet hairline, pale table headers, flat cards.
     Palette: Canvas #f3f6fd (+ the mock's top glow, --bg-glow) · Sellevry blue #0350a6 · Violet #6337ad ·
     Ink #1b2742 · Border #d6deea · logo orange #ec9a3a. The canvas sits ~8 L*
     under the white cards and the cards lift on a deeper shadow (owner,
     2026-10-15: the #f2f5fa canvas read "a bit blunt"). */
  --accent:#0350a6;
  --accent-soft:#0350a614;
  --accent-text:#ffffff;
  --logo-plate:#ffffff;
  --bg:#f3f6fd;
  --surface:#ffffff;
  --surface-2:#eef2f9;
  --elev:#ffffff;
  --border:#d6deea;
  --border-strong:#b3bfd3;
  --text:#1b2742;
  --text-2:#3f4e6e;
  --muted:#5b6987;
  --shadow:0 1px 2px rgba(11,21,48,.06), 0 12px 30px -14px rgba(3,40,110,.30);
  --shadow-lg:0 16px 40px -12px rgba(3,40,110,.22), 0 2px 6px rgba(11,21,48,.06);
  --radius:14px;
  --radius-sm:10px;
  --green:#1a7a4e; --green-bg:#1a7a4e22;
  --blue:#1f88c7;  --blue-bg:#1f88c722;
  --amber:#b97e09; --amber-bg:#f6a31c2b;
  --red:#d23b2e;   --red-bg:#d23b2e20;
  --gray:#5f6b75;  --gray-bg:#5f6b7520;
  --violet:#6337ad;--violet-bg:#6337ad1f;
  --magenta:#b01480;--magenta-bg:#d81b9a1f;
  /* chrome — Ink: a WHITE topbar underlined by the logo's blue → violet hairline,
     and a deep-navy side rail ("night rail") so colour still frames the content. Everything that sits ON the bar reads from the --topbar-*
     tokens (hover, search field, logo ring), never a white rgba: those were tuned
     for the old blue bar and vanish on a white one (src/ui/ink-palette.browser.test.js). */
  --topbar-bg:#f3f6fd; --topbar-fg:#0b1530; --topbar-border:#d3dbe8;
  /* the scrolled bar's glass (owner, 2026-11-01, from the glass mock of the Tray Manager: 82% hardly read as glass) */
  --topbar-glass:color-mix(in srgb,var(--topbar-bg) 72%,transparent);
  --topbar-hover:#f4f7fc; --topbar-field:#f6f8fc; --topbar-field-focus:#ffffff;
  --glass-bg:#ffffffb8; --glass-line:#d3dbe8;
  --glass-shadow:0 0 0 .5px #0b15300f, 0 2px 8px #0b15300f;
  --topbar-field-border:var(--accent); --topbar-field-ring:rgba(3,80,166,.16);
  --topbar-muted:#5b6987; --logo-ring:transparent;
  /* the "sellevry" wordmark in the logo's blue → violet (owner, 2026-10-06: the dark
     ink "needs to be adapted" in light mode); dark mode keeps the surface's ink */
  --logo-word-fill:linear-gradient(90deg,var(--accent),var(--accent-end));
  /* Sally's tile (SALLY MARK) and the rail's split logo tile: the se. tile's own gradient and white ink. Like the
     logo files it is the same in both themes, so dark mode does not redefine it. */
  --logo-tile:linear-gradient(135deg,#0156a4 0%,#0350a6 22%,#1446a8 38%,#383cab 50%,#6337ad 60%,#8c4197 68%,#b65e66 75%,#dc7e3e 83%,#ec9c32 90%,#f2ac30 100%);
  --logo-tile-ink:#ffffff;
  /* …and the folded rail's colour block (SIDEBAR): the SAME colours in the SAME proportions,
     drawn over 92% of the block's diagonal (the last stop holds to the corner). The block is
     taller than the tile and fades out below, so at the logo's own length its orange sat in
     the faded corner (owner, 2026-10-22: "shifting the colors from the bottom right to the
     top left as the orange is almost gone"; 85% was "too much shift"). */
  --logo-cap:linear-gradient(135deg,#0156a4 0%,#0350a6 20.2%,#1446a8 35%,#383cab 46%,#6337ad 55.2%,#8c4197 62.6%,#b65e66 69%,#dc7e3e 76.4%,#ec9c32 82.8%,#f2ac30 92%);
  --avatar-bg:#e6eefa; --avatar-fg:#0350a6;
  /* night rail: light-on-navy in BOTH themes. The current entry is a lighter pill
     and nothing else — no coloured edge (the mock; owner 2026-10-22: the edge "moves
     icons to the right"); --sidebar-indicator stays the logo's orange for the
     topbar's notification dot. */
  --sidebar-bg:#1a2550; --sidebar-border:#1a2550;  /* medium navy — #0b1433 read "a bit too dark" (owner) */
  --sidebar-fg:#95a2c4; --sidebar-strong:#ffffff; --sidebar-hover:rgba(255,255,255,.07);
  --sidebar-active-bg:rgba(255,255,255,.12); --sidebar-active-fg:#ffffff;
  /* count badges: always amber, both themes (owner — and again 2026-10-23, after the Apple
     design review proposed the rail's muted gray: "amber") */
  --sidebar-indicator:#ec9a3a; --sidebar-badge-bg:#e6a32e; --sidebar-badge-fg:#1b1304;
  --sidebar-alt-bg:#e6a32e; --sidebar-alt-fg:#1b1304;
  /* table header band = the side rail's twin (owner's pick, 2026-10-06): labels +
     sort arrows in the rail's icon colour, lifted with 25% white (at 11px caps the
     exact icon colour read darker than the rail's 20px icons). The band is the rail's navy LIFTED a shade
     (#283668 vs #1a2550): the exact same colour read darker on a thin strip boxed in
     by white rows than on the tall rail. Checked by ink-palette.browser.test.js. */
  --th-bg:#283668; --th-fg:color-mix(in srgb,var(--sidebar-fg) 75%,#fff); --th-accent:color-mix(in srgb,var(--sidebar-fg) 75%,#fff); --th-border:#141d40;
}
[data-theme="dark"]{
  /* Dark — "Ink" (2026-10-06): ONE muted slate-navy family — page, cards, topbar,
     side rail and table headers — structured by light/dark steps. About half the
     blue of the first navy (owner: "quite heavy in blue"); graphite surfaces beside
     a navy rail read as two palettes ("unstructured"). The accent is the logo's
     blue lifted to read on dark (#7fb2f6), fading to a lifted violet. A light
     accent fill takes DARK text (--accent-text / --on-brand), as amber did. */
  --accent:#7fb2f6;
  --accent-soft:#7fb2f624;
  --accent-text:#0b1530;
  --logo-plate:#eef0f3;
  --bg:#10141c;
  --surface:#171c26;
  --surface-2:#1c222d;
  --elev:#1c222d;
  --border:#2a3140;
  --border-strong:#3c4558;
  --text:#dce1ea;
  --text-2:#b5bdcc;
  --muted:#a8b0c0;
  --shadow:0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.35);
  --shadow-lg:0 16px 50px rgba(0,0,0,.5);
  --green:#34d27b; --green-bg:#34d27b1a;
  --blue:#5aa2ff;  --blue-bg:#5aa2ff1a;
  --amber:#e6a32e; --amber-bg:#e6a32e1f;
  --red:#f87171;   --red-bg:#f871711a;
  --gray:#94a3b8;  --gray-bg:#94a3b81a;
  --violet:#a78bfa;--violet-bg:#a78bfa1a;
  --magenta:#f472b6;--magenta-bg:#d81b9a26;
  --topbar-bg:#10141c; --topbar-fg:#f4f6fa; --topbar-border:#232a37;
  /* tinted most of the way to the card's colour: --topbar-bg is darker than the cards passing under the bar, and the bar read as a dark band (owner, 2026-11-01). All the way, the search field melts into the bar (ink-palette test); under 60% a white photo takes the title below 4.5:1 (topbar-glass.browser.test.js) */
  --topbar-glass:color-mix(in srgb,color-mix(in srgb,var(--surface) 70%,var(--topbar-bg)) 66%,transparent);
  --topbar-hover:rgba(255,255,255,.08); --topbar-field:#1c222d; --topbar-field-focus:#212836;
  --glass-bg:#1b212cc7; --glass-line:#2a3140;
  --glass-shadow:0 2px 8px #0000002e;
  --topbar-field-border:var(--accent); --topbar-field-ring:rgba(127,178,246,.22);
  --topbar-muted:#a8b0c0; --logo-ring:color-mix(in srgb,var(--topbar-fg) 22%,transparent);
  --logo-word-fill:currentColor;
  --avatar-bg:#262d3a; --avatar-fg:var(--accent);
  --sidebar-bg:#12161f; --sidebar-border:#222836;  /* the family's frame step, a shade under the header band */
  --sidebar-fg:#8a97bd; --sidebar-strong:#ffffff; --sidebar-hover:rgba(255,255,255,.05);
  --sidebar-active-bg:rgba(255,255,255,.09); --sidebar-active-fg:#ffffff;
  --sidebar-indicator:#ec9a3a; --sidebar-badge-bg:#e6a32e; --sidebar-badge-fg:#1b1304;
  --sidebar-alt-bg:#e6a32e; --sidebar-alt-fg:#1b1304;
  --th-bg:#232a37; --th-fg:color-mix(in srgb,var(--sidebar-fg) 75%,#fff); --th-accent:color-mix(in srgb,var(--sidebar-fg) 75%,#fff); --th-border:#2a3140;
}
*{box-sizing:border-box}
html,body{margin:0;height:100%}

/* ── LUCIDE ICON PLACEHOLDERS ────────────────────────────────────────────────
   Every icon in the app ships as an EMPTY `<i data-lucide="…">` that the
   deferred Lucide bundle replaces with an `<svg>` on DOMContentLoaded. An empty
   inline `<i>` is 0x0, so until that swap every label beside an icon sat where
   the icon wasn't — and the whole sidebar rail and section tab strip slid
   sideways the moment the icons arrived. Same "reserve the box" rule as the
   loading skeletons and the server-rendered nav counts, applied to the icons.
   `display:inline-block` is what makes width/height apply at all on a
   non-replaced `<i>`; 24px is Lucide's own default size, so an icon no rule
   sizes reserves exactly the box it will take.
   SIZING AN ICON? Size the placeholder in the SAME rule — every `svg` sizing
   rule in this sheet carries an `i[data-lucide]` twin (`.navlink svg,.navlink
   i[data-lucide]{…}`) so the two can never drift apart. These rules stop
   applying the instant the real `<svg>` exists, so they only ever describe the
   pre-hydration box.
   `:where()` zeroes this rule's specificity so ANY twin wins on load order
   alone — edit-panels.css sizes every icon to 1em and loads BEFORE this sheet,
   and a plain `i[data-lucide]` selector here would have out-ranked it and
   reserved 24px for a 14px icon. */
:where(i[data-lucide]){display:inline-block;width:24px;height:24px}
/* Every page keeps its vertical scrollbar track, scrolling or not. The styled
   ::-webkit-scrollbar below always takes 10px, so a page with nothing to scroll (a
   short page, the viewport-locked CRM inbox) was 10px wider than one that scrolls
   and the fixed topbar jumped sideways between them. (scrollbar-gutter:stable can't
   do this — Chrome reserves no gutter while macOS uses overlay scrollbars.)
   Lock page scroll on <html>, never <body>: with this set, overflow on body no
   longer reaches the viewport — it clips body to one screen and jumps to the top. */
html{overflow-y:scroll}
/* No automatic text resizing on a phone: iPhone re-sizes text it thinks is too
   small whenever the layout shifts (a pull-to-reload, a rotation), so a label
   jumped in size mid-gesture (owner, 2026-10-08: "the Console label in the top
   bar resizes shortly"). The app sets its own sizes. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{
  background-color:var(--bg);background-image:var(--bg-glow,none);background-repeat:no-repeat;color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  font-size:var(--fs-body);line-height:1.5;-webkit-font-smoothing:antialiased;
}
/* Selected text: a solid --selection-bg, so a selection shows on every surface
   (a soft tint vanished on the chat bubbles and only showed in the gaps — the
   inbox "went dark / bright" while nothing looked marked, 2026-10-11). On an
   accent FILL (our chat bubble) the selection inverts: --on-brand behind accent text. */
::selection{background:var(--selection-bg)}
:is(.chat-msg.out,.ib-msg.out,.msg.me .bubble,.sw-bubble.me) ::selection{background:var(--on-brand);color:var(--accent)}
h1,h2,h3,h4,.display{font-family:var(--font-display);letter-spacing:-.01em;margin:0}
.mono{font-family:var(--font-mono)}
/* A long id in groups (App.idChunks, format.js — tracking numbers): the gap is a margin, never a space, so a
   copy or a double-click takes the bare number (owner, 2026-11-17, round 3 of the design principles). */
.id-chunks > span + span{margin-left:.35em}
/* ONE coach mark (round 4 of the design principles, 2026-11-17): a small floating note that points at one
   button the first time someone needs it, with its button ringed (the product page's List now on a sample). */
.coach-mark{position:fixed;z-index:60;width:min(300px,calc(100vw - 24px));padding:12px 14px;border-radius:var(--r-12, 12px);
  background:var(--surface);border:1px solid var(--border);box-shadow:var(--elev-3, 0 8px 24px rgb(16 24 40 / .14));
  display:flex;flex-direction:column;gap:10px;font-size:var(--fs-13, 13px);line-height:1.45;color:var(--text);animation:pop-in var(--dur-fast) var(--ease)}
.coach-mark p{margin:0}
.coach-mark .btn{align-self:flex-end}
.coach-target{box-shadow:0 0 0 3px var(--accent-soft),0 0 0 1px var(--accent)}
/* An empty result's way out (App.noMatch, list-kit.js): drop the filters, or search everywhere. */
.no-match-acts{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:12px}
a{color:inherit;text-decoration:none}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-thumb{background:var(--border-strong);border-radius:var(--r-12, 10px);border:2px solid var(--bg)}
::-webkit-scrollbar-track{background:transparent}

/* ============================ SKIP LINK ============================
   The keyboard's first stop on every shell page (partials/x-topbar, the console's
   shell-top — the Apple design review, 2026-10-23: 35 Tab presses through the bar and
   the rail before the page's first control). Out of sight until it has the focus, then
   a small card over the rail's head; it moves the focus to .skip-target, placed after
   the rail, right before the page's content. Over every piece of chrome (the rail is
   z 55, the edge strip 8000), under the dialogs. */
.skip-link{position:fixed;top:var(--rail-inset,8px);left:var(--rail-inset,8px);z-index:8500;padding:9px 14px;border-radius:var(--r-12, 10px);
  background:var(--surface);color:var(--accent);border:1px solid var(--border);box-shadow:var(--shadow-lg);
  font:600 var(--fs-14, 14px) var(--font-system);text-decoration:none;translate:0 calc(-100% - 24px)}
.skip-link:focus{translate:none;outline:2px solid var(--accent);outline-offset:2px}
.skip-target{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.skip-target:focus,main[tabindex="-1"]:focus{outline:none}

/* ============================ TOPBAR ============================ */
/* --scroll-lock-gap is the scrollbar width a page scroll lock takes away (x-modal.js
   while a modal is open; x-topbar's mobile nav drawer). Fixed chrome is sized by the
   viewport, not body, so body's padding can't hold it still: anything pinned to the
   right edge adds the gap itself (here, .toast-region, .sw-fab), or it jumps right. */
.topbar{
  position:fixed;top:0;left:0;right:0;height:var(--topbar-h);z-index:50;
  display:flex;align-items:center;gap:18px;padding:0 calc(22px + var(--scroll-lock-gap, 0px)) 0 22px;
  background:var(--topbar-bg);color:var(--topbar-fg);
  border-bottom:1px solid var(--topbar-border);
  /* the system's own font only: the bar never changes size when a font arrives (topbar-font.browser.test.js) */
  font-family:var(--font-system);
}
/* SEE-THROUGH (the new layout, step 3 — owner, 2026-10-21): on a computer the bar
   is the page's own ground, and the page scrolls on under it, blurred. The blur
   sits on a layer of its own (.topbar-glass, the bar's first child, under its
   content) and NEVER on .topbar: a backdrop-filter, filter or transform on the bar
   makes it the frame of every position:fixed box inside it, and the avatar menu's
   My account dialog is one — it opened 300px above the screen
   (user-settings-phone.browser.test.js). A phone keeps the bar solid (no
   backdrop-filter on a phone). A bar without the layer (the customer portal, the
   transport approval page) keeps its solid ground.
   AT THE TOP the bar is clear (owner, 2026-10-22: it matched the page's lower part but not
   its top, where the light glow is): the glass — a phone's solid colour — comes in once the
   page has scrolled under it (`.is-scrolled`, /js/app-install.js), as an iOS / macOS bar. */
.topbar-glass{display:none}
/* the bar's slot for the page title on a phone (look.css "THE TITLE IN THE BAR"): nothing without that sheet */
.topbar-title{display:none}
@media (max-width:768px){
  .topbar.is-glass{transition:background-color var(--dur) var(--ease),border-color var(--dur) var(--ease)}
  .topbar.is-glass:not(.is-scrolled){background-color:transparent;border-bottom-color:transparent}
}
@media (min-width:769px){
  .topbar.is-glass{background:none;border-bottom:0}
  .topbar-glass{display:block;position:absolute;inset:0;z-index:-1;pointer-events:none;background:var(--topbar-glass);-webkit-backdrop-filter:saturate(1.6) blur(16px);backdrop-filter:saturate(1.6) blur(16px);transition:opacity var(--dur) var(--ease)}
  .topbar.is-glass:not(.is-scrolled) > .topbar-glass{opacity:0}
  /* the icons on the right sit in ONE glass capsule, each a 34px circle (the mock) */
  .topbar > .tb-actions{gap:2px;padding:3px;border-radius:var(--r-full, 999px);background:var(--glass-bg);border:1px solid var(--glass-line);box-shadow:var(--glass-shadow)}
  .topbar > .tb-actions .iconbtn{width:34px;height:34px;border-radius:var(--r-full, 999px)}
  /* hovered: a tint of the bar's ink. --topbar-hover is a LIFT made for the solid bar
     (a phone's) — in light mode it is the capsule's own white, and a hover showed
     nothing (owner, 2026-10-22; topbar-capsule-hover.browser.test.js) */
  .topbar > .tb-actions .iconbtn:is(:hover,.is-active):not(:disabled){background:color-mix(in srgb,var(--topbar-fg) 8%,transparent)}
  .topbar > .tb-actions .iconbtn .dot{top:6px;right:7px}
  .topbar > .tb-actions .user-menu{margin-left:2px}
}
/* REDUCE TRANSPARENCY (the Apple design review — owner, 2026-10-23: "do 6"; HIG Accessibility:
   materials are opaque when the person asks for it). Every glass surface turns solid in its own
   colour and nothing blurs; scrims keep their dim. Sally's panel and the product page's tab strip
   follow in their own sheets. Tested by src/ui/reduce-transparency.browser.test.js. */
@media (prefers-reduced-transparency:reduce){
  :root,[data-theme="dark"]{--glass-bg:var(--surface)}
  /* html: theme.css's dark block outranks a bare [data-theme] (the rail turns the solid navy a phone wears) */
  html:root,html[data-theme="dark"]{--rail-glass:var(--sidebar-bg);--rail-glass-filter:none;--rail-glow:none}
  .topbar-glass{background:var(--topbar-bg);-webkit-backdrop-filter:none;backdrop-filter:none}
  /* :root — their own rules sit further down the sheet */
  :root .whats-new-head::before{background:var(--surface);-webkit-backdrop-filter:none;backdrop-filter:none}
  :root :is(.x-modal-backdrop,.app-modal-backdrop,.inv-modal-backdrop,.modal){-webkit-backdrop-filter:none;backdrop-filter:none}
}
/* No line under the bar, at rest or while a page loads (owner, 2026-10-22, the
   mock: "no line under the bar", then "i still have the load bar when i change a
   page"). The blue → violet hairline was the loading line from 2026-10-06. */
.brand{display:flex;align-items:center;gap:10px;font-family:var(--font-system);font-weight:700;font-size:var(--fs-17, 18px);color:var(--topbar-fg);text-decoration:none;line-height:1.05}
.brand:hover{color:var(--topbar-fg)}
/* LOGO LOCKUP — the se. tile + the "sellevry" wordmark (markup: partials/logo-lockup).
   The wordmark is a mask painted with --logo-word-fill: the logo's blue → violet in
   light mode, the ink of the surface it sits on in dark mode (--topbar-fg on the
   topbar, the text colour on a card). No plate behind it. --logo-h is the tile's
   size; everything else follows it. */
.logo-lockup{--logo-h:36px;display:inline-flex;align-items:center;gap:calc(var(--logo-h) * .26);flex-shrink:0;line-height:0;color:var(--text-strong,var(--text))}
.logo-lockup .logo-mark{display:block;flex:none;width:var(--logo-h);height:var(--logo-h);border-radius:23.4%}
/* a split tile (logo-lockup { split: true }): its colour and its letters in two layers */
.logo-lockup .logo-tile{position:relative;flex:none;width:var(--logo-h);height:var(--logo-h)}
.logo-lockup .logo-bg{background:var(--logo-tile)}
.logo-lockup .logo-glyph{position:absolute;inset:0;display:block;width:100%;height:100%}
/* The wordmark is INLINED here (2026-10-16): as a file it sat outside the fingerprinted set
   (a CSS url() is never rewritten), so every page load re-asked the server for it — a 304 per
   visit and a wordmark that painted late. Inlined, it is kept with app.css for a year and a
   change to it changes the sheet, so nobody runs an old copy. Regenerate from
   public/sellevry-wordmark.svg (whitespace collapsed, %-escaped) when the wordmark changes. */
/* The wordmark's s and e ARE the tile's letters (sellevry-wordmark.svg), so its
   x-height is about half its box (246/480) and the box runs from the l's top to the
   y's tail. Height .80 → letters ~41% of the tile (owner, 2026-10-06: "a bit
   larger", twice, from .63). The letters' middle sits above the box's middle and
   the tile's letters sit a little low on the tile, so the box drops 4.8% to put the
   two sets of letters on one line (2.1% of its own height + 2.15% of the tile's). */
.logo-lockup .logo-word{display:block;flex:none;height:calc(var(--logo-h) * .80);aspect-ratio:1395/480;background:var(--logo-word-fill,currentColor);
  -webkit-mask:url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%221395%22%20height=%22480%22%20viewBox=%2283.74%2037%201394.96%20480%22%3E%3Cg%20transform=%22scale(1.06%201)%22%3E%3Cpath%20fill-rule=%22evenodd%22%20stroke=%22%23000%22%20stroke-width=%226%22%20stroke-linejoin=%22round%22%20d=%22M149.1%20387.3C142.5%20386.8%20137.1%20386%20132.8%20384.9C131.7%20384.6%20130.3%20384.3%20129.8%20384.2C129.2%20384.1%20128.1%20383.8%20127.4%20383.6C126.6%20383.4%20124.8%20382.8%20123.4%20382.4C112.8%20379.4%20108%20377.2%20100.9%20372.5C94.3%20368%2092.8%20366.5%2088.5%20360.2C80.5%20348.3%2081.8%20332.6%2091.6%20321.9C97.5%20315.5%20107.3%20312.6%20116.6%20314.5C121.1%20315.4%20127%20317.5%20132.2%20319.9C146.7%20326.7%20161.5%20327.5%20172%20321.9C182.5%20316.4%20186.4%20308.1%20182.3%20300.1C180.9%20297.3%20178.4%20295%20174.9%20293.4C173.2%20292.5%20165.5%20289.8%20162.3%20288.9C161.6%20288.7%20156.2%20286.9%20150.3%20284.9C144.4%20283%20138.2%20281%20136.6%20280.4C134.9%20279.9%20132.4%20279.1%20131.1%20278.6C129.8%20278.2%20128.3%20277.6%20127.8%20277.5C122.4%20275.8%20110.9%20269.8%20106%20266.1C102.9%20263.8%2097%20258%2094.4%20254.6C90.7%20249.9%2086.6%20241%2084.9%20233.9C83.9%20229.5%2083.2%20220.4%2083.5%20216.1C83.7%20214.5%2083.9%20212.1%2084%20210.7C84.2%20208.3%2084.9%20205.1%2086.2%20200.6C88.2%20193.8%2093.8%20183.3%2098.8%20177C102.8%20172%20108.8%20166.6%20114%20163.4C116%20162.2%20123.8%20157.9%20125.4%20157.1C130.9%20154.6%20137.2%20152.3%20141.8%20151.1C143.6%20150.6%20144.8%20150.4%20150.9%20149.1C156.3%20147.9%20165.8%20147.4%20172.2%20147.8C178%20148.2%20182.2%20148.6%20183.9%20149.1C184.8%20149.3%20185.9%20149.5%20186.5%20149.6C189.3%20150%20197.5%20152.3%20201%20153.7C207.2%20156.2%20214.5%20161.6%20217.5%20165.9C222.8%20173.6%20223.5%20184.5%20219.2%20193.4C214.8%20202.6%20203.4%20208.4%20192.9%20206.8C190.6%20206.4%20188.2%20205.8%20184.9%20204.7C181.3%20203.5%20175.6%20202.4%20171.4%20202.1C158.8%20201.1%20149.4%20204.3%20145.6%20210.8C141.8%20217.1%20144.6%20223.9%20152.4%20227.7C154.4%20228.7%20161.7%20231.1%20168.7%20233C172.1%20234%20175.6%20235.1%20176.8%20235.5C177.5%20235.7%20179.1%20236.2%20180.6%20236.6C182%20237%20183.8%20237.6%20184.5%20237.8C185.3%20238.1%20187%20238.7%20188.4%20239.1C200.5%20242.8%20205.2%20244.7%20210.6%20248.3C211.7%20249%20213.7%20250.3%20215%20251.1C217.6%20252.9%20220%20254.8%20223.9%20258.4C226.8%20261.1%20227.8%20261.7%20228.6%20261.4C229.5%20261%20229.8%20260.3%20230.2%20256.7C231.8%20244.4%20235.1%20231.1%20239.1%20220.5C240.9%20215.7%20249%20200.9%20252.3%20196.4C253.8%20194.3%20254.7%20193%20256.5%20190.1C258.6%20186.5%20264.1%20179.8%20268.4%20175.6C272.7%20171.3%20281.4%20164.4%20285.8%20162C287.3%20161.1%20289.8%20159.6%20291.4%20158.7C299.6%20153.7%20308.3%20150.4%20319.3%20148C330.6%20145.6%20344.1%20146%20355.5%20148.9C356.4%20149.1%20358%20149.5%20359%20149.7C367.1%20151.5%20373.5%20154.7%20382.6%20161.3C387.2%20164.6%20392.9%20170.5%20395.9%20175.1C403.2%20186.1%20407.1%20197.5%20408%20210.3C408.5%20218%20407%20229.4%20404.6%20236.2C402.7%20241.3%20397.7%20249.5%20393.9%20253.5C390.7%20257%20382.1%20263.9%20377.4%20266.8C371%20270.8%20357.3%20276.7%20342.3%20282.1C338.2%20283.5%20335.4%20284.5%20331.8%20285.9C329.6%20286.8%20324%20288.7%20321.4%20289.5C320.2%20289.8%20318.7%20290.3%20318.1%20290.5C313.9%20291.9%20306.5%20294%20303.3%20294.6C299.2%20295.4%20298.5%20295.7%20296.7%20297.2C293%20300.1%20292.2%20303.1%20294.1%20306.9C297.6%20313.8%20302%20318%20310.2%20322.4C315.4%20325.1%20320.8%20326.4%20327%20326.5C336%20326.5%20344.4%20324.3%20351.9%20319.7C357.7%20316.2%20363%20312.9%20364.3%20312C372.4%20306.5%20381.9%20304.9%20390%20307.5C401%20311%20406.9%20320.8%20405.9%20334C405.4%20340.6%20403.8%20344.7%20398.7%20352.4C394.5%20358.7%20386.3%20366.7%20378.6%20371.7C371%20376.7%20365.5%20379.5%20359%20381.5C357.5%20382%20356.1%20382.4%20356.1%20382.4C355.1%20383%20345.9%20385.3%20341.2%20386.1C334.6%20387.2%20323.4%20387.3%20317.4%20386.3C316.1%20386.1%20314.5%20385.8%20313.8%20385.6C311.7%20385.3%20307.3%20384%20301.2%20382.1C289.1%20378.2%20277.3%20371.1%20267.6%20361.8C260.6%20355.1%20257.4%20351.1%20251.7%20341.9C251.1%20340.8%20250%20339.1%20249.3%20338C248.7%20337%20247.2%20334.3%20246%20332C243.9%20327.9%20242.8%20326.1%20242.2%20325.9C241.9%20325.8%20240.7%20326.3%20240.7%20326.6C240.7%20326.7%20240.2%20327.2%20239.5%20327.7C237.9%20328.9%20236%20331.8%20230.7%20341.6C227.2%20348%20222.6%20354.6%20218.8%20358.6C215.6%20361.9%20208.8%20367.6%20204.3%20370.5C202.5%20371.7%20200.5%20373.1%20199.8%20373.6C191.1%20379.8%20176.5%20385.5%20165.7%20386.9C161.9%20387.4%20152.9%20387.6%20149.1%20387.3ZM293.7%20248.5C297.5%20246.6%20301.6%20244.7%20302.7%20244.3C303.9%20243.8%20306.5%20242.7%20308.5%20241.9C310.5%20241.1%20313.3%20239.9%20314.7%20239.4C316.2%20238.8%20318%20238.1%20318.7%20237.7C319.4%20237.4%20321.2%20236.7%20322.6%20236.1C342%20227.8%20343.4%20227%20346.5%20223.9C349.8%20220.6%20351%20215.8%20349.6%20211.7C346.8%20203.4%20336.3%20199.9%20323.3%20203.1C316.1%20204.9%20310.4%20208.3%20302.8%20215.4C294.1%20223.5%20286.4%20238.6%20284.8%20250.8C284.7%20251.5%20284.7%20251.7%20285.1%20252C285.7%20252.4%20285.7%20252.4%20293.7%20248.5ZM636.2%20256.7C637.8%20244.4%20641.1%20231.1%20645.1%20220.5C646.9%20215.7%20655%20200.9%20658.3%20196.4C659.8%20194.3%20660.7%20193%20662.5%20190.1C664.6%20186.5%20670.1%20179.8%20674.4%20175.6C678.7%20171.3%20687.4%20164.4%20691.8%20162C693.3%20161.1%20695.8%20159.6%20697.4%20158.7C705.6%20153.7%20714.3%20150.4%20725.3%20148C736.6%20145.6%20750.1%20146%20761.5%20148.9C762.4%20149.1%20764%20149.5%20765%20149.7C773.1%20151.5%20779.5%20154.7%20788.6%20161.3C793.2%20164.6%20798.9%20170.5%20801.9%20175.1C809.2%20186.1%20813.1%20197.5%20814%20210.3C814.5%20218%20813%20229.4%20810.6%20236.2C808.7%20241.3%20803.7%20249.5%20799.9%20253.5C796.7%20257%20788.1%20263.9%20783.4%20266.8C777%20270.8%20763.3%20276.7%20748.3%20282.1C744.2%20283.5%20741.4%20284.5%20737.8%20285.9C735.6%20286.8%20730%20288.7%20727.4%20289.5C726.2%20289.8%20724.7%20290.3%20724.1%20290.5C719.9%20291.9%20712.5%20294%20709.3%20294.6C705.2%20295.4%20704.5%20295.7%20702.7%20297.2C699%20300.1%20698.2%20303.1%20700.1%20306.9C703.6%20313.8%20708%20318%20716.2%20322.4C721.4%20325.1%20726.8%20326.4%20733%20326.5C742%20326.5%20750.4%20324.3%20757.9%20319.7C763.7%20316.2%20769%20312.9%20770.3%20312C778.4%20306.5%20787.9%20304.9%20796%20307.5C807%20311%20812.9%20320.8%20811.9%20334C811.4%20340.6%20809.8%20344.7%20804.7%20352.4C800.5%20358.7%20792.3%20366.7%20784.6%20371.7C777%20376.7%20771.5%20379.5%20765%20381.5C763.5%20382%20762.1%20382.4%20762.1%20382.4C761.1%20383%20751.9%20385.3%20747.2%20386.1C740.6%20387.2%20729.4%20387.3%20723.4%20386.3C722.1%20386.1%20720.5%20385.8%20719.8%20385.6C717.7%20385.3%20713.3%20384%20707.2%20382.1C695.1%20378.2%20683.3%20371.1%20673.6%20361.8C666.6%20355.1%20663.4%20351.1%20657.7%20341.9C650.7%20330.6%20633.6%20290%20636.2%20256.7ZM699.7%20248.5C703.5%20246.6%20707.6%20244.7%20708.7%20244.3C709.9%20243.8%20712.5%20242.7%20714.5%20241.9C716.5%20241.1%20719.3%20239.9%20720.7%20239.4C722.2%20238.8%20724%20238.1%20724.7%20237.7C725.4%20237.4%20727.2%20236.7%20728.6%20236.1C748%20227.8%20749.4%20227%20752.5%20223.9C755.8%20220.6%20757%20215.8%20755.6%20211.7C752.8%20203.4%20742.3%20199.9%20729.3%20203.1C722.1%20204.9%20716.4%20208.3%20708.8%20215.4C700.1%20223.5%20692.4%20238.6%20690.8%20250.8C690.7%20251.5%20690.7%20251.7%20691.1%20252C691.7%20252.4%20691.7%20252.4%20699.7%20248.5Z%22/%3E%3Cpath%20fill=%22none%22%20stroke=%22%23000%22%20stroke-width=%2268%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22%20d=%22M471%2071V356M573%2071V356M865%20178C872.44%20278%20902.2%20356%20927%20356C951.8%20356%20981.56%20278%20989%20178M1081%20178V356M1081%20273C1087%20208%201117%20178%201145%20180M1237%20178C1243.2%20278%201295.2346711599998%20348.02569600000004%201335.2%20348M1361%20178C1357.28%20308%201326.28%20386%201289.08%20460C1264.28%20492%201239.48%20490%201223%20456%22/%3E%3Ccircle%20cx=%221147%22%20cy=%22184%22%20r=%2238%22/%3E%3Ccircle%20cx=%221221%22%20cy=%22452%22%20r=%2238%22/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%221395%22%20height=%22480%22%20viewBox=%2283.74%2037%201394.96%20480%22%3E%3Cg%20transform=%22scale(1.06%201)%22%3E%3Cpath%20fill-rule=%22evenodd%22%20stroke=%22%23000%22%20stroke-width=%226%22%20stroke-linejoin=%22round%22%20d=%22M149.1%20387.3C142.5%20386.8%20137.1%20386%20132.8%20384.9C131.7%20384.6%20130.3%20384.3%20129.8%20384.2C129.2%20384.1%20128.1%20383.8%20127.4%20383.6C126.6%20383.4%20124.8%20382.8%20123.4%20382.4C112.8%20379.4%20108%20377.2%20100.9%20372.5C94.3%20368%2092.8%20366.5%2088.5%20360.2C80.5%20348.3%2081.8%20332.6%2091.6%20321.9C97.5%20315.5%20107.3%20312.6%20116.6%20314.5C121.1%20315.4%20127%20317.5%20132.2%20319.9C146.7%20326.7%20161.5%20327.5%20172%20321.9C182.5%20316.4%20186.4%20308.1%20182.3%20300.1C180.9%20297.3%20178.4%20295%20174.9%20293.4C173.2%20292.5%20165.5%20289.8%20162.3%20288.9C161.6%20288.7%20156.2%20286.9%20150.3%20284.9C144.4%20283%20138.2%20281%20136.6%20280.4C134.9%20279.9%20132.4%20279.1%20131.1%20278.6C129.8%20278.2%20128.3%20277.6%20127.8%20277.5C122.4%20275.8%20110.9%20269.8%20106%20266.1C102.9%20263.8%2097%20258%2094.4%20254.6C90.7%20249.9%2086.6%20241%2084.9%20233.9C83.9%20229.5%2083.2%20220.4%2083.5%20216.1C83.7%20214.5%2083.9%20212.1%2084%20210.7C84.2%20208.3%2084.9%20205.1%2086.2%20200.6C88.2%20193.8%2093.8%20183.3%2098.8%20177C102.8%20172%20108.8%20166.6%20114%20163.4C116%20162.2%20123.8%20157.9%20125.4%20157.1C130.9%20154.6%20137.2%20152.3%20141.8%20151.1C143.6%20150.6%20144.8%20150.4%20150.9%20149.1C156.3%20147.9%20165.8%20147.4%20172.2%20147.8C178%20148.2%20182.2%20148.6%20183.9%20149.1C184.8%20149.3%20185.9%20149.5%20186.5%20149.6C189.3%20150%20197.5%20152.3%20201%20153.7C207.2%20156.2%20214.5%20161.6%20217.5%20165.9C222.8%20173.6%20223.5%20184.5%20219.2%20193.4C214.8%20202.6%20203.4%20208.4%20192.9%20206.8C190.6%20206.4%20188.2%20205.8%20184.9%20204.7C181.3%20203.5%20175.6%20202.4%20171.4%20202.1C158.8%20201.1%20149.4%20204.3%20145.6%20210.8C141.8%20217.1%20144.6%20223.9%20152.4%20227.7C154.4%20228.7%20161.7%20231.1%20168.7%20233C172.1%20234%20175.6%20235.1%20176.8%20235.5C177.5%20235.7%20179.1%20236.2%20180.6%20236.6C182%20237%20183.8%20237.6%20184.5%20237.8C185.3%20238.1%20187%20238.7%20188.4%20239.1C200.5%20242.8%20205.2%20244.7%20210.6%20248.3C211.7%20249%20213.7%20250.3%20215%20251.1C217.6%20252.9%20220%20254.8%20223.9%20258.4C226.8%20261.1%20227.8%20261.7%20228.6%20261.4C229.5%20261%20229.8%20260.3%20230.2%20256.7C231.8%20244.4%20235.1%20231.1%20239.1%20220.5C240.9%20215.7%20249%20200.9%20252.3%20196.4C253.8%20194.3%20254.7%20193%20256.5%20190.1C258.6%20186.5%20264.1%20179.8%20268.4%20175.6C272.7%20171.3%20281.4%20164.4%20285.8%20162C287.3%20161.1%20289.8%20159.6%20291.4%20158.7C299.6%20153.7%20308.3%20150.4%20319.3%20148C330.6%20145.6%20344.1%20146%20355.5%20148.9C356.4%20149.1%20358%20149.5%20359%20149.7C367.1%20151.5%20373.5%20154.7%20382.6%20161.3C387.2%20164.6%20392.9%20170.5%20395.9%20175.1C403.2%20186.1%20407.1%20197.5%20408%20210.3C408.5%20218%20407%20229.4%20404.6%20236.2C402.7%20241.3%20397.7%20249.5%20393.9%20253.5C390.7%20257%20382.1%20263.9%20377.4%20266.8C371%20270.8%20357.3%20276.7%20342.3%20282.1C338.2%20283.5%20335.4%20284.5%20331.8%20285.9C329.6%20286.8%20324%20288.7%20321.4%20289.5C320.2%20289.8%20318.7%20290.3%20318.1%20290.5C313.9%20291.9%20306.5%20294%20303.3%20294.6C299.2%20295.4%20298.5%20295.7%20296.7%20297.2C293%20300.1%20292.2%20303.1%20294.1%20306.9C297.6%20313.8%20302%20318%20310.2%20322.4C315.4%20325.1%20320.8%20326.4%20327%20326.5C336%20326.5%20344.4%20324.3%20351.9%20319.7C357.7%20316.2%20363%20312.9%20364.3%20312C372.4%20306.5%20381.9%20304.9%20390%20307.5C401%20311%20406.9%20320.8%20405.9%20334C405.4%20340.6%20403.8%20344.7%20398.7%20352.4C394.5%20358.7%20386.3%20366.7%20378.6%20371.7C371%20376.7%20365.5%20379.5%20359%20381.5C357.5%20382%20356.1%20382.4%20356.1%20382.4C355.1%20383%20345.9%20385.3%20341.2%20386.1C334.6%20387.2%20323.4%20387.3%20317.4%20386.3C316.1%20386.1%20314.5%20385.8%20313.8%20385.6C311.7%20385.3%20307.3%20384%20301.2%20382.1C289.1%20378.2%20277.3%20371.1%20267.6%20361.8C260.6%20355.1%20257.4%20351.1%20251.7%20341.9C251.1%20340.8%20250%20339.1%20249.3%20338C248.7%20337%20247.2%20334.3%20246%20332C243.9%20327.9%20242.8%20326.1%20242.2%20325.9C241.9%20325.8%20240.7%20326.3%20240.7%20326.6C240.7%20326.7%20240.2%20327.2%20239.5%20327.7C237.9%20328.9%20236%20331.8%20230.7%20341.6C227.2%20348%20222.6%20354.6%20218.8%20358.6C215.6%20361.9%20208.8%20367.6%20204.3%20370.5C202.5%20371.7%20200.5%20373.1%20199.8%20373.6C191.1%20379.8%20176.5%20385.5%20165.7%20386.9C161.9%20387.4%20152.9%20387.6%20149.1%20387.3ZM293.7%20248.5C297.5%20246.6%20301.6%20244.7%20302.7%20244.3C303.9%20243.8%20306.5%20242.7%20308.5%20241.9C310.5%20241.1%20313.3%20239.9%20314.7%20239.4C316.2%20238.8%20318%20238.1%20318.7%20237.7C319.4%20237.4%20321.2%20236.7%20322.6%20236.1C342%20227.8%20343.4%20227%20346.5%20223.9C349.8%20220.6%20351%20215.8%20349.6%20211.7C346.8%20203.4%20336.3%20199.9%20323.3%20203.1C316.1%20204.9%20310.4%20208.3%20302.8%20215.4C294.1%20223.5%20286.4%20238.6%20284.8%20250.8C284.7%20251.5%20284.7%20251.7%20285.1%20252C285.7%20252.4%20285.7%20252.4%20293.7%20248.5ZM636.2%20256.7C637.8%20244.4%20641.1%20231.1%20645.1%20220.5C646.9%20215.7%20655%20200.9%20658.3%20196.4C659.8%20194.3%20660.7%20193%20662.5%20190.1C664.6%20186.5%20670.1%20179.8%20674.4%20175.6C678.7%20171.3%20687.4%20164.4%20691.8%20162C693.3%20161.1%20695.8%20159.6%20697.4%20158.7C705.6%20153.7%20714.3%20150.4%20725.3%20148C736.6%20145.6%20750.1%20146%20761.5%20148.9C762.4%20149.1%20764%20149.5%20765%20149.7C773.1%20151.5%20779.5%20154.7%20788.6%20161.3C793.2%20164.6%20798.9%20170.5%20801.9%20175.1C809.2%20186.1%20813.1%20197.5%20814%20210.3C814.5%20218%20813%20229.4%20810.6%20236.2C808.7%20241.3%20803.7%20249.5%20799.9%20253.5C796.7%20257%20788.1%20263.9%20783.4%20266.8C777%20270.8%20763.3%20276.7%20748.3%20282.1C744.2%20283.5%20741.4%20284.5%20737.8%20285.9C735.6%20286.8%20730%20288.7%20727.4%20289.5C726.2%20289.8%20724.7%20290.3%20724.1%20290.5C719.9%20291.9%20712.5%20294%20709.3%20294.6C705.2%20295.4%20704.5%20295.7%20702.7%20297.2C699%20300.1%20698.2%20303.1%20700.1%20306.9C703.6%20313.8%20708%20318%20716.2%20322.4C721.4%20325.1%20726.8%20326.4%20733%20326.5C742%20326.5%20750.4%20324.3%20757.9%20319.7C763.7%20316.2%20769%20312.9%20770.3%20312C778.4%20306.5%20787.9%20304.9%20796%20307.5C807%20311%20812.9%20320.8%20811.9%20334C811.4%20340.6%20809.8%20344.7%20804.7%20352.4C800.5%20358.7%20792.3%20366.7%20784.6%20371.7C777%20376.7%20771.5%20379.5%20765%20381.5C763.5%20382%20762.1%20382.4%20762.1%20382.4C761.1%20383%20751.9%20385.3%20747.2%20386.1C740.6%20387.2%20729.4%20387.3%20723.4%20386.3C722.1%20386.1%20720.5%20385.8%20719.8%20385.6C717.7%20385.3%20713.3%20384%20707.2%20382.1C695.1%20378.2%20683.3%20371.1%20673.6%20361.8C666.6%20355.1%20663.4%20351.1%20657.7%20341.9C650.7%20330.6%20633.6%20290%20636.2%20256.7ZM699.7%20248.5C703.5%20246.6%20707.6%20244.7%20708.7%20244.3C709.9%20243.8%20712.5%20242.7%20714.5%20241.9C716.5%20241.1%20719.3%20239.9%20720.7%20239.4C722.2%20238.8%20724%20238.1%20724.7%20237.7C725.4%20237.4%20727.2%20236.7%20728.6%20236.1C748%20227.8%20749.4%20227%20752.5%20223.9C755.8%20220.6%20757%20215.8%20755.6%20211.7C752.8%20203.4%20742.3%20199.9%20729.3%20203.1C722.1%20204.9%20716.4%20208.3%20708.8%20215.4C700.1%20223.5%20692.4%20238.6%20690.8%20250.8C690.7%20251.5%20690.7%20251.7%20691.1%20252C691.7%20252.4%20691.7%20252.4%20699.7%20248.5Z%22/%3E%3Cpath%20fill=%22none%22%20stroke=%22%23000%22%20stroke-width=%2268%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22%20d=%22M471%2071V356M573%2071V356M865%20178C872.44%20278%20902.2%20356%20927%20356C951.8%20356%20981.56%20278%20989%20178M1081%20178V356M1081%20273C1087%20208%201117%20178%201145%20180M1237%20178C1243.2%20278%201295.2346711599998%20348.02569600000004%201335.2%20348M1361%20178C1357.28%20308%201326.28%20386%201289.08%20460C1264.28%20492%201239.48%20490%201223%20456%22/%3E%3Ccircle%20cx=%221147%22%20cy=%22184%22%20r=%2238%22/%3E%3Ccircle%20cx=%221221%22%20cy=%22452%22%20r=%2238%22/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat;transform:translateY(4.8%)}
.logo-lockup.stacked{--logo-h:72px;flex-direction:column;gap:calc(var(--logo-h) * .16)}
.logo-lockup.stacked .logo-word{height:calc(var(--logo-h) * .55);transform:none}
/* the topbar: the tile (--topbar-logo of the --topbar-h bar), and the wordmark */
.brand .logo-lockup{--logo-h:var(--topbar-logo);color:var(--topbar-fg)}
/* …the tile centred over the sidebar rail (--rail-w), in line with its icons, instead of
   starting at the bar's 22px padding (which left it flush with the rail's right
   edge). The wordmark follows it at the lockup's own gap (owner, 2026-10-06:
   "remove the large space between the logo and the text"); a page title in the
   bar takes its place ("PAGE TITLE IN THE TOPBAR"). */
body.has-rail .brand .logo-lockup{margin-left:calc(var(--rail-inset) + (var(--rail-w) - var(--logo-h)) / 2 - 22px)}
/* a hairline in the bar's own ink keeps the tile's blue corner from melting into
   a dark topbar (none needed on the white light-mode bar) */
.brand .logo-lockup .logo-mark{box-shadow:0 0 0 1px var(--logo-ring)}
/* SALLY MARK — the assistant's mark: the owner's "Chat Bubble S" draft (2026-10-21), an S
   that leans like italics, its ends cut square or on the slant (pointed, not the wordmark's
   round ends), the lower-left end curling into a speech bubble's tail, two eyes in the
   bubble (public/sally-mark.svg is the master tile). The glyph alone
   (public/sally-glyph.svg) is INLINED here as a mask, like the wordmark, so it is cached
   with this sheet; regenerate it when the glyph changes. It is a brand mark, not an icon —
   Lucide stays the one icon set.
   .sally-glyph — the glyph in the colour of the text around it: the top-bar button, the
     rail entry, the "Sally" chip in a thread. 1em square unless a context sizes it.
   .sally-tile  — the se. tile's twin: the logo gradient with the glyph in white, where
     Sally itself speaks (the panel title, its answers in the chat, its dashboard tile).
     --sally-h sizes it. */
.sally-glyph{display:inline-block;flex:none;width:1em;height:1em;vertical-align:-.125em;background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22854%22%20height=%22854%22%20viewBox=%2247%2087%20854%20854%22%3E%3Cg%20fill=%22%23000%22%3E%3Cpath%20d=%22M152.4%20262.8L752.3%2088.8C770.3%2083.6%20785%2094.7%20785%20113.4L785%20163.4C785%20182.1%20770.3%20201.6%20752.3%20206.8L260.8%20349.4C231.8%20357.8%20208%20389.4%20208%20419.7L208%20603.7C208%20672.4%20262%20713%20328.1%20693.9L334.2%20692.1C337.4%20691.2%20337.5%20691.5%20334.5%20692.8L232.6%20736.7C217.4%20743.2%20196.8%20737.8%20186.7%20724.8L138.7%20662.3C111.9%20627.4%2090%20562.9%2090%20518.9L90%20345.9C90%20310.1%20118.1%20272.8%20152.4%20262.8Z%22/%3E%3Cpath%20d=%22M793.7%20768.8L204.7%20939.7C186.7%20944.9%20172%20933.8%20172%20915.1L172%20872.1C172%20853.4%20186.7%20833.9%20204.7%20828.7L710.2%20682C739.2%20673.6%20763%20642%20763%20611.7L763%20410.7C763%20399.7%20771.2%20394.4%20781.3%20398.8L804.1%20408.8C834.3%20422.1%20859%20460%20859%20493L859%20681.9C859%20719.3%20829.6%20758.4%20793.7%20768.8Z%22/%3E%3Cellipse%20cx=%22410%22%20cy=%22495%22%20rx=%2247%22%20ry=%2258%22/%3E%3Cellipse%20cx=%22565%22%20cy=%22495%22%20rx=%2247%22%20ry=%2258%22/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22854%22%20height=%22854%22%20viewBox=%2247%2087%20854%20854%22%3E%3Cg%20fill=%22%23000%22%3E%3Cpath%20d=%22M152.4%20262.8L752.3%2088.8C770.3%2083.6%20785%2094.7%20785%20113.4L785%20163.4C785%20182.1%20770.3%20201.6%20752.3%20206.8L260.8%20349.4C231.8%20357.8%20208%20389.4%20208%20419.7L208%20603.7C208%20672.4%20262%20713%20328.1%20693.9L334.2%20692.1C337.4%20691.2%20337.5%20691.5%20334.5%20692.8L232.6%20736.7C217.4%20743.2%20196.8%20737.8%20186.7%20724.8L138.7%20662.3C111.9%20627.4%2090%20562.9%2090%20518.9L90%20345.9C90%20310.1%20118.1%20272.8%20152.4%20262.8Z%22/%3E%3Cpath%20d=%22M793.7%20768.8L204.7%20939.7C186.7%20944.9%20172%20933.8%20172%20915.1L172%20872.1C172%20853.4%20186.7%20833.9%20204.7%20828.7L710.2%20682C739.2%20673.6%20763%20642%20763%20611.7L763%20410.7C763%20399.7%20771.2%20394.4%20781.3%20398.8L804.1%20408.8C834.3%20422.1%20859%20460%20859%20493L859%20681.9C859%20719.3%20829.6%20758.4%20793.7%20768.8Z%22/%3E%3Cellipse%20cx=%22410%22%20cy=%22495%22%20rx=%2247%22%20ry=%2258%22/%3E%3Cellipse%20cx=%22565%22%20cy=%22495%22%20rx=%2247%22%20ry=%2258%22/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat}
.sally-tile{--sally-h:28px;display:inline-grid;place-items:center;flex:none;width:var(--sally-h);height:var(--sally-h);border-radius:23.4%;background:var(--logo-tile);color:var(--logo-tile-ink)}
/* the glyph where the tile file puts it: 37% of its 854-unit box (61.7% of the tile),
   a hair right of and 3.6/512 below the middle */
.sally-tile>.sally-glyph{width:61.7%;height:61.7%;translate:.5% 1.1%}
/* Beside Lucide icons (the top bar, the rail, the sidebar editor) the glyph takes their box
   and fills it: drawn any smaller it read smaller than the bell beside it (owner, 2026-10-21) */
.iconbtn .sally-glyph{width:18px;height:18px}
/* a rail entry's labels are spans that only show when the rail opens; the glyph is a span too, and always shows */
.navlink .sally-glyph{width:20px;height:20px;opacity:1}
/* an icon box in the dashboard's "Add a widget" list is Sally's tile */
.tiles-add-item .ic.sally-tile{background:var(--logo-tile);color:var(--logo-tile-ink)}
/* Tenant company logo (uploaded via Settings → Company Profile), shown on
   CUSTOMER-facing brand bars/letterheads + the admin preview. The plate keeps an
   arbitrary (often transparent-PNG) logo legible on any surface. */
.co-logo-plate{display:inline-flex;align-items:center;justify-content:center;background:var(--logo-plate);border:1px solid var(--border);border-radius:var(--r-8, 8px);padding:4px 8px}
.co-logo{height:28px;max-width:180px;width:auto;object-fit:contain;display:block}
.brand .mark{
  width:32px;height:32px;border-radius:var(--r-8, 9px);display:grid;place-items:center;
  background:var(--topbar-hover);color:var(--topbar-fg);
}
.brand .mark svg,.brand .mark i[data-lucide]{width:19px;height:19px}
/* The bar's small tag (the console's "Console") in the phone's own monospace — a
   downloaded font arrived after the first frame and the tag jumped to its width
   on every reload (owner, 2026-10-09: "the console label resizes when I pull
   down to refresh"). src/ui/topbar-font.browser.test.js */
.brand small{font-weight:500;color:var(--topbar-muted);font-size:var(--fs-11, 11px);font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.02em}
/* The search box is a glass pill on the RIGHT, beside the icon capsule, that widens
   while you type in it (owner, 2026-10-22, the mock: "search on the right"; 300px
   rather than the mock's 280 so the whole placeholder shows). The title in the bar
   gets the room on its left (x-topbar measures where it starts). */
.search{
  flex:0 1 300px;min-width:0;margin-left:auto;position:relative;
  transition:flex-basis var(--dur) var(--ease);
}
.search:focus-within{flex-basis:360px}
/* 8px from the capsule (a phone hides the box and keeps the icons pushed right) */
@media (min-width:769px){.topbar .search + .tb-actions{margin-left:-10px}}
.search input{
  display:block;width:100%;height:36px;border-radius:var(--r-full, 999px);border:1px solid var(--glass-line);
  background:var(--glass-bg);box-shadow:var(--glass-shadow);color:var(--topbar-fg);padding:0 14px 0 36px;font-size:var(--fs-13, 13px);outline:none;
  transition:var(--dur-fast) var(--ease);font-family:inherit;
}
.search input::placeholder{color:var(--topbar-muted);opacity:1}
.search input:focus{border-color:var(--topbar-field-border);box-shadow:0 0 0 3px var(--topbar-field-ring);background:var(--topbar-field-focus)}
.search .si{position:absolute;left:13px;top:50%;transform:translateY(-50%);color:var(--topbar-muted);width:16px;height:16px}
.search .search-clear{
  position:absolute;right:8px;top:50%;transform:translateY(-50%);
  width:24px;height:24px;border:none;border-radius:var(--r-6, 6px);cursor:pointer;
  display:grid;place-items:center;background:transparent;
  color:var(--topbar-muted);transition:var(--dur-fast) var(--ease);
}
.search .search-clear:hover{background:var(--topbar-hover);color:var(--topbar-fg)}
.search .search-clear svg,.search .search-clear i[data-lucide]{width:15px;height:15px}
/* global typeahead results overlay (x-topbar.ejs) — wider than the field, grouped */
.search-results{position:absolute;top:calc(100% + 8px);left:50%;transform:translateX(-50%);width:min(640px,92vw);background:var(--surface);border:1px solid var(--border);border-radius:var(--r-16, 14px);box-shadow:var(--shadow-lg);padding:7px;z-index:60;max-height:min(72vh,520px);overflow-y:auto}
.search-results .sr-group{font-size:var(--fs-11, 10.5px);font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);padding:10px 11px 4px}
.search-results .sr-group:first-child{padding-top:4px}
.search-results .sr-row{display:flex;align-items:center;gap:11px;padding:8px 11px;border-radius:var(--r-8, 9px);color:var(--text);text-decoration:none}
.search-results .sr-row:hover,.search-results .sr-row.active{background:var(--surface-2)}
.search-results .sr-thumb{flex-shrink:0;width:34px;height:34px;border-radius:var(--r-8, 7px);object-fit:cover;background:var(--surface-2);border:1px solid var(--border)}
.search-results .sr-icon{flex-shrink:0;width:34px;height:34px;border-radius:var(--r-8, 7px);display:flex;align-items:center;justify-content:center;background:var(--surface-2);border:1px solid var(--border);color:var(--text-muted)}
.search-results .sr-place .sr-sub{font-family:inherit}
.search-results .sr-icon svg,.search-results .sr-icon i[data-lucide]{width:16px;height:16px}
.search-results .sr-main{display:flex;flex-direction:column;gap:1px;min-width:0;flex:1}
.search-results .sr-label{font-size:var(--fs-14, 13.5px);font-weight:500;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.search-results .sr-sub{font-size:var(--fs-12, 11.5px);color:var(--muted);font-family:var(--font-mono);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.search-results .sr-pill{flex-shrink:0;font-size:var(--fs-11, 10px);font-weight:700;text-transform:uppercase;letter-spacing:.03em;padding:3px 9px;border-radius:var(--r-16, 20px);background:var(--amber-bg);color:var(--amber-text)}
.search-results .sr-empty{padding:18px;text-align:center;color:var(--muted);font-size:var(--fs-13, 13px)}
/* In-page typeahead (App.typeahead, /js/typeahead.js): the same overlay, but
   anchored to the LEFT edge of its field instead of centred under the topbar. */
.ta-host{position:relative}
.search-results.sr-anchor{left:0;transform:none;top:calc(100% + 6px);width:min(520px,90vw);min-width:100%;max-height:min(60vh,400px)}
/* full-page search results (GET /search) — reuse the overlay's grouped rows
   without the floating-overlay chrome, so the page and typeahead stay identical */
.search-results.sr-page{position:static;transform:none;width:100%;max-width:none;max-height:none;overflow:visible;box-shadow:none;padding:0;background:transparent;border:none;z-index:auto}
.search-results.sr-page .sr-group{padding:16px 2px 8px;font-size:var(--fs-11, 11px)}
.search-results.sr-page .sr-group:first-child{padding-top:2px}
.search-results.sr-page .sr-row{padding:11px 12px;border:1px solid var(--border);border-radius:var(--r-12, 10px);margin-bottom:8px;background:var(--surface)}
.search-results.sr-page .sr-label{font-size:var(--fs-14, 14px)}
.search-results.sr-page .sr-thumb{width:44px;height:44px;cursor:pointer}
/* In-card picker (`sr-page` + `sr-scroll`): an in-page results list that must NOT
   grow its card — bounded height with its own scroller, so a full page of hits
   doesn't push the rest of the composer off-screen. The full-page /search listing
   keeps plain `sr-page` and stays unbounded. */
.search-results.sr-page.sr-scroll{max-height:min(46vh,340px);overflow-y:auto;overscroll-behavior:contain;padding-right:4px}
/* the global thumb rings itself with --bg; inside a card it sits on --surface */
.search-results.sr-page.sr-scroll::-webkit-scrollbar-thumb{border-color:var(--surface)}
/* ── SEARCHABLE SELECT (App.searchableSelect, /js/searchable-select.js) ──────
   A <select data-searchable>: the select keeps the value, out of sight; a text box
   (.ss-input, the same .input, with the ONE DROPDOWN ARROW) stands in its place and
   opens the options in the results list above, filtered as you type. The list is
   placed by the script (fixed, under or over the box) and hangs off a dialog's
   backdrop or <body>, so a dialog's scrolling body never cuts it off; it rides the
   OPENING / CLOSING motion with every .search-results. The row the value is on is
   in the accent (what is selected), the row the keys are on the hover tint. */
.ss{display:block;position:relative;min-width:0}
.ss>select{display:none}
.ss-input{width:100%;cursor:pointer;text-overflow:ellipsis}
.ss-input:focus{cursor:text}
.search-results.ss-list{position:fixed;transform:none;z-index:9100;min-width:0;padding:5px;overscroll-behavior:contain}
.search-results.ss-list .sr-row{padding:7px 10px}
.search-results.ss-list .sr-label{font-size:var(--fs-14, 13.5px)}
.search-results.ss-list .sr-row[aria-selected="true"] .sr-label{font-weight:600;color:var(--accent)}
.search-results.ss-list .ss-sub{flex-shrink:0;font-family:var(--font-mono);font-size:var(--fs-12, 12px);color:var(--muted)}
/* A picker row you SELECT rather than follow (the Link-to-product window,
   /js/order-line-fix.js): the same row as a <button>, the picked one ringed in the
   accent, and a status .pill at its end that never squeezes. */
.search-results button.sr-row{width:100%;font:inherit;text-align:left;cursor:pointer;border:0;background:transparent;-webkit-appearance:none;appearance:none}
.search-results.sr-page .sr-row[aria-selected="true"]{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-soft)}
.search-results .sr-row>.pill{flex-shrink:0}

/* ── Image picker (`.imgpick`) — a strip of selectable photo thumbnails ──────
   Shared chrome for "which of this item's photos go in the post". Modelled on
   the product page's thumbstrip, but in canonical tokens: unpicked tiles dim
   back, picked tiles carry the accent ring, a check, and their 1-based ORDER
   (the number is the sequence the photos are sent in, which is what a carousel
   shows). Tile is a <button> so it's keyboard-reachable. */
.imgpick{display:flex;flex-wrap:wrap;gap:8px;margin:2px 0 10px}
.imgpick-tile{position:relative;flex:0 0 auto;width:60px;height:60px;padding:0;border-radius:var(--r-8, 9px);overflow:hidden;
  border:1px solid var(--border);background:var(--surface-2);cursor:pointer;opacity:.4;
  transition:opacity var(--dur-fast) var(--ease),border-color var(--dur-fast) var(--ease),box-shadow var(--dur-fast) var(--ease)}
.imgpick-tile img{width:100%;height:100%;object-fit:cover;display:block}
.imgpick-tile:hover{opacity:.75;border-color:var(--border-strong)}
.imgpick-tile:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.imgpick-tile.is-on{opacity:1;border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-soft)}
.imgpick-tile.is-on:hover{opacity:1}
.imgpick-badge{position:absolute;top:3px;right:3px;width:19px;height:19px;border-radius:50%;display:none;
  place-items:center;background:var(--accent);color:var(--on-brand);font-size:var(--fs-11, 10.5px);font-weight:700;line-height:1}
.imgpick-tile.is-on .imgpick-badge{display:grid}
.imgpick-badge svg,.imgpick-badge i[data-lucide]{width:11px;height:11px}
/* Over-cap tiles stay pickable but flag that the platform will drop them. */
.imgpick-tile.is-over .imgpick-badge{background:var(--pill-amber-bg);color:var(--pill-amber-text);box-shadow:inset 0 0 0 1px var(--pill-amber-border)}
.imgpick-empty{font-size:var(--fs-12, 12.5px);color:var(--muted)}
/* Drag-to-reorder (SortableJS). The strip's left-to-right order IS the post
   order, so the tiles advertise that they move. */
.imgpick.is-draggable .imgpick-tile{cursor:grab}
.imgpick.is-draggable .imgpick-tile:active{cursor:grabbing}
.imgpick-tile.sortable-chosen{cursor:grabbing}
.imgpick-tile.sortable-ghost{opacity:.25;border-style:dashed;border-color:var(--accent)}
.imgpick-tile.sortable-ghost img{visibility:hidden}
.imgpick-tile img{pointer-events:none;-webkit-user-drag:none;user-select:none}
/* page dim behind the search overlay (matches the copilot backdrop), below the
   fixed topbar so the search box + overlay stay bright */
.search-scrim{position:fixed;top:var(--topbar-h);left:0;right:0;bottom:0;background:rgba(16,42,94,.18);opacity:0;pointer-events:none;transition:opacity var(--dur) var(--ease);z-index:45}
.search-scrim.open{opacity:1;pointer-events:auto}
.tb-actions{display:flex;align-items:center;gap:6px;margin-left:auto}
.iconbtn{
  width:38px;height:38px;border-radius:var(--r-12, 10px);border:1px solid transparent;background:transparent;
  color:color-mix(in srgb,var(--topbar-fg) 85%,transparent);display:grid;place-items:center;cursor:pointer;transition:var(--dur-fast) var(--ease);position:relative;
}
.iconbtn:hover,.iconbtn.is-active{background:var(--topbar-hover);color:var(--topbar-fg)}
.iconbtn svg,.iconbtn i[data-lucide]{width:18px;height:18px}
.iconbtn .dot{position:absolute;top:8px;right:9px;width:7px;height:7px;border-radius:50%;background:var(--sidebar-indicator);border:2px solid var(--topbar-bg)}
/* THE BACK BUTTON — the top bar carries the app's one Back (2026-10-09, owner:
   "a permanent back button to the top left of the left most icon … then we can
   remove the back button on the individual pages"). It is the first item of
   .tb-actions, so it sits left of whatever that bar shows next: the magnifier on
   a phone, the presence count for an admin, the avatar. Server-rendered, so it
   is there from the first frame on every page, in a browser tab and in the
   installed app alike (it began as the installed app's Back, 2026-10-07, when a
   browser tab hid it — the owner saw it on the phone, not on the iPad). It greys
   out when there is nothing to go back to (public/js/app-install.js). A page
   head never carries a Back of its own (src/ui/topbar-back.test.js).
   The avatar menu's "Install app" shows only where the browser can install. */
.app-back{display:grid}
.app-back:disabled{opacity:.35;cursor:default;background:transparent}
.user-menu-item[hidden]{display:none}
/* PULL TO REFRESH — the installed app on a touch phone/tablet (/js/pull-refresh.js,
   2026-10-08, owner: "a space will appear and the rest of the page moves
   downwards and in this space there is then the loading circle"). While a pull
   is under way the page's flow (.ptr-move: the content, the
   footer) slides down by --ptr-y, opening a gap under the fixed top bar; the
   round arrow sits in the middle of that gap, turning (--ptr-turn) and filling
   in (--ptr-fill) as it opens, accent once far enough; let go and it spins
   while the page reloads. Composited only (translate/rotate/opacity); the
   finger drives it directly (.ptr-dragging, on the elements: no transition), the slide back uses
   --dur. */
/* the bounce stays on an iPhone (html.ptr-native): it IS the pull there, and
   without it every scroll felt stiff (owner, 2026-10-08: "doesn't feel fluid") */
html.app-standalone:not(.ptr-native),html.app-standalone:not(.ptr-native) body{overscroll-behavior-y:none}
/* EDGE SWIPE — a thin strip on the screen's left edge in the installed app, on a
   phone, that claims a swipe for the menu before the iPhone's own Back gesture
   does (/js/drawer-swipe.js). Under the top bar and every dialog, but OVER the
   page's own chrome (2026-10-09, owner: in the app "I still end up on the previous
   page", while the console was fine): a sticky bar or header a page puts at the
   left edge with its own z-index (the product page's, z 40) sat over the strip
   (z 38) and took the touch, so the phone went Back. As wide as the phone's own
   edge zone; a tap on it is handed to what is under it (drawer-swipe.js). Gone
   while the drawer is open: its entries start at that edge. */
.edge-swipe{display:none}
@media (max-width:768px) and (pointer:coarse){
  html.app-standalone .edge-swipe{display:block;position:fixed;left:0;top:var(--topbar-h);bottom:0;width:24px;z-index:8000;touch-action:none}
  html.app-standalone body.nav-open .edge-swipe{display:none}
}
.ptr-move{transition:translate var(--dur) var(--ease)}   /* the translate itself is set on each moved element */
/* the installed app's top bar on its own layer: an iPhone dropped the fixed bar
   from frames while the page under it bounced (owner, 2026-10-08) */
html.app-standalone .topbar{transform:translateZ(0)}
.ptr{position:fixed;top:40px;left:50%;z-index:49;width:40px;height:40px;margin-left:-20px;border-radius:50%;
  display:grid;place-items:center;background:var(--surface);color:var(--text-muted);box-shadow:var(--shadow-lg);
  border:1px solid var(--border-light);pointer-events:none;opacity:var(--ptr-fill,0);
  translate:0 calc(var(--ptr-y,0px) / 2);transition:translate var(--dur) var(--ease),opacity var(--dur) var(--ease)}
.ptr-move.ptr-dragging,.ptr.ptr-dragging{transition:none}   /* on the elements themselves: a class on <html> restyles the page mid-bounce */
.ptr svg,.ptr i[data-lucide]{width:20px;height:20px;rotate:var(--ptr-turn,0deg)}
.ptr.ptr-ready{color:var(--accent)}
.ptr.ptr-loading{opacity:1;color:var(--accent)}
.ptr.ptr-loading svg,.ptr.ptr-loading i[data-lucide]{opacity:0}
.ptr.ptr-loading::after{content:"";position:absolute;inset:9px;border:2.5px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite}
/* "Who's online" — the count rides the icon as a corner badge, in the same spot
   as the CoPilot bell's .header-bell-count but a size down (14px/9px vs 17px/10px):
   a headcount is ambient, the bell's count is a to-do.
   GREEN, not the bell's red: this is presence,
   not an alert. The colour pair is --presence-bg/--presence-text (theme.css),
   picked against --topbar-bg rather than a page surface (white in light, navy
   in dark), and checked by src/ui/ink-palette.browser.test.js.
   Defined here rather than reused from copilot-widget.css because that sheet is
   lazily loaded and absent on 14 pages, while the topbar renders on all of them.
   Sits on .iconbtn, which is already position:relative.
   Its LEFT edge is pinned (where a one-digit badge starts), so a second digit
   grows OUTWARD, away from the icon: pinned on the right it grew left over the
   person's head and the icon read as a bare arc (owner, 2026-10-23, at 10 online;
   src/ui/presence-count.browser.test.js). The part past the button's edge lies
   over the next button's empty corner, so it stays on top of it and takes no click. */
.presence-count{
  position:absolute;top:-2px;left:calc(100% - 14px);z-index:1;pointer-events:none;
  min-width:16px;height:16px;padding:0 4px;box-sizing:border-box;
  border-radius:var(--r-full, 999px);background:var(--presence-bg);color:var(--presence-text);
  font-size:var(--fs-11, 10.5px);font-weight:700;font-variant-numeric:tabular-nums;line-height:16px;text-align:center;
}
.presence-count.hidden{display:none}
/* A to-do count on a topbar icon — the Support headset's unread Sellevry replies.
   Same corner, size and red as the bell's .header-bell-count beside it, but
   defined here because copilot-widget.css (where the bell's lives) is lazily
   loaded and absent on some pages. Server-rendered, `hidden` at zero, and
   /js/nav-badges.js only flips that attribute — so `[hidden]` must win over the
   display below. */
.iconbtn-count{
  position:absolute;top:-3px;right:-3px;min-width:17px;height:17px;padding:0 4px;box-sizing:border-box;
  border-radius:var(--r-full, 999px);background:var(--danger);color:var(--on-brand);box-shadow:0 0 0 2px var(--topbar-bg);
  font-size:var(--fs-11, 10px);font-weight:700;font-variant-numeric:tabular-nums;line-height:17px;text-align:center;
}
.iconbtn-count[hidden]{display:none}
/* …and the names behind it. Same chrome as the avatar's .user-menu-dropdown a
   few pixels to the right (surface, 1.25px border, 8px radius) so the two panels
   hanging off this bar read as one family — just smaller, because this is a
   hover tooltip and not a menu. Hangs BELOW the icon (owner, 2026-10-09: not
   beside it), its right edge flush with the button's, so it opens inward from
   the right-hand action cluster and can never run past the viewport edge.
   Same in the console's bar (shell-top uses these classes). Revealed on hover AND
   focus-within, so it is reachable from the keyboard; visibility (not display)
   keeps it fade-able and out of the a11y tree while hidden. */
.presence{position:relative;display:inline-flex}
.presence-pop{
  position:absolute;right:0;top:calc(100% + 8px);min-width:150px;max-width:250px;z-index:1000;
  background:var(--surface);border:1.25px solid var(--border);border-radius:var(--r-8, 8px);box-shadow:var(--shadow-lg);
  padding:8px 10px;color:var(--text);font-size:var(--fs-12, 12.5px);line-height:1.5;text-align:left;
  opacity:0;visibility:hidden;transform:translateY(-4px);pointer-events:none;
  transition:opacity var(--dur-fast) var(--ease),transform var(--dur-fast) var(--ease),visibility var(--dur-fast) var(--ease);
}
/* Once open the panel TAKES the pointer: a long list scrolls (.presence-pop-list
   max-height), and with pointer-events:none the wheel/scrollbar was dead and the
   hover dropped the moment the pointer left the icon. The ::after bridges the 8px
   gap up to the icon, so moving down keeps .presence:hover alive; it spans the
   panel's full width, which is always at least the button's. Hidden, the panel
   stays pointer-events:none so it never catches a hover it didn't earn. */
.presence-pop::after{content:"";position:absolute;left:-1.25px;right:-1.25px;bottom:100%;height:10px}
.presence:hover .presence-pop,.presence:focus-within .presence-pop{opacity:1;visibility:visible;transform:none;pointer-events:auto}
.presence-pop-head{font-size:var(--fs-11, 10.5px);font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--text-muted);margin-bottom:3px}
.presence-pop-list{list-style:none;margin:0;padding:0;max-height:220px;overflow-y:auto}
.presence-pop-list li{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:1px 0}
.avatar{
  width:34px;height:34px;border-radius:50%;display:grid;place-items:center;font-weight:600;font-size:var(--fs-12, 12.5px);
  font-family:var(--font-display);color:var(--mono-fg);background:var(--mono-bg);cursor:pointer;margin-left:6px;
}

/* ============================ SIDEBAR ============================ */
.sidebar{
  position:fixed;top:var(--topbar-h);bottom:0;left:0;width:var(--rail-w);z-index:40;
  background:var(--sidebar-bg);border-right:1px solid var(--sidebar-border);
  padding:12px 0;overflow:hidden;
  display:flex;flex-direction:column;
}
/* .rail-open = the rail was open when the operator clicked a link in it: the new
   page starts with it open (x-sidebar's inline script) instead of snapping shut
   under a pointer that hasn't moved — a fresh page has no :hover until the
   mouse moves. The first pointer move hands back to :hover. */
.sidebar:is(:hover,.rail-open,.is-editing,.rail-focus){box-shadow:var(--shadow-lg)}
/* The rail SLIDES open (2026-10-08, owner: "the sidebar animations are still
   laggy"). It used to animate its width, which the browser works out on the
   page's own thread every frame — and right after a page change that thread is
   busy building the page, so the close stuttered. Now the rail is always 248px
   wide and slides all but --rail-w of it out of view to the left; its entries
   slide the same distance the other way, at the same speed, so they stay put
   while the rail's edge moves. Only translate and opacity animate, which the
   browser runs off the page's thread. Closed, each entry is cut to a pill 10px
   in from either edge of the rail (36px on the 56px rail).
   Desktop only: on a phone the rail is the drawer (mobile.css A), and the
   individual `translate` never touches the drawer's `transform`.
   Tested by src/ui/motion.browser.test.js. */
/* FLOATING (the new layout — owner, 2026-10-21; as in the mock, 2026-10-22: "the
   sidebar looks different than in your mocks and not aligned in the center"): the
   rail is a rounded panel --rail-inset in from the window's top, left and bottom
   edges, over the top bar's left end, with the logo in its head (the top bar shows
   none on a computer). Its navy is a ::before panel that slides the same distance
   as the entries, so the panel's left edge stays put at --rail-inset while the
   rail's own (rounded, overflow:hidden) box carries its right edge out — still
   translate only. Folded, every icon and the logo tile sit centred in the strip
   (25.5px in: the nav's 6px + an entry's 11px + half a 17px icon), each entry a
   40px pill centred in it (6px each side) with no coloured edge, and a section's
   name a short hairline. The page starts --rail-inset + --rail-gap further in
   (76px, LAYOUT .main), a pinned rail's page --rail-inset beyond it (240px), as in
   the mock (owner, 2026-10-22: "the width is not the same"). */
@media (min-width:769px){
  /* The rail's box starts at the window's edge and is --rail-inset wider than the panel,
     which it draws --rail-inset in (::before; the entries sit in by its padding). The gap
     between the window's edge and the panel is part of the rail in BOTH states (::after,
     moving with the panel): resting there opens it and it stays open (owner, 2026-10-22:
     "when i hover over the gap … also the sidebar opens"). Nothing else of the box takes
     the pointer: folded, its empty part reached past the gap, and a pointer there opened
     the rail, which slid away from under it, shut, slid back and opened again ("it
     twitches"). */
  .sidebar{width:calc(var(--rail-open) + var(--rail-inset));translate:calc(var(--rail-w) - var(--rail-open)) 0;transition:translate var(--dur) var(--ease-in-out);
    top:var(--rail-inset);bottom:var(--rail-inset);left:0;z-index:55;padding:0 0 6px var(--rail-inset);border-radius:var(--rail-radius);background:none;border:0;
    pointer-events:none;overflow:clip;
    /* on the glass, HERE and not on :root: the table headers read --sidebar-fg and a phone's drawer stays solid navy */
    --sidebar-fg:var(--rail-glass-fg);--sidebar-border:var(--rail-glass-rim);--sidebar-hover:var(--rail-glass-hover)}
  .sidebar::before,.sidebar::after,.sidebar > *{pointer-events:auto}
  /* THE KEYBOARD (the Apple design review, 2026-10-23: tabbing into the folded rail blanked
     it). Keyboard focus in the rail opens it exactly as a hover does — .rail-focus (set by
     partials/rail-open while the focus in the rail is :focus-visible; a mouse click never
     sets it) sits in every open / folded selector of this block. Never :has(:focus-visible)
     there: inside these :not() lists it stopped Safari re-checking :hover for the entries,
     so in the open rail some stayed cut to their pill and the section names stayed lines
     (2026-11-13; rail-hover-safari.browser.test.js). The box CLIPS, never scrolls (overflow:clip): the folded rail's pin
     taking the focus scrolled the old overflow:hidden box 172px sideways, and the logo and
     every icon left the strip. An entry's ring is drawn inside its pill, which a folded
     rail cuts to 40px. */
  .sidebar .navlink:focus-visible{outline:2px solid var(--sidebar-strong);outline-offset:-2px}
  /* THE GLASS (owner, 2026-11-01, from a reel of a "glassy sidebar": "looks good, build it").
     The panel is smoked navy glass: the page shows through it, blurred, under a thin bright rim.
     The text on it stays at 4.5:1 with a white page behind it (rail-glass.browser.test.js reads
     the pixels), which is why the tint is this dense and the blur also darkens. It lives on this
     ::before, so nothing about how the rail slides changed. A computer only: a phone has no blur. */
  .sidebar::before{content:"";position:absolute;top:0;right:0;bottom:0;left:var(--rail-inset);z-index:-1;border-radius:var(--rail-radius);background:var(--rail-glass);
    -webkit-backdrop-filter:var(--rail-glass-filter);backdrop-filter:var(--rail-glass-filter);
    box-shadow:inset 0 0 0 1px var(--sidebar-border),inset 0 1px 0 var(--rail-glass-rim-top),inset 0 20px 30px -24px var(--rail-glass-sheen);
    translate:calc(var(--rail-open) - var(--rail-w)) 0;transition:translate var(--dur) var(--ease-in-out)}
  /* The panel's frame (--sidebar-border, visible in dark mode) is drawn on ::before, whose
     right edge lies past the folded strip — the box cuts it off there, so the strip had a
     frame on three sides only (owner, 2026-10-22: "only a grey border on the left, top and
     bottom but not on the right side"). .rail-edge draws the right side where the box ends:
     it moves with the box, so folded it is the strip's edge and open it lies on ::before's. */
  .sidebar > .rail-edge{display:block;position:absolute;top:0;right:0;bottom:0;width:24px;box-sizing:border-box;
    border:1px solid var(--sidebar-border);border-left:0;border-radius:0 var(--rail-radius) var(--rail-radius) 0;pointer-events:none}
  .sidebar::after{content:"";position:absolute;top:0;bottom:0;left:0;width:var(--rail-inset);
    translate:calc(var(--rail-open) - var(--rail-w)) 0;transition:translate var(--dur) var(--ease-in-out)}
  .sidebar > :is(.rail-head,.nav){translate:calc(var(--rail-open) - var(--rail-w)) 0;transition:translate var(--dur) var(--ease-in-out)}
  .sidebar:is(:hover,.rail-open,.is-pinned,.is-editing,.rail-focus),.sidebar:is(:hover,.rail-open,.is-pinned,.is-editing,.rail-focus)::before,.sidebar:is(:hover,.rail-open,.is-pinned,.is-editing,.rail-focus)::after,.sidebar:is(:hover,.rail-open,.is-pinned,.is-editing,.rail-focus) > :is(.rail-head,.nav){translate:none}
  .sidebar .nav{padding:0 6px}
  /* 28px entries, the first section right under the logo (owner, 2026-10-22: the space
     between the logo and the first section and between the entries was "still huge" — an
     admin's full rail ran past a laptop's window) */
  /* 28px to the eye and in the layout, 30px to the pointer: the entries stand 2px apart, and a pointer
     resting in that gap was on no entry, so the lens blinked (owner, 2026-11-01: "if you do it slow and are
     between two menu items"). A transparent border fills the gap, the margin takes it back. */
  .sidebar .navlink{box-sizing:border-box;height:30px;margin-block:-1px;border-block:1px solid transparent;padding:0 11px;border-radius:var(--r-16, 14px);z-index:1;transition:color var(--dur-fast) var(--ease)}
  .sidebar:not(:hover,.rail-open,.is-pinned,.is-editing,.rail-focus) .navlink{clip-path:inset(0 calc(100% - 40px) 0 0 round 14px)}
  /* …and to the window's edge: the gap left of the panel is the rail's, and a pointer resting there beside
     an entry (or a section's name) was on none, so the lens went back to the current entry (owner,
     2026-11-08). An invisible strip reaches out from each; the rail's box clips what passes its edge. */
  /* The strip covers the entry's 1px edges too (top/bottom −1px): without them a pointer moving down the
     gap crossed a 2px band between two entries that was no entry's, and the lens flicked back. */
  .sidebar .navlink::before,.sidebar .nav-group::before{content:"";position:absolute;z-index:1;top:-1px;bottom:-1px;right:100%;width:calc(var(--rail-inset) + 16px)}
  /* the list clips what leaves it sideways, so it reaches the window's edge itself and pads back: nothing
     moves. It sits over the rail's gap layer (z 1), so beside the space above a section's name the pointer
     is on the LIST, as it is inside the panel — never off it. */
  .sidebar .nav{position:relative;z-index:1;margin-left:calc(-1 * var(--rail-inset));padding-left:calc(6px + var(--rail-inset))}
  /* the words and the section names keep a soft shadow on the glass (none folded: a shadow
     is painted even when its text is transparent, which left a ghost of each section's name) */
  .sidebar .navlink > span:not(.badge),.sidebar .nav-group{text-shadow:0 1px 2px var(--rail-glass-ink)}
  .sidebar .nav-group{color:color-mix(in srgb,var(--sidebar-fg) 90%,transparent)}
  .sidebar:not(:hover,.rail-open,.is-pinned,.is-editing,.rail-focus) .nav-group{text-shadow:none}
  /* THE LENS, a piece of clearer glass (the reel's look). The current entry wears it at rest, and the
     entry under the pointer wears it AT ONCE: the browser's own :hover, no script and no animation on
     the way in. It fades only on the way out. Never bring back a lens that travels: gliding after
     the pointer it was "a bit lagging" at 260ms and "still too much" at 120ms (owner, 2026-11-01), as
     anything that travels trails the hand. While the pointer is on the list, the current entry keeps
     a faint pill, so you never lose your place. ::after, which Edit sidebar's tick also uses. */
  .sidebar .navlink:hover{background:none}
  .sidebar .navlink.active,.sidebar .navlink.active:hover{background:var(--rail-lens-away) padding-box}
  .sidebar:not(.is-editing) .navlink::after{content:"";position:absolute;inset:0;z-index:-1;border-radius:inherit;background:var(--rail-lens-bg);box-shadow:var(--rail-lens-rim);opacity:0;pointer-events:none;transition:opacity var(--dur-fast) var(--ease)}
  .sidebar:not(.is-editing) .navlink.active::after{opacity:1}
  /* folded, the current entry is cut to its 40px pill, which would cut the rim's right side off: the rim is the pill's */
  .sidebar:not(:hover,.rail-open,.is-pinned,.is-editing,.rail-focus) .navlink.active::after{right:auto;width:40px}
  @media (hover:hover){
    .sidebar:not(.is-editing) .navlink:hover{transition:none}
    .sidebar:not(.is-editing) .navlink:hover::after{opacity:1;transition:none}
    /* the whole list, not "an entry is hovered": a section's name or the gap between two entries sent the lens back to the current entry (owner, 2026-11-01) */
    .sidebar:not(.is-editing) .nav:hover .navlink.active:not(:hover)::after{opacity:0}
    /* the pointer left the window across the rail: the entry it was on keeps the lens (/js/rail.js) */
    .sidebar:not(.is-editing) .navlink.is-held::after{opacity:1}
    .sidebar:not(.is-editing) .nav:has(.is-held) .navlink.active:not(.is-held)::after{opacity:0}
  }
  /* folded: a section's name is a short hairline, centred in the strip */
  .sidebar:not(:hover,.rail-open,.is-pinned,.is-editing,.rail-focus) .nav-group > span,.sidebar:not(:hover,.rail-open,.is-pinned,.is-editing,.rail-focus) div.nav-group{color:transparent}
  .sidebar:not(:hover,.rail-open,.is-pinned,.is-editing,.rail-focus) .nav-group :is(svg,i[data-lucide]){opacity:0}
  .sidebar:not(:hover,.rail-open,.is-pinned,.is-editing,.rail-focus) .nav-group::after{content:"";position:absolute;left:12px;top:50%;width:16px;height:1px;background:color-mix(in srgb,var(--sidebar-fg) 35%,transparent)}
  /* folded: the tile alone, centred */
  .sidebar:not(:hover,.rail-open,.is-pinned,.is-editing,.rail-focus) .rail-head :is(.logo-word,.console-tag,.rail-tools){opacity:0;pointer-events:none}
  /* …and the tile's COLOUR is the strip's top: edge to edge, the panel's 16px corners
     above — no navy rim around it (owner, 2026-10-22: "no borders around it when the
     sidebar is closed — it looks strange") — and below it FADES into the rail ("it
     still looks like a hard cut"): solid at the top, then a 38px EASED fade into the
     navy (smoothstep, so it has no start or end line — a straight ramp left one: "a bit
     too hard"), 60px down, 6px above the first entry (owner: "lengthen it a bit more"). Only the colour grows to the strip; the letters only a
     little ("the logo text se is too large" when the whole tile grew) — the rail's
     tile is drawn in two layers (logo-lockup { split: true }).
     Scaled and moved from its place, so nothing else moves: 52 / 30 wide, 60 / 30 tall,
     8px down to meet the panel's top (its centre, 22px down the 44px head, goes to 30).
     The radii are --rail-radius (26px) ÷ each scale. The fade is a mask twice the tile's height, solid
     for its first 68%: open, the tile shows its solid top half; folded, its lower half
     (solid for the block's first 22px, then the fade) — so it slides
     in and out with the rest (mask-position animates; the mask image would snap).
     The first section's hairline would sit under it, so it goes. */
  .rail-logo .logo-bg{position:relative;
    -webkit-mask:linear-gradient(#000 68%,rgb(0 0 0/.9) 74%,rgb(0 0 0/.65) 81%,rgb(0 0 0/.35) 87%,rgb(0 0 0/.1) 94%,transparent) 0 0/100% 200% no-repeat;mask:linear-gradient(#000 68%,rgb(0 0 0/.9) 74%,rgb(0 0 0/.65) 81%,rgb(0 0 0/.35) 87%,rgb(0 0 0/.1) 94%,transparent) 0 0/100% 200% no-repeat;
    transition:scale var(--dur) var(--ease-in-out),translate var(--dur) var(--ease-in-out),border-radius var(--dur) var(--ease-in-out),-webkit-mask-position var(--dur) var(--ease-in-out),mask-position var(--dur) var(--ease-in-out)}
  .rail-logo .logo-glyph{transition:scale var(--dur) var(--ease-in-out)}
  /* (over .rail-edge, the frame's right side, which drew a sliver across the tile's corner) */
  .sidebar > .rail-head{position:relative;z-index:1}
  .sidebar:not(:hover,.rail-open,.is-pinned,.is-editing,.rail-focus) .rail-logo .logo-bg{scale:1.7333 2;translate:0 8px;border-radius:var(--r-16, 15px) var(--r-16, 15px) 0 0/var(--r-12, 13px) var(--r-12, 13px) 0 0;-webkit-mask-position:0 100%;mask-position:0 100%}
  /* Folded, the block wears --logo-cap: the logo's own colours and proportions (owner, same
     day: "just overtake the proportions of the normal fade from the logo"), pulled toward
     the top left. Cross-faded (opacity only) back to the logo's --logo-tile as the rail
     opens, so the tile beside the word is the real logo. */
  .rail-logo .logo-bg::before{content:"";position:absolute;inset:0;border-radius:inherit;background:var(--logo-cap);opacity:0;transition:opacity var(--dur) var(--ease-in-out)}
  .sidebar:not(:hover,.rail-open,.is-pinned,.is-editing,.rail-focus) .rail-logo .logo-bg::before{opacity:1}
  /* the letters grow a little with it — at 1× they read small on the wider colour
     (owner, same day: "a bit too small now"), at the colour's 1.73× too large; 1.3 was "a very tiny bit" big */
  .sidebar:not(:hover,.rail-open,.is-pinned,.is-editing,.rail-focus) .rail-logo .logo-glyph{scale:1.2}
  .sidebar:not(:hover,.rail-open,.is-pinned,.is-editing,.rail-focus) :is(.nav > .nav-group:first-child,.nav > .nav-sec:first-child > .nav-group)::after{display:none}
  /* the top bar's own logo leaves: the rail's head holds it; the title lines up with the page */
  body.has-rail .topbar > .brand{display:none}
  /* the bar's glass fades out before the rail's margin: a band ending on a straight line beside the glass rail read as a hard cut (owner, 2026-11-01) */
  body.has-rail .topbar-glass{-webkit-mask-image:linear-gradient(90deg,transparent calc(var(--rail-inset) + var(--rail-w)),#000 100px);mask-image:linear-gradient(90deg,transparent calc(var(--rail-inset) + var(--rail-w)),#000 100px)}
  /* Pinned (≥1100px, /js/rail.js): the rail stays open BESIDE the page — it pushes
     the page over instead of covering it, and casts no shadow. */
  body.rail-pinned .main,body.rail-pinned > .app-footer{margin-left:calc(var(--rail-open) + var(--rail-inset) * 2)}
  /* No outer shadow. The rail's box starts at the window's edge, --rail-inset left of the panel, with round
     corners of its own: its shadow drew that box as a second card in the gap, sliding in with the rail
     (owner, 2026-11-01: "like another card with rounded edges"). The box clips the panel, so the panel
     cannot cast one, and a filter on the box would stop the glass blurring. */
  .sidebar:is(:hover,.rail-open,.is-editing,.rail-focus){box-shadow:none}
}
/* The logo's colours in the window's left margin, top to bottom as in the logo. The page never
   runs under the folded or pinned rail, so without them the glass has only the pale canvas to
   see through and reads as flat navy. Over the page's layer and under the rail, ending where
   the page's content starts: under the page it would split the page's text off onto a layer
   of its own, and a standard-resolution screen would draw all of it less crisply. Over the
   page-change veil (z 37), so the glass does not pulse at every click, and over the top bar (z 50):
   under its glass the colours stopped on a straight line once the page had scrolled (owner, 2026-11-01). */
@media screen and (min-width:769px){
  body.has-rail::after{content:"";position:fixed;top:0;bottom:0;left:0;width:100px;z-index:51;pointer-events:none;background:var(--rail-glow)}
}
.rail-edge{display:none}
/* the head's colour under the quieter look (look.css); nothing without it */
.rail-band{display:none}
/* The rail's head: the logo (+ the word, + the Console's tag) and the pin. Only the
   sidebar's (:where keeps the weight): the tray page's Items list has a .rail-head too. */
:where(.sidebar) .rail-head{flex:none;display:flex;align-items:center;gap:8px;height:44px;padding:0 10px 0 11px;box-sizing:border-box}
.rail-logo{display:flex;align-items:center;gap:8px;min-width:0;color:var(--sidebar-strong);text-decoration:none;border-radius:var(--r-8, 9px)}
.rail-logo:focus-visible{outline:2px solid var(--sidebar-strong);outline-offset:2px}
.rail-logo .logo-lockup{--logo-h:30px;--logo-word-fill:var(--sidebar-strong);color:var(--sidebar-strong)}
:where(.sidebar) .rail-head :is(.logo-word,.console-tag){transition:opacity var(--dur) var(--ease)}
:where(.sidebar) .rail-head .console-tag{font:600 var(--fs-11, 10.5px) var(--font-system);letter-spacing:.06em;text-transform:uppercase;color:var(--sidebar-fg)}
:where(.sidebar) .rail-head .rail-tools{margin-left:auto;display:flex;align-items:center;gap:2px;transition:opacity var(--dur) var(--ease)}
.nav{display:flex;flex-direction:column;gap:1px;padding:0 10px;overflow-y:auto;overflow-x:hidden;flex:1}
.nav::-webkit-scrollbar{width:0}
.nav-group{position:relative;font-size:var(--fs-12, 11.5px);font-weight:600;color:color-mix(in srgb,var(--sidebar-fg) 85%,transparent);
  height:22px;margin-top:10px;padding:0 8px;box-sizing:border-box;line-height:22px;white-space:nowrap}
.nav > .nav-group:first-child,.nav > .nav-sec:first-child > .nav-group{margin-top:0}
.nav-group > span,.nav-group:not(button){transition:opacity var(--dur) var(--ease)}
.navlink{
  display:flex;align-items:center;gap:9px;height:32px;padding:0 8px;border-radius:var(--r-8, 8px);flex:none;
  color:var(--sidebar-fg);cursor:pointer;white-space:nowrap;position:relative;transition:var(--dur-fast) var(--ease);
}
.navlink svg,.navlink i[data-lucide]{width:17px;height:17px;flex-shrink:0}
.navlink span{opacity:0;transition:opacity var(--dur) var(--ease);font-weight:500;font-size:var(--fs-14, 13.5px)}
.sidebar:is(:hover,.rail-open,.is-pinned,.is-editing,.rail-focus) .navlink span{opacity:1}
.navlink:hover{background:var(--sidebar-hover);color:var(--sidebar-strong)}
.navlink.active{background:var(--sidebar-active-bg);color:var(--sidebar-active-fg)}
.navlink .badge{margin-left:auto;font-family:var(--font-mono);font-size:var(--fs-11, 11px);background:var(--sidebar-badge-bg);color:var(--sidebar-badge-fg);
  border-radius:var(--r-16, 20px);padding:1px 7px;opacity:0;transition:opacity var(--dur) var(--ease);font-weight:600}
.sidebar:is(:hover,.rail-open,.is-pinned,.is-editing,.rail-focus) .navlink .badge{opacity:1}
/* ── The rail's own controls (the new layout, step 2 — owner, 2026-10-21;
   partials/x-sidebar, /js/rail.js) ── */
/* A group header folds its group away (remembered). Folded, the strip still shows
   every icon; only the open rail hides a folded group's entries. */
button.nav-group{display:flex;align-items:center;justify-content:space-between;width:100%;border:0;background:none;cursor:pointer;text-align:left;font-family:inherit}
.nav-group svg,.nav-group i[data-lucide]{width:12px;height:12px;flex:none;opacity:0;transition:opacity var(--dur-fast) var(--ease),rotate var(--dur) var(--ease)}
.nav-group:is(:hover,:focus-visible) svg,.nav-group:is(:hover,:focus-visible) i[data-lucide],.nav-sec.is-closed .nav-group svg,.nav-sec.is-closed .nav-group i[data-lucide]{opacity:1}
.nav-sec.is-closed .nav-group svg,.nav-sec.is-closed .nav-group i[data-lucide]{rotate:-90deg}
.nav-group:focus-visible{outline:2px solid var(--sidebar-strong);outline-offset:-2px;border-radius:var(--r-6, 6px)}
.nav-items{display:flex;flex-direction:column;gap:2px}
/* Only an ENTRY with the focus keeps a folded group's entries (tabbing through the folded
   strip opens the rail on it) — never its header: a click leaves the focus there, and the
   fold waited until the rail closed (owner, 2026-10-24; rail-fold.browser.test.js). */
.sidebar:is(:hover,.rail-open,.is-pinned,.rail-focus):not(.is-editing) .nav-sec.is-closed .nav-items:not(:focus-within){display:none}
/* An entry the person ticked out, and a group with nothing left — gone, except while editing. */
.navlink.is-hidden,.nav-sec.is-empty{display:none}
.sidebar.is-editing .navlink.is-hidden{display:flex}
.sidebar.is-editing .nav-sec.is-empty{display:block}
/* Edit sidebar: Mail-style tick circles. Filled = in the sidebar; an empty ring =
   ticked out (the entry dims). The tick is cut out of the circle, so it takes
   the rail's own colour in both themes. */
.sidebar.is-editing .navlink::after{content:"";margin-left:auto;flex:0 0 18px;height:18px;border-radius:50%;background:var(--sidebar-strong);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E") center/11px no-repeat,linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E") center/11px no-repeat exclude,linear-gradient(#000 0 0)}
.sidebar.is-editing .navlink.is-hidden::after{background:none;-webkit-mask:none;mask:none;box-shadow:inset 0 0 0 1.5px color-mix(in srgb,var(--sidebar-fg) 70%,transparent)}
.sidebar.is-editing .navlink.is-hidden > :is(svg,i,span,.sally-glyph){opacity:.45}
.sidebar.is-editing .navlink .badge{display:none}
/* …and a grip at the row's end, after the tick, as in an iPhone list: it drags the entry
   up or down within its section (/js/rail.js adds it on the first edit). A long name ends
   in "…" so the tick and the grip always fit the row. */
.nav-grip{display:none}
.sidebar.is-editing .nav-grip{order:2;display:inline-flex;align-items:center;justify-content:center;flex:none;width:18px;height:28px;margin:0 -7px 0 -5px;color:var(--sidebar-fg);cursor:grab;touch-action:none}
.sidebar.is-editing .nav-grip:hover{color:var(--sidebar-strong)}
.nav-grip svg,.nav-grip i[data-lucide]{width:14px;height:14px}
.sidebar.is-editing .navlink::after{order:1}
.sidebar.is-editing .navlink > span:not([class]){min-width:0;overflow:hidden;text-overflow:ellipsis}
/* The entry on the move: its place in the list, and the copy a finger carries (on the
   page's body, outside the rail — so it is given the rail's look here). */
.sidebar .navlink.sortable-ghost{background:var(--sidebar-hover)}
.navlink.sortable-fallback{background:var(--sidebar-bg);color:var(--sidebar-strong);border-radius:var(--r-8, 8px);box-shadow:var(--shadow-lg)}
.navlink.sortable-fallback span{opacity:1}
.navlink.sortable-fallback :is(.badge,.nav-grip){display:none}
/* The head's tools: the pin and Edit sidebar (its sliders icon), side by side. While editing, the
   hint sits under the head. */
.rail-hint{display:none;margin:0 12px 8px;font-size:var(--fs-12, 12px);line-height:1.4;color:var(--sidebar-fg)}
.sidebar.is-editing .rail-hint{display:block}
.rail-edit,.rail-pin{display:flex;align-items:center;justify-content:center;flex:none;width:28px;height:28px;padding:0;border:0;border-radius:var(--r-8, 8px);background:none;color:var(--sidebar-fg);cursor:pointer;transition:background-color var(--dur-fast) var(--ease),color var(--dur-fast) var(--ease)}
.rail-edit svg,.rail-edit i[data-lucide],.rail-pin svg,.rail-pin i[data-lucide]{width:15px;height:15px}
.rail-edit:hover,.rail-pin:hover{background:var(--sidebar-hover);color:var(--sidebar-strong)}
.rail-edit:focus-visible,.rail-pin:focus-visible{outline:2px solid var(--sidebar-strong);outline-offset:-2px}
.rail-pin[aria-pressed="true"],.rail-edit[aria-pressed="true"]{background:var(--sidebar-active-bg);color:var(--sidebar-strong)}
.rail-pin[aria-pressed="true"] svg{fill:currentColor}
/* The pin only on a window wide enough to keep the rail beside the page. */
@media (max-width:1099px){.rail-pin{display:none}}
@media (min-width:769px){
  /* Folded: a count is a dot on its icon. */
  .sidebar:not(:hover,.rail-open,.is-pinned,.is-editing,.rail-focus) .navlink .badge.nav-count:not(.nav-count-alt):not([hidden]){opacity:1;position:absolute;left:29px;top:4px;width:8px;height:8px;min-width:0;padding:0;font-size:0;border-radius:50%;box-shadow:0 0 0 2px var(--sidebar-bg)}
}
/* Nav/tab count badges are ALWAYS rendered and hidden at zero, so a refresh is a
   text change rather than an insertion that shifts the strip (see
   /js/nav-badges.js). `.pill` sets display:inline-flex, which would otherwise beat
   the UA `[hidden]{display:none}` rule — assert it here for both badge families. */
.pill[hidden], .badge[hidden], .info-btn[hidden]{display:none !important}
/* Same trap one level up: `.empty` sets display:grid, which beats the UA
   `[hidden]{display:none}` rule — an empty state toggled with the `hidden`
   attribute (the timeline/feed pattern) would stay on screen next to the
   content it says is missing. */
.empty[hidden]{display:none !important}

/* ============================ LAYOUT ============================ */
.main{margin-left:calc(var(--rail-w) + var(--rail-inset) + var(--rail-gap));margin-top:var(--topbar-h);min-height:calc(100vh - var(--topbar-h))}
/* NO global width cap — an operator page fills whatever screen it is on. `.view`
   used to be max-width:1480px + centered, which is invisible on a 13" laptop
   (1512pt viewport − 60px rail = 1452px, already under the cap) but left ~500px
   of dead gutter on EACH side of a 27" display, on all 185 pages. The inventory
   pages had already opted out for exactly that reason. Do NOT reintroduce a
   global cap: a page that genuinely needs a reading width says so itself with
   `.view.narrow` below. `margin:0 auto` stays because `.narrow` needs it to
   center. (2026-09-20) */
.view{padding:15px var(--view-pad-x) var(--view-pad-b);margin:0 auto}
/* PROSE pages only (release notes, a settings sheet that is mostly text): cap
   the reading width so a paragraph doesn't run the full width of a 27" display.
   NOT for intake forms — trade-in / consignment / purchase all carried this and
   read as a narrow column in the middle of a wide screen; they are full-width
   `.view` like every other operator page since 2026-09-20. Before adding it to
   a page, ask "is this text to READ, or fields to FILL?" */
.view.narrow{max-width:1020px}
/* ============================ SALLY DOCKED ============================
   On a window 1100px and wider, Sally's panel (copilot-widget.css) sits beside
   the page instead of over it, and the page makes room: html.copilot-panel-open
   (set by the panel; before the first paint by /js/nav-arrive.js when it was open
   on the last page, so the page does not jump when it comes back). Here, not in
   copilot-widget.css, because that sheet loads after the first paint. The room
   opens WITH the panel (owner, 2026-10-22: "not smooth like in the mock"): while the
   person opens or closes it — html.sw-dock-anim, set by copilot-widget.js for that one
   move — the page's edge and the top bar's end glide on the panel's own curve. Never
   while a page loads: a page that comes back with the panel open has the room from its
   first paint and no class (a layout animation on a loading page freezes — the rail
   rule). Tested by src/ui/sally-docked.test.js + sally-docked.browser.test.js. */
@media (min-width: 1100px) {
  :root{--sw-dock-w:clamp(380px, 28vw, 460px)}
  /* the panel floats --rail-inset in from the edge, as the rail does on the left,
     and the page keeps the same --rail-gap from it (owner, 2026-10-22, the mock) */
  /* the page — the app's .main, the scanner's .scanner-container (owner, 2026-10-22: the
     scanner pages "do not move/resize when i open the sally sidebar") — and the footer */
  html.copilot-panel-open body.has-rail :is(.main, .scanner-container, body > .app-footer){margin-right:calc(var(--sw-dock-w) + var(--rail-inset) + var(--rail-gap))}
  /* the top bar ends where the panel begins, so its icons stay clear of it and
     nothing has to be lifted over it (a lifted bar covered the rail's head) */
  html.copilot-panel-open body.has-rail .topbar{right:calc(var(--sw-dock-w) + var(--rail-inset))}
  html.sw-dock-anim body.has-rail :is(.main, .scanner-container, body > .app-footer){transition:margin-right var(--dur-panel) var(--ease-glide)}
  html.sw-dock-anim body.has-rail .topbar{transition:right var(--dur-panel) var(--ease-glide)}
}
/* ============================ PAGE ENTRANCE ============================
   ONE entrance, the same on every page (the new layout, step 3 — owner,
   2026-10-21: "adopt the mock's motion"). A page opening:
   - its content settles in: everything under the page head scales from .985
     to 1 over --dur-entrance, all at once — never one part before another,
     never a rise. (2026-10-07 the owner got "a bit motion sick": content slid
     up 8px, and WHICH parts slid depended on how each page was built.) The
     page head, the tab strip (its .tab-row too, and CRM's .crm-body around it) and the
     shell never move: the title sits in the top bar (position:fixed — a scaled parent would
     carry it off for the run), and a tab strip holds still across its pages;
   - the first 10 table rows fade in one after another, --cascade-step apart,
     opacity only (rows 11-40 with the 10th — a screenful; no row below that
     animates, so a 4,800-row list runs 40 animations, not 4,800). Never a skeleton
     row: it is on screen from the first frame, and fading it in made a loading list
     cascade twice, the skeleton and then the real rows (owner, 2026-11-01);
   - figures count up (App.countUp, /js/skel-reveal.js), sparklines draw from
     the left, bars and meters fill — over --dur-count.
   Only while html.page-enter is on: /js/nav-arrive.js sets it before the first
   paint and takes it off after the longest run. Never on a switch between the
   tabs of one strip (html.nav-tab-arrive), on a page restored from the browser's
   cache, or under reduced motion (the tokens are 1ms / 0ms). Nothing waits for
   it: the content is drawn and clickable from the first frame. The animations
   fill BACKWARDS only — a scale left in place, even scale:1, makes every
   position:fixed box inside a card (a dialog) follow the card.
   Content that arrives later (a fetch replacing its skeleton) fades in IN
   PLACE, its rows cascading the same way (/js/skel-reveal.js).
   What softens the change around it is ONE veil, identical on every page: a layer of
   the page's own background over the content area — under the phone tab bar
   (38), the phone scrim (39), the rail (40) and the top bar (50), so the shell
   stays steady — that
   starts at 70% and lifts over --dur-slow. The content underneath is drawn,
   still and clickable from the first frame (the veil takes no pointer); the
   page as a whole settles in, never one part before another. Opacity only,
   on a pseudo-element: no stacking context on the content, so the page title
   in the top bar (position:fixed, z 51) is untouched. Reduced motion: gone
   in 1ms. Shell pages only (the app's and the console's — both have the rail).
   And the page being LEFT dims under the same veil, to the same 70%, from the
   click until the next page replaces it (html.nav-loading, /js/nav-feedback.js;
   owner: "still quite hard" — the old page vanished in one frame). Old page →
   a dip → the new page lifting out of it: one continuous move, no cut. A page
   restored from the browser's cache drops the class and clears.
   Tested by src/ui/motion-tokens.test.js and src/ui/page-enter.client.test.js. */
@keyframes page-enter{from{scale:.985}}
@keyframes row-in{from{opacity:0}}
@keyframes spark-draw{from{clip-path:inset(0 100% 0 0)}}
@keyframes fill-up{from{scale:1 0}}
@keyframes fill-across{from{scale:0 1}}
html.page-enter body.has-rail :is(.main > .view, .main > .view > .split > .admin-content, .main > .view > .crm-body) > :not(.page-head,.tabs,.tab-row,.split,.crm-body){animation:page-enter var(--dur-entrance) var(--ease) backwards}
html.page-enter body.has-rail .main > .view tbody > tr:nth-child(-n+10){animation:row-in var(--dur-slow) var(--ease) backwards}
html.page-enter body.has-rail .main > .view tbody > tr:nth-child(2){animation-delay:var(--cascade-step)}
html.page-enter body.has-rail .main > .view tbody > tr:nth-child(3){animation-delay:calc(var(--cascade-step) * 2)}
html.page-enter body.has-rail .main > .view tbody > tr:nth-child(4){animation-delay:calc(var(--cascade-step) * 3)}
html.page-enter body.has-rail .main > .view tbody > tr:nth-child(5){animation-delay:calc(var(--cascade-step) * 4)}
html.page-enter body.has-rail .main > .view tbody > tr:nth-child(6){animation-delay:calc(var(--cascade-step) * 5)}
html.page-enter body.has-rail .main > .view tbody > tr:nth-child(7){animation-delay:calc(var(--cascade-step) * 6)}
html.page-enter body.has-rail .main > .view tbody > tr:nth-child(8){animation-delay:calc(var(--cascade-step) * 7)}
html.page-enter body.has-rail .main > .view tbody > tr:nth-child(9){animation-delay:calc(var(--cascade-step) * 8)}
html.page-enter body.has-rail .main > .view tbody > tr:nth-child(n+10):nth-child(-n+40){animation:row-in var(--dur-slow) var(--ease) backwards;animation-delay:calc(var(--cascade-step) * 9)}
html.page-enter body.has-rail .main > .view tbody > tr.skel-row:nth-child(n){animation:none}
/* A list that is not a table cascades the same way: the CRM inbox's conversations
   (.ib-row — /js/skel-reveal.js counts them as rows too; owner, 2026-10-23: the inbox
   "still is stiff" — its list sat still while every table's rows came in). Rules of
   their own: the `of` selector in a table's rule would cost a browser without it the
   tables' cascade too. */
html.page-enter body.has-rail .main > .view .ib-convs > .ib-row:nth-child(-n+10 of .ib-row){animation:row-in var(--dur-slow) var(--ease) backwards}
html.page-enter body.has-rail .main > .view .ib-convs > .ib-row:nth-child(2 of .ib-row){animation-delay:var(--cascade-step)}
html.page-enter body.has-rail .main > .view .ib-convs > .ib-row:nth-child(3 of .ib-row){animation-delay:calc(var(--cascade-step) * 2)}
html.page-enter body.has-rail .main > .view .ib-convs > .ib-row:nth-child(4 of .ib-row){animation-delay:calc(var(--cascade-step) * 3)}
html.page-enter body.has-rail .main > .view .ib-convs > .ib-row:nth-child(5 of .ib-row){animation-delay:calc(var(--cascade-step) * 4)}
html.page-enter body.has-rail .main > .view .ib-convs > .ib-row:nth-child(6 of .ib-row){animation-delay:calc(var(--cascade-step) * 5)}
html.page-enter body.has-rail .main > .view .ib-convs > .ib-row:nth-child(7 of .ib-row){animation-delay:calc(var(--cascade-step) * 6)}
html.page-enter body.has-rail .main > .view .ib-convs > .ib-row:nth-child(8 of .ib-row){animation-delay:calc(var(--cascade-step) * 7)}
html.page-enter body.has-rail .main > .view .ib-convs > .ib-row:nth-child(9 of .ib-row){animation-delay:calc(var(--cascade-step) * 8)}
html.page-enter body.has-rail .main > .view .ib-convs > .ib-row:nth-child(n+10 of .ib-row):nth-child(-n+40 of .ib-row){animation:row-in var(--dur-slow) var(--ease) backwards;animation-delay:calc(var(--cascade-step) * 9)}
/* a sparkline: a tile's .spark, and the dashboard tiles' own trend line (.dash-ov-spark,
   built by /js/dashboard-overview.js on the tile's first data — it only morphs after that) */
html.page-enter body.has-rail .main :is(:is(.kpi,.inv-kpi) .spark, .dash-ov-spark > svg){animation:spark-draw var(--dur-count) var(--ease) backwards}
html.page-enter body.has-rail .main .bar .bb{transform-origin:50% 100%;animation:fill-up var(--dur-count) var(--ease) backwards}
html.page-enter body.has-rail .main .meter > span{transform-origin:0 50%;animation:fill-across var(--dur-count) var(--ease) backwards}
/* HELD AT ITS FIRST FRAME UNTIL THE PAGE IS ON SCREEN (owner, 2026-10-23, on his iPhone:
   "on a phone i dont have the same motion effects in the app. all are stiff"). WebKit —
   every iPhone browser — starts an animation's clock at the first style pass but holds
   the first paint until DOMContentLoaded, so the veil, the entrance, the cascade and the
   sparklines played out unseen before an iPhone showed the page (Chrome starts its clock
   at the first frame). html.page-hold (/js/nav-arrive.js) pauses all of it at its start
   until the first paint is reported — at most 3s. Only with html.page-enter (never under
   reduced motion, never on a tab switch). Tested by src/ui/phone-motion.browser.test.js. */
html.page-hold body.has-rail::before,
html.page-hold body.has-rail :is(.main > .view, .main > .view > .split > .admin-content, .main > .view > .crm-body) > *,
html.page-hold body.has-rail .main > .view :is(tbody > tr, .ib-convs > .ib-row),
html.page-hold body.has-rail .main :is(:is(.kpi,.inv-kpi) .spark, .dash-ov-spark > svg, .bar .bb, .meter > span){animation-play-state:paused!important}
/* A figure that will count up is not shown at its end value first: hidden for
   the moment until /js/skel-reveal.js has set it to its start (html.counted). */
html.page-enter:not(.counted) body.has-rail .main :is(.kpi,.inv-kpi) .val{color:transparent}
@keyframes page-veil{from{opacity:.7;visibility:visible}to{opacity:0;visibility:visible}}
/* visibility:hidden once it has lifted — a full-screen layer left over the page,
   even at opacity 0, is one more layer to draw on every scroll frame of a phone */
body.has-rail::before{content:"";position:fixed;inset:0;z-index:37;background:var(--bg);pointer-events:none;opacity:0;visibility:hidden;animation:page-veil var(--dur-slow) var(--ease-in-out)}
/* animation:none — a click while the arriving veil is still lifting (the first
   260ms on a page) dims from wherever the lift has got to, instead of the lift
   winning and the change being a hard cut */
html.nav-loading body.has-rail::before{opacity:.7;visibility:visible;animation:none;transition:opacity var(--dur) var(--ease-in-out)}
/* A switch between the TABS of one strip (each CRM tab is its own page) has no
   dip and no lift — the same as Inventory's tabs, which never leave the page
   (owner, 2026-10-09: "the fade to black is longer in CRM"). The tab line slides
   and the top bar's line loads; that is the answer to the click. Set by
   /js/nav-feedback.js (html.nav-tab) and /js/nav-arrive.js (html.nav-tab-arrive). */
html.nav-loading.nav-tab body.has-rail::before{opacity:0;visibility:hidden}
html.nav-tab-arrive body.has-rail::before{animation:none}
/* ============================= PAGE CHANGE =============================
   A click to another page shows the new page in ONE frame, complete — bar,
   rail, title, icons (src/ui/shell-head.js holds the first paint for them) —
   while the browser keeps the old page on screen until then. The motion is in
   what changes, not in a fade between pages: the clicked tab's line slides at
   once and the old page dims (/js/nav-feedback.js, below), the new page
   settles in (PAGE ENTRANCE).
   NO cross-document view transition (@view-transition) — tried 2026-10-06 and
   taken out the same day: for its whole length the browser sends every
   pointer event to the transition, not the page, so flipping through pages
   fast lost clicks and closed the hover-opened rail (light content flashing
   through where the navy rail had been — the "white flash when I flip through
   fast"), and it added little: the shell is the same on both pages. Never
   bring it back without solving both. Tested by src/ui/motion-tokens.test.js
   and src/ui/motion.browser.test.js. */
/* The page change's instant answer (/js/nav-feedback.js): from the click, the
   page being left dims under the veil (PAGE ENTRANCE) and the tab, filter button
   or rail entry that IS the destination becomes current. No loading line: the
   bar has no line under it (owner, 2026-10-22: "i still have the load bar when i
   change a page" — the blue → violet line ran under the bar from 2026-10-06). */

/* ============================= THEME SWITCH =============================
   Flipping light/dark cross-fades the page (2026-10-07): /js/theme.js runs the
   switch inside a same-document view transition, so one picture of the page
   fades into the next. Only the page as a whole is captured — nothing in the
   sheets is named for a transition (motion-tokens.test.js fails on one), and
   page CHANGES never use one (above). Reduced motion never starts it. */
::view-transition-old(root),::view-transition-new(root){animation-duration:var(--dur-slow);animation-timing-function:var(--ease-in-out)}
/* the elements' own colour transitions are off while it switches (theme.js adds
   the class inside the transition and drops it when the fade is done): the new
   look is final at once, so the cross-fade is the ONE motion — with them on, the
   page faded in while still changing colour underneath ("buggy, not fluid").
   The ONE exception is the Dark mode switch itself: its knob slides across over
   the fade (owner, 2026-10-08: "no sliding effect anymore" when it jumped). It
   is lifted out of the page's picture (its own name, the visible menu's only)
   and shown live, so the fade never shows a second, fading copy of it. */
html.theme-switching :not(.user-menu-switch),html.theme-switching :not(.user-menu-switch)::before,html.theme-switching :not(.user-menu-switch)::after{transition:none!important}
.user-menu-dropdown:not([hidden]) [data-theme-toggle] ~ .user-menu-switch{view-transition-name:theme-toggle}   /* the Dark mode switch ONLY: two elements with one name and the browser skips the cross-fade */
::view-transition-old(theme-toggle){animation:none;opacity:0}
::view-transition-new(theme-toggle){animation:none}
.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:10px;flex-wrap:wrap}
.page-head h1{font-size:var(--h1);font-weight:600;line-height:1.2}
.page-head .sub{color:var(--muted);font-size:var(--fs-13, 13px);margin-top:4px}
/* The page-level action cluster (Back / Export / the one primary action) is
   pinned TOP-RIGHT, on the title's own line. `.page-head` used to be
   align-items:flex-end, which bottom-aligned this cluster to whatever the LEFT
   column grew into — so a page with a subtitle paragraph under its <h1> put the
   very same Back/Export buttons 20-40px lower than a page without one. That is
   the drift this pair of rules removes: flex-start puts the cluster at the top,
   and -4px centres the 38px control band on the ~30px h1 line box so it reads as
   sitting ON the title, not above it. */
/* the buttons centre on the title / first-row line (13px under the head's top): the lift
   follows the button height, so the laptop tier's 32px button sits as true as the 34px one */
.page-head > .actions{align-self:flex-start;margin-top:calc(13px - var(--btn-h) / 2);min-height:var(--btn-h)}
/* min-height reserves the button band even when every action is hidden: a tabbed
   page (Inventory) shows Export on some tabs only, and an empty cluster let the
   head shrink 34px → 30px, so the tab strip below jumped on every tab switch. */
/* A search box in the head (the dashboard quick find) stays a compact 240px beside the primary action; mobile.css widens it to the row. */
.page-head > .actions > .tb-input{max-width:240px}
/* …and the title block must be allowed to SHRINK. `.page-head` wraps, so a left
   block holding a long subtitle grew to its max-content width and bumped the
   action cluster onto its own line below the paragraph — the same Back/Export
   ending up a full row lower than on a page with no subtitle. flex:1 1 auto +
   min-width:0 makes the paragraph wrap inside the space left over instead.
   Scoped to a `div` first child so page-heads that lead with an inline element
   (a status pill, crm-lead-detail) are untouched. */
.page-head > div:first-child:not(.actions){flex:1 1 0;min-width:0}
/* ===================== PAGE TITLE IN THE TOPBAR (desktop) =====================
   On a desktop (≥1200px) the page's TITLE — its <h1>, and nothing else — sits in
   the topbar, left of the search box (owner, 2026-10-04: "i only wanted the header
   name in the menu bar"), in the mock's bold 17px, lined up with the page's content.
   The search box (on the right since 2026-10-22) does not move between pages.
   Pure CSS: the <h1> stays where the view writes it and is only POSITIONED into
   the bar, so it is there from first paint and every script that reads
   `.page-head h1` still finds it.
   Where: the <h1> of the FIRST .page-head of a page — in .main > .view, in an
   admin page's .split > .admin-content, or in the scanner's .scanner-container >
   .view. ONLY pages with the app's own bar: partials/x-topbar's script sets
   html[data-topbar-title] once it has measured where the search box starts
   (--topbar-title-end, the title's right limit). The Sellevry Console borrows
   .topbar/.main/.view/.page-head WITHOUT x-topbar, so it keeps its titles in the
   page. A head marked [data-title-in-page] keeps its <h1> (for an <h1> that is not
   the page's title; the dashboard's greeting IS its title and goes into the bar).
   What is left of the head stays in the page, where it was, starting at the top
   of the page (15px under the bar on every page):
     - nothing left (just the title)  → the head takes no room at all;
     - only its .actions, and a tab strip comes next (Inventory, CRM) → the
       buttons sit at the right end of the tab row, so there is no empty strip;
     - anything else (buttons, a description, a toolbar) → it stays as a row.
   Phone/tablet/print are untouched. The scanner's own spacing is in
   src/scanner/public/scanner-extras.css. Tested by
   src/ui/page-head-topbar.browser.test.js — and check EVERY page after a change
   here (the crawl in that test's header comment). */
@media screen and (min-width:1200px){
  /* (no entrance on .view itself: a transform there would make the fixed title
     position against .view and sit under the topbar — PAGE ENTRANCE animates
     the content blocks only) */
  /* The title starts where the "sellevry" wordmark does (LOGO LOCKUP): right of the
     tile, at the lockup's own gap (owner, 2026-10-06: "aligning the same way to the
     logo than the svg"), and takes its place — a page with a title in the bar shows
     the tile + its title; pages without a head show the tile + the wordmark. The tile sits centred over
     the rail, or at the bar's 22px padding where there is no rail (scanner). */
  html[data-topbar-title] body{--topbar-title-start:calc(22px + var(--topbar-logo) * 1.26)}
  /* the title lines up with the page's content, right of the rail (whose head holds the logo) */
  html[data-topbar-title] body.has-rail{--topbar-title-start:calc(var(--rail-inset) + var(--rail-w) + var(--rail-gap) + var(--view-pad-x))}
  html[data-topbar-title] body.has-rail.rail-pinned{--topbar-title-start:calc(var(--rail-inset) * 2 + var(--rail-open) + var(--view-pad-x))}
  html[data-topbar-title][data-topbar-page-title] .topbar .brand .logo-word{display:none}
  html[data-topbar-title] :is(.main > .view, .main > .view > .split > .admin-content, .scanner-container > .view) > .page-head:not(.page-head ~ .page-head):not([data-title-in-page]) h1{
    position:fixed;top:0;left:var(--topbar-title-start);z-index:51;margin:0;
    max-width:calc(100% - var(--topbar-title-start) - var(--topbar-title-end,560px) - var(--scroll-lock-gap, 0px));
    height:var(--topbar-h);line-height:calc(var(--topbar-h) - 2px);font-size:var(--fs-17, 17px);font-weight:700;color:var(--topbar-fg);
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  /* (2px under the bar's height: the title's letters then centre on the tile's letters,
     as the wordmark's do — at 60 they sat ~1px low) */
  /* (Sally's panel never lifts the bar here: at this width it is docked beside a
     shortened bar — SALLY DOCKED — so the title needs no lift of its own either.) */
  /* an icon in the title takes the bar's ink at the bar's icon size; a status
     pill gets a surface so its colour reads on the bar */
  html[data-topbar-title] :is(.main > .view, .main > .view > .split > .admin-content, .scanner-container > .view) > .page-head:not(.page-head ~ .page-head):not([data-title-in-page]) h1 :is(svg,i[data-lucide]){width:18px;height:18px;color:var(--topbar-fg);vertical-align:-3px}
  html[data-topbar-title] :is(.main > .view, .main > .view > .split > .admin-content, .scanner-container > .view) > .page-head:not(.page-head ~ .page-head):not([data-title-in-page]) h1 .pill{background:var(--surface);vertical-align:middle}
  /* what is left starts at the top of the page: the buttons no longer sit on a
     title line, so they lose the -4px that centred them on it */
  html[data-topbar-title] :is(.main > .view, .main > .view > .split > .admin-content, .scanner-container > .view) > .page-head:not(.page-head ~ .page-head):not([data-title-in-page]) > .actions{margin-top:0}
  /* …and so does the description that sat under the title: it loses the gap it
     kept from the title (a <p>'s own 14px, .sub's 4px) */
  html[data-topbar-title] :is(.main > .view, .main > .view > .split > .admin-content, .scanner-container > .view) > .page-head:not(.page-head ~ .page-head):not([data-title-in-page]) h1 + *{margin-top:0}
  /* a description left beside the buttons: its first line and the buttons'
     labels share one text line (they used to sit under / beside the title).
     Only a standard head — a title block + .actions — so a working bar (the
     tray editor's photo + toolbar) keeps its own alignment */
  html[data-topbar-title] :is(.main > .view, .main > .view > .split > .admin-content, .scanner-container > .view) > .page-head:not(.page-head ~ .page-head):not([data-title-in-page]):not(:has(> :not(:first-child):not(.actions))):has(> :first-child:not(h1):not(.actions) > :not(h1)){align-items:baseline}
  html[data-topbar-title] :is(.main > .view, .main > .view > .split > .admin-content, .scanner-container > .view) > .page-head:not(.page-head ~ .page-head):not([data-title-in-page]):not(:has(> :not(:first-child):not(.actions))):has(> :first-child:not(h1):not(.actions) > :not(h1)) > .actions{align-self:baseline}
  /* a head that was just [<h1>][buttons]: with the title gone the buttons would
     be the head's only item and slide to the left — keep them on the right */
  html[data-topbar-title] :is(.main > .view, .main > .view > .split > .admin-content, .scanner-container > .view) > .page-head:not(.page-head ~ .page-head):not([data-title-in-page]) > h1:first-child + :last-child{margin-left:auto}
  /* nothing left but the title → the head takes no room */
  html[data-topbar-title] :is(.main > .view, .main > .view > .split > .admin-content, .scanner-container > .view) > .page-head:not(.page-head ~ .page-head):not([data-title-in-page]):not(:has(> :nth-child(2))):not(:has(> :first-child:not(h1) > :not(h1))){margin:0}
  /* only buttons left, and a tab strip comes next — on its own or as the first
     thing in a plain wrapper (CRM's .crm-body; not a card, whose padding would
     set the tabs apart) → the buttons go on the tab row (right end); the head
     takes no room */
  html[data-topbar-title] :is(.main > .view, .main > .view > .split > .admin-content, .scanner-container > .view) > .page-head:not(.page-head ~ .page-head):not([data-title-in-page]):has(+ .tabs, + :not(.card) > .tabs:first-child):not(:has(> :not(:first-child):not(.actions))):not(:has(> :first-child:not(h1):not(.actions) > :not(h1))){
    position:relative;margin:0}
  html[data-topbar-title] :is(.main > .view, .main > .view > .split > .admin-content, .scanner-container > .view) > .page-head:not(.page-head ~ .page-head):not([data-title-in-page]):has(+ .tabs, + :not(.card) > .tabs:first-child):not(:has(> :not(:first-child):not(.actions))):not(:has(> :first-child:not(h1):not(.actions) > :not(h1))) > .actions{
    position:absolute;top:calc(13px - var(--btn-h) / 2);right:0;min-height:0;z-index:1}
  /* …and while its ••• menu is open the cluster rises over the list's sticky head row (z 30, look.css
     "SCROLL MOTION"): at z 1 the open menu slid under the search, Columns and Filters (CRM → Customers,
     2026-11-14). Only while open — at rest a higher layer would pass over the stuck head as the page scrolls.
     Tested by src/ui/list-head-sticky.browser.test.js. */
  html[data-topbar-title] :is(.main > .view, .main > .view > .split > .admin-content, .scanner-container > .view) > .page-head:not(.page-head ~ .page-head):not([data-title-in-page]):has(+ .tabs, + :not(.card) > .tabs:first-child):not(:has(> :not(:first-child):not(.actions))):not(:has(> :first-child:not(h1):not(.actions) > :not(h1))) > .actions:has(> details.act-menu[open]){z-index:40}
  /* …and a tab strip that is the page's first row lines up with every other first
     row (owner, 2026-10-12: CRM / Inventory tabs "sit lower than the first row" of
     the dashboard). Its box started 15px under the bar like everything else, but each
     tab carries 8px of air above its label, so the labels centred ~34px under the bar
     where the dashboard's greeting centres at 28. Lifted 4px (the -4px the head's
     buttons take on a title line), the labels centre on that line and the strip and
     its buttons (top:-4px) start 11px under the bar, like the dashboard's buttons. */
  html[data-topbar-title] :is(.main > .view, .main > .view > .split > .admin-content, .scanner-container > .view) > .page-head:not(.page-head ~ .page-head):not([data-title-in-page]):not(:has(> :not(:first-child):not(.actions))):not(:has(> :first-child:not(h1):not(.actions) > :not(h1))) + .tabs,
  html[data-topbar-title] :is(.main > .view, .main > .view > .split > .admin-content, .scanner-container > .view) > .page-head:not(.page-head ~ .page-head):not([data-title-in-page]):not(:has(> :not(:first-child):not(.actions))):not(:has(> :first-child:not(h1):not(.actions) > :not(h1))) + :not(.card) > .tabs:first-child{margin-top:-4px}
  /* a description left over a tab strip is always one button tall, centred in it —
     so the tab whose head has a button (Twilio → Numbers: Add number) and the tab
     whose head has none (Twilio → Settings) put the description and the strip at
     the same height, and switching tabs moves nothing (owner, 2026-10-14) */
  html[data-topbar-title] :is(.main > .view, .main > .view > .split > .admin-content, .scanner-container > .view) > .page-head:not(.page-head ~ .page-head):not([data-title-in-page]):has(+ .tabs):not(:has(> :not(:first-child):not(.actions))):has(> :first-child:not(h1):not(.actions) > :not(h1)){align-items:center}
  html[data-topbar-title] :is(.main > .view, .main > .view > .split > .admin-content, .scanner-container > .view) > .page-head:not(.page-head ~ .page-head):not([data-title-in-page]):has(+ .tabs):not(:has(> :not(:first-child):not(.actions))):has(> :first-child:not(h1):not(.actions) > :not(h1)) > :first-child{
    align-self:center;min-height:var(--btn-h);display:flex;flex-direction:column;justify-content:center}
}
.crumbs{display:flex;align-items:center;gap:7px;font-size:var(--fs-12, 12.5px);color:var(--muted);margin-bottom:9px;flex-wrap:wrap}
.crumbs a:hover{color:var(--accent)}
.crumbs svg,.crumbs i[data-lucide]{width:13px;height:13px}

/* ============================ COMPONENTS ============================ */
.btn{
  display:inline-flex;align-items:center;gap:7px;height:var(--btn-h);padding:0 13px;border-radius:var(--r-8, 9px);
  font-family:inherit;font-size:var(--fs-13, 13px);font-weight:600;cursor:pointer;border:1px solid var(--border);
  background:var(--surface);color:var(--text);transition:var(--dur-fast) var(--ease);white-space:nowrap;
}
.btn svg,.btn i[data-lucide]{width:16px;height:16px}
.btn:hover{background:var(--surface-2);border-color:var(--border-strong)}
.btn.primary{background:linear-gradient(135deg, var(--accent), var(--accent-end, var(--accent-strong, var(--accent))));border-color:var(--accent);color:var(--on-brand);box-shadow:0 2px 6px color-mix(in srgb, var(--accent) 26%, transparent)}
.btn.primary:hover{filter:brightness(1.06)}
.btn.danger{background:var(--red-bg);border-color:transparent;color:var(--red-text)}
.btn.danger:hover{background:color-mix(in srgb,var(--red) 18%,transparent)}
/* Soft accent, the twin of .btn.danger: a tool that should stand out in a row of bare icons, where a filled
   .btn.primary is too heavy (Mark done in the inbox head). */
.btn.soft{background:var(--accent-soft);border-color:var(--accent-border);color:var(--accent)}
.btn.soft:hover{background:color-mix(in srgb,var(--accent) 18%,transparent);border-color:var(--accent)}
/* Positive/affirmative soft-green (e.g. re-enable a disabled account) — mirrors .btn.danger */
.btn.success{background:var(--green-bg);border-color:transparent;color:var(--green-text)}
.btn.success:hover{background:color-mix(in srgb,var(--green) 18%,transparent)}
.btn.ghost{background:transparent;border-color:transparent;color:var(--text-2)}
.btn.ghost:hover{background:var(--surface-2);color:var(--text)}
/* Accent-TEXT button: the label (and its icon) carry the theme's primary color
   — Sellevry blue in light, a lifted blue in dark. TEXT only, never a fill, so `--accent`
   is the right token here (a colored FILL still needs `--on-brand`). Pairs with
   `ghost` for a low-emphasis action that should still read as the accent. */
.btn.accent,.btn.ghost.accent,.btn.ghost.accent:hover{color:var(--accent)}
/* Sign in with Google / Microsoft: the provider's own button, the one button that wears
   someone else's colours. Google requires its mark on its own button for app verification (40px
   tall, 12px + 20px G + 10px + label + 12px); never the accent fill, never a Lucide door. The
   mark is an <img> from /img/brand/. */
.btn.provider{height:40px;padding:0 12px;gap:10px;border-radius:var(--r-16, 20px);background:var(--signin-bg);border-color:var(--signin-google-line);color:var(--signin-google-ink);font-family:var(--font-signin-google);font-size:var(--fs-14, 14px);line-height:20px;font-weight:500}
.btn.provider:hover{background:var(--signin-hover);border-color:var(--signin-google-line);box-shadow:var(--shadow)}
.btn.provider.ms,.btn.provider.ms:hover{border-color:var(--signin-ms-line);color:var(--signin-ms-ink);font-family:var(--font-body);font-weight:600}
.btn.provider img{display:block;width:20px;height:20px}
.btn.sm{height:var(--btn-h-sm);padding:0 11px;font-size:var(--fs-12, 12.5px);border-radius:var(--r-8, 8px)}
/* A button the height of a line of field text (22px, like a .pill), for an action
   that sits among field values — the CRM Contact card's Circle field — where an
   .sm box would stand taller than the values in the fields beside it. */
.btn.xs{height:22px;padding:0 8px;gap:5px;font-size:var(--fs-12, 12.5px);border-radius:var(--r-8, 7px)}
.btn.xs svg,.btn.xs i[data-lucide]{width:13px;height:13px}
/* Icon-only button: the label lives in `title`/`aria-label` and shows on hover.
   For a DENSE action row where the words do not fit — the tray item header runs
   eight of these, and spelled out they wrapped onto a second line and pushed the
   item name out of view. Square, so a run of them reads as one strip of icons
   rather than a ragged row of pills. Never use it where there IS room: a lone
   button with space for its word should carry the word. The standing exceptions
   are the actions that repeat across pages and whose glyph IS the name: Export
   (file-spreadsheet), Pin (bookmark), Email-on-a-schedule (clock), Refresh,
   Packing slip (printer), Print label (tag), Labels (printer) and Activity log
   (history) are always icon-only, with `data-tip` + `aria-label`, wherever they
   appear. Back keeps its word. */
.btn.icon{position:relative;padding:0;width:var(--btn-h);justify-content:center;gap:0}
.btn.icon.sm{width:var(--btn-h-sm)}
.btn.icon.xs{width:22px}
/* The Circle's logo glyph (the C and its dot, public/circle/logo-glyph.svg) as a
   button's icon, on every button that invites a customer to The Circle — a brand
   mark, not a Lucide glyph. Drawn through a mask so it takes the button's text
   colour like the icons beside it (--on-brand on a filled .btn.primary included).
   The file is cropped like a Lucide icon, so it takes exactly an icon's size. */
.circle-mark{display:inline-block;flex:none;width:16px;height:16px;background:currentColor;
  -webkit-mask:url(../circle/logo-glyph.svg) center/contain no-repeat;mask:url(../circle/logo-glyph.svg) center/contain no-repeat}
.btn.xs .circle-mark{width:13px;height:13px}
/* A count riding the top-right corner of an icon button — the same idea as the
   topbar's .presence-count, in tokens that read on a page surface instead of the
   coloured topbar. --on-brand is the ONLY correct text token on an accent fill
   (white on blue in light, dark on the lifted blue in dark). No ring: the surface behind
   it changes on hover (--surface-2 → --surface-3 on a tray item header), and a
   ring pinned to one of them reads as a halo on the other.
   ALWAYS rendered and hidden at zero, so a first note is a text change rather
   than an insertion that resizes the button and shifts the row. */
.btn-count{
  position:absolute;top:-5px;right:-5px;min-width:17px;height:17px;padding:0 4px;box-sizing:border-box;
  border-radius:var(--r-full, 999px);background:var(--accent);color:var(--on-brand);
  font-family:var(--font-mono);font-size:var(--fs-11, 10.5px);font-weight:700;font-variant-numeric:tabular-nums;
  line-height:17px;text-align:center;pointer-events:none;
}
.btn-count[hidden]{display:none}
/* ===== The app-wide fast tooltip (/js/tooltip.js, `data-tip`) ==============
   The native `title` tooltip waits ~1s. On an icon-only control the label IS
   the button's name, so a second of hovering per icon is slower to read than
   the text the icon replaced. `data-tip` shows this bubble after 120ms.
   Use `data-tip` INSTEAD of `title` (both = two tooltips, one fast one slow)
   and pair it with `aria-label` for assistive tech. tooltip.js also upgrades a
   `title` it finds on any button/link — including ones rendered or re-labelled
   after load — so every control in the app resolves to THIS bubble. A `title`
   on a non-control (the full text of a truncated cell) is left native, and a
   DISABLED control is handed back to `title` because it fires no hover.
   ONE element, appended to <body> and positioned with fixed coords by the
   script — a `::after` on the control would be clipped by any overflow:hidden
   ancestor, and `.tray-item` (the densest icon row in the app) is one.
   z-index sits above modals (9000-9500) but below the toast region (99996). */
.tip{
  position:fixed;z-index:9800;display:none;max-width:280px;
  padding:5px 9px;border-radius:var(--r-8, 7px);
  background:var(--surface);color:var(--text);border:1.25px solid var(--border);
  font-family:var(--font-body);font-size:var(--fs-12, 12px);font-weight:500;line-height:1.35;
  box-shadow:var(--shadow-md);pointer-events:none;white-space:pre-line;
}
.tip.open{display:block}
/* On touch the bubble opens on PRESS-AND-HOLD (tooltip.js): the browser's own long-press
   callout (copy / open link) would race it, so it is off on every labelled control. */
[data-tip]{-webkit-touch-callout:none}
/* A disabled button's badge must fade with it, or a greyed-out control keeps a
   full-strength accent dot that reads as live. */
.btn:disabled .btn-count,.btn[disabled] .btn-count{opacity:.45}
.btn:disabled,.btn[disabled],.btn[aria-disabled="true"],.btn:disabled:hover,.btn[disabled]:hover,.btn[aria-disabled="true"]:hover{background:var(--surface-2);border-color:var(--border);color:var(--text-faint);cursor:not-allowed;box-shadow:none;filter:none;opacity:1}

/* ========================= WORKING, THEN DONE =========================
   App.busy (/js/cta.js; owner, 2026-11-14, the "Sellevry Main Buttons" mock: "implement it like
   this"): a button answers in place. Working: it keeps its width and its colours — it is disabled so
   it can't be pressed twice, and this block keeps the disabled grey off it — with a spinner beside
   its words. Done: a filled button turns green with a check that draws itself ("Saved"), a plain one
   takes the soft green. The tray page's Mark as done & next wears the same (edit-tray.js). Every
   width; the motion around it (look.css "THE MAIN BUTTON") is a computer's only.
   Tested by src/ui/cta-motion.browser.test.js. */
.btn[data-busy],.btn[data-done]{justify-content:center;opacity:1}
.btn[data-busy]{cursor:progress}
.btn.primary[data-busy],.btn.primary[data-busy]:hover{background:linear-gradient(135deg, var(--accent), var(--accent-end, var(--accent-strong, var(--accent))));border-color:var(--accent);color:var(--on-brand);filter:none}
.btn:not(.primary)[data-busy],.btn:not(.primary)[data-busy]:hover{background:var(--surface);border-color:var(--border);color:var(--text)}
.btn.primary[data-done],.btn.primary[data-done]:hover{background:linear-gradient(135deg, var(--green), color-mix(in srgb, var(--green) 78%, var(--accent)));border-color:var(--green);color:var(--on-brand);filter:none;cursor:default;animation:btn-done var(--dur-slow) var(--ease) 1}
.btn:not(.primary)[data-done],.btn:not(.primary)[data-done]:hover{background:var(--green-bg);border-color:transparent;color:var(--green-text);cursor:default}
@keyframes btn-done{40%{scale:1.035}}
.btn-face{display:inline-flex;align-items:center;gap:7px;animation:btn-face-in var(--dur) var(--ease) both}
@keyframes btn-face-in{from{opacity:0;translate:0 3px}}
.btn-spin{flex:none;width:14px;height:14px;box-sizing:border-box;border-radius:var(--r-full, 999px);border:2px solid color-mix(in srgb, currentColor 32%, transparent);border-top-color:currentColor;animation:btn-spin .7s linear infinite}
@keyframes btn-spin{to{rotate:360deg}}
.btn-check path{stroke-dasharray:24;stroke-dashoffset:24;animation:btn-draw var(--dur-slow) var(--ease) forwards}
@keyframes btn-draw{to{stroke-dashoffset:0}}

/* ============================== FORM COMMIT ==============================
   A long create form's finishing button never hides below the screen (owner, 2026-11-14, the main
   buttons check: New repair ticket's Create ticket sat 194px below a laptop's screen, and nothing on
   the first screen said how to finish). `.form-commit` is the form's LAST child (outside its cards,
   so it can travel the whole form): on a computer it rides along at the bottom of the window while
   the form runs on below, and settles into place at the form's end. A phone keeps it in place: a
   bar pinned over the fields would sit on what the keyboard leaves. New repair ticket and New
   warranty are the worked examples. */
.form-commit{display:flex;align-items:center;justify-content:flex-end;gap:12px;padding:10px 12px 10px 16px;
  border:1px solid var(--border);border-radius:var(--r-12, 12px);background:var(--surface)}
.form-commit > .t-cap{margin:0 auto 0 0;min-width:0}
@media (min-width:769px){
  .form-commit{position:sticky;bottom:var(--rail-inset, 8px);z-index:5;box-shadow:var(--elev-3, 0 8px 24px -10px rgb(11 21 48 / .25))}
}

/* ---- Legacy button vocab → canonical theme-driven look. SINGLE source of
   truth that retires admin-buttons.css + the scattered per-page skins. Primary
   group (save/add) = accent gradient like .btn.primary; neutral group
   (secondary/run) = base surface; danger group (reset/err-del) = .btn.danger.
   Base layout sits in :where() (ZERO specificity) so a real base class (.btn,
   .small-btn) ALWAYS wins sizing — this fallback only shapes TRULY-standalone
   legacy buttons (no height, so it never leaks into .small-btn sizing). Colors
   use normal specificity and layer on whatever base. All theme-accent driven —
   NO hard-coded color — so buttons match in BOTH themes and everywhere. ---- */
:where(.save-btn,.reset-btn){
  display:inline-flex;align-items:center;gap:8px;padding:9px 15px;border-radius:var(--r-12, 10px);
  font-family:inherit;font-size:var(--fs-14, 13.5px);font-weight:600;line-height:1.1;cursor:pointer;
  border:1px solid var(--border);background:var(--surface);color:var(--text);
  transition:var(--dur-fast) var(--ease);white-space:nowrap;
}
.save-btn svg,.reset-btn svg,.save-btn i[data-lucide],.reset-btn i[data-lucide]{width:16px;height:16px}
/* primary = accent gradient (identical to .btn.primary) */
.save-btn{background:linear-gradient(135deg, var(--accent), var(--accent-end, var(--accent-strong, var(--accent))));border-color:var(--accent);color:var(--on-brand);box-shadow:0 2px 6px color-mix(in srgb, var(--accent) 26%, transparent)}
.save-btn:hover{filter:brightness(1.06)}
/* danger = soft-red (identical to .btn.danger) */
.reset-btn{background:var(--red-bg);border-color:transparent;color:var(--red-text)}
.reset-btn:hover{background:color-mix(in srgb,var(--red) 18%,transparent)}
/* disabled parity */
.save-btn:disabled,.reset-btn:disabled,.save-btn[disabled]{background:var(--surface-2);border-color:var(--border);color:var(--text-faint);cursor:not-allowed;box-shadow:none;filter:none;opacity:1}

/* ============================ PRESS FEEDBACK ============================
   A control answers the PRESS, not just the hover (2026-10-06). Before this a
   click looked exactly like nothing happening — most of why the app felt
   stiff. While held, a button sinks 1px and shrinks a hair, instantly
   (--dur-instant); on release it eases back at its own --dur-fast. A filled
   (primary) button also darkens a touch and drops its shadow, so it reads as
   pushed in. A disabled control never moves. The rail's links scale; a tab
   gets a soft fill instead (an underline that jumps reads as a glitch), and a
   menu entry (a row in a popover) one step darker than its hover. The
   composer's send is a filled button like any other (the CRM inbox's had no
   press at all — owner, 2026-10-23: "dont have the same UI effects").
   Transform only — the box never changes size, so nothing around it moves.
   iOS applies :active only when the page has a touchstart listener;
   tooltip.js registers one app-wide. A photo viewer's ← / → arrows join it
   (owner, 2026-10-22: "i like it"); they are centred with `translate`, so the
   press's `transform` sinks them instead of undoing the centring. Tested by
   src/ui/motion-tokens.test.js + src/ui/motion.browser.test.js +
   src/ui/viewer-arrows.browser.test.js. */
:is(.btn,.inv-btn,.save-btn,.reset-btn,.pager .pager-link,.pd-ch-link,.tag-x,.sw-head-act,.sally-chip,.x-modal__nav,.lightbox-prev,.lightbox-next,.inv-image-viewer-nav,.composer-send):active:not(:disabled,.disabled,[aria-disabled="true"]){
  transform:translateY(1px) scale(.98);transition-duration:var(--dur-instant)}
:is(.btn.primary,.save-btn,.composer-send):active:not(:disabled,.disabled,[aria-disabled="true"]){
  filter:brightness(.95);box-shadow:0 1px 2px color-mix(in srgb, var(--accent) 22%, transparent)}
.navlink:active{transform:scale(.96);transition-duration:var(--dur-instant)}
.tabs a:active,.tabs>button:not(.btn):active{background:var(--surface-2);border-radius:var(--r-8, 8px) var(--r-8, 8px) 0 0}
:is(.act-menu-item,.user-menu-item,.ib-opt,.mention-opt,.check-item):active:not(:disabled){background:var(--surface-3);transition-duration:var(--dur-instant)}

/* ============================== OPENING ==============================
   Every popover opens the same way: a short fade with a 4px drop, over
   --dur-fast (2026-10-06) — the action menu, the checkbox dropdowns, the
   avatar menu, the search results, the tooltip. The animation is keyed on the
   state that shows the popover ([open] / not [hidden] / .open), so it replays
   on every open, in every browser. Closing is the next block. It uses the
   individual `translate` property,
   never `transform`, so a popover centred with transform (.search-results)
   keeps its centring. A new popover joins this list; never give one its own
   entrance animation. */
@keyframes pop-in{from{opacity:0;translate:0 -4px}}
details.act-menu[open]>.act-menu-pop,
details.inv-dropdown[open]>.inv-dropdown-panel,
.user-menu-dropdown:not([hidden]),
.search-results:not([hidden]),
.filter-pop:not([hidden]),
.mention-pop:not([hidden]),
.fe-pop:not([hidden]),
.tip.open{animation:pop-in var(--dur-fast) var(--ease)}
/* a modal's backdrop fades in under the modal's own pop (xModalPop) */
@keyframes backdrop-in{from{opacity:0}}
.x-modal-backdrop.open{animation:backdrop-in var(--dur) var(--ease)}

/* ============================== CLOSING ==============================
   A popover or a dialog fades out instead of vanishing (2026-10-07, owner:
   more motion): the same fade and 4px lift as its opening, run backwards, over
   --dur on --ease-exit — it holds, then speeds away. (The first version ran
   on --dur-fast/--ease: 80% of the fade was gone in 40ms and the owner saw no
   fade at all.) The rule sits on the CLOSED state only, so it never runs on open
   (the pop-in above does that). While it fades it takes no pointer and a click
   lands on whatever is under it, so a closing menu never costs a click; the
   app.confirm/alert box also stops answering keys the moment it closes
   (ui-modal checks .open). `display` / `content-visibility` flip at the END of
   the fade (allow-discrete), which keeps the box drawn while it fades; a
   browser without discrete transitions snaps shut, as before. A new popover or
   dialog joins this list AND the opening list above. */
details:is(.act-menu,.inv-dropdown)::details-content{transition:content-visibility var(--dur) allow-discrete}
details.act-menu:not([open])>.act-menu-pop,
details.inv-dropdown:not([open])>.inv-dropdown-panel,
.user-menu-dropdown[hidden],
.search-results[hidden],
.filter-pop[hidden],
.mention-pop[hidden],
.fe-pop[hidden],
.tip:not(.open),
.x-modal-backdrop:not(.open),
.app-modal-backdrop:not(.open){
  opacity:0;pointer-events:none;
  transition:opacity var(--dur) var(--ease-exit),translate var(--dur) var(--ease-exit),display var(--dur) allow-discrete}
details.act-menu:not([open])>.act-menu-pop,
details.inv-dropdown:not([open])>.inv-dropdown-panel,
.user-menu-dropdown[hidden],
.search-results[hidden],
.filter-pop[hidden],
.mention-pop[hidden],
.fe-pop[hidden]{translate:0 -4px}

/* Accordions — a <details> that discloses a SECTION of the page — slide open
   and shut (Chrome/Edge 131+; other browsers snap, as before). The content is
   clipped only while it moves: `overflow` flips to visible once the slide
   ends, so a dropdown inside an open section is never cut off. A <details>
   used as a dropdown (its content is a floating panel) must be listed in the
   :not() — the slide would clip the panel (.nav-menu: the website's phone Menu,
   views/site/partials/nav — the site has its own sheet, listed so it never is). */
details:not(.act-menu,.inv-dropdown,.nav-menu){interpolate-size:allow-keywords}
details:not(.act-menu,.inv-dropdown,.nav-menu)::details-content{
  block-size:0;overflow:clip;
  transition:block-size var(--dur) var(--ease-in-out),content-visibility var(--dur) allow-discrete,overflow 0s allow-discrete}
details:not(.act-menu,.inv-dropdown,.nav-menu)[open]::details-content{
  block-size:auto;overflow:visible;
  transition:block-size var(--dur) var(--ease-in-out),content-visibility var(--dur) allow-discrete,overflow 0s var(--dur) allow-discrete}

/* ============================== DOCK BAR ==============================
   The action bar that stays in reach while you work down a long page: it sits
   at the end of the page's content and sticks 12px above the bottom of the
   screen (on a phone it IS the screen's bottom edge, side to side, above the
   home indicator — mobile.css). The review page's decision bar is the original;
   the product page's Save bar is this (2026-10-11, owner: "make the save bar
   sticky at the page bottom like on the review page"). A page puts it LAST in
   its content column; never position:fixed (it would cover the page's foot). */
.dock-bar{position:sticky;bottom:12px;z-index:30;display:flex;align-items:center;flex-wrap:wrap;gap:10px 14px;margin:16px 0 8px;padding:10px 14px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-lg)}
.dock-bar[hidden]{display:none}

/* ========================= CLICKABLE CARD LIFT =========================
   ONE hover lift for a card you can click (2026-10-06): it rises 2px onto the
   large shadow, and sinks back while pressed. There were six versions (-1, -2
   and -3px; three different shadows). A card that only shows information
   never moves: lift means "this opens something". Only where the pointer can
   really hover (a tap on a phone would leave it stuck up). A card's own
   :hover rule keeps its border/colour change, never its own lift. A new
   clickable card class joins this list. Rows of a table don't lift (it would
   break the grid); they keep the row highlight. */
:is(.tile,.report-card,.kcard,.scan-btn,.kpi.kpi-filter,a.kpi,a.card,button.pd-glance-card,.pd-order:not(.pd-order-skel),.dash-widget[data-widget-href]>:is(.kpi,.dash-widget-card)){
  transition:transform var(--dur-fast) var(--ease),box-shadow var(--dur-fast) var(--ease),border-color var(--dur-fast) var(--ease),color var(--dur-fast) var(--ease),background-color var(--dur-fast) var(--ease)}
@media (hover:hover){
  :is(.tile,.report-card,.kcard,.scan-btn,.kpi.kpi-filter,a.kpi,a.card,button.pd-glance-card,.pd-order:not(.pd-order-skel),.dash-widget[data-widget-href]>:is(.kpi,.dash-widget-card)):hover{transform:translateY(-2px);box-shadow:var(--shadow-lg)}
}
:is(.tile,.report-card,.kcard,.scan-btn,.kpi.kpi-filter,a.kpi,a.card,button.pd-glance-card,.pd-order:not(.pd-order-skel),.dash-widget[data-widget-href]>:is(.kpi,.dash-widget-card)):active{transform:none;transition-duration:var(--dur-instant)}

.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);padding:0}
/* Side-by-side cards that stack on a phone: each keeps a preferred width but never
   exceeds the screen (an inline min-width:400px did, on Marketing — 2026-09-26).
   `.wide` / `.narrow` set the share and preferred width of a card in the row. */
.card-row{display:flex;gap:16px;flex-wrap:wrap;align-items:stretch;margin-bottom:16px}
.card-row>.card{flex:1 1 400px;min-width:min(400px,100%);display:flex;flex-direction:column}
.card-row>.card.wide{flex:2 1 380px;min-width:min(380px,100%)}
.card-row>.card.narrow{flex:1 1 300px;min-width:min(300px,100%)}
.pad{padding:var(--box-pad)}
.card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px var(--box-pad);border-bottom:1px solid var(--border)}
/* Inside an already-padded card (.card.pad) the head must not double-pad: sit
   flush with the card's own padding and put breathing room under the divider,
   so the rule line never touches the content that follows. */
.pad > .card-head{padding:0 0 10px;margin:0 0 12px}
.card-head h3{font-size:var(--fs-14, 14px);font-weight:600}
.card-head .cap{font-size:var(--fs-12, 12px);color:var(--muted)}

.pill{display:inline-flex;align-items:center;gap:5px;height:22px;padding:0 9px;border-radius:var(--r-16, 20px);font-size:var(--fs-12, 11.5px);font-weight:600;line-height:1;white-space:nowrap;vertical-align:middle}
.pill .pd{width:6px;height:6px;border-radius:50%;background:var(--pill-dot,currentColor)}
.pill svg,.pill i[data-lucide]{width:13px;height:13px;flex-shrink:0}
/* A pill that fits a small caption line — a status beside a field label (the CRM
   Contact card's "The Circle ?") without making that line taller than its neighbours'. */
.pill.xs{height:18px;padding:0 7px;gap:4px;font-size:var(--fs-11, 10.5px)}
.pill.xs .pd{width:5px;height:5px}
/* The WORD is the status's text step (≥ 4.5:1 on its tint, on a card, the page and a
   striped row — theme.css --*-text); the dot (--pill-dot) and the tint stay the status
   colour itself. src/ui/status-contrast.browser.test.js */
.pill.green{--pill-dot:var(--green);color:var(--green-text);background:var(--green-bg)}
.pill.blue{--pill-dot:var(--blue);color:var(--blue-text);background:var(--blue-bg)}
.pill.amber{--pill-dot:var(--amber);color:var(--amber-text);background:var(--amber-bg)}
.pill.red{--pill-dot:var(--red);color:var(--red-text);background:var(--red-bg)}
.pill.gray{--pill-dot:var(--gray);color:var(--gray-text);background:var(--gray-bg)}
.pill.violet{color:var(--violet);background:var(--violet-bg)}
.pill.magenta{color:var(--magenta);background:var(--magenta-bg)}
/* Two pills that qualify ONE thing (a status + "3/5 on tray") stack instead of
   sitting side by side: on one line the cell is as wide as both pills together,
   which is what made the purchases Progress column the widest on the page. */
.pill-stack{display:inline-flex;flex-direction:column;align-items:flex-start;gap:4px}
/* A SEARCH HIT — the searched words marked inside a result's text (the CRM inbox
   rows, src/crm/comms/inbox-search.js highlightHtml). The amber pill's own pair,
   so it reads in both themes; no padding, so a marked word never widens its line. */
mark.hit{background:var(--pill-amber-bg);color:var(--pill-amber-text);border-radius:var(--r-4, 3px);padding:0}

.grid{display:grid;gap:14px}
/* Auto-fitting grid of wide content cards (settings/config panels that hold a
   form, not a number). Wraps to one column below ~360px of available width —
   use instead of .field-grid, whose 190px track is sized for single inputs. */
.grid.cards-wide{grid-template-columns:repeat(auto-fit,minmax(min(360px,100%),1fr))}
.kpis{grid-template-columns:repeat(4,1fr)}
.kpi{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:14px 14px 10px;box-shadow:var(--shadow);position:relative;overflow:hidden}
.kpi .lbl{font-size:var(--fs-12, 12px);color:var(--muted);display:flex;align-items:center;gap:7px;font-weight:500}
.kpi .lbl svg,.kpi .lbl i[data-lucide]{width:15px;height:15px}
/* line-height 1.1 — a display number carries its own leading; inheriting the
   body's 1.5 put 15px of dead space around every KPI value and made the tile
   12px taller than the same tile on Inventory (.inv-kpi-value, which has always
   been 1.1). Keep the two in step. */
.kpi .val{font-family:var(--font-display);font-size:var(--kpi-val);font-weight:600;margin-top:7px;letter-spacing:-.02em;line-height:1.1}
/* a figure stays on ONE line — never "$780,135.8" / "5"; one wider than its tile is set
   smaller to fit by App.fitFigure (format.js) — the P&L's own .kpi-card tiles too */
:is(.kpi,.inv-kpi) .val,.kpi-card .kpi-value{white-space:nowrap}
/* The sub-line under a KPI number carries more than one fact on several tiles
   ("+57% · 6d" PLUS "oldest 77d"; "3 critical" PLUS "1 warning"), and as one
   nowrap line it ran off the tile / under the sparkline. It is a WRAPPING box:
   the headline stays on row 1, `.delta-note` (the trailing detail) always takes
   row 2, indented to the icon's width so it lines up under the headline text.
   align-content:flex-start keeps row 1 at the same y whether or not row 2 is
   used, so tiles read level. */
.kpi .delta{display:flex;flex-wrap:wrap;align-items:center;align-content:flex-start;column-gap:3px;row-gap:0;font-size:var(--fs-12, 12px);font-weight:600;margin-top:5px;line-height:18px}
.kpi .delta svg,.kpi .delta i[data-lucide]{width:13px;height:13px}
/* The note is a FACT ("188 answers", "oldest 12d"), not the delta's verdict: it never
   inherits the delta's green / red. A note that has a meaning of its own ("5 warning",
   a stalled tray) carries its own colour (noteColor). */
.kpi .delta .delta-note{flex:0 0 100%;padding-left:16px;font-weight:500}
:where(.kpi .delta .delta-note){color:var(--text-muted)}
/* A tracking number in a tile's line: the carrier and the number stay on one line and
   the number ends in … when the tile is too narrow; the rest of the line (· Arrived …)
   is its own <span> after it. The full number is the link's data-tip / the span's title
   (owner, 2026-10-22, the mail-in purchase and trade-in tiles). */
.kpi .delta .delta-track{display:inline-flex;align-items:baseline;min-width:0;max-width:100%;white-space:nowrap}
.kpi .delta .delta-track > :last-child{min-width:0;overflow:hidden;text-overflow:ellipsis}
.up{color:var(--green-text)} .down{color:var(--red-text)}
/* The decorative trend line behind a KPI tile's number. A PERCENTAGE width (not
   a fixed 120px, which hugged the right edge and left the tile's whole left half
   empty) so it grows with the tile / grid track.
   THE TRAP: do NOT size it with left+right offsets. An <svg> is a REPLACED
   element, so with width:auto it takes its INTRINSIC width from the viewBox
   ratio (120/46 x height:46px = 120px) and the over-constrained `right` is then
   dropped — the box stayed 120px, slid inward to the `left` offset and sat on
   top of the number with dead space to its right. Only an explicit width works.
   ONE rule for both tile flavours: the dashboard .kpi and Inventory's .inv-kpi
   (inventory.css used to carry an identical copy) — mirrors, keep them in step. */
.kpi .spark,.inv-kpi .spark{position:absolute;right:0;bottom:0;width:60%;height:46px;opacity:.9;pointer-events:none;z-index:0}
/* A tile's trend line is decoration, so it is neutral whatever colour the page drew
   it in: the trend's meaning (good / bad) is the coloured text above it (colour
   system, owner 2026-10-21). CSS beats the SVG's own stroke / stop-color attributes. */
:is(.kpi,.inv-kpi) .spark stop{stop-color:var(--spark)}
:is(.kpi,.inv-kpi) .spark path[stroke]{stroke:var(--spark)}
/* Text above the line where they overlap — a wider spark now runs under the
   value, and an absolutely-positioned sibling otherwise paints over inline text
   whatever its z-index. (.inv-kpi does the same for its own three lines.) */
.kpi .lbl,.kpi .val,.kpi .delta{position:relative;z-index:1}
/* …lifted INSIDE the tile, never over the page: the tile is a layer of its own, so a
   popover from a card above it (Sally's Recents list, a menu) still paints over its
   label — the label's z-index 1 beat the Sally card's from later in the page (2026-10-22). */
.kpi{isolation:isolate}

/* Clickable KPI tile that FILTERS the list below it (drift errors, and any
   future summary strip whose tiles narrow the table under them). The tile is a
   real <button>, so it keeps keyboard focus + Enter/Space for free; these rules
   only strip the button chrome back to the .kpi box and add the affordance.
   `.is-active` marks the tile whose filter is currently in force — it must
   always agree with the filter bar, never be a second source of truth. */
.kpi.kpi-filter{
  cursor:pointer;transition:var(--dur-fast) var(--ease);text-align:left;width:100%;font:inherit;color:inherit;
  appearance:none;-webkit-appearance:none;display:block;text-decoration:none;
}
.kpi.kpi-filter:hover{border-color:var(--accent)}
.kpi.kpi-filter:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.kpi.kpi-filter.is-active{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}
.kpi.kpi-filter.is-active .lbl{color:var(--text)}

.tiles{grid-template-columns:repeat(4,1fr)}
.tile{
  background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:18px;
  box-shadow:var(--shadow);cursor:pointer;transition:var(--dur-fast) var(--ease);display:flex;flex-direction:column;gap:12px;min-height:128px;
}
.tile:hover{border-color:var(--border-strong)}
/* An icon tile names a place, it is not a status: ONE neutral look (colour system,
   owner 2026-10-21). The .green/.amber/… variants below are for a tile whose colour
   MEANS something — never to tell workspaces apart. */
.tile .ic{width:42px;height:42px;border-radius:var(--r-12, 11px);display:grid;place-items:center;background:var(--surface-3);color:var(--text-2)}
.tile .ic svg,.tile .ic i[data-lucide]{width:21px;height:21px}
/* A tile icon in a status tone — `<div class="ic green">` (Marketing hub). */
.tile .ic.green{background:var(--green-bg);color:var(--green)}
.tile .ic.blue{background:var(--blue-bg);color:var(--blue)}
.tile .ic.amber{background:var(--amber-bg);color:var(--amber)}
.tile .ic.red{background:var(--red-bg);color:var(--red)}
.tile .ic.gray{background:var(--gray-bg);color:var(--gray)}
.tile .ic.violet{background:var(--violet-bg);color:var(--violet)}
.tile h3{font-size:var(--fs-15, 15px);font-weight:600}
.tile p{font-size:var(--fs-12, 12.5px);color:var(--muted);margin:2px 0 0;line-height:1.45}
.tile .tcount{margin-left:auto;font-family:var(--font-mono);font-size:var(--fs-12, 11.5px);color:var(--text-2);background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-8, 7px);padding:2px 8px}
.tile .trow{display:flex;align-items:center;gap:10px}

/* table */
.tablewrap{overflow:auto;border-radius:var(--radius);background:var(--surface);border:1px solid var(--border);box-shadow:var(--shadow)}
/* Bounded list: keeps a card a predictable height while every row stays
   reachable by scrolling (paired columns that must not out-grow each other). */
.tablewrap.scroll-y{max-height:340px;overflow-y:auto}
.tablewrap.scroll-y thead th{position:sticky;top:0;z-index:1;background:var(--surface-2)}
.card .tablewrap{background:transparent;border:0;box-shadow:none;border-radius:0}
/* Full-bleed tablewrap flush to a card edge must round to match the card, so its
   overflow:auto clips the sticky header / last row instead of poking square corners
   past the card's rounded corners. Interior tablewraps (mid-card) stay square.
   mobile-tables.js puts its phone sort bar (.mtbl-sort, hidden on a desktop) in
   FRONT of every 4+ column table, so a leading one doesn't count as content. */
.card>.tablewrap:first-child,.card>.mtbl-sort:first-child+.tablewrap{border-top-left-radius:var(--radius);border-top-right-radius:var(--radius)}
.card>.tablewrap:last-child{border-bottom-left-radius:var(--radius);border-bottom-right-radius:var(--radius)}
table{width:100%;border-collapse:collapse;font-size:var(--fs-13, 13px)}
thead th{
  text-align:left;font-weight:600;color:var(--th-fg);font-size:var(--fs-11, 11px);letter-spacing:.03em;text-transform:uppercase;
  padding:var(--cell-py) var(--cell-px);background:var(--th-bg);
  border-bottom:1px solid var(--th-border);position:sticky;top:0;white-space:nowrap;
}
tbody td{padding:var(--cell-py) var(--cell-px);border-bottom:1px solid var(--border);white-space:nowrap}
tbody tr{cursor:pointer;transition:background var(--dur-fast) var(--ease)}
tbody tr:hover{background:var(--surface-2)}
tbody tr:last-child td{border-bottom:none}
.t-strong{font-weight:600}
.t-mut{color:var(--muted)}
/* An icon leading a muted note (`<p class="t-mut"><i data-lucide="info"></i> …`) sits in running text —
   Lucide draws every icon at 24px, so size it to the line instead of letting it tower over the words. */
p.t-mut > svg.lucide,p.t-mut > i[data-lucide]{width:1em;height:1em;vertical-align:-.15em}
.cellflex{display:flex;align-items:center;gap:10px}
/* The row-selection column of a table with bulk actions: a narrow cell holding one checkbox. */
.table .pick,.inv-table .pick{width:36px;padding-right:0}
.table .pick input[type=checkbox],.inv-table .pick input[type=checkbox]{accent-color:var(--accent);margin:0;cursor:pointer;vertical-align:middle}
/* A cell that belongs WITH the column beside it — a status pill and the button that
   acts on it, a value and its unit. The two 16px gutters between the columns add up
   to a 32px hole that reads as two unrelated groups, so the trailing one is dropped
   and the pair reads as one cluster (same idea as .pick above). Put it on the <th>
   too, or the header and its column no longer line up. */
.table td.joins-next,.table th.joins-next{padding-right:0}
.thumb{width:34px;height:34px;border-radius:var(--r-8, 8px);display:grid;place-items:center;background:var(--surface-2);border:1px solid var(--border);color:var(--text-2);flex-shrink:0}
.thumb svg,.thumb i[data-lucide]{width:17px;height:17px}

.toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:12px}
/* A toolbar sitting directly under a card header needs space from the divider. */
.card-head + .toolbar{margin-top:16px}
/* An unpadded card's toolbar lines up with its .card-head (20px sides) instead
   of pressing its first control against the card border. A .card.pad already
   supplies that inset, so it is left alone. */
.card:not(.pad) > .toolbar{padding-inline:20px}
.card:not(.pad) > .filter-chips{padding-inline:20px}   /* the head row's chips keep the same inset (My Work → Fraud) */
/* Expandable / drill-down table rows: click a row to reveal a detail sub-row. */
.table tr.drill-row{cursor:pointer}
.table tr.drill-row .drill-caret{width:14px;height:14px;vertical-align:middle;color:var(--muted);transition:transform var(--dur) var(--ease)}
.table tr.drill-row:hover .drill-caret{color:var(--text)}
.table tr.drill-row.open .drill-caret{transform:rotate(90deg);color:var(--accent)}
.table tr.drill-detail>td{padding:0}
.table tr.drill-detail .drill-body{padding:2px 4px 12px;animation:drillIn var(--dur) var(--ease)}
@keyframes drillIn{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
/* ROW DROP-DOWN (/js/row-drill.js — the new layout's mock, owner 2026-10-24): a row opens IN
   PLACE. Its band grows from nothing on the panel's curve (grid rows 0fr → 1fr, so the rows
   below glide down, never jump) and what is in it fades in; the open row wears the quick
   look's current tint and its chevron, at the row's end, turns. The band is boxes — the
   item lines wide, the facts beside them — which stack by the band's OWN width (a narrow
   card such as Customer 360's column takes two rows), and one column on a phone (mobile.css). */
.table td.drill-cell,.table th.drill-cell{width:1%;padding-left:0;text-align:right}
.table .drill-chev{width:16px;height:16px;vertical-align:middle;color:var(--text-muted);transition:rotate var(--dur-slow) var(--ease),color var(--dur-fast) var(--ease)}
.table tr.drill-row.open .drill-chev{rotate:180deg;color:var(--text)}
.table tr.row-link.drill-row.open > td{background:var(--accent-soft)}
tbody tr.drill-detail:hover{background:none}
.table tr.drill-detail > td{white-space:normal;cursor:auto}
.drill-pane{display:grid;grid-template-rows:0fr;container-type:inline-size;transition:grid-template-rows var(--dur-panel) var(--ease-glide)}
.drill-pane.open{grid-template-rows:1fr}
.drill-pane-clip{min-height:0;overflow:hidden}
.drill-pane-in{opacity:0;translate:0 -6px;transition:opacity var(--dur-slow) var(--ease),translate var(--dur-panel) var(--ease-glide)}
.drill-pane.open .drill-pane-in{opacity:1;translate:none}
.drill-boxes{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr) minmax(0,1.2fr);gap:12px;padding:8px 16px 16px}
@container (max-width:820px){.drill-boxes{grid-template-columns:repeat(2,minmax(0,1fr))}.drill-box.wide{grid-column:1 / -1}}
@container (max-width:480px){.drill-boxes{grid-template-columns:minmax(0,1fr)}}
.drill-box{min-width:0;display:flex;flex-direction:column;padding:12px 14px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface)}
.drill-box h4{display:flex;align-items:center;gap:6px;margin:0 0 8px;font:600 var(--fs-12, 11.5px) var(--font-body);letter-spacing:.06em;text-transform:uppercase;color:var(--text-muted)}
.drill-box h4 svg,.drill-box h4 i[data-lucide]{width:14px;height:14px}
.drill-box h4 .cap{font:500 var(--fs-12, 11.5px) var(--font-mono);letter-spacing:0;text-transform:none}
.drill-box p,.drill-msg{margin:0;line-height:1.45}
.drill-msg{padding:12px 16px}
.drill-addr{margin:0 0 6px;font-style:normal;line-height:1.45}
.drill-acts{display:flex;align-items:center;gap:4px;margin-top:auto;padding-top:12px}
.drill-acts .btn.primary{margin-left:auto}
/* Small thumbnail that shows a large floating preview on hover (JS positions it). */
.thumb-zoom{width:36px;height:36px;object-fit:cover;border-radius:var(--r-6, 6px);border:1px solid var(--border);background:var(--surface-2);cursor:pointer;display:block}
.thumb-zoom-empty{display:inline-flex;align-items:center;justify-content:center;color:var(--muted)}
.thumb-zoom-preview{position:fixed;display:none;max-width:320px;max-height:320px;border-radius:var(--r-12, 10px);border:2px solid var(--surface);box-shadow:var(--elev-4, 0 10px 34px rgba(0,0,0,.4));z-index:9999;pointer-events:none;background:var(--surface)}
/* Whole-row link: the entire <tr> navigates to its data-href on click
   (the row still carries a real <a> in its first cell for keyboard/middle-click). */
tr.row-link,li.row-link{cursor:pointer}
/* Sub-row: a row that belongs to the row above it (the items a payment bought,
   listed under it). /js/ui-table.js keeps it with its parent through sorting and
   paging (data-child-row); this is what makes it READ as belonging there — a
   tinted band, a left rule, and the first cell stepped in under its parent's. */
.table tr.subrow>td{background:var(--surface-2);border-bottom-color:var(--border-light);font-size:var(--fs-12, 12.5px)}
.table tr.subrow:hover>td{background:var(--surface-3)}
.table tr.subrow>td:first-child{padding-left:38px;box-shadow:inset 3px 0 0 var(--border)}
/* The LAST sub-row of a group closes it off with the normal row border, so the
   group reads as one block rather than fading into the payment below it. */
.table tr.subrow:not(:has(+ tr.subrow))>td{border-bottom-color:var(--border)}
/* The photo column: a fixed, narrow cell so a row with no photo holds the same
   box as one with three, and the columns beside it never shift. */
.table td.thumbs,.table th.thumbs{width:1%;white-space:nowrap}
/* --- col-min: keep a column OUT of the spare-width sharing ---
   `table{width:100%}` hands a wide screen's slack to every auto column alike, so
   a column of short values (a date, a method, a check number, a row's buttons)
   grows just as much as the column of text that could actually use the room.
   `width:1%` asks for the least the content allows, so that column stays put and
   the slack goes to the columns that have something to show. Put it on the <th>
   AND the <td> — a header-only rule is overruled by the widest cell.
   It cannot help a table that already OVERFLOWS: with no slack to redirect,
   the levers there are `.table.compact` and capping the runaway columns. */
.table th.col-min,.table td.col-min{width:1%;white-space:nowrap}
/* --- col-tight: a column whose values are SHORT (a method, a check number) ---
   Such a column is sized by its HEADER plus the cell chrome, never by the data:
   a letter-spaced uppercase label, a 14px sort arrow and 16px of padding either
   side dwarf a value like `9001`. `col-min` cannot help once a table has no
   slack left to redirect. This gives back half the side padding, which
   is the only width left to reclaim. Use it only where the values really are
   short; a column of real text needs its air. */
.table th.col-tight,.table td.col-tight{padding-left:8px;padding-right:8px}
/* --- col-cap: a CEILING for a column of free text ---
   The other half of the overflow toolkit: `col-min` keeps a SHORT column out of
   the spare-width sharing, this one stops a LONG one (a name, a store, a
   description) from sizing the whole table off the longest value in it. Put it
   on the <td> with `<span class="cell-ellip fill">` around the value and the
   full text in the cell's title: the column stops at the cap, the text fills
   whatever width the column actually gets, and the … appears only when the
   value really doesn't fit — so a wide monitor opens the column back out
   instead of showing a truncated value next to empty space.
   Not on the <th>: the cap can be narrower than the header (`Entered by` on a
   laptop), and a header has no ellipsis to fall back on. The widest CELL is
   what sizes a column anyway, so the <td> alone does the job.
   The caps follow the viewport, like `.cell-ellip.fluid`; `sm` is for a short
   label column (a store, a person), the base one for the table's text column. */
.table td.col-cap{max-width:clamp(7rem,11vw,18rem)}
.table td.col-cap-sm{max-width:clamp(4.5rem,7vw,11rem)}
/* --- .table.compact: a denser table, for one with many columns ---
   The 16px of side padding on every cell is right for a table of five or six
   columns and is what pushes a nine-column one into a horizontal scroll: it
   spends ~100px on air alone. This takes back 6px a side, everywhere, so the
   row stays evenly spaced — unlike tightening single columns, which leaves
   gaps of different widths down the row. Reach for it before capping columns
   so hard that their text starts disappearing. */
.table.compact thead th,.table.compact tbody td{padding-left:10px;padding-right:10px}
/* …but the padding EXCEPTIONS still apply: a cell that joins the one beside it
   keeps no right gutter, and the checkbox column stays flush. Same specificity
   as the rule above, so they have to come after it — left before it, `compact`
   silently handed .joins-next its 10px back and the pair drifted apart again. */
.table.compact td.joins-next,.table.compact th.joins-next{padding-right:0}
.table.compact .pick{padding-right:0}
.table td.thumbs .cellflex{gap:4px}
.table td.thumbs .thumb-zoom{width:32px;height:32px}
.table td.thumbs .thumb{width:32px;height:32px}
/* A drill-detail item row that links somewhere (e.g. the product page) on click. */
.table tr.dq-item{cursor:pointer}
.table tr.dq-item:hover{background:var(--surface-2)}
/* Attention rows: tint a whole table row to flag it (e.g. an overdue shipment).
   Tinted cells only — no coloured edge; the row says WHY in a .pill (red
   "overdue" age, amber "No stock"). The hover tint is intentionally kept so the
   flag survives mouse-over instead of reverting to the neutral row hover. */
.table tr.row-danger>td{background:var(--red-bg)}
.table tr.row-danger:hover>td{background:var(--red-bg)}
.table tr.row-warn>td{background:var(--amber-bg)}
.table tr.row-warn:hover>td{background:var(--amber-bg)}
.tb-input{position:relative;flex:1;min-width:220px;max-width:340px}
.tb-input input{width:100%;height:var(--ctl-h);border-radius:var(--r-8, 8px);border:1px solid var(--border);background:var(--surface);padding:0 12px 0 34px;color:var(--text);outline:none;font-family:inherit;font-size:var(--fs-13, 13px)}
.tb-input input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
/* ONE placeholder colour for every field (zero specificity, so a field's own rule wins):
   the browser's default grey read 3.70:1 on a dark field — often the field's only label. */
:where(input,textarea)::placeholder{color:var(--text-muted);opacity:1}
.tb-input svg,.tb-input i[data-lucide]{position:absolute;left:11px;top:50%;transform:translateY(-50%);width:15px;height:15px;color:var(--muted)}
/* Wide search box — for a bar whose search is the main way in (names, SKUs and
   titles in one box). It takes most of the row's spare room, up to 560px, instead
   of splitting it 1:1 with .spacer. The 220px basis equals the base min-width, so
   the bar wraps at exactly the same width as with a plain .tb-input; only spare
   room moves. Use this, not an inline max-width. */
.tb-input.wide{flex:6 1 220px;max-width:560px}
.chip{display:inline-flex;align-items:center;gap:6px;height:var(--ctl-h);padding:0 11px;border-radius:var(--r-8, 8px);border:1px solid var(--border);background:var(--surface);color:var(--text-2);font-size:var(--fs-13, 13px);font-weight:500;cursor:pointer}
.chip svg,.chip i[data-lucide]{width:14px;height:14px}
.chip:hover{border-color:var(--border-strong);color:var(--text)}
/* Selected state for chips used as view filters (e.g. the 360 timeline kinds).
   Accent-soft fill + accent text so "which filter is on" reads at a glance in
   both themes — never hard-code a colour on a chip per page. */
.chip.is-on{background:var(--accent-soft);border-color:var(--accent-border);color:var(--accent);font-weight:600}
.chip.sm{height:28px;padding:0 10px;font-size:var(--fs-12, 12px);border-radius:var(--r-8, 8px)}
/* ── Social post preview (marketing → social composer) ──────────────────────
   A neutral mock of how a post renders on the picked platform: account header,
   media, caption, link card. Token-based so it reads correctly in both themes;
   deliberately platform-neutral chrome (we preview CONTENT, not Facebook's UI). */
.post-preview{border:1px solid var(--border);border-radius:var(--r-16, 14px);background:var(--surface);overflow:hidden;max-width:420px}
.post-preview .pp-head{display:flex;align-items:center;gap:9px;padding:10px 13px;border-bottom:1px solid var(--border)}
.post-preview .pp-avatar{width:30px;height:30px;border-radius:50%;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center;flex-shrink:0}
.post-preview .pp-avatar svg,.post-preview .pp-avatar i[data-lucide]{width:15px;height:15px}
.post-preview .pp-who{min-width:0}
.post-preview .pp-name{font-size:var(--fs-13, 13px);font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.post-preview .pp-sub{font-size:var(--fs-11, 11px);color:var(--muted)}
.post-preview .pp-img{display:block;width:100%;aspect-ratio:1/1;object-fit:cover;background:var(--surface-2)}
.post-preview .pp-img.tall{aspect-ratio:3/4}
.post-preview .pp-noimg{display:grid;place-items:center;aspect-ratio:1/1;background:var(--surface-2);color:var(--muted);font-size:var(--fs-12, 12.5px)}
.post-preview .pp-text{padding:11px 13px;font-size:var(--fs-14, 13.5px);line-height:1.5;color:var(--text);white-space:pre-line;overflow-wrap:anywhere}
.post-preview .pp-text .pp-link{color:var(--accent);word-break:break-all}
.post-preview .pp-linkcard{margin:0 13px 12px;border:1px solid var(--border);border-radius:var(--r-12, 10px);overflow:hidden}
.post-preview .pp-linkcard img{display:block;width:100%;aspect-ratio:2/1;object-fit:cover;background:var(--surface-2)}
.post-preview .pp-linkcard .pp-lc-meta{padding:7px 11px;background:var(--surface-2)}
.post-preview .pp-linkcard .pp-lc-domain{font-size:var(--fs-11, 10.5px);text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}
.post-preview .pp-linkcard .pp-lc-title{font-size:var(--fs-12, 12.5px);font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.post-preview .pp-warn{margin:0 13px 12px;padding:7px 11px;border-radius:var(--r-8, 9px);background:var(--amber-bg);color:var(--amber-text);font-size:var(--fs-12, 12px)}
.post-preview .pp-count{padding:0 13px 11px;font-size:var(--fs-12, 11.5px);color:var(--muted);text-align:right}
.post-preview .pp-count.over{color:var(--red);font-weight:600}

/* ── Multi-photo previews — each platform shows a photo set its OWN way ──────
   Instagram/Pinterest swipe through one photo at a time with dots and a counter;
   Facebook lays a photo set out as a collage. Showing the real shape (rather
   than a "+2 more" line) is the point of the preview. */
.post-preview .pp-carousel{position:relative}
.post-preview .pp-counter{position:absolute;top:9px;right:9px;padding:2px 8px;border-radius:var(--r-16, 20px);
  background:rgba(0,0,0,.62);color:#fff;font-size:var(--fs-11, 11px);font-weight:600;font-family:var(--font-mono);letter-spacing:.02em}
.post-preview .pp-nav{position:absolute;top:50%;transform:translateY(-50%);width:26px;height:26px;
  display:grid;place-items:center;border:none;border-radius:50%;cursor:pointer;padding:0;
  background:rgba(255,255,255,.9);color:#1b1b1b;box-shadow:var(--elev-1, 0 1px 4px rgba(0,0,0,.3))}
.post-preview .pp-nav:hover{background:#fff}
.post-preview .pp-nav.prev{left:8px}
.post-preview .pp-nav.next{right:8px}
.post-preview .pp-nav svg,.post-preview .pp-nav i[data-lucide]{width:15px;height:15px}
.post-preview .pp-dots{display:flex;justify-content:center;gap:5px;padding:9px 0 3px}
.post-preview .pp-dot{width:6px;height:6px;border-radius:50%;background:var(--border-strong);
  border:none;padding:0;cursor:pointer;transition:background var(--dur-fast) var(--ease)}
.post-preview .pp-dot.is-on{background:var(--accent)}
/* Facebook: a photo set is ONE story with a collage, not N posts. */
.post-preview .pp-collage{display:grid;gap:2px;background:var(--border)}
.post-preview .pp-collage img{display:block;width:100%;height:100%;object-fit:cover;background:var(--surface-2)}
.post-preview .pp-collage.n2{grid-template-columns:1fr 1fr;aspect-ratio:2/1}
.post-preview .pp-collage.n3{grid-template-columns:1fr 1fr;aspect-ratio:1/1}
.post-preview .pp-collage.n3 > :first-child{grid-column:1 / -1}
.post-preview .pp-collage.n4{grid-template-columns:1fr 1fr;aspect-ratio:1/1}
.post-preview .pp-more{position:relative}
.post-preview .pp-more::after{content:attr(data-more);position:absolute;inset:0;display:grid;place-items:center;
  background:rgba(0,0,0,.55);color:#fff;font-size:var(--fs-20, 19px);font-weight:600;font-family:var(--font-display)}

/* A .chip wrapping a CHECKBOX (multi-select chip row, e.g. the social platform
   picker): the box takes the accent, a checked chip lights up like .is-on, a
   disabled one greys out — no per-page styling needed. */
.chip input[type=checkbox]{accent-color:var(--accent);margin:0;cursor:inherit}

/* --- a .chip carrying its own caption + control, so a filter row stays ONE 36px
   band instead of stacking a .field-label above every input. The control sits
   borderless inside the pill; the caption is muted and the VALUE is the solid
   text, so the row still says what each control is. Replaces the per-page
   `style="border:none;background:transparent…"` copies. --- */
.chip:has(>select),.chip:has(>input:not([type=checkbox])){cursor:default;color:var(--muted);gap:7px}
.chip>select,.chip>input:not([type=checkbox]):not([type=radio]){
  border:0;background:transparent;color:var(--text);font:inherit;font-size:var(--fs-13, 13px);font-weight:500;
  padding:0;margin:0;outline:none;height:auto;width:auto;min-width:0;max-width:100%}
.chip>select{cursor:pointer;--select-pad-end:18px;--select-chevron-x:0px}
.chip:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}

/* --- COLUMN FILTER: a filter field under a header label (`table[data-col-filter]`,
   /js/ui-table.js). Inside the header cell, so column resizing and the phone's
   cards still read the header row as before. On the header's navy, the field is
   the page's surface; its text is the body's, never the header's capitals. --- */
thead th > .th-filter{display:block;width:100%;min-width:64px;height:26px;margin-top:6px;padding:0 8px;
  border:1px solid var(--border);border-radius:var(--r-6, 6px);background:var(--surface);color:var(--text);
  font:400 var(--fs-12, 12px)/24px var(--font-body);letter-spacing:0;text-transform:none;cursor:text}
thead th > .th-filter::placeholder{color:var(--text-muted)}
thead th > .th-filter:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-soft)}
tr.col-filter-none td{text-align:center;padding:14px}

/* --- a from–to pair reading as ONE control. They stay two inputs because they
   are two query params; only the chrome is shared. --- */
.chip.range>svg{color:var(--muted);flex:0 0 auto}
.chip.range>input{width:116px}
.chip.range>input[type=number]{width:62px}
.chip.range>input[type=datetime-local]{width:auto}
.range-sep{color:var(--muted);font-size:var(--fs-13, 13px)}

/* --- ONE calendar glyph per date FIELD, and it is the browser's own picker
   button (app-wide). A native date input already paints a working calendar on
   each field, so a leading Lucide calendar on the chip made three glyphs for one
   control — and the themed one, the only one that looked like the app, opened
   nothing. The chip's icon is gone from every date range; each field keeps its
   own. NO width override either: a date input's automatic width is exactly its
   text + that button, so `auto` (from the .chip>input rule above) is the
   narrowest the control can be — a fixed px width only ever padded it out.
   /js/date-input.js (app-wide, from partials/icons) adds the rest: a first click
   anywhere in the field opens the picker, a second click types. --- */
.chip>input[type=date],.chip>input[type=datetime-local],.chip>input[type=month]{cursor:pointer}
.chip>input:focus{cursor:text}


/* --- a bare .input sitting directly on a toolbar row: auto width, rather than
   the 100% it gets inside a .field --- */
.tb-field{width:auto;min-width:130px;max-width:220px}
/* …unless it is the ONE thing the row asks for ("New panel name" + Add): it takes
   the row, so the Add button sits right beside what you type. */
.tb-field.grow{flex:1 1 260px;max-width:none}
select.tb-field{min-width:0}
/* A filter <select> whose options arrive by fetch (channels, actions…): a native
   select is as wide as its widest option, so it grew the moment the list landed
   and shoved the row sideways. .tb-fixed reserves the box from first paint;
   a longer option ends in … inside it. Desktop only — the phone bar is a grid. */
@media (min-width:769px){.toolbar select.tb-fixed{width:var(--tb-fixed-w,13rem);min-width:0;max-width:none;text-overflow:ellipsis}}

/* --- a toolbar's actions travel as ONE unit, so a narrow viewport can never
   strand the primary button on its own line --- */
.tb-actions{display:inline-flex;align-items:center;gap:8px;flex-wrap:nowrap}
/* --- a run of icon-only actions at the END of a head row: a report's clock · pin · Export
   (/js/report-chrome.js fills it; owner, 2026-10-22: no row of its own for one or two
   buttons). In a .toolbar / .list-head it follows Filters; in a .card-head, a .tab-row or a
   floating panel's head it sits at the right. Empty (before the icons arrive, or for someone
   who gets none) it takes no gap. mobile.css keeps it beside Filters on a phone. --- */
.tb-icons{display:inline-flex;align-items:center;gap:4px;flex:none}
.tb-icons:empty{display:none}
/* at the row's end even in a row with no spacer (a look-up report: just its search box) —
   where a spacer is there it takes the slack first, so this costs nothing */
:is(.toolbar, .card-head, .tab-row) > .tb-icons{margin-left:auto}
/* --- actions on the rows ticked in the table below: shown only while something is
   selected, and sat right after the filters (no margin-left:auto, unlike .tb-actions).
   [hidden] is re-asserted because the display rule would otherwise beat it --- */
.tb-bulk{display:inline-flex;align-items:center;gap:8px;flex-wrap:nowrap}
.tb-bulk[hidden]{display:none}
/* …and the bar's search box keeps one width while it comes and goes: .tb-input and
   .spacer split the row's slack 1:1, so the group, appearing on the first tick, shrank
   the box under the cursor. Same pin as a bar with "More" filters (inventory.css).
   src/ui/tb-bulk.browser.test.js --- */
.toolbar:has(> .tb-bulk) > .tb-input{flex:0 0 300px;max-width:100%}
.chip:has(input[type=checkbox]:checked){background:var(--accent-soft);border-color:var(--accent-border);color:var(--accent);font-weight:600}
.chip:has(input[type=checkbox]:disabled){opacity:.55;cursor:not-allowed}
/* --- a WRAPPING row of chips (multi-select pickers: rep pools, platform
   pickers, filter sets). The chips already carry their own chrome; this is
   only the flow container, so a picker never needs a per-page grid. --- */
.chip-row{display:flex;flex-wrap:wrap;gap:8px}
/* …and a picker whose options are a long list of LIKE items (a rep pool, a
   user list) reads faster as aligned columns than as a ragged wrap: add a
   .cols-N modifier from the shared grid-column family. Chips then stretch to
   the column, so a long name ellipsises instead of blowing the 36px row. */
.chip-row.cols-2,.chip-row.cols-3,.chip-row.cols-4{display:grid}
.chip-row>.chip{min-width:0}
.chip-row>.chip>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* ── SWITCH: an on/off answer that applies as it is flipped (a channel the item
   is listed on, or not). A native checkbox with role="switch", so the form, its
   change event, the keyboard and a screen reader see what they always did; only
   the look changes. Put it in a <label> with its text, so the whole label is the
   tap target (the track alone is too small for a finger).
     <label><input type="checkbox" class="switch" role="switch"> Name</label>
   The html[data-theme] twin out-ranks a page sheet's `… input` rules (and their
   dark-mode background), which would otherwise draw it as a 100%-wide text box. */
input.switch[type=checkbox],html[data-theme] input.switch[type=checkbox]{
  -webkit-appearance:none;appearance:none;position:relative;flex:0 0 auto;box-sizing:border-box;
  width:36px;min-width:36px;height:20px;margin:0;padding:0;border:0;border-radius:var(--r-full, 999px);
  background:var(--border-strong);cursor:pointer;vertical-align:middle;
  transition:background-color var(--dur-fast) var(--ease)}
input.switch[type=checkbox]::after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;
  background:var(--surface);box-shadow:var(--elev-1, 0 1px 2px rgba(0,0,0,.25));transition:translate var(--dur-fast) var(--ease)}
html[data-theme] input.switch[type=checkbox]:checked{background:var(--accent)}
input.switch[type=checkbox]:checked::after{translate:16px 0}
input.switch[type=checkbox]:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
html[data-theme] input.switch[type=checkbox]:disabled{opacity:.5;cursor:not-allowed}
/* ── SEGMENTED CHOICE: two to four answers side by side, one picked (Buy It Now /
   Auction). Native radios, each covering its own segment, so a click anywhere on
   it picks it and the arrow keys move between them.
     <div class="segmented" role="radiogroup" aria-label="…">
       <label><input type="radio" name="x" value="a" checked><span>A</span></label> … </div> */
.segmented{display:inline-flex;gap:2px;padding:3px;border-radius:var(--r-12, 10px);background:var(--surface);border:1px solid var(--border);vertical-align:middle}
.segmented>label{position:relative;display:inline-flex;margin:0}
.segmented>label>input{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;opacity:0;cursor:pointer}
.segmented>label>span{display:inline-flex;align-items:center;height:28px;padding:0 12px;border-radius:var(--r-8, 8px);
  color:var(--text-2);font-size:var(--fs-13, 13px);font-weight:500;white-space:nowrap;
  transition:background-color var(--dur-fast) var(--ease),color var(--dur-fast) var(--ease)}
.segmented>label>input:checked+span{background:var(--switch-on-bg);color:var(--accent);font-weight:600;box-shadow:var(--switch-on-ring)}
.segmented>label>input:focus-visible+span{outline:2px solid var(--accent);outline-offset:1px}
.segmented>label>input:disabled{cursor:not-allowed}
.segmented>label>input:disabled+span{opacity:.5}
.segmented>label>input:disabled:checked+span{opacity:.75}

/* ============================== PAYMENT CARD ==============================
   A card on file (Settings → Billing & subscription, the Sellevry Console's Billing tab): the
   network's own mark (public/img/cards/, Shopify's MIT payment_icons — an image, the way channel
   logos are), "Visa ending in 4242", "Expires 06/28", a Primary pill, its ••• menu.
     <div class="pay-method"><img class="card-brand" src="/img/cards/visa.svg" alt="Visa">
       <span class="pay-method-txt"><strong>Visa ending in 4242</strong><span class="pay-method-sub">…</span></span> … </div> */
.pay-method{display:flex;align-items:center;gap:14px;padding:12px 14px;border:1px solid var(--border);border-radius:var(--r-12, 12px);background:var(--surface)}
.pay-method + .pay-method{margin-top:10px}
.pay-method-txt{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1 1 auto}
.pay-method-txt strong{font-weight:600;color:var(--text-strong,var(--text))}
.pay-method-txt .t-mut{font-size:var(--fs-12, 12.5px)}
.pay-method-sub{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
img.card-brand{flex:none;display:block;width:48px;height:30px;object-fit:contain}

/* ============================== LIST KIT ==============================
   The Orders pattern (the new layout, step 5 — owner, 2026-10-21), for every
   list page: ONE head row — quick filter pills with counts, then the search, a
   chip or two, Export and ONE Filters button whose popover holds the rest — the
   filters in force as removable chips under it, the table, the pager, and a
   QUICK LOOK that slides in from the right on a row click without blocking the
   list. Behaviour: /js/list-kit.js (App.quickFilter / filterPopover /
   filterChips / sidePanel). The Orders page is the worked example. */
.list-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.list-head > .spacer{flex:1}
.list-head .tb-input{flex:0 1 280px}
/* a head row whose one control is a lookup (the audit reports: one SKU / tray / purchase) */
.list-head > .tb-input.wide{flex:1 1 360px}
/* the list's "New …" closes the row, after Filters (Step 13 — owner, 2026-10-22: a page head
   holding one button "is using needless space"); a second way to start sits in a ••• beside
   it (.list-new: the ••• + the primary, kept together — on a phone they share one cell) */
.list-new{display:inline-flex;align-items:center;gap:6px}
/* …so the row gives the search box up first (down to 130px) and only then wraps — at 1024
   "New …" fell alone onto a second line — and a "New …" that still wraps keeps to the
   right edge, under Filters, never alone at the left (a tablet) */
@media (min-width:769px){
  .list-head:has(> .list-new, > .btn.primary:last-child) > .tb-input:not(.wide){flex:1 1 130px;min-width:130px;max-width:280px}
  .list-head > :is(.list-new, .btn.primary:last-child){margin-left:auto}
  /* with the table's layout tools in the row too (table-kit, 2026-11-08) the search gives up a
     little more before the row wraps (Trays at 1024) */
  .list-head:has(> .tk-tools):has(> .list-new, > .btn.primary:last-child) > .tb-input:not(.wide){flex-basis:90px;min-width:90px}
}
/* quick filter: a pill track, ONE sliding highlight (no highlight when the
   filters in force are more than one pill can say).
   THE SWITCH LOOK — this and .segmented above (owner, 2026-10-22: "the seg … has grey like
   many other of these toggles and they are hard to see"): the track is the page's surface
   with a border, so it reads as a control on the canvas and on a card alike, and the option
   in force is the ACCENT (the colour rule: accent = what is selected) — a light accent fill
   with an accent ring and accent text, never a white pill on a grey track. */
.seg{position:relative;display:inline-flex;gap:2px;padding:3px;border-radius:var(--r-12, 10px);background:var(--surface);border:1px solid var(--border);max-width:100%}
.seg > button{position:relative;z-index:1;display:inline-flex;align-items:center;gap:7px;height:28px;padding:0 11px;border:0;border-radius:var(--r-8, 8px);
  background:none;color:var(--text-2);font:500 var(--fs-13, 13px) var(--font-body);white-space:nowrap;cursor:pointer;transition:color var(--dur-fast) var(--ease)}
.seg > button:hover{color:var(--text)}
.seg > button[aria-selected="true"]{color:var(--accent);font-weight:600}
.seg > button:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
.seg .n{min-width:2.4ch;font:500 var(--fs-12, 11.5px) var(--font-mono);color:var(--text-muted);font-variant-numeric:tabular-nums}
.seg .n .skel-bar{width:2.4ch}
.seg-ink{position:absolute;z-index:0;top:3px;bottom:3px;left:0;width:var(--ink-w,0);translate:var(--ink-x,0) 0;border-radius:var(--r-8, 8px);background:var(--switch-on-bg);box-shadow:var(--switch-on-ring);pointer-events:none}
.seg.ink-live .seg-ink{transition:translate var(--dur) var(--ease),width var(--dur) var(--ease)}
.seg.is-none .seg-ink{opacity:0}
/* the Filters button and its popover */
.filter-pop-wrap{position:relative;display:inline-flex}
.fbtn.is-on{border-color:var(--accent-border);color:var(--accent)}
.fbtn-n{min-width:18px;height:18px;padding:0 5px;border-radius:var(--r-8, 9px);background:var(--accent);color:var(--on-brand);font:600 var(--fs-11, 11px)/18px var(--font-mono);text-align:center}
.fbtn-n[hidden]{display:none}
.filter-pop{position:absolute;top:calc(100% + 8px);right:0;z-index:60;width:min(560px, calc(100vw - 32px));padding:6px;box-sizing:border-box;
  background:var(--surface);border:1px solid var(--border);border-radius:var(--r-16, 14px);box-shadow:var(--shadow-lg)}
.filter-pop-sec{padding:10px 12px}
.filter-pop-sec + .filter-pop-sec,.filter-pop-cols{border-top:1px solid var(--border-light)}
.filter-pop h4{margin:0 0 6px;font:600 var(--fs-12, 12px) var(--font-body);color:var(--text-muted);letter-spacing:0;text-transform:none}
.filter-pop h4:not(:first-child){margin-top:12px}   /* a second group in one section (Commission statements: Disabled reps) */
.filter-pop-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 10px}
.filter-pop-grid.cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}   /* four choices as 2 × 2 (Revert Changes → Type) */
.filter-pop-cols{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 6px}
.filter-pop-scroll{max-height:176px;overflow-y:auto;overscroll-behavior:contain}
/* a checkbox dropdown in the pane (CRM → Customers: Responsible) fills its section, as a select.input there does */
.filter-pop details.inv-dropdown > .inv-dropdown-toggle{width:100%;min-width:0;max-width:none;box-sizing:border-box}
.filter-pop details.inv-dropdown > .inv-dropdown-panel{right:0}
.filter-pop-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px 6px;border-top:1px solid var(--border-light)}
.check-item{display:flex;align-items:center;gap:8px;min-width:0;padding:5px 6px;border-radius:var(--r-8, 7px);font-size:var(--fs-13, 13px);color:var(--text);cursor:pointer}
.check-item:hover{background:var(--surface-2)}
.check-item > span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.check-item .badge-type{margin-left:auto;font-size:var(--fs-11, 11px);color:var(--text-muted)}
/* the filters in force */
.filter-chips{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:10px;margin-bottom:12px}   /* the head row's own gap below it — the list never touches the chips (owner, 2026-10-22) */
.filter-chips[hidden]{display:none}
.filter-chip{display:inline-flex;align-items:center;gap:6px;max-width:100%;height:26px;padding:0 3px 0 10px;box-sizing:border-box;border-radius:var(--r-full, 999px);
  background:var(--accent-soft);color:var(--text);font-size:var(--fs-12, 12.5px)}
.filter-chip b{font-weight:600;color:var(--text-2)}
.filter-chip .fv{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* the remove control is a button (App.filterChips) or a link (a server-drawn chip on a GET list: the Console's) */
.filter-chip :is(button,a){display:grid;place-items:center;width:20px;height:20px;padding:0;border:0;border-radius:50%;background:none;color:var(--text-muted);cursor:pointer}
.filter-chip :is(button,a):hover{background:var(--surface);color:var(--text)}
.filter-chip :is(button,a) svg,.filter-chip :is(button,a) i[data-lucide]{width:13px;height:13px}
.filter-clear{border:0;background:none;padding:0 4px;color:var(--accent);font-size:var(--fs-12, 12.5px);cursor:pointer}
/* two-line cells: the value, then a muted line under it (a list read at a glance) */
.cell-2{display:flex;flex-direction:column;min-width:0;line-height:1.25}
.cell-2 > :first-child{font-weight:500;color:var(--text)}
.cell-2 > small{font-size:var(--fs-12, 12px);color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
tr.is-current > td{background:var(--accent-soft)}
/* The row's ⓘ (Orders, Review Requests — owner, 2026-10-22/23): where a click on the row
   opens the full page, this button beside the row's name opens the quick look; pressed
   (aria-expanded) while its row is in the panel. */
.ql-info{flex:none;margin-left:2px;color:var(--text-muted)}
.ql-info:hover{color:var(--accent)}
.ql-info[aria-expanded="true"]{color:var(--accent);background:var(--switch-on-bg)}
/* THE QUICK LOOK: a floating panel on the right, under the top bar, that takes no
   click away from the page (no scrim); a second row swaps its content. */
.side-panel{position:fixed;z-index:45;top:calc(var(--topbar-h) + 8px);right:8px;bottom:8px;width:420px;max-width:calc(100vw - 16px);
  display:flex;flex-direction:column;box-sizing:border-box;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-16, 16px);box-shadow:var(--shadow-lg);
  translate:calc(100% + 24px) 0;visibility:hidden;transition:translate var(--dur-slow) var(--ease-exit),visibility var(--dur-slow) step-end}
.side-panel.open{translate:none;visibility:visible;transition:translate var(--dur-slow) var(--ease),visibility var(--dur-slow) step-start}
/* DOCKED on a computer (the Apple design review, 2026-10-23: floating over the page it
   covered the list's own search, Filters and right-hand columns): ≥1100px the page makes
   room for it as it does for Sally's docked panel (SALLY DOCKED) — html.quick-look-open,
   set by /js/list-kit.js. The panel and the page's edge glide together on the panel's
   curve for the move the person makes (html.ql-dock-anim), never on a page load. Beside
   Sally's panel the quick look sits left of it; the page makes room for both on a window
   wide enough to keep a list beside them (≥1500px) — narrower, it floats over the list's
   right part as before. */
@media (min-width:1100px){
  :root{--ql-w:420px}
  .side-panel{width:var(--ql-w);top:calc(var(--topbar-h) + var(--rail-inset));right:var(--rail-inset);bottom:var(--rail-inset);
    transition:translate var(--dur-panel) var(--ease-glide),visibility var(--dur-panel) step-end}
  .side-panel.open{transition:translate var(--dur-panel) var(--ease-glide),visibility var(--dur-panel) step-start}
  html.copilot-panel-open .side-panel{right:calc(var(--sw-dock-w) + var(--rail-inset) * 2)}
  html.quick-look-open:not(.copilot-panel-open) body.has-rail :is(.main, body > .app-footer){margin-right:calc(var(--ql-w) + var(--rail-inset) + var(--rail-gap))}
  html.ql-dock-anim body.has-rail :is(.main, body > .app-footer){transition:margin-right var(--dur-panel) var(--ease-glide)}
}
@media (min-width:1500px){
  html.copilot-panel-open.quick-look-open body.has-rail :is(.main, body > .app-footer){margin-right:calc(var(--sw-dock-w) + var(--ql-w) + var(--rail-inset) * 2 + var(--rail-gap))}
}
/* the focus lands on the title when it opens (it is read out); no ring on a heading */
.side-panel-title h3:focus{outline:none}
/* a quick-look row the keyboard is on (/js/row-link.js: ↑ ↓ move, Enter or Space looks) */
tr.row-link[data-quick-look]:focus-visible,li.row-link[data-quick-look]:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.side-panel-head{display:flex;align-items:flex-start;gap:10px;padding:16px 12px 12px 16px;border-bottom:1px solid var(--border-light)}
.side-panel-title{flex:1;min-width:0}
.side-panel-kicker{display:block;font-size:var(--fs-12, 12px);color:var(--text-muted)}
.side-panel-title h3{margin:2px 0 6px;font:600 var(--fs-17, 18px) var(--font-display);letter-spacing:-.02em;color:var(--text-strong,var(--text))}
.side-panel-pills{display:flex;flex-wrap:wrap;gap:6px}
.side-panel-close{color:var(--text-muted)}
.side-panel-body{flex:1;overflow-y:auto;overscroll-behavior:contain}
.side-panel-sec{padding:14px 16px;border-bottom:1px solid var(--border-light)}
.side-panel-sec:last-child{border-bottom:0}
.side-panel-sec h4{display:flex;align-items:center;gap:6px;margin:0 0 8px;font:600 var(--fs-13, 13px) var(--font-body);color:var(--text)}
.side-panel-sec h4 .cap{font:500 var(--fs-12, 11.5px) var(--font-mono);color:var(--text-muted)}
.side-panel-foot{display:flex;align-items:center;gap:8px;padding:12px 16px;border-top:1px solid var(--border-light)}
.side-panel-foot[hidden]{display:none}
.side-panel-foot .spacer{flex:1}
.kv{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:4px 0;font-size:var(--fs-13, 13px)}
.kv > :first-child{flex:none;color:var(--text-muted)}
.kv > :last-child{min-width:0;text-align:right;color:var(--text);overflow-wrap:anywhere}
.kv-who{display:inline-flex;align-items:center;gap:6px}
.cust-texts{display:inline-flex;align-items:center;justify-content:flex-end;gap:6px}
.field.check .field-help{display:block}
/* A record named in a fact row links to its page and LOOKS like a link (the colour rule: accent =
   clickable). The base a{color:inherit} drew them in the row's text colour, so the quick looks'
   SKUs and customers read as plain text (owner, 2026-10-23; src/ui/kv-link-colour.browser.test.js). */
.kv > :last-child a:not(.btn){color:var(--link)}
@media (hover:hover){.kv > :last-child a:not(.btn):hover{text-decoration:underline;text-underline-offset:2px}}
/* A tracking number as a .kv row (partials/tracking-kv): the carrier, the WHOLE number
   in mono — a tile's line cuts it with …, this is where it is read — and its copy button
   (owner, 2026-10-22: "make it easy to see"). */
.kv-track-val{display:inline-flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:4px 8px}
.kv-track-val .mono{font-size:var(--fs-14, 14px);font-weight:600;overflow-wrap:anywhere}
/* FIELD AS TEXT — a field that can't change reads as its label over plain text, in the same
   grid slot (App.fieldsAsText, /js/fields-as-text.js; the quieter look, 2026-11-07: a signed
   record showed every field as a greyed-out box). The control stays, hidden, for the scripts. */
.field.is-text > :is(input,select,textarea,.input-affix){display:none}
/* a how-to hint goes with the box; a line that reports a state (.field-state: "Pending — save to apply.") stays */
.field.is-text > .field-help:not(.field-state){display:none}
.field.is-text > .field-text{display:block;min-height:1lh;padding:6px 0;border-bottom:1px solid var(--border-light);color:var(--text);overflow-wrap:anywhere}
.field.is-text > .field-text.t-mut{color:var(--text-muted)}
.field.is-text .req{display:none}   /* a value that can't change asks for nothing */
/* every field of a group is text: label left, value right, a hairline under each, two columns */
.field-grid.is-text-grid{--text-grid-gap:32px;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:var(--text-grid-gap);row-gap:0}
.field-grid.is-text-grid > .field.is-text{grid-column:auto;flex-direction:row;align-items:baseline;justify-content:space-between;gap:12px;padding:7px 0;border-bottom:1px solid var(--border-light)}
.field-grid.is-text-grid > .field.is-text > .field-label{margin:0;color:var(--text-muted);font-weight:400}
.field-grid.is-text-grid > .field.is-text > .field-text{padding:0;border:0;text-align:right;min-width:0}
.field-grid.is-text-grid > .field.is-text{flex-wrap:wrap}
.field-grid.is-text-grid > .field.is-text > .field-state{flex-basis:100%;text-align:right}
/* groups of rows one after another in a card read as ONE list: no gap between them */
.field-grid.is-text-grid + .field-grid.is-text-grid{margin-top:0}
/* the last field of a group with an odd count (a hidden one takes no slot) is a full row: its value
   stays where the left column's end, and its line runs under both halves as every row's does —
   an empty, unruled right half read as a hole in the list (owner, 2026-11-08). A phone has one column. */
@media (min-width:769px){
  .field-grid.is-text-grid > .field.is-text:nth-child(odd of :not([hidden])):nth-last-child(1 of :not([hidden])){
    grid-column:1/-1;padding-right:calc(50% + var(--text-grid-gap) / 2);border-bottom:0;
    background:linear-gradient(var(--border-light),var(--border-light)) left bottom/calc(50% - var(--text-grid-gap) / 2) 1px no-repeat,
      linear-gradient(var(--border-light),var(--border-light)) right bottom/calc(50% - var(--text-grid-gap) / 2) 1px no-repeat}
}

/* DETAIL PAGE — a record's own page (order, customer, lead, repair, warranty, purchase,
   trade-in, consignment; the detail-page pass, owner 2026-10-22): the status pills and a
   short line under the title (.detail-sub, in the head's subtitle), and a column of cards
   (.detail-stack, two of them in a .grid.cols-2). Facts are the quick look's .kv rows. */
.detail-sub{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;margin:4px 0 0}
.detail-sub .pill{flex:none}
.detail-stack{display:flex;flex-direction:column;gap:16px;min-width:0}
.detail-stack > .card{margin:0}

/* PRICE PROPOSAL (/js/price-proposal.js, src/knowledge/proposals.js — Shop knowledge, 2026-11-12):
   ONE box after the price field of the tray editor, Review and Fixing: the proposed price, Apply,
   what was entered against it, and the .kv rows that explain it (the sales it starts from, each
   adjustment with its percentage). A soft accent tint, no stripe: it is a proposal, not a status. */
.price-proposal{margin-top:2px;padding:10px 12px;border:1px solid var(--border-light);border-radius:var(--r-8, 8px);background:color-mix(in srgb,var(--accent) 5%,var(--surface));font-size:var(--fs-13, 13px)}
.price-proposal .pp-row{display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px}
.price-proposal .pp-price{font-family:var(--font-display);font-size:var(--fs-20, 20px);font-weight:600;letter-spacing:-.02em;color:var(--text)}
.price-proposal .pp-vs{margin-left:auto}
.price-proposal .pp-why{margin-top:6px}
.price-proposal .pp-why .kv{padding:3px 0;border-top:1px solid var(--border-light)}
.price-proposal .pp-why .kv:first-child{border-top:0}
.price-proposal .pp-why .kv > :first-child{color:var(--text);flex:1 1 auto;min-width:0;overflow-wrap:anywhere}
.price-proposal .pp-why .kv > :last-child{flex:none;font-variant-numeric:tabular-nums}
.price-proposal .pp-why small{display:block;color:var(--text-muted);font-size:var(--fs-12, 12px)}
.price-proposal .pp-note,.price-proposal .pp-none{margin:6px 0 0;font-size:var(--fs-12, 12px)}
.price-proposal .pp-none{margin:0}
.price-proposal .skel-text{padding:2px 0}
/* Take, counter or decline on an intake item (/js/intake-advice.js): the same box, a verdict pill
   with its sentence on top, the three buttons at the foot. */
.price-proposal .pp-verdict{align-items:flex-start}
.price-proposal .pp-verdict .pill{flex:none;margin-top:1px}
.price-proposal .pp-verdict strong{flex:1 1 200px;min-width:0;font-weight:600}
.price-proposal .pp-acts{margin-top:8px}
.price-proposal .pp-acts .t-mut{font-size:var(--fs-12, 12px)}
/* The price path on a product's page (/js/pages/product-price-path.js): the steps by age as one
   row, the bar over each the step's state — done (faded), now (the accent), next. */
.price-path{margin-top:10px;max-width:640px}
.price-path .pp-steps{display:flex;flex-wrap:wrap;gap:0 8px;margin-top:8px}
.price-path .pp-step{flex:1 1 90px;min-width:0;border-top:3px solid var(--border);padding-top:6px;font-size:var(--fs-12, 12px);color:var(--text-muted)}
.price-path .pp-step.is-now{border-top-color:var(--accent)}
.price-path .pp-step.is-done{opacity:.6}
.price-path .pp-step b{display:block;color:var(--text);font-size:var(--fs-14, 14px);font-variant-numeric:tabular-nums}
.price-path .pp-step.is-now b{color:var(--accent)}
/* A note or free text in a quick look (a customer's words, a request's wishes) keeps its line breaks. */
.ql-note{margin:6px 0 0;white-space:pre-wrap;overflow-wrap:anywhere;font-size:var(--fs-13, 13px);color:var(--text)}
.side-panel-sec h4 + .ql-note{margin-top:0}
.ql-line{display:flex;align-items:center;gap:10px;padding:7px 0;color:var(--text);text-decoration:none;border-top:1px solid var(--border-light)}
.ql-line:first-of-type{border-top:0}
.ql-line:hover .ql-line-title{color:var(--accent)}
.ql-thumb{flex:none;display:grid;place-items:center;width:36px;height:36px;border-radius:var(--r-8, 8px);overflow:hidden;background:var(--surface-2);color:var(--text-muted)}
.ql-thumb img{display:block;width:100%;height:100%;object-fit:cover}
.ql-thumb svg,.ql-thumb i[data-lucide]{width:16px;height:16px}
.ql-line-main{flex:1;min-width:0;display:flex;flex-direction:column}
.ql-line-title{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ql-line-sub{font:var(--fs-12, 12px) var(--font-mono);color:var(--text-muted)}
.ql-line-amt{flex:none;text-align:right;font-size:var(--fs-13, 13px);display:flex;flex-direction:column}
.ql-tots{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-top:10px;padding-top:10px;border-top:1px solid var(--border-light)}
/* a progress bar in a quick look: blue while it runs, green when done, amber only when
   blocked (the colour system); a row per stage under the total (the Tray Manager) */
.ql-bar{display:block;height:6px;border-radius:var(--r-6, 6px);background:var(--surface-2);overflow:hidden}
.ql-bar.sm{height:5px}
.ql-bar-fill{display:block;height:100%;border-radius:inherit;background:var(--blue)}
.ql-bar-fill.green{background:var(--green)}
.ql-bar-fill.amber{background:var(--amber)}
.ql-bar-fill.red{background:var(--red)}
.ql-bar-fill.gray{background:var(--text-faint)}
.ql-stage{display:grid;grid-template-columns:minmax(0,1fr) 96px 30px;align-items:center;gap:10px;padding:5px 0;font-size:var(--fs-12, 12.5px);color:var(--text)}
.ql-stage:first-of-type{margin-top:8px}
.ql-stage > .mono{text-align:right;color:var(--text-muted)}
.ql-tots > span{display:flex;flex-direction:column;font-size:var(--fs-13, 13px)}
.ql-tots small{font-size:var(--fs-12, 11.5px);color:var(--text-muted)}
.ql-tots .grand b{font-family:var(--font-display);font-size:var(--fs-15, 15px)}
/* ============================== PHOTO GRID ==============================
   THE photo manager (owner, 2026-10-22: "the photo grid is the image manager" — no
   Manage Images window in between). A tile per photo: a click on the photo opens it
   large, a drag moves it (the first one is the Main photo), and its corner holds
   Crop or rotate and Remove; "Add photos" is the last tile. Under it, ONE video row:
   play, add / replace, remove. The page's script draws the tiles and wires them
   (the Review and Fixing pages: /js/review.js renderPhotoGrid).
     <div class="photo-grid" [data-readonly]>
       <div class="photo-tile [is-flagged]" data-image-name="…">
         <button class="photo-tile-open" …><img …></button>
         <span class="photo-tile-main">Main</span>            (the first tile)
         <span class="pill amber photo-tile-flag">…To fix</span>   (a note points at it)
         <span class="photo-tile-grip"><i data-lucide="grip-vertical"></i></span>
         <span class="photo-tile-tools"><button class="btn icon sm">…</button>…</span>
       </div>
       <button class="photo-add"><i data-lucide="plus"></i><strong>Add photos</strong><small>JPEG, PNG or HEIC</small></button>
     </div>
     <div class="video-row"><span class="video-row-label">…</span><span class="video-row-now">…</span> buttons…</div>
   The tools and the grip show on hover and focus with a mouse, always on a touch
   screen (nothing is hover-only). Over a photo every chip is the photo viewer's
   (--viewer-*: a solid dark chip, readable over a white product shot). A grid that
   may not change ([data-readonly] — a published, skipped or signed-off item) only
   opens its photos. SortableJS marks a moving tile .sortable-chosen / .sortable-ghost.
   On a phone: three across (mobile.css). */
.photo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(108px,1fr));gap:10px}
.photo-grid .skel-thumb{aspect-ratio:1;height:auto;border-radius:var(--r-12, 10px)}
.photo-tile{position:relative;aspect-ratio:1;overflow:hidden;border:1px solid var(--border-light);border-radius:var(--r-12, 10px);background:var(--surface-2)}
.photo-grid:not([data-readonly]) .photo-tile{cursor:grab}
.photo-tile.sortable-chosen{cursor:grabbing}
.photo-tile.sortable-ghost{opacity:.35}
.photo-tile.is-flagged{border-color:transparent;box-shadow:0 0 0 3px var(--amber)}
.photo-tile-open{display:block;width:100%;height:100%;padding:0;border:0;background:none;cursor:pointer}
.photo-tile-open img{display:block;width:100%;height:100%;object-fit:cover;pointer-events:none;-webkit-user-drag:none;user-select:none}
.photo-tile-main{position:absolute;left:6px;top:6px;padding:1px 8px;border-radius:var(--r-full, 999px);pointer-events:none;font-size:var(--fs-11, 11px);font-weight:600;line-height:1.6;background:var(--viewer-ctl-bg);color:var(--viewer-ctl-fg)}
.photo-tile-flag{position:absolute;left:6px;bottom:6px;pointer-events:none}
.photo-tile-tools{position:absolute;top:6px;right:6px;display:flex;gap:4px}
.photo-tile-grip{position:absolute;right:6px;bottom:6px;display:inline-flex;padding:3px;border-radius:var(--r-6, 6px);pointer-events:none;background:var(--viewer-ctl-bg);color:var(--viewer-ctl-fg)}
.photo-tile-grip svg,.photo-tile-grip i[data-lucide]{width:14px;height:14px}
/* Crop or rotate, Remove and the grip are ALWAYS shown on a grid you may change — never only
   under the mouse (owner, 2026-10-22: "crop function is not working anymore … the function just
   vanished": a click on a photo opens it large, and the crop button hid until hovered).
   src/ui/tray-editor-page.browser.test.js */
@media (hover:none){
  /* on touch the tools take the top edge: "Main" moves to the bottom
     (the mock's phone board), and a "To fix" on the main photo sits above it */
  .photo-tile-main{top:auto;bottom:6px}
  .photo-tile-main ~ .photo-tile-flag{bottom:30px}}
.photo-tile-tools .btn.icon{width:28px;height:28px;padding:0;justify-content:center;border-radius:var(--r-8, 8px);background:var(--viewer-ctl-bg);color:var(--viewer-ctl-fg);border:1px solid var(--viewer-ctl-ring);box-shadow:var(--viewer-ctl-shadow)}
.photo-tile-tools .btn.icon:hover{background:var(--viewer-ctl-bg-hover);color:var(--viewer-ctl-fg)}
.photo-tile-tools svg,.photo-tile-tools i[data-lucide]{width:15px;height:15px}
.photo-grid[data-readonly] :is(.photo-tile-tools,.photo-tile-grip,.photo-add){display:none}
.photo-add{aspect-ratio:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:8px;border:1.5px dashed var(--border);border-radius:var(--r-12, 10px);background:var(--surface);color:var(--accent);font:inherit;text-align:center;cursor:pointer;transition:border-color var(--dur-fast) var(--ease),background-color var(--dur-fast) var(--ease)}
.photo-add:hover{border-color:var(--accent-border);background:var(--accent-soft)}
.photo-add:disabled{cursor:not-allowed;opacity:.5}
.photo-add svg,.photo-add i[data-lucide]{width:18px;height:18px}
.photo-add strong{font-size:var(--fs-13, 13px);font-weight:600}
.photo-add small{font-size:var(--fs-11, 11px);color:var(--text-muted)}
.photo-grid-empty{margin:0;grid-column:1/-1}
.photo-grid-note{display:flex;align-items:center;gap:6px;margin:8px 0 0;font-size:var(--fs-12, 12.5px)}
.video-row{display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px;margin-top:14px;padding-top:12px;border-top:1px solid var(--border-light);font-size:var(--fs-13, 13px)}
.video-row-label{display:inline-flex;align-items:center;gap:6px;font-weight:500;color:var(--text-muted)}
.video-row-label svg,.video-row-label i[data-lucide]{width:16px;height:16px}
.video-row-now{color:var(--text-muted)}
.video-row-play svg,.video-row-play i[data-lucide]{width:14px;height:14px}
.video-player{display:block;max-width:100%;max-height:calc(var(--vh) * .7);margin:0 auto;border-radius:var(--radius-sm);background:var(--viewer-scrim)}
/* A locked panel (edit-panels.css) still opens its photos large and plays its video. */
.panel.panel-locked fieldset :is(.photo-tile-open,.video-row-play){pointer-events:auto}
.spacer{flex:1}
/* Read by a screen reader, not drawn — e.g. a fieldset's <legend> when a visible
   heading already names the group. The !importants hold it against element
   rules (edit-panels.css styles every legend) that would draw it again. left:0 —
   at its containing block's left edge, never at its own place: inside a sideways
   scroller with nothing positioned between (a Kanban card's progress words) it
   escaped the scroller and widened a phone's whole page (2026-10-23,
   phone-no-sideways.browser.test.js). */
.sr-only{position:absolute!important;left:0!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;white-space:nowrap!important;border:0!important}

/* A person: initials on ONE neutral monogram, never a colour per person — the colour
   system keeps colour for meaning (owner, 2026-10-21). Markup: avatarHtml()
   (src/ui/avatar.js) / App.avatarHtml (format.js). neutral-avatar.test.js guards it. */
.avatar-sm{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;font-size:var(--fs-11, 10.5px);font-weight:600;color:var(--mono-fg);background:var(--mono-bg);font-family:var(--font-display);flex-shrink:0}

/* segmented / subnav */
.subnav{display:flex;flex-direction:column;gap:2px}
.subnav a{display:flex;align-items:center;gap:10px;height:var(--btn-h);padding:0 11px;border-radius:var(--r-8, 8px);color:var(--text-2);font-size:var(--fs-13, 13px);font-weight:500;cursor:pointer}
.subnav a svg,.subnav a i[data-lucide]{width:17px;height:17px}
.subnav a:hover{background:var(--surface-2);color:var(--text)}
.subnav a.active{background:var(--accent-soft);color:var(--accent);font-weight:600}

/* The admin sub-rail was removed: it was a second navigation surface one level
   below x-sidebar, which is the very thing the tabs rule exists to prevent. The
   /settings hub is the index, every admin page carries a Back, and ⌘K searches every
   page and setting from anywhere. Its zone-header and search-trigger styles went
   with it; the zone bands below are the HUB's, and the ⌘K dialog's styles live
   further down (the trigger moved, the dialog did not). */
/* Hub counterpart: the zone band above each zone's chapters on /admin. */
.admin-zone-head{
  display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;
  margin:2.4rem 0 1.1rem;padding-bottom:.5rem;border-bottom:1px solid var(--border);
  font-family:var(--font-display,inherit);font-size:var(--fs-17, 1.05rem);font-weight:600;letter-spacing:-.02em;color:var(--text);
}
.admin-zone-head:first-child{margin-top:0}
.admin-zone-head i,.admin-zone-head svg{width:18px;height:18px;color:var(--muted);align-self:center}
.admin-zone-head .admin-zone-desc{font-family:var(--font-body,inherit);font-size:var(--fs-13, .82rem);font-weight:400;letter-spacing:0;color:var(--text-muted)}

/* ── Setup progress on the Settings home ─────────────────────────────────────────
   A chapter's state is a pill in its card head (views/admin.ejs, the approved
   Admin mock board, 2026-10-22): green "Done", amber "Not set up" (needs
   attention — the colour system's amber). The DETAIL line below says what to do
   next. A check that could not run renders neither, because a wrong "not done"
   would send someone to redo finished work. */
.setup-detail{
  display:flex;align-items:flex-start;gap:7px;margin:-6px 0 12px;
  font-size:var(--fs-14, .85rem);color:var(--pill-amber-text);background:var(--pill-amber-bg);
  border-radius:var(--r-8, 8px);padding:8px 11px;max-width:70ch;
}
/* On a chapter that IS done, the line is drift worth knowing about, not a task. */
.setup-detail.is-note{color:var(--text-2);background:var(--surface-2)}
.setup-detail i,.setup-detail svg{width:14px;height:14px;flex:none;margin-top:2px}

/* ── Admin search (⌘K) ───────────────────────────────────────────────────────
   The rail trigger reads as a search FIELD, not a nav link, so it isn't mistaken
   for a destination — and it carries the shortcut, because a shortcut nobody can
   see is a shortcut nobody uses. */
/* Results live in the shared .x-modal chrome; only the list is bespoke. */
.x-modal.adm-search{width:min(620px,94vw)}
.adm-search .adm-search-status{margin:.6rem 0 0;font-size:var(--fs-14, .85rem)}
.adm-search-list{list-style:none;margin:.6rem 0 0;padding:0;max-height:min(52vh,420px);overflow-y:auto;display:flex;flex-direction:column;gap:2px}
.adm-search-list li a{display:flex;align-items:flex-start;gap:11px;padding:9px 10px;border-radius:var(--r-8, 9px);color:var(--text)}
.adm-search-list li.active a,.adm-search-list li a:hover{background:var(--accent-soft);color:var(--accent)}
.adm-search-ic{display:flex;align-items:center;justify-content:center;width:26px;height:26px;flex:none;border-radius:var(--r-8, 7px);background:var(--surface-2);color:var(--text-muted)}
.adm-search-list li.active .adm-search-ic{background:var(--surface);color:var(--accent)}
.adm-search-ic svg,.adm-search-ic i[data-lucide]{width:15px;height:15px}
.adm-search-txt{display:flex;flex-direction:column;gap:2px;min-width:0}
.adm-search-label{display:flex;align-items:center;gap:7px;font-weight:600;font-size:var(--fs-14, 13.5px)}
.adm-search-kind{text-transform:none;letter-spacing:0;font-size:var(--fs-11, 10px)}
.adm-search-ctx{font-size:var(--fs-12, 11.5px);color:var(--text-muted);overflow-wrap:anywhere}
.adm-search-list li.active .adm-search-ctx{color:var(--accent)}
/* Sub-rail layout. The content track is minmax(0,1fr) — NOT 1fr — and its items
   get min-width:0, so a wide table/chart stays inside its own .tablewrap scroll
   instead of stretching the grid track (and the whole page) out to the table's
   min-content width. With plain 1fr the track's automatic minimum is the content's
   min-content size, and a nowrap table blows the page several screens wide. */
.split{display:grid;grid-template-columns:186px minmax(0,1fr);gap:22px;align-items:start}
.split>*{min-width:0}
/* The admin sub-rail is gone: x-sidebar is the one navigation surface, the /settings
   hub is the index, every page carries a Back, and ⌘K jumps anywhere. So a
   `.split` normally holds ONE child now — span it across both tracks rather than
   leaving the content squeezed into the 186px rail column. Self-adjusting: a
   second child restores the two-column layout with no edit here. */
.split>:only-child{grid-column:1/-1}

/* Tabs — also the SECTION NAV for a module (CRM, Inventory). A module's sections
   are a horizontal strip under the page title, never a second vertical rail: the
   left rail is the one navigation surface, and a sub-rail duplicated it one level
   down while eating 208px of every content area. Tabs carry a Lucide icon and an
   optional .pill count, so a section rail converts across with no bespoke CSS. */
/* The strip scrolls sideways rather than overflowing the page — inventory's 9
   sections don't fit a laptop width. The 1px rule is an INSET SHADOW, not a
   border-bottom, and the active tab's 2px underline sits inside the box (no
   `margin-bottom:-1px`): a negative margin would be clipped by the scroll
   container. Renders identically to the old border+overhang. */
.tabs{display:flex;gap:3px;box-shadow:inset 0 calc(-1 * var(--tabs-line-w)) 0 var(--tabs-line);margin-bottom:16px;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scrollbar-width:none}
.tabs::-webkit-scrollbar{height:0}
/* No tab strip shows a scrollbar (.tabs here, the tray/review panel .ptabs in
   edit-tray.css), so the edge that has more tabs behind it FADES instead, at
   every width. /js/mobile-chrome.js (app-wide) sets .tabs-more-right /
   .tabs-more-left from the strip's scroll position. */
.tabs.tabs-more-right,.ptabs.tabs-more-right{-webkit-mask-image:linear-gradient(to right,#000 calc(100% - 44px),transparent);mask-image:linear-gradient(to right,#000 calc(100% - 44px),transparent)}
.tabs.tabs-more-left:not(.tabs-more-right),.ptabs.tabs-more-left:not(.tabs-more-right){-webkit-mask-image:linear-gradient(to right,transparent,#000 36px);mask-image:linear-gradient(to right,transparent,#000 36px)}
.tabs.tabs-more-left.tabs-more-right,.ptabs.tabs-more-left.tabs-more-right{-webkit-mask-image:linear-gradient(to right,transparent,#000 36px,#000 calc(100% - 44px),transparent);mask-image:linear-gradient(to right,transparent,#000 36px,#000 calc(100% - 44px),transparent)}
.tabs>button:not(.btn){border:0;background:none;margin:0;font-family:inherit;line-height:inherit}
/* ONE tab size app-wide (owner, 2026-10-22: "on many pages the tablist has a different size —
   make it all the size from" Reports → Listing Traffic). A tab is a link, or a <button> on a
   page that switches its tabs in place (the product page, My account, the CRM inbox's
   context, Content templates); a button tab is current by .active, .is-active or
   aria-selected — whichever its script sets. src/ui/tab-size.browser.test.js */
.tabs a,.tabs>button:not(.btn){display:inline-flex;align-items:center;gap:8px;white-space:nowrap;flex-shrink:0;padding:8px 12px;font-size:var(--fs-13, 13px);font-weight:500;color:var(--text-2);cursor:pointer;border-bottom:2px solid transparent;transition:color var(--dur-fast) var(--ease),background var(--dur-fast) var(--ease)}
.tabs a svg,.tabs a i[data-lucide],.tabs>button:not(.btn) svg,.tabs>button:not(.btn) i[data-lucide]{width:16px;height:16px;flex-shrink:0}
/* The icons are full Ink in light (theme.css --tab-icon), so the strip reads as the page's
   chrome; the current tab's and a switched-off tab's icon keep their tab's colour, and a
   strip on a coloured band (.tabs.band) keeps its band's. */
.tabs a svg,.tabs>button:not(.btn) svg{color:var(--tab-icon)}
.tabs :is(a,button).is-off svg,.tabs a.active svg,.tabs>button:not(.btn):is(.active,.is-active,[aria-selected="true"]) svg,.tabs.band svg{color:inherit}
.tabs a:hover,.tabs>button:not(.btn):hover{color:var(--text)}
.tabs a.active,.tabs>button:not(.btn):is(.active,.is-active,[aria-selected="true"]){color:var(--accent);border-bottom-color:var(--accent);font-weight:var(--tab-current-weight)}
/* ONE sliding underline (/js/tab-ink.js, 2026-10-06): once the script has
   measured the active tab, the strip draws a single line under it and the
   tab's own border steps aside; when a page moves `.active` in place, the line
   slides to the new tab. `.ink-live` arrives a frame after the first
   placement, so the line never flies in on load. The strip is the line's box
   (position:relative), so it scrolls with the tabs. */
.tabs.has-ink{position:relative}
.tabs.has-ink>a.active,.tabs.has-ink>button:is(.active,.is-active,[aria-selected="true"]){border-bottom-color:transparent}
.tabs.has-ink::after{content:"";position:absolute;left:0;bottom:0;height:2px;width:var(--ink-w,0);
  translate:var(--ink-x,0) 0;background:var(--accent);pointer-events:none}
.tabs.has-ink.ink-live::after{transition:translate var(--dur) var(--ease),width var(--dur) var(--ease)}
/* Count badge on a section tab (unread, overdue, failed…) — the shared .pill
   vocab, sized down so it sits inside the tab row without stretching it. */
.tabs a .pill,.tabs>button:not(.btn) .pill{height:18px;padding:0 7px;font-size:var(--fs-11, 11px)}
/* A section that is switched off (My Work → Fraud while the fraud checks are off):
   the tab keeps its place in the strip, so nothing moves and the section can say
   why, but reads as inactive. Pair it with a gray "Off" .pill. */
.tabs a.is-off{color:var(--muted)}
.tabs a.is-off.active{color:var(--text-2);border-bottom-color:var(--muted)}
/* A VIEW SWITCH (Trays: List / Tiles, Review: Items / Trays) — a small tab strip
   at the right end of a filter toolbar. No margin under it, and its tabs trimmed
   to the bar's control height so the row doesn't grow (phone included). The
   links are plain <a role="tab" tabindex="0">, switched by the page's script. */
.tabs.view-switch{margin:0;flex:none}
.tabs.view-switch a{padding-block:8px}
/* VIEW TABS (the new layout, step 6 — owner, 2026-10-21: "at most six tabs", views as
   small tabs): the views of ONE section, on their own row under the section tabs
   (Inventory → Products: Products · Variations; Listings: Schedule · Errors · Drift).
   The same underline, quieter — smaller, no icons, closer to the strip above, no
   rule of its own. partials/inventory-view-tabs; tab-ink.js slides its line too. */
.tabs.view-tabs{gap:2px;margin:-10px 0 14px;box-shadow:none}
.tabs.view-tabs a{padding:6px 10px;font-size:var(--fs-12, 12.5px)}
/* A view row the page hides while another section is current (Inventory, Reports, My
   Work): .tabs{display:flex} beats the browser's own [hidden]. */
.tabs.view-tabs[hidden]{display:none}
/* TAB BAND — a strip that heads a CARD, in the tray editor's panel band (owner, 2026-10-24,
   Customer 360: a plain grey strip of record tabs read like a second rail, so the eye went to
   the main one). THE tab size stays; only the colours change, from the --panel-tabs-* tokens
   (theme.css: navy band in light, the plain strip in dark). The current tab is a --surface tab
   joined to the card under it; once tab-ink.js has placed its line, that tab IS the line
   (`::after`), so it slides to the next tab as the underline does. A grey count on a tab that
   is not current takes the band's own tint. Tested by src/ui/crm-detail-pages.browser.test.js. */
.tabs.band{margin:0;padding:6px 8px 0;isolation:isolate;background:var(--panel-tabs-bg);box-shadow:inset 0 -1px 0 var(--panel-tabs-border)}
.tabs.band>:is(a,button:not(.btn)){position:relative;z-index:1;color:var(--panel-tabs-fg);border-radius:var(--r-8, 8px) var(--r-8, 8px) 0 0}
.tabs.band>:is(a,button:not(.btn)):not(.active,.is-active,[aria-selected="true"]):hover{color:var(--panel-tabs-fg-hover);background:color-mix(in srgb,var(--panel-tabs-fg-hover) 9%,transparent)}
.tabs.band>:is(a,button:not(.btn)):active{background:color-mix(in srgb,var(--panel-tabs-fg-hover) 14%,transparent)}
.tabs.band>:is(a,button:not(.btn)):is(.active,.is-active,[aria-selected="true"]){color:var(--accent);background:var(--surface);border-bottom-color:var(--panel-tab-ink)}
.tabs.band.has-ink>:is(a,button:not(.btn)):is(.active,.is-active,[aria-selected="true"]){background:none;border-bottom-color:transparent}
.tabs.band.has-ink::after{top:6px;height:auto;z-index:0;background:var(--surface);border-radius:var(--r-8, 8px) var(--r-8, 8px) 0 0;box-shadow:inset 0 -2px 0 var(--panel-tab-ink)}
.tabs.band>:is(a,button:not(.btn)):not(.active,.is-active,[aria-selected="true"]) .pill.gray{color:inherit;background:color-mix(in srgb,currentColor 14%,transparent);border-color:transparent}
/* TAB ROW — a strip with a ••• menu (Inventory, My Work): the menu sits BESIDE the
   strip in one row that draws the strip's line. Inside the strip, which scrolls
   sideways, its panel was clipped away (Inventory's Bulk operations could not be
   reached, 2026-10-22; src/ui/tab-row-menu.browser.test.js). */
.tab-row{display:flex;align-items:center;gap:4px;margin-bottom:16px;box-shadow:inset 0 -1px 0 var(--border)}
.tab-row > .tabs{flex:0 1 auto;min-width:0;margin-bottom:0}
.tab-row > .act-menu{flex:none}
/* …and a VIEW-tab row that is a page's first row, ending with the page's actions (the CRM
   customer-data reports: Data hygiene · Contact formatting · Duplicates, then the report's
   clock · pin · Export, ••• and the primary; owner 2026-10-22): the strip keeps no lift of
   its own (it sits under no section strip), the row's buttons are the tabs' height, and the
   actions keep a little air between them. mobile.css puts them on a line of their own. */
.tab-row > .tabs.view-tabs{margin-top:0}
.tab-row:has(> .tb-icons){gap:8px}
.tab-row > .tb-icons{--btn-h:var(--btn-h-sm)}
.tab-row > .btn{flex:none}
/* …and a module's primary action at the row's end (Supplier Orders' New PO, after a
   .spacer): it keeps its size — the strip gives way and scrolls (on a phone the button
   shrank and lost its icon) */
.tab-row > .btn{flex:none}

/* The content column under a module's section tabs. Replaces the .split grid on
   CRM pages: full width, and a flex column so a viewport-locked page (the inbox)
   can hand its remaining height to the last child. */
.crm-body{display:flex;flex-direction:column;min-width:0}

/* kanban */
.board{display:flex;gap:16px;overflow-x:auto;padding-bottom:14px}
/* A column never gets NARROWER than its basis (min-width keeps the board
   scrolling once the lanes no longer fit) but DOES grow into the slack, so a
   board with few lanes fills the width instead of leaving dead space on the
   right. Pages that size their own lanes (kanban, leads) override the flex. */
.col{flex:1 1 290px;min-width:290px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);display:flex;flex-direction:column;max-height:calc(var(--vh) - 230px)}
.col-h{display:flex;align-items:center;gap:9px;padding:13px 15px;background:var(--th-bg);color:var(--th-fg);border-bottom:1px solid var(--th-border);border-radius:var(--radius) var(--radius) 0 0;font-weight:600;font-size:var(--fs-14, 13.5px)}
.col-h .ct{margin-left:auto;font-family:var(--font-mono);font-size:var(--fs-12, 11.5px);color:var(--text-2);background:var(--surface);border:1px solid var(--th-border);border-radius:var(--r-16, 20px);padding:1px 8px}
.col-h .dotc{width:9px;height:9px;border-radius:50%}
.col-body{padding:11px;display:flex;flex-direction:column;gap:10px;overflow-y:auto}
.kcard{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-12, 11px);padding:12px;cursor:grab;box-shadow:var(--shadow);transition:var(--dur-fast) var(--ease)}
.kcard:hover{border-color:var(--border-strong)}
.kcard .kt{display:flex;gap:11px;align-items:flex-start}
.kcard h4{font-size:var(--fs-14, 13.5px);font-weight:600;line-height:1.3}
.kcard .kref{font-size:var(--fs-12, 11.5px);margin-top:2px;color:var(--muted)}
.kcard .kf{display:flex;align-items:center;justify-content:space-between;margin-top:11px;gap:8px}
.kcard .kprice{font-family:var(--font-mono);font-weight:600;font-size:var(--fs-13, 13px)}

/* misc */
.bars{display:flex;align-items:flex-end;gap:12px;height:170px;padding-top:10px}
.bar{flex:1;display:flex;flex-direction:column;align-items:center;gap:8px;height:100%;justify-content:flex-end}
.bar .bb{width:100%;max-width:38px;border-radius:var(--r-8, 7px) var(--r-8, 7px) var(--r-4, 3px) var(--r-4, 3px);background:linear-gradient(180deg,var(--bar-fill,var(--accent)),color-mix(in srgb,var(--bar-fill,var(--accent)) 55%,transparent));transition:var(--dur-slow) var(--ease)}
.bar .bl{font-size:var(--fs-11, 11px);color:var(--muted);font-weight:500}
.bar .bv{font-size:var(--fs-11, 11px);font-family:var(--font-mono);color:var(--text-2)}

/* Horizontal proportion meter — a labelled bar showing one value's share of a
   whole (e.g. a cost as a share of revenue). The fill width is set inline
   (data-driven). Accent by default; add .neg (cost/loss) or .pos (gain). */
.meter{position:relative;height:8px;border-radius:var(--r-full, 999px);background:var(--surface-3);overflow:hidden}
.meter>span{position:absolute;inset:0 auto 0 0;height:100%;border-radius:var(--r-full, 999px);background:var(--accent)}
.meter.neg>span{background:var(--danger)}
.meter.pos>span{background:var(--success)}

.list-row{display:flex;align-items:center;gap:14px;padding:14px 0;border-bottom:1px solid var(--border)}
.list-row:last-child{border-bottom:none}

/* A removable pill — a person on a recipient list. The × is a real button. */
.pill .pill-x{display:inline-grid;place-items:center;width:16px;height:16px;margin:0 -4px 0 1px;padding:0;border:0;border-radius:50%;background:transparent;color:inherit;cursor:pointer}
.pill .pill-x:hover{background:color-mix(in srgb, currentColor 16%, transparent)}
.pill .pill-x svg,.pill .pill-x i[data-lucide]{width:11px;height:11px}

/* EMAIL THIS REPORT — the window behind the clock button on every report page
   (public/js/report-schedule-window.js): When · Who · What sections, the report's existing
   schedules as .list-rows. Everything else in it is canonical vocab (.x-modal,
   .field-grid/.field/.input, .chip.sm checkboxes, .btn.icon, .pill). */
.rs-sec+.rs-sec{margin-top:18px;padding-top:16px;border-top:1px solid var(--border-light)}
.rs-sec>.form-sec{margin:0 0 10px}
.rs-sec>.field,.rs-sec>.field.check{margin-top:12px}
.rs-days{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.rs-days[hidden]{display:none}
.rs-preview{margin:10px 0 0;font-size:var(--fs-13, 13px)}
.rs-sec>.rs-dates{margin-top:12px}
.rs-period-help{margin:6px 0 0;font-size:var(--fs-13, 13px)}
.rs-recipients{display:flex;flex-wrap:wrap;gap:6px;min-height:24px;margin-bottom:12px}
.rs-intro,.rs-what{margin:0 0 6px}
.rs-row-main{flex:1 1 auto;min-width:0;overflow-wrap:anywhere}
.rs-row-acts{display:flex;gap:2px;flex:0 0 auto}
@media (max-width:560px){.list-row.rs-row{flex-wrap:wrap}.rs-row-acts{width:100%;justify-content:flex-end}}

/* NOTIFICATIONS & MESSAGES — every message the app sends, as plain sentences
   (src/messages/; views/admin-notifications*.ejs, my-notifications.ejs). A row is
   one message: the sentence (its "when" bold) and a muted line of who · how, with
   its switch (input.switch) or a state note on the right. The topic tiles are the
   start page's twelve doors; they lift like any card that opens something. */
.msg-list{display:flex;flex-direction:column}
.msg-row{display:flex;align-items:center;gap:14px;padding:14px 20px;border-top:1px solid var(--border-light)}
.msg-list>.msg-row:first-child,.card-head+.msg-list>.msg-row:first-child{border-top:0}
.msg-row.is-off .msg-sentence{color:var(--text-subtle)}
.msg-row.is-flat{padding:0;border:0}
.msg-row.is-compact{padding:8px 0}
.msg-row.is-highlight{background:var(--accent-soft)}
.msg-row-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px;color:inherit;text-decoration:none}
a.msg-row-main:hover .msg-sentence{color:var(--accent)}
a.msg-row-main:focus-visible{outline:2px solid var(--accent);outline-offset:4px;border-radius:var(--r-6, 6px)}
.msg-sentence{font-size:var(--fs-15, 15px);line-height:1.45;color:var(--text);transition:color var(--dur-fast) var(--ease)}
.msg-sentence strong{font-weight:650;color:var(--text-strong)}
.msg-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;font-size:var(--fs-13, 13px);color:var(--muted)}
.msg-meta .sep{color:var(--border-strong)}
.msg-meta svg,.msg-meta i[data-lucide]{width:14px;height:14px}
.msg-warn{display:inline-flex;align-items:center;gap:4px;font-weight:600;color:var(--danger)}
.msg-warn svg,.msg-warn i[data-lucide]{width:14px;height:14px}
.msg-ctl{flex:0 0 auto;display:flex;align-items:center;gap:8px}
.msg-switch{display:inline-flex;align-items:center;gap:8px;font-size:var(--fs-13, 13px);font-weight:600;color:var(--text-subtle);cursor:pointer;min-height:36px}
.msg-state{display:inline-flex;align-items:center;gap:6px;font-size:var(--fs-13, 13px);font-weight:600;color:var(--muted);white-space:nowrap}
.msg-state svg,.msg-state i[data-lucide]{width:15px;height:15px}
a.msg-state{color:var(--accent);text-decoration:none}
.msg-group-label{padding:12px 20px 4px;font-size:var(--fs-12, 12px);font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.msg-topics{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(300px,100%),1fr));gap:14px}
.msg-topic{display:flex;gap:14px;align-items:flex-start;padding:18px;color:inherit;text-decoration:none}
/* An icon tile names a place, it is not a status: the ONE neutral tile of the colour
   system (.tile .ic) — no accent, no violet "outside" tint (the Admin look pass,
   2026-10-22; the tile's own count line says who the messages go to). */
.msg-topic .ic,.msg-link .ic{width:44px;height:44px;flex:0 0 44px;border-radius:var(--r-12, 12px);display:grid;place-items:center;background:var(--surface-3);color:var(--text-2)}
.msg-topic .ic svg,.msg-topic .ic i[data-lucide],.msg-link .ic svg,.msg-link .ic i[data-lucide]{width:22px;height:22px}
.msg-topic-body{display:flex;flex-direction:column;gap:3px;min-width:0}
.msg-topic-name{font-size:var(--fs-16, 16px);font-weight:650;color:var(--text-strong)}
.msg-heading{margin:28px 0 12px;font:600 var(--fs-17, 17px) var(--font-display);letter-spacing:-.02em;color:var(--text-strong)}
.msg-topic-count{font-size:var(--fs-14, 13.5px);color:var(--muted)}
.msg-topic-ex{font-size:var(--fs-13, 13px);line-height:1.45;color:var(--muted)}
.msg-shortcuts{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:16px}
.msg-links{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(280px,100%),1fr));gap:14px;margin-bottom:18px}   /* the 18px every card in .view keeps under it — the next card touched the row (2026-10-22) */
.msg-link{display:flex;gap:12px;align-items:center;padding:16px 18px;color:inherit;text-decoration:none}
.msg-link .ic{width:40px;height:40px;flex-basis:40px}
.msg-link-sub{font-size:var(--fs-13, 13px);color:var(--muted)}
.msg-sentence-big{font-size:var(--fs-20, 19px);line-height:1.45}
.msg-who{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.msg-who .pill.is-muted{text-decoration:line-through;opacity:.8}
.msg-trigger{display:flex;gap:10px;align-items:flex-start;padding:12px 14px;border-radius:var(--r-12, 10px);background:var(--surface-2);font-weight:600;color:var(--text-strong)}
/* "The email" on a message's page: the live Preview (the real email, in a
   sandboxed frame on white paper like a mail program) and the table of what each
   blue label becomes. The frame's box holds its height while the first preview
   loads (a skeleton overlay), so nothing jumps. */
.msg-mail-help{margin-bottom:18px}   /* the 18px every card in .view keeps under it (".view>.card") */
.msg-mail-help>.card{display:flex;flex-direction:column}   /* both cards as tall as the row; the frame's box takes the rest */
.msg-mail-help .msg-preview-box{flex:1 1 auto;display:flex;flex-direction:column}
.msg-mail-help .msg-preview-frame{flex:1 1 auto;min-height:min(620px,calc(var(--vh) * .75))}
.msg-preview-subject{display:flex;gap:8px;align-items:baseline;flex-wrap:wrap;overflow-wrap:anywhere}
.msg-preview-subject>strong{min-width:12rem;flex:1}
.msg-preview-box{position:relative;border:1px solid var(--border);border-radius:var(--radius-sm);overflow:hidden;background:var(--mail-paper)}
.msg-preview-frame{display:block;width:100%;height:min(620px,calc(var(--vh) * .75));border:0;background:var(--mail-paper)}
.msg-trigger svg,.msg-trigger i[data-lucide]{width:18px;height:18px;color:var(--accent);margin-top:2px;flex:0 0 18px}
.msg-form{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.msg-form .input{width:auto}
.msg-form input[type=number].input{width:80px}
/* A message's days beside its switch on the topic page (partials/message-row inlineDays). */
.msg-row-days{flex-wrap:nowrap;gap:6px;font-size:var(--fs-13, 13px);color:var(--text-subtle);white-space:nowrap}
.msg-row-days input[type=number].input{width:72px}
.msg-people{display:grid;grid-template-columns:280px minmax(0,1fr);gap:16px;align-items:start}
.msg-person{display:flex;align-items:center;gap:10px;padding:10px 16px;border-top:1px solid var(--border-light);color:inherit;text-decoration:none}
.msg-person:first-child{border-top:0}
.msg-person:hover{background:var(--surface-2)}
.msg-person[aria-current="true"]{background:var(--accent-soft)}
.msg-person .n{font-weight:600}
.msg-person-body{flex:1;min-width:0}
.msg-mcell{width:34px;height:34px;border-radius:var(--r-8, 8px);border:1px dashed transparent;background:transparent;color:var(--muted);display:inline-grid;place-items:center;cursor:pointer}
.msg-mcell:hover{border-color:var(--border-strong)}
.msg-mcell.on{background:var(--accent-soft);color:var(--accent);border:1px solid var(--accent-border)}
.msg-mcell.muted{background:var(--surface-3);color:var(--muted);border:1px solid transparent}
.msg-mcell svg,.msg-mcell i[data-lucide]{width:16px;height:16px}
.msg-channels{display:flex;flex-wrap:wrap;gap:6px 18px}
@media (max-width:900px){.msg-people{grid-template-columns:1fr}}
@media (max-width:768px){.msg-row{padding:12px 14px;align-items:flex-start}.msg-group-label{padding-left:14px}}

/* SCHEDULE ROWS — one job or one email per row on Settings → Job Schedules and
   both tabs of Email Schedules (partials/job-schedule-row.ejs,
   partials/email-event-block.ejs). The switch is .cfg-switch, the run dot
   .status-dot, a recipient a .pill with its .pill-x. */
.sched-intro{margin:0 0 12px}
.sched-intro:last-child{margin-bottom:0}
.sched-row{border:1px solid var(--border);border-radius:var(--r-12, 10px);padding:14px 16px;background:var(--surface)}
.sched-row+.sched-row{margin-top:12px}
.sched-row.is-off{background:var(--surface-2)}
.sched-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}
.sched-head-main{flex:1 1 auto;min-width:0;overflow-wrap:anywhere}
.sched-title{margin:0 0 2px;font-size:var(--fs-15, 15px);font-weight:700;color:var(--text-strong)}
.sched-title>.pill{margin-left:6px;vertical-align:middle}
.sched-desc{margin:4px 0 0;font-size:var(--fs-14, 13.5px);color:var(--text-subtle)}
.sched-note{margin:6px 0 0;font-size:var(--fs-12, 12.5px);font-weight:600;color:var(--danger)}
.sched-note.warn{color:var(--amber-text)}
.sched-toggle{display:inline-flex;align-items:center;gap:8px;flex:0 0 auto;font-size:var(--fs-13, 13px);color:var(--text-subtle);cursor:pointer}
.sched-builder{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:10px;padding-top:10px;border-top:1px dashed var(--border)}
.sched-builder>label,.sched-fields{display:inline-flex;align-items:center;gap:6px;font-size:var(--fs-13, 13px);color:var(--text-subtle)}
.sched-builder .input{width:auto}
.sched-builder input[type=number].input{width:72px}
.sched-builder .f-cron{min-width:200px;font-family:var(--font-mono)}
.sched-fields{display:none;flex-wrap:wrap}
.sched-fields.active{display:inline-flex}
.sched-weekdays{display:inline-flex;flex-wrap:wrap;gap:4px}
.sched-status{display:flex;flex-wrap:wrap;gap:6px 18px;align-items:center;margin-top:10px;font-size:var(--fs-13, 13px);color:var(--text-subtle)}
.sched-preview{color:var(--accent);font-weight:600}
.sched-last{display:inline-flex;align-items:center;gap:6px}
.sched-event{margin-top:12px;padding-top:12px;border-top:1px dashed var(--border)}
.sched-event .sched-title{font-size:var(--fs-14, 14px)}
.sched-row .form-sec,.sched-event .form-sec{margin:12px 0 6px}
.recip-list{display:flex;flex-wrap:wrap;gap:6px;min-height:24px}
.recip-add{margin-top:12px}
.recip-add>.field-act{gap:6px}
@media (max-width:560px){.sched-head{flex-direction:column;gap:8px}}

/* A chart bar / list row that opens its own detail is an <a>: it keeps the
   chart's look (no link colour or underline) and answers hover + keyboard focus. */
a.bar,a.list-row{color:inherit;text-decoration:none}
a.bar:hover .bb{background:var(--bar-fill,var(--accent))}
a.bar:hover .bl,a.list-row:hover .t-strong{color:var(--accent)}
a.bar:focus-visible,a.list-row:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:var(--r-6, 6px)}

/* A list row whose entity is archived/disabled — dimmed but fully readable.
   Shared by the admin field list (fields.disabled) and any future archive UI. */
.row-archived{opacity:.55}

.empty{display:grid;place-items:center;text-align:center;padding:60px 20px;color:var(--muted)}
.empty .eic{width:56px;height:56px;border-radius:var(--r-16, 14px);background:var(--surface-2);display:grid;place-items:center;margin-bottom:14px;border:1px solid var(--border)}
.empty .eic svg,.empty .eic i[data-lucide]{width:26px;height:26px}
/* An empty state that says more than a line: its title (.t-strong) reads as the message,
   .empty-more under it is as wide as a sentence reads well, with .list-row rows in .empty-list
   under that (Orders, when a shop has no orders yet: each sales channel and how it stands). */
.empty>.t-strong{color:var(--text);font-size:var(--fs-15, 15px)}
.empty-more{width:100%;max-width:520px;margin-top:4px}
.empty-more>p{margin:0}
.empty-more>.btn{margin-top:16px}
/* two ways on (the error page: Try again · Go to Home), centred under the sentence */
.empty-more>.actions{justify-content:center;flex-wrap:wrap;gap:8px;margin-top:16px}
.empty-list{margin-top:18px;border-top:1px solid var(--border);text-align:left}
.empty-list .list-row{gap:10px;padding:10px 0;color:var(--text);text-decoration:none}
.empty-list .cell-2{flex:1 1 0}
.empty-list .cell-2>small{white-space:normal}
.empty-list a.list-row>svg,.empty-list a.list-row>i[data-lucide]{width:16px;height:16px;flex:none;color:var(--text-muted)}

/* =====================================================================
   TOAST REGION — THE one corner for every transient notice: TOP-RIGHT.
   ---------------------------------------------------------------------
   Every toast/alert stack in the app lives inside this ONE fixed region so
   they queue vertically instead of overlapping. .toast-region is emitted once
   per page by partials/x-topbar.ejs and holds the sub-stacks in a fixed
   `order`: transient App.toast first (closest to the corner, read-then-gone),
   then the CoPilot widget's stack, then the persistent channel-auth alerts.
   Anchored on --toast-top/--toast-right (theme.css) — it clears the fixed
   .topbar. Do NOT anchor a new notice to its own corner: append it to
   #toast-region (or just call App.toast).
   z-index 99996 makes this the TOP UI layer — a toast must stay visible over
   whatever fired it. It clears every overlay in the app: .x-modal-backdrop
   (9000), .app-modal-backdrop (9500), and the whole CoPilot widget stack
   (fab 99990 / panel 99991 / panel-open topbar 99992 / sw-modal 99993-99995).
   Only #maint-lock-toast (the maintenance countdown) sits higher, deliberately.
   ===================================================================== */
.toast-region{
  /* + --scroll-lock-gap: holds still while a modal locks the page (see .topbar) */
  position:fixed;top:var(--toast-top);right:calc(var(--toast-right) + var(--scroll-lock-gap, 0px));z-index:99996;
  display:flex;flex-direction:column;gap:var(--toast-gap);align-items:flex-end;
  width:var(--toast-width);
  /* The region spans a fixed width but is only as tall as its contents; keep it
     click-through so an empty/short stack never eats clicks on the page under it. */
  pointer-events:none;
}
/* Sub-stacks span the region; the notices INSIDE them shrink-wrap to their text
   and hang off the right edge (see .toasts/.chan-toasts below),
   so a one-word "Saved." doesn't render as a 420px slab. */
.toast-region>*{width:100%}
/* Only the parts of a notice you can actually CLICK take the pointer — the BOX
   stays click-through, like the region around it (pointer-events inherits, so
   these need no rule of their own; the exceptions below re-take it).
   A notice floats OVER the page, and the persistent ones (a sticky App.toast,
   the channel-auth alerts) park in this corner until they are dismissed — with
   pointer-events on the whole box they silently ATE every click on whatever sat
   under them, and the corner they own is exactly where a table puts its ACTION
   column. (Inventory -> Listing errors: retry a row that fails, and the sticky
   error toast it opens covers the Retry button of the rows near the top of the
   table, so the next click lands on the toast and nothing happens — reported
   as "sometimes Retry does nothing"; fixed 2026-09-11.)
   .inv-sync-banner is pure status with nothing to click. (CoPilot's alerts are
   plain App.toasts with an "Open" action since 2026-10-15 — no exception.) */
/* Every stack right-aligns its notices so they read as one column. */
.toast-region .chan-toasts{align-items:flex-end}
.toast-region .chan-alert{max-width:100%}
/* Sub-stack order inside the region (lowest number = closest to the corner). */
.toast-region .toasts{order:1}
.toast-region .chan-toasts{order:3}
.toast-region .inv-sync-banner{order:4}
.toast-region .scan-banner{order:5}
/* Inside the region the sub-stacks are plain flow children — the region owns the
   anchoring. Each keeps its own fixed position as a FALLBACK for the handful of
   standalone pages (login/2fa/easter-egg) that render no x-topbar. */
.toast-region .toasts,.toast-region .chan-toasts,
.toast-region .inv-sync-banner,.toast-region .scan-banner{
  position:static;top:auto;right:auto;bottom:auto;left:auto;
  width:100%;max-width:none;z-index:auto;
}

/* toast */
/* Standalone fallback anchor for pages with no x-topbar (login/2fa/easter-egg);
   inside .toast-region the region owns the position and this is neutralised. */
.toasts{position:fixed;top:var(--toast-top);right:var(--toast-right);z-index:99996;display:flex;flex-direction:column;gap:var(--toast-gap);align-items:flex-end;width:var(--toast-width)}
.toast{display:flex;align-items:flex-start;gap:11px;background:var(--elev);border:1px solid var(--border);border-radius:var(--r-12, 11px);padding:13px 16px;box-shadow:var(--shadow-lg);min-width:260px;max-width:100%;font-size:var(--fs-14, 13.5px);font-weight:500;color:var(--text);animation:slidein var(--dur-slow) var(--ease);pointer-events:none}
/* ...and the bits you click take it back (see .toast-region above). App.toast
   hands .toast-msg its pointer back only when the message is long enough to
   need its own scrollbar. */
.toast .toast-close,.toast .toast-action{pointer-events:auto}
/* Message body. `pre-line` honors the \n in grouped multi-line summaries (the
   channel-retry / bulk-action results that used to need their own toast family),
   and the max-height keeps a long one scrollable instead of filling the screen. */
.toast .toast-msg{flex:1 1 auto;min-width:0;white-space:pre-line;overflow-wrap:anywhere;word-break:break-word;max-height:40vh;overflow-y:auto}
.toast svg,.toast i[data-lucide]{width:18px;height:18px;color:var(--green);flex:0 0 auto;margin-top:1px}
/* Error variant — same chrome, red icon + hairline so a failure reads differently. */
.toast.error svg{color:var(--red)}
.toast.error{border-color:color-mix(in srgb,var(--red) 45%,var(--border))}
/* Info variant — neutral notice (blue icon), between success-green and error-red. */
.toast.info svg{color:var(--blue)}
/* Toast action (App.toast {action:{label,href|onClick}}) — e.g. "View product",
   "Undo". App.toast renders an <a> for `href` but a <button> for `onClick`, so
   this MUST carry a full button reset: without it the button variant keeps the
   UA chrome (grey ButtonFace fill, outset border, 13.33px Arial) and reads as an
   unstyled box inside a themed toast. Both element types render identically. */
.toast .toast-action{
  margin-left:auto;flex:0 0 auto;
  -webkit-appearance:none;appearance:none;border:0;background:none;padding:0;
  font-family:inherit;font-size:inherit;line-height:inherit;font-weight:600;
  color:var(--accent);text-decoration:none;white-space:nowrap;cursor:pointer;
  border-radius:var(--r-6, 6px);
}
.toast .toast-action:hover{text-decoration:underline;color:var(--accent)}
.toast .toast-action:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
/* Sticky-toast close (App.toast {sticky:true}) — quiet ×, same idiom as chip closes.
   Same reset reason as .toast-action: a bare <button> otherwise draws its glyph
   in the UA font instead of the app's. */
.toast .toast-close{
  margin-left:auto;flex:0 0 auto;
  -webkit-appearance:none;appearance:none;border:0;background:none;
  font-family:inherit;font-size:var(--fs-16, 16px);font-weight:inherit;line-height:1;
  color:var(--text-muted);cursor:pointer;padding:2px 5px;border-radius:var(--r-6, 6px);
}
.toast .toast-close:hover{color:var(--text);background:var(--surface-3)}
.toast .toast-close:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
@keyframes slidein{from{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:none}}

/* CoPilot chat */
.chat{max-width:860px;margin:0 auto;display:flex;flex-direction:column;gap:18px}
.msg{display:flex;gap:13px}
.msg .mav{width:34px;height:34px;border-radius:var(--r-8, 9px);display:grid;place-items:center;flex-shrink:0}
.msg .mav svg,.msg .mav i[data-lucide]{width:17px;height:17px}
/* User initials avatar — the topbar .user-avatar's neutral monogram (--mono-*). */
.msg .mav.mav-initials{font-family:var(--font-display);font-size:var(--fs-12, 12.5px);font-weight:600;letter-spacing:.02em;background:var(--mono-bg);color:var(--mono-fg)}
.bubble{background:var(--chat-in-bg);border:1px solid var(--chat-in-border);color:var(--chat-in-text);border-radius:var(--r-12, 13px);padding:14px 16px;box-shadow:var(--shadow);font-size:var(--fs-14, 13.5px)}
.msg.me{flex-direction:row-reverse}
.msg.me .bubble{background:var(--accent);border-color:transparent;color:var(--on-brand)}   /* the inbox's outgoing look (--chat-* tokens, CHAT THREAD) */
.msg.me .bubble a{color:var(--on-brand)}
/* Rendered-markdown chat replies (mdToHtml): tidy spacing for blocks, lists, links. */
.bubble>div{margin:2px 0}
.bubble .sw-md-list{margin:4px 0;padding-left:18px}
.bubble .sw-md-list li{margin:2px 0}
.bubble a{color:var(--accent);text-decoration:underline}
.bubble code{font-family:var(--font-mono);font-size:var(--fs-12, 12px);background:var(--surface-2);border-radius:var(--r-6, 5px);padding:1px 5px}
.cite{display:inline-flex;align-items:center;gap:6px;font-size:var(--fs-12, 11.5px);font-family:var(--font-mono);color:var(--accent);background:var(--accent-soft);border-radius:var(--r-8, 7px);padding:3px 8px;margin:4px 6px 0 0}
.chatbar{position:sticky;bottom:0;max-width:860px;margin:18px auto 0;display:flex;gap:10px;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-12, 13px);padding:9px;box-shadow:var(--shadow-lg)}
.chatbar input{flex:1;border:none;background:transparent;outline:none;color:var(--text);font-family:inherit;font-size:var(--fs-14, 14px);padding:0 10px}

/* scanner phone */
.phone{width:380px;margin:0 auto;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-16, 28px);box-shadow:var(--shadow-lg);overflow:hidden}
.phone .ph-top{background:var(--accent);color:var(--on-brand);padding:18px 20px;display:flex;align-items:center;justify-content:space-between}
.phone .ph-top h3{font-size:var(--fs-16, 16px)}
.phone .ph-body{padding:18px}
.scan-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:16px}
.scan-btn{aspect-ratio:1.3;border-radius:var(--r-16, 14px);border:1px solid var(--border);background:var(--surface);box-shadow:var(--shadow);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;cursor:pointer;transition:var(--dur-fast) var(--ease);font-weight:600;font-size:var(--fs-13, 13px)}
.scan-btn:hover{border-color:var(--accent);color:var(--accent)}
.scan-btn svg,.scan-btn i[data-lucide]{width:26px;height:26px;color:var(--accent)}
.scanwindow{border:2px dashed var(--border-strong);border-radius:var(--r-16, 14px);height:120px;display:grid;place-items:center;color:var(--muted);margin-bottom:16px;position:relative;overflow:hidden;background:var(--surface-2)}
.scanline{position:absolute;left:8%;right:8%;height:2px;background:var(--accent);box-shadow:0 0 12px var(--accent);animation:scanmove 2.2s ease-in-out infinite}
@keyframes scanmove{0%,100%{top:20%}50%{top:80%}}

/* responsive */
@media(max-width:1180px){.kpis,.tiles{grid-template-columns:repeat(2,1fr)}}
@media(max-width:920px){.split{grid-template-columns:1fr}}
/* The topbar search is hidden on PHONES ONLY (≤768px, the same line as the hamburger) and is
   replaced there by the .search-toggle button + a full-width search strip — mobile.css section A.
   It used to vanish at 920px with nothing in its place, so a phone had no search at all. */
/* KPI tiles stay TWO-UP on a phone (a tile is a label and a number — half a
   screen is plenty), so a 14-tile report is seven rows, not fourteen. Workspace
   tiles carry a description and go single-column. (2026-09-26) */
@media(max-width:680px){.kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.tiles{grid-template-columns:1fr}.view{padding:20px 16px 50px}}
.cols-2{grid-template-columns:1.6fr 1fr}
.cols-3{grid-template-columns:repeat(3,1fr)}
.cols-4{grid-template-columns:repeat(4,1fr)}
/* Five controls that read as ONE row (e.g. the consignment intake header: date,
   number, agent, store, status). A plain .field-grid is auto-fit, so it wraps at
   whatever point the viewport happens to force — which splits a group that is
   meant to be scanned as a line. minmax(0,1fr) lets the columns shrink below
   their content rather than overflowing the card. */
.cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}
@media(max-width:1100px){.cols-2,.cols-3{grid-template-columns:1fr}.cols-4{grid-template-columns:repeat(2,1fr)}.cols-5{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:680px){.cols-4{grid-template-columns:1fr}.cols-5{grid-template-columns:1fr}}

/* ============================================================
   Form vocab (canonical) — .field / .field-grid / .input + affordances.
   Replaces the legacy / .t-* form classes as pages migrate. (.modal is
   intentionally NOT here yet — it collides with legacy style.css .modal;
   it lands when the modal-using pages migrate off style.css.)
   ============================================================ */
.field{display:flex;flex-direction:column;gap:6px}
.field[hidden]{display:none} /* the display above defeats the UA's [hidden] — a field shown only when it applies */
.field>label,.field .field-label{font-size:var(--fs-12, 12px);font-weight:600;color:var(--text-2)}
.field .field-help{font-size:var(--fs-12, 11.5px);font-weight:400;color:var(--muted)}
/* A field label that carries a trailing action ON THE LABEL'S OWN LINE (e.g.
   "change this locked value"). The action is a bare text link, NOT a button:
   a button — even a small one — is taller than the 18px label line, which makes
   that one label taller than its neighbours in the same .field-grid row and
   pushes its input out of line with theirs. Nothing here may add height. */
.field .field-label.row{display:flex;align-items:center;gap:8px;min-height:18px}
.lbl-action{margin-left:auto;flex:0 0 auto;display:inline-flex;align-items:center;gap:3px;
  background:none;border:0;padding:0;height:auto;line-height:inherit;
  font-family:inherit;font-size:var(--fs-11, 11px);font-weight:600;color:var(--accent);
  cursor:pointer;white-space:nowrap;text-decoration:none}
.lbl-action:hover{text-decoration:underline}
.lbl-action i,.lbl-action svg{width:11px;height:11px}
/* The `hidden` attribute must win over that inline-flex — an author display rule
   otherwise beats the UA `[hidden]{display:none}`, and a label action is exactly
   the kind of thing shown conditionally (the price-floor "Change", the linked
   product link). */
.lbl-action[hidden]{display:none}
/* ONE field made of several controls on one line (a key date's picker + its
   "Year unknown" box), under one .field-label. The controls share the field's
   width and the first takes the most; min-width:0 lets them shrink on a phone
   instead of pushing the card sideways. */
.field-split{display:flex;gap:6px;min-width:0}
.field-split>*{flex:1 1 0;min-width:0}
.field-split>:first-child{flex:2 1 0}
/* a checkbox in the row keeps its words on one line; the controls take the rest */
.field-split>.field.check{flex:0 0 auto;white-space:nowrap}
/* A phone number: its country (a searchable select showing "GB +44") in a narrow box,
   the number in the rest (src/geo/phone.js keeps the two as one international number). */
.field-split.phone-split>.ss{flex:0 0 7.25rem}
.field-split.phone-split>:last-child{flex:1 1 0}
/* A field that takes a whole .field-grid row (a multi-control date, a notes line). */
.field-grid>.span-all{grid-column:1/-1}
.field.check{flex-direction:row;align-items:center;gap:8px}
.field.check>label{font-weight:500;color:var(--text)}
/* A checkbox row sharing a .field-grid row with labeled fields: pin it to the
   36px control band at the cell bottom so it lines up with the inputs beside
   it (not floating at the label height). */
.field-grid .field.check{align-self:end;min-height:var(--ctl-h)}
/* A .field-grid cell holding an ACTION instead of an input (e.g. an "Open
   product" link beside the linked-SKU field): it carries no label of its own,
   so pin it to the same 36px control band the inputs beside it sit in. */
.field-grid>.field-act{display:flex;align-items:flex-end;align-self:end;min-height:var(--ctl-h)}
.field-grid>.field-act>.btn{height:var(--ctl-h)}
.field-grid>.field-act.end{justify-content:flex-end}
/* A form in a narrow card: two fixed columns, at every width (an auto-fit grid
   squeezed a date pair into three columns and orphaned the button). */
.field-grid.cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}
/* A list right under the form that adds to it keeps its distance. */
.field-grid + .tablewrap,.field-grid + .empty{margin-top:16px}
.input,
.field input:not([type=checkbox]):not([type=radio]):not([type=file]),
.field select,.field textarea{
  height:var(--ctl-h);width:100%;padding:0 11px;border:1px solid var(--border);border-radius:var(--r-8, 8px);
  font-family:inherit;font-size:var(--fs-13, 13px);font-weight:400;background:var(--surface);color:var(--text);
  outline:none;transition:border-color var(--dur-fast) var(--ease),box-shadow var(--dur-fast) var(--ease)}
textarea.input,.field textarea{height:auto;min-height:62px;padding:9px 12px;line-height:1.5;resize:vertical}
.input:focus,
.field input:focus,.field select:focus,.field textarea:focus{
  border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.input:disabled,.field input:disabled,.field select:disabled,.field textarea:disabled{opacity:.6;cursor:not-allowed}
select.input,.field select{cursor:pointer}
/* ── ONE DROPDOWN ARROW (app-wide) ─────────────────────────────────────────
   Every single-value <select> in the app, canonical (.input / .field) or not,
   paints the SAME chevron (--select-chevron, theme.css) 10px in from its right
   edge, and keeps 30px free on the right so a long value never runs under it.
   A select left on the browser's NATIVE arrow draws it flush against its right
   border (Chrome/macOS), which is what the tray panels, admin cards, modals and
   every legacy page-sheet select looked like beside the canonical ones.
   Why !important: page and legacy sheets set a `background:` or `padding:`
   SHORTHAND on their selects (for the colour / spacing), which silently resets
   background-image to none and padding-right to a few px, and several of them
   out-specify anything app.css could write. Only the arrow's OWN longhands are
   forced; a page keeps its background COLOUR, border, height and font.
   Tune it per context with the two variables, at normal specificity, and
   never re-declare the image: --select-pad-end (the room kept free on the
   right, default 30px) and --select-chevron-x (the arrow's inset, default 10px).
   A listbox ([multiple], or [size] > 1) has no arrow and keeps its own look.
   A searchable select's box (.ss-input, "SEARCHABLE SELECT") is a dropdown too and wears the same arrow.
   Tested by src/ui/select-chevron.browser.test.js. */
select:not([multiple],[size]:not([size="0"],[size="1"])),.ss-input{
  -webkit-appearance:none !important;appearance:none !important;
  background-image:var(--select-chevron) !important;
  background-repeat:no-repeat !important;
  background-size:14px 14px !important;
  background-position:right var(--select-chevron-x,10px) center !important;
  padding-right:var(--select-pad-end,30px) !important;
}
:where(select:not(:disabled)){cursor:pointer}
.input.sm{height:var(--btn-h-sm);width:auto;padding:0 10px;font-size:var(--fs-12, 12.5px);border-radius:var(--r-8, 8px)}
select.input.sm{--select-pad-end:28px;--select-chevron-x:9px}
/* A .tb-input search box nested INSIDE a .field: the `.field input` rule above
   outguns `.tb-input input` on specificity and resets the left padding — the
   magnifying-glass icon then sits ON the text. Re-assert the icon gutter at
   higher specificity so the pairing just works. */
.field .tb-input input:not([type=checkbox]):not([type=radio]):not([type=file]){padding-left:34px}
/* Canonical FILE picker: <input type="file" class="input">. The native
   "Choose file" control gets button-like, theme-aware chrome instead of the
   unstyled UA widget. */
.input[type=file]{padding:0 12px 0 0;height:36px;line-height:34px;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text-2)}
.input[type=file]::file-selector-button{height:34px;margin:0 10px 0 0;padding:0 12px;border:0;border-right:1px solid var(--border);border-radius:var(--r-8, 8px) 0 0 var(--r-8, 8px);background:var(--surface-2);color:var(--text);font-family:inherit;font-size:var(--fs-12, 12.5px);font-weight:600;cursor:pointer;transition:background var(--dur-fast) var(--ease)}
.input[type=file]::file-selector-button:hover{background:var(--surface-3)}
/* Long-text checkbox rows (attestations, consent notices): top-align the box
   against multi-line copy — the base .field.check centers, which is right only
   for one-liners. */
.field.check.top{align-items:flex-start}
.field.check.top input[type=checkbox]{margin-top:2px;flex-shrink:0}
.field.check input[type=checkbox]{accent-color:var(--accent);cursor:pointer}
/* A group's people (Settings → Inbox Groups / Lead Groups, views/admin-groups.ejs):
   everyone as a checkbox, in as many columns as fit (one on a phone), scrolling
   inside the dialog when the team is long. Each one starts at the top of its
   cell (a .field.check in a .field-grid end-aligns, to line up with inputs). */
.grp-people{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:2px 16px;max-height:min(420px,calc(var(--vh) * .5));overflow-y:auto;padding:2px}
.grp-people>.field.check{align-self:start;min-height:34px}
/* .field is a flex box, which beats the hidden attribute: a disabled account
   that is not in the group being edited stays out of the list. */
.grp-people>.field.check[hidden]{display:none}
.input.prefix{border-top-left-radius:0;border-bottom-left-radius:0}
.input.suffix{border-top-right-radius:0;border-bottom-right-radius:0}
.field-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:16px}
/* Mini section label inside a long form card ("IDENTIFICATION", "PRICING") —
   breaks a wall of equal-height inputs into scannable groups. */
.form-sec{display:block;font-size:var(--fs-12, 11.5px);font-weight:700;letter-spacing:.07em;
  text-transform:uppercase;color:var(--muted);margin:20px 0 10px}
.form-sec:first-child,.card-head+.form-sec{margin-top:2px}
/* Required-field affordances: the label's asterisk, and the miss-marker a
   form's save handler paints on unfilled required fields (cleared on the next
   attempt / on input). */
.field .req,.form-sec .req{color:var(--red);font-weight:700}
.field.req-missing input,.field.req-missing textarea,.field.req-missing select,
.field.req-missing .input-affix{border-color:var(--red)}
.field.req-missing>.field-label,.form-sec.req-missing{color:var(--red)}
/* Affixed input ($ / % chip fused to the field) — promoted from the
   consignments report page the moment a second page (the intake form) needed
   it. The !important on the inner border is deliberate: `.field input` would
   otherwise re-draw a border inside the wrapper's own. */
.input-affix{display:flex;align-items:stretch;border:1px solid var(--border);border-radius:var(--r-8, 9px);background:var(--surface);overflow:hidden}
.input-affix[hidden]{display:none}   /* its own display:flex beat `hidden` (New consignment's fixed-fee box showed under the % box, 2026-11-08) */
.input-affix:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.input-affix .affix{background:var(--surface-2);color:var(--muted);font-weight:600;font-size:var(--fs-14, 0.85rem);padding:0 10px;display:flex;align-items:center;border-right:1px solid var(--border)}
.input-affix.suffix .affix{border-right:none;border-left:1px solid var(--border)}
.input-affix input,.field .input-affix input:not([type=checkbox]):not([type=radio]):not([type=file]){
  border:none !important;outline:none;box-shadow:none;height:34px;padding:0 10px;flex:1;font-size:var(--fs-13, 13px);background:transparent;min-width:0;border-radius:0}
.input-affix input:focus{outline:none;box-shadow:none}
.num{text-align:right;font-variant-numeric:tabular-nums}

/* Field info-help "?" badge — opens the info modal wherever tray field
   definitions surface (tray/review/fixing forms, product page). accent-soft +
   accent are both theme-aware (Sellevry blue in light, a lifted blue in dark), so the "?" stays
   readable in both themes — no per-theme override needed. */
.info-btn{display:inline-block;width:15px;height:15px;line-height:15px;text-align:center;
  background:var(--accent-soft);color:var(--accent);border-radius:50%;font-weight:bold;
  cursor:help;margin-left:.4rem;font-size:var(--fs-11, .7rem);vertical-align:middle;position:relative;top:-1px}
/* Media attached to a field's info help (rendered by /js/info-content.js) —
   keep images/videos inside the modal, whatever size was uploaded. Put this
   class on every info modal's content container. */
.info-modal-content img,.info-modal-content video{display:block;max-width:100%;height:auto;
  margin:.75rem auto 0;border-radius:var(--r-8, 8px);border:1px solid var(--border)}

/* RICH TEXT EDITOR (/js/rich-text-editor.js; first user: the mailbox signature,
   Settings → Messaging Channels → Mailboxes → Settings). A bar of formatting
   controls over a box that shows the text as the email will: white paper in
   both themes (--mail-paper), since a signature's colours are picked for mail. */
.rte{display:flex;flex-direction:column;border:1px solid var(--border);border-radius:var(--radius-sm);overflow:hidden;background:var(--surface)}
.rte-bar{display:flex;flex-wrap:wrap;align-items:center;gap:4px;padding:6px;border-bottom:1px solid var(--border);background:var(--surface-2)}
.rte-bar .spacer{flex:1}
.rte-bar select.input.sm{width:auto;min-width:0}
.rte-bar .btn.active{background:var(--surface-3);color:var(--text)}
.rte-color{position:relative;display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;
  border-radius:var(--r-8, 8px);color:var(--text-muted);cursor:pointer}
.rte-color:hover{background:var(--surface-3);color:var(--text)}
.rte-color svg,.rte-color i[data-lucide]{width:16px;height:16px}
.rte-color input[type=color]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;border:0;padding:0}
.rte-linkbar,.rte-imgbar{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:6px;border-bottom:1px solid var(--border);background:var(--surface-2)}
.rte-linkbar[hidden],.rte-imgbar[hidden]{display:none}
.rte-linkbar .input{flex:1 1 220px}
.rte-area{min-height:140px;max-height:calc(var(--vh) * .4);overflow:auto;padding:12px 14px;
  background:var(--mail-paper);color:var(--mail-ink);font-family:Arial,Helvetica,sans-serif;font-size:var(--fs-14, 14px);line-height:1.45;
  overflow-wrap:anywhere;cursor:text;outline:none}
.rte-area[hidden]{display:none}
.rte-area:empty::before{content:attr(data-placeholder);color:var(--mail-ink);opacity:.45;pointer-events:none}
.rte-area a{color:inherit}
.rte-area img{max-width:100%;height:auto;cursor:pointer}
/* A table pasted from a signature generator looks as a mail program shows it:
   the browser's own table, not the app's data-table look (width, nowrap, padding). */
.rte-area :is(table,thead,tbody,tfoot,tr,td,th){all:revert}
.rte-area img.rte-picked{outline:2px solid var(--accent);outline-offset:2px}
.rte:focus-within{border-color:var(--accent)}
.rte-source.input{min-height:180px;height:auto;border:0;border-radius:0;font-family:var(--font-mono);font-size:var(--fs-12, 12.5px);line-height:1.5;resize:vertical}
.rte-source[hidden]{display:none}

/* TRAY TYPE COLOURS (Settings → Tray Types, src/trays/types/): a tray's type wears
   one of the pill colours and is SHOWN as a `.pill <colour>` with its dot, next
   to the tray (Trays list Status cell, Kanban cards, Review list) — never as a
   coloured edge on a row or card. A row/card with a type also carries
   `.typed .tt-<colour>`, which sets --tt-color / --tt-bg for anything that needs
   the type's colour as a value. The default type (Normal) shows no pill. */
.tt-red{--tt-color:var(--danger);--tt-bg:var(--red-bg)}
.tt-amber{--tt-color:var(--amber);--tt-bg:var(--amber-bg)}
.tt-green{--tt-color:var(--green);--tt-bg:var(--green-bg)}
.tt-blue{--tt-color:var(--blue);--tt-bg:var(--blue-bg)}
.tt-violet{--tt-color:var(--violet);--tt-bg:var(--violet-bg)}
.tt-magenta{--tt-color:var(--pri-mag);--tt-bg:var(--magenta-bg)}
.tt-gray{--tt-color:var(--gray);--tt-bg:var(--gray-bg)}

/* VARIABLE LABELS — a value the app fills in, shown as a blue .pill.xs inside a
   text box: the plain message box (/js/template-editor.js; Message Templates,
   an email's subject) and the styled editor's box (.rte-area, a message's email
   text in Notifications & Messages). The box grows with the text up to half the
   screen, then scrolls; line breaks are kept as typed. .is-line = a one-line box. */
.tpl-body-head{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.tpl-editor.input{height:auto;min-height:180px;max-height:calc(var(--vh) * .5);overflow-y:auto;padding:9px 12px;line-height:1.75;
  white-space:pre-wrap;overflow-wrap:anywhere;cursor:text}
.tpl-editor.input.is-line{min-height:0;white-space:normal;line-height:1.6}
.tpl-editor:empty::before{content:attr(data-placeholder);color:var(--text-muted);pointer-events:none}
:is(.tpl-editor,.rte-area) .tpl-var{margin:0 1px;cursor:default;user-select:all;vertical-align:baseline}
.rte-area .tpl-var{color:var(--mail-var);background:var(--mail-var-bg)}
/* The variable menu lists every variable: it scrolls rather than run off the window. */
.tpl-var-menu .act-menu-pop{min-width:260px;max-width:min(360px, calc(100vw - 32px));max-height:min(420px, calc(var(--vh) * .6));overflow-y:auto}
/* An entry that says what it puts in: its name, then a muted line under it. */
.tpl-var-menu .act-menu-item:has(.act-menu-note){flex-direction:column;align-items:flex-start;gap:1px;white-space:normal}
.tpl-var-menu .act-menu-item strong{font-weight:600}
.tpl-var-menu .act-menu-note{font-size:var(--fs-12, 12px);line-height:1.35;color:var(--text-muted)}

/* Field info-help editor (/js/field-info-editor.js on the admin field forms):
   a text box where a link reads as underlined words (no markup to type), the
   Add link fields, attached-media chips + the two add actions. */
.info-editor{display:flex;flex-direction:column;gap:8px}
.input.info-editor-text{height:auto;min-height:84px;padding:9px 12px;line-height:1.5;cursor:text;
  white-space:pre-wrap;overflow-wrap:anywhere}
.info-editor-text:empty::before{content:attr(data-placeholder);color:var(--muted);pointer-events:none}
.info-editor-text a{color:var(--accent);text-decoration:underline;text-underline-offset:2px;cursor:pointer}
.info-editor-link{display:flex;flex-direction:column;gap:8px;padding:12px;border:1px solid var(--border);
  border-radius:var(--r-8, 9px);background:var(--surface-2)}
.info-editor-link[hidden]{display:none}
.info-editor-link .field-msg{margin-top:0}
.info-editor-link-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.info-editor-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.info-editor-status{font-size:var(--fs-12, 12px);color:var(--muted)}
.info-editor-status.error{color:var(--red)}
.info-editor-media{display:flex;flex-wrap:wrap;gap:8px}
.info-media-chip{display:flex;align-items:center;gap:8px;max-width:260px;padding:6px 8px;
  border:1px solid var(--border);border-radius:var(--r-8, 9px);background:var(--surface-2)}
.info-media-chip img,.info-media-chip video{width:44px;height:44px;object-fit:cover;border-radius:var(--r-8, 7px);
  border:1px solid var(--border);background:var(--surface);flex-shrink:0}
.info-media-name{font-size:var(--fs-12, 12px);color:var(--text-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.info-media-remove{flex-shrink:0;width:22px;height:22px;border:none;border-radius:var(--r-8, 7px);background:transparent;
  color:var(--text-muted,var(--muted));font-size:var(--fs-15, 15px);line-height:1;cursor:pointer}
.info-media-remove:hover{background:var(--surface-3,var(--surface));color:var(--text)}

/* ============================================================
   Compat helpers — legacy t-* form/utility classes ported from
   ds.css onto the example token set, so pages that load app.css
   (without ds.css) render their filters & forms correctly.
   Pages that self-define these (e.g. #search-request-form .t-field)
   keep their own look via higher specificity / source order.
   ============================================================ */
.t-field{display:flex;flex-direction:column;gap:6px;font-size:var(--fs-12, 11.5px);font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}
.t-field input:not([type=checkbox]):not([type=radio]):not([type=file]),
.t-field select,.t-field textarea,
.t-input,input.t-prefix,input.t-suffix{
  height:36px;padding:0 12px;border:1px solid var(--border);border-radius:var(--r-8, 9px);font-family:inherit;font-size:var(--fs-13, 13px);
  font-weight:400;text-transform:none;letter-spacing:normal;background:var(--surface);color:var(--text);outline:none;transition:border-color var(--dur-fast) var(--ease),box-shadow var(--dur-fast) var(--ease)}
.t-field textarea{height:auto;min-height:62px;padding:9px 12px;line-height:1.5;resize:vertical}
.t-field input:not([type=checkbox]):not([type=radio]):not([type=file]):focus,
.t-field select:focus,.t-field textarea:focus,
.t-input:focus,input.t-prefix:focus,input.t-suffix:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft);background:var(--surface)}
.t-field input:disabled,.t-field select:disabled,.t-input:disabled{opacity:.6;cursor:not-allowed}
.t-field-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:16px}
.t-muted{color:var(--muted)}
.t-mono{font-family:var(--font-mono)}
/* status words as TEXT take the text step of their colour (theme.css --*-text, ≥ 4.5:1) */
.t-green{color:var(--green-text)} .t-blue,.t-cyan{color:var(--blue-text)} .t-amber,.t-yellow,.t-orange{color:var(--amber-text)}
.t-red,.t-pink{color:var(--red-text)} .t-gray{color:var(--gray-text)} .t-violet,.t-purple,.t-indigo{color:var(--violet)}


/* ============================================================
   Shell widgets (avatar menu, account-settings modal, footer)
   moved from style.css 2026-06-20 so the x-shell no longer needs
   the legacy sheet. Mirrored into examples/app.css to keep the
   drift gate green.
   ============================================================ */
.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    /* THE neutral monogram (colour system: a person is never a colour —
       owner, 2026-10-22, the mock's grey disc). */
    background: var(--mono-bg);
    color: var(--mono-fg);
    font-size: var(--fs-12, 12px);
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.02em;
    flex-shrink: 0;
    user-select: none;
    /* button reset (the avatar is now a menu trigger) */
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}
.user-avatar { transition: box-shadow var(--dur-fast) var(--ease); }
.user-avatar:hover { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.user-avatar:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* ── User-avatar account menu ─────────────────────────────────────────── */
.user-menu { position: relative; display: inline-flex; align-items: center; }
/* In the top bar the avatar is a 30px disc beside the 34px icon circles (the mock).
   Scoped to .topbar so the scanner-login avatar keeps its own sizing. */
.topbar .user-menu { margin-left: 6px; }
.topbar .user-avatar { width: 30px; height: 30px; font-size: var(--fs-11, 11px); }
.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 248px;
    background: var(--surface);
    border: 1.25px solid var(--border);
    border-radius: var(--r-8, 8px);
    box-shadow: var(--elev-3, 0 10px 30px rgba(0, 0, 0, 0.12));
    padding: 6px;
    z-index: 1000;
}
.user-menu-id { padding: 8px 10px 10px; border-bottom: 1px solid var(--border-light); margin-bottom: 4px; }
.user-menu-name { font-weight: 700; color: var(--text); font-size: var(--fs-13, 13px); }
.user-menu-role { color: var(--text-muted); font-size: var(--fs-12, 12.5px); margin-top: 1px; }
.user-menu-email { color: var(--text-muted); font-size: var(--fs-12, 12px); margin-top: 2px; word-break: break-all; }
.user-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 8px 10px;
    font-size: var(--fs-13, 13px);
    color: var(--text);
    border-radius: var(--r-6, 6px);
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    box-sizing: border-box;
}
.user-menu-item:hover { background: var(--surface-2); }/*
then the label.
   Toggle rows add a switch on the far right (below). Leading icons are muted so
   the labels read first. */
.user-menu-item svg, .user-menu-toggle > svg,.user-menu-item i[data-lucide],.user-menu-toggle > i[data-lucide],.user-menu-appearance > svg,.user-menu-appearance > i[data-lucide] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--text-muted);
}

.user-menu-row-label { flex: 1 1 auto; min-width: 0; white-space: nowrap; }
/* Hairline separator that sets Log out apart from the rest. */
.user-menu-sep { height: 1px; margin: 4px 6px; background: var(--border-light); }
/* The logout row is wrapped in a POST form; keep it laying out like a plain row. */
.user-menu-logout-form { margin: 0; display: block; width: 100%; }/*
so they're untouched. */
/* Logout is a <button> inside a POST form (a GET /logout was CSRF-able), so these
   match both element types — the row must look identical either way. */
.user-menu .user-menu-dropdown a.user-menu-item.user-menu-logout,
.user-menu .user-menu-dropdown button.user-menu-item.user-menu-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border-radius: var(--r-6, 6px);
    text-align: left;
    background: none;
    /* the text colour, like every row (the Apple design review, 2026-10-23, L2: red
       means destruction, and signing out destroys nothing); the separator above it
       sets it apart */
    color: var(--text);
    font-weight: inherit;
}
.user-menu .user-menu-dropdown a.user-menu-item.user-menu-logout:hover,
.user-menu .user-menu-dropdown button.user-menu-item.user-menu-logout:hover {
    background: var(--surface-2);
    color: var(--text);
}/*
but for non-destructive <a> rows (e.g.
   Admin): force the normal text color so they match the <button> items
   instead of inheriting the grey/near-white topbar link color. */
.user-menu .user-menu-dropdown a.user-menu-item:not(.user-menu-logout), .user-menu .user-menu-dropdown a.user-menu-item:not(.user-menu-logout):hover {
    color: var(--text);
}
.user-menu-toggle {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--r-6, 6px);
    font-size: var(--fs-13, 13px);
    color: var(--text);
    cursor: pointer;
    box-sizing: border-box;
}
.user-menu-toggle:hover { background: var(--surface-2); }
/* Appearance (System / Light / Dark) — the one segmented control in the menu (/js/theme.js). */
.user-menu-appearance { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 10px; font-size: var(--fs-13, 13px); color: var(--text); }
.segmented.sm > label > span { height: 24px; padding: 0 9px; font-size: var(--fs-12, 12px); }
/* The bar's light/dark button (and the Console's): a moon in light, a sun in dark. */
[data-theme-toggle] .when-dark { display: none; }
html[data-theme="dark"] [data-theme-toggle] .when-dark { display: inline-block; }
html[data-theme="dark"] [data-theme-toggle] .when-light { display: none; }
/* The console's avatar-menu "Notifications" switch (/js/push.js): why it can't be switched on here, under its label */
.user-menu-toggle .user-menu-hint { display: block; font-size: var(--fs-11, 11px); color: var(--text-muted); white-space: normal; line-height: 1.3; margin-top: 2px; }
.user-menu-toggle .user-menu-hint[hidden] { display: none; }
.user-menu-toggle.is-disabled { cursor: default; }
.user-menu-toggle.is-disabled .user-menu-switch { opacity: .45; }
.user-menu-toggle[hidden] { display: none; }
/* The native checkbox stays in the DOM (the JS toggles still listen to it) but
   is visually hidden; the switch below shows the on/off state instead. */
.user-menu-toggle-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    margin: 0;
    pointer-events: none;
}/*
accent = on. */
.user-menu-switch {
    position: relative;
    flex-shrink: 0;
    width: 36px;
    height: 20px;
    border-radius: var(--r-full, 999px);
    background: var(--border-subtle);
    transition: background var(--dur-fast) var(--ease);
}
.user-menu-switch::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--surface);
    box-shadow: var(--elev-1, 0 1px 2px rgba(0, 0, 0, 0.25));
    transition: transform var(--dur-fast) var(--ease);
}
.user-menu-toggle-input:checked ~ .user-menu-switch { background: var(--accent); }
.user-menu-toggle-input:checked ~ .user-menu-switch::after { transform: translateX(16px); }
.user-menu-toggle:hover .user-menu-switch { background: var(--text-faint); }
.user-menu-toggle:hover .user-menu-toggle-input:checked ~ .user-menu-switch { background: var(--accent-strong); }
/* ── Account modals ───────────────────────────────────────────────────── */
.account-modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.account-modal-overlay:not([hidden]) { display: flex; }
.account-modal {
    background: var(--surface);
    border-radius: var(--r-12, 10px);
    padding: 22px 22px 18px;
    width: 360px;
    max-width: calc(100vw - 32px);
    box-shadow: var(--elev-4, 0 20px 50px rgba(0, 0, 0, 0.25));
    display: none;
}
.account-modal:not([hidden]) { display: block; }
.account-modal h3 { margin: 0 0 14px; font-size: var(--fs-16, 16px); color: var(--text); }
.account-modal label {
    display: block;
    font-size: var(--fs-12, 12px);
    font-weight: 600;
    color: var(--text-subtle);
    margin-bottom: 10px;
}
.account-modal label input {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 8px 10px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-6, 6px);
    font-size: var(--fs-14, 14px);
    box-sizing: border-box;
}
.account-modal-hint { font-size: var(--fs-11, 11px); color: var(--text-muted); margin: -4px 0 12px; }
/* Live password-strength checklist — mirrors #password-requirements on the
   admin edit-user page. */
.account-pw-req { font-size: var(--fs-12, 12px); color: var(--text-muted); margin: -2px 0 12px; padding-left: 4px; }
.account-pw-req div { transition: color var(--dur-slow) var(--ease); }
.account-pw-req div.valid { color: var(--success); text-decoration: line-through; }
.account-pw-req div.valid::before { content: '✓ '; }
.account-modal-msg { font-size: var(--fs-12, 12px); min-height: 16px; margin-bottom: 8px; }
.account-modal-msg.is-error { color: var(--danger); }
.account-modal-msg.is-ok { color: var(--success); }
.account-modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.account-modal-actions .btn-primary,
.account-modal-actions .btn-secondary {
    padding: 8px 16px;
    border-radius: var(--r-6, 6px);
    font-size: var(--fs-13, 13px);
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    font-family: inherit;
}
.account-modal-actions .btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-end, var(--accent-strong, var(--accent)))); color: var(--on-brand); }
.account-modal-actions .btn-primary:hover { filter: brightness(1.06); }
.account-modal-actions .btn-primary:disabled { opacity: 0.6; cursor: default; }
.account-modal-actions .btn-secondary { background: var(--surface-3); color: var(--text); border-color: var(--border); }
.account-modal-actions .btn-secondary:hover { background: var(--border); }
/* ── User-settings modal (tabbed: password / PIN / phone / MCP) ────────── */
.account-modal.account-settings { position: relative; width: 718px; }
.account-settings > h3 {
    font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em;
    padding-right: 30px; /* clear the top-right close */
}
/* Top-right ghost icon-close, matching the canonical modal close. */
.account-modal-close {
    position: absolute; top: 12px; right: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; padding: 0;
    background: none; border: none; border-radius: var(--r-8, 8px);
    color: var(--text-muted); cursor: pointer;
}
.account-modal-close:hover { background: var(--surface-3); color: var(--text); }
.account-modal-close svg,.account-modal-close i[data-lucide] { width: 18px; height: 18px; }
/* its tabs are THE tabs (app.css "TABS" — one tab size app-wide, owner 2026-10-22) */
.account-tabs { margin: 0 0 16px; }
/* Stack every panel in one grid cell so the modal is always as tall as the
   TALLEST panel (password) — the height never jumps when you switch tabs. The
   inactive panels keep their box (so the cell keeps its size) but are hidden. */
.account-panels { display: grid; height: calc(var(--vh) * .58); } /* fixed: the same height on every tab */
.account-panel { grid-area: 1 / 1; min-width: 0; overflow-y: auto; }
.account-panel[hidden] { display: block; visibility: hidden; } /* keep sized, override UA display:none */
.account-panel:not([hidden]) { visibility: visible; }
/* Connect-via-MCP panel */
.account-mcp-lead { font-size: var(--fs-13, 13px); color: var(--text-subtle); margin: 0 0 12px; line-height: 1.5; }
.account-mcp-steps { margin: 0 0 14px; padding-left: 18px; font-size: var(--fs-13, 13px); color: var(--text); line-height: 1.5; }
.account-mcp-steps li { margin-bottom: 6px; }
.account-mcp-field { display: block; font-size: var(--fs-12, 12px); font-weight: 600; color: var(--text-subtle); margin-bottom: 8px; }
.account-mcp-url { display: flex; gap: 6px; margin-top: 4px; }
.account-mcp-url input {
    flex: 1 1 auto; min-width: 0;
    padding: 8px 10px; border: 1px solid var(--border-subtle); border-radius: var(--r-6, 6px);
    font-family: var(--font-mono); font-size: var(--fs-12, 12px);
    background: var(--surface-2); color: var(--text); box-sizing: border-box;
}
.account-mcp-url .btn { flex-shrink: 0; }
/* The generic hint tucks tight under form inputs (-4px); give it real breathing
   room under the MCP address row instead. */
.account-mcp .account-modal-hint { margin-top: 12px; }
/* A lead paragraph at the top of a settings panel. */
.account-lead { font-size: var(--fs-13, 13px); color: var(--text-subtle); margin: 0 0 12px; line-height: 1.5; }
/* Passkeys panel — the account's passkeys, above the "add" form. */
.passkey-list { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; }
.passkey-row {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px;
    border: 1px solid var(--border); border-radius: var(--r-8, 8px); background: var(--surface-2);
}
.passkey-row > svg,.passkey-row > i[data-lucide] { width: 16px; height: 16px; flex: 0 0 auto; color: var(--text-muted); }
.passkey-meta { flex: 1 1 auto; min-width: 0; }
.passkey-name { font-size: var(--fs-13, 13px); font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.passkey-sub { font-size: var(--fs-12, 11.5px); color: var(--text-muted); }
.passkey-empty { font-size: var(--fs-12, 12.5px); color: var(--text-muted); margin: 0; }
.passkey-row > .btn { flex: 0 0 auto; }
/* Renaming in place: the name becomes a text box with Save / Cancel. */
.passkey-rename { display: flex; align-items: center; gap: 6px; flex: 1 1 auto; min-width: 0; margin: 0; }
.passkey-rename .input { flex: 1 1 auto; min-width: 0; }

/* ── Standalone account pages (the account-setup link) ───────────────────
   A card on a plain page, for a flow that runs before anyone is signed in.
   Controls inside are the canonical .field / .input / .btn / .flash. */
/* minmax(0,1fr): an `auto` track sizes itself to the card's 440px and overflows a
   phone, and the card's max-width:100% then resolves against that track — the
   track must be the screen, so the card can shrink to it (2026-09-26). */
body.auth-page { display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; min-height: 100vh; margin: 0; padding: 24px 16px; box-sizing: border-box; }
.auth-card {
    width: 440px; max-width: 100%; box-sizing: border-box; padding: 30px 30px 24px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-16, 18px); box-shadow: var(--shadow-lg);
}
.auth-brand { display: flex; justify-content: center; margin: 0 0 20px; }
/* SIGN-IN BACKGROUND — the se. logo tiles drifting behind the sign-in card on the
   staff sign-in and the scanner kiosk sign-in (markup: partials/login-bg). The
   tile file carries its own gradient, so only its opacity follows the theme. */
.login-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.login-bg-tile { position: absolute; height: auto; max-width: none; opacity: .09; }
[data-theme="dark"] .login-bg-tile { opacity: .08; }
.auth-kicker { margin: 0 0 6px; font-family: var(--font-mono); font-size: var(--fs-11, 11px); letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.auth-title { margin: 0 0 8px; font-family: var(--font-display); font-size: var(--fs-20, 21px); font-weight: 600; letter-spacing: -.02em; line-height: 1.25; color: var(--text); }
.auth-lead { margin: 0 0 16px; font-size: var(--fs-14, 13.5px); line-height: 1.55; color: var(--text-subtle); }
.auth-steps { margin: 0 0 18px; padding-left: 20px; font-size: var(--fs-13, 13px); line-height: 1.6; color: var(--text); }
.auth-form { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.auth-form + .auth-form { margin-top: 8px; }
.auth-submit { width: 100%; height: 42px; justify-content: center; }
.auth-qr { display: block; width: 196px; height: 196px; margin: 0 auto 12px; border: 1px solid var(--border); border-radius: var(--r-12, 10px); image-rendering: pixelated; }
.auth-help { margin: 0 0 6px; font-size: var(--fs-12, 12.5px); text-align: center; color: var(--text-muted); }
.auth-secret {
    margin: 0 0 18px; padding: 9px 12px; font-family: var(--font-mono); font-size: var(--fs-13, 13px); text-align: center;
    word-break: break-all; user-select: all; color: var(--text);
    background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-8, 9px);
}
.auth-done { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 14px; border-radius: 50%; background: var(--green-bg); color: var(--green); }
.auth-done svg,.auth-done i[data-lucide] { width: 24px; height: 24px; }
.auth-center { text-align: center; }
.auth-foot { margin: 16px 0 0; text-align: center; }
.auth-foot button { padding: 0; border: 0; background: none; font: inherit; font-size: var(--fs-12, 12.5px); color: var(--text-muted); cursor: pointer; }
.auth-foot button:hover { color: var(--text); text-decoration: underline; }
/* The "or" rule between the password form and the passkey button on /login. */
.auth-or { display: flex; align-items: center; gap: 10px; margin: 16px 0; font-size: var(--fs-12, 12px); color: var(--text-muted); }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
/* ... all existing styles ... */

.app-footer {
    /* Use Flexbox for powerful centering */
    display: flex;
    justify-content: center;
    align-items: center;

    /* No width:100% here — the shell footer is a stretched flex item that also
       carries margin-left:var(--rail-w) to clear the fixed sidebar (see body > .app-footer
       below). width:100% would make it viewport-wide AND offset by the rail, pushing it
       past the right edge and giving every page a horizontal scrollbar. Letting
       it auto-size (block / flex-stretch) fills the available space correctly. */

    /* Your other styles */
    padding: 2rem 1rem;
    margin-top: 3rem;
    color: var(--text-muted);
    font-size: var(--fs-14, 0.9rem);
    border-top: 1px solid var(--border);
}
/* Heart in the footer is the entry point to /easter-egg. We keep the heart
   the same colour as the surrounding footer text so the link is hidden in
   plain sight; on hover it blooms red and pulses gently. */
.app-footer .ee-heart,
.ee-heart {
    color: inherit;
    text-decoration: none;
    display: inline-block;
    transition: color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.app-footer .ee-heart:hover,
.ee-heart:hover {
    color: var(--danger);
    transform: scale(1.25);
    animation: ee-heart-beat 0.9s ease-in-out infinite;
}
body > .app-footer {
    flex: 0 0 auto;
    margin-left: calc(var(--rail-w) + var(--rail-inset) + var(--rail-gap)); /* clear the fixed sidebar, matching .main */
}

@keyframes ee-heart-beat {
    0%, 100% { transform: scale(1.25); }
    50%      { transform: scale(1.45); }
}


/* ============================================================
   Generic utilities ported from style.css 2026-06-20 (.actions
   button-row, .chart-container, .empty-state-icon, .status-dot)
   so report/admin/crm pages can drop the legacy sheet. Mirrored
   into examples/app.css to keep the drift gate green.
   ============================================================ */
.actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}
/* Compact table-cell primitives (reusable across report/admin tables):
   a vertical action stack, a right-aligned button row, a compact numeric
   input, a small muted sub-note line, and a tighter wrap-cell width. */
.act-stack { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.act-row { display: flex; gap: 6px; justify-content: center; }
/* …against the previous column instead of centred — pair it with .joins-next on
   that column so the pill and the button that acts on it read as one cluster. */
.act-row.start { justify-content: flex-start; }
.input.num-input { width: 80px; text-align: right; font-variant-numeric: tabular-nums; }
.cell-note { font-size: var(--fs-12, 12px); color: var(--muted); line-height: 1.35; margin-top: 3px; white-space: normal; overflow-wrap: anywhere; }
/* …wrapping only BETWEEN words, for a note that carries a code (a tracking number):
   `anywhere` lets a squeezed table shrink the column to one character, which split
   the number across lines — here the column keeps the width of its longest word. */
.cell-note.keep-words { overflow-wrap: break-word; }
.wrap-cell.tight { max-width: 320px; }
.tac { text-align: center !important; }
/* Vertical rhythm for a column of blocks, such as a window body filled from JS: every
   block after the first keeps a gap from the one above it. */
.stack > * + * { margin-top: 14px; }
/* The same rhythm for a list of short lines inside one table cell. */
.stack.tight > * + * { margin-top: 4px; }
/* A control that must NOT stretch inside a column flex parent. `.field` is
   `flex-direction:column`, so a `.btn` placed in one is stretched to the full
   field width by the default `align-items:stretch` — invisible on a ghost
   button until it is hovered and the whole row paints. Add `self-start`. */
.self-start { align-self: flex-start; }
.tlink { cursor: pointer; }
.tlink:hover { text-decoration: underline; text-underline-offset: 2px; color: var(--accent); }
/* A link inside running text that must READ as a link at rest — every `a`
   inherits the text colour (`a{color:inherit}` above), so a link among words is
   otherwise invisible until hovered. The History's photo links are one. */
.text-link { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.text-link:hover { color: var(--accent); }
.chart-container {
    position: relative;
    width: 100%;
    height: 200px;
    /* Adjust this value as needed */
    margin: 1rem 0;
}
.empty-state-icon svg.lucide,.empty-state-icon i[data-lucide] {
    width: 1em;
    height: 1em;
}
.status-dot {
    display: inline-block;
    width: 0.75em;
    height: 0.75em;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 0.25em;
}
.status-dot.red { background: var(--danger); }
.status-dot.orange { background: var(--signal); }
.status-dot.yellow { background: var(--warning); }
.status-dot.green { background: var(--success); }
.status-dot.blue { background: var(--accent); }


/* thumbnail image component ported from style.css 2026-06-20; mirrored to examples for drift gate */
.thumbnail {
    position: relative;
    width: 150px;
    height: 150px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-8, 8px);
    overflow: hidden;
    background-color: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
}
.thumbnail img {
    max-width: 100%;
    max-height: 100%;
    cursor: pointer;
    transition: transform var(--dur) var(--ease);
}
@media (hover: hover) {
    .thumbnail img:hover {
        transform: scale(1.05);
    }
}
/* For saved images shown as text */
.thumbnail .text-preview {
    padding: 0.5rem;
    font-size: var(--fs-14, 0.9rem);
    color: var(--text-subtle);
    text-align: center;
    word-break: break-all;
}
.thumbnail .remove-image-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: var(--overlay);
    color: var(--text-inverse);
    border: none;
    border-radius: 50%;
    box-sizing: border-box;
    padding: 0 0 2px;
    width: 24px;
    height: 24px;
    font-size: var(--fs-14, 14px);
    line-height: 1;
    cursor: pointer;
    transition: background-color var(--dur) var(--ease);

    /* Flexbox for perfect centering */
    display: flex;
    align-items: center;
    justify-content: center;
}
.thumbnail .remove-image-btn:hover {
    background-color: rgba(200, 0, 0, 0.8);
}
/* Styles for SortableJS Drag & Drop feedback */
.thumbnail.sortable-ghost {
    opacity: 0.4;
    background-color: var(--text-faint);
}
.thumbnail.sortable-chosen {
    cursor: grabbing;
}

/* ── Dashboard widgets — inline edit mode (Edit → per-widget ×, drag, + add) ──── */
.tile { position: relative; }
.tile-remove {
    position: absolute; top: -8px; right: -8px;
    display: none; align-items: center; justify-content: center;
    width: 22px; height: 22px; padding: 0;
    border-radius: 50%; border: 2px solid var(--surface);
    background: var(--danger); color: #fff; cursor: pointer;
    box-shadow: var(--shadow); z-index: 3;
}
.tile-remove svg,.tile-remove i[data-lucide] { width: 12px; height: 12px; }
.tile-remove:hover { filter: brightness(1.08); }
.tiles-status { font-size: var(--fs-12, 12px); color: var(--text-muted); }
.tiles-status.is-error { color: var(--danger); }

/* Add-a-widget picker (inside the Overview's "Add" modal) */
.tiles-add-list { display: flex; flex-direction: column; gap: 8px; }
/* The picker keeps ONE height however many widgets are left to add. */
.x-modal__body:has(> .tiles-add-list) { height: calc(var(--vh) * .6); overflow-y: auto; }
.tiles-add-item {
    display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
    padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-12, 10px);
    background: var(--surface-2); color: var(--text); cursor: pointer; font: inherit;
}
.tiles-add-item:hover { background: var(--surface-3); border-color: var(--border-strong); }
.tiles-add-item .ic { width: 34px; height: 34px; border-radius: var(--r-8, 9px); display: grid; place-items: center; flex: 0 0 auto; }
.tiles-add-item .ic svg,.tiles-add-item .ic i[data-lucide] { width: 17px; height: 17px; }
.tiles-add-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; }
.tiles-add-text strong { font-size: var(--fs-14, 14px); font-weight: 600; }
.tiles-add-text span { font-size: var(--fs-12, 12px); color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tiles-add-plus { color: var(--text-muted); display: inline-flex; flex: 0 0 auto; }
.tiles-add-plus svg,.tiles-add-plus i[data-lucide] { width: 18px; height: 18px; }

/* The `hidden` attribute must win over the flex/inline-flex `display` these set —
   author display rules otherwise beat the UA `[hidden]{display:none}`. Used by the
   dashboard editors to hide widgets and to show the "Add" button only in edit mode.
   (Global `[hidden]!important` is avoided — it would break .account-panel[hidden].) */
.dash-widget[hidden] { display: none; }
.btn[hidden] { display: none; }
/* Same trap, one level up: `.field` is display:flex, so a `hidden` field label
   (e.g. the social composer's schedule time, shown only for "Schedule…") stayed
   fully visible — label, input and all. */
.field[hidden] { display: none; }

/* ── Overview widget grid — a standardized "bento" grid on a 4-column base with a
   --dash-row row height for CHART cards, so every widget snaps to the layout and
   heights always line up. Widgets span whole columns AND rows. Four sizes:
     stat  1×1 — a KPI number card / tiny chart
     tile  2×1 — a small chart (sparkline or donut) with a headline number
     panel 2×2 — a full chart with axes
     wide  4×2 — a full-width chart (dense time series)
   A chart card fills its grid cell and the chart flexes to fill the card, so a chart
   is exactly as tall as its tile. A KPI card is the ONE exception: it sizes to its
   own content, so it matches the .inv-kpi tile on Inventory instead of being padded
   out to a chart's height. ── */
/* minmax(0,1fr) — NOT plain 1fr (=minmax(auto,1fr)) — so a tile with a wide, non-wrapping
   value/label cannot stretch its column past the others; every column stays exactly equal. */
/* Rows are content-sized; --dash-row is the height a CHART card claims (what the
   grid used to hand every row). A KPI card is shorter than a chart — it holds a
   label, a number and a delta, not a plot — so a fixed row height stretched it
   past the identical .inv-kpi tile on Inventory. Rows now size to what they hold:
   a row of KPI tiles is exactly one KPI tall, a row with a chart is --dash-row. */
.grid.widgets { --dash-row: 158px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: auto; gap: 16px; }
.dash-widget { position: relative; display: flex; min-width: 0; }
.dash-widget > .kpi, .dash-widget > .dash-widget-card { flex: 1 1 auto; width: 100%; height: 100%; min-width: 0; }
/* A KPI widget is exactly as tall as its content — the SAME height as the .inv-kpi
   tiles on Inventory (identical padding / label / value / delta metrics). Both the
   grid item and the card have to opt out of the stretch: the item out of the row's
   `align-self:stretch`, the card out of `height:100%` above. */
.dash-widget:has(> .kpi) { align-self: start; }
.dash-widget > .kpi { height: auto; }
/* …and because it sizes to its own content, a tile whose sub-line uses the
   second row would stand 18px taller than its neighbours in the same auto-sized
   row (they are top-aligned, so the row would read ragged). Every Overview KPI
   RESERVES both rows — the "reserve the box" rule — so the strip stays level
   whether a tile carries a `.delta-note` or not. */
.dash-widget > .kpi .delta { min-height: 36px; }
/* Chart cards keep the heights the fixed-row grid gave them: a stat/tile chart is
   one row tall, a panel/wide chart two rows plus the gap between them. */
.dash-widget.w-stat > .dash-widget-card,
.dash-widget.w-tile > .dash-widget-card { min-height: var(--dash-row); }
.dash-widget.w-panel > .dash-widget-card,
.dash-widget.w-wide > .dash-widget-card { min-height: calc(var(--dash-row) * 2 + 16px); }
.dash-widget.w-stat  { grid-column: span 1; grid-row: span 1; }
.dash-widget.w-tile  { grid-column: span 2; grid-row: span 1; }
.dash-widget.w-panel { grid-column: span 2; grid-row: span 2; }
.dash-widget.w-wide  { grid-column: span 4; grid-row: span 2; }
.dash-widget[data-widget-href] { cursor: pointer; }
/* a tile the keyboard is on (/js/dashboard-widgets.js: a link to its report; in Edit mode
   a widget the arrow keys move) — the Apple design review, 2026-10-23 */
.dash-widget:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius); }
.grid.widgets.editing .dash-widget { cursor: move; }
.grid.widgets .tile-remove { display: none; }
.grid.widgets.editing .tile-remove { display: inline-flex; }
.grid.widgets.editing .dash-widget .kpi:hover,
.grid.widgets.editing .dash-widget .dash-widget-card:hover { transform: none; box-shadow: var(--shadow); }
/* Chart cards mirror the KPI card exactly — same surface / border / shadow /
   padding, a `.lbl` label at the top (no divider line, no `.card-head`), a `.val`
   headline number, and the chart filling the rest. So a stat-size chart tile is
   visually identical in structure to a KPI tile. */
.dash-widget-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 18px 12px;
  display: flex; flex-direction: column; height: 100%; overflow: hidden;
}
.dash-widget-card .lbl { font-size: var(--fs-12, 12.5px); color: var(--muted); display: flex; align-items: center; gap: 7px; font-weight: 500; min-width: 0; }
.dash-widget-card .lbl svg,.dash-widget-card .lbl i[data-lucide] { width: 15px; height: 15px; flex: 0 0 auto; }
/* "Opens a report" arrow on a chart widget: always laid out, shown only once the
   widget's fetch set data-widget-href (a viewer who can't open the report gets none). */
.dash-widget-card .lbl .widget-link-arrow { margin-left: auto; color: var(--muted); visibility: hidden; }
.dash-widget[data-widget-href] .dash-widget-card .lbl .widget-link-arrow { visibility: visible; }
/* A card a link can jump to (…#section) clears the fixed topbar. */
.card[id] { scroll-margin-top: calc(var(--topbar-h) + 16px); }
.dash-widget-card .lbl span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-widget-card .val { font-family: var(--font-display); font-size: var(--fs-30, 28px); font-weight: 600; margin-top: 8px; letter-spacing: -.02em; line-height: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-widget-chart { position: relative; flex: 1 1 auto; min-height: 0; margin-top: 8px; }
.dash-widget-msg { padding: 4px 0; font-size: var(--fs-13, 13px); }
/* Responsive: collapse spans so nothing overflows the narrower grids. Uses
   .grid.widgets specificity so it wins over the base rule above. */
@media(max-width:1180px){
  .grid.widgets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-widget.w-wide { grid-column: span 2; }
}
/* Phone: ONE widget per row — every KPI tile full width, as Inventory's .inv-kpi
   tiles, and every chart below the one before (owner, 2026-10-10: "KPI tiles on the
   dashboard should be like the ones on Inventory, and the other widgets stacked,
   not side by side"; it replaced the 2026-09-26 two-up stat tiles). Every span is
   reset: a span 2 left in a one-column grid would add a column of its own.
   src/ui/phone-layout-consistency.browser.test.js */
@media(max-width:680px){
  .grid.widgets { grid-template-columns: minmax(0, 1fr); --dash-row: 140px; }
  .dash-widget.w-stat, .dash-widget.w-tile, .dash-widget.w-panel, .dash-widget.w-wide { grid-column: span 1; }
}


/* ============================================================
   Shared components consolidated from style.css 2026-06-20:
   the modal close (.close-button),
   kanban (.kanban-column/.kanban-card/.image-status-label),
   findings (.finding-details/.finding-status). Semantic names kept.
   (.modal-content / .styled-modal / .modal-footer went with the last
   dialogs that used them, 2026-10-15 — every dialog is the .x-modal.)
   ============================================================ */
.close-button {
    color: var(--text-muted);
    /* A <button> does NOT inherit the page font (the UA sets its own), so a text
       × close would render in the UA font while an identical <span> one renders in
       ours. Inherit it so both spell the same glyph. */
    font-family: inherit;
    position: absolute;
    top: 12px;
    right: 22px;
    /* Square ghost icon-button — same affordance as the canonical .x-modal__close. */
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-30, 28px);
    line-height: 1;
    font-weight: bold;
    border-radius: var(--r-8, 8px);
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.close-button:hover,
.close-button:focus {
    background: var(--surface-3);
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
}
/* Image Upload Cell Styles */
.image-cell {
    vertical-align: middle;
}
/* The tray editor's Add Item dialog (an .x-modal.is-xxl, so its 6-tile chooser lays
   out 3-across): a little more air under its subtitle. */
#consignmentModal .modal-subtitle {
    margin: 0 0 1.25rem;
}
.close-button.lightbox {
    position: absolute;
    top: 20px;
    right: 35px;
    color: var(--text-inverse);
    font-size: 40px;
}
.modal-subtitle {
    margin: 0 0 1rem 0;
    color: var(--text-muted);
    font-size: var(--fs-14, 0.9rem);
}
.finding-history-item {
    gap: 1rem;
}
.finding-details {
    flex-grow: 1;
    display: flex;
    align-items: baseline;
    gap: 1rem;
}
.finding-details a {
    font-size: var(--fs-14, 0.9rem);
}
.finding-status select {
    padding: 0.5rem;
    border-radius: var(--r-4, 4px);
    border: 1px solid var(--border-subtle);
}
.finding-status {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.status-feedback {
    font-size: var(--fs-14, 0.9rem);
    font-style: italic;
    transition: color var(--dur-slow) var(--ease);
}
.lock-status {
    font-size: var(--fs-13, 0.8rem);
    color: var(--danger);
    /* red */
    font-weight: 500;
    margin-top: 0.25rem;
}
.kanban-column {
    flex: 0 0 4vw;
    background-color: var(--bg);
    /* radius inherited from .col (var(--radius)) so the column corners match
       the .col-h header's top corners — don't hardcode a different value */
    display: flex;
    flex-direction: column;
}
.kanban-column-title {
    /* Used only with .col-h on kanban; defer box/colour to .col-h so the
       header keeps its blue --th-bg. Keep just the title-text truncation. */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    margin: 0;
}
.kanban-column-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
}
/* --- The rest of the styles for cards are the same --- */
.kanban-card {
    background: var(--surface);
    border-radius: var(--r-6, 6px);
    padding: 1rem;
    box-shadow: var(--elev-1, 0 2px 4px rgba(0, 0, 0, 0.07));
    text-decoration: none;
    color: var(--text);
}
.kanban-card:hover {
    box-shadow: var(--elev-2, 0 4px 12px rgba(0, 0, 0, 0.1));
    transform: translateY(-2px);
}
.kanban-card .card-title {
    font-weight: 500;
    margin-bottom: 0.75rem;
}
.kanban-card .card-meta {
    font-size: var(--fs-13, 0.8rem);
    color: var(--text-muted);
}
.kanban-card.submitted {
    opacity: 0.8;
}
/* A tray that's locked (open by another user) is not navigable — the whole card link
   (kanban), the tray-name link and row (trays list), or the Review button and row
   (review-requests report) are click-guarded in JS; these rules give the matching
   visual affordance. Kept in app.css so all three views share it. Each guarded row
   also carries `cursor:not-allowed` so the click-anywhere-in-the-row shortcut stops
   advertising itself as clickable. */
.kanban-card.locked {
    opacity: 0.6;
    cursor: not-allowed;
}
.kanban-card.locked:hover {
    box-shadow: var(--elev-1, 0 2px 4px rgba(0, 0, 0, 0.07));
    transform: none;
}
.tray-list-item.locked a.t-strong {
    opacity: 0.6;
    cursor: not-allowed;
}
.tray-list-item.locked {
    cursor: not-allowed;
}
/* Camera Icon Styles */
.image-status-label {
    display: inline-flex;
    align-items: center;
    margin-right: 0.4rem;
    color: var(--text-subtle);
}
.image-status-label svg.lucide,.image-status-label i[data-lucide] {
    width: 24px;
    height: 24px;
    stroke-width: 2.4;
}
.image-status-label.camera-red { color: var(--danger); }
.image-status-label.camera-amber { color: var(--warning); }
.image-status-label.camera-blue { color: var(--info); }
.image-status-label.camera-green { color: var(--success); }
.image-status-label.camera-gray { color: var(--text-muted); }


/* ============================================================
   Page-specific stragglers consolidated from style.css 2026-06-20:
   shared .delete-*-btn buttons, .form-group, .meta-tag/.meta-info,
   .request-info, .matrix-group-admin, .truncated-title-part.
   Mirrored to examples for the drift gate.
   ============================================================ */
.meta-info {
    font-size: var(--fs-13, 0.8rem);
    color: var(--text-muted);
    margin-top: 0.5rem;
    display: flex;
    gap: 1rem;
}
.meta-info span {
    background-color: var(--surface-3);
    padding: 0.2rem 0.5rem;
    border-radius: var(--r-4, 4px);
}
.request-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.request-info a {
    font-weight: 600;
    font-size: var(--fs-17, 1.1rem);
    color: var(--link);
    text-decoration: none;
}
.request-info a span {
    font-weight: 400;
    color: var(--text-subtle);
}
.delete-tray-btn,
.delete-request-btn,
.delete-row-btn,
.delete-panel-btn,
.delete-field-btn,
.delete-user-btn,
.delete-category-btn,
.delete-finding-btn,
.delete-role-btn,
.delete-option-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background-color: var(--pill-red-bg);
    color: var(--danger);
    padding: 0.4rem 0.8rem;
    font-size: var(--fs-13, 0.8rem);
    font-weight: 600;
    border: 1px solid var(--danger);
    border-radius: var(--r-8, 8px);
    line-height: 1.2;
    cursor: pointer;
    transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
/* Fill red only on hover so the destructive action reads clearly without shouting */
.delete-tray-btn:hover:not(:disabled),
.delete-request-btn:hover:not(:disabled),
.delete-row-btn:hover:not(:disabled),
.delete-panel-btn:hover:not(:disabled),
.delete-field-btn:hover:not(:disabled),
.delete-user-btn:hover:not(:disabled),
.delete-category-btn:hover:not(:disabled),
.delete-finding-btn:hover:not(:disabled),
.delete-role-btn:hover:not(:disabled),
.delete-option-btn:hover:not(:disabled) {
    background-color: var(--danger);
    color: var(--on-brand);
    border-color: var(--danger);
}
/* Lucide renders a 24px svg unless told otherwise — size it here so an ICON-ONLY
   delete button (the trash-can) is the same size everywhere, not just inside the
   admin tables that happened to scope their own rule. */
.delete-tray-btn svg,
.delete-request-btn svg,
.delete-row-btn svg,
.delete-panel-btn svg,
.delete-field-btn svg,
.delete-user-btn svg,
.delete-category-btn svg,
.delete-finding-btn svg,
.delete-role-btn svg,
.delete-option-btn svg,.delete-tray-btn i[data-lucide],.delete-request-btn i[data-lucide],.delete-row-btn i[data-lucide],.delete-panel-btn i[data-lucide],.delete-field-btn i[data-lucide],.delete-user-btn i[data-lucide],.delete-category-btn i[data-lucide],.delete-finding-btn i[data-lucide],.delete-role-btn i[data-lucide],.delete-option-btn i[data-lucide] {
    width: 16px;
    height: 16px;
}
/* A blocked delete must READ as blocked (and not flash red on hover) — the group
   had no disabled state outside the admin pages. */
.delete-tray-btn:disabled,
.delete-request-btn:disabled,
.delete-row-btn:disabled,
.delete-panel-btn:disabled,
.delete-field-btn:disabled,
.delete-user-btn:disabled,
.delete-category-btn:disabled,
.delete-finding-btn:disabled,
.delete-role-btn:disabled,
.delete-option-btn:disabled {
    opacity: 0.45;
    filter: grayscale(1);
    cursor: not-allowed;
}
.form-group {
    display: flex;
    align-items: center;
    /* Vertically centers the content within each group */
    flex-grow: 1;
    justify-content: center;
}
/* This adds the divider to the left of every group except the first one */
.form-group:not(:first-child) {
    border-left: 1px solid var(--border);
    /* The divider line */
    padding-left: 1rem;
    /* Space between the line and the element */
}
.truncated-title-part {
    display: inline-block;
    /* Allows the element to have a width */
    max-width: 500px;
    /* Set a max width before it truncates */
    vertical-align: bottom;
    /* Aligns it nicely with the preceding text */

    /* These rules create the left-side ellipsis */
    direction: rtl;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.meta-tag {
    font-size: var(--fs-13, 0.8rem);
    background-color: var(--surface-3);
    color: var(--text-subtle);
    padding: 0.2rem 0.6rem;
    border-radius: var(--r-4, 4px);
}
.meta-tag.autofill {
    background-color: var(--pill-green-bg);
    /* Light blue */
    color: var(--pill-green-text);
}
.meta-tag.info {
    background-color: var(--pill-amber-bg);
    /* Light yellow */
    color: var(--pill-amber-text);
}
/* Settings → condition matrix: each group is a .card; its options are a row of
   chips, each with its own small × (2026-10-11, the fieldset/legend look retired). */
.matrix-options{display:flex;flex-wrap:wrap;gap:8px}
.matrix-options>.chip{gap:4px;padding-right:2px}
.matrix-options>.chip .btn.icon.sm{width:24px;height:24px;min-height:0;padding:0}
.matrix-options>.chip .btn svg,.matrix-options>.chip .btn i[data-lucide]{width:13px;height:13px}


/* Modal backdrop overlay (moved from style.css 2026-06-20 so de-linked modal
   pages keep their overlay; mirrored to examples). */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay);
    backdrop-filter: blur(2px);

    /* This is the key: Use flexbox to center the content */
    display: none;
    /* Will be changed to 'flex' by JavaScript */
    justify-content: center;
    align-items: center;
}

/* ============================================================
   Minimal native-<button> reset (2026-06-20): strip native chrome so
   pages migrated off style.css don't show grey UA buttons, but DON'T
   impose padding/size/colour — styled classes (.btn/.small-btn/etc.)
   own those, and standalone pages (login) keep their custom buttons.
   ============================================================ */
button { font-family: inherit; cursor: pointer; -webkit-appearance: none; appearance: none; }

/* ============================================================
   Shared thumbnail hover-zoom preview — a single floating <img> positioned
   with `fixed` coords in JS so it can't be clipped by table/row overflow.
   Mirrors the tray editor's #rail-thumb-zoom; used by list thumbnails that
   opt in (e.g. the trays manager .tray-thumb).
   ============================================================ */
/* On touch the preview opens on press-and-hold (thumb-hover-preview.js); the
   browser's own long-press image callout would race it. */
img[data-hover-preview] { -webkit-touch-callout: none; }
.thumb-hover-preview {
  position: fixed;
  z-index: 100000;
  width: 260px;
  height: 260px;
  object-fit: contain;
  background: var(--surface);
  border: 1.25px solid var(--border);
  border-radius: var(--r-12, 10px);
  box-shadow: var(--elev-3, 0 10px 30px rgba(16, 42, 94, .25));
  padding: 6px;
  pointer-events: none;
}

/* ============================================================================
   Shared fragment primitives (partials/ui-*.ejs)
   Token-only. These back the reusable EJS fragments so pages stop re-inventing
   tables, toolbars, kpi rows, pagination and form fields inline. Add new shared
   chrome HERE, never as a per-page inline <style>.
   ============================================================================ */

/* --- page-head actions cluster (right side of .page-head) --- */
.page-head .ph-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}

/* --- wrap-cell: opt a table cell OUT of the global `tbody td{white-space:nowrap}` ---
   The default keeps numeric/SKU columns on one line, but long text/JSON/diff cells
   then force a horizontal scroll. Add class="wrap-cell" to such a <td> (or <th>)
   instead of re-declaring this rule inline on every page. The max-width is what
   actually forces the wrap (white-space:normal alone won't, since an auto-layout
   table just widens the column); override it inline per cell when you need a
   different cap, e.g. style="max-width:640px". !important defeats the global nowrap. */
.wrap-cell{white-space:normal!important;overflow-wrap:anywhere;word-break:break-word;max-width:460px}
/* A table's main text column beside many single-line ones (a report's case or title
   column): without a floor, the single-line columns take their full width and squeeze
   it to a word per line. Phone card rows drop the floor (mobile.css). */
.wrap-cell.wide{min-width:18rem}
/* A second wrapping column beside it (a label of a few words) keeps a smaller floor. */
.wrap-cell.mid{min-width:11rem}

/* --- cell-ellip: truncate a long table cell to ONE line with an ellipsis ---
   The wrap-cell alternative for cells that should stay single-line (names,
   titles). Put it on an inline element INSIDE the <td> (a <span> or <a>) with
   the full text in title="" for hover. Override max-width inline if a column
   needs a different cap. */
.cell-ellip{display:inline-block;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle}
/* .fill — clip to whatever width the COLUMN already has, instead of the 220px
   default. This is the variant to use inside a table-layout:fixed table, where
   the column may be narrower than 220px and the default cap would let the text
   paint over its neighbour — and the one to pair with `.col-cap` on the <td>
   (the table helpers above) to cap a column in an ordinary auto-layout table:
   the column can never grow past the cap, and the text uses every pixel the
   column DOES get. That is what a .fluid cap cannot do — .fluid caps the TEXT,
   so once the table has slack the column keeps growing while the span stays at
   its cap and the value is cut with an … that sits beside a hole. */
.cell-ellip.fill{max-width:100%}
/* .fluid — the cap follows the VIEWPORT instead of a fixed 220px, so the column
   gives width back on a laptop and uses it on a wide monitor without anyone
   picking a pixel. The floor keeps it readable; the ceiling keeps it from
   dominating the table. Because the cap is a max, the column still shrinks to
   whatever the row actually holds — only a value longer than the cap is cut. */
.cell-ellip.fluid{max-width:clamp(9rem,15vw,26rem)}
/* .fluid-sm — the same viewport-following cap, one size down, for a SHORT label
   column (a store, a location, a status word). .fluid's floor (9rem) is wider than
   such a value ever renders, so its cap never bites and the column sits at its full
   natural width; this one is deliberately narrower than the text on a laptop, so the
   value IS cut with an … there, and opens out to the full name on a wide monitor. */
.cell-ellip.fluid-sm{max-width:clamp(4.5rem,7vw,11rem)}
/* A short suffix that must SURVIVE the truncation — "+ 3 more", a count, a unit.
   It has to sit OUTSIDE the .cell-ellip span: inside it, it is the first thing
   the ellipsis eats, so a row with a long name showed no "+ N more" at all. It
   repeats .cell-ellip's vertical-align so the clipped name and the suffix sit on
   one line without the inline-block baseline wobble. */
.cell-ellip + .cell-more{vertical-align:middle;white-space:nowrap}

/* --- small shared text utils (match the .t-strong/.t-mut convention) --- */
.t-red{color:var(--red)}
.t-green{color:var(--green)}
.t-cap{font-size:var(--fs-12, .78rem);color:var(--muted)}

/* --- section subheading INSIDE a card body (below .card-head, above a
   field-grid / table). Was `.inv-subhead` in inventory.css, which pages
   outside the inventory module referenced without loading that sheet. --- */
.subhead{margin:1.5rem 0 .5rem;font-size:var(--fs-15, .95rem);font-weight:600;color:var(--text)}
.subhead:first-child{margin-top:0}
.subhead i,.subhead svg{width:16px;height:16px;vertical-align:-2px;margin-right:6px}

/* --- compact "linked SKU" link under a cell's main value (consignments,
   and anywhere a row points at its inventory product). --- */
.sku-link{display:flex;align-items:center;gap:3px;margin-top:2px;font-size:var(--fs-12, .72rem);font-weight:600;color:var(--accent);text-decoration:none;min-width:0}
.sku-link:hover{text-decoration:underline}
.sku-link i,.sku-link svg{width:12px;height:12px;flex:0 0 auto}
.sku-link .sku-val{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}

/* --- card-head headings: keep the Lucide icon at heading size (its 24px default
   makes the heading taller than a sibling pill and throws the row out of line) --- */
.card-head h3{display:inline-flex;align-items:center;gap:8px}
.card-head h3 i,.card-head h3 svg{width:18px;height:18px}

/* --- chart canvas container (report pages with Chart.js canvases) --- */
.chart-container{position:relative;height:400px}
@media(max-width:768px){.chart-container{height:300px}}

/* --- vertical rhythm: stacked cards / kpi rows that sit directly in a .view ---
   (a dozen report pages re-declared this inline; an inline margin on the element
   still wins where a page wants a different gap). --- */
/* --- spinner util: for a button that swaps its leading icon while working (keeping
   the label, so the button — and any table column it sits in — never resizes) --- */
@keyframes spin{to{transform:rotate(360deg)}}
.spin{animation:spin 1s linear infinite}

/* --- upload overlay: THE one "please wait" modal while a file or image uploads
   (or converts). Scrim + a card with a spinner and a short sentence-case label
   ("Uploading image…", "Converting photo…"). Never write the markup — call
   App.uploadOverlay.show('Uploading image…') / .hide() (/js/upload-overlay.js,
   app-wide via partials/icons), which builds it once per page. --- */
.upload-loading-overlay{position:fixed;inset:0;background:var(--overlay);display:none;align-items:center;justify-content:center;z-index:9999}
.upload-loading-overlay.open{display:flex}
.upload-loading-card{background:var(--surface);padding:1.6rem 2.2rem;border-radius:var(--r-12, 12px);box-shadow:var(--shadow-lg);display:flex;align-items:center;gap:1rem;color:var(--text);font-weight:600}
.upload-spinner{flex:0 0 auto;width:26px;height:26px;border:3px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite}

/* --- CHAT THREAD: THE one speech-bubble conversation — the CRM inbox, and the
   support tickets on the app's Support page and in the Sellevry Console.
   The thread is a --surface-2 panel, oldest message first. Each message is a
   bubble from its side, with a tail pointing at it: .in (the other side) on the
   left in --surface with a bordered tail, .out (the reader's own side) on the
   right in the accent fill with --on-brand text. .note is an aside only the
   reader's side sees (a console internal note): dashed violet, no tail.
   A thread with its reply box under it is a .chat-window card.
     <div class="card chat-window">
       <div class="chat-thread">
         <div class="chat-msg in"><div class="chat-msg-body">…</div><div class="chat-meta">Name · time</div></div>
         <div class="chat-msg out">…</div>
       </div>
       <form class="chat-compose"><div class="composer">…</div></form>
     </div>
   The CRM inbox's .ib-thread / .ib-msg / .ib-msg-body / .meta / .ib-compose are
   aliases of it; crm.css keeps only the inbox's own layout. Never re-declare a
   bubble, its colours or its tails in a page sheet. --- */
.chat-thread,.ib-thread{display:flex;flex-direction:column;gap:.6rem;padding:1rem;background:var(--chat-bg)}
.chat-msg,.ib-msg{position:relative;width:72%;max-width:540px;box-sizing:border-box;padding:.5rem .7rem;border-radius:var(--r-12, 12px);font-size:var(--fs-14, .86rem);line-height:1.35;word-break:break-word}
.chat-msg-body,.ib-msg-body{white-space:pre-wrap}
.chat-msg.in,.ib-msg.in{align-self:flex-start;background:var(--chat-in-bg);border:1px solid var(--chat-in-border);color:var(--chat-in-text)}
.chat-msg.out,.ib-msg.out{align-self:flex-end;background:var(--accent);color:var(--on-brand)}
/* Tails: incoming points left, outgoing points right. Incoming draws a border-
   coloured tail behind a surface-coloured one, so its 1px outline continues
   round the tail; outgoing is one solid fill, so one triangle is enough. */
.chat-msg.in::before,.chat-msg.in::after,.chat-msg.out::after,
.ib-msg.in::before,.ib-msg.in::after,.ib-msg.out::after{content:'';position:absolute;top:12px;width:0;height:0;border-style:solid}
.chat-msg.in::before,.ib-msg.in::before{left:-13px;border-width:9px 13px 9px 0;border-color:transparent var(--chat-in-border) transparent transparent}
.chat-msg.in::after,.ib-msg.in::after{left:-12px;border-width:9px 13px 9px 0;border-color:transparent var(--chat-in-bg) transparent transparent}
.chat-msg.out::after,.ib-msg.out::after{right:-12px;border-width:9px 0 9px 13px;border-color:transparent transparent transparent var(--accent)}
.chat-msg.note{align-self:flex-end;background:var(--violet-bg);border:1px dashed var(--violet);color:var(--text)}
.chat-meta,.ib-msg .meta{font-size:var(--fs-11, .66rem);opacity:.85;margin-top:.25rem}
.chat-msg .chat-meta .pill{vertical-align:1px}
.chat-window{overflow:hidden}
.chat-compose,.ib-compose{border-top:1px solid var(--border);padding:.6rem;background:var(--chat-bg)}
.chat-compose .composer,.ib-compose .composer{background:var(--chat-compose-bg)}   /* white in a light conversation; CoPilot keeps its own */

/* --- composer: THE one "write a message" box (CoPilot chat, CRM inbox reply,
   support ticket reply).
   The box IS the border: the textarea sits flush inside it at full width and
   its buttons are pinned to the bottom-right corner, so adding a button never
   narrows or lifts the box. Bottom padding reserves that corner so text never
   runs under the buttons.
     <div class="composer">
       <textarea class="composer-input" rows="4"></textarea>
       <div class="composer-actions">[btn ghost sm …] <button class="composer-send" aria-label="Send">…</button></div>
     </div> --- */
.composer{position:relative;border:1px solid var(--border);background:var(--surface-2);border-radius:var(--r-12, 12px)}
.composer:focus-within{border-color:var(--accent)}
.composer-input{display:block;width:100%;box-sizing:border-box;border:0;background:transparent;border-radius:var(--r-12, 12px);outline:none;color:var(--text);font-family:inherit;font-size:var(--fs-14, 14px);line-height:1.4;padding:9px 11px 44px;resize:none;min-height:130px;max-height:232px;overflow-y:auto}
.composer-actions{position:absolute;right:6px;bottom:6px;display:flex;align-items:center;gap:6px}
.composer-send{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:none;border-radius:var(--r-8, 8px);cursor:pointer;background:var(--accent);color:var(--on-brand);
  transition:transform var(--dur-fast) var(--ease),filter var(--dur-fast) var(--ease)}
.composer-send:disabled{opacity:.5;cursor:default}
/* flex-shrink:0 — mobile.css's `svg{max-width:100%}` would otherwise collapse
   the inline svg to 0 width inside the flex button and hide the arrow. */
.composer-send svg,.composer-send i[data-lucide]{width:17px;height:17px;flex-shrink:0;stroke:var(--on-brand);fill:none}
/* --- SALLY'S BOX: .composer.sally-compose — ONE look for every place you write to
   Sally, the dashboard widget and the Sally panel (owner, 2026-10-22: "move the style of
   the widget for the send button and the microphone to the sally sidebar"). A rounded
   white box that lifts a soft ring while you type in it, a ROUND send that grows in when
   there is something to send, and the microphone (/js/sally-voice.js — the browser's own
   speech recognition, shown only where it has one) that pulses while it listens.
     <form class="composer sally-compose">…<div class="composer-actions">
       <button class="btn ghost icon sm sally-mic" hidden>mic</button><button class="composer-send">arrow-up</button>
     </div></form> --- */
.composer.sally-compose{border-radius:var(--r-16, 20px);background:var(--surface);box-shadow:var(--shadow-sm);
  transition:border-color var(--dur-fast) var(--ease),box-shadow var(--dur) var(--ease)}
.composer.sally-compose:focus-within{border-color:var(--accent-border);box-shadow:0 0 0 4px var(--accent-soft),var(--shadow-md)}
.sally-compose .composer-input{border-radius:var(--r-16, 20px)}
.sally-compose .composer-actions{gap:4px}
.sally-compose .composer-send{width:34px;height:34px;border-radius:50%;
  transition:opacity var(--dur-fast) var(--ease),scale var(--dur) var(--ease),background-color var(--dur-fast) var(--ease),transform var(--dur-fast) var(--ease)}
.sally-compose .composer-send:disabled{opacity:.35;scale:.86}
@media (hover:hover){.sally-compose .composer-send:not(:disabled):hover{scale:1.07}}
.sally-mic[hidden]{display:none}
.sally-mic.is-listening{position:relative;color:var(--red);background:color-mix(in srgb,var(--red) 12%,transparent)}
.sally-mic.is-listening::after{content:"";position:absolute;inset:-3px;border-radius:inherit;border:2px solid var(--red);
  opacity:0;animation:sally-listen 1.4s var(--ease) infinite;pointer-events:none}
@keyframes sally-listen{0%{opacity:.55;scale:.9}100%{opacity:0;scale:1.35}}
/* Sally's follow-ups under an answer (the questions the AI offers next — src/copilot-chat/
   follow-ups.js): pill chips that pop in one after another once the answer is there. */
.sally-follow{display:flex;flex-wrap:wrap;gap:8px}
.sally-follow[hidden]{display:none}
.sally-chip{display:inline-flex;align-items:center;gap:8px;max-width:100%;min-height:34px;padding:6px 14px;box-sizing:border-box;
  background:var(--surface);border:1px solid var(--border);border-radius:var(--r-full, 999px);font:inherit;font-size:var(--fs-14, 13.5px);line-height:1.3;
  font-weight:500;color:var(--text);text-align:left;cursor:pointer;
  transition:border-color var(--dur-fast) var(--ease),background-color var(--dur-fast) var(--ease),color var(--dur-fast) var(--ease)}
@media (hover:hover){.sally-chip:hover{border-color:var(--accent-border);background:var(--accent-soft);color:var(--accent)}}
.sally-chip svg,.sally-chip i[data-lucide]{width:16px;height:16px;flex:none;color:var(--text-muted)}
.sally-follow > .sally-chip{animation:sally-chip-in var(--dur-slow) var(--ease) backwards;animation-delay:calc((var(--i,0) + 2) * var(--cascade-step) * 2)}
@keyframes sally-chip-in{from{opacity:0;scale:.94}}
/* a message arriving in a Sally conversation (the widget and the panel) — and in the
   CRM inbox's open conversation (your reply as you send it, theirs as it comes in;
   /js/inbox-reply.js, /js/crm-inbox.js): it fades up from the box you wrote it in — a
   short slide, never a bounce */
:is(.msg,.ib-msg).msg-in{animation:msg-in var(--dur-slow) var(--ease) backwards}
@keyframes msg-in{from{opacity:0;translate:0 8px}}
/* an answer arrives in its own order: each paragraph, list or table fades in after the
   one before (capped, so a long answer never keeps anyone waiting) */
.bubble.reveal > *{animation:msg-in var(--dur-slow) var(--ease) backwards;animation-delay:calc(var(--i,0) * var(--cascade-step) * 2)}
/* Attached photos (the paperclip beside Send): small thumbnails in the box's
   bottom-LEFT corner, in the band the input already reserves for the buttons —
   so attaching never grows or narrows the box. Each carries an always-visible ×
   (a finger can't hover); its hit area reaches past the 18px dot.
     <div class="composer-files" hidden>
       <span class="composer-file"><img src="…" alt=""><button class="composer-file-x" aria-label="Remove photo">…</button></span>
     </div> */
.composer-files{position:absolute;z-index:2;left:8px;bottom:6px;max-width:calc(100% - 140px);display:flex;align-items:center;gap:10px;padding:7px 8px 0 0;overflow-x:auto;scrollbar-width:none}
.composer-files[hidden]{display:none}

/* ── SIGNATURE (owner, 2026-10-25): what goes under a reply — a mailbox's styled
   email signature, or an eBay store's / phone line's plain sign-off
   (src/crm/sign-offs/). In the reply box it shows under the text, before the
   send, never editable (the send adds it); in the thread, under a sent reply.
     <details class="composer-sig"><summary class="composer-sig-label"><i data-lucide="chevron-right"></i> Signature</summary>
       <div class="sig-paper">…signature html…</div> | <div class="sig-text">— Anna, The Shop</div></details>
   Folded by default — the label alone, one line; a click opens it.
     <div class="ib-sig">…the same two…</div>
   .sig-paper is an email's own white page: a signature's colours are made for one. */
.sig-paper{background:var(--sig-paper);color:var(--sig-ink);border-radius:var(--r-8, 8px);padding:8px 10px;overflow-x:auto;font-size:var(--fs-13, 13px);line-height:1.35}
.sig-paper img{max-width:100%;height:auto}
.sig-paper table{border-collapse:collapse}
.sig-paper :is(td,th){white-space:normal;padding:0}
.sig-text{white-space:pre-line}
.composer:has(.composer-sig) .composer-input{min-height:72px;padding-bottom:6px}
.composer-sig{margin:0 11px 44px;padding-top:8px;border-top:1px dashed var(--border);font-size:var(--fs-13, 13px);color:var(--text-muted);max-height:150px;overflow-y:auto}
.composer-sig-label{display:flex;align-items:center;gap:4px;width:max-content;font-size:var(--fs-12, 11.5px);cursor:pointer;list-style:none;border-radius:var(--r-4, 4px)}
.composer-sig-label::-webkit-details-marker{display:none}
.composer-sig-label:hover{color:var(--text)}
.composer-sig-label svg,.composer-sig-label i[data-lucide]{width:12px;height:12px;flex:none;transition:rotate var(--dur-fast) var(--ease)}
.composer-sig[open] > .composer-sig-label{margin-bottom:4px}
/* Folded, the label sits in the buttons' band (owner, 2026-10-25: "a lot of space
   below" it) — unless attached files hold that corner. */
.composer-sig:not([open]){margin-bottom:12px;max-width:calc(100% - 160px)}
.composer:has(> .composer-files:not([hidden])) > .composer-sig:not([open]){margin-bottom:44px;max-width:none}
.composer-sig[open] > .composer-sig-label :is(svg,i[data-lucide]){rotate:90deg}
.ib-sig{margin-top:8px;padding-top:6px;border-top:1px dashed currentColor;font-size:var(--fs-13, 13px);opacity:.85}
.ib-sig.sig-paper{opacity:1;border-top:0;padding-top:8px;margin-top:10px}

/* ── THE STOP LINE (owner, 2026-11-01: "the line must not be deleteable"): what the
   send adds to the first text to a number that hasn't agreed (src/crm/comms/sms-rules.js).
   Shown under the text, never in it: the server adds it, so no page can leave it out.
     <div class="composer-lock"><i data-lucide="lock"></i><span>Reply STOP to opt out.</span><span class="t-mut">…</span></div> */
.composer-lock{display:flex;flex-wrap:wrap;align-items:center;gap:2px 6px;margin-top:8px;padding-top:8px;border-top:1px dashed var(--border);font-size:var(--fs-13, 13px);color:var(--text)}
.composer-lock[hidden]{display:none}
.composer-lock svg,.composer-lock i[data-lucide]{width:12px;height:12px;flex:none;color:var(--text-muted)}
.composer-lock .t-mut{font-size:var(--fs-12, 11.5px)}
.composer > .composer-lock{margin:0 11px 44px}
.composer > .composer-lock:has(+ .composer-sig){margin-bottom:8px}
.composer:has(> .composer-lock) .composer-input{min-height:72px;padding-bottom:6px}

/* ── MESSAGE TEMPLATES WINDOW + the red template blanks (/js/inbox-templates.js) ──
   Used by the CRM inbox's reply box and the CRM customer page's write box (a box
   other than .composer that shows the blanks marks itself [data-blanks-host]). */
/* Message templates window (reply box → Templates): a search bar, then the
   template names on the left and the picked one's full text on the right.
   The window keeps one height and each side scrolls on its own, so a long
   list or a long message never pushes Use template out of reach. */
.x-modal.ib-tpl-modal { height: min(660px, calc(var(--vh) * .86)); }
.x-modal__body.ib-tpl { display: flex; flex-direction: column; gap: 12px; overflow: hidden; min-height: 0; }
.ib-tpl-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; flex: 0 0 auto; }
.ib-tpl-bar .tb-input { flex: 1 1 260px; max-width: none; }
.ib-tpl-for { font-size: var(--fs-12, 12.5px); }
.ib-tpl-panes { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); border: 1px solid var(--border); border-radius: var(--r-12, 10px); overflow: hidden; }
.ib-tpl-panes[hidden] { display: none; }
.ib-tpl-list { overflow-y: auto; border-right: 1px solid var(--border); background: var(--surface-2); padding: 6px; }
.ib-tpl-item { display: block; width: 100%; text-align: left; font: inherit; color: var(--text); background: transparent; border: 0; border-radius: var(--r-8, 8px); padding: 9px 10px; cursor: pointer; }
.ib-tpl-item + .ib-tpl-item { margin-top: 2px; }
.ib-tpl-item:hover { background: var(--surface-3); }
.ib-tpl-item[aria-selected="true"] { background: var(--accent-soft); }
.ib-tpl-item .n { display: block; font-weight: 600; font-size: var(--fs-13, 13px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-tpl-item .s { display: block; margin-top: 2px; font-size: var(--fs-12, 12px); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-tpl-none { padding: 14px 10px; font-size: var(--fs-12, 12.5px); color: var(--muted); }
.ib-tpl-preview { overflow-y: auto; padding: 16px 18px; min-width: 0; }
.ib-tpl-preview h3 { margin: 0 0 10px; font-family: var(--font-display); font-size: var(--fs-16, 16px); font-weight: 600; letter-spacing: -.02em; }
.ib-tpl-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--fs-13, 13px); line-height: 1.55; color: var(--text); }
/* A blank the operator still fills in ("[Order number]", "[WIRE PRICE]"): red. */
.ib-tpl-blank { background: var(--red-bg); color: var(--red); border-radius: var(--r-4, 4px); padding: 0 2px; font-weight: 600; }
/* The same blanks in the reply box (/js/inbox-templates.js paintBlanks): a
   textarea can't colour part of its text, so a layer BEHIND it — the same
   font, padding, size and scroll, copied by the script — draws a red mark
   under each blank, and the textarea's own text stays on top. */
:is(.composer, [data-blanks-host]) > .reply-blanks { position: absolute; z-index: 0; margin: 0; overflow: hidden; pointer-events: none; color: transparent; white-space: pre-wrap; overflow-wrap: break-word; border-style: solid; border-color: transparent; }
:is(.composer, [data-blanks-host]) > .reply-blanks[hidden] { display: none; }
.composer-input.has-blanks, [data-blanks-host] > .has-blanks { position: relative; z-index: 1; }
.reply-blank { color: transparent; background: var(--red-bg); border-radius: var(--r-4, 4px); box-shadow: 0 0 0 1px color-mix(in srgb, var(--red) 55%, transparent); }
.ib-tpl > .empty { flex: 1 1 auto; }
/* Phone: the names above the text. The window grows with its content up to
   the screen (mobile.css §7g) and the body scrolls; the list keeps to a
   third of the screen so the text below it stays in reach. */
@media (max-width: 760px){
    .x-modal.ib-tpl-modal { height: auto; }
    .x-modal__body.ib-tpl { overflow-y: auto; }
    .ib-tpl-panes { grid-template-columns: minmax(0, 1fr); overflow: visible; flex: 0 0 auto; }
    .ib-tpl-list { max-height: calc(var(--vvh, var(--vh)) * .34); border-right: 0; border-bottom: 1px solid var(--border); border-radius: var(--r-12, 10px) var(--r-12, 10px) 0 0; }
    .ib-tpl-preview { overflow: visible; }
}

.composer-file{position:relative;flex:0 0 auto;width:32px;height:32px}
.composer-file img{display:block;width:32px;height:32px;object-fit:cover;border-radius:var(--r-6, 6px);border:1px solid var(--border);background:var(--surface-3);cursor:pointer}   /* opens full screen (/js/chat-photos.js) */
.composer-file-x{position:absolute;top:-7px;right:-7px;display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;padding:0;border:1px solid var(--border);border-radius:50%;background:var(--surface);color:var(--text-muted);cursor:pointer}
.composer-file-x::after{content:'';position:absolute;inset:-7px -7px -2px -2px}   /* bigger target up and out only — reaching in, it covered the photo's middle, so a tap meant to enlarge it removed it */
.composer-file-x:hover{color:var(--text);background:var(--surface-3)}
.composer-file-x svg,.composer-file-x i[data-lucide]{width:11px;height:11px}
/* The same thumbnails under a plain field (a new ticket's description), in the flow. */
.composer-files.static{position:static;max-width:none;padding:9px 8px 0 0;flex-wrap:wrap;overflow:visible}
/* Photos in a chat bubble (support tickets): ONE fixed box each, the photo cropped
   to fill it, shimmering until it arrives (/js/thumb-skeleton.js) — so a loading
   photo never moves the thread. Click → the full photo (/js/chat-photos.js). */
.chat-photos{display:flex;flex-wrap:wrap;gap:6px;margin-top:.4rem}
.chat-photos a{display:block;max-width:100%}
.chat-photo{display:block;width:160px;height:160px;max-width:100%;object-fit:cover;border-radius:var(--r-8, 8px);background:var(--surface-3)}

/* ======================= LOADING SKELETONS (canonical) =======================
   ONE loading look for the whole app: a flat --surface-3 placeholder with a
   --surface-2 highlight sweeping across it (1.2s). Use it EVERYWHERE content
   arrives after paint — never a "Loading…" string, never a bespoke spinner, and
   never a second copy of this recipe (there were four: the inventory dashboard,
   the drift report, the product gallery and the thumbnail loader — all now point
   here).

   The rule that makes it worth doing: a skeleton must occupy the SAME BOX the
   real content will, so nothing jumps when the fetch resolves. That's why the
   KPI/row/text variants below carry explicit heights.

   Primitive — one shimmering placeholder block:
     <span class="skel-bar"></span>                (fills its box)
     <span class="skel-bar sm w-60"></span>        (shorter, 60% wide)
   Composites:
     <div class="kpi kpi-skel"><div class="lbl"><span class="skel-bar"></span></div>
       <div class="val"><span class="skel-bar"></span></div></div>
     <tr class="skel-row"><td><span class="skel-bar"></span></td>…</tr>
     <div class="skel-block"></div>                (chart / panel area)
   Or from JS (public/js/format.js): App.skelKpis(n) / App.skelRows(cols, rows)
   / App.skelBlock(height) — they emit exactly this markup.                    */
@keyframes skel-shimmer{to{transform:translateX(100%)}}

.skel-bar{display:block;position:relative;overflow:hidden;width:100%;height:12px;
  border-radius:var(--r-6, 6px);background:var(--surface-3)}
.skel-bar::after{content:"";position:absolute;inset:0;transform:translateX(-100%);
  background:linear-gradient(90deg,transparent,var(--surface-2),transparent);
  animation:skel-shimmer 1.2s ease-in-out infinite}
/* A LONE bar stands in for one line of text — a tile's number, its label, a
   table cell — so it holds exactly that line: whatever the slot's layout (a
   block, a flex row), the slot is at least one line of its own text tall (1lh),
   and in a text line the bar sits centred in it. A 20px block bar standing in
   for a 33px number made every tile grow 13px when its number arrived (owner,
   Review, 2026-10-07; src/ui/tile-skeleton-height.browser.test.js). */
:where(*):has(> .skel-bar:only-child){min-height:1lh}
.skel-bar:only-child{display:inline-block;vertical-align:middle}
/* …without stretching that line: centring a bar shorter than the line poked it
   1px past the text's line box (a table row 1px taller while loading). A
   thumbnail placeholder does stretch it, as the real thumbnail does. */
.skel-bar:only-child:not(.skel-thumb){margin-block:-50px}
/* height + width shapes (so a page never sets these inline) */
.skel-bar.sm{height:9px;border-radius:var(--r-6, 5px)}
.skel-bar.lg{height:20px}
.skel-bar.w-25{width:25%}.skel-bar.w-40{width:40%}.skel-bar.w-50{width:50%}
.skel-bar.w-60{width:60%}.skel-bar.w-75{width:75%}

/* A larger filled area — a chart, a map, a panel that hasn't loaded. Give it a
   height inline (style="height:400px") or drop it inside .chart-container. */
.skel-block{position:relative;overflow:hidden;width:100%;height:100%;min-height:80px;
  border-radius:var(--radius);background:var(--surface-3)}
.skel-block::after{content:"";position:absolute;inset:0;transform:translateX(-100%);
  background:linear-gradient(90deg,transparent,var(--surface-2),transparent);
  animation:skel-shimmer 1.2s ease-in-out infinite}
.chart-container>.skel-block{height:100%}
/* A chart with nothing to draw: its note in the chart's own box, at the chart's height (never an empty axis). */
.chart-container.chart-empty{display:grid;place-items:center}
.chart-container.chart-empty>.empty{padding:0;gap:4px}
/* stock heights, so a page never sets one inline */
.skel-block.sm{height:120px}.skel-block.md{height:220px}.skel-block.lg{height:340px}

/* KPI tile skeleton — the real .kpi box, with bars where the label and number
   go. The explicit .lbl/.val heights reproduce the real tile's line boxes
   (12.5px label + 30px value), so the row reserves its exact height and the
   numbers swap in without a jump. */
.kpi.kpi-skel{pointer-events:none}
/* no fixed heights: a lone bar makes its line one line of the real text tall
   (the rule above), so the tile is exactly as tall as the real one wherever a
   page sizes its tiles' text differently (Inventory's compact strips) */
.kpi-skel .val{display:flex;align-items:center}
.kpi-skel .lbl .skel-bar{width:60%;height:11px}
.kpi-skel .val .skel-bar{width:45%;height:22px}

/* Table skeleton rows — drop N of these in the <tbody> instead of a
   "Loading…" cell, so the table keeps its height and column rhythm. Cells
   alternate width so it reads as data, not as a progress bar. */
tr.skel-row{pointer-events:none}
/* keep the real cell padding (12/16 + border) and give the bar the text line
   box's height, so a skeleton row is the same height as the row that replaces it */
tr.skel-row>td>.skel-bar{height:12px;margin:4px 0;width:80%}
tr.skel-row>td:nth-child(2n)>.skel-bar{width:55%}
tr.skel-row>td:nth-child(3n)>.skel-bar{width:68%}
tr.skel-row>td:last-child>.skel-bar{width:40%}

/* Chart-shaped skeletons — a card whose body is a chart shows a placeholder in
   the SHAPE of that chart, so the card keeps its height and the loading state
   reads as "this chart is coming", not as a generic grey box.
     .skel-bars — a bar chart (.bars, 170px). Bar heights vary per column.
     .skel-list — a channel/entity list (.list-row rhythm: 34px thumb + 2 lines
                  of text + a pill on the right).
   Both are emitted by App.skelBars(n) / App.skelList(n) in /js/format.js. */
.skel-bars{display:flex;align-items:flex-end;gap:12px;height:170px;padding-top:10px}
.skel-bars>.skel-bar{flex:1;max-width:38px;margin:0 auto;border-radius:var(--r-8, 7px) var(--r-8, 7px) var(--r-4, 3px) var(--r-4, 3px)}
.skel-bars>.skel-bar:nth-child(6n+1){height:55%}
.skel-bars>.skel-bar:nth-child(6n+2){height:80%}
.skel-bars>.skel-bar:nth-child(6n+3){height:38%}
.skel-bars>.skel-bar:nth-child(6n+4){height:92%}
.skel-bars>.skel-bar:nth-child(6n+5){height:64%}
.skel-bars>.skel-bar:nth-child(6n+6){height:47%}

.skel-list>.skel-list-row{display:flex;align-items:center;gap:14px;padding:14px 0;
  border-bottom:1px solid var(--border)}
.skel-list>.skel-list-row:last-child{border-bottom:none}
.skel-list .skel-lines{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px}
.skel-list .skel-lines>:where(.skel-bar:first-child){width:45%;height:11px}
.skel-list .skel-lines>:where(.skel-bar:last-child){width:28%;height:9px}
/* two more .skel-bar shapes, usable anywhere (a standalone chip row, an avatar
   cell) — not only inside .skel-list */
.skel-bar.skel-thumb{width:34px;height:34px;border-radius:var(--r-8, 8px);flex-shrink:0}
.skel-bar.skel-pill{width:64px;height:20px;border-radius:var(--r-16, 20px);flex-shrink:0}
.skel-bar.skel-pill.xs{width:56px;height:18px}

/* A doughnut-chart placeholder — a ring centred in its box. */
.skel-donut{position:relative;width:100%;height:100%;min-height:80px;display:grid;place-items:center}
/* The ring is sized off the box's HEIGHT (a chart area is usually wider than it
   is tall — sizing off width overflowed the card), and drawn with a radial
   gradient so the hole stays proportional at any size. */
.skel-donut::before{content:"";display:block;height:min(84%,110px);aspect-ratio:1;border-radius:50%;
  background:radial-gradient(circle,transparent 0 54%,var(--surface-3) 55% 100%)}
.skel-donut::after{content:"";position:absolute;inset:0;transform:translateX(-100%);
  background:linear-gradient(90deg,transparent,color-mix(in srgb,var(--surface-2) 70%,transparent),transparent);
  animation:skel-shimmer 1.2s ease-in-out infinite}
/* fill the parent instead of the stock 170px (a chart box that sets its own height) */
.skel-bars.fill{height:100%}

/* Overlay form — for a chart box that already owns its size (a <canvas> the
   charting library measures). The skeleton floats ON TOP so the canvas keeps
   its own layout, and the page removes the node when the chart draws. Put it in
   any position:relative box: <div class="skel-block" data-skel-overlay></div>. */
[data-skel-overlay]{position:absolute;inset:0;z-index:1;pointer-events:none}

/* A line of placeholder text inside a card / detail pane. (:where() keeps these
   at zero specificity so a per-bar .sm/.lg/.w-* modifier still wins.) */
.skel-text{display:flex;flex-direction:column;gap:9px}
.skel-text>:where(.skel-bar){height:11px}
.skel-text>:where(.skel-bar:last-child){width:55%}

/* A card BODY skeleton — a short label bar over a larger value bar. For a page
   whose KPI markup isn't the canonical .kpi tile (a bespoke .kpi-card box, a
   report's summary card): drop this inside the page's own card element so the
   card keeps its chrome and only its contents shimmer. App.skelCards(n, cls). */
.skel-kpi{display:flex;flex-direction:column;gap:10px}
.skel-kpi>:where(.skel-bar:first-child){width:58%;height:10px}
.skel-kpi>:where(.skel-bar:last-child){width:42%;height:20px}

/* A FORM FIELD whose value is still loading (a window that fetches what it edits — the
   order's Sales reps and Commission amount): the real field, disabled, its own box
   shimmering — so the window never grows when the value lands (owner, 2026-10-22). The
   same sweep, painted as the field's background (a field can't carry a ::after).
     <select class="input skel-field" disabled>…  ·  <span class="skel-bar w-num"></span> */
:is(input,select,textarea).skel-field{color:transparent;border-color:transparent;pointer-events:none;
  background:linear-gradient(90deg,transparent,var(--surface-2),transparent) no-repeat,var(--surface-3);
  background-size:50% 100%,auto;animation:skel-field 1.2s ease-in-out infinite}
:is(input,textarea).skel-field::placeholder{color:transparent}
@keyframes skel-field{from{background-position:-100% 0,0 0}to{background-position:200% 0,0 0}}
/* a figure still to come inside a sentence ("worked out on its revenue: $1,234.56") */
.skel-bar.w-num{display:inline-block;width:5em;vertical-align:middle}

/* Respect the OS "reduce motion" setting: keep the placeholder box (it still
   says "not loaded yet" and still reserves the space), drop the sweep. */
@media(prefers-reduced-motion:reduce){
  .skel-bar::after,.skel-block::after{animation:none}
  .skel-field{animation:none}
  img.is-thumb-loading{animation:none !important}
}

/* Thumbnail skeleton — the same look, painted as the <img>'s OWN background
   (an <img> can't carry a ::after, and wrapping every thumbnail in the app was
   not worth it), so the image simply paints over it as it decodes. The classes
   are toggled by /js/thumb-skeleton.js, which tracks every list thumbnail on
   the page. `!important` is required: several thumbnails already carry a flat
   `background` from a compound selector that would otherwise erase the sweep. */
img.is-thumb-loading{
  background-color:var(--surface-3) !important;
  background-image:linear-gradient(90deg,transparent 0%,var(--surface-2) 50%,transparent 100%) !important;
  background-size:200% 100% !important;background-repeat:no-repeat !important;
  animation:thumb-skel-shimmer 1.2s ease-in-out infinite !important;
}
@keyframes thumb-skel-shimmer{0%{background-position:-150% 0}100%{background-position:250% 0}}
/* Once resolved (or broken) stop shimmering; any original flat background
   returns for the image's transparent areas. */
img.is-thumb-loaded,img.is-thumb-error{animation:none !important;background-image:none !important}

.view>.card,.admin-content>.card{margin-bottom:18px}
.view .grid.kpis{margin-bottom:18px}
/* Cards stacked INSIDE a panel/tab body (a JS-filled container, so they are not
   direct children of .view and the rule above can't reach them). Wrap them in
   .card-stack instead of giving the container a bespoke per-page margin. */
.card-stack{display:flex;flex-direction:column;gap:18px}
.card-stack>.card{margin-bottom:0}

/* --- toolbar variant: bottom-align controls (when fields stack a label above
   the input, so Apply/Reset line up with the date pickers) --- */
.toolbar.tb-end{align-items:flex-end}

/* --- toolbar: labeled fields share the search box's control band ------------
   A .toolbar that mixes a labeled .field (a .field-label stacked ABOVE its
   control) with bare controls (the 36px .tb-input search box, chips, buttons)
   used to look broken: the label makes the field ~21px taller, so a CENTERED
   row floats the search box halfway up it, and .input.sm (32px) sat 4px shorter
   than the search input on top of that. Bottom-align such a row automatically
   (same as .tb-end) and put those fields' small inputs on the shared 36px band,
   so search + selects read as one control line. Never patch this per page. */
.toolbar:has(.field>.field-label){align-items:flex-end}
.toolbar:has(.field>.field-label) .field .input.sm{height:36px;border-radius:var(--r-8, 9px);font-size:var(--fs-13, 13px);padding:0 12px}
.toolbar:has(.field>.field-label) .field select.input.sm{--select-pad-end:30px;--select-chevron-x:10px}
/* Bare inline text in such a row (a result count, a pill) would otherwise sit on
   the row's bottom edge, ~8px below the inputs' text — give it the same 36px band. */
.toolbar:has(.field>.field-label)>span:not(.spacer):not(.tb-input){min-height:36px;display:inline-flex;align-items:center}

/* --- info-grid: a read-only "label + value" detail grid (audit/detail pages).
   Replaces the per-page purchase-info / tray-info / item-info duplicates. --- */
.info-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1rem}
.info-field{background:var(--surface);border:1px solid var(--border-light);border-radius:var(--radius-sm);padding:.7rem .9rem;display:flex;flex-direction:column;gap:4px}
.info-label{font-size:var(--fs-11, .7rem);color:var(--text-muted);text-transform:uppercase;letter-spacing:.05em;font-weight:600}
.info-value{font-size:var(--fs-16, 1rem);font-weight:600;color:var(--text-strong);overflow-wrap:anywhere} /* a long link/reference wraps inside its card */
.info-value a{color:var(--link);text-decoration:none}
.info-value a:hover{color:var(--text-strong);text-decoration:underline}
/* Full-width field (e.g. a long free-text reason/note) inside an .info-grid. */
.info-field.span-all{grid-column:1/-1}
/* Long free-text value: wrap + keep line breaks, body weight instead of bold. */
.info-value.pre{white-space:pre-wrap;overflow-wrap:anywhere;font-weight:400;font-size:var(--fs-15, .95rem)}
/* Compact variant: smaller type and narrower tiles for dense detail grids (e.g. inside
   modals). 180px lets an .x-modal.is-xxl hold five tiles a row, scrollbar included. */
.info-grid.compact{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}
.info-grid.compact .info-label{font-size:var(--fs-11, .68rem)}   /* ≥10.5px: the desktop minimum (Apple review, 2026-10-23) */
.info-grid.compact .info-value{font-size:var(--fs-14, .85rem)}
/* A muted second line under a value (a warehouse's location), like a table cell's .t-cap. */
.info-value > .t-cap{display:block;margin-top:2px;font-weight:400}

/* --- audit timeline: a vertical dotted timeline of events (accent dot + line).
   Replaces the drifted per-page copies (purchase-audit was hard-coded purple). --- */
.timeline{position:relative;padding-left:26px}
.timeline-item{position:relative;padding-bottom:1.1rem}
.timeline-item:last-child{padding-bottom:0}
.timeline-item::before{content:'';position:absolute;left:-22px;top:6px;width:10px;height:10px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 3px var(--surface),0 0 0 4px var(--border)}
.timeline-item::after{content:'';position:absolute;left:-18px;top:18px;width:2px;height:calc(100% - 10px);background:var(--surface-3)}
.timeline-item:last-child::after{display:none}
.timeline-time{font-size:var(--fs-12, .78rem);color:var(--text-muted);margin-bottom:4px}
.timeline-content{background:var(--surface);padding:.75rem .9rem;border-radius:var(--radius-sm);border:1px solid var(--border-light)}
.timeline-user{font-weight:700;color:var(--text-strong);margin-right:8px}

/* --- field-change diff: old (struck red pill) then new (green pill) value --- */
.field-change{font-size:var(--fs-14, .9rem);margin-top:6px}
.field-change .old-val{display:inline-block;color:var(--pill-red-text);text-decoration:line-through;background:var(--pill-red-bg);border:1px solid var(--pill-red-border);border-radius:var(--r-6, 6px);padding:1px 8px}
.field-change .new-val{display:inline-block;color:var(--pill-green-text);font-weight:700;background:var(--pill-green-bg);border:1px solid var(--pill-green-border);border-radius:var(--r-6, 6px);padding:1px 8px}
.extra-info{display:inline-block;background:var(--pill-blue-bg);color:var(--link);border:1px solid var(--pill-blue-border);padding:2px 8px;border-radius:var(--r-full, 999px);font-size:var(--fs-12, .78rem);font-weight:600;margin-left:4px}


/* --- type layer (folded from the retired typography.css). The base
   h1-h4/.display (display face) and .mono are set near the top; these just
   extend the display face to title/kpi-value classes and mono to raw code +
   sku/number classes, app-wide. --- */
.page-title,.section-title,.t-kpi-value,.kpi-value{font-family:var(--font-display);font-weight:600;letter-spacing:-.02em}
code,kbd,samp,pre,.t-mono,.sku,.sku-code,.mono-num{font-family:var(--font-mono)}

/* --- sortable column headers: THE one sort indicator, app-wide ---
   Markup: the header cell carries class="sortable" (plus data-sort="<key>" for
   public/js/ui-table.js, which wires click-to-sort and toggles .sort-asc /
   .sort-desc) and an inner <span class="sort-arrow">.

   ONE look, everywhere — the inventory products table's: EVERY sortable column
   shows a faint "\21C5" so the column reads as sortable BEFORE it is clicked,
   and the active one swaps it for "\2191" / "\2193" at full strength. Both are
   drawn in --th-accent: the primary colour as it reads on the --th-bg header
   band (the token's note in theme.css). The label itself stays --th-fg: the arrow is what
   tells the sorted column apart, not a colour shift on the text.

   NOT scoped to .table — a server-sorted table (CRM -> Customers is a
   table.mcards whose headers are links to the next sort URL) carries the same
   span, and scoping the glyph to one table class is exactly how four rival sort
   vocabularies grew (.cu-arrow, .sort-ind x3, .inv-sortable). The span is a
   fixed 1em box so swapping "\21C5" -> "\2191" can never shift the header
   beside it (the same "reserve the box" rule as the loading skeletons). */
thead th.sortable{cursor:pointer;user-select:none;white-space:nowrap}
thead th.sortable:hover{color:var(--th-fg)}
thead th .sort-arrow{display:inline-block;width:1em;margin-left:.3em;text-align:center;line-height:1;color:var(--th-accent);opacity:.7;font-size:.95em;font-weight:700;vertical-align:middle}
thead th .sort-arrow::after{content:"\21C5"}
thead th.sort-asc,
thead th.sort-desc{color:var(--th-fg)}
thead th.sort-asc .sort-arrow,
thead th.sort-desc .sort-arrow{opacity:1}
thead th.sort-asc  .sort-arrow::after{content:"\2191"}
thead th.sort-desc .sort-arrow::after{content:"\2193"}
/* A SERVER-sorted header wraps its label in a link to the next sort URL. It must
   not read as a link on the header bar — the arrow is the affordance. */
thead th.sortable > a{color:inherit;text-decoration:none;display:inline-flex;align-items:center;gap:.25em}
thead th.sortable > a:hover{color:var(--th-fg)}
/* A header sorted by a script carries its label in a real button (/js/row-link.js wraps
   it — the Apple design review, 2026-10-23: sorting was mouse-only), so Tab reaches it and
   Enter / Space sort. It must look like the label it wraps: no box, the header's own
   type and colour; only its focus ring shows. A header dragged to move its column
   (Products) takes the focus itself. */
thead th .th-sort{-webkit-appearance:none;appearance:none;margin:0;padding:0;border:0;border-radius:var(--r-4, 4px);background:none;
  font:inherit;color:inherit;letter-spacing:inherit;text-transform:inherit;text-align:inherit;line-height:inherit;white-space:inherit;cursor:inherit;max-width:100%}
thead th .th-sort:focus-visible{outline:2px solid var(--th-accent);outline-offset:2px}
thead th[tabindex="0"]:focus-visible{outline:2px solid var(--th-accent);outline-offset:-2px}
table.col-sized>thead>tr>th .th-sort{overflow-x:clip;text-overflow:ellipsis;vertical-align:bottom}

/* ======================= COLUMN RESIZE (Excel-style) =======================
   /js/col-resize.js (app-wide, from partials/icons) puts a .col-resizer grip on
   the right edge of every header cell of every table with a <thead>. Drag it to
   size the column; double-click it to fit the longest value. The grip is
   absolutely positioned, so it takes no space and never moves the header. The
   global `thead th` is sticky, which already anchors it; .cr-pos is added by
   the script only to a header a page made static.
   A table someone has sized carries .col-sized: fixed layout, one <col> per
   column, width = the sum of the columns (all inline, set by the script). A value
   wider than its column ends in "…" — a full-width row (colspan: an empty state,
   a drill-down) is left alone. On a phone mobile.css drops all of it for a
   carded table. */
.col-resizer{position:absolute;top:0;right:0;bottom:0;width:8px;cursor:col-resize;touch-action:none;user-select:none;-webkit-user-select:none;z-index:2}
.col-resizer::after{content:"";position:absolute;top:25%;bottom:25%;right:3px;width:2px;border-radius:var(--r-4, 1px);background:transparent;transition:background var(--dur-fast) var(--ease),top var(--dur-fast) var(--ease),bottom var(--dur-fast) var(--ease)}
thead:hover .col-resizer::after{background:color-mix(in srgb,var(--th-fg) 30%,transparent)}
.col-resizer:hover::after,.col-resizer.active::after{top:0;bottom:0;background:var(--th-accent)}
th.cr-pos{position:relative}
/* While a column is being dragged the cursor stays the resize arrow over
   everything it crosses (rows and sortable headers set their own cursor), and
   nothing gets text-selected. The one place !important is right: it must beat
   every per-element cursor for the length of the drag only. */
body.col-resizing,body.col-resizing *{cursor:col-resize !important;user-select:none !important;-webkit-user-select:none !important}
table.col-sized>thead>tr>th,
table.col-sized>tbody>tr>td:not([colspan]),
table.col-sized>tfoot>tr>td:not([colspan]){overflow:hidden;text-overflow:ellipsis;min-width:0;max-width:none}
/* The "…" follows the column whatever the cell holds. The cell's own ellipsis
   only reaches text sitting directly in it: a value in a box of its own was
   sliced mid-letter — a <div>, the text beside a thumbnail in a .cellflex row —
   and a box with a width of its own (.cell-ellip's 220px cap) put its "…" out of
   sight under the next column. So every box in a sized cell shrinks to the
   column and ends its own text in "…". `overflow-x:clip`, not hidden: it clips
   without turning an inline-block's baseline into its bottom edge, so no label
   jumps up a few pixels. Pictures and controls keep their own size. */
table.col-sized>thead>tr>th :not(img,svg,video,canvas,input,select,textarea,button,.col-resizer),
table.col-sized>tbody>tr>td:not([colspan]) :not(img,svg,video,canvas,input,select,textarea,button),
table.col-sized>tfoot>tr>td:not([colspan]) :not(img,svg,video,canvas,input,select,textarea,button){min-width:0;max-width:100%;overflow-x:clip;text-overflow:ellipsis}
/* A pill lays its label out as a flex item the "…" can't reach, so in a sized
   cell it becomes an inline-block of the same size, dot and all. */
table.col-sized>tbody>tr>td:not([colspan]) .pill{display:inline-block;line-height:22px;overflow:hidden}
table.col-sized>tbody>tr>td:not([colspan]) .pill.xs{line-height:18px}
table.col-sized>tbody>tr>td:not([colspan]) .pill>:is(.pd,svg,i[data-lucide]){display:inline-block;vertical-align:middle;margin:-2px 5px 0 0}
table.col-sized>tbody>tr>td:not([colspan]) .pill.xs>:is(.pd,svg,i[data-lucide]){margin-right:4px}
/* Same for a server-sorted header's link (inline-flex): its label joins the
   header's own line, which ends in "…". */
table.col-sized>thead>tr>th>a{display:inline}
@media print{.col-resizer{display:none}}

/* ============================ TABLE KIT ============================
   What a person does to a table's columns (/js/table-kit.js, loaded on first use;
   the layout is put back by /js/col-resize.js). Owner, 2026-11-08: "update every
   table we have today with this", after the table interactions mock. Moving,
   pinning, hiding and the row height are on tables with one plain header row on
   pages with the quieter look; Settings and Marketing keep widths only.
   - A pinned column is sticky at its left offset (rules per table, written by
     col-resize.js) on the ground of its row: --tk-row-bg follows the row's own
     hover, stripe and current state. Its header carries --tk-pin-line, the last
     pinned column --tk-pin-edge once the table scrolls sideways.
   - The row height is data-density on the <table>.
   - The layout tools sit where the table has a home (partials/table-tools): the
     Columns button + Reset before Filters in a list's head row, or at the end of a
     card head. They hold their box from the first paint. */
table[data-tk]{--tk-head-bg:var(--surface)}
table[data-tk] tbody tr{--tk-row-bg:var(--surface)}
table[data-tk] tbody tr:hover{--tk-row-bg:var(--surface-2)}
table.inv-table-zebra[data-tk] tbody tr:nth-child(even){--tk-row-bg:var(--surface-2)}
table.inv-table-zebra[data-tk] tbody tr:hover{--tk-row-bg:var(--surface-3)}
table[data-tk] tbody tr.is-current{--tk-row-bg:var(--accent-soft)}
table[data-density="compact"]>tbody>tr>td{padding-top:3px;padding-bottom:3px}
table[data-density="comfortable"]>tbody>tr>td{padding-top:15px;padding-bottom:15px}
table[data-density]>tbody>tr>td{transition:padding var(--dur) var(--ease)}
/* a column gliding to its new place; a column coming back fades in */
table.tk-anim>*>tr>*{transition:transform var(--dur) var(--ease),padding var(--dur) var(--ease)}
table.tk-noanim>*>tr>*{transition:none !important}
@keyframes tk-in{from{opacity:0}to{opacity:1}}
body.tk-dragging,body.tk-dragging *{cursor:grabbing !important;user-select:none !important;-webkit-user-select:none !important}
/* the lifted column: grows sideways only, so its rows stay on the table's rows */
.tk-lift{position:fixed;z-index:9000;pointer-events:none;overflow:hidden;background:var(--surface);border-radius:var(--r-12, 12px);
  box-shadow:0 0 0 1px var(--accent-border, var(--border)),var(--elev-4, var(--shadow-lg));transform-origin:center top;
  transition:scale var(--dur-fast) var(--ease)}
.tk-lift.is-up{scale:1.03 1}
.tk-lift.is-landing{transition:translate var(--dur) var(--ease),scale var(--dur) var(--ease);scale:1}
.tk-lift table{margin:0}
.tk-lift thead th{background:var(--surface)}
/* resizing: the line down the table and the width in px */
.tk-guide{position:fixed;z-index:8990;width:2px;margin-left:-1px;background:var(--accent);pointer-events:none;opacity:0;transition:opacity var(--dur-fast) var(--ease)}
.tk-badge{position:fixed;z-index:8991;transform:translateX(-50%);padding:3px 8px;border-radius:var(--r-6, 6px);background:var(--accent);color:var(--on-brand);
  font:600 var(--fs-11, 11px)/1.3 var(--font-mono);font-variant-numeric:tabular-nums;white-space:nowrap;box-shadow:var(--elev-2, var(--shadow-md));
  pointer-events:none;opacity:0;translate:0 2px;transition:opacity var(--dur-fast) var(--ease),translate var(--dur-fast) var(--ease)}
.tk-guide.is-on,.tk-badge.is-on{opacity:1;translate:0 0}
/* the pin: under the pointer, or always while pinned. It sits over the header's
   own padding, so adding it never widens a column. */
.tk-pin{position:absolute;top:50%;right:8px;translate:0 -50%;display:inline-grid;place-items:center;width:22px;height:22px;padding:0;
  border:0;border-radius:var(--r-6, 6px);background:var(--tk-head-bg, var(--surface));color:var(--text-muted);cursor:pointer;opacity:0;
  transition:opacity var(--dur-fast) var(--ease),color var(--dur-fast) var(--ease),background-color var(--dur-fast) var(--ease)}
.tk-pin.is-start{right:auto;left:6px}
.tk-pin svg,.tk-pin i[data-lucide]{width:13px;height:13px}
thead th:hover>.tk-pin,thead th:focus-within>.tk-pin{opacity:1}
.tk-pin:hover{color:var(--text);background:var(--surface-3)}
thead th.tk-pinned>.tk-pin{opacity:1;color:var(--accent)}
/* the layout tools */
.tk-tools{display:inline-flex;align-items:center;gap:6px;flex:none}
/* a crowded head row that wraps keeps the tools and Filters at the right, so the Filters pane
   opens on screen (on one line the row's own .spacer takes the free room) */
@media (min-width:769px){.toolbar>.tk-tools,.list-head>.filter-pop-wrap{margin-left:auto}}
.tk-colbtn{gap:6px}
.tk-colbtn .tk-count{display:inline-block;min-width:3.4em;padding:3px 6px;border-radius:var(--r-6, 6px);background:var(--surface-2);color:var(--text-muted);
  font:500 var(--fs-11, 11px)/1 var(--font-mono);font-variant-numeric:tabular-nums;text-align:center}
.tk-colbtn .tk-chev,.tk-colbtn i.tk-chev{width:14px;height:14px;color:var(--text-muted);transition:rotate var(--dur-fast) var(--ease)}
.tk-colbtn[aria-expanded="true"]{border-color:var(--accent-border, var(--accent));color:var(--accent)}
.tk-colbtn[aria-expanded="true"] .tk-count{background:var(--accent-soft);color:var(--accent)}
.tk-colbtn[aria-expanded="true"] .tk-chev{rotate:180deg}
.tk-reset{position:relative}
.tk-reset .tk-dot{position:absolute;top:6px;right:6px;width:6px;height:6px;border-radius:50%;background:var(--accent);scale:0;transition:scale var(--dur-fast) var(--ease)}
.tk-reset.is-dirty .tk-dot{scale:1}
.tk-reset .lucide-check,.tk-reset i[data-lucide="check"]{display:none}
.btn.tk-reset.is-done{background:var(--accent-gradient, var(--accent));color:var(--on-brand);border-color:transparent;opacity:1}
.tk-reset.is-done .lucide-rotate-ccw{display:none}
.tk-reset.is-done .lucide-check{display:block;animation:tk-pop var(--dur) var(--ease)}
.tk-reset.is-spin .lucide-rotate-ccw{animation:tk-spin var(--dur) var(--ease)}
@keyframes tk-pop{0%{scale:.4;opacity:0}60%{scale:1.15;opacity:1}100%{scale:1}}
@keyframes tk-spin{to{rotate:-360deg}}
.card-head .tk-tools{margin-left:auto}
/* a head's note stays beside the tools, at the right */
.card-head>:is(.t-mut,.cap):has(+.tk-tools){margin-left:auto}
.card-head>.t-mut+.tk-tools,.card-head>.cap+.tk-tools{margin-left:12px}
/* the Columns menu */
.tk-menu{position:fixed;z-index:9100;width:300px;max-height:min(560px, calc(var(--vh, 1vh) * 100 - 120px));overflow:auto;padding:6px;background:var(--surface);
  border:1px solid var(--border);border-radius:var(--r-12, 12px);box-shadow:var(--elev-4, var(--shadow-lg));animation:pop-in var(--dur-fast) var(--ease)}
.tk-menu-sec{padding:8px 8px 6px;font-size:var(--fs-11, 11px);font-weight:600;color:var(--text-muted)}
.tk-mi{display:grid;grid-template-columns:18px 1fr auto;align-items:center;gap:10px;padding:7px 8px;border-radius:var(--r-8, 8px);cursor:pointer;font-size:var(--fs-13, 13px);color:var(--text)}
.tk-mi:hover{background:var(--surface-2)}
.tk-mi input{width:16px;height:16px;margin:0;accent-color:var(--accent);cursor:pointer}
.tk-mi .nm{display:flex;align-items:center;gap:6px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tk-mi .nm svg,.tk-mi .nm i[data-lucide]{width:12px;height:12px;color:var(--accent);flex:none}
.tk-mi .meta{font:400 var(--fs-11, 11px)/1 var(--font-mono);font-variant-numeric:tabular-nums;color:var(--text-muted)}
.tk-mi.is-off .nm{color:var(--text-muted)}
.tk-menu-dens{padding:4px 8px 8px}
.tk-menu-dens .seg{display:flex;width:100%}
.tk-menu-dens .seg button{flex:1}
.tk-menu-sep{height:1px;margin:6px 4px;background:var(--border-light)}
.tk-menu-more{display:grid;gap:4px;padding:0 8px 4px}
.tk-more-list{display:grid;max-height:200px;overflow:auto}
.tk-more-item{display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding:6px 8px;border:0;border-radius:var(--r-8, 8px);background:none;color:var(--text);font:inherit;font-size:var(--fs-13, 13px);text-align:left;cursor:pointer}
.tk-more-item:hover{background:var(--surface-2)}
.tk-more-item small{color:var(--text-muted);font-size:var(--fs-11, 11px)}
.tk-more-none{padding:6px 8px;color:var(--text-muted);font-size:var(--fs-12, 12px)}
.tk-menu-acts{display:inline-flex;gap:4px}
/* a laptop-sized window: a busy head row has no room — Columns is its icon alone (its dot says the
   table differs from normal) and Reset is in its menu */
.tk-colbtn{position:relative}
.tk-colbtn>.tk-dot{position:absolute;top:5px;right:5px;width:6px;height:6px;border-radius:50%;background:var(--accent);display:none}
@media (max-width:1279px){
  .tk-tools>.tk-reset,.tk-colbtn .tk-chev,.tk-colbtn .tk-count{display:none}
  .tk-colbtn{width:var(--btn-h, 34px);padding:0;justify-content:center}
  .tk-colbtn.sm{width:var(--btn-h-sm, 28px)}
  .tk-colbtn.is-dirty>.tk-dot{display:block}
}
.tk-menu-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:4px;padding:8px 8px 4px;border-top:1px solid var(--border-light);font-size:var(--fs-12, 12px);color:var(--text-muted)}
.tk-say{position:fixed;z-index:9200;pointer-events:none;padding:5px 10px;border-radius:var(--r-8, 8px);background:var(--text);color:var(--surface);font-size:var(--fs-12, 12px);
  box-shadow:var(--elev-3, var(--shadow-md));opacity:0;translate:-50% 4px;transition:opacity var(--dur-fast) var(--ease),translate var(--dur-fast) var(--ease)}
.tk-say.is-on{opacity:1;translate:-50% 0}
@media print{.tk-pin,.tk-tools{display:none}}

/* --- pagination (.pager) ---
   THE pager — the one under Inventory → Products, on every paged list in the app
   (standing rule, CLAUDE.md → "Every list pages with ONE pager"; 2026-09-27):
     <div class="pager"><span class="pager-info">Page 2 · 51–100 of 187</span>
       <a|button class="pager-link">‹ Prev</…><a|button class="pager-link">Next ›</…></div>
   The cluster sits at the RIGHT of the table foot, the count reads as muted text
   directly beside the buttons, and Prev/Next are compact ghost buttons with their
   word. No page numbers, no First/Last, no rows-per-page picker; at an end a
   button greys out, it never disappears. JS builds it with App.pagerHtml
   (/js/format.js); src/ui/pager-contract.test.js holds every page to it. */
.pager{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-top:12px;font-size:var(--fs-13, 13px);color:var(--text-2)}
/* display:flex would otherwise beat the UA's [hidden]{display:none}, so a pager
   hidden before its rows arrive still took its margin. The same trap as .empty. */
.pager[hidden]{display:none}
.pager .pager-info{color:var(--text-muted);font-size:var(--fs-13, .8rem)}
.pager .pager-link{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;padding:.28rem .6rem;border-radius:var(--r-8, 8px);border:1px solid var(--border);background:var(--surface);color:var(--text-subtle);font-size:var(--fs-12, .78rem);font-weight:500;line-height:1.2;cursor:pointer;text-decoration:none;transition:background var(--dur-fast) var(--ease),border-color var(--dur-fast) var(--ease),box-shadow var(--dur-fast) var(--ease),transform var(--dur-fast) var(--ease)}
.pager .pager-link svg,.pager .pager-link i[data-lucide]{width:12px;height:12px}
.pager .pager-link:focus-visible{outline:none;box-shadow:0 0 0 3px var(--accent-focus-ring)}
/* The NEUTRAL hover the Products buttons actually show (inventory.css's late
   `.inv-btn-sm:hover` wins over the accent tint above it) — the accent version
   made every other pager light up blue/amber where Products turns grey. */
.pager .pager-link:hover{background:var(--surface-3);border-color:var(--border-subtle);color:var(--text-strong)}
/* A stepped-off Prev/Next must LOOK off, not just faded: opacity:.55 over a
   transparent fill dimmed the border and the label together, so the button read
   as a live one seen through a haze. This is the .inv-btn:disabled treatment the
   products pager always had — a --surface-2 fill, a solid border, --text-faint
   text and a dimmed arrow. pointer-events stay off because the server-rendered
   pagers step with <a>, which cannot carry a real `disabled`. */
.pager .pager-link.disabled,.pager .pager-link:disabled{background:var(--surface-2);border-color:var(--border);color:var(--text-faint);cursor:not-allowed;pointer-events:none;opacity:1}
.pager .pager-link.disabled svg,.pager .pager-link:disabled svg{opacity:.55}
/* An unpadded card's pager lines up with its .card-head (20px sides) and keeps a
   foot inset, instead of hanging its buttons off the card's bottom-right corner.
   Same idea as `.card:not(.pad) > .toolbar` above; a .card.pad (or a .pad wrapper
   inside the card, as on Reports -> Stage resets) already insets it. My Work ->
   Fraud is the one pager that sits directly in a bare .card. A script's plain
   mount div (no class — e.g. the purchase History's [data-purchase-history]) is
   no inset either, so the pager inside it is padded the same; it sat flush on
   the card's border until 2026-10-01 (src/ui/card-pager-inset.browser.test.js). */
.card:not(.pad) > .pager,
.card:not(.pad) > div:not([class]) > .pager{padding-inline:20px;padding-bottom:16px}

/* --- shared modal system (.x-modal*) — backed by /js/x-modal.js + window.App.modal ---
   This is the structural modal for CUSTOM content (forms, multi-step, lightboxes).
   For plain yes/no + alerts use window.App.confirm/alert (partials/ui-modal.ejs) instead.
   Markup contract:
     <div class="x-modal-backdrop" id="X" data-x-modal hidden>
       <div class="x-modal" role="dialog" aria-modal="true" aria-labelledby="X-title">
         <header class="x-modal__head"><h2 class="x-modal__title" id="X-title">…</h2>
           <button class="x-modal__close" data-x-close aria-label="Close"><i data-lucide="x"></i></button></header>
         <div class="x-modal__body">…page markup…</div>
         <footer class="x-modal__foot">…buttons (.btn vocab)…</footer></div></div>
   Full-bleed (lightbox / camera): put content DIRECTLY in .x-modal-backdrop.is-full (no .x-modal box),
   so a click on the dark surround = a click on the backdrop and dismisses. */
.x-modal-backdrop{position:fixed;inset:0;z-index:9000;display:none;align-items:center;justify-content:center;padding:1rem;background:var(--overlay);backdrop-filter:blur(2px)}
.x-modal-backdrop.open{display:flex}
.x-modal{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow-lg);width:min(560px,92vw);max-height:calc(var(--vh) * .9);display:flex;flex-direction:column;overflow:hidden;animation:xModalPop var(--dur-fast) var(--ease)}
@keyframes xModalPop{from{opacity:0;transform:translateY(8px) scale(.985)}to{opacity:1;transform:none}}
.x-modal.is-sm{width:min(380px,92vw)}
.x-modal.is-wide{width:min(720px,94vw)}
.x-modal.is-xl{width:min(980px,95vw)}
.x-modal.is-xxl{width:min(1100px,96vw)}
/* 75% of the window for a wide table (Market Price Details), never narrower than
   .is-xl and never past 95vw — on a phone that is the whole width, like .is-xl. */
.x-modal.is-75vw{width:min(max(75vw,980px),95vw)}
/* Almost the window's whole width, for a dialog that is a wide working table
   (Purchasing → order → Receive into stock). */
.x-modal.is-page{width:95vw}
.x-modal.is-tall{height:calc(var(--vh) * .9)}
.x-modal__head{display:flex;align-items:center;gap:12px;flex:0 0 auto;padding:14px 18px;border-bottom:1px solid var(--border-light);background:var(--surface-2)}
.x-modal__title{margin:0;font-family:var(--font-display);font-weight:600;letter-spacing:-.02em;color:var(--text-strong);font-size:var(--fs-16, 16px)}
.x-modal__close{margin-left:auto;border:0;background:none;color:var(--text-muted);border-radius:var(--r-8, 8px);padding:5px;cursor:pointer;display:inline-flex;line-height:0}
.x-modal__close svg,.x-modal__close i[data-lucide]{width:18px;height:18px}
.x-modal__close:hover{background:var(--surface-3);color:var(--text)}
.x-modal__body{flex:1 1 auto;overflow:auto;padding:18px;color:var(--text)}
/* A <form> wrapping body + footer (a create/edit dialog) passes the column through, so
   the body stays the scroller and the footer's Save stays on screen — as a plain block
   it grew past the modal's max-height and overflow:hidden cut Save off
   (src/ui/x-modal-form.browser.test.js). */
.x-modal > form{display:flex;flex-direction:column;flex:1 1 auto;min-height:0}
.x-modal__body.pad-0{padding:0}
.x-modal__foot{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px;flex:0 0 auto;padding:14px 18px;border-top:1px solid var(--border-light);background:var(--surface-2)}
/* A dialog with steps: Back at the far left, so Cancel and the main action never move between steps. */
.x-modal__foot>.foot-start{margin-right:auto}
/* A read-only modal drops its footer (the tray Notes feed once the tray is submitted);
   the display above would otherwise beat the UA [hidden]. */
.x-modal__foot[hidden]{display:none}
/* Legacy `.modal` backdrops may wrap a canonical `.x-modal` box to get the head/body/foot
   chrome while keeping their existing show/hide + close JS. The legacy `.close-button` span
   sits as a flex child in the head bar (override its absolute legacy positioning). */
.x-modal .x-modal__head .close-button{position:static;margin-left:auto;top:auto;right:auto}
/* `.close-button` carrying a Lucide <svg> (not the legacy &times; char) centers cleanly via
   the flex box — size it like the canonical .x-modal__close. (The full-bleed `.lightbox`
   variant keeps its larger × character and is unaffected.) */
.close-button:not(.lightbox):not(.close-button--icon) svg,.close-button:not(.lightbox):not(.close-button--icon) i[data-lucide]{width:18px;height:18px}
/* full-bleed: black lightbox/camera scrim; content sits directly in the backdrop */
.x-modal-backdrop.is-full{padding:0;flex-direction:column;gap:14px;background:var(--viewer-scrim)}
.x-modal-backdrop.is-full img,.x-modal-backdrop.is-full video{max-width:94vw;max-height:88vh;object-fit:contain;border-radius:var(--r-6, 6px)}
/* A PDF in the lightbox (a receipt): an <iframe> has no intrinsic size, so it gets a fixed
   box. Turned a quarter-turn its axes swap — so `.is-rot-side` swaps the box too. */
.lightbox-pdf{width:95vw;height:92vh;border:0;border-radius:var(--r-8, 8px);background:var(--surface)}
.lightbox-pdf.is-rot-side{width:88vh;height:92vw}
.lightbox-pdf[hidden]{display:none}
/* The canonical `.close-button` closing a full-bleed lightbox. The scrim is always black —
   in BOTH themes — so the theme-aware `--text-muted`/`--surface-3` it normally uses would
   read as a dim grey on black; it wears the `--viewer-*` chip instead (theme.css "PHOTO
   VIEWER": a solid dark chip with a light ring, readable over the scrim AND a white photo). It is a
   ROUND button here, the same shape and tone as the `.x-modal__nav` arrows it shares the
   scrim with (a square hover chip on top of a photo reads as a stray rectangle) — smaller
   than those, because closing is not the action the eye should land on first. */
.x-modal-backdrop.is-full > .close-button{z-index:1;top:14px;right:14px;width:34px;height:34px;
  padding:0;border:0;border-radius:50%;background:var(--viewer-ctl-bg);color:var(--viewer-ctl-fg);
  box-shadow:inset 0 0 0 1px var(--viewer-ctl-ring),var(--viewer-ctl-shadow);
  display:grid;place-items:center}
.x-modal-backdrop.is-full > .close-button:hover,
.x-modal-backdrop.is-full > .close-button:focus{background:var(--viewer-ctl-bg-hover);color:var(--viewer-ctl-fg)}

/* `.close-button--x` — the close for a page that loads NO icon bundle (the customer-facing
   ones: consignor portal, statement). A text `&times;` cannot be centred in a round button:
   its ink sits on the BASELINE, so the font's metrics decide where it lands — which is why it
   read as sitting off-centre inside its chip. So draw it: two crossing bars, same 2px stroke
   and proportions as the Lucide X the icon-bundle pages use. Deliberately NOT
   `:has(svg)`-based — a browser without `:has` drops the whole rule and would leave the
   button styled but the X uncentred. The `&times;` stays in the markup as fallback content.
   A button that carries a real Lucide <svg> just doesn't take this class. */
.close-button.close-button--x{font-size:0;line-height:0}
/* Positioned against the button box itself (`.close-button` is already `position:absolute`,
   so it IS the containing block) — NOT centred by grid/flex: the leftover text node counts as
   a box there and pushes the bars off-centre. top/left 50% minus half the bar is exact. */
.close-button--x::before,.close-button--x::after{content:"";position:absolute;top:50%;left:50%;
  width:13px;height:2px;margin:-1px 0 0 -6.5px;border-radius:var(--r-4, 1px);background:currentColor}
.close-button--x::before{transform:rotate(45deg)}
.close-button--x::after{transform:rotate(-45deg)}
/* Prev/next arrows for a full-bleed lightbox. Colours are the `--viewer-*` tokens (theme.css
   "PHOTO VIEWER"), same as the `.is-full` close button above. Wired by
   App.bindLightboxKeys (/js/lightbox.js) so the arrows and the ← / → keys
   drive the same step. `hidden` collapses them when there is only one image. Its own
   padding:0 and box: the tray editor's edit-panels.css pads every plain <button>
   .75rem 1.5rem, which made these a 48×44 oval with the chevron off centre (2026-10-22).
   Centred with `translate`, never `transform`: a press rule (that sheet's button:active
   translateY(1px)) sets `transform`, and on the centring it REPLACED it — the arrow dropped
   23px while held. On `translate` the press adds its 1px sink on top. */
.x-modal__nav{position:absolute;top:50%;translate:0 -50%;z-index:1;width:44px;height:44px;padding:0;box-sizing:border-box;border-radius:50%;border:0;background:var(--viewer-ctl-bg);color:var(--viewer-ctl-fg);box-shadow:inset 0 0 0 1px var(--viewer-ctl-ring),var(--viewer-ctl-shadow);display:grid;place-items:center;cursor:pointer;transition:background var(--dur-fast) var(--ease),transform var(--dur-fast) var(--ease)}
.x-modal__nav svg,.x-modal__nav i[data-lucide]{width:22px;height:22px}
.x-modal__nav:hover{background:var(--viewer-ctl-bg-hover)}
.x-modal__nav.prev{left:18px}
.x-modal__nav.next{right:18px}
.x-modal__nav[hidden]{display:none}
/* Blur-up loading, applied by App.lightboxLoader (/js/lightbox.js) to whatever <img>
   a viewer paints into — the class is added by the JS, so no page needs new markup.
   The already-cached ~400px thumb shows first and blurs while the full-res original
   decodes behind it, so a viewer is never BLANK on open or on ← / →. Lives here, not
   in a page sheet: every image viewer in the app must load the same way. */
.lightbox-img{transition:filter var(--dur) var(--ease),transform var(--dur) var(--ease)}
.lightbox-img.is-loading-full{filter:blur(8px);transform:scale(1.02)}
/* The viewer under a finger (App.lightboxTouch, /js/lightbox.js, 2026-10-09): the page behind
   never scrolls or pinch-zooms, and a long press on the photo opens no image sheet. The
   zoom and the slide are the `scale` / `translate` properties the script sets on the <img>. */
.lightbox-touch{touch-action:none;overscroll-behavior:contain}
.lightbox-touch img{touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
/* the main photo ON a page (inline: true): a sideways swipe is the script's, up / down stays the page's scroll */
.lightbox-touch-inline{touch-action:pan-y pinch-zoom}
.lightbox-touch-inline img{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
/* Quarter-turn rotation, applied by App.setLightboxRotation (/js/lightbox.js). It uses the
   individual `rotate` property, NOT `transform`, so it composes with the blur-up scale above
   instead of replacing it. A quarter turn swaps the box's axes, so `.is-rot-side` swaps the
   size caps — in viewport units, because a % cap measures the parent's WIDTH, which is not
   what a sideways photo's width turns into. `!important` because every viewer sets its own
   caps (some inline) and this must win only while a photo is turned sideways. An element with
   a FIXED width/height (the receipt PDF <iframe>) swaps those itself. */
.lightbox-rot{rotate:var(--lightbox-rot,0deg)}
.lightbox-rot.is-rot-side{max-width:88vh!important;max-height:92vw!important}
/* Tool buttons on a full-screen image viewer (Rotate, Download), wired by
   App.lightboxRotator. Colours are the `--viewer-*` tokens, like `.x-modal__nav`.
   The group sits top-right; add `.beside-close` when the viewer has its own close button in
   that corner. */
.lightbox-tools{position:absolute;top:14px;right:14px;z-index:3;display:flex;gap:8px}
.lightbox-tools.beside-close{right:72px}
.lightbox-tool{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 14px;border:0;border-radius:var(--r-full, 999px);
  background:var(--viewer-ctl-bg);color:var(--viewer-ctl-fg);box-shadow:inset 0 0 0 1px var(--viewer-ctl-ring),var(--viewer-ctl-shadow);
  font:600 var(--fs-13, 13px)/1 var(--font-body);cursor:pointer;text-decoration:none;white-space:nowrap}
.lightbox-tool:hover,.lightbox-tool:focus-visible{background:var(--viewer-ctl-bg-hover);color:var(--viewer-ctl-fg)}
.lightbox-tool svg,.lightbox-tool i[data-lucide]{width:16px;height:16px}
.lightbox-tool[hidden]{display:none}
/* The legacy full-screen lightbox close (`.close-button.lightbox` on the tray / review / fixing
   pages) as the same round on-scrim button as `.x-modal-backdrop.is-full > .close-button`, at the
   same top and height as `.lightbox-tools` — so the × and Rotate sit on one line (the 40px text ×
   sat lower than the Rotate button). The X is CSS-drawn (`.close-button--x`), so a click still
   lands on the span the pages' close handlers test for. */
.close-button.lightbox.close-button--x{top:14px;right:14px;width:34px;height:34px;padding:0;border-radius:50%;
  background:var(--viewer-ctl-bg);color:var(--viewer-ctl-fg);box-shadow:inset 0 0 0 1px var(--viewer-ctl-ring),var(--viewer-ctl-shadow)}
.close-button.lightbox.close-button--x:hover{background:var(--viewer-ctl-bg-hover);color:var(--viewer-ctl-fg)}
/* A manage-images tile whose turn is still saving keeps the tile's own caps — the sideways caps
   above are for full-screen. */
.thumbnail img.lightbox-rot.is-rot-side{max-width:100%!important;max-height:100%!important}


/* =====================================================================
   Global App.confirm/alert modal (partials/ui-modal.ejs) — token-based, shipped via partials/icons
   Moved here from the page's inline <style> so edits serve live (no
   view-cache restart). Verbatim move — no visual change.
   ===================================================================== */
  .app-modal-backdrop {
    position: fixed; inset: 0;
    background: var(--overlay, rgba(16, 24, 40, 0.55));
    display: none;
    align-items: center; justify-content: center;
    z-index: 9500;
    backdrop-filter: blur(2px);
    padding: 1rem;
  }
  .app-modal-backdrop.open { display: flex; }
  .app-modal {
    background: var(--surface, #fff);
    border-radius: var(--r-16, 14px);
    width: min(460px, 92vw);
    max-height: calc(var(--vh) * .9);
    display: flex; flex-direction: column;
    box-shadow: var(--elev-4, 0 20px 60px rgba(16, 42, 94, 0.35));
    border: 1.25px solid var(--border, #e2e8f0);
    overflow: hidden;
    animation: appModalPop var(--dur-fast) var(--ease);
  }
  @keyframes appModalPop {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to   { opacity: 1; transform: none; }
  }
  .app-modal > header {
    display: flex; align-items: center; gap: 0.55rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid var(--border-light, var(--border, #edf0f4));
    background: var(--surface-2, var(--surface, #f8fafc));
  }
  .app-modal > header .app-modal-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: var(--r-8, 9px); flex: 0 0 auto;
    background: color-mix(in srgb, var(--info, #3b82f6) 14%, transparent);
    color: var(--info, #3b82f6);
  }
  .app-modal.v-warn  > header .app-modal-icon { background: color-mix(in srgb, var(--warning, #d97706) 16%, transparent); color: var(--warning, #d97706); }
  .app-modal.v-danger> header .app-modal-icon { background: color-mix(in srgb, var(--danger, #dc2626) 16%, transparent); color: var(--danger, #dc2626); }
  .app-modal.v-success>header .app-modal-icon { background: color-mix(in srgb, var(--success, #16a34a) 16%, transparent); color: var(--success, #16a34a); }
  .app-modal > header .app-modal-icon i { width: 18px; height: 18px; }
  .app-modal > header h2 {
    margin: 0; padding: 0; border: none;
    font-size: var(--fs-16, 16px); font-weight: 600; line-height: 1.2;
    color: var(--text-strong, var(--text, #0f172a));
    font-family: var(--font-display, inherit); letter-spacing: -0.02em;
  }
  .app-modal > header .app-modal-close {
    margin-left: auto;
    border: 0; background: none; cursor: pointer;
    color: var(--text-muted, var(--muted, #64748b));
    display: inline-flex; align-items: center;
    padding: 4px; border-radius: var(--r-6, 6px);
  }
  .app-modal > header .app-modal-close:hover { background: var(--surface-3, #eef2f7); color: var(--text, #0f172a); }
  .app-modal > header .app-modal-close i { width: 18px; height: 18px; }
  .app-modal .app-modal-body {
    padding: 1.1rem 1.15rem;
    overflow-y: auto;
    color: var(--text, #334155);
    font-size: var(--fs-15, 0.92rem); line-height: 1.55;
    white-space: pre-wrap; word-break: break-word;
  }
  /* App.prompt: its field under the text (the canonical .field/.input; the INVALID
     CONTROL block below draws a refused value). */
  .app-modal .app-modal-text + .app-modal-field { margin-top: 12px; }
  .app-modal .app-modal-field { white-space: normal; }
  .app-modal footer {
    padding: 0.9rem 1.15rem;
    border-top: 1px solid var(--border-light, var(--border, #edf0f4));
    background: var(--surface-2, var(--surface, #f8fafc));
    display: flex; align-items: center; justify-content: flex-end;
    gap: 0.5rem;
  }
  .app-modal-btn {
    height: 38px; padding: 0 0.95rem;
    border-radius: var(--r-8, 9px); border: 1px solid transparent;
    font-size: var(--fs-14, 0.88rem); font-weight: 600; cursor: pointer;
    display: inline-flex; align-items: center; gap: 0.4rem; line-height: 1;
    font-family: inherit;
  }
  .app-modal-btn.ghost {
    background: var(--surface, #fff);
    color: var(--text-strong, var(--text, #0f172a));
    border-color: var(--border-subtle, var(--border, #cbd5e1));
  }
  .app-modal-btn.ghost:hover { background: var(--surface-3, #eef2f7); }
  .app-modal-btn.primary {
    background: linear-gradient(135deg, var(--accent, #0350a6), var(--accent-end, var(--accent-strong, var(--accent, #0350a6))));
    border-color: var(--accent, #0063a3);
    color: var(--on-brand, #fff);
    box-shadow: 0 2px 6px color-mix(in srgb, var(--accent, #0063a3) 26%, transparent);
  }
  .app-modal-btn.primary:hover { filter: brightness(1.06); }
  .app-modal-btn.danger {
    background: var(--danger, #dc2626);
    border-color: var(--danger, #dc2626);
    color: var(--on-brand, #fff);
  }
  .app-modal-btn.danger:hover { filter: brightness(1.05); }
  .app-modal-btn:focus-visible { outline: 2px solid var(--accent, #0063a3); outline-offset: 2px; }


/* =====================================================================
   Topbar chrome (partials/x-topbar.ejs) — channel-auth banner + first-paint bell-count hide
   Moved here from the page's inline <style> so edits serve live (no
   view-cache restart). Verbatim move — no visual change.
   ===================================================================== */
  /* Critical: keep the CoPilot/notification count badges hidden at first paint.
     The full .header-bell-count styles (incl. this .hidden rule) live in the
     lazily-loaded copilot-widget.css, so without this inline copy the default
     "0" flashes for one frame before that stylesheet applies. */
  .header-bell-count.hidden { display: none; }

  /* Admin channel-auth alerts: PERSISTENT toasts shown while a sales channel's
     credential is dead or an eBay token is near expiry. Rendered INSIDE the
     shared .toast-region (top-right) so they queue under the transient toasts
     instead of owning their own corner — the fixed values below are only the
     fallback for a page with no x-topbar. Deliberately an overlay, not a strip:
     the old under-the-topbar banner sat in normal flow BEHIND the fixed topbar
     and was invisible. No dismiss button: they clear themselves once the
     channels are healthy again — see channel-auth-health.js. Theme-aware via
     pill tokens (no hard-coded colors). */
  .chan-toasts { position: fixed; top: var(--toast-top); right: var(--toast-right); z-index: 210;
    display: flex; flex-direction: column; gap: var(--toast-gap);
    width: var(--toast-width); }
  .chan-alert { display: flex; align-items: center; gap: .55rem; padding: .65rem .9rem;
    font-size: var(--fs-14, .85rem); line-height: 1.35; border-radius: var(--r-12, 12px);
    border: 1px solid transparent; box-shadow: var(--shadow-lg);
    /* Opaque base, like .toast. The variants below tint this with a pill token,
       and in DARK those tokens are translucent (--pill-red-bg is rgba(...,.16))
       because a pill sits ON a card. This alert FLOATS over the page, so the
       tint alone let the table underneath read straight through it. */
    background: var(--elev); }
  .chan-alert svg, .chan-alert i[data-lucide] { width: 16px; height: 16px; flex: 0 0 auto; }
  .chan-alert .ca-msg { flex: 1 1 auto; min-width: 0; }
  /* The only clickable part of the alert — the box itself stays click-through
     so a persistent banner can't eat clicks on the page under it (.toast-region). */
  .chan-alert .ca-act { flex: 0 0 auto; font-weight: 600; text-decoration: underline; color: inherit; white-space: nowrap; pointer-events: auto; }
  /* Tint = the pill token painted as a layer OVER the opaque --elev base, so a
     translucent dark-mode token composites instead of showing the page through.
     Light-mode tokens are opaque, so they render exactly as before. */
  .chan-alert.ca-error { background: linear-gradient(var(--pill-red-bg), var(--pill-red-bg)), var(--elev); color: var(--pill-red-text); border-color: var(--pill-red-border); }
  .chan-alert.ca-warn  { background: linear-gradient(var(--pill-amber-bg), var(--pill-amber-bg)), var(--elev); color: var(--pill-amber-text); border-color: var(--pill-amber-border); }
  .chan-alert b { font-weight: 600; }


/* =====================================================================
   CoPilot widget first-paint initial state (partials/copilot-widget.ejs) — keep before the lazy copilot-widget.css
   Moved here from the page's inline <style> so edits serve live (no
   view-cache restart). Verbatim move — no visual change.
   ===================================================================== */
    .sw-panel { position: fixed; top: calc(var(--topbar-h) + 4px); right: 0; height: calc(var(--vh) - var(--topbar-h) - 4px); transform: translateX(100%); }
    .sw-modal { display: none; }
    .sw-backdrop { position: fixed; inset: 0; opacity: 0; pointer-events: none; }

/* =====================================================================
   Notification banners — .flash (admin) + .message (reports) converged to ONE
   token-based style (was redefined ~13 different ways across pages). Inline
   status strip; .error = red, .success = green (pill tokens, theme-aware).
   .flash defaults to success-green (admin convention); .message stays neutral
   until given .success/.error (reports convention); .show toggles visibility.
   :not(.spot-card) keeps the base off the scanner's .spot-card.flash animation.
   ===================================================================== */
.flash:not(.spot-card), .message {
  padding: 0.7rem 1rem; border-radius: var(--r-12, 10px); margin-bottom: 1rem;
  font-weight: 600; font-size: var(--fs-14, 0.9rem); border: 1px solid transparent;
}
.flash:not(.spot-card) { background: var(--pill-green-bg); border-color: var(--pill-green-border); color: var(--pill-green-text); }
.flash.success, .message.success { background: var(--pill-green-bg); border-color: var(--pill-green-border); color: var(--pill-green-text); }
.flash.error, .message.error { background: var(--pill-red-bg); border-color: var(--pill-red-border); color: var(--pill-red-text); }
.flash.warning, .message.warning { background: var(--pill-amber-bg); border-color: var(--pill-amber-border); color: var(--pill-amber-text); }
.flash.info, .message.info { background: var(--pill-blue-bg); border-color: var(--pill-blue-border); color: var(--pill-blue-text); }
/* A banner with its one action at the end of its line (a commission month's Mark as paid):
   the button sits right, and goes under the text only when the line has no room. */
.flash.has-action, .message.has-action { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.flash.has-action > .btn, .message.has-action > .btn { margin-left: auto; }
.flash.has-action > span, .message.has-action > span { flex: 1 1 280px; min-width: 0; }
/* A link inside a banner ("switch it on under Settings → …") must read as one: it
   inherits the banner's text colour, so the underline is what marks it. */
.flash:not(.spot-card) a, .message a { color: inherit; text-decoration: underline; }
/* A banner's leading icon is the size of its text and centred on the first line
   (it had no rule: Lucide's 24px default towered over the 14px text and sat on
   the baseline). The <i> placeholder takes the same box as the svg it becomes.
   Tested by src/ui/banner-icon.browser.test.js. */
.flash:not(.spot-card) > :is(svg, i[data-lucide]), .message > :is(svg, i[data-lucide]) {
  width: 1.1em; height: 1.1em; vertical-align: -0.2em; margin-right: 2px;
}
.flash.show { display: block; }

/* Inline, non-blocking amber advisory (a soft nudge, not an error) — e.g. a
   settings field whose value pairs poorly with another. Hidden until `.show`.
   Shared here (theme-aware, contrast-checked) so pages don't re-declare it in a
   per-page <style>. */
.cfg-warn { display: none; align-items: flex-start; gap: 0.4rem; margin: 0.1rem 0 0.45rem 0;
  font-size: var(--fs-13, 0.82rem); color: var(--pill-amber-text); background: var(--pill-amber-bg);
  border-radius: var(--r-8, 7px); padding: 7px 10px; max-width: 520px; }
.cfg-warn.show { display: flex; }
.cfg-warn .lucide { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; }

/* ── app_config field chrome (partials/config-group.ejs) ─────────────────────
   A setting group is edited on the page that OWNS the feature, not only on the
   page that owns it, so this chrome is shared here rather than in
   a per-page <style>. Pair with /js/config-fields.js for the autosave. */
#cfg-form { display: block; } /* beats the global `form{display:flex}` in style.css */
.cfg-field { padding: 0.85rem 0; border-bottom: 1px dashed var(--border-light); }
.cfg-field:last-child { border-bottom: none; }
/* Sizes are the form vocabulary's (.choice-opt title/sub, .input): a setting's
   name is 13px, its help 12px muted, its box the 32px .input — never rem sizes,
   which drew every setting larger than the card's own heading (2026-10-15, when
   the Admin re-skin that used to shrink them went). */
.cfg-field > label:not(.cfg-bool) { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.45rem; font-weight: 600; color: var(--text); font-size: var(--fs-13, 13px); margin-bottom: 4px; }
.cfg-field .cfg-help { color: var(--muted); font-size: var(--fs-12, 12px); line-height: 1.45; margin: 0 0 8px 0; }
.cfg-field input[type="text"], .cfg-field input[type="password"], .cfg-field input[type="number"] {
  height: var(--ctl-h); border: 1px solid var(--border); border-radius: var(--r-8, 8px); padding: 0 11px; font-size: var(--fs-13, 13px);
  font-family: inherit; background: var(--surface); color: var(--text); min-width: 280px; max-width: 100%; outline: none;
}
/* A long-text setting (type 'textarea'): the full width of the card, same chrome. */
.cfg-field textarea.cfg-textarea {
  border: 1px solid var(--border); border-radius: var(--r-8, 8px); padding: 9px 12px; font-size: var(--fs-13, 13px);
  background: var(--surface); color: var(--text); width: 100%; box-sizing: border-box;
  font-family: inherit; line-height: 1.5; resize: vertical; outline: none;
}
.cfg-field :is(input[type="text"], input[type="password"], input[type="number"], textarea.cfg-textarea):focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
/* A NUMBER setting holds a handful of digits — a count of days, a cap, a price —
   so the 280px above (sized for a URL or an API key) is a width it can never use.
   Size it to its content: four digits plus the browser's spinner. */
.cfg-field input[type="number"] { min-width: 0; width: 120px; }
.cfg-field select.input.sm { min-width: 280px; }
.cfg-field input.f-secret { font-family: var(--font-mono, monospace); }
.cfg-field .cfg-masked { font-family: var(--font-mono, monospace); font-size: var(--fs-13, 0.8rem); color: var(--pill-blue-text); background: var(--pill-blue-bg); border-radius: var(--r-6, 6px); padding: 2px 8px; }
.cfg-field .cfg-unset { font-size: var(--fs-13, 0.8rem); color: var(--pill-amber-text); background: var(--pill-amber-bg); border-radius: var(--r-6, 6px); padding: 2px 8px; }
.cfg-bool { display: inline-flex; align-items: center; gap: 0.6rem; cursor: pointer; }
/* Sliding toggle switch (matches Job Schedules), built on a real checkbox so the
   save handler keeps reading el.checked. */
.cfg-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.cfg-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.cfg-switch .slider { position: absolute; inset: 0; background: var(--border); border-radius: var(--r-12, 12px); transition: background var(--dur) var(--ease); pointer-events: none; }
.cfg-switch .slider::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: var(--surface); border-radius: 50%; transition: left var(--dur) var(--ease); box-shadow: var(--elev-1, 0 1px 3px rgba(0,0,0,0.2)); }
.cfg-switch input:checked + .slider { background: var(--green, #48bb78); }
.cfg-switch input:checked + .slider::after { left: 22px; }
.cfg-switch input:focus-visible + .slider { box-shadow: 0 0 0 3px var(--accent-soft); }
/* Per-field autosave status pill. */
.cfg-status { font-size: var(--fs-12, 0.78rem); font-weight: 600; transition: opacity var(--dur) var(--ease); }
.cfg-status[data-state="saving"] { color: var(--text-muted); }
.cfg-status[data-state="saved"]  { color: var(--success); }
.cfg-status[data-state="error"]  { color: var(--danger); }
.cfg-rowstatus { margin-left: 8px; }
/* Filter: hide non-matching fields and any group/section left empty. */
.cfg-field[hidden] { display: none; }
/* A setting locked by its PARENT switch (dependsOn in src/config/app-config.js):
   drawn off and dimmed, never hidden — you can still read what you are turning
   back on, and the note says why it is off. Toggled live by /js/config-fields.js. */
.cfg-field.is-locked > label:not(.cfg-bool), .cfg-field.is-locked .cfg-help { opacity: 0.6; }
.cfg-field.is-locked .cfg-bool { opacity: 0.6; cursor: not-allowed; }
.cfg-locked-note { display: flex; align-items: center; gap: 0.4rem; margin: 0.5rem 0 0; padding: 0.35rem 0.6rem; border-radius: var(--r-8, 8px);
  font-size: var(--fs-13, 0.82rem); color: var(--pill-amber-text); background: var(--pill-amber-bg); border: 1px solid var(--pill-amber-border); }
.cfg-locked-note[hidden] { display: none; }
.cfg-locked-note svg, .cfg-locked-note i[data-lucide] { width: 14px; height: 14px; flex-shrink: 0; }
.cfg-group.is-empty, .cfg-section.is-empty { display: none; }
/* A switch with `inline` companions (its amount, its channels — Settings → Fraud
   Checks → Order verification): ONE row per rule, wrapping on a narrow screen.
   The companions dim while the switch is off but stay editable, so the amount
   and channels are ready when it goes back on. The checkbox dropdown is the
   shared one (app.css "CHECKBOX DROPDOWN"); its toggle is matched here to the
   number box beside it. */
.cfg-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.5rem; }
.cfg-inline-ctl { display: inline-flex; align-items: center; gap: 0.5rem; }
.cfg-inline-cap { font-size: var(--fs-13, 0.83rem); color: var(--text-subtle); font-weight: 500; white-space: nowrap; }
/* Dim the caption, the box and the toggle — never the wrapper: opacity makes a
   stacking context, which would trap the open panel UNDER the next row. */
.cfg-row:has(.cfg-switch input:not(:checked)) :is(.cfg-inline-cap, .cfg-inline-ctl > input, .inv-dropdown-toggle) { opacity: 0.6; }
.cfg-inline-ctl .inv-dropdown-toggle { height: 38px; }
.cfg-channels .inv-dropdown-panel { min-width: 260px; }
/* Try-On size-field mapping table: uniform full-width dropdowns. */
.cfg-field select.cfg-tryon-cat, .cfg-field select.cfg-tryon-place { min-width: 0; width: 100%; }
.cfg-field .tablewrap td, .cfg-field .tablewrap th { vertical-align: middle; }
.cfg-field .tablewrap td:first-child { width: 26%; }
.cfg-field .tablewrap td:last-child { width: 26%; }
/* A group whose ONE editor is another page (GROUP_OWNER): listed here so the
   settings index stays complete + searchable, but linked rather than duplicated. */
.cfg-owned-list { list-style: none; margin: 0 0 0.9rem; padding: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.cfg-owned-list li { font-size: var(--fs-14, 0.88rem); color: var(--text-2); display: flex; gap: 0.45rem; align-items: baseline; flex-wrap: wrap; }
.cfg-owned-list li[hidden] { display: none; }

/* AI DEPENDENCY NOTE (partials/ai-switch-note.ejs).
   Some admin pages configure something that does nothing unless an AI switch on
   another page is on ("Enable for Autofill" on a field, "Generate this title
   with AI" on a template). The OFF case uses the canonical .message banner; this
   is only the quiet one-line ON confirmation, so the dependency is visible
   before it surprises someone rather than only after.
   The `i[data-lucide]` twin is required: the <i> is 0x0 until the deferred
   Lucide bundle swaps it for an <svg>, and :where(i[data-lucide]) reserves 24px
   — without the twin this line jumps sideways on load. */
.ai-note { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap;
           margin: -4px 0 14px; font-size: var(--fs-14, 0.85rem); color: var(--text-muted); }
.ai-note svg, .ai-note i[data-lucide] { width: 15px; height: 15px; flex-shrink: 0; }
.ai-note strong { color: var(--text-2); font-weight: 600; }


/* =====================================================================
   KPI-strip column-count modifiers — base .kpis is 4-col (above); these add
   5/6/7-col and auto-flow variants so pages express their KPI count with a
   canonical class instead of redefining .kpis inline (was done ~8 ways). All
   collapse to 2 then 1 column on narrow screens, like the base .kpis.
   ===================================================================== */
.kpis-3 { grid-template-columns: repeat(3, 1fr); }
.kpis-5 { grid-template-columns: repeat(5, 1fr); }
.kpis-6 { grid-template-columns: repeat(6, 1fr); }
.kpis-7 { grid-template-columns: repeat(7, 1fr); }
.kpis-auto { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; }
@media(max-width:1180px){ .kpis-3,.kpis-5,.kpis-6,.kpis-7 { grid-template-columns: repeat(2,1fr); } }
@media(max-width:680px){ .kpis-3,.kpis-5,.kpis-6,.kpis-7 { grid-template-columns: repeat(2,minmax(0,1fr)); } .kpis-auto { grid-auto-flow: row; grid-template-columns: repeat(2,minmax(0,1fr)); } }
/* .kpis-compact: a strip of summary tiles above a list or board, ~2/3 the scale of a
   headline .kpi (value 30→20px, padding 18→12px). The tiles fit their own columns
   (auto-fit beats the .kpis-N breakpoints above), so 4–6 tiles stay one row and
   take ~70px instead of ~100px. Inventory → Listing errors / Drift errors and the
   CRM lists use it; a dashboard's headline numbers keep the full .kpi. */
.kpis.kpis-compact { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpis-compact .kpi { padding: 12px 13px 9px; border-radius: var(--r-12, 10px); }
.kpis-compact .kpi .lbl { font-size: var(--fs-11, 11px); gap: 5px; }
.kpis-compact .kpi .lbl svg,.kpis-compact .kpi .lbl i[data-lucide] { width: 13px; height: 13px; }
.kpis-compact .kpi .val { font-size: var(--fs-20, 20px); margin-top: 5px; }
.kpis-compact .kpi :is(.sub,.t-mut) { font-size: var(--fs-12, 11.5px); margin-top: 2px; }
/* + .kpis-auto: every tile in ONE row however many there are (Repair Tickets' ten
   status tiles); a long label wraps inside its tile. A phone takes three a row. */
.kpis.kpis-compact.kpis-auto { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0,1fr); }
/* nowrap: the label TEXT wraps beside its icon (mobile.css wraps .lbl on a phone,
   which dropped "Ready for pickup" under a lone icon) */
.kpis.kpis-compact.kpis-auto .kpi .lbl { flex-wrap: nowrap; align-items: flex-start; }
.kpis-compact.kpis-auto .kpi .lbl svg,.kpis-compact.kpis-auto .kpi .lbl i[data-lucide] { flex: none; margin-top: 1px; }
@media (max-width:680px){ .kpis.kpis-compact.kpis-auto { grid-auto-flow: row; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; } }
/* skeleton tiles at the same scale; heights come from the lone-bar rule */
.kpis-compact .kpi-skel .lbl .skel-bar { width: 62%; height: 10px; }
.kpis-compact .kpi-skel .val .skel-bar { width: 44%; height: 16px; }

/* AI Fill: highlight inputs the AI just pre-filled so the operator reviews them
   before saving. Token-driven (accent), so it reads in both themes. The class is
   removed by the normal field styling once the operator edits/saves. */
.ai-filled,
input.ai-filled,
select.ai-filled,
textarea.ai-filled {
  background: var(--accent-soft) !important;
  box-shadow: inset 3px 0 0 0 var(--accent);
}

/* =====================================================================
   CATEGORY CHANGE (product page) — picking another category previews what
   changes (.move-plan). Custom attributes then show the suggested title
   (.ca-title), every value saved before with the field it goes in (.ca-source),
   and the new category's fields empty, with a box under a field a saved value
   points at (.ca-suggest). Token-driven, both themes.
   ===================================================================== */
.ca-move-banner{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px}
.ca-move-banner .ca-move-text{flex:1 1 320px;min-width:0;font-weight:400}
.ca-group-note{margin:0 0 8px;font-size:var(--fs-12, 12.5px)}
.ca-suggest{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;margin-top:6px;padding:6px 8px 6px 10px;border:1px solid var(--accent-border);border-radius:var(--r-8, 8px);background:var(--accent-soft);color:var(--text);font-size:var(--fs-13, 13px);line-height:1.35;min-width:0}
.ca-suggest-from{color:var(--text-muted);font-size:var(--fs-12, 12px)}
.ca-suggest-val{font-weight:600;overflow-wrap:anywhere;min-width:0}
.ca-suggest > .btn{margin-left:auto}
/* A value that can't go in (not one of the dropdown's options): neutral and
   dashed, so it never reads like the accent box that offers Use. */
.ca-suggest.no-fit{background:var(--surface-2);border-style:dashed;border-color:var(--border-strong)}
/* The title and "Saved for …" cards take the whole row of the 2-column
   #custom-attrs-fields grid — half width squeezed the table into broken words. */
.ca-title,.ca-source{grid-column:1/-1}
.ca-source-table td{vertical-align:middle}
.ca-source-table td.wrap-cell{word-break:normal;overflow-wrap:break-word;min-width:7rem}
.ca-source-table .input.sm{max-width:240px}
.ca-title-row{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;padding:4px 0}
.ca-title-lbl{flex:0 0 190px;color:var(--text-muted);font-size:var(--fs-12, 12.5px)}
.ca-title-text{overflow-wrap:anywhere;min-width:0}
.move-plan{display:flex;flex-direction:column;gap:16px}
.move-plan h3{margin:0 0 6px;font-family:var(--font-display);font-size:var(--fs-14, 14px);font-weight:600;letter-spacing:-.02em}
.move-plan p{margin:0 0 6px}
.move-plan-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.move-plan-list li{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px}
@media(max-width:560px){ .ca-title-lbl{flex-basis:100%} }

/* Chooser tiles — a reusable "how do you want to do this?" grid for modals
   (e.g. the purchase-order Add-item chooser: blank vs from-inventory). Mirrors the
   tray Add-item tiles but lives here so any operator page can use it. */
.chooser-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 4px;
}
.chooser-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 26px 18px;
  background: var(--surface);
  border: 1.25px solid var(--border);
  border-radius: var(--r-12, 12px);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), transform var(--dur-instant) var(--ease);
}
.chooser-tile:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.chooser-tile:active { transform: translateY(1px); }
.chooser-tile-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--pill-blue-bg);
  color: var(--pill-blue-text);
}
.chooser-tile-icon svg,.chooser-tile-icon i[data-lucide] { width: 23px; height: 23px; }
.chooser-tile-title { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; color: var(--text); }
.chooser-tile-desc { font-size: var(--fs-13, .82rem); line-height: 1.35; color: var(--text-muted); }



/* Inline links inside rendered detail text (e.g. the alerts page's linkified
   order paths). The global a{color:inherit;text-decoration:none} reset makes
   such links invisible — this utility restores a visible, theme-aware link. */
.linkified a{color:var(--accent);text-decoration:underline;text-underline-offset:2px}
.linkified a:hover{opacity:.85}

/* Listing Specifics → package (shipping) dimensions, on a row of their own: two
   groups, Size (L × W × H + unit) and Weight (+ unit), side by side and wrapping
   where there is no room (edit-panels.css lays out the inside of a group).
   grid-column:1/-1 makes the wrapper span the full panel row when it sits inside
   a CSS-grid panel (tray/review/fixing); when the parent isn't a grid it simply
   falls back to a full-width block, still a new row. */
.package-dims-row{
  grid-column:1 / -1;
  min-width:0;
  display:flex;
  flex-wrap:wrap;
  gap:.7rem 1.75rem;
  align-items:flex-end;
}

/* ===== Entity timeline ======================================================
   ONE chronological feed of everything that happened with a record (built for
   the CRM customer 360; reuse it for any entity that grows a history). Shared
   chrome — never re-implement this per page. Kind colours reuse the pill
   palette, so a timeline dot and that record's pill read as the same thing.

   <ol class="timeline">
     <li class="tl-item">
       <span class="tl-dot k-order"><i data-lucide="shopping-bag"></i></span>
       <div class="tl-main">
         <div class="tl-head"><span class="tl-title">…</span><span class="tl-when">…</span></div>
         <div class="tl-detail">…</div><div class="tl-meta">…</div>
       </div>
     </li>
   </ol>                                                                     */
.timeline{list-style:none;margin:0;padding:2px 0 0;position:relative}
/* The rail sits under the dots (they paint over it at z-index 1). */
.timeline::before{content:"";position:absolute;left:12px;top:8px;bottom:8px;width:2px;background:var(--border-light)}
.tl-item{position:relative;display:grid;grid-template-columns:26px minmax(0,1fr);gap:12px;padding-bottom:16px}
.tl-item:last-child{padding-bottom:0}
.tl-dot{position:relative;z-index:1;width:26px;height:26px;border-radius:50%;display:flex;
  align-items:center;justify-content:center;background:var(--gray-bg);color:var(--gray);
  border:2px solid var(--surface)}
.tl-dot svg,.tl-dot i[data-lucide]{width:14px;height:14px}
.tl-main{min-width:0}
.tl-head{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.tl-title{font-size:var(--fs-14, 13.5px);font-weight:600;color:var(--text)}
.tl-title a{color:var(--text)}
.tl-title a:hover{color:var(--accent)}
.tl-when{font-family:var(--font-mono);font-size:var(--fs-11, 11px);color:var(--text-muted);white-space:nowrap}
/* pre-wrap so a pasted note keeps its line breaks; anywhere so a long id or URL
   can't widen the card (see the .split minmax(0,1fr) note above). */
.tl-detail{margin-top:3px;font-size:var(--fs-12, 12.5px);color:var(--text-subtle);white-space:pre-wrap;overflow-wrap:anywhere}
.tl-meta{margin-top:3px;font-size:var(--fs-12, 11.5px);color:var(--text-muted)}
.tl-dot.k-note{background:var(--amber-bg);color:var(--amber)}
.tl-dot.k-order{background:var(--green-bg);color:var(--green)}
.tl-dot.k-return{background:var(--red-bg);color:var(--red)}
.tl-dot.k-consignment{background:var(--violet-bg);color:var(--violet)}
.tl-dot.k-repair{background:var(--blue-bg);color:var(--blue)}
.tl-dot.k-lead{background:var(--blue-bg);color:var(--blue)}
.tl-dot.k-message{background:var(--gray-bg);color:var(--gray)}
.tl-dot.k-search_request{background:var(--amber-bg);color:var(--amber)}
.tl-dot.k-consent{background:var(--violet-bg);color:var(--violet)}
.tl-dot.k-marketing{background:var(--blue-bg);color:var(--blue)}
.tl-dot.k-social{background:var(--violet-bg);color:var(--violet)}
.tl-dot.k-address{background:var(--gray-bg);color:var(--gray)}
.tl-dot.k-occasion{background:var(--violet-bg);color:var(--violet)}
.tl-dot.k-customer{background:var(--accent-soft);color:var(--accent)}
.tl-dot.k-circle{background:var(--blue-bg);color:var(--blue)}
/* The scroll box for a feed that sits ABOVE a compose field in a modal (the
   notes modals). Its height is FIXED, not content-derived, and that is the whole
   point: the feed arrives from a fetch, so a box sized by its contents opens at
   the height of the loading skeleton and then jumps to the height of the notes —
   the dialog visibly resizing under the cursor. A constant box is the same size
   from the first paint, whatever lands in it (skeleton, notes, or the empty
   state — which must live INSIDE it for the same reason). It also keeps the
   compose field reachable: a long history scrolls here instead of pushing the
   field it belongs to below the fold. */
.notes-feed{height:min(340px,40vh);overflow-y:auto;margin-bottom:1rem;padding-right:4px}
/* Done under a note that @-mentions the reader (/js/notes-modal.js, src/notes/mentions.js). */
.notes-feed .notes-mention-done{margin-top:6px}
/* MODAL FORM FIELD — the bold question-style label and the full-width control
   under it, in the tray editor's modals (Assign Task, Skip, Add Item…) and in
   THE Notes window (partials/notes-modal), which every page with notes shares —
   a tray, a purchase, a trade-in, a consignment and the reports that open them.
   Lived in edit-panels.css until the Notes window left the tray pages. */
.consignment-question{display:block;margin:.25rem 0 .5rem;font-size:var(--fs-16, 1rem);font-weight:600;color:var(--text)}
.consignment-input{width:100%;padding:.7rem .85rem;font-family:inherit;font-size:var(--fs-16, 1rem);border:1px solid var(--border-subtle);border-radius:var(--r-8, 8px);box-sizing:border-box;transition:border-color var(--dur-fast) var(--ease),box-shadow var(--dur-fast) var(--ease)}
.consignment-input:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-focus-ring)}

/* ===== Authored notes on a record ==========================================
   Free text a colleague wrote, so the byline and the edited marker are part of
   the component — an unattributed note is worth much less than an attributed
   one. A pinned note says so with a "Pinned" .pill in its meta row, never a
   coloured edge.                                                             */
.note-list{display:flex;flex-direction:column;gap:10px}
.note{background:var(--surface-2);border:1px solid var(--border-light);
  border-radius:var(--radius-sm);padding:10px 12px}
.note-body{font-size:var(--fs-13, 13px);color:var(--text);white-space:pre-wrap;overflow-wrap:anywhere}
.note-meta{display:flex;align-items:center;gap:8px;margin-top:7px;font-size:var(--fs-12, 11.5px);color:var(--text-muted)}
.note-meta .spacer{flex:1}
/* A note written from the Inbox links to the conversation it was written in (CRM → Customers, Notes). */
.note-meta .note-source{display:inline-flex;align-items:center;gap:4px;color:var(--accent);text-decoration:none;max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.note-meta .note-source svg,.note-meta .note-source i[data-lucide]{width:12px;height:12px}
.note-edit{width:100%;min-height:70px;resize:vertical}

/* ===== A logged value inside a change/audit log table =====================
   One recorded value (an old/new field value, an error reason) in a log row.
   Capped so a single enormous entry scrolls in its own box instead of
   stretching the row past the rest of the table. Shared by the tray Change Log
   modal and the inventory Listing-error History modal.                      */
.log-value{max-height:100px;overflow-y:auto;white-space:pre-wrap;word-break:break-all}

/* ===== Choice list (pick one of N records) ================================
   A radio list where each option is a card: a title line plus supporting
   detail. Used by the consignment intake's "which of this customer's
   addresses?" dialog; reach for it whenever the operator must pick one record
   out of a handful rather than type it again.                               */
.choice{display:flex;flex-direction:column;gap:8px}
.choice-opt{display:flex;gap:10px;align-items:flex-start;padding:11px 13px;cursor:pointer;
  border:1px solid var(--border);border-radius:var(--r-12, 10px);background:var(--surface);transition:var(--dur-fast) var(--ease)}
.choice-opt:hover{border-color:var(--border-strong);background:var(--surface-2)}
.choice-opt:has(input:checked){border-color:var(--accent);background:var(--accent-soft)}
.choice-opt input:is([type=radio],[type=checkbox]){margin:2px 0 0;accent-color:var(--accent);flex:0 0 auto}
.choice-opt .co-body{min-width:0;flex:1}
.choice-opt .co-title{font-size:var(--fs-13, 13px);font-weight:600;color:var(--text);
  display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.choice-opt .co-sub{font-size:var(--fs-12, 12px);color:var(--muted);margin-top:2px;line-height:1.5}
/* Three choices SIDE BY SIDE when they fit (the field kind on Settings → panel
   fields); they stack on their own under 760px. */
.choice.choice-row{flex-direction:row;flex-wrap:wrap}
.choice.choice-row>.choice-opt{flex:1 1 220px}
/* A row of choice tiles under a card's fields keeps the grid's gap above it. */
.field-grid + .choice{margin-top:14px}
/* A sentence that introduces a padded card's fields, right under its head. */
.pad > .card-head + p{margin:0 0 14px}
.choice-opt:has(input:disabled){opacity:.55;cursor:default}
/* A row of plain tick boxes under a form's fields, and a row of row actions
   (Settings → panel fields; the prototype the owner approved 2026-10-11). */
.checks{display:flex;flex-wrap:wrap;gap:10px 18px;margin:14px 0 4px;align-items:center}
.checks>label{display:inline-flex;gap:7px;align-items:center;font-size:var(--fs-14, 13.5px);color:var(--text)}
.checks input[type=checkbox]{accent-color:var(--accent);margin:0}
/* THE field form (partials/field-form — Settings → panel fields: Add a field AND Edit
   field, so its few rules live here, not in one page's sheet; they were inline
   style="" attributes until the Admin look pass, 2026-10-22). */
.field-form > .choice-row{margin-bottom:16px}
.field-form .ff-kind-note{margin:-8px 0 14px}
/* (as specific as the .field input rule that makes every field input full width) */
.field-form .field input.ff-tech-input.input:not([type=hidden]){display:inline-block;width:auto;min-width:min(160px,100%)}
.field-form > .ff-help-field,.field-form > .ff-fixed-field{margin-top:12px}
.acts{display:flex;gap:4px;justify-content:flex-end;align-items:center}
/* a <td> is never the flex box itself (that breaks the table) — td.acts-cell > .acts */
td.acts-cell{text-align:right;white-space:nowrap}
/* The buttons that end a form (Cancel · Save): one row, right-aligned, the primary
   LAST. A page never re-styles it. */
.form-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px;flex-wrap:wrap;margin-top:18px}
.legend{display:flex;gap:10px;flex-wrap:wrap;align-items:center;font-size:var(--fs-12, 12.5px);color:var(--muted)}

/* ===== CRM customer picker (shared typeahead) =============================
   The "link this record to a CRM customer" control: a search input whose
   results drop down beneath it, and a chip showing the linked customer.
   Used by the consignment intake form (/consignments/new); the older
   per-page copies (search requests, consignment list modal) migrate onto
   these classes as they're touched.                                        */
.cust-picker{position:relative}
.cust-results{position:absolute;z-index:40;left:0;right:0;margin-top:4px;
  border:1px solid var(--border);border-radius:var(--r-8, 8px);background:var(--surface);
  box-shadow:var(--elev-3, 0 8px 24px rgba(16,42,94,.12));display:none;max-height:240px;overflow-y:auto}
.cust-results.open{display:block}
.cust-opt{padding:8px 11px;cursor:pointer;border-bottom:1px solid var(--border);
  display:flex;flex-direction:column;gap:2px}
.cust-opt:last-child{border-bottom:0}
/* A result with a photo (the trade-in's inventory search): the photo on the left,
   the name and its line beside it — the column above stacked them, centred. */
.cust-opt.has-thumb{flex-direction:row;align-items:center;gap:10px}
.cust-opt.has-thumb>.thumb-zoom{flex:none}
.cust-opt-text{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.cust-opt:hover,.cust-opt.active{background:var(--surface-2)}
.cust-opt .nm{color:var(--text);font-size:var(--fs-13, 13px);font-weight:500}
.cust-opt .sub,.cust-empty{color:var(--muted);font-size:var(--fs-12, 12px)}
.cust-empty{padding:9px 11px}
.cust-selected{display:flex;align-items:center;gap:10px;border:1px solid var(--border);
  border-radius:var(--r-8, 9px);background:var(--surface-2);padding:8px 11px}
.cust-selected[hidden]{display:none}
.cust-selected .nm{font-weight:600;font-size:var(--fs-13, 13px);color:var(--text)}
.cust-selected .sub{color:var(--muted);font-size:var(--fs-12, 12px)}
.cust-selected i[data-lucide]{color:var(--green,var(--accent));flex:0 0 auto}
/* The linked customer opens their CRM record (a new tab). Only an <a> WITH an
   href is a link — the form leaves it off for a viewer without CRM access, and
   the chip then reads as plain text. */
.cust-selected .cust-open{display:flex;align-items:center;gap:10px;min-width:0;border-radius:var(--r-6, 6px)}
.cust-selected .cust-open .meta{display:flex;flex-direction:column;gap:1px;min-width:0}
.cust-selected .cust-open[href]:hover .nm{color:var(--link);text-decoration:underline}
.cust-selected .cust-open:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* ===== Audit / history list (canonical) ==================================
   The "who changed what, when" list shown in a report's History modal —
   consignments + trade-ins. `.audit-scope` names the item (or the record
   itself) an entry belongs to. `tr.row-clickable` is a table row that opens
   the record on click. */
.audit-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:8px}
.audit-row{border:1px solid var(--border);border-radius:var(--r-8, 8px);padding:.6rem .8rem;background:var(--surface);font-size:var(--fs-14, .85rem)}
.audit-row .audit-when{color:var(--muted);font-size:var(--fs-12, .78rem)}
.audit-row .audit-who{font-weight:600;color:var(--text)}
.audit-row .audit-field{font-family:var(--font-mono);color:var(--accent);font-size:var(--fs-13, .82rem)}
.audit-row .audit-old{color:var(--red);text-decoration:line-through;margin-right:6px}
.audit-row .audit-new{color:var(--green);font-weight:600}
.audit-row .audit-scope{font-family:var(--font-mono);font-size:var(--fs-12, .75rem);background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-6, 5px);padding:1px 5px;margin-right:6px;color:var(--muted)}
.table tbody tr.row-clickable{cursor:pointer}
.table tbody tr.row-clickable:hover{background:var(--surface-2)}
/* A clickable row reached by Tab (tabindex="0", opened with Enter) shows where the focus is. */
.table tbody tr.row-clickable:focus-visible{outline:2px solid var(--accent);outline-offset:-2px;background:var(--surface-2)}
/* Two-line customer cell: name, then the e-mail in muted small type. */
.customer-cell .name{font-weight:600;color:var(--text);display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.customer-cell .contact{display:block;color:var(--muted);font-size:var(--fs-12, .78rem);margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* The ellipsis above does NOTHING without a cap: a display:block child just takes
   the cell's auto width, so the column grew to the longest e-mail on the page.
   The cap is viewport-relative on purpose — a wide monitor gets more characters
   before the … appears, a laptop keeps the column narrow — because a fixed px cap
   would clip the same name identically on a 27" screen with room to spare.
   The trailing `- 3ch` is a character-count trim, not a pixel one: this column was
   tuned by how many characters fit, so it shrinks by three glyphs at whatever font
   size the line is drawn at (the name 13px, the e-mail .78rem). Adjust THAT number
   to take more or fewer characters off; leave the clamp for how it tracks the screen. */
.customer-cell .name,
.customer-cell .contact{max-width:calc(clamp(130px,12vw,210px) - 3ch)}
/* A short fact under any cell's value, on its own line — the same muted small
   type as the customer cell's e-mail (the Purchases list: "Item" / "Mail-in"). */
.cell-sub{display:block;color:var(--muted);font-size:var(--fs-12, .78rem);margin-top:2px;white-space:nowrap}

/* ===== Image tiles + upload row (canonical) ===============================
   The square-thumbnail grid with a floating remove button and an Upload row
   beneath it — the product page's image UI. Promoted here from inventory.css
   the moment a second page needed it (consignment intake: ID photo + item
   photos). Drag-reorder + video-play affordances stay in inventory.css —
   they're product-page-specific. `.sm` caps tiles at 132px for single-photo
   widgets inside a form column. */
.inv-image-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:0.75rem}
.inv-image-grid.sm{grid-template-columns:repeat(auto-fill,132px)}
.inv-image-grid[hidden]{display:none}
.inv-image-tile{position:relative;aspect-ratio:1;border:1.25px solid var(--border);
  border-radius:var(--r-12, 10px);overflow:hidden;
  background:linear-gradient(135deg,var(--surface-2),var(--surface-3));
  box-shadow:var(--elev-1, 0 1px 3px rgba(16,42,94,0.05))}
.inv-image-tile img{width:100%;height:100%;object-fit:cover;display:block;cursor:pointer}
.inv-image-tile .inv-image-placeholder{position:absolute;inset:0;
  display:flex;align-items:center;justify-content:center;
  color:var(--text-faint);font-size:var(--fs-13, 0.8rem);text-align:center;padding:0.5rem;word-break:break-all}
.inv-image-tile .inv-image-remove{position:absolute;top:6px;right:6px;width:26px;height:26px;
  background:var(--overlay);color:var(--text-inverse);border:none;border-radius:var(--r-full, 999px);cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  padding:0;font-size:0;line-height:0;transition:background var(--dur-fast) var(--ease)}
.inv-image-tile .inv-image-remove:hover{background:var(--danger)}
.inv-image-tile .inv-image-remove svg,.inv-image-tile .inv-image-remove i[data-lucide]{width:14px;height:14px}
.inv-image-add{display:flex;gap:0.5rem;margin-top:0.3rem;align-items:center}
/* The hidden ATTRIBUTE must always win on these components. Their author
   display rules (grid/flex above) silently defeated it — the UA's
   [hidden]{display:none} loses to any author display — so el.hidden=true left
   the consignment form's remove button (and the upload row) fully visible. */
.inv-image-grid[hidden],.inv-image-add[hidden],.inv-image-tile .inv-image-remove[hidden]{display:none}
.inv-image-add input{flex:1}

/* ===== Auto-growing single-line field (/js/autogrow.js) ===================
   A text input whose value is wider than its box is upgraded in place to a
   textarea that WRAPS instead of clipping, so a long value is fully readable
   without the operator dragging through the field. It must read as the same
   control it replaced: no resize grip, no scrollbar, no min-height of its own
   — the height is measured from the content and written inline by the script,
   so this only has to get out of its way. Last in the file so it wins over
   `.field textarea` / `textarea.input` (same specificity) on any page.      */
/* The attribute is doubled deliberately: page sheets load AFTER app.css, so a
   plain `textarea[data-autogrown]` would lose to any page's generic
   `.card textarea{resize:vertical}` and the field would grow a resize grip it
   must not have. */
textarea[data-autogrown][data-autogrown]{
  resize:none;overflow:hidden;min-height:0;
  white-space:pre-wrap;overflow-wrap:break-word}
/* A canonical field (.input / inside a .field) is one control row tall —
   --ctl-h, or the 36px a finger gets (mobile.css 7c sets --ag-row-h). The
   textarea vocab gives it `padding:9px 12px;line-height:1.5` (a notes box), so
   one grown row came out ~40px beside a 30-32px select or number field in the
   same .field-grid row (Sourcing request, 2026-10-13). Centre ONE line in the
   input's height instead; more lines just add line height. */
.field textarea[data-autogrown][data-autogrown],textarea.input[data-autogrown][data-autogrown]{
  line-height:1.4;padding:calc((var(--ag-row-h,var(--ctl-h)) - 2px - 1lh) / 2) 11px}

/* CoPilot chat: a customer message the model DRAFTED and the operator must approve.
   The model cannot send; the button is the only send path (pending-sends.js).
   Draft / Sent is the .sw-send-state pill in the head, not a coloured edge. */
.sw-send-card { margin-top: 10px; border: 1px solid var(--border); border-radius: var(--r-8, 8px); background: var(--surface-2); padding: 10px 12px; }
.sw-send-card.sent { opacity: .85; }
.sw-send-head { font-weight: 600; font-size: var(--fs-13, 13px); display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.sw-send-head .sw-send-state { margin-left: auto; }
.sw-send-meta { font-size: var(--fs-12, 12px); color: var(--text-muted); margin-top: 2px; }
.sw-send-warn { font-size: var(--fs-12, 12px); color: var(--danger); margin-top: 6px; }
.sw-send-body { white-space: pre-wrap; font-family: var(--font-body); font-size: var(--fs-13, 13px); margin: 8px 0; padding: 8px 10px; background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--r-6, 6px); max-height: 220px; overflow: auto; }

/* Release notes — Console → Release notes (views/console/release-notes.ejs, from
   docs/release-notes.md). One section per release, newest first: the date (.t-cap),
   the release's name, then its notes. The notes are server-rendered markdown, so the
   list chrome is set here rather than on each <li>. */
.whats-new-release + .whats-new-release { margin-top:18px; padding-top:16px; border-top:1px solid var(--border-light); }
.whats-new-title { margin:2px 0 10px; font-family:var(--font-display); font-size:var(--fs-15, 15px); font-weight:600;
  letter-spacing:-.02em; color:var(--text-strong); }
.whats-new-head > .t-cap:last-child { margin-bottom:8px; }
/* A release's date and name stay on top while its notes pass under them (scroll motion — owner,
   2026-11-14, the "Sellevry Scroll Motion" mock), until its section ends and the next one takes over.
   Frosted like the top bar while held there (.is-stuck, /js/pages/console-release-notes.js); the frost
   is a layer of its own, reaching the card's edges. Tested by src/console/release-notes-sticky.browser.test.js. */
.whats-new-head { position:sticky; top:calc(var(--topbar-h) + 8px); z-index:2; margin:0 calc(-1 * var(--box-pad)); padding:0 var(--box-pad); }
.whats-new-head::before { content:""; position:absolute; inset:-8px 0 -8px; z-index:-1; pointer-events:none;
  background:var(--topbar-glass); -webkit-backdrop-filter:var(--glass-bar-filter, saturate(1.6) blur(16px)); backdrop-filter:var(--glass-bar-filter, saturate(1.6) blur(16px));
  box-shadow:0 1px 0 var(--border-light); opacity:0; transition:opacity var(--dur-fast) var(--ease); }
.whats-new-head.is-stuck::before { opacity:1; }
.whats-new-notes ul { margin:0; padding-left:18px; }
.whats-new-notes li { margin:0 0 10px; line-height:1.5; color:var(--text-2); }
.whats-new-notes li:last-child { margin-bottom:0; }
.whats-new-notes li::marker { color:var(--muted); }
.whats-new-notes strong { color:var(--text-strong); font-weight:600; }
.whats-new-notes p { margin:0 0 8px; }
.whats-new-notes a { color:var(--accent); }

/* ===================== CALENDAR =====================
   My Work → Calendar (month / week / list), CRM → Calendar (+ day), the
   calendar modals (partials/calendar-modals.ejs) and the CRM customer page's
   Appointments card.
   Driven by /js/calendar.js. Entry colours reuse the .pill tone tokens, so a
   chip reads exactly like a pill of the same tone in both themes. */

/* Small shared utilities the calendar needed and nothing provided yet. */
.field[hidden],.chip[hidden],.field-grid[hidden]{display:none}
/* A link inside an empty state (e.g. "add them under Settings → Calendar") must read as one. */
.empty a:not(.btn,.list-row){color:var(--accent);text-decoration:underline}
.field-grid>.field.wide{grid-column:1/-1}
.card-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}
/* A picker in a card's action row ("Add a person…") is as wide as its words, not the card. */
.card-actions>select.input{width:auto;min-width:200px;max-width:100%}
/* EBAY CATEGORY PICKER — eBay's own category search as you type: a list of hits under the
   search box, each the category's name over its path and number (the listing template
   editor's eBay category; Console → Prospects → Research). */
.cat-results{display:flex;flex-direction:column;gap:4px;max-height:260px;overflow:auto}
.cat-results:empty{display:none}
.cat-hit{display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:left;border:1px solid var(--border-light);border-radius:var(--r-8, 8px);background:var(--surface);padding:8px 10px;cursor:pointer;color:var(--text);font:inherit}
.cat-hit:hover,.cat-hit:focus-visible{background:var(--accent-soft);border-color:var(--accent-border,var(--border))}
.cat-hit b{color:var(--text-strong)}
.cat-hit span{font-size:var(--fs-12, 12px);color:var(--muted)}
/* COLLAPSIBLE CARD — a card whose body most visits never need (Settings → Twilio's
   steps for connecting a number by hand):
   <details class="card pad"><summary class="card-head"><h3>…</h3>
   <i data-lucide="chevron-down" class="card-chevron"></i></summary>…</details> */
details.card>summary.card-head{cursor:pointer;list-style:none}
details.card>summary.card-head::-webkit-details-marker{display:none}
details.card:not([open])>summary.card-head{border-bottom:0;margin-bottom:0;padding-bottom:0}
.card-chevron{width:16px;height:16px;flex:none;color:var(--muted);transition:rotate var(--dur) var(--ease)}
details.card:not([open]) .card-chevron{rotate:-90deg}
tr.is-muted td{opacity:.55}

.cal-toolbar{gap:10px}
.cal-title{font-family:var(--font-display);font-size:var(--fs-17, 17px);font-weight:600;letter-spacing:-.02em;margin:0;min-width:180px;color:var(--text)}
.cal-card{overflow:hidden}
.cal-overdue{margin-bottom:14px}
.cal-overdue[hidden]{display:none}
.cal-tz-note,.cal-empty-note{font-size:var(--fs-12, 12px);margin:10px 2px 0}
.cal-empty-note{padding:0 14px 14px}

/* Tones: text + fill from the pill tokens. */
.cal-chip,.cal-block,.cal-row-icon{color:var(--gray-text);background:var(--gray-bg)}
.cal-chip.blue,.cal-block.blue,.cal-row-icon.blue{color:var(--blue-text);background:var(--blue-bg)}
.cal-chip.amber,.cal-block.amber,.cal-row-icon.amber{color:var(--amber-text);background:var(--amber-bg)}
.cal-chip.red,.cal-block.red,.cal-row-icon.red{color:var(--red-text);background:var(--red-bg)}
.cal-chip.violet,.cal-block.violet,.cal-row-icon.violet{color:var(--violet);background:var(--violet-bg)}
.cal-chip.green,.cal-block.green,.cal-row-icon.green{color:var(--green-text);background:var(--green-bg)}
.cal-chip.is-done,.cal-block.is-done{opacity:.55;text-decoration:line-through}
/* Overdue: a red dot (the pill's .pd) at the chip's end / the block's top-right corner, never an edge. */
.cal-chip.is-overdue::after,.cal-block.is-overdue::after{content:"";width:6px;height:6px;border-radius:50%;background:var(--red);flex:0 0 auto}
.cal-chip.is-overdue::after{margin-left:auto}
.cal-block.is-overdue::after{position:absolute;top:5px;right:5px}

/* Month */
.cal-month{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}
.cal-dow{padding:8px 10px;font-size:var(--fs-11, 11px);font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);border-bottom:1px solid var(--border);background:var(--surface-2)}
.cal-cell{min-height:118px;padding:6px;border-right:1px solid var(--border-light);border-bottom:1px solid var(--border-light);display:flex;flex-direction:column;gap:3px;min-width:0}
.cal-cell:nth-child(7n+7){border-right:0}
.cal-cell.is-other{background:var(--surface-2)}
.cal-cell.is-other .cal-date{color:var(--muted)}
.cal-date{align-self:flex-start;min-width:26px;height:26px;padding:0 6px;border-radius:var(--r-12, 13px);border:0;background:transparent;color:var(--text);font-family:var(--font-display);font-size:var(--fs-13, 13px);font-weight:600;cursor:pointer}
.cal-date:hover{background:var(--surface-3)}
.cal-cell.is-today .cal-date{background:var(--accent);color:var(--on-brand)}
.cal-chip{display:flex;align-items:center;gap:5px;width:100%;min-width:0;height:22px;padding:0 6px;border:0;border-radius:var(--r-6, 6px);font-size:var(--fs-12, 12px);font-weight:500;text-align:left;cursor:pointer}
.cal-chip svg,.cal-chip i[data-lucide]{width:12px;height:12px;flex:0 0 auto}
.cal-chip:hover{filter:brightness(.96)}
.cal-chip-time{font-family:var(--font-mono);font-size:var(--fs-11, 11px);flex:0 0 auto}
.cal-chip-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text)}
.cal-more{align-self:flex-start;border:0;background:transparent;color:var(--muted);font-size:var(--fs-12, 11.5px);font-weight:600;padding:1px 6px;cursor:pointer;border-radius:var(--r-6, 6px)}
.cal-more:hover{color:var(--text);background:var(--surface-3)}
.cal-skel{height:18px;border-radius:var(--r-6, 6px)}

/* Week */
.cal-week{--cal-hour:44px;display:flex;flex-direction:column;min-width:0;overflow-x:auto}
.cal-week-row{display:grid;grid-template-columns:52px repeat(var(--cal-days,7),minmax(96px,1fr))}
/* CRM → Calendar's Day: the week's grid with one column. The day is the bar's title, so its
   column is not tinted as today, and an empty day says so in the middle of its hours. */
.cal-card{position:relative}
.cal-week.is-day .cal-col.is-today{background:none}
.cal-week.is-day ~ .cal-day-empty{position:absolute;left:52px;right:0;top:42%;display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center;font-size:var(--fs-13, 13px);pointer-events:none}
.cal-allday-empty{display:inline-flex;align-items:center;gap:8px;padding:4px 6px;font-size:var(--fs-13, 13px);color:var(--text-muted)}
.cal-allday-empty svg,.cal-allday-empty i[data-lucide]{width:15px;height:15px}
.cal-now{position:absolute;left:0;right:0;z-index:2;border-top:1.5px solid var(--red-text);pointer-events:none}
.cal-now::before{content:"";position:absolute;left:-4px;top:-4.5px;width:7px;height:7px;border-radius:50%;background:var(--red-text)}
.cal-gutter{font-size:var(--fs-11, 11px);color:var(--muted);padding:6px 6px 0 0;text-align:right}
.cal-week-head{border-bottom:1px solid var(--border);background:var(--surface-2)}
.cal-week-day{display:flex;align-items:baseline;justify-content:center;gap:6px;padding:8px 4px;border:0;background:transparent;color:var(--text-2);font-size:var(--fs-12, 12px);cursor:pointer}
.cal-week-day b{font-family:var(--font-display);font-size:var(--fs-16, 16px);color:var(--text)}
.cal-week-day:hover{background:var(--surface-3)}
.cal-week-day.is-today b{color:var(--accent)}
.cal-week-allday{border-bottom:1px solid var(--border)}
.cal-week-allday .cal-gutter{padding-top:8px}
.cal-allday-cell{display:flex;flex-direction:column;gap:3px;padding:4px;min-height:34px;border-left:1px solid var(--border-light);min-width:0}
.cal-week-body{position:relative}
.cal-hours{padding:0}
.cal-hour{height:var(--cal-hour);padding-right:6px;transform:translateY(-6px)}
.cal-hour:first-child{transform:none}
.cal-col{position:relative;height:calc(var(--cal-hour) * var(--cal-hours));border-left:1px solid var(--border-light);background-image:linear-gradient(to bottom,var(--border-light) 1px,transparent 1px);background-size:100% var(--cal-hour)}
.cal-col.is-today{background-color:var(--accent-soft)}
.cal-block{position:absolute;display:flex;flex-direction:column;align-items:flex-start;gap:1px;padding:3px 6px;border:0;border-radius:var(--r-6, 6px);overflow:hidden;text-align:left;cursor:pointer;font-size:var(--fs-12, 11.5px);border-left:1px solid var(--surface)}
.cal-block:hover{filter:brightness(.96);z-index:2}
.cal-block-time{font-family:var(--font-mono);font-size:var(--fs-11, 10.5px);white-space:nowrap}
.cal-block-title{color:var(--text);font-weight:600;line-height:1.25;overflow:hidden}
.cal-block.is-short{flex-direction:row;align-items:center;gap:6px;padding-top:0;padding-bottom:0}
.cal-block.is-short .cal-block-title{white-space:nowrap;text-overflow:ellipsis;min-width:0}
.cal-settings-switch{margin:4px 0 14px}

/* List */
.cal-agenda{display:flex;flex-direction:column}
.cal-agenda-day+.cal-agenda-day{border-top:1px solid var(--border)}
.cal-agenda-date{display:flex;align-items:center;gap:8px;padding:12px 16px 4px;font-family:var(--font-display);font-size:var(--fs-14, 13.5px);font-weight:600;color:var(--text)}
.cal-row{display:grid;grid-template-columns:150px 30px minmax(0,1fr) auto;align-items:center;gap:12px;width:100%;padding:8px 16px;border:0;background:transparent;text-align:left;cursor:pointer;color:var(--text)}
.cal-row:hover{background:var(--surface-2)}
.cal-row-time{font-family:var(--font-mono);font-size:var(--fs-12, 12px);color:var(--text-2);white-space:nowrap}
.cal-row-icon{width:30px;height:30px;border-radius:var(--r-8, 8px);display:grid;place-items:center}
.cal-row-icon svg,.cal-row-icon i[data-lucide]{width:15px;height:15px}
.cal-row-main{display:flex;flex-direction:column;min-width:0}
.cal-row-title{font-weight:600;font-size:var(--fs-14, 13.5px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cal-row-sub{font-size:var(--fs-12, 12px);color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Modals + the CRM card */
.cal-facts{display:grid;grid-template-columns:120px minmax(0,1fr);gap:9px 16px;margin:0 0 12px;font-size:var(--fs-14, 13.5px)}
.cal-facts dt{color:var(--muted);font-weight:500}
.cal-facts dd{margin:0;color:var(--text);overflow-wrap:anywhere}
.cal-inline-icon{width:14px;height:14px;vertical-align:-2px}
.cal-feed-howto{margin:10px 0 0;padding-left:18px;font-size:var(--fs-13, 13px);color:var(--text-2);display:flex;flex-direction:column;gap:4px}
.cal-allday-check{align-self:end;min-height:36px}
tr.cal-link-row{cursor:pointer}
tr.cal-link-row:hover td{background:var(--surface-2)}

/* The occasion cell (kind icon + title) on CRM → Occasions; its icon is sized with its <i>
   twin so the title doesn't slide when the icon bundle swaps it in. */
.cal-note a{color:var(--accent);text-decoration:underline}
.occ-title{gap:8px}
.occ-title svg,.occ-title i[data-lucide]{width:16px;height:16px;flex:0 0 auto;color:var(--text-2)}

/* A second count on one menu entry (My Work: appointments today), told apart from
   the first by its icon and colour. Right-aligned on its own, 4px after the first
   when both show. */
.navlink .badge.nav-count-alt{display:inline-flex;align-items:center;gap:3px;background:var(--sidebar-alt-bg);color:var(--sidebar-alt-fg)}
.navlink .badge.nav-count-alt svg,.navlink .badge.nav-count-alt i[data-lucide]{width:11px;height:11px}
.navlink .badge.nav-count-alt b{font-weight:600}
.navlink .badge:not([hidden]) + .badge{margin-left:4px}

/* ===================== TAG FIELD =====================
   A short list of values edited in place: a box that looks like .input, one
   .tag-item per value (its own icon, the text, a .tag-x to remove it) and a
   text box at the end to add the next. The page saves each add / remove.
   Worked example: Settings → a panel's fields → Websites for Fill with AI
   (views/admin-fields.ejs, public/js/pages/admin-fields.js). Put it in a .field
   with a .field-label above and a .field-help below. */
.tag-field{display:flex;flex-wrap:wrap;align-items:center;gap:6px;min-height:var(--ctl-h);padding:4px 6px;
  border:1px solid var(--border);border-radius:var(--r-8, 8px);background:var(--surface);cursor:text;
  transition:border-color var(--dur-fast) var(--ease),box-shadow var(--dur-fast) var(--ease)}
.tag-field:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.tag-field[aria-invalid="true"]{border-color:var(--danger);box-shadow:0 0 0 2px var(--danger-surface-border)}
.tag-item{display:inline-flex;align-items:center;gap:5px;min-width:0;max-width:100%;height:24px;padding:0 3px 0 8px;
  border:1px solid var(--border);border-radius:var(--r-full, 999px);background:var(--surface-2);color:var(--text);font-size:var(--fs-12, 12.5px);line-height:1;cursor:default}
.tag-item>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tag-item>svg,.tag-item>i[data-lucide]{width:13px;height:13px;flex:none;color:var(--text-muted)}
.tag-x{display:inline-grid;place-items:center;flex:none;width:18px;height:18px;padding:0;border:0;border-radius:50%;
  background:none;color:var(--text-muted);cursor:pointer;transition:background var(--dur-fast) var(--ease),color var(--dur-fast) var(--ease)}
.tag-x:hover{background:var(--surface-3);color:var(--text)}
.tag-x svg,.tag-x i[data-lucide]{width:12px;height:12px}
/* The :not() chain matches `.field input:not(…)` (a .tag-field sits in a .field
   for its label), so this later rule wins and the text box draws no box of its own. */
.tag-field>input:not([type=checkbox]):not([type=radio]):not([type=file]){flex:1 1 180px;width:auto;min-width:140px;height:24px;
  padding:0 4px;border:0;border-radius:0;outline:none;box-shadow:none;background:transparent;color:var(--text);font-family:inherit;font-size:var(--fs-13, 13px)}
.tag-field>input:focus{box-shadow:none}
.tag-field>input::placeholder{color:var(--text-muted)}
.tag-field>input:disabled{cursor:not-allowed}

/* ===================== CHECKBOX DROPDOWN =====================
   The multi-select: <details class="inv-dropdown"> > <summary class="inv-dropdown-toggle">
   + <div class="inv-dropdown-panel"> of label.inv-dropdown-item > checkbox +
   span.inv-dropdown-item-name. The toggle reads a STABLE field name + an
   .inv-dd-count badge. Built for the inventory filter bars (inventory.js drives
   those); any other page adds data-dd-chip="<name>" on the <details> and loads
   /js/checkbox-dropdown.js. Kept LAST in this sheet: it used to live in
   inventory.css (loaded after app.css), so it must still win equal-specificity
   ties with the rules above. */
.toolbar details.inv-dropdown { position: relative; }
/* Canonical-toolbar footprint: auto width (the label is a fixed field name, not a
   growing selection), --ctl-h tall and 8px round, matching .input / .tb-input /
   .chip beside it (it stayed 36px when they went to 32 — 2026-10-15, Tray Locations). */
.toolbar .inv-dropdown-toggle {
  width: auto; min-width: 0; max-width: 230px;
  height: var(--ctl-h); padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--r-8, 8px);
  font-size: var(--fs-13, 13px); font-weight: 500; color: var(--text);
  gap: 8px;
}
.toolbar .inv-dropdown-toggle:hover { border-color: var(--border-strong); }
.toolbar .inv-dropdown[open] .inv-dropdown-toggle {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
/* Count of ticked options, inside the toggle — this is what tells you the filter
   is on, now that the toggle shows a stable field name instead of the selection.
   Render it `hidden` at zero and only UPDATE it (never insert it after paint). */
.inv-dd-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; flex: 0 0 auto;
  border-radius: var(--r-full, 999px); font-size: var(--fs-11, 11px); font-weight: 700;
  background: var(--accent-soft); color: var(--accent);
}
.inv-dd-count[hidden] { display: none; }
details.inv-dropdown { position: relative; }
.inv-dropdown-toggle {
  list-style: none;
  cursor: pointer;
  padding: 0.45rem 0.6rem;
  border: 1.25px solid var(--border);
  border-radius: var(--r-8, 8px);
  font-size: var(--fs-14, 0.85rem);
  /* Fixed footprint: a restored single-selection can carry a long category/
     warehouse name, and a min-width-only toggle would grow to fit it once the
     selection is applied (after the DB load), reflowing the whole filter
     toolbar. Pin the width and ellipsis the label so the card never shifts. */
  width: 180px;
  min-width: 180px;
  max-width: 180px;
  overflow: hidden;
  background: var(--surface);
  color: var(--text-strong);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.inv-dropdown-toggle::-webkit-details-marker { display: none; }
/* The label is wrapped in .inv-dd-label so a long name truncates instead of
   widening the toggle. */
.inv-dropdown-toggle .inv-dd-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Same chevron the native <select> uses (`select.input`), so the custom
   checkbox dropdowns match a native dropdown exactly. */
.inv-dropdown-toggle::after {
  content: '';
  flex: none;
  width: 14px;
  height: 14px;
  background-image: var(--select-chevron);
  background-repeat: no-repeat;
  background-position: center;
}
.inv-dropdown[open] .inv-dropdown-toggle {
  border-color: var(--info);
  box-shadow: 0 0 0 3px var(--accent-focus-ring);
}
.inv-dropdown-panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  min-width: 220px;
  max-height: 280px;
  overflow-y: auto;
  background: var(--surface);
  border: 1.25px solid var(--border);
  border-radius: var(--r-12, 10px);
  box-shadow: var(--elev-3, 0 8px 24px rgba(16, 42, 94, 0.12));
  padding: 0.4rem;
}
/* Set by /js/checkbox-dropdown.js when the panel would spill off a screen edge:
   .dd-end hangs it off the toggle's RIGHT edge, .dd-start off its left. Specific
   enough to beat mobile.css's phone-width `right:0`. */
details.inv-dropdown.dd-end > .inv-dropdown-panel { left: auto; right: 0; }
details.inv-dropdown.dd-start > .inv-dropdown-panel { left: 0; right: auto; }
/* Scoped under .inv-dropdown-panel so these win over the generic
   `.inv-toolbar label` rule (which forces column layout + muted small font). */
.inv-dropdown-panel .inv-dropdown-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  border-radius: var(--r-6, 6px);
  font-size: var(--fs-14, 0.85rem);
  color: var(--text-strong);
  font-weight: 400;
  cursor: pointer;
}
.inv-dropdown-panel .inv-dropdown-item:hover { background: var(--surface-3); }
/* An option that can't be picked right now (Offers to watchers: a store with offers
   switched off): a disabled box + .is-disabled on its label, the reason in the
   label's data-tip and, where it helps, a .pill beside the name. */
.inv-dropdown-panel .inv-dropdown-item.is-disabled { color: var(--text-muted); cursor: not-allowed; }
.inv-dropdown-panel .inv-dropdown-item.is-disabled:hover { background: none; }
.inv-dropdown-panel .inv-dropdown-item.is-disabled input[type="checkbox"] { cursor: not-allowed; }
.inv-dropdown-item-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inv-dropdown-panel input[type="checkbox"] {
  flex: 0 0 auto;
  min-width: auto;
  width: auto;
  padding: 0;
  margin: 0;
  /* The generic `.inv-toolbar input` rule sets appearance:none (for the text
     filters/selects); restore the native checkbox + give it the accent tick. */
  appearance: auto;
  -webkit-appearance: auto;
  accent-color: var(--accent);
}
.inv-dropdown-empty {
  padding: 0.5rem;
  color: var(--text-muted);
  font-size: var(--fs-13, 0.8rem);
}
/* Loading placeholder for a dropdown's options — the canonical .skel-text
   shimmer sized to the .inv-dropdown-item rhythm, so the panel opens at the
   height its options will fill. */
.inv-dropdown-panel > .skel-text { padding: 0.4rem 0.5rem; gap: 14px; }
.inv-dropdown-panel > .skel-text > .skel-bar { height: 10px; }
/* Small caption row at the top of a checkbox dropdown panel (e.g. the bulk-ops
   Category / Overall-condition pickers). */
.inv-dropdown-hint {
  font-size: var(--fs-11, 0.7rem); text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 0.15rem 0.5rem 0.3rem;
  margin-bottom: 0.1rem;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}
/* In a form field (.field) the dropdown is as wide and tall as the fields beside it. */
.field > details.inv-dropdown > .inv-dropdown-toggle { width: 100%; min-width: 0; max-width: none; height: var(--ctl-h); font-weight: 400; font-size: var(--fs-13, 13px); }
.field > details.inv-dropdown > .inv-dropdown-panel { min-width: 100%; max-width: min(420px, 90vw); }
/* Inside an .x-modal the body scrolls (overflow:auto) and would clip an absolute
   panel — render it in-flow so it expands the form instead, full-width toggle. */
.x-modal__body details.inv-dropdown { position: relative; }
.x-modal__body .inv-dropdown-toggle { width: 100%; min-width: 0; max-width: none; }
.x-modal__body .inv-dropdown-panel { position: static; margin-top: 0.35rem; min-width: 0; box-shadow: none; }

/* ======================= ACTION MENU (.act-menu) =======================
   THE "more actions" dropdown: a button that opens a short list of actions, so a
   crowded bar keeps only its main controls in view. A <details>, so it opens and
   closes with no script; /js/act-menu.js (app-wide, from partials/icons) adds
   close-on-outside-click, Escape, close-after-a-pick and the side that fits.
   Same panel chrome as the avatar's account menu (.user-menu-dropdown).
     <details class="act-menu">
       <summary class="btn ghost sm" data-tip="Item — …"><i data-lucide="package"></i> Item <i data-lucide="chevron-down" class="act-menu-caret"></i></summary>
       <div class="act-menu-pop">
         <div class="act-menu-head"><strong>Title</strong>Subtitle</div>
         <a class="act-menu-item" href="…"><i data-lucide="store"></i> Open on eBay</a>
         <div class="act-menu-sep"></div>
         <button type="button" class="act-menu-item">…</button>
       </div>
     </details>
   An icon-only trigger (`btn ghost sm icon` + `ellipsis`) carries data-tip +
   aria-label like every icon button. Worked example: the CRM inbox thread head. */
.act-menu { position: relative; display: inline-flex; }
.act-menu > summary { list-style: none; cursor: pointer; user-select: none; }
.act-menu > summary::-webkit-details-marker { display: none; }
.act-menu > summary::marker { content: ""; }
.act-menu[open] > summary { background: var(--surface-3); color: var(--text); }
.act-menu-caret, .btn .act-menu-caret, .act-menu i.act-menu-caret[data-lucide] { width: 14px; height: 14px; margin-left: -2px; opacity: .7; transition: transform var(--dur-fast) var(--ease); }
.act-menu[open] .act-menu-caret { transform: rotate(180deg); }
.act-menu-pop {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 1000;
  min-width: 220px; max-width: min(320px, calc(100vw - 32px)); box-sizing: border-box;
  background: var(--surface); border: 1.25px solid var(--border); border-radius: var(--r-8, 8px);
  box-shadow: var(--shadow-lg); padding: 6px;
  /* act-menu.js caps max-height to the room on the panel's side: a long menu scrolls inside itself. */
  overflow-y: auto; overscroll-behavior: contain;
}
.act-menu.act-menu-start .act-menu-pop { right: auto; left: 0; }
/* No room under the button (a bar pinned to the bottom of the screen): above it. */
.act-menu.act-menu-up .act-menu-pop { top: auto; bottom: calc(100% + 6px); }
/* A menu in a table cell floats over the page (act-menu.js places it): the
   table's .tablewrap scrolls, and it clipped an absolute panel to its row. The
   width is said again over a sized table's cell rules (min-width:0). It closes
   without the fade: while the <details>' content-visibility transitions, Chrome
   contains its content, which makes it the fixed panel's frame — the panel jumped
   by the menu's own offset for the length of the fade. */
details.act-menu.act-menu-float > .act-menu-pop { position: fixed; right: auto; bottom: auto; min-width: 220px; max-width: min(320px, calc(100vw - 32px)); }
details.act-menu.act-menu-float::details-content { transition: none; }
.act-menu-head { padding: 6px 10px 8px; margin-bottom: 4px; border-bottom: 1px solid var(--border-light); font-size: var(--fs-12, 12px); color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-menu-head strong { display: block; color: var(--text); font-size: var(--fs-13, 13px); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; box-sizing: border-box;
  padding: 8px 10px; border: 0; border-radius: var(--r-6, 6px); background: none; color: var(--text);
  font: inherit; font-size: var(--fs-13, 13px); text-align: left; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.act-menu-item:hover, .act-menu-item:focus-visible { background: var(--surface-2); color: var(--text); text-decoration: none; outline: none; }
.act-menu-item svg, .act-menu-item i[data-lucide] { width: 16px; height: 16px; flex: 0 0 auto; color: var(--text-muted); }
.act-menu-sub { margin-left: auto; padding-left: 12px; color: var(--text-muted); font-size: var(--fs-12, 12px); }
.act-menu-sep { height: 1px; margin: 4px 6px; background: var(--border-light); }
/* A destructive entry (Flag as bad customer, Block) reads red, icon included. */
.act-menu-item.is-danger, .act-menu-item.is-danger:hover, .act-menu-item.is-danger svg, .act-menu-item.is-danger i[data-lucide] { color: var(--danger); }

/* =====================================================================
   MENTION PICKER — "@" in a note (owner, 2026-10-25: tag people
   "instagram style"). /js/mention-picker.js floats the list on <body>
   (position:fixed, placed under the box or above it), so a panel's scroll
   box or a dialog never clips it; above dialogs (9000), under the tooltip.
   `.mention` marks a name a note mentions (noteBodyHtml,
   src/crm/customers/note-mentions.js) — a name, not a link: bold text on
   the soft accent tint, never the accent colour itself.
   ===================================================================== */
.mention-pop {
  position: fixed; z-index: 9700; box-sizing: border-box; max-height: 240px; overflow-y: auto;
  background: var(--surface); border: 1.25px solid var(--border); border-radius: var(--r-8, 8px);
  box-shadow: var(--shadow-lg); padding: 4px;
}
.mention-opt {
  display: flex; align-items: center; gap: 9px; width: 100%; box-sizing: border-box;
  padding: 6px 8px; border: 0; border-radius: var(--r-6, 6px); background: none; color: var(--text);
  font: inherit; font-size: var(--fs-13, 13px); text-align: left; cursor: pointer;
}
.mention-opt.is-active, .mention-opt:hover { background: var(--surface-2); }
.mention-opt-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.mention { font-weight: 600; color: var(--text); background: var(--accent-soft); border-radius: var(--r-4, 4px); padding: 0 2px; }
/* A name put in with the picker is a LABEL in the box (owner, 2026-10-25). A textarea
   can't draw a box around part of its text, so a layer BEHIND it — the same font,
   padding, size and scroll, copied by the script, as the template blanks' — draws the
   label under each name; the box's own text stays on top. A box that paints its own
   background (.input) is see-through while it holds a label and the layer paints the
   background (.has-bg). Deleting takes the whole name (mention-picker.js). */
.mention-host { position: relative; }
.mention-layer { position: absolute; z-index: 0; margin: 0; overflow: hidden; pointer-events: none; color: transparent; white-space: pre-wrap; overflow-wrap: break-word; border-style: solid; border-color: transparent; }
.mention-layer.has-bg { background: var(--surface); }
.mention-layer[hidden] { display: none; }
textarea.mention-on { position: relative; z-index: 1; background-color: transparent; }
.mention-chip { color: transparent; background: var(--accent-soft); border-radius: var(--r-6, 5px); box-shadow: 0 0 0 1px var(--accent-border); }

/* =====================================================================
   REPORT HUB (/reports) — the card grid behind the section tabs.
   ---------------------------------------------------------------------
   These used to live in a page-level <style> in views/reports.ejs. They are
   here so the hub inherits every token change like the rest of the app.

   ONE section is visible at a time (its tab); `.is-searching` flips the hub
   into a cross-section result list — every section shown at once, its heading
   back, and the section name surfaced on each card (.rc-sec), because a flat
   list of matches otherwise says nothing about where a report lives. The
   sections that don't match hide themselves; the FAVORITES section is always
   out of a search, since its cards are copies and would match twice.
   ===================================================================== */
.report-section { margin-top: 0; }
.reports-hub.is-searching .report-section { margin-top: 26px; }
.reports-hub.is-searching .report-section:first-of-type { margin-top: 0; }
/* The tab already names the section — the heading is search-mode only. */
.report-section-head {
  font-family: var(--font-display); font-size: var(--fs-12, 12px); font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 12px; display: none;
}
.reports-hub.is-searching .report-section-head { display: block; }
.reports-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); grid-auto-rows: 1fr; gap: 16px; }

.report-card {
  position: relative; height: 100%;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.report-card:hover { border-color: var(--accent); }
/* The whole card is the link. The star is a sibling BUTTON on top of it (a
   button nested in an <a> is invalid and eats the card's own click), so the
   link keeps a padding-right wide enough to clear it. */
.report-card .rc-link {
  display: flex; gap: 14px; align-items: flex-start; height: 100%;
  padding: 18px 44px 18px 18px; text-decoration: none; color: inherit;
}
.report-card .rc-chip {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: var(--r-12, 11px); display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.report-card .rc-chip svg,.report-card .rc-chip i[data-lucide] { width: 20px; height: 20px; }
.report-card .rc-body { display: block; min-width: 0; }
.report-card .rc-title {
  display: block; font-family: var(--font-display); font-size: var(--fs-14, 14.5px); font-weight: 600;
  letter-spacing: -.01em; margin-bottom: 5px; color: var(--text);
}
.report-card .rc-desc {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  font-size: var(--fs-12, 12.5px); color: var(--muted); line-height: 1.45;
}
/* Which section this card came from — only meaningful where the grid is NOT
   one section (Favorites, and a search across all of them). */
.report-card .rc-sec {
  display: none; margin-top: 8px; font-size: var(--fs-11, 11px); font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--text-muted);
}
.reports-hub.is-searching .rc-sec,
.report-section[data-report-section="favorites"] .rc-sec { display: block; }

/* Star = keep this report on the Favorites tab. Off is an outline in the muted
   text colour; on is the attention signal filled, so a starred card reads at a
   glance across the grid. */
.rc-star {
  position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; padding: 0;
  display: grid; place-items: center; border: 0; border-radius: var(--r-8, 8px);
  background: transparent; color: var(--text-muted); cursor: pointer; transition: var(--dur-fast) var(--ease);
}
.rc-star svg,.rc-star i[data-lucide] { width: 16px; height: 16px; }
.rc-star:hover { background: var(--surface-2); color: var(--text-2); }
.rc-star:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* A favourite is a choice you made — the accent, like a bookmark; amber means a warning (colour system, 2026-10-21). */
.rc-star.is-on { color: var(--accent); }
.rc-star.is-on svg { fill: currentColor; }
.rc-star.is-on:hover { color: var(--accent); }
/* `hidden` must win over any later display rule — a tab's section and a card
   filtered out by the search are hidden with the attribute. */
.report-section[hidden],.report-card[hidden] { display: none !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   ITEM CHANGE LOG  (/items/:sku/history — views/item-history.ejs)

   The page shows the ITEM as it stood at a moment in time, with the fields a
   save touched marked inside it, over a TIME TRACK of the item's whole life.
   Colour carries the whole message here, so it comes from the tokens that are
   contrast-checked in both themes (--red/--green/--violet and the *-surface
   families). Never hard-code one: a diff nobody can read in dark mode is a diff
   nobody trusts.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── the item at this moment ─────────────────────────────────────────────── */
.hist-item-card { display: flex; align-items: center; gap: 12px; min-width: 0; }
.hist-photo {
    width: 62px; height: 62px; flex: 0 0 62px; object-fit: cover;
    border-radius: var(--r-12, 10px); border: 1px solid var(--border); background: var(--surface-3);
}
.hist-photo-none { display: flex; align-items: center; justify-content: center; color: var(--text-faint); }
.hist-photo-none svg, .hist-photo-none i[data-lucide] { width: 22px; height: 22px; }
.hist-photo-skel { width: 62px; height: 62px; flex: 0 0 62px; border-radius: var(--r-12, 10px); }
.hist-item-text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hist-item-title {
    font-family: var(--font-display); font-size: var(--fs-16, 16px); font-weight: 600;
    letter-spacing: -.01em; line-height: 1.3; color: var(--text-strong); overflow-wrap: anywhere;
}
.hist-item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: var(--fs-12, 12px); }

/* ── the timeline: the track, and where you are standing ─────────────────
   The marks are the navigation, so they get the width; the cluster on the right
   says which moment you are on and offers the one thing you can do about it.
   They sit side by side because they are one thought: "this point — put it back". */
/* THE ALIGNMENT TRAP: the track reserves 26px above itself for the flag that
   labels a destructive save, so a row aligned to flex-START drops the line 26px
   below the cluster beside it and every line on the card reads ragged. Both
   columns are centred against each other instead, and the reserve is constant
   whether or not a flag is showing, so nothing shifts as you move along. */
.hist-timeline { display: flex; align-items: center; gap: 20px; margin-top: 18px; min-height: 78px; }
.hist-track-wrap { position: relative; flex: 1 1 auto; min-width: 0; padding-top: 26px; }
/* THE WIDTH TRAP: this cluster's text changes on every step ("Aug 12, 3:25 PM ·
   Joslyn Kessler" → "Aug 9, 9:05 AM · Bob"). Sized to its content, it grew and
   shrank with each name and time, and the track beside it — which takes whatever
   is left — jumped wider and narrower as you pressed the arrows, so the mark under
   your eye slid sideways. The cluster is a FIXED width; its text ellipsizes on one
   line (the full text is in the element's title), so neither the track's width
   nor the card's height can move while you step. */
.hist-at { flex: 0 0 440px; width: 440px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px 10px; }
.hist-at-nav { display: flex; align-items: center; gap: 4px; }
.hist-at-when { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.hist-at-when > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The action spans both columns under the stepper and the label it acts on. */
.hist-at > .btn.primary { grid-column: 1 / -1; justify-self: start; }
.hist-at-when strong { font-family: var(--font-display); font-size: var(--fs-14, 14px); font-weight: 600; color: var(--text-strong); }
.hist-at-when .t-mut { font-size: var(--fs-11, 11px); }

/* The whole strip is live: press anywhere and it snaps to the nearest mark,
   drag across marks to compare a span. The ticks stay real buttons underneath
   so the track is keyboard-reachable and each mark keeps its own tooltip. */
.hist-track { position: relative; height: 22px; cursor: pointer; touch-action: none; }
.hist-track::before {
    content: ""; position: absolute; left: 0; right: 0; top: 9px;
    height: 4px; border-radius: var(--r-4, 2px); background: var(--surface-3);
}
.hist-track-fill { position: absolute; top: 9px; height: 4px; border-radius: var(--r-4, 2px); background: var(--accent); }
.hist-tick {
    position: absolute; top: 5px; width: 3px; height: 12px; padding: 0;
    transform: translateX(-50%); border: 0; border-radius: var(--r-4, 2px);
    background: var(--text-faint); cursor: pointer;
}
.hist-tick:hover { background: var(--text-muted); }
.hist-tick.is-loss { top: 3px; height: 16px; width: 4px; background: var(--red); }
.hist-tick.is-restore { background: var(--violet); }
/* The mark you are standing on — and the far end of a span, which looks the same
   because both ends are equally "where you are". */
.hist-tick.is-on {
    top: 2px; width: 18px; height: 18px; border-radius: var(--r-full, 999px);
    background: var(--surface); border: 3px solid var(--accent); box-sizing: border-box;
}
.hist-tick:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* The loudest thing on the page, deliberately: a save that emptied a pile of
   fields is what someone comes to this page to find. Clicking it goes there. */
.hist-flag {
    position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap;
    padding: 2px 8px; border-radius: var(--r-6, 6px); font-size: var(--fs-11, 11px); font-weight: 600; cursor: pointer;
    background: var(--danger-surface); color: var(--danger-surface-text);
    border: 1px solid var(--danger-surface-border);
}
.hist-track-ends { display: flex; justify-content: space-between; gap: 10px; font-size: var(--fs-11, 11px); margin-top: 2px; }
.hist-hint { font-style: italic; }
/* While Compare is armed the hint stops being a hint and becomes the instruction. */
.hist-hint.is-asking { font-style: normal; font-weight: 600; color: var(--accent); }
#hist-compare.is-on { background: var(--surface-3); color: var(--text); }

/* Photos in the record read as photos — a comma-separated list of URLs tells an
   operator nothing about what the item looked like. */
.hist-thumbs { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; }
.hist-thumb {
    width: 34px; height: 34px; object-fit: cover; border-radius: var(--r-6, 6px);
    border: 1px solid var(--border); background: var(--surface-3);
}

/* ── the record ──────────────────────────────────────────────────────────── */
.hist-record .card-head { padding: 0 0 10px; }
.hist-cols { columns: 2; column-gap: 28px; }
.hist-panel { break-inside: avoid; margin: 0 0 14px; }
.hist-panel h3 {
    font-family: var(--font-display); font-size: var(--fs-11, 11px); font-weight: 600;
    letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); margin: 0 0 4px;
}
/* A row is a field. An untouched one is grey and silent; a changed one carries a
   mark in the margin — a pill-sized dot (red changed/removed, green added), never
   a coloured edge — so the record reads as the item, with edits marked on it. */
.hist-row {
    display: flex; align-items: baseline; gap: 12px;
    padding: 5px 0 5px 14px; position: relative;
}
.hist-row.hist-changed::before, .hist-row.hist-removed::before, .hist-row.hist-added::before {
    content: ""; position: absolute; left: 1px; top: 11px;
    width: 6px; height: 6px; border-radius: 50%; background: var(--red);
}
.hist-row.hist-added::before { background: var(--green); }
.hist-label { flex: 0 0 132px; font-size: var(--fs-12, 12px); color: var(--text-muted); }
/* An untouched field recedes: its label and value both drop a step, so the marked
   rows carry all the signal in the "whole item" view. */
.hist-row:not(.hist-changed):not(.hist-added):not(.hist-removed) .hist-label { color: var(--text-faint); }
/* The value takes the width it needs, not all of it, so the row's action sits
   beside the text it belongs to. With `flex: 1 1 auto` the value ate the whole
   column and pushed the action out to the far right edge, where it read as
   belonging to nothing. A long value still fills the column and wraps. */
.hist-value { flex: 0 1 auto; min-width: 0; font-size: var(--fs-13, 13px); line-height: 1.45; color: var(--text); overflow-wrap: anywhere; }
.hist-row:not(.hist-changed):not(.hist-added):not(.hist-removed) .hist-value { color: var(--text-subtle); }
.hist-old { color: var(--red); text-decoration-thickness: 1px; }
.hist-new { text-decoration: none; color: var(--text); }
.hist-row.hist-added .hist-new { color: var(--green); }
.hist-empty { color: var(--text-faint); font-style: italic; }
/* Who set this value, and when. Inline after the value, never on a line of its
   own: a second line doubles the height of every row, which is what the app's
   table rule forbids for exactly this reason. */
.hist-by { color: var(--text-faint); font-size: var(--fs-11, 11px); white-space: nowrap; }
.hist-by::before { content: "· "; }
.hist-act { flex: 0 0 auto; margin-left: 4px; }
/* THE TWIN RULE, IN ITS OTHER SHAPE. The usual form sizes an icon INSIDE a box
   (`.foo svg,.foo i[data-lucide]`). Here the class is on the icon ITSELF, and
   Lucide REPLACES that <i> with an <svg> carrying the same class — so a
   descendant selector matches neither state and the icon paints at Lucide's
   default 24px. Sizing the class directly covers the placeholder and the swapped
   svg in one rule; do not "correct" this into the descendant form. */
.hist-why { width: 15px; height: 15px; flex: 0 0 auto; color: var(--text-muted); }
/* ALWAYS VISIBLE, never hover-only. A control you can only find by sweeping the
   pointer over the page is a control most people never find — the whole reason
   the restore button was reported "missing" in the first place. It stays quiet
   instead of hidden: ghost chrome, muted until you touch it. */
.hist-act .hist-one { color: var(--text-muted); }
.hist-row:hover .hist-act .hist-one, .hist-act .hist-one:hover, .hist-act .hist-one:focus-visible { color: var(--accent); }
/* Values the item holds that its log never recorded (entered before the log
   tracked those fields). They belong to no save, so they sit apart from the
   record above, under a rule, with the reason stated once. */
.hist-unlogged { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--border); }

@media (max-width: 900px) {
    .hist-cols { columns: 1; }
    .hist-label { flex-basis: 110px; }
    /* Stacked, the track keeps the full width and the cluster sits under it. */
    .hist-timeline { flex-direction: column; gap: 12px; }
    .hist-at { flex-basis: auto; width: 100%; }
    .hist-hint { display: none; }
}


/* A background scan's step banner, parked in the shared top-right .toast-region
   (never in the page flow). It appears mid-session and can run for minutes, so
   inline it would shove whatever sits under it down the page the moment the run
   starts — the "never INSERT into laid-out chrome after paint" rule. In the
   corner nothing moves. Pure status with nothing to click, so it inherits the
   region's pointer-events:none and can never eat a click on the table beneath.
   Hidden with [hidden], which needs the explicit rule because the author
   `display` below otherwise beats the UA sheet. */
.scan-banner{
  display:block;background:var(--elev);border:1px solid var(--border);border-radius:var(--r-12, 11px);
  padding:13px 16px;box-shadow:var(--shadow-lg);font-size:var(--fs-13, 13px);color:var(--text);
  animation:slidein var(--dur-slow) var(--ease);
}
.scan-banner[hidden]{display:none}
.scan-banner .scan-head{font-weight:600;margin-bottom:2px}
.scan-banner .scan-head svg,.scan-banner .scan-head i[data-lucide]{width:15px;height:15px}
.scan-banner .scan-step-label{font-size:var(--fs-12, 12.5px)}

/* The inline banner container — a job's progress IN the page, under the thing
   it is about (the drift scan, the eBay offers re-read, a mailbox's first
   import on its card). Colour by state from the pill tokens. Promoted from
   inventory.css when the Mailboxes card became its third user (2026-10-11). */
.scan-status{margin:0 0 16px;padding:10px 14px;border-radius:var(--r-12, 10px);font-size:var(--fs-13, 13px);display:none;border:1px solid transparent}
.scan-status.running{display:block;background:var(--amber-bg);border-color:var(--amber-bg);color:var(--amber-text)}
.scan-status.done{display:block;background:var(--green-bg);border-color:var(--green-bg);color:var(--green-text)}
.scan-status.error{display:block;background:var(--red-bg);border-color:var(--red-bg);color:var(--red-text)}
.scan-status .spinner{display:inline-block;width:12px;height:12px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:spin .8s linear infinite;margin-right:8px;vertical-align:-2px}

/* ── BACKGROUND-SCAN PROGRESS ─────────────────────────────────────────────────
   A long job that runs on the SERVER and outlives the page: the inventory drift
   scan and the fraud checks' "Check past sales". Promoted here from inventory.css
   the moment a second page needed it.

   ONE ROW PER STEP, never one summed bar. The steps' units are not comparable —
   one eBay page costs tens of seconds, one local row a millisecond — so a
   combined percentage sits near zero for most of the run and then jumps. Per
   step it reads honestly, and it tells an operator who navigated away and came
   back HOW FAR it got.

   Mount every step from the first paint, including the ones not started, so the
   banner reserves its full height and nothing below it jumps as the run moves
   on — the same "reserve the box" rule as the loading skeletons. */
.inv-sync-progress-bar {
  height: 8px; background: var(--surface-3); border-radius: var(--r-full, 999px); overflow: hidden;
  margin: 0.4rem 0;
}
.inv-sync-progress-fill {
  height: 100%;
  background: var(--accent-bar);
  border-radius: var(--r-full, 999px);
  transition: width var(--dur-slow) var(--ease);
}
.scan-head { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 10px; }
.scan-meta { font-weight: 400; opacity: .85; }
.scan-steps { margin-top: 10px; display: flex; flex-direction: column; gap: 9px; }
.scan-step { display: grid; grid-template-columns: 1fr auto; gap: 1px 12px; align-items: baseline; }
.scan-step.is-pending { opacity: .5; }
.scan-step-count { font-family: var(--font-mono); font-size: var(--fs-12, 12px); white-space: nowrap; }
.scan-step .inv-sync-progress-bar { grid-column: 1 / -1; height: 6px; margin: 3px 0 0; }

/* ── INVALID CONTROL + ITS MESSAGE ────────────────────────────────────────────
   THE look of a form control holding a value it does not accept: the control
   gets aria-invalid="true" (red outline + ring) and ONE short line directly
   under it, `.field-msg`. Set by /js/numeric-only.js for "Numbers only" fields
   (tray, review, fixing, product page); reuse it for any per-field check rather
   than hand-rolling a red border. The ring is a box-shadow on purpose: a page
   sheet that pins its inputs' border colour (the product page does) still
   shows the state. The line appears only while the value is wrong. */
input[aria-invalid="true"],textarea[aria-invalid="true"],select[aria-invalid="true"]{border-color:var(--danger);box-shadow:0 0 0 2px var(--danger-surface-border)}
.field-msg{display:block;margin-top:4px;font-size:var(--fs-12, 12px);line-height:1.35;font-weight:500;color:var(--danger);white-space:normal}
/* The line makes its field one line taller. A .field-grid stretches every field
   in a row to the tallest — so the NEIGHBOURS' boxes would swell with it. While a
   grid shows a message, its fields keep their own height instead (a checkbox
   field keeps its own end-alignment). */
.field-grid:has(> .field > .field-msg)>.field:not(.check){align-self:start}

/* ======================= CHANNEL TILE =======================
   A marketplace's logo (or its letters) beside a channel's name: a store's name
   rarely says which marketplace it is. Built by ProductView.tileHtml
   (/js/product-view.js) — the product page's channel rows, Settings → Sales Channels. */
.pd-ch-tile { width: 32px; height: 32px; border-radius: var(--r-8, 8px); display: grid; place-items: center; flex: none; font: 700 var(--fs-11, 11px)/1 var(--font-display); letter-spacing: -.01em; }
.pd-ch-tile.blue { background: var(--blue-bg); color: var(--blue); } .pd-ch-tile.green { background: var(--green-bg); color: var(--green); }
.pd-ch-tile.violet { background: var(--violet-bg); color: var(--violet); } .pd-ch-tile.amber { background: var(--amber-bg); color: var(--amber); }
.pd-ch-tile.red { background: var(--red-bg); color: var(--red); } .pd-ch-tile.gray { background: var(--gray-bg); color: var(--gray); }
.pd-ch-tile.logo { background: var(--logo-tile-bg); border: 1px solid var(--border-light); }
.pd-ch-tile.logo img { width: 24px; height: 20px; object-fit: contain; display: block; }   /* a square mark and a wordmark (eBay, Wix) both fit */
/* .xs: the small square in front of a channel's name in a dropdown (Orders → Channel) */
.pd-ch-tile.xs { width: 20px; height: 20px; border-radius: var(--r-6, 5px); }
.pd-ch-tile.logo.xs img { width: 15px; height: 13px; }
/* A channel's name with its logo in front, on one line, in a cell, a .kv value or
   a line of text: <span class="ch-name">[.pd-ch-tile.xs]<span>Name</span></span>.
   The name is its own span so a sized column ends it in "…"; the tile never shrinks. */
.ch-name { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; vertical-align: middle; }
.ch-name > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ======================= CHANNEL READINESS (src/listing-readiness/) =======================
   The "Channel readiness" card on the product page and the review page
   (/js/listing-readiness.js): one row per channel — a status .pill and the list of
   what's missing, each item a link to the field that fixes it. */
.rdy-issues{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}
.rdy-issues li{line-height:1.45}
.rdy-card{margin:16px 0}
.rdy-card .card-head .rdy-head-end{display:inline-flex;align-items:center;gap:8px}
/* A channel's type tag (EBAY, SHOPIFY, …) beside its name — the product page's
   Listings table and the Channel readiness card (product + review page). */
.inv-listings-channel-type{font-size:var(--fs-11, .68rem);font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--pill-purple-text);background:var(--pill-purple-bg);border:1px solid var(--pill-purple-border);border-radius:var(--r-full, 999px);padding:.08rem .5rem;align-self:flex-start}

/* ===== PRINT DOCUMENT — every page that prints labels or a list =====
   Label slips (purchase / trade-in), the scanner picklist, the shipping-labels
   sheet, the packing slip and the stocktake report all print through this ONE
   look (CLAUDE.md "Every printed label or list is ONE print document"):

     <body class="print-doc">                       light-pinned (<html data-theme="light">)
       <div class="pdoc-bar no-print">              screen only, top-right: Close · Print
       <div class="pdoc">                           the sheet: white paper on screen
         <div class="pdoc-head"><div><h1>…</h1><div class="pdoc-sub">…</div></div>
                                <div class="pdoc-meta">…</div></div>   (meta optional)
         .pdoc-block / table.pdoc-table / .pdoc-cap / .pdoc-note(.alert) / .pdoc-empty

   On screen the sheet sits on the page background like paper in a preview; on
   paper it is the whole page, with the zero @page margin (no URL footer — see
   "A printed document never shows a URL") and its own 14mm × 15mm margin. */
body.print-doc{margin:0;background:var(--bg);color:var(--text);font-family:var(--font-body);font-size:var(--fs-14, 14px);line-height:1.45}
/* off the phone's status bar: a print page in the installed app runs under it (viewport-fit=cover),
   and the phone's fade there covered Close and Print (owner, 2026-11-14) — env() is 0 elsewhere */
.pdoc-bar{max-width:860px;margin:0 auto;padding:calc(16px + env(safe-area-inset-top, 0px)) calc(16px + env(safe-area-inset-right, 0px)) 0 calc(16px + env(safe-area-inset-left, 0px));display:flex;justify-content:flex-end;gap:8px;align-items:center}
.pdoc-bar .pdoc-bar-note{margin-right:auto;color:var(--text-muted);font-size:var(--fs-12, 12.5px)}
/* The bar inside a page that is not a print document by itself (the stocktake
   report card in the kiosk): no centring, it sits at the top of its card. */
.pdoc-bar.inline{max-width:none;padding:0;margin:0 0 14px}
.pdoc{max-width:860px;margin:12px auto 48px;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-12, 10px);box-shadow:var(--shadow-sm);padding:36px 44px;box-sizing:border-box}
/* The shop's letterhead on a customer's paper (partials/print-letterhead), optional. */
.lh{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:18px}
.lh-logo{height:40px;max-width:200px;width:auto;object-fit:contain;display:block}
.lh-name{font-family:var(--font-display);font-size:var(--fs-16, 16px);font-weight:600;letter-spacing:-.01em}
.lh-info{text-align:right;font-size:var(--fs-12, 12.5px);color:var(--text-muted);line-height:1.5}
.pdoc-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;border-bottom:2px solid var(--text);padding-bottom:10px;margin-bottom:16px}
.pdoc-head h1{font-family:var(--font-display);font-weight:600;letter-spacing:-.02em;font-size:var(--fs-20, 22px);line-height:1.2;margin:0;color:var(--text-strong)}
.pdoc-head > div:first-child{flex:1 1 0;min-width:0}
.pdoc-sub{font-family:var(--font-mono);font-size:var(--fs-12, 12px);color:var(--text-muted);margin-top:4px}
.pdoc-meta{text-align:right;font-size:var(--fs-13, 13px);flex:0 0 auto}
/* A row of counts on paper (the stocktake report): compact cells, not screen KPI cards. */
.pdoc-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;background:var(--border);border:1px solid var(--border);border-radius:var(--r-8, 8px);overflow:hidden;margin:0 0 14px}
.pdoc-stats > div{padding:8px 12px;background:var(--surface)}
.pdoc-stats .lbl{font-size:var(--fs-11, 11px);font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--text-muted)}
.pdoc-stats .val{font-family:var(--font-display);font-weight:600;font-size:var(--fs-20, 20px);line-height:1.2;color:var(--text-strong)}
.pdoc-cap{font-size:var(--fs-11, 11px);font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--text-muted);margin:0 0 4px}
.pdoc-block{border-bottom:1.5px solid var(--text);padding:10px 0 12px;break-inside:avoid;page-break-inside:avoid}
.pdoc-block:last-child{border-bottom:0}
.pdoc-block-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:6px}
.pdoc-block-title{font-family:var(--font-display);font-weight:600;font-size:var(--fs-15, 15px);color:var(--text-strong)}
table.pdoc-table{width:100%;border-collapse:collapse;font-size:var(--fs-12, 12.5px);margin:4px 0 0}
/* Paper, not a screen table: no coloured header bar (it is all ink), no sticky
   header, no row hover — the global thead/tbody rules are undone here. */
table.pdoc-table thead th{text-align:left;font-size:var(--fs-11, 11px);font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--text-muted);background:none;border-bottom:1px solid var(--border-strong);padding:6px 8px 6px 0;white-space:nowrap;position:static}
table.pdoc-table tbody tr{cursor:default}
table.pdoc-table tbody tr:hover{background:none}
table.pdoc-table tbody tr.row-mismatch:hover{background:var(--red-bg)}
table.pdoc-table td{padding:7px 8px 7px 0;border-bottom:1px solid var(--border);vertical-align:top;white-space:normal;overflow-wrap:anywhere}
table.pdoc-table .num,table.pdoc-table .qty{text-align:right;font-variant-numeric:tabular-nums}
table.pdoc-table .mono{font-family:var(--font-mono)}
.pdoc-note{border:1px solid var(--border);border-radius:var(--r-8, 8px);background:var(--surface-2);padding:10px 12px;margin:10px 0;font-size:var(--fs-13, 13px);break-inside:avoid}
.pdoc-note.alert{border-color:var(--red);background:var(--red-bg);color:var(--red)}
.pdoc-note ul{margin:4px 0 0;padding-left:18px}
.pdoc-empty{color:var(--text-muted);padding:28px 0;text-align:center}
.pdoc-foot{font-size:var(--fs-13, 13px);color:var(--text-muted);border-top:1px solid var(--border);padding-top:12px;margin-top:16px}
@media (max-width:768px){
  .pdoc-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pdoc{margin:8px 0 32px;border-radius:0;border-left:0;border-right:0;padding:20px 16px}
  .pdoc-head{flex-wrap:wrap}
  .pdoc-bar{padding:calc(12px + env(safe-area-inset-top, 0px)) calc(16px + env(safe-area-inset-right, 0px)) 0 calc(16px + env(safe-area-inset-left, 0px))}
}
@media print{
  @page{margin:0}
  body.print-doc{background:var(--surface)}
  .print-doc .no-print{display:none !important}
  .pdoc{max-width:none;margin:0;border:0;border-radius:0;box-shadow:none;padding:14mm 15mm;-webkit-box-decoration-break:clone;box-decoration-break:clone}
  .print-doc *{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}

/* ===== LABEL SLIPS — the slips stuck on items just taken in =====
   One dashed card per item, its number big enough to read across a bench, on a
   PRINT DOCUMENT sheet (above). Shared by the trade-in and purchase slips
   (views/trade-in-slips.ejs) and the consignment slips (views/consignment-slips.ejs):
     <div class="sl-grid"><div class="slip"><img …><div class="body">
       <div class="no">…</div><div class="nm">…</div><div class="meta">…</div>
       <img class="sl-code" …></div></div></div>
   Every colour is a theme token. */
.sl-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.slip{border:1.5px dashed var(--border-strong);border-radius:var(--r-12, 10px);padding:14px 16px;
      display:flex;gap:14px;align-items:flex-start;break-inside:avoid;page-break-inside:avoid;}
.slip img{width:84px;height:84px;object-fit:cover;border-radius:var(--r-8, 8px);border:1px solid var(--border);flex:0 0 auto;}
.slip .body{min-width:0;flex:1;}
.slip img.sl-code{display:block;width:auto;max-width:100%;height:.45in;margin-top:6px;border:0;border-radius:0;object-fit:contain;}
.slip .no{font-family:var(--font-mono);font-weight:700;font-size:var(--fs-20, 22px);letter-spacing:-.01em;line-height:1.1;}
.slip .nm{font-family:var(--font-display);font-weight:600;font-size:var(--fs-14, 14px);margin-top:4px;
          overflow-wrap:anywhere;}
.slip .meta{color:var(--text-muted);font-size:var(--fs-12, 12px);margin-top:3px;overflow-wrap:anywhere;}
@media (max-width:640px){.sl-grid{grid-template-columns:minmax(0,1fr);}}
@media print{
  /* Cut lines: the slips touch, so one dashed line separates two of them. */
  .sl-grid{gap:0;}
  .slip{border-radius:0;}
}

/* ============================================================================
   LIST TABLE — the Inventory → Products look: a 12px frame with a soft shadow, a
   36px header in 11.2px bold capitals, 0.6rem × 0.85rem cells in 13.6px text,
   light row lines and (with .inv-table-zebra) a stripe on every other row.
   Markup: <div class="inv-table-wrap"><table class="inv-table inv-table-zebra">.
   Used by the Inventory pages, the scanner's statistics + stocktake, and Review
   (owner, 2026-10-18: Review's list must look like Products). Kept at the END of
   this sheet: it used to sit in inventory.css, which loads after app.css, so here
   it still wins every tie it won there. Inventory's own columns stay in
   inventory.css.
   ============================================================================ */
.inv-table-wrap {
  background: var(--surface);
  border: 1.25px solid var(--border);
  border-radius: var(--r-12, 12px);
  /* Horizontal scroll for wide tables lives here (moved off `.inv-main`, which
     must stay overflow:visible so dropdowns aren't clipped). `overflow-y: hidden`
     keeps the rounded-corner clip and the sticky-header scroll context. */
  overflow-x: auto;
  overflow-y: hidden;
  box-shadow: var(--elev-2, 0 2px 6px rgba(16, 42, 94, 0.04));
}
.inv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-14, 0.85rem);
}
.inv-table th,
.inv-table td {
  padding: 0.6rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
.inv-table thead th {
  background: var(--th-bg);
  color: var(--th-text);
  font-weight: 700;
  font-size: var(--fs-11, 0.7rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--th-border, var(--border));
  position: sticky; top: 0;
}
/* Sortable column headers. Same indicator as every other table in the app (the
   app.css "sortable column headers" block): a faint ⇅ on every sortable column,
   ↑ / ↓ at full strength on the active one, both in --th-accent — the primary
   colour as it reads on the --th-bg header bar. These headers carry no inner
   <span class="sort-arrow"> (inventory.js toggles .inv-sort-asc/-desc on the th
   itself), so the glyph is an ::after here; the declarations are kept in step
   with the "sortable column headers" block by hand. The 1em box means ⇅ → ↑ never
   re-measures the column. A table sorted by /js/ui-table.js (th.sortable + a
   .sort-arrow span — Review) gets the same hover, and its arrow sits on the
   label's line as the ::after does (that block centres it, a pixel lower). */
.inv-table thead th.inv-sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.inv-table thead th.inv-sortable:hover,
.inv-table thead th.sortable:hover { background: color-mix(in srgb, var(--th-bg) 92%, var(--th-text)); }
.inv-table thead th .sort-arrow { vertical-align: baseline; }
.inv-table thead th.inv-sortable::after {
  content: '⇅'; display: inline-block; width: 1em; margin-left: 0.3em; text-align: center;
  line-height: 1; color: var(--th-accent); opacity: 0.7; font-size: 0.95em; font-weight: 700;
}
.inv-table thead th.inv-sortable.inv-sort-asc::after { content: '↑'; opacity: 1; }
.inv-table thead th.inv-sortable.inv-sort-desc::after { content: '↓'; opacity: 1; }
.inv-table tbody tr { transition: background var(--dur-instant) var(--ease); }
.inv-table tbody tr:hover { background: var(--accent-soft); }
.inv-table-zebra tbody tr:nth-child(even) { background: var(--surface-2); }
.inv-table-zebra tbody tr:hover { background: var(--accent-soft); }
.inv-table tbody tr.inv-clickable-row { cursor: pointer; }
.inv-table .inv-num { text-align: right; font-variant-numeric: tabular-nums; }
/* Centered numeric column (e.g. products "Available") — keeps tabular figures
   but centers the value in its column instead of right-aligning. */
.inv-table .inv-num-center { text-align: center; font-variant-numeric: tabular-nums; }

/* ── INSIGHT ROWS (What your business shows — src/knowledge/insights.js; Home's widget and the
   Shop knowledge card): the finding in bold with its numbers, what to do under it, the report
   and Hide at the end. One row wraps on a phone. ───────────────────────────────────────────── */
.insight-list{display:flex;flex-direction:column}
.insight{display:flex;align-items:flex-start;gap:12px;padding:10px 0;border-top:1px solid var(--border-light)}
.insight:first-child{border-top:0;padding-top:2px}
.insight.is-muted .insight-txt{opacity:.55}
.insight-txt{flex:1 1 auto;min-width:0}
.insight-t{font-size:var(--fs-14, 13.5px);font-weight:600;line-height:1.35;overflow-wrap:anywhere}
.insight-t .pill{vertical-align:middle;margin-left:4px}
.insight-m{margin-top:2px;font-size:var(--fs-12, 12.5px);line-height:1.4;color:var(--text-muted);overflow-wrap:anywhere}
/* DID IT WORK: the line under an acted finding — when, the number then and now, the verdict's pill. */
.insight-acted{margin-top:4px;font-size:var(--fs-12, 12.5px);line-height:1.4;color:var(--text-muted);overflow-wrap:anywhere}
.insight-acted .pill{vertical-align:middle;margin-right:2px}
.insight-acts{flex:none;display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}
@media (max-width:768px){.insight{flex-wrap:wrap}.insight-acts{width:100%;justify-content:flex-start}}
