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

/* Токены: фирменный красный СОПКа + светлая SaaS-оболочка (референсы ERP-панелей) */
:root {
    --primary: #e31e24;
    --primary-hover: #c41a1f;
    --accent-deep: #7a1216;
    --primary-soft: rgba(227, 30, 36, 0.1);
    --rzd-grey: #334155;
    --rzd-grey-light: #64748b;
    --sidebar-bg: #ffffff;
    --sidebar-text: #334155;
    --sidebar-active: rgba(227, 30, 36, 0.08);
    --header-bg: #ffffff;
    --header-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
    --main-bg: #f1f5f9;
    --bg-muted: #f8fafc;
    --card-bg: #fff;
    --card-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.04);
    --border: #e2e8f0;
    --text: #1e293b;
    --text-muted: #64748b;
    /* Поверхности для форм, списков и кнопок (перекрываются в тёмной теме) */
    --input-surface: #ffffff;
    --input-readonly-bg: #f8fafc;
    --table-header-bg: #f8fafc;
    --btn-default-bg: #f8fafc;
    --btn-default-hover: #f1f5f9;
    --btn-secondary-surface: #ffffff;
    --btn-secondary-hover: #f8fafc;
    --list-item-bg: #ffffff;
    --dropdown-bg: #ffffff;
    --dropdown-option-border: #eeeeee;
    --surface-muted: #f8f9fb;
    --surface-elevated: #ffffff;
    --login-page-gradient: linear-gradient(165deg, #f8fafc 0%, #eef2f7 40%, #fff5f5 100%);
    --legal-page-gradient: linear-gradient(160deg, #f0f2f5 0%, #e4e7ec 45%, #dfe3ea 100%);
    --password-toggle-bg: #f3f4f6;
    --password-toggle-hover: #e8eaed;
    --nav-link-hover-bg: #f1f5f9;
    --candidate-tab-hover: #f5f5f5;
    --ghost-hover-bg: #f8fafc;
    --table-row-hover: #f8fafc;
    --password-change-card-bg: #fafafa;

    /* ——— Дизайн-токены: единая шкала отступов, радиусов и движения ———
       Аддитивно. Существующие значения не переписываем — используем эти токены
       в новых компонентах и постепенно переводим старые. */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-8: 48px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-pill: 999px;
    --dur-fast: 130ms;
    --dur-med: 220ms;
    --dur-slow: 360ms;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    /* Поверхности для skeleton-загрузчиков */
    --skeleton-base: #e9edf2;
    --skeleton-shine: #f5f7fa;

    /* Явно светлая схема для нативных полей (иначе meta light dark даёт «чёрные» select/input в Chrome/Windows) */
    color-scheme: light;
}

/* Тёмная тема: нейтральные тёмно-серые тона (ближе к стилистике РЖД/ФПК), без «синего» slate */
[data-theme="dark"] {
    color-scheme: dark;
    --primary-soft: rgba(227, 30, 36, 0.16);
    --rzd-grey: #d1d5db;
    --rzd-grey-light: #9ca3af;
    --sidebar-bg: #2c2c2c;
    --sidebar-text: #e8e8e8;
    --sidebar-active: rgba(227, 30, 36, 0.14);
    --header-bg: #2c2c2c;
    --header-shadow: 0 1px 0 rgba(0, 0, 0, 0.55);
    --main-bg: #1f1f1f;
    --bg-muted: #262626;
    --card-bg: #2a2a2a;
    --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 3px 14px rgba(0, 0, 0, 0.35);
    --border: #404040;
    --text: #ececec;
    --text-muted: #a3a3a3;
    --input-surface: #333333;
    --input-readonly-bg: #252525;
    --table-header-bg: #323232;
    --btn-default-bg: #383838;
    --btn-default-hover: #454545;
    --btn-secondary-surface: #343434;
    --btn-secondary-hover: #404040;
    --list-item-bg: #2a2a2a;
    --dropdown-bg: #333333;
    --dropdown-option-border: #4a4a4a;
    --surface-muted: #333333;
    --surface-elevated: #323232;
    --login-page-gradient: linear-gradient(165deg, #171717 0%, #1f1f1f 45%, #2a2222 100%);
    --legal-page-gradient: linear-gradient(160deg, #171717 0%, #262626 50%, #171717 100%);
    --password-toggle-bg: #404040;
    --password-toggle-hover: #4d4d4d;
    --nav-link-hover-bg: rgba(255, 255, 255, 0.06);
    --candidate-tab-hover: #3a3a3a;
    --ghost-hover-bg: #383838;
    --table-row-hover: rgba(255, 255, 255, 0.05);
    --password-change-card-bg: #333333;
    --skeleton-base: #333333;
    --skeleton-shine: #3f3f3f;
}

body {
    font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--main-bg);
    min-height: 100vh;
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

#login-page {
    min-height: 100vh;
    background: var(--login-page-gradient);
}

/* ——— Вход и смена пароля ——— */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border);
    width: 100%;
    max-width: 400px;
}

.login-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.login-brand-mark {
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(227, 30, 36, 0.15);
    object-fit: cover;
}

.login-card h2 {
    margin-bottom: 1.5rem;
    color: var(--primary);
    text-align: center;
    font-weight: 600;
}

.login-card--wide {
    max-width: 440px;
}

.info-text {
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-align: center;
    font-size: 0.95rem;
}

.info-text--small {
    font-size: 0.88rem;
    line-height: 1.45;
}

.password-requirements-list {
    margin: 0 0 1.15rem;
    padding-left: 1.35rem;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-muted);
    text-align: left;
}

.password-requirements-list li {
    margin-bottom: 0.35rem;
}

.password-input-wrap {
    display: flex;
    align-items: stretch;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--input-surface);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.password-input-wrap:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.15);
}

.password-input-wrap input {
    flex: 1;
    min-width: 0;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0.6rem 0.75rem;
    font-size: 0.95rem;
}

.password-toggle {
    flex-shrink: 0;
    width: 44px;
    border: none;
    background: var(--password-toggle-bg);
    color: var(--rzd-grey);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}

.password-toggle:hover {
    background: var(--password-toggle-hover);
    color: var(--primary);
}

.password-toggle__icon {
    display: block;
    pointer-events: none;
}

.password-change-card {
    margin-top: 1.5rem;
    padding: 1.25rem 1.35rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--password-change-card-bg);
}

.password-change-card__title {
    font-size: 1.05rem;
    margin: 0 0 0.5rem;
    color: var(--rzd-grey);
}

.password-change-card__lead {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
}

/* ——— Состав отряда (командир / комиссар) ——— */
.commander-roster-list .list-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.commander-roster-row--danger {
    border-left: 4px solid #dc2626;
    background: #fef2f2;
}

.roster-badge {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-right: 0.35rem;
    vertical-align: middle;
}

.roster-badge--danger {
    background: #fee2e2;
    color: #991b1b;
}

.roster-badge--warn {
    background: #fef3c7;
    color: #92400e;
}

.commander-roster-row__actions {
    flex-shrink: 0;
}

/* ——— Оболочка приложения ——— */
.app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-header {
    background: var(--header-bg);
    color: var(--text);
    min-height: 56px;
    height: auto;
    padding-top: max(0px, env(safe-area-inset-top, 0px));
    padding-right: max(1.5rem, env(safe-area-inset-right, 0px));
    padding-bottom: 0;
    padding-left: max(1.5rem, env(safe-area-inset-left, 0px));
    flex-shrink: 0;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--header-shadow);
}

.app-header-inner {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.sidebar-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #475569;
    cursor: pointer;
    transition: background 0.2s;
}
.sidebar-toggle:hover {
    background: rgba(15, 23, 42, 0.06);
}
[data-theme="dark"] .sidebar-toggle {
    color: #94a3b8;
}
[data-theme="dark"] .sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
}
.sidebar-toggle-bar {
    display: block;
    height: 2px;
    width: 100%;
    background: currentColor;
    border-radius: 1px;
    transition: transform 0.2s, opacity 0.2s;
}
.sidebar-toggle.sidebar-toggle--close .sidebar-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sidebar-toggle.sidebar-toggle--close .sidebar-toggle-bar:nth-child(2) { opacity: 0; }
.sidebar-toggle.sidebar-toggle--close .sidebar-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.app-brand-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.app-brand-mark {
    display: block;
    flex-shrink: 0;
    border-radius: 50%;
    box-shadow: 0 0 0 1px var(--border), 0 2px 8px rgba(15, 23, 42, 0.06);
    object-fit: cover;
}

.app-brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.app-logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.02em;
    margin: 0;
    line-height: 1.2;
}

.app-tagline {
    margin: 0;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

@media (max-width: 420px) {
    .app-tagline {
        display: none;
    }
}

.app-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-email {
    font-size: 0.88rem;
    color: var(--text-muted);
    max-width: 46vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
}

.btn-ghost:hover {
    background: var(--ghost-hover-bg);
    border-color: #cbd5e1;
}

.theme-toggle {
    padding: 0.35rem 0.5rem;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.theme-toggle__icon {
    display: block;
}
.theme-toggle__icon--sun {
    display: none;
}
[data-theme="dark"] .theme-toggle__icon--moon {
    display: none;
}
[data-theme="dark"] .theme-toggle__icon--sun {
    display: block;
}

.app-header .btn-ghost {
    color: #334155;
    border-color: var(--border);
}
.app-header .btn-ghost:hover {
    background: var(--primary-soft);
    border-color: rgba(227, 30, 36, 0.35);
    color: var(--accent-deep);
}
[data-theme="dark"] .app-header .btn-ghost {
    color: var(--text);
}
[data-theme="dark"] .app-header .btn-ghost:hover {
    color: var(--text);
}

/* ——— Раскладка: сайдбар + контент ——— */
.app-layout {
    display: flex;
    flex: 1;
    min-height: 0;
}

.sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    overflow-y: auto;
    transition: transform 0.25s ease, width 0.25s ease;
    z-index: 100;
    border-right: 1px solid var(--border);
}
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 99;
}
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: calc(56px + env(safe-area-inset-top, 0px));
        left: 0;
        bottom: 0;
        transform: translateX(-100%);
        box-shadow: 4px 0 12px rgba(0,0,0,0.15);
    }
    .sidebar.sidebar--open {
        transform: translateX(0);
    }
    .sidebar-overlay.sidebar-overlay--visible {
        display: block;
        top: calc(56px + env(safe-area-inset-top, 0px));
    }
}
@media (min-width: 769px) {
    .sidebar.sidebar--collapsed {
        width: 0;
        min-width: 0;
        overflow: hidden;
        padding: 0;
    }
}

.side-nav {
    padding: 0.75rem 0;
}

.nav-group {
    margin-bottom: 0.5rem;
}

.nav-group-title {
    display: block;
    padding: 0.55rem 1.25rem 0.35rem;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
}

.side-nav a.nav-link {
    display: block;
    padding: 0.55rem 1.25rem 0.55rem 1.5rem;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.15s, color 0.15s;
    border-left: 3px solid transparent;
    border-radius: 0 8px 8px 0;
    margin-right: 0.5rem;
}

.side-nav a.nav-link:hover {
    background: var(--nav-link-hover-bg);
    color: var(--text);
}

.side-nav a.nav-link.active {
    background: var(--sidebar-active);
    color: var(--accent-deep);
    border-left-color: var(--primary);
    font-weight: 600;
}
[data-theme="dark"] .side-nav a.nav-link.active {
    color: #fecaca;
}

.main-content {
    flex: 1;
    overflow-y: auto;
    min-width: 0;
    padding: 1.5rem clamp(1rem, 4vw, 2.5rem) max(1.5rem, env(safe-area-inset-bottom, 0px));
}

/* Тело — центрированная колонка: не растягивается на всю ширину, держится по
   центру доступного пространства (в т.ч. когда боковая панель скрыта). */
.main-content > .role-views {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

/* Полноразмерная область для сводной таблицы */
.main-content.full-width-table {
    max-width: none;
    width: 100%;
    padding: 1rem 1.25rem max(1rem, env(safe-area-inset-bottom, 0px));
}
.main-content.full-width-table > .role-views {
    max-width: none;
}
.main-content.full-width-table .view-body.card {
    max-width: none;
    width: 100%;
    padding: 1rem 1.25rem;
}
.main-content.full-width-table .table-responsive-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.main-content.full-width-table .data-table {
    min-width: 100%;
    table-layout: auto;
}
.main-content.full-width-table .view-header {
    margin-bottom: 1rem;
}
.main-content.full-width-table .view-header h2 {
    font-size: 1.25rem;
}

/* ——— Виды (экраны) ——— */
/* Не задаём height: 100% — у командира два контейнера подряд; пустой блок с 100% высоты перекрывал ЛК бойца */
.role-views {
    min-height: 0;
}

.view {
    animation: viewFade 0.2s ease;
}

@keyframes viewFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.view-header h2 {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text);
}

.view-body {
    min-height: 200px;
}

/* ——— Дашборд: карточки метрик и виджеты ——— */
.view-body-dashboard {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.dashboard-root {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

/* ——— Герой-баннер дашборда ——— */
.dash-hero {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    padding: 2rem 2.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    color: #fff;
    background:
        radial-gradient(1200px 400px at 100% -20%, rgba(255,255,255,0.18), transparent 60%),
        linear-gradient(120deg, var(--accent-deep) 0%, var(--primary) 55%, #ff5b52 120%);
    box-shadow: 0 18px 40px -18px rgba(227, 30, 36, 0.55);
    isolation: isolate;
}
.dash-hero__glow {
    position: absolute;
    z-index: -1;
    width: 320px; height: 320px;
    right: -60px; top: -120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.22), transparent 65%);
    pointer-events: none;
}
.dash-hero__greeting {
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 0.35rem;
}
.dash-hero__title {
    font-size: 1.85rem;
    font-weight: 750;
    line-height: 1.1;
    margin: 0 0 0.4rem;
    color: #fff;
    letter-spacing: -0.01em;
}
.dash-hero__sub {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.85;
}
.dash-hero__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.25rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    backdrop-filter: blur(4px);
    transition: background 0.18s, transform 0.18s;
    white-space: nowrap;
}
.dash-hero__cta:hover { background: rgba(255, 255, 255, 0.28); transform: translateY(-1px); }
.dash-hero__cta span { transition: transform 0.18s; }
.dash-hero__cta:hover span { transform: translateX(3px); }

/* ——— Секции ——— */
.dash-section { display: flex; flex-direction: column; gap: 0.9rem; }
.dash-section__title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin: 0;
}

