/**
 * CSS Variables - Система дизайна
 * Тёмная/светлая тема, цвета, размеры, тени
 */

:root {
  /* === Цветовая палитра === */
  
  /* Primary - Глубокий синий */
  --color-primary-50: #e8f4fc;
  --color-primary-100: #c5e3f6;
  --color-primary-200: #9ed1f0;
  --color-primary-300: #77bfe9;
  --color-primary-400: #5ab0e4;
  --color-primary-500: #3da1df;
  --color-primary-600: #3791c9;
  --color-primary-700: #2f7dad;
  --color-primary-800: #276a92;
  --color-primary-900: #1a4a66;
  
  /* Secondary - Изумрудный */
  --color-secondary-50: #e6f7f1;
  --color-secondary-100: #c2ebdb;
  --color-secondary-200: #99dec4;
  --color-secondary-300: #70d1ac;
  --color-secondary-400: #51c79a;
  --color-secondary-500: #32bd88;
  --color-secondary-600: #2dac7b;
  --color-secondary-700: #26986b;
  --color-secondary-800: #20845c;
  --color-secondary-900: #156240;
  
  /* Accent - Янтарный */
  --color-accent-50: #fff8e6;
  --color-accent-100: #ffecbf;
  --color-accent-200: #ffe094;
  --color-accent-300: #ffd469;
  --color-accent-400: #ffca48;
  --color-accent-500: #ffc028;
  --color-accent-600: #ffb300;
  --color-accent-700: #ffa200;
  --color-accent-800: #ff9100;
  --color-accent-900: #ff7100;
  
  /* Danger - Коралловый */
  --color-danger-50: #ffebee;
  --color-danger-100: #ffcdd2;
  --color-danger-200: #ef9a9a;
  --color-danger-300: #e57373;
  --color-danger-400: #ef5350;
  --color-danger-500: #f44336;
  --color-danger-600: #e53935;
  --color-danger-700: #d32f2f;
  --color-danger-800: #c62828;
  --color-danger-900: #b71c1c;
  
  /* Warning - Оранжевый */
  --color-warning-50: #fff3e0;
  --color-warning-100: #ffe0b2;
  --color-warning-200: #ffcc80;
  --color-warning-300: #ffb74d;
  --color-warning-400: #ffa726;
  --color-warning-500: #ff9800;
  --color-warning-600: #fb8c00;
  --color-warning-700: #f57c00;
  --color-warning-800: #ef6c00;
  --color-warning-900: #e65100;
  
  /* Success - Зелёный */
  --color-success-50: #e8f5e9;
  --color-success-100: #c8e6c9;
  --color-success-200: #a5d6a7;
  --color-success-300: #81c784;
  --color-success-400: #66bb6a;
  --color-success-500: #4caf50;
  --color-success-600: #43a047;
  --color-success-700: #388e3c;
  --color-success-800: #2e7d32;
  --color-success-900: #1b5e20;
  
  /* Neutral - Серая палитра */
  --color-neutral-50: #fafafa;
  --color-neutral-100: #f5f5f5;
  --color-neutral-200: #eeeeee;
  --color-neutral-300: #e0e0e0;
  --color-neutral-400: #bdbdbd;
  --color-neutral-500: #9e9e9e;
  --color-neutral-600: #757575;
  --color-neutral-700: #616161;
  --color-neutral-800: #424242;
  --color-neutral-900: #212121;
  
  /* === Размеры === */
  --spacing-0: 0;
  --spacing-1: 0.25rem;
  --spacing-2: 0.5rem;
  --spacing-3: 0.75rem;
  --spacing-4: 1rem;
  --spacing-5: 1.25rem;
  --spacing-6: 1.5rem;
  --spacing-8: 2rem;
  --spacing-10: 2.5rem;
  --spacing-12: 3rem;
  --spacing-16: 4rem;
  --spacing-20: 5rem;
  
  /* === Радиусы === */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;
  
  /* === Тени === */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --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);
  
  /* === Типографика === */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  
  --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;
  --text-4xl: 2.25rem;
  
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  
  /* === Анимации === */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
  
  /* === Z-Index === */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-toast: 1080;
}

/* === ТЁМНАЯ ТЕМА (по умолчанию) === */
[data-theme="dark"], :root {
  --bg-primary: #0f1419;
  --bg-secondary: #15202b;
  --bg-tertiary: #1c2938;
  --bg-elevated: #22303c;
  --bg-hover: #2a3a4a;
  --bg-active: #324a5c;
  
  --text-primary: #ffffff;
  --text-secondary: #8899a6;
  --text-tertiary: #6e7c87;
  --text-muted: #536471;
  
  --border-color: #38444d;
  --border-light: #2f3b47;
  --border-focus: var(--color-primary-500);
  
  --input-bg: #15202b;
  --input-border: #38444d;
  --input-focus-bg: #1c2938;
  
  --card-bg: #15202b;
  --card-border: #38444d;
  
  --sidebar-bg: #15202b;
  --sidebar-border: #38444d;
  --sidebar-item-hover: #1c2938;
  --sidebar-item-active: var(--color-primary-900);
  
  --shadow-color: rgba(0, 0, 0, 0.5);
}

/* === СВЕТЛАЯ ТЕМА === */
[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f7f9fa;
  --bg-tertiary: #eff3f4;
  --bg-elevated: #ffffff;
  --bg-hover: #f0f3f5;
  --bg-active: #e7ebec;
  
  --text-primary: #0f1419;
  --text-secondary: #536471;
  --text-tertiary: #6e7c87;
  --text-muted: #8899a6;
  
  --border-color: #cfd9de;
  --border-light: #eff3f4;
  --border-focus: var(--color-primary-500);
  
  --input-bg: #ffffff;
  --input-border: #cfd9de;
  --input-focus-bg: #ffffff;
  
  --card-bg: #ffffff;
  --card-border: #eff3f4;
  
  --sidebar-bg: #f7f9fa;
  --sidebar-border: #eff3f4;
  --sidebar-item-hover: #eff3f4;
  --sidebar-item-active: var(--color-primary-100);
  
  --shadow-color: rgba(0, 0, 0, 0.1);
}
