@tailwind base;
@tailwind components;
@tailwind utilities;

/* --- OMEGAHIRE DESIGN SYSTEM v3.0 (Premium & Accessible) --- */
:root {
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    
    /* Layout (не зависят от темы) */
    --sidebar-width: 260px;
    --header-height: 70px;
    
    /* Typography (не зависят от темы) */
    --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    
    /* ============================================
       SPACING SYSTEM (Standardized)
       ============================================ */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    --spacing-3xl: 64px;
    
    /* ============================================
       BREAKPOINTS (Standardized)
       ============================================ */
    /* Mobile: <576px - Small mobile devices */
    /* Tablet: <992px - Tablets and small laptops */
    /* Desktop: >=992px - Desktop and large screens */
    
    /* Breakpoint values for use in media queries */
    --breakpoint-mobile: 576px;
    --breakpoint-tablet: 992px;
    --breakpoint-desktop: 992px; /* Desktop starts at tablet breakpoint */
}

/* CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 1. LIGHT THEME: "Platinum Business" */
[data-theme="light"] {
    /* Фоны: Чуть прохладнее, "Tech" white */
    --bg-page: #F0F4F8;       /* Cooler vibe с едва заметным голубым подтоном */
    --bg-card: #FFFFFF;
    --bg-sidebar: #FFFFFF;
    --bg-input: #F8FAFC;
    --bg-hover: #F1F5F9;

    /* Текст: Контрастный Navy */
    --text-primary: #0F172A;    /* Deep Navy (вместо черного) */
    --text-secondary: #334155;  /* Насыщенный серый */
    --text-tertiary: #64748B;   /* Мета-данные */
    --text-inverse: #FFFFFF;    /* Текст на кнопке */

    /* Акценты */
    --accent-primary: #2563EB;  /* Royal Blue */
    --accent-hover: #1D4ED8;
    --gradient-primary: linear-gradient(135deg, #2563EB 0%, #4F46E5 100%); /* Blue -> Indigo */

    /* Элементы интерфейса */
    --border-color: #E2E8F0;    /* Очень светлая граница */
    /* Самое важное: ЦВЕТНАЯ ТЕНЬ вместо серой (5-8% синего цвета в тени) */
    --shadow-card: 0 4px 6px -1px rgba(37, 99, 235, 0.08), 0 10px 15px -3px rgba(37, 99, 235, 0.05);
    --shadow-glow: none;
    
    /* Теги (Chips): Blue-50 вместо серого */
    --bg-chip: #EFF6FF;  /* Blue-50 */
    --text-chip: #1E40AF;  /* Blue-800 */
    --border-chip: #DBEAFE;  /* Blue-100 */
    
    /* Активное состояние сайдбара */
    --bg-sidebar-active: #EFF6FF;  /* Blue-50 */
    --text-sidebar-active: #2563EB;  /* Royal Blue */
    --border-sidebar-active: #2563EB;  /* Royal Blue */
    
    --glass-blur: 0px; /* Стекло выключено для чистоты */
    
    /* Обратная совместимость */
    --bg-primary: var(--bg-page);
    --bg-secondary: var(--bg-card);
    --bg-glass: rgba(255, 255, 255, 0.7);
    --text-main: var(--text-primary);
    --text-muted: var(--text-tertiary);
    --accent-primary: var(--accent-primary);
    --accent-glow: 0 4px 12px rgba(37, 99, 235, 0.2);
    --color-bg-primary: var(--bg-page);
    --color-bg-surface: var(--bg-card);
    --color-bg-surface-2: var(--bg-hover);
    --color-accent-gold: var(--accent-primary);
    --gradient-gold: var(--gradient-primary, linear-gradient(135deg, #2563eb 0%, #1e40af 100%));
    --effect-gold-glow: var(--shadow-glow);
    --color-text-heading: var(--text-primary);
    --color-text-primary: var(--text-secondary);
    --color-text-muted: var(--text-tertiary);
    --transition-speed: var(--transition-base);
    --radius-button: var(--radius-sm);
    --radius-card: var(--radius-lg);
}

/* --- LIGHT THEME FIXES & SIDEBAR UPGRADE --- */
/* 1. ЦВЕТНЫЕ ЗАГОЛОВКИ (Platinum Business Style) */
/* H1 - основной заголовок: темно-синий с легким синим оттенком */
[data-theme="light"] h1 {
    color: #1E3A8A !important; /* Blue-900 - глубокий синий для важности */
    font-weight: 700;
}

/* H2 - подзаголовки: королевский синий */
[data-theme="light"] h2,
[data-theme="light"] .page-title {
    color: #1E40AF !important; /* Blue-800 - яркий синий для заметности */
    font-weight: 600;
}

/* H3 - секционные заголовки: средний синий */
[data-theme="light"] h3 {
    color: #2563EB !important; /* Royal Blue - акцентный синий */
    font-weight: 600;
}

/* H4-H6 - меньшие заголовки: темно-синий с легким оттенком */
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6 {
    color: #1E3A8A !important; /* Blue-900 */
    font-weight: 600;
}

/* Перехватываем класс text-white для светлой темы */
[data-theme="light"] .text-white:not(.btn-primary *):not(.btn-primary) {
    color: #1E40AF !important; /* Используем синий вместо белого */
}

/* Исключение: Текст внутри синих кнопок должен остаться белым */
[data-theme="light"] .btn-primary {
    color: #FFFFFF !important;
}
[data-theme="light"] .btn-primary .text-white,
[data-theme="light"] .btn-primary * {
    color: #FFFFFF !important;
}

/* 2. ЦВЕТНЫЕ ССЫЛКИ И АКЦЕНТЫ */
/* Усиливаем синий цвет ссылок для лучшей видимости */
[data-theme="light"] a:not(.btn):not(.nav-item):not(.contact-chip) {
    color: #2563EB !important; /* Royal Blue */
    font-weight: 500;
    transition: color 0.2s ease;
}

[data-theme="light"] a:not(.btn):not(.nav-item):not(.contact-chip):hover {
    color: #1D4ED8 !important; /* Blue-700 - более темный при наведении */
    text-decoration: underline;
}

/* Акцентный текст (выделенный) */
[data-theme="light"] strong,
[data-theme="light"] b,
[data-theme="light"] .label-text,
[data-theme="light"] .info-label {
    color: #1E40AF !important; /* Blue-800 для выделенного текста */
    font-weight: 600;
}

/* 2. УЛУЧШЕНИЕ САЙДБАРА (MENUS) */
/* Делаем его более "Tech" и менее скучным */

/* Контейнер сайдбара */
[data-theme="light"] .app-sidebar {
    background-color: #FFFFFF;
    border-right: 1px solid #E2E8F0;
    box-shadow: 4px 0 24px -4px rgba(0, 0, 0, 0.02); /* Очень легкая тень справа */
}

/* Пункты меню */
[data-theme="light"] .nav-item {
    color: #64748B !important; /* Slate-500: Неактивные пункты */
    border-radius: 8px; /* Скругление */
    transition: all 0.2s ease;
    margin-bottom: 4px;
    position: relative;
    border: 1px solid transparent; /* Чтобы не скакало при ховере */
    border-left: 3px solid transparent;
}

[data-theme="light"] .nav-item:hover {
    background-color: #F8FAFC !important; /* Slate-50 */
    color: #334155 !important;
}

/* АКТИВНЫЙ пункт меню (Tech Style) */
[data-theme="light"] .nav-item.active {
    background-color: #EFF6FF !important; /* Blue-50 */
    color: #2563EB !important; /* Royal Blue */
    font-weight: 600;
    border: 1px solid #DBEAFE !important; /* Blue-100 Border */
    border-left: 3px solid #2563EB !important; /* Royal Blue левая граница */
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.05);
}

/* Иконки в меню */
[data-theme="light"] .nav-item svg, 
[data-theme="light"] .nav-item i {
    color: #94A3B8; /* Неактивная иконка */
}
[data-theme="light"] .nav-item.active svg, 
[data-theme="light"] .nav-item.active i {
    color: #2563EB !important; /* Активная иконка - Ярко синяя */
}

/* 3. КНОПКИ ДЕЙСТВИЙ (Secondary) */
/* Чтобы они не были белыми на белом */
[data-theme="light"] .btn-secondary {
    background-color: #FFFFFF !important;
    border: 1px solid #CBD5E1 !important;
    color: #334155 !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

[data-theme="light"] .btn-secondary:hover {
    background-color: #F8FAFC !important;
    border-color: #2563EB !important;
    color: #2563EB !important;
}

/* 4. ДОПОЛНИТЕЛЬНЫЕ ЦВЕТОВЫЕ АКЦЕНТЫ ДЛЯ ТЕКСТА */
/* Метаданные и подсказки - легкий синий оттенок */
[data-theme="light"] .text-muted,
[data-theme="light"] .meta-text,
[data-theme="light"] .hint-text,
[data-theme="light"] small {
    color: #475569 !important; /* Slate-600 с легким синим подтоном */
}

/* Идентификаторы (ID, номера) - синий акцент */
[data-theme="light"] .vacancy-id,
[data-theme="light"] .job-id,
[data-theme="light"] .candidate-id,
[data-theme="light"] .id-text {
    color: #2563EB !important; /* Royal Blue для идентификаторов */
    font-weight: 600;
}

/* Подзаголовки секций */
[data-theme="light"] .section-title:not([data-original-title="Контакты"]) {
    color: #1E40AF !important; /* Blue-800 */
}

/* Заголовки в карточках */
[data-theme="light"] .card h2,
[data-theme="light"] .card h3 {
    color: #1E40AF !important; /* Blue-800 */
}

/* Основной текст - сохраняем читаемость, но добавляем легкий оттенок */
[data-theme="light"] .text-secondary {
    color: #334155 !important; /* Slate-700 - насыщенный серый, читаемый */
}

/* --- ЛОГОТИП: Круглый градиентный фон для светлой темы --- */
/* Контейнер логотипа с круглым градиентным фоном */
[data-theme="light"] .omega-symbol {
    background: radial-gradient(circle at 30% 30%, #3B82F6, #2563EB) !important;
    border-radius: 50% !important;
    box-shadow: 
        0 4px 14px rgba(37, 99, 235, 0.3),
        0 0 0 2px rgba(255, 255, 255, 0.8) inset !important;
    padding: 6px !important;
    width: 64px !important; /* Увеличенный размер */
    height: 64px !important; /* Увеличенный размер */
}

/* Изображение логотипа с тенью для контраста */
[data-theme="light"] .omega-symbol img {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15)) !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

/* Убираем золотое свечение в светлой теме, заменяем на синюю тень */
[data-theme="light"] .omega-text {
    text-shadow: 
        0 2px 4px rgba(37, 99, 235, 0.2),
        0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

/* 2. DIM THEME: "Midnight Cyberpunk" */
[data-theme="dim"] {
    --bg-page: #0F172A;         /* Slate-900 */
    --bg-card: rgba(30, 41, 59, 0.75);
    --bg-sidebar: rgba(15, 23, 42, 0.95);
    --bg-input: rgba(15, 23, 42, 0.6);
    --bg-hover: rgba(51, 65, 85, 0.5);

    /* Типографика */
    --text-primary: #FFFFFF;     /* Чистый белый для заголовков */
    --text-secondary: #E2E8F0;   /* Slate-200 для основного текста */
    --text-tertiary: #94A3B8;    /* Slate-400 для мета-данных */
    --text-inverse: #FFFFFF;

    /* Акценты */
    --accent-primary: #A78BFA;   /* Светло-фиолетовый */
    --accent-hover: #8B5CF6;
    --gradient-primary: linear-gradient(135deg, #A78BFA 0%, #8B5CF6 100%);

    /* Элементы интерфейса */
    --border-color: rgba(139, 92, 246, 0.3);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(167, 139, 250, 0.3);
    
    /* Теги (Chips) */
    --bg-chip: rgba(167, 139, 250, 0.15);
    --text-chip: #C4B5FD;
    --border-chip: rgba(167, 139, 250, 0.3);
    
    /* Glassmorphism */
    --glass-blur: 16px;
    
    /* Активное состояние сайдбара */
    --bg-sidebar-active: rgba(167, 139, 250, 0.15);
    --text-sidebar-active: #A78BFA;
    --border-sidebar-active: #A78BFA;
    
    /* Обратная совместимость */
    --bg-primary: var(--bg-page);
    --bg-secondary: var(--bg-card);
    --bg-glass: var(--bg-card);
    --text-main: var(--text-primary);
    --text-muted: var(--text-tertiary);
    --accent-glow: var(--shadow-glow);
    --color-bg-primary: var(--bg-page);
    --color-bg-surface: var(--bg-card);
    --color-bg-surface-2: var(--bg-hover);
    --color-accent-gold: var(--accent-primary);
    --gradient-gold: linear-gradient(135deg, #A78BFA 0%, #8B5CF6 100%);
    --effect-gold-glow: var(--shadow-glow);
    --color-text-heading: var(--text-primary);
    --color-text-primary: var(--text-secondary);
    --color-text-muted: var(--text-tertiary);
    --transition-speed: var(--transition-base);
    --radius-button: var(--radius-sm);
    --radius-card: var(--radius-lg);
}

/* --- DIM & DARK THEME FIXES --- */
/* Заголовки должны быть белыми в темных темах */
[data-theme="dim"] h1,
[data-theme="dim"] h2,
[data-theme="dim"] .page-title,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] .page-title {
    color: #FFFFFF !important;
}

/* 3. DARK THEME: "Obsidian Stealth" */
[data-theme="dark"] {
    --bg-page: #121212;          /* Deep Black */
    --bg-card: #1E1E1E;
    --bg-sidebar: #1A1A1A;
    --bg-input: #272727;
    --bg-hover: #2C2C2C;

    /* Типографика */
    --text-primary: #FFFFFF;     /* Белый для заголовков */
    --text-secondary: #E5E5E5;   /* Neutral-200 для основного текста */
    --text-tertiary: #FFFFFF;    /* Neutral-400 для мета-данных */
    --text-inverse: #000000;     /* Черный на Cyan кнопке */

    /* Акценты */
    --accent-primary: #00E5FF;   /* Cyan */
    --accent-hover: #00B8D4;
    --gradient-primary: linear-gradient(135deg, #00E5FF 0%, #00B8D4 100%);

    /* Элементы интерфейса */
    --border-color: #333333;
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(0, 229, 255, 0.5);
    
    /* Теги (Chips) */
    --bg-chip: rgba(0, 229, 255, 0.15);
    --text-chip: #5DD5F4;
    --border-chip: rgba(0, 229, 255, 0.3);
    
    --glass-blur: 0px;
    
    /* Активное состояние сайдбара */
    --bg-sidebar-active: rgba(0, 229, 255, 0.15);
    --text-sidebar-active: #00E5FF;
    --border-sidebar-active: #00E5FF;
    
    /* Обратная совместимость - сохраняем оригинальные значения для темной темы */
    --bg-primary: var(--bg-page);
    --bg-secondary: var(--bg-card);
    --bg-glass: rgba(18, 18, 18, 0.6);
    --text-main: var(--text-primary);
    --text-muted: var(--text-tertiary);
    --accent-glow: var(--shadow-glow);
    --color-bg-primary: #0A1929;           /* Основной фон (deep dark blue) */
    --color-bg-surface: #1F4E79;            /* Фон поверхностей/карточек */
    --color-bg-surface-2: #183E62;          /* Темный фон для сайдбаров/инпутов */
    --color-accent-gold: #FFD700;           /* Акцентный золотой (для CTA) */
    --gradient-gold: linear-gradient(135deg, #FFD700 0%, #E6C200 100%);
    --effect-gold-glow: 0px 0px 15px rgba(255, 215, 0, 0.5);
    --color-text-heading: var(--text-primary);
    --color-text-primary: #AAB8C5;          /* Цвет основного текста */
    --color-text-muted: #FFFFFF;
    --transition-speed: var(--transition-base);
    --radius-button: var(--radius-sm);
    --radius-card: var(--radius-lg);
}

[data-theme="dark"] .text-muted,
[data-theme="dark"] .meta-text,
[data-theme="dark"] .hint-text,
[data-theme="dark"] small {
    color: #FFFFFF !important;
}

/* Force text palette for dark-like themes */
[data-theme="dark"],
[data-theme="dim"],
[data-theme="system"] {
    color: #FFFFFF;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6,
[data-theme="dark"] p,
[data-theme="dark"] span,
[data-theme="dark"] a,
[data-theme="dark"] label,
[data-theme="dark"] .text-heading,
[data-theme="dark"] .card-title,
[data-theme="dark"] .text-muted,
[data-theme="dark"] .meta-text,
[data-theme="dark"] .hint-text,
[data-theme="dim"] h1,
[data-theme="dim"] h2,
[data-theme="dim"] h3,
[data-theme="dim"] h4,
[data-theme="dim"] h5,
[data-theme="dim"] h6,
[data-theme="dim"] p,
[data-theme="dim"] span,
[data-theme="dim"] a,
[data-theme="dim"] label,
[data-theme="dim"] .text-heading,
[data-theme="dim"] .card-title,
[data-theme="dim"] .text-muted,
[data-theme="dim"] .meta-text,
[data-theme="dim"] .hint-text,
[data-theme="system"] h1,
[data-theme="system"] h2,
[data-theme="system"] h3,
[data-theme="system"] h4,
[data-theme="system"] h5,
[data-theme="system"] h6,
[data-theme="system"] p,
[data-theme="system"] span,
[data-theme="system"] a,
[data-theme="system"] label,
[data-theme="system"] .text-heading,
[data-theme="system"] .card-title,
[data-theme="system"] .text-muted,
[data-theme="system"] .meta-text,
[data-theme="system"] .hint-text {
    color: #FFFFFF !important;
}

[data-theme="light"] {
    color: #000000;
}

[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6,
[data-theme="light"] p,
[data-theme="light"] span,
[data-theme="light"] a,
[data-theme="light"] label,
[data-theme="light"] .text-heading,
[data-theme="light"] .card-title,
[data-theme="light"] .text-muted,
[data-theme="light"] .meta-text,
[data-theme="light"] .hint-text {
    color: #000000 !important;
}

/* ============================================
   БАЗОВЫЕ СТИЛИ
   ============================================ */
body {
    background-color: var(--bg-page);
    color: var(--text-secondary);
    font-family: var(--font-family-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition-base), color var(--transition-base);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* Links */
a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--accent-hover);
}

/* Buttons */
button,
.btn {
    border-radius: var(--radius-sm);
    font-family: var(--font-family-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary,
button[type="submit"] {
    background: var(--gradient-primary, linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-hover) 100%));
    color: var(--text-inverse);
    box-shadow: var(--shadow-card);
}

.btn-primary:hover,
button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    filter: brightness(1.1);
}

[data-theme="dark"] .btn-primary,
[data-theme="dark"] button[type="submit"] {
    background: var(--gradient-gold);
    color: #0A1929;
}

[data-theme="dark"] .btn-primary:hover,
[data-theme="dark"] button[type="submit"]:hover {
    box-shadow: var(--effect-gold-glow);
    background: #FFE066;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

/* Form Elements */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="file"],
textarea,
select {
    background-color: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-family: var(--font-family-primary);
    font-size: 1rem;
    width: 100%;
    transition: all var(--transition-base);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus {
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

[data-theme="dim"] input:focus,
[data-theme="dim"] textarea:focus,
[data-theme="dim"] select:focus {
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-tertiary);
}

/* Cards */
.card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

[data-theme="dim"] .card {
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

[data-theme="light"] .card {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.card-custom {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}


/* Admin users list */
.admin-users-card {
    background-color: var(--bg-card);
}

.admin-users-card .table-container,
.admin-users-card .table {
    background-color: var(--bg-card);
}

.admin-users-card .table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-primary);
}

.admin-users-card .table th {
    color: var(--text-secondary);
}

.admin-users-card .table td {
    color: var(--text-primary);
}


[data-theme="dark"] .admin-users-card,
[data-theme="dark"] .admin-users-card .table-container,
[data-theme="dark"] .admin-users-card .table {
    background-color: #000000;
}

/* Status Chips */
.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
    background: var(--bg-chip);
    color: var(--text-chip);
    border: 1px solid var(--border-chip);
}

.chip-success {
    background: rgba(46, 204, 113, 0.15);
    color: #2ECC71;
    border-color: rgba(46, 204, 113, 0.3);
}

.chip-warning {
    background: rgba(255, 159, 28, 0.15);
    color: #FF9F1C;
    border-color: rgba(255, 159, 28, 0.3);
}

.chip-error {
    background: rgba(231, 76, 60, 0.15);
    color: #E74C3C;
    border-color: rgba(231, 76, 60, 0.3);
}

.chip-neutral {
    background: var(--bg-chip);
    color: var(--text-chip);
    border-color: var(--border-chip);
}

/* Tables */
.table-container {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
}

th {
    padding: 1rem 1.5rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: background-color var(--transition-base);
}

tbody tr:hover td {
    background-color: var(--bg-hover);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Layout Components */
.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    z-index: 100;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.6);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    display: none;
    z-index: 95;
}

.sidebar-overlay.open {
    display: block;
}

body.sidebar-open {
    overflow: hidden;
}

[data-theme="dim"] .app-sidebar {
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.05em;
}

.sidebar-logo img {
    height: 32px;
    width: auto;
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all var(--transition-base);
    border-left: 3px solid transparent;
    gap: 0.75rem;
}

.nav-count {
    margin-left: auto;
    min-width: 22px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    color: #0A1929;
    background: var(--gradient-gold);
    box-shadow: var(--effect-gold-glow);
}


.nav-count-new {
    background: linear-gradient(135deg, #EF4444 0%, #F97316 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.35);
}

[data-theme="light"] .nav-count-new {
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}
[data-theme="light"] .nav-count {
    color: #1E293B;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.nav-item:hover {
    color: var(--text-primary);
    background-color: var(--bg-hover);
}

.nav-item.active {
    color: var(--text-sidebar-active, var(--text-primary));
    background-color: var(--bg-sidebar-active, var(--bg-hover));
    border-left-color: var(--border-sidebar-active, var(--accent-primary));
}

.nav-item.active i {
    color: var(--text-sidebar-active, var(--accent-primary));
}

/* Header */
.app-header {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--header-height);
    background-color: var(--bg-page);
    border-bottom: 1px solid var(--border-color);
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 2rem;
    transition: all var(--transition-base);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-right: auto;
}

.header-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header-admin-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(250, 204, 21, 0.12);
    border: 1px solid rgba(250, 204, 21, 0.35);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all var(--transition-base);
}

.header-admin-button:hover {
    background: rgba(250, 204, 21, 0.2);
    border-color: rgba(250, 204, 21, 0.6);
    color: var(--text-primary);
}


[data-theme="dim"] .app-header {
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

[data-theme="dark"] .app-header {
    background-color: rgba(10, 25, 41, 0.95);
}

.header-search {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.header-search input {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    padding-left: 2.5rem;
}

.header-search i {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.sidebar-toggle {
    display: none;
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
    cursor: pointer;
    position: relative;
}

.action-btn:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
    border-color: var(--text-secondary);
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    background-color: #E74C3C;
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-page);
}

/* App Main Content */
.app-main {
    margin-left: var(--sidebar-width);
    padding-top: var(--header-height);
    /* Используем стандартизированные spacing переменные */
    padding: calc(var(--header-height) + var(--spacing-lg)) var(--spacing-lg) var(--spacing-lg);
    min-height: 100vh;
}

.embed-view .app-sidebar,
.embed-view .app-header,
.embed-view .sidebar-overlay {
    display: none;
}

.embed-view .app-main {
    margin-left: 0;
    padding: var(--spacing-lg);
}

/* Utilities */
.text-gold { color: var(--color-accent-gold); }
.text-heading { color: var(--text-primary); }
.text-primary { color: var(--text-secondary); }
.text-muted { color: var(--text-tertiary); }
.text-accent { color: var(--accent-primary); }
.bg-surface { background-color: var(--bg-card); }
.bg-page { background-color: var(--bg-page); }
.glow-gold { box-shadow: var(--shadow-glow); }

/* --- SMART CONTACT CHIPS (Adaptive Contrast) --- */
/* Адаптивные цвета для максимальной читаемости во всех темах */

.contact-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none !important;
    border: 1px solid transparent;
}
.contact-chip:hover { 
    transform: translateY(-1px); 
}
.contact-chip i, 
.contact-chip svg {
    font-size: 1rem;
}

/* --- 1. EMAIL (Indigo) --- */
/* Light: Темно-синий текст на светлом */
[data-theme="light"] .contact-email {
    background-color: #EEF2FF; 
    color: #4338CA; /* Indigo-700 - Высокий контраст */
    border-color: #C7D2FE;
}
[data-theme="light"] .contact-email:hover {
    background-color: #E0E7FF;
}
/* Dark/Dim: Яркий Indigo текст для видимости */
[data-theme="dark"] .contact-email,
[data-theme="dim"] .contact-email {
    background-color: rgba(99, 102, 241, 0.15);
    color: #818CF8 !important; /* Indigo-400 - Яркий цветной текст как иконка! */
    border-color: rgba(99, 102, 241, 0.3);
}
[data-theme="dark"] .contact-email span,
[data-theme="dark"] .contact-email a,
[data-theme="dim"] .contact-email span,
[data-theme="dim"] .contact-email a {
    color: #818CF8 !important; /* Цветной текст для Email */
}

/* --- 2. TELEGRAM (Sky/Cyan) --- */
/* Light: Темно-голубой текст */
[data-theme="light"] .contact-tg {
    background-color: #F0F9FF;
    color: #0369A1; /* Sky-700 */
    border-color: #BAE6FD;
}
[data-theme="light"] .contact-tg:hover {
    background-color: #E0F2FE;
}
/* Dark/Dim: Яркий Циан текст */
[data-theme="dark"] .contact-tg,
[data-theme="dim"] .contact-tg {
    background-color: rgba(56, 189, 248, 0.15);
    color: #38BDF8 !important; /* Sky-400 - Яркий циан как иконка! */
    border-color: rgba(56, 189, 248, 0.3);
}
[data-theme="dark"] .contact-tg span,
[data-theme="dark"] .contact-tg a,
[data-theme="dim"] .contact-tg span,
[data-theme="dim"] .contact-tg a {
    color: #38BDF8 !important; /* Цветной текст для Telegram */
}

/* --- 3. PHONE (Emerald) --- */
/* Light: Темно-зеленый текст */
[data-theme="light"] .contact-phone {
    background-color: #ECFDF5;
    color: #15803D; /* Emerald-700 */
    border-color: #A7F3D0;
}
[data-theme="light"] .contact-phone:hover {
    background-color: #D1FAE5;
}
/* Dark/Dim: Яркий зеленый текст */
[data-theme="dark"] .contact-phone,
[data-theme="dim"] .contact-phone {
    background-color: rgba(52, 211, 153, 0.15);
    color: #34D399 !important; /* Emerald-400 - Яркий зеленый как иконка! */
    border-color: rgba(52, 211, 153, 0.3);
}
[data-theme="dark"] .contact-phone span,
[data-theme="dark"] .contact-phone a,
[data-theme="dim"] .contact-phone span,
[data-theme="dim"] .contact-phone a {
    color: #34D399 !important; /* Цветной текст для Phone */
}

/* --- 4. LINKEDIN (Blue) --- */
[data-theme="light"] .contact-linkedin {
    background-color: #EFF6FF;
    color: #1D4ED8;
    border-color: #DBEAFE;
}
[data-theme="light"] .contact-linkedin:hover {
    background-color: #DBEAFE;
}
[data-theme="dim"] .contact-linkedin,
[data-theme="dark"] .contact-linkedin {
    background-color: rgba(37, 99, 235, 0.15);
    color: #60A5FA !important; /* Blue-400 - Яркий синий для читаемости */
    border-color: rgba(37, 99, 235, 0.3);
}
[data-theme="dark"] .contact-linkedin span,
[data-theme="dark"] .contact-linkedin a,
[data-theme="dim"] .contact-linkedin span,
[data-theme="dim"] .contact-linkedin a {
    color: #60A5FA !important; /* Цветной текст для LinkedIn */
}

/* --- КОНТАКТЫ В ОБЫЧНЫХ КОНТЕЙНЕРАХ (для списков кандидатов) --- */
/* Стили для контактов, которые отображаются в div с иконками */

/* --- СВЕТЛАЯ ТЕМА: Цветные иконки и текст --- */
/* Email иконки - Indigo */
[data-theme="light"] .bi-envelope,
[data-theme="light"] .bi-envelope-fill {
    color: #6366F1 !important; /* Indigo-500 - яркий индиго для светлого фона */
}

/* Telegram иконки - Sky/Cyan */
[data-theme="light"] .bi-telegram {
    color: #0EA5E9 !important; /* Sky-500 - яркий голубой */
}

/* Phone иконки - Emerald */
[data-theme="light"] .bi-telephone,
[data-theme="light"] .bi-telephone-fill,
[data-theme="light"] .bi-phone,
[data-theme="light"] .bi-phone-fill {
    color: #10B981 !important; /* Emerald-500 - яркий зеленый */
}

/* LinkedIn иконки - Blue */
[data-theme="light"] .bi-linkedin {
    color: #2563EB !important; /* Blue-600 - Royal Blue */
}

/* Email текст рядом с иконками */
[data-theme="light"] .bi-envelope + span,
[data-theme="light"] .bi-envelope ~ span,
[data-theme="light"] .bi-envelope-fill + span,
[data-theme="light"] .bi-envelope-fill ~ span {
    color: #6366F1 !important; /* Indigo-500 - соответствует иконке */
}

/* Telegram текст рядом с иконками */
[data-theme="light"] .bi-telegram + span,
[data-theme="light"] .bi-telegram ~ span {
    color: #0EA5E9 !important; /* Sky-500 - соответствует иконке */
}

/* Phone текст рядом с иконками */
[data-theme="light"] .bi-telephone + span,
[data-theme="light"] .bi-telephone ~ span,
[data-theme="light"] .bi-telephone-fill + span,
[data-theme="light"] .bi-telephone-fill ~ span,
[data-theme="light"] .bi-phone + span,
[data-theme="light"] .bi-phone ~ span,
[data-theme="light"] .bi-phone-fill + span,
[data-theme="light"] .bi-phone-fill ~ span {
    color: #10B981 !important; /* Emerald-500 - соответствует иконке */
}

/* --- ТЕМНЫЕ ТЕМЫ: Цветные иконки и текст --- */
[data-theme="dark"] .bi-envelope + span,
[data-theme="dark"] .bi-envelope ~ span,
[data-theme="dim"] .bi-envelope + span,
[data-theme="dim"] .bi-envelope ~ span {
    color: #818CF8 !important; /* Indigo-400 для Email */
}

[data-theme="dark"] .bi-telegram + span,
[data-theme="dark"] .bi-telegram ~ span,
[data-theme="dim"] .bi-telegram + span,
[data-theme="dim"] .bi-telegram ~ span {
    color: #38BDF8 !important; /* Sky-400 для Telegram */
}

[data-theme="dark"] .bi-telephone + span,
[data-theme="dark"] .bi-telephone ~ span,
[data-theme="dark"] .bi-phone + span,
[data-theme="dark"] .bi-phone ~ span,
[data-theme="dim"] .bi-telephone + span,
[data-theme="dim"] .bi-telephone ~ span,
[data-theme="dim"] .bi-phone + span,
[data-theme="dim"] .bi-phone ~ span {
    color: #34D399 !important; /* Emerald-400 для Phone */
}

/* --- ССЫЛКИ КОНТАКТОВ (mailto, tel, telegram, linkedin) --- */
/* Светлая тема: Email ссылки */
[data-theme="light"] a[href^="mailto:"]:not(.contact-chip):not(.contact-email) {
    color: #6366F1 !important; /* Indigo-500 */
    font-weight: 500;
    transition: color 0.2s ease;
}

[data-theme="light"] a[href^="mailto:"]:not(.contact-chip):not(.contact-email):hover {
    color: #4F46E5 !important; /* Indigo-600 - темнее при наведении */
    text-decoration: underline;
}

/* Светлая тема: Phone ссылки */
[data-theme="light"] a[href^="tel:"]:not(.contact-chip):not(.contact-phone) {
    color: #10B981 !important; /* Emerald-500 */
    font-weight: 500;
    transition: color 0.2s ease;
}

[data-theme="light"] a[href^="tel:"]:not(.contact-chip):not(.contact-phone):hover {
    color: #059669 !important; /* Emerald-600 - темнее при наведении */
    text-decoration: underline;
}

/* Светлая тема: Telegram ссылки */
[data-theme="light"] a[href*="t.me/"]:not(.contact-chip):not(.contact-tg),
[data-theme="light"] a[href*="telegram.me/"]:not(.contact-chip):not(.contact-tg) {
    color: #0EA5E9 !important; /* Sky-500 */
    font-weight: 500;
    transition: color 0.2s ease;
}

[data-theme="light"] a[href*="t.me/"]:not(.contact-chip):not(.contact-tg):hover,
[data-theme="light"] a[href*="telegram.me/"]:not(.contact-chip):not(.contact-tg):hover {
    color: #0284C7 !important; /* Sky-600 - темнее при наведении */
    text-decoration: underline;
}

/* Светлая тема: LinkedIn ссылки */
[data-theme="light"] a[href*="linkedin.com/"]:not(.contact-chip):not(.contact-linkedin) {
    color: #2563EB !important; /* Blue-600 */
    font-weight: 500;
    transition: color 0.2s ease;
}

[data-theme="light"] a[href*="linkedin.com/"]:not(.contact-chip):not(.contact-linkedin):hover {
    color: #1D4ED8 !important; /* Blue-700 - темнее при наведении */
    text-decoration: underline;
}

/* Темные темы: Email ссылки */
[data-theme="dark"] a[href^="mailto:"]:not(.contact-email),
[data-theme="dim"] a[href^="mailto:"]:not(.contact-email) {
    color: #818CF8 !important;
}
/* Темные темы: Phone ссылки */
[data-theme="dark"] a[href^="tel:"]:not(.contact-phone),
[data-theme="dim"] a[href^="tel:"]:not(.contact-phone) {
    color: #34D399 !important;
}

/* --- ИКОНКИ КОНТАКТОВ (цветные во всех темах) --- */
/* Светлая тема */
[data-theme="light"] .bi-envelope,
[data-theme="light"] .bi-envelope-fill {
    color: #6366F1 !important; /* Indigo-500 - яркий индиго для светлого фона */
}

[data-theme="light"] .bi-telegram {
    color: #0EA5E9 !important; /* Sky-500 - яркий голубой */
}

[data-theme="light"] .bi-telephone,
[data-theme="light"] .bi-telephone-fill,
[data-theme="light"] .bi-phone,
[data-theme="light"] .bi-phone-fill {
    color: #10B981 !important; /* Emerald-500 - яркий зеленый */
}

[data-theme="light"] .bi-linkedin {
    color: #2563EB !important; /* Blue-600 - Royal Blue */
}

/* Темные темы */
[data-theme="dark"] .bi-envelope,
[data-theme="dark"] .bi-envelope-fill,
[data-theme="dim"] .bi-envelope,
[data-theme="dim"] .bi-envelope-fill {
    color: #818CF8 !important; /* Indigo-400 для Email иконки */
}

[data-theme="dark"] .bi-telegram,
[data-theme="dim"] .bi-telegram {
    color: #38BDF8 !important; /* Sky-400 для Telegram иконки */
}

[data-theme="dark"] .bi-telephone,
[data-theme="dark"] .bi-telephone-fill,
[data-theme="dark"] .bi-phone,
[data-theme="dark"] .bi-phone-fill,
[data-theme="dim"] .bi-telephone,
[data-theme="dim"] .bi-telephone-fill,
[data-theme="dim"] .bi-phone,
[data-theme="dim"] .bi-phone-fill {
    color: #34D399 !important; /* Emerald-400 для Phone иконки */
}

/* --- ЗАГОЛОВОК "КОНТАКТЫ" / "МОИ КОНТАКТЫ" (синий цвет) --- */
/* Light тема - синий цвет для заголовка "Контакты" */
[data-theme="light"] h2.section-title[data-original-title="Контакты"] {
    color: #2563EB !important; /* Royal Blue */
}

/* Dark/Dim темы - яркий синий цвет для заголовка "Контакты" */
[data-theme="dark"] h2.section-title[data-original-title="Контакты"],
[data-theme="dim"] h2.section-title[data-original-title="Контакты"] {
    color: #60A5FA !important; /* Blue-400 - яркий синий для видимости */
}

/* Более универсальный селектор для заголовков секций с контактами */
[data-theme="dark"] #personal .section-title,
[data-theme="dim"] #personal .section-title,
[data-theme="dark"] .section#personal .section-title,
[data-theme="dim"] .section#personal .section-title {
    color: #60A5FA !important; /* Синий цвет для заголовка секции контактов */
}

/* Также для заголовков секций с контактами (более универсальный селектор) */
[data-theme="light"] #personal .section-title {
    color: #2563EB !important;
}
[data-theme="dark"] #personal .section-title,
[data-theme="dim"] #personal .section-title {
    color: #60A5FA !important;
}

/* --- 5. COUNTER BADGE (Счетчик кандидатов) --- */
.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

/* Light: Серый текст на сером фоне */
[data-theme="light"] .count-badge {
    background-color: #F1F5F9;
    color: #475569; /* Slate-600 */
    border: 1px solid transparent;
}

/* Dark/Dim: Белый текст на полупрозрачном */
[data-theme="dark"] .count-badge,
[data-theme="dim"] .count-badge {
    background-color: rgba(255, 255, 255, 0.1);
    color: #F8FAFC; /* Почти белый - чтобы было видно! */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Fix for dark text - ensure all text is readable */
.vacancy-id,
.job-id,
.candidate-id,
.meta-text,
.hint-text,
.help-text,
small {
    color: var(--text-secondary) !important;
}

/* text-secondary применяется, но контакты имеют свои стили выше с !important */
.text-secondary {
    color: var(--text-secondary) !important;
}

strong,
b,
.label-text,
.info-label {
    color: var(--text-primary) !important;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-page);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-hover);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* ============================================
   RESPONSIVE BREAKPOINTS (Standardized)
   ============================================ */

/* ============================================
   МОБИЛЬНАЯ КНОПКА "ФИЛЬТРЫ" - Скрыта на десктопе
   ============================================ */
.mobile-filters-toggle {
    display: none; /* По умолчанию скрыта */
}

.mobile-close-btn {
    display: none; /* По умолчанию скрыта */
}

.mobile-apply-filters {
    display: none; /* По умолчанию скрыта */
}

.mobile-filters-footer {
    display: none; /* По умолчанию скрыта */
}

.filters-reset-desktop {
    display: inline-flex;
}

.filters-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
    z-index: 999;
}

.filters-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* ============================================
   ДЕСКТОП: Сайдбар виден, кнопка скрыта
   ============================================ */
@media (min-width: 993px) {
    .mobile-filters-toggle {
        display: none !important;
    }
    
    .mobile-close-btn {
        display: none !important;
    }

    .mobile-apply-filters {
        display: none !important;
    }
    
    .filters-sidebar {
        display: block !important;
        position: static !important;
    }
}

/* Tablet: <992px - Сворачивание сайдбара, перестройка layout-grid */
@media (max-width: 992px) {
    :root {
        --sidebar-width: 100vw;
    }
    
    .sidebar-logo span { display: inline; }
    .nav-item span { display: inline; }
    .nav-item { 
        justify-content: flex-start; 
        padding: var(--spacing-md) var(--spacing-lg); 
    }
    .sidebar-header { 
        padding: 0 var(--spacing-md); 
        justify-content: flex-start; 
    }
    
    /* Layout-grid должен растягиваться на 100% ширины */
    .layout-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Мобильная кнопка "Фильтры" - видна только на мобильных */
    .mobile-filters-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: var(--spacing-sm);
        width: 100%;
        min-height: 44px; /* Минимальная высота для удобства нажатия */
        padding: var(--spacing-sm) var(--spacing-md);
        margin-bottom: var(--spacing-md);
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        color: var(--text-primary);
        font-weight: 600;
        font-size: 0.95rem;
        cursor: pointer;
        transition: all var(--transition-base);
    }

    .mobile-filters-toggle .filter-count {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 22px;
        height: 22px;
        padding: 0 6px;
        border-radius: 999px;
        background: var(--accent-primary);
        color: var(--text-inverse);
        font-size: 0.75rem;
        font-weight: 700;
    }

    .mobile-filters-toggle .filter-count.is-empty {
        display: none;
    }
    
    .mobile-filters-toggle:hover {
        background: var(--bg-hover);
        border-color: var(--accent-primary);
        transform: translateY(-1px);
    }

    .mobile-apply-filters {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: var(--spacing-sm);
        width: 100%;
        min-height: 44px;
        padding: var(--spacing-sm) var(--spacing-md);
        margin-bottom: var(--spacing-md);
        background: var(--accent-primary);
        border: 1px solid var(--accent-primary);
        border-radius: 8px;
        color: var(--text-inverse);
        font-weight: 600;
        font-size: 0.95rem;
        cursor: pointer;
        transition: all var(--transition-base);
    }

    .mobile-apply-filters:hover {
        filter: brightness(1.05);
        transform: translateY(-1px);
    }

    .mobile-filters-footer {
        display: flex;
        flex-direction: column;
        gap: var(--spacing-sm);
        margin-top: var(--spacing-md);
        padding-top: var(--spacing-sm);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        position: sticky;
        bottom: 0;
        background: var(--bg-card);
        padding-bottom: var(--spacing-sm);
    }

    .mobile-filters-footer .btn {
        width: 100%;
        justify-content: center;
    }

    .filters-reset-desktop {
        display: none !important;
    }
    
    /* Filters sidebar скрыт по умолчанию на мобильных */
    .filters-sidebar {
        display: none !important;
        position: fixed !important;
        top: auto !important;
        left: 0 !important;
        width: 100% !important;
        height: 85vh !important;
        bottom: 0 !important;
        z-index: 1000 !important;
        margin: 0 !important;
        border-radius: 16px 16px 0 0 !important;
        max-height: 85vh !important;
        overflow-y: auto !important;
        background: var(--bg-card) !important;
        padding: var(--spacing-lg) !important;
        box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.35);
    }
    
    /* Когда сайдбар открыт */
    .filters-sidebar.show-mobile {
        display: block !important;
    }
    
    /* Кнопка закрытия внутри мобильного сайдбара */
    .filters-sidebar .mobile-close-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: var(--spacing-md);
        right: var(--spacing-md);
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: var(--bg-hover);
        border: 1px solid var(--border-color);
        color: var(--text-primary);
        cursor: pointer;
        transition: all var(--transition-base);
        z-index: 1001;
    }
    
    .filters-sidebar .mobile-close-btn:hover {
        background: var(--bg-hover);
        border-color: var(--accent-primary);
        transform: scale(1.1);
    }
}