/* ——— Плитки-метрики ——— */
.dash-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1.1rem;
}
.metric-tile {
    position: relative;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.35rem 1.4rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.metric-tile::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--tile-accent, var(--primary));
    opacity: 0.9;
}
.metric-tile:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--tile-accent, var(--primary)) 55%, transparent);
    box-shadow: 0 16px 32px -16px color-mix(in srgb, var(--tile-accent, var(--primary)) 60%, transparent);
}
.metric-tile__icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 0.4rem;
    background: color-mix(in srgb, var(--tile-accent, var(--primary)) 14%, transparent);
}
.metric-tile__value {
    font-size: 2.1rem;
    font-weight: 780;
    line-height: 1;
    color: var(--text);
    letter-spacing: -0.02em;
}
.metric-tile__label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}
.metric-tile__label--ring { margin-top: 0.2rem; }
.metric-tile--candidates { --tile-accent: #2563eb; }
.metric-tile--squads     { --tile-accent: #16a34a; }
.metric-tile--documents  { --tile-accent: #ea580c; }
.metric-tile--verified   { --tile-accent: #7c3aed; }

/* Кольцо прогресса верификации */
.metric-ring {
    --pct: 0;
    width: 78px; height: 78px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(closest-side, var(--card-bg) 70%, transparent 71% 100%),
        conic-gradient(var(--tile-accent) calc(var(--pct) * 1%), color-mix(in srgb, var(--tile-accent) 16%, transparent) 0);
    margin-bottom: 0.2rem;
}
.metric-ring__num {
    font-size: 1.25rem;
    font-weight: 750;
    color: var(--text);
}
.metric-ring__num i { font-size: 0.8rem; font-style: normal; color: var(--text-muted); margin-left: 1px; }

/* ——— Тайлы быстрых переходов ——— */
.dash-quicklinks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.9rem;
}
.quick-tile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.95rem 1.1rem;
    border-radius: 14px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 0.92rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.quick-tile__icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: var(--primary-soft);
    flex-shrink: 0;
}
.quick-tile__label { flex: 1; }
.quick-tile__arrow { color: var(--text-muted); transition: transform 0.18s ease, color 0.18s ease; }
.quick-tile:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 14px 28px -16px rgba(227, 30, 36, 0.5);
}
.quick-tile:hover .quick-tile__arrow { transform: translateX(4px); color: var(--primary); }
.quick-tile--primary {
    background: linear-gradient(120deg, var(--primary), #ff5b52);
    border-color: transparent;
    color: #fff;
}
.quick-tile--primary .quick-tile__icon { background: rgba(255,255,255,0.22); }
.quick-tile--primary .quick-tile__arrow { color: rgba(255,255,255,0.85); }
.quick-tile--primary:hover .quick-tile__arrow { color: #fff; }

/* ——— Виджеты ——— */
.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}
.dashboard-widget {
    border-radius: 16px;
}
.dashboard-widget .widget-title {
    font-size: 1rem;
    font-weight: 650;
    margin-bottom: 0.9rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.widget-title__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    border-radius: 9px;
    background: var(--primary-soft);
    font-size: 1rem;
}
.dashboard-widget .widget-body {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.dashboard-widget .widget-body ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.dashboard-widget .widget-body li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.dashboard-widget .widget-body li:last-child { border-bottom: none; }
.widget-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.6rem;
    padding: 1.5rem 0.5rem;
    color: var(--text-muted);
}
.widget-empty__icon {
    font-size: 1.8rem;
    width: 56px; height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-muted);
}
.widget-empty p { margin: 0; max-width: 34ch; line-height: 1.45; }
.deadline-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
    line-height: 1.4;
}
.deadline-item:last-child { border-bottom: none; }
.deadline-item .badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-weight: 500;
}
.badge--warning { background: #fff3e0; color: #e65100; }
.badge--success { background: #e8f5e9; color: #2e7d32; }
.badge--muted { background: #f5f5f5; color: #616161; }
[data-theme="dark"] .badge--success {
    background: rgba(22, 163, 74, 0.16);
    color: #bbf7d0;
    border: 1px solid rgba(74, 222, 128, 0.28);
}
[data-theme="dark"] .badge--warning {
    background: rgba(180, 83, 9, 0.2);
    color: #fde68a;
    border: 1px solid rgba(250, 204, 21, 0.3);
}
[data-theme="dark"] .badge--muted {
    background: rgba(255, 255, 255, 0.08);
    color: #d1d5db;
    border: 1px solid rgba(255, 255, 255, 0.12);
}
[data-theme="dark"] .badge {
    box-sizing: border-box;
}
.card-stats { padding: 1rem 0; }
.card-stats p { margin-bottom: 0.5rem; }
.card-stats .btn { margin-right: 0.5rem; margin-bottom: 0.5rem; }

/* ——— ЛК бойца: строка прогресса анкеты (1.13.74: без дублирующих вкладок) ——— */
.candidate-lk-header { margin-bottom: 1rem; }
.lk-progress { display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0.9rem;
    background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; }
.lk-progress__label { font-size: 0.9rem; color: var(--text-muted); white-space: nowrap; }
.lk-progress__label strong { color: var(--text); }
.lk-progress .profile-progress-bar { flex: 1 1 auto; min-width: 60px; }
.lk-progress__go { flex-shrink: 0; }
.lk-progress--done { display: none; }
#candidate-views[data-view="view-candidate-profile"] .lk-progress__go { display: none; }
#candidate-views[data-view]:not([data-view="view-candidate-home"]) .candidate-notifications-wrap { display: none !important; }
.profile-progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: 5px;
    overflow: hidden;
}
.profile-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #c41a1f);
    border-radius: 5px;
    transition: width 0.35s ease;
}

/* ——— Дорожная карта этапов трудоустройства ——— */
.employment-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-left: 3px solid var(--border);
    margin-left: 8px;
    padding-left: 1rem;
    position: relative;
}
.employment-step::before {
    content: '';
    position: absolute;
    left: -11px;
    top: 1.1rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
}
.employment-step.done {
    border-left-color: #2e7d32;
}
.employment-step.done::before {
    background: #2e7d32;
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.3);
}
.employment-step.pending {
    border-left-color: var(--border);
    opacity: 0.85;
}
.employment-step .step-status {
    font-weight: bold;
    color: #2e7d32;
    width: 1.2rem;
}
.employment-step.pending .step-status {
    color: var(--text-muted);
}
.employment-step .step-name {
    color: var(--text);
}
.employment-step.pending .step-name {
    color: var(--text-muted);
}

.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border);
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.global-search-wrap {
    position: relative;
    min-width: 320px;
}
.global-search-wrap input {
    width: 100%;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--input-surface);
    color: var(--text);
}
.global-search-results {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    max-height: 320px;
    overflow: auto;
    z-index: 40;
    box-shadow: var(--card-shadow);
}
.global-search-item {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    color: var(--text);
    padding: 0.55rem 0.7rem;
    cursor: pointer;
}
.global-search-item:hover {
    background: var(--bg-muted);
}
.card-field-invalid {
    border: 1px solid #dc2626 !important;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}
.pin-btn {
    min-width: 2rem;
    padding: 0.2rem 0.35rem;
}
.pin-btn.is-on {
    border-color: var(--primary);
    color: var(--primary);
}

/* Подсказка «Документы ВСОП» в модалке карточки: в светлой теме тёмный текст на тёплой подложке, в тёмной — контраст без «проступающего» body color */
.card.vsop-hint {
    margin-top: 1rem;
    padding: 1rem 1.1rem;
}
.vsop-hint--warn {
    background: #fff8e6;
    border-color: #e6d9b8;
    /* Не наследовать body color в тёмной теме: блок остаётся читаемым на «тёплой» подложке */
    color: #3f3420 !important;
}
.vsop-hint--warn strong {
    color: #291f12;
}
.vsop-hint--warn .vsop-hint-list {
    margin: 0.5rem 0 0 1rem;
    padding-left: 1rem;
    color: inherit !important;
}
.vsop-hint--warn .vsop-hint-note {
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    color: #574a38 !important;
}
.vsop-hint--warn .text-muted {
    color: #574a38 !important;
}
/* !important обязателен: базовый цвет выше задан с !important и иначе в тёмной
   теме оставался тёмным текстом на тёмной подложке (нечитаемо, до 1.13.26). */
[data-theme="dark"] .vsop-hint--warn {
    background: rgba(245, 158, 11, 0.16);
    border-color: rgba(245, 158, 11, 0.45);
    color: #fafaf9 !important;
}
[data-theme="dark"] .vsop-hint--warn strong {
    color: #fef3c7;
}
[data-theme="dark"] .vsop-hint--warn .text-muted {
    color: #e7e5e4 !important;
}
[data-theme="dark"] .vsop-hint--warn .vsop-hint-note {
    color: #e7e5e4 !important;
}
.vsop-hint--ok {
    background: #e8f5e9;
    border-color: #81c784;
    color: #1b4332;
}
.vsop-hint--ok strong {
    color: #0f2419;
}
[data-theme="dark"] .vsop-hint--ok {
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(74, 222, 128, 0.4);
    color: #ecfdf5;
}
[data-theme="dark"] .vsop-hint--ok strong {
    color: #bbf7d0;
}

.card-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.card-stats p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
    color: var(--text);
}

.card-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ——— Формы ——— */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 500;
    color: var(--text);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--input-surface);
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.15);
}

.form-group .password-input-wrap input {
    width: auto;
    max-width: none;
}

.searchable-select {
    position: relative;
}
.searchable-select input[type="text"] {
    width: 100%;
}
.searchable-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 2px;
    max-height: 220px;
    overflow-y: auto;
    background: var(--dropdown-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    z-index: 2000;
    display: none;
}
.searchable-dropdown.open {
    display: block;
}
.searchable-dropdown .option {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid var(--dropdown-option-border);
    background: var(--dropdown-bg);
    color: var(--text);
}
.searchable-dropdown .option:hover,
.searchable-dropdown .option.selected {
    background: rgba(196, 30, 58, 0.1);
}
.searchable-dropdown .option:last-child {
    border-bottom: none;
}
.searchable-dropdown .option-empty {
    padding: 0.5rem 0.75rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    background: var(--dropdown-bg);
}

.searchable-dropdown.searchable-dropdown--card {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.input-readonly {
    background: var(--input-readonly-bg) !important;
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

/* ——— Кнопки ——— */
.btn {
    padding: 0.55rem 1.1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    background: var(--btn-default-bg);
    color: var(--text);
    text-decoration: none;
    display: inline-block;
    box-sizing: border-box;
    min-height: 44px;
    min-width: 44px;
}
.btn:hover {
    background: var(--btn-default-hover);
    border-color: #cbd5e1;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-secondary {
    background: var(--btn-secondary-surface);
    color: #334155;
    border-color: var(--border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.btn-secondary:hover {
    background: var(--btn-secondary-hover);
    border-color: #cbd5e1;
    color: #0f172a;
}
[data-theme="dark"] .btn-secondary {
    color: var(--text);
}
[data-theme="dark"] .btn-secondary:hover {
    color: var(--text);
}

.btn-danger {
    background: #b91c1c;
    color: #fff;
    border-color: #b91c1c;
}
.btn-danger:hover {
    background: #991b1b;
    border-color: #991b1b;
}

.btn-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.85rem;
    min-height: 40px;
    min-width: auto;
}

/* ——— Списки и карточки элементов ——— */
.list-item {
    padding: 1rem 1.25rem;
    background: var(--list-item-bg);
    border-radius: 8px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
}

.list-item h4 {
    color: var(--text);
    margin-bottom: 0.4rem;
    font-size: 1rem;
}

.list-item p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0.25rem 0;
}

.list-item-clickable {
    cursor: pointer;
    transition: background 0.15s ease;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}
.list-item-clickable:hover {
    background: rgba(196, 30, 58, 0.06);
}
.list-item-clickable .list-item-main {
    flex: 1;
    min-width: 0;
}
.list-item-clickable .list-item-actions {
    flex-shrink: 0;
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}
.data-table-row-clickable {
    cursor: pointer;
}
.data-table-row-clickable:hover {
    background: rgba(196, 30, 58, 0.08);
}
[data-theme="dark"] .data-table-row-clickable:hover {
    background: rgba(227, 30, 36, 0.12);
}
.list-item .btn, .list-item button {
    margin-top: 0.5rem;
    margin-right: 0.5rem;
}

.doc-verify-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.doc-verify-row .inline-checkbox { flex-shrink: 0; }
.doc-verify-row > span { flex: 1; min-width: 120px; }
.doc-expand-icon { font-size: 0.8rem; color: var(--text-muted); }

.list-item-inactive {
    opacity: 0.85;
    background: var(--bg-muted, #f8f9fa);
}

/* ——— Работа с документами: раскрывающийся список кандидатов ——— */
.documents-work-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.documents-work-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}
.documents-work-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    cursor: pointer;
    transition: background 0.15s;
    user-select: none;
}
.documents-work-item-header:hover {
    background: rgba(196, 30, 58, 0.06);
}
.documents-work-item-header .documents-work-summary {
    flex: 1;
    min-width: 0;
}
.documents-work-item-header .documents-work-summary h4 {
    margin: 0 0 0.2rem 0;
    font-size: 1rem;
    color: var(--text);
}
.documents-work-item-header .documents-work-summary p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}
.documents-work-item-header .documents-work-badge {
    flex-shrink: 0;
}
.documents-work-item-header .documents-work-chevron {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform 0.2s;
}
.documents-work-item.expanded .documents-work-chevron {
    transform: rotate(180deg);
}
.documents-work-item-body {
    display: none;
    padding: 0 1rem 1rem;
    border-top: 1px solid var(--border);
}
.documents-work-item.expanded .documents-work-item-body {
    display: block;
}
.documents-work-docs {
    list-style: none;
    margin: 0 0 1rem 0;
    padding: 0;
}
.documents-work-docs li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
    font-size: 0.9rem;
}
.documents-work-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.documents-work-actions .btn {
    margin: 0;
}

.inline-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
}
.inline-checkbox input { margin: 0; }

.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}
.badge-secondary {
    background: #e5e7eb;
    color: #4b5563;
}

/* ——— Статусы ——— */
.status-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    margin: 0.2rem;
}

.status-verified {
    background: #dcfce7;
    color: #166534;
}

.status-pending {
    background: #fef9c3;
    color: #854d0e;
}

.status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

/* Статусы в тёмной теме: приглушённые фоны и светлый текст вместо «молочных» плашек */
[data-theme="dark"] .status-verified {
    background: rgba(22, 163, 74, 0.18);
    color: #bbf7d0;
    border: 1px solid rgba(74, 222, 128, 0.28);
}
[data-theme="dark"] .status-pending {
    background: rgba(202, 138, 4, 0.16);
    color: #fde68a;
    border: 1px solid rgba(250, 204, 21, 0.32);
}
[data-theme="dark"] .status-rejected {
    background: rgba(185, 28, 28, 0.2);
    color: #fecaca;
    border: 1px solid rgba(248, 113, 113, 0.35);
}
[data-theme="dark"] .status-badge {
    box-sizing: border-box;
}

