/**
 * Master Chefs Design System Variables
 *
 * NAMING CONVENTIONS:
 * - Colors: --{color-name} or --{semantic-name}
 * - Spacing: --space-{1-12} (4px increments)
 * - Typography: --text-{size}
 * - Radius: --radius-{size}
 * - Shadows: --shadow-{size}
 */

:root {
    /* ========================================
       PRIMARY BRAND COLORS
       ======================================== */
    --primary: #00A67E;
    --primary-dark: #008B68;
    --primary-light: rgba(0, 166, 126, 0.1);
    --primary-rgb: 0, 166, 126;

    /* Secondary - Deep cyan for sidebar/dark UI */
    --secondary: #0B5465;
    --secondary-dark: #073844;
    --secondary-light: #0D7A8A;

    /* ========================================
       SEMANTIC COLORS
       ======================================== */
    --success: #10B981;
    --success-light: #D1FAE5;
    --success-dark: #059669;

    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --warning-dark: #D97706;

    --danger: #EF4444;
    --danger-light: #FEE2E2;
    --danger-dark: #DC2626;

    --info: #3B82F6;
    --info-light: #DBEAFE;
    --info-dark: #2563EB;

    /* Aliases for backward compatibility */
    --error: var(--danger);
    --error-light: var(--danger-light);

    /* ========================================
       NEUTRAL COLORS
       ======================================== */
    --white: #FFFFFF;
    --black: #000000;

    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;

    /* ========================================
       TEXT COLORS
       ======================================== */
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --text-on-primary: #FFFFFF;
    --text-on-dark: #FFFFFF;

    /* ========================================
       BACKGROUND COLORS
       ======================================== */
    --bg-page: #F3F4F6;
    --bg-subtle: #F9FAFB;
    --bg-card: #FFFFFF;
    --bg-sidebar: var(--secondary);
    --bg-header: #FFFFFF;
    --bg-hover: #F3F4F6;
    --bg-active: #E5E7EB;

    /* ========================================
       BORDER COLORS
       ======================================== */
    --border-color: #E5E7EB;
    --border-light: #E5E7EB;
    --border-medium: #D1D5DB;
    --border-dark: #9CA3AF;

    /* ========================================
       STAFF TIER COLORS
       ======================================== */
    --tier-green: #10B981;
    --tier-amber: #F59E0B;
    --tier-red: #EF4444;

    /* ========================================
       SPACING SCALE (4px base)
       ======================================== */
    --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-24: 6rem;     /* 96px */

    /* Legacy spacing aliases */
    --spacing-xs: var(--space-1);
    --spacing-sm: var(--space-2);
    --spacing-md: var(--space-4);
    --spacing-lg: var(--space-6);
    --spacing-xl: var(--space-8);
    --spacing-2xl: var(--space-12);

    /* ========================================
       TYPOGRAPHY
       ======================================== */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 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 */

    /* Legacy font size aliases */
    --font-size-xs: var(--text-xs);
    --font-size-sm: var(--text-sm);
    --font-size-base: var(--text-base);
    --font-size-lg: var(--text-lg);
    --font-size-xl: var(--text-xl);
    --font-size-2xl: var(--text-2xl);
    --font-size-3xl: var(--text-3xl);

    /* 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;

    /* ========================================
       BORDER RADIUS
       ======================================== */
    --radius-none: 0;
    --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-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --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.25);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);

    /* ========================================
       TRANSITIONS
       ======================================== */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;

    /* ========================================
       Z-INDEX LAYERS
       ======================================== */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal-backdrop: 300;
    --z-modal: 400;
    --z-toast: 500;

    /* ========================================
       LAYOUT
       ======================================== */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 64px;
    --header-height: 64px;
    --content-max-width: 1400px;
}

/* ========================================
   DARK MODE (future use)
   ======================================== */
@media (prefers-color-scheme: dark) {
    :root.auto-dark {
        --bg-page: #111827;
        --bg-subtle: #1F2937;
        --bg-card: #1F2937;
        --bg-hover: #374151;
        --text-primary: #F9FAFB;
        --text-secondary: #D1D5DB;
        --text-muted: #9CA3AF;
        --border-color: #374151;
        --border-light: #374151;
    }
}
