/* =====================================================================================
   RJ Laravel Admin (brand-006) · tokens-delta.css · final direction 4b·R (Frank, 2026-10-18)
   Load AFTER brand-005's phase-2/kit/tokens.css (as of 2026-10-18, pre-recolour). Only what differs is here;
   everything else is inherited by name. Source of truth: phase-1/final/src/tokens_delta.py (asserts against DTC).
   Section 3 PINS the navy family literally (equal to DTC today) so a later DTC recolour does not propagate.
   ===================================================================================== */

:root {

  /* ---------- 1 · Ground and selection ---------- */
  --background: 214 24% 94%;               /* #EDF0F4 */  /* was #FFFFFF · grey page ground; containers stay white (--card #FFFFFF inherited) */
  --muted: 225 25% 97%;               /* #F5F6F9 */  /* was #F4F5F8 · table head, wells, hover: one step off the grey ground */
  --border: 216 21% 91%;               /* #E2E6EC */  /* was #E4E7ED · hairlines tuned to the grey ground */
  --accent: 220 52% 94%;               /* #E9EEF8 */  /* was #EBEEF6 · selection / active filter: steel tint (2b) */
  --ring: 219 51% 35%;               /* #2C4B86 */  /* was #3F5FA6 · focus = steel (2b); no conflict with the exact DTC navy, which stays on sidebar + primary */
  --steel: #2C4B86;  /* new · NEW. Selection rail, focus, tape ticks, sorted column. Never the sidebar, never a primary action */
  --selected-row: #E9EEF8;  /* new · NEW. Selected table row ground */

  /* ---------- 1 · Density · compact (default, 2b ultra) ---------- */
  --text-body: 12.5px;  /* was 13px · 2b ultra body */
  --text-small: 11.5px;  /* was 12px · meta, table secondary */
  --text-page: 20px;  /* was 26px · page title at density */
  --text-btn: 13px;  /* was 13.5px · button label */
  --text-nav: 13px;  /* new · NEW name. Menu item (DTC draws its menu at 13.5px) */
  --row: 30px;  /* was 44px · table row: compact is the default */
  --row-th: 30px;  /* was 36px · table header row */
  --row-compact: 30px;  /* was 36px · kept equal to --row so DTC components that ask for compact get 30px */
  --control-h: 30px;  /* was 40px · button, input, select (desktop) */
  --control-h-sm: 26px;  /* was 34px · small button, row actions */
  --page-pad: 20px;  /* new · NEW name. Page gutter (DTC uses a 24px literal) */

  /* ---------- 1 · Shell ---------- */
  --topbar-h: 48px;  /* was 56px · white header; the HQ corner is the same height */
  --rail-w: 76px;  /* new · NEW. Collapsed rail, labelled (2b HQ Rail b form). Expanded stays --sidebar-w 232px (inherited) */
  --rail-item-w: 66px;  /* new · NEW. Rail item: icon over label */
  --rail-item-min-h: 48px;  /* new · NEW. Grows if a label wraps to its second line; never truncates */
  --text-rail: 10px;  /* new · NEW. Rail label (Archivo 500; 600 when active), up to 2 lines */
  --hq-corner-bg: #FFFFFF;  /* new · NEW. The white 'RJ HQ · Master admin' corner joining the header */
  --hq-corner-fg: #0E1729;  /* new · NEW. 'HQ' wordmark ink (= DTC navy, pinned) */
  --hq-corner-sub: #505A70;  /* new · NEW. 'Master admin' line (= --muted-foreground) */
  --brand-mark: #0E1729;  /* was linear-gradient(145deg,#EEF1F8,#CBD5EA) · the RJ tile sits on the WHITE corner, so it inverts to a navy tile */
  --brand-mark-foreground: #FAFAF8;  /* was #0E1729 · RJ initials on the navy tile */
  --e-brand-mark: none;  /* was 0 0 12px -4px rgba(150,175,225,.22) · no glow on the white corner */

  /* ---------- 1 · Tape measure (light touch) ---------- */
  --tape-color: var(--steel);  /* new · NEW. Ticks under the header + HQ corner, on the sorted column, on progress */
  --tape-minor: 8px;  /* new · NEW. Minor tick pitch */
  --tape-major: 80px;  /* new · NEW. Major tick pitch */
  --tape-h: 6px;  /* new · NEW. Major tick height (minor = 3px) */
  --tape-opacity: .55;  /* new · NEW. Kept quiet */

  /* ---------- 1 · Icons ---------- */
  --icon-stroke: 1.5;  /* new · NEW name. DTC's contract is 1.75 (comment only); lighter at density */

  /* ---------- 1 · Type · CJK ---------- */
  --font-cjk: 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei';  /* new · NEW. mainland staff; zh-Hans */
  --font-title: 'Archivo', var(--font-cjk), system-ui, sans-serif;  /* was 'Archivo', system-ui, sans-serif · Archivo first, CJK falls through to the CJK stack */
  --font-ui: 'IBM Plex Sans', var(--font-cjk), system-ui, sans-serif;  /* was 'IBM Plex Sans', system-ui, sans-serif · same for reading text */

  /* ---------- 3 · PINNED navy family: equal to DTC kit v3 today, restated so a DTC recolour cannot reach here ---------- */
  --primary: 220 49% 11%;               /* #0E1729 */  /* every primary action */
  --primary-foreground: 60 17% 98%;                /* #FAFAF8 */
  --primary-hover: 223 42% 18%;               /* #1A2540 */
  --secondary-foreground: 220 49% 11%;               /* #0E1729 */  /* outlined button text */
  --accent-foreground: 220 49% 11%;               /* #0E1729 */  /* text on selection */
  --foreground: 222 43% 10%;               /* #0F1626 */  /* navy-ink body text */
  --card-foreground: 222 43% 10%;               /* #0F1626 */
  --popover-foreground: 222 43% 10%;               /* #0F1626 */
  --sidebar: 220 49% 11%;               /* #0E1729 */  /* the expanded menu + rail */
  --sidebar-foreground: 222 19% 82%;               /* #C9CEDA */  /* menu text (--rj-mist) */
  --sidebar-primary: 221 54% 75%;               /* #9FB4E2 */  /* active rail + icon tint (2b's steel #8EA8DC is NOT used) */
  --sidebar-primary-foreground: 220 49% 11%;               /* #0E1729 */
  --sidebar-accent: 222 43% 19%;               /* #1B2744 */
  --sidebar-accent-foreground: 60 17% 98%;                /* #FAFAF8 */
  --sidebar-border: 222 33% 22%;               /* #253049 */
  --sidebar-ring: 221 54% 75%;               /* #9FB4E2 */
  --sidebar-sheen: linear-gradient(180deg, #131D33 0%, #0E1729 52%, #0C1425 100%);  /* the satin */
  --sidebar-sheen-light: radial-gradient(closest-side, rgba(130,160,220,.11), transparent);  /* the bloom */
  --e-sidebar-edge: inset -1px 0 0 rgba(201,206,218,.07);
  --sidebar-item-on: rgba(255,255,255,.07);  /* active item ground */
  --e-sidebar-item-on: inset 0 0 0 1px rgba(201,206,218,.09),0 6px 18px -12px rgba(110,140,210,.22);
  --sidebar-item-on-icon: #B7C7EA;  /* active icon (2b's #C4D2EE is NOT used) */
  --sidebar-background: var(--sidebar);
}

/* ---------- 2 · Density mode: comfortable (opt-in per person; compact is the default above) ---------- */
:root[data-density="comfortable"], [data-density="comfortable"] {
  --text-body: 13px;
  --text-small: 12px;
  --text-page: 20px;
  --row: 34px;
  --row-th: 32px;
  --row-compact: 34px;
  --control-h: 32px;
  --control-h-sm: 28px;
}
