/* ==========================================================================
   DIGITZ UI — classic frontend · theme digitz-classic-theme · tokens.css
   Defines every semantic token in the frontend token contract
   (digitz_ui/frontend/TECHNICAL.md). Palette ramps below are private to this theme.
   --------------------------------------------------------------------------
   The colour system is derived from the logo, which is fixed:
     logo blue  #002BA6   logo amber  #FEA303
   This theme replaces the UI blue with petrol teal #0E7490: the same cool family as the
   logo, so the two sit together, but a clearly different hue, so it never reads as a
   near-miss of the logo blue. Teal carries the brand: primary actions, the active state, links and the
   sign-in panel. Amber is the accent and is used sparingly: the active-nav
   marker, the brand rule and one highlight per screen. It never fills a
   button that carries white text, because white on amber fails contrast.
   Everything else is a cool slate neutral, so the two brand colours stay
   the only saturated colours on screen. That restraint is what gives the
   UI its corporate feel.
   ========================================================================== */

:root {
  /* ---- Brand ramps -------------------------------------------------- */
  --teal-25:  #F3FAFB;
  --teal-50:  #E7F4F7;
  --teal-100: #CBE8EF;
  --teal-200: #98D0DD;
  --teal-300: #5DB3C7;
  --teal-400: #2896B0;
  --teal-500: #0E82A0;   /* chart series (sales), focus ring */
  --teal-600: #0E7490;   /* petrol teal · primary */
  --teal-700: #0B5F76;
  --teal-800: #094E61;
  --teal-900: #0A2E3A;   /* deep teal ink: text on amber and green */
  --teal-950: #061E27;

  --amber-50:  #FFF7E8;
  --amber-100: #FFEBC4;
  --amber-200: #FFD889;
  --amber-400: #FEB539;
  --amber-500: #FEA303;  /* = logo amber · accent */
  --amber-600: #D98A00;  /* chart series 2 */
  --amber-700: #A66A00;  /* amber text on light surfaces */
  --amber-800: #7A4E00;

  /* ---- Neutrals (cool slate) ---------------------------------------- */
  --n-0:   #FFFFFF;
  --n-25:  #FAFBFD;
  --n-50:  #F4F6FA;
  --n-100: #ECEFF5;
  --n-200: #DFE3EC;
  --n-300: #C7CEDB;
  --n-400: #9AA3B6;
  --n-500: #6B7489;
  --n-600: #4D5569;
  --n-700: #353C4F;
  --n-800: #1F2537;
  --n-900: #121726;

  /* ---- Green: money in and growth. Yellow-leaning so it reads
     clearly apart from teal. #3DB54A is the vivid fill; it takes deep teal ink (5.4:1),
     never white (2.7:1).
     #2E9A3B is for icons and chart marks on white. #1A7F37 is green text on white (5.7:1). */
  --green-50:  #EDF8EE;
  --green-100: #D3EFD6;
  --green-200: #A8DEAF;
  --green-400: #5CC468;
  --green-500: #3DB54A;
  --green-600: #2E9A3B;
  --green-700: #1A7F37;
  --green-800: #14652B;

  /* ---- Status (reserved: never reused as a series colour) -----------
     Success shares the brand green family, so "green" means "good" everywhere. */
  --success-600: #1A7F37; --success-50: #EDF8EE; --success-200: #A8DEAF;
  --warning-700: #A66A00; --warning-50: #FFF7E8; --warning-200: #FFD889;
  --danger-600:  #C2302C; --danger-50:  #FCEBEA; --danger-200:  #F2B8B5;
  --info-600:    #0E7490; --info-50:    #E7F4F7; --info-200:    #98D0DD;

  /* ---- Semantic tokens: the only names that components use ---------- */
  /* Petrol teal #0E7490 and amber #FEB539 are the prominent colours, set on white.
     Teal carries white text (5.4:1). Amber never carries white text (1.8:1): it takes
     --accent-ink (8.1:1), and amber-coloured text on white uses --accent-text (5.9:1). */
  --bg:            #F6FAFB;
  --tint:          #EEF7F9;   /* pale teal that ties white areas to the teal */
  --surface:       var(--n-0);
  --surface-sunk:  var(--n-25);
  --surface-hover: var(--n-50);
  --line:          var(--n-200);
  --line-soft:     var(--n-100);
  --line-strong:   var(--n-300);

  --text:          var(--n-900);
  --text-2:        var(--n-600);
  --text-3:        var(--n-500);
  --text-inverse:  #FFFFFF;

  --primary:       #0E7490;
  --primary-hover: #0B5F76;
  --primary-press: #094E61;
  /* A brighter partner gives the teal light-to-dark movement.
     #0F7F9C is the brightest teal that carries white text (4.6:1).
     #1BA3C2 (3.8:1) is used only as glow, never behind text. */
  --primary-bright: #0F7F9C;
  --primary-glow:   #1BA3C2;
  --grad-bar:   linear-gradient(100deg, #0E7490 0%, #0E7A96 55%, #0F7F9C 100%);
  --grad-panel: radial-gradient(120% 90% at 0% 0%, rgba(27,163,194,.9) 0%, transparent 55%),
                linear-gradient(150deg, #0F7F9C 0%, #0E7490 50%, #0B5F76 100%);
  --grad-btn:   linear-gradient(180deg, #0F7F9C 0%, #0E7490 100%);
  --primary-soft:  var(--teal-50);
  --primary-line:  var(--teal-200);
  --accent:        #FEB539;
  --accent-hover:  #FEA303;
  --accent-soft:   #FFF4DC;
  --accent-text:   #8A5A00;
  --accent-ink:    var(--teal-900);
  --green:         var(--green-500);
  --green-icon:    var(--green-600);
  --green-text:    var(--green-700);
  --green-soft:    var(--green-50);
  --brand-ink:     var(--primary);

  --focus: 0 0 0 3px rgba(14, 116, 144, .28);

  /* ---- Type --------------------------------------------------------- */
  /* Saira is a variable font with a width axis. Its squared, flat-sided letters echo the
     logo's wordmark. Headings and figures use the wider cuts, the way the logo does, while
     body text stays at normal width so dense forms and tables remain easy to read. */
  --font-ui:      "Saira", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Saira", system-ui, sans-serif;
  --stretch-display: expanded;       /* 125%: page titles, big figures, brand lines */
  --stretch-heading: semi-expanded;  /* 112.5%: card and section headings */
  --font-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --fs-xs: 11px; --fs-sm: 12.5px; --fs-base: 13.5px; --fs-md: 15px;
  --fs-lg: 18px; --fs-xl: 22px;  --fs-2xl: 28px;   --fs-3xl: 36px;

  /* ---- Shape & depth ------------------------------------------------ */
  --r-xs: 4px; --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-md: 0 6px 16px -4px rgba(16, 24, 40, .08), 0 2px 4px -2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 20px 40px -12px rgba(10, 46, 58, .18);

  /* ---- Layout ------------------------------------------------------- */
  --sidebar-w: 256px;
  --topbar-h: 60px;
  --pinbar-h: 46px;
  --content-max: 1440px;

  /* ---- Semantic tokens added for the shared base.css (token contract) --- */
  --fill-muted:         var(--n-100);
  --line-hover:         var(--n-400);
  --fill-muted-text:    var(--n-700);
  --primary-ring:       var(--teal-100);
  --accent-soft-hover:  var(--amber-100);
  --accent-line:        var(--amber-200);
  --accent-tint:        var(--amber-50);
  --green-line:         var(--green-100);
  --focus-border:       var(--teal-500);
  --row-hover:          var(--teal-25);
  --tooltip-bg:         var(--teal-950);
  --avatar-bg:          var(--teal-100);
  --avatar-text:        var(--teal-800);
  --warning-dot:        var(--amber-500);
  --pin-active-glow:    rgba(14, 116, 144, .35);
  --feature-positive:   #C6F3CC;
  --grad-feature: linear-gradient(150deg, #0E7490 0%, #0B5F76 100%);
  --grad-auth:
      radial-gradient(900px 520px at 110% 110%, rgba(254, 181, 57, .28), transparent 60%),
      radial-gradient(600px 380px at -15% 120%, rgba(61, 181, 74, .22), transparent 60%),
      radial-gradient(800px 600px at -10% -20%, rgba(27, 163, 194, .95), transparent 60%),
      linear-gradient(150deg, #0F7F9C 0%, #0E7490 45%, #0B5F76 100%);
  --auth-positive:      var(--green-400);

  /* Module tones (data-tone="primary" | "accent" | "positive") */
  --tone-primary:       var(--primary);
  --tone-accent:        #C98000;
  --tone-positive:      var(--green-icon);

  /* Chart series, in validated order (see README → Charts) */
  --chart-1:            var(--amber-600);
  --chart-2:            var(--teal-500);
  --chart-3:            var(--green-500);
}
