/* ===================================
   Security Base — Контрастная тема
   ПРАВИЛО: белый фон = чёрный текст, тёмный фон = белый текст

   NOTE: CSS Variables are now defined in design-tokens.css
   This file uses those tokens for component styling
   =================================== */

/* === Typography Scale (extends design tokens) === */
:root {
    /* F7: Typography Scale */
    --font-xs: 12px;
    --font-sm: 14px;
    --font-base: 16px;
    --font-lg: 18px;
    --font-xl: 20px;
    --font-2xl: 24px;
    --font-3xl: 30px;
    --font-4xl: 36px;

    /* Line Heights */
    --leading-tight: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.75;

    /* Spacing Scale */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
}

/* === 2. Базовая нормализация === */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* === 3. ПРАВИЛО: Белый фон = чёрный текст === */
body,
.bg-light,
.bg-white,
section:not([class*="bg-"]):not(.hero):not(.hero-section):not(.stats):not(.stats-section):not(.employers-section):not([class*="dark"]) {
    background: var(--bg-light);
    color: var(--text-on-light);
}

.bg-light h1, .bg-light h2, .bg-light h3, .bg-light h4, .bg-light h5, .bg-light h6,
.bg-white h1, .bg-white h2, .bg-white h3, .bg-white h4, .bg-white h5, .bg-white h6 {
    color: var(--text-on-light) !important;
}

.bg-light p, .bg-light li, .bg-light span,
.bg-white p, .bg-white li, .bg-white span {
    color: var(--text-on-light) !important;
}

.bg-light .text-muted,
.bg-white .text-muted {
    color: var(--text-muted-on-light) !important;
}

/* === 4. ПРАВИЛО: Тёмный фон = белый текст === */
.bg-dark,
.hero,
.hero-section,
.stats,
.stats-section,
.employers-section,
.navbar-dark,
footer.bg-dark,
[class*="bg-"][class*="dark"] {
    background: var(--bg);
    color: var(--text);
}

.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark h4, .bg-dark h5, .bg-dark h6,
.hero h1, .hero h2, .hero h3, .hero h4, .hero h5, .hero h6,
.hero-section h1, .hero-section h2, .hero-section h3,
.stats h1, .stats h2, .stats h3,
.stats-section h1, .stats-section h2, .stats-section h3,
.employers-section h1, .employers-section h2, .employers-section h3,
.navbar-dark h1, .navbar-dark h2, .navbar-dark h3,
footer.bg-dark h1, footer.bg-dark h2, footer.bg-dark h3 {
    color: var(--text) !important;
}

.bg-dark p, .bg-dark li, .bg-dark span,
.hero p, .hero li, .hero span,
.hero-section p, .hero-section li, .hero-section span,
.stats p, .stats li, .stats span,
.stats-section p, .stats-section li, .stats-section span,
.employers-section p, .employers-section li, .employers-section span,
.navbar-dark p, .navbar-dark li, .navbar-dark span,
footer.bg-dark p, footer.bg-dark li, footer.bg-dark span {
    color: var(--text) !important;
}

.bg-dark .text-muted,
.hero .text-muted,
.hero-section .text-muted,
.stats .text-muted,
.stats-section .text-muted,
.employers-section .text-muted,
footer.bg-dark .text-muted {
    color: var(--muted) !important;
}

/* A3 a11y: Bootstrap .text-secondary (#6C757D) on dark = 3.78:1 (fails AA).
   Raise to --muted (#D1D5DB) = 12.04:1 on #111827. */
.bg-dark .text-secondary,
footer.bg-dark .text-secondary {
    color: var(--muted) !important;
}

/* === 5. Карточки - всегда белый фон + чёрный текст === */
/* Security Guard Theme: minimal shadows, clear borders, 8px max radius */
.card,
.feature-card,
.testimonial-card,
.white-card,
.panel {
    background: var(--bg-light-primary) !important;
    color: var(--text-on-light-primary) !important;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--border-on-light);
}

.card h1, .card h2, .card h3, .card h4, .card h5, .card h6,
.feature-card h1, .feature-card h2, .feature-card h3, .feature-card h4, .feature-card h5, .feature-card h6,
.testimonial-card h1, .testimonial-card h2, .testimonial-card h3, .testimonial-card h4, .testimonial-card h5, .testimonial-card h6,
.white-card h1, .white-card h2, .white-card h3, .white-card h4, .white-card h5, .white-card h6,
.panel h1, .panel h2, .panel h3, .panel h4, .panel h5, .panel h6 {
    color: var(--text-on-light) !important;
}

