/**
 * KRP Theme Variables
 *
 * Design tokens — CSS custom properties for colors, typography, spacing, and z-index.
 *
 * Color palette: Orange (#f97316) primary, Emerald (#10b981) secondary
 * Typography: Rubik (body/UI), JetBrains Mono (code/part numbers)
 */

/* ==========================================================================
   Color Tokens (Light Mode)
   ========================================================================== */
:root {
    /* Primary (Orange) */
    --color-primary: #f97316;
    --color-primary-hover: #ea580c;
    --color-primary-light: #fff7ed;
    --color-primary-50: #fff7ed;
    --color-primary-100: #ffedd5;
    --color-primary-200: #fed7aa;
    --color-primary-300: #fdba74;
    --color-primary-400: #fb923c;
    --color-primary-500: #f97316;
    --color-primary-600: #ea580c;
    --color-primary-700: #c2410c;
    --color-primary-foreground: #ffffff;

    /* Secondary (Emerald) */
    --color-secondary: #10b981;
    --color-secondary-hover: #059669;
    --color-secondary-light: #ecfdf5;
    --color-secondary-50: #ecfdf5;
    --color-secondary-100: #d1fae5;
    --color-secondary-200: #a7f3d0;
    --color-secondary-300: #6ee7b7;
    --color-secondary-400: #34d399;
    --color-secondary-500: #10b981;
    --color-secondary-600: #059669;
    --color-secondary-700: #047857;
    --color-secondary-foreground: #ffffff;

    /* Neutral (Slate) */
    --color-slate-50: #f8fafc;
    --color-slate-100: #f1f5f9;
    --color-slate-200: #e2e8f0;
    --color-slate-300: #cbd5e1;
    --color-slate-400: #94a3b8;
    --color-slate-500: #64748b;
    --color-slate-600: #475569;
    --color-slate-700: #334155;
    --color-slate-800: #1e293b;
    --color-slate-900: #0f172a;
    --color-slate-950: #020617;

    /* Semantic */
    --color-background: #f8fafc;
    --color-foreground: #0f172a;
    --color-card: #ffffff;
    --color-card-foreground: #0f172a;
    --color-muted: #f1f5f9;
    --color-muted-foreground: #64748b;
    --color-border: #e2e8f0;
    --color-input-bg: #f8fafc;
    --color-destructive: #ef4444;
    --color-destructive-foreground: #ffffff;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-info: #3b82f6;

    /* ==========================================================================
       Typography
       ========================================================================== */
    --font-body: 'Rubik', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', Courier, monospace;

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

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

    /* Line Heights */
    --leading-none: 1;
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 1.75;

    /* ==========================================================================
       Spacing
       ========================================================================== */
    --space-0: 0;
    --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-7: 1.75rem;      /* 28px */
    --space-8: 2rem;         /* 32px */
    --space-9: 2.25rem;      /* 36px */
    --space-10: 2.5rem;      /* 40px */
    --space-12: 3rem;        /* 48px */
    --space-16: 4rem;        /* 64px */
    --space-20: 5rem;        /* 80px */
    --space-14: 3.5rem;      /* 56px */
    --space-24: 6rem;        /* 96px */

    /* ==========================================================================
       Layout
       ========================================================================== */
    --container-max: 80rem;  /* 1280px (max-w-7xl) */
    --container-padding: 1rem;
    --header-height: 4rem;   /* 64px (h-16) */
    --sidebar-width: 16rem;  /* 256px (w-64) */

    /* ==========================================================================
       Borders & Radius
       ========================================================================== */
    --radius-sm: 0.25rem;    /* 4px */
    --radius-md: 0.375rem;   /* 6px */
    --radius-lg: 0.5rem;     /* 8px */
    --radius-xl: 0.75rem;    /* 12px */
    --radius-2xl: 1rem;      /* 16px */
    --radius-full: 9999px;

    /* ==========================================================================
       Shadows
       ========================================================================== */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --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 rgb(0 0 0 / 0.25);

    /* ==========================================================================
       Transitions
       ========================================================================== */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;

    /* ==========================================================================
       Z-Index Scale
       ========================================================================== */
    --z-dropdown: 10;
    --z-sticky: 50;
    --z-fixed: 30;
    --z-overlay: 40;
    --z-modal: 50;
    --z-toast: 60;
}

/* ==========================================================================
   Dark Mode
   ========================================================================== */
.dark {
    --color-background: #0f172a;
    --color-foreground: #f8fafc;
    --color-card: #1e293b;
    --color-card-foreground: #f8fafc;
    --color-muted: #334155;
    --color-muted-foreground: #94a3b8;
    --color-border: #334155;
    --color-input-bg: #334155;
}

/* ==========================================================================
   Responsive Container Padding
   ========================================================================== */
@media (min-width: 640px) {
    :root {
        --container-padding: 1.5rem;
    }
}

@media (min-width: 1024px) {
    :root {
        --container-padding: 2rem;
    }
}
