/* hub/hub-ui.css: GENERATED copy of docs/shared/hub-core/hub-ui.css (tools/sync-hub-core.mjs, since 2026-11-02).
   Loaded after styles.css, so it beats a hub's older rail rules. Colours come from each hub's own tokens and
   currentColor, so every hub keeps its own look.

   DIRECTION  a trading desk at night (Yassin's reference, 2026-11-02): near-black with a blue cast and one faint glow in the corner, hairlines instead of boxes, large quiet titles
   PALETTE    bg #08090c · surface #0f1014 · hairline #1f2127 · text #f2f3f5 / #8f94a0 · each hub's accent only for state
   TYPE       Instrument Sans (no serif in hubs); titles 500, tight; figures tabular
   SIGNATURE  the open row's pill brightens toward its end, where a short bar marks it
   MOTION     the sidebar's width, and a product image growing out of its thumbnail
   Dark only: a hub's light theme stays what it was. */

/* ---- The whole hub, dark ---- */
html[data-theme="dark"]{ color-scheme:dark;
  --bg:#08090c; --ink:#f2f3f5; --text-1:#f2f3f5; --muted:#8f94a0; --text-2:#a6aab4; --text-3:#696e79;
  --line:#1f2127; --rowline:#16181d; --hairline:#16181d; --hoverbg:#15171c; --hover:#15171c;
  --card:#0f1014; --paper:#0f1014; --surface:#0f1014; --card-line:#1d1f25; --on-ink:#0b0c10;
  --dk-surface:#16181d; --dk-line:#262930; --dk-text2:#c7cad1;
  --sans:'Instrument Sans',-apple-system,BlinkMacSystemFont,'Segoe UI',system-ui,sans-serif; --serif:var(--sans);
  --red:#f0564a; --red-hover:#d9483d; --neg:#f0564a; --red-tint:rgba(240,86,74,.12); --red-tint-line:rgba(240,86,74,.28);
  --shadow-sm:0 1px 2px rgba(0,0,0,.4); --shadow-card:0 0 0 1px #1d1f25; --shadow-hero:0 0 0 1px #1d1f25;
  --elev-1:0 0 0 1px #1d1f25; --elev-2:0 0 0 1px #2b2e36, 0 18px 40px -22px rgba(0,0,0,.9); --elev-hi:0 0 0 1px #2b2e36, 0 26px 60px -24px rgba(0,0,0,.95);
  --side-bg:#0b0c10; --side-fg:#f2f3f5; --side-muted:#8f94a0; --side-hover:#15171c; --side-active:#1b1d23; --side-line:#1f2127;
  --at-title-font:var(--sans); --at-title-weight:500; --at-title-track:-.035em; --at-figure-font:var(--sans); --at-lead-color:var(--ink);
  --at-paper:#0f1014; --at-raised:#14161b; --at-hero-bg:#14161b; --at-rule:#1f2127; --at-rule-2:#2b2e36; --at-ink-2:#c7cad1; --at-muted-2:#767b86;
  --at-lift:0 0 0 1px #2b2e36, 0 18px 40px -22px rgba(0,0,0,.9);
  --at-topbar-glass:rgba(8,9,12,.72); --at-topbar-shadow:0 1px 0 #16181d;
  --at-rail-on-bg:#f2f3f5; --at-rail-on-fg:#0b0c10; --at-rail-on-shadow:none; --at-rail-on-label:#f2f3f5;
  --at-track:rgba(255,255,255,.05); --at-track-hover:rgba(255,255,255,.09); --at-chip:rgba(255,255,255,.06);
  --at-chosen:#f2f3f5; --at-chosen-fg:#0b0c10; --at-bar:#c7cad1; --at-img-bg:#16181d; --at-rank-bg:rgba(15,16,20,.92); --at-mono-bg:#16181d; --at-vvip-fg:#0b0c10; }
html[data-theme="dark"] body{ color:var(--ink); font-family:var(--sans);
  background:radial-gradient(1100px 620px at 8% -12%, rgba(122,126,204,.17), transparent 62%), #08090c fixed; }
html[data-theme="dark"] #rail{ background:linear-gradient(180deg, #11121a, #0a0b0f 46%); color:var(--side-muted); box-shadow:inset -1px 0 0 #1a1c22; }
html[data-theme="dark"] #topbar{ border-bottom:0; }
html[data-theme="dark"] .panel, html[data-theme="dark"] .kpi, html[data-theme="dark"] .trend-panel,
html[data-theme="dark"] .rep-action, html[data-theme="dark"] .co-driver{ border:0; border-radius:18px;
  background:linear-gradient(180deg, #121319, #0d0e12); box-shadow:0 0 0 1px #1d1f25, inset 0 1px 0 rgba(255,255,255,.035); }
html[data-theme="dark"] .view-title{ font-size:clamp(32px,3vw,44px); font-weight:500; letter-spacing:-.035em; color:#f7f8f9; text-transform:none; }
html[data-theme="dark"] .lead-title{ color:var(--muted); font-weight:400; font-size:13px; letter-spacing:0; text-transform:none; }
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea{ background-color:#0c0d11; color:var(--ink); border-color:#262930; }
html[data-theme="dark"] ::placeholder{ color:var(--text-3); }
/* The theme switch: a track with the sun and the moon at its ends, and a knob that slides to the one in use. */
.theme-btn, html[data-theme="dark"] .theme-btn{ position:relative; display:inline-flex; align-items:center; justify-content:space-between; flex:none; width:60px; height:30px; padding:0 8px;
  border:1px solid var(--line); border-radius:999px; background:color-mix(in srgb, var(--ink) 7%, transparent); color:var(--muted); cursor:pointer;
  transition:background-color .2s ease, border-color .2s ease; }
.theme-btn:hover{ border-color:color-mix(in srgb, var(--ink) 40%, transparent); color:var(--muted); }
.theme-btn:focus-visible{ outline:2px solid var(--ink); outline-offset:2px; }
.theme-btn::before{ content:''; position:absolute; top:3px; left:3px; width:24px; height:22px; border-radius:999px; background:var(--ink);
  box-shadow:0 2px 6px rgba(0,0,0,.28); transition:transform .32s cubic-bezier(.3,1.35,.5,1); }
html[data-theme="dark"] .theme-btn::before{ transform:translateX(30px); }
/* Both icons always show, in both themes, whatever an older hub rule says (#theme-btn beats them): sun left, moon right. */
#theme-btn svg, #theme-btn .ic-sun, #theme-btn .ic-moon{ position:relative; z-index:1; display:block; width:14px; height:14px; flex:none; transition:color .2s ease; }
#theme-btn .ic-sun{ order:1; color:var(--on-ink, #fff); }
#theme-btn .ic-moon{ order:2; color:var(--muted); }
html[data-theme="dark"] #theme-btn .ic-sun{ color:var(--muted); }
html[data-theme="dark"] #theme-btn .ic-moon{ color:var(--on-ink, #0b0c10); }
#theme-btn .theme-lbl{ position:absolute; order:3; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }

/* ---- The sidebar ---- */
#rail{ width:248px; align-items:stretch; gap:0; padding:18px 14px; transition:width .24s cubic-bezier(.22,1,.36,1); overflow-x:hidden; }
/* The logo is the sidebar's centrepiece; the collapse button sits out of its way in the corner. */
.rail-brand{ position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; min-height:84px; padding:6px 0 0; text-align:center; }
.rail-logo{ width:150px; max-width:calc(100% - 64px); height:auto; }
.rail-logo-df{ max-height:72px; width:auto; border-radius:10px; }
.rail-mark .mark{ width:54px; height:54px; }
.rail-word{ font-size:16px; }
.rail-collapse{ position:absolute; top:-4px; inset-inline-end:-2px; flex:none; width:30px; height:30px; display:grid; place-items:center; padding:0; border-radius:9px; cursor:pointer;
  background:transparent; color:inherit; border:1px solid color-mix(in srgb, currentColor 22%, transparent);
  transition:background-color .15s ease, transform .24s cubic-bezier(.22,1,.36,1); }
.rail-collapse svg{ width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.rail-collapse:hover{ background:color-mix(in srgb, currentColor 12%, transparent); }
.rail-collapse:focus-visible{ outline:2px solid currentColor; outline-offset:2px; }

.rail-welcome{ margin:24px 4px 22px; padding-bottom:20px; text-align:center; border-bottom:1px solid color-mix(in srgb, currentColor 16%, transparent); }
.rail-hello{ margin:0; font:500 21px/1.15 var(--sans); letter-spacing:-.02em; color:var(--at-rail-on-label, inherit); }
.rail-who{ margin:6px 0 0; font:400 12px/1.3 var(--sans); opacity:.68; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.rail-groups{ gap:18px; }
.rail-sec{ display:flex; flex-direction:column; gap:3px; }
.rail-sec-label{ margin:0 4px 5px; font:400 12px/1.2 var(--sans); opacity:.62; white-space:nowrap; }
.rail-btn{ flex-direction:row; justify-content:flex-start; gap:11px; min-height:42px; padding:0 12px; border-radius:11px; text-align:start;
  font:500 14px/1.2 var(--sans); letter-spacing:-.005em; white-space:nowrap; transition:background-color .15s ease, color .15s ease; }
.rail-ic, .rail-btn.on .rail-ic{ width:22px; height:22px; flex:none; border-radius:0; background:transparent; box-shadow:none; color:inherit; }
.rail-btn:hover .rail-ic{ background:transparent; }
.rail-btn:active .rail-ic{ transform:none; }
.rail-btn .ni, .rail-btn.on .ni{ width:20px; height:20px; stroke-width:1.8; }
.rail-btn:hover{ background:color-mix(in srgb, currentColor 8%, transparent); }
.rail-btn:active{ background:color-mix(in srgb, currentColor 13%, transparent); }
.rail-btn.on{ font-weight:500; color:var(--at-rail-on-label, inherit);
  background:linear-gradient(95deg, color-mix(in srgb, currentColor 6%, transparent), color-mix(in srgb, currentColor 20%, transparent));
  box-shadow:inset 0 0 0 1px color-mix(in srgb, currentColor 16%, transparent); }
.rail-btn.on::after{ content:''; position:absolute; inset-inline-end:10px; top:50%; width:2px; height:14px; margin-top:-7px; border-radius:2px; background:currentColor; }
.rail-dot{ top:-2px; right:-3px; box-shadow:none; }   /* no ring: it was the old dark rail colour, a black border on the glass (Yassin, 2026-11-08) */
#rail-ind{ display:none; }

/* Switch account at the sidebar's foot. */
.rail-foot{ margin-top:auto; padding-top:18px; }
.rail-foot .switch-acct{ display:flex; align-items:center; justify-content:flex-start; gap:11px; width:100%; min-height:42px; padding:0 12px; border:0; border-top:1px solid color-mix(in srgb, currentColor 16%, transparent);
  border-radius:0; background:transparent; color:inherit; font:500 14px/1.2 var(--sans); text-decoration:none; white-space:nowrap; transition:color .15s ease, background-color .15s ease; }
.rail-foot .switch-acct:hover{ background:color-mix(in srgb, currentColor 8%, transparent); }
.rail-foot .switch-acct .ni{ width:20px; height:20px; flex:none; }
@media (min-width:761px){ .topbar-me .switch-acct{ display:none; } }
body.rail-min .rail-foot .switch-acct{ justify-content:center; padding:0; }
body.rail-min .rail-foot .switch-acct span{ display:none; }

/* Closed: icons only. Every row still names itself through its title and aria-label. */
body.rail-min #rail{ width:76px; }
body.rail-min .rail-logo, body.rail-min .rail-mark, body.rail-min .rail-word,
body.rail-min .rail-welcome, body.rail-min .rail-lbl, body.rail-min .rail-sec-label{ display:none; }
body.rail-min .rail-brand{ min-height:30px; padding:0; margin-bottom:28px; }
body.rail-min .rail-collapse{ position:static; }
body.rail-min .rail-collapse{ transform:rotate(180deg); }
body.rail-min .rail-btn{ justify-content:center; padding:0; }
body.rail-min .rail-btn.on::after{ inset-inline-end:5px; }
body.rail-min .rail-sec + .rail-sec{ padding-top:14px; border-top:1px solid color-mix(in srgb, currentColor 14%, transparent); }

@media (max-width:1100px){ #rail{ width:208px; } }

/* ---- Switching pages: the page glides in; the lit row and tab change softly. ---- */
#content > section.page-in-up{ animation:pageInUp .42s cubic-bezier(.22,1,.36,1) backwards; }
#content > section.page-in-next{ animation:pageInNext .42s cubic-bezier(.22,1,.36,1) backwards; }
#content > section.page-in-prev{ animation:pageInPrev .42s cubic-bezier(.22,1,.36,1) backwards; }
@keyframes pageInUp{ from{ opacity:0; transform:translateY(22px) scale(.992); } }
@keyframes pageInNext{ from{ opacity:0; transform:translateX(34px); } }
@keyframes pageInPrev{ from{ opacity:0; transform:translateX(-34px); } }
[dir="rtl"] #content > section.page-in-next{ animation-name:pageInPrev; }
[dir="rtl"] #content > section.page-in-prev{ animation-name:pageInNext; }
#subnav .nav-item{ transition:color .2s ease; }

/* ---- The button worth pressing ---- */
.spark-btn{ position:relative; overflow:hidden; display:inline-flex; align-items:center; gap:8px; isolation:isolate;
  transition:transform .2s cubic-bezier(.2,1.25,.4,1), box-shadow .2s ease, background-color .2s ease; }
.spark-btn .ni{ width:15px; height:15px; flex:none; transition:transform .45s cubic-bezier(.2,1.25,.4,1); }
.spark-btn::before{ content:''; position:absolute; z-index:-1; top:0; bottom:0; left:-60%; width:50%; transform:skewX(-20deg);
  background:linear-gradient(90deg, transparent, rgba(255,255,255,.38), transparent); }
.spark-btn:hover:not(:disabled){ transform:translateY(-2px) scale(1.025); box-shadow:0 14px 28px -12px rgba(0,0,0,.55); }
.spark-btn:hover:not(:disabled) .ni{ transform:rotate(72deg) scale(1.18); }
.spark-btn:hover:not(:disabled)::before{ left:115%; transition:left .65s cubic-bezier(.22,1,.36,1); }
.spark-btn:active:not(:disabled){ transform:translateY(0) scale(.98); }
.spark-btn:disabled::before{ left:-60%; animation:spark-busy 1.5s linear infinite; }
.spark-btn:disabled .ni{ animation:spark-spin 2.4s linear infinite; }
@keyframes spark-busy{ to{ left:115%; } }
@keyframes spark-spin{ to{ transform:rotate(360deg); } }

@media (prefers-reduced-motion: reduce){
  #rail, .spark-btn, .spark-btn .ni, .rail-collapse, .theme-btn::before{ transition:none; }
  .spark-btn::before, .spark-btn:disabled .ni{ animation:none; display:none; }
  .spark-btn:disabled .ni{ display:inline-block; }
  .spark-btn:hover:not(:disabled){ transform:none; }
}

/* Paper is white: a printed voucher never follows the dark theme. */
@media print{
  html[data-theme="dark"]{ color-scheme:light; --bg:#fff; --card:#fff; --paper:#fff; --surface:#fff; --ink:#141516; --text-1:#141516; --muted:#70726e; --text-2:#44464a;
    --line:#e3e3de; --rowline:#eeeeea; --card-line:#e9e9e4; --on-ink:#fff; --dk-text2:#44464a; --dk-surface:#f4f4f2; --dk-line:#e3e3de; }
  html[data-theme="dark"] body{ background:#fff; color:#141516; }
  #rail{ display:none; }
}


/* =====================================================================================
   THE macOS LAYER (Yassin, 2026-11-04: "any UI update is universal"): the hubs as a native
   Mac app, on every Figi hub at once. Shell: a frosted sidebar with a filled rounded selection,
   a frosted toolbar, the pill rows as segmented controls, 8 px controls with a soft raise and a
   wide soft focus ring, thin scrollbars, the theme wipe (theme.js swap). Pages: the Shopping
   hero TILES and the ruled "Most missed" ledger, and the Messages-style Assistant window.
   Both themes. Every colour is a token: the --mac-* roles below fall back from the Figi Trade
   names (--text-1 ...) to the brand hubs' (--ink, --muted, --red), so one rule fits every hub.
   The only literal colours are the three window lights (system colours, not brand colours).
   Each hub's old rules for the same selectors are reset at the end, so a brand hub's styles.css
   needs no edit when the look changes: change it HERE, run tools/sync-hub-core.mjs.
   ===================================================================================== */
:root{
  --mac-ink:var(--text-1, var(--ink)); --mac-muted:var(--text-2, var(--muted)); --mac-faint:var(--text-3, var(--muted));
  --mac-bad:var(--bad, var(--red)); --mac-warn:var(--warn, var(--at-warn)); --mac-scrim:var(--scrim, rgba(0,0,0,.5));
  --mac-bg:var(--bg); --mac-ease:cubic-bezier(.22,1,.36,1);
  --mac-close:#ff5f57; --mac-min:#febc2e; --mac-zoom:#28c840;
  --mac-r:8px;
  --mac-raise:0 1px 2px color-mix(in oklch, var(--mac-ink) 10%, transparent), inset 0 1px 0 color-mix(in oklch, var(--mac-bg) 60%, transparent);
  --mac-ring:0 0 0 3.5px color-mix(in oklch, var(--mac-ink) 16%, transparent);
  --mac-glass:color-mix(in oklch, var(--at-paper) 72%, transparent);
}
html[data-theme="dark"]{ --mac-raise:0 1px 2px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06); }

/* ---- The theme switch: the new theme spreads out of the switch (theme.js swap) ---- */
html.theme-wipe::view-transition-old(root), html.theme-wipe::view-transition-new(root){ animation:none; mix-blend-mode:normal; }
html.theme-wipe::view-transition-old(root){ z-index:1; }
html.theme-wipe::view-transition-new(root){ z-index:2; animation:macThemeWipe .55s cubic-bezier(.22,1,.36,1); }
@keyframes macThemeWipe{ from{ clip-path:circle(0 at var(--vt-x, 50%) var(--vt-y, 0)); } to{ clip-path:circle(var(--vt-r, 150vmax) at var(--vt-x, 50%) var(--vt-y, 0)); } }
/* No view transitions (Firefox): every colour crossfades instead. */
html.theme-fade, html.theme-fade *, html.theme-fade *::before, html.theme-fade *::after{
  transition:background-color .4s ease, color .4s ease, border-color .4s ease, box-shadow .4s ease, fill .4s ease, stroke .4s ease !important; }

/* ---- Thin overlay scrollbars ---- */
html{ scrollbar-width:thin; scrollbar-color:color-mix(in oklch, var(--mac-ink) 22%, transparent) transparent; }
#content *, #as-log, #as-sessions{ scrollbar-width:thin; scrollbar-color:color-mix(in srgb, var(--mac-ink) 22%, transparent) transparent; }

/* ---- Sidebar: the glass pane (Yassin, 2026-11-05, approved on Figi Trade). A frosted pane floating on the page, a misty
   wallpaper tint behind it, a plain collapse button in the top-right corner (2026-11-07: the traffic lights are gone), section
   labels in grey, the open row a pane of glass. Same in every hub and in the client template. ---- */
#rail{ --glass-ink:#1d1f23; --glass-icon:#3f4348; --glass-label:rgba(29,31,35,.55); --glass-rule:rgba(29,31,35,.1);
  --glass-hover:rgba(255,255,255,.28);
  --glass-on:rgba(255,255,255,.52); --glass-on-ring:inset 0 0 0 1px rgba(255,255,255,.8), 0 1px 3px rgba(40,52,64,.1);
  position:sticky; top:10px; height:calc(100vh - 20px); width:256px; margin:10px 0 10px 10px; padding:18px 12px 12px; isolation:isolate; overflow:hidden;
  border-radius:24px; color:var(--glass-ink);
  background:linear-gradient(180deg, rgba(226,235,241,.78), rgba(214,224,228,.72) 42%, rgba(205,211,205,.74) 72%, rgba(217,221,218,.8));
  backdrop-filter:blur(30px) saturate(1.6); -webkit-backdrop-filter:blur(30px) saturate(1.6);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.6), 0 0 0 1px rgba(40,52,64,.1), 0 18px 44px -24px rgba(40,52,64,.4); }
/* The slow light behind the glass: two soft layers, larger than the pane, drifting on different clocks. */
#rail::before, #rail::after{ content:''; position:absolute; inset:-30%; z-index:-1; pointer-events:none; will-change:transform; }
#rail::before{ background:radial-gradient(46% 24% at 30% 56%, rgba(88,108,78,.42), transparent 72%), radial-gradient(40% 20% at 72% 22%, rgba(255,255,255,.8), transparent 72%);
  animation:glassDriftA 20s ease-in-out infinite alternate; }
#rail::after{ background:radial-gradient(44% 20% at 68% 76%, rgba(96,128,152,.36), transparent 72%), radial-gradient(34% 16% at 26% 26%, rgba(150,180,200,.3), transparent 72%);
  animation:glassDriftB 27s ease-in-out infinite alternate; }
@keyframes glassDriftA{ from{ transform:translate3d(-11%,-13%,0) scale(1); } to{ transform:translate3d(12%,14%,0) scale(1.14); } }
@keyframes glassDriftB{ from{ transform:translate3d(11%,13%,0) scale(1.1); } to{ transform:translate3d(-12%,-14%,0) scale(.94); } }
html[data-theme="dark"] #rail{ --glass-ink:#ececee; --glass-icon:#c9cace; --glass-label:rgba(236,236,238,.5); --glass-rule:rgba(255,255,255,.09);
  --glass-hover:rgba(255,255,255,.05);
  --glass-on:rgba(255,255,255,.04); --glass-on-ring:inset 0 0 0 1px rgba(255,255,255,.15), inset 0 1px 0 rgba(255,255,255,.08), 0 1px 2px rgba(0,0,0,.4);
  color:var(--glass-ink);
  background:linear-gradient(180deg, rgba(50,51,54,.82), rgba(32,33,35,.84) 42%, rgba(24,25,27,.88));
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.09), 0 0 0 1px rgba(0,0,0,.5), 0 18px 44px -22px rgba(0,0,0,.85); }
html[data-theme="dark"] #rail::before{ background:radial-gradient(44% 22% at 72% 18%, rgba(255,255,255,.24), transparent 72%), radial-gradient(50% 24% at 26% 60%, rgba(190,205,220,.15), transparent 72%); }
html[data-theme="dark"] #rail::after{ background:radial-gradient(46% 22% at 66% 78%, rgba(150,175,200,.22), transparent 72%), radial-gradient(36% 17% at 24% 30%, rgba(255,255,255,.13), transparent 72%); }

/* The collapse button (Yassin, 2026-11-07: "remove the macos three dots from the sidebar and turn into a normal
   collapse icon on the top right"): a sidebar-panel icon in the pane's top-right corner, centred at the top when the
   sidebar is closed. Quiet until hovered, like the rest of the pane's buttons. */
#rail .rail-brand{ position:static; flex-direction:column; align-items:center; justify-content:center; gap:8px; min-height:0; padding:34px 8px 0; text-align:center; }
#rail .rail-mark .mark{ width:46px; height:46px; }
#rail .rail-word{ font:500 15px/1.1 var(--sans); letter-spacing:-.01em; color:var(--glass-ink); }
#rail .rail-logo, #rail .rail-logo-df{ width:auto; max-width:150px; max-height:60px; height:auto; }
#rail .rail-logo-df{ border-radius:10px; }
#rail .rail-collapse{ position:absolute; top:12px; inset-inline-end:12px; inset-inline-start:auto; width:32px; height:32px; padding:0; border:0; border-radius:9px;
  display:grid; place-items:center; color:var(--glass-icon); background:transparent; box-shadow:none; transform:none; cursor:pointer;
  transition:background-color .15s ease, color .15s ease; }
#rail .rail-collapse svg{ width:18px; height:18px; margin:0; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; transform:none; }
#rail .rail-collapse:hover{ color:var(--glass-ink); background:var(--glass-hover); }
#rail .rail-collapse:focus-visible{ outline:2px solid var(--glass-ink); outline-offset:1px; }

#rail .rail-welcome{ margin:16px 8px 20px; padding:0 0 16px; text-align:center; border-bottom:1px solid var(--glass-rule); }
#rail .rail-hello{ font:500 13px/1.2 var(--sans); letter-spacing:0; color:var(--glass-ink); }
#rail .rail-who{ margin-top:3px; font-size:11.5px; color:var(--glass-label); opacity:1; }

#rail .rail-groups{ gap:20px; }
#rail .rail-sec{ gap:2px; }
#rail .rail-sec-label{ margin:0 12px 5px; font:500 12px/1.2 var(--sans); color:var(--glass-label); opacity:1; }
#rail .rail-btn{ min-height:38px; padding:0 12px; gap:10px; border-radius:12px; font:500 14px/1.2 var(--sans); color:var(--glass-ink); background:transparent; box-shadow:none;
  transition:background-color .16s ease, box-shadow .16s ease; }
#rail .rail-btn .ni, #rail .rail-btn.on .ni{ width:18px; height:18px; color:var(--glass-icon); }
#rail .rail-btn:hover{ background:var(--glass-hover); }
#rail .rail-btn.on, #rail .rail-btn.on:hover{ background:var(--glass-on); color:var(--glass-ink); box-shadow:var(--glass-on-ring); }
#rail .rail-btn.on::after{ display:none; }
#rail .rail-btn:focus-visible{ outline:2px solid var(--glass-ink); outline-offset:1px; }

#rail .rail-foot .switch-acct, html[data-theme="dark"] #rail .rail-foot .switch-acct{ min-height:38px; padding:0 12px; border:0; border-radius:12px; background:transparent; box-shadow:none; font:500 14px/1.2 var(--sans); color:var(--glass-ink); }
#rail .rail-foot{ padding-top:10px; border-top:1px solid var(--glass-rule); }
#rail .rail-foot .switch-acct:hover{ background:var(--glass-hover); }

body.rail-min #rail{ width:76px; padding-inline:10px; }
body.rail-min #rail .rail-brand{ padding:0; min-height:30px; margin-bottom:20px; }
body.rail-min #rail .rail-collapse{ top:12px; inset-inline-end:auto; inset-inline-start:calc(50% - 16px); }
body.rail-min #rail .rail-brand{ padding-top:48px; }
/* The pane's width glides open or shut after a click (body.rail-anim, hub-ui.js), so a page that loads closed does not move. */
body.rail-anim #rail{ transition:width .45s cubic-bezier(.22,1,.36,1); }
body.rail-min #rail .rail-btn{ padding:0; }
@media (prefers-reduced-motion: reduce){ #rail .rail-btn, #rail .rail-collapse, body.rail-anim #rail{ transition:none; } #rail::before, #rail::after{ animation:none; } }

/* ---- Toolbar: frosted, flat ---- */
#topbar{ background:color-mix(in oklch, var(--mac-bg) 76%, transparent); backdrop-filter:blur(24px) saturate(1.4); -webkit-backdrop-filter:blur(24px) saturate(1.4); }
/* The band runs the FULL window width (Yassin, 2026-11-07: "the black horizontal header should cover full width from
   the beginning"): #topbar starts where the floating sidebar ends, so this pseudo carries the same background, blur,
   hairline and shadow a whole viewport to the LEFT of it, under the sidebar and the strip beside it. The sidebar
   (z-index 20) sits on top of it (#topbar is 15). Nothing to measure, so it holds while the pane glides open or shut,
   when it is collapsed, while scrolling (inherit follows #topbar.scrolled), and on a phone, where it is simply off screen. */
#topbar::before{ content:''; position:absolute; top:0; bottom:0; right:100%; width:100vw; pointer-events:none;
  background:inherit; border-bottom:inherit; box-shadow:inherit; transition:inherit;
  backdrop-filter:blur(24px) saturate(1.4); -webkit-backdrop-filter:blur(24px) saturate(1.4); }
.switch-acct{ border-radius:7px; padding:5px 11px; box-shadow:var(--mac-raise); }
#subnav .nav-item{ font-size:13px; }

/* ---- Sheets: a hairline and a deep, soft shadow ---- */
.panel, .trend-panel, .ledger, .strip, .square, .brand-card, .co-drv, .drawer{ border-radius:12px; }
html[data-theme="dark"] .panel, html[data-theme="dark"] .trend-panel, html[data-theme="dark"] .co-driver{ border-radius:12px; }
.drawer, #ov-ad-panel:not([hidden]), .adp-pop{ box-shadow:0 0 0 1px var(--line), 0 30px 80px -30px var(--mac-scrim); }

/* ---- Segmented controls: the pill rows (shared ids) and .seg groups ---- */
#tabs, #st-period-tabs, #stats-tabs, #fin-pills, #fb-period-tabs, #filters, #o-filters, #yo-filters, .gf-gran, .fin-gran{ padding:2px; border-radius:9px; background:var(--at-track); }
#tabs .tab, #st-period-tabs .tab, #stats-tabs .tab, #fin-pills .tab, #fb-period-tabs .tab, #filters .chip, #o-filters .chip, #yo-filters .chip, .gf-gran .seg-btn, .fin-gran .seg-btn{
  min-height:28px; padding:0 12px; border-radius:7px; font:500 12.5px/1 var(--sans); letter-spacing:0; text-transform:none; }
#tabs .tab.on, #st-period-tabs .tab.on, #stats-tabs .tab.on, #fin-pills .tab.on, #fb-period-tabs .tab.on, #filters .chip.on, #o-filters .chip.on, #yo-filters .chip.on, .gf-gran .seg-btn.on, .fin-gran .seg-btn.on{
  letter-spacing:0; background:var(--at-paper); color:var(--mac-ink); }
