/**
 * AUTOCORE360 Admin Panel - CSS Variables
 * Design tokens, colors, spacing, shadows, transitions
 */

/* ============ CSS VARIABLES ============ */
:root {
    /* Primary Colors - Modern Blue */
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --primary-gradient: linear-gradient(135deg, var(--primary-dark), var(--primary));
    --primary-glow: rgba(37, 99, 235, 0.4);

    /* RGB values for opacity variants */
    --primary-rgb: 37, 99, 235;
    --success-rgb: 34, 197, 94;
    --danger-rgb: 239, 68, 68;
    --warning-rgb: 245, 158, 11;
    --info-rgb: 14, 165, 233;
    --accent-rgb: 139, 92, 246;
    --text-muted-rgb: 148, 163, 184;

    /* Accent Color */
    --accent: #8b5cf6;
    --accent-light: #a78bfa;

    /* Secondary & Utility Colors */
    --secondary: #64748b;
    --success: #22c55e;
    --success-light: #4ade80;
    --success-dark: #16a34a;
    --danger: #ef4444;
    --danger-light: #f87171;
    --danger-dark: #dc2626;
    --warning: #f59e0b;
    --warning-light: #fbbf24;
    --warning-dark: #d97706;
    --info: #0ea5e9;
    --info-light: #38bdf8;
    --info-dark: #0284c7;

    /* Typography Scale */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;

    /* Icon Container Sizes */
    --icon-xs: 1.5rem;
    --icon-sm: 2rem;
    --icon-md: 2.5rem;
    --icon-lg: 3rem;
    --icon-xl: 3.5rem;

    /* Background Colors */
    --background: #f8fafc;
    --surface: #ffffff;
    --surface-hover: #f1f5f9;
    --surface-active: #e2e8f0;
    --surface-secondary: rgba(0, 0, 0, 0.02);

    /* Text Colors */
    --text: #0f172a;
    --text-secondary: #334155;
    --text-light: #64748b;
    --text-muted: #94a3b8;

    /* Border Colors */
    --border: #e2e8f0;
    --border-hover: #cbd5e1;
    --border-focus: var(--primary);

    /* Shadows - Enhanced depth like mandiag */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-primary: 0 4px 14px rgba(37, 99, 235, 0.35);
    --shadow-success: 0 4px 14px rgba(34, 197, 94, 0.35);
    --shadow-danger: 0 4px 14px rgba(239, 68, 68, 0.35);
    --shadow-card-hover: 0 8px 16px rgba(0, 0, 0, 0.1);

    /* Border Radius - Softer corners */
    --radius-xs: 0.375rem;
    --radius-sm: 0.5rem;
    --radius: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions - Smooth like mandiag */
    --transition-fast: 0.15s;
    --transition-speed: 0.2s;
    --transition-slow: 0.3s;
    --transition: all 0.3s ease;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Layout */
    --sidebar-width: 260px;
    --header-height: 64px;
    --topnav-height: 116px;
    --topbar-height: 56px;
    --navbar-height: 52px;
    --content-max-width: 1400px;
    --content-padding-x: 2rem;

    /* Scrollbar */
    --scrollbar-track: #f1f5f9;
    --scrollbar-thumb: #cbd5e1;
    --scrollbar-thumb-hover: #94a3b8;

    /* Z-index scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 1000;
    --z-tooltip: 1100;
    --z-toast: 1200;

    /* Card hover transform */
    --hover-lift: translateY(-4px);
    --hover-lift-sm: translateY(-2px);

    /* Focus ring - MANDIAG style */
    --ring-width: 3px;
    --ring-color: rgba(37, 99, 235, 0.2);
}

/* ============ SYSTEM DARK MODE PREFERENCE ============ */
@media (prefers-color-scheme: dark) {
    :root {
        /* Primary Colors - Deep Red like Mandiag dark mode */
        --primary: #dc2626;
        --primary-light: #ef4444;
        --primary-dark: #991b1b;
        --primary-gradient: linear-gradient(135deg, #991b1b, #dc2626);
        --primary-glow: rgba(220, 38, 38, 0.3);

        /* RGB values for opacity variants - Dark mode */
        --primary-rgb: 220, 38, 38;
        --danger-rgb: 248, 113, 113;
        --text-muted-rgb: 108, 112, 134;

        /* Accent - Warm red tones */
        --accent: #f87171;
        --accent-light: #fca5a5;
        --accent-rgb: 248, 113, 113;

        /* Secondary & Utility */
        --secondary: #a6adc8;
        --success: #22c55e;
        --success-light: #4ade80;
        --success-dark: #16a34a;
        --danger: #f87171;
        --danger-light: #fca5a5;
        --danger-dark: #ef4444;
        --warning: #fbbf24;
        --warning-light: #fcd34d;
        --info: #38bdf8;
        --info-light: #7dd3fc;

        /* Background Colors - Catppuccin Mocha inspired */
        --background: #11111b;
        --surface: #1e1e2e;
        --surface-hover: #313244;
        --surface-active: #45475a;
        --surface-secondary: rgba(255, 255, 255, 0.03);

        /* Text Colors - Catppuccin */
        --text: #cdd6f4;
        --text-secondary: #bac2de;
        --text-light: #a6adc8;
        --text-muted: #6c7086;

        /* Border Colors */
        --border: #313244;
        --border-hover: #45475a;
        --border-focus: #dc2626;

        /* Shadows - Deeper for dark mode */
        --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
        --shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.4);
        --shadow-xl: 0 20px 30px rgba(0, 0, 0, 0.5);
        --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.6);
        --shadow-primary: 0 4px 14px rgba(220, 38, 38, 0.3);
        --shadow-success: 0 4px 14px rgba(34, 197, 94, 0.3);
        --shadow-danger: 0 4px 14px rgba(248, 113, 113, 0.3);
        --shadow-card-hover: 0 8px 20px rgba(0, 0, 0, 0.4);

        /* Scrollbar */
        --scrollbar-track: #1e1e2e;
        --scrollbar-thumb: #45475a;
        --scrollbar-thumb-hover: #585b70;
    }
}
