/* SINGLE SOURCE OF TRUTH for design tokens. Loaded by index.html (blocking) before first paint;
   src/index.css only maps these onto Tailwind/shadcn names. Contrast: reports/crm-design-contrast.md */
:root {
  --bg: #F7F8FA;
  --surface: #FFFFFF;
  --border: #E3E6EB;
  --text: #1F2933;
  --text-muted: #5B6472;
  --accent: #2F6FEB;
  --accent-hover: #2559C4;
  --accent-soft: #E8F0FE;
  --success: #1F9D55;  --success-soft: #DCFCE7;
  --warning: #D97706;  --warning-soft: #FEF3C7;
  --danger:  #DC2626;  --danger-soft:  #FEE2E2;
  --info:    #0EA5E9;  --info-soft:    #E0F2FE;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06);

  /* AA-safe derived tokens (light) */
  --on-accent: #FFFFFF;
  --accent-solid: #2F6FEB;        /* white text 4.57:1 */
  --accent-text: #2559C4;         /* on accent-soft 5.4:1, on surface 6.35:1 */
  --success-text: #166534;        /* on success-soft 6.49:1 */
  --warning-text: #92400E;        /* on warning-soft 6.37:1 */
  --danger-text: #B91C1C;         /* on danger-soft 5.30:1 */
  --info-text: #075985;           /* on info-soft 6.59:1 */
  --overlay: rgba(17, 24, 39, 0.28);
  --neutral-solid: #374151;       /* non-interactive solid surfaces; white text 10.3:1 */
  --shadow-2xs: var(--shadow);
  --shadow-md: 0 2px 6px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 4px 12px rgba(16, 24, 40, 0.1);
  --shadow-xl: 0 8px 20px rgba(16, 24, 40, 0.12);
  --shadow-2xl: 0 12px 28px rgba(16, 24, 40, 0.14);

  --button-outline: rgba(16, 24, 40, 0.1);
  --badge-outline: rgba(16, 24, 40, 0.05);
  --opaque-button-border-intensity: -8;
  --elevate-1: rgba(16, 24, 40, 0.03);
  --elevate-2: rgba(16, 24, 40, 0.08);
}

[data-theme='dark'] {
  --bg: #111827;
  --surface: #1F2937;
  --border: #374151;
  --text: #E5E7EB;
  --text-muted: #9CA3AF;
  --accent: #5B8DEF;
  /* light-theme values not redefined by the spec stay as-is for accent-hover; hover uses solid variant below */
  --accent-soft: rgba(91, 141, 239, 0.15);
  --success-soft: rgba(31, 157, 85, 0.15);
  --warning-soft: rgba(217, 119, 6, 0.15);
  --danger-soft: rgba(220, 38, 38, 0.15);
  --info-soft: rgba(14, 165, 233, 0.15);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);

  /* AA-safe derived tokens (dark) */
  --accent-solid: #2F6FEB;        /* white text 4.57:1; exact --accent #5B8DEF with white is only 3.23:1 */
  --accent-hover: #2559C4;        /* solid-button hover, white 6.35:1 */
  --accent-text: #8FB0F5;         /* links/active on surface */
  --success-text: #4ADE80;
  --warning-text: #FBBF24;
  --danger-text: #F87171;
  --info-text: #38BDF8;
  --overlay: rgba(0, 0, 0, 0.45);
  --neutral-solid: #4B5563;       /* white text 7.56:1 */

  --button-outline: rgba(255, 255, 255, 0.1);
  --badge-outline: rgba(255, 255, 255, 0.05);
  --opaque-button-border-intensity: 9;
  --elevate-1: rgba(255, 255, 255, 0.04);
  --elevate-2: rgba(255, 255, 255, 0.09);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.45);
  --shadow-xl: 0 8px 20px rgba(0, 0, 0, 0.5);
  --shadow-2xl: 0 12px 28px rgba(0, 0, 0, 0.55);
  --destructive-foreground: #FFFFFF;
}