.slide-ind, .seg .slide-ind{ border-radius:7px; background:var(--at-paper); box-shadow:var(--at-ring), var(--mac-raise); }
.slide-on > .on{ color:var(--mac-ink) !important; }
.slide-fresh > *{ transition:none !important; }   /* a rebuilt row's first frames (slide.js) */
#cu-sort .seg-btn, #co-period .seg-btn{ border-radius:7px; }

/* ---- Controls: 8 px radius, the soft raise, the wide soft focus ring ---- */
.refresh-btn, .export, .exp-cancel, .more-btn, .co-hand-go, .sa-btn, .cu-chip, .view-link, .drawer-close, .drawer-btn, button.need, .brand-card .bc-open{ border-radius:var(--mac-r); }
#cu-search, .cu-form input, .cu-form select, .cu-form textarea, .co-hand-in input, .co-hand-in select{ border-radius:var(--mac-r); }
#cu-search:focus-visible, .cu-form input:focus-visible, .cu-form select:focus-visible, .cu-form textarea:focus-visible, .co-hand-in input:focus-visible, .co-hand-in select:focus-visible{
  outline:0; box-shadow:inset 0 0 0 1px var(--mac-faint), var(--mac-ring); }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible{ outline:0; box-shadow:var(--mac-ring); }
.rail-btn:focus-visible, .theme-btn:focus-visible, .rail-collapse:focus-visible{ outline:0; box-shadow:var(--mac-ring); }
.status, .brand-chip{ border-radius:999px; }

/* ---- Phone menu as a sheet ---- */
@media (max-width:899px){
  #phone-menu{ color:var(--mac-ink); background:linear-gradient(180deg, rgba(232,239,244,.96), rgba(222,230,233,.96) 45%, rgba(214,220,215,.97)); backdrop-filter:blur(30px) saturate(1.6); -webkit-backdrop-filter:blur(30px) saturate(1.6); }
  html[data-theme="dark"] #phone-menu{ background:linear-gradient(180deg, rgba(50,51,54,.97), rgba(32,33,35,.97) 42%, rgba(24,25,27,.98)); }
  .pm-item{ min-height:44px; border-radius:7px; }
  .pm-item, .pm-head{ color:var(--mac-ink); }
  .pm-head{ color:var(--mac-muted); }
  .pm-item{ border-radius:12px; }
  .pm-item.on::before{ content:none; }
  .pm-item.on{ background:rgba(255,255,255,.55); color:var(--mac-ink); box-shadow:inset 0 0 0 1px rgba(255,255,255,.8), 0 1px 3px rgba(40,52,64,.1); }
  html[data-theme="dark"] .pm-item.on{ background:rgba(255,255,255,.05); box-shadow:inset 0 0 0 1px rgba(255,255,255,.15), inset 0 1px 0 rgba(255,255,255,.08); }
}

@media (prefers-reduced-motion:reduce){
  html.theme-wipe::view-transition-new(root){ animation:none; }
  html.theme-fade, html.theme-fade *{ transition:none !important; }
}

/* ---- Shopping: hero tiles, the buy-list ledger, the Most missed ledger ---- */
.shop-row .thumb, .sh-panel .thumb, .mp-grid .thumb{ width:44px; height:44px; flex:none; object-fit:cover; border-radius:10px; background:var(--at-img-bg);
  box-shadow:inset 0 0 0 1px color-mix(in oklch, var(--mac-ink) 7%, transparent); }

/* Hero tiles */
.shop-heroes{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:12px; }
.shop-hero{ position:relative; display:flex; flex-direction:column; min-width:0; overflow:hidden; background:var(--at-paper); border-radius:14px;
  box-shadow:var(--at-ring); color:inherit; text-decoration:none; transition:box-shadow .18s var(--mac-ease), transform .18s var(--mac-ease); }
a.shop-hero:hover{ box-shadow:var(--at-lift); transform:translateY(-1px); }
.shop-hero-img{ display:grid; place-items:center; aspect-ratio:4/3; overflow:hidden; background:var(--at-img-bg); }
#shopping-view .shop-hero-img .thumb, .shop-hero-img .thumb{ width:100%; height:100%; border-radius:0; box-shadow:none; }
#shopping-view .shop-hero-img span.thumb, .shop-hero-img span.thumb{ width:38%; height:38%; border-radius:14px; background:color-mix(in oklch, var(--mac-ink) 5%, transparent); }
.shop-hero-body{ display:flex; flex-direction:column; align-items:flex-start; gap:9px; padding:12px 14px 14px; }
.shop-hero-row{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; width:100%; }
.shop-share{ flex:none; text-align:end; font:500 20px/1 var(--sans); letter-spacing:-.02em; color:var(--mac-ink); font-variant-numeric:tabular-nums; }
.shop-share small{ display:block; margin-top:3px; font-size:10.5px; font-weight:400; letter-spacing:0; color:var(--mac-faint); }
.shop-hero-stats{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:6px; width:100%; padding-top:9px; border-top:1px solid var(--at-rule);
  font-size:11px; color:var(--mac-faint); }
.shop-hero-stats span{ min-width:0; }
.shop-hero-stats b{ display:block; margin-bottom:1px; font-weight:500; font-size:13px; color:var(--mac-ink); font-variant-numeric:tabular-nums; }
.shop-stock, .status-chip, .cover-chip{ display:inline-flex; align-items:center; gap:6px; flex:none; min-height:22px; padding:0 9px 0 7px; border-radius:999px;
  background:var(--at-chip); font:500 11.5px/1 var(--sans); color:var(--mac-muted); white-space:nowrap; }
.shop-stock::before, .status-chip::before, .cover-chip::before{ content:''; width:6px; height:6px; border-radius:50%; background:var(--mac-faint); }
.shop-stock.low, .cover-chip.low{ color:var(--mac-warn); }
.shop-stock.low::before, .cover-chip.low::before{ background:var(--mac-warn); }
.shop-stock.oos, .status-chip.oos, .cover-chip.urgent{ background:var(--at-bad-tint); color:var(--mac-bad); }
.shop-stock.oos::before, .status-chip.oos::before, .cover-chip.urgent::before{ background:var(--mac-bad); }
.shop-star{ font-size:11px; color:var(--mac-faint); }
.shop-name{ flex:1; min-width:0; font:500 13.5px/1.3 var(--sans); color:var(--mac-ink); overflow-wrap:anywhere; }
.shop-name a{ color:inherit; text-decoration:none; }
.shop-name a:hover{ text-decoration:underline; }
.shop-sub{ display:block; margin-top:2px; font-size:12px; font-weight:400; color:var(--mac-muted); }
.shop-sel{ display:inline-flex; align-items:center; justify-content:center; flex:none; min-width:28px; min-height:28px; cursor:pointer; }
.shop-sel input{ width:17px; height:17px; margin:0; accent-color:var(--mac-ink); cursor:pointer; }
.shop-sel.hero{ position:absolute; top:8px; inset-inline-end:8px; z-index:2; border-radius:8px; background:color-mix(in oklch, var(--at-paper) 82%, transparent);
  backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px); box-shadow:var(--at-ring); }

/* Vendor bar + the buy-list ledger */
.shop-bar{ display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; margin:0 0 10px; }
.shop-bar label{ font:500 12px var(--sans); color:var(--mac-muted); }
.shop-bar select{ min-height:32px; max-width:100%; padding:0 26px 0 10px; border:0; border-radius:var(--mac-r); background:var(--at-raised); box-shadow:var(--at-ring), var(--mac-raise);
  font:500 13px var(--sans); color:var(--mac-ink); appearance:none; -webkit-appearance:none; cursor:pointer;
  background-image:linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:right 13px top 13px, right 9px top 13px; background-size:4px 4px, 4px 4px; background-repeat:no-repeat; }
.shop-bar select:focus-visible{ outline:0; box-shadow:var(--at-ring), var(--mac-ring); }
.shop-summary{ display:flex; flex-wrap:wrap; gap:4px 16px; margin-inline-start:auto; font-size:12.5px; color:var(--mac-muted); }
.shop-summary strong{ font-weight:600; color:var(--mac-ink); font-variant-numeric:tabular-nums; }
.shop-group-title{ margin:18px 0 0; padding:0 0 6px; font:500 12px var(--sans); color:var(--mac-muted); }
.shop-row{ display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; padding:10px 0; border-top:1px solid var(--at-rule); }
.shop-row .shop-name{ flex:1 1 180px; }
.shop-qty{ margin-left:auto; flex:none; min-width:72px; text-align:end; font:500 17px/1.1 var(--sans); letter-spacing:-.02em; color:var(--mac-ink); font-variant-numeric:tabular-nums; }
.shop-qty small{ display:block; margin-top:2px; font-weight:400; font-size:11px; letter-spacing:0; color:var(--mac-faint); }
.shop-toggle{ min-height:34px; margin-top:12px; padding:0 14px; border:0; border-radius:var(--mac-r); background:var(--at-raised); box-shadow:var(--at-ring), var(--mac-raise);
  font:500 12.5px var(--sans); color:var(--mac-ink); cursor:pointer; }
.shop-toggle:hover{ background:var(--at-track-hover); }
.shop-export-bar{ position:sticky; bottom:12px; z-index:5; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px 14px;
  margin:0 0 20px; padding:10px 12px 10px 16px; border-radius:14px; background:color-mix(in oklch, var(--at-paper) 84%, transparent);
  backdrop-filter:blur(20px) saturate(1.4); -webkit-backdrop-filter:blur(20px) saturate(1.4); box-shadow:var(--at-ring), 0 18px 40px -18px var(--mac-scrim); }
.shop-sel-count{ font:600 13px var(--sans); color:var(--mac-ink); }
.shop-export-actions{ display:flex; flex-wrap:wrap; gap:8px; }

.shop-waiting{ max-width:620px; margin:8px 0 32px; padding:20px; background:var(--at-paper); border-radius:14px; box-shadow:var(--at-ring); }
.shop-wait-title{ margin:0 0 6px; font:500 17px/1.25 var(--sans); letter-spacing:-.01em; color:var(--mac-ink); }
.shop-wait-body{ margin:0 0 12px; font-size:13.5px; line-height:1.5; color:var(--mac-muted); }
.shop-wait-body strong{ font-weight:600; color:var(--mac-ink); }

/* Most missed and Auto-drafted (FigiHome only): the pieces of a product tile (the tile layout itself is
   further down, "Most missed: tiles"). The demand count is the tile's figure; the hairline bar shows it
   against the most-asked product. */
.mp-grid .dead-name{ flex:1; min-width:0; font:500 13.5px/1.3 var(--sans); color:var(--mac-ink); overflow-wrap:anywhere; }
.mp-grid .dead-sub{ display:block; margin-top:2px; font-size:11.5px; font-weight:400; color:var(--mac-muted); }
.mp-count{ flex:none; width:40px; text-align:center; font:500 18px/1 var(--sans); letter-spacing:-.02em; color:var(--mac-ink); font-variant-numeric:tabular-nums; }
.mp-count small{ display:block; margin-top:3px; font-size:10px; font-weight:400; letter-spacing:0; color:var(--mac-faint); }
.mp-link{ color:inherit; text-decoration:none; }
.mp-link:hover{ text-decoration:underline; }
.mp-meta{ display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:3px; font-size:11.5px; font-weight:400; color:var(--mac-muted); }
.mp-state{ display:inline-flex; align-items:center; min-height:18px; padding:0 7px; border-radius:999px; background:var(--at-chip); font:500 11px/1 var(--sans); color:var(--mac-muted); }
.mp-state-out{ background:var(--at-bad-tint); color:var(--mac-bad); }
.mp-bar{ display:block; width:min(100%, 260px); height:3px; margin-top:7px; border-radius:2px; background:var(--at-rule); overflow:hidden; }
.mp-bar i{ display:block; width:var(--demand, 0%); height:100%; border-radius:2px; background:var(--mac-ink); }
.mp-wait{ display:none; flex:none; text-align:end; font:400 11.5px/1.3 var(--sans); color:var(--mac-muted); white-space:nowrap; }
.mp-wait b{ display:block; font-weight:500; font-size:14px; color:var(--mac-ink); font-variant-numeric:tabular-nums; }
.mp-wait small{ display:block; font-size:11px; color:var(--mac-faint); }
.mp-x{ flex:none; width:30px; height:30px; border:0; border-radius:var(--mac-r); background:none; color:var(--mac-faint); font:500 13px var(--sans); cursor:pointer;
  transition:background-color .15s ease, color .15s ease, opacity .15s ease; }
.mp-x:hover{ background:var(--at-track); color:var(--mac-ink); }
.mp-off{ opacity:.55; }
.mp-off .mp-bar{ display:none; }
.mp-toggle, #shopping-view .view-all{ display:block; min-height:36px; margin-top:8px; padding:0 4px; border:0; background:none;
  font:500 12.5px var(--sans); color:var(--mac-muted); cursor:pointer; }
.mp-grid > .view-all{ margin:0; padding:0 14px; text-align:start; border-top:1px solid var(--at-rule); }
.mp-toggle:hover, #shopping-view .view-all:hover{ color:var(--mac-ink); text-decoration:underline; }
@media (min-width:600px){ .shop-heroes{ grid-template-columns:repeat(3, minmax(0,1fr)); } }
@media (min-width:900px){
  .shop-heroes{ grid-template-columns:repeat(auto-fill, minmax(196px, 1fr)); }
  .shop-row{ flex-wrap:nowrap; padding:10px 8px; }
  .shop-row .shop-name{ flex:1 1 auto; }
  .mp-wait{ display:block; min-width:92px; }
}
@media (hover:hover){
  .mp-x{ opacity:0; }
  .dead:hover .mp-x, .mp-x:focus-visible, .mp-off .mp-x{ opacity:1; }
}


/* ---- Assistant: the window (restyled Codex-like below, "THE ANALYST, CODEX STYLE", 2026-11-07) ---- */
.panel.as-panel{ display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:auto auto minmax(0,1fr); grid-template-areas:"bar" "rail" "main";
  height:calc(100dvh - 190px); min-height:460px; padding:0; overflow:hidden; border:0; border-radius:14px; background:var(--at-paper);
  box-shadow:var(--at-ring), 0 30px 80px -34px var(--mac-scrim); }
html[data-theme="dark"] .panel.as-panel{ border-radius:14px; background:var(--at-paper); box-shadow:var(--at-ring), inset 0 1px 0 color-mix(in srgb, var(--mac-ink) 5%, transparent), 0 30px 80px -34px var(--mac-scrim); }

/* Title bar */
.as-bar{ grid-area:bar; display:flex; align-items:center; gap:10px; min-height:44px; padding:0 14px; border-bottom:1px solid var(--at-rule);
  background:color-mix(in srgb, var(--at-paper) 72%, transparent); backdrop-filter:blur(20px) saturate(1.4); -webkit-backdrop-filter:blur(20px) saturate(1.4); }
.as-title{ flex:1; min-width:0; text-align:center; font:600 13px/1.2 var(--sans); color:var(--mac-ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; unicode-bidi:plaintext; }
.as-bar::after{ content:''; flex:none; width:50px; }

/* Sidebar */
#as-rail{ grid-area:rail; display:flex; flex-direction:row; align-items:center; gap:4px; min-width:0; min-height:0; overflow:hidden;
  border-bottom:1px solid var(--at-rule); background:color-mix(in srgb, var(--mac-bg) 55%, var(--at-paper)); }
.as-new{ flex:none; min-height:30px; margin:8px 6px 8px 10px; padding:0 12px; border:0; border-radius:var(--mac-r); background:var(--at-raised);
  box-shadow:var(--at-ring), var(--mac-raise); color:var(--mac-ink); font:500 12.5px var(--sans); white-space:nowrap; cursor:pointer;
  transition:background-color .15s var(--mac-ease), color .15s var(--mac-ease); }
.as-new:hover{ background:var(--mac-ink); color:var(--mac-bg); }
.as-rail-label{ display:none; padding:6px 18px 4px; font:600 11px/1.2 var(--sans); color:var(--mac-faint); }
#as-sessions{ display:flex; flex-direction:row; flex:1; min-width:0; overflow-x:auto; overflow-y:hidden; scrollbar-width:none; }
#as-sessions::-webkit-scrollbar{ display:none; }
.as-sess{ position:relative; display:flex; align-items:center; gap:8px; flex:none; max-width:180px; min-height:40px; margin:4px 2px; padding:6px 10px;
  border-radius:7px; font-family:var(--sans); cursor:pointer; transition:background-color .12s ease; }
.as-sess:hover{ background:var(--at-track); }
.as-sess.on{ background:var(--mac-ink); color:var(--mac-bg); }
.as-sess-title{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; color:var(--mac-muted); }
.as-sess.on .as-sess-title{ color:inherit; font-weight:500; }
.as-sess-date{ display:none; flex:none; font-size:11px; color:var(--mac-faint); }
.as-sess.on .as-sess-date{ color:inherit; opacity:.7; }
.as-sess-del{ flex:none; min-width:22px; min-height:22px; padding:0 4px; border:0; border-radius:6px; background:none; font:500 11px var(--sans); color:inherit; opacity:.6; cursor:pointer; }
.as-sess-del:hover{ background:color-mix(in srgb, currentColor 14%, transparent); opacity:1; }
.as-sess-del.arm{ background:var(--at-bad-tint); color:var(--mac-bad); font-size:10.5px; font-weight:600; padding:3px 8px; opacity:1; }
.as-rail-empty{ padding:12px 14px; font:400 12px var(--sans); color:var(--mac-faint); white-space:nowrap; }

/* The conversation */
.as-main{ grid-area:main; display:flex; flex-direction:column; min-width:0; min-height:0; background:var(--at-paper); }
#as-log{ flex:1; min-height:0; overflow-y:auto; display:flex; flex-direction:column; gap:6px; padding:18px 16px; }
.as-msg{ max-width:82%; padding:9px 13px; border:0; border-radius:18px; font:400 13.5px/1.5 var(--sans); color:var(--mac-ink); overflow-wrap:anywhere;
  animation:asPop .28s cubic-bezier(.2,1.2,.4,1) backwards; transform-origin:50% 100%; }
@keyframes asPop{ from{ opacity:0; transform:translateY(8px) scale(.94); } }
.as-msg bdi{ unicode-bidi:plaintext; display:block; }
/* Each line and each cell takes its own direction: an answer mixes Arabic lines with brand names. */
.as-msg bdi > div, .as-table th, .as-table td{ unicode-bidi:plaintext; text-align:start; }
.as-user{ align-self:flex-end; background:var(--mac-ink); color:var(--mac-bg); border-end-end-radius:5px; }
.as-bot{ align-self:flex-start; background:color-mix(in srgb, var(--mac-ink) 8%, var(--at-paper)); border-end-start-radius:5px; }
.as-user + .as-user, .as-bot + .as-bot{ margin-top:-2px; }
/* The bullet is text, not a positioned dot, so it lands on the line's own start in either direction. */
.as-li::before{ content:'•'; margin-inline-end:8px; color:var(--mac-faint); }
.as-gap{ height:6px; }
.as-loading{ padding:20px; font:400 13px var(--sans); color:var(--mac-muted); }
.as-table-wrap{ max-width:100%; margin:6px 0; overflow-x:auto; }
.as-table{ border-collapse:collapse; font-size:12.5px; font-variant-numeric:tabular-nums; }
.as-table th, .as-table td{ padding:5px 10px; border-bottom:1px solid color-mix(in srgb, var(--mac-ink) 12%, transparent); text-align:start; white-space:nowrap; }
.as-table th{ font-weight:500; color:var(--mac-muted); }
.as-user .as-table th{ color:inherit; opacity:.7; }
.as-user .as-table th, .as-user .as-table td{ border-bottom-color:color-mix(in srgb, var(--mac-bg) 20%, transparent); }

.as-empty{ margin:auto; max-width:520px; padding:20px 8px; text-align:center; }
.as-empty-title{ font:500 20px/1.3 var(--sans); letter-spacing:-.02em; color:var(--mac-ink); }
.as-empty-sub{ margin:8px 0 18px; font:400 12.5px var(--sans); color:var(--mac-muted); }
.as-chips{ display:flex; flex-wrap:wrap; justify-content:center; gap:8px; }
.as-chip{ min-height:38px; padding:8px 14px; border:0; border-radius:999px; background:var(--at-track);
  font:400 13px var(--sans); color:var(--mac-ink); cursor:pointer; transition:background-color .15s var(--mac-ease), color .15s var(--mac-ease); }
.as-chip:hover{ background:var(--mac-ink); color:var(--mac-bg); }

#as-form{ display:flex; align-items:flex-end; gap:8px; padding:10px 12px 12px; border-top:1px solid var(--at-rule);
  background:color-mix(in srgb, var(--at-paper) 80%, transparent); backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px); }
#as-input{ flex:1; min-width:0; min-height:38px; max-height:120px; padding:9px 14px; border:0; border-radius:19px; background:var(--mac-bg); color:var(--mac-ink);
  box-shadow:inset 0 0 0 1px var(--at-rule-2); font:400 16px/1.4 var(--sans); resize:none; transition:box-shadow .15s ease; }
#as-input::placeholder{ color:var(--mac-faint); }
#as-input:focus{ outline:0; box-shadow:inset 0 0 0 1px var(--mac-faint), var(--mac-ring); }
#as-send{ flex:none; display:grid; place-items:center; width:38px; height:38px; padding:0; border:0; border-radius:50%; background:var(--mac-ink); color:var(--mac-bg); cursor:pointer;
  transition:transform .15s cubic-bezier(.2,1.25,.4,1), opacity .15s ease; }
#as-send svg{ width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:2.4; stroke-linecap:round; stroke-linejoin:round; }
#as-send:hover:not(:disabled){ transform:scale(1.08); }
#as-send:active:not(:disabled){ transform:scale(.95); }
#as-send:disabled{ opacity:.35; cursor:default; }
.as-dots{ display:inline-flex; gap:4px; padding:5px 2px; }
.as-dots i{ width:7px; height:7px; border-radius:50%; background:var(--mac-faint); animation:asDot 1.1s infinite ease-in-out; }
.as-dots i:nth-child(2){ animation-delay:.15s; }
.as-dots i:nth-child(3){ animation-delay:.3s; }
@keyframes asDot{ 0%,100%{ opacity:.3; transform:translateY(0); } 50%{ opacity:1; transform:translateY(-3px); } }
@media (prefers-reduced-motion:reduce){
  .as-dots i, .as-msg, .as-guide{ animation:none; }
}
@media (min-width:900px){
  .panel.as-panel{ grid-template-columns:240px minmax(0,1fr); grid-template-rows:auto minmax(0,1fr); grid-template-areas:"rail bar" "rail main"; height:calc(100vh - 200px); }
  #as-rail{ flex-direction:column; align-items:stretch; gap:0; border-bottom:0; border-inline-end:1px solid var(--at-rule);
    backdrop-filter:blur(30px) saturate(1.5); -webkit-backdrop-filter:blur(30px) saturate(1.5); }
  .as-new{ margin:12px 12px 8px; }
  .as-rail-label{ display:block; }
  #as-sessions{ flex-direction:column; overflow-x:hidden; overflow-y:auto; padding:0 8px 8px; }
  .as-sess{ max-width:none; margin:1px 0; padding:7px 10px; }
  .as-sess-date{ display:inline; }
  .as-sess-del{ opacity:0; }
  .as-sess:hover .as-sess-del, .as-sess-del:focus-visible, .as-sess-del.arm{ opacity:.8; }
  #as-log{ padding:22px 20px; }
  .as-msg{ max-width:72%; }
  #as-input{ font-size:13.5px; }
}


/* ---- The brief sits bare on the page; what needs you (newly out of stock, cancelled, stuck orders)
   is a row of BLOCKS next to each other (Yassin, 2026-11-04), each a small sheet, never inside a box ---- */
.brief, html[data-theme="dark"] .brief{ padding:0; background:transparent; box-shadow:none; border:0; border-radius:0; }
.needs{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:12px; margin-top:20px; max-width:none; }
/* The brief headline while a period loads (2026-11-08, every hub): two shimmer bars the size of the two sentences
   ("2,080 EGP today, down 42%…" / "2 orders at a 76% margin."), not the words "Loading today…", so switching
   the date picker never flashes text. The bars reuse .skel-line, whose colours already follow the theme. */
.brief-line.brief-skel{ display:flex; flex-direction:column; gap:.34em; }
.brief-line.brief-skel .skel-line{ height:.8em; margin:0; border-radius:.22em; width:min(88%, 18em); }
.brief-line.brief-skel .skel-line:nth-child(2){ width:min(60%, 12.5em); }
.need, .need:hover{ position:relative; flex-direction:column; align-items:flex-start; justify-content:flex-start; gap:4px; min-height:0; padding:14px 40px 14px 16px;
  border:0; border-radius:14px; background:var(--at-paper); box-shadow:var(--at-ring); text-align:start; }
.need:hover{ box-shadow:var(--at-lift); }
.need-n{ font-size:30px; line-height:1; }
.need-t{ width:100%; }
.need-t b{ font-size:13.5px; }
.need-go{ position:absolute; top:12px; inset-inline-end:14px; margin:0; }
.need:focus-visible{ box-shadow:var(--mac-ring); }
@media (min-width:600px){ .needs{ grid-template-columns:repeat(3, minmax(0,1fr)); } }
@media (min-width:900px){ .needs{ grid-template-columns:repeat(auto-fit, minmax(200px, 250px)); } }

/* ---- Courier cards: the same card on every hub, FigiHome's shape (Yassin, 2026-11-04): a sheet, the avatar and
   an outlined "out now" chip in the head, the outcomes donut beside a dense stat list, the money as ruled
   key/value rows, the legend under. Figi Trade's .co-drv-* and FigiHome's .drv-* are styled as one ---- */
