/**
 * ArcEdgeVPN Design Tokens & Theming System
 * Light Theme & Dark Theme tokens with central typography
 */

:root {
    /* Central Typography Tokens */
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-subheading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    --font-numbers: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Base Dimensions */
    --sidebar-width: 260px;
    --topbar-height: 70px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================================
   LIGHT THEME: Orange, White, Very light gray, Dark text
   ======================================================== */
[data-theme="light"] {
    --bg-app: #f8fafc;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-subtle: #f1f5f9;
    --bg-sidebar: #ffffff;
    --bg-topbar: rgba(255, 255, 255, 0.92);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;

    --border-color: #e2e8f0;
    --border-subtle: #f1f5f9;
    --border-focus: #f97316;

    /* ArcEdge Orange Accent */
    --accent-primary: #f97316;
    --accent-hover: #ea580c;
    --accent-active: #c2410c;
    --accent-subtle: rgba(249, 115, 22, 0.12);
    --accent-glow: 0 0 16px rgba(249, 115, 22, 0.25);

    /* Status Colors */
    --status-success: #10b981;
    --status-success-bg: rgba(16, 185, 129, 0.12);
    --status-warning: #f59e0b;
    --status-warning-bg: rgba(245, 158, 11, 0.12);
    --status-danger: #ef4444;
    --status-danger-bg: rgba(239, 68, 68, 0.12);
    --status-info: #0284c7;
    --status-info-bg: rgba(2, 132, 199, 0.12);

    /* Elevation Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);

    /* Charts */
    --chart-grid: #e2e8f0;
    --chart-line: #f97316;
    --chart-bar-up: #0284c7;
    --chart-bar-down: #f97316;
}

/* ========================================================
   DARK THEME: Dark blue, Deep navy, Blue-gray, White text
   ======================================================== */
[data-theme="dark"] {
    --bg-app: #080d1a;
    --bg-surface: #0f172a;
    --bg-card: #131c31;
    --bg-card-hover: #19233c;
    --bg-subtle: #1e293b;
    --bg-sidebar: #0b1120;
    --bg-topbar: rgba(11, 17, 32, 0.88);

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --text-inverse: #0f172a;

    --border-color: #1e293b;
    --border-subtle: #172033;
    --border-focus: #fb923c;

    /* ArcEdge Orange Accent */
    --accent-primary: #f97316;
    --accent-hover: #fb923c;
    --accent-active: #ea580c;
    --accent-subtle: rgba(249, 115, 22, 0.16);
    --accent-glow: 0 0 20px rgba(249, 115, 22, 0.35);

    /* Status Colors */
    --status-success: #10b981;
    --status-success-bg: rgba(16, 185, 129, 0.16);
    --status-warning: #f59e0b;
    --status-warning-bg: rgba(245, 158, 11, 0.16);
    --status-danger: #ef4444;
    --status-danger-bg: rgba(239, 68, 68, 0.16);
    --status-info: #38bdf8;
    --status-info-bg: rgba(56, 189, 248, 0.16);

    /* Elevation Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.6), 0 4px 8px -4px rgba(0, 0, 0, 0.5);
    --shadow-card: 0 4px 14px rgba(0, 0, 0, 0.35);

    /* Charts */
    --chart-grid: #1e293b;
    --chart-line: #fb923c;
    --chart-bar-up: #38bdf8;
    --chart-bar-down: #f97316;
}

/* Base Body Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.arcedge-body {
    background-color: var(--bg-app);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Reduced Motion Compliance */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
