/**
 * =================================================================
 * RINOEDU - DESIGN TOKENS (Single Source of Truth)
 * =================================================================
 * Agent `ui` owns this file. ALL colors, spacing, typography must
 * be defined here first before being used anywhere in the system.
 * Agent `fe` MUST use these CSS variables instead of hardcoded values.
 * =================================================================
 */

:root {
  /* ── BRAND COLORS ── */
  --color-brand-primary:     #2563eb;  /* Blue 600 - Main Brand */
  --color-brand-hover:       #1d4ed8;  /* Blue 700 - Hover State */
  --color-brand-light:       #eff6ff;  /* Blue 50 - Subtle bg */
  --color-brand-glow:        rgba(59, 130, 246, 0.15);

  /* ── SEMANTIC (Status) COLORS ── */
  --color-success:           #16a34a;  /* Green 600 */
  --color-success-light:     #f0fdf4;  /* Green 50 */
  --color-warning:           #d97706;  /* Amber 600 */
  --color-warning-light:     #fffbeb;  /* Amber 50 */
  --color-danger:            #dc2626;  /* Red 600 */
  --color-danger-light:      #fef2f2;  /* Red 50 */
  --color-info:              #0891b2;  /* Cyan 600 */
  --color-info-light:        #ecfeff;  /* Cyan 50 */

  /* ── NEUTRAL / SURFACE COLORS (Light Mode) ── */
  --color-bg:                #f8fafc;  /* slate-50 - App background */
  --color-surface:           #ffffff;  /* White - Cards, panels */
  --color-surface-alt:       #f1f5f9;  /* slate-100 - Alt surface */
  --color-border:            #e2e8f0;  /* slate-200 */
  --color-border-strong:     #cbd5e1;  /* slate-300 */

  /* ── TEXT COLORS ── */
  --color-text-primary:      #1e293b;  /* slate-800 */
  --color-text-secondary:    #64748b;  /* slate-500 */
  --color-text-muted:        #94a3b8;  /* slate-400 */

  /* ── SIDEBAR ── */
  --color-sidebar-bg:        #0f172a;  /* slate-900 */
  --color-sidebar-icon:      #94a3b8;  /* slate-400 */
  --color-sidebar-icon-active: #ffffff;

  /* ── TYPOGRAPHY ── */
  --font-sans:               'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-xs:            0.75rem;   /* 12px */
  --font-size-sm:            0.875rem;  /* 14px */
  --font-size-base:          1rem;      /* 16px */
  --font-size-lg:            1.125rem;  /* 18px */
  --font-size-xl:            1.25rem;   /* 20px */
  --font-size-2xl:           1.5rem;    /* 24px */
  --font-size-3xl:           1.875rem;  /* 30px */
  --font-weight-normal:      400;
  --font-weight-medium:      500;
  --font-weight-semibold:    600;
  --font-weight-bold:        700;

  /* ── SPACING SCALE ── */
  --space-1:   0.25rem;  /* 4px */
  --space-2:   0.5rem;   /* 8px */
  --space-3:   0.75rem;  /* 12px */
  --space-4:   1rem;     /* 16px */
  --space-5:   1.25rem;  /* 20px */
  --space-6:   1.5rem;   /* 24px */
  --space-8:   2rem;     /* 32px */
  --space-10:  2.5rem;   /* 40px */
  --space-12:  3rem;     /* 48px */

  /* ── BORDER RADIUS ── */
  --radius-sm:   0.375rem;  /* 6px */
  --radius-md:   0.5rem;    /* 8px */
  --radius-lg:   0.75rem;   /* 12px */
  --radius-xl:   1rem;      /* 16px */
  --radius-2xl:  1.5rem;    /* 24px */
  --radius-full: 9999px;

  /* ── SHADOWS ── */
  --shadow-sm:   0 1px 2px rgba(0,0,0,0.05);
  --shadow-md:   0 4px 6px -1px rgba(0,0,0,0.10), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-soft: 0 4px 20px -2px rgba(0,0,0,0.05);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.10), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-glow: 0 0 15px var(--color-brand-glow);

  /* ── TRANSITIONS ── */
  --transition-fast:   150ms ease-out;
  --transition-base:   200ms ease-out;
  --transition-slow:   300ms cubic-bezier(0.16, 1, 0.3, 1);

  /* ── Z-INDEX SCALE ── */
  --z-dropdown:  50;
  --z-sticky:    100;
  --z-overlay:   200;
  --z-modal:     300;
  --z-tooltip:   400;
}

/* ── DARK MODE OVERRIDES ── */
.dark {
  --color-bg:            #0f172a;  /* slate-900 */
  --color-surface:       #1e293b;  /* slate-800 */
  --color-surface-alt:   #111827;  /* gray-900 */
  --color-border:        #334155;  /* slate-700 */
  --color-border-strong: #475569;  /* slate-600 */
  --color-text-primary:  #f1f5f9;  /* slate-100 */
  --color-text-secondary:#94a3b8;  /* slate-400 */
  --color-text-muted:    #64748b;  /* slate-500 */
  --color-brand-light:   rgba(37, 99, 235, 0.15);
}