.drv-card, .co-drv, html[data-theme="dark"] .co-driver{ padding:14px 16px; border:0; border-radius:14px; background:var(--at-paper); box-shadow:var(--at-ring); }
.drv-card.drv-total, .co-drv.co-drv-total{ box-shadow:0 0 0 2px var(--mac-ink); }
.drv-head, .co-drv-head{ display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.drv-avatar, .co-drv-avatar{ width:34px; height:34px; border-radius:50%; background:var(--mac-ink); color:var(--mac-bg); font:600 14px var(--sans); display:inline-flex; align-items:center; justify-content:center; flex:none; box-shadow:none; }
.drv-total .drv-avatar, .co-drv-total .co-drv-avatar{ background:var(--at-paper); color:var(--mac-ink); box-shadow:inset 0 0 0 2px var(--mac-ink); }
.drv-name, .co-drv-head .co-name{ flex:1; min-width:0; margin:0; font:600 15px/1.2 var(--sans); letter-spacing:-.01em; color:var(--mac-ink); }
.drv-outnow, .co-drv-out, .co-drv-hint, .drv-flip-hint{ flex:none; display:inline-flex; align-items:center; gap:6px; min-height:24px; padding:2px 9px; border-radius:7px;
  background:transparent; box-shadow:inset 0 0 0 1px var(--mac-ink); font:600 10.5px/1 var(--sans); color:var(--mac-ink); white-space:nowrap; }
.co-drv-hint, .drv-flip-hint{ box-shadow:inset 0 0 0 1px var(--line); color:var(--mac-muted); font-weight:500; }
.drv-live, .co-drv-live{ font-size:8.5px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--mac-bad); }
.co-drv-dot{ width:6px; height:6px; border-radius:50%; background:var(--mac-bad); }
.drv-body, .co-drv-body{ display:flex; align-items:center; gap:14px; }
.drv-donut, .co-drv-donut{ flex:none; width:112px; height:112px; }
.drv-donut-num, .co-drv-donut-num{ font:600 22px var(--sans); fill:var(--mac-ink); }
.drv-donut-lbl, .co-drv-donut-lbl{ font:500 8.5px var(--sans); letter-spacing:.08em; text-transform:uppercase; fill:var(--mac-muted); }
.drv-stats, .co-drv-stats{ display:grid; flex:1; gap:6px; min-width:0; }
.drv-stat, .co-drv-stat{ display:flex; flex-wrap:wrap; justify-content:space-between; align-items:baseline; gap:0 10px; font:400 12.5px/1.35 var(--sans); color:var(--mac-ink); }
.co-drv-stat .k{ color:var(--mac-muted); }
.co-drv-stat .v, .drv-stat b{ font-weight:600; font-variant-numeric:tabular-nums; color:var(--mac-ink); }
.co-drv-stat .v small, .drv-mut{ font-weight:400; font-size:11px; color:var(--mac-muted); }
.drv-money, .co-drv-money{ display:flex; flex-direction:column; gap:5px; padding:8px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.drv-mrow, .co-drv-mrow{ display:flex; justify-content:space-between; align-items:baseline; gap:12px; font:400 12.5px/1.3 var(--sans); }
.drv-mrow .k, .co-drv-mrow .k{ color:var(--mac-muted); font-size:11.5px; }
.drv-mrow .v, .co-drv-mrow .v{ font-weight:600; font-variant-numeric:tabular-nums; white-space:nowrap; color:var(--mac-ink); }
.drv-mrow .v small, .co-drv-mrow .v small{ font-weight:400; font-size:10px; color:var(--mac-muted); }
.drv-msub, .co-drv-msub{ margin-top:-3px; text-align:end; font:400 10.5px var(--sans); color:var(--mac-muted); font-variant-numeric:tabular-nums; }
.drv-mnet, .co-drv-mnet{ padding-top:5px; border-top:1px dashed var(--line); }
.drv-mnet .k, .co-drv-mnet .k{ color:var(--mac-ink); font-weight:600; }
.co-drv-mrow .v[data-tone="unknown"]{ color:var(--mac-muted); font-weight:400; }
.drv-legend, .co-drv-legend{ display:flex; flex-wrap:wrap; gap:4px 10px; margin:10px 0 0; }
.drv-leg, .co-drv-leg{ display:inline-flex; align-items:center; gap:4px; font:400 10.5px var(--sans); color:var(--mac-muted); white-space:nowrap; }
.drv-leg i, .co-drv-leg i{ width:8px; height:8px; flex:none; border-radius:2px; }
.co-drv-note{ margin:10px 0 0; font:400 12px var(--sans); color:var(--mac-warn); }
.co-drv .co-hand{ margin-top:12px; }

/* ---- The Meta panel's metric cards (Yassin, 2026-11-04: "the Meta sub cards need padding"): the four
   KPI cards and the detail stats get room to breathe, sentence-case labels, the same radius as every sheet ---- */
#ad-kpis .cm-card, .cust-metrics .cm-card{ padding:20px 22px 18px; }
#ad-kpis .cm-value{ margin-top:12px; }
#ad-kpis .cm-sub{ margin-top:8px; }
.ad-details{ gap:12px; margin-top:16px; }
.ad-stat{ display:flex; flex-direction:column; justify-content:flex-start; min-height:96px; padding:16px 18px 14px; border:0; border-radius:12px; background:var(--at-paper); box-shadow:var(--at-ring); }
.ad-stat-v{ font:500 20px/1.1 var(--sans); letter-spacing:-.02em; color:var(--mac-ink); }
.ad-stat-l{ margin-top:6px; font:500 12px/1.3 var(--sans); letter-spacing:0; text-transform:none; color:var(--mac-muted); }
.ad-stat-h{ margin-top:3px; font:400 11.5px/1.35 var(--sans); color:var(--mac-faint); }

/* ---- The date range picker (range-format.js + hub-ui.js startRangePickers), beside a period row on the
   Figi Trade Overview, the brand hubs' Stats and Couriers: one button, a calendar popover in the hub's own tokens (both
   themes), the picked span as a soft band with its two ends in ink, today ringed, future days faint ---- */
.ov-period-row{ display:flex; flex-wrap:wrap; align-items:center; gap:10px 16px; margin:0 0 18px; }
.ov-period-row > #st-period-tabs, .ov-period-row > #tabs, .ov-period-row > #stats-tabs, .ov-period-row > #cr-period-tabs{ margin-bottom:0; }
.ov-range, .cr-range{ display:inline-flex; flex-wrap:wrap; align-items:center; gap:6px 10px; margin:0; }
.rp{ position:relative; display:inline-block; }
.rp-btn{ display:inline-flex; align-items:center; gap:8px; min-height:32px; padding:0 12px 0 10px; border:0; border-radius:var(--mac-r);
  background:var(--at-raised); color:var(--mac-ink); box-shadow:var(--at-ring), var(--mac-raise); font:500 12.5px var(--sans); cursor:pointer;
  transition:background-color .15s ease, color .15s ease; }
.rp-btn:hover{ background:var(--at-track-hover); }
.rp-btn.on{ background:var(--mac-ink); color:var(--mac-bg); }
.rp-btn[aria-expanded="true"]{ box-shadow:var(--at-ring), var(--mac-ring); }
.rp-ic{ width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; opacity:.8; }
.rp-pop{ position:absolute; top:calc(100% + 8px); left:0; z-index:60; width:304px; padding:12px 12px 10px; border-radius:16px; background:var(--at-paper);
  box-shadow:0 0 0 1px var(--line), 0 30px 70px -24px var(--mac-scrim), 0 10px 24px -12px var(--mac-scrim); transform-origin:top left; animation:rpIn .18s cubic-bezier(.2,1.2,.4,1); }
@keyframes rpIn{ from{ opacity:0; transform:translateY(-4px) scale(.97); } }
.rp-head{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin:0 0 8px; }
.rp-month{ font:600 13.5px var(--sans); letter-spacing:-.01em; color:var(--mac-ink); }
.rp-nav{ width:30px; height:30px; border:0; border-radius:8px; background:transparent; color:var(--mac-muted); font:400 18px/1 var(--sans); cursor:pointer; }
.rp-nav:hover:not(:disabled){ background:var(--at-track); color:var(--mac-ink); }
.rp-nav:disabled{ opacity:.3; cursor:default; }
.rp-grid{ display:grid; grid-template-columns:repeat(7, 1fr); gap:2px 0; }
.rp-dow{ padding:4px 0 6px; text-align:center; font:600 10.5px var(--sans); color:var(--mac-faint); }
.rp-day{ position:relative; height:36px; border:0; border-radius:9px; background:transparent; color:var(--mac-ink); font:500 13px var(--sans); font-variant-numeric:tabular-nums; cursor:pointer; }
.rp-day:hover:not(:disabled){ background:var(--at-track-hover); }
.rp-day.out{ color:var(--mac-faint); }
.rp-day.future{ color:var(--mac-faint); opacity:.45; cursor:default; }
.rp-day.today::after{ content:''; position:absolute; left:50%; bottom:5px; width:4px; height:4px; margin-left:-2px; border-radius:50%; background:var(--mac-ink); }
.rp-day.in{ border-radius:0; background:color-mix(in oklch, var(--mac-ink) 10%, transparent); }
.rp-day.start, .rp-day.end{ background:var(--mac-ink); color:var(--mac-bg); z-index:1; }
.rp-day.start.end{ border-radius:9px; }
.rp-day.start:not(.end){ border-radius:9px 0 0 9px; }
.rp-day.end:not(.start){ border-radius:0 9px 9px 0; }
.rp-day.start.today::after, .rp-day.end.today::after{ background:var(--mac-bg); }
.rp-foot{ display:flex; align-items:center; gap:8px; margin-top:10px; padding-top:10px; border-top:1px solid var(--line); }
.rp-sel{ flex:1; min-width:0; font:400 12px var(--sans); color:var(--mac-muted); }
.rp-clear{ border:0; background:transparent; color:var(--mac-muted); font:500 12.5px var(--sans); padding:6px 8px; border-radius:7px; cursor:pointer; }
.rp-clear:hover{ background:var(--at-track); color:var(--mac-ink); }
.rp-apply{ min-height:30px; padding:0 14px; border:0; border-radius:var(--mac-r); background:var(--mac-ink); color:var(--mac-bg); font:600 12.5px var(--sans); cursor:pointer; }
.rp-apply:disabled{ opacity:.35; cursor:default; }
.ov-range-msg{ font:400 12px var(--sans); color:var(--mac-bad); }
.ov-range-msg:empty{ display:none; }
.ov-custom-note{ margin:4px 0 0; font:400 13px/1.5 var(--sans); color:var(--mac-muted); }
@media (max-width:359px){ .rp-pop{ width:calc(100vw - 20px); } }
@media (prefers-reduced-motion:reduce){ .rp-pop{ animation:none; } }

/* ---- Resets of the brand hubs' older rules for the same selectors (hub-ui.css loads last) ---- */
.shop-hero, .shop-hero.urgent-row{ border:0; padding:0; }
.shop-hero-img .thumb, .shop-hero-img .thumb:hover{ transform:none; }
.shop-row{ border-radius:0; }
.shop-row:hover{ background:transparent; transform:none; box-shadow:none; }
.shop-row.urgent-row{ border-left:0; padding-left:0; box-shadow:none; }
.shop-sel.hero{ left:auto; right:8px; padding:0; border:0; }
.shop-bar label, .shop-group-title, .mp-toggle, .mp-state{ text-transform:none; letter-spacing:0; }
.shop-bar select{ border:0; }
.shop-stock, .status-chip, .cover-chip, .mp-state, .shop-toggle, .as-chip, .as-new, .as-msg, #as-input, #as-send{ border:0; }
.mp-count, .mp-off .mp-count{ background:none; padding:0; border-radius:0; }
.mp-off{ border-style:solid; }
.mp-link{ border-bottom:0; }
.mp-link:hover{ color:inherit; }
.as-sess{ border-bottom:0; border-right:0; }
.as-sess.on::before{ display:none; }
.as-li{ padding-inline-start:0; position:static; }
.as-li::before{ position:static; inset-inline-start:auto; top:auto; width:auto; height:auto; border-radius:0; background:none; }
#as-sessions{ border-bottom:0; }
.as-chips{ flex-direction:row; }
.as-rail-label{ text-transform:none; letter-spacing:0; }
.as-sess-del.arm{ border-radius:6px; }
/* Most missed: tiles (Yassin, 2026-11-06: "give each product the block borders"). Each product is its own card,
   boxed like the hero tiles: the hairline ring, not a border, so light and dark follow each hub's tokens. */
.mp-grid{ gap:12px; }
.mp-grid .dead{ border:0; padding:14px; border-radius:14px; background:var(--at-paper); box-shadow:var(--at-ring); }
.mp-grid > .view-all{ border-top:0; }

/* ---- THE FINANCE TEMPLATE (Yassin, 2026-11-05): every hub's Finance reads as Figi Trade's does. A period row,
   the answer as one big sentence, then unboxed sections of ruled rows, each row with its icon. Ids beat the brand
   hubs' older :is(#finance-view,...) rules. Tokens only, so light and dark follow each hub. ---- */
.gf-period{ display:flex; flex-wrap:wrap; align-items:center; gap:10px 14px; margin:0 0 22px; }
.gf-period:empty{ display:none; }
.gf-period #stats-tabs{ margin-bottom:0; }
.gf-gran, .fin-gran{ display:inline-flex; gap:2px; }
.gf-gran .seg-btn, .fin-gran .seg-btn{ border:0; background:transparent; color:var(--mac-muted); cursor:pointer; }
.gf-gran.slide-on > .on, .fin-gran.slide-on > .on{ background:transparent; }
.gf-gran .seg-btn:hover:not(.on), .fin-gran .seg-btn:hover:not(.on){ color:var(--mac-ink); }
.gf-gran .seg-btn:focus-visible, .fin-gran .seg-btn:focus-visible, .gf-period .tab:focus-visible{ outline:2px solid var(--mac-ink); outline-offset:2px; }
.gf-block{ min-width:0; margin:0 0 32px; }
#finance-view .gf-block > .lead-title{ display:flex; align-items:center; gap:8px; margin:0 0 12px; font:600 14px/1.3 var(--sans); letter-spacing:0; text-transform:none; color:var(--mac-ink); }
#finance-view .lead-title .ti{ width:16px; height:16px; margin:0; vertical-align:0; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; color:var(--mac-muted); }
#finance-view .fic{ flex:none; width:16px; height:16px; color:var(--mac-muted); }

/* Figi Trade's rows: the icon sits in the first cell's start. */
#finance-view .gf-table td.lead{ position:relative; padding-inline-start:26px; }
#finance-view .gf-table td.lead > .fic{ position:absolute; top:50%; inset-inline-start:0; transform:translateY(-50%); }
@media (min-width:900px){
  #finance-view .gf-table td.lead, #finance-view .gf-table tr.gf-own td.lead{ padding-inline-start:44px; }
  #finance-view .gf-table td.lead > .fic{ inset-inline-start:16px; }
  #finance-view .gf-table tr.gf-own td.lead{ padding-inline-start:60px; }
  #finance-view .gf-table tr.gf-own td.lead > .fic{ inset-inline-start:32px; }
}

/* The brand hubs: the header row, the group link, the month pills. */
#finance-view .fin-picker{ display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; min-width:0; }
#fin-pills{ position:relative; isolation:isolate; display:inline-flex; flex-wrap:nowrap; gap:2px; max-width:100%; overflow-x:auto; scrollbar-width:none; }
#fin-pills::-webkit-scrollbar{ display:none; }
#fin-pills .tab{ position:relative; z-index:1; flex:none; display:inline-flex; align-items:center; border:0; background:transparent; color:var(--mac-muted); white-space:nowrap; cursor:pointer; }
#fin-pills .tab:hover:not(.on){ color:var(--mac-ink); border:0; }
#finance-view .fin-picker{ flex:0 1 auto; }
#finance-view .brief{ margin:0 0 28px; }
#finance-view .brief:empty{ display:none; }
#finance-view .group-link{ margin-inline-start:auto; }

/* Where the money is now: one ruled sheet of accounts. */
#finance-view .ma-table{ margin:0 0 14px; border:0; border-radius:14px; overflow:hidden; background:var(--at-paper); box-shadow:0 0 0 1px var(--line); }
#finance-view .ma-cols{ display:none; }
#finance-view .ma-row{ border-bottom:1px solid var(--line); }
#finance-view .ma-row:last-of-type{ border-bottom:0; }
#finance-view .ma-row-head{ gap:12px; min-height:56px; padding:10px 16px; }
#finance-view .ma-row-head:hover{ background:color-mix(in srgb, var(--mac-ink) 4%, transparent); }
#finance-view .ma-icon .fic{ width:18px; height:18px; }
#finance-view .ma-name{ font:500 14px/1.3 var(--sans); color:var(--mac-ink); }
#finance-view .ma-meta{ font-size:11.5px; letter-spacing:0; color:var(--mac-muted); }
#finance-view .ma-badge, #finance-view .ma-badge.ok, #finance-view .ma-badge.warn{ padding:0; border:0; border-radius:0; background:none; }
#finance-view .ma-badge{ font:400 12px/1.3 var(--sans); letter-spacing:0; text-transform:none; color:var(--mac-muted); white-space:normal; }
#finance-view .ma-badge.ok{ color:var(--mac-muted); }
#finance-view .ma-badge.warn{ color:var(--red, var(--bad)); }
#finance-view .ma-amt{ font:500 15px/1.2 var(--sans); text-align:end; color:var(--mac-ink); }
#finance-view .ma-amt small{ font-size:11px; color:var(--mac-muted); }
#finance-view .ma-chev{ font-size:14px; }
#finance-view .ma-note{ padding:0 16px 10px 46px; }
#finance-view .fin-info{ top:19px; right:auto; inset-inline-end:40px; }
#finance-view .ma-amt, #finance-view .ma-cols span:last-child{ padding-inline-end:24px; }
#finance-view .fin-hintbox{ margin:0 16px 10px 46px; }
#finance-view .ma-total{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 16px; border-top:1px solid var(--line); font:600 15px/1.3 var(--sans); color:var(--mac-ink); }
#finance-view .ma-total .fin-net{ font-size:17px; font-weight:600; letter-spacing:-.02em; }
#finance-view .ma-total.warn span:last-child{ font-weight:400; font-size:13px; color:var(--mac-muted); }
#finance-view .ma-total-note{ padding:0 16px 10px; font-size:12px; text-align:start; color:var(--mac-muted); }
@media (min-width:900px){
  #finance-view .ma-cols, #finance-view .ma-row-head{ display:grid; grid-template-columns:22px minmax(0,1.2fr) minmax(0,1fr) minmax(130px,.7fr) 16px; align-items:center; gap:12px; }
  #finance-view .ma-cols{ padding:12px 16px 10px; border-bottom:1px solid var(--line); font:500 12px/1.2 var(--sans); color:var(--mac-muted); }
  #finance-view .ma-cols span:first-child{ grid-column:1 / 3; }
  #finance-view .ma-cols span:last-child{ text-align:end; }
}
@media (max-width:899px){
  #finance-view .ma-row-head{ display:grid; grid-template-columns:22px minmax(0,1fr) auto 14px; }
  #finance-view .ma-badge{ display:block; grid-row:2; grid-column:2 / -1; }
}

/* The by-hand forms and cash accounts under the sheet. */
#finance-view .pos-cols{ margin-top:22px; }
#finance-view .exp-sec-head{ flex-wrap:wrap; gap:2px 12px; justify-content:flex-start; padding-bottom:8px; font:600 14px/1.3 var(--sans); letter-spacing:0; text-transform:none; color:var(--mac-ink); }
#finance-view .exp-sec-sum{ flex:1 1 100%; font-weight:400; font-size:12px; color:var(--mac-muted); }
#finance-view .exp-sec-sum:has(.lnk){ flex:0 1 auto; margin-inline-start:auto; }

/* At a glance: the figures on one sheet, no separate cards. */
#finance-view #fin-summary{ display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:0; margin:0; border-radius:14px; overflow:hidden; background:var(--at-paper); box-shadow:0 0 0 1px var(--line); }
/* !important only to beat the brand hubs' own !important card rules (the filled lead card, its "!" watermark). */
#finance-view #fin-summary .cm-card, #finance-view #fin-summary .cm-card.cm-hero, #finance-view #fin-summary .cm-card.cm-warn{ position:relative; padding:14px 16px; border:0 !important; border-radius:0 !important; background:transparent !important; box-shadow:0 0 0 .5px var(--line) !important; transform:none; }
#finance-view #fin-summary .cm-card::after{ content:none !important; }
#finance-view #fin-summary .cm-card .cm-label, #finance-view #fin-summary .cm-card .cm-sub, #finance-view #fin-summary .cm-card .fic, #finance-view #fin-summary .cm-card small{ color:var(--mac-muted) !important; opacity:1; }
#finance-view #fin-summary .cm-card .cm-value, #finance-view #fin-summary .cm-card .cm-value span{ color:var(--mac-ink) !important; }
#finance-view #fin-summary .cm-card .fin-net.neg{ color:var(--red, var(--bad)) !important; }
#finance-view #fin-summary .cm-label{ display:flex; align-items:center; gap:7px; font:500 12px/1.3 var(--sans); letter-spacing:0; text-transform:none; color:var(--mac-muted); }
#finance-view #fin-summary .cm-hero .cm-label::before{ content:none; }
#finance-view #fin-summary .cm-value{ margin-top:8px; font:500 20px/1.15 var(--sans); letter-spacing:-.02em; color:var(--mac-ink); }
#finance-view #fin-summary .cm-sub{ margin-top:5px; font-size:11.5px; line-height:1.4; color:var(--mac-muted); }
#finance-view #fin-summary .cm-card.cm-warn .cm-label, #finance-view #fin-summary .cm-card.cm-warn .fic{ color:var(--red, var(--bad)) !important; }
@media (max-width:760px){ #finance-view #fin-summary{ grid-template-columns:repeat(2,minmax(0,1fr)); } }

/* Profit and loss with Net profit by month beside it; stacked when the page is narrow. */
.fin-two{ display:grid; grid-template-columns:minmax(0,1fr); gap:0; }
@media (min-width:1100px){ .fin-two{ grid-template-columns:minmax(0,1.5fr) minmax(0,1fr); gap:28px; align-items:start; } #finance-view .fin-two > .gf-block + .gf-block{ position:sticky; top:96px; } }

/* Profit and loss: one ruled sheet, the groups named in its rows. */
#finance-view #fin-pnl{ border-radius:14px; overflow:hidden; background:var(--at-paper); box-shadow:0 0 0 1px var(--line); }
#finance-view .pl-group{ margin:0; }
#finance-view .pl-head{ display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:2px 12px; margin:0; padding:12px 16px 10px; border-bottom:1px solid var(--line); font:500 12px/1.3 var(--sans); letter-spacing:0; text-transform:none; color:var(--mac-muted); background:color-mix(in srgb, var(--mac-ink) 2.5%, transparent); }
#finance-view .pl-group + .pl-group .pl-head{ border-top:1px solid var(--line); }
#finance-view .pl-hint{ font-size:12px; }
#finance-view .pl-line{ min-height:52px; margin:0; padding:9px 16px; border-bottom:1px solid var(--line); }
#finance-view .pl-group > .pl-line:last-child{ border-bottom:0; }
#finance-view .pl-label{ position:relative; min-width:0; padding-inline-start:28px; font:500 14px/1.3 var(--sans); color:var(--mac-ink); }
#finance-view .pl-label > .fic{ position:absolute; top:1px; inset-inline-start:0; margin:0; }
#finance-view .pl-check{ gap:10px; min-width:0; }
#finance-view .pl-note{ display:block; margin:2px 0 0; font:400 11.5px/1.35 var(--sans); font-style:normal; color:var(--mac-muted); }
#finance-view .pl-amt{ font:500 14px/1.2 var(--sans); }
#finance-view .pl-line.in .pl-amt, #finance-view .pl-line.out .pl-amt{ color:var(--mac-ink); }
#finance-view .pl-line.manual.unpaid .pl-amt{ color:var(--red, var(--bad)); }
#finance-view .pl-line.muted .pl-amt{ color:var(--mac-muted); opacity:1; }
#finance-view .pl-empty{ padding:10px 16px; font-size:12px; line-height:1.4; color:var(--mac-muted); }
#finance-view .pl-total{ align-items:center; margin:0; padding:16px; border-top:1px solid var(--line); font:600 15px/1.3 var(--sans); color:var(--mac-ink); }
#finance-view .pl-total .fin-net{ font-size:17px; font-weight:600; letter-spacing:-.02em; }

/* The three financial statements (2026-11-25), under Profit and loss: one ruled sheet per statement.
   Rows come from statements-html.js; an unknown amount is an en dash, a deduction reads in brackets. */
#finance-view .st-bar{ display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px 14px; margin:0 0 12px; }
#finance-view .st-tabs{ display:inline-flex; flex-wrap:wrap; gap:2px; padding:3px; border-radius:10px; background:color-mix(in srgb, var(--mac-ink) 6%, transparent); }
#finance-view .st-tabs .seg-btn{ border:0; border-radius:8px; padding:6px 12px; background:transparent; color:var(--mac-muted); font:500 13px/1.3 var(--sans); cursor:pointer; }
#finance-view .st-tabs .seg-btn:hover:not(.on){ color:var(--mac-ink); }
#finance-view .st-tabs .seg-btn.on{ background:var(--mac-ink); color:var(--at-paper); }
#finance-view .st-tabs .seg-btn:focus-visible{ outline:2px solid var(--mac-ink); outline-offset:2px; }
#finance-view .st-wrap{ max-width:100%; overflow-x:auto; border-radius:14px; background:var(--at-paper); box-shadow:0 0 0 1px var(--line); }
#finance-view .st-table{ width:100%; border-collapse:collapse; font:400 13.5px/1.4 var(--sans); color:var(--mac-ink); }
#finance-view .st-table caption{ caption-side:top; padding:14px 16px 10px; text-align:start; font:600 14px/1.3 var(--sans); }
#finance-view .st-table thead th{ padding:8px 16px; border-bottom:1px solid var(--line); text-align:start; font:500 11.5px/1.3 var(--sans); letter-spacing:.02em; color:var(--mac-muted); }
#finance-view .st-table thead th + th, #finance-view .st-table td{ text-align:end; white-space:nowrap; }
#finance-view .st-table tbody th, #finance-view .st-table td{ padding:9px 16px; border-bottom:1px solid var(--line); font-weight:400; vertical-align:top; }
#finance-view .st-table tbody th{ text-align:start; }
#finance-view .st-table tbody tr:last-child > *{ border-bottom:0; }
#finance-view .st-label{ display:block; }
#finance-view .st-table .st-sub{ display:block; margin-top:2px; font-size:12px; font-weight:400; line-height:1.35; color:var(--mac-muted); white-space:normal; }
#finance-view .st-num{ font-variant-numeric:tabular-nums; }
#finance-view .st-num.neg{ color:var(--mac-muted); }
#finance-view .st-table .st-l1 > th{ padding-inline-start:30px; }
#finance-view .st-table .st-l2 > th{ padding-inline-start:44px; }
#finance-view .st-table .st-head > th{ padding-top:16px; font:600 12px/1.3 var(--sans); letter-spacing:.03em; text-transform:uppercase; color:var(--mac-muted); }
#finance-view .st-table .st-head.st-l1 > th{ text-transform:none; letter-spacing:0; font-size:13px; color:var(--mac-ink); }
#finance-view .st-table .st-total > *{ font-weight:600; }
#finance-view .st-table .st-num.st-loss{ color:var(--red, var(--bad)); }
#finance-view .st-table .st-grand > *{ padding-top:14px; padding-bottom:14px; border-top:1px solid var(--mac-ink); font:600 15px/1.3 var(--sans); }
#finance-view .st-table .st-memo > *{ color:var(--mac-muted); font-size:12.5px; }
#finance-view .st-assumed .st-label{ font-style:italic; }
#finance-view .st-unknown, #finance-view .st-left, #finance-view .st-none{ color:var(--mac-muted); font-size:12.5px; }
#finance-view .st-excluded .st-label{ color:var(--mac-muted); }
#finance-view .st-check{ margin:10px 2px 0; font-size:12.5px; line-height:1.4; color:var(--mac-muted); }
#finance-view .st-check.st-attn{ color:var(--warn, var(--mac-ink)); }
#finance-view .st-check.st-bad{ color:var(--red, var(--bad)); font-weight:600; }
#finance-view .st-notes{ margin:10px 2px 0; padding-inline-start:18px; font-size:12.5px; line-height:1.5; color:var(--mac-muted); }
#finance-view .st-h{ margin:22px 0 10px; font:600 14px/1.3 var(--sans); color:var(--mac-ink); }
@media (max-width:600px){
  #finance-view .st-table tbody th, #finance-view .st-table td, #finance-view .st-table thead th{ padding-inline:12px; }
  #finance-view .st-table .st-l1 > th{ padding-inline-start:20px; }
  #finance-view .st-table .st-l2 > th{ padding-inline-start:28px; }
}
#finance-view .fin-net{ font-family:var(--sans); }
#finance-view .fin-net.pos{ color:var(--mac-ink); }
#finance-view .fin-net.neg{ color:var(--red, var(--bad)); }
#finance-view .pl-topay{ margin:0; padding:10px 16px 14px; font-size:13px; color:var(--mac-muted); }

/* ---- Small product tiles (Yassin, 2026-11-05): Restock soon's tile at a smaller size, for the longer stock lists. ---- */
.shop-heroes-sm{ display:grid; grid-template-columns:repeat(auto-fill, minmax(132px, 1fr)); gap:10px; }
.shop-heroes-sm .shop-hero{ border-radius:12px; }
.shop-heroes-sm .shop-hero-img{ aspect-ratio:1; }
.shop-heroes-sm .shop-hero-body{ gap:7px; padding:9px 10px 11px; }
.shop-heroes-sm .shop-name{ flex:none; width:100%; font-size:12.5px; line-height:1.3; }
.shop-vendor{ display:block; margin-top:2px; font-size:11px; font-weight:400; color:var(--mac-muted); }
.shop-heroes-sm .shop-stock{ font-size:11px; }
.shop-heroes-sm .shop-hero-stats{ grid-template-columns:auto minmax(0,1fr); gap:10px; padding-top:7px; font-size:10.5px; }
.shop-heroes-sm .shop-hero-stats b{ font-size:12px; }

/* ---- The open customer (customers.js detailHTML, 2026-11-06, every brand hub): one ruled strip of figures,
   two labelled lists side by side from 900px (Deliveries, Details), then tags and the note under a rule ---- */
.drow-detail .detail:has(> .cd){ display:block; }
.cd{ display:grid; gap:18px; font-family:var(--sans); }
.cd-kpis{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); border-radius:12px; background:var(--at-paper); box-shadow:var(--at-ring); overflow:hidden; }
.cd-k{ display:flex; flex-direction:column; gap:4px; min-width:0; padding:12px 16px; box-shadow:inset -1px 0 0 var(--line), inset 0 -1px 0 var(--line); }
.cd-k:last-child{ grid-column:1 / -1; }
.cd-l{ font:500 11.5px var(--sans); color:var(--mac-muted); }
.cd-v{ font:500 17px/1.2 var(--sans); letter-spacing:-.02em; color:var(--mac-ink); font-variant-numeric:tabular-nums; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cd-v small{ font-size:11px; font-weight:500; color:var(--mac-muted); letter-spacing:0; }
.cd-cols{ display:grid; gap:18px; }
.cd-h{ margin:0 0 6px; font:600 12px var(--sans); letter-spacing:0; text-transform:none; color:var(--mac-ink); }
.cd-row{ display:flex; align-items:center; gap:8px; min-height:34px; padding:6px 0; border-bottom:1px solid var(--line); font:400 13px var(--sans); color:var(--mac-muted); }
.cd-row:last-child{ border-bottom:0; }
.cd-row .gi{ width:15px; height:15px; flex:none; color:var(--mac-faint); }
.cd-row.pos .gi{ color:var(--pos, var(--mac-ink)); }
.cd-row.neg .gi{ color:var(--mac-bad); }
.cd-rl{ flex:1; min-width:0; }
.cd-rv{ font-weight:500; color:var(--mac-ink); font-variant-numeric:tabular-nums; text-align:end; }
.cd-orders{ align-items:flex-start; }
.cd-orders .cd-rv{ display:flex; flex-wrap:wrap; justify-content:flex-end; gap:4px 10px; }
.cd-foot{ display:grid; gap:10px; padding-top:14px; border-top:1px solid var(--line); }
.cd-foot .cd-h{ margin:0; }
.cd-foot .notebox{ border-radius:10px; }
@media (min-width:900px){
  .cd-kpis{ grid-template-columns:repeat(5, minmax(0,1fr)); }
  .cd-k, .cd-k:last-child{ grid-column:auto; box-shadow:inset -1px 0 0 var(--line); }
  .cd-k:last-child{ box-shadow:none; }
  .cd-cols{ grid-template-columns:1fr 1fr; gap:32px; }
}

/* ---- THE META ADS LINE (2026-11-06, every hub): the brands' Meta ad spend drawn over a daily bar chart.
   ONE look everywhere (Yassin: "red, a bit transparent and no borders"): a 2px red line at 70%, straight
   segments, no dots, no halo, no fill; its key is a short bar of the same line. Used by the brand hubs'
   Stats trend (stats.js drawTrend: .t-spend, .t-key i, .t-tip-a) and Figi Trade's Revenue per day
   (chart.js: .chart-ads .ads-line, .ads-key). The colour is the hub's red: --red on the brand hubs,
   --bad on Figi Trade. ---- */
:root{ --ads-line:var(--red, var(--bad)); --ads-line-alpha:.7; }
.t-spend{ position:absolute; left:0; top:0; width:100%; height:210px; pointer-events:none; overflow:visible; z-index:1; }
.t-spend path, .ads-line{ fill:none; vector-effect:non-scaling-stroke; stroke-linecap:round; stroke-linejoin:round; }
.t-spend-line, .ads-line{ stroke:var(--ads-line); stroke-opacity:var(--ads-line-alpha); stroke-width:2; }
.t-key{ display:inline-flex; align-items:center; gap:6px; }
.t-key i, .ads-key{ display:inline-block; flex:none; width:16px; height:2px; background:var(--ads-line); opacity:var(--ads-line-alpha); }
.t-tip-a{ font-size:11px; font-variant-numeric:tabular-nums; } .t-tip-a small{ opacity:.6; font-size:10px; }
.t-cap:has(.t-key){ display:flex; flex-wrap:wrap; justify-content:space-between; gap:4px 12px; }

/* ---- THE PAGE-SHAPED PLACEHOLDER (view-skel.js, 2026-11-07, every hub): while a page loads, the
   placeholder is drawn where that page's own cards, panels and lines of text stood the last time it
   loaded on this device, so the page fades in over its own shape instead of cutting from a generic
   one. vs-b: a card or picture; vs-p: a panel or table (its frame and a line per row); vs-t: a line
   of text. Theme-neutral: every tint is the ink at a few percent. ---- */
:root{ --vs-a:color-mix(in oklch, var(--mac-ink) 6%, transparent); --vs-b:color-mix(in oklch, var(--mac-ink) 11%, transparent); }
.view-skel.vs-shaped{ min-height:0; }
.view-skel.vs-shaped > i, .view-skel.vs-shaped > span{ position:absolute; display:block; }
.view-skel.vs-shaped > span.vs-p{ display:flex; }
.vs-b, .vs-t, .vs-p > i{ background:linear-gradient(100deg, var(--vs-a) 20%, var(--vs-b) 40%, var(--vs-a) 60%); background-size:300% 100%;
  animation:vsSweep 1.5s ease-in-out infinite; animation-delay:var(--d, 0ms); }
.vs-t{ border-radius:6px; transform:scaleY(.62); transform-origin:left center; }
.vs-p{ box-sizing:border-box; overflow:hidden; display:flex; flex-direction:column; gap:30px; padding:22px 20px;
  background:color-mix(in oklch, var(--mac-ink) 2.5%, transparent); box-shadow:0 0 0 1px color-mix(in oklch, var(--mac-ink) 7%, transparent); }
.vs-p > i{ display:block; flex:none; height:14px; border-radius:6px; width:92%; }
.vs-p > i:nth-child(3n+2){ width:78%; } .vs-p > i:nth-child(3n){ width:86%; }
@keyframes vsSweep{ from{ background-position:100% 0; } to{ background-position:-200% 0; } }
/* the page fades in as the placeholder fades out (a crossfade, never a cut) */
#content > section > *:not(.view-head):not(.view-skel){ transition:opacity .32s cubic-bezier(.22,1,.36,1); }
.view-skel.out{ opacity:0; transform:none; transition:opacity .3s ease; }   /* no upward jump: the old exit moved it 4px with no transition left */
@media (prefers-reduced-motion: reduce){
  .vs-b, .vs-t, .vs-p > i{ animation:none; }
  #content > section > *:not(.view-head):not(.view-skel), .view-skel.out{ transition:none; }
}

/* ---- IN-PAGE SUBTABS (.subtabs, 2026-11-07, every hub): a page split into parts gets the SAME tabs as the
   hub's own pages (Money: Finance, Expenses, Invoices…), never a pill row (Yassin: "competitors subtabs
   should look like other subtabs like finance subtabs"). Words only, the chosen one bold, a soft hover,
   and the red underline sliding to the chosen tab (the page script moves .subtabs-ind with slide.js glide,
   as app.js moveSubIndicator does). Markup: .subtabs[role=tablist] > span.subtabs-ind + button.subtab[role=tab]. ---- */
.subtabs{ position:relative; display:flex; gap:4px; margin:6px 0 18px; overflow-x:auto; scrollbar-width:none; border-bottom:1px solid var(--line, var(--at-rule)); }
.subtabs::-webkit-scrollbar{ display:none; }
.subtab{ flex:none; display:inline-flex; align-items:center; gap:7px; min-height:44px; padding:10px 14px 14px; border:0; background:none;
  border-radius:10px 10px 0 0; font:500 13px var(--sans); color:var(--mac-muted); cursor:pointer; white-space:nowrap;
  transition:color .2s ease, background-color .2s ease; }
.subtab:hover:not(.on){ color:var(--mac-ink); background:var(--hoverbg, color-mix(in oklch, var(--mac-ink) 5%, transparent)); }
.subtab.on{ color:var(--mac-ink); font-weight:700; }
.subtab:focus-visible{ outline:2px solid var(--red, var(--mac-bad)); outline-offset:-4px; border-radius:8px; }
.subtabs-ind{ position:absolute; left:0; bottom:0; width:0; height:3px; pointer-events:none; border-radius:3px 3px 0 0;
  background:var(--red, var(--mac-bad)); box-shadow:0 0 12px color-mix(in srgb, var(--red, var(--mac-bad)) 55%, transparent); }
@media (prefers-reduced-motion: reduce){ .subtab{ transition:none; } }

/* ---- THE META PANEL'S FIVE CARDS (2026-11-07, every hub): ROAS, Breakeven ROAS (breakeven.js), Money spent,
   Revenue from ads, Sales. Five across from 900px; on a phone ROAS takes the first row and the other four sit
   two by two. #content raises the weight over each hub's older .cust-metrics column rules. ---- */
#content #ad-kpis{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
#content #ad-kpis > .cm-hero{ grid-column:1 / -1; }
@media (min-width:900px){
  #content #ad-kpis{ grid-template-columns:repeat(5, minmax(0, 1fr)); }
  #content #ad-kpis > .cm-hero{ grid-column:auto; }
}

/* ---- THE ANALYST, CODEX STYLE (2026-11-07, every hub with the Assistant): Yassin: "remove the three macos dots from
   ai analyst and make this section have a codex like ui". Taken from Codex: a quiet list of chats (a "New chat" row with
   a pen, the open chat a soft grey row, never inverted), a centred icon and one big question when a chat is empty, the
   reader's own messages in a soft grey bubble, the analyst's answers in a framed card (bare text read as broken, fixed
   the same day), all in one centred column, and a large rounded composer with the send button inside it. Left out: projects,
   the model picker, access level, voice. ---- */
/* The chat's title bar keeps its rule and a centred title (2026-11-07 fix: a borderless muted title pushed to one
   corner read as broken, Yassin "the top header looks bad"). Centred, because a chat title can be Arabic or English. */
.as-bar{ min-height:46px; padding:0 20px; }
.as-bar::after{ display:none; }
.as-title{ text-align:center; font:600 13px/1.2 var(--sans); color:var(--mac-ink); }
/* the chats list */
#as-rail{ background:color-mix(in srgb, var(--mac-ink) 3%, var(--at-paper)); }
.as-new{ display:inline-flex; align-items:center; gap:9px; min-height:36px; margin:8px; padding:0 10px; border-radius:9px; background:transparent; box-shadow:none;
  font:500 13.5px var(--sans); color:var(--mac-ink); }
.as-new:hover{ background:var(--at-track); color:var(--mac-ink); }
.as-ic{ width:16px; height:16px; flex:none; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.as-rail-label{ font:500 12px/1.2 var(--sans); color:var(--mac-faint); }
.as-sess{ border-radius:9px; }
.as-sess.on, .as-sess.on:hover{ background:var(--at-track-hover, var(--at-track)); color:var(--mac-ink); }
.as-sess.on .as-sess-title{ color:var(--mac-ink); }
.as-sess.on .as-sess-date{ color:var(--mac-faint); opacity:1; }
/* the conversation: one centred column */
#as-log{ gap:18px; padding:20px max(18px, calc((100% - 760px) / 2)) 24px; }
.as-msg{ animation:asRise .3s cubic-bezier(.22,1,.36,1) backwards; transform-origin:50% 100%; }
@keyframes asRise{ from{ opacity:0; transform:translateY(6px); } }
.as-user{ max-width:78%; padding:10px 15px; border-radius:18px; background:color-mix(in srgb, var(--mac-ink) 7%, var(--at-paper)); color:var(--mac-ink); }
.as-user .as-table th, .as-user .as-table td{ border-bottom-color:color-mix(in srgb, var(--mac-ink) 12%, transparent); }
/* The analyst's answer sits in its own framed card on the other side (2026-11-07 fix: as bare text across the whole
   column, an Arabic reply landed right under the reader's own bubble and English lines jumped to the far side, Yassin
   "ai response is broken"). The reader's bubble is filled grey, the answer's is the page with a hairline frame. */
.as-bot{ align-self:flex-start; max-width:82%; padding:12px 16px; border-radius:18px; border-end-start-radius:6px;
  background:color-mix(in srgb, var(--mac-ink) 3%, var(--at-paper)); box-shadow:inset 0 0 0 1px var(--at-rule-2);
  font-size:14px; line-height:1.6; }
.as-user{ border-end-end-radius:6px; }
@media (min-width:900px){ .as-user{ max-width:72%; } .as-bot{ max-width:78%; } }
.as-user + .as-user, .as-bot + .as-bot{ margin-top:0; }
/* the empty chat: an icon and one big question */
.as-empty{ max-width:640px; padding:24px 8px; }
.as-empty-ic{ display:grid; place-items:center; width:52px; height:52px; margin:0 auto 18px; border-radius:16px; color:var(--mac-muted);
  box-shadow:inset 0 0 0 1.5px color-mix(in srgb, var(--mac-ink) 18%, transparent); }
.as-empty-ic svg{ width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linejoin:round; }
.as-empty-title{ font:500 clamp(22px, 2.6vw, 30px)/1.25 var(--sans); letter-spacing:-.02em; }
.as-empty-sub{ margin:10px 0 22px; font-size:13px; }
.as-chip{ min-height:36px; padding:7px 14px; border-radius:12px; background:transparent; box-shadow:inset 0 0 0 1px var(--at-rule-2); font-size:13px; }
.as-chip:hover{ background:var(--at-track); color:var(--mac-ink); }
/* the composer: a big rounded box, the send button inside it */
#as-form.as-composer{ display:block; margin:0 max(14px, calc((100% - 760px) / 2)) 16px; padding:12px 12px 10px 16px; border:0; border-radius:22px;
  background:color-mix(in srgb, var(--mac-ink) 4%, var(--at-paper)); box-shadow:inset 0 0 0 1px var(--at-rule-2), 0 10px 30px -18px var(--mac-scrim);
  backdrop-filter:none; -webkit-backdrop-filter:none; transition:box-shadow .15s ease; }
#as-form.as-composer:focus-within{ box-shadow:inset 0 0 0 1px var(--mac-faint), 0 10px 30px -18px var(--mac-scrim); }
#as-form.as-composer #as-input{ display:block; width:100%; min-height:44px; max-height:180px; padding:4px 2px; border-radius:0; background:transparent; box-shadow:none; font-size:15px; }
#as-form.as-composer #as-input:focus{ box-shadow:none; }
.as-tools{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:6px; }
.as-hint{ font:400 11.5px var(--sans); color:var(--mac-faint); }
#as-form.as-composer #as-send{ width:34px; height:34px; }
#as-form.as-composer #as-send svg{ width:16px; height:16px; }
@media (prefers-reduced-motion:reduce){ .as-msg{ animation:none; } }
@media (max-width:760px){ .as-hint{ display:none; } .as-tools{ justify-content:flex-end; } }

/* ---- The account card (2026-11-07, Yassin: "like Workly's switch account, with no avatar"): the name and role with
   up/down chevrons at the sidebar's foot; a click opens a menu above it with the accounts used before on this
   device and Log out. The tab rows are a little tighter to give it room. ---- */
#rail .rail-btn{ min-height:34px; }
#rail .rail-groups{ gap:14px; }
#rail .rail-welcome{ margin:12px 8px 14px; padding-bottom:12px; }
#rail .rail-foot{ margin-top:auto; padding-top:10px; border-top:0; }
.acct-card{ display:flex; align-items:center; gap:10px; width:100%; min-height:52px; padding:8px 10px 8px 10px; border:0; border-radius:14px; cursor:pointer; text-align:start;
  font:inherit; color:var(--glass-ink, var(--mac-ink)); background:color-mix(in srgb, currentColor 5%, transparent); box-shadow:inset 0 0 0 1px var(--glass-rule, var(--line));
  transition:background-color .15s ease; }
.acct-card:hover, .acct-card[aria-expanded="true"]{ background:color-mix(in srgb, currentColor 9%, transparent); }
.acct-card:focus-visible{ outline:2px solid currentColor; outline-offset:1px; }
/* The initials avatar (2026-11-08): a flat circle in the sidebar's own glass, like the open tab row (not a sphere,
   Yassin: "a circle that matches the rest of the sidebar"). */
.acct-av{ display:grid; place-items:center; flex:none; width:32px; height:32px; border-radius:50%; font:500 12px/1 var(--sans); letter-spacing:.02em;
  color:var(--glass-ink, var(--mac-ink)); background:var(--glass-on, color-mix(in srgb, currentColor 10%, transparent));
  box-shadow:var(--glass-on-ring, inset 0 0 0 1px color-mix(in srgb, currentColor 18%, transparent)); }
.acct-av-sm{ width:24px; height:24px; font-size:10px; }
.acct-txt{ display:flex; flex-direction:column; gap:2px; min-width:0; flex:1; }
.acct-name{ font:500 13.5px/1.2 var(--sans); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.acct-role{ font:400 11.5px/1.2 var(--sans); color:var(--glass-label, var(--mac-muted)); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.acct-chev{ width:16px; height:16px; flex:none; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; opacity:.6; }
body.rail-min .acct-card{ justify-content:center; padding:0; min-height:44px; }
body.rail-min .acct-card .acct-txt, body.rail-min .acct-card .acct-chev{ display:none; }

/* The menu: a solid sheet floating over the card (outer radius 14, padding 6, so its rows are 8). */
.acct-menu{ position:fixed; z-index:60; padding:6px; border-radius:14px; background:#fbfbfa; color:#1d1f23;
  box-shadow:0 0 0 1px rgba(20,22,26,.08), 0 18px 40px -12px rgba(20,22,26,.32); }
html[data-theme="dark"] .acct-menu{ background:#1c1d22; color:#ececee; box-shadow:0 0 0 1px rgba(255,255,255,.09), 0 18px 40px -12px rgba(0,0,0,.7); }
.acct-menu[hidden]{ display:none; }
.acct-menu.in{ animation:acctIn .18s cubic-bezier(.22,1,.36,1); transform-origin:bottom center; }
@keyframes acctIn{ from{ opacity:0; transform:translateY(6px) scale(.98); } }
.acct-menu-h{ margin:4px 10px 4px; font:500 11px/1.2 var(--sans); opacity:.55; }
.acct-item{ display:flex; align-items:center; gap:10px; width:100%; min-height:36px; padding:6px 10px; border:0; border-radius:8px; background:transparent;
  color:inherit; font:500 13.5px/1.2 var(--sans); text-align:start; text-decoration:none; cursor:pointer; }
.acct-item:hover, .acct-item:focus-visible{ background:color-mix(in srgb, currentColor 8%, transparent); outline:none; }
.acct-item .acct-role{ margin-inline-start:auto; color:inherit; opacity:.55; }
.acct-ic{ width:17px; height:17px; flex:none; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; opacity:.75; }
.acct-rule{ height:1px; margin:6px 4px; border:0; background:currentColor; opacity:.1; }
@media (prefers-reduced-motion: reduce){ .acct-menu.in{ animation:none; } .acct-card{ transition:none; } }

/* ---- A product picture, clicked (2026-11-07): it grows out of its thumbnail beside it and goes back on scroll. ---- */
img.zoomable{ cursor:zoom-in; }
.img-zoom{ position:fixed; z-index:70; display:grid; place-items:center; padding:8px; border-radius:18px; overflow:hidden; pointer-events:auto; cursor:zoom-out;
  background:var(--at-paper, #fff); transform-origin:top left; will-change:transform;
  box-shadow:0 0 0 1px rgba(20,22,26,.08), 0 24px 60px -18px rgba(20,22,26,.45); }
html[data-theme="dark"] .img-zoom{ background:#1c1d22; box-shadow:0 0 0 1px rgba(255,255,255,.09), 0 24px 60px -18px rgba(0,0,0,.75); }
.img-zoom img{ width:100%; height:100%; object-fit:contain; border-radius:10px; display:block; }

/* ==== Phone touch sizes (2026-11-07, Yassin: "make sure hub is optimized for phone view") ====
   Below 761px every Figi hub renders at the phone's real width (FigiHome left width=700 the same
   day), so the controls the shared layer draws small on a desktop get a finger-sized hit area and a
   readable label here. Layout only: nothing below changes what a page shows, and nothing applies
   on a desktop. Floors: 40px for anything pressed, 20px for a checkbox, no label under 11px.
   Inline links grow by padding and take it back with a negative margin, so text does not move.
   Verify: the phone audit (390x844, real-phone emulation) must report no tap target under 36px. */
@media (max-width:760px){
  /* 1. Pressed things: 40px tall, 11.5px labels. */
  #content :is(.seg-btn, .va-pf, .exp-cancel, .lock-btn, .wh-mini, .more-btn, .refresh-btn, .export, .sa-btn, .cu-chip, .as-chip,
    .drawer-btn, .wh-pill-btn, .rc-var, .pm-refund-btn, .status-save, .subtab, .brand-card .bc-open, .co-hand-go){
    min-height:40px; display:inline-flex; align-items:center; justify-content:center; }
  #content :is(.seg-btn, .va-pf, .lock-btn, .wh-mini, .exp-cancel){ padding-inline:12px; }
  #content :is(.seg-btn, .va-pf, .lock-btn, .wh-mini, .va-pf-label, .lnk){ font-size:11.5px; }
  #content .seg{ padding:2px; }
  #content .as-sess-del{ min-width:36px; min-height:36px; font-size:12px; }
  /* 2. Inline text links: the same 40px, without moving the line they sit on. */
  #content :is(.drv-link, .group-link, .view-link, .lnk, .more-link){ display:inline-block; padding-block:12px; margin-block:-12px; }
  /* 3. The (i) beside a finance figure: a 36px square around the same 14px glyph. */
  #content .fin-info{ padding:11px; margin:-9px; display:inline-flex; align-items:center; justify-content:center; }
  /* 4. Form fields: 20px boxes, 40px fields, 16px type so iOS does not zoom in on focus. */
  #content :is(input[type=checkbox], input[type=radio]){ width:20px; height:20px; min-width:20px; min-height:20px; margin:0 4px 0 0; accent-color:var(--red, var(--mac-ink)); }
  #content :is(input:not([type=checkbox], [type=radio], [type=range], [type=file], [type=color], [type=hidden]), select, textarea){ min-height:40px; font-size:16px; }
  #content select{ padding-inline:10px 28px; }
  /* 5. Labels: no text under 11px. */
  #content :is(.cm-label, .exp-sec-head, .exp-sec-sum, .exp-cat, .wst-k, .wh-pill, .wh-ip-tag, .drv-mut, .drv-msub, .badge, .stchip,
    .inv-hint, .cm-sub, .adt-bar-l, .adt-meta, .chart-val, .chart-x, .kpi-delta .g, .wh-live, code, .rc-draft, .as-sess-del.arm,
    .exp-sec-head.sub, .inp-last, .fb-c-ord, .fb-c-head .stchip, .co-drv-msub, .cal-dow, .cal-pasttoggle, .shop-heroes-sm .shop-hero-stats){ font-size:11.5px; }
  #content :is(small, .figure-value small, .cm-value small, .mc-total-num small, .mc-val small, .drv-amt small, .co-amt small){ font-size:11.5px; }
  #content :is(.drv-donut-lbl, .co-drv-donut-lbl){ font-size:11px; letter-spacing:.04em; }
  /* 6. The customers search row: the search box takes the whole first line, the two selects share the next. */
  #content .searchrow{ flex-wrap:wrap; }
  #content .searchrow .search{ flex:1 1 100%; order:-1; }
  #content .searchrow .search-mode{ flex:1 1 0; min-width:0; }
}

/* ---- THE CUSTOMER SERVICE AGENT PAGE (#va-view, every brand hub, 2026-11-08; Yassin: "make it more visually
   appealing and understandable"). Reads top to bottom as: what the agent does (one line), is it live (a status
   line, not a box), the brief + what needs you (the shared .brief/.needs), the period and channel, four figures,
   then the hub's .subtabs: Chats, Tickets, Insights, Cost. Chats are rows with a channel mark, the last line
   labelled by who said it, a plain status word and rounded chat bubbles. Mixes are `in srgb`: an oklch mix of
   these near-greys keeps a trace of chroma with hue "none", drawn as a brownish red (seen 2026-11-08). Scoped by the view id because the
   brand hubs' older #va-… rules in styles.css would beat classes. ---- */
#va-view .va-intro{ max-width:46em; margin:-4px 0 16px; font-size:14px; line-height:1.55; color:var(--mac-muted); }
#va-view .va-status, html[data-theme="dark"] #va-view .va-status{ display:inline-flex; align-items:center; gap:9px; margin:0 0 22px; padding:7px 13px 7px 11px;
  border:0; border-radius:999px; font-size:13px; font-weight:500; color:var(--mac-ink); background:color-mix(in srgb, var(--mac-ink) 6%, transparent); }
#va-view .va-status[hidden]{ display:none; }
#va-view .va-status .va-status-dot{ position:relative; width:8px; height:8px; border-radius:50%; background:var(--mac-faint); }
#va-view .va-status.va-live .va-status-dot{ background:var(--pos); }
#va-view .va-status.va-fallback .va-status-dot{ background:var(--mac-warn); }
#va-view .va-status.va-down{ color:var(--mac-bad); background:color-mix(in srgb, var(--mac-bad) 10%, transparent); }
#va-view .va-status.va-down .va-status-dot{ background:var(--mac-bad); }
#va-view .va-status.va-live .va-status-dot::after{ content:""; position:absolute; inset:0; border-radius:50%; background:var(--pos);
  animation:vaPulse 2.4s var(--mac-ease) infinite; }
@keyframes vaPulse{ from{ transform:scale(1); opacity:.55; } to{ transform:scale(2.8); opacity:0; } }
#va-view .va-brief{ margin:0 0 26px; }
#va-view .va-brief .brief-line{ max-width:30em; }

#va-view .va-filters{ display:flex; flex-direction:column; gap:10px; margin:0 0 18px; }
#va-view #va-period-tabs, #va-view #va-plat-tabs{ margin:0; }
#va-view .va-pf-label{ font-size:11.5px; letter-spacing:0; text-transform:none; color:var(--mac-muted); }
#va-view .va-pf{ display:inline-flex; align-items:center; gap:6px; border-radius:999px; }
#va-view .va-pf-ic{ width:13px; height:13px; flex:none; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
#va-view .va-pf-ic .dot{ fill:currentColor; stroke:none; }
#va-view .va-pf-n{ font-variant-numeric:tabular-nums; opacity:.6; font-weight:500; }
#va-view .va-pf.on .va-pf-n{ opacity:.8; }

#va-view .va-kpis{ margin-bottom:26px; }
#va-view .va-kpi-bar{ height:4px; margin-top:12px; border-radius:4px; overflow:hidden; background:color-mix(in srgb, var(--mac-ink) 9%, transparent); }
#va-view .va-kpi-bar i{ display:block; height:100%; border-radius:4px; background:var(--pos); transition:width .6s var(--mac-ease); }

#va-view .va-pane.va-enter{ animation:vaEnter .28s var(--mac-ease) both; }
@keyframes vaEnter{ from{ opacity:0; transform:translateY(6px); } }
#va-view #va-pane-insights > .panel{ margin-top:16px; }
#va-view .panel-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
#va-view .va-seg{ display:flex; gap:6px; flex-wrap:wrap; }
#va-view .va-hint{ margin:4px 0 12px; font-size:12.5px; line-height:1.5; color:var(--mac-muted); max-width:52em; }
#va-view .va-hint b{ color:var(--mac-ink); font-weight:600; }
#va-view .sr{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

/* a channel mark: the platform's icon in a soft round chip, never an initial */
#va-view .va-ch{ flex:none; display:inline-grid; place-items:center; width:32px; height:32px; border-radius:50%;
  color:var(--mac-ink); background:color-mix(in srgb, var(--mac-ink) 7%, transparent); }
#va-view .va-ch .va-pf-ic{ width:16px; height:16px; }

/* macOS: panels are windows (solid, 12px, a hairline and a soft drop), their head a toolbar; the filter rows
   are segmented controls (a grey track, the choice a raised white key that slides, slide.js HOSTS). No
   traffic lights (Yassin removed them 2026-11-07). Rows sit in one solid inset list, like System Settings. */
#va-view .panel, html[data-theme="dark"] #va-view .panel{ border-radius:12px; border:1px solid color-mix(in srgb, var(--mac-ink) 10%, transparent);
  background:var(--card, var(--at-paper)); box-shadow:0 1px 2px rgba(0,0,0,.06), 0 10px 30px -18px rgba(0,0,0,.35); }
#va-view .va-pane.panel{ padding:0; overflow:hidden; }
/* A pane with no toolbar head (Cost) keeps a panel's normal padding, or its text sits on the edges (Yassin, 2026-11-08). */
#va-view .va-pane.panel:not(:has(> .panel-head)){ padding:18px 22px 20px; }
#va-view .va-pane.panel > .panel-head{ margin:0; padding:12px 16px; border-bottom:1px solid color-mix(in srgb, var(--mac-ink) 9%, transparent);
  background:color-mix(in srgb, var(--mac-ink) 3%, var(--card, var(--at-paper))); }
#va-view .va-head-ctrls{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
#va-view #va-conv-plat > button{ padding:5px 9px; }
#va-view #va-conv-plat .va-pf-ic{ width:14px; height:14px; }
#va-view .va-pane.panel > .panel-head .lead-title{ margin:0; border:0; padding:0; font-weight:600; }
#va-view .va-pane.panel > .va-hint{ margin:12px 16px 0; }
#va-view .va-pane.panel > #va-convs, #va-view .va-pane.panel > #va-tickets{ padding:12px 16px 16px; }

#va-view :is(#va-period-tabs, #va-plat-tabs, #va-conv-filter, #va-conv-plat, #va-tk-status){ position:relative; display:inline-flex; flex-wrap:wrap; align-items:center;
  gap:2px; padding:2px; border-radius:9px; background:color-mix(in srgb, var(--mac-ink) 8%, transparent); width:auto; }