@media (max-width: 992px) {
    .app-header {
        padding: 8px var(--spacing-md);
        height: auto;
        flex-wrap: wrap;
        row-gap: 8px;
        align-items: center;
        left: 0;
    }

    .header-left {
        flex: 1 1 100%;
        order: 1;
        flex-direction: column;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        margin-right: 0;
        text-align: center;
    }

    .header-logo {
        flex: 1 1 100%;
        justify-content: center;
        margin: 0;
        width: 100%;
    }

    .header-admin-button {
        white-space: normal;
        max-width: 100%;
    }

    .header-actions {
        flex: 1 1 100%;
        order: 2;
        justify-content: flex-end;
        gap: 12px;
        flex-wrap: wrap;
    }

    .app-sidebar {
        transform: translateX(-100%);
        width: min(var(--sidebar-width), 100vw);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    }

    .app-sidebar.open {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: inline-flex;
    }

    .app-main {
        margin-left: 0;
    }

    .account-switcher-main-btn {
        padding: 6px 8px;
    }

    .current-account-info {
        min-width: 0 !important;
        grid-template-columns: 32px minmax(0, 1fr) 12px;
        gap: 8px;
    }

    .current-account-email {
        max-width: 150px;
        font-size: 0.82rem;
    }

    .current-account-role {
        max-width: 150px;
        font-size: 0.7rem;
    }
}