/* ——— Сообщения ——— */
.error-message {
    color: #b91c1c;
    margin-top: 0.75rem;
    padding: 0.6rem;
    background: #fef2f2;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* Пустые контейнеры в формах/модалках скрыты; !important перекрывает устаревший inline display после очистки текста */
.error-message:empty {
    display: none !important;
}

.success-message {
    color: #166534;
    margin-top: 0.75rem;
    padding: 0.6rem;
    background: #f0fdf4;
    border-radius: 6px;
    font-size: 0.9rem;
}

.text-muted {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.field-hint {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.field-error {
    display: block;
    margin-top: 0.25rem;
    color: #b91c1c;
    font-size: 0.85rem;
}

.field-error:empty { display: none; }
.input-invalid { border-color: #b91c1c !important; }

/* ——— Модальные окна ——— */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    overflow: auto;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.show {
    display: flex;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--card-bg);
    padding: 1.75rem;
    border-radius: 12px;
    width: 100%;
    max-width: 440px;
    max-height: min(90vh, 100dvh - 2rem);
    overflow-y: auto;
    margin: max(0.5rem, env(safe-area-inset-top, 0px)) auto max(0.5rem, env(safe-area-inset-bottom, 0px));
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    animation: modalSlide 0.25s ease;
}
.modal-content-wide {
    max-width: 640px;
}

@keyframes modalSlide {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    color: var(--text);
    font-size: 1.15rem;
    font-weight: 600;
}

.close {
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: var(--primary);
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

/* ——— Таблицы ——— */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

table th,
table td {
    padding: 0.65rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

table th {
    background: var(--table-header-bg);
    font-weight: 600;
    color: var(--text);
}

table tr:hover {
    background: var(--table-row-hover);
}

.table-responsive {
    overflow-x: auto;
}

/* ——— Права модераторов: карточки вместо широкой таблицы ——— */
.permissions-cards {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.permission-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    box-shadow: var(--card-shadow);
    border-left: 4px solid var(--primary);
}

.permission-card-header {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}
.permission-card-email {
    font-weight: normal;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Карточка кандидата (админ) */
.card-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}
.card-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.card-table td:first-child {
    font-weight: 500;
    color: var(--text);
    width: 220px;
}
.card-table input[type="text"],
.card-table input[type="date"],
.card-table select {
    width: 100%;
    max-width: 280px;
    padding: 0.4rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
}
.card-table select.card-field {
    max-width: 200px;
}

.card-table .searchable-select--card {
    width: 100%;
    max-width: 280px;
    min-width: 0;
}
.card-table .searchable-select--card .searchable-select-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.4rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: inherit;
    font-family: inherit;
    color: var(--text);
    background: var(--input-surface);
}
.card-table .searchable-select--card .searchable-select-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.12);
}

/* Сводная таблица кандидатов (админ) */
.table-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.table-toolbar label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.table-toolbar select,
.table-more-filters select,
.table-toolbar input[type="text"],
.table-toolbar input[type="search"] {
    padding: 0.4rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background-color: var(--input-surface);
    color: var(--text);
    color-scheme: inherit;
}
.table-toolbar-col-visibility {
    position: relative;
}
.columns-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.35rem;
    min-width: 260px;
    max-height: 70vh;
    overflow-y: auto;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    padding: 0.75rem 1rem;
    z-index: 50;
    display: none;
}
.columns-dropdown[aria-hidden="false"],
.columns-dropdown.columns-dropdown-open {
    display: block;
}
.columns-dropdown-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text);
}
#table-columns-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}
.column-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.25rem 0;
}
.column-checkbox input {
    accent-color: var(--primary);
    cursor: pointer;
}
.columns-dropdown-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}
.table-responsive-wrap {
    overflow-x: auto;
    margin-top: 0.5rem;
}
.data-table {
    width: 100%;
    min-width: 1200px;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.data-table th,
.data-table td {
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.data-table th {
    white-space: normal;
    max-width: none;
    background: var(--table-header-bg);
    color: var(--text);
    font-weight: 600;
    border-bottom: 2px solid var(--primary);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 0;
    z-index: 1;
}
[data-theme="dark"] .data-table th {
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 0 0 rgba(227, 30, 36, 0.55);
}
.data-table tbody tr:hover {
    background: rgba(196, 30, 58, 0.05);
}
[data-theme="dark"] .data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.045);
}
.data-table tbody tr.row-inactive {
    background: var(--bg-muted, #f8f9fa);
    opacity: 0.9;
}
.data-table tbody tr.row-updated-by-staff {
    background: #fff8dc;
}
.data-table tbody tr.row-updated-by-staff:hover {
    background: #fff0b8;
}
[data-theme="dark"] .data-table tbody tr.row-updated-by-staff {
    background: rgba(234, 179, 8, 0.14);
}
[data-theme="dark"] .data-table tbody tr.row-updated-by-staff:hover {
    background: rgba(234, 179, 8, 0.22);
}
.data-table .table-status-select {
    min-width: 100px;
    padding: 0.25rem 0.35rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.85rem;
}

/* Таблица «Учебные центры» в админке: полные названия без обрезки */
.training-centers-admin-wrap .data-table {
    min-width: 640px;
}
.training-centers-admin-wrap .data-table td {
    white-space: normal;
    word-break: break-word;
    max-width: none;
    overflow: visible;
    text-overflow: clip;
}
.training-centers-admin-wrap .data-table td.training-centers-col-year {
    white-space: nowrap;
    width: 4.5rem;
    max-width: 6rem;
}
.training-centers-admin-wrap .data-table td.training-centers-col-actions,
.training-centers-admin-wrap .data-table th.training-centers-col-actions {
    white-space: nowrap;
    width: 1%;
    max-width: 14rem;
}

/* Компактный список кандидатов (админ / модератор): плотнее сводной таблицы */
.candidates-table-card.card {
    padding: 0;
    overflow: hidden;
}
.candidates-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
    margin-bottom: 0.75rem;
}
.candidates-toolbar label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    font-size: 0.9rem;
}
.candidates-search-input {
    min-width: 200px;
    max-width: 320px;
    padding: 0.4rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
}
.candidates-page-size-select {
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    font-size: 0.9rem;
}
.candidates-compact-table.data-table {
    min-width: 720px;
    font-size: 0.875rem;
}
.candidates-compact-table.data-table th,
.candidates-compact-table.data-table td {
    max-width: none;
    vertical-align: middle;
}
.candidates-compact-table.data-table td.candidates-cell-fio,
.candidates-compact-table.data-table td.candidates-cell-email,
.candidates-compact-table.data-table td.candidates-cell-squad {
    white-space: normal;
    word-break: break-word;
    overflow: visible;
    text-overflow: clip;
}
.candidates-compact-table.data-table td.candidates-cell-email {
    max-width: 14rem;
}
.candidates-compact-table.data-table th.candidates-col-actions,
.candidates-compact-table.data-table td.candidates-col-actions {
    white-space: nowrap;
    width: 1%;
    min-width: 0;
    max-width: none;
    text-align: right;
    vertical-align: middle;
}
.data-table th .th-sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    width: 100%;
}
.data-table th .th-sort-btn:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}
.data-table th .th-sort-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}
.candidates-action-btns {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.3rem;
    justify-content: flex-end;
    max-width: 100%;
}
/* Компактные кнопки в строке таблицы: без 44px из общего .btn */
.candidates-action-btns .btn-sm,
.candidates-action-btns .btn.candidates-act-compact {
    min-height: 0;
    min-width: 0;
    padding: 0.2rem 0.5rem;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.25;
    border-radius: 6px;
    white-space: nowrap;
}
.candidates-action-btns .btn-primary.candidates-act-compact {
    box-shadow: none;
}
/* Вторичные действия — контур, без тяжёлой заливки */
.candidates-action-btns .btn-secondary.candidates-act-compact {
    background: var(--btn-secondary-surface);
    color: #475569;
    border-color: #cbd5e1;
}
.candidates-action-btns .btn-secondary.candidates-act-compact:hover {
    background: var(--btn-secondary-hover);
    border-color: #94a3b8;
    color: #334155;
}
[data-theme="dark"] .candidates-action-btns .btn-secondary.candidates-act-compact {
    color: var(--text);
}
[data-theme="dark"] .candidates-action-btns .btn-secondary.candidates-act-compact:hover {
    color: var(--text);
}
/* Опасное действие — компактно, без «плиты» на всю ширину */
.candidates-action-btns .btn-danger.candidates-act-compact {
    padding-left: 0.45rem;
    padding-right: 0.45rem;
}
.candidates-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    padding: 0.65rem 1rem;
    border-top: 1px solid var(--border);
    background: var(--bg-muted, #f8fafc);
}
.candidates-pager-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.candidates-pager-summary {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}
.badge.candidates-badge-inline {
    font-size: 0.72rem;
    vertical-align: middle;
    font-weight: 600;
}
.candidate-state-badges {
    margin-top: 0.35rem;
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}
.candidate-state-badges .status-badge {
    margin: 0;
    font-size: 0.72rem;
}

/* Контроль качества данных: читаемая таблица без обрезки ключевых полей */
.quality-table-wrap {
    overflow-x: auto;
}
.quality-data-table {
    min-width: 980px;
    table-layout: fixed;
}
.quality-data-table th,
.quality-data-table td {
    white-space: normal;
    word-break: break-word;
    overflow: visible;
    text-overflow: clip;
    vertical-align: top;
    line-height: 1.35;
}
.quality-data-table th:nth-child(1),
.quality-data-table td:nth-child(1) { width: 22%; }
.quality-data-table th:nth-child(2),
.quality-data-table td:nth-child(2) { width: 16%; }
.quality-data-table th:nth-child(3),
.quality-data-table td:nth-child(3) { width: 12%; }
.quality-data-table th:nth-child(4),
.quality-data-table td:nth-child(4) { width: 8%; }
.quality-data-table th:nth-child(5),
.quality-data-table td:nth-child(5) { width: 12%; }
.quality-data-table th:nth-child(6),
.quality-data-table td:nth-child(6) { width: 22%; }
.quality-data-table th:nth-child(7),
.quality-data-table td:nth-child(7) { width: 8%; white-space: nowrap; }

.quality-view .view-body.card {
    padding: 1rem 1rem 1.1rem;
}
.quality-view .table-toolbar {
    gap: 0.65rem 0.9rem;
}
.quality-view .table-toolbar label {
    font-size: 0.88rem;
}
.quality-view .table-toolbar input[type="text"] {
    min-width: 220px;
}
.quality-view .quality-data-table {
    font-size: 0.88rem;
}
.quality-view .quality-data-table th,
.quality-view .quality-data-table td {
    padding: 0.45rem 0.5rem;
}

/* Пакетная отправка во ВСОП */
.vsop-batch-view .view-body {
    padding: 0.9rem 1rem 1.1rem;
}
.vsop-batch-view .table-toolbar {
    gap: 0.6rem 0.9rem;
}
.vsop-batch-view .table-toolbar input[type="text"] {
    min-width: 260px;
}
.vsop-batch-view .data-table {
    min-width: 1220px;
    table-layout: fixed;
}
.vsop-batch-view .data-table th,
.vsop-batch-view .data-table td {
    font-size: 0.86rem;
    line-height: 1.3;
    padding: 0.45rem 0.5rem;
    vertical-align: top;
    word-break: break-word;
}
.vsop-batch-view .data-table th:nth-child(1),
.vsop-batch-view .data-table td:nth-child(1) { width: 44px; white-space: nowrap; }
.vsop-batch-view .data-table th:nth-child(2),
.vsop-batch-view .data-table td:nth-child(2) { width: 20%; }
.vsop-batch-view .data-table th:nth-child(3),
.vsop-batch-view .data-table td:nth-child(3) { width: 12%; }
.vsop-batch-view .data-table th:nth-child(4),
.vsop-batch-view .data-table td:nth-child(4) { width: 14%; }
.vsop-batch-view .data-table th:nth-child(5),
.vsop-batch-view .data-table td:nth-child(5) { width: 15%; }
.vsop-batch-view .data-table th:nth-child(6),
.vsop-batch-view .data-table td:nth-child(6) { width: 17%; }
.vsop-batch-view .data-table th:nth-child(7),
.vsop-batch-view .data-table td:nth-child(7) { width: 22%; }

.permission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.5rem 1.5rem;
    margin-bottom: 1rem;
}

.permission-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.permission-item input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--primary);
    cursor: pointer;
}

.permission-card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.permission-card-actions .preset-select {
    min-width: 200px;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    font-size: 0.95rem;
}

.permissions-table th,
.permissions-table td {
    white-space: nowrap;
    vertical-align: middle;
    font-size: 0.85rem;
}

.permissions-table .preset-select {
    min-width: 140px;
    margin-right: 0.25rem;
}

/* ——— Тосты ——— */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: #fff;
    padding: 0.9rem 1.25rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    min-width: 280px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-left: 4px solid var(--primary);
    animation: toastIn 0.3s ease;
}

@keyframes toastIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success { border-left-color: #16a34a; }
.toast.error { border-left-color: #dc2626; }
.toast.info { border-left-color: #0ea5e9; }

.toast-message { flex: 1; font-weight: 500; font-size: 0.95rem; color: #1e293b; }
/* Тёмная тема: раньше белая плашка со светлым (унаследованным) текстом — не читалось. */
[data-theme="dark"] .toast { background: #2a2a2a; box-shadow: 0 4px 20px rgba(0,0,0,0.5); }
[data-theme="dark"] .toast-message { color: #ececec; }
.toast-close { cursor: pointer; color: #94a3b8; font-size: 1.25rem; }

/* ——— Адаптив ——— */
@media (max-width: 768px) {
    .sidebar {
        width: 280px;
        max-width: 85vw;
    }

    .main-content {
        padding: 1rem 1rem max(1rem, env(safe-area-inset-bottom, 0px));
    }

    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-widgets {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ——— Юридические документы (согласие 152-ФЗ) ——— */
.legal-consent-page {
    background: var(--legal-page-gradient);
    min-height: 100vh;
}

.legal-consent-backdrop {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: clamp(1.25rem, 4vw, 2.5rem) 1rem 2rem;
}

.legal-consent-inner {
    width: 100%;
    max-width: 34rem;
}

.legal-consent-card {
    position: relative;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.06),
        0 12px 32px -8px rgba(0, 0, 0, 0.12);
    padding: 1.75rem 1.75rem 1.5rem;
    text-align: left;
    overflow: hidden;
}

.legal-consent-card__accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, #ff6b6b 100%);
}

.legal-consent-badge {
    display: inline-block;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--surface-muted);
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    margin-bottom: 0.75rem;
}

.legal-consent-title {
    margin: 0 0 0.75rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--rzd-grey);
    line-height: 1.25;
    text-align: left;
}

.legal-consent-lead {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--text-muted);
}

.legal-doc-read {
    margin: 0 0 1.35rem;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text);
}

.legal-doc-inline-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.legal-doc-inline-link:hover {
    color: var(--primary-hover);
    text-decoration-color: var(--primary-hover);
}

.legal-consent-form {
    margin-top: 0.25rem;
}

.legal-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
    padding: 1rem 1rem 1.05rem;
    background: var(--surface-muted);
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.legal-checkboxes.legal-checkboxes--invalid {
    border-color: #ef4444;
    background: #fff5f5;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}
[data-theme="dark"] .legal-checkboxes.legal-checkboxes--invalid {
    background: rgba(127, 29, 29, 0.35);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
}

.legal-check-label {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.9rem;
    line-height: 1.45;
    cursor: pointer;
    text-align: left;
    color: var(--text);
}

.legal-check-label input {
    margin-top: 0.22rem;
    flex-shrink: 0;
    width: 1.05rem;
    height: 1.05rem;
    accent-color: var(--primary);
}

.legal-consent-submit {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-radius: 10px;
}

.legal-consent-error {
    margin-top: 0.75rem;
}

.legal-consent-footnote {
    margin: 1rem 0 0;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--text-muted);
}

.modal-content-wide {
    max-width: min(900px, 96vw);
    width: 96%;
}

.legal-doc-modal-inner {
    padding: 0;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
}

.legal-doc-modal-inner .modal-header {
    padding: 1rem 1.25rem;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border);
}

.legal-doc-iframe {
    border: none;
    width: 100%;
    flex: 1;
    min-height: 60vh;
    background: #fff;
}

/* ——— Безопасность вёрстки, доступность, мобильные устройства ——— */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    overflow-x: clip;
}

.skip-link {
    position: absolute;
    left: -10000px;
    top: 0;
    z-index: 100001;
    padding: 0.65rem 1.1rem;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 8px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.skip-link:focus {
    left: 0;
    outline: 3px solid #fff;
    outline-offset: 2px;
}

.app-layout {
    min-width: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.side-nav a.nav-link:focus-visible,
.sidebar-toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

@media (max-width: 480px) {
    .app-logo {
        font-size: 1.05rem;
        line-height: 1.2;
        max-width: min(200px, 42vw);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .user-email {
        display: none;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .login-card {
        padding: 1.5rem 1.15rem;
    }

    .modal-content {
        width: min(100%, 100vw - 1rem);
        padding: 1.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ——— Сообщения кандидату (отклонение документов) ——— */
.candidate-notifications-wrap {
    margin-bottom: 1rem;
}

.candidate-notifications-inner {
    padding: 1rem 1.25rem;
    border-left: 4px solid #dc2626;
}

.candidate-notifications__heading {
    font-size: 1.05rem;
    margin: 0 0 0.75rem;
    color: var(--rzd-grey);
}

.candidate-notification {
    padding: 0.85rem 0;
    border-top: 1px solid var(--border);
}

.candidate-notification:first-of-type {
    border-top: none;
    padding-top: 0;
}

.candidate-notification--unread {
    background: #fff7f7;
    margin: 0 -0.75rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    border-radius: 8px;
}

.candidate-notification__badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fff;
    background: #dc2626;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    margin-right: 0.35rem;
    vertical-align: middle;
}

.candidate-notification__title {
    font-weight: 600;
    font-size: 0.98rem;
    margin-bottom: 0.35rem;
    color: var(--text);
}

.candidate-notification__meta {
    font-size: 0.9rem;
    margin: 0 0 0.35rem;
    color: var(--text-muted);
}

.candidate-notification__msg {
    margin: 0.5rem 0;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.45;
}

.candidate-notification__ok {
    margin-top: 0.5rem;
}

/* ——— Памятка кандидата (модалка + вход) ——— */
.login-guide-wrap {
    margin-top: 1.25rem;
    text-align: center;
}

.login-forgot-wrap {
    margin-top: 0.75rem;
    text-align: center;
}

.login-guide-btn {
    font-size: 0.9rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}

#candidate-guide-modal.modal {
    z-index: 1200;
}

.candidate-guide-modal-inner {
    max-width: min(42rem, 96vw);
    padding: 1.25rem 1.5rem 1.5rem;
    max-height: min(92vh, 100dvh - 1rem);
    overflow-y: auto;
}

.candidate-guide-intro {
    margin-bottom: 1rem;
    padding: 1rem 1.1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid var(--border);
}

.candidate-guide-intro__lead {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text);
}

.candidate-guide-rail {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-top: 0.85rem;
    flex-wrap: wrap;
}

.candidate-guide-rail__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.85;
}

.candidate-guide-rail__line {
    width: 2.2rem;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #94a3b8);
    border-radius: 2px;
    opacity: 0.5;
}

.candidate-guide-accordions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: none;
    overflow: visible;
    padding-right: 0.25rem;
}

.cg-step {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card-bg);
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.cg-step__summary {
    list-style: none;
    cursor: pointer;
    padding: 0.85rem 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.65rem;
    user-select: none;
}

.cg-step__summary::-webkit-details-marker {
    display: none;
}

.cg-step__summary::after {
    content: '▾';
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}

.cg-step[open] .cg-step__summary::after {
    transform: rotate(-180deg);
}

.cg-step__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    height: 1.75rem;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
}

.cg-step__body {
    padding: 0 1rem 1rem;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--text);
    border-top: 1px solid var(--border);
}

