/*
 * Design System Variables
 * SQM Premium UI - Modern & Vibrant Style
 */

:root {
    /* ===== Color Palette ===== */

    /* Primary Gradient (Navy → Safety Orange) */
    --color-primary-start: #0A192F;
    --color-primary-end: #FF6B00;
    --gradient-primary: linear-gradient(135deg, var(--color-primary-start) 0%, var(--color-primary-end) 100%);

    /* Interactive Accent (Safety Orange) */
    --color-accent: #FF6B00;
    --color-accent-hover: #e65c00;
    --color-accent-rgb: 255, 107, 0;

    /* Accent Gradient (Pink → Yellow) */
    --color-accent-start: #fa709a;
    --color-accent-end: #fee140;
    --gradient-accent: linear-gradient(135deg, var(--color-accent-start) 0%, var(--color-accent-end) 100%);

    /* Success Gradient (Green → Teal) */
    --color-success: #10b981;
    --color-success-dark: #06b6d4;
    --gradient-success: linear-gradient(135deg, var(--color-success) 0%, var(--color-success-dark) 100%);

    /* Warning Gradient (Amber → Orange) */
    --color-warning: #f59e0b;
    --color-warning-dark: #f97316;
    --gradient-warning: linear-gradient(135deg, var(--color-warning) 0%, var(--color-warning-dark) 100%);

    /* Danger Gradient (Red → Pink) */
    --color-danger: #ef4444;
    --color-danger-dark: #ec4899;
    --gradient-danger: linear-gradient(135deg, var(--color-danger) 0%, var(--color-danger-dark) 100%);

    /* Info Gradient (Blue → Cyan) */
    --color-info: #3b82f6;
    --color-info-dark: #06b6d4;
    --gradient-info: linear-gradient(135deg, var(--color-info) 0%, var(--color-info-dark) 100%);

    /* Neutral Colors */
    --color-white: #ffffff;
    --color-bg: #fafbfc;
    --color-bg-secondary: #f3f4f6;
    --color-surface: #ffffff;
    --color-border: #e5e7eb;
    --color-border-light: #f3f4f6;

    /* Text Colors */
    --color-text-primary: #1f2937;
    --color-text-secondary: #6b7280;
    --color-text-muted: #9ca3af;
    --color-text-inverse: #ffffff;

    /* Aliases (used by component CSS) */
    --color-text: var(--color-text-primary);
    --color-primary: var(--color-accent);
    --color-dark: #1f2937;
    --color-muted: var(--color-text-muted);
    --color-bg-tertiary: #f1f3f5;
    --font-heading: var(--font-display);

    /* Neutral scale */
    --color-neutral-700: #495057;

    /* ===== Spacing System ===== */
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.25rem;   /* 20px */
    --space-6: 1.5rem;    /* 24px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */
    --space-16: 4rem;     /* 64px */
    --space-20: 5rem;     /* 80px */

    /* ===== Typography ===== */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-display: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Font Sizes */
    --font-size-xs: 0.75rem;      /* 12px */
    --font-size-sm: 0.875rem;     /* 14px */
    --font-size-base: 1rem;       /* 16px */
    --font-size-lg: 1.125rem;     /* 18px */
    --font-size-xl: 1.25rem;      /* 20px */
    --font-size-2xl: 1.5rem;      /* 24px */
    --font-size-3xl: 1.875rem;    /* 30px */
    --font-size-4xl: 2.25rem;     /* 36px */
    --font-size-5xl: 3rem;        /* 48px */

    /* Font Weights */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Line Heights */
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;

    /* ===== Shadows ===== */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 20px rgba(255, 107, 0, 0.2);
    --shadow-glow-accent: 0 0 20px rgba(255, 107, 0, 0.2);

    /* ===== Border Radius ===== */
    --radius-sm: 0.375rem;   /* 6px */
    --radius-md: 0.5rem;     /* 8px */
    --radius-lg: 0.75rem;    /* 12px */
    --radius-xl: 1rem;       /* 16px */
    --radius-2xl: 1.5rem;    /* 24px */
    --radius-full: 9999px;   /* circular */

    /* ===== Transitions ===== */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* ===== Z-Index Scale ===== */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    --z-notification: 1080;
    --z-toast: 1080;

    /* ===== Layout ===== */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --header-height: 64px;
    --max-content-width: 1400px;
}

/* ===== Dark Mode Theme ===== */
[data-theme="dark"] {
    /* Backgrounds */
    --color-bg: #0f1419;
    --color-bg-secondary: #1a1f29;
    --color-surface: #1e2530;
    --color-white: #1e2530;
    --color-border: #2d3748;
    --color-border-light: #252d3a;

    /* Text Colors */
    --color-text-primary: #e4e7eb;
    --color-text-secondary: #9ca3af;
    --color-text-muted: #6b7280;
    --color-text-inverse: #1f2937;

    /* Aliases */
    --color-text: var(--color-text-primary);
    --color-dark: #e4e7eb;
    --color-muted: var(--color-text-muted);
    --color-bg-tertiary: #252d3a;
    --color-neutral-700: #9ca3af;

    /* Enhanced Gradients for Dark Mode */
    --color-primary-start: #112240;
    --color-primary-end: #FF8C42;
    --gradient-primary: linear-gradient(135deg, var(--color-primary-start) 0%, var(--color-primary-end) 100%);

    --color-accent: #FF8C42;
    --color-accent-hover: #FF6B00;
    --color-accent-rgb: 255, 140, 66;

    --color-accent-start: #f472b6;
    --color-accent-end: #fbbf24;
    --gradient-accent: linear-gradient(135deg, var(--color-accent-start) 0%, var(--color-accent-end) 100%);

    /* Shadows for Dark Mode */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.6);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.7);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 25px rgba(255, 107, 0, 0.4);
    --shadow-glow-accent: 0 0 25px rgba(255, 107, 0, 0.4);

    /* Bootstrap Overrides for Dark Mode */
    --bs-body-bg: var(--color-bg);
    --bs-body-color: var(--color-text-primary);
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.05);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.075);
    --bs-table-active-bg: rgba(255, 255, 255, 0.1);
    --bs-table-border-color: var(--color-border);
    --bs-table-color: var(--color-text-primary);
}