.card p, .card li, .card span,
.feature-card p, .feature-card li, .feature-card span,
.testimonial-card p, .testimonial-card li, .testimonial-card span,
.white-card p, .white-card li, .white-card span,
.panel p, .panel li, .panel span {
    color: var(--text-on-light) !important;
}

.card .text-muted,
.feature-card .text-muted,
.testimonial-card .text-muted,
.white-card .text-muted,
.panel .text-muted {
    color: var(--text-muted-on-light) !important;
}

/* === 6. Парные блоки - одинаковая высота === */
.row.g-4 > [class*="col-"],
.row.g-3 > [class*="col-"] {
    display: flex;
}

.row.g-4 > [class*="col-"] > *,
.row.g-3 > [class*="col-"] > * {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Карточки в сетке - одинаковая высота */
.feature-card,
.testimonial-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* === 7. Центрирование текста === */
.text-center,
.hero .container,
.hero-section .container,
.stats .container,
.stats-section .container {
    text-align: center;
}

/* === 8. Кнопки — Security Guard Theme === */
/* Professional, flat design, no fancy gradients */
/* Orange accent for primary actions, dark navy for secondary */
.btn {
    font-weight: 600;
    border-radius: var(--radius-md);
    padding: 14px 32px;
    min-height: 50px;
    transition: var(--transition-base);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
}

/* Primary button - Orange accent for visibility and action */
.btn-primary {
    background: var(--accent-action);
    color: #FFFFFF !important;
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
}

.btn-primary:hover {
    background: var(--accent-action-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
    color: #FFFFFF !important;
}

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

/* Secondary brand button - Dark navy */
.btn-brand {
    background: var(--brand-primary);
    color: #FFFFFF !important;
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
}

.btn-brand:hover {
    background: var(--brand-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
    color: #FFFFFF !important;
}

.btn-outline-light {
    background: transparent;
    color: var(--text) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.16);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.24);
    color: var(--text) !important;
}

.btn-outline-light:focus {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

/* Кнопка на светлом фоне */
.bg-light .btn-outline-light,
.bg-white .btn-outline-light {
    color: var(--text-on-light) !important;
    border-color: var(--text-on-light);
}

.bg-light .btn-outline-light:hover,
.bg-white .btn-outline-light:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-on-light) !important;
}

/* Другие варианты кнопок */
.btn-light {
    background: #FFFFFF;
    color: #1a1a1a !important;
    border: none;
}

.btn-light:hover {
    background: #F3F4F6;
    color: #1a1a1a !important;
}

.btn-light:focus {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

/* === 9. Navbar === */
.navbar-dark {
    background: var(--bg-dark) !important;
}

.navbar-dark .navbar-brand,
.navbar-dark .nav-link {
    color: var(--text-on-dark) !important;
}

.navbar-dark .nav-link:hover {
    color: #FFFFFF !important;
}

/* === 10. Footer === */
footer.bg-dark {
    background: var(--bg-dark) !important;
}

footer.bg-dark a {
    color: var(--text-muted-on-dark);
    text-decoration: none;
    transition: var(--transition);
}

footer.bg-dark a:hover {
    color: var(--text-on-dark);
}

/* === 11. Иконки === */
.bi-check-circle-fill,
.icon.check {
    color: var(--accent);
}

/* === 12. Специфичные секции === */

/* Features Section - белый фон */
#features {
    background: var(--bg-light) !important;
}

/* Stats Section - Security Guard Theme: Dark navy */
.stats-section {
    background: var(--brand-primary) !important;
}

/* Employers Section - тёмный фон */
.employers-section {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
                url('https://picsum.photos/seed/security-employers/1920/800') center/cover no-repeat !important;
}

/* === 12a. Hero List — Список преимуществ === */
.hero-list {
    display: grid;
    gap: 14px;
    margin-top: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    color: var(--text);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.4;
}

.hero-icon {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.12);
    color: var(--ok);
    font-size: 16px;
    margin-top: 2px; /* Выравнивание по верхней линии текста */
}

.hero-item span {
    flex: 1;
}

/* === 12b. Steps — Секция "3 шага" === */
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 40px;
}