.cg-step__body p {
    margin: 0.5rem 0 0;
}

.cg-step__body p:first-child {
    margin-top: 0.75rem;
}

.cg-list {
    margin: 0.5rem 0 0;
    padding-left: 1.2rem;
}

.cg-list--ol {
    list-style: decimal;
}

.cg-list li {
    margin: 0.35rem 0;
}

.cg-tip {
    margin-top: 0.75rem !important;
    padding: 0.55rem 0.65rem;
    background: #eff6ff;
    border-radius: 8px;
    font-size: 0.88rem;
    color: #1e40af;
    border-left: 3px solid #3b82f6;
}

.cg-callout {
    margin: 0.75rem 0 0.5rem;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    font-size: 0.88rem;
}

.cg-callout--warn {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #78350f;
}

.cg-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.65rem 0;
}

.cg-pill {
    display: inline-block;
    padding: 0.35rem 0.65rem;
    background: #f1f5f9;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    border: 1px solid var(--border);
}

.cg-muted {
    font-size: 0.86rem;
    color: var(--text-muted);
}

.candidate-guide-footer {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.nav-link--guide {
    font-weight: 600;
    color: #2563eb;
}

.nav-link--guide:hover {
    color: #1d4ed8;
}

/* Панель модератора, воронка, аудит в карточке */
.candidate-card-modal-staff {
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
}

.staff-tab-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.65rem;
}

.staff-tab {
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    cursor: pointer;
    font-size: 0.9rem;
}

.staff-tab--active {
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}

.watch-star {
    padding: 0.12rem 0.35rem;
    font-size: 1.05rem;
    line-height: 1;
    color: var(--text-muted);
    border: none;
    background: transparent;
    cursor: pointer;
}

.watch-star.is-on {
    color: var(--primary);
}

.funnel-layout {
    display: grid;
    gap: 1rem;
}

@media (min-width: 900px) {
    .funnel-layout {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

.funnel-bars-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.funnel-row {
    display: grid;
    grid-template-columns: minmax(0, 10rem) 1fr 3rem;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.88rem;
}

.funnel-row__track {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.funnel-row__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent-deep));
    border-radius: 4px;
    min-width: 2%;
}

.planner-task-form textarea {
    min-height: 4rem;
    resize: vertical;
}

/* ——— Планёр штаба: современная форма и списки ——— */
.planner-task-form--modern {
    margin-top: 1.25rem;
    padding: 1.35rem 1.5rem 1.5rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: linear-gradient(165deg, var(--card-bg) 0%, var(--bg-muted) 120%);
    box-shadow: var(--card-shadow);
}

.planner-task-form__head {
    margin-bottom: 1.15rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.planner-task-form__title {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    margin: 0 0 0.35rem;
}

.planner-task-form__lede {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.45;
    max-width: 42rem;
}

.planner-task-form__grid {
    display: grid;
    grid-template-columns: 1fr minmax(10rem, 11rem);
    gap: 1rem 1.25rem;
    align-items: start;
}

.planner-field--title {
    grid-column: 1;
}

.planner-field--due {
    grid-column: 2;
}

.planner-field--body,
.planner-field--executor {
    grid-column: 1 / -1;
}

.planner-field--cid {
    grid-column: 1 / -1;
    max-width: 20rem;
}

@media (max-width: 640px) {
    .planner-task-form__grid {
        grid-template-columns: 1fr;
    }
    .planner-field--due {
        grid-column: 1;
    }
    .planner-field--cid {
        max-width: none;
    }
}

.planner-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.35rem;
    letter-spacing: 0.01em;
}

.planner-optional {
    font-weight: 500;
    color: var(--text-muted);
}

.planner-field-hint {
    margin: 0.4rem 0 0;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.planner-input,
.planner-textarea,
.planner-select {
    width: 100%;
    font: inherit;
    font-size: 0.9375rem;
    color: var(--text);
    background: var(--input-surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.55rem 0.75rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.planner-input:hover,
.planner-textarea:hover,
.planner-select:hover {
    border-color: var(--rzd-grey-light);
}

.planner-input:focus,
.planner-textarea:focus,
.planner-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.planner-textarea {
    min-height: 5.5rem;
    resize: vertical;
    line-height: 1.45;
}

.planner-input::placeholder,
.planner-textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.85;
}

.planner-select-wrap {
    position: relative;
}

.planner-select-wrap::after {
    content: '';
    position: absolute;
    right: 0.85rem;
    top: 50%;
    width: 0.5rem;
    height: 0.5rem;
    margin-top: -0.2rem;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
    pointer-events: none;
    opacity: 0.75;
}

.planner-select {
    appearance: none;
    padding-right: 2.25rem;
    cursor: pointer;
}

.planner-task-form__actions {
    margin-top: 1.35rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.planner-submit-btn {
    border-radius: 10px;
    padding: 0.6rem 1.35rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.planner-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(227, 30, 36, 0.25);
}

.planner-submit-btn:active {
    transform: translateY(0);
}

.staff-hub-layout {
    align-items: start;
}

.planner-hub-card--modern {
    border-radius: 14px;
    overflow: hidden;
}

.planner-hub-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin-bottom: 0.25rem;
}

.planner-hub-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.02em;
}

.planner-hub-card__date {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    background: var(--surface-muted);
}

.planner-empty-hint {
    margin: 0.75rem 0 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.planner-hub-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.85rem 0 1rem;
    padding: 0.2rem;
    border-radius: 12px;
    background: var(--surface-muted);
}

.planner-hub-tab {
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 9px;
    padding: 0.45rem 0.9rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.planner-hub-tab:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.55);
}

[data-theme="dark"] .planner-hub-tab:hover {
    background: rgba(255, 255, 255, 0.06);
}

.planner-hub-tab.is-active {
    color: var(--text);
    background: var(--card-bg);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] .planner-hub-tab.is-active {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.planner-task-list--modern {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.planner-task-list--nested {
    margin-top: 0.65rem;
}

.planner-task-card--modern {
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--list-item-bg);
    padding: 0.85rem 1rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.planner-task-card--modern:hover {
    border-color: var(--rzd-grey-light);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

.planner-task-card__body {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 0.85rem;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
}

.planner-task-card__main {
    flex: 1;
    min-width: 12rem;
}

.planner-task-card__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.65rem;
    margin-top: 0.25rem;
}

.planner-task-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.planner-task-due {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.planner-task-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    margin-top: 0.4rem;
    font-size: 0.85rem;
}

.planner-task-card__actions {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    flex-shrink: 0;
}

.planner-open-details {
    margin-top: 1rem;
    border-radius: 12px;
    border: 1px dashed var(--border);
    padding: 0.35rem 0.85rem 0.85rem;
    background: var(--bg-muted);
}

.planner-open-details__summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text);
    padding: 0.5rem 0;
    list-style: none;
}

.planner-open-details__summary::-webkit-details-marker {
    display: none;
}

.planner-open-details__summary::before {
    content: '';
    display: inline-block;
    width: 0.4rem;
    height: 0.4rem;
    margin-right: 0.45rem;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(-45deg);
    vertical-align: 0.15rem;
    transition: transform 0.15s ease;
}

.planner-open-details[open] .planner-open-details__summary::before {
    transform: rotate(45deg);
    vertical-align: 0.05rem;
}

.staff-hub-candidates-card__hint {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.staff-hub-cand-list {
    list-style: none;
    padding: 0;
}

.planner-status-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: var(--surface-muted);
    color: var(--text-muted);
    margin-right: 0.35rem;
    vertical-align: middle;
}

.planner-task-card.planner-task-card--due-today {
    border-left: 3px solid var(--primary);
    padding-left: calc(1rem - 2px);
    box-shadow: inset 0 0 0 1px var(--primary-soft);
}

.planner-task-from {
    color: var(--text-muted);
}

.planner-task-card__exec .text-muted {
    color: inherit;
    opacity: 0.92;
}

.planner-task-card__exec-line {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.site-footer {
    margin-top: 1.25rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border);
    font-size: 0.88rem;
    text-align: center;
    color: var(--text-muted);
}

.site-footer--app {
    flex-shrink: 0;
    padding: 0.75rem 1rem 1rem;
    background: var(--surface);
}

.site-footer a {
    color: var(--primary);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

.staff-access-banner {
    background: #fef3c7;
    color: #92400e;
    border-bottom: 1px solid #fcd34d;
    padding: 0.65rem 1rem;
    font-size: 0.92rem;
    text-align: center;
}

.staff-access-banner--blocked {
    background: #fee2e2;
    color: #991b1b;
    border-bottom-color: #fca5a5;
}

.staff-access-banner a {
    color: inherit;
    font-weight: 600;
}

.compliance-doc-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border);
}

.compliance-doc-row:last-child {
    border-bottom: none;
}

.pd-legal-footnote a {
    color: var(--primary);
}

.legal-check-label--master {
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px dashed var(--border);
}

.profile-pd-consents__title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
}

.profile-pd-consents__lead {
    margin-bottom: 0.75rem;
}

/* ==== UI-доработки 1.6.0 ==== */

/* Сворачиваемые секции карточки кандидата */
.card-section {
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 0.6rem;
    overflow: hidden;
}
.card-section > summary {
    cursor: pointer;
    padding: 0.6rem 0.85rem;
    font-weight: 600;
    background: var(--bg-muted);
    list-style: none;
    user-select: none;
}
.card-section > summary::-webkit-details-marker { display: none; }
.card-section > summary::before {
    content: '▸';
    display: inline-block;
    margin-right: 0.5rem;
    transition: transform 0.15s ease;
    color: var(--text-muted);
}
.card-section[open] > summary::before { transform: rotate(90deg); }
.card-section > .card-table { margin: 0; }

