/* ============================================
   Theme Tokens - Dark-first premium design
   ============================================ */
:root {
    /* Dark palette (default) */
    --bg-primary: #0a0f1e;
    --bg-sidebar: #0d1326;
    --bg-card: #111a30;
    --bg-card-hover: #16203a;
    --bg-input: #0d1528;
    --bg-elevated: #16203a;

    --text-primary: #eef2fb;
    --text-secondary: #8a94ad;

    --border-color: #1e2a45;
    --border-color-strong: #2a3a5f;

    --accent-blue: #3b82f6;
    --accent-blue-hover: #2563eb;
    --accent-blue-soft: rgba(59, 130, 246, 0.14);
    --accent-green: #22c55e;
    --accent-green-soft: rgba(34, 197, 94, 0.14);
    --accent-orange: #f59e0b;
    --accent-orange-soft: rgba(245, 158, 11, 0.14);
    --accent-red: #ef4444;
    --accent-purple: #8b5cf6;
    --accent-purple-soft: rgba(139, 92, 246, 0.14);
    --accent-gold: #fbbf24;

    /* Sidebar Dimensions */
    --sidebar-width-expanded: 260px;
    --sidebar-width-collapsed: 72px;
    --sidebar-width-mobile: 280px;

    /* Spacing & Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.45);

    --font-family: 'Inter', system-ui, -apple-system, sans-serif;

    /* Transitions */
    --transition-sidebar: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-main: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light mode override */
body:not(.dark-mode) {
    --bg-primary: #f4f6fb;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5ff;
    --bg-input: #f6f8fc;
    --bg-elevated: #ffffff;

    --text-primary: #101828;
    --text-secondary: #5b6478;

    --border-color: #e4e8f1;
    --border-color-strong: #cdd5e4;

    --accent-blue-soft: rgba(59, 130, 246, 0.1);
    --accent-green-soft: rgba(34, 197, 94, 0.1);
    --accent-orange-soft: rgba(245, 158, 11, 0.12);
    --accent-purple-soft: rgba(139, 92, 246, 0.1);

    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
    --shadow-md: 0 4px 12px rgba(16, 24, 40, 0.08);
    --shadow-lg: 0 10px 30px rgba(16, 24, 40, 0.12);
}

* { box-sizing: border-box; }

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    margin: 0;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color-strong); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-blue); }

::selection { background: var(--accent-blue); color: #fff; }
