/* EquipMart's look on the same screens (BUILD_PLAN THM-03, THM-04; ADR-056, ADR-060; docs/SAAS.md §5.1).
   Used only when <html data-brand="equipmart"> (src/shared/brand.ts says when: off everywhere by default). Under
   data-brand="ktuulz" nothing in this file applies, so the NexFix look stays exactly as it is (THM-02 proves it).
   Rules of this file:
   - It sets variables, on :root[data-brand='equipmart'] only. The few rules it has (part-number figures, touch sizes)
     are scoped under the same attribute.
   - Screen only (@media screen): printouts and PDFs keep the NexFix light tokens whatever the brand (THM-05).
   - Every variable the NexFix dark block sets and this file's light block sets is set again in the dark block, so
     dark mode never mixes the two.
   - Colours come from EquipMart's tokens with the owner's changes (--em-*, generated from design/equipmart/tokens.css
     and palette.css, which the website loads too); the few that are
     derived say so. Layout does not change: same sizes, same spacing, only colours, fonts and corner radius.
   - No logo or name here: the NexFix logo stays (product owner 2026-11-07); it is drawn in brand.tsx. Only its T's
     colour changes, to gold (--logo-t, --wordmark-t; owner 2026-11-08 "make logo T to match theme"). */
/* Generated from design/equipmart/tokens.css (PartsPlus commit fd2c60b64ecd82012ea4dacd5f4927886aabe643) and design/equipmart/palette.css
   (its values win) by scripts/sync-equipmart-tokens.mjs.
   Do not edit. The values only: nothing here is used unless brand-equipmart.css maps it (data-brand="equipmart"). */
:root {
  --em-radius: 0.75rem;
  --em-background: oklch(1 0 0);
  --em-foreground: #111111;
  --em-card: oklch(1 0 0);
  --em-card-foreground: #111111;
  --em-popover: oklch(1 0 0);
  --em-popover-foreground: #111111;
  --em-primary: oklch(0.38 0.075 190);
  --em-primary-foreground: oklch(0.99 0.005 180);
  --em-secondary: oklch(0.955 0.02 180);
  --em-secondary-foreground: oklch(0.3 0.06 190);
  --em-muted: oklch(0.96 0.006 200);
  --em-muted-foreground: oklch(0.47 0.02 200);
  --em-accent: oklch(0.955 0.02 180);
  --em-accent-foreground: oklch(0.3 0.06 190);
  --em-destructive: oklch(0.55 0.21 27);
  --em-border: oklch(0.89 0.01 200);
  --em-input: oklch(0.8 0.015 200);
  --em-ring: oklch(0.6 0.1 185);
  --em-tint: oklch(0.965 0.03 178);
  --em-tint-foreground: oklch(0.3 0.06 190);
  --em-signal: oklch(0.38 0.075 190);
  --em-signal-foreground: oklch(0.99 0.005 180);
  --em-font-body: var(--font-inter), var(--font-arabic), ui-sans-serif, system-ui, sans-serif;
  --em-leading-body: 1.5;
  --em-rtl-font-body: var(--font-arabic), var(--font-inter), ui-sans-serif, system-ui, sans-serif;
  --em-rtl-leading-body: 1.7;
  --em-rtl-tracking-tighter: 0;
  --em-rtl-tracking-tight: 0;
  --em-dark-background: #0a0a0a;
  --em-dark-foreground: #f5f5f5;
  --em-dark-card: #141414;
  --em-dark-card-foreground: #f5f5f5;
  --em-dark-popover: #141414;
  --em-dark-popover-foreground: #f5f5f5;
  --em-dark-primary: oklch(0.38 0.075 190);
  --em-dark-primary-foreground: oklch(0.99 0.005 180);
  --em-dark-secondary: #1c1c1c;
  --em-dark-secondary-foreground: #f5f5f5;
  --em-dark-muted: #1c1c1c;
  --em-dark-muted-foreground: #a3a3a3;
  --em-dark-accent: #1c1c1c;
  --em-dark-accent-foreground: #f5f5f5;
  --em-dark-destructive: oklch(0.65 0.19 25);
  --em-dark-border: #2a2a2a;
  --em-dark-input: #3a3a3a;
  --em-dark-ring: oklch(0.7 0.1 190);
  --em-dark-tint: oklch(0.22 0.03 200);
  --em-dark-tint-foreground: oklch(0.9 0.02 180);
  --em-dark-signal: oklch(0.7 0.1 185);
  --em-dark-signal-foreground: oklch(0.15 0.03 200);
  --em-brand-text: oklch(0.38 0.075 190);
  --em-gold: #c9a227;
  --em-gold-foreground: #111111;
  --em-gold-text: #7f650a;
  --em-warning: #f5db12;
  --em-warning-foreground: #111111;
  --em-foreground-2: #333333;
  --em-primary-hover: oklch(0.33 0.075 190);
  --em-warning-line: #9c8c00;
  --em-dark-brand-text: oklch(0.8 0.09 190);
  --em-dark-gold: #c9a227;
  --em-dark-gold-foreground: #111111;
  --em-dark-gold-text: #c9a227;
  --em-dark-warning: #f5db12;
  --em-dark-warning-foreground: #111111;
  --em-dark-foreground-2: #d4d4d4;
  --em-dark-primary-hover: oklch(0.44 0.075 190);
  --em-dark-hover: #1a1a1a;
  --em-dark-section: #222222;
  --em-dark-warning-line: #f5db12;
  --em-dark-band: #0b2e2c;
}

/* Self-hosted, never from a CDN; downloaded only when a screen uses them, which is only under this brand.
   Also used by the NexFix look since the redesign (look-v3.css, UXR-10).
   SIL Open Font License 1.1 (out/renderer/fonts/LICENSE-*.txt). Their own names, so a font installed on the PC never
   takes their place. */
