/* ─────────────────────────────────────────────────────────────────────────────
 * Scout — design tokens
 * One unique brand color per app : Scout = indigo-violet (#6366f1).
 * ───────────────────────────────────────────────────────────────────────────── */

:root {
    /* === Brand accent (unique per app) === */
    --color-brand-primary: #6366f1;
    --color-brand-soft:    rgba(99, 102, 241, 0.12);
    --color-brand-strong:  #4f46e5;

    /* === Surfaces (Light) === */
    --surface-primary:     #ffffff;
    --surface-secondary:   #f8fafc;
    --surface-tertiary:    #f1f5f9;
    --surface-glass:       rgba(255, 255, 255, 0.7);
    --surface-glass-strong:rgba(255, 255, 255, 0.85);

    /* === Text (Light) === */
    --text-primary:        #0f172a;
    --text-secondary:      #475569;
    --text-tertiary:       #94a3b8;
    --text-on-accent:      #ffffff;

    /* === Borders (Light) === */
    --border-primary:      rgba(15, 23, 42, 0.10);
    --border-secondary:    rgba(15, 23, 42, 0.05);

    /* === Status === */
    --color-success: #10b981;
    --color-info:    #3b82f6;
    --color-warning: #f59e0b;
    --color-danger:  #f43f5e;

    /* === Background gradient (Light) === */
    --bg-page: radial-gradient(circle at 50% 0%, #f5f3ff 0%, #ffffff 60%, #f8fafc 100%);

    /* === Spacing scale (px) === */
    --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;
    --space-16: 64px;

    /* === Radius === */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-3xl: 32px;
    --radius-full: 9999px;

    /* === Shadows (Light) === */
    --shadow-sm:  0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-md:  0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-lg:  0 8px 24px rgba(15, 23, 42, 0.10);
    --shadow-xl:  0 16px 40px rgba(15, 23, 42, 0.14);
    --shadow-accent: 0 4px 14px rgba(99, 102, 241, 0.4);

    /* === Sidebar dimensions (FIXED across apps) === */
    --sidebar-w-expanded: 256px;
    --sidebar-w-collapsed: 80px;

    /* === Typography === */
    --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-head: 'Space Grotesk', var(--font-sans);
    --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

    /* === Transitions === */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

    /* === Z-index layers === */
    --z-sidebar:       20;
    --z-sidebar-toggle: 30;
    --z-modal:         40;
    --z-notification:  50;
}

[data-theme="dark"] {
    /* === Surfaces (Dark) — no pure black === */
    --surface-primary:      #0a0a0c;
    --surface-secondary:    rgba(255, 255, 255, 0.03);
    --surface-tertiary:     rgba(255, 255, 255, 0.05);
    --surface-glass:        rgba(255, 255, 255, 0.04);
    --surface-glass-strong: rgba(20, 20, 30, 0.85);

    /* === Text (Dark) === */
    --text-primary:   #f8fafc;
    --text-secondary: #cbd5e1;
    --text-tertiary:  #64748b;

    /* === Borders (Dark) === */
    --border-primary:   rgba(255, 255, 255, 0.10);
    --border-secondary: rgba(255, 255, 255, 0.04);

    /* === Background gradient (Dark) === */
    --bg-page: radial-gradient(circle at 50% -20%, #1e1b4b 0%, #0a0a0c 100%);

    /* === Shadows (Dark) === */
    --shadow-sm:  0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md:  0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg:  0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-xl:  0 16px 40px rgba(0, 0, 0, 0.6);
    --shadow-accent: 0 4px 14px rgba(99, 102, 241, 0.5);

    --color-brand-soft: rgba(99, 102, 241, 0.20);

    /* Native form controls (select dropdowns, etc.) follow the dark scheme */
    color-scheme: dark;
    /* Opaque surface for native controls whose popups can't be styled (option lists).
       Dark blue tuned to the indigo page gradient (#1e1b4b) rather than pure black. */
    --surface-control: #181734;
}

/* === Incognito mode (optional, blurs sensitive domain names) === */
[data-incognito="true"] .incognito-blur {
    filter: blur(6px);
    transition: filter var(--transition-base);
}
[data-incognito="true"] .incognito-blur:hover {
    filter: blur(0);
}