#va-view #va-plat-tabs .va-pf-label{ display:none; }
#va-view :is(#va-period-tabs, #va-plat-tabs, #va-conv-filter, #va-conv-plat, #va-tk-status) > button{ position:relative; z-index:1; margin:0; padding:5px 12px; min-height:0;
  border:0; border-radius:7px; background:transparent; box-shadow:none; color:var(--mac-muted); font-size:12.5px; font-weight:500; letter-spacing:0; }
#va-view :is(#va-period-tabs, #va-plat-tabs, #va-conv-filter, #va-conv-plat, #va-tk-status) > button:hover:not(.on){ color:var(--mac-ink); background:transparent; }
#va-view :is(#va-period-tabs, #va-plat-tabs, #va-conv-filter, #va-conv-plat, #va-tk-status) > button.on{ color:var(--mac-ink); font-weight:600;
  background:var(--card, var(--at-paper)); box-shadow:0 1px 2px rgba(0,0,0,.14), 0 0 0 .5px rgba(0,0,0,.06); }
#va-view :is(#va-period-tabs, #va-plat-tabs, #va-conv-filter, #va-conv-plat, #va-tk-status).slide-on > button.on{ background:transparent !important; box-shadow:none; }
#va-view :is(#va-period-tabs, #va-plat-tabs, #va-conv-filter, #va-conv-plat, #va-tk-status) > .slide-ind{ border-radius:7px; background:var(--card, var(--at-paper));
  box-shadow:0 1px 2px rgba(0,0,0,.14), 0 0 0 .5px rgba(0,0,0,.06); }