.step {
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 28px 24px;
    transition: var(--transition);
}

.step:hover {
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.step-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    /* Инверсия: тёмный фон + светлая иконка для контраста */
    background: var(--panel);
    color: var(--accent);
    border: 2px solid var(--accent);
    font-size: 2rem;
    margin: 0 auto 20px;
}

/* === Цифры в белых кружочках - Security Guard Theme === */
.step-number {
    background: #FFFFFF !important;
    color: var(--text-on-light-primary) !important;
    border: none;
    box-shadow: var(--shadow-md);
}

.step-number span {
    color: var(--text-on-light-primary) !important;
    font-weight: 700 !important;
}

.step-title {
    color: var(--text) !important;
    font-weight: 700;
    margin-top: 16px;
    margin-bottom: 12px;
    font-size: clamp(18px, 2.5vw, 24px);
}

.step-desc {
    color: var(--muted) !important;
    margin-top: 8px;
    line-height: 1.45;
    font-size: clamp(14px, 1.8vw, 16px);
}

/* === 12c. Инфоблоки/промо-плашки === */
.info-block,
.promo-panel {
    background: var(--panel);
    border-radius: 18px;
    padding: 24px 28px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 24px;
}

.info-block h3,
.promo-panel h3 {
    color: var(--text) !important;
}

.info-block p,
.promo-panel p {
    color: var(--muted) !important;
}

/* === 12d. Улучшенные карточки на тёмном фоне === */
.bg-dark .card,
.bg-dark .feature-card,
.bg-dark .testimonial-card {
    background: var(--panel) !important;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.bg-dark .card h1, .bg-dark .card h2, .bg-dark .card h3,
.bg-dark .card h4, .bg-dark .card h5, .bg-dark .card h6 {
    color: var(--text) !important;
}

.bg-dark .card p, .bg-dark .card li, .bg-dark .card span {
    color: var(--text) !important;
}

.bg-dark .card .text-muted {
    color: var(--muted) !important;
}

/* === 12e. Focus States для доступности (WCAG 2.1 AA) === */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.nav-link:focus-visible,
.btn:focus-visible,
.btn-favorite:focus-visible,
.btn-view:focus-visible,
.cabinet-rank-pill:focus-within,
[role="button"]:focus-visible,
[onclick]:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Remove outline for mouse users */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
input:focus:not(:focus-visible),
textarea:focus:not(:focus-visible),
select:focus:not(:focus-visible) {
    outline: none;
}

/* Курсор pointer для кликабельных элементов */
a,
button,
.btn,
.nav-link,
[role="button"],
[onclick] {
    cursor: pointer;
}

/* === 13. Адаптив === */
@media (max-width: 768px) {
    /* Парные блоки - стопка */
    .row.g-4 > [class*="col-"],
    .row.g-3 > [class*="col-"] {
        flex-direction: column;
    }

    /* Секция "3 шага" - 1 колонка */
    .steps {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .step-icon {
        width: 64px;
        height: 64px;
        font-size: 1.75rem;
    }

    .hero-list {
        gap: 12px;
    }

    .hero-item {
        font-size: 16px;
    }

    .hero-icon {
        flex: 0 0 24px;
        width: 24px;
        height: 24px;
        font-size: 14px;
    }

    /* F12: FAQ accordion на мобильном */
    .accordion-button {
        font-size: 14px;
        padding: 12px 16px;
        text-align: left;
    }

    .accordion-button .bi {
        display: none;
    }

    /* F6: Мобильная навигация - увеличить toggler для touch */
    .navbar-toggler {
        min-width: 44px;
        min-height: 44px;
        padding: 8px;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .navbar-toggler:focus {
        box-shadow: 0 0 0 2px var(--accent);
    }

    .navbar-toggler-icon {
        width: 24px;
        height: 24px;
    }
}

/* Ещё меньшие экраны */
@media (max-width: 576px) {
    .accordion-button {
        font-size: 13px;
        padding: 10px 14px;
    }
}

/* === 14. Утилиты === */
.text-white {
    color: #FFFFFF !important;
}

.text-white-50 {
    color: rgba(255, 255, 255, 0.5) !important;
}

.text-dark {
    color: var(--text-on-light) !important;
}

/* === 15. Override Bootstrap если нужно === */
.lead {
    font-size: clamp(16px, 2vw, 20px);
}

h1 {
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.1;
    font-weight: 700;
}

h2 {
    font-size: clamp(24px, 4vw, 40px);
    line-height: 1.15;
    font-weight: 700;
}

h3 {
    font-size: clamp(20px, 3vw, 32px);
    line-height: 1.2;
    font-weight: 600;
}

/* ===================================
   ЛИЧНЫЙ КАБИНЕТ ОХРАННИКА (Cabinet)
   Светлая тема с современным UI
   =================================== */

/* === Основа страницы === */
.candidate-cabinet-page {
    background: #F9FAFB;
    color: #111827;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    padding-bottom: 40px;
}

/* === Header - Security Guard Theme: Dark navy, professional === */
.cabinet-header {
    background: var(--gradient-brand);
    color: white;
    padding: var(--space-8, 32px) 0 var(--space-6, 24px);
    margin-bottom: var(--space-8, 32px);
    box-shadow: var(--shadow-md);
}

.cabinet-header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.cabinet-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 24px;
}

.cabinet-header-left {
    flex: 1;
}

.cabinet-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: white;
}

.cabinet-phone-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.cabinet-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* === Прогресс-виджет === */
.cabinet-progress-widget {
    display: flex;
    align-items: center;
    gap: 16px;
}

.progress-ring {
    position: relative;
    width: 56px;
    height: 56px;
}

.progress-svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
    display: block;
}

