/* ===================================
   DESIGN TOKENS — СИСТЕМА ДИЗАЙНА
   =================================== */

:root {
    /* ===================================
       ЦВЕТА — ФОНЫ
       =================================== */

    --color-bg-primary: #0A0A0A;        /* Основной тёмный фон */
    --color-bg-secondary: #121212;      /* Sidebar фон */
    --color-bg-tertiary: #1A1A1A;       /* Вторичные тёмные элементы */
    --color-bg-surface: #FFFFFF;        /* Белые карточки и поверхности */
    --color-bg-overlay: #1E1E1E;        /* Фон для модалок */
    --color-bg-hover: #F9FAFB;          /* Hover состояние на светлом фоне */
    --color-bg-disabled: #F3F4F6;       /* Disabled состояние */

    /* ===================================
       ЦВЕТА — ГРАНИЦЫ
       =================================== */

    --color-border-dark: #2A2A2A;       /* Границы на тёмном фоне */
    --color-border-light: #E5E7EB;      /* Границы на светлом фоне */
    --color-border-hover: #D1D5DB;      /* Границы при hover */

    /* ===================================
       ЦВЕТА — ТЕКСТ
       =================================== */

    --color-text-primary: #FFFFFF;      /* Белый текст на тёмном */
    --color-text-dark: #111827;         /* Тёмный текст на светлом */
    --color-text-secondary: #6B7280;    /* Вторичный текст (labels) */
    --color-text-muted: #9CA3AF;        /* Приглушённый текст */
    --color-text-disabled: #D1D5DB;     /* Disabled текст */

    /* ===================================
       ЦВЕТА — АКЦЕНТЫ
       =================================== */

    --color-primary: #F59E0B;           /* Основной оранжевый */
    --color-primary-hover: #D97706;     /* Hover для оранжевого */
    --color-primary-light: rgba(245, 158, 11, 0.1); /* Светлый оттенок */

    --color-success: #10B981;           /* Зелёный (успех) */
    --color-success-hover: #059669;     /* Hover для зелёного */
    --color-success-light: rgba(16, 185, 129, 0.1); /* Светлый оттенок */

    --color-error: #EF4444;             /* Красный (ошибка) */
    --color-error-hover: #DC2626;       /* Hover для ошибки */
    --color-error-light: rgba(239, 68, 68, 0.1); /* Светлый оттенок */

    --color-warning: #F59E0B;           /* Оранжевый (предупреждение) */
    --color-warning-hover: #D97706;     /* Hover для предупреждения */
    --color-warning-light: rgba(245, 158, 11, 0.1); /* Светлый оттенок */

    --color-info: #3B82F6;              /* Синий (информация) */
    --color-info-hover: #2563EB;        /* Hover для инфо */
    --color-info-light: rgba(59, 130, 246, 0.1); /* Светлый оттенок */

    /* ===================================
       ЦВЕТА — ГРАДИЕНТЫ
       =================================== */

    --gradient-avatar: linear-gradient(135deg, #3B82F6, #22C55E);
    --gradient-highlight: linear-gradient(135deg, #F59E0B, #FBBF24);

    /* ===================================
       ТИПОГРАФИКА — ШРИФТЫ
       =================================== */

    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    --font-family-mono: 'Monaco', 'Courier New', monospace;

    /* ===================================
       ТИПОГРАФИКА — РАЗМЕРЫ
       =================================== */

    --font-size-xs: 11px;               /* Мелкие labels */
    --font-size-sm: 12px;               /* Маленький текст */
    --font-size-base: 14px;             /* Базовый размер */
    --font-size-lg: 16px;               /* Крупный текст */
    --font-size-xl: 18px;               /* Субзаголовки */
    --font-size-2xl: 24px;              /* Заголовки страниц */
    --font-size-3xl: 28px;              /* Крупные заголовки */
    --font-size-4xl: 32px;              /* Очень крупные */

    /* ===================================
       ТИПОГРАФИКА — ВЕСА
       =================================== */

    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* ===================================
       ТИПОГРАФИКА — ВЫСОТА СТРОК
       =================================== */

    --line-height-tight: 1.2;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.6;
    --line-height-loose: 1.8;

    /* ===================================
       ТИПОГРАФИКА — LETTER SPACING
       =================================== */

    --letter-spacing-tight: -0.02em;
    --letter-spacing-normal: 0;
    --letter-spacing-wide: 0.025em;
    --letter-spacing-wider: 0.05em;

    /* ===================================
       SPACING — ОТСТУПЫ
       =================================== */

    --space-0: 0;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 28px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;

    /* ===================================
       BORDER RADIUS — СКРУГЛЕНИЯ
       =================================== */

    --radius-none: 0;
    --radius-sm: 4px;
    --radius-base: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 12px;
    --radius-2xl: 16px;
    --radius-full: 9999px;              /* Круглые элементы */

    /* ===================================
       SHADOWS — ТЕНИ
       =================================== */

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-base: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.25);
    --shadow-primary: 0 4px 16px rgba(245, 158, 11, 0.3);
    --shadow-primary-lg: 0 8px 24px rgba(245, 158, 11, 0.4);

    /* ===================================
       TRANSITIONS — АНИМАЦИИ
       =================================== */

    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;

    /* Специфичные свойства для transition */
    --transition-colors: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    --transition-transform: transform 0.2s ease;
    --transition-opacity: opacity 0.2s ease;
    --transition-shadow: box-shadow 0.2s ease;
    --transition-all-fast: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
    --transition-all-base: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;

    /* ===================================
       Z-INDEX — СЛОИ
       =================================== */

    --z-index-base: 1;
    --z-index-dropdown: 100;
    --z-index-sticky: 200;
    --z-index-fixed: 500;
    --z-index-modal-backdrop: 1000;
    --z-index-modal: 1001;
    --z-index-tooltip: 2000;

    /* ===================================
       BREAKPOINTS (для JS)
       =================================== */

    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
    --breakpoint-2xl: 1536px;
}

/* ===================================
   UTILITY CLASSES — ВСПОМОГАТЕЛЬНЫЕ КЛАССЫ
   =================================== */

/* Скрыть визуально, но оставить для screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Базовые классы для focus */
.focus-ring:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.focus-ring-inset:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: -2px;
}