/* Mobile: <768px - Скрытие сайдбара, мобильная версия */
@media (min-width: 993px) {
    .sidebar-toggle {
        display: none !important;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 104px;
        --sidebar-width: 100vw;
    }

    .app-header .omega-text,
    .app-sidebar .omega-text {
        display: none;
    }

    .current-account-info {
        min-width: 0 !important;
    }

    .current-account-email {
        max-width: 140px;
        font-size: 0.82rem;
    }

    .current-account-role {
        display: none;
    }

    .app-sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-base);
        width: var(--sidebar-width);
    }

    .app-sidebar.open {
        transform: translateX(0);
    }

    .app-header {
        left: 0;
        height: auto;
        padding: 8px var(--spacing-md);
        flex-wrap: wrap;
        row-gap: 8px;
        align-items: center;
    }

    .header-left {
        flex: 1 1 100%;
        order: 1;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
        margin-right: 0;
    }

    .header-logo {
        margin: 0 auto;
    }

    .header-admin-button {
        white-space: normal;
    }

    .header-actions {
        flex: 1 1 100%;
        order: 2;
        justify-content: flex-end;
        gap: 10px;
        flex-wrap: wrap;
    }

    .action-btn {
        width: 36px;
        height: 36px;
    }

    .account-switcher-wrapper {
        flex: 1 1 auto;
    }

    .account-switcher-main-btn {
        width: 100%;
        justify-content: space-between;
    }

    .notif-dropdown,
    .account-dropdown {
        width: min(360px, calc(100vw - 24px)) !important;
        right: 0 !important;
    }

    .app-main {
        margin-left: 0;
        padding: calc(var(--header-height) + var(--spacing-md)) var(--spacing-md) var(--spacing-md);
    }

    .sidebar-logo span { display: block; }
    .nav-item span { display: block; }
    .nav-item {
        justify-content: flex-start;
        padding: var(--spacing-md) var(--spacing-lg);
    }
}