html[data-theme="dark"] #va-view :is(#va-period-tabs, #va-plat-tabs, #va-conv-filter, #va-conv-plat, #va-tk-status) > :is(button.on, .slide-ind){
  background:color-mix(in srgb, var(--mac-ink) 22%, var(--card, #1c1c1e)); box-shadow:0 1px 2px rgba(0,0,0,.4); }
#va-view .va-filters{ flex-direction:row; flex-wrap:wrap; align-items:center; gap:10px 12px; }

/* a chat row: one solid inset list, a hairline between rows, a soft highlight on hover */
#va-view #va-convs{ display:flex; flex-direction:column; }
#va-view #va-convs > .va-conv:first-of-type{ border-top-left-radius:10px; border-top-right-radius:10px; }
#va-view .va-conv{ padding:0; border:0; background:color-mix(in srgb, var(--mac-ink) 4%, var(--card, var(--at-paper))); }
#va-view .va-conv + .va-conv .va-conv-head{ box-shadow:inset 0 1px 0 color-mix(in srgb, var(--mac-ink) 9%, transparent); }
#va-view #va-convs > .va-conv:first-child{ border-radius:10px 10px 0 0; }
#va-view #va-convs > .va-conv:last-of-type{ border-radius:0 0 10px 10px; }
#va-view #va-convs > .va-conv:only-of-type{ border-radius:10px; }
#va-view .va-conv-head{ display:flex; align-items:flex-start; gap:12px; padding:13px 14px; margin:0; border-radius:inherit;
  cursor:pointer; transition:background .15s ease; }
#va-view .va-conv-head:hover{ background:color-mix(in srgb, var(--mac-ink) 5%, transparent); }
#va-view .va-conv-head:active{ background:color-mix(in srgb, var(--mac-ink) 9%, transparent); }
#va-view .va-conv-head:focus-visible{ outline:none; box-shadow:var(--mac-ring); }
#va-view .va-ch{ background:var(--card, var(--at-paper)); box-shadow:0 0 0 1px color-mix(in srgb, var(--mac-ink) 10%, transparent); }
#va-view .va-conv-main{ flex:1; min-width:0; display:flex; flex-direction:column; gap:3px; }
#va-view .va-conv-top{ display:flex; align-items:center; gap:8px; min-width:0; }
#va-view .va-name{ flex:0 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; font-weight:500; }
#va-view .va-conv-unread .va-name{ font-weight:650; }
#va-view .va-new{ flex:none; padding:1px 7px; border-radius:999px; font-size:10.5px; font-weight:600; letter-spacing:0; text-transform:none;
  color:#fff; background:var(--mac-bad); }
#va-view .va-when{ margin-inline-start:auto; flex:none; font-size:12px; color:var(--mac-faint); font-variant-numeric:tabular-nums; }
#va-view .va-preview{ margin:0; font-size:13px; line-height:1.45; color:var(--mac-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#va-view .va-preview b{ font-weight:500; color:var(--mac-ink); }
#va-view .va-conv-unread .va-preview{ color:var(--mac-ink); }
#va-view .va-conv-foot{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:4px; }
#va-view .va-state{ display:inline-flex; align-items:center; gap:6px; font-size:12px; color:var(--mac-muted); }
#va-view .va-state::before{ content:""; width:7px; height:7px; border-radius:50%; background:currentColor; }
#va-view .va-state.va-bot{ color:var(--pos); }
#va-view .va-state.va-human{ color:var(--mac-warn); }
#va-view .va-state.va-ticket{ color:var(--mac-bad); }
#va-view .va-resume{ font-size:12px; padding:3px 10px; border-radius:6px; }
#va-view .va-chev{ flex:none; align-self:center; font-size:20px; line-height:1; color:var(--mac-faint); }

/* ---- THE OPEN CHAT (2026-11-08): a side panel like the ads panel (.drawer), sliding in from the right. From
   900px it docks and the page makes room (no dark layer); narrower it opens over the page on a light dim, and
   fills a phone. Was a phone-shaped window until Yassin: "remove the mobile view and make it more understandable".
   It lives on <body>, so it is not scoped to #va-view. Top to bottom: who and where, who has the chat and what
   that means, the open ticket, the messages (each run labelled), the one action. ---- */
html.va-ph-lock{ overflow:hidden; }
.va-ph-scrim{ position:fixed; inset:0; z-index:60; background:rgba(20,21,22,.38); opacity:0; transition:opacity .25s ease; }
.va-ph-scrim[hidden]{ display:none; }
.va-ph-scrim.on{ opacity:1; }
.va-ph-scrim.push{ inset:0 0 0 auto; width:min(480px, 100vw); background:transparent; pointer-events:none; opacity:1; }
.va-ph{ position:fixed; top:0; right:0; z-index:61; display:flex; flex-direction:column; width:min(480px, 100vw); height:100vh; height:100dvh;
  pointer-events:auto; font-family:var(--sans); color:var(--mac-ink); background:var(--card, var(--at-paper)); border-radius:12px 0 0 12px;
  box-shadow:0 0 0 1px var(--line, rgba(0,0,0,.1)), 0 30px 80px -30px var(--mac-scrim);
  transform:translateX(100%); transition:transform .3s var(--mac-ease); }
.va-ph-scrim.on .va-ph{ transform:none; }
#main-col{ transition:margin .3s var(--mac-ease); }
@media (min-width:900px){ body.va-ph-push #main-col{ margin-inline-end:min(480px, 100vw); } }
#va-view .va-conv.on{ background:color-mix(in srgb, var(--mac-ink) 9%, var(--card, var(--at-paper))); }
#va-view .va-conv.on .va-chev{ color:var(--mac-ink); }

.va-ph-head{ display:flex; align-items:center; gap:12px; padding:20px 20px 14px; border-bottom:1px solid var(--line, rgba(0,0,0,.1)); }
.va-ph-head .va-ch{ flex:none; display:inline-grid; place-items:center; width:40px; height:40px; border-radius:50%; color:var(--mac-ink);
  background:color-mix(in srgb, var(--mac-ink) 7%, transparent); }
.va-ph-head .va-pf-ic, .va-ph .va-pf-ic{ width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.va-ph .va-pf-ic .dot{ fill:currentColor; stroke:none; }
.va-ph .sr{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
.va-ph-title{ flex:1; min-width:0; }
#va-ph-name{ margin:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font:600 17px/1.25 var(--sans); letter-spacing:-.01em; }
.va-ph-sub{ display:block; margin-top:3px; font-size:12.5px; color:var(--mac-muted); }
.va-ph-close{ flex:none; width:36px; height:36px; display:grid; place-items:center; padding:0; border:0; border-radius:10px; cursor:pointer;
  background:color-mix(in srgb, var(--mac-ink) 7%, transparent); color:var(--mac-ink); }
.va-ph-close svg{ width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; }
.va-ph-close:hover{ background:color-mix(in srgb, var(--mac-ink) 12%, transparent); }
.va-ph-close:focus-visible{ outline:none; box-shadow:var(--mac-ring); }

/* who has the chat, in words; then the open ticket */
.va-ph-info{ display:flex; flex-direction:column; gap:8px; padding:14px 20px; border-bottom:1px solid var(--line, rgba(0,0,0,.1)); }
.va-ph-info:empty{ display:none; }
.va-ph-state{ display:flex; flex-direction:column; gap:3px; font-size:13px; line-height:1.45; color:var(--mac-muted); }
.va-ph-state b{ font-weight:600; }
.va-ph-state .va-state{ display:inline-flex; align-items:center; gap:7px; font-size:13.5px; }
.va-ph-state .va-state::before{ content:""; width:8px; height:8px; border-radius:50%; background:currentColor; }
.va-ph .va-state.va-bot{ color:var(--pos); } .va-ph .va-state.va-human{ color:var(--mac-warn); } .va-ph .va-state.va-ticket{ color:var(--mac-bad); }
.va-ph-ticket{ padding:12px 14px; border-radius:10px; background:color-mix(in srgb, var(--mac-ink) 5%, var(--card, var(--at-paper))); }
.va-ph-tk-top{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.va-ph-ticket .va-tk-type{ padding:2px 9px; border-radius:999px; font-size:11.5px; font-weight:600; color:var(--mac-ink); background:color-mix(in srgb, var(--mac-ink) 8%, transparent); }
.va-ph-ticket .va-tk-type.va-tk-refund{ color:var(--mac-bad); background:color-mix(in srgb, var(--mac-bad) 12%, transparent); }
.va-ph-ticket .va-tk-wait{ font-size:12px; color:var(--mac-muted); } .va-ph-ticket .va-tk-wait.late{ color:var(--mac-bad); font-weight:600; }
.va-ph-ticket p{ margin:8px 0 0; font-size:13.5px; line-height:1.45; }
.va-ph-tk-ord{ display:block; margin-top:6px; font-size:12px; font-weight:500; color:var(--mac-muted); }

/* the messages: the customer on the left, the agent (ink) and your team (red) on the right, each run labelled */
.va-ph-body{ flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; display:flex; flex-direction:column; gap:3px; padding:8px 20px 20px; outline:none;
  background:color-mix(in srgb, var(--mac-ink) 3%, var(--card, var(--at-paper))); }
.va-ph-day{ align-self:center; margin:14px 0 2px; padding:3px 10px; border-radius:999px; font-size:11px; font-weight:600; color:var(--mac-muted);
  background:color-mix(in srgb, var(--mac-ink) 7%, transparent); }
.va-ph-run{ margin:12px 4px 2px; font-size:11.5px; font-weight:600; color:var(--mac-muted); }
.va-ph-run.bot, .va-ph-run.staff{ align-self:flex-end; }
.va-ph-run.staff{ color:var(--mac-bad); }
.va-ph-msg{ position:relative; max-width:80%; padding:8px 12px 6px; border-radius:16px; font-size:14px; line-height:1.4;
  white-space:pre-wrap; overflow-wrap:anywhere; background:var(--card, var(--at-paper)); color:var(--mac-ink);
  box-shadow:0 0 0 1px color-mix(in srgb, var(--mac-ink) 9%, transparent); }
.va-ph-msg.in{ align-self:flex-start; border-bottom-left-radius:5px; }
.va-ph-msg.bot{ align-self:flex-end; border-bottom-right-radius:5px; background:var(--mac-ink); color:var(--on-ink, var(--mac-bg)); box-shadow:none; }
.va-ph-msg.staff{ align-self:flex-end; border-bottom-right-radius:5px; background:var(--mac-bad); color:#fff; box-shadow:none; }
.va-ph-msg a{ color:inherit; }
.va-ph-t{ display:block; margin-top:2px; font-size:10px; text-align:end; opacity:.55; font-variant-numeric:tabular-nums; }
.va-ph-media{ display:block; margin:-4px -8px 6px; border-radius:12px; overflow:hidden; max-width:260px; }
.va-ph-media img, video.va-ph-media{ display:block; width:100%; max-height:320px; object-fit:cover; background:color-mix(in srgb, var(--mac-ink) 8%, transparent); }
.va-ph-audio{ display:block; width:230px; max-width:100%; height:36px; margin-bottom:4px; }
.va-ph-file{ display:block; font-size:12.5px; font-weight:500; opacity:.8; margin-bottom:2px; }
.va-ph-loading{ margin:auto; display:flex; gap:6px; }
.va-ph-loading i{ width:8px; height:8px; border-radius:50%; background:var(--mac-faint); animation:vaDot 1s ease-in-out infinite; }
.va-ph-loading i:nth-child(2){ animation-delay:.15s; } .va-ph-loading i:nth-child(3){ animation-delay:.3s; }
@keyframes vaDot{ 0%,80%,100%{ opacity:.3; transform:none; } 40%{ opacity:1; transform:translateY(-3px); } }
.va-ph .empty{ margin:auto; color:var(--mac-muted); }

/* the one action */
.va-ph-foot{ display:flex; align-items:center; gap:14px; padding:14px 20px max(16px, env(safe-area-inset-bottom));
  font-size:12.5px; line-height:1.45; color:var(--mac-muted); border-top:1px solid var(--line, rgba(0,0,0,.1)); }
.va-ph-foot span{ flex:1; }
.va-ph-foot .va-resume{ flex:none; padding:8px 14px; border:0; border-radius:var(--mac-r); font-size:13px; font-weight:600; cursor:pointer;
  background:var(--mac-ink); color:var(--on-ink, var(--mac-bg)); }
.va-ph-foot .va-resume.arm{ background:var(--mac-bad); color:#fff; }
@media (max-width:520px){ .va-ph{ border-radius:0; } }
@media (prefers-reduced-motion:reduce){ .va-ph-scrim, .va-ph, #main-col{ transition:none; } .va-ph-loading i{ animation:none; } }

/* a ticket row */
#va-view .va-tk{ padding:14px; border:0; background:color-mix(in srgb, var(--mac-ink) 4%, var(--card, var(--at-paper))); }
#va-view .va-tk + .va-tk{ box-shadow:inset 0 1px 0 color-mix(in srgb, var(--mac-ink) 9%, transparent); }
#va-view #va-tickets > .va-tk:first-of-type, #va-view .va-tk-hist + .va-tk{ border-radius:10px 10px 0 0; }
#va-view #va-tickets .va-tk:last-of-type{ border-radius:0 0 10px 10px; }
#va-view #va-tickets .va-tk:only-of-type{ border-radius:10px; }
#va-view #va-tickets .va-tk:is(:has(+ .va-tk-hist), :has(+ .view-all)){ border-radius:0 0 10px 10px; }
#va-view #va-tickets .va-tk:first-of-type:is(:has(+ .va-tk-hist), :has(+ .view-all)){ border-radius:10px; }
#va-view .va-tk-head{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
#va-view .va-tk-type{ padding:2px 9px; border-radius:999px; font-size:11.5px; font-weight:500; color:var(--mac-ink);
  background:color-mix(in srgb, var(--mac-ink) 7%, transparent); }
#va-view .va-tk-type.va-tk-refund{ color:var(--mac-bad); background:color-mix(in srgb, var(--mac-bad) 11%, transparent); }
#va-view .va-tk-wait{ margin-inline-start:auto; font-size:12px; color:var(--mac-muted); font-variant-numeric:tabular-nums; }
#va-view .va-tk-wait.late{ color:var(--mac-bad); font-weight:600; }
#va-view .va-tk-sum{ margin:8px 0 0 42px; font-size:13.5px; line-height:1.5; }
#va-view .va-tk-why{ margin:3px 0 0 42px; font-size:12.5px; color:var(--mac-muted); }
#va-view .va-tk-foot{ display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin:10px 0 0 42px; font-size:12.5px; }
#va-view .va-tk-ord{ font-weight:500; }
#va-view .va-tk-foot .tl-meta{ color:var(--mac-faint); }
#va-view .va-tk-foot .va-resolve{ margin-inline-start:auto; }
#va-view .va-tk-done{ opacity:.6; }
#va-view .va-tk-hist{ margin:18px 0 2px; font-size:12px; letter-spacing:0; text-transform:none; font-weight:600; color:var(--mac-muted); }
#va-view .va-tk-ctrls{ display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin:0; }

/* how the agent behaved: two ruled lists, a count and what it means */
#va-view .va-health, html[data-theme="dark"] #va-view .va-health{ display:grid; align-items:start; gap:22px; padding:0; margin:0; border:0; background:transparent; }
@media (min-width:900px){ #va-view .va-health{ grid-template-columns:1fr 1fr; gap:32px; } }
#va-view .va-h-title{ margin:0 0 4px; font-size:12.5px; font-weight:600; color:var(--mac-muted); }
#va-view .va-h-row{ display:flex; align-items:flex-start; gap:14px; padding:11px 0; border-bottom:1px solid var(--rowline, var(--line)); }
#va-view .va-h-row:last-child{ border-bottom:0; }
#va-view .va-h-n{ flex:none; min-width:2ch; font-size:20px; line-height:1.1; font-weight:500; font-variant-numeric:tabular-nums; }
#va-view .va-h-bad .va-h-n{ color:var(--mac-bad); }
#va-view .va-h-t b, #va-view .va-h-bad .va-h-t b{ display:block; font-size:13.5px; font-weight:500; color:var(--mac-ink); }
#va-view .va-h-t span{ display:block; margin-top:2px; font-size:12.5px; color:var(--mac-muted); }

@media (max-width:640px){
  #va-view .va-tk-sum, #va-view .va-tk-why, #va-view .va-tk-foot{ margin-inline-start:0; }
  #va-view .va-tk-wait{ margin-inline-start:0; flex-basis:100%; }
  #va-view .va-tk-ctrls{ width:100%; }
  #va-view .va-tk-ctrls nav{ flex-basis:100%; }
  #va-view .va-tk-ctrls .va-tk-sel{ flex:1 1 0; min-width:0; margin:0; font-size:13px; }
}
@media (prefers-reduced-motion:reduce){
  #va-view .va-status .va-status-dot::after, #va-view .va-pane.va-enter{ animation:none; }
}


/* ---- The open order (orders.js detailHTML, Yassin 2026-11-08: "they overlap"): room between the lines, and the
   links out (Shopify, Bosta tracking) as small quiet pill buttons at the end of their line ---- */
.drow-detail .detail:not(:has(> .cd)){ display:grid; gap:14px; line-height:1.55; }
.drow-detail .detail .manual-status{ margin:2px 0 0; padding:0 0 14px; }
.drow-detail .detail .bosta-tl{ margin-top:-4px; }
.ext-btn{ display:inline-flex; align-items:center; gap:5px; height:26px; padding:0 11px; margin-inline-start:10px; vertical-align:middle;
  border-radius:999px; font:500 12px/1 var(--sans); letter-spacing:-.005em; color:var(--ink); text-decoration:none; white-space:nowrap;
  background:var(--at-chip, rgba(0,0,0,.05)); box-shadow:inset 0 0 0 1px var(--at-rule-2, rgba(0,0,0,.12));
  transition:background-color .15s ease, box-shadow .15s ease; }
.ext-btn:hover{ background:var(--at-track-hover, rgba(0,0,0,.09)); box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--ink) 45%, transparent); }
.ext-btn:focus-visible{ outline:2px solid var(--ink); outline-offset:2px; }
.ext-btn .ext-arr{ font-size:11px; opacity:.55; }
/* a link that stands on its own line (the map, 2026-11-08: "turn this location on map link to a button"): no lead-in gap, a small icon */
.ext-btn.ext-solo{ margin-inline-start:0; }
.ext-btn .ti{ width:13px; height:13px; flex:none; margin:0 1px 0 -2px; }
@media (max-width:760px){ .ext-btn.ext-solo{ margin:0; } }
@media (prefers-reduced-motion:reduce){ .ext-btn{ transition:none; } }
@media (max-width:760px){ .ext-btn{ height:32px; padding:0 13px; margin:6px 0 0; } }

/* ---- THE SHELL (2026-11-08, every hub; hub-ui.js startShell): everything right of the sidebar is one rounded sheet
   beside the glass pane, on a slightly darker desk (Yassin: "make the whole other side of the hub that's not the
   sidebar as one shell so that it looks more modern"). The window still scrolls; .shell-frame is fixed over the sheet
   and paints the desk OUTSIDE its rounded edge (a 100vmax spread shadow), so the sheet's corners and its 10px
   gutter hold still while the page scrolls inside. The sidebar (z 20), panels, pop-ups and menus (z 60+) sit above
   the frame (z 18); the page and the top bar (z 15) sit below it, so their corners are clipped round. Only while the
   sidebar shows (body.shell-on); a phone keeps the plain page. ---- */
:root{ --shell-desk:color-mix(in srgb, var(--mac-bg) 91%, #5d6672); --shell-r:22px; }
html[data-theme="dark"]{ --shell-desk:#020203; }
.shell-frame{ display:none; }
body.shell-on{ background:var(--shell-desk); }
body.shell-on #main-col{ margin:10px 10px 10px 10px; min-height:calc(100vh - 20px); background:var(--mac-bg); border-radius:var(--shell-r); }
body.shell-on #topbar{ top:10px; border-radius:var(--shell-r) var(--shell-r) 0 0; }
/* Side panels (the chat, the ads panel) float like the sheet and the sidebar: 10px from the top, the bottom and
   the edge, the same rounded corners, so every pane lines up at one height (Yassin, 2026-11-08: "all shells should
   be aligned and at same height not cut up at the top"). A docked one still makes room: its width plus both gaps.
   --dock-w is the ads panel's width (Figi Trade sets 560px in its own styles). */
:root{ --dock-w:480px; }
body.shell-on .va-ph, body.shell-on .drawer:not(.drawer-full){ top:10px; bottom:10px; right:10px; height:auto; border-radius:var(--shell-r); }
body.shell-on .va-ph{ transform:translateX(calc(100% + 12px)); }
body.shell-on .va-ph-scrim.on .va-ph{ transform:none; }
body.shell-on .drawer.drawer-docked, html[data-theme="dark"] body.shell-on .drawer.drawer-docked{ border-inline-start:0;
  box-shadow:0 0 0 1px color-mix(in srgb, var(--mac-ink) 9%, transparent), 0 18px 44px -24px rgba(0,0,0,.35); }
html[data-theme="dark"] body.shell-on .va-ph, html[data-theme="dark"] body.shell-on .drawer.drawer-docked{ box-shadow:0 0 0 1px rgba(255,255,255,.07), 0 18px 44px -22px rgba(0,0,0,.85); }
@media (min-width:900px){
  body.shell-on.va-ph-push #main-col{ margin-inline-end:calc(min(480px, 100vw) + 20px); }
  body.shell-on.drawer-push #main-col{ margin-inline-end:calc(var(--dock-w) + 20px); }
}
body.shell-on #topbar::before{ display:none; }
body.shell-on .shell-frame{ display:block; position:fixed; top:10px; bottom:10px; z-index:18; pointer-events:none; border-radius:var(--shell-r);
  box-shadow:0 0 0 100vmax var(--shell-desk), inset 0 0 0 1px color-mix(in srgb, var(--mac-ink) 9%, transparent); }
html[data-theme="dark"] body.shell-on .shell-frame{ box-shadow:0 0 0 100vmax var(--shell-desk), inset 0 0 0 1px rgba(255,255,255,.07); }
@media print{ .shell-frame{ display:none !important; } body.shell-on #main-col{ margin:0; border-radius:0; } }

/* No loading line under the header (Yassin, 2026-11-08: "remove this loading red line at the bottom of the header"). The
   brand hubs' styles.css still draws a 2px red sweep on #topbar::after while body.is-fetching; the page's own placeholders
   already say it is loading. */
#topbar::after, body.is-fetching #topbar::after{ display:none !important; animation:none !important; }

/* ---- THE DARK THEME: LIGHT MODE, MIRRORED (2026-11-18, every hub; replaces the 2026-11-08 blue-grey "readable"
   palette). Yassin, on the demo hub: "make the dark mode look just like the bright mode, exact same structure, a
   simple background", then "make the rest of all tabs follow same design rules" and "pull these changes into hub
   infrastructure with all hubs". Every light layer keeps its place and its contrast step, flipped, in neutral greys:
     light: desk < sheet < card (1px ring) < field          dark: #0b0b0c < #151516 < #1c1c1e (ring #29292c) < #232326
   Cards sit ABOVE the sheet, as in light mode. Text: muted #a1a1a6 and faint #8e8e93 (5:1 or better on the cards).
   Last dark token block in the file, so it wins over the earlier ones here and in each hub's styles.css. Screen only:
   paper keeps the print reset near the top of this file (dark ink on white), which this block would otherwise beat. ---- */
@media screen{
html[data-theme="dark"]{
  --bg:#151516; --mac-bg:#151516; --shell-desk:#0b0b0c;
  --card:#1c1c1e; --paper:#1c1c1e; --surface:#1c1c1e; --at-paper:#1c1c1e; --at-raised:#232326; --at-hero-bg:#232326;
  --at-img-bg:#232326; --at-mono-bg:#232326;
  --card-line:#29292c; --line:#29292c; --rowline:#242427; --hairline:#242427; --at-rule:#29292c; --at-rule-2:#353539;
  --ink:#f2f2f3; --mac-ink:#f2f2f3;
  --muted:#a1a1a6; --text-2:#c7c7cc; --text-3:#8e8e93; --at-muted-2:#98989d; --at-ink-2:#e5e5ea; --side-muted:#a1a1a6;
  --hoverbg:#222225; --hover:#222225; --dk-surface:#232326; --dk-line:#353539;
  --shadow-card:0 0 0 1px #29292c; --shadow-hero:0 0 0 1px #29292c; --elev-1:0 0 0 1px #29292c;
  --at-track:rgba(255,255,255,.06); --at-chip:rgba(255,255,255,.08); --at-chosen:#2c2c2f;
  --at-topbar-glass:rgba(21,21,22,.76); --at-topbar-shadow:none;
}
}
/* The header is the sheet's own colour (sRGB, not oklch: an oklch mix of this grey drew it darker and muddier), at the
   top of the page and once scrolled, so the sheet reads as one piece. */
html[data-theme="dark"] #topbar, html[data-theme="dark"] #topbar.scrolled{ background:color-mix(in srgb, var(--mac-bg) 92%, transparent); }
html[data-theme="dark"] body.shell-on{ background:var(--shell-desk); }
/* The early dark block painted panels, KPI boxes, report actions and courier cards with a fixed near-black gradient and
   inputs with #0c0d11; on the brighter sheet they read as holes. They take the card colours now. */
html[data-theme="dark"] :is(.panel, .kpi, .trend-panel, .rep-action, .co-driver){ background:var(--card);
  box-shadow:0 0 0 1px var(--card-line), inset 0 1px 0 rgba(255,255,255,.04); }
html[data-theme="dark"] :is(input, select, textarea){ background-color:#1b1d22; border-color:var(--line); }
/* Consultant, dark (2026-11-08, Yassin: "contrasts need to get very slightly darker and these secondary colors of
   consultant need to be adjusted"): the chats list, chips, bubbles and composer had a faint red-brown cast (oklch mixes
   of near-greys, every Consultant mix is sRGB now) and the list sat LIGHTER than the sheet. Neutral grey now, the list a
   touch darker than the sheet, the chips and the open chat a quieter white. Light theme untouched. */
html[data-theme="dark"] #as-rail{ background:color-mix(in srgb, var(--mac-bg) 35%, var(--at-paper)); }
html[data-theme="dark"] .as-chip{ background:rgba(255,255,255,.04); }
html[data-theme="dark"] .as-sess.on, html[data-theme="dark"] .as-sess.on:hover{ background:rgba(255,255,255,.07); }
html[data-theme="dark"] .as-user{ background:color-mix(in srgb, var(--mac-ink) 6%, var(--at-paper)); }
html[data-theme="dark"] .as-bot{ background:color-mix(in srgb, var(--mac-ink) 2%, var(--at-paper)); }

/* ---- MOTION, SMOOTHED (2026-11-08, every hub; Yassin: "make every single animation across the dashboard smooth, make no
   mistakes"). Enters glide on the house curve; exits are shorter and accelerate away; nothing animates on page load;
   pop-ups fade out instead of vanishing; the sidebar crossfades its contents so nothing is seen jumping. ---- */
#rail{ transition:none; }   /* only body.rail-anim glides the width (a click), never a page load */
#rail > *{ transition:opacity .2s ease; }
body.rail-fading #rail > *{ opacity:0; transition-duration:.1s; }
body.shell-on #rail{ -webkit-backdrop-filter:none; backdrop-filter:none; }   /* a flat desk behind it: the blur showed nothing and repainted every frame */
.drawer:not(.open), .va-ph-scrim:not(.on) .va-ph{ transition-duration:.24s; transition-timing-function:cubic-bezier(.4,0,1,1); }
.drawer-scrim:not(.open), .va-ph-scrim:not(.on){ transition-duration:.2s; }
body.shell-on .drawer:not(.drawer-full):not(.open){ transform:translateX(calc(100% + 12px)); }
.acct-menu.out{ animation:acctOut .12s cubic-bezier(.4,0,1,1) forwards; pointer-events:none; }
@keyframes acctOut{ to{ opacity:0; transform:translateY(4px) scale(.98); } }
.rp-pop.out{ animation:rpOut .12s cubic-bezier(.4,0,1,1) forwards; pointer-events:none; }
@keyframes rpOut{ to{ opacity:0; transform:translateY(-3px) scale(.98); } }
.need-n{ font-variant-numeric:lining-nums tabular-nums; }   /* digits keep their width while they count */
#va-view .va-kpi-bar i{ width:100%; transform-origin:left center; transition:transform .5s cubic-bezier(.22,1,.36,1); }
@media (prefers-reduced-motion:reduce){
  #rail > *, .acct-menu.out, .rp-pop.out, #va-view .va-kpi-bar i{ transition:none; animation:none; }
}

/* ---- Orders: Bosta money chip beside "Delivered" (bosta-money.js, 2026-11-09) -------- */
/* Same quiet pill as the status chip; the dot says it: green = Wednesday's transfer carried it,
   amber = Bosta still holds it, grey = prepaid, nothing to collect. */
.stchip.bm-in, .stchip.bm-wait, .stchip.bm-none{
  border:0; background:var(--at-chip, rgba(127,127,127,.12)); color:var(--at-ink-2, inherit); font-size:11px; font-weight:500; margin-inline-start:4px; }
.stchip.bm-in::before{ background:var(--at-st-delivered, #2f9e5a); }
.stchip.bm-wait::before{ background:#d39b2a; }
.stchip.bm-none::before{ background:var(--muted, #8f94a0); }
.search-mode.money-filter{ max-width:220px; }

/* ---- THE LIST BASE (2026-11-15, every hub). Yassin, on Figi Trade's new Orders page: "this page looks disgusting, fix it
   from infrastructure". The search row, data table, order detail, status chip, stuck panel, Bosta timeline and pager
   lived ONLY in each brand hub's own styles.css (cloned there with each hub), so a hub that never cloned them (Figi Trade)
   drew its Orders page half-styled. They live here now, as the base every hub gets.
   OPT-IN: it applies only under <html data-list-base> (Figi Trade today). The brand hubs keep their own copies and do
   not opt in, so nothing on them moves (checked element by element on Yeganen: without the opt-in this block would
   round their status chips and change select weights). A brand hub can adopt it by adding the attribute and deleting its
   own copy, after a side-by-side check. Every selector is wrapped in :where(), so the layer has ZERO specificity and any
   rule a hub has (the Atelier #orders-view rules) still wins. Colours come only from
   the Atelier tokens every hub defines (sync-hub-core checks), so light and dark both work. */
:where([data-list-base] .searchrow){ display:flex; flex-wrap:wrap; gap:8px; align-items:stretch; margin-bottom:14px; }
:where([data-list-base] .search-mode){ flex:none; font:500 13px var(--sans); padding:0 12px; min-height:42px; border:1px solid var(--at-rule);
  border-radius:10px; background:var(--at-paper); color:var(--ink); cursor:pointer; }
:where([data-list-base] .search){ flex:1 1 220px; min-width:0; font:400 15px var(--sans); padding:11px 14px; border:1px solid var(--at-rule);
  border-radius:10px; background:var(--at-paper); color:var(--ink); }
:where([data-list-base] .search)::placeholder{ color:var(--muted); }
:where([data-list-base] .table-wrap){ overflow-x:auto; }
:where([data-list-base] .table-wrap .dtable){ min-width:640px; }
:where([data-list-base] .dtable){ width:100%; border-collapse:collapse; background:var(--at-paper); }
:where([data-list-base] .dtable thead th){ font:500 12px var(--sans); color:var(--muted); text-align:left; padding:12px 14px; border-bottom:1px solid var(--at-rule); white-space:nowrap; }
:where([data-list-base] .dtable td){ padding:12px 14px; border-bottom:1px solid var(--at-rule); font:400 13px var(--sans); vertical-align:middle; }
:where([data-list-base] .dtable tr:last-child td){ border-bottom:none; }
:where([data-list-base] .dtable tbody tr.drow){ cursor:pointer; }
:where([data-list-base] .dtable tbody tr.drow:hover){ background:var(--at-raised); }
:where([data-list-base] .dtable th.num, [data-list-base] .dtable td.num){ text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
:where([data-list-base] .dtable td.empty){ text-align:center; color:var(--muted); padding:28px 14px; }
:where([data-list-base] .col-action){ width:44px; text-align:right; }
:where([data-list-base] .col-main){ display:flex; align-items:center; gap:10px; }
:where([data-list-base] .cname-n){ font:500 14px var(--sans); font-variant-numeric:tabular-nums; }
:where([data-list-base] .cname-s){ font-size:11.5px; color:var(--muted); margin-top:2px; }
:where([data-list-base] .wa){ flex:none; display:inline-block; text-decoration:none; font-size:16px; line-height:1; padding:6px 8px; border-radius:8px; border:1px solid var(--at-rule); }
:where([data-list-base] .wa:hover){ background:var(--at-raised); }
:where([data-list-base] .drow-detail td){ background:var(--at-raised); padding:16px 14px; }
:where([data-list-base] .detail){ font:400 12.5px var(--sans); display:grid; gap:10px; }
:where([data-list-base] .detail .stat){ color:var(--muted); line-height:1.6; }
:where([data-list-base] .detail .stat b){ color:var(--ink); }
:where([data-list-base] .savestate){ font-size:12px; color:var(--muted); }
:where([data-list-base] .stchip){ display:inline-flex; align-items:center; gap:5px; font:600 10.5px var(--sans); padding:3px 10px 3px 8px;
  border:1px solid currentColor; border-radius:999px; background:none; white-space:nowrap; }
:where([data-list-base] .stchip)::before{ content:''; width:6px; height:6px; border-radius:50%; background:currentColor; }
:where([data-list-base] .timeline){ display:grid; gap:8px; }
:where([data-list-base] .tl-row){ display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding-left:10px; border-left:2px solid var(--at-rule); }
:where([data-list-base] .tl-meta){ font-size:11.5px; color:var(--muted); }
:where([data-list-base] .manual-status){ display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding-bottom:12px; border-bottom:1px solid var(--at-rule); }
:where([data-list-base] .manual-status .status-select){ font:500 12.5px var(--sans); padding:7px 10px; border:1px solid var(--at-rule); border-radius:8px; background:var(--at-paper); color:var(--ink); }
:where([data-list-base] .manual-status .status-save){ font:600 12.5px var(--sans); padding:7px 14px; border:1px solid var(--ink); border-radius:8px; background:var(--ink); color:var(--at-paper); cursor:pointer; }
:where([data-list-base] .manual-status .status-save:disabled){ opacity:.5; cursor:default; }
:where([data-list-base] .tfoot-bar){ display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:space-between; margin-top:14px; font:400 12.5px var(--sans); color:var(--muted); }
:where([data-list-base] .page-size select){ font:500 12.5px var(--sans); border:1px solid var(--at-rule); border-radius:8px; padding:4px 8px; margin:0 4px; background:var(--at-paper); color:var(--ink); }
:where([data-list-base] .pagination){ display:flex; gap:4px; align-items:center; }
:where([data-list-base] .pg-arrow, [data-list-base] .pg-num){ font:500 12.5px var(--sans); min-width:30px; height:30px; padding:0 8px; border:1px solid var(--at-rule); border-radius:8px; background:var(--at-paper); color:var(--muted); cursor:pointer; }
:where([data-list-base] .pg-num.on){ background:var(--ink); color:var(--at-paper); border-color:var(--ink); font-weight:600; }
:where([data-list-base] .pg-arrow:disabled){ opacity:.4; cursor:default; }
:where([data-list-base] .pg-ellipsis){ padding:0 4px; color:var(--muted); }
:where([data-list-base] .btl-head){ font:600 10px var(--sans); text-transform:uppercase; letter-spacing:1.2px; color:var(--muted); margin-bottom:6px; }
:where([data-list-base] .btl-row){ display:flex; align-items:baseline; gap:9px; padding:3px 0; font-size:12px; }
:where([data-list-base] .btl-dot){ flex:none; font-size:9px; }
:where([data-list-base] .btl-row.todo){ opacity:.45; }
:where([data-list-base] .btl-label){ min-width:120px; font-weight:600; }
:where([data-list-base] .btl-when, [data-list-base] .btl-loading){ color:var(--muted); font-size:11.5px; font-variant-numeric:tabular-nums; }
:where([data-list-base] .stuck){ background:var(--at-paper); border-radius:14px; margin-bottom:18px; overflow:hidden; }
:where([data-list-base] .stuck-head){ display:flex; flex-wrap:wrap; align-items:center; gap:8px 16px; width:100%; padding:16px 20px; background:none; border:0; font:inherit; color:inherit; text-align:left; }
:where([data-list-base] .stuck-title){ font:600 13px var(--sans); }
:where([data-list-base] .stuck-sum){ flex:1 1 280px; font-size:12.5px; color:var(--muted); }
:where([data-list-base] .stuck-stale){ color:var(--red); font-weight:600; margin-left:6px; }
:where([data-list-base] .stuck-body){ border-top:1px solid var(--at-rule); padding:4px 20px 14px; }
:where([data-list-base] .stuck-note){ font-size:12.5px; line-height:1.55; color:var(--muted); margin:10px 0 12px; }
:where([data-list-base] .stuck-note code){ font-size:11.5px; padding:1px 5px; border:1px solid var(--at-rule); border-radius:4px; }
/* Phone: a table row becomes a card, each cell labelled by its column (app.js stamps data-label in every hub). */
@media (max-width:760px){
  :where([data-list-base] .table-wrap){ overflow:visible; }
  :where([data-list-base] .table-wrap .dtable){ min-width:0; }
  :where([data-list-base] .dtable, [data-list-base] .dtable tbody){ display:block; background:none; border:0; }
  :where([data-list-base] .dtable thead){ display:none; }
  :where([data-list-base] .dtable tbody tr){ position:relative; display:block; margin:0 0 12px; padding:4px 2px; background:var(--at-paper); border-radius:14px; box-shadow:0 0 0 1px var(--at-rule); }
  :where([data-list-base] .dtable tbody td){ display:flex; align-items:center; justify-content:space-between; gap:14px; padding:9px 12px; border-bottom:1px solid var(--at-rule); font-size:14px; text-align:right; }
  :where([data-list-base] .dtable tbody td:last-child){ border-bottom:0; }
  :where([data-list-base] .dtable tbody td[data-label])::before{ content:attr(data-label); flex:none; font-size:11px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); text-align:left; }
  :where([data-list-base] .dtable tbody td:not([data-label]), [data-list-base] .dtable tbody td[colspan]){ display:block; text-align:left; }
  :where([data-list-base] .dtable tbody td.col-action:empty){ display:none; }
  :where([data-list-base] .dtable tbody td:has(> .col-main)){ padding:12px 64px 12px 12px; }
  :where([data-list-base] .dtable tbody td.col-action){ position:absolute; top:10px; right:10px; padding:0; border:0; width:auto; }
  :where([data-list-base] .dtable tbody tr.drow-detail[hidden]){ display:none; }
}

/* ---- THE TAGS (2026-11-16, every hub). Yassin, on Figi Trade's Orders: "upgrade the look of tags in light and dark
   mode". One tag everywhere: a soft tint of its tone, the same tone's text a step darker (light) or lighter (dark), a
   6px dot, no border, 22px tall, 11.5px/500, tabular figures. Five tones and colour only where it means something:
   neutral (informational: new, paid, cancelled, refunded, prepaid), blue (on its way: fulfilled, out for delivery,
   with Bosta), green (done: delivered, confirmed, money received), amber (waiting on someone: postponed, no answer,
   money not received yet, a young stuck order), red (needs a person now: returned, cancel requested, not confirmed,
   an old stuck order). Text contrast on the tint, measured over the hubs' cards and open rows: 4.8:1 or better in
   light, 6.2:1 or better in dark (WCAG AA for small text). This block is last in the file and loads after every
   hub's styles.css, so it replaces the older per-hub chip colours (.stchip.st-*, .pm-*, .va-*, .fb-*, .bm-*, the
   Atelier tints, Defragile's .cfchip) without touching them. A new chip picks a tone with a status class below, or
   with .tag-neutral / .tag-blue / .tag-green / .tag-amber / .tag-red. ---- */
:root{
  --tag-h:22px; --tag-r:999px; --tag-pad:0 9px 0 8px;
  --tag-neutral-bg:rgba(90,96,107,.10);  --tag-neutral-fg:#454a54; --tag-neutral-dot:#9aa0aa;
  --tag-blue-bg:rgba(37,99,235,.10);     --tag-blue-fg:#1d4fc0;    --tag-blue-dot:#3b74ee;
  --tag-green-bg:rgba(22,150,79,.12);    --tag-green-fg:#13683a;   --tag-green-dot:#21a35d;
  --tag-amber-bg:rgba(214,138,10,.16);   --tag-amber-fg:#874a06;   --tag-amber-dot:#dd900f;
  --tag-red-bg:rgba(220,45,40,.10);      --tag-red-fg:#b0241d;     --tag-red-dot:#e2463c;
}
html[data-theme="dark"]{
  --tag-neutral-bg:rgba(255,255,255,.08); --tag-neutral-fg:#d0d4db; --tag-neutral-dot:#8e94a0;
  --tag-blue-bg:rgba(100,150,255,.17);    --tag-blue-fg:#adc9ff;    --tag-blue-dot:#6f9fff;
  --tag-green-bg:rgba(70,200,120,.15);    --tag-green-fg:#93e2b1;   --tag-green-dot:#4fc982;
  --tag-amber-bg:rgba(245,180,60,.16);    --tag-amber-fg:#f6cd80;   --tag-amber-dot:#f0a93a;
  --tag-red-bg:rgba(255,100,90,.17);      --tag-red-fg:#ffb0a8;     --tag-red-dot:#ff6b5f;
}
/* Doubled class: (0,2,0) and later in the cascade, so it wins over every older .stchip.st-* / .stchip.pm-* rule. */
.stchip.stchip, .cfchip.cfchip{
  --tag-bg:var(--tag-neutral-bg); --tag-fg:var(--tag-neutral-fg); --tag-dot:var(--tag-neutral-dot);
  display:inline-flex; align-items:center; gap:6px; box-sizing:border-box; height:var(--tag-h); padding:var(--tag-pad);
  border:0; border-radius:var(--tag-r); background:var(--tag-bg); color:var(--tag-fg); box-shadow:none;
  font:500 11.5px/1 var(--sans); letter-spacing:0; text-transform:none; font-variant-numeric:tabular-nums lining-nums;
  white-space:nowrap; vertical-align:middle; }
.stchip.stchip::before, .cfchip.cfchip::before{ content:''; flex:none; width:6px; height:6px; border-radius:50%; background:var(--tag-dot); }
:is(.stchip, .cfchip):is(.tag-blue, .st-out, .st-bosta, .va-tk-handoff){
  --tag-bg:var(--tag-blue-bg); --tag-fg:var(--tag-blue-fg); --tag-dot:var(--tag-blue-dot); }
:is(.stchip, .cfchip):is(.tag-green, .st-delivered, .bm-in, .pm-complete, .va-bot, .fb-positive, .cf-confirmed){
  --tag-bg:var(--tag-green-bg); --tag-fg:var(--tag-green-fg); --tag-dot:var(--tag-green-dot); }
:is(.stchip, .cfchip):is(.tag-amber, .st-postponed, .st-noanswer, .st-mild, .st-warn, .bm-wait, .pm-window, .va-human, .fb-neutral, .cf-failed){
  --tag-bg:var(--tag-amber-bg); --tag-fg:var(--tag-amber-fg); --tag-dot:var(--tag-amber-dot); }
:is(.stchip, .cfchip):is(.tag-red, .st-returned, .st-retcancel, .st-crit, .na-strike, .pm-attn, .va-ticket, .va-tk-refund, .fb-negative, .cf-cancel){
  --tag-bg:var(--tag-red-bg); --tag-fg:var(--tag-red-fg); --tag-dot:var(--tag-red-dot); }
:is(.stchip, .cfchip):is(.tag-neutral, .st-pending, .st-cancelled, .st-refunded, .st-replace, .bm-none, .pm-await, .pm-refunded){
  --tag-bg:var(--tag-neutral-bg); --tag-fg:var(--tag-neutral-fg); --tag-dot:var(--tag-neutral-dot); }
#feedback-view .fb-c-head .stchip.stchip{ background:var(--tag-bg); font-size:11.5px; }   /* the Atelier's id rule painted every feedback tag grey */
@media (max-width:760px){ .stchip.stchip, .cfchip.cfchip{ --tag-h:24px; } }
@media (forced-colors:active){ .stchip.stchip, .cfchip.cfchip{ border:1px solid CanvasText; } .stchip.stchip::before, .cfchip.cfchip::before{ background:CanvasText; } }

/* ---- THE GLASS FILTERS (2026-11-16, every hub). Yassin: "turn all filters across hubs glassmorphic instead of this
   smooth cheap look". Every segmented filter row (the period / month / status pills, .seg groups, the Customer Service
   rows, Competitors' .cw-seg) is a recessed pane of glass, and the choice is a brighter frosted key floating in it: a
   top-lit gradient, a white inner highlight on its top edge, a hairline, and a two-layer soft shadow. It is the same
   glass as the sidebar (#rail), at a control's scale (blur 16px instead of 30px, the same saturate 1.6). The sliding
   highlight (slide.js .slide-ind) IS the key; without it (reduced motion, or a row slide.js does not drive) the chosen
   item wears the key itself. The filter fields beside them (All couriers, All payments, Search, the shop selects) get
   the same frosted fill and highlight. Only paint: no size, padding, layout or script changes. The .subtabs row keeps
   its words and red underline (the house rule: subtabs look exactly like the page tabs, never pills).
   !important only where a hub's older id rules (#cu-sort .seg-btn.on, #va-view #va-ask-seg ...) would otherwise win;
   the chosen item is excluded while slide-on, so atelier's transparent .slide-on > .on still holds.
   Solid fallback where backdrop-filter is missing, and under prefers-reduced-transparency. Labels: ink on the key,
   muted on the track, measured AA in both themes. ---- */
:root{
  /* The glass toggle (Yassin, 2026-11-16, a reference image: "they should look exactly like this"): a fully round,
     nearly clear track with a bright glass rim (lit along the top and the bottom edge, dim at the sides) and a soft
     drop shadow; the chosen option is a DARKER, sunken glass pill inside it, not a white one. */
  /* Clear, never frosted (Yassin, 2026-11-16: "i want glass to be clear and not frosted"): no blur behind the glass;
     what makes it glass is the lit rim, the faint top-down sheen and the sunken key. */
  --gf-blur:none;
  --gf-track:linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0) 70%);
  --gf-track-edge:inset 0 1.5px 0 #fff, inset 0 -1.5px 0 rgba(255,255,255,.95), inset 0 0 0 1px rgba(120,135,152,.28),
    inset 0 2px 4px rgba(20,30,45,.05), 0 10px 22px -12px rgba(20,30,45,.3);
  --gf-key:linear-gradient(180deg, rgba(25,40,55,.13), rgba(25,40,55,.06));
  --gf-key-edge:inset 0 2px 5px rgba(20,35,50,.16), inset 0 -1px 0 rgba(255,255,255,.6), inset 0 0 0 1px rgba(25,40,55,.06);
  --gf-key-press:inset 0 3px 8px rgba(20,35,50,.26), inset 0 -1px 0 rgba(255,255,255,.55), inset 0 0 0 1px rgba(25,40,55,.09);
  /* Polish (Yassin, 2026-11-16: "must have smoother movement and animations and hover effect and clicked look").
     Hover goes the OTHER way from the chosen key: a brighter, raised pane of glass (a lighter fill and a lit top
     edge), so a hovered option can never be read as a second chosen one. A press dips toward the key. */
  --gf-hover:rgba(255,255,255,.3);
  --gf-hover-edge:inset 0 1px 0 #fff, inset 0 0 0 1px rgba(120,135,152,.16), 0 1px 2px rgba(20,30,45,.08);
  --gf-hover-ink:color-mix(in srgb, var(--mac-ink) 78%, var(--mac-muted));
  --gf-press:rgba(25,40,55,.07);
  --gf-press-edge:inset 0 1px 3px rgba(20,35,50,.16), inset 0 0 0 1px rgba(25,40,55,.05);
  --gf-ring:color-mix(in srgb, var(--mac-ink) 55%, transparent);
  --gf-halo:color-mix(in srgb, var(--mac-ink) 14%, transparent);
  --gf-fade:40px;
  /* the spring every glass control moves on (slide.js SPRING is the same curve): see the @supports below */
  --gf-spring:cubic-bezier(.34,1.3,.64,1);
  --gf-field:linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0) 70%); --gf-field-line:rgba(30,40,55,.12);
  --gf-field-edge:inset 0 1px 0 rgba(255,255,255,.9);
  --gf-solid-track:var(--at-track); --gf-solid-key:var(--at-paper); --gf-solid-field:var(--at-paper);
}
/* A damped spring (zeta .8, 1.5% overshoot, settles in its duration) sampled into linear(). Only where linear() is
   understood: an unknown easing inside a var() would void the whole transition, not just fall back. */
@supports (transition-timing-function:linear(0, 1)){
  :root{ --gf-spring:linear(0, 0.0234, 0.0826, 0.164, 0.2572, 0.3544, 0.4502, 0.5406, 0.6235, 0.6975, 0.762, 0.8171, 0.8633, 0.9013,
    0.932, 0.9562, 0.9749, 0.9889, 0.9991, 1.0062, 1.0109, 1.0136, 1.0149, 1.0151, 1.0146, 1.0136, 1.0124, 1.0109, 1.0094, 1.008,
    1.0067, 1.0054, 1.0043, 1.0034, 1.0026, 1.0019, 1.0014, 1.0009, 1.0006, 1.0003, 1); }
}
html[data-theme="dark"]{
  --gf-track:linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,0) 70%);
  --gf-track-edge:inset 0 1.5px 0 rgba(255,255,255,.42), inset 0 -1.5px 0 rgba(255,255,255,.3), inset 0 0 0 1px rgba(255,255,255,.08),
    inset 0 3px 8px rgba(0,0,0,.18), 0 12px 26px -12px rgba(0,0,0,.7);
  --gf-key:linear-gradient(180deg, rgba(0,0,0,.34), rgba(0,0,0,.2));
  --gf-key-edge:inset 0 2px 7px rgba(0,0,0,.4), inset 0 -1px 0 rgba(255,255,255,.12), inset 0 0 0 1px rgba(255,255,255,.06);
  --gf-key-press:inset 0 3px 10px rgba(0,0,0,.58), inset 0 -1px 0 rgba(255,255,255,.1), inset 0 0 0 1px rgba(255,255,255,.05);
  --gf-hover:rgba(255,255,255,.075);
  --gf-hover-edge:inset 0 1px 0 rgba(255,255,255,.16), inset 0 0 0 1px rgba(255,255,255,.05), 0 1px 3px rgba(0,0,0,.25);
  --gf-press:rgba(0,0,0,.16);
  --gf-press-edge:inset 0 1px 4px rgba(0,0,0,.4), inset 0 0 0 1px rgba(255,255,255,.03);
  --gf-field:linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,0) 70%); --gf-field-line:rgba(255,255,255,.12);
  --gf-field-edge:inset 0 1px 0 rgba(255,255,255,.1);
  --gf-solid-key:#22252b;
}
/* The track. :is() with ids in it gives every row id weight (1,0,0), so it beats .adt-bar .seg and the hubs' .seg. */
:is(#tabs, #st-period-tabs, #stats-tabs, #fin-pills, #fb-period-tabs, #filters, #o-filters, #yo-filters, #yo-confirm, #cr-period-tabs,
    #trend-range, #trend-seg, #geo-period, #va-period-tabs, #va-plat-tabs, #va-conv-filter, #va-conv-plat, #va-tk-status, #va-ask-seg, .seg, .cw-seg){
  background:var(--gf-track) !important; border-color:transparent !important; border-radius:var(--gf-r-track, 999px) !important;
  box-shadow:var(--gf-track-edge) !important; -webkit-backdrop-filter:var(--gf-blur); backdrop-filter:var(--gf-blur);
  scroll-padding-inline:var(--gf-fade); overscroll-behavior-x:contain; }
/* A row wider than its space (Orders' status row) scrolls sideways inside the one pill; the clipped side(s) fade out
   instead of cutting a label on a hard edge. slide.js writes data-clip (left / right) and scrolls the choice into view. */
:is(#tabs, #st-period-tabs, #stats-tabs, #fin-pills, #fb-period-tabs, #filters, #o-filters, #yo-filters, #yo-confirm, #cr-period-tabs,
    #trend-range, #trend-seg, #geo-period, #va-period-tabs, #va-plat-tabs, #va-conv-filter, #va-conv-plat, #va-tk-status, #va-ask-seg, .seg, .cw-seg)[data-clip]{ --gf-ml:#000; --gf-mr:#000;
  -webkit-mask-image:linear-gradient(90deg, var(--gf-ml), #000 var(--gf-fade), #000 calc(100% - var(--gf-fade)), var(--gf-mr));
  mask-image:linear-gradient(90deg, var(--gf-ml), #000 var(--gf-fade), #000 calc(100% - var(--gf-fade)), var(--gf-mr)); }
:is(#tabs, #st-period-tabs, #stats-tabs, #fin-pills, #fb-period-tabs, #filters, #o-filters, #yo-filters, #yo-confirm, #cr-period-tabs,
    #trend-range, #trend-seg, #geo-period, #va-period-tabs, #va-plat-tabs, #va-conv-filter, #va-conv-plat, #va-tk-status, #va-ask-seg, .seg, .cw-seg)[data-clip~="left"]{ --gf-ml:transparent; }
:is(#tabs, #st-period-tabs, #stats-tabs, #fin-pills, #fb-period-tabs, #filters, #o-filters, #yo-filters, #yo-confirm, #cr-period-tabs,
    #trend-range, #trend-seg, #geo-period, #va-period-tabs, #va-plat-tabs, #va-conv-filter, #va-conv-plat, #va-tk-status, #va-ask-seg, .seg, .cw-seg)[data-clip~="right"]{ --gf-mr:transparent; }
/* The key: the sliding highlight, or the chosen item itself when nothing slides. */
:is(#tabs, #st-period-tabs, #stats-tabs, #fin-pills, #fb-period-tabs, #filters, #o-filters, #yo-filters, #yo-confirm, #cr-period-tabs,
    #trend-range, #trend-seg, #geo-period, #va-period-tabs, #va-plat-tabs, #va-conv-filter, #va-conv-plat, #va-tk-status, #va-ask-seg, .seg, .cw-seg) > .slide-ind,
:is(#tabs, #st-period-tabs, #stats-tabs, #fin-pills, #fb-period-tabs, #filters, #o-filters, #yo-filters, #yo-confirm, #cr-period-tabs,
    #trend-range, #trend-seg, #geo-period, #va-period-tabs, #va-plat-tabs, #va-conv-filter, #va-conv-plat, #va-tk-status, #va-ask-seg, .seg, .cw-seg):not(.slide-on) > .on{
  background:var(--gf-key) !important; border-color:transparent !important; border-radius:var(--gf-r-key, 999px) !important;
  box-shadow:var(--gf-key-edge) !important; color:var(--mac-ink) !important; }
.slide-ind{ transition:box-shadow .16s ease; }
/* Every option: one motion language. Colour and fill ease, the size springs (press release). */
:is(#tabs, #st-period-tabs, #stats-tabs, #fin-pills, #fb-period-tabs, #filters, #o-filters, #yo-filters, #yo-confirm, #cr-period-tabs,
    #trend-range, #trend-seg, #geo-period, #va-period-tabs, #va-plat-tabs, #va-conv-filter, #va-conv-plat, #va-tk-status, #va-ask-seg, .seg, .cw-seg) > :not(.slide-ind){ cursor:pointer; -webkit-tap-highlight-color:transparent; }
:is(#tabs, #st-period-tabs, #stats-tabs, #fin-pills, #fb-period-tabs, #filters, #o-filters, #yo-filters, #yo-confirm, #cr-period-tabs,
    #trend-range, #trend-seg, #geo-period, #va-period-tabs, #va-plat-tabs, #va-conv-filter, #va-conv-plat, #va-tk-status, #va-ask-seg, .seg, .cw-seg) > :not(.slide-ind){
  transition:color .2s ease, background-color .16s ease, box-shadow .16s ease, scale .5s var(--gf-spring); }
/* the newly chosen label takes its ink as the key arrives (slide.js --gf-travel), not before it */
:is(#tabs, #st-period-tabs, #stats-tabs, #fin-pills, #fb-period-tabs, #filters, #o-filters, #yo-filters, #yo-confirm, #cr-period-tabs,
    #trend-range, #trend-seg, #geo-period, #va-period-tabs, #va-plat-tabs, #va-conv-filter, #va-conv-plat, #va-tk-status, #va-ask-seg, .seg, .cw-seg).slide-on > .on{ transition-duration:.3s, .16s, .16s, .5s; transition-delay:calc(var(--gf-travel, 460ms) * .18), 0s, 0s, 0s; }
/* Focus (keyboard only): an inset ring in the glass's own ink, never the browser's blue, and never clipped by a
   scrolling row. */
:is(#tabs, #st-period-tabs, #stats-tabs, #fin-pills, #fb-period-tabs, #filters, #o-filters, #yo-filters, #yo-confirm, #cr-period-tabs,
    #trend-range, #trend-seg, #geo-period, #va-period-tabs, #va-plat-tabs, #va-conv-filter, #va-conv-plat, #va-tk-status, #va-ask-seg, .seg, .cw-seg) > :not(.slide-ind):focus-visible{ outline:1.5px solid var(--gf-ring) !important; outline-offset:-2px; }
:is(#tabs, #st-period-tabs, #stats-tabs, #fin-pills, #fb-period-tabs, #filters, #o-filters, #yo-filters, #yo-confirm, #cr-period-tabs,
    #trend-range, #trend-seg, #geo-period, #va-period-tabs, #va-plat-tabs, #va-conv-filter, #va-conv-plat, #va-tk-status, #va-ask-seg, .seg, .cw-seg) > :not(.on):not(.slide-ind):focus-visible{ box-shadow:none; }
/* Hover: a raised, brighter pane on an option that is not the chosen one; quick in (140ms), softer out. */
:is(#tabs, #st-period-tabs, #stats-tabs, #fin-pills, #fb-period-tabs, #filters, #o-filters, #yo-filters, #yo-confirm, #cr-period-tabs,
    #trend-range, #trend-seg, #geo-period, #va-period-tabs, #va-plat-tabs, #va-conv-filter, #va-conv-plat, #va-tk-status, #va-ask-seg, .seg, .cw-seg) > :not(.on):not(.slide-ind):not(:disabled):hover{
  background-color:var(--gf-hover); box-shadow:var(--gf-hover-edge); color:var(--gf-hover-ink); border-radius:var(--gf-r-key, 999px);
  transition-duration:.14s, .14s, .14s, .5s; transition-delay:0s; }
/* Press: the option dips (scale .97 in 90ms, atelier.css / the rule below) and its glass sinks toward the key; the
   chosen key sinks deeper. Release springs back on --gf-spring. */
:is(#tabs, #st-period-tabs, #stats-tabs, #fin-pills, #fb-period-tabs, #filters, #o-filters, #yo-filters, #yo-confirm, #cr-period-tabs,
    #trend-range, #trend-seg, #geo-period, #va-period-tabs, #va-plat-tabs, #va-conv-filter, #va-conv-plat, #va-tk-status, #va-ask-seg, .seg, .cw-seg) > :not(.on):not(.slide-ind):not(:disabled):active{
  background-color:var(--gf-press); box-shadow:var(--gf-press-edge); color:var(--mac-ink); }
:is(#tabs, #st-period-tabs, #stats-tabs, #fin-pills, #fb-period-tabs, #filters, #o-filters, #yo-filters, #yo-confirm, #cr-period-tabs,
    #trend-range, #trend-seg, #geo-period, #va-period-tabs, #va-plat-tabs, #va-conv-filter, #va-conv-plat, #va-tk-status, #va-ask-seg, .seg, .cw-seg) > :not(.slide-ind):not(:disabled):not([hidden]):active{ scale:.97; transition-duration:.12s, .08s, .08s, .09s; transition-delay:0s; transition-timing-function:ease, ease, ease, cubic-bezier(.3,0,.6,1); }
:is(#tabs, #st-period-tabs, #stats-tabs, #fin-pills, #fb-period-tabs, #filters, #o-filters, #yo-filters, #yo-confirm, #cr-period-tabs,
    #trend-range, #trend-seg, #geo-period, #va-period-tabs, #va-plat-tabs, #va-conv-filter, #va-conv-plat, #va-tk-status, #va-ask-seg, .seg, .cw-seg).slide-on:has(> .on:active) > .slide-ind,
:is(#tabs, #st-period-tabs, #stats-tabs, #fin-pills, #fb-period-tabs, #filters, #o-filters, #yo-filters, #yo-confirm, #cr-period-tabs,
    #trend-range, #trend-seg, #geo-period, #va-period-tabs, #va-plat-tabs, #va-conv-filter, #va-conv-plat, #va-tk-status, #va-ask-seg, .seg, .cw-seg):not(.slide-on) > .on:active{ box-shadow:var(--gf-key-press) !important; }
/* The filter fields beside the pills: the same frosted fill and top highlight. Focus keeps each hub's own ring. */
:is(.searchrow .search, .searchrow .search-mode, #cu-search, .shop-bar select):not(:focus){
  background:var(--gf-field) !important; border-color:var(--gf-field-line) !important; box-shadow:var(--gf-field-edge) !important;
  -webkit-backdrop-filter:var(--gf-blur); backdrop-filter:var(--gf-blur); }
:is(.searchrow .search, .searchrow .search-mode, #cu-search, .shop-bar select):not(:focus):hover{ border-color:color-mix(in srgb, var(--mac-ink) 22%, transparent) !important; }
/* No glass where the browser cannot blur, or where the reader asked for less transparency: the same shapes, solid. */
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  :root, html[data-theme="dark"]{ --gf-track:var(--gf-solid-track); --gf-key:var(--gf-solid-key); --gf-field:var(--gf-solid-field); --gf-hover:var(--at-track-hover); }
}
@media (prefers-reduced-transparency:reduce){
  :root, html[data-theme="dark"]{ --gf-track:var(--gf-solid-track); --gf-key:var(--gf-solid-key); --gf-field:var(--gf-solid-field); --gf-hover:var(--at-track-hover); --gf-blur:none; }
}
/* Reduced motion: every state still shows, instantly; nothing scales or glides. */
@media (prefers-reduced-motion:reduce){
  :is(#tabs, #st-period-tabs, #stats-tabs, #fin-pills, #fb-period-tabs, #filters, #o-filters, #yo-filters, #yo-confirm, #cr-period-tabs,
    #trend-range, #trend-seg, #geo-period, #va-period-tabs, #va-plat-tabs, #va-conv-filter, #va-conv-plat, #va-tk-status, #va-ask-seg, .seg, .cw-seg) > *{ transition:none !important; scale:none !important; }
}
@media (forced-colors:active){
  :is(.seg, #yo-filters, #fin-pills, #stats-tabs, #tabs) > :is(.slide-ind, .on){ outline:1px solid Highlight; }
}

/* ---- SMOOTH SUBTABS (2026-11-16, every hub). Yassin: "make movement between subtabs smoother". A panel that
   shows (a page, a sub-tab's pane) eases in: a short fade and a 6px rise, so the switch reads as one movement with
   the red underline gliding above it (slide.js glide: a straight soft glide for a thin line). The fill ends on
   transform:none, so nothing fixed inside a panel is offset once it has settled. Off under reduced motion. ---- */
@keyframes hub-pane-in{ from{ opacity:0; transform:translateY(6px); } to{ opacity:1; transform:none; } }
[role="tabpanel"]:not([hidden]){ animation:hub-pane-in .28s cubic-bezier(.32,.72,0,1) both; }
@media (prefers-reduced-motion: reduce){ [role="tabpanel"]:not([hidden]){ animation:none; } }

/* ---- GLASS BUTTONS (2026-11-16, every hub). Yassin: "same for anything clickable like this" (the Export button,
   the brand chips, the search and select boxes): the same glass as the filter rows. A round, clear button with the
   lit rim; a chosen chip (.on / aria-pressed) is the darker sunken key.
   PRIMARY actions stay FILLED with their own colours (Yassin, 2026-11-16: "why do export and grab data buttons look
   like this": the hubs paint .export / .refresh-btn as an ink pill with --on-ink text, so on clear glass the label
   vanished). Excluded from the glass, by design: every form submit ([type=submit]: + Add cost, Save, Close it ...),
   the money and order commits (.exp-add, .exp-pay-go Pay, .co-hand-go handover, .ord-settle, .rc-ff-go Mark fulfilled,
   .rc-big Start the count, .wh-save, .status-save / .status-submit) and the yes of a confirm (.cm-ask-yes, .od-ask-yes).
   Everything else (Export, Grab customer info, Refresh, Print, Show more, page arrows, brand chips) is glass with an
   ink label, AA in both themes; disabled is the same glass, dimmed. ---- */
:is(.export, .refresh-btn, .ext-btn, .lock-btn, .pg-arrow, .pg-num, .fin-nav, .cal-nav, .exp-cancel, #cu-brands > button):not(:is([type="submit"], .exp-add, .exp-pay-go, .co-hand-go, .ord-settle, .od-ask-yes, .cm-ask-yes, .status-submit, .status-save, .wh-save, .rc-ff-go, .rc-big)), :is(.searchrow .search, .searchrow .search-mode, #cu-search, .shop-bar select){
  background:var(--gf-track) !important; border-color:transparent !important; border-radius:999px !important;
  box-shadow:var(--gf-track-edge) !important; -webkit-backdrop-filter:var(--gf-blur); backdrop-filter:var(--gf-blur); }
/* the label: ink on glass (the danger buttons keep their red) */
:is(.export, .refresh-btn, .ext-btn, .lock-btn, .pg-arrow, .pg-num, .fin-nav, .cal-nav, .exp-cancel, #cu-brands > button):not(:is([type="submit"], .exp-add, .exp-pay-go, .co-hand-go, .ord-settle, .od-ask-yes, .cm-ask-yes, .status-submit, .status-save, .wh-save, .rc-ff-go, .rc-big)):not(.cal-danger):not(.ads-danger){ color:var(--mac-ink) !important; }
:is(.export, .refresh-btn, .ext-btn, .lock-btn, .pg-arrow, .pg-num, .fin-nav, .cal-nav, .exp-cancel, #cu-brands > button):not(:is([type="submit"], .exp-add, .exp-pay-go, .co-hand-go, .ord-settle, .od-ask-yes, .cm-ask-yes, .status-submit, .status-save, .wh-save, .rc-ff-go, .rc-big)):disabled{ cursor:default; opacity:.5 !important; }
/* The same hover / press / focus language as the filter rows: the fill is a background-COLOUR under the glass
   gradient, so it can ease (a gradient cannot). */
:is(.export, .refresh-btn, .ext-btn, .lock-btn, .pg-arrow, .pg-num, .fin-nav, .cal-nav, .exp-cancel, #cu-brands > button):not(:is([type="submit"], .exp-add, .exp-pay-go, .co-hand-go, .ord-settle, .od-ask-yes, .cm-ask-yes, .status-submit, .status-save, .wh-save, .rc-ff-go, .rc-big)){ cursor:pointer; -webkit-tap-highlight-color:transparent;
  transition:background-color .16s ease, color .16s ease, box-shadow .16s ease, scale .5s var(--gf-spring), opacity .16s ease; }
:is(.export, .refresh-btn, .ext-btn, .lock-btn, .pg-arrow, .pg-num, .fin-nav, .cal-nav, .exp-cancel, #cu-brands > button):not(:is([type="submit"], .exp-add, .exp-pay-go, .co-hand-go, .ord-settle, .od-ask-yes, .cm-ask-yes, .status-submit, .status-save, .wh-save, .rc-ff-go, .rc-big)):hover:not(:disabled):not(.on):not([aria-pressed="true"]){ background-color:var(--gf-hover) !important;
  transition-duration:.14s, .14s, .14s, .5s, .16s; }
:is(.export, .refresh-btn, .ext-btn, .lock-btn, .pg-arrow, .pg-num, .fin-nav, .cal-nav, .exp-cancel, #cu-brands > button):not(:is([type="submit"], .exp-add, .exp-pay-go, .co-hand-go, .ord-settle, .od-ask-yes, .cm-ask-yes, .status-submit, .status-save, .wh-save, .rc-ff-go, .rc-big)):active:not(:disabled):not(.on):not([aria-pressed="true"]):not([hidden]){ scale:.97; background-color:var(--gf-press) !important;
  transition-duration:.08s, .08s, .08s, .09s, .16s; transition-timing-function:ease, ease, ease, cubic-bezier(.3,0,.6,1), ease; }
:is(#cu-brands > button, .pg-num, .lock-btn):is(.on, [aria-pressed="true"]){ background:var(--gf-key) !important; box-shadow:var(--gf-key-edge) !important; color:var(--mac-ink) !important; }
:is(#cu-brands > button, .pg-num, .lock-btn):is(.on, [aria-pressed="true"]):active:not(:disabled){ box-shadow:var(--gf-key-press) !important; scale:.97; }
/* keyboard focus: the lit rim stays, a soft ink ring sits just outside it */
:is(.export, .refresh-btn, .ext-btn, .lock-btn, .pg-arrow, .pg-num, .fin-nav, .cal-nav, .exp-cancel, #cu-brands > button):not(:is([type="submit"], .exp-add, .exp-pay-go, .co-hand-go, .ord-settle, .od-ask-yes, .cm-ask-yes, .status-submit, .status-save, .wh-save, .rc-ff-go, .rc-big)):focus-visible{ outline:0; box-shadow:var(--gf-track-edge), 0 0 0 1.5px var(--gf-ring), 0 0 0 4px var(--gf-halo) !important; }
:is(#cu-brands > button, .pg-num, .lock-btn):is(.on, [aria-pressed="true"]):focus-visible{ box-shadow:var(--gf-key-edge), 0 0 0 1.5px var(--gf-ring), 0 0 0 4px var(--gf-halo) !important; }
:is(.searchrow .search, #cu-search):focus{ box-shadow:var(--gf-track-edge), 0 0 0 3px var(--gf-halo) !important; }
@media (prefers-reduced-motion:reduce){ :is(.export, .refresh-btn, .ext-btn, .lock-btn, .pg-arrow, .pg-num, .fin-nav, .cal-nav, .exp-cancel, #cu-brands > button):not(:is([type="submit"], .exp-add, .exp-pay-go, .co-hand-go, .ord-settle, .od-ask-yes, .cm-ask-yes, .status-submit, .status-save, .wh-save, .rc-ff-go, .rc-big)){ transition:none; } :is(.export, .refresh-btn, .ext-btn, .lock-btn, .pg-arrow, .pg-num, .fin-nav, .cal-nav, .exp-cancel, #cu-brands > button):not(:is([type="submit"], .exp-add, .exp-pay-go, .co-hand-go, .ord-settle, .od-ask-yes, .cm-ask-yes, .status-submit, .status-save, .wh-save, .rc-ff-go, .rc-big)):active{ scale:none !important; } }

/* ---- GLASS SELECTS (2026-11-16, every hub). Yassin: "the arrow next to all couriers is half out of the outline":
   the round pill clipped the browser's own arrow. The select draws its own chevron, inset from the round end, and
   keeps room for it on the right. An id-weight :not(#_) so it outranks GLASS BUTTONS (whose :not(:is(...)) list raises its weight). ---- */
:root :is(.searchrow .search-mode, .shop-bar select):not(#_){
  -webkit-appearance:none; appearance:none; padding-right:40px !important;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%2346505c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 18px center / 12px 12px,
    var(--gf-track) !important; }
html[data-theme="dark"] :is(.searchrow .search-mode, .shop-bar select):not(#_){
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23c4c8d0' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 18px center / 12px 12px,
    var(--gf-track) !important; }
:is(.searchrow .search-mode, .shop-bar select)::-ms-expand{ display:none; }

/* ---- FIELDS: NO OUTLINE ON FOCUS (2026-11-16, every hub). Yassin: "remove this outline look when clicking on a
   field". A text box shows :focus-visible on every click, so the hubs' keyboard ring (a 2px red/brand outline)
   drew around it. Fields drop the outline; a focused glass field only lights its rim a little more. Buttons and
   links keep their keyboard ring. ---- */
:root :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea):is(:focus, :focus-visible){ outline:none !important; }
:root :is(.searchrow .search, .searchrow .search-mode, #cu-search, .shop-bar select):not(#_):focus{
  box-shadow:var(--gf-track-edge), inset 0 0 0 1px color-mix(in srgb, var(--mac-ink) 16%, transparent) !important; border-color:transparent !important; }
/* ---- THE OPENED ORDER AND THE LIST ROW'S STATUS (2026-11-16, every hub's Orders page; Yassin: "why are changes to the
   orders section not shown in our demo? ... they should be" in the infrastructure). Moved here from Figi Trade's
   styles.css with hub-core/order-detail-html.js, which draws the markup these rules style. The list row's status:
   ONE chip, "Confirmed on WhatsApp" as a short green line under it, a cancel request, not confirmed or not reached as a
   short coloured line, a delivered Bosta order's money as a plain line with its dot. ---- */
/* The list row's status (2026-11-16, Yassin: "looks like too much is happening"): ONE chip; a confirmed order gets a
   quiet check after it; a cancel request, not confirmed or not reached is a short coloured line under it; a delivered
   Bosta order's money (bosta-money.js, a chip on the brand hubs) is a plain line with its dot. Counts on the tabs are
   tinted, not filled. */
#orders-view .ord-st{ display:inline-flex; flex-direction:column; align-items:flex-start; gap:5px; }
#orders-view .ord-st-1{ display:inline-flex; align-items:center; gap:7px; }
#orders-view .ord-flag.tag-green{ color:var(--tag-green-fg); } #orders-view .ord-flag.tag-green::before{ background:var(--tag-green-dot); }
#orders-view .ord-flag{ display:inline-flex; align-items:center; gap:6px; padding-inline-start:8px; font:500 12px/1.3 var(--sans); }
#orders-view .ord-flag::before{ content:''; flex:none; width:6px; height:6px; border-radius:50%; }
#orders-view .ord-flag.tag-red{ color:var(--tag-red-fg); } #orders-view .ord-flag.tag-red::before{ background:var(--tag-red-dot); }
#orders-view .ord-flag.tag-amber{ color:var(--tag-amber-fg); } #orders-view .ord-flag.tag-amber::before{ background:var(--tag-amber-dot); }
#orders-view .ord-st .stchip:is(.bm-in, .bm-wait, .bm-none){ height:auto; margin:0; padding:0 0 0 8px; background:none; color:var(--muted); font-size:12px; line-height:1.3; white-space:normal; }
@media (max-width:760px){ #orders-view .ord-st{ align-items:flex-end; } #orders-view .ord-st .stchip:is(.bm-in, .bm-wait, .bm-none){ text-align:end; } }
/* An opened order (2026-11-16, order-detail-html.js orderDetailHTML; Yassin: "make info more visually organized"): the hub's
   open record (.cd in hub-ui.css, "The open customer"), six labelled sections of ruled rows, label start in grey,
   value end in ink, two columns from 900px. Only the pieces particular to an order are here. */
#orders-view .od-cols{ align-items:start; row-gap:22px; }
#orders-view .od-sec{ min-width:0; }
#orders-view .od .cd-rv{ min-width:0; overflow-wrap:anywhere; }
#orders-view .od .cd-rv small{ font-size:11px; color:var(--mac-muted); }
#orders-view .od .order-date b{ margin-inline-start:auto; font-weight:500; color:var(--mac-ink); font-variant-numeric:tabular-nums; text-align:end; }
#orders-view .od-addr{ align-items:flex-start; }
#orders-view .od-addr .cd-rl{ flex:none; }
#orders-view .od-addr .cd-rv{ flex:1; font-weight:400; line-height:1.45; }
#orders-view .od-dim{ font-weight:400; color:var(--mac-muted); }
#orders-view .detail .od-acts .ext-btn{ margin:0; }
#orders-view .od-acts{ display:flex; flex-wrap:wrap; gap:8px; padding:10px 0 2px; }
#orders-view .od-none, #orders-view .od-note{ margin:6px 0 0; font-size:12.5px; line-height:1.5; color:var(--mac-muted); }
#orders-view .od-note.od-warn, #orders-view .od-warn .cd-rv, #orders-view .od-flag{ color:var(--red); }
#orders-view .od-flag{ margin:6px 0 0; font-size:12.5px; font-weight:500; }
#orders-view .od-line{ align-items:flex-start; }
#orders-view .od-line .cd-rl{ color:var(--mac-ink); line-height:1.45; }
#orders-view .od-qty{ font-weight:600; font-variant-numeric:tabular-nums; }
#orders-view .od-var, #orders-view .od-line .cd-rl small{ color:var(--mac-muted); }
#orders-view .od-line-off .cd-rl{ color:var(--mac-muted); text-decoration:line-through; }
#orders-view .od-sums{ margin-top:2px; border-top:1px solid var(--line); }
#orders-view .od-total .cd-rl{ color:var(--mac-ink); font-weight:500; }
#orders-view .od-ask{ margin-top:10px; }
#orders-view .od-acts .cm-ask-no, #orders-view .od-ask button{ min-height:36px; }
#orders-view .od-line-res{ margin:8px 0 0; font-size:12.5px; color:var(--text-2, var(--muted)); outline:none; }
#orders-view .od-line-res[data-tone="ok"]{ color:var(--text-1, var(--ink)); }
#orders-view .od-line-res[data-tone="fail"]{ color:var(--bad, var(--red)); }
#orders-view .od .manual-status{ margin-top:8px; }
#orders-view .od .bosta-tl{ margin-top:10px; }
/* Calmer (2026-11-16, "looks like too much is happening"): no rule under every row, spacing does the grouping (rows
   tight, sections apart); headings quiet, values in ink. The Bosta timeline and the History fold under a one-line
   summary (order-detail-html.js .od-more). An open cancel request is the one loud block: first, full width, tinted, with
   Cancel as the filled answer (.od-alert). */
#orders-view .od-cols{ row-gap:28px; }
@media (min-width:900px){ #orders-view .od-cols{ column-gap:44px; } }
#orders-view .od .cd-h{ margin:0 0 4px; font:600 12px var(--sans); color:var(--mac-muted); }
#orders-view .od .cd-row{ min-height:30px; padding:5px 0; border-bottom:0; }
#orders-view .od-sums{ margin-top:6px; padding-top:4px; }
#orders-view .od .manual-status{ margin:6px 0 0; padding:0 0 4px; border-bottom:0; }
#orders-view .od-status .cd-rv{ display:inline-flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:8px; }
#orders-view .od-by{ font-weight:500; color:var(--mac-ink); }
#orders-view .od-times{ margin:2px 0 4px; font-size:12.5px; line-height:1.5; color:var(--mac-muted); font-variant-numeric:tabular-nums; }
#orders-view .od .bosta-tl{ margin-top:4px; }
#orders-view .od-more > summary{ display:flex; align-items:center; flex-wrap:wrap; gap:4px 10px; min-height:34px; padding:2px 0; list-style:none; cursor:pointer;
  font:400 13px var(--sans); color:var(--mac-muted); border-radius:8px; }
#orders-view .od-more > summary::-webkit-details-marker{ display:none; }
#orders-view .od-more > summary::before{ content:'›'; flex:none; width:12px; font-size:17px; line-height:1; text-align:center; color:var(--mac-muted); transition:transform .18s ease; }
#orders-view .od-more[open] > summary::before{ transform:rotate(90deg); }
#orders-view .od-more > summary:hover, #orders-view .od-more > summary:hover::before{ color:var(--mac-ink); }
#orders-view .od-more > summary:focus-visible{ outline:2px solid var(--ink); outline-offset:2px; }
#orders-view .od-more .btl-head{ margin:0; font:500 13px var(--sans); letter-spacing:0; text-transform:none; color:var(--mac-ink); }
#orders-view .od-more-s{ min-width:0; font-variant-numeric:tabular-nums; }
#orders-view .od-more > .timeline, #orders-view .od-more > .btl-rows{ padding:6px 0 4px 22px; }
#orders-view .od-alert{ grid-column:1 / -1; padding:14px 18px 16px; border-radius:14px; background:var(--tag-red-bg); }
#orders-view .od-alert .cd-h{ color:var(--tag-red-fg); }
#orders-view .od-alert .stchip{ background:var(--at-paper); }
#orders-view .od-alert .od-note.od-warn{ color:var(--mac-ink); font-size:13px; }
#orders-view .od-alert .od-answer{ min-height:38px; padding:0 16px; background:var(--at-paper); font-weight:500; }
#orders-view .od-alert .od-answer[data-act="cancel"]{ border-color:transparent; background:var(--tag-red-fg); color:var(--at-paper); }
#orders-view .od-alert .od-answer:disabled{ opacity:.5; }
/* The low Bosta score flag (2026-11-18, hub-core bosta-risk.js): the same loud block as a cancel request. Verified is the
   quiet answer, Cancel the filled one, and the question before a Shopify cancel fills its yes the same way. Own classes
   (.rk-*), so no hub's cancel-request wiring (.od-answer / .od-ask-yes) ever reacts to them. */
#orders-view .rk-answer, #orders-view .rk-ask button{ min-height:38px; padding:0 16px; font-weight:500; }
#orders-view .od-alert .rk-answer, #orders-view .od-alert .rk-no{ background:var(--at-paper); }
#orders-view :is(.rk-answer[data-rk="cancel"], .rk-yes){ border-color:transparent; background:var(--tag-red-fg); color:var(--at-paper); }
#orders-view :is(.rk-answer, .rk-ask button):disabled{ opacity:.5; cursor:default; }
@media (max-width:760px){ #orders-view .rk-answer, #orders-view .rk-ask button{ min-height:44px; } }
@media (min-width:900px){ #orders-view .od-alert .cd-row, #orders-view .od-alert .od-times, #orders-view .od-alert .od-note{ max-width:calc(50% - 22px); } }
@media (max-width:760px){ #orders-view .od-more > summary{ min-height:44px; } }
@media (prefers-reduced-motion:reduce){ #orders-view .od-more > summary::before{ transition:none; } }

/* ---- DRAWERS OPEN SMOOTHLY (2026-11-16, with the row reveal in atelier.css): the panel slides in from the side (up
   from the bottom on a phone) on the glass rows' spring, its contents fade and rise in just behind it, and the
   backdrop fades in softly. Closing keeps the shorter accelerating exit above (MOTION, SMOOTHED). ---- */
.drawer.open{ transition-duration:.34s; transition-timing-function:var(--gf-spring); }
.drawer-scrim.open{ transition:opacity .3s cubic-bezier(.22,1,.36,1); }
.drawer.open .drawer-head, .drawer.open .drawer-body{ animation:drawerIn .32s var(--gf-spring) .05s backwards; }
@keyframes drawerIn{ from{ opacity:0; transform:translateY(8px); } }
@media (prefers-reduced-motion:reduce){
  .drawer.open, .drawer-scrim.open{ transition:none; }
  .drawer.open .drawer-head, .drawer.open .drawer-body{ animation:none; }
}


/* ---- OPEN RECORD: LINES AND BOLD LABELS (2026-11-16, every hub; an opened order and an opened customer). Yassin:
   "add light lines between content and make titles like name, phone... bold". Each row of an open record sits on a
   light hairline, the label (Name, Phone, Address, Ordered...) is bold ink, the value stays as it is. The gap between
   an order's sections is a little tighter. ---- */
:root .cd .cd-row:not(#_){ border-bottom:1px solid color-mix(in srgb, var(--mac-ink) 8%, transparent); }
:root .cd .cd-row:not(#_):last-child{ border-bottom:0; }
:root .cd .cd-rl:not(#_){ font-weight:600; color:color-mix(in srgb, var(--mac-ink) 88%, var(--mac-muted)); }
:root #orders-view .od-cols:not(#_){ row-gap:20px; }
:root .cd .cd-row.order-date:not(#_){ font-weight:600; color:color-mix(in srgb, var(--mac-ink) 88%, var(--mac-muted)); }
:root .cd .cd-row.order-date:not(#_) b{ font-weight:500; }

/* ---- TWO FIXES (2026-11-16, every hub).
   1. "i cant scroll past here on hub in orders tab": the tables scroll inside their own box (sticky header), and
      overscroll-behavior:contain stopped the page from taking over at the box's end, so the page below (pager,
      next rows) could not be reached with the wheel. The box keeps its own scroll and header; the page now carries on.
   2. "fix skeleton loading so it doesnt have this black block": the page-shaped placeholder painted var(--bg), the
      page's darkest colour, over the lighter content panel. It is see-through now: only its shimmering lines show. ---- */
.table-wrap, .sw-scroll{ overscroll-behavior:auto; }
.view-skel{ background:transparent; }

/* ---- EVERY OTHER SELECT: THE CHEVRON INSIDE (2026-11-16, every hub). Yassin, on an opened order's status picker:
   "this arrow should be fully inside the block". The browser's own arrow sits on the edge; these selects draw the
   same chevron as the glass selects, inset, with room on the right, and keep their own fill. ---- */
:root select:not(.search-mode):not([multiple]):not([size]):not(#_){ -webkit-appearance:none; appearance:none; padding-right:36px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%2346505c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 13px center; background-size:12px 12px; }
html[data-theme="dark"] select:not(.search-mode):not([multiple]):not([size]):not(#_){ background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23c4c8d0' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* ---- MOST MISSED AS BLOCKS (2026-11-16, every hub). Yassin, on Figi Trade's Shopping: "these should show as blocks too
   not rows". The tile grid and the tile's own row layout lived only in FigiHome's styles.css, so a hub without them
   (Figi Trade) stretched each product across the page. Now in hub-core: a grid of product blocks, each one the demand
   count, the thumbnail and the name on top, the bar and the waiting line under it. ---- */
.mp-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:12px; }
.mp-grid > .view-all, .mp-grid > .mp-toggle{ grid-column:1 / -1; }
.mp-grid .dead.mp-row{ display:grid; grid-template-columns:auto auto minmax(0,1fr) auto; grid-template-areas:"count thumb name x" "wait wait wait wait";
  align-items:center; column-gap:12px; row-gap:10px; min-width:0; }
.mp-grid .mp-row > .mp-count{ grid-area:count; }
.mp-grid .mp-row > .thumb{ grid-area:thumb; }
.mp-grid .mp-row > .dead-name{ grid-area:name; }
.mp-grid .mp-row > .mp-x{ grid-area:x; align-self:start; }
.mp-grid .mp-row > .mp-wait{ grid-area:wait; display:flex; align-items:baseline; gap:6px; text-align:start; min-width:0; padding-top:8px; border-top:1px solid var(--at-rule); }
.mp-grid .mp-row > .mp-wait small{ margin-inline-start:auto; }
.mp-grid .mp-row.mp-off{ grid-template-areas:"count name x"; grid-template-columns:auto minmax(0,1fr) auto; }
.mp-grid .mp-row .mp-bar{ width:100%; }

/* ---- QUIET COUTURE (2026-11-16, every hub; the sidebar is NOT changed). Yassin picked direction B of the hub-look
   directions: "quiet couture but do not change sidebar". The page reads as one calm material and colour only points:
   - Tags: every tag is the same quiet neutral capsule (hairline, ink label); the status colour lives only in a small
     luminous dot (a 3px halo and a soft glow). The tone tokens of THE TAGS still pick the dot.
   - Page tabs (.subtabs): words, the chosen one in ink with a thin glowing ink underline that fades at both ends.
   - Filter rows: a calm inset segment (12px corners, hairline), the chosen option a raised pill (white in light,
     a lifted 9% white in dark), the same spring slide, hover and press as before.
   - The Orders status lines (Confirmed on WhatsApp, Cancel requested...) follow the tags: ink text, glowing dot. ---- */
:root{
  --qc-tag-bg:rgba(255,255,255,.78); --qc-tag-edge:inset 0 0 0 1px rgba(20,30,45,.09), 0 1px 2px rgba(20,30,45,.05); --qc-tag-ink:#22252b;
  --gf-r-track:12px; --gf-r-key:9px;
  --gf-track:rgba(20,30,45,.035); --gf-track-edge:inset 0 0 0 1px rgba(20,30,45,.07);
  --gf-key:#fff; --gf-key-edge:0 1px 3px rgba(20,30,45,.14), 0 0 0 1px rgba(20,30,45,.06);
  --gf-key-press:0 0 0 1px rgba(20,30,45,.08), inset 0 1px 2px rgba(20,30,45,.08);
  --gf-hover:rgba(255,255,255,.55); --gf-hover-edge:inset 0 0 0 1px rgba(20,30,45,.05);
}
html[data-theme="dark"]{
  --qc-tag-bg:rgba(255,255,255,.045); --qc-tag-edge:inset 0 0 0 1px rgba(255,255,255,.09); --qc-tag-ink:#e6e7eb;
  --gf-track:rgba(255,255,255,.04); --gf-track-edge:inset 0 0 0 1px rgba(255,255,255,.08);
  --gf-key:rgba(255,255,255,.09); --gf-key-edge:inset 0 1px 0 rgba(255,255,255,.12), 0 1px 3px rgba(0,0,0,.35);
  --gf-key-press:inset 0 1px 0 rgba(255,255,255,.08), inset 0 1px 3px rgba(0,0,0,.3);
  --gf-hover:rgba(255,255,255,.045); --gf-hover-edge:none;
}
.stchip.stchip.stchip, .cfchip.cfchip.cfchip{ --tag-h:24px; padding:0 11px 0 9px; gap:8px; background:var(--qc-tag-bg); box-shadow:var(--qc-tag-edge); color:var(--qc-tag-ink); font-size:12px; }
/* A status dot is a plain dot: no ring, no glow (Yassin, 2026-11-18: "don't add an overlay to the blue point"). */
.stchip.stchip.stchip::before, .cfchip.cfchip.cfchip::before{ background:var(--tag-dot); box-shadow:none; }
#orders-view .ord-flag.ord-flag{ color:var(--qc-tag-ink); }
/* The marks beside an order number (feedback, repeated Bosta attempts): the hub's own line icons in a soft round badge
   tinted by tone, never emoji (Yassin, 2026-11-18: "these feedback emojis should be icons that align with the theme"). */
.fb-mini.fb-mini{ display:inline-grid; place-items:center; width:20px; height:20px; margin-left:6px; border:0; border-radius:50%;
  vertical-align:-4px; font-size:0; color:var(--muted); background:color-mix(in srgb, currentColor 15%, transparent); }
.fb-mini.fb-mini .gi{ width:13px; height:13px; }
/* feedback reads at a glance: green good, yellow neutral, red bad (Yassin, 2026-11-18), the strong dot colours */
.fb-mini.fb-positive{ color:var(--tag-green-dot); } .fb-mini.fb-neutral{ color:#c99a06; } .fb-mini.fb-negative{ color:var(--tag-red-dot); }
html[data-theme="dark"] .fb-mini.fb-neutral{ color:#f2c230; }
.fb-mini.bosta-warn{ color:var(--tag-amber-fg); }
#orders-view .ord-flag.ord-flag::before{ box-shadow:none; }
/* The tab underline (2026-11-18, Yassin: "this line under prices needs adjustment"): one solid 2px line the width of
   the label, sitting ON the divider, no fade, no glow. The row scrolls sideways (overflow-x:auto clips y too), so its
   divider is drawn INSIDE the box as an inset shadow: a border sits outside the clip and the bar could never reach it. */
.subtabs.subtabs{ border-bottom:0; box-shadow:inset 0 -1px 0 var(--line, var(--at-rule)); }
.subtabs-ind.subtabs-ind{ bottom:0; height:2px; border-radius:2px 2px 0 0; background:var(--mac-ink); box-shadow:none; }
@media (forced-colors:active){ .subtabs-ind.subtabs-ind{ background:CanvasText; } }

/* ---- COMPACT SIDEBAR (2026-11-16, Yassin: "compact sidebar content a bit"): the same rows, a little closer
   together. Rows 34 -> 31px, sections 14 -> 10px apart, a smaller gap under the logo and around the welcome line,
   a shorter account card. Widths, icons, the collapsed rail and the phone menu are untouched. ---- */
#rail .rail-brand{ padding-top:22px; }
#rail .rail-welcome{ margin:8px 8px 10px; padding-bottom:9px; }
#rail .rail-groups{ gap:10px; }
#rail .rail-sec{ gap:1px; }
#rail .rail-sec-label{ margin-bottom:3px; font-size:11.5px; }
#rail .rail-btn{ min-height:31px; font-size:13.5px; }
#rail .rail-foot{ padding-top:6px; }
#rail .acct-card{ min-height:46px; padding-block:6px; }
body.rail-min #rail .rail-brand{ padding-top:48px; }

/* ---- DARK MODE CONTROLS, MIRRORED FROM LIGHT (2026-11-18, with the palette above). Last in the file so they win
   over the glass field and key rules earlier on. Screen only, like the palette. ---- */
@media screen{
html[data-theme="dark"]{
  --gf-track:rgba(255,255,255,.04); --gf-track-edge:inset 0 0 0 1px #29292c;
  --gf-key:#2c2c2f; --gf-key-edge:0 0 0 1px #38383c, 0 1px 2px rgba(0,0,0,.4);
  --gf-hover:rgba(255,255,255,.04); --gf-hover-edge:none;
}
/* the sidebar: the light sidebar's neutral glass, in dark */
html[data-theme="dark"] #rail{ background:linear-gradient(180deg, rgba(34,34,36,.86), rgba(27,27,29,.84) 45%, rgba(24,24,26,.86));
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.06), 0 0 0 1px rgba(0,0,0,.5), 0 18px 44px -24px rgba(0,0,0,.8);
  --glass-on:rgba(255,255,255,.08); --glass-on-ring:inset 0 0 0 1px rgba(255,255,255,.1), 0 1px 3px rgba(0,0,0,.3); --glass-hover:rgba(255,255,255,.05); }
/* fields one step above the card, as white is on light */
html[data-theme="dark"] :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]){ background-color:#232326; }
html[data-theme="dark"] input[type="checkbox"]{ background-color:#232326; }
/* Search bars and their dropdowns: the hub's own button control ("Pick dates", "Refresh"): the raised grey, a 1px ring,
   8px corners, 36px tall (Yassin, 2026-11-18: "search bar needs fixing to match hub"). :not(#_) twice beats the glass
   field rule above, whose :is() carries an id. */
html[data-theme="dark"] :is(input.search, input[type="search"], input[placeholder*="earch"]):not(#_):not(#_){ background-image:none !important; }
html[data-theme="dark"] :is(input.search, input[type="search"], input[placeholder*="earch"], select.search-mode):not(#_):not(#_){
  height:36px !important; min-height:36px !important; border-radius:8px !important; font-size:13px !important;
  background-color:#232326 !important; border:0 !important; box-shadow:0 0 0 1px #29292c, 0 1px 2px rgba(0,0,0,.35) !important;
  transition:box-shadow .15s ease !important; }
html[data-theme="dark"] :is(input.search, input[type="search"], input[placeholder*="earch"], select.search-mode):not(#_):not(#_):hover{ box-shadow:0 0 0 1px #38383c, 0 1px 2px rgba(0,0,0,.35) !important; }
html[data-theme="dark"] :is(input.search, input[type="search"], input[placeholder*="earch"], select.search-mode):not(#_):not(#_):focus{ outline:none; box-shadow:0 0 0 1px #55555a, 0 0 0 4px rgba(255,255,255,.05) !important; }
html[data-theme="dark"] select:not(.search-mode){ background-color:#232326 !important; border-color:#29292c !important; }
/* a phone keeps the 16px text and 40px floor that stop iOS zooming in on focus, as light mode does */
@media (max-width:760px){
  html[data-theme="dark"] :is(input.search, input[type="search"], input[placeholder*="earch"], select.search-mode):not(#_):not(#_){
    font-size:16px !important; height:auto !important; min-height:40px !important; }
}
/* the last few surfaces that carried the old blue-black or pure black */
html[data-theme="dark"] :is(.hero-rank, .rc-btn){ background-color:#232326 !important; }
html[data-theme="dark"] .va-conv{ background-color:#1c1c1e; }
html[data-theme="dark"] :is(#as-rail, #as-form){ background-color:#1c1c1e; }
}

/* ---- PILLS AND CHIPS AS TAGS (2026-11-18, every hub). The outlined pills that predate THE TAGS (the green-ringed
   "Read 17 Nov, 06:08 · 5 of 5 stores ok" beside a page title, the Stats/Shopping/Customers/Stock freshness badges,
   the couriers' Confirmed/Said yes chips, the calendar's Event/Discount labels, the money-account badges outside
   Finance) now draw as the hub's tag: the QUIET COUTURE capsule (no border, ink label) with the tone in a 6px dot,
   using the same tokens, so a later tag change reaches them too. :where() plus :not(#_) twice gives every rule here the same (2,0,0): above any per-hub rule (ids
   included), and the tone rules below win over the base by order alone.
   A freshness line that is NOT a pill (Figi Trade's quiet line under a title, no tone and outside .view-actions)
   is left alone. Height grows with the text so a long freshness wraps on a phone instead of overflowing. ---- */
:where(.freshness:is(.green, .amber, .red, [data-level]), .view-actions > .freshness, .rep-chip, .cal-tag,
    :is(#invoices-view, #salaries-view, #paymob-view) .ma-badge):not(#_):not(#_){
  --tag-dot:var(--tag-neutral-dot);
  display:inline-flex; align-items:center; gap:8px; box-sizing:border-box; min-height:24px; height:auto; padding:4px 11px 4px 9px;
  border:0; border-radius:999px; background:var(--qc-tag-bg); box-shadow:var(--qc-tag-edge); color:var(--qc-tag-ink);
  font:500 12px/1.3 var(--sans); letter-spacing:0; text-transform:none; font-variant-numeric:tabular-nums lining-nums;
  vertical-align:middle; }
:where(.freshness:is(.green, .amber, .red, [data-level]), .view-actions > .freshness, .rep-chip, .cal-tag,
    :is(#invoices-view, #salaries-view, #paymob-view) .ma-badge):not(#_):not(#_)::before{
  content:''; flex:none; width:6px; height:6px; border-radius:50%; background:var(--tag-dot); box-shadow:none; animation:none; }
:where(.freshness.green, .freshness[data-level="green"], .rep-good, .cal-event, .ma-badge.ok):not(#_):not(#_){ --tag-dot:var(--tag-green-dot); }
:where(.freshness.amber, .freshness[data-level="amber"]):not(#_):not(#_){ --tag-dot:var(--tag-amber-dot); }
:where(.freshness.red, .freshness[data-level="red"], .rep-bad, .cal-discount, .ma-badge.warn):not(#_):not(#_){ --tag-dot:var(--tag-red-dot); }

/* ── Not enough balance window (2026-11-24): hub-ui.js balanceDialogHTML ─────────
   A native <dialog> opened with showModal(), so it sits in the top layer over any
   view, traps focus and closes on Esc without any code of ours. */
dialog.bal-dlg{ width:min(480px, calc(100vw - 32px)); max-height:calc(100dvh - 32px); overflow:auto; margin:auto; padding:22px 22px 18px;
  border:0; border-radius:18px; background:var(--at-paper, var(--card, #fff)); color:var(--mac-ink);
  box-shadow:0 0 0 1px var(--line), 0 30px 80px -24px var(--mac-scrim), 0 12px 28px -14px var(--mac-scrim); font-family:var(--sans); }
dialog.bal-dlg[open]{ animation:balIn .22s cubic-bezier(.2,1.1,.4,1); }
dialog.bal-dlg::backdrop{ background:color-mix(in srgb, #000 42%, transparent); backdrop-filter:blur(3px); -webkit-backdrop-filter:blur(3px); animation:balFade .2s ease; }
@keyframes balIn{ from{ opacity:0; transform:translateY(8px) scale(.97); } to{ opacity:1; transform:none; } }
@keyframes balFade{ from{ opacity:0; } to{ opacity:1; } }
@media (prefers-reduced-motion: reduce){ dialog.bal-dlg[open], dialog.bal-dlg::backdrop{ animation:none; } }
.bal-dlg .bal-x-form{ position:absolute; top:12px; right:12px; margin:0; }
.bal-dlg .bal-x{ width:30px; height:30px; border:0; border-radius:50%; background:color-mix(in srgb, var(--mac-ink) 7%, transparent); color:var(--mac-muted); font:400 20px/1 var(--sans); cursor:pointer; }
.bal-dlg .bal-x:hover{ color:var(--mac-ink); background:color-mix(in srgb, var(--mac-ink) 12%, transparent); }
.bal-dlg .bal-head{ display:flex; gap:12px; align-items:flex-start; padding-right:34px; }
.bal-dlg .bal-icon{ flex:none; display:grid; place-items:center; width:40px; height:40px; border-radius:12px; color:var(--mac-bad); background:color-mix(in srgb, var(--mac-bad) 13%, transparent); }
.bal-dlg .bal-title{ margin:2px 0 4px; font:600 17px/1.25 var(--sans); letter-spacing:-.02em; color:var(--mac-ink); }
.bal-dlg .bal-sub{ margin:0; font:400 13.5px/1.45 var(--sans); color:var(--mac-muted); }
.bal-dlg .bal-sub b{ color:var(--mac-ink); font-weight:600; }
.bal-dlg .bal-figs{ display:grid; grid-template-columns:repeat(3, 1fr); margin:18px 0 12px; border-radius:12px; overflow:hidden; box-shadow:0 0 0 1px var(--line); }
.bal-dlg .bal-fig{ display:flex; flex-direction:column; gap:4px; padding:11px 12px; box-shadow:0 0 0 .5px var(--line); }
.bal-dlg .bal-fig span{ font:500 11.5px/1.2 var(--sans); color:var(--mac-muted); }
.bal-dlg .bal-fig b{ font:600 17px/1.15 var(--sans); letter-spacing:-.02em; color:var(--mac-ink); font-variant-numeric:tabular-nums; }
.bal-dlg .bal-fig b.neg{ color:var(--mac-bad); }
.bal-dlg .bal-fig small{ font-size:11px; font-weight:500; color:var(--mac-muted); }
.bal-dlg .bal-tip{ margin:0 0 14px; font:400 13px/1.45 var(--sans); color:var(--mac-muted); }
.bal-dlg .bal-in{ display:grid; grid-template-columns:1fr 1fr; gap:10px; padding:14px; border-radius:14px; background:color-mix(in srgb, var(--mac-ink) 4%, transparent); }
.bal-dlg .bal-in-head{ grid-column:1 / -1; font:600 13.5px/1.2 var(--sans); color:var(--mac-ink); }
.bal-dlg .bal-field{ display:flex; flex-direction:column; gap:5px; min-width:0; font:500 11.5px/1.2 var(--sans); color:var(--mac-muted); }
.bal-dlg .bal-field.bal-wide{ grid-column:1 / -1; }
.bal-dlg .bal-field .exp-in{ width:100%; min-width:0; box-sizing:border-box; margin:0; }
.bal-dlg .bal-in .exp-in.inv-bad{ box-shadow:0 0 0 1.5px var(--mac-bad); }
.bal-dlg .bal-err{ grid-column:1 / -1; margin:0; font:500 12.5px/1.4 var(--sans); color:var(--mac-bad); }
.bal-dlg .bal-actions{ grid-column:1 / -1; display:flex; justify-content:flex-end; gap:8px; margin-top:4px; }
.bal-dlg .bal-btn{ height:36px; padding:0 16px; white-space:nowrap; border:0; border-radius:999px; font:600 13px/1 var(--sans); cursor:pointer; }
.bal-dlg .bal-btn.ghost{ background:transparent; color:var(--mac-ink); box-shadow:inset 0 0 0 1px var(--line); }
.bal-dlg .bal-btn.ghost:hover{ background:color-mix(in srgb, var(--mac-ink) 6%, transparent); }
.bal-dlg .bal-btn.primary{ background:var(--mac-ink); color:var(--on-ink, #fff); }
.bal-dlg .bal-btn.primary:hover{ opacity:.88; }
.bal-dlg .bal-btn:disabled{ opacity:.5; cursor:default; }
.bal-dlg .bal-btn:focus-visible, .bal-dlg .bal-x:focus-visible{ outline:2px solid var(--mac-ink); outline-offset:2px; }
.bal-dlg .bal-done{ display:flex; flex-wrap:wrap; gap:10px; align-items:center; padding:12px 14px; border-radius:14px; background:color-mix(in srgb, var(--tag-green-dot, #2f9e5b) 12%, transparent); font:500 13.5px/1.4 var(--sans); color:var(--mac-ink); }
.bal-dlg .bal-done > span{ flex:1 1 200px; }
.bal-dlg .bal-done .bal-actions{ margin:0 0 0 auto; }
.bal-dlg .bal-icon.ok{ color:var(--tag-green-dot, #2f9e5b); background:color-mix(in srgb, var(--tag-green-dot, #2f9e5b) 13%, transparent); }
@media (max-width:480px){ .bal-dlg .bal-figs{ grid-template-columns:1fr; } .bal-dlg .bal-in{ grid-template-columns:1fr; } dialog.bal-dlg{ padding:18px 16px 14px; } }

/* ---- A SIDEBAR WITH MORE ROWS THAN THE WINDOW IS TALL (2026-11-27, every hub) ----
   The sidebar is a column exactly one window high. Its head (the logo, the name, "Welcome back") had no floor, so a
   list longer than the room left squeezed the head until its lines sat on top of each other (Figi Trade's Accounting
   sidebar, 15 rows, on a laptop: Yassin, "the welcome back and the upper part of the sidebar get messed up").
   Now the head and the account card keep their size and the LIST takes what is left and scrolls inside itself. The
   small padding gives the lit row's soft edge room, so the scroll box does not cut it. */
#rail .rail-brand, #rail .rail-welcome, #rail .rail-foot{ flex:none; }
#rail .rail-groups{ flex:1 1 auto; min-height:0; overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain;
  margin:0 -4px; padding:2px 4px; scrollbar-width:thin; scrollbar-color:var(--glass-rule, rgba(128,128,128,.3)) transparent; }
#rail .rail-groups::-webkit-scrollbar{ width:6px; }
#rail .rail-groups::-webkit-scrollbar-thumb{ border-radius:3px; background:var(--glass-rule, rgba(128,128,128,.3)); }

/* ---- SMALLER SIDEBAR ROWS (2026-11-27, Yassin: "make sidebar tabs smaller"; every hub) ----
   One step down from the compact sidebar of 2026-11-16: rows 31 -> 27px, their label 13.5 -> 12.5px, the icon
   18 -> 16px, a little less padding and a tighter corner to match, section headings 11.5 -> 11px. The collapsed rail
   keeps its 18px icons (there the icon is the whole row) and the phone menu keeps its 44px rows (a finger needs them). */
#rail .rail-btn{ min-height:27px; padding:0 10px; gap:9px; border-radius:10px; font-size:12.5px; }
body:not(.rail-min) #rail .rail-btn .ni, body:not(.rail-min) #rail .rail-btn.on .ni{ width:16px; height:16px; }
#rail .rail-sec-label{ margin:0 10px 3px; font-size:11px; }
#rail .rail-groups{ gap:9px; }
body.rail-min #rail .rail-btn{ padding:0; }

/* ---- FASTEST SELLERS (2026-12-03, Yassin: "show a fastest sellers top four products in overview page"; every hub) ----
   fast-sellers.js: four tiles in Hero products' shape (picture first, no card), the units a day as the figure. */
.fast-grid{ display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:18px; }
.fast-tile{ display:flex; flex-direction:column; gap:4px; min-width:0; color:inherit; text-decoration:none; font-family:var(--sans); }
.fast-img{ position:relative; aspect-ratio:4/5; border-radius:12px; overflow:hidden; background:var(--at-img-bg); margin-bottom:4px; }
.fast-img img{ width:100%; height:100%; object-fit:cover; display:block; transition:transform .7s cubic-bezier(.22,1,.36,1); }
a.fast-tile:hover .fast-img img{ transform:scale(1.035); }
.fast-rank{ position:absolute; top:8px; inset-inline-start:8px; min-width:24px; height:24px; padding:0 7px; border-radius:999px; display:inline-flex; align-items:center; justify-content:center;
  background:var(--at-paper); color:var(--mac-ink); font-size:12px; font-weight:500; font-variant-numeric:tabular-nums; }
.fast-name{ min-height:2.6em; font-size:13px; font-weight:500; line-height:1.3; color:var(--mac-ink); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.fast-brand{ font-size:12px; color:var(--mac-muted); }
.fast-rate{ font-size:12px; color:var(--mac-muted); }
.fast-rate b{ margin-inline-end:2px; font-size:18px; font-weight:500; letter-spacing:-.02em; color:var(--mac-ink); font-variant-numeric:tabular-nums; }
.fast-sub, .fast-trend{ font-size:12px; line-height:1.4; color:var(--mac-muted); font-variant-numeric:tabular-nums; }
.fast-trend i{ margin-inline-end:4px; font-style:normal; }
.fast-trend.up, .fast-trend.down{ color:var(--mac-ink); }
.fast-note{ margin:12px 0 0; font-size:12px; color:var(--mac-muted); }
.fast-hint{ margin-inline-start:6px; font:400 12px var(--sans); letter-spacing:0; text-transform:none; color:var(--mac-muted); }
@media (max-width:760px){ .fast-grid{ grid-template-columns:repeat(2, minmax(0,1fr)); gap:16px 12px; } }
@media (prefers-reduced-motion:reduce){ .fast-img img{ transition:none; } }