.progress-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 4;
}

.progress-ring-fill {
    fill: none;
    stroke: white;
    stroke-width: 4;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.progress-ring-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    font-weight: 700;
    color: white;
}

.progress-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.progress-label {
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.progress-hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

/* === Кнопка выхода === */
.btn-cabinet-logout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-cabinet-logout:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-2px);
}

/* === Контент === */
.cabinet-content-wrapper {
    padding: 0;
}

.cabinet-content-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === Alerts/Баннеры === */
.cabinet-alert {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    border-left: 4px solid #F59E0B;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.cabinet-alert-warning {
    border-left-color: #F59E0B;
}

.cabinet-alert-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.cabinet-alert-icon {
    font-size: 24px;
    color: #F59E0B;
}

.cabinet-alert-text {
    flex: 1;
    color: #111827;
    font-size: 14px;
}

.btn-cabinet-alert {
    padding: 8px 16px;
    background: #F59E0B;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-cabinet-alert:hover {
    background: #D97706;
}

/* === Баннер недостающих полей === */
.cabinet-missing-banner {
    background: #FEF3C7;
    border: 1px solid #FDE68A;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.cabinet-missing-icon {
    font-size: 24px;
    color: #D97706;
    flex-shrink: 0;
}

.cabinet-missing-content {
    flex: 1;
    color: #92400E;
}

.cabinet-missing-list {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

/* === Карточки - Security Guard Theme: Clean borders, minimal shadows === */
.cabinet-card {
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    padding: var(--space-6, 24px);
    padding-bottom: 40px !important; /* Extra padding to prevent button clipping */
    margin-bottom: var(--space-5, 20px);
    border: 1px solid var(--border-on-light);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    overflow: visible !important; /* Ensure buttons are not clipped */
}

.cabinet-card-body {
    overflow: visible !important;
}

.cabinet-card:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--border-on-light-hover);
}

.cabinet-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #E5E7EB;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.cabinet-card-header i {
    color: var(--brand-primary);
    font-size: 20px;
}

.cabinet-card-saved {
    margin-left: auto;
    font-size: 13px;
    color: #10B981;
    font-weight: 500;
}

.cabinet-card-body {
    padding: 0;
}

/* === Формы === */
.cabinet-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 16px;
}

.cabinet-form-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.cabinet-form-group {
    display: flex;
    flex-direction: column;
}

.cabinet-form-label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.required {
    color: #EF4444;
}

.cabinet-form-input,
.cabinet-form-select,
.cabinet-form-textarea {
    width: 100%;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 10px 14px;
    color: #111827;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    background: #FFFFFF;
}

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

.cabinet-form-input-readonly {
    background: #F9FAFB;
    color: #6B7280;
    cursor: not-allowed;
}

.cabinet-form-textarea {
    resize: vertical;
    min-height: 120px;
}

.cabinet-form-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6B7280;
    margin-top: 16px;
    padding: 12px;
    background: #F9FAFB;
    border-radius: 8px;
}

