/* ============================================================================
   Portal Design Tokens — single source of truth
   ============================================================================
   Anything outside this file that hard-codes a color, font-size, spacing,
   or radius is a lint error. Components and pages reference var(--…) only.
   See docs/UI_AUDIT_2026.md §4.1 for the full rationale.
   ============================================================================ */

:root {
  /* ── Palette: brand */
  --sagez-blue:         #1a6b8a;
  --sagez-blue-dark:    #0d4a5f;
  --sagez-blue-mid:     #1a8baf;
  --sagez-blue-light:   #e0f2f8;
  --sagez-orange:       #e8a849;
  --sagez-orange-dark:  #c8891e;
  --sagez-teal:         #1d8a7e;

  /* ── Palette: semantic surface / text / line */
  --bg:                 #f4f6f8;     /* page */
  --surface:            #ffffff;     /* cards */
  --surface-2:          #fafbfc;     /* table headers, inset wells */
  --panel:              #ffffff;     /* alias of surface, kept for back-compat */
  --line:               #d6e4ed;     /* default border */
  --line-strong:        #b9cdda;     /* divider, focus borders */
  --text:               #1c2e38;     /* body */
  --text-muted:         #567080;
  --muted:              #567080;     /* alias of text-muted, back-compat */
  --text-subtle:        #8aa3b1;

  /* ── Palette: status */
  --primary:            #1a6b8a;
  --primary-hover:      #15577a;
  --primary-dark:       #0d4a5f;
  --primary-fg:         #ffffff;
  --accent:             #e8a849;
  --good:               #1a8a4e;
  --warn:               #d08f2e;
  --bad:                #cc4d51;
  --info:               #1a8baf;

  /* ── Sidebar (kept distinct because it lives on a dark surface) */
  --sidebar:            #0c3347;
  --sidebar-text:       #d4eaf5;
  --sidebar-muted:      #6fa8c2;

  /* ── Spacing — 5-step scale */
  --space-1:  4px;
  --space-2:  8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;

  /* ── Radius — 3-step scale */
  --radius-sm:  4px;
  --radius-md:  6px;
  --radius-lg: 10px;

  /* ── Elevation */
  --shadow-sm: 0 1px 2px rgba(13, 45, 65, .06);
  --shadow-md: 0 2px 8px rgba(13, 45, 65, .10);
  --shadow-lg: 0 6px 16px rgba(13, 45, 65, .14);

  /* ── Typography — 5-step scale */
  --font-xs: 11px;
  --font-sm: 12px;
  --font-md: 13px;
  --font-lg: 16px;
  --font-xl: 22px;
  --line-height-tight:  1.25;
  --line-height-normal: 1.45;

  /* ── Form control sizes */
  --field-h:    32px;
  --field-h-lg: 38px;
  --btn-h-sm:   26px;
  --btn-h-md:   32px;
  --btn-h-lg:   38px;

  /* ── Z-index scale */
  --z-toast:    900;
  --z-modal:   1000;
  --z-tooltip: 1100;

  /* ── Legacy aliases (kept until migration sweeps them out) ─────────────── */
  --shell-bg:     #1a4f6b;
  --hover:        rgba(26, 107, 138, .08);
  --hover-bg:     rgba(26, 107, 138, .08);
  --bg-subtle:    #fafbfc;
  --border:       #d6e4ed;
  --border-color: #d6e4ed;
  --card-bg:      #ffffff;
  --input-bg:     #ffffff;
  --input-border: #d6e4ed;
  --primary-bg:   #1a6b8a;
  --primary-tint: rgba(26, 107, 138, .12);
  --accent-light:  #f6deb6;
  --accent-subtle: #fcf2dd;
  --accent-border: #e8a849;
  --text-main:      #1c2e38;
  --text-secondary: #567080;
}
