/* =============================================================
   DESIGN TOKENS  —  Unified Medical Image Diagnostics
   Light is the primary theme. Dark mode uses its OWN semantic
   values (not an inversion). Everything else in the app reads
   from these variables, so re-theming is a one-file change.
   ============================================================= */

:root {
  /* ---- Brand palette (mode-independent) ---- */
  --brand-600: #2563EB;
  --brand-500: #3B82F6;
  --brand-700: #1D4ED8;
  --brand-50:  #EFF6FF;

  /* ---- Spacing: strict 8px system ---- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* ---- Radius ---- */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 999px;

  /* ---- Type scale (Inter) ---- */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --fs-h1: 32px;  --lh-h1: 40px;
  --fs-h2: 24px;  --lh-h2: 32px;
  --fs-h3: 20px;  --lh-h3: 28px;
  --fs-body: 16px; --lh-body: 24px;
  --fs-sm: 14px;  --lh-sm: 20px;
  --fs-xs: 13px;  --lh-xs: 18px;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* ---- Motion ---- */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 180ms;
}

/* ----------------------- LIGHT (default) ----------------------- */
:root,
[data-theme="light"] {
  --bg:            #F8FAFC;
  --surface:       #FFFFFF;
  --surface-2:     #F8FAFC;   /* subtle raised/recessed fill   */
  --surface-hover: #F1F5F9;
  --border:        #E5E7EB;
  --border-strong: #D1D5DB;

  --primary:        #2563EB;
  --primary-hover:  #1D4ED8;
  --primary-soft:   #EFF6FF;
  --on-primary:     #FFFFFF;

  --success: #16A34A;  --success-soft: #DCFCE7;
  --warning: #F59E0B;  --warning-soft: #FEF3C7;
  --danger:  #DC2626;  --danger-soft:  #FEE2E2;

  --text:        #111827;
  --text-2:      #6B7280;
  --text-3:      #9CA3AF;
  --on-accent:   #FFFFFF;

  --shadow-xs: 0 1px 2px rgba(16,24,40,.05);
  --shadow-sm: 0 1px 3px rgba(16,24,40,.08), 0 1px 2px rgba(16,24,40,.04);
  --shadow-md: 0 4px 12px rgba(16,24,40,.08), 0 2px 4px rgba(16,24,40,.04);
  --shadow-lg: 0 12px 32px rgba(16,24,40,.10), 0 4px 8px rgba(16,24,40,.04);
  --ring: 0 0 0 3px rgba(37,99,235,.18);
}

/* ------------------------- DARK ------------------------------- */
[data-theme="dark"] {
  --bg:            #0F172A;
  --surface:       #111827;
  --surface-2:     #0B1220;
  --surface-hover: #1A2335;
  --border:        #1F2937;
  --border-strong: #2A3850;

  --primary:        #3B82F6;
  --primary-hover:  #60A5FA;
  --primary-soft:   #16233D;
  --on-primary:     #FFFFFF;

  --success: #22C55E;  --success-soft: #0F2A1B;
  --warning: #FBBF24;  --warning-soft: #2A2110;
  --danger:  #F87171;  --danger-soft:  #2A1416;

  --text:        #F9FAFB;
  --text-2:      #9CA3AF;
  --text-3:      #6B7280;
  --on-accent:   #FFFFFF;

  --shadow-xs: 0 1px 2px rgba(0,0,0,.4);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.5);
  --shadow-md: 0 6px 16px rgba(0,0,0,.45);
  --shadow-lg: 0 16px 40px rgba(0,0,0,.5);
  --ring: 0 0 0 3px rgba(59,130,246,.30);
}