@media (max-width: 576px) {
    :root {
        --header-height: 120px;
    }


    .app-main {
        padding: calc(var(--header-height) + var(--spacing-md)) var(--spacing-md) var(--spacing-md);
    }
    
    .app-header {
        padding: 6px var(--spacing-md);
    }

    .header-admin-button {
        width: 100%;
        justify-content: center;
    }

    .current-account-details {
        display: none;
    }

    .account-switcher-main-btn {
        padding: 6px 8px;
    }

    .notif-dropdown,
    .account-dropdown {
        width: calc(100vw - 16px) !important;
    }

    
    /* Уменьшаем отступы для мобильных фильтров */
    .filters-sidebar.show-mobile {
        padding: var(--spacing-md) !important;
    }
}


/* ============================================
   ACCOUNT SWITCHER STYLES
   ============================================ */

/* Account Switcher Wrapper */
.account-switcher-wrapper {
    position: relative;
}

/* Account Badge (количество аккаунтов) */
.account-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--color-accent-gold);
    color: var(--color-bg-primary);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Account Dropdown */
.account-dropdown {
    position: absolute;
    right: 0;
    top: 120%;
    width: 320px;
    max-height: 500px;
    overflow-y: auto;
    background: var(--color-bg-surface);
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 12px;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.85);
    z-index: 1000;
}

