/* ============================================================
   1) ОСНОВНЫЕ ОТСТУПЫ И ВЕРСТКА
   ============================================================ */

:root {
    --site-navbar-height: 80px;
}

.main-panel>.content {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.main-panel > .navbar {
    position: sticky;
    top: 0;
    z-index: 1035;
    margin-bottom: 0;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.main-panel > .navbar .container-fluid {
    min-height: var(--site-navbar-height);
    padding-top: 6px;
    padding-bottom: 6px;
}

.content .card {
    margin-top: 0;
}


/* ============================================================
   2) FILE INPUT (нормализация + темы)
   ============================================================ */

input[type="file"] {
    display: block;
    width: 100%;
    padding: 10px 12px !important;
    font-size: 14px;
    line-height: 1.4 !important;
    background: transparent !important;
    border-radius: 4px;
    height: auto !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1 !important;
}

body:not(.white-content) input[type="file"] {
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #fff !important;
}

body.white-content input[type="file"] {
    border: 1px solid rgba(0, 0, 0, 0.4) !important;
    color: #000 !important;
}


/* ============================================================
   3) ПОДСКАЗКИ / HINTS
   ============================================================ */

.merge-hint {
    background: rgba(255, 255, 255, 0.08);
    color: #ddd;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
}

body.white-content .merge-hint {
    background: #f7f7f7;
    color: #333;
    border: 1px solid #ccc;
}

.hint-block {
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    padding: 10px 12px;
}

.white-content .hint-block {
    background: rgba(0, 0, 0, 0.08);
}


/* ============================================================
   4) МОДАЛКИ ОШИБОК
   ============================================================ */

.error-modal-content {
    background-color: #1e1e2f;
    color: #fff;
    border: none;
}

.close-error-modal .close-error-icon {
    color: #fff;
}

.white-content .error-modal-content {
    background-color: #fff;
    color: #1e1e2f;
    border: 1px solid #ddd;
}

.white-content .close-error-modal .close-error-icon {
    color: #1e1e2f;
}

.error-modal-text {
    white-space: pre-wrap;
    font-size: 14px;
    line-height: 1.4;
}


/* ============================================================
   5) CSS-ПЕРЕМЕННЫЕ ТЕМЫ
   ============================================================ */

body.white-content {
    --text-color: #1e1e2f;
    --card-bg: #ffffff;
    --grid-color: rgba(0, 0, 0, 0.1);
}

body:not(.white-content) {
    --text-color: #e0e0e0;
    --card-bg: #27293d;
    --grid-color: rgba(255, 255, 255, 0.1);
}


/* ============================================================
   6) ЦВЕТА ГРАФИКОВ
   ============================================================ */

:root {
    --success-color: #00f2c3;
    --danger-color: #fd5d93;
    --info-color: #1d8cf8;
    --muted-color: #9a9a9a;

    --success-bg: rgba(0, 242, 195, 0.15);
    --danger-bg: rgba(253, 93, 147, 0.15);
    --info-bg: rgba(29, 140, 248, 0.15);
    --muted-bg: rgba(154, 154, 154, 0.15);
}


/* ============================================================
   7) KPI-КАРТОЧКИ
   ============================================================ */

.kpi-card,
.chart-card {
    background: #27293d;
    border: none;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.white-content .kpi-card,
.white-content .chart-card {
    background: #ffffff;
    border: 1px solid #e3e3e3;
}

.kpi-icon-colored {
    font-size: 32px;
}

.kpi-icon-colored.success {
    color: #1cc88a;
}

.kpi-icon-colored.error {
    color: #e74a3b;
}

.kpi-icon-colored.start {
    color: #4e73df;
}

.kpi-icon-colored.delete {
    color: #f6c23e;
}

body:not(.white-content) .kpi-card .kpi-value,
body:not(.white-content) .kpi-card .kpi-title {
    color: rgba(255, 255, 255, 0.92) !important;
}

body.white-content .kpi-card .kpi-value,
body.white-content .kpi-card .kpi-title {
    color: #1e1e2f !important;
}

/* Documents history dashboard: denser KPI cards */
.kpi-card .card-body {
    padding: 1rem 1.1rem;
    min-height: 100px;
}

.kpi-card .kpi-title {
    font-size: 0.78rem;
    line-height: 1.35;
    margin-bottom: 0.45rem;
    min-height: 2.2em;
    display: flex;
    align-items: flex-start;
}

.kpi-card .kpi-value {
    font-size: 2rem !important;
    line-height: 1;
}

.kpi-card .kpi-icon i {
    font-size: 1.9rem;
}

.history-kpi-col {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    flex: 0 0 20%;
    max-width: 20%;
}

@media (max-width: 1199.98px) {
    .history-kpi-col {
        flex: 0 0 33.3333%;
        max-width: 33.3333%;
    }
}

@media (max-width: 767.98px) {
    .history-kpi-col {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .kpi-card .card-body {
        padding: 0.9rem 1rem;
        min-height: 108px;
    }

    .kpi-card .kpi-value {
        font-size: 1.75rem !important;
    }

    .kpi-card .kpi-icon i {
        font-size: 1.65rem;
    }
}

@media (max-width: 575.98px) {
    .history-kpi-col {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.chart-container {
    position: relative;
    height: 300px;
}

/* Documents history dashboard tabs */
body.white-content .nav-tabs {
    border-bottom-color: rgba(0, 0, 0, 0.16);
}

body.white-content .nav-tabs .nav-link {
    color: #9b59ff !important;
    border: 1px solid transparent;
    border-top-left-radius: 0.4rem;
    border-top-right-radius: 0.4rem;
    background: transparent;
    padding: 0.7rem 1.2rem;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

body.white-content .nav-tabs .nav-link:hover,
body.white-content .nav-tabs .nav-link:focus {
    color: #7f3dff !important;
    border-color: transparent;
    background: rgba(155, 89, 255, 0.08);
}

body.white-content .nav-tabs .nav-link.active,
body.white-content .nav-tabs .nav-item.show .nav-link {
    color: #6f3df4 !important;
    background: rgba(155, 89, 255, 0.12) !important;
    border-color: rgba(155, 89, 255, 0.26) rgba(155, 89, 255, 0.26) #f4edff;
    box-shadow: inset 0 2px 0 #9b59ff;
}

body.white-content .pagination .page-link {
    color: #222a42 !important;
    background: #ffffff !important;
    border-color: rgba(34, 42, 66, 0.16) !important;
}

body.white-content .pagination .page-link:hover,
body.white-content .pagination .page-link:focus {
    color: #111827 !important;
    background: #f3f6fb !important;
    border-color: rgba(34, 42, 66, 0.24) !important;
    box-shadow: none !important;
}

body.white-content .pagination .page-item.active .page-link {
    color: #ffffff !important;
    background: linear-gradient(135deg, #9b59ff 0%, #c86dd7 100%) !important;
    border-color: #9b59ff !important;
}

body.white-content .pagination .page-item.disabled .page-link {
    color: #8b95a7 !important;
    background: #f8fafc !important;
    border-color: rgba(34, 42, 66, 0.10) !important;
}


/* ============================================================
   8) SELECT (тёмная/светлая тема)
   ============================================================ */

body:not(.white-content) select.form-control,
body:not(.white-content) select.form-control option {
    background-color: #2b2d42 !important;
    color: #fff !important;
    border-color: #3a3c55 !important;
}

body.white-content select.form-control {
    background-color: #f5f5f5 !important;
    color: #1e1e2f !important;
    border-color: #ccc !important;
}

body.white-content select.form-control option {
    background-color: #ffffff !important;
    color: #1e1e2f !important;
}


/* ============================================================
   9) SIDEBAR (desktop + mobile)
   ============================================================ */

html.sidebar-collapsed-preload .sidebar,
html.sidebar-collapsed-preload .sidebar .sidebar-wrapper {
    width: 80px;
}

html.sidebar-collapsed-preload .sidebar,
html.sidebar-collapsed-preload .sidebar .sidebar-wrapper,
html.sidebar-collapsed-preload .main-panel,
html.sidebar-collapsed-preload .sidebar~.main-panel>.content,
html.sidebar-collapsed-preload .sidebar~.main-panel>.footer {
    transition: none !important;
}

html.sidebar-collapsed-preload .sidebar .nav p,
html.sidebar-collapsed-preload .sidebar .nav-section-title {

    display: none !important;
}

html.sidebar-collapsed-preload .sidebar .nav li>a,
html.sidebar-collapsed-preload .sidebar .nav li>button,
html.sidebar-collapsed-preload .sidebar .nav li .sidebar-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 0 auto;
    padding: 0 !important;
    border-radius: 14px;
    text-align: center;
}

html.sidebar-collapsed-preload .sidebar .nav li>a i,
html.sidebar-collapsed-preload .sidebar .nav li>button i,
html.sidebar-collapsed-preload .sidebar .nav li .sidebar-logout i {
    margin-right: 0 !important;
    font-size: 1.35rem;
}

html.sidebar-collapsed-preload .sidebar .nav li.active>a {
    background: rgba(44, 212, 217, 0.18) !important;
}

html.sidebar-collapsed-preload .sidebar .nav li.active>a i {
    color: #2CD4D9 !important;
}

html.sidebar-collapsed-preload .sidebar .nav li>a:hover,
html.sidebar-collapsed-preload .sidebar .nav li .sidebar-logout:hover {
    background: rgba(44, 212, 217, 0.10) !important;
}

.sidebar {
    top: 35px;
    transition: width .3s ease;
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar.collapsed .sidebar-wrapper {

    width: 80px;
}

.sidebar .nav-section-title {
    display: inline-block;

    margin: 16px 20px 8px 60px;
    padding: 4px 10px;

    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;

    border-radius: 999px;

    background: rgba(217, 70, 239, 0.12);
    color: #d946ef;
}

body.white-content .sidebar .nav-section-title::before {
    background: rgba(20, 30, 55, 0.08);
}

.sidebar.collapsed .nav p,
.sidebar.collapsed .nav-section-title {
    display: none;
}

.sidebar.collapsed .nav i {
    margin-right: 0;
}

.sidebar.collapsed .nav li>a {
    padding-left: 20px;
}

@media (min-width: 992px) {
    html.sidebar-collapsed-preload .sidebar~.main-panel>.content,
    html.sidebar-collapsed-preload .sidebar~.main-panel>.footer {
        padding-left: 130px;
    }

    .sidebar.collapsed~.main-panel>.content,
    .sidebar.collapsed~.main-panel>.footer {
        padding-left: 130px;
    }
}

.navbar-wrapper--sidebar {
    gap: 16px;
}

.navbar-wrapper--sidebar .navbar-toggle {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.navbar-wrapper--sidebar .navbar-brand {
    position: static;
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.sidebar-toggle-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    color: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    text-decoration: none;
    transition: opacity .2s ease;
}

.sidebar-toggle-btn:hover,
.sidebar-toggle-btn:focus {
    color: rgba(255, 255, 255, 0.92);
    opacity: .72;
    text-decoration: none;
}

.sidebar-toggle-btn i {
    font-size: 1.1rem;
    transition: transform .2s ease;
}


body.white-content .sidebar-toggle-btn {
    color: #222a42;
}

body.white-content .sidebar-toggle-btn:hover,
body.white-content .sidebar-toggle-btn:focus {
    color: #222a42;
}

.wrapper>.sidebar+.main-panel #sidebar-toggle {
    display: inline-flex;
}

@media (max-width: 991px) {
    .navbar-wrapper--sidebar {
        gap: 12px;
    }

    .navbar-wrapper--sidebar .navbar-brand {
        margin-left: 0;
    }

    .sidebar.collapsed,
    .sidebar.collapsed .sidebar-wrapper {
        width: 260px;
    }

    .sidebar.collapsed .nav p,
    .sidebar.collapsed .nav-section-title {
        display: block;
    }

    .wrapper>.sidebar+.main-panel #sidebar-toggle {
        display: none;
    }
}

.sidebar .nav li.sidebar-item-logout>a,
.sidebar .nav li.sidebar-item-logout>a p,
.sidebar .nav li.sidebar-item-logout>a i {
    color: rgba(255, 255, 255, 0.78) !important;
    opacity: 1 !important;
    transition: color .2s ease, opacity .2s ease, background .2s ease;
}

body.white-content .sidebar .nav li.sidebar-item-logout>a,
body.white-content .sidebar .nav li.sidebar-item-logout>a p,
body.white-content .sidebar .nav li.sidebar-item-logout>a i {
    color: #2A2A2A !important;
}

.sidebar .nav li.sidebar-item-logout>a:hover,
.sidebar .nav li.sidebar-item-logout>a:hover p,
.sidebar .nav li.sidebar-item-logout>a:hover i {
    color: #ef4444 !important;
    opacity: 1 !important;
}

.sidebar .nav li.sidebar-item-logout>a:hover {
    background: rgba(239, 68, 68, 0.10) !important;
    border-radius: 10px;
}

/* ============================================================
   COLLAPSED SIDEBAR — ACTIVE ICON FIX
   ============================================================ */

.sidebar.collapsed .nav li>a,
.sidebar.collapsed .nav li>button,
.sidebar.collapsed .nav li .sidebar-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 0 auto;
    padding: 0 !important;
    border-radius: 14px;
    text-align: center;
}

.sidebar.collapsed .nav li>a i,
.sidebar.collapsed .nav li>button i,
.sidebar.collapsed .nav li .sidebar-logout i {
    margin-right: 0 !important;
    font-size: 1.35rem;
}

.sidebar.collapsed .nav p,
.sidebar.collapsed .nav-section-title {
    display: none !important;
}

/* active state */
.sidebar.collapsed .nav li.active>a {
    background: rgba(44, 212, 217, 0.18) !important;
}

.sidebar.collapsed .nav li.active>a i {
    color: #2CD4D9 !important;
}

/* hover */
.sidebar.collapsed .nav li>a:hover,
.sidebar.collapsed .nav li .sidebar-logout:hover {
    background: rgba(44, 212, 217, 0.10) !important;
}

/* logout in collapsed mode */
.sidebar.collapsed .nav li .sidebar-logout {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar.collapsed .nav li .sidebar-logout p {
    display: none !important;
}


/* ============================================================
   10) БАЗОВЫЙ БРЕНДИНГ
   ============================================================ */

.btn-primary,
.navbar.bg-primary,
.sidebar {
    background-color: #2CD4D9 !important;
    background-image: none !important;
    border-color: #2CD4D9 !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #1BBAC3 !important;
    border-color: #1BBAC3 !important;
}


/* ============================================================
   11) STICKY FOOTER
   ============================================================ */

html,
body {
    height: 100%;
}

.wrapper {
    min-height: 100%;
    display: flex;
}

.main-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.main-panel .content {
    flex: 0 0 auto;
    min-height: calc(100vh - 190px);

}

.main-panel .footer {
    flex-shrink: 0;
}

.sidebar-multiline {
    line-height: 1.25;
    margin: 0;
    padding: 0;
    white-space: normal;
}


/* ============================================================
   12) ЛОГОТИПЫ (navbar + login)
   ============================================================ */

.logo-base {
    width: auto;
    transition: opacity .3s ease;
}

.navbar-logo.logo-base {
    height: 72px;
    margin-top: 0;
}

.auth-logo-wrapper {
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo.logo-base {
    max-width: 260px;
    width: 100%;
    height: auto;
    display: inline-block;
    margin: 0 auto;
}

.logo-light {
    display: none;
}

body.white-content .logo-dark {
    display: none;
}

body.white-content .logo-light {
    display: inline-block;
}

.fullscreen-navbar {
    padding: 0;
    border-bottom: 1px solid rgba(83, 194, 223, 0.24);
}

.fullscreen-navbar .container-fluid {
    min-height: 76px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.fullscreen-navbar__brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.fullscreen-navbar__logo {
    height: 96px;
    width: auto;
    transition: opacity .3s ease;
}

body:not(.white-content) .fullscreen-navbar__logo.logo-dark {
    display: inline-block;
}

body:not(.white-content) .fullscreen-navbar__logo.logo-light {
    display: none;
}

body.white-content .fullscreen-navbar__logo.logo-dark {
    display: none;
}

body.white-content .fullscreen-navbar__logo.logo-light {
    display: inline-block;
}

.fullscreen-navbar__collapse {
    justify-content: flex-end;
}

.fullscreen-navbar__actions {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
    margin-bottom: 0;
}

.fullscreen-navbar__theme-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 58px;
    height: 34px;
    padding: 4px;
    border-radius: 999px;
    background: #ececec;
    transition: background-color .3s ease;
}

.fullscreen-navbar__theme-link:hover,
.fullscreen-navbar__theme-link:focus {
    opacity: 1;
}

.fullscreen-navbar__theme-link::after {
    content: "";
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(40deg, #ff0080, #ff8c00 70%);
    transition: transform .3s ease, background .3s ease, box-shadow .3s ease;
}

body.white-content .fullscreen-navbar__theme-link {
    background: #303136;
}

body.white-content .fullscreen-navbar__theme-link::after {
    transform: translateX(24px);
    background: #303136;
    box-shadow: inset -3px -2px 5px -2px #8983f7, inset -10px -4px 0 0 #a3dafb;
}

.fullscreen-navbar__account-link,
.fullscreen-navbar__logout-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0;
    min-width: 48px;
    color: #ffffff !important;
    line-height: 1;
    text-decoration: none;
    opacity: 1;
}

.fullscreen-navbar__account-link:hover,
.fullscreen-navbar__account-link:focus,
.fullscreen-navbar__logout-btn:hover,
.fullscreen-navbar__logout-btn:focus {
    color: #ffffff !important;
    text-decoration: none;
    opacity: .85;
}

.fullscreen-navbar__account-link i,
.fullscreen-navbar__logout-btn i {
    font-size: 1.35rem;
}

.fullscreen-navbar__account-link span,
.fullscreen-navbar__logout-btn span {
    font-size: .95rem;
    font-weight: 600;
}

body.white-content .fullscreen-navbar__account-link,
body.white-content .fullscreen-navbar__logout-btn {
    color: #222a42 !important;
}

body.white-content .fullscreen-navbar__account-link:hover,
body.white-content .fullscreen-navbar__account-link:focus,
body.white-content .fullscreen-navbar__logout-btn:hover,
body.white-content .fullscreen-navbar__logout-btn:focus {
    color: #222a42 !important;
}

@media (max-width: 991.98px) {
    .fullscreen-navbar .container-fluid {
        padding: 0 20px;
        flex-wrap: wrap;
    }

    .fullscreen-navbar__collapse {
        width: 100%;
    }

    .fullscreen-navbar__actions {
        width: 100%;
        justify-content: flex-end;
        padding: 0 0 16px;
    }
}


/* ============================================================
   13) HOME PAGE / LANDING FIXES
   ============================================================ */

/* Токены лендинга */
body:not(.white-content) {
    --landing-section-bg: #111827;
    --landing-section-bg-soft: #0f172a;
    --landing-card-bg: #1b2233;
    --landing-card-border: rgba(255, 255, 255, 0.08);
    --landing-text: #e5e7eb;
    --landing-text-muted: #aeb8c7;
    --landing-heading: #ffffff;
    --landing-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

body.white-content {
    --landing-section-bg: #f4f7fb;
    --landing-section-bg-soft: #ffffff;
    --landing-card-bg: #ffffff;
    --landing-card-border: rgba(20, 30, 55, 0.08);
    --landing-text: #1f2937;
    --landing-text-muted: #5b6475;
    --landing-heading: #111827;
    --landing-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

/* Общие секции */
.hero-section,
.spotlight,
.features,
.cta-section,
.use-cases-section,
.how-it-works-section,
.faq-section,
.landing-section {
    color: var(--landing-text);
}

/* Фоны секций */
.use-cases-section,
.faq-section {
    background: var(--landing-section-bg);
    border-radius: 28px;
    padding: 80px 0;
}

.how-it-works-section,
.features,
.spotlight,
.hero-section,
.cta-section {
    background: transparent;
}

/* Заголовки секций */
.hero-section h1,
.hero-section h2,
.hero-section h3,
.spotlight h1,
.spotlight h2,
.spotlight h3,
.features h1,
.features h2,
.features h3,
.cta-section h1,
.cta-section h2,
.cta-section h3,
.use-cases-section h1,
.use-cases-section h2,
.use-cases-section h3,
.how-it-works-section h1,
.how-it-works-section h2,
.how-it-works-section h3,
.faq-section h1,
.faq-section h2,
.faq-section h3,
.landing-section h1,
.landing-section h2,
.landing-section h3,
.landing-section h4,
.landing-section h5,
.landing-section h6 {
    color: var(--landing-heading) !important;
}

/* Текст */
.hero-section p,
.spotlight p,
.features p,
.cta-section p,
.use-cases-section p,
.how-it-works-section p,
.faq-section p,
.landing-section p,
.landing-section .section-subtitle,
.landing-section .text-muted {
    color: var(--landing-text-muted) !important;
    opacity: 1 !important;
}

/* Карточки лендинга */
.landing-card,
.step-card,
.info-card,
.feature-box {
    background: var(--landing-card-bg) !important;
    color: var(--landing-text) !important;
    border: 1px solid var(--landing-card-border) !important;
    border-radius: 20px !important;
    box-shadow: var(--landing-shadow) !important;
    padding: 32px 28px;
}

/* Заголовки внутри карточек */
.landing-card h1,
.landing-card h2,
.landing-card h3,
.landing-card h4,
.landing-card h5,
.landing-card h6,
.step-card h1,
.step-card h2,
.step-card h3,
.step-card h4,
.step-card h5,
.step-card h6,
.info-card h1,
.info-card h2,
.info-card h3,
.info-card h4,
.info-card h5,
.info-card h6,
.feature-box h1,
.feature-box h2,
.feature-box h3,
.feature-box h4,
.feature-box h5,
.feature-box h6 {
    color: var(--landing-heading) !important;
    margin-bottom: 16px;
}

/* Текст внутри карточек */
.landing-card p,
.step-card p,
.info-card p,
.feature-box p {
    color: var(--landing-text) !important;
    line-height: 1.7;
    opacity: 1 !important;
    margin-bottom: 0;
}

.landing-card .small,
.step-card .small,
.info-card .small,
.feature-box .small {
    color: var(--landing-text-muted) !important;
}

/* Hover */
.landing-card:hover,
.step-card:hover,
.info-card:hover,
.feature-box:hover {
    transform: translateY(-4px);
    transition: transform .2s ease, box-shadow .2s ease;
}

/* Подзаголовки */
.section-subtitle {
    max-width: 860px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.7;
}

/* Hero */
.hero-section {
    padding: 120px 20px 80px;
    text-align: center;
}

.hero-section h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.15;
}

.hero-section p {
    font-size: 20px;
    max-width: 760px;
    margin: 0 auto 30px;
    line-height: 1.7;
}

.landing-visual {
    display: block;
    width: 100%;
    max-width: 110%;
    object-fit: cover;
    object-position: center;
    border-radius: 20px;
    box-shadow: var(--landing-shadow);
}

.landing-visual--hero {
    min-height: 420px;
}

.landing-visual--spotlight {
    min-height: 420px;
}

/* Spotlight */
.spotlight {
    padding: 80px 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.spotlight .image,
.spotlight .content {
    flex: 1 1 50%;
    padding: 20px;
}

.spotlight .image img {
    width: 100%;
    border-radius: 16px;
    box-shadow: var(--landing-shadow);
}

.spotlight h2 {
    font-size: 32px;
    margin-bottom: 18px;
}

/* Features */
.features {
    padding: 80px 0;
}

/* Steps */
.how-it-works-section {
    padding: 80px 0;
}

.step-card {
    text-align: center;
    height: 100%;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: rgba(44, 212, 217, 0.14);
    color: #2CD4D9;
    border: 1px solid rgba(44, 212, 217, 0.24);
}

/* CTA */
.cta-section {
    padding: 80px 20px;
    text-align: center;
}

.cta-section h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.cta-section p {
    margin-bottom: 30px;
}

/* Bootstrap bg-light compatibility */
body:not(.white-content) .bg-light,
body:not(.white-content) .section.bg-light {
    background: var(--landing-section-bg) !important;
    color: var(--landing-text) !important;
}

body.white-content .bg-light,
body.white-content .section.bg-light {
    background: var(--landing-section-bg) !important;
    color: var(--landing-text) !important;
}

/* Мобильная адаптация */
@media (max-width: 991.98px) {
    .hero-section {
        padding: 90px 16px 60px;
    }

    .hero-section h1 {
        font-size: 34px;
    }

    .hero-section p {
        font-size: 18px;
    }

    .landing-visual--hero,
    .landing-visual--spotlight {
        min-height: 320px;
    }

    .use-cases-section,
    .faq-section,
    .how-it-works-section,
    .features,
    .spotlight,
    .cta-section {
        padding-top: 56px;
        padding-bottom: 56px;
    }

    .landing-card,
    .step-card,
    .info-card,
    .feature-box {
        padding: 24px 20px;
    }

    .spotlight .image,
    .spotlight .content {
        flex: 1 1 100%;
        padding: 16px;
    }
}

/* ============================================================
   LOGOUT — FIX (делаем как обычный пункт меню)
   ============================================================ */

.sidebar .sidebar-logout {
    background: transparent !important;
    border: none !important;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    text-align: left;
    cursor: pointer;
}

/* DARK */
body:not(.white-content) .sidebar .sidebar-logout,
body:not(.white-content) .sidebar .sidebar-logout p,
body:not(.white-content) .sidebar .sidebar-logout i {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* LIGHT — ВОТ ГДЕ БЫЛА ПРОБЛЕМА */
body.white-content .sidebar .sidebar-logout,
body.white-content .sidebar .sidebar-logout p,
body.white-content .sidebar .sidebar-logout i {
    color: #2A2A2A !important;
    opacity: 1 !important;
}

/* HOVER */
.sidebar .sidebar-logout:hover {
    background: rgba(0, 0, 0, 0.1) !important;
}

body.white-content .sidebar .sidebar-logout:hover,
body.white-content .sidebar .sidebar-logout:hover p,
body.white-content .sidebar .sidebar-logout:hover i {
    color: #000 !important;
}

.hero-badge {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;

    letter-spacing: 0.05em;
    text-transform: uppercase;

    background: rgba(217, 70, 239, 0.15);
    color: #d946ef;
}

body:not(.white-content) .hero-badge {
    background: rgba(217, 70, 239, 0.2);
    color: #f472b6;
}

body.white-content .hero-badge {
    background: rgba(217, 70, 239, 0.12);
    color: #c026d3;
}

/* Logout hover fix — dark + light */
.sidebar .nav li.sidebar-item-logout>a,
.sidebar .nav li.sidebar-item-logout>a p,
.sidebar .nav li.sidebar-item-logout>a i {
    transition: color .2s ease, opacity .2s ease, background .2s ease;
}

/* dark */
body:not(.white-content) .sidebar .nav li.sidebar-item-logout>a,
body:not(.white-content) .sidebar .nav li.sidebar-item-logout>a p,
body:not(.white-content) .sidebar .nav li.sidebar-item-logout>a i {
    color: rgba(255, 255, 255, 0.78) !important;
}

/* light */
body.white-content .sidebar .nav li.sidebar-item-logout>a,
body.white-content .sidebar .nav li.sidebar-item-logout>a p,
body.white-content .sidebar .nav li.sidebar-item-logout>a i {
    color: #2A2A2A !important;
}

/* hover for both themes */
.sidebar .nav li.sidebar-item-logout>a:hover,
.sidebar .nav li.sidebar-item-logout>a:hover p,
.sidebar .nav li.sidebar-item-logout>a:hover i,
body.white-content .sidebar .nav li.sidebar-item-logout>a:hover,
body.white-content .sidebar .nav li.sidebar-item-logout>a:hover p,
body.white-content .sidebar .nav li.sidebar-item-logout>a:hover i {
    color: #ef4444 !important;
    opacity: 1 !important;
}

.sidebar .nav li.sidebar-item-logout>a:hover {
    background: rgba(239, 68, 68, 0.10) !important;
    border-radius: 10px;
}

#docsFilters.docs-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

#docsFilters .docs-filter-field {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

#docsFilters .docs-filter-field label {
    margin: 0;
    white-space: nowrap;
}

#docsFilters .docs-filter-field .form-control {
    width: 205px;
    min-width: 205px;
    margin: 0;
}

#docsFilters .docs-filter-actions {
    display: flex;
    align-items: center;
    margin: 0;
}

#docsFilters .docs-filter-actions .btn {
    height: calc(2.25rem + 2px);
    padding: 0 24px !important;
    margin: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.api-keys-page__header {
    gap: 16px;
}

.api-keys-page__header-copy {
    min-width: 0;
}

.api-keys-page__back-btn {
    flex-shrink: 0;
}

.api-keys-page__form-row {
    align-items: start;
}

.api-keys-page__button-col {
    display: flex;
    align-items: flex-start;
}

.api-keys-page__submit-btn {
    width: 100%;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding-left: 24px !important;
    padding-right: 24px !important;
}

@media (min-width: 992px) {
    .api-keys-page__button-col {
        justify-content: flex-start;
    }

    .api-keys-page__submit-btn {
        width: auto;
        min-width: 260px;
    }
}

@media (max-width: 767.98px) {
    .api-keys-page__header {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .api-keys-page__back-btn {
        width: 100%;
    }

    .api-keys-page__button-col {
        display: block;
    }

    .api-keys-page__submit-btn {
        width: 100%;
    }
}
