/* ========================================
   Integrity - Theme Variables
   ======================================== */

:root {
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    --space-16: 4rem;

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

    /* Border Radius */
    --radius: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.15);

    /* Accent Colors (Always same) */
    --accent: #22c55e;
    --accent-hover: #16a34a;
    --accent-light: rgba(34, 197, 94, 0.1);
    --error: #ef4444;
    --error-light: rgba(239, 68, 68, 0.1);
    --success: #22c55e;
    --warning: #f59e0b;
}

/* Dark Theme (Default) */
:root,
[data-theme="dark"] {
    --bg-primary: #141414;
    --bg-secondary: #1c1c1c;
    --bg-tertiary: #262626;
    --bg-hover: #2a2a2a;
    
    --text-primary: #f5f5f5;
    --text-secondary: #a3a3a3;
    --text-muted: #737373;
    
    --border: #333333;
    --border-light: #2a2a2a;
    
    --input-bg: #1c1c1c;
    --card-bg: #1c1c1c;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #e5e5e5;
    --bg-hover: #ebebeb;
    
    --text-primary: #171717;
    --text-secondary: #525252;
    --text-muted: #a3a3a3;
    
    --border: #e5e5e5;
    --border-light: #f0f0f0;
    
    --input-bg: #ffffff;
    --card-bg: #ffffff;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* System Theme Detection */
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]):not([data-theme="light"]) {
        --bg-primary: #ffffff;
        --bg-secondary: #f5f5f5;
        --bg-tertiary: #e5e5e5;
        --bg-hover: #ebebeb;
        
        --text-primary: #171717;
        --text-secondary: #525252;
        --text-muted: #a3a3a3;
        
        --border: #e5e5e5;
        --border-light: #f0f0f0;
        
        --input-bg: #ffffff;
        --card-bg: #ffffff;
        
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
        --shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
}
