/* ==========================================================================
   Design tokens — single source of truth for every surface.

   Load order (canonical, all panels):
       bootstrap -> tokens -> style -> main -> custom -> ui/*

   Rules:
   - Never hardcode brand/ink/surface hex values in views or component CSS.
   - Use var(--brand-*), var(--ink-*), var(--surface-*), var(--line-*),
     var(--radius-*), var(--shadow-*), var(--font-*).
   - Per-tenant theming will override --brand-* / --brand-rgb on <html>.
   ========================================================================== */

:root {
    /* Brand — platform default (orange) */
    --brand-50: #fff7ed;
    --brand-100: #ffedd5;
    --brand-200: #fed7aa;
    --brand-300: #fdba74;
    --brand-400: #fb923c;
    --brand-500: #f97316;
    --brand-600: #ea580c;
    --brand-700: #c2410c;
    --brand-800: #9a3412;
    --brand-900: #7c2d12;

    --brand: var(--brand-500);
    --brand-hover: var(--brand-600);
    --brand-contrast: #ffffff;

    /* RGB channels for rgb(var(--brand-rgb) / <alpha-value>) patterns */
    --brand-rgb: 249 115 22;

    /* Neutral ink */
    --ink-900: #0f172a;
    --ink-800: #1e293b;
    --ink-700: #334155;
    --ink-600: #475569;
    --ink-500: #64748b;
    --ink-400: #94a3b8;
    --ink-300: #cbd5e1;

    /* Surfaces & lines */
    --surface: #ffffff;
    --surface-muted: #f8fafc;
    --surface-sunken: #f1f5f9;
    --surface-inverse: #0f172a;
    --surface-deep: #0b1120;
    --line: #e2e8f0;
    --line-soft: #f1f5f9;

    /* Status */
    --success: #10b981;
    --success-soft: #ecfdf5;
    --info-soft: #eff6ff;
    --warning-soft: #fffbeb;
    --danger: #ef4444;
    --danger-strong: #dc2626;
    --danger-soft: #fef2f2;
    --danger-border: #fecaca;
    --warning: #f59e0b;
    --info: #3b82f6;

    /* Shape */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 999px;

    /* Elevation */
    --shadow-sm: 0 1px 2px 0 rgb(15 23 42 / 0.06);
    --shadow-md:
        0 4px 6px -1px rgb(15 23 42 / 0.08), 0 2px 4px -2px rgb(15 23 42 / 0.06);
    --shadow-lg:
        0 10px 15px -3px rgb(15 23 42 / 0.1), 0 4px 6px -4px rgb(15 23 42 / 0.08);

    /* Type */
    --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-display: "Poppins", sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;

    /* Motion */
    --ease: 0.2s ease;
}

/* Dark theme — superadmin already toggles .dark on <html>. */
.dark {
    --ink-900: #f1f5f9;
    --ink-800: #e2e8f0;
    --ink-700: #cbd5e1;
    --ink-600: #94a3b8;
    --ink-500: #64748b;

    --surface: #1e293b;
    --surface-muted: #0f172a;
    --surface-sunken: #1e293b;
    --surface-inverse: #0b1120;
    --surface-deep: #0b1120;
    --line: #1e293b;
    --line-soft: #1e293b;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
}