/* Dropdown Header */
.account-dropdown-header {
    padding: 12px 16px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Account List */
.account-list {
    padding: 8px 0;
}

/* Account Item */
.account-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.account-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.account-item.active {
    background: rgba(250, 204, 21, 0.1);
    border-left: 3px solid var(--color-accent-gold);
}

/* Account Avatar */
.account-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent-gold), #e6c200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-bg-primary);
}

/* Account Info */
.account-info {
    flex: 1;
    min-width: 0;
}

.account-email {
    font-weight: 600;
    color: var(--color-text-primary);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-role {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    text-transform: uppercase;
}

/* Account Remove Button */
.account-remove {
    padding: 4px 8px;
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s, color 0.2s;
}

.account-remove:hover {
    opacity: 1;
    color: #ef4444;
}

/* Account Actions */
.account-actions {
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Add Account Button */
.btn-add-account {
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--color-accent-gold), #e6c200);
    color: var(--color-bg-primary);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-add-account:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(250, 204, 21, 0.4);
}

/* Main Button with Current Account Info */
.account-switcher-main-btn {
    padding: 6px 12px !important;
    min-width: 200px;
}

.current-account-info {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.current-account-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent-gold), #e6c200);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.current-account-avatar .avatar-initials {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-bg-primary);
}