@font-face { font-family: 'EM Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('./inter-latin-wght-normal-Dx4kXJAl.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'EM Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('./inter-latin-ext-wght-normal-DO1Apj_S.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'EM Plex Arabic'; font-style: normal; font-weight: 400; font-display: swap; src: url('./ibm-plex-sans-arabic-arabic-400-normal-CyU-ddYS.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'EM Plex Arabic'; font-style: normal; font-weight: 500; font-display: swap; src: url('./ibm-plex-sans-arabic-arabic-500-normal-C4MQITzh.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'EM Plex Arabic'; font-style: normal; font-weight: 600; font-display: swap; src: url('./ibm-plex-sans-arabic-arabic-600-normal-0pRdybE_.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'EM Plex Arabic'; font-style: normal; font-weight: 700 900; font-display: swap; src: url('./ibm-plex-sans-arabic-arabic-700-normal-DrtBj6UE.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'EM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('./ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2') format('woff2'); }
@font-face { font-family: 'EM Plex Mono'; font-style: normal; font-weight: 500 900; font-display: swap; src: url('./ibm-plex-mono-latin-600-normal-BgSNZQsw.woff2') format('woff2'); }

@media screen {
  :root[data-brand='equipmart'] {
    /* surfaces: white cards on the faintest grey-green, one step below them for dense lists (derived) */
    --bg: oklch(0.975 0.004 200);
    --surface: var(--em-card);
    --surface-2: var(--em-muted);
    --border: var(--em-border);
    --border-strong: var(--em-input);
    --text: var(--em-foreground); /* #111111 (design/equipmart/palette.css) */
    --text-2: var(--em-foreground-2);
    --muted: var(--em-muted-foreground);
    /* EquipMart's petrol, exactly (#004f4b), for buttons, links, selection and the whole top band */
    --primary: var(--em-primary);
    --primary-hover: var(--em-primary-hover);
    --primary-soft: var(--em-secondary);
    --link: var(--em-brand-text);
    --on-primary: var(--em-primary-foreground);
    --on-primary-2: oklch(0.88 0.03 185); /* derived: the quieter label on a petrol tile */
    --focus-ring: color-mix(in oklch, var(--em-ring) 45%, transparent);
    --row-hover: oklch(0.975 0.012 180); /* derived: a breath of --accent */
    --row-section: oklch(0.94 0.01 200);
    /* the one accent, gold (owner 2026-11-08), only as a thin line or outline, never a fill: the guide's current chapter,
       the sign-in card's top edge, the outline of Home's Needs-attention count. Never a warning (lemon) or an error. */
    --brand: var(--em-gold);
    --logo-t: var(--em-gold); /* the logo's T outline and the wordmark's t, as on the website (owner 2026-11-08) */
    --wordmark-t: var(--em-gold);
    --on-brand: var(--em-gold-foreground);
    --danger: var(--em-destructive);
    --danger-soft: oklch(0.965 0.025 27);
    --danger-line: oklch(0.86 0.07 27);
    --danger-solid: var(--em-destructive);
    --danger-solid-hover: oklch(0.49 0.2 27);
    --chart-bar: oklch(0.62 0.06 190);
    /* warnings: lemon with near-black text, as on the website, so they never look like the gold accent;
       success stays NexFix's green, one step darker for 4.5 : 1 on its tint (derived) */
    --warn: var(--em-warning-foreground);
    --warn-soft: var(--em-warning);
    --warn-line: var(--em-warning-line);
    --ok: #17703a;
    --backdrop: color-mix(in oklch, var(--em-foreground) 45%, transparent);
    --tag-bg: color-mix(in oklch, var(--em-foreground) 78%, transparent);
    /* the menu bar and toolbar: one band of EquipMart's petrol, exactly --primary, in light and dark (product owner
       2026-11-07 "petrol green", 2026-11-08 "it should look same" as the website). On it, everything is white or a
       white tint; the main toolbar button is white with petrol text, so it stands out on the band. */
    --chrome: var(--em-primary);
    --chrome-2: var(--em-primary);
    --sidebar-text: oklch(0.95 0.012 185);
    --sidebar-active: var(--em-primary-foreground); /* the underline under the open screen's menu */
    --chrome-strong: var(--em-primary-foreground);
    --chrome-muted: oklch(0.9 0.025 185);
    --chrome-line: rgb(255 255 255 / 0.2);
    --chrome-hover: rgb(255 255 255 / 0.13);
    --chrome-hover-2: rgb(255 255 255 / 0.13);
    --chrome-focus: rgb(255 255 255 / 0.9);
    --chrome-field: rgb(255 255 255 / 0.08);
    --chrome-field-hover: rgb(255 255 255 / 0.45);
    --chrome-btn-line: rgb(255 255 255 / 0.26);
    --chrome-primary: var(--em-primary-foreground);
    --chrome-primary-hover: oklch(0.92 0.02 185);
    --chrome-on-primary: var(--em-primary);
    --chrome-warn-line: var(--em-warning);
    --chrome-warn-bg: var(--em-warning);
    --chrome-warn-text: var(--em-warning-foreground);
    --chrome-bad-line: rgb(248 113 113 / 0.65);
    --chrome-bad-bg: rgb(248 113 113 / 0.18);
    --chrome-bad-text: #fecaca;
    --chrome-ok: #4ade80;
    --toolbar-text: oklch(0.95 0.012 185);
    --toolbar-line: rgb(255 255 255 / 0.14);
    /* the first screens stay dark (the NexFix logo needs it): near-black, as dark mode, with a petrol glow */
    --first-bg: radial-gradient(1100px 720px at 28% 38%, oklch(0.6 0.1 185 / 0.16), transparent 60%), radial-gradient(900px 600px at 92% 100%, oklch(0.6 0.1 185 / 0.08), transparent 60%), linear-gradient(160deg, #1c1c1c 0%, #111111 62%, #0a0a0a 100%);
    --center-bg: radial-gradient(1000px 640px at 30% 35%, oklch(0.6 0.1 185 / 0.14), transparent 60%), linear-gradient(160deg, #1c1c1c 0%, #0a0a0a 70%);
    /* shape and type */
    --radius: calc(var(--em-radius) - 2px); /* the account site's buttons and inputs (rounded-md, 10 px; WEB-13); grid cells stay square */
    --font: 'EM Inter', 'EM Plex Arabic', system-ui, sans-serif;
    --num: 'EM Inter', 'EM Plex Arabic', system-ui, sans-serif;
    --code: 'EM Plex Mono', 'EM Plex Arabic', ui-monospace, monospace; /* part numbers and codes */
  }

  /* Dark: neutral near-black (design/equipmart/palette.css), not EquipMart's navy; the same petrol for the band and
     the buttons. Petrol text on near-black is 2.1 : 1, so links, tabs and the dashboard bars use --link, the same hue
     lighter (#4baaa5, 5.9 : 1 or more). */
  :root[data-brand='equipmart'][data-theme='dark'] {
    --bg: var(--em-dark-background);
    --surface: var(--em-dark-card);
    --surface-2: var(--em-dark-muted);
    --border: var(--em-dark-border);
    --border-strong: var(--em-dark-input);
    --text: var(--em-dark-foreground);
    --text-2: var(--em-dark-foreground-2);
    --muted: var(--em-dark-muted-foreground);
    /* WEB-13: as the account site in dark (design/site-theme.css, owner 2026-11-08): primary buttons are the light brand
       green with near-black text (11.4 : 1), so the hand-over from the account to the shop is not noticed. The menu
       band keeps the petrol (--chrome, above). */
    --primary: #73d1ca;
    --primary-hover: #8fdcd6;
    --primary-soft: var(--em-dark-secondary);
    --link: var(--em-dark-brand-text);
    --on-primary: #0a0a0a;
    --on-primary-2: #1f3b39; /* WEB-13: the quieter label on a light-green tile (6.6 : 1) */
    --focus-ring: color-mix(in oklch, var(--em-dark-ring) 45%, transparent);
    --row-hover: var(--em-dark-hover);
    --row-section: var(--em-dark-section);
    --brand: var(--em-dark-gold);
    --logo-t: var(--em-dark-gold);
    --wordmark-t: var(--em-dark-gold);
    --on-brand: var(--em-dark-gold-foreground);
    --sidebar-active: var(--em-dark-primary-foreground);
    --danger: var(--em-dark-destructive);
    --danger-soft: #2a1414;
    --danger-line: #5c2626;
    --danger-solid: oklch(0.55 0.2 27);
    --danger-solid-hover: oklch(0.5 0.19 27);
    --chart-bar: #737373;
    --warn: var(--em-dark-warning-foreground);
    --warn-soft: var(--em-dark-warning);
    --warn-line: var(--em-dark-warning-line);
    --ok: #4ade80;
    --backdrop: color-mix(in oklch, black 60%, transparent);
    --chrome: var(--em-dark-band); /* deep green, the website's dark hero band; buttons stay the brand petrol */
    --chrome-2: var(--em-dark-band);
    --sidebar-text: oklch(0.95 0.012 185);
    --chrome-strong: var(--em-dark-primary-foreground);
    --chrome-muted: oklch(0.9 0.025 185);
    --chrome-line: rgb(255 255 255 / 0.2);
    --chrome-hover: rgb(255 255 255 / 0.13);
    --chrome-hover-2: rgb(255 255 255 / 0.13);
    --chrome-focus: rgb(255 255 255 / 0.9);
    --chrome-field: rgb(255 255 255 / 0.08);
    --chrome-field-hover: rgb(255 255 255 / 0.45);
    --chrome-btn-line: rgb(255 255 255 / 0.26);
    --chrome-primary: var(--em-dark-primary-foreground);
    --chrome-primary-hover: oklch(0.92 0.02 185);
    --chrome-on-primary: var(--em-dark-primary);
    --toolbar-text: oklch(0.95 0.012 185);
    --toolbar-line: rgb(0 0 0 / 0.6);
  }

  /* The A4 sheet of the document viewer (UX-127) is the printout as it prints, and printouts keep NexFix's fonts
     (THM-05): the sheet keeps them too, so what is shown is what prints. */
  :root[data-brand='equipmart'] .dv-sheet { --font: 'Segoe UI', Tahoma, 'Geeza Pro', 'Noto Sans Arabic', system-ui, sans-serif;
    --num: 'Segoe UI', Tahoma, system-ui, sans-serif; --code: var(--num); font-family: var(--font); }

  /* Home's Needs-attention count in a gold ring, the text stays near-black (the brackets are for the NexFix look). Guide
     step numbers are petrol, as buttons are: gold is never a fill. */
  :root[data-brand='equipmart'] .attention .attn-count { display: inline-block; min-width: 22px; padding: 0 6px; border: 1.5px solid var(--brand); border-radius: 11px; color: var(--text); font-size: 12.5px; font-weight: 700; line-height: 18px; text-align: center; vertical-align: 2px; }
  :root[data-brand='equipmart'] .guide-sn { background: var(--primary); color: var(--on-primary); }
  :root[data-brand='equipmart'] .attention .attn-count .attn-paren { display: none; }

  /* Warnings shown as a colour on their own (no tint behind) get the lemon as a mark, since lemon text is unreadable. */
  :root[data-brand='equipmart'] .tile .value.warn { text-decoration: underline 4px var(--warn-soft); text-underline-offset: 4px; text-decoration-skip-ink: none; }
  :root[data-brand='equipmart'] .loc-tag.warn-tag { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn); }
  :root[data-brand='equipmart'] .input.unmatched { border-color: var(--warn-line); }
  :root[data-brand='equipmart'] .bell-item:not(.error) { border-inline-start-color: var(--warn-line); }

  /* Part numbers and codes: every digit the same width, a zero that is not an O (EquipMart's catalogue look). */
  :root[data-brand='equipmart'] :is(.picker-item .code, .tree-row .code, .pl-code) { font-variant-numeric: tabular-nums slashed-zero; }
}

/* THM-04: touch targets of at least 44 px on a touch screen (a phone, a tablet), under this brand only — as EquipMart
   does. Mouse and keyboard PCs see no change. */
@media screen and (pointer: coarse) {
  :root[data-brand='equipmart'] :is(button, [role='button'], .btn, select, textarea, input:not([type='checkbox'], [type='radio'], [type='hidden']), label.check, label.switch) { min-height: 44px; }
  :root[data-brand='equipmart'] :is(button, [role='button'], .btn) { min-width: 44px; }
  :root[data-brand='equipmart'] label:not(.check, .switch):has(> input:is([type='checkbox'], [type='radio'])) { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
  :root[data-brand='equipmart'] .mb-btn { margin-block: 0; }
  :root[data-brand='equipmart'] .menubar { height: auto; min-height: 44px; }
  :root[data-brand='equipmart'] .toolbar { height: auto; min-height: 46px; padding-block: 4px; }
}
/* The Cash place (MNY-08): the owner-approved round 3 layout (docs/design/cash/) on the app's own tokens. Phone first:
   one column, the main button full width; from 900 px the form and the table side by side. */
.cash .ic { flex: none; vertical-align: -3px; margin-inline-end: 6px; }
.cash h1 small { font-size: 13px; font-weight: 500; }
.cash .card h2 { font-size: 15px; font-weight: 700; margin: 0 0 8px; }
.cash .card + .card { margin-top: 12px; }
.cash-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 900px) { .cash-cols { grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); } }
.cash-form { max-width: 560px; }
.cash-kv { margin: 0; }
.cash-kv > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.cash-kv > div:last-child { border-bottom: 0; }
.cash-kv dt { color: var(--muted); font-size: 14px; }
/* Round 3 (.sec-h h2): a card's heading 18 px bold. */
.cash .card > h2 { font-size: 18px; font-weight: 700; }
.cash-kv dd { margin: 0; font-weight: 600; text-align: end; }
.cash-kv .total { border-top: 1px solid var(--border-strong, var(--border)); font-size: 16px; }
.cash-kv .total dt { color: inherit; font-weight: 700; }
.cash-choices { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.cash-choices legend { font-weight: 600; margin-bottom: 6px; }
.cash-choices .choice { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; }
.cash-choices .choice.on { border-color: var(--accent, var(--ok)); box-shadow: inset 0 0 0 1px var(--accent, var(--ok)); }
.cash .seg { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.cash table.data tr.selected td { background: var(--ok-soft); }
.cash .alert.info { background: var(--info-soft); border-color: var(--info-soft); color: var(--info-text); }
/* Round 3 (docs/design/cash/home): four equal figures in one card, a rule between them; 14 px label, 22 px bold figure,
   the first in the brand green. */
.cash-figs.stat-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; padding: 0; margin-bottom: 12px; }
.cash-figs.stat-strip > div { padding: 14px 20px; border-inline-start: 1px solid var(--border); min-width: 0; gap: 0; }
.cash-figs.stat-strip > div:first-child { border-inline-start: 0; }
.cash-figs.stat-strip span { font-size: 14px; color: var(--muted); }
.cash-figs.stat-strip strong, .cash-figs.stat-strip strong .num, .cash-figs.stat-strip .big strong { font-size: 22px; font-weight: 700; line-height: 1.35; }
.cash-figs.stat-strip > div:first-child strong { color: var(--link); }
@media (max-width: 1023px) {
  .cash-figs.stat-strip { grid-template-columns: 1fr 1fr; }
  .cash-figs.stat-strip > div:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .cash-figs.stat-strip > div:nth-child(odd) { border-inline-start: 0; }
}
@media (max-width: 599px) {
  .cash-figs.stat-strip > div { padding: 10px 14px; }
  .cash-figs.stat-strip strong, .cash-figs.stat-strip strong .num, .cash-figs.stat-strip .big strong { font-size: 18px; }
}
@media (max-width: 600px) {
  .cash .hide-ph { display: none; }
  /* Round 3 (docs/design/cash/*-375): the title is in the phone header; the head's buttons wrap as they are, 44 px. */
  .cash .page-head > h1 { display: none; } /* the note under it stays (the receipt: number · way · date) */
  .cash .page-head { flex-wrap: wrap; gap: 8px; }
  .cash .page-head .btn { min-height: 44px; }
  .cash .cash-form .btn.primary:not(.seg *), .cash .stack > div > .btn.primary { width: 100%; min-height: 48px; justify-content: center; text-align: center; }
}
@media (max-width: 900px) { .cash .hide-tab { display: none; } }

/* Round 3 (track R, docs/design/cash/collect): the main button full width under the table, 48 px; fields 44 px. */
.cash-go > .btn.primary { width: 100%; min-height: 48px; justify-content: center; font-size: 15px; }
.cash .cash-form .input, .cash .cash-form select { min-height: 44px; font-size: 16px; }
:root[lang='ar'] .cash .cash-form .input, :root[lang='ar'] .cash .cash-form select { font-size: 17px; }
/* Round 3 (C22): the amount large (20 px bold) and the customer's figures at body size (16 px) as drawn. */
:root .cash .cash-form .amt-in .input.num { font-size: 20px; min-height: 46px; }
.cash .cash-form .cash-kv dd { font-size: 16px; line-height: 1.5; }
.cash .cash-form .cash-kv > div { padding: 10px 0; line-height: 1.5; }
.cash .card { padding: 16px; }
.cash .cash-form .field > span:first-child { font-size: 14px; font-weight: 600; color: var(--text); }
.cash-choices legend { font-size: 14px; }
.cash-choices .choice { min-height: 52px; padding: 8px 14px; gap: 12px; }
.cash-choices .choice > span { display: flex; flex-direction: column; line-height: 1.35; font-weight: 600; font-size: 15px; }
.cash-choices .choice small { font-size: 13px; font-weight: 400; }
.cash-choices .choice.on { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.cash-choices .choice input { width: 18px; height: 18px; accent-color: var(--primary); margin: 0; }
.amt-in { display: flex; align-items: center; gap: 8px; }
.amt-in .input { text-align: end; font-weight: 700; font-size: 20px; max-width: 240px; font-family: var(--num); }
.amt-in .riyal { height: 18px; color: var(--muted); }
@media (max-width: 600px) { .amt-in .input { max-width: none; } }

/* The receipt photo box (docs/design/cash/expense). */
.cash-photo { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px; border: 1px dashed var(--border-strong, var(--border)); border-radius: var(--radius); }
.cash-photo-ic { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius); background: var(--primary-soft); color: var(--link); }
.cash-photo-ic .ic { margin: 0; }
.cash-photo .btn { cursor: pointer; }
.cash-photo-file { display: inline-flex; align-items: center; color: var(--link); font-weight: 600; cursor: pointer; }

/* Collections (docs/design/cash/collections): the filter as one segmented control; Remind over Collect. */
.cash .seg.joined { gap: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.cash .seg.joined .btn { border: 0; border-radius: 0; min-height: 30px; }
.cash .seg.joined .btn + .btn { border-inline-start: 1px solid var(--border); }
.cash .coll-acts { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cash .linklike.strong { color: var(--link); font-weight: 600; background: none; border: 0; padding: 0; cursor: pointer; }
.cash .page-head .btn { font-weight: 600; } /* design: the head's word buttons are semibold */

/* Payment received (round 3, docs/design/cash/receipt): Print receipt with its key, Send on WhatsApp outlined, Collect
   another as a plain word button; the receipt number in the fixed-width face. */
.cash-receipt .cash-receipt-act { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cash .btn.outline { border-color: var(--link); color: var(--link); background: var(--surface); }
.cash .btn.plain { border-color: transparent; background: none; color: var(--link); }
.cash .pn { font-family: var(--font-mono, ui-monospace, monospace); }
.cash-receipt .cash-kv dd { font-size: 16px; }
.cash-receipt .card > .table-wrap { margin-inline: -16px; margin-bottom: -16px; }
.cash-receipt .card > .table-wrap table.data { border: 0; border-radius: 0; }
/* Payment received on a phone (round 3): Print receipt full width, fixed above the bottom bar; the head keeps WhatsApp
   and Collect another. */
.cash-sticky { display: none; }
@media screen and (max-width: 600px) {
  .cash-sticky { display: block; position: fixed; bottom: 64px; inset-inline: 0; z-index: 40; padding: 10px 16px; background: var(--surface); border-top: 1px solid var(--border); }
  .cash-sticky .btn.primary { width: 100%; min-height: 48px; justify-content: center; }
  .cash-receipt:has(.cash-sticky) { padding-bottom: 76px; }
}
@media print { .cash-sticky { display: none !important; } }
/* Round 3 (.tbl): the receipt's rows 48 px (56 px on a phone, as drawn), the head row 40 px. */
.cash-receipt table.data tbody td, .cash-receipt table.data tfoot td { height: 48px; }
.cash-receipt table.data thead th { height: 40px; }
@media screen and (max-width: 600px) { .cash-receipt table.data tbody td { height: 56px; } }
/* Expenses to approve (round 3, docs/design/cash/approve): Approve over Send back at the row's end; on a phone the who ·
   when · paid by line under the kind. */
.cash .show-ph { display: none; }
@media screen and (max-width: 600px) { .cash .show-ph { display: block; } }
.cash td.cash-act { text-align: end; }
.cash td.cash-act > .btn { display: flex; margin-inline-start: auto; }
.cash td.cash-act > .btn + .btn { margin-top: 4px; }
.cash table.data td { vertical-align: middle; }
.cash td.cash-act .btn.small { min-height: 36px; padding: 0 12px; font-weight: 600; }
.cash table.data tbody td { padding-top: 12px; padding-bottom: 12px; }
.cash table.data td > .muted { font-size: 13px; }
/* Cash in / out (round 3, docs/design/cash/cash-move): Direction as one joined switch across the form, 44 px; the main
   button 48 px filling the row, Cancel as a word. */
.cash .seg.joined.big { display: flex; width: 100%; }
.cash .seg.joined.big .btn { min-height: 44px; padding: 0 16px; font-size: 15px; }
.cash .cash-act-row { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.cash .cash-act-row > .btn.primary.lg { flex: 1; min-height: 48px; justify-content: center; font-size: 15px; }
.cash .cash-opt { color: var(--muted); font-weight: 400; }
/* Collect payment (round 3, docs/design/cash/collect): the customer's figures on a soft box; Overdue in red; *in full* /
   *part* under the amount; invoice numbers fixed-width. */
.cash .cash-form .cash-kv { background: var(--surface-2); border-radius: 8px; padding: 0 12px; }
.cash .cash-red, .cash .cash-red .num { color: var(--danger); }
.cash table.data td.num > small { display: block; font-size: 12px; }

/* Round 3 — Collect payment / Pay supplier (docs/design/cash/collect): the link at the card's top, the tick column,
   the table to the card's edges, *The receipt will say*. */
.cash-pays .link-btn { background: none; border: 0; padding: 4px 0; min-height: 32px; cursor: pointer; font: inherit; font-weight: 600; font-size: 14px; color: var(--link); }
.cash-pays .link-btn:hover { text-decoration: underline; }
.cash-pays > .table-wrap { margin-inline: -16px; margin-bottom: -16px; margin-top: 12px; }
.cash-pays > .table-wrap table.data { border: 0; border-radius: 0; }
.cash-pays table.data th.tick, .cash-pays table.data td.tick { width: 40px; padding-inline-end: 0; }
.cash-pays table.data td.tick input { width: 18px; height: 18px; accent-color: var(--primary); margin: 0; pointer-events: none; }
.cash-pays table.data tbody td { height: 52px; }
.cash-will h2 { margin-bottom: 8px; }
.cash-will .cash-kv dd { font-size: 16px; font-weight: 600; }
.cash-photo .btn { min-height: 40px; font-size: 14px; font-weight: 600; }
.cash-photo-file { font-size: 14px; }
/* Track R (round 3): the phone pass's 44 px floor (look-v3-daily.css) is more specific than the 48 px main buttons drawn
   in docs/design/cash/*-375 and the invoice's fixed bar — keep them 48 px on the phone. */
@media screen and (max-width: 599px) {
  main.content :is(.cash .cash-form .btn.primary:not(.seg *), .cash .stack > div > .btn.primary, .cash-go > .btn.primary, .cash-sticky .btn.primary,
    .cash .cash-act-row > .btn.primary.lg, .phone-stk .btn):not(.pbox-modal *) { min-height: 48px; }
}
/* Track R (round 3, docs/design/cash/cash-move-375): on the phone the main button is fixed above the bottom bar, full width;
   Cancel gives way (the header's menu and the bottom bar lead back). */
@media screen and (max-width: 599px) {
  .cash .cash-act-row { position: fixed; bottom: 64px; inset-inline: 0; z-index: 40; margin: 0; padding: 10px 16px;
    background: var(--surface); border-top: 1px solid var(--border); }
  .cash .cash-act-row > .btn.plain { display: none; }
  .cash .cash-form:has(.cash-act-row) { margin-bottom: 76px; }
}
/* The redesign's look on the real screens (BUILD_PLAN UXR-10 step 1; docs/erp/DESIGN-SYSTEM.md v3; owner approved
   round 3 on 2026-11-10 15:25 UTC): the WEBSITE's colours and fonts (design/site-theme.css, ADR-071) — white header
   with a 1 px rule, petrol-green buttons (#004f4b) and the brand green (#73d1ca) in dark, white cards (12 px) on a
   light grey-green page, 8 px buttons and fields, IBM Plex Sans Arabic + Inter, IBM Plex Mono for part numbers.
   Rules of this file:
   - It sets variables only (plus card corners and the band's rules), on the NexFix look only: under
     data-brand="equipmart" nothing here applies (brand-equipmart.css keeps EquipMart's petrol band, THM-03).
   - Screen only (@media screen): printouts and PDFs keep their own fixed colours and fonts (THM-05).
   - Fonts: the same self-hosted woff2 files brand-equipmart.css declares ('EM Inter', 'EM Plex Arabic', 'EM Plex
     Mono'; SIL OFL 1.1, out/renderer/fonts/LICENSE-*.txt) — never from Google, never a font installed on the PC.
   - The first screens (sign-in, licence key, set-up) keep their dark look (UX-86): --first-* are not touched. */

@media screen {
  :root:not([data-brand='equipmart']) {
    --bg: #f7f9f9;
    --surface: #ffffff;
    --surface-2: #f1f4f5;
    --border: #dce2e4;
    --border-strong: #c2cbce;
    --text: #111111;
    --text-2: #2f3a3d; /* labels and table headings (11.9 : 1) */
    --muted: #5a6669; /* side notes (5.9 : 1 on white) */
    --primary: #004f4b; /* the website's petrol green: buttons, focus, selection (white on it 9.6 : 1) */
    --primary-hover: #1a615d;
    --primary-soft: #e8f6f3;
    --link: #004f4b;
    --on-primary: #f8fdfc;
    --on-primary-2: #b9dcd8;
    --focus-ring: rgb(62 152 147 / 0.3);
    --row-hover: #f1f7f6;
    --row-section: #e9eff0;
    --cell-edit: #fffbe6;
    --brand: #73d1ca;
    --sidebar-active: var(--primary); /* the green underline under the open section */
    --ok: #1e7a4c;
    --ok-soft: #e6f4ec;
    --ok-line: #b7dcc6;
    --warn: #8a5a00;
    --chart-bar: #3e9893;
    --radius: 8px;
    --radius-card: 12px;
    /* The header: white like the website, one 1 px rule under it; text in the page's colours, the main button green. */
    --chrome: var(--surface);
    --chrome-2: var(--surface);
    --sidebar-text: var(--text-2);
    --chrome-strong: var(--text);
    --chrome-muted: var(--muted);
    --chrome-line: var(--border);
    --chrome-hover: var(--surface-2);
    --chrome-hover-2: var(--surface-2);
    --chrome-focus: #3e9893;
    --chrome-field: var(--surface-2);
    --chrome-field-hover: var(--border-strong);
    --chrome-btn-line: var(--border-strong);
    --chrome-primary: var(--primary);
    --chrome-primary-hover: var(--primary-hover);
    --chrome-on-primary: var(--on-primary);
    --chrome-warn-line: var(--warn-line);
    --chrome-warn-bg: var(--warn-soft);
    --chrome-warn-text: var(--warn);
    --chrome-bad-line: var(--danger-line);
    --chrome-bad-bg: var(--danger-soft);
    --chrome-bad-text: var(--danger);
    --chrome-ok: var(--ok);
    --toolbar-text: var(--text);
    --toolbar-line: var(--border);
    --logo-chip: transparent;
    /* Type: Inter for Latin and figures, IBM Plex Sans Arabic for Arabic, IBM Plex Mono for part numbers. */
    --font: 'EM Inter', 'EM Plex Arabic', system-ui, sans-serif;
    --num: 'EM Inter', system-ui, sans-serif;
    --code: 'EM Plex Mono', 'EM Plex Arabic', ui-monospace, monospace;
  }
  :root:not([data-brand='equipmart'])[lang='ar'] {
    --font: 'EM Plex Arabic', 'EM Inter', system-ui, sans-serif;
  }

  /* Dark: the website's neutral near-black; buttons in the light brand green with near-black text (11.4 : 1). */
  :root:not([data-brand='equipmart'])[data-theme='dark'] {
    --bg: #0a0a0a;
    --surface: #141414;
    --surface-2: #1c1c1c;
    --border: #2a2a2a;
    --border-strong: #3a3a3a;
    --text: #f5f5f5;
    --text-2: #d4d4d4;
    --muted: #a3a3a3;
    --primary: #73d1ca;
    --primary-hover: #8fdcd6;
    --primary-soft: #0f2e2c;
    --link: #73d1ca;
    --on-primary: #0a0a0a;
    --on-primary-2: #1f3b39;
    --focus-ring: rgb(67 178 172 / 0.35);
    --row-hover: #1a1f1e;
    --row-section: #1f2423;
    --cell-edit: #1f2a28;
    --ok: #7fd1a5;
    --ok-soft: #12261a;
    --warn: #f5db12;
    --warn-soft: #2a2405;
    --danger: #ff8a80;
    --danger-soft: #2c0f0d;
    --chart-bar: #43b2ac;
    --chrome-focus: #43b2ac;
  }

  /* White cards with 12 px corners, as the website; buttons and fields keep --radius (8 px). */
  :root:not([data-brand='equipmart']) :is(.card, .tile) { border-radius: var(--radius-card); }
  /* The header is one white band: a rule under the menu bar row and under the toolbar row. */
  :root:not([data-brand='equipmart']) .menubar { border-bottom: 1px solid var(--chrome-line); }
  :root:not([data-brand='equipmart']) .mb-btn.here { color: var(--primary); font-weight: 600; }
  :root:not([data-brand='equipmart'])[data-theme='dark'] .mb-btn.here { color: var(--link); }

  /* The A4 sheet of the document viewer is the printout as it prints: it keeps the print fonts (THM-05). */
  :root:not([data-brand='equipmart']) .dv-sheet { --font: 'Segoe UI', Tahoma, 'Geeza Pro', 'Noto Sans Arabic', system-ui, sans-serif;
    --num: 'Segoe UI', Tahoma, system-ui, sans-serif; --code: var(--num); font-family: var(--font); }
}
/* Track R (round-3 match): the header, the Top menu's tabs and the person menu exactly as the approved round-3 prototype
   draws them (src/renderer/src/prototype/proto.css: .top, .tabs, .tab, .me, .user-dd, .seg, .switch). Layout and sizes
   only — colours come from the tokens (look-v3.css; EquipMart's under its brand), so dark mode follows. */
@media screen {
  /* The header: 64 px, white, one rule under it; the mark + NexFix, then the shop and branch, search, New invoice, bell, person. */
  .toolbar { height: 64px; gap: 12px; padding: 0 20px; position: relative; z-index: 45; } /* its menus open over the tabs */
  .tb-brand { gap: 8px; flex: none; }
  .tb-brand svg, .tb-brand img { border-radius: 22%; }
  .tb-wm { font: 600 18px/1 var(--num); letter-spacing: -0.01em; direction: ltr; color: var(--chrome-strong); }
  .tb-shop { min-width: 0; padding-inline-start: 12px; border-inline-start: 1px solid var(--chrome-line); line-height: 1.3; }
  .tb-shop-n, .tb-shop .acc-switch-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; color: var(--chrome-strong); }
  .tb-shop-b, .tb-shop small { display: block; font-size: 12px; color: var(--chrome-muted); }
  :root[lang='ar'] .tb-shop-n, :root[lang='ar'] .tb-shop .acc-switch-name { font-size: 15px; }
  :root[lang='ar'] :is(.tb-shop-b, .tb-shop small) { font-size: 13px; }
  .tb-shop .acc-switch { border: 0; background: none; padding: 0; min-height: 0; height: auto; text-align: start; display: inline-flex; align-items: center; gap: 6px; color: inherit; }
  .tb-shop .acc-switch-t { display: flex; flex-direction: column; min-width: 0; }
  .toolbar .topbar-search { flex: 1; max-width: 520px; height: 42px; gap: 10px; padding: 0 12px; margin: 0; margin-inline-start: auto; border-radius: var(--radius); font-size: 14px; }
  .toolbar .topbar-search .kbd { font-size: 11px; }
  .toolbar .ib.tb-search-btn { display: none; } /* .ib (below) would show it: only under 1024 px (design) */
  .toolbar > .btn.primary.tb-new { min-height: 44px; padding: 0 16px; gap: 6px; border-radius: var(--radius); font-size: 14px; }
  .tb-arrows { display: none; }
  .toolbar .conn-dot { display: none; }
  /* The bell: an icon, the count in a gold dot. */
  .toolbar .ib { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: var(--radius); background: none; color: inherit; cursor: pointer; position: relative; flex: none; }
  .toolbar .ib:hover { background: var(--chrome-hover-2); }
  .toolbar > .bell > .bell-btn, .toolbar > .bell > .bell-btn.warn { border: 0; background: none; color: var(--chrome-muted); }
  .toolbar > .bell > .bell-btn.bad { border: 0; background: none; color: var(--danger); }
  .bell-btn .bell-count { position: absolute; top: 5px; inset-inline-end: 5px; min-width: 18px; height: 18px; padding: 0 4px; margin: 0; border-radius: 9px;
    background: var(--gold); color: var(--gold-foreground); font: 700 11px/18px var(--num); text-align: center; }
  .bell-btn.bad .bell-count { background: var(--danger-solid); color: var(--on-danger); }
  /* ONE person button: initial in a soft green circle, name with the role under it, a caret. */
  .user-menu > .me { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 4px 6px; border-radius: var(--radius); color: var(--chrome-strong); cursor: pointer; font: inherit; text-align: start; }
  .user-menu > .me:hover { background: var(--chrome-hover-2); }
  .user-menu .av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--link); font-weight: 700; flex: none; }
  .user-menu .me-t { display: flex; flex-direction: column; font-size: 14px; font-weight: 600; line-height: 1.25; }
  .user-menu .me-t small { color: var(--chrome-muted); font-size: 12px; font-weight: 400; }
  .user-menu > .me .caret { font-size: 12px; color: var(--chrome-muted); }
  /* The person menu (the design's .user-dd): header, rows of 44 px with the control at the end. */
  .user-menu-list { min-width: 300px; padding: 6px; border: 1px solid var(--border); top: calc(100% + 4px); color: var(--text); }
  .user-menu > .me { color: var(--text); }
  .toolbar .user-menu > .me { color: var(--chrome-strong); }
  .ud-h { display: flex; flex-direction: column; padding: 6px 12px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; font-size: 14px; }
  .ud-h span { color: var(--muted); font-size: 12px; }
  .user-menu-list .ud-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 0 12px; font-size: 14px;
    border-radius: 6px; color: var(--text); text-align: start; width: 100%; }
  .user-menu-list button.ud-row:hover, .user-menu-list a.ud-row:hover { background: var(--surface-2); }
  .ud-extra { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 4px 0; padding: 4px 0; display: flex; flex-direction: column; }
  .ud-extra .ud-row { color: var(--muted); }
  .ud-seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; }
  .user-menu-list .ud-seg button { padding: 4px 10px; font: 600 12px/1.5 var(--font); border: 0; background: none; color: var(--text); cursor: pointer; }
  .user-menu-list .ud-seg button + button { border-inline-start: 1px solid var(--border-strong); }
  .user-menu-list .ud-seg button.on { background: var(--primary); color: var(--on-primary); }
  .ud-langs { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
  .user-menu-list .ud-langs button { border: 0; background: none; padding: 2px 2px; font: inherit; color: var(--muted); cursor: pointer; }
  .user-menu-list .ud-langs button.on { color: var(--text); font-weight: 600; }
  .user-menu-list .ud-switch { flex: none; width: 48px; height: 28px; border-radius: 14px; border: 0; padding: 0; background: var(--border-strong); position: relative; display: inline-block; cursor: pointer; }
  .user-menu-list .ud-switch span { position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--switch-knob); box-shadow: 0 1px 2px rgb(0 0 0 / 0.25); }
  .user-menu-list .ud-switch.on { background: var(--primary); } .user-menu-list .ud-switch.on span { inset-inline-start: 23px; }

  /* Top position: the tabs under the header (the website's NavTabs) — icon, word, caret; the green rule under where you are. */
  .menubar { height: 46px; gap: 4px; padding: 0 20px; background: var(--surface); }
  .mb-btn { display: inline-flex; align-items: center; gap: 8px; height: 46px; margin: 0; padding: 0 12px; border-radius: 0; font-size: 14px; font-weight: 600;
    color: var(--muted); border-bottom: 2px solid transparent; }
  :root[lang='ar'] .mb-btn { font-size: 15px; }
  .mb-btn:hover, .mb-item.open .mb-btn { background: none; color: var(--text); }
  .mb-item.open .mb-btn { background: var(--surface-2); border-radius: 6px 6px 0 0; }
  .mb-btn.here { color: var(--text) !important; box-shadow: none; border-bottom-color: var(--primary); font-weight: 600; }
  .mb-btn.here .ic { color: var(--link); }
  .mb-btn .caret { font-size: 11px; }
  .mb-drop { top: calc(100% + 4px); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 24px rgb(0 0 0 / 0.12); }
  .mb-drop button { display: flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 6px; font-size: 14px; }
  /* UX-134 (owner 2026-11-19): the items under "More" in full colour, like the ones above — only the "More" heading stays muted. */
  .mb-drop button.quiet { color: var(--text); }
  .mb-drop button.cur { background: var(--primary-soft); color: var(--link); font-weight: 600; }
  .mb-drop .mb-group { border-top: 0; margin-top: 0; padding: 8px 12px 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
}
@media screen and (max-width: 1023px) {
  .toolbar .topbar-search { display: none; }
  .toolbar .ib.tb-search-btn { display: inline-grid; margin-inline-start: auto; }
  .toolbar .user-menu > .me :is(.me-t, .caret) { display: none; }
}
@media screen {
  .tb-title { display: none; }
  .drawer-person .user-menu > .me { width: 100%; }
  .drawer-person .user-menu-list { position: fixed; inset-inline: 8px; top: 64px; z-index: 70; min-width: 0; max-width: 360px; max-height: calc(100vh - 80px); overflow: auto; }
  .user-menu-list .ud-row > span:first-child { white-space: nowrap; }
}
@media screen and (max-width: 599px) {
  .toolbar { height: 56px; gap: 2px; padding: 0 6px; }
  .tb-title { display: block; flex: 1; min-width: 0; font-weight: 700; font-size: 18px; padding-inline-start: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .toolbar > .user-menu { display: none; }
  .toolbar .tb-search-btn { margin-inline-start: 0; }
  .bb-new .bb-ic { width: 44px; height: 44px; margin-top: -16px; box-shadow: 0 4px 12px rgb(0 0 0 / 0.18); }
  .tb-shop:not(.shop-host-bar), .tb-wm, .toolbar > .bell { display: none !important; }
  /* Shared server (owner to decide, index.md O8): the shop switcher stays in the phone header, in place of the title. */
  .toolbar .tb-shop.shop-host-bar { flex: 1; min-width: 0; border: 0; padding-inline-start: 4px; }
  .toolbar:has(.shop-host-bar) .tb-title { display: none; }
  .tb-shop.shop-host-bar .acc-switch-name { max-width: 16ch; }
  .tb-brand { display: flex !important; }
}

/* Side menu, Full (the prototype's .side / .m-*): 264 px; Home with the green bar at the start; each section a heading with
   its daily items under it; More (n) folds the rest; Help at the end, under a rule. */
@media screen {
  .shell-body > .side-menu:not(.icons) { width: 264px; }
  .sm-list .sm-item { min-height: 40px; padding: 0 12px; font-weight: 600; font-size: 15px; }
  .sm-list .sm-item.on { background: var(--primary-soft); color: var(--link); font-weight: 700; box-shadow: inset 3px 0 0 var(--primary); }
  [dir='rtl'] .sm-list .sm-item.on { box-shadow: inset -3px 0 0 var(--primary); }
  .sm-sec { margin-top: 10px; }
  .sm-sec-h { display: flex; align-items: center; gap: 10px; padding: 6px 12px; font-weight: 700; font-size: 14px; color: var(--text); }
  .sm-sec-h .ic { color: var(--muted); }
  .sm-list .sm-item.sub { font-weight: 400; padding-inline-start: 42px; min-height: 36px; font-size: 14px; color: var(--text); }
  .sm-list .sm-item.sub.quiet { color: var(--text); } /* UX-134: the same in the side menu */
  .sm-list .sm-item.sub.on { color: var(--link); font-weight: 700; }
  /* S16: More (n) in green, the chevron right after the words (the design's .m-item.more). */
  .sm-list .sm-item.sub.sm-more-btn { color: var(--link); font-weight: 600; }
  .sm-list .sm-more-btn .grow { flex: none; }
  .sm-fold .grow { text-align: start; }
  .sm-more-h, .sm-list .sm-group { padding: 6px 12px 2px; padding-inline-start: 42px; font-size: 12px; color: var(--muted); font-weight: 600; }
  .sm-list .sm-group { color: var(--gold-text); }
  .sm-list .sm-help { margin-top: 16px; border-top: 1px solid var(--border); border-radius: 0; padding-top: 8px; color: var(--link); }
  :root[lang='ar'] .sm-list .sm-item.sub, :root[lang='ar'] .sm-sec-h { font-size: 15px; }
  /* Home and Help as the prototype's .m-item: the body size (16 px, 17 px in Arabic). */
  .sm-list .sm-item:not(.sub) { font-size: 16px; }
  :root[lang='ar'] .sm-list .sm-item:not(.sub) { font-size: 17px; }
  /* The phone / tablet drawer as the prototype's .drawer .m-item: 48 px rows, items 44 px at the body size. */
  .drawer .sm-list .sm-item { min-height: 48px; }
  .drawer .sm-list .sm-item.sub { min-height: 44px; font-size: 16px; }
  :root[lang='ar'] .drawer .sm-list .sm-item.sub { font-size: 17px; }
}

/* Track R run 3 (design proto.css, phone): bottom bar words 12 px semibold; the menu button in the text colour; no key
   hints on buttons (a phone has no keyboard). */
@media screen and (max-width: 599px) {
  .bottom-bar .bb-item { font-size: 12px; font-weight: 600; }
  .toolbar .tb-menu { color: var(--text); }
  .content .btn .kbd { display: none; }
}

/* No login flash (owner 2026-11-11): the shared server's loading frame (quietLoading.tsx) — the round-3 header's outline
   (64 px, white, one rule; 56 px on a phone), the page's grey-green, and the busy line only after 300 ms. */
.quiet-loading { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg, #f7f9f9); }
.quiet-loading .ql-top { height: 64px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 20px;
  background: var(--surface, #ffffff); border-bottom: 1px solid var(--border, #dce2e4); color: var(--text, #111111); }
.quiet-loading .ql-top svg { border-radius: 22%; }
.quiet-loading .ql-wm { font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.quiet-loading .ql-line { opacity: 0; animation: ql-show 0s linear 300ms forwards; }
.quiet-loading .ql-page { flex: 1; }
@keyframes ql-show { to { opacity: 1; } }
@media (max-width: 900px) { .quiet-loading .ql-top { height: 56px; padding: 0 12px; } }
/* Track Q (Phase 3b): on a tablet the shop switcher in the header gives way to the search (it overlapped it at
   768 / 1024 px): it shrinks and its name ends in "…". */
@media screen and (min-width: 600px) and (max-width: 1279px) {
  .toolbar .tb-shop.shop-host-bar { min-width: 0; flex: 0 1 auto; overflow: hidden; }
  .toolbar .tb-shop.shop-host-bar .acc-switch { max-width: 100%; min-width: 0; }
  .toolbar .tb-shop.shop-host-bar .acc-switch-name { max-width: 20ch; }
}

/* BR-WORK-01 (ADR-094): "Branch: Riyadh ▾" in the top bar — small, beside the shop's name; tinted when one branch is chosen
   so the person sees at a glance that other branches are hidden. */
.tb-work-branch { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: 13px; color: var(--muted); }
.tb-work-branch select.input { height: 32px; min-height: 32px; padding: 0 28px 0 10px; font-size: 13px; width: auto; max-width: 180px; }
.tb-work-branch.on select.input { border-color: var(--primary); background: var(--primary-soft); color: var(--text); font-weight: 600; }
@media (max-width: 900px) { .tb-work-branch .tb-wb-l { display: none; } .tb-work-branch select.input { max-width: 120px; } }
/* The daily screens in the approved look (track M2; erp-redesign.md BUILD PHASE step 4; round 3 designs in
   docs/design/redesign/invoice-*.png): sales invoice, quotation, returns, delivery orders, purchase invoice.
   Same flow and keys as before — this file changes the look only.
   - Layout rules for the shared lines foot (.doc-totals) apply on every brand: its markup is shared.
   - Colours, corners and type apply on the NexFix look only (data-brand="equipmart" keeps its own), screen only
     (printouts keep their fixed look, THM-05). Tokens come from look-v3.css / styles.css; nothing new is coloured here.
   - "Counter tool" rules: flat surfaces and thin rules, colour only with meaning, figures tabular and aligned,
     part numbers in the fixed-width face, one primary button. */

@media screen {
  /* The foot of the lines: + Add line and cost · profit on one side, the totals block on the other. */
  .totals-bar.doc-totals { align-items: flex-end; gap: 24px; flex-wrap: wrap; }
  .doc-totals-side { flex: 1 1 320px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; min-width: 0; }
  .doc-totals-side .totals-profit { border-inline-end: 0; padding-inline-end: 0; margin-inline-end: 0; }
  .doc-sum { margin: 0; display: grid; grid-template-columns: auto auto; column-gap: 0; row-gap: 4px; min-width: 260px; }
  .doc-sum > div { display: contents; }
  .doc-sum dt { color: var(--text-2); font-size: 13px; align-self: baseline; padding-inline-end: 32px; }
  .doc-sum dd { margin: 0; text-align: end; font-weight: 600; font-variant-numeric: tabular-nums; align-self: baseline; }
  .doc-sum .totals-grand dt { font-weight: 600; color: var(--text); padding-top: 6px; border-top: 1px solid var(--border-strong); }
  .doc-sum .totals-grand dd { font-size: 20px; font-weight: 700; padding-top: 6px; border-top: 1px solid var(--border-strong); }
  .th-riyal { font-weight: 400; color: var(--muted); }
  .th-riyal .riyal { color: var(--text-2); margin: 0; }
  .info-mark svg { vertical-align: -2px; }
  .line-del svg { display: block; }

  /* ---- NexFix look ---- */
  :root:not([data-brand='equipmart']) .doc-screen { --doc-row: 44px; }
  :root:not([data-brand='equipmart']) .doc-screen .page-head h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
  :root:not([data-brand='equipmart']) .doc-screen > .card { border-radius: var(--radius-card, 12px); padding: 18px 20px; }
  :root:not([data-brand='equipmart']) .doc-screen .field > label,
  :root:not([data-brand='equipmart']) .doc-screen .field-label { font-weight: 600; color: var(--text); }

  :root:not([data-brand='equipmart']) .page-head .watch-how { font-size: 14px; font-weight: 600; } /* round-3 "Watch how": a plain green link */
  /* Track R: the lines' foot as the round-3 .grid-foot / .gf-tot (sizes from proto.css). */
  :root:not([data-brand='equipmart']) .doc-screen .doc-sum { column-gap: 24px; row-gap: 2px; min-width: 280px; }
  :root:not([data-brand='equipmart']) .doc-screen .doc-sum dt { font-size: 14px; color: var(--muted); padding-inline-end: 0; }
  :root:not([data-brand='equipmart']) .doc-screen .doc-sum dd { font-size: 16px; }
  :root:not([data-brand='equipmart']) .doc-screen .doc-sum .totals-grand dt { font-size: 16px; font-weight: 700; color: var(--text); }
  :root:not([data-brand='equipmart']) .doc-screen .doc-sum .totals-grand dd { font-size: 22px; color: var(--link); }
  :root:not([data-brand='equipmart']) .doc-screen .doc-totals-side > .btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; font-weight: 600; }
  :root:not([data-brand='equipmart']) .doc-screen .doc-totals-side .f2-hint { font-size: 14px; }
  :root:not([data-brand='equipmart']) .page-head .watch-how { text-decoration: none; }
  :root:not([data-brand='equipmart']) .page-head:has(> .ph-note) { align-items: flex-end; padding-bottom: 0; }
  :root:not([data-brand='equipmart']) .page-head:has(> .ph-note) > h1 { margin-bottom: 22px; }

  /* Track R (I2): the header fields 44 px with 16 px text, as the round-3 invoice draws them. */
  :root:not([data-brand='equipmart']) .doc-screen > .card .field :is(input, select, .input, .select, button.btn) { min-height: 44px; font-size: 16px; }
  :root:not([data-brand='equipmart']) .doc-screen > .card .field > label { font-size: 14px; margin-bottom: 6px; }
  /* Field's own label is the first <span> of <label class="field">: bold, the text colour, as the design's .f-l. */
  :root:not([data-brand='equipmart']) .doc-screen > .card label.field > span:first-child { font-size: 14px; font-weight: 600; color: var(--text); }

  /* Track R (D4): the returns list's "Return from an invoice" box as the design's fields — 44 px, bold label, 44 px button. */
  :root:not([data-brand='equipmart']) .return-find .input { min-height: 44px; font-size: 16px; }
  :root:not([data-brand='equipmart']) .return-find label.field > span:first-child { font-size: 14px; font-weight: 600; color: var(--text); }
  :root:not([data-brand='equipmart']) .return-find .btn { height: 44px; padding: 0 18px; font-size: 15px; font-weight: 600; }

  /* Track R (I2): the customer's + as its own square button beside the field (round-3 .btn.sq), not inside it. */
  :root:not([data-brand='equipmart']) .doc-screen > .card .picker.with-add { padding-inline-end: 52px; }
  :root:not([data-brand='equipmart']) .doc-screen > .card .picker.with-add > .input { padding-inline-end: 12px; }
  :root:not([data-brand='equipmart']) .doc-screen > .card .picker-add { inset-inline-end: 0; width: 44px; height: 44px; border-radius: var(--radius); color: var(--text); font-size: 20px; font-weight: 400; }
  :root:not([data-brand='equipmart']) .doc-screen > .card .picker.with-add > .picker-tag { inset-inline-end: 60px; }

  /* The customer line under the customer: short label/value marks; red only for a real problem. */
  :root:not([data-brand='equipmart']) .doc-screen .cust-strip { background: none; border: 0; padding: 0; margin-top: 8px; gap: 8px; align-items: center; font-size: 13px; }
  :root:not([data-brand='equipmart']) .doc-screen .cust-strip.over { background: none; }
  :root:not([data-brand='equipmart']) .doc-screen .cs-mark { display: inline-flex; align-items: baseline; gap: 6px; padding: 3px 10px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
  :root:not([data-brand='equipmart']) .doc-screen .cs-mark strong { color: var(--text); font-weight: 600; }
  :root:not([data-brand='equipmart']) .doc-screen .cs-mark.neg { background: var(--danger-soft); color: var(--danger); }
  :root:not([data-brand='equipmart']) .doc-screen .cs-mark.neg strong { color: var(--danger); }
  :root:not([data-brand='equipmart']) .doc-screen .cs-mark.muted { background: none; padding-inline: 2px; }
  :root:not([data-brand='equipmart']) .doc-screen .cs-link { font-weight: 600; padding: 3px 4px; }
  :root:not([data-brand='equipmart']) .doc-screen .cs-note { flex-basis: 100%; font-size: 12.5px; }

  /* The lines: one white surface with 12 px corners, the totals as its foot. */
  :root:not([data-brand='equipmart']) .doc-screen .doc-lines { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card, 12px); }
  /* No overflow clipping: the part list drops out of the grid. The heading row takes the corners instead. */
  :root:not([data-brand='equipmart']) .doc-screen table.doc-grid thead th:first-child { border-start-start-radius: var(--radius-card, 12px); }
  :root:not([data-brand='equipmart']) .doc-screen table.doc-grid thead th:last-child { border-start-end-radius: var(--radius-card, 12px); }
  :root:not([data-brand='equipmart']) .doc-screen .doc-lines .totals-bar { border-end-start-radius: var(--radius-card, 12px); border-end-end-radius: var(--radius-card, 12px); }
  :root:not([data-brand='equipmart']) .doc-screen .doc-lines > .machine-chip,
  :root:not([data-brand='equipmart']) .doc-screen .doc-lines > :not(table):not(.totals-bar) { margin: 10px 12px 0; }
  :root:not([data-brand='equipmart']) .doc-screen table.doc-grid { background: var(--surface); }
  :root:not([data-brand='equipmart']) .doc-screen table.doc-grid th { background: var(--surface-2); color: var(--text-2); font-size: 12.5px; font-weight: 600; padding: 10px 8px; border: 0; border-bottom: 1px solid var(--border); border-inline-end: 1px solid var(--border); }
  :root:not([data-brand='equipmart']) .doc-screen table.doc-grid td { height: var(--doc-row); border: 0; border-bottom: 1px solid var(--border); border-inline-end: 1px solid var(--border); }
  :root:not([data-brand='equipmart']) .doc-screen table.doc-grid :is(th, td):last-child { border-inline-end: 0; }
  :root:not([data-brand='equipmart']) .doc-screen table.doc-grid td input,
  :root:not([data-brand='equipmart']) .doc-screen table.doc-grid td select { height: calc(var(--doc-row) - 1px); padding: 0 8px; font-size: 14px; }
  :root:not([data-brand='equipmart']) .doc-screen table.doc-grid td input:focus,
  :root:not([data-brand='equipmart']) .doc-screen table.doc-grid td select:focus { background: var(--cell-edit); box-shadow: inset 0 0 0 2px var(--primary); border-radius: 6px; }
  :root:not([data-brand='equipmart']) .doc-screen table.doc-grid td.ro { background: transparent; color: var(--text); font-size: 14px; padding: 0 8px; }
  :root:not([data-brand='equipmart']) .doc-screen table.doc-grid td.ro.neg { color: var(--danger); }
  :root:not([data-brand='equipmart']) .doc-screen table.doc-grid td.idx { color: var(--muted); font-size: 12.5px; }
  :root:not([data-brand='equipmart']) .doc-screen table.doc-grid tbody tr:hover > td:not(.invalid) { background: var(--row-hover); }
  :root:not([data-brand='equipmart']) .doc-screen table.doc-grid :is(input.part-no, .part-no) { font-family: var(--code); font-size: 13px; letter-spacing: 0; }
  :root:not([data-brand='equipmart']) .doc-screen table.doc-grid input.part-no::placeholder { font-family: var(--font); }
  /* Figures sit on the right in both languages (.num is a left-to-right run); their headings follow them. */
  :root:not([data-brand='equipmart']) .doc-screen table.doc-grid th.num { text-align: right; }
  :root:not([data-brand='equipmart']) .doc-screen table.data.doc-grid td { padding: 0 10px; }
  :root:not([data-brand='equipmart']) .doc-screen table.doc-grid td.line-net { font-weight: 600; text-align: end; }
  :root:not([data-brand='equipmart']) .doc-screen table.doc-grid td input.num { text-align: end; }
  :root:not([data-brand='equipmart']) .doc-screen .part-peek { text-decoration: none; }
  :root:not([data-brand='equipmart']) .doc-screen .part-peek:hover { text-decoration: underline; }
  /* The last price this customer paid, small under the price; one click takes it. */
  :root:not([data-brand='equipmart']) .doc-screen .last-price { color: var(--muted); font-size: 11.5px; padding: 0 8px 3px; }
  :root:not([data-brand='equipmart']) .doc-screen .last-price:hover { color: var(--link); }
  :root:not([data-brand='equipmart']) .doc-screen td:has(> .last-price) input { height: 26px; }
  /* Cost · profit · margin per line (who may see costs): the profit green or red, cost and margin muted under it. */
  :root:not([data-brand='equipmart']) .doc-screen .line-profit strong.pos { color: var(--ok); }
  :root:not([data-brand='equipmart']) .doc-screen .line-profit strong.neg { color: var(--danger); }
  :root:not([data-brand='equipmart']) .doc-screen .line-del { color: var(--muted); }
  :root:not([data-brand='equipmart']) .doc-screen .line-del:hover { color: var(--danger); background: var(--danger-soft); }

  :root:not([data-brand='equipmart']) .doc-screen .doc-lines .totals-bar { border: 0; border-top: 0; background: var(--surface); padding: 16px 20px 18px; }
  :root:not([data-brand='equipmart']) .doc-screen .totals-profit { color: var(--text-2); font-size: 13px; }
  :root:not([data-brand='equipmart']) .doc-screen .doc-sum .totals-grand dd { font-size: 22px; color: var(--primary); }

  /* The actions: no box — who entered it on one side, Save and the one primary Finish on the other. */
  :root:not([data-brand='equipmart']) .doc-screen > .card.doc-actions { background: none; border: 0; padding: 4px 0 0; }
  :root:not([data-brand='equipmart']) .doc-screen .doc-actions .voucher-meta { color: var(--text-2); }
  :root:not([data-brand='equipmart']) .doc-screen .doc-actions .btn { height: 44px; padding: 0 18px; font-size: 15px; font-weight: 600; }
  :root:not([data-brand='equipmart']) .doc-screen .doc-actions .btn.primary.big { min-width: 120px; justify-content: center; }
}

@media screen and (max-width: 900px) {
  .doc-sum { min-width: 0; flex: 1 1 100%; }
}

/* Phone (approved addition, audit H-02): the lines grid does not fit at 375 px, so each line becomes rows separated by
   a rule — part number and ✕, the name, then quantity · price · net, then stock · unit · discount and the extra
   columns (profit, …), each with its small label. Same cells, same inputs, same Enter order; desktop unchanged. */
@media screen and (max-width: 599px) {
  .doc-screen table.doc-grid thead { display: none; }
  .doc-screen table.doc-grid, .doc-screen table.doc-grid tbody { display: block; }
  .doc-screen table.doc-grid tr.line-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
  .doc-screen table.doc-grid tr.line-row > td { display: block; flex: 1 1 calc(33.333% - 8px); min-width: 0; width: auto !important; height: auto; border: 0 !important; padding: 0; background: none; }
  .doc-screen table.doc-grid tr.line-row > td.c-no, .doc-screen table.doc-grid tr.line-row > td.c-vat { display: none; }
  .doc-screen table.doc-grid tr.line-row > td.c-part { flex: 1 1 calc(100% - 44px); order: 0; }
  .doc-screen table.doc-grid tr.line-row > td.c-part .picker { width: 100%; }
  .doc-screen table.doc-grid tr.line-row > td.c-del { flex: 0 0 32px; order: 1; align-self: center; }
  .doc-screen table.doc-grid tr.line-row > td.c-name { flex-basis: 100%; order: 2; padding: 0 2px; white-space: normal; }
  .doc-screen table.doc-grid tr.line-row > td:is(.c-qty, .c-price, .c-net) { order: 3; }
  .doc-screen table.doc-grid tr.line-row > td:is(.c-stock, .c-unit, .c-discount, .c-unitCost) { order: 4; }
  .doc-screen table.doc-grid tr.line-row > td.c-extra { order: 5; flex-basis: 100%; }
  .doc-screen table.doc-grid tr.line-row > td.c-extra .line-profit { flex-direction: row; gap: 8px; align-items: baseline; }
  .doc-screen table.doc-grid tr.line-row > td[data-label]::before { content: attr(data-label); display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; padding: 0 2px 2px; }
  .doc-screen table.doc-grid tr.line-row > td.c-part input { border: 1px solid var(--border-strong); border-radius: var(--radius); height: 40px; }
  .doc-screen table.doc-grid tr.line-row > td:is(.c-qty, .c-price, .c-discount, .c-unitCost, .c-unit) :is(input, select) { border: 1px solid var(--border); border-radius: var(--radius); height: 40px; }
  .doc-screen table.doc-grid tr.line-row > td.ro.num { text-align: start; padding: 0 2px; line-height: 40px; }
  .doc-screen table.doc-grid tr.line-row > td.ro.num::before { line-height: normal; }
  .doc-screen table.doc-grid tr.line-row > td.c-net { font-weight: 700; }
  .doc-screen table.doc-grid tr:is(.row-error, .row-warn, .row-note) { display: block; }
  .doc-screen table.doc-grid tr:is(.row-error, .row-warn, .row-note) > td.idx { display: none; }
  .doc-screen table.doc-grid tr:is(.row-error, .row-warn, .row-note) > td { display: block; }
  /* I7 (round 3, invoice-375): a line with no part yet is one "Part no. or name" box; the rest shows once a part is in. */
  .doc-screen table.doc-grid tr.line-row.empty > td:not(.c-part) { display: none; }
  .doc-screen table.doc-grid tr.line-row.empty > td.c-part { flex-basis: 100%; }
  .doc-screen .doc-lines .totals-bar { padding: 12px; }
  .doc-screen .doc-actions .row { flex-wrap: wrap; }
  .doc-screen .f2-hint { display: none; }
  /* Phone (round-3 invoice-375): the title is in the header; the note on its own line, then the buttons; no Watch how. */
  .doc-screen .page-head > h1 { display: none; }
  .page-head > .ph-note { position: static; flex-basis: 100%; white-space: normal; }
  :root:not([data-brand='equipmart']) .page-head:has(> .ph-note) > h1 { margin-bottom: 0; }
  .doc-screen .page-head .watch-how { display: none; } /* no F2 key on a phone (the design hides it there) */
  :root:not([data-brand='equipmart']) .doc-screen table.doc-grid tbody tr.line-row:hover > td:not(.invalid) { background: none; }
  :root:not([data-brand='equipmart']) .doc-screen table.doc-grid tr.line-row > td.ro { background: none; }
}

/* I7: the invoice's phone bar (Sales.tsx .phone-stk) — fixed above the bottom bar under 600 px; hidden elsewhere. */
.phone-stk { display: none; }
@media screen and (max-width: 599px) {
  .phone-stk { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: fixed; bottom: 64px; inset-inline: 0; z-index: 40;
    padding: 10px 16px; background: var(--surface); border-top: 1px solid var(--border); }
  .phone-stk > div { display: flex; flex-direction: column; line-height: 1.2; }
  .phone-stk .stk-l { color: var(--muted); font-size: 12px; }
  .phone-stk .num { font-size: 20px; font-weight: 700; }
  .phone-stk .stk-b { display: flex; gap: 8px; }
  .phone-stk .btn { min-height: 48px; padding: 0 20px; }
  .doc-actions.has-phone-stk .stk-dup { display: none; }
  .doc-screen:has(.phone-stk) { padding-bottom: 76px; }
  /* The total is in the bar; the page keeps Before discount and VAT as label · value rows across the card. */
  .doc-screen:has(.phone-stk) .doc-sum .totals-grand { display: none; }
  .doc-screen:has(.phone-stk) .doc-sum { width: 100%; display: flex; flex-direction: column; gap: 4px; }
  .doc-screen:has(.phone-stk) .doc-sum dd { font-weight: 700; }
  .doc-screen:has(.phone-stk) .doc-sum > div { display: flex; justify-content: space-between; }
  /* The empty line's one box: 48 px, 16 px words (design invoice-375). */
  .doc-screen table.doc-grid tr.line-row.empty > td.c-part input { height: 48px; font-size: 16px; }
  /* No key hints on a phone (no keyboard): the head's New F4. */
  .doc-screen .page-head .kbd { display: none; }
}

/* Track R (round-3 PageHead): every screen's title 22 px bold (24 px Arabic), as the design's .page-h h1. */
@media screen {
  :root:not([data-brand='equipmart']) main.content .page-head > h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
  :root:not([data-brand='equipmart'])[lang='ar'] main.content .page-head > h1 { font-size: 24px; }
}
/* Phone (round 3): the title is in the header, so the page's own title and Watch how are hidden (as on the invoice);
   the returns box stacks; an empty list's words stay in view when its table scrolls sideways. */
@media screen and (max-width: 599px) {
  :root:not([data-brand='equipmart']) main.content .page-head > h1:not(:only-child) { display: none; }
  :root:not([data-brand='equipmart']) main.content .page-head .watch-how { display: none; }
  :root:not([data-brand='equipmart']) .return-find { flex-direction: column; align-items: stretch; }
  td .f3-empty { position: sticky; inset-inline-start: 0; max-width: calc(100vw - 64px); }
}
/* Track R (I6): the line's unit reads as text (*Piece*), as the round-3 invoice draws it; the list's arrow and edge show
   only on hover or focus (a part with packing units still opens its list — the flow stays). */
@media screen and (min-width: 600px) {
  :root:not([data-brand='equipmart']) .doc-screen table.doc-grid td.c-unit select:not(:hover):not(:focus) { appearance: none; background-image: none; border-color: transparent; box-shadow: none; }
}
/* Track Q (Phase 2, web app on a phone): on the shared server the phone header holds the shop switcher in place of the
   screen's title (O8), so the screen keeps its own title — otherwise no screen says what it is. */
@media screen and (max-width: 599px) {
  body:has(.toolbar .shop-host-bar) main.content .page-head > h1 { display: block !important; }
}
/* Track Q (Phase 3b, owner 2026-11-11 "not responsive"): on a phone every control a thumb uses is at least 44 px and no
   words are smaller than 14 px — buttons, boxes and lists in the screens, the date chips, the tabs and the header's
   buttons. Inputs inside a table (the invoice lines) keep their row height; the look is otherwise unchanged. */
@media screen and (max-width: 599px) {
  main.content :is(.btn, .tab, select.select, select.input, input.input:not(table input), textarea.input):not(.linklike):not(.pbox-modal *) { min-height: 44px; }
  main.content .btn.small:not(.pbox-modal *), :root:not([data-brand='equipmart']) main.content .doc-screen .doc-totals-side > .btn.small { min-height: 44px !important; min-width: 44px; }
  main.content .chip:not(.pbox-modal *) { min-height: 44px; padding: 6px 14px; font-size: 14px; }
  main.content .more-details-toggle { min-height: 44px; }
  main.content .chip-row, main.content .chips { gap: 8px; }
  main.content :is(.linklike, .ph-note a, .ph-note button, .card a[href]):not(.pbox-modal *) { min-height: 44px; display: inline-flex; align-items: center; }
  .toolbar :is(.tb-arrow, .ib) { min-width: 44px; min-height: 44px; }
  main.content :is(label.field > span, th, small, .f3-hint, .cs-mark, .badge, dt, .stk-l, .oh-chip, .muted, .btn.small, .cs-link,
    .loc-tag, .part-no, .totals-profit, .totals-profit *, .fs-sample, .oh-bar-c span, .voucher-meta, .voucher-meta *):not(.pbox-modal *) { font-size: 14px !important; }
  main.content .picker-add { width: 44px; height: 44px; }
  main.content .picker.with-add .input { padding-inline-end: 52px; }
}

/* SAL-DISC-02 (owner batch 2026-11-12): the discount box and its two-button toggle ( % | ر.س ) — on a line and, a
   little larger, as "Discount on total" beside the totals. Grey until used; then the chosen side is the brand green.
   Above the user's limit the box turns amber with "Above your limit (max N%)". Every brand (the markup is shared). */
@media screen {
  .disc-box { display: flex; align-items: stretch; gap: 4px; min-width: 0; }
  .disc-box > input { flex: 1 1 auto; min-width: 4.5em; }
  .disc-toggle { display: inline-flex; flex: none; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; background: var(--surface-2); }
  .disc-toggle button { all: unset; box-sizing: border-box; min-width: 24px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; line-height: 1; color: var(--muted); cursor: pointer; }
  .disc-toggle button + button { border-inline-start: 1px solid var(--border); }
  .disc-toggle button:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
  .disc-toggle button:disabled { cursor: default; }
  .disc-toggle.used button.on { background: var(--primary); color: var(--on-primary); }
  .disc-toggle.large button { min-width: 32px; font-size: 14px; }
  .disc-toggle .riyal, .disc-toggle svg { height: 0.95em; width: auto; }
  .disc-over input, .disc-over .input { border-color: var(--warn-line, #e0b54a) !important; background: var(--warn-soft, #fff7e0) !important; }
  .disc-warn { display: block; font-size: 12px; color: var(--warn); margin-top: 2px; white-space: normal; }
  .doc-sum .doc-discount { display: contents; }
  .doc-sum .doc-discount dd { font-weight: 400; }
  .doc-sum .doc-discount .disc-box { justify-content: flex-end; }
  .doc-sum .doc-discount .input { width: 96px; flex: none; min-height: 32px; text-align: end; }
  .doc-sum .doc-discount.invalid .input { border-color: var(--danger, #b42318); }
}

/* MNY-BANK-01: which bank a Card / Transfer line of the payment box goes to (only with more than one bank). */
.pbox-line .bank-pick { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.pbox-line .bank-pick select.input { min-height: 32px; max-width: 220px; padding-block: 2px; }

/* CV-02: the "Columns" button above a document's lines, its checklist, and the read-only info cells it adds. The
   checklist floats (the one place with a shadow); the cells are plain text in the grid. On a phone the chosen
   columns show under each line, two to a row, after the line's own cells. */
.lines-tools { display: flex; justify-content: flex-end; position: relative; margin: 0 0 6px; }
.lines-tools .lc-button { display: inline-flex; align-items: center; gap: 6px; }
.lc-sheet { position: absolute; top: calc(100% + 4px); inset-inline-end: 0; z-index: 30; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 4px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14); padding: 12px 14px;
  width: 300px; max-width: calc(100vw - 32px); }
.lc-sheet p { margin: 0 0 6px; white-space: normal; }
.lc-sheet ul { list-style: none; margin: 0 0 8px; padding: 0; }
.lc-sheet li label { display: flex; align-items: center; gap: 8px; padding: 6px 0; cursor: pointer; }
.lc-sheet li input[type='checkbox'] { width: 16px; height: 16px; margin: 0; flex: none; }
.lc-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-top: 1px solid var(--border); padding-top: 8px; }
.lc-actions:empty { display: none; }
.doc-screen table.doc-grid td.c-info { font-size: 13px; white-space: nowrap; }
.doc-screen table.doc-grid td.c-info .part-no { font-family: var(--code); }
@media screen and (max-width: 599px) {
  .doc-screen table.doc-grid tr.line-row > td.c-extra.c-info { order: 5; flex: 1 1 calc(50% - 8px); white-space: normal; }
  .doc-screen table.doc-grid tr.line-row > td.c-extra.c-info:empty { display: none; }
}

/* INV-ADJ-01: the ( Counted | + / − ) toggle of the Stock adjustment screen — the discount toggle with words. */
@media screen {
  .disc-toggle.adj-mode { align-self: center; }
  .disc-toggle.adj-mode button { min-width: 64px; padding: 6px 12px; font-size: 14px; }
  .disc-toggle.adj-mode button:not(.on) { color: var(--text); }
}
@media screen and (max-width: 599px) {
  .adj-hide-phone { display: none; }
}
/* INV-ADJ-02 (owner 2026-11-13): the stock adjustment in the round-3 document look — the tools row under the head card
   (add a part, find, only differences, the summary) as fields of the same size; on the phone one under the other. */
@media screen {
  .stock-adjust .adj-tools { align-items: flex-end; gap: 12px 16px; flex-wrap: wrap; }
  .stock-adjust .adj-tools .adj-pick { min-width: 280px; flex: 0 1 360px; }
  :root:not([data-brand='equipmart']) .stock-adjust .adj-tools .input { min-height: 44px; font-size: 16px; }
  .stock-adjust .disc-toggle.adj-mode bdi { unicode-bidi: isolate; }
}
@media screen and (max-width: 599px) {
  .stock-adjust .adj-tools { flex-direction: column; align-items: stretch; }
  .stock-adjust .adj-tools .adj-pick { min-width: 0; flex: 1 1 auto; }
  .stock-adjust .adj-tools > .grow { display: none; }
}
/* Track M3 (erp-redesign.md step 5, UXR-07; owner approved round 3 on 2026-11-10): the forms and setup screens in
   round 1's layout with the website's look — New customer as a short form (name + mobile + two switches), Add a
   person by what they do (role presets), and empty lists that say what to do next. Variables only from look-v3.css /
   styles.css, so EquipMart's look and the dark mode follow by themselves. Flat: rules and spacing, no shadows, no
   pills, no coloured rails ("Counter tool"). Screen and print alike are harmless here (dialogs never print). */

/* A switch with a title and one plain line under it, the fields it opens below it. Round 3 (track R, F1): as the
   prototype's .form-sec / .switch-row - a white card, the words first and the 48 x 28 switch at the end. */
.f3-sec { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 12px 16px; display: flex; flex-direction: column; gap: 12px; }
.f3-switch { display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: center; gap: 16px; min-height: 56px; cursor: pointer; }
.f3-switch .switch-track { width: 48px; height: 28px; border-radius: 14px; }
.f3-switch .switch-track::after { top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; }
.f3-switch .switch input:checked + .switch-track::after { inset-inline-start: 23px; }
.f3-switch-text { display: flex; flex-direction: column; gap: 2px; }
.f3-switch-text strong { font-size: 16px; font-weight: 600; color: var(--text); }
.f3-switch-text small { color: var(--muted); font-size: 14px; }
.f3-open { display: flex; flex-direction: column; gap: 10px; }
.f3-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 560px; }
/* F2: Name, then Mobile, one under the other (the prototype's .form, 560 px), 44 px boxes. */
.f3-quick { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; max-width: 560px; }
.f3-quick .input { min-height: 44px; font-size: 16px; }
/* Round 3 (F7): the quick fields' labels as the design's — 14 px semibold in the text colour. */
.f3-quick .field > span:first-child { font-size: 14px; font-weight: 600; color: var(--text); }
.f3-quick ~ .f3-sec { max-width: 560px; }
.f3-note { color: var(--muted); font-size: 0.86em; margin: 0; }
.f3-hint { color: var(--muted); font-size: 0.86em; margin: 2px 0; font-weight: 400; }

/* Add a person: "What do they do in the shop?" — round 3 (track R, F5, prototype .roles / .role-o): one card per role
   with 8 px between, 12 px corners; the chosen one soft green with the brand green edge. */
.f3-roles { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-width: 560px; }
.f3-roles legend { font-weight: 600; color: var(--text); padding: 0; margin-bottom: 8px; }
.f3-role { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; background: var(--surface); }
.f3-role:hover { background: var(--row-hover, var(--surface-2)); }
.f3-role.on { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.f3-role input { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--primary); }
.f3-role-text { display: flex; flex-direction: column; gap: 2px; }
.f3-role-text strong { font-size: 16px; font-weight: 600; color: var(--text); }
.f3-role-text small { font-size: 14px; color: var(--muted); }

/* Settings > Modules (F3, prototype Modules): the lead line, the switches in one card with a rule between, "Always on"
   as a second card with its title. */
.f3-modules { display: flex; flex-direction: column; gap: 24px; max-width: 560px; }
.f3-modules .f3-lead { color: var(--muted); font-size: 16px; margin: 0; }
.f3-modules .f3-card { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 12px 16px; }
.f3-modules .f3-card .f3-sec { border: 0; border-radius: 0; padding: 6px 0; background: none; }
.f3-modules .f3-card .f3-sec + .f3-sec { border-top: 1px solid var(--border); }
.f3-modules .f3-card h3 { font-size: 18px; font-weight: 600; margin: 4px 0 12px; }
.f3-modules .f3-plain { gap: 8px; font-size: 16px; }
.f3-plain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.f3-plain li { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.f3-plain svg, .f3-ok svg { color: var(--ok); flex: none; }

/* An empty list: why, and what to do next (Q6). One outline icon, a heading, one line, the actions as words. */
.f3-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 16px; text-align: center; color: var(--text-2); }
.f3-empty svg { color: var(--muted); }
/* L1 (round 3, prototype .empty-ic): the icon in an 80 px soft green circle; the title at the title size. */
.f3-empty .f3-empty-ic { width: 80px; height: 80px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 8px; background: var(--primary-soft); }
.f3-empty .f3-empty-ic svg { color: var(--link); }
.f3-empty h2 { margin: 4px 0 0; font-size: 22px; font-weight: 700; color: var(--text); }
.f3-empty p { margin: 0; max-width: 520px; color: var(--muted); }
.f3-empty .f3-empty-act { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
/* Round 3 (L3): the design's words at 16 px (17 px Arabic) with room, buttons at the control height (44 px) with the + icon. */
.f3-empty p { font-size: 16px; line-height: 1.6; }
:root[lang='ar'] .f3-empty p { font-size: 17px; }
.f3-empty .f3-empty-act .btn { min-height: 44px; height: auto; padding: 0 16px; font-size: 15px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
/* An empty list (nothing made yet) is the empty state alone on the page, no table frame (L3). */
.f3-empty.alone { padding: 40px 16px; }
.f3-empty .f3-empty-act .btn svg { color: currentColor; }

@media (max-width: 600px) {
  .f3-quick, .f3-pair { grid-template-columns: minmax(0, 1fr); }
  .f3-open { padding-inline-start: 0; }
}

/* ---- Step 5b: the account screens as the next page of the website (owner 17:30 / 17:45 UTC). The website's white
   page, its top bar and footer, the brand green main button (never black), the logo once. Light by default; dark only
   in dark mode, with the website's near-black and the light brand green. Website tokens: design/site-theme.css. */
.site-page { --site-bg: #ffffff; --site-fg: #111111; --site-muted: #5a6669; --site-line: #e5e7e8; --site-green: #004f4b; --site-on-green: #f8fdfc;
  --site-green-hover: #1a615d; --site-gold: #7f650a; --site-card: #ffffff;
  min-height: 100vh; display: flex; flex-direction: column; background: var(--site-bg); color: var(--site-fg); }
:root[data-theme='dark'] .site-page { --site-bg: #0a0a0a; --site-fg: #f5f5f5; --site-muted: #a3a3a3; --site-line: #2a2a2a; --site-green: #73d1ca; --site-on-green: #0a0a0a;
  --site-green-hover: #8fdcd6; --site-gold: #c9a227; --site-card: #141414; }
.site-page .btn.primary { background: var(--site-green); border-color: var(--site-green); color: var(--site-on-green); }
.site-page .btn.primary:hover:not(:disabled) { background: var(--site-green-hover); border-color: var(--site-green-hover); }
.site-page a:not(.btn):not(.site-logo) { color: var(--site-green); }
.site-top { position: sticky; top: 0; z-index: 20; background: var(--site-bg); border-bottom: 1px solid var(--site-line); }
.site-top-in, .site-foot-in { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.site-top-in { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.site-logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--site-fg); }
.site-logo .wm-nex { color: var(--site-fg); }
.site-logo .wm-fix { color: var(--site-gold); }
.site-nav { display: flex; gap: 20px; }
.site-page .site-nav a, .site-page .site-foot-links a { color: var(--site-fg); text-decoration: none; font-weight: 500; }
.site-page .site-nav a:hover, .site-page .site-foot-links a:hover { color: var(--site-green); }
.site-spacer { flex: 1; }
.site-lang { background: none; border: 1px solid var(--site-line); border-radius: 8px; color: var(--site-fg); font: inherit; padding: 6px 12px; min-height: 36px; cursor: pointer; }
.site-lang:hover { border-color: var(--site-muted); }
.site-page a.site-wa { display: inline-flex; align-items: center; gap: 6px; color: var(--site-fg); text-decoration: none; border: 1px solid var(--site-line); border-radius: 8px; padding: 6px 12px; min-height: 36px; }
.site-main { flex: 1; display: flex; justify-content: center; align-items: flex-start; padding: 48px 16px 64px; }
.site-box { width: min(480px, 100%); display: flex; flex-direction: column; gap: 12px; }
.site-box.wide { width: min(640px, 100%); }
.site-company { font-size: 20px; font-weight: 700; }
/* The form card on the white page: a thin rule, no shadow, no coloured top band, no logo of its own. */
.site-page .auth-card { width: 100%; background: var(--site-card); color: var(--site-fg); border: 1px solid var(--site-line); border-top: 1px solid var(--site-line);
  border-radius: 12px; box-shadow: none; padding: 28px; }
.site-page .acc-auth .acc-lang { display: none; } /* the language is in the top bar */
.site-foot { border-top: 1px solid var(--site-line); background: var(--site-bg); color: var(--site-muted); font-size: 14px; }
.site-foot-in { display: flex; flex-direction: column; gap: 12px; padding-top: 24px; padding-bottom: 24px; }
.site-foot-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-foot-line { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.site-page .site-foot-line a { color: var(--site-muted); text-decoration: none; }
/* Signed-in account pages (Plan & payments, users, security): the same bar holds the shop switcher and account menu. */
.site-page .acc-main { max-width: 960px; padding: 32px 16px 48px; }
.site-page .acc-card { background: var(--site-card); border-color: var(--site-line); }
.site-page .acc-plans .featured { border-color: var(--site-green); box-shadow: 0 0 0 1px var(--site-green); }
.site-page .acc-seg button.on { background: var(--site-green); color: var(--site-on-green); }
@media (max-width: 760px) {
  .site-nav, .site-wa-text { display: none; }
  .site-top-in { gap: 10px; min-height: 56px; }
  .site-main { padding: 24px 16px 40px; }
  .site-page .auth-card { padding: 24px 16px; }
}
:root[lang='ar'] .f3-empty h2 { font-size: 24px; }
/* Track Q (Phase 3b): signed in on a tablet (761–1100 px) the bar holds the shop switcher, the person and the language
   too — the website's links and the WhatsApp word give way (still in the footer), so the page never scrolls sideways. */
@media (max-width: 1100px) {
  .site-top-in:has(> .acc-menu) { gap: 12px; }
  .site-top-in:has(> .acc-menu) :is(.site-nav, .site-wa-text) { display: none; }
  .site-top-in:has(> .acc-menu) .acc-me :is(.me-t, .caret) { display: none; }
}
/* Track O (PUR-*) — "Counter tool" (erp-tracks.md, Visual direction v2): flat, thin rules, tables, fixed-width part numbers,
   aligned amounts, colour only with meaning. Existing tokens only. */
.pur-note { padding: 8px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pur-part { font-family: Consolas, Menlo, monospace; direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.pur-num { font-variant-numeric: tabular-nums; text-align: end; white-space: nowrap; }
.pur-warn { color: var(--warn); }
.pur-warn::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-inline-end: 6px; vertical-align: middle; }
.pur-section { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 4px; }
.pur-section > h2 { font-size: 15px; margin: 0 0 8px; }
.pur-steps { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; list-style: none; color: var(--muted); }
.pur-steps li[aria-current='step'] { color: inherit; font-weight: 600; }
.pur-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 12px; }
.pur-qty { width: 84px; }
.pur-phone-only { display: none; }
@media (max-width: 700px) {
  .pur-form { grid-template-columns: minmax(0, 1fr); }
  .pur-hide-phone { display: none; }
  .pur-phone-only { display: block; }
  .pur-table td, .pur-table th { padding-inline: 6px; }
}
.pur-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (max-width: 700px) { .pur-actions > .btn.primary { flex: 1 1 100%; min-height: 44px; } }
.pur-sub { display: block; white-space: normal; font-size: 12px; }
.pur-sub.pur-phone-only { display: none; }
@media (max-width: 700px) { .pur-sub.pur-phone-only { display: block; } }

/* PUR-09/10: pay in currency */
.pur-words { padding: 10px 12px; border-radius: 8px; background: var(--surface-2); line-height: 1.6; }
.pur-advance { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); }
.pur-advance .muted { flex-basis: 100%; }

/* PUR-07: landed-cost sheet — every column shows; on the phone the table scrolls inside its box, never the page */
.pur-sheet .pur-section { overflow-x: auto; }
.pur-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px 16px; margin: 8px 0; }
.pur-facts dt { font-size: 12px; color: var(--muted); }
.pur-facts dd { margin: 0; }
@media print { .pur-sheet .pur-section { overflow: visible; } .pur-sheet .pur-table { font-size: 10pt; } }
/* MT-40 track B: the shared server's account screens. Uses the renderer's tokens (styles.css, THM-01..05). */
.acc-wide { width: 100%; justify-content: center; }
.acc-auth h1 { margin: 0; font-size: 22px; }
.acc-auth-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.acc-lang { flex: none; }
.acc-google { display: inline-flex; align-items: center; gap: 10px; height: 44px; text-decoration: none; color: var(--text); }
.acc-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.acc-or::before, .acc-or::after { content: ''; flex: 1; border-top: 1px solid var(--border); }
.acc-code-boxes { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; max-width: 360px; direction: ltr; }
.acc-code-box { height: 54px; display: grid; place-items: center; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); font-size: 26px; font-variant-numeric: tabular-nums; color: var(--text); }
.acc-code-box.active { border-color: var(--link); box-shadow: 0 0 0 3px var(--focus-ring); }
.acc-code-boxes.invalid .acc-code-box { border-color: var(--danger); }
/* The real input sits over the boxes: taps, paste and autofill land in it; its own text and caret are hidden. */
.acc-code-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.011; font-size: 16px; border: 0; background: transparent; color: transparent; caret-color: transparent; letter-spacing: 0; cursor: text; }
.acc-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.acc-prefix { display: flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); }
.acc-prefix span { padding: 0 6px 0 10px; color: var(--muted); white-space: nowrap; }
.acc-prefix input { border: 0; flex: 1; min-width: 0; }
.acc-ok { color: var(--ok); }
.acc-status { padding: 10px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--info-soft); color: var(--info-text); }
.acc-status.ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.acc-status.warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.acc-status.error { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }

.acc-page { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); }
.acc-top { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.acc-logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); }
.acc-spacer { flex: 1; }
.acc-main { width: 100%; max-width: 920px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.acc-h1 { font-size: 22px; margin: 4px 0; }
.acc-foot { text-align: center; padding: 16px; font-size: 13px; }
.acc-menu { position: relative; }
.acc-menu-list { position: absolute; inset-inline-start: 0; top: calc(100% + 4px); min-width: 240px; max-width: calc(100vw - 32px); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; box-shadow: 0 8px 24px rgb(0 0 0 / 0.14); padding: 6px; display: flex; flex-direction: column; z-index: 30; }
.acc-menu-list.end { inset-inline-start: auto; inset-inline-end: 0; }
.acc-menu-list > a, .acc-menu-list > button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 9px 10px; border-radius: 6px; text-decoration: none; color: var(--text); background: none; border: 0; text-align: start; font: inherit; cursor: pointer; min-height: 40px; justify-content: center; }
.acc-menu-list > a:hover, .acc-menu-list > button:hover, .acc-menu-list > a.current { background: var(--surface-2); }
.acc-menu-who { display: flex; flex-direction: column; padding: 8px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.acc-switch-name { max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }
.acc-avatar { width: 36px; height: 36px; border-radius: 50%; padding: 0; justify-content: center; font-weight: 700; }
/* Round 3 (track R, S6/S7): the account pages' ONE person button as the ERP's — initial in a soft green circle, name with
   the role under it, a caret; the menu opens with the name and role · shop. */
.acc-me { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 4px 6px; border-radius: 8px; color: inherit; cursor: pointer; font: inherit; text-align: start; min-width: 0; }
.acc-me:hover { background: var(--surface-2); }
.acc-me .av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--link); font-weight: 700; flex: none; }
.acc-me .me-t { display: flex; flex-direction: column; font-size: 14px; font-weight: 600; line-height: 1.25; min-width: 0; }
.acc-me .me-t > span, .acc-me .me-t small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 22ch; }
.acc-me .me-t small { color: var(--text-2); font-size: 12px; font-weight: 400; }
.acc-me .caret { font-size: 12px; color: var(--text-2); }
@media (max-width: 760px) {
  .acc-me .me-t, .acc-me .caret { display: none; }
  .site-top-in > .acc-menu .acc-switch-name { max-width: 26vw; }
  .site-top-in:has(> .acc-menu) .wordmark { display: none; } /* signed in on a phone: the mark alone, room for the shop */
  .site-top-in > .acc-menu ~ .site-wa { display: none; } /* signed in on a phone: WhatsApp stays in the footer */
  .site-top-in { min-width: 0; }
  .site-top-in .site-logo { flex: none; }
}
@media (max-width: 420px) { .site-top-in > .acc-menu ~ .site-lang { padding: 6px 8px; } }
.acc-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.acc-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); text-decoration: none; }
a.acc-card:hover { border-color: var(--border-strong); }
.acc-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.acc-badge { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--text-2); }
.acc-badge.state-active { background: var(--ok-soft); color: var(--ok); }
.acc-badge.state-trial, .acc-badge.state-trial_ended, .acc-badge.state-past_due { background: var(--warn-soft); color: var(--warn); }
.acc-badge.state-read_only, .acc-badge.state-suspended, .acc-badge.state-cancelled { background: var(--danger-soft); color: var(--danger); }
.acc-dialog-back { position: fixed; inset: 0; background: var(--backdrop); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.acc-dialog { background: var(--surface); border-radius: 12px; padding: 20px; width: 100%; max-width: 380px; }
.acc-dialog h2 { margin: 0; font-size: 19px; }
.acc-copy { flex: none; }
@media (max-width: 520px) {
  .acc-top .wordmark { display: none; }
  .acc-main { padding: 12px; }
}
.acc-top .wm-nex { color: var(--text); }
.acc-add { align-self: flex-start; }
.acc-auth .acc-lang { height: 30px; }
.acc-h2 { font-size: 17px; margin: 0; }
.acc-h3 { font-size: 15px; margin: 6px 0 0; }
.acc-grid2 { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }
.acc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.acc-list-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.acc-list-row:first-child { border-top: 0; }
.acc-who { display: flex; flex-direction: column; flex: 1; min-width: 160px; overflow-wrap: anywhere; }
.acc-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 16px; list-style: none; padding: 0; margin: 0; font-size: 17px; }
.acc-steps { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 12px; }
.acc-steps > li > .stack { align-items: flex-start; margin-top: 4px; }
.acc-qr { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 8px; align-self: flex-start; }
.acc-key { font-size: 16px; letter-spacing: 0.05em; padding: 6px 8px; background: var(--surface-2); border-radius: 6px; }
.acc-phone-only { display: none; align-self: flex-start; }
@media (max-width: 520px) {
  .acc-grid2 { grid-template-columns: 1fr; }
  .acc-phone-only { display: inline-flex; }
  .acc-qr { display: none; }
}
.acc-center { align-items: center; }
.acc-seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden; background: var(--surface); }
.acc-seg button { border: 0; background: none; padding: 8px 12px; font: inherit; color: var(--text); cursor: pointer; min-height: 38px; }
.acc-seg button.on { background: var(--primary); color: var(--on-primary); }
.acc-plans .featured { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.acc-plan-name { font-size: 17px; }
.acc-price { font-size: 22px; font-weight: 700; }
.acc-feats { margin: 0; padding-inline-start: 18px; color: var(--text-2); }
.acc-total { font-weight: 700; }
.acc-bank { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.acc-bank-row dd { margin: 2px 0 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-weight: 600; }
.acc-mono { font-family: ui-monospace, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.acc-cards-soon { padding: 10px 14px; border: 1px dashed var(--border-strong); border-radius: 8px; }
.acc-grid2.even { grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .acc-grid2.even { grid-template-columns: 1fr; } }
.acc-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.acc-tabs a { padding: 8px 12px; text-decoration: none; color: var(--text-2); border-bottom: 2px solid transparent; white-space: nowrap; }
.acc-tabs a[aria-current='page'] { color: var(--text); border-bottom-color: var(--primary); font-weight: 600; }
.acc-tiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.acc-tile { align-items: flex-start; }
.acc-tile.warn { border-color: var(--warn-line); background: var(--warn-soft); }
.acc-tile-n { font-size: 26px; font-weight: 700; }
.acc-flat { border-top: 1px solid var(--border); padding-top: 14px; }
.acc-h3 { font-size: 14px; margin: 6px 0 0; }
.acc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.acc-table th, .acc-table td { text-align: start; padding: 7px 0; border-top: 1px solid var(--border); vertical-align: top; }
.acc-table thead th { border-top: 0; color: var(--text-2); font-weight: 400; font-size: 12px; }
.acc-table tbody th { color: var(--text-2); font-weight: 400; padding-inline-end: 12px; white-space: nowrap; }
.acc-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.acc-facts dt { color: var(--text-2); }
.acc-facts dd { margin: 0; overflow-wrap: anywhere; }
.acc-badge.health-ok { background: var(--ok-soft); color: var(--ok); }
.acc-badge.health-warning { background: var(--warn-soft); color: var(--warn); }
.acc-badge.health-error { background: var(--danger-soft); color: var(--danger); }
.acc-pay-form { border-color: var(--primary); }
/* Contrast (axe, WCAG AA): coloured backgrounds keep their tint and edge; the text stays the full text colour. */
.acc-top .wm-fix { color: var(--text-2); }
/* Round 3 (track R): no coloured side rails — a flat line, the text in the text colour, the tone as a small dot. */
.acc-status, .acc-status.ok, .acc-status.warn, .acc-status.error { color: var(--text); border-color: var(--border); background: var(--surface-2); display: flex; align-items: baseline; gap: 8px; }
.acc-status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted); transform: translateY(-1px); }
.acc-status.ok::before { background: var(--ok); }
.acc-status.warn::before { background: var(--warn); }
.acc-status.error::before { background: var(--danger); }
.acc-status.error { border-color: var(--danger); }
.acc-badge[class*='state-'], .acc-badge[class*='health-'] { color: var(--text); }

/* The shop host (contract §1.5): the shop's name in the ERP's header is the switcher (round 3, look-v3-shell.css). */
.shop-host-bar { display: flex; align-items: center; gap: 6px; }
.shop-host-bar .acc-switch-name { unicode-bidi: plaintext; }
.toolbar .shop-host-bar .acc-menu-list { color: var(--text); }
.acc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* Forms pass (owner 10 Nov): 44 px targets and 16 px input text (no iOS zoom) on the account screens. */
.acc-auth .input, .acc-main .input, .acc-main .select, .acc-auth .select, .acc-prefix input { height: 44px; font-size: 16px; }
.acc-auth .btn.primary, .acc-auth .acc-google { min-height: 44px; font-size: 16px; }
.acc-auth .linklike { min-height: 44px; padding-inline: 0; text-align: start; }
.acc-auth > .linklike, .acc-auth .field > .linklike { align-self: flex-start; }
.acc-legal { margin: 0; text-align: start; }

/* Layout and alignment (owner 10 Nov), 4/8 px grid: one start edge (logical properties, mirrors in Arabic); label →
 * field 8 px; every field keeps a 20 px spot under it for its error, so nothing jumps when one appears; 16 px between
 * blocks; one control height (44 px), one radius. The card is 480 px on desktop, full width minus 16 px on phones. */
.form-box:has(.acc-auth) { width: min(480px, 100%); }
.auth-card.acc-auth { gap: 16px; text-align: start; }
.form-side .auth-card.acc-auth .input, .form-side .auth-card.acc-auth .btn.primary, .form-side .auth-card.acc-auth .acc-google { height: 44px; min-height: 44px; font-size: 16px; }
.acc-auth .field, .acc-form .field { gap: 8px; }
.acc-auth .field > span, .acc-form .field > span { font-size: 14px; }
.acc-auth .field:not(.invalid), .acc-form .field:not(.invalid) { padding-bottom: 20px; }
.acc-auth .field-error, .acc-form .field-error { margin: -4px 0 0; min-height: 16px; line-height: 16px; font-size: 13px; }
.acc-auth .btn, .acc-auth .input, .acc-auth .acc-code-box { border-radius: var(--radius); }
.acc-auth .acc-row { justify-content: flex-start; column-gap: 24px; }
@media (max-width: 520px) { .form-side .auth-card.acc-auth { padding: 24px 16px; } }

/* Invite staff (forms pass): email + role on one row, "Add another", one button. Phone: email on its own line. */
.acc-form { gap: 16px; }
.acc-form > * { max-width: 560px; width: 100%; }
.acc-form > .acc-add-row { width: auto; }
.acc-invite-head, .acc-invite-row { display: grid; grid-template-columns: minmax(0, 1fr) 180px 44px; column-gap: 8px; align-items: center; }
.acc-invite-head { font-size: 14px; color: var(--text-2); margin-bottom: -8px; }
/* ADR-087: Email · Role · Branch when the shop has more than one branch. */
.acc-invite-head.with-branch, .acc-invite-row.with-branch { grid-template-columns: minmax(0, 1fr) 210px 160px 44px; }
.acc-form > .acc-invite-head.with-branch, .acc-form > .acc-invite-row.with-branch { max-width: 760px; }
.acc-branch { font-size: 14px; min-width: 90px; }
.acc-list-row > .select.acc-role { flex: 0 1 220px; width: 220px; max-width: 100%; }
.acc-invite-row { row-gap: 4px; }
.acc-invite-row .input, .acc-invite-row .select { height: 44px; font-size: 16px; }
.acc-invite-x { width: 44px; height: 44px; justify-content: center; font-size: 20px; padding: 0; }
.acc-invite-err { grid-column: 1 / -1; margin: 0; min-height: 16px; line-height: 16px; font-size: 13px; }
.acc-add-row { align-self: flex-start; min-height: 44px; }
.acc-invite-lbl { display: none; font-size: 14px; color: var(--text-2); }
.acc-actions { display: flex; justify-content: flex-start; }
.acc-actions .btn.primary { min-height: 44px; font-size: 16px; padding-inline: 24px; }
@media (max-width: 520px) {
  .acc-invite-head { display: none; }
  .acc-invite-row { grid-template-columns: auto minmax(0, 1fr) 44px; row-gap: 8px; }
  .acc-invite-lbl { display: block; }
  .acc-invite-lbl:first-child, .acc-invite-row > .input { grid-column: 1 / -1; }
  .acc-invite-row + .acc-invite-row { border-top: 1px solid var(--border); padding-top: 12px; }
  .acc-invite-row.with-branch { grid-template-columns: auto minmax(0, 1fr); }
  .acc-invite-row.with-branch .acc-invite-x { grid-column: 1 / -1; justify-self: end; }
  .acc-actions .btn.primary { width: 100%; justify-content: center; }
}
.acc-hidden { display: none !important; }
.acc-form .acc-grid2 { gap: 0 16px; }
.acc-form .btn.primary, .acc-main .btn.primary { min-height: 44px; font-size: 16px; }

/* ADR-090: shop approval — the terms box, a shop waiting for approval (listed, not a link), the hidden sign-up field. */
.acc-check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.5; }
.acc-check input { margin-top: 3px; flex: none; }
.acc-shop[aria-disabled='true'] { cursor: default; opacity: 0.85; }
.acc-badge.approval-pending { background: var(--warn-soft); color: var(--text); }
.acc-badge.approval-rejected { background: var(--danger-soft); color: var(--text); }
.acc-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* OPS-DUP-01: "You already have a shop" — above the make-a-shop form. */
.acc-dup { border: 1px solid var(--amber, #d4a017); background: var(--amber-soft, #fff8e5); border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; }
.acc-dup p { margin: 0 0 6px; }
.acc-dup .acc-check { margin-top: 6px; }
/* Track P: the vendor's "Plans & prices" — Counter tool: flat, thin rules, a table on desktop, label/value rows on the
   phone. Colours are the site theme's tokens; only the primary button is green. */
.vp-section { display: flex; flex-direction: column; gap: 8px; padding: 16px 0; border-top: 1px solid var(--border); }
.vp-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.vp-table th, .vp-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: start; vertical-align: middle; height: 40px; }
.vp-table thead th { font-size: 13px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.vp-table tbody th { font-weight: 600; white-space: nowrap; }
.vp-table .num { text-align: end; }
.vp-table tr.vp-hidden th, .vp-table tr.vp-hidden td { color: var(--text-2); }
.vp-table input[type='checkbox'], .vp-table input[type='radio'] { width: 20px; height: 20px; accent-color: var(--primary); }
.vp-table .select { height: 40px; border-radius: 4px; min-width: 9.5em; }
.vp-num { width: 5.5em; max-width: 100%; text-align: end; border-radius: 4px; font-variant-numeric: tabular-nums; }
.vp-num.invalid { border-color: var(--danger, #b42318); }
.vp-price { display: inline-flex; align-items: center; gap: 0.3em; direction: ltr; }
.vp-settings { display: flex; gap: 16px; flex-wrap: wrap; }
.vp-settings .field { width: 12em; }
.vp-iban { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.vp-preview { margin: 0; padding: 12px 0; border-top: 1px solid var(--border); line-height: 1.7; }
.vp-save { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); max-width: 36em; }
@media (max-width: 900px) {
  .vp-table thead { display: none; }
  .vp-table, .vp-table tbody, .vp-table tr, .vp-table th, .vp-table td { display: block; width: 100%; }
  .vp-table tr { padding: 8px 0; border-bottom: 1px solid var(--border); }
  .vp-table th, .vp-table td { border: 0; height: auto; padding: 4px 0; }
  .vp-table td { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
  .vp-table td::before { content: attr(data-label); color: var(--text-2); font-size: 14px; }
  .vp-table tbody th { font-size: 16px; }
  .vp-table .select { height: 44px; min-width: 0; max-width: 60%; }
  .vp-num { height: 44px; }
}
/* Track S (B5, owner 2026-11-11 "smooth clicks"): feedback the moment something is pressed, and menus that open in
   ~120 ms. Only while pressed / while opening: at rest every screen looks exactly as round 3 (track R) made it.
   Not on paper. Turned off for people who ask for less motion. */
@media screen {
  .btn:active:not(:disabled), .ib:active, .tb-arrow:active, .topbar-search:active, .bb-item:active, .sm-item:active,
  .mb-drop button:active, .user-menu-list button:active, .oh-kpi:active, .linklike:active {
    transition: none;
    filter: brightness(0.94);
  }
  .btn:active:not(:disabled), .ib:active, .tb-arrow:active, .bb-item:active { transform: translateY(1px); }
  table.data tr.clickable:active > td { background: var(--primary-soft); transition: none; }
  .mb-drop, .user-menu-list, .bell-list { animation: smooth-open 120ms ease-out; }
}
@keyframes smooth-open { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .mb-drop, .user-menu-list, .bell-list { animation: none; }
  .btn:active, .ib:active, .tb-arrow:active, .bb-item:active { transform: none; }
}
/* PRT-DES-01: documents printed with a designed template (printTemplateView.tsx). Classic documents never carry .tp,
   so nothing here touches them. Sizes are in millimetres and points: the page is laid out as it prints. */
.doc-print.dp.tp { position: relative; line-height: 1.3; }
.doc-print.dp.tp th, .doc-print.dp.tp td { border: 0; background: transparent; padding: 0; }
.tp-area { position: relative; }
.tp-block { box-sizing: border-box; overflow: hidden; }
.tp-block.tpb-logo, .tp-block.tpb-qr { display: flex; align-items: center; justify-content: center; }
.tp-block > img.tp-logo-img, .tp-block.tpb-qr > img { width: 100%; height: 100%; object-fit: contain; display: block; }
.doc-print.dp.tp .tp-lines-wrap { overflow: visible; margin-top: 1mm; margin-bottom: 1mm; }
.tp-name { font-size: 1.45em; font-weight: 800; }
.tp-name-2 { font-size: 1.15em; font-weight: 700; }
.tp-co > div:not(.tp-name):not(.tp-name-2) { color: inherit; opacity: 0.85; }
.tp-title { display: flex; justify-content: space-between; align-items: center; gap: 2mm; font-size: 1.3em; }
.tp-no { border: 0.25mm solid currentColor; padding: 0 2mm; border-radius: 1mm; font-size: 0.9em; white-space: nowrap; }
.tp-box-title { font-weight: 700; color: var(--tp-accent, #1f2937); margin-bottom: 1mm; }
.doc-print.dp.tp table.tp-kv { width: 100%; border-collapse: collapse; }
.doc-print.dp.tp .tp-kv th { width: 1%; white-space: nowrap; text-align: start; font-weight: 600; opacity: 0.75; padding: 0.3mm 0; padding-inline-end: 3mm; vertical-align: top; }
.doc-print.dp.tp .tp-kv td { font-weight: 600; padding: 0.3mm 0; vertical-align: top; text-align: start; }
.doc-print.dp.tp table.tp-lines { width: 100%; border-collapse: collapse; }
.doc-print.dp.tp .tp-lines th { background: var(--tp-accent, #1f2937); color: #fff; padding: 1.2mm 1.5mm; text-align: start; font-weight: 600; vertical-align: bottom; }
.doc-print.dp.tp .tp-lines th .bi-en { color: rgba(255, 255, 255, 0.75); }
.doc-print.dp.tp .tp-lines td { border-bottom: 0.2mm solid #d9dee5; padding: 1mm 1.5mm; vertical-align: top; }
.doc-print.dp.tp .tp-lines .num { text-align: end; white-space: nowrap; }
.doc-print.dp.tp .tp-lines tr { break-inside: avoid; }
.doc-print.dp.tp table.tp-sum { width: 100%; border-collapse: collapse; }
.doc-print.dp.tp .tp-sum th, .doc-print.dp.tp .tp-sum td { padding: 0.8mm 2mm; border-bottom: 0.2mm solid #d9dee5; text-align: start; }
.doc-print.dp.tp .tp-sum td { text-align: end; font-weight: 600; white-space: nowrap; }
.doc-print.dp.tp .tp-sum tr.grand th, .doc-print.dp.tp .tp-sum tr.grand td { background: var(--tp-accent, #1f2937); color: #fff; font-weight: 800; }
.doc-print.dp.tp .tp-sum tr.grand .bi-en { color: rgba(255, 255, 255, 0.75); }
.tp-words { font-weight: 600; }
.tp-sign { display: flex; justify-content: space-between; gap: 10mm; }
.tp-sig { flex: 1; text-align: center; }
.tp-sig-line { min-height: 5mm; border-bottom: 0.2mm solid #9aa3ae; margin-bottom: 1mm; font-weight: 600; }
.tp-foot { text-align: center; }
.tp-foot .dp-foot-bank { font-size: inherit; }
.tp-text { white-space: pre-wrap; }
/* The pinned footer: at the bottom of the page on screen, of every page on paper. */
.doc-print.dp.tp > .tp-pin { position: absolute; bottom: 0; z-index: 1; }
@media print { .doc-print.dp.tp > .tp-pin { position: fixed; bottom: 0; } }
/* The document viewer's sheet (docViewer.tsx) is the template's paper. */
.dv-sheet:has(.tp-paper-a5) { width: 148mm; min-height: 210mm; padding: 8mm; }
.dv-sheet:has(.tp-paper-receipt-80) { width: 80mm; min-height: 0; padding: 4mm; }
@media print { html.dv-open .dv-sheet:has(.tp) { width: auto; min-height: 0; padding: 0; } }
.doc-print.dp.tp .riyal-amount .riyal { margin-inline-end: 0.25em; }
/* The account statement on a template (templatedPrints.tsx): the template's page prints instead of the screen's table. */
@media print { .tp-report .print-head, .tp-report .table-wrap, .tp-report .alert { display: none !important; } }
.tp-flow-notes { margin-top: 2mm; }
.tp-block > * { text-align: inherit; }
.doc-print.dp.tp .tp-kv td { overflow-wrap: anywhere; }
.tp-title { text-align: inherit; }
/* Views builder (owner to-do 2026-11-13, VIEW-01..07): the register screen's compact filter bar, the views as tabs, the
   table header (drag, sort, resize), status pills and the person's colour rules, and the Daily report's tables. Website
   look (round 3): flat, thin rules, one radius (4 px), colour only with meaning. Loaded once from main.tsx (speed rule 4). */

/* ---- VIEW-02: views as tabs above the table */
.reg-bar { gap: 6px; }
.reg-tabs-row { display: flex; align-items: flex-end; gap: 8px; inline-size: 100%; border-block-end: 1px solid var(--border); }
.reg-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1 1 auto; min-inline-size: 0; }
.reg-tabs::-webkit-scrollbar { display: none; }
.reg-tab { all: unset; box-sizing: border-box; cursor: pointer; white-space: nowrap; padding: 8px 12px; font-size: 13.5px; color: var(--text-2);
  border-block-end: 2px solid transparent; margin-block-end: -1px; }
.reg-tab:hover { color: var(--text); background: var(--surface-2); }
.reg-tab.on { color: var(--text); font-weight: 600; border-block-end-color: var(--primary); }
.reg-tab:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.reg-tab-dirty { font-weight: 400; color: var(--muted); font-size: 12px; }
.reg-tab-save { flex: none; margin-block-end: 4px; }
.reg-tab-save.quiet { border-color: transparent; background: transparent; color: var(--text-2); }

/* ---- VIEW-01: one compact line — search, period, chips, + Filter, Change view */
.reg-filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; inline-size: 100%; padding-block: 8px 2px; }
.reg-filterbar .reg-search { flex: 1 1 260px; inline-size: auto; min-inline-size: 200px; max-inline-size: 420px; }
.reg-filterbar .reg-actions { margin-inline-start: auto; }
.reg-filterbar .input.reg-quick, .reg-filterbar .input.reg-place { inline-size: auto; max-inline-size: 240px; }
.reg-chip-wrap { position: relative; display: inline-flex; }
.reg-period, .reg-add-filter, .reg-chip { font: inherit; font-size: 13px; min-block-size: 32px; border-radius: 4px; }
.reg-period, .reg-add-filter { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; padding: 0 10px;
  min-block-size: 32px; font-size: 13px; border: 1px solid var(--border-strong); border-radius: 4px; color: var(--text); background: var(--surface); }
.reg-add-filter { border-style: dashed; color: var(--text-2); }
.reg-period:hover, .reg-add-filter:hover { background: var(--surface-2); }
.reg-period:focus-visible, .reg-add-filter:focus-visible, .reg-chip button:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.reg-caret { display: inline-flex; color: var(--muted); }
.reg-chip { display: inline-flex; align-items: stretch; border: 1px solid var(--border-strong); background: var(--surface-2); overflow: hidden; }
.reg-chip button { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; font-size: 13px; }
.reg-chip .reg-chip-main { padding-inline: 10px 4px; max-inline-size: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reg-chip .reg-chip-x { padding: 0 8px; color: var(--muted); font-size: 15px !important; min-inline-size: 24px; justify-content: center; }
.reg-chip .reg-chip-x:hover { color: var(--danger); background: var(--surface); }
.reg-clear { font-size: 13px; }

/* the small menu under a chip; a bottom sheet on the phone */
.reg-pop { position: absolute; inset-block-start: calc(100% + 4px); inset-inline-start: 0; z-index: 40; min-inline-size: 220px; max-inline-size: 320px;
  max-block-size: 360px; overflow: auto; padding: 8px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 4px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.14); display: flex; flex-direction: column; gap: 8px; }
.reg-pop.wide { min-inline-size: 260px; }
.reg-pop-title { margin: 0; font-size: 12px; font-weight: 600; color: var(--text-2); text-transform: none; }
.reg-pop-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.reg-pop-list button { all: unset; box-sizing: border-box; cursor: pointer; display: block; inline-size: 100%; padding: 7px 8px; font-size: 13.5px; border-radius: 4px; }
.reg-pop-list button:hover, .reg-pop-list button.hl, .reg-pop-list button:focus-visible { background: var(--surface-2); }
.reg-pop-list button.on { font-weight: 600; color: var(--primary); }
.reg-ticks { display: flex; flex-direction: column; gap: 2px; max-block-size: 220px; overflow: auto; }
.reg-ticks .check { padding: 4px 2px; }
.reg-range-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.reg-range-pair .field { inline-size: auto; }
.reg-pop-foot { display: flex; gap: 6px; }
@media (max-width: 760px) {
  .reg-filterbar .reg-search { flex: 1 0 100%; max-inline-size: none; }
  .reg-filterbar .reg-actions { inline-size: auto; margin-inline-start: auto; }
  .reg-filterbar .reg-actions .btn { min-block-size: 40px; }
  .reg-period, .reg-add-filter, .reg-chip { min-block-size: 40px; }
  /* above the phone's bottom bar (z-index 44), under dialogs */
  .reg-pop { position: fixed; inset: auto 0 0 0; z-index: 60; max-inline-size: none; inline-size: 100%; max-block-size: 70vh; border-radius: 8px 8px 0 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 24px rgb(0 0 0 / 0.18); }
  .reg-pop-list button { padding: 11px 8px; }
  .reg-chip-main { max-inline-size: 60vw; }
}

/* ---- VIEW-03: the header — drag a column, click to sort, drag its edge to resize */
.reg-table thead .th-sort.movable { cursor: grab; touch-action: pan-y; user-select: none; }
.reg-table thead th.dragging { opacity: 0.5; }
.reg-table thead th.drop-before { box-shadow: inset 2px 0 0 var(--primary); }
.reg-table thead th.drop-after { box-shadow: inset -2px 0 0 var(--primary); }
[dir="rtl"] .reg-table thead th.drop-before { box-shadow: inset -2px 0 0 var(--primary); }
[dir="rtl"] .reg-table thead th.drop-after { box-shadow: inset 2px 0 0 var(--primary); }
.reg-table .th-dir { font-size: 10px; color: var(--primary); }

/* ---- VIEW-05: a status pill only where it means something */
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12.5px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.pill.red { background: var(--danger-soft); color: var(--danger); }
.pill.amber { background: var(--warn-soft); color: var(--warn); }
.pill.green { background: var(--ok-soft); color: var(--ok); }
.pill.grey { background: var(--row-section); color: var(--text-2); }
.pill.blue { background: var(--info-soft); color: var(--info-text); }

/* ---- VIEW-06: the person's colour rules — a cell or the whole row */
.reg-table td.tone-red, .reg-row .tone-red { color: var(--danger); font-weight: 600; }
.reg-table td.tone-amber, .reg-row .tone-amber { color: var(--warn); font-weight: 600; }
.reg-table td.tone-green, .reg-row .tone-green { color: var(--ok); font-weight: 600; }
.reg-table td.tone-blue, .reg-row .tone-blue { color: var(--info-text); font-weight: 600; }
.reg-table td.tone-grey, .reg-row .tone-grey { color: var(--muted); }
.reg-table td.tone-red { background: var(--danger-soft); }
.reg-table td.tone-amber { background: var(--warn-soft); }
.reg-table td.tone-green { background: var(--ok-soft); }
.reg-table td.tone-blue { background: var(--info-soft); }
tr.tone-row.tone-red > td, .reg-row.tone-row.tone-red { background: var(--danger-soft); }
tr.tone-row.tone-amber > td, .reg-row.tone-row.tone-amber { background: var(--warn-soft); }
tr.tone-row.tone-green > td, .reg-row.tone-row.tone-green { background: var(--ok-soft); }
tr.tone-row.tone-blue > td, .reg-row.tone-row.tone-blue { background: var(--info-soft); }
tr.tone-row.tone-grey > td, .reg-row.tone-row.tone-grey { background: var(--row-section); }
.reg-rules { display: flex; flex-direction: column; gap: 6px; }
.reg-rule { display: grid; grid-template-columns: minmax(120px, 1.3fr) minmax(100px, 1fr) minmax(90px, 1fr) auto auto auto; gap: 6px; align-items: center; }
.reg-swatches { display: inline-flex; gap: 4px; }
.reg-swatch { inline-size: 22px; block-size: 22px; border-radius: 4px; border: 1px solid var(--border-strong); cursor: pointer; padding: 0; }
.reg-swatch.on { outline: 2px solid var(--text); outline-offset: 1px; }
.reg-swatch.red { background: var(--danger-soft); border-color: var(--danger); }
.reg-swatch.amber { background: var(--warn-soft); border-color: var(--warn); }
.reg-swatch.green { background: var(--ok-soft); border-color: var(--ok); }
.reg-swatch.blue { background: var(--info-soft); border-color: var(--info-text); }
.reg-swatch.grey { background: var(--row-section); border-color: var(--muted); }
@media (max-width: 760px) {
  .reg-rule { grid-template-columns: 1fr 1fr; padding-block: 6px; border-block-end: 1px solid var(--border); }
  .reg-swatch { inline-size: 28px; block-size: 28px; }
}
@media print { .reg-tabs-row, .reg-filterbar { display: none; } }

/* ---- VIEW-07: the Daily report — each section's lines as a table like the Cash and bank book (headings kept), the
   summary figures as ruled label / amount rows, a Columns choice per table */
.daily .daily-sec { max-inline-size: 1100px; }
.daily-rows { border-collapse: collapse; }
.daily-rows th, .daily-rows td { padding: 7px 0; border-block-end: 1px solid var(--border); }
.daily-rows th { color: var(--text-2); }
.daily-table { margin-block-start: 4px; inline-size: 100%; }
.daily-table td.num, .daily-table th.num { text-align: end; }
.daily-cols-bar { display: flex; justify-content: flex-end; margin-block-start: 8px; }
.daily-cols-btn { font-size: 13px; }
.daily-cols { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; padding: 8px 0; border-block: 1px solid var(--border); margin-block: 4px; }
.daily-col { display: inline-flex; align-items: center; gap: 4px; }
/* VIEW-10: the summary sections are tables too (a row per branch, the total row in the foot); on a phone and on the
   80 mm receipt each row is a card — the first cell and the main amount on the first line, every other cell as
   "Heading  value" under it — so nothing scrolls sideways at 375 px. */
.daily-sub { font-size: 13.5px; font-weight: 600; color: var(--text-2); margin: 12px 0 0; }
.daily-none { font-size: 13px; margin: 2px 0 0; color: var(--muted); }
.daily-sec.is-empty { margin-block-end: 12px; }
.daily-sec.is-empty h2 { border-bottom-color: var(--border); }
.daily-table tfoot th.d-blank { background: var(--surface-2); }
@media (max-width: 600px) {
  .daily .table-wrap { overflow-x: visible; }
  .daily-table, .daily-table tbody, .daily-table tfoot { display: block; inline-size: 100%; }
  .daily-table thead { display: none; }
  .daily-table tbody tr, .daily-table tfoot tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--border); block-size: auto; }
  .daily-table td, .daily-table tfoot th { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 1px 0;
    max-inline-size: none !important; min-inline-size: 0 !important; inline-size: auto !important; white-space: normal; color: var(--text-2); font-size: 13px; position: static; }
  .daily-table td::before { content: attr(data-label); color: var(--muted); }
  .daily-table td.d-first, .daily-table tfoot th.d-first { grid-column: 1; grid-row: 1; color: var(--text); font-size: 14px; }
  .daily-table td.d-main { grid-column: 2; grid-row: 1; color: var(--text); font-size: 14px; font-weight: 600; }
  .daily-table td.d-first::before, .daily-table td.d-main::before { content: none; }
  .daily-table tfoot th.d-blank { display: none; }
  .daily-table tfoot tr { background: var(--surface-2); padding-inline: 4px; }
  .daily-cols-bar { margin-block-start: 2px; }
}
@media print {
  .daily-80 .daily-table, .daily-80 .daily-table tbody, .daily-80 .daily-table tfoot { display: block; inline-size: 100%; }
  .daily-80 .daily-table thead { display: none; }
  .daily-80 .daily-table tbody tr, .daily-80 .daily-table tfoot tr { block-size: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 6px; padding: 2px 0; border-bottom: 1px dashed #999; }
  .daily-80 .daily-table td, .daily-80 .daily-table tfoot th { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 6px; border: 0; padding: 0;
    max-inline-size: none !important; min-inline-size: 0 !important; inline-size: auto !important; white-space: normal; position: static; }
  .daily-80 .daily-table td::before { content: attr(data-label); }
  .daily-80 .daily-table td.d-first, .daily-80 .daily-table tfoot th.d-first { grid-column: 1; grid-row: 1; font-weight: 600; }
  .daily-80 .daily-table td.d-main { grid-column: 2; grid-row: 1; font-weight: 600; }
  .daily-80 .daily-table td.d-first::before, .daily-80 .daily-table td.d-main::before { content: none; }
  .daily-80 .daily-table tfoot th.d-blank { display: none; }
  .daily:not(.daily-80) .daily-table { font-size: 10.5px; }
  .daily:not(.daily-80) .daily-table th, .daily:not(.daily-80) .daily-table td { padding: 3px 5px; }
}

/* ---- VIEW-09: moving and resizing columns made obvious (register lists, the Daily report's tables, the info columns of
   a document's lines) — a ⋮⋮ grip on hover, a visible divider with a comfortable hit area (wider on touch), the drop
   line, a one-time hint. */
table.grid th.col-head { position: relative; }
/* The hit area stays inside its own heading: sticky headings stack, so a part over the next one would never be hit. */
.col-grip { position: absolute; inset-block: 0; inset-inline-end: 0; inline-size: 12px; cursor: col-resize; z-index: 2; touch-action: none; }
.col-grip::after { content: ''; position: absolute; inset-block: 22%; inset-inline-end: 0; inline-size: 2px; border-radius: 1px; background: var(--border-strong); opacity: 0.7; transition: background .12s, inset-block .12s; }
.col-grip:hover::after, .col-grip.active::after { inset-block: 0; background: var(--primary); opacity: 1; }
thead th:last-child > .col-grip::after { display: none; }
thead th:last-child > .col-grip:hover::after, thead th:last-child > .col-grip.active::after { display: block; }
.col-move-grip { display: inline-block; inline-size: 0; overflow: hidden; vertical-align: middle; margin-inline-end: 0; color: var(--muted); font-size: 12px; letter-spacing: -3px;
  line-height: 1; cursor: grab; user-select: none; touch-action: none; opacity: 0; transition: opacity .12s; }
th.col-movable:hover > .col-move-grip, th.col-movable:focus-within > .col-move-grip, th.col-movable.dragging > .col-move-grip { inline-size: 10px; margin-inline-end: 4px; opacity: 1; }
th.col-movable.dragging { opacity: 0.5; cursor: grabbing; }
th.col-movable { cursor: grab; user-select: none; }
th.col-movable .th-sort { inline-size: auto; }
.reg-table thead th.col-movable .th-sort { inline-size: calc(100% - 14px); }
th.drop-before { box-shadow: inset 2px 0 0 var(--primary); }
th.drop-after { box-shadow: inset -2px 0 0 var(--primary); }
[dir="rtl"] th.drop-before { box-shadow: inset -2px 0 0 var(--primary); }
[dir="rtl"] th.drop-after { box-shadow: inset 2px 0 0 var(--primary); }
@media (pointer: coarse) {
  .col-grip { inline-size: 22px; }
  .col-grip::after { opacity: 1; }
  th.col-movable > .col-move-grip { inline-size: 10px; margin-inline-end: 4px; opacity: 0.55; }
}
.col-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 6px 0; padding: 6px 10px; border-radius: 6px;
  background: var(--info-soft); color: var(--info-text); font-size: 13px; }
.col-hint-icon { letter-spacing: -3px; font-weight: 700; }
.col-hint-ok { margin-inline-start: auto; font-size: 13px; }
@media (max-width: 640px) { .col-hint { display: none; } }
@media print { .col-grip, .col-move-grip, .col-hint { display: none !important; } }

/* ---- EXPORT-01: the Export button (Excel · CSV · PDF, a per-person default) — a split button when a default is set */
.export-btn { position: relative; display: inline-flex; }
.export-btn .split-btn { display: inline-flex; }
.export-btn .split-btn .btn:not(:only-child):first-child { border-start-end-radius: 0; border-end-end-radius: 0; }
.export-btn .split-btn .split-caret { border-start-start-radius: 0; border-end-start-radius: 0; margin-inline-start: -1px; padding-inline: 8px; }
.export-pop { inset-inline-start: auto; inset-inline-end: 0; min-inline-size: 220px; }
.export-default { display: flex; align-items: center; gap: 8px; padding: 6px 8px 2px; border-block-start: 1px solid var(--border); font-size: 13px; cursor: pointer; }
@media (max-width: 760px) {
  .export-btn .btn { min-block-size: 40px; }
  .export-pop { inset: auto 0 0 0; }
  .export-default { padding-block: 10px; }
}
@media print { .export-btn { display: none !important; } }
.table-export { display: inline-flex; }

/* VIEW-11: the Manage tabs dialog — a row per tab: grip and arrows, shown, name (EN / AR inputs for own views), delete. */
.reg-tab-manage { margin-inline-start: 6px; }
.reg-manage-tabs td { vertical-align: middle; padding: 6px 8px; }
.reg-manage-tabs tr[draggable='true'] { cursor: grab; }
.reg-manage-tabs tr.dragging { opacity: 0.5; }
.reg-manage-tabs tr.deleted td { text-decoration: line-through; color: var(--muted); }
.reg-manage-tabs .drag-grip { color: var(--muted); margin-inline-end: 4px; letter-spacing: -2px; }
.reg-tab-names { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
@media (max-width: 600px) { .reg-tab-names { grid-template-columns: 1fr; } }
/* SET-01 (owner to-do 2026-11-13): ONE Settings page with sections — a side list on desktop (sections as small
   headings, their pages under them, the open one in the brand green), a section picker on the phone, the page beside.
   ROLE-01: the rights grid (area × action) as a plain table, ticks centred. Flat, thin rules, no cards around the list
   ("Counter tool", erp-tracks.md). Colours are the shared variables only, so light, dark and EquipMart all follow. */

.set-frame { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.set-nav { position: sticky; top: 12px; border-inline-end: 1px solid var(--border); padding-inline-end: 12px; }
.set-nav-sec + .set-nav-sec { margin-top: 14px; }
.set-nav-h { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: none; padding: 0 8px 4px; }
.set-nav ul { list-style: none; margin: 0; padding: 0; }
.set-nav a { display: block; padding: 6px 8px; border-radius: 4px; color: var(--text); text-decoration: none; font-size: 14px; line-height: 1.35; }
.set-nav a:hover { background: var(--row-hover); }
.set-nav a.on { color: var(--primary); font-weight: 600; background: var(--primary-soft, var(--row-hover)); }
.set-nav-phone { display: none; }
.set-pane { min-width: 0; }
.set-pane > .page-narrow, .set-pane > .stack { max-width: 900px; }

@media (max-width: 900px) {
  .set-frame { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .set-nav { display: none; }
  .set-nav-phone { display: block; }
  .set-nav-phone .select { width: 100%; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ROLE-01: the rights grid */
.rg-wrap { overflow-x: auto; }
.rg-grid { width: 100%; table-layout: fixed; }
.rg-grid th:first-child { width: 34%; text-align: start; }
.rg-grid .rg-cell { text-align: center; }
.rg-grid thead .rg-cell { font-size: 12px; white-space: normal; line-height: 1.2; }
.rg-grid td.rg-cell input { width: 18px; height: 18px; margin: 0; cursor: pointer; }
.rg-grid td.rg-none { text-align: center; color: var(--border-strong); }
.rg-special, .rg-branches { border: 0; border-top: 1px solid var(--border); padding: 10px 0 0; margin: 0; display: grid; gap: 6px; }
.rg-special legend, .rg-branches legend { font-weight: 600; padding: 0 0 4px; }
.rg-disc { max-width: 120px; }
.rg-branch-list { display: grid; gap: 4px; padding-inline-start: 22px; }
.rg-presets { flex-wrap: wrap; gap: 6px; align-items: center; }
@media (max-width: 480px) {
  .rg-grid th:first-child { width: 30%; font-size: 13px; }
  .rg-grid thead .rg-cell { font-size: 11px; }
}

/* SET-03: an account page inside the app keeps the app's page head; its own cards stay as they are. */
.acc-in-app .acc-card { max-width: 900px; }
/* DES-01a (design pass, base builder; owner 2026-11-13 "Go", docs/handoff/design-pass-2026-11-13.md): ONE look for the
   shared building blocks on every screen, in the website's tokens (design/site-theme.css, ADR-071) and the approved
   round-3 prototype (src/renderer/src/prototype/proto.css): the type scale (Arabic one step larger), 44 px controls,
   one radius for controls (8 px) and one for cards, tables and dialogs (12 px), the 4/8 spacing grid, one button /
   field / page header / table / pill / dialog / error box / empty state / loading skeleton.
   Rules of this file:
   - NexFix look only, screen only: under data-brand="equipmart" nothing here applies (THM-03), and paper never sees it
     (THM-05: printouts keep their own fixed look).
   - Every rule starts with :where(…) (and excludes with :not(:where(…))), so it is exactly as specific as the
     styles.css default it replaces (.btn, .input, table.data th …) and wins over it only by coming later; a screen's own,
     more specific rule (cash.css, look-v3-daily.css, an area builder's look-des-*.css) still wins where it says
     something different. This file only lifts the defaults that styles.css set for the old 32 px look.
   - Imported in main.tsx after the other shared stylesheets and before the area builders' files.
   - Colours: variables only (look-v3.css / styles.css; the website's gold is in styles.css), no hex here. */

@media screen {
  /* ---- tokens: the website's type scale and control sizes (proto.css :root) */
  :root:not([data-brand='equipmart']) {
    --ctl: 44px; /* buttons, fields, tabs */
    --ctl-sm: 36px; /* small buttons */
    --fs-display: 28px; --fs-title: 22px; --fs-heading: 18px; --fs-body: 16px; --fs-small: 14px; --fs-tiny: 12px;
    --radius-card: 12px;
    --shadow: 0 8px 24px rgb(0 0 0 / 0.12);
  }
  :root:not([data-brand='equipmart'])[lang='ar'] {
    --fs-display: 30px; --fs-title: 24px; --fs-heading: 19px; --fs-body: 17px; --fs-small: 15px; --fs-tiny: 13px;
  }
  :root:not([data-brand='equipmart'])[data-theme='dark'] {
    --shadow: 0 8px 24px rgb(0 0 0 / 0.5);
  }

  /* ---- type: the page text at the small step (dense lists), headings on the scale */
  :where(:root:not([data-brand='equipmart'])) body { font-size: var(--fs-small); }
  :where(:root:not([data-brand='equipmart'])[lang='ar']) body { line-height: 1.6; }
  :where(:root:not([data-brand='equipmart'])) h1 { font-size: var(--fs-title); font-weight: 700; letter-spacing: -0.01em; line-height: 1.35; }
  :where(:root:not([data-brand='equipmart'])) h2 { font-size: var(--fs-heading); font-weight: 600; line-height: 1.4; }
  :where(:root:not([data-brand='equipmart'])) h3 { font-size: var(--fs-body); font-weight: 600; }

  /* ---- page header: title, then the actions at the end (right in English, left in Arabic), 8 px apart */
  :where(:root:not([data-brand='equipmart'])) .page-head { gap: 8px 12px; margin-bottom: 16px; min-height: var(--ctl); }

  /* ---- buttons: words, 44 px, 8 px corners; one primary (brand green) per screen, the others outlined */
  :where(:root:not([data-brand='equipmart'])) .btn {
    min-height: var(--ctl); height: auto; padding: 0 16px; justify-content: center; gap: 6px;
    font-size: var(--fs-small); font-weight: 600; line-height: 1.2; color: var(--text);
  }
  :where(:root:not([data-brand='equipmart'])) .btn.primary { color: var(--on-primary); }
  :where(:root:not([data-brand='equipmart'])) .btn.danger { background: var(--surface); }
  :where(:root:not([data-brand='equipmart'])) .btn.danger-solid { color: var(--on-danger); }
  :where(:root:not([data-brand='equipmart'])) .btn.small { min-height: var(--ctl-sm); padding: 0 12px; }
  :where(:root:not([data-brand='equipmart'])) .btn.big { min-height: 48px; padding: 0 24px; font-size: var(--fs-body); }
  /* A row's own buttons stay compact inside a table on a desktop (the phone keeps 44 px: look-v3-daily.css). */
  :where(:root:not([data-brand='equipmart'])) :is(table.data, .reg-table) .btn.small { min-height: 32px; }
  /* A key hint (F4, Ctrl+S, Ctrl K): the text in full colour (AA on the green button and in the search box), only its
     frame quieter. */
  :where(:root:not([data-brand='equipmart'])) .kbd { opacity: 1; border-color: color-mix(in oklab, currentColor 45%, transparent); font-weight: 500; }
  /* An icon-only button (the dialog's close): a 40 px square, no frame, the icon in the muted colour. */
  :where(:root:not([data-brand='equipmart'])) .ib-x { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; padding: 0;
    border: 0; border-radius: var(--radius); background: none; color: var(--muted); cursor: pointer; }
  :where(:root:not([data-brand='equipmart'])) .ib-x:hover { background: var(--surface-2); color: var(--text); }
  :where(:root:not([data-brand='equipmart'])) .ib-x:focus-visible { outline: 2px solid var(--chrome-focus); outline-offset: 1px; }

  /* ---- fields: label above (14 px, semibold), a 44 px box, 16 px text (17 px Arabic); line grids keep their cells */
  :where(:root:not([data-brand='equipmart'])) .field { gap: 6px; }
  :where(:root:not([data-brand='equipmart'])) .field > span:first-child { font-size: var(--fs-small); font-weight: 600; color: var(--text-2); }
  :where(:root:not([data-brand='equipmart'])) :is(.input, .select):not(:where(textarea, table *, .pbox-modal *, .palette *)) {
    min-height: var(--ctl); height: auto; padding-inline: 12px; font-size: var(--fs-body);
  }
  :where(:root:not([data-brand='equipmart'])) .textarea { padding: 10px 12px; font-size: var(--fs-body); }
  :where(:root:not([data-brand='equipmart'])) .field-error { font-size: var(--fs-small); margin-top: 0; }
  :where(:root:not([data-brand='equipmart'])) :is(input[type='checkbox'], input[type='radio']) { accent-color: var(--primary); }
  :where(:root:not([data-brand='equipmart'])) .check { min-height: 32px; gap: 8px; }
  :where(:root:not([data-brand='equipmart'])) .check input[type='checkbox'] { width: 18px; height: 18px; margin: 0; }
  :where(:root:not([data-brand='equipmart'])) .filters { gap: 12px; margin-bottom: 16px; }

  /* ---- tabs (Tabs and the register's view tabs): 44 px, the open one in the text colour on a green line */
  :where(:root:not([data-brand='equipmart'])) .tab { min-height: var(--ctl); padding: 0 16px; font-size: var(--fs-small); font-weight: 500; color: var(--text-2); }
  :where(:root:not([data-brand='equipmart'])) .tab.on { color: var(--text); font-weight: 600; border-bottom-color: var(--primary); }
  :where(:root:not([data-brand='equipmart'])) .reg-tab { min-block-size: var(--ctl); display: inline-flex; align-items: center; padding: 0 16px; font-size: var(--fs-small); font-weight: 500; }
  :where(:root:not([data-brand='equipmart'])) .reg-tab.on { font-weight: 600; }

  /* ---- filter chips (period presets, the register's Period / + Filter / a set filter): one look, 36 px, 8 px corners */
  :where(:root:not([data-brand='equipmart'])) :is(.chip:not(.static), .reg-period, .reg-add-filter, .reg-chip) {
    min-block-size: var(--ctl-sm); border-radius: var(--radius); font-size: var(--fs-small);
  }
  :where(:root:not([data-brand='equipmart'])) .chip:not(.static) { display: inline-flex; align-items: center; padding: 0 12px;
    background: var(--surface); border-color: var(--border-strong); color: var(--text-2); }
  :where(:root:not([data-brand='equipmart'])) .chip:not(.static):hover { background: var(--surface-2); color: var(--text); }
  :where(:root:not([data-brand='equipmart'])) .chip.neg { background: var(--danger-soft); border-color: var(--danger-line); color: var(--danger); }
  :where(:root:not([data-brand='equipmart'])) :is(.reg-period, .reg-add-filter) { padding: 0 12px; }
  :where(:root:not([data-brand='equipmart'])) .reg-chip button { font-size: var(--fs-small); }
  :where(:root:not([data-brand='equipmart'])) .presets { gap: 8px; }

  /* ---- the table (the register framework's look, for every table.data): white card with 12 px corners, 40 px rows,
     small text, headings at the tiny step in the muted colour. A document's line grid (.doc-grid, .rg-grid) keeps its
     own cell sizes (look-v3-daily.css). */
  :where(:root:not([data-brand='equipmart'])) .table-wrap { border-radius: var(--radius-card); }
  :where(:root:not([data-brand='equipmart'])) .table-wrap:focus-visible { outline: 2px solid var(--chrome-focus); outline-offset: 2px; }
  :where(:root:not([data-brand='equipmart'])) table.data { font-size: var(--fs-small); }
  :where(:root:not([data-brand='equipmart'])) table.data :is(th, td):not(:where(.doc-grid *, .rg-grid *)) { padding: 6px 12px; height: 40px; }
  :where(:root:not([data-brand='equipmart'])) table.data th { font-size: var(--fs-tiny); font-weight: 600; color: var(--muted); }
  :where(:root:not([data-brand='equipmart'])) table.data :is(tfoot td, tr.subtotal td, tr.section td) { color: var(--text); }
  :where(:root:not([data-brand='equipmart'])) table.data tfoot th { font-size: var(--fs-small); color: var(--text); }

  /* ---- status: the shared pills (StatusBadge's .badge and the lists' .pill are one shape) */
  :where(:root:not([data-brand='equipmart'])) :is(.badge, .pill) {
    display: inline-flex; align-items: center; min-height: 22px; padding: 0 10px; border-radius: 999px;
    font-size: var(--fs-tiny); font-weight: 600; line-height: 1.5; white-space: nowrap; vertical-align: middle;
  }

  /* A draft is not a problem: neutral, not amber (StatusBadge; the lists' pills already say grey). */
  :where(:root:not([data-brand='equipmart'])) .badge.draft { background: var(--row-section); color: var(--text-2); }
  /* A two-way switch inside a field (discount % / ﷼, the adjustment's mode): the chosen side in the neutral selected
     look — green stays for the screen's one primary button. */
  :where(:root:not([data-brand='equipmart'])) .disc-toggle { border-radius: var(--radius); }
  :where(:root:not([data-brand='equipmart'])) .disc-toggle.used button.on { background: var(--surface); color: var(--text); font-weight: 700;
    box-shadow: inset 0 0 0 1.5px var(--text-2); }

  /* A segmented choice (two or three options in one frame: text size, Monthly / Yearly): .seg-choice with buttons;
     the chosen one (.on, aria-pressed or aria-checked) in the same neutral selected look as the discount toggle. */
  :where(:root:not([data-brand='equipmart'])) .seg-choice { display: inline-flex; flex-wrap: nowrap; border: 1px solid var(--border-strong);
    border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
  :where(:root:not([data-brand='equipmart'])) .seg-choice > button { all: unset; box-sizing: border-box; display: inline-flex; align-items: center;
    justify-content: center; min-height: var(--ctl); padding: 0 16px; cursor: pointer; font-size: var(--fs-small); font-weight: 500; color: var(--text-2); }
  :where(:root:not([data-brand='equipmart'])) .seg-choice > button + button { border-inline-start: 1px solid var(--border-strong); }
  :where(:root:not([data-brand='equipmart'])) .seg-choice > button:hover { color: var(--text); }
  :where(:root:not([data-brand='equipmart'])) .seg-choice > button:is(.on, [aria-pressed='true'], [aria-checked='true']) {
    background: var(--surface); color: var(--text); font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--text-2); }
  :where(:root:not([data-brand='equipmart'])) .seg-choice > button:focus-visible { outline: 2px solid var(--chrome-focus); outline-offset: -2px; }
  :where(:root:not([data-brand='equipmart'])) .seg-choice > button:disabled { cursor: default; opacity: 0.6; }

  /* ---- the error box (ErrorBox) and the other notices: 12 x 16 px, 8 px corners, small text */
  :where(:root:not([data-brand='equipmart'])) .alert { padding: 12px 16px; border-radius: var(--radius); font-size: var(--fs-small); line-height: 1.5; }
  :where(:root:not([data-brand='equipmart'])) .alert.error { font-weight: 500; }

  /* ---- dialogs (Modal): 12 px corners, the title at the heading step, 24 px sides, the close icon at the end */
  :where(:root:not([data-brand='equipmart'])) .modal { border-radius: var(--radius-card); box-shadow: 0 24px 60px rgb(0 0 0 / 0.22); }
  :where(:root:not([data-brand='equipmart'])) .modal-head { padding-block: 12px; padding-inline: 24px 12px; gap: 12px; min-height: 64px; }
  :where(:root:not([data-brand='equipmart'])) .modal-head h2 { font-size: var(--fs-heading); font-weight: 700; }
  :where(:root:not([data-brand='equipmart'])) .modal-body { padding: 20px 24px; }
  :where(:root:not([data-brand='equipmart'])) .modal-foot { padding: 16px 24px; gap: 8px; align-items: center; }

  /* ---- an empty list: the sentence and the next action, centred, the action as an outlined button (the screen's one
     green button stays in its header) — EmptyRow and the register's "no rows" alike */
  :where(:root:not([data-brand='equipmart'])) table.data tr.empty-row td { height: auto; padding: 32px 16px; border-bottom: 0; }
  :where(:root:not([data-brand='equipmart'])) table.data tbody tr.empty-row:hover { background: none; }
  :where(:root:not([data-brand='equipmart'])) .empty-state { flex-direction: column; align-items: center; justify-content: center; gap: 12px;
    text-align: center; font-size: var(--fs-body); color: var(--text-2); }
  :where(:root:not([data-brand='equipmart'])) .empty-state .linklike {
    display: inline-flex; align-items: center; min-height: var(--ctl); padding: 0 16px; border: 1px solid var(--border-strong);
    border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; font-size: var(--fs-small); font-weight: 600;
  }
  :where(:root:not([data-brand='equipmart'])) .empty-state .linklike:hover { background: var(--surface-2); }
  /* The register's totals line on a phone: several amounts wrap instead of running off the screen (Arabic, 375 px). */
  :where(:root:not([data-brand='equipmart'])) .reg-phone-total { flex-wrap: wrap; gap: 4px 12px; }
  :where(:root:not([data-brand='equipmart'])) .reg-phone-total > .num { white-space: normal; min-inline-size: 0; overflow-wrap: anywhere; }
  :where(:root:not([data-brand='equipmart'])) .reg-empty { margin: 0; padding: 32px 16px; text-align: center; font-size: var(--fs-body); color: var(--text-2); }

  /* ---- loading: one skeleton. While a screen's code arrives (App's .screen-wait) the page header and a table frame
     show in the surface tones — only after 300 ms, so a fast screen shows no flash. .skel is the same bar for a part of
     a screen (<Skeleton />). Still for people who ask for less motion (no shimmer at all: flat bars). */
  :where(:root:not([data-brand='equipmart'])) .screen-wait { opacity: 0; animation: des-show 0s linear 300ms forwards; }
  :where(:root:not([data-brand='equipmart'])) .screen-wait::before { content: ''; display: block; inline-size: min(280px, 60%); block-size: 28px;
    margin: 8px 0 24px; border-radius: var(--radius); background: var(--surface-2); }
  :where(:root:not([data-brand='equipmart'])) .screen-wait::after { content: ''; display: block; block-size: 321px; border: 1px solid var(--border);
    border-radius: var(--radius-card); background: repeating-linear-gradient(to bottom, var(--surface-2) 0 40px, var(--surface) 40px 80px); }
  :where(:root:not([data-brand='equipmart'])) .skel { display: flex; flex-direction: column; gap: 8px; }
  :where(:root:not([data-brand='equipmart'])) .skel > i { display: block; block-size: 16px; border-radius: var(--radius); background: var(--surface-2); }
  :where(:root:not([data-brand='equipmart'])) .skel > i:nth-child(3n + 2) { inline-size: 80%; }
  :where(:root:not([data-brand='equipmart'])) .skel > i:nth-child(3n) { inline-size: 60%; }
}
@keyframes des-show { to { opacity: 1; } }
@media screen and (max-width: 599px) {
  /* A plain table on a phone (usePhoneRows / <PhoneRows>, components.tsx): one block per row, "Column  value" lines. */
  :where(:root:not([data-brand='equipmart'])) table.data[data-phone-rows] :is(thead) { display: none; }
  :where(:root:not([data-brand='equipmart'])) table.data[data-phone-rows] :is(tbody, tfoot, tr) { display: block; }
  :where(:root:not([data-brand='equipmart'])) table.data[data-phone-rows] { display: block; inline-size: 100%; }
  :where(:root:not([data-brand='equipmart'])) table.data[data-phone-rows] tr { padding: 8px 12px; border-bottom: 1px solid var(--border); }
  :where(:root:not([data-brand='equipmart'])) table.data[data-phone-rows] :is(td, th) { display: flex; justify-content: space-between; align-items: baseline;
    gap: 12px; height: auto; padding: 2px 0; border: 0; text-align: end; white-space: normal; }
  :where(:root:not([data-brand='equipmart'])) table.data[data-phone-rows] :is(td, th)[data-label]::before { content: attr(data-label); flex: none;
    max-inline-size: 50%; color: var(--muted); font-size: var(--fs-tiny); font-weight: 600; text-align: start; }
  :where(:root:not([data-brand='equipmart'])) table.data[data-phone-rows] :is(td, th)[data-label='']::before { content: none; }
  :where(:root:not([data-brand='equipmart'])) table.data[data-phone-rows] :is(td, th):empty { display: none; }
  :where(:root:not([data-brand='equipmart'])) table.data[data-phone-rows] :is(td, th).num { direction: inherit; }
  :where(:root:not([data-brand='equipmart'])) table.data[data-phone-rows] tfoot tr { background: var(--surface-2); font-weight: 600; }
  :where(:root:not([data-brand='equipmart'])) .modal-head { padding-inline: 16px 8px; }
  :where(:root:not([data-brand='equipmart'])) :is(.modal-body, .modal-foot) { padding-inline: 16px; }
}
/* DES-01b (design pass, area A "Selling", docs/handoff/design-pass-2026-11-13.md): screen-specific fixes for the shell,
   Home, the selling screens and the Cash place. Colours only from the tokens; shared building blocks are the base
   builder's (styles.css, look-v3*.css, look-views.css, components.tsx). Findings F1… in docs/handoff/design-sell-progress.md. */
@media screen {
  /* F1: one primary per screen — the top bar's New invoice is the primary only where the screen has none of its own;
     beside a screen's own primary (New customer, Collect payment, Take payment, Print receipt …) it is outlined. */
  .shell:has(> .shell-body .content .btn.primary) .toolbar > .btn.primary.tb-new {
    background: transparent; border-color: var(--chrome-line); color: var(--chrome-strong);
  }
  .shell:has(> .shell-body .content .btn.primary) .toolbar > .btn.primary.tb-new:hover:not(:disabled) { background: var(--chrome-field); }

  /* F5: the top bar search's key hint (Ctrl K) in the search text's own colour (axe: 2.9:1 → AA). */
  .toolbar .topbar-search > .kbd { color: inherit; border-color: var(--chrome-line); opacity: 1; }
  /* …and on Home's big buttons (the shared .kbd is at 70 % opacity: 2.9:1 on the light buttons, less on the green). */
  .home-v3 .big-act .kbd { opacity: 1; }

  /* F2: the menu bar's and the person button's carets are the Lucide chevron (was the text ▾), one size, never mirrored. */
  .mb-btn .caret, .user-menu > .me .caret { display: inline-flex; align-items: center; font-size: 0; }
  .mb-btn .caret .ic, .user-menu > .me .caret .ic { width: 14px; height: 14px; }

  /* F4: the person menu = its settings (a group) and its items (role=menu) — two wrappers in the list's own column,
     so the layout is unchanged. */
  .user-menu-list > :is(.ud-settings, .ud-items) { display: flex; flex-direction: column; }
}

@media (max-width: 600px) {
  /* F13: the Cash place's head on a phone — the one primary across, the other actions two by two at equal width. */
  .cash > .page-head:has(> .btn) { display: grid; grid-template-columns: 1fr 1fr; }
  .cash > .page-head:has(> .btn) > :not(.btn) { grid-column: 1 / -1; }
  .cash > .page-head > .btn { justify-content: center; }
  .cash > .page-head > .btn.primary { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  /* F20: the salesman's Home — New invoice and New quotation one under the other on a phone, as every other role's big
     buttons (two side by side cut "New quotation" at 375 px). */
  .home-actions.two { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  /* F18: the Cashier's queue on a phone — each waiting invoice is a row (number, customer, waited · total, parts,
     salesman, Take payment), not a table cut at the screen's edge. Same cells, same order, same clicks and keys. */
  .cashier-table, .cashier-table tbody { display: block; width: 100%; }
  .cashier-table thead { display: none; }
  .cashier-table tbody > tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 8px; align-items: center; padding: 12px; border-bottom: 1px solid var(--border); }
  .cashier-table tbody > tr > td { display: block; padding: 0; border: 0; min-width: 0; }
  .cashier-table tbody > tr > td:nth-child(3) { grid-column: 1 / -1; grid-row: 2; }
  .cashier-table tbody > tr > td:nth-child(4) { grid-column: 1 / 3; grid-row: 3; color: var(--muted); font-size: 13px; }
  .cashier-table tbody > tr > td:nth-child(5) { grid-column: 3; grid-row: 1; font-size: 13px; }
  .cashier-table tbody > tr > td:nth-child(6) { grid-column: 1 / 3; grid-row: 4; font-weight: 600; }
  .cashier-table tbody > tr > td:nth-child(7) { grid-column: 3; grid-row: 3 / 5; }
  .cashier-table tbody > tr > td:nth-child(7) .btn { min-height: 44px; }
  .cashier-table tbody > tr > td[colspan] { grid-column: 1 / -1; }
}

@media screen {
  /* The shell's trail (screens without a page head): the separator is the Lucide chevron (was the text › / ‹). */
  .crumbs .crumb-sep { display: inline-flex; vertical-align: middle; margin: 0 4px; color: var(--muted); }
}

@media screen {
  /* Home's "Setting up the company": the step marks are Lucide (check / clock / circle, was ✓ ◷ ○), on the text's line. */
  .setup-list li > .setup-mark { display: inline-flex; flex: none; align-self: center; }
  .setup-list li.done > .setup-mark { color: var(--ok); }
}
/* DES-01c (design pass, area B — Stock & money; docs/handoff/design-pass-2026-11-13.md): screen-specific styles for parts, buying, stock, registers, reports, Daily report, Cash and bank book, accounting.
   Shared building blocks are changed only in look-des-base.css (the base builder). Imported last in main.tsx. */

@media screen {
  /* Goods receipts, shipments, the landed-cost sheet: the number cells line up under their right-aligned headings
     (table.data's `text-align: start` beat .pur-num), in the numbers' face. */
  table.data td.pur-num, table.data th.pur-num { text-align: end; font-family: var(--num); }
  /* Shipment: a long button ("Pay in USD — <supplier>") wraps inside the screen instead of running past its edge. */
  .pur-actions > .btn { max-width: 100%; white-space: normal; text-align: start; }
}
@media screen and (max-width: 700px) {
  /* Phone: every button and quantity box on the buying screens is a 44 px tap target (the primary already was). */
  .pur-actions > .btn, .pur-section .btn, .pur-table .pur-qty { min-height: 44px; }
  /* Stock adjustment: the ( + / − | Counted ) switch as a 44 px tap target. */
  .stock-adjust .disc-toggle.adj-mode button { min-height: 44px; }
}
/* DES-01d (design pass, area C — Setup; docs/handoff/design-pass-2026-11-13.md): screen-specific styles for Settings, people & roles, customisation, account pages, vendor area, import / export, print, devices.
   Shared building blocks are changed only in look-des-base.css (the base builder). Imported last in main.tsx.
   Findings F1… are listed in docs/handoff/design-setup-progress.md. Tokens only; NexFix look (not EquipMart), screen only. */

@media screen {
  /* F3: one page width for every Settings page (forms and lists alike) — no page narrower or wider than its neighbours. */
  :root:not([data-brand='equipmart']) .set-pane > * { max-width: 1040px; }
  :root:not([data-brand='equipmart']) .set-pane > .page-narrow { max-width: 1040px; }
  :root:not([data-brand='equipmart']) .set-pane .hint { font-size: var(--fs-small); margin-top: 4px; }

  /* F7: the chosen text size is a selected choice, not a second primary button (green = the one primary + the active
     menu item): the same neutral selected look as the shared discount toggle. */
  :root:not([data-brand='equipmart']) .fs-choice .btn.on { background: var(--surface); color: var(--text); font-weight: 700;
    box-shadow: inset 0 0 0 1.5px var(--text-2); border-color: var(--text-2); }
  :root:not([data-brand='equipmart']) .fs-choice { gap: 8px; flex-wrap: wrap; align-items: center; }

  /* F14: Move from another system — the folder picker as the app's own button (the input is hidden, the label opens it). */
  .lg-folder-btn { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; max-width: 100%; }
  .lg-folder-btn > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .lg-folder-input:focus-visible + .lg-folder-btn { outline: 2px solid var(--primary); outline-offset: 2px; }

  /* F12: the print designer's title stays on one line; its buttons wrap under it. */
  :root:not([data-brand='equipmart']) .pd > .page-head { flex-wrap: wrap; }
  :root:not([data-brand='equipmart']) .pd > .page-head h1 { white-space: nowrap; }

  /* F23: inside the account pages a button is as wide as its words (full width stays on the sign-in card). */
  .acc-main .acc-card .acc-wide, .acc-in-app .acc-card .acc-wide { width: auto; align-self: flex-start; }

  /* F22: the vendor overview's figures are one line of label + number (Home's pattern), not a row of tiles; a figure
     that needs attention is amber text with a dot, not an amber box. */
  .acc-tiles { display: flex; flex-wrap: wrap; gap: 8px 32px; padding: 4px 0 12px; border-bottom: 1px solid var(--border); }
  .acc-tiles > li { list-style: none; }
  .acc-tiles .acc-tile { flex-direction: row-reverse; justify-content: flex-end; align-items: baseline; gap: 8px; padding: 4px 0; border: 0;
    border-radius: 0; background: none; min-height: 44px; align-items: center; }
  .acc-tiles .acc-tile:hover { border: 0; text-decoration: underline; }
  .acc-tiles .acc-tile .muted { color: var(--text-2); }
  .acc-tiles .acc-tile-n { font-size: var(--fs-heading); font-weight: 700; font-variant-numeric: tabular-nums; }
  .acc-tiles .acc-tile.warn { background: none; border: 0; }
  .acc-tiles .acc-tile.warn .acc-tile-n { color: var(--warn); }
  .acc-tiles .acc-tile.warn::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); align-self: center; order: 3; }
}

/* F6: phone — the setup tables (People, Roles, Branches, Units, Categories, Lines …) become rows separated by rules, each
   cell a "label  value" line, as the register framework's lists do; nothing scrolls sideways. */
@media screen and (max-width: 600px) {
  table.data.set-rows thead { display: none; }
  table.data.set-rows, table.data.set-rows tbody, table.data.set-rows tr, table.data.set-rows td { display: block; width: 100%; }
  table.data.set-rows tr { padding: 8px 12px; border-bottom: 1px solid var(--border); }
  table.data.set-rows tr:last-child { border-bottom: 0; }
  table.data.set-rows td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 2px 0; border: 0;
    height: auto; min-height: 0; text-align: end; white-space: normal; }
  table.data.set-rows td[data-label]::before { content: attr(data-label); color: var(--text-2); font-size: var(--fs-small); text-align: start; flex: none; max-width: 50%; }
  table.data.set-rows td:first-child { font-weight: 600; font-size: var(--fs-body); }
  table.data.set-rows td:empty { display: none; }
  table.data.set-rows td.set-empty { display: block; text-align: center; padding: 16px 0; }
  table.data.set-rows tr.clickable { min-height: 44px; }
}
@media screen and (max-width: 600px) {
  table.data.set-rows td.set-empty { font-weight: 400; font-size: var(--fs-small); color: var(--text-2); }
}
