/* Frontier Wellness tokens (brand manual, September 2026). The ONLY file with colour literals.
   v6 (11 Nov 2026): primary = deeper brand violet #5440C8 with WHITE text (7.1:1), hover #3D2C9E. Status meaning returns:
   green = delivered/approved/paid, red = cancelled/rejected/error. Everything else below still holds.
   v5 (10 Nov 2026, client): TWO colours only.
   - Primary = Digital Lavender family: #AE95FB fill (buttons, selected, chart highlight) with Deep Blue text on it
     (7.2:1, AAA), #7C5CE8 for icons / toggles / borders / focus (4.6:1, passes the 3:1 rule for UI graphics),
     #4A37B3 for small lavender text and links (8.4:1, AAA), washes #EDE8FE / #F6F3FF.
   - Secondary = Deep Blue #10172B (text, dark buttons, chart "sales" bars).
   - No green, no teal, no amber, no gradients on controls. Red #8C1C16 stays ONLY for errors and destructive actions
     (declined card, loss, delete) because people must not miss those.
   - Light theme only. */
@font-face { font-family: "Aspekta"; src: url("../fonts/aspekta-variable.woff2") format("woff2"); font-weight: 50 1000; font-display: swap; }
:root {
  /* ---- Brand primary (manual 4.1) ---- */
  --c-electric: #3b82f6;      /* Electric Blue: logo, graphics, focus, large type */
  --c-brand: #7c5ce8;         /* v5 lavender-strong: icons, toggles, progress, borders, focus (4.6:1 on white) */
  --c-pri: #5440c8;           /* v6 PRIMARY fill: brand violet deepened one step so WHITE text is AAA (7.1:1). Manual violet #6656DA is only 5.4:1 */
  --c-pri-h: #3d2c9e;         /* v6 primary hover: darker (white 10.2:1) */
  --c-pri-on: #ffffff;        /* text and icons on the primary fill */
  --c-brand-ink: #4a37b3;     /* v4: small brand TEXT and links (AAA 8.4:1 on white, 7.4:1 on lavender washes) */
  --c-brand-2: #2a3352;       /* v5: hover fill for Deep Blue buttons (white text 12:1) */
  --c-ink: #10172b;           /* Deep Blue: all text, nav, dark surfaces */
  --c-black: #0b1020;         /* Deep Blue, deepest: button hover fill */
  --c-deep: #0a0f1e;          /* dark sections (closing CTA) */
  --c-lavender: #a78bfa;      /* Digital Lavender: secondary accent, gradients */
  --c-violet: #4a37b3;        /* secondary violet, deepened for AAA text (8.4:1 on white) */
  --c-cloud: #e3e7f0;         /* Cloud Blue: quiet surfaces, skeletons */
  --c-white: #ffffff;

  /* ---- Tints (light washes of Electric Blue / Lavender) ---- */
  --c-tint-2: #c4b5fd;        /* lavender washes */
  --c-tint: #ede8fe;
  --c-tint-hi: #f6f3ff;
  --c-lav-2: #c4b5fd;
  --c-lav-hi: #f3effe;
  --c-sky: #8ee2fb;           /* secondary cyan (manual 4.2), highlights only */

  /* ---- States ---- */
  --c-ok: #4a37b3;            /* v5: done / approved / paid = deep lavender (no green). 8.4:1 on white, 7.0:1 on the wash */
  --c-rose: #e0605a;          /* secondary blush, deepened for icon contrast */
  --c-warn: #10172b;          /* v5: "needs you" = Deep Blue on a white chip with a lavender outline (no amber) */
  --c-err: #8c1c16;           /* AAA 9.2:1 on white */
  --c-good: #14532d;          /* v6: delivered / approved / paid (8:1 on its wash) */
  --c-good-bg: #e6f4ea; --c-good-line: #9fd3ae;
  --c-bad-bg: #fbecea; --c-bad-line: #ebb7b1;
  --c-low: #7a3f06;           /* v8: low stock text, soft orange (7.5:1 on its wash) */
  --c-low-bg: #fff3e4; --c-low-line: #f3cf9f;   /* v8: low stock wash and border */
  --c-flag-red: #b22234; --c-flag-blue: #3c3b6e; --c-flag-white: #ffffff;

  /* ---- Surfaces ---- */
  --c-bg: #f5f7fb;
  --c-bg-2: #eceff6;
  --c-surface: #ffffff;
  --c-ink-2: color-mix(in srgb, var(--c-ink) 85%, var(--c-white));   /* 10.5:1 on --c-bg (AAA) */
  --c-ink-3: color-mix(in srgb, var(--c-ink) 77%, var(--c-white));   /* 7.8:1 on --c-bg, 7.3:1 on --c-bg-2 (AAA small text) */
  --c-line: color-mix(in oklab, var(--c-ink) 8%, transparent);
  --c-line-2: color-mix(in oklab, var(--c-ink) 14%, transparent);
  --c-brand-08: color-mix(in oklab, var(--c-brand) 8%, transparent);
  --c-brand-14: color-mix(in oklab, var(--c-brand) 14%, transparent);
  --c-brand-30: color-mix(in oklab, var(--c-brand) 30%, transparent);
  --c-tint-30: color-mix(in oklab, var(--c-tint) 30%, transparent);
  --c-tint-60: color-mix(in oklab, var(--c-tint) 60%, transparent);
  --c-glass: color-mix(in oklab, var(--c-white) 58%, transparent);
  --c-glass-2: color-mix(in oklab, var(--c-white) 80%, transparent);
  --c-glass-line: color-mix(in oklab, var(--c-white) 80%, transparent);
  --c-scrim: color-mix(in oklab, var(--c-deep) 40%, transparent);
  --c-warn-bg: color-mix(in srgb, var(--c-warn) 8%, var(--c-white));

  /* ---- Gradients (manual 4.3) ---- */
  --g-brand: linear-gradient(90deg, var(--c-electric), var(--c-lavender));                  /* gradient 1 */
  /* v4 main gradient (manual 4.3 gradient 3): Deep Blue → Electric Blue → Lavender. Text only on the dark first half. */
  --g-cta: var(--c-pri);      /* v5: no gradients on controls; kept as aliases so nothing breaks */
  --g-nav: var(--c-tint);
  --g-bar: #8b6cf0;           /* chart highlight bars (3.8:1 on white) */
  --g-soft: linear-gradient(135deg, #f4f1fe 0%, #eef3fe 100%);
  --g-mark: linear-gradient(45deg, var(--c-ink) 0%, var(--c-electric) 52%, var(--c-lavender) 100%);
  --g-hero: radial-gradient(60% 70% at 78% 46%, var(--c-tint-hi) 0%, transparent 70%), radial-gradient(50% 60% at 8% 100%, var(--c-lav-hi) 0%, transparent 70%);
  --g-premium: radial-gradient(80% 120% at 0% 0%, color-mix(in oklab, var(--c-electric) 18%, var(--c-white)) 0%, transparent 60%),
               radial-gradient(70% 90% at 100% 100%, color-mix(in oklab, var(--c-lavender) 34%, var(--c-white)) 0%, transparent 65%),
               radial-gradient(60% 80% at 70% 0%, var(--c-lav-hi) 0%, transparent 70%),
               linear-gradient(160deg, var(--c-tint-hi), var(--c-bg) 60%, var(--c-lav-hi));
  --g-spec: linear-gradient(135deg, color-mix(in oklab, var(--c-white) 95%, transparent), color-mix(in oklab, var(--c-white) 25%, transparent) 40%, color-mix(in oklab, var(--c-white) 5%, transparent) 60%, color-mix(in oklab, var(--c-white) 70%, transparent));
  /* image placeholder: shown under every photo until it decodes (no blank boxes, no layout shift) */
  --g-skeleton: linear-gradient(160deg, var(--c-tint-hi), var(--c-cloud) 55%, var(--c-lav-hi));

  --font: "Aspekta", system-ui, sans-serif;
  --w-thin: 200; --w-light: 300; --w-reg: 400; --w-med: 500; --w-semi: 600;
  --fs-11: 0.6875rem; --fs-12: 0.75rem; --fs-13: 0.8125rem; --fs-14: 0.875rem; --fs-15: 0.9375rem; --fs-16: 1rem; --fs-18: 1.125rem;
  --fs-20: 1.25rem; --fs-24: 1.5rem; --fs-30: 1.875rem; --fs-36: 2.25rem; --fs-48: 3rem;
  --fs-h1: clamp(2.5rem, 0.9rem + 4.1vw, 4.6rem);
  --fs-h2: clamp(2.2rem, 1rem + 3.3vw, 4.25rem);
  --ls-display: -0.045em; --ls-tight: -0.02em; --ls-caps: 0.14em;

  --gutter: clamp(16px, 3.2vw, 48px);
  --container: 1320px;
  --section-y: clamp(72px, 6vw + 20px, 124px);

  --r-8: 8px; --r-12: 12px; --r-16: 16px; --r-20: 20px; --r-24: 24px; --r-28: 28px; --r-32: 32px; --r-pill: 999px;
  /* Very soft shadows only (tinted with Deep Blue) */
  --sh-1: none;
  --sh-2: 0 0 0 1px var(--c-line-2);
  --sh-3: 0 0 0 1px var(--c-line-2);
  --sh-glass: inset 0 0 0 1px var(--c-line);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-liquid: cubic-bezier(0.2, 1.25, 0.3, 1);
  --z-nav: 40; --z-menu: 50; --z-banner: 70; --z-splash: 90; --z-cursor: 100;
  --focus-ring: 0 0 0 2px var(--c-white), 0 0 0 4px var(--c-brand);
  color-scheme: light;
}
/* Large monitors (27" at 2560 px, and 1800 px+ windows): a wider container and one step larger type, so the layout
   fills the screen like it does on a 16" laptop instead of floating in the middle */
/* --ts = the user's text-size choice (Settings → Display, account menu A / A+ / A++). Every size is rem, so this scales all of it. */
html { font-size: calc(100% * var(--ts, 1)); }
@media (min-width: 1800px) { :root { --container: 1560px; --gutter: 56px; } html { font-size: calc(106.25% * var(--ts, 1)); } }
@media (min-width: 2300px) { :root { --container: 1760px; } html { font-size: calc(112.5% * var(--ts, 1)); } }

/* ===================== Portal (app) tokens — added for the signed-in product =====================
   Same brand system as the landing. App density: H1 28–32, body 14–15 (rulebook R-UI-04). */
:root {
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;  /* IDs, SKUs, lots, NPI, tracking */
  --side-w: 256px; --rail-w: 84px; --top-h: 72px; --bnav-h: 64px;
  --page-max: 1480px; --page-x: clamp(16px, 2.4vw, 36px);
  --tile-r: 22px; --tile-p: clamp(16px, 1.5vw, 22px); --gap: clamp(12px, 1.2vw, 18px);
  --row-h: 56px;
  /* status palette (R-UI-09: one mapping across the product) */
  --st-ok: var(--c-ok);      --st-ok-bg: var(--c-tint);
  --st-info: var(--c-ink);   --st-info-bg: var(--c-cloud);
  --st-wait: var(--c-ink);   --st-wait-bg: var(--c-white);
  --st-err: var(--c-err);    --st-err-bg: color-mix(in srgb, var(--c-err) 7%, var(--c-white));
  --st-lav: var(--c-violet); --st-lav-bg: var(--c-lav-hi);
  --st-mute: var(--c-ink-2); --st-mute-bg: var(--c-bg-2);
  --c-hover: var(--c-tint-hi);
  --c-sel: var(--c-tint);
  --z-side: 30; --z-top: 25; --z-pop: 60; --z-modal: 80; --z-toast: 95; --z-lab: 96;
}
@media (min-width: 1800px) { :root { --page-max: 1640px; } }

/* ---------- v8 scales (generated by source/tools/tokenize.py; values equal the old literals) ---------- */
:root {
  /* spacing scale: use these for padding, margin, gap and offsets. Prefer the even 4/8-px steps for new work. */
  --sp-1: 1px;
  --sp-2: 2px;
  --sp-3: 3px;
  --sp-4: 4px;
  --sp-5: 5px;
  --sp-6: 6px;
  --sp-7: 7px;
  --sp-8: 8px;
  --sp-9: 9px;
  --sp-10: 10px;
  --sp-11: 11px;
  --sp-12: 12px;
  --sp-13: 13px;
  --sp-14: 14px;
  --sp-16: 16px;
  --sp-17: 17px;
  --sp-18: 18px;
  --sp-19: 19px;
  --sp-20: 20px;
  --sp-22: 22px;
  --sp-24: 24px;
  --sp-26: 26px;
  --sp-28: 28px;
  --sp-30: 30px;
  --sp-32: 32px;
  --sp-34: 34px;
  --sp-36: 36px;
  --sp-40: 40px;
  --sp-42: 42px;
  --sp-44: 44px;
  --sp-46: 46px;
  --sp-48: 48px;
  --sp-52: 52px;
  --sp-54: 54px;
  --sp-56: 56px;
  --sp-58: 58px;
  --sp-60: 60px;
  --sp-64: 64px;
  --sp-68: 68px;
  --sp-70: 70px;
  --sp-72: 72px;
  --sp-80: 80px;
  --sp-84: 84px;
  --sp-136: 136px;
  /* icon sizes */
  --ic-12: 12px;
  --ic-13: 13px;
  --ic-14: 14px;
  --ic-15: 15px;
  --ic-16: 16px;
  --ic-17: 17px;
  --ic-18: 18px;
  --ic-19: 19px;
  --ic-20: 20px;
  --ic-21: 21px;
  --ic-22: 22px;
  --ic-24: 24px;
  --ic-26: 26px;
  --ic-27: 27px;
  --ic-28: 28px;
  --ic-31: 31px;
  --ic-32: 32px;
  --ic-40: 40px;
  /* legacy colours moved out of older layers (lab, v3, provider). Do not use for new work. */
  --c-x-000000: #000000;
  --c-x-0a1432: #0a1432;
  --c-x-781414: #781414;
  --c-x-f6f8fa: #f6f8fa;
  --c-x-050810: #050810;
  --c-x-0b1a33: #0b1a33;
  --c-x-151b2e: #151b2e;
  --c-x-1b2440: #1b2440;
  --c-x-1e3a8a: #1e3a8a;
  --c-x-232a40: #232a40;
  --c-x-23304d: #23304d;
  --c-x-2a3350: #2a3350;
  --c-x-3b2a5c: #3b2a5c;
  --c-x-3d4559: #3d4559;
  --c-x-4a5168: #4a5168;
  --c-x-4a5266: #4a5266;
  --c-x-5b6276: #5b6276;
  --c-x-5b627a: #5b627a;
  --c-x-6656da: #6656da;
  --c-x-6ee7d8: #6ee7d8;
  --c-x-b3261e: #b3261e;
  --c-x-d9f0f1: #d9f0f1;
  --c-x-dbe7fe: #dbe7fe;
  --c-x-dcdcdc: #dcdcdc;
  --c-x-ddd3fd: #ddd3fd;
  --c-x-dfe3ee: #dfe3ee;
  --c-x-dff2fa: #dff2fa;
  --c-x-e3e6ef: #e3e6ef;
  --c-x-e9edf2: #e9edf2;
  --c-x-e9edf5: #e9edf5;
  --c-x-ece7fe: #ece7fe;
  --c-x-eef1f4: #eef1f4;
  --c-x-f1f3f8: #f1f3f8;
  --c-x-f4f1fe: #f4f1fe;
  --c-x-f4f6f8: #f4f6f8;
  --c-x-f4f6fb: #f4f6fb;
  --c-x-fde8e6: #fde8e6;
  --c-x-fdf1dc: #fdf1dc;
  --c-x-ff8a80: #ff8a80;
}
