/* E31 Design Tokens
   Unified Design Tokens System for E31 Dashboard, Presenter Studio & System Management
   Strict Token-driven CSS Custom Properties
*/

:root {
    color-scheme: light;

    /* 1. Surfaces & Backgrounds */
    --background: #f8fafc;
    --card-bg: #ffffff;
    --surface-subtle: #f1f5f9;
    --surface-muted: #e2e8f0;
    --surface-dark: #0f172a;
    --tv-bg: #050811;

    /* 2. Text & Contrast */
    --ink: #0f172a;
    --ink-light: #334155;
    --muted: #64748b;
    --text-inverse: #ffffff;
    --text-placeholder: #94a3b8;

    /* 3. Hairline Borders & Dividers */
    --line: #e2e8f0;
    --line-subtle: #f1f5f9;
    --line-strong: #cbd5e1;

    /* 4. Primary Brand Palette */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-active: #1e40af;
    --primary-soft: #eff6ff;
    --primary-border: #bfdbfe;
    --blue: var(--primary);

    /* 5. Semantic Status Colors */
    --success: #059669;
    --success-hover: #047857;
    --success-soft: #ecfdf5;
    --success-border: #a7f3d0;

    --warning: #d97706;
    --warning-hover: #b45309;
    --warning-soft: #fffbeb;
    --warning-border: #fde68a;

    --danger: #dc2626;
    --danger-hover: #b91c1c;
    --danger-soft: #fef2f2;
    --danger-border: #fecaca;

    --info: #0284c7;
    --info-hover: #0369a1;
    --info-soft: #f0f9ff;
    --info-border: #bae6fd;

    /* 6. Spacing Scale */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;

    /* 7. Typography Scale */
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --text-xs: 0.75rem;     /* 12px */
    --text-sm: 0.875rem;    /* 14px */
    --text-base: 1rem;      /* 16px */
    --text-lg: 1.125rem;    /* 18px */
    --text-xl: 1.25rem;     /* 20px */
    --text-2xl: 1.5rem;     /* 24px */
    --text-3xl: 1.875rem;   /* 30px */

    /* 8. Radii */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius: 14px;
    --radius-full: 9999px;

    /* 9. Elevations & Shadows */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.04);

    /* 10. Focus & Accessibility Rings */
    --focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.25);
    --focus-border: var(--primary);

    /* 11. Layout & Shell Dimensions */
    --sidebar-w: 260px;
    --header-h: 56px;
    --content-max-w: 1440px;
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Utility Classes based on Design Tokens */
.text-muted { color: var(--muted); }
.text-primary { color: var(--primary); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }

.bg-surface { background-color: var(--card-bg); }
.bg-subtle { background-color: var(--surface-subtle); }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