.cabinet-form-hint-inline {
    font-size: 12px;
    color: #9CA3AF;
    margin-top: 4px;
}

.cabinet-form-error {
    color: #EF4444;
    font-size: 13px;
    margin-top: 6px;
}

.cabinet-form-counter {
    text-align: right;
    font-size: 13px;
    color: #9CA3AF;
    margin-top: 6px;
}

/* === Фото профиля === */
.cabinet-photo-section {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.cabinet-photo-preview {
    width: 150px;
    height: 150px;
    border-radius: 12px;
    overflow: hidden;
    background: #F3F4F6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid #E5E7EB;
}

.cabinet-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cabinet-photo-preview.empty i {
    font-size: 48px;
    color: #9CA3AF;
}

/* Enhanced Photo Preview - Larger */
.cabinet-photo-section-enhanced {
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.cabinet-photo-section-enhanced .cabinet-photo-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.cabinet-photo-preview-large {
    width: 200px;
    height: 200px;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 3px solid #E5E7EB;
    transition: all 0.3s;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.cabinet-photo-preview-large:hover {
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-md);
}

.cabinet-photo-preview-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cabinet-photo-preview-large.empty {
    background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
    border-style: dashed;
    cursor: pointer;
}

.cabinet-photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #9CA3AF;
}

.cabinet-photo-placeholder i {
    font-size: 56px;
}

.cabinet-photo-placeholder span {
    font-size: 14px;
    font-weight: 500;
}

.btn-cabinet-photo-upload {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #3B82F6 0%, #6366F1 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
    position: relative;
    overflow: hidden;
    opacity: 1 !important;
    visibility: visible !important;
}

.btn-cabinet-photo-upload:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.45);
    background: linear-gradient(135deg, #2563EB 0%, #4F46E5 100%) !important;
    color: white !important;
}

.btn-cabinet-photo-upload:active {
    transform: translateY(0);
    box-shadow: var(--shadow-xs);
}

/* Rank Cards - Visual Selection */
.cabinet-rank-cards {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 16px;
}

.cabinet-rank-card {
    position: relative;
    cursor: pointer;
}

.cabinet-rank-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.rank-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px;
    background: var(--bg-light-secondary);
    border: 2px solid var(--border-on-light);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.cabinet-rank-card:hover .rank-card-content {
    border-color: var(--brand-primary-light);
    background: var(--bg-light-tertiary);
}

.cabinet-rank-card.active .rank-card-content,
.cabinet-rank-card input[type="radio"]:checked + .rank-card-content {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-sm);
}

.rank-card-number {
    font-size: 36px;
    font-weight: 800;
    color: var(--brand-primary);
    line-height: 1;
    transition: color 0.2s ease;
}

.cabinet-rank-card.active .rank-card-number,
.cabinet-rank-card input[type="radio"]:checked + .rank-card-content .rank-card-number {
    color: white;
}

.rank-card-label {
    font-size: 14px;
    font-weight: 600;
    color: #6B7280;
    margin-top: 4px;
    transition: color 0.3s;
}

.cabinet-rank-card.active .rank-card-label,
.cabinet-rank-card input[type="radio"]:checked + .rank-card-content .rank-card-label {
    color: rgba(255, 255, 255, 0.9);
}

.rank-card-desc {
    font-size: 12px;
    color: #9CA3AF;
    margin-top: 8px;
    transition: color 0.3s;
}

.cabinet-rank-card.active .rank-card-desc,
.cabinet-rank-card input[type="radio"]:checked + .rank-card-content .rank-card-desc {
    color: rgba(255, 255, 255, 0.8);
}

/* Disabled state for rank cards (no license or no_rank checked) */
.cabinet-rank-card.disabled .rank-card-content,
.cabinet-rank-cards.disabled .rank-card-content {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background: #F3F4F6;
}

.cabinet-rank-card.disabled,
.cabinet-rank-cards.disabled .cabinet-rank-card {
    pointer-events: none;
}

/* No Rank checkbox styling (единый стиль с остальными чекбоксами) */
.cabinet-no-rank-wrapper {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #E5E7EB;
}

.cabinet-no-rank-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #FFFBEB;
    border: 1.5px solid #FDE68A;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.cabinet-no-rank-checkbox:hover {
    background: #FEF3C7;
    border-color: #FCD34D;
}