/* Дашборд: визуальное разделение групп «Показатели» и «Быстрые переходы» */
.dashboard-section { margin-bottom: 1.25rem; }
.dashboard-section-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin: 0 0 0.6rem;
}
.dashboard-quicklinks { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* Плейсхолдер незаполненного имени */
.fio-empty { font-style: italic; }

/* Контраст (WCAG AA): усиливаем приглушённый текст в обеих темах */
:root { --text-muted: #5b6675; }
[data-theme="dark"] { --text-muted: #b0b0b0; }

/* Адаптивность: широкие таблицы горизонтально прокручиваются на узких экранах */
@media (max-width: 768px) {
    .view-body { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ==== Экран воронки (аналитика набора) ==== */
.text-danger { color: #dc2626; }
[data-theme="dark"] .text-danger { color: #f87171; }

.funnel-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.funnel-kpi {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    box-shadow: var(--card-shadow);
}
.funnel-kpi__val { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.funnel-kpi__lbl { color: var(--text-muted); font-size: 0.82rem; margin-top: 0.2rem; }

.funnel-bars2 { display: flex; flex-direction: column; gap: 0.55rem; }
.funnel-row2 {
    display: grid;
    grid-template-columns: minmax(140px, 1.4fr) 3fr auto auto;
    align-items: center;
    gap: 0.6rem;
}
.funnel-row2__label { font-weight: 600; font-size: 0.9rem; }
.funnel-row2__track {
    background: var(--bg-muted);
    border-radius: 6px;
    height: 20px;
    overflow: hidden;
}
.funnel-row2__fill { height: 100%; border-radius: 6px; transition: width 0.3s ease; background: #9ca3af; }
.funnel-stage--draft    { background: #9ca3af; }
.funnel-stage--sent     { background: #f59e0b; }
.funnel-stage--tt       { background: #3b82f6; }
.funnel-stage--employed { background: #22c55e; }
.funnel-stage--resigned { background: #ef4444; }
.funnel-row2__val { min-width: 64px; text-align: right; font-size: 0.9rem; }
.funnel-row2__dwell { min-width: 56px; text-align: right; font-size: 0.82rem; }

/* Недельная динамика — мини-бары */
.wkbars {
    display: flex;
    align-items: flex-end;
    gap: 0.35rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    min-height: 120px;
}
.wkbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    min-width: 34px;
}
.wkbar__track {
    width: 22px;
    height: 90px;
    display: flex;
    align-items: flex-end;
    background: var(--bg-muted);
    border-radius: 4px;
    overflow: hidden;
}
.wkbar__fill { width: 100%; background: var(--primary, #e31e24); border-radius: 4px 4px 0 0; transition: height 0.3s ease; }
.wkbar__lbl { font-size: 0.68rem; color: var(--text-muted); white-space: nowrap; }
.wkbar__n { font-size: 0.72rem; font-weight: 600; }

@media (max-width: 640px) {
    .funnel-row2 { grid-template-columns: 1fr; gap: 0.2rem; }
    .funnel-row2__val, .funnel-row2__dwell { text-align: left; }
}

/* ==== Трекер этапов кандидата (ЛК) ==== */
.emp-progress { margin-bottom: 1rem; }
.emp-progress__bar { height: 10px; background: var(--bg-muted); border-radius: 6px; overflow: hidden; }
.emp-progress__fill { height: 100%; background: #22c55e; border-radius: 6px; transition: width 0.35s ease; }
.emp-progress__label { margin-top: 0.4rem; font-size: 0.85rem; color: var(--text-muted); }

.emp-steps { list-style: none; margin: 0; padding: 0; }
.emp-step { display: flex; gap: 0.75rem; padding: 0.55rem 0; position: relative; }
.emp-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 15px;
    top: 40px;
    bottom: -4px;
    width: 2px;
    background: var(--border);
}
.emp-step__dot {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    background: var(--bg-muted);
    color: var(--text-muted);
    border: 2px solid var(--border);
    position: relative;
    z-index: 1;
}
.emp-step--done .emp-step__dot { background: #22c55e; color: #fff; border-color: #22c55e; }
.emp-step--current .emp-step__dot { background: #f59e0b; color: #fff; border-color: #f59e0b; box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18); }
.emp-step__body { flex: 1; min-width: 0; padding-top: 0.15rem; }
.emp-step__row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.emp-step__name { font-weight: 600; }
.emp-step--pending .emp-step__name { color: var(--text-muted); }
.emp-step__hint { font-size: 0.82rem; margin-top: 0.15rem; }

/* ==== Таймлайн статусов (карточка кандидата, вкладка «Статусы») ==== */
.status-tl { list-style: none; margin: 0; padding: 0; }
.status-tl__item { display: flex; gap: 0.6rem; padding: 0.4rem 0; position: relative; }
.status-tl__item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 20px;
    bottom: -6px;
    width: 2px;
    background: var(--border);
}
.status-tl__dot {
    flex: 0 0 auto;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary, #e31e24);
    margin-top: 5px;
    z-index: 1;
}
.status-tl__stages { font-size: 0.92rem; }
.status-tl__meta { font-size: 0.8rem; margin-top: 0.1rem; }

/* ---- Предпросмотр/чеклист документов ВСОП (v1.6.6) ---- */
.badge--danger { background: #fdecea; color: #c62828; }
[data-theme="dark"] .badge--danger { background: #4a1f1f; color: #ffb4a8; }

.vsop-prev-body { max-height: 65vh; overflow-y: auto; padding: 0.5rem 0.25rem; }
.vsop-prev-summary { margin: 0 0 0.75rem; }
.vsop-prev-candidate {
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 8px;
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.9rem;
    background: var(--card-bg, #fff);
}
[data-theme="dark"] .vsop-prev-candidate {
    border-color: #3a3a3a;
    background: #262626;
}
.vsop-prev-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.vsop-prev-form { margin-top: 0.5rem; }
.vsop-prev-form > summary {
    cursor: pointer;
    font-weight: 600;
    padding: 0.35rem 0;
    user-select: none;
}
.vsop-prev-table { width: 100%; border-collapse: collapse; margin: 0.25rem 0 0.5rem; font-size: 0.92rem; }
.vsop-prev-table td { padding: 0.28rem 0.5rem; border-bottom: 1px solid var(--border-color, #eee); vertical-align: top; }
[data-theme="dark"] .vsop-prev-table td { border-bottom-color: #333; }
.vsop-prev-label { width: 42%; color: var(--text-muted, #666); }
[data-theme="dark"] .vsop-prev-label { color: #9e9e9e; }
.modal .modal-close {
    background: none; border: none; font-size: 1.5rem; line-height: 1;
    cursor: pointer; color: var(--text-muted, #888); padding: 0 0.25rem;
}
.modal .modal-close:hover { color: var(--text-color, #222); }

/* ---- Выбор сезона в предпросмотре ВСОП (v1.7.0) ---- */
.vsop-season-select {
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    padding: 0.5rem 0.75rem; margin-bottom: 0.75rem;
    background: var(--card-bg, #f7f7f7); border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 8px;
}
[data-theme="dark"] .vsop-season-select { background: #2a2a2a; border-color: #3a3a3a; }
.vsop-season-select span { font-weight: 600; }
.vsop-season-select label { display: inline-flex; align-items: center; gap: 0.3rem; cursor: pointer; }

/* ---- Быстрое добавление города в предпросмотре ВСОП (v1.8.1) ---- */
.vsop-city-banner { margin-bottom: 0.9rem; padding: 0.8rem 1rem; border: 1px solid; border-radius: 10px; }
.vsop-city-banner__title { margin: 0 0 0.4rem; }
.vsop-city-or { margin: 0.6rem 0 0; font-size: 0.9rem; }
.vsop-city-row {
    display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 0.5rem;
}
.vsop-city-row input, .vsop-city-row select {
    padding: 0.35rem 0.5rem; border-radius: 8px;
    border: 1px solid var(--border); background: var(--input-surface, #fff); color: var(--text);
}
.vsop-city-row .vc-name { width: 8rem; }
.vsop-city-row .vc-subname { width: 11rem; }
.vsop-city-row .vc-branch { width: 14rem; }
.vsop-city-row .vc-pick { min-width: 14rem; }
@media (max-width: 640px) {
    .vsop-city-row input, .vsop-city-row select { width: 100% !important; }
}

/* ============================================================
   Дизайн-фундамент v1.9.0: skeleton, пустые состояния,
   переходы, count-up. Всё аддитивно.
   ============================================================ */

/* ——— Skeleton-загрузчики ——— */
.skeleton-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}
.skeleton {
    position: relative;
    overflow: hidden;
    background: var(--skeleton-base);
    border-radius: var(--radius-sm);
}
.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, var(--skeleton-shine), transparent);
    animation: skeletonShimmer 1.25s var(--ease-in-out) infinite;
}
@keyframes skeletonShimmer {
    100% { transform: translateX(100%); }
}
.skeleton-line {
    height: 12px;
    border-radius: var(--radius-sm);
}
.skeleton-line--sm { width: 40%; }
.skeleton-line--md { width: 65%; }
.skeleton-line--lg { width: 90%; }
.skeleton-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.skeleton-row {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border);
}
.skeleton-avatar {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-pill);
}
.skeleton-row__body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
@media (prefers-reduced-motion: reduce) {
    .skeleton::after { animation: none; }
}

/* ——— Выразительные пустые состояния ——— */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: var(--space-3);
    padding: var(--space-8) var(--space-5);
    color: var(--text-muted);
    animation: viewFade var(--dur-med) var(--ease-out);
}
.empty-state__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: var(--radius-pill);
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 2rem;
    line-height: 1;
    margin-bottom: var(--space-1);
}
.empty-state__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}
.empty-state__hint {
    font-size: 0.92rem;
    max-width: 42ch;
    margin: 0;
    line-height: 1.55;
}
.empty-state__action {
    margin-top: var(--space-2);
}

/* ——— Усиленный переход между экранами (fade + лёгкий подъём) ——— */
.view {
    animation: viewSlideUp var(--dur-med) var(--ease-out);
}
@keyframes viewSlideUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .view { animation: viewFade var(--dur-fast) ease; }
}

/* ——— count-up: плавная смена значения метрики ——— */
.metric-tile__value {
    transition: color var(--dur-med) var(--ease-out);
    font-variant-numeric: tabular-nums;
}
.metric-tile__value.is-counting {
    color: var(--primary);
}

/* ——— Центр уведомлений: колокол, бейдж, панель (v1.9.3) ——— */
.notif-wrap { position: relative; }
.notif-bell { position: relative; }
.notif-badge {
    position: absolute;
    top: 0; right: 0;
    transform: translate(35%, -35%);
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: var(--radius-pill);
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--header-bg);
}
.notif-bell.has-unread svg { animation: bellRing 0.9s var(--ease-in-out); transform-origin: 50% 0; }
@keyframes bellRing {
    0%,100% { transform: rotate(0); }
    20% { transform: rotate(12deg); }
    40% { transform: rotate(-10deg); }
    60% { transform: rotate(6deg); }
    80% { transform: rotate(-4deg); }
}
@media (prefers-reduced-motion: reduce) { .notif-bell.has-unread svg { animation: none; } }

.notif-panel[hidden] { display: none; }
.notif-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 340px;
    max-width: 88vw;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    z-index: 1200;
    overflow: hidden;
    animation: viewSlideUp var(--dur-fast) var(--ease-out);
}
.notif-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border);
}
.notif-panel__title { font-weight: 700; }
.notif-panel__readall {
    background: none; border: none; cursor: pointer;
    color: var(--primary); font-size: 0.85rem; font-weight: 600;
}
.notif-panel__body { overflow-y: auto; flex: 1 1 auto; }
.notif-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease-out);
}
.notif-item:hover { background: var(--table-row-hover); }
.notif-item--unread { background: var(--primary-soft); }
.notif-item--unread:hover { background: var(--primary-soft); }
.notif-item__title { font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; gap: var(--space-2); }
.notif-item__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex: 0 0 auto; }
.notif-item__msg { font-size: 0.85rem; color: var(--text-muted); line-height: 1.45; }
.notif-item__meta { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; margin-bottom: 0.15rem; }
.notif-item__when { font-size: 0.75rem; color: var(--text-muted); }
.notif-panel__foot[hidden] { display: none; }
.notif-panel__foot {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-top: 1px solid var(--border);
    background: var(--surface-muted);
}
.notif-perm__text { font-size: 0.82rem; color: var(--text-muted); flex: 1 1 auto; }

/* ——— Workflow-движок (v1.10.0) ——— */
.wf-toolbar { margin-bottom: var(--space-4); }
.wf-list { display: flex; flex-direction: column; gap: var(--space-3); }
.wf-card {
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--card-bg);
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease-out);
}
.wf-card:hover { background: var(--table-row-hover); }
.wf-card__top { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.wf-card__title { font-weight: 600; }
.wf-card__meta { font-size: 0.85rem; margin-top: 2px; }
.wf-actneed {
    font-size: 0.72rem; font-weight: 700; color: #fff; background: var(--primary);
    padding: 1px 8px; border-radius: var(--radius-pill);
}

.wf-steps { display: flex; flex-direction: column; gap: var(--space-2); margin: var(--space-3) 0; }
.wf-step { display: flex; gap: var(--space-3); padding: var(--space-2) 0; }
.wf-step__num {
    flex: 0 0 auto; width: 26px; height: 26px; border-radius: var(--radius-pill);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: 700; background: var(--surface-muted); color: var(--text-muted);
}
.wf-step--pending .wf-step__num { background: var(--primary); color: #fff; }
.wf-step--approved .wf-step__num { background: #16a34a; color: #fff; }
.wf-step--rejected .wf-step__num { background: #dc2626; color: #fff; }
.wf-step__title { font-weight: 600; }
.wf-step__status { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); margin-left: var(--space-2); }
.wf-step--pending .wf-step__status { color: var(--primary); }
.wf-step--approved .wf-step__status { color: #16a34a; }
.wf-step--rejected .wf-step__status { color: #dc2626; }
.wf-step__meta { font-size: 0.8rem; }
.wf-step__comment {
    margin-top: 4px; padding: var(--space-2) var(--space-3);
    background: var(--surface-muted); border-radius: var(--radius-sm); font-size: 0.88rem;
}
.wf-act { border-top: 1px solid var(--border); padding-top: var(--space-3); margin-top: var(--space-3); }
.wf-act textarea {
    width: 100%; resize: vertical; padding: 0.5rem 0.65rem;
    border: 1px solid var(--border); border-radius: var(--radius-md);
    background: var(--input-surface); color: var(--text); font: inherit;
}
.wf-act__btns { display: flex; gap: var(--space-2); margin-top: var(--space-2); }

.wf-tpl-steps { font-size: 0.9rem; line-height: 1.6; margin-top: 0.4rem; }
.wf-edit-step { display: flex; gap: var(--space-2); align-items: center; margin-bottom: var(--space-2); }
.wf-edit-step-title { flex: 1 1 auto; padding: 0.4rem 0.6rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--input-surface); color: var(--text); }
.wf-edit-step-role { padding: 0.4rem 0.6rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--input-surface); color: var(--text); }

/* ——— Плавающий мессенджер «Связь со штабом» (v1.9.8) ——— */
.chat-widget {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1300;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-3);
}
.chat-widget__launcher {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-pill);
    border: none;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(227, 30, 36, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.chat-widget__launcher:hover { background: var(--primary-hover); transform: translateY(-2px); }
.chat-widget.is-open .chat-widget__launcher { transform: scale(0.92); }
.chat-widget__badge {
    position: absolute;
    top: -2px; right: -2px;
    min-width: 20px; height: 20px; padding: 0 5px;
    border-radius: var(--radius-pill);
    background: #fff; color: var(--primary);
    font-size: 0.72rem; font-weight: 700; line-height: 20px; text-align: center;
    box-shadow: 0 0 0 2px var(--primary);
}
.chat-widget__panel {
    width: 360px;
    max-width: calc(100vw - 40px);
    height: 480px;
    max-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.25);
    overflow: hidden;
    animation: chatWidgetIn var(--dur-med) var(--ease-out);
}
.chat-widget__panel[hidden] { display: none; }
@keyframes chatWidgetIn {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.chat-widget__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    background: var(--primary);
    color: #fff;
}
.chat-widget__title { font-weight: 700; }
.chat-widget__close {
    background: none; border: none; color: #fff; cursor: pointer;
    font-size: 1.4rem; line-height: 1; opacity: 0.9;
}
.chat-widget__close:hover { opacity: 1; }
.chat-widget .chat-body { flex: 1 1 auto; max-height: none; }
.chat-widget__back {
    background: none; border: none; color: #fff; cursor: pointer;
    font-size: 1.2rem; line-height: 1; opacity: 0.9; margin-right: auto;
}
.chat-widget__back:hover { opacity: 1; }
.chat-widget__head .chat-widget__title { flex: 1 1 auto; }
.chat-widget__stack {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}
.staff-chat-threads {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: var(--space-3);
}
@media (max-width: 480px) {
    .chat-widget { right: 12px; bottom: 12px; }
    .chat-widget__panel { width: calc(100vw - 24px); height: 70vh; }
}

/* ——— Канал сообщений «кандидат ↔ штаб» (v1.9.7) ——— */
.chat-panel { padding: 0; overflow: hidden; }
.chat-body {
    max-height: 52vh;
    min-height: 200px;
    overflow-y: auto;
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    background: var(--surface-muted);
}
.chat-msg { display: flex; align-items: flex-end; gap: 0.45rem; }
.chat-msg--mine { justify-content: flex-start; flex-direction: row-reverse; }
.chat-msg--other { justify-content: flex-start; }
.chat-msg__av { flex-shrink: 0; display: flex; }
.chat-bubble {
    max-width: 78%;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-lg);
    background: var(--card-bg);
    border: 1px solid var(--border);
    box-shadow: var(--card-shadow);
}
.chat-msg--mine .chat-bubble {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.chat-bubble__author { font-size: 0.75rem; font-weight: 700; opacity: 0.8; margin-bottom: 2px; }
.chat-bubble__body { white-space: pre-wrap; word-break: break-word; line-height: 1.45; }
.chat-bubble__when { font-size: 0.7rem; opacity: 0.7; margin-top: 3px; text-align: right; }
.chat-composer {
    display: flex;
    gap: var(--space-2);
    padding: var(--space-3);
    border-top: 1px solid var(--border);
    background: var(--card-bg);
}
.chat-input {
    flex: 1 1 auto;
    resize: vertical;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--input-surface);
    color: var(--text);
    font: inherit;
}
.chat-header { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.chat-header__fio { font-weight: 700; }

.msg-threads { display: flex; flex-direction: column; gap: var(--space-2); }
.msg-thread {
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--card-bg);
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease-out);
}
.msg-thread:hover { background: var(--table-row-hover); }
.msg-thread__top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.msg-thread__top .av + .msg-thread__fio { flex: 1; min-width: 0; }
.msg-thread__fio { font-weight: 600; }
.msg-thread__unread {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 20px; height: 20px; padding: 0 6px;
    border-radius: var(--radius-pill); background: var(--primary); color: #fff;
    font-size: 0.75rem; font-weight: 700;
}
.msg-thread__last { font-size: 0.88rem; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ——— Локации отрядов (v1.9.5.3) ——— */
.squad-loc-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}
.squad-loc-tab {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--btn-default-bg);
    color: var(--text);
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.squad-loc-tab:hover { background: var(--btn-default-hover); }
.squad-loc-tab.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.squad-loc-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: var(--radius-pill);
    background: var(--surface-muted);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
}
.squad-loc-tab.is-active .squad-loc-count {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* ——— Рассылка кандидатам (v1.9.5) ——— */
.broadcast-card { max-width: 640px; }
.broadcast-card textarea {
    width: 100%;
    resize: vertical;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--input-surface);
    color: var(--text);
    font: inherit;
}
.bc-charcount { font-size: 0.8rem; color: var(--text-muted); text-align: right; margin-top: 0.25rem; }
.bc-audience { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.bc-radio { display: inline-flex; align-items: center; gap: var(--space-2); cursor: pointer; }
.bc-recipients { margin: var(--space-4) 0; }
.bc-actions { margin-top: var(--space-3); }

/* ——— BI-аналитика (v1.9.2) ——— */
.bi-kpis { margin-bottom: var(--space-5); }
.bi-section { margin-bottom: var(--space-5); }
.bi-hint { margin: -0.25rem 0 var(--space-4); font-size: 0.85rem; }
.bi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-4);
}
.bi-gender-sep { color: var(--text-muted); margin: 0 2px; font-weight: 400; }

/* Горизонтальные бары */
.bi-barlist { display: flex; flex-direction: column; gap: var(--space-3); }
.bi-barrow {
    display: grid;
    grid-template-columns: minmax(90px, 32%) 1fr auto;
    align-items: center;
    gap: var(--space-3);
}
.bi-barrow__label {
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bi-barrow__track {
    background: var(--surface-muted);
    border-radius: var(--radius-pill);
    height: 12px;
    overflow: hidden;
}
.bi-barrow__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent-deep));
    border-radius: var(--radius-pill);
    transition: width var(--dur-slow) var(--ease-out);
}
.bi-barrow__val { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }

/* Столбцы по годам */
.bi-columns {
    display: flex;
    align-items: flex-end;
    gap: var(--space-4);
    min-height: 180px;
    padding-top: var(--space-3);
    overflow-x: auto;
}
.bi-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    flex: 1 1 0;
    min-width: 48px;
}
.bi-col__stack { display: flex; align-items: flex-end; height: 150px; width: 100%; }
.bi-col__total {
    position: relative;
    width: 100%;
    max-width: 56px;
    margin: 0 auto;
    background: var(--primary-soft);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    transition: height var(--dur-slow) var(--ease-out);
}
.bi-col__departed {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, var(--primary), var(--accent-deep));
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    transition: height var(--dur-slow) var(--ease-out);
}
.bi-col__num { font-weight: 700; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.bi-col__year { font-size: 0.8rem; color: var(--text-muted); }

/* ——— Инлайновые переключатели в справочнике документов (v1.9.1) ——— */
.doc-req-switch {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    user-select: none;
}
.doc-req-switch input { cursor: pointer; }
.data-table code {
    background: var(--surface-muted);
    padding: 1px 5px;
    border-radius: var(--radius-sm);
    font-size: 0.85em;
}

/* ============================================================
   Дизайн-полировка и моушн-система (v1.11.0)
   Меню: иконки + сворачиваемые группы + активное состояние.
   Общие элементы: hover-lift кнопок, staggered-появление.
   Палитра и логотип не менялись.
   ============================================================ */

@keyframes riseIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ——— Боковое меню: заголовок-группа (сворачиваемая) ——— */
.side-nav { padding: 0.6rem 0.5rem; }
.nav-group-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: var(--space-2);
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--rzd-grey-light);
    padding: 0.7rem 0.9rem 0.4rem;
    transition: color var(--dur-fast) var(--ease-out);
}
.nav-group-title:hover { color: var(--text); }
.nav-group-chevron { flex: 0 0 auto; opacity: 0.6; transition: transform var(--dur-med) var(--ease-out); }
.nav-group-title.is-collapsed .nav-group-chevron { transform: rotate(-90deg); }

.nav-group {
    margin-bottom: 0.35rem;
    max-height: 640px;
    overflow: hidden;
    transition: max-height var(--dur-slow) var(--ease-in-out), opacity var(--dur-med) var(--ease-out);
}
.nav-group--collapsed { max-height: 0; opacity: 0; margin-bottom: 0; }

/* ——— Пункты меню: иконка + подпись ——— */
.side-nav a.nav-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.5rem 0.85rem;
    margin: 1px 0.35rem;
    border-radius: var(--radius-md);
    border-left: none;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.9rem;
    position: relative;
    transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
    animation: riseIn var(--dur-med) var(--ease-out) both;
}
.nav-link__icon {
    flex: 0 0 auto;
    width: 1.35rem;
    text-align: center;
    font-size: 0.98rem;
    line-height: 1;
    opacity: 0.92;
}
.nav-link__label { flex: 1 1 auto; min-width: 0; }
.side-nav a.nav-link:hover {
    background: var(--nav-link-hover-bg);
    color: var(--text);
    transform: translateX(2px);
}
.side-nav a.nav-link.active {
    background: var(--sidebar-active);
    color: var(--accent-deep);
    font-weight: 600;
    border-left: none;
}
.side-nav a.nav-link.active::before {
    content: "";
    position: absolute;
    left: 3px; top: 50%;
    width: 3px; height: 55%;
    transform: translateY(-50%);
    border-radius: var(--radius-pill);
    background: var(--primary);
}
.side-nav a.nav-link.active .nav-link__icon { opacity: 1; }
[data-theme="dark"] .side-nav a.nav-link.active { color: #fecaca; }

/* Лёгкая лесенка появления пунктов в группе */
.nav-group .nav-link:nth-child(1) { animation-delay: .02s; }
.nav-group .nav-link:nth-child(2) { animation-delay: .05s; }
.nav-group .nav-link:nth-child(3) { animation-delay: .08s; }
.nav-group .nav-link:nth-child(4) { animation-delay: .11s; }
.nav-group .nav-link:nth-child(5) { animation-delay: .14s; }
.nav-group .nav-link:nth-child(n+6) { animation-delay: .16s; }

/* ——— Кнопки: hover-lift + press ——— */
.btn {
    transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out),
                border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out),
                transform var(--dur-fast) var(--ease-out);
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn-primary:hover:not(:disabled) { box-shadow: 0 4px 14px rgba(227, 30, 36, 0.28); }

/* ——— Staggered-появление плиток и списков ——— */
.dash-metrics > * { animation: riseIn var(--dur-med) var(--ease-out) both; }
.dash-metrics > *:nth-child(1) { animation-delay: .04s; }
.dash-metrics > *:nth-child(2) { animation-delay: .10s; }
.dash-metrics > *:nth-child(3) { animation-delay: .16s; }
.dash-metrics > *:nth-child(4) { animation-delay: .22s; }
.dash-quicklinks > * { animation: riseIn var(--dur-med) var(--ease-out) both; }
.dash-quicklinks > *:nth-child(1) { animation-delay: .06s; }
.dash-quicklinks > *:nth-child(2) { animation-delay: .12s; }
.dash-quicklinks > *:nth-child(3) { animation-delay: .18s; }
.dash-quicklinks > *:nth-child(4) { animation-delay: .24s; }
.dash-quicklinks > *:nth-child(5) { animation-delay: .30s; }
.dash-quicklinks > *:nth-child(n+6) { animation-delay: .34s; }

.card-list > .list-item,
.wf-list > .wf-card,
.msg-threads > .msg-thread {
    animation: riseIn var(--dur-med) var(--ease-out) both;
}
.card-list > .list-item:nth-child(2),
.wf-list > .wf-card:nth-child(2),
.msg-threads > .msg-thread:nth-child(2) { animation-delay: .04s; }
.card-list > .list-item:nth-child(3),
.wf-list > .wf-card:nth-child(3),
.msg-threads > .msg-thread:nth-child(3) { animation-delay: .08s; }
.card-list > .list-item:nth-child(n+4),
.wf-list > .wf-card:nth-child(n+4),
.msg-threads > .msg-thread:nth-child(n+4) { animation-delay: .12s; }

/* ——— Hover-elevation интерактивных карточек ——— */
.metric-tile, .quick-tile {
    transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.metric-tile:hover, .quick-tile:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(15, 23, 42, 0.10); }
[data-theme="dark"] .metric-tile:hover, [data-theme="dark"] .quick-tile:hover { box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45); }
.list-item { transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out); }

/* ——— Уважение к prefers-reduced-motion ——— */
@media (prefers-reduced-motion: reduce) {
    .side-nav a.nav-link,
    .dash-metrics > *, .dash-quicklinks > *,
    .card-list > .list-item, .wf-list > .wf-card, .msg-threads > .msg-thread {
        animation: none !important;
    }
    .btn:hover:not(:disabled),
    .metric-tile:hover, .quick-tile:hover,
    .side-nav a.nav-link:hover { transform: none !important; }
    .nav-group { transition: none; }
}

/* ——— Целина (1.13.23) ——— */
.vl-intro { margin-bottom: 1rem; max-width: 70ch; }
.vl-summary {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.vl-tile {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.75rem 0.9rem;
}
.vl-tile__num { font-size: 1.35rem; font-weight: 700; color: var(--text); line-height: 1.2; }
.vl-tile__label { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.15rem; }
.vl-tile--warn .vl-tile__num { color: #e65100; }
.vl-toolbar { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.vl-toolbar input[type="search"] { width: 260px; max-width: 100%; padding: 0.4rem 0.6rem; }
.vl-toolbar select { padding: 0.4rem 0.6rem; }
.vl-spacer { flex: 1 1 auto; }
.vl-table td { vertical-align: top; }
.vl-table .text-muted { font-size: 0.85rem; }
.vl-actions { white-space: nowrap; text-align: right; }
.vl-actions .btn + .btn { margin-left: 0.35rem; }
.vl-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    white-space: nowrap;
}
.vl-badge--ok { background: #e8f5e9; color: #2e7d32; }
.vl-badge--warn { background: #fff3e0; color: #e65100; }
.vl-badge--muted { background: var(--surface-muted); color: var(--text-muted); }
[data-theme="dark"] .vl-badge--ok { background: rgba(76, 175, 80, 0.18); color: #a5d6a7; }
[data-theme="dark"] .vl-badge--warn { background: rgba(255, 152, 0, 0.18); color: #ffcc80; }
[data-theme="dark"] .vl-tile--warn .vl-tile__num { color: #ffb74d; }
.vl-count, .vl-nothing { margin-top: 0.75rem; }
.vl-form .vl-wide { grid-column: 1 / -1; }
.vl-form select[name="user_id"] { width: 100%; margin-top: 0.4rem; }
.vl-form .vl-cand-filter { width: 100%; }
.vl-form .form-group label.vl-check {
    display: flex; flex-direction: row; gap: 0.5rem; align-items: center;
    font-weight: 400; min-height: 2.6rem; margin: 0;
}
.vl-form .vl-check input[type="checkbox"] { width: auto; margin: 0; flex: 0 0 auto; }
@media (max-width: 640px) {
    .vl-toolbar input[type="search"] { width: 100%; }
    .vl-spacer { display: none; }
}

/* ——— Экзамен (1.13.31) ——— */
.ex-intro { margin-bottom: 1rem; max-width: 75ch; }
.ex-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.ex-tile { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 0.75rem 0.9rem; }
.ex-tile__num { font-size: 1.35rem; font-weight: 700; color: var(--text); line-height: 1.2; }
.ex-tile__label { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.15rem; }
.ex-tile--ok .ex-tile__num { color: #2e7d32; }
.ex-tile--bad .ex-tile__num { color: #c62828; }
[data-theme="dark"] .ex-tile--ok .ex-tile__num { color: #81c784; }
[data-theme="dark"] .ex-tile--bad .ex-tile__num { color: #ef9a9a; }
.ex-toolbar { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.ex-toolbar input[type="search"] { width: 260px; max-width: 100%; padding: 0.4rem 0.6rem; }
.ex-toolbar select { padding: 0.4rem 0.6rem; }
.ex-spacer { flex: 1 1 auto; }
.ex-table td { vertical-align: middle; }
.ex-table .text-muted { font-size: 0.85rem; }
.ex-row { cursor: pointer; }
.ex-row--open > td { background: var(--surface-muted); }
.ex-actions { text-align: right; white-space: nowrap; }
.ex-detail-row > td { background: var(--surface-muted); padding: 0.25rem 1rem 1rem !important; }
.ex-chip { display: inline-block; font-size: 0.75rem; padding: 0.12rem 0.5rem; border-radius: 6px; background: var(--surface-muted); color: var(--text-muted); border: 1px solid var(--border); }
.ex-chip--ok { background: #e8f5e9; color: #2e7d32; border-color: #c8e6c9; }
.ex-chip--muted { border-style: dashed; }
.ex-chip--bad { background: #fdecea; color: #b42318; border-color: #f5c2c0; }
[data-theme="dark"] .ex-chip--bad { background: rgba(244, 67, 54, 0.16); color: #f7a9a3; border-color: rgba(244, 67, 54, 0.35); }
.ex-note.ex-note--ok { color: #2e7d32; font-weight: 600; }
[data-theme="dark"] .ex-note.ex-note--ok { color: #a5d6a7; }
[data-theme="dark"] .ex-chip--ok { background: rgba(76, 175, 80, 0.18); color: #a5d6a7; border-color: rgba(76, 175, 80, 0.35); }
.ex-grade { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6rem; height: 1.6rem; padding: 0 0.3rem; border-radius: 6px; font-weight: 700; font-size: 0.9rem; vertical-align: middle; }
.ex-grade--ok { background: #e8f5e9; color: #2e7d32; }
.ex-grade--mid { background: #fff3e0; color: #e65100; }
.ex-grade--bad { background: #ffebee; color: #c62828; }
.ex-grade--none { background: var(--surface-muted); color: var(--text-muted); }
[data-theme="dark"] .ex-grade--ok { background: rgba(76, 175, 80, 0.2); color: #a5d6a7; }
[data-theme="dark"] .ex-grade--mid { background: rgba(255, 152, 0, 0.2); color: #ffcc80; }
[data-theme="dark"] .ex-grade--bad { background: rgba(244, 67, 54, 0.2); color: #ef9a9a; }
.ex-history { list-style: none; margin: 0.5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.ex-item { background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; padding: 0.6rem 0.75rem; }
.ex-item__head { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.ex-item__meta { color: var(--text); font-size: 0.92rem; }
.ex-item__comment { margin-top: 0.4rem; white-space: pre-wrap; color: var(--text); font-size: 0.92rem; }
.ex-note { margin: 0.5rem 0 0; font-size: 0.88rem; color: var(--text-muted); }
.ex-form { margin-top: 0.75rem; background: var(--card-bg); border: 1px dashed var(--border); border-radius: 10px; padding: 0.75rem; }
.ex-form--edit { border-style: solid; border-color: var(--primary); }
.ex-form__title { font-weight: 600; margin-bottom: 0.5rem; color: var(--text); }
.ex-form__row { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.ex-form label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.85rem; color: var(--text-muted); }
.ex-form input, .ex-form select, .ex-form textarea { padding: 0.4rem 0.55rem; font-size: 0.95rem; font-family: inherit; }
.ex-form__comment { margin-top: 0.6rem; }
.ex-form__comment textarea { width: 100%; resize: vertical; }
.ex-form__actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 0.6rem; }
.ex-count, .ex-nothing { margin-top: 0.75rem; }
@media (max-width: 640px) {
    .ex-toolbar input[type="search"] { width: 100%; }
    .ex-spacer { display: none; }
    .ex-form__row label { flex: 1 1 45%; }
}

/* ——— Экзамен: переключатель и список на проходку (1.13.32) ——— */
.ex-modes { display: inline-flex; gap: 0.25rem; padding: 0.25rem; margin-bottom: 1rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-muted); flex-wrap: wrap; }
.ex-mode { border: 0; background: transparent; color: var(--text-muted); padding: 0.45rem 0.9rem; border-radius: 8px; font: inherit; font-weight: 500; cursor: pointer; }
.ex-mode:hover { color: var(--text); }
.ex-mode.is-active { background: var(--card-bg); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.pl-filters select, .pl-filters input { max-width: 100%; }
.pl-filters select[data-f="edu"] { min-width: 16rem; }
.pl-cols { display: flex; flex-wrap: wrap; gap: 0.4rem 0.5rem; align-items: center; margin-bottom: 0.75rem; }
.pl-cols__label { font-size: 0.88rem; color: var(--text-muted); margin-right: 0.25rem; }
.pl-col { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.88rem; padding: 0.25rem 0.6rem; border: 1px solid var(--border); border-radius: 999px; background: var(--card-bg); color: var(--text); cursor: pointer; }
.pl-col input { margin: 0; width: auto; }
.pl-col.is-fixed { opacity: 0.75; cursor: default; }
.pl-bar { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.pl-check { width: 2.2rem; text-align: center; }
.pl-check input { width: auto; margin: 0; }
.pl-off td:not(.pl-check) { opacity: 0.45; text-decoration: line-through; }
@media (max-width: 640px) {
    .pl-filters select[data-f="edu"] { min-width: 0; width: 100%; }
    .ex-mode { flex: 1 1 100%; text-align: left; }
}
.ex-dates { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.88rem; color: var(--text-muted); }
.ex-dates input { padding: 0.3rem 0.45rem; }

/* ——— «Светофор» готовности к ВСОП в сводной таблице (1.13.38) ——— */
.vsop-bar { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; margin: 0.25rem 0 0.75rem; font-size: 0.92rem; color: var(--text); }
.vsop-bar:empty { display: none; }
.vsop-bar__stat strong { font-weight: 700; }
.vsop-bar__spacer { flex: 1 1 auto; }
.vsop-light { display: inline-flex; align-items: center; gap: 0.3rem; white-space: nowrap; font-size: 0.85rem; padding: 0.1rem 0.5rem; border-radius: 999px; cursor: help; }
.vsop-light--green { background: #e8f5e9; color: #2e7d32; }
.vsop-light--yellow { background: #fff8e1; color: #8a5a00; }
.vsop-light--red { background: #ffebee; color: #b71c1c; }
[data-theme="dark"] .vsop-light--green { background: rgba(76, 175, 80, 0.18); color: #a5d6a7; }
[data-theme="dark"] .vsop-light--yellow { background: rgba(255, 193, 7, 0.16); color: #ffe082; }
[data-theme="dark"] .vsop-light--red { background: rgba(244, 67, 54, 0.18); color: #ef9a9a; }
@media (max-width: 640px) { .vsop-bar__spacer { display: none; } }

/* Уведомления в Telegram (1.13.41) */
.tg-card { margin-top: 1rem; }
.tg-card__title { margin-bottom: .35rem; }
.tg-card__lead { margin-bottom: .75rem; }
.tg-card__status { margin-bottom: .9rem; }
.tg-state { display: inline-block; padding: .35rem .65rem; border-radius: 8px; font-size: .92rem; line-height: 1.35; }
.tg-state--on { background: rgba(46, 160, 67, .14); color: #1f7a35; }
.tg-state--wait { background: rgba(214, 160, 20, .16); color: #8a6100; }
.tg-state--off { background: rgba(128, 128, 128, .14); color: var(--text-muted, #666); }
.tg-state a { color: inherit; font-weight: 600; }
.tg-card .tg-card__nick { max-width: 320px; }
.tg-card__consent { display: flex; gap: .55rem; align-items: flex-start; font-size: .88rem; line-height: 1.4; margin: .25rem 0 .9rem; cursor: pointer; }
.tg-card__consent input { margin-top: .2rem; flex: none; }
.tg-card__actions { display: flex; gap: .5rem; flex-wrap: wrap; }
[data-theme="dark"] .tg-state--on { color: #6fd38a; }
[data-theme="dark"] .tg-state--wait { color: #f0c552; }
.tg-state--block { display: block; margin-top: .5rem; }
.tg-card__section { border-top: 1px solid var(--border-color, rgba(128,128,128,.25)); padding-top: .75rem; margin-top: .25rem; }
.tg-card__subtitle { font-weight: 600; margin-bottom: .35rem; }
.tg-status-line { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; font-size: .95rem; }
.tg-dot { width: .7rem; height: .7rem; border-radius: 50%; display: inline-block; flex: none; }
.tg-dot--on { background: #2ea043; box-shadow: 0 0 0 3px rgba(46, 160, 67, .2); }
.tg-dot--off { background: #9aa0a6; box-shadow: 0 0 0 3px rgba(154, 160, 166, .2); }
.tg-card__topic { display: flex; gap: .55rem; align-items: flex-start; font-size: .9rem; line-height: 1.4; margin: .2rem 0 .45rem; cursor: pointer; }
.tg-card__topic input { margin-top: .2rem; flex: none; }
.tg-card__topic.is-disabled { opacity: .6; cursor: not-allowed; }

/* Второй фактор (1.13.48) */
.login-2fa__title, .tf-card__title { margin-bottom: .4rem; }
.login-2fa__lead, .tf-card__lead { margin: .4rem 0 .8rem; }
#login-2fa-code, .tf-code { font-size: 1.35rem; letter-spacing: .25em; text-align: center; max-width: 220px; }
.tf-steps { margin: .4rem 0 .8rem 1.2rem; font-size: .92rem; line-height: 1.5; }
.tf-qr { background: #fff; display: inline-block; padding: .4rem; border-radius: 8px; margin: .2rem 0 .5rem; }
.tf-qr svg { display: block; width: 190px; height: 190px; }
.tf-secret { font-size: .85rem; margin-bottom: .7rem; word-break: break-all; }
.tf-recovery { border: 1px dashed var(--border-color, rgba(128,128,128,.4)); border-radius: 10px; padding: .8rem; margin: .6rem 0; }
.tf-recovery__title { font-weight: 600; margin-bottom: .3rem; }
.tf-recovery__codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem .8rem; margin: .5rem 0; font-size: 1.05rem; }
.tf-recovery__actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .6rem; }
.tf-recovery__ok { display: flex; gap: .5rem; align-items: center; margin-bottom: .6rem; }
.tf-ok { color: #1f7a35; font-weight: 600; }
.tf-no { color: #b42318; font-weight: 600; }
[data-theme="dark"] .tf-ok { color: #6fd38a; }
[data-theme="dark"] .tf-no { color: #ff8a80; }

/* Умные уведомления (1.13.52) */
.notif-item--link { cursor: pointer; }
.notif-item--link:hover { background: var(--hover-bg, rgba(127,127,127,.08)); }
.notif-item__foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.notif-item__go { font-size: .8rem; font-weight: 600; color: var(--primary-color, #d71920); white-space: nowrap; }

/* ——— Аватар ЛК (1.13.62) ——— */
.av { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; overflow: hidden; flex-shrink: 0; vertical-align: middle; background: var(--surface-muted); }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av--initials { background: var(--primary, #c62828); color: #fff; font-weight: 600; letter-spacing: 0.02em; }
.hdr-avatar { display: inline-flex; cursor: pointer; border-radius: 50%; }
.hdr-avatar:hover .av, .hdr-avatar:focus-visible .av { box-shadow: 0 0 0 2px var(--primary, #c62828); }
.user-email--link { cursor: pointer; }
.user-email--link:hover { text-decoration: underline; }
.av-card { display: flex; gap: 1.25rem; align-items: center; padding: 1rem; flex-wrap: wrap; }
.av-card__title { margin: 0 0 0.25rem; font-size: 1rem; }
.av-card__hint { margin: 0 0 0.6rem; font-size: 0.85rem; max-width: 34rem; }
.av-card__actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.av-card__actions label.btn { cursor: pointer; margin: 0; }

/* ——— Возможные дубли (1.13.64) ——— */
.dup-title { margin: 0 0 0.5rem; font-size: 1.05rem; }
.dup-lead { margin: 0 0 0.75rem; }
.dup-group { border: 1px solid var(--border); border-radius: 10px; padding: 0.75rem; margin-bottom: 0.75rem; }
.dup-group__head { margin-bottom: 0.5rem; }
.dup-level { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 0.12rem 0.55rem; border-radius: 6px; background: var(--surface-muted); }
.dup-level--sure { background: #fdecea; color: #b42318; }
.dup-level--likely { background: #fff4e5; color: #b54708; }
.dup-level--maybe { background: #eef4ff; color: #3538cd; }
[data-theme="dark"] .dup-level--sure { background: rgba(244, 67, 54, 0.16); color: #f7a9a3; }
[data-theme="dark"] .dup-level--likely { background: rgba(255, 152, 0, 0.16); color: #ffcc80; }
[data-theme="dark"] .dup-level--maybe { background: rgba(99, 102, 241, 0.18); color: #c7d2fe; }
.dup-people { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.5rem; }
.dup-person { padding: 0.5rem 0.6rem; border-radius: 8px; background: var(--surface-muted); }
.dup-person--inactive { opacity: 0.7; }
.dup-person__fio { font-weight: 600; }
.dup-person__meta { font-size: 0.8rem; }
.dup-pairs { margin: 0.5rem 0 0; padding-left: 1.1rem; font-size: 0.88rem; }
.dup-pairs li { margin: 0.25rem 0; }
.dup-pairs .btn { margin-left: 0.4rem; }
.dup-hint ul { margin: 0.35rem 0; padding-left: 1.1rem; }

/* ——— Массовые действия в сводной таблице (1.13.65) ——— */
.bulk-col { width: 2.2rem; text-align: center; cursor: default; }
.bulk-col input { width: 1.05rem; height: 1.05rem; cursor: pointer; }
.bulk-bar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
    padding: 0.55rem 0.75rem; margin: 0.5rem 0; border-radius: 10px; background: var(--card-bg);
    border: 1px solid var(--primary, #c62828); box-shadow: var(--card-shadow); }
.bulk-bar[hidden] { display: none !important; }
.bulk-bar__count { margin-right: 0.25rem; }
.bulk-bar__progress { margin-left: auto; font-size: 0.85rem; }
.bulk-fails { max-height: 18rem; overflow: auto; padding-left: 1.1rem; font-size: 0.88rem; }

/* ——— Выбор человека из списка (1.13.66) ——— */
.pp { position: relative; }
.pp [hidden] { display: none !important; }
.pp-input { width: 100%; }
.pp-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; max-height: 16rem; overflow-y: auto;
    background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18); padding: 0.25rem; }
.pp-item { display: flex; flex-direction: column; gap: 0.05rem; padding: 0.45rem 0.6rem; border-radius: 7px; cursor: pointer; }
.pp-item.is-active, .pp-item:hover { background: var(--primary, #c62828); color: #fff; }
.pp-item.is-active .pp-item__sub, .pp-item:hover .pp-item__sub { color: rgba(255, 255, 255, 0.85); }
.pp-item.is-disabled { opacity: 0.5; cursor: not-allowed; }
.pp-item__label { font-weight: 600; }
.pp-item__sub { font-size: 0.8rem; color: var(--text-muted); }
.pp-empty, .pp-more { padding: 0.5rem 0.6rem; color: var(--text-muted); font-size: 0.85rem; }
.pp-chosen { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.5rem 0.7rem;
    border: 1px solid var(--primary, #c62828); border-radius: 10px; background: var(--surface-muted); font-weight: 600; }
.pp-chosen__clear { border: none; background: transparent; color: var(--text-muted); cursor: pointer; font-size: 1rem; padding: 0 0.25rem; }
.pp-chosen__clear:hover { color: var(--primary, #c62828); }

/* ——— Вкладки ЛК штаба (1.13.67) ——— */
.lk-tabs { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.lk-tab { border: none; background: transparent; color: var(--text-muted); padding: 0.55rem 0.9rem; font: inherit; font-weight: 600;
    cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.lk-tab:hover { color: var(--text); }
.lk-tab.is-active { color: var(--primary, #c62828); border-bottom-color: var(--primary, #c62828); }
.lk-hidden { display: none !important; }
.lk-tabs ~ [data-lk-tab]:not(.lk-hidden) + [data-lk-tab]:not(.lk-hidden) { margin-top: 1.25rem; }

/* ——— Справочники и настройки (1.13.67) ——— */
.ref-lead { margin: 0 0 1rem; }
.ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.85rem; }
.ref-card { display: flex; gap: 0.85rem; align-items: flex-start; text-align: left; padding: 1rem; border-radius: 12px;
    background: var(--card-bg); border: 1px solid var(--border); box-shadow: var(--card-shadow); color: var(--text);
    font: inherit; cursor: pointer; transition: border-color 0.15s, transform 0.15s; }
.ref-card:hover, .ref-card:focus-visible { border-color: var(--primary, #c62828); transform: translateY(-1px); }
.ref-card__icon { font-size: 1.6rem; line-height: 1; width: 2.6rem; height: 2.6rem; display: flex; align-items: center; justify-content: center;
    border-radius: 10px; background: var(--surface-muted); flex-shrink: 0; }
.ref-card__body { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.ref-card__title { font-weight: 700; display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.ref-card__count:not(:empty) { font-size: 0.75rem; font-weight: 700; padding: 0.05rem 0.45rem; border-radius: 999px;
    background: var(--primary, #c62828); color: #fff; }
.ref-card__text { font-size: 0.85rem; color: var(--text-muted); line-height: 1.4; }
.ref-section-title { margin: 1.75rem 0 0.75rem; font-size: 1.05rem; }
.ref-settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0.85rem; align-items: start; }
.ref-setting { padding: 1rem 1.1rem; }

/* ——— Свои быстрые переходы (1.13.68) ——— */
.dash-section__head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.dash-ql-edit { font-size: 0.82rem; }
.ql-edit { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.ql-edit__row { display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.6rem; border: 1px solid var(--border); border-radius: 9px; }
.ql-edit__row:first-child { border-color: var(--primary, #c62828); }
.ql-edit__icon { width: 1.6rem; text-align: center; }
.ql-edit__label { flex: 1; font-weight: 600; }

/* ——— Модераторы: вкладки и права по группам (1.13.69) ——— */
.mods-section { padding: 1.1rem 1.2rem; }
.mods-lead { margin: 0 0 0.9rem; font-size: 0.9rem; }
.perm-card { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 0.6rem; padding: 0; background: var(--card-bg); }
.perm-card > summary { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; padding: 0.75rem 0.9rem; cursor: pointer; list-style: none; }
.perm-card > summary::-webkit-details-marker { display: none; }
.perm-card > summary::before { content: '▸'; color: var(--text-muted); transition: transform 0.15s; }
.perm-card[open] > summary::before { transform: rotate(90deg); }
.perm-card[open] > summary { border-bottom: 1px solid var(--border); }
.perm-card__name { font-weight: 700; }
.perm-card__count { margin-left: auto; font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; }
.perm-card > :not(summary) { margin-left: 0.9rem; margin-right: 0.9rem; }
.perm-card .permission-card-actions { margin-bottom: 0.9rem; }
.perm-card .permission-card-email { color: var(--text-muted); font-size: 0.85rem; }
.perm-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 0.75rem; margin: 0.85rem 0; }
.perm-group { border: 1px solid var(--border); border-radius: 9px; padding: 0.55rem 0.75rem 0.65rem; margin: 0; }
.perm-group legend { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); padding: 0 0.3rem; }
.perm-row { display: flex; gap: 0.55rem; align-items: flex-start; padding: 0.3rem 0; cursor: pointer; }
.perm-row input { margin-top: 0.2rem; flex-shrink: 0; }
.perm-row__label { display: block; font-weight: 600; font-size: 0.9rem; }
.perm-row__hint { display: block; font-size: 0.78rem; color: var(--text-muted); line-height: 1.35; }

/* ——— Процессы: пояснение и шаблоны (1.13.70) ——— */
.wf-guide { padding: 0; margin-bottom: 1rem; }
.wf-guide > summary { padding: 0.85rem 1.1rem; cursor: pointer; font-weight: 700; }
.wf-guide[open] > summary { border-bottom: 1px solid var(--border); }
.wf-guide__body { padding: 0.9rem 1.1rem 1.1rem; }
.wf-guide__body p { margin: 0 0 0.75rem; line-height: 1.5; }
.wf-howto { margin: 0 0 0.85rem; padding-left: 1.2rem; line-height: 1.55; }
.wf-example { padding: 0.65rem 0.8rem; border-left: 3px solid var(--primary, #c62828); background: var(--surface-muted); border-radius: 6px; }
.wf-guide__sub { margin: 1rem 0 0.5rem; font-size: 0.95rem; }
.wf-tpl { border: 1px solid var(--border); border-radius: 10px; padding: 0.7rem 0.85rem; margin-bottom: 0.6rem; }
.wf-tpl__head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.wf-tpl__desc { font-size: 0.85rem; margin-top: 0.15rem; }
.wf-chain { list-style: none; display: flex; flex-wrap: wrap; align-items: stretch; gap: 0.35rem; padding: 0; margin: 0.6rem 0 0; counter-reset: wf; }
.wf-chain li { counter-increment: wf; display: flex; flex-direction: column; padding: 0.35rem 0.6rem 0.35rem 1.9rem; position: relative;
    border-radius: 8px; background: var(--surface-muted); font-size: 0.85rem; }
.wf-chain li::before { content: counter(wf); position: absolute; left: 0.5rem; top: 0.4rem; width: 1.1rem; height: 1.1rem; border-radius: 50%;
    background: var(--primary, #c62828); color: #fff; font-size: 0.7rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.wf-chain li:not(:last-child)::after { content: '→'; position: absolute; right: -0.85rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.wf-chain li:not(:last-child) { margin-right: 0.6rem; }
.wf-chain__title { font-weight: 600; }
.wf-chain__who { font-size: 0.75rem; color: var(--text-muted); }

/* ——— Аналитика набора (1.13.71) ——— */
.an-section { margin-bottom: 1rem; }
.an-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0.75rem; }
.an-tile { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.9rem 1rem; border-radius: 12px; text-decoration: none; color: var(--text);
    background: var(--card-bg); border: 1px solid var(--border); box-shadow: var(--card-shadow); transition: border-color 0.15s; }
.an-tile:hover { border-color: var(--primary, #c62828); }
.an-tile__num { font-size: 1.7rem; font-weight: 800; line-height: 1.1; }
.an-tile--warn .an-tile__num { color: var(--primary, #c62828); }
.an-tile--ok .an-tile__num { color: #2e7d32; }
.an-tile__label { font-weight: 600; font-size: 0.9rem; }
.an-tile__hint { font-size: 0.78rem; color: var(--text-muted); }
.an-funnel { display: flex; flex-direction: column; gap: 0.45rem; }
.an-step { display: grid; grid-template-columns: minmax(180px, 240px) 1fr 90px 130px; align-items: center; gap: 0.75rem; }
.an-step__label { font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; gap: 0.45rem; }
.an-step__num { width: 1.35rem; height: 1.35rem; border-radius: 50%; background: var(--surface-muted); font-size: 0.72rem; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.an-step__bar { height: 0.8rem; border-radius: 999px; background: var(--surface-muted); overflow: hidden; }
.an-step__fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #c62828, #ef5350); }
.an-step__val { font-size: 0.88rem; white-space: nowrap; }
.an-step__stuck .btn { font-size: 0.8rem; color: var(--primary, #c62828); }
@media (max-width: 760px) { .an-step { grid-template-columns: 1fr 70px; } .an-step__bar { grid-column: 1 / -1; order: 3; } .an-step__stuck { grid-column: 1 / -1; order: 4; } }
.an-mini { display: inline-block; width: 70px; height: 0.5rem; border-radius: 999px; background: var(--surface-muted); overflow: hidden; vertical-align: middle; }
.an-mini__fill { height: 100%; background: #2e7d32; }
.an-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.an-full-labels .bi-barrow__label { white-space: normal; overflow: visible; text-overflow: clip; }
.an-struct-title { margin-top: 1.5rem; }
.an-stuck { padding-left: 1.1rem; margin: 0; max-height: 26rem; overflow: auto; }
.an-stuck li { margin: 0.35rem 0; }
.an-stuck__missing { font-size: 0.8rem; color: var(--text-muted); }
.an-kpis { margin-bottom: 1.25rem; }
.an-step { min-height: 2.1rem; }

/* 1.13.73: шапка на телефоне помещается в экран (была шире на ~110 px — «Выход» уезжал за край) */
.logout-btn { display: inline-flex; align-items: center; gap: 0.4rem; }
.logout-btn__icon { display: none; }
@media (max-width: 640px) {
    .app-header { padding-left: max(0.6rem, env(safe-area-inset-left, 0px)); padding-right: max(0.6rem, env(safe-area-inset-right, 0px)); }
    .app-header-inner { gap: 0.5rem; }
    .app-header-right { gap: 0.4rem; min-width: 0; flex: 1 1 auto; justify-content: flex-end; }
    .app-brand-text, .user-email { display: none; }
    .global-search-wrap { min-width: 0; flex: 1 1 auto; max-width: 260px; }
    .app-header .btn-ghost { padding: 0.35rem 0.5rem; }
    .theme-toggle { min-width: 38px; }
    .logout-btn__icon { display: block; }
    .logout-btn__text { display: none; }
}

/* 1.13.75: главная ЛК бойца — «Ваш следующий шаг» вместо баннера-приветствия */
.lk-home-top .next-step, .lk-home-top .lk-stages { margin-bottom: 0; }
.lk-home-top { display: flex; flex-direction: column; gap: 0.75rem; }
#candidate-views[data-view="view-candidate-home"] .candidate-lk-header { display: none; }
#candidate-home-root .candidate-notifications-wrap { margin: 0; }
.lk-hello { margin: 0; color: var(--text-muted); font-size: 0.95rem; }
.next-step { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; margin-bottom: 0.9rem;
    background: var(--card-bg); border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: 14px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06); }
.next-step--wait { border-left-color: #f59e0b; }
.next-step--done { border-left-color: #16a34a; }
.next-step__icon { font-size: 1.8rem; line-height: 1; flex-shrink: 0; }
.next-step__body { flex: 1 1 auto; min-width: 0; }
.next-step__kicker { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.next-step__title { margin: 0.15rem 0 0.25rem; font-size: 1.25rem; line-height: 1.25; color: var(--text); }
.next-step__text { margin: 0; color: var(--text-muted); font-size: 0.93rem; }
.next-step__btn { flex-shrink: 0; }
.lk-stages { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 1rem; margin-bottom: 1.25rem;
    background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; color: var(--text); text-decoration: none; }
.lk-stages:hover { border-color: rgba(227, 30, 36, 0.35); }
.lk-stages__label { font-size: 0.92rem; white-space: nowrap; }
.lk-stages__dots { display: flex; gap: 4px; flex: 1 1 auto; }
.lk-stages__dots i { flex: 1 1 0; height: 6px; border-radius: 3px; background: var(--border); }
.lk-stages__dots i.is-done { background: #16a34a; }
.lk-stages__arrow { color: var(--text-muted); }
@media (max-width: 640px) {
    .next-step { flex-wrap: wrap; padding: 1rem; gap: 0.75rem; align-items: flex-start; }
    .next-step__icon { font-size: 1.4rem; }
    .next-step__body { flex: 1 1 calc(100% - 2.5rem); }
    .next-step__btn { width: 100%; }
    .lk-stages { flex-wrap: wrap; }
    .lk-stages__dots { order: 3; flex-basis: 100%; }
}

/* 1.13.76: нижняя панель ЛК бойца на телефоне */
.bottom-nav { display: none; }
@media (max-width: 768px) {
    body.has-bottom-nav .bottom-nav:not([hidden]) {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1250;
        background: var(--card-bg); border-top: 1px solid var(--border);
        box-shadow: 0 -4px 14px rgba(15, 23, 42, 0.06);
        padding: 0.3rem 0.25rem calc(0.3rem + env(safe-area-inset-bottom, 0px));
    }
    .bottom-nav__item { position: relative; flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
        padding: 0.35rem 0.1rem; background: none; border: 0; border-radius: 10px; color: var(--text-muted);
        font-size: 0.7rem; cursor: pointer; -webkit-tap-highlight-color: transparent; }
    .bottom-nav__item.is-active { color: var(--primary); }
    .bottom-nav__item.is-active svg { stroke-width: 2.4; }
    .bottom-nav__badge { position: absolute; top: 0.1rem; left: calc(50% + 6px); min-width: 1.05rem; height: 1.05rem; padding: 0 0.25rem;
        border-radius: 999px; background: var(--primary); color: #fff; font-size: 0.65rem; line-height: 1.05rem; text-align: center; }
    /* место под панель, круглая кнопка чата не нужна, окно чата — над панелью */
    body.has-bottom-nav .main-content { padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px)); }
    body.has-bottom-nav #chat-widget-launcher { display: none; }
    body.has-bottom-nav #chat-widget { bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px)); }
}

/* 1.13.77: тёмная тема и флажки в формах */
/* .form-group input {width:100%} растягивал и флажки — галочка стояла по центру отдельной строкой */
.form-group input[type="checkbox"],
.form-group input[type="radio"] {
    width: auto; padding: 0; margin: 0; flex-shrink: 0; box-shadow: none;
    accent-color: var(--primary); vertical-align: middle;
}
.form-group label:has(> input[type="checkbox"]),
.form-group label:has(> input[type="radio"]) {
    display: flex; align-items: center; gap: 0.5rem; cursor: pointer;
}
/* Поле «Выберите файл» — в цветах темы, а не серой кнопкой браузера */
.form-group input[type="file"] { padding: 0.4rem 0.5rem; cursor: pointer; }
input[type="file"]::file-selector-button {
    margin-right: 0.75rem; padding: 0.4rem 0.85rem; border: 1px solid var(--border); border-radius: 6px;
    background: var(--card-bg); color: var(--text); font: inherit; font-size: 0.88rem; cursor: pointer;
}
input[type="file"]::file-selector-button:hover { border-color: var(--primary); }
/* Новые сообщения в ЛК: светло-розовый фон с белым текстом в тёмной теме не читался */
[data-theme="dark"] .candidate-notification--unread { background: rgba(220, 38, 38, 0.12); }

/* 1.13.78: непройденная МК — трудоустройство приостановлено */
.mk-pause { margin-bottom: 1rem; padding: 0.9rem 1.1rem; border: 1px solid rgba(220, 38, 38, 0.35);
    border-left: 4px solid #dc2626; border-radius: 12px; background: rgba(220, 38, 38, 0.06); }
.mk-pause__head { font-size: 1.02rem; color: var(--text); }
.mk-pause__text { margin: 0.35rem 0 0; color: var(--text-muted); font-size: 0.93rem; }
.mk-pause__note { margin: 0.5rem 0 0; color: var(--text); font-size: 0.93rem; white-space: pre-wrap; }
.mk-pause__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.7rem; }
[data-theme="dark"] .mk-pause { background: rgba(220, 38, 38, 0.12); }
.next-step--stop { border-left-color: #dc2626; }
.next-step__btns { display: flex; gap: 0.5rem; flex-shrink: 0; }
.next-step__btns:empty { display: none; }
@media (max-width: 640px) { .next-step__btns { width: 100%; flex-direction: column; } }
.emp-step--failed .emp-step__dot { background: #dc2626; color: #fff; border-color: #dc2626; }
.emp-step--failed .emp-step__hint { color: #dc2626; }
.mk-scan-modal { max-width: 900px; width: 95vw; }
.mk-scan-modal__body { display: flex; justify-content: center; }
.mk-scan-modal__body img { max-width: 100%; max-height: 75vh; object-fit: contain; border-radius: 8px; }
.mk-scan-modal__body iframe { width: 100%; height: 75vh; border: 0; }
.mk-fail-block { padding: 0.75rem 0.9rem 0.1rem; margin-bottom: 1rem; border: 1px dashed rgba(220, 38, 38, 0.45); border-radius: 10px; }
.mk-fail-block[hidden] { display: none; }
.mk-fail-block__warn { margin: 0 0 0.75rem; font-size: 0.88rem; color: var(--text-muted); }
/* Замечания комсостава в «Трудоустройстве» — раньше светлая плашка с инлайн-цветом, в тёмной теме не читалась */
.emp-cmd-note { margin: 0.5rem 0; padding: 0.5rem 0.65rem; border-radius: 8px; font-size: 0.92rem; background: var(--input-surface); border: 1px solid var(--border); }

/* 1.13.79: счётчики у пунктов меню и переключатель экранов («Таблица | Список») */
.nav-link { position: relative; }
.nav-badge { margin-left: auto; min-width: 1.35rem; height: 1.35rem; padding: 0 0.4rem; border-radius: 999px;
    background: var(--primary); color: #fff; font-size: 0.72rem; font-weight: 700; line-height: 1.35rem; text-align: center; flex-shrink: 0; }
.nav-badge[hidden] { display: none; }
.nav-badge--inline { margin-left: 0.35rem; min-width: 1.2rem; height: 1.2rem; line-height: 1.2rem; font-size: 0.7rem; }
.view-header { flex-wrap: wrap; row-gap: 0.6rem; }
.view-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--input-surface); border: 1px solid var(--border); }
.view-header h2 + .view-switch { margin-right: auto; margin-left: 1rem; }
.view-switch__btn { display: inline-flex; align-items: center; padding: 0.35rem 0.85rem; border: 0; border-radius: 8px; background: transparent;
    color: var(--text-muted); font: inherit; font-size: 0.9rem; cursor: pointer; white-space: nowrap; }
.view-switch__btn:hover { color: var(--text); }
.view-switch__btn.is-active { background: var(--card-bg); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }
@media (max-width: 640px) { .view-header h2 + .view-switch { margin-left: 0; order: 3; } }

/* 1.13.80: таблица «Бойцы» — фильтры в одну строку, статус по клику, закреплённые ФИО и галочка */
.table-toolbar--compact { gap: 0.6rem; margin-bottom: 0.75rem; }
.table-toolbar--compact .table-toolbar__search { flex: 1 1 220px; max-width: 320px; }
.table-toolbar--compact select { max-width: 220px; }
.table-toolbar__spacer { flex: 1 1 auto; }
.filters-count { display: inline-block; margin-left: 0.4rem; min-width: 1.2rem; height: 1.2rem; padding: 0 0.3rem; border-radius: 999px;
    background: var(--primary); color: #fff; font-size: 0.72rem; line-height: 1.2rem; text-align: center; }
.filters-count[hidden] { display: none; }
.table-more-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.1rem; padding: 0.65rem 0.85rem; margin-bottom: 0.75rem;
    border: 1px dashed var(--border); border-radius: 10px; }
.table-more-filters[hidden] { display: none; }
.table-more-filters label { display: inline-flex; align-items: center; gap: 0.4rem; }
.cell-edit { display: inline-flex; align-items: center; gap: 0.35rem; max-width: 100%; padding: 0.15rem 0.45rem; margin: -0.15rem -0.45rem;
    border: 1px solid transparent; border-radius: 6px; background: none; color: inherit; font: inherit; cursor: pointer; }
.cell-edit:hover, .cell-edit:focus-visible { border-color: var(--border); background: var(--input-surface); }
.cell-edit__caret { color: var(--text-muted); font-size: 0.7rem; opacity: 0; }
.cell-edit:hover .cell-edit__caret, .cell-edit:focus-visible .cell-edit__caret { opacity: 1; }
/* закреплённые слева колонки: галочка и ФИО */
#candidates-data-table .bulk-col { position: sticky; left: 0; z-index: 2; background: var(--card-bg); width: 2.4rem; min-width: 2.4rem; max-width: 2.4rem; box-sizing: border-box; }
#candidates-data-table .col-sticky-fio { position: sticky; left: 2.4rem; z-index: 2; background: var(--card-bg);
    box-shadow: 2px 0 0 var(--border); }
#candidates-data-table thead .bulk-col, #candidates-data-table thead .col-sticky-fio { z-index: 3; background: var(--table-header-bg); }
/* подсветка строки полупрозрачная — у закреплённых клеток кладём её поверх сплошного фона, чтобы не просвечивало */
#candidates-data-table tbody tr:hover .bulk-col, #candidates-data-table tbody tr:hover .col-sticky-fio { background: linear-gradient(var(--table-row-hover), var(--table-row-hover)), var(--card-bg); }
#candidates-data-table .row-inactive .col-sticky-fio { opacity: 0.85; }
@media (max-width: 640px) {
    .table-toolbar--compact .table-toolbar__search { flex-basis: 100%; max-width: none; }
    .table-toolbar__spacer { display: none; }
}
/* при collapse рамки закреплённых клеток не едут вместе с ними — у этой таблицы рамки «раздельные» */
#candidates-data-table { border-collapse: separate; border-spacing: 0; }
#candidates-data-table th, #candidates-data-table td { border-width: 0 1px 1px 0; }
#candidates-data-table tr > :first-child { border-left-width: 1px; }
#candidates-data-table thead th { border-top-width: 1px; border-bottom: 2px solid var(--primary); }
[data-theme="dark"] #candidates-data-table thead th { border-bottom: 1px solid var(--border); }

/* 1.13.81: меню «⋯» в строке списка */
.row-menu { position: relative; display: inline-block; }
.row-menu__toggle { min-width: 2rem; font-size: 1.15rem; line-height: 1; padding: 0.2rem 0.5rem; letter-spacing: 1px; }
.row-menu__list { position: absolute; right: 0; top: calc(100% + 4px); z-index: 50; min-width: 250px; padding: 0.3rem;
    background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16); }
.row-menu__list[hidden] { display: none; }
.row-menu__item { display: block; width: 100%; padding: 0.5rem 0.7rem; border: 0; border-radius: 7px; background: none;
    color: var(--text); font: inherit; font-size: 0.9rem; text-align: left; cursor: pointer; white-space: nowrap; }
.row-menu__item:hover, .row-menu__item:focus-visible { background: var(--input-surface); outline: none; }
.row-menu__item--danger { color: #dc2626; }


/* 1.13.82: ФИО в таблице «Бойцы» показываем полностью (общий .data-table td режет до 200px с «…») */
#candidates-data-table td.col-sticky-fio {
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
    max-width: none;
    min-width: 13rem;
    overflow: visible;
    text-overflow: clip;
}