.current-account-details {
    flex: 1;
    text-align: left;
    min-width: 0;
}

.current-account-email {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

/* ============================================
   Global Mobile Adjustments
   ============================================ */
@media (max-width: 768px) {
    .page-wrapper {
        padding: 16px !important;
    }

    .chat-page,
    .vacancy-page,
    .candidates-page,
    .friends-page,
    .auto-matching-page,
    .history-page,
    .candidate-profile-page,
    .auto-communication-page,
    .process-detail-page,
    .profile-page {
        padding: 16px !important;
    }

    .page-header {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px;
    }

    .page-title {
        font-size: 1.6rem !important;
    }

    .page-subtitle {
        font-size: 0.95rem !important;
    }

    .actions,
    .form-actions,
    .profile-actions,
    .profile-header-actions,
    .candidate-actions,
    .vacancy-actions,
    .modal-actions,
    .send-actions,
    .clarify-actions,
    .customer-actions,
    .vacancies-actions,
    .inbox-actions,
    .friend-actions,
    .request-actions,
    .letter-actions,
    .lk-header-actions {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px;
    }

    .actions .btn,
    .form-actions .btn,
    .profile-actions .btn,
    .profile-header-actions .btn,
    .candidate-actions .btn,
    .vacancy-actions .btn,
    .modal-actions .btn,
    .send-actions .btn,
    .clarify-actions .btn,
    .customer-actions .btn,
    .vacancies-actions .btn,
    .inbox-actions .btn,
    .friend-actions .btn,
    .request-actions .btn,
    .letter-actions .btn,
    .lk-header-actions .btn {
        width: 100% !important;
        justify-content: center !important;
    }

    .profile-actions > * {
        width: 100% !important;
        justify-content: center !important;
    }

    .tabs-header {
        flex-direction: column;
    }

    .tab-btn {
        width: 100%;
    }

    .info-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .info-card {
        padding: 24px 18px;
    }

    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        width: 100%;
    }

    .profile-card {
        padding: 24px;
    }

    .vacancy-header,
    .candidate-header,
    .process-header,
    .profile-header,
    .vacancy-list-header,
    .candidates-list-header,
    .search-sort-container {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px;
    }

    .filters-bar,
    .friends-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

.current-account-role {
    font-size: 0.7rem;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.2;
}

.account-dropdown-icon {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    transition: transform 0.2s;
}

.account-switcher-main-btn:hover .account-dropdown-icon {
    transform: translateY(2px);
}

/* Dropdown Header with Count */
.account-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.account-count-text {
    color: var(--color-accent-gold);
    font-weight: 700;
}

/* Account Status (Текущий) */
.account-status {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--color-accent-gold);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.account-status i {
    font-size: 1.1rem;
}

/* Account Actions Wrapper */
.account-actions-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Switch Button */
.account-switch-btn {
    padding: 6px 12px;
    background: linear-gradient(135deg, var(--color-accent-gold), #e6c200);
    color: var(--color-bg-primary);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.account-switch-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(250, 204, 21, 0.4);
}

/* Active Avatar */
.active-avatar {
    border: 2px solid var(--color-accent-gold);
    box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.2);
}

/* Улучшенный hover для неактивных аккаунтов */
.account-item:not(.active):hover {
    background: rgba(250, 204, 21, 0.05);
    cursor: pointer;
}

.account-item.active {
    cursor: default;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .account-switcher-main-btn {
        min-width: 160px;
        padding: 6px 10px !important;
    }

    .current-account-avatar {
        width: 28px;
        height: 28px;
    }

    .current-account-avatar .avatar-initials {
        font-size: 0.8rem;
    }

    .current-account-email {
        font-size: 0.8rem;
    }

    .current-account-role {
        font-size: 0.65rem;
    }

    .account-dropdown {
        width: 300px;
    }

    .account-switch-btn {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .account-switcher-main-btn {
        min-width: 140px;
        padding: 5px 8px !important;
    }

    .current-account-info {
        gap: 8px;
    }

    .current-account-avatar {
        width: 26px;
        height: 26px;
    }

    .current-account-email {
        font-size: 0.75rem;
    }

    .current-account-role {
        display: none; /* Скрываем роль на малых экранах */
    }

    .account-dropdown {
        width: 280px;
        max-height: 400px;
    }

    .account-item {
        padding: 10px 12px;
    }

    .account-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .account-email {
        font-size: 0.85rem;
    }

    .account-role {
        font-size: 0.7rem;
    }

    .account-switch-btn {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
}

@media (max-width: 768px) {
  .admin-responsive-table {
    display: block;
    width: 100%;
  }

  .admin-responsive-table thead {
    display: none;
  }

  .admin-responsive-table tbody {
    display: block;
  }

  .admin-responsive-table tbody tr {
    display: block;
    background: var(--color-bg-surface, #0f172a);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  }

  .admin-responsive-table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 6px 0;
    border: none;
  }

  .admin-responsive-table tbody td::before {
    content: attr(data-label);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted, #94a3b8);
    flex: 0 0 40%;
  }

  .admin-responsive-table tbody td:first-child {
    font-weight: 700;
    font-size: 0.95rem;
  }

  .admin-responsive-table tbody td:first-child::before {
    content: '';
  }

  .admin-responsive-table tbody td:nth-child(n+4):not(:last-child) {
    display: none;
  }

  .admin-responsive-table tbody td:last-child {
    justify-content: flex-end;
  }
}

/* ============================================
   GLOBAL RESPONSIVE REFINEMENTS
   ============================================ */
img,
video,
iframe {
    max-width: 100%;
    height: auto;
}

table {
    max-width: 100%;
}

@media (max-width: 1200px) {
    .container,
    .container-fluid {
        padding-left: var(--spacing-md);
        padding-right: var(--spacing-md);
    }
}

@media (max-width: 992px) {
    .page-title {
        font-size: 1.7rem;
    }

    .page-subtitle {
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    .modal-dialog {
        margin: 8px auto;
        max-width: calc(100% - 16px) !important;
    }

    .modal-content {
        max-width: 100% !important;
    }

    .layout-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .chat-layout {
        height: calc(100vh - 160px) !important;
        min-height: 0 !important;
    }

    .chat-messages {
        padding: 16px !important;
    }

    .message {
        max-width: 100% !important;
    }

    .message-media img {
        max-width: 100% !important;
        height: auto !important;
    }

    .chat-input-form {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .chat-send-btn {
        width: 100%;
    }

    .table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.5rem;
    }

    .page-subtitle {
        font-size: 0.9rem;
    }
}