/* Скрываем стандартный чекбокс */
.cabinet-no-rank-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Кастомный индикатор */
.cabinet-no-rank-checkbox label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    cursor: pointer;
    font-weight: 500;
    color: #92400E;
    font-size: 15px;
    width: 100%;
}

.cabinet-no-rank-checkbox label::before {
    content: '';
    width: 24px;
    height: 24px;
    min-width: 24px;
    border: 2px solid #FCD34D;
    border-radius: 6px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

/* Состояние checked */
.cabinet-no-rank-checkbox input[type="checkbox"]:checked + label::before {
    background: #D97706;
    border-color: #D97706;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E");
    background-size: 16px;
    background-repeat: no-repeat;
    background-position: center;
}

/* Активное состояние всего блока */
.cabinet-no-rank-checkbox:has(input:checked) {
    background: #FEF3C7;
    border-color: #D97706;
}

.cabinet-no-rank-checkbox:has(input:checked) label {
    color: #92400E;
    font-weight: 600;
}

/* License hint for rank */
.cabinet-license-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 14px;
    background: #FEF3C7;
    border-radius: 8px;
    font-size: 13px;
    color: #92400E;
}

.cabinet-license-hint.hidden {
    display: none;
}

@media (max-width: 576px) {
    .cabinet-rank-cards {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    .rank-card-content {
        flex-direction: row;
        justify-content: flex-start;
        gap: 16px;
        padding: 16px 20px;
        text-align: left;
    }

    .rank-card-number {
        font-size: 28px;
    }

    .rank-card-label,
    .rank-card-desc {
        margin-top: 0;
    }
}

.cabinet-photo-controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cabinet-photo-hint {
    font-size: 13px;
    color: #6B7280;
}

/* === Кнопки === */
.btn-cabinet-primary-outline {
    padding: 10px 20px;
    background: white;
    border: 1px solid var(--brand-primary);
    border-radius: var(--radius-md);
    color: var(--brand-primary);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-cabinet-primary-outline:hover {
    background: var(--bg-light-tertiary);
}

.btn-cabinet-danger-link {
    padding: 8px 16px;
    background: transparent !important;
    border: none !important;
    color: #EF4444 !important;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
    opacity: 1 !important;
    visibility: visible !important;
}

.btn-cabinet-danger-link:hover {
    color: #DC2626 !important;
    background: rgba(239, 68, 68, 0.1) !important;
}

/* === Радиокнопки (разряды) === */
.cabinet-rank-pills {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cabinet-rank-pill {
    position: relative;
    cursor: pointer;
}

.cabinet-rank-pill input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.cabinet-rank-pill span {
    display: inline-block;
    padding: 12px 24px;
    background: #F3F4F6;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    font-weight: 600;
    color: #6B7280;
    transition: all 0.2s ease;
}

.cabinet-rank-pill:hover span {
    background: #E5E7EB;
}

.cabinet-rank-pill.active span,
.cabinet-rank-pill input[type="radio"]:checked + span {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: white;
}

/* === Чекбоксы (кастомные) === */
.cabinet-form-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #F9FAFB;
    border: 1.5px solid #E5E7EB;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.cabinet-form-checkbox:hover {
    background: #F3F4F6;
    border-color: #D1D5DB;
}

/* Скрываем стандартный чекбокс */
.cabinet-form-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Кастомный индикатор */
.cabinet-form-checkbox label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    cursor: pointer;
    font-weight: 500;
    color: #111827;
    font-size: 15px;
    width: 100%;
}

.cabinet-form-checkbox label::before {
    content: '';
    width: 24px;
    height: 24px;
    min-width: 24px;
    border: 2px solid #D1D5DB;
    border-radius: 6px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

/* Состояние checked */
.cabinet-form-checkbox input[type="checkbox"]:checked + label::before {
    background: var(--brand-primary, #1E3A5F);
    border-color: var(--brand-primary, #1E3A5F);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E");
    background-size: 16px;
    background-repeat: no-repeat;
    background-position: center;
}

/* Активное состояние всего блока */
.cabinet-form-checkbox:has(input:checked) {
    background: #EFF6FF;
    border-color: var(--brand-primary, #1E3A5F);
}

.cabinet-form-checkbox:has(input:checked) label {
    color: var(--brand-primary, #1E3A5F);
    font-weight: 600;
}

/* === Сетка чекбоксов (графики) === */
.cabinet-schedule-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* === Input с суффиксом === */
.cabinet-form-input-suffix {
    position: relative;
    width: 100%;
    display: block;
    isolation: isolate; /* Создаёт новый stacking context */
}

.cabinet-form-input-suffix input {
    width: 100%;
    padding-right: 80px !important;
    position: relative;
    z-index: 2;
    background: #fff !important;
    pointer-events: auto;
    opacity: 1;
}

.input-suffix {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #6B7280;
    font-weight: 500;
    pointer-events: none;
    user-select: none;
    z-index: 1;
    line-height: 1;
}

/* === Кнопки действий (сохранить) === */
.cabinet-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 32px;
}

.btn-cabinet-save {
    padding: 14px 32px;
    background: linear-gradient(135deg, #3B82F6 0%, #6366F1 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
    position: relative;
    overflow: hidden;
}

.btn-cabinet-save:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563EB 0%, #4F46E5 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.45);
}

.btn-cabinet-save:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: var(--shadow-xs);
}

.btn-cabinet-save:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-cabinet-secondary {
    padding: 14px 32px;
    background: #FFFFFF;
    border: 1px solid var(--border-on-light);
    border-radius: var(--radius-md);
    color: var(--text-on-light-primary);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-cabinet-secondary:hover {
    background: var(--bg-light-tertiary);
    border-color: var(--border-on-light-hover);
    color: var(--text-on-light-primary);
}

/* === Toast === */
.cabinet-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* === Адаптивность для candidate cabinet теперь в candidate.mobile.css === */

/* === Accordion/FAQ - Security Guard Theme === */
.accordion-item {
    border: 1px solid var(--border-on-light) !important;
    margin-bottom: 12px;
    background: #FFFFFF;
    border-radius: var(--radius-md) !important;
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.accordion-button {
    background: #FFFFFF !important;
    color: var(--text-on-light-primary) !important;
    font-weight: 600;
    font-size: 16px;
    padding: 16px 20px;
    border: none !important;
    box-shadow: none !important;
}

.accordion-button:not(.collapsed) {
    background: var(--bg-light-tertiary) !important;
    color: var(--brand-primary) !important;
}

.accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%231E3A5F'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e") !important;
}

.accordion-body {
    padding: 16px 20px;
    background: #FFFFFF;
    color: var(--text-on-light-secondary);
    font-size: 15px;
    line-height: 1.6;
}

.accordion-body a {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 500;
}

.accordion-body a:hover {
    text-decoration: underline;
}

/* === Cabinet Alert Info (blue variant) === */
.cabinet-alert-info {
    border-left-color: #3B82F6;
}

.cabinet-alert-info .cabinet-alert-icon {
    color: #3B82F6;
}

.cabinet-alert-info .btn-cabinet-alert {
    background: #3B82F6;
}

.cabinet-alert-info .btn-cabinet-alert:hover {
    background: #2563EB;
}

/* === Cabinet Motivation Banner === */
.cabinet-motivation-banner {
    background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
    border: 1px solid #86EFAC;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.cabinet-motivation-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #166534;
    font-size: 15px;
    margin-bottom: 14px;
}

.cabinet-motivation-header i {
    font-size: 20px;
    color: #22C55E;
}

.cabinet-motivation-tips {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cabinet-motivation-tip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: #15803D;
    line-height: 1.5;
}

.cabinet-motivation-tip i {
    font-size: 16px;
    color: #22C55E;
    margin-top: 2px;
    flex-shrink: 0;
}

/* === Set Password Modal Enhancements === */
#setPasswordModal .modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

#setPasswordModal .modal-header {
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    border-radius: 12px 12px 0 0;
}

#setPasswordModal .form-control {
    border-radius: 8px;
    padding: 12px 16px;
    border: 1px solid #E5E7EB;
}

#setPasswordModal .form-control:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

#setPasswordModal .btn-primary {
    background: linear-gradient(135deg, #3B82F6 0%, #6366F1 100%);
    border: none;
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 8px;
}

#setPasswordModal .btn-primary:hover {
    background: linear-gradient(135deg, #2563EB 0%, #4F46E5 100%);
}

#setPasswordModal .btn-secondary {
    border-radius: 8px;
    padding: 12px 24px;
}
