/* Landing page styles */
:root {
    --primary-color: #5B9BD5;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #fff;
    --dark-color: #383a3f;
    --header-height: 60px;
    /* Публичная шапка: те же акценты, что на маркетинговой главной */
    --public-header-cta-bg: #2dd4bf;
    --public-header-cta-text: #0f172a;
    --public-header-login-muted: #9ca3af;
    --public-header-login-hover: #22d3ee;
    --public-header-accent: #22d3ee;
}

/* Резервируем место под вертикальный скролл — иначе ширина вьюпорта и fixed-хедер «прыгают» между страницами */
html {
    scrollbar-gutter: stable;
}

/* Вспомогательный класс для SEO-заголовков, скрытых визуально, но доступных для скринридеров и ботов */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Убираем горизонтальную полосу прокрутки (слайдер 100svw и т.п.) */
html:has(.landing-container),
body:not(.is-cpanel) {
    overflow-x: hidden;
}

/* Скрываем блок promo на лендинг-страницах */
body:not(.is-cpanel) .promo {
    display: none !important;
}

/* Стили для позиций страницы */
.landing-container {
    margin-top: 0;
    padding-top: 0;
}

.page-position {
    margin-bottom: clamp(0.25rem, 1.5vw, 1rem);
}

.page-position-first {
    margin-top: 0 !important;
    padding-top: 0 !important;
    margin-bottom: clamp(0.25rem, 1.5vw, 1rem);
}

/* Базовое мобильное поведение для позиций без пресета */
@media (max-width: 576px) {
    .page-position:not(.page-position-padding-compact):not(.page-position-padding-normal):not(.page-position-padding-spacious) {
        padding-top: clamp(0.75rem, 2vh, 1.5rem) !important;
        padding-bottom: clamp(0.75rem, 2vh, 1.5rem) !important;
    }
}

/* Пресеты вертикальных отступов секции (PagePosition), вдохновлённые Gantry */
.page-position-padding-compact {
    padding-top: clamp(0.5rem, 1.5vh, 1rem) !important;
    padding-bottom: clamp(0.5rem, 1.5vh, 1rem) !important;
}

.page-position-padding-normal {
    padding-top: clamp(1.5rem, 4vh, 2.5rem) !important;
    padding-bottom: clamp(1.5rem, 4vh, 2.5rem) !important;
}

.page-position-padding-spacious {
    padding-top: clamp(3rem, 8vh, 5rem) !important;
    padding-bottom: clamp(3rem, 8vh, 5rem) !important;
}

/* Пресеты ширины контента внутри позиции (аналог size-классов Gantry 5) */
.page-position-width-full > .container {
    max-width: 1200px;
}

.page-position-width-wide > .container {
    max-width: min(1200px, 90vw);
}

.page-position-width-normal > .container {
    max-width: min(1100px, 75vw);
}

.page-position-width-narrow > .container {
    max-width: min(900px, 60vw);
}

.page-position-width-full > .container,
.page-position-width-wide > .container,
.page-position-width-normal > .container,
.page-position-width-narrow > .container {
    margin-left: auto;
    margin-right: auto;
}

/* Первая позиция со слайдером fullwidth/fullpage — вплотную под хедер */
.page-position-first:has(.slider-fullpage-wrapper) {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}
.page-position-first:has(.slider-fullpage-wrapper) .container,
.page-position-first:has(.slider-fullpage-wrapper) .row,
.page-position-first:has(.slider-fullpage-wrapper) [class^="col-"],
.page-position-first:has(.slider-fullpage-wrapper) .module-wrapper.module-slider {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
.page-position-first:has(.slider-fullpage-wrapper) .module-wrapper.module-slider {
    align-self: flex-start;
}

.page-position-first .container {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Контент-блоки: карточки как на макете (тёмная тема, иконка сверху, заголовок, описание) */
.module-content-block .content-block {
    height: 100%;
    min-height: 220px;
    min-width: 0; /* flex child shrink */
    overflow: hidden;
    background: #2d2f33;
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.module-content-block .content-block-media {
    margin-bottom: 1.25rem;
    flex-shrink: 0;
}

/* Видимость изображения контент-блока по устройствам (как в слайдере) */
@media (min-width: 1200px) {
    .content-block[data-image-hide-on-desktop="true"] .content-block-image-wrapper {
        display: none !important;
    }
}
@media (min-width: 768px) and (max-width: 1199px) {
    .content-block[data-image-hide-on-tablet="true"] .content-block-image-wrapper {
        display: none !important;
    }
}
@media (max-width: 767px) {
    .content-block[data-image-hide-on-mobile="true"] .content-block-image-wrapper {
        display: none !important;
    }
}
.module-content-block .content-block-img {
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 80px;
    object-fit: contain;
}

/* Ограничение контента пользовательского HTML в контент-блоке */
.module-content-block .content-block-custom-html {
    max-width: 100%;
    overflow: hidden;
}
.module-content-block .content-block-custom-html img,
.module-content-block .content-block-custom-html video {
    max-width: 100%;
    height: auto;
    display: block;
}
.module-content-block .content-block-custom-html iframe,
.module-content-block .content-block-custom-html embed,
.module-content-block .content-block-custom-html object {
    max-width: 100%;
}
.module-content-block .content-block-body {
    flex: 1;
    min-width: 0;
    width: 100%;
    overflow: hidden;
    text-align: center;
}
.module-content-block .content-block-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}
.module-content-block .content-block-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #9ca3af;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

/* В ряду с контент-блоками колонки делаем одинаковой высоты,
   чтобы нижние края карточек выравнивались по одной линии */
.page-position .row:has(.module-content-block) > [class*="col-"] {
    display: flex;
    min-width: 0; /* позволяет колонке сжиматься внутри сетки */
}
.module-content-block {
    width: 100%;
    min-width: 0;
    overflow: hidden;
}
.module-wrapper.module-content-block {
    min-width: 0;
}
/* Отступы между контент-блоками уменьшаются при сужении экрана */
.module-wrapper.module-content-block {
    margin-top: clamp(0.25rem, 1.5vw, 1rem);
    margin-bottom: clamp(0.25rem, 1.5vw, 1rem);
}

/* Макет 2: контент сверху, изображение снизу */
.content-block-layout-2 .content-block-media {
    margin-bottom: 0;
    margin-top: 1.25rem;
    order: 2;
}
.content-block-layout-2 .content-block-body {
    order: 1;
}

/* Горизонтальное выравнивание изображения в макетах 1 и 2 (изображение сверху/снизу) */
.content-block-layout-1.content-block-align-h-left .content-block-image-wrapper,
.content-block-layout-2.content-block-align-h-left .content-block-image-wrapper {
    margin-left: 0;
    margin-right: auto;
}

.content-block-layout-1.content-block-align-h-center .content-block-image-wrapper,
.content-block-layout-2.content-block-align-h-center .content-block-image-wrapper {
    margin-left: auto;
    margin-right: auto;
}

.content-block-layout-1.content-block-align-h-right .content-block-image-wrapper,
.content-block-layout-2.content-block-align-h-right .content-block-image-wrapper {
    margin-left: auto;
    margin-right: 0;
}

/* Макеты 3 и 4: изображение и контент в ряд */
.content-block-layout-3 .content-block-row,
.content-block-layout-4 .content-block-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    text-align: left;
}
.content-block-layout-3 .content-block-media,
.content-block-layout-4 .content-block-media {
    margin-bottom: 0;
    flex-shrink: 0;
}
.content-block-layout-3 .content-block-img,
.content-block-layout-4 .content-block-img {
    max-height: 64px;
}
.content-block-layout-3 .content-block-body,
.content-block-layout-4 .content-block-body {
    text-align: left;
    flex: 1;
}
.content-block-layout-4 .content-block-row {
    flex-direction: row-reverse;
}

/* Вертикальное выравнивание изображения в макетах 3 и 4 (изображение слева/справа) */
.content-block-layout-3.content-block-align-v-top .content-block-image-wrapper,
.content-block-layout-4.content-block-align-v-top .content-block-image-wrapper {
    align-self: flex-start;
}

.content-block-layout-3.content-block-align-v-center .content-block-image-wrapper,
.content-block-layout-4.content-block-align-v-center .content-block-image-wrapper {
    align-self: center;
}

.content-block-layout-3.content-block-align-v-bottom .content-block-image-wrapper,
.content-block-layout-4.content-block-align-v-bottom .content-block-image-wrapper {
    align-self: flex-end;
}

/* FAQ block styles (аккордеон) */
.landing-faq-block {
    max-width: 760px;
    margin: 0 auto;
}

.landing-faq-block .faq-title {
    color: #f9fafb;
    font-size: 2rem;
    font-weight: 600;
}

.landing-faq-block .faq-description {
    color: #9ca3af;
    font-size: 0.98rem;
}

.landing-faq-block .faq-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.landing-faq-block .faq-item {
    width: 100%;
}

.landing-faq-block .faq-question {
    width: 100%;
    padding: 12px 18px;
    border-radius: 999px;
    border: none;
    background: #4b5563;
    color: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 0.98rem;
    transition: background 0.15s ease, transform 0.1s ease;
}

.landing-faq-block .faq-question:hover {
    background: #6b7280;
    transform: translateY(-1px);
}

.landing-faq-block .faq-question-text {
    margin-right: 0.75rem;
}

.landing-faq-block .faq-chevron {
    font-size: 0.9rem;
    opacity: 0.8;
    transition: transform 0.15s ease;
}

.landing-faq-block .faq-item.open .faq-chevron {
    transform: rotate(180deg);
}

.landing-faq-block .faq-answer {
    margin-top: 8px;
    padding: 12px 18px;
    border-radius: 16px;
    background: #374151;
    color: #e5e7eb;
    font-size: 0.95rem;
    display: none;
}

.landing-faq-block .faq-item.open .faq-answer {
    display: block;
}

/* Адаптация блока "Индивидуализация" (cb-inner-block) для телефонов и узких планшетов */
@media (max-width: 992px) {
    .cb-inner-block {
        flex-direction: column !important;
        padding: 16px 12px !important;
        gap: 20px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 auto !important;
    }

    .cb-inner-left,
    .cb-inner-right {
        flex: 1 0 auto !important;
        width: 100% !important;
    }

    .cb-inner-right {
        justify-content: flex-start !important;
    }

    .cb-inner-right > div {
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* Дополнительная адаптация "Индивидуализации" для очень узких экранов (≤ 390px) */
@media (max-width: 390px) {
    .cb-inner-block {
        padding: 12px 8px !important;
        gap: 14px !important;
    }

    .cb-inner-left {
        font-size: 13px !important;
        line-height: 1.5 !important;
    }

    .cb-inner-left h2 {
        font-size: 20px !important;
        line-height: 1.25 !important;
    }

    .cb-inner-right > div {
        padding: 14px 10px !important;
        font-size: 13px !important;
        line-height: 1.4 !important;
        overflow-wrap: break-word;
        word-break: break-word;
    }
}

@media (max-width: 768px) {
    .content-block-layout-3 .content-block-row,
    .content-block-layout-4 .content-block-row {
        flex-direction: column;
        text-align: center;
    }
    .content-block-layout-3 .content-block-body,
    .content-block-layout-4 .content-block-body {
        text-align: center;
    }
}

/* Мобильная адаптация контент-блоков: на маленьких экранах карточки должны идти столбцом */
@media (max-width: 576px) {
    .page-position .row:has(.module-content-block) {
        display: block !important;
        margin-left: 0;
        margin-right: 0;
    }
    .page-position .row:has(.module-content-block) > [class*="col-"] {
        max-width: 100% !important;
        flex: 0 0 100% !important;
        padding-left: 0;
        padding-right: 0;
        margin-bottom: 0.25rem;
    }
    .module-wrapper.module-content-block {
        margin-top: 0.25rem;
        margin-bottom: 0.25rem;
    }
    .module-content-block .content-block {
        padding: 0.7rem 0.6rem;
        border-radius: 10px;
        width: 100%;
    }
    .module-content-block .content-block-title {
        font-size: 1.1rem !important;
        font-weight: 600 !important;
        margin-bottom: 0.5rem;
        line-height: 1.35;
    }
    .module-content-block .content-block-text {
        font-size: 1rem !important;
        line-height: 1.55;
    }
}

/* Адаптация контент-блоков для планшетов / узких экранов */
@media (max-width: 768px) and (min-width: 577px) {
    .module-content-block .content-block {
        padding: 1.25rem 1rem;
        border-radius: 12px;
    }
    .module-content-block .content-block-title {
        font-size: 1.35rem;
    }
    .module-content-block .content-block-text {
        font-size: 0.98rem;
        line-height: 1.6;
    }
}

/* Переопределяем стили базового шаблона для главной страницы */
body:not(.is-cpanel) section.content {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

body:not(.is-cpanel) .content-container {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: white;
}

/* Layout container */
.layout-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Убираем просветы в футере для лендинг-страниц */
body:not(.is-cpanel) .footer {
    height: auto;
    min-height: auto;
    margin: 0;
    padding: 0;
}

/* Header styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    /* background-color задается через настройки цветовой схемы в base.html */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
    width: 100%;
}

.header-container {
    height: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    column-gap: 0.75rem;
    padding: 0 1rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.header-left {
    display: flex;
    align-items: center;
    justify-self: start;
    min-width: 0;
}

.header-center {
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
    position: relative;
    min-width: 0;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    justify-self: end;
    gap: 1rem;
    min-width: 0;
}

/* Logo styles */
.logo {
    display: flex;
    align-items: center;
}

.header-logo {
    height: 45px;
    width: auto;
    transition: transform 0.3s ease;
}

.header-logo:hover {
    transform: scale(1.05);
}

/* Navigation styles */
.main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.nav-list li {
    position: relative;
}

.nav-list a {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 400;
    font-size: 1.1rem;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
    position: relative;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-list a:hover {
    color: var(--primary-color);
}

.nav-list a:hover::after {
    width: 100%;
}

.nav-list a.active {
    color: var(--primary-color);
}

.nav-list a.active::after {
    width: 100%;
}

/* Inline nav: step down spacing before tablet drawer (RU labels + guest CTAs) */
@media (max-width: 1380px) {
    .header-container {
        column-gap: 0.5rem;
    }

    .nav-list {
        gap: 1.45rem;
    }
}

@media (max-width: 1280px) {
    .nav-list {
        gap: 1.1rem;
    }

    .nav-list a {
        font-size: 1.05rem;
        padding: 0.45rem 0;
    }
}

@media (max-width: 1180px) {
    .nav-list {
        gap: 0.75rem;
    }

    .nav-list a {
        font-size: 0.98rem;
        padding: 0.35rem 0;
    }

    .header-logo {
        height: 40px;
    }
}

@media (max-width: 1120px) {
    .nav-list {
        gap: 0.55rem;
    }

    .nav-list a {
        font-size: 0.92rem;
    }
}

/* Header right content */
.header-right-content {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem;
    row-gap: 0.5rem;
}

.auth-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
}

/* Блок гостя: фиксированная ширина только в строке шапки (десктоп) */
.header-auth-guest {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.header-auth-guest--header-bar {
    min-width: 0;
    flex: 0 1 auto;
    max-width: 100%;
}

.header-auth-guest .btn {
    white-space: nowrap;
}

/* Мобильное меню (гамбургер + выезжающая панель) */
.header-mobile-menu-btn {
    display: none;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--dark-color);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.header-mobile-menu-btn:hover {
    background-color: rgba(0, 0, 0, 0.06);
    color: var(--primary-color);
}

.header-mobile-menu-btn:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}

.header-mobile-menu-btn:focus-visible {
    background-color: rgba(0, 0, 0, 0.06);
    color: var(--primary-color);
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.header-mobile-menu-bars {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 1px;
    background: currentColor;
    box-shadow: 0 7px 0 currentColor, 0 -7px 0 currentColor;
}

.header-mobile-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1040;
    margin: 0;
    padding: 0;
    border: none;
    background: rgba(15, 23, 42, 0.42);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.header-mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    width: min(20.5rem, 92vw);
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: 0;
    border: none;
    background: #ffffff;
    color: var(--dark-color);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
    transform: translateX(100%);
    transition: transform 0.22s ease;
}

.header-mobile-drawer-head {
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: var(--header-height);
    padding: 0 0.35rem 0 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.header-mobile-drawer-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.header-mobile-drawer-close:hover {
    background-color: rgba(0, 0, 0, 0.06);
}

.header-mobile-drawer-close:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}

.header-mobile-drawer-close:focus-visible {
    background-color: rgba(0, 0, 0, 0.06);
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.header-mobile-drawer-close-icon {
    position: relative;
    display: block;
    width: 18px;
    height: 18px;
}

.header-mobile-drawer-close-icon::before,
.header-mobile-drawer-close-icon::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 100%;
    height: 2px;
    border-radius: 1px;
    background: currentColor;
}

.header-mobile-drawer-close-icon::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.header-mobile-drawer-close-icon::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.header-mobile-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 1.25rem 1.5rem;
    -webkit-overflow-scrolling: touch;
}

body.header-mobile-drawer-open {
    overflow: hidden;
}

body.header-mobile-drawer-open .header-mobile-backdrop {
    opacity: 1;
    visibility: visible;
}

body.header-mobile-drawer-open .header-mobile-drawer {
    transform: translateX(0);
}

.main-nav--drawer {
    display: block;
    width: 100%;
}

.nav-list--drawer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-list--drawer li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.nav-list--drawer a {
    display: block;
    padding: 0.85rem 0;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--dark-color);
    text-decoration: none;
}

.nav-list--drawer a:hover,
.nav-list--drawer a:focus-visible {
    color: var(--primary-color);
}

.main-nav--drawer .nav-list--drawer a::after {
    display: none;
}

.header-auth-guest--mobile-drawer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.header-auth-guest--mobile-drawer .btn {
    width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
}

@media (prefers-reduced-motion: reduce) {
    .header-mobile-backdrop,
    .header-mobile-drawer {
        transition: none;
    }
}

/*
 * Синхрон с data-header-drawer-max на body (landing_header_drawer.js):
 * гость 1280px, авторизованный 1100px.
 */
@media (min-width: 1101px) {
    body:not(.layout--header-guest).header-mobile-drawer-open {
        overflow: visible;
    }

    body:not(.layout--header-guest) .header-mobile-backdrop,
    body:not(.layout--header-guest) .header-mobile-drawer {
        display: none !important;
    }
}

@media (min-width: 1281px) {
    body.layout--header-guest.header-mobile-drawer-open {
        overflow: visible;
    }

    body.layout--header-guest .header-mobile-backdrop,
    body.layout--header-guest .header-mobile-drawer {
        display: none !important;
    }
}

/* Blog search in header */
.blog-header-search {
    position: relative;
    display: flex;
    align-items: center;
}

.blog-search-toggle {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    color: var(--dark-color);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    margin: 0;
    padding: 0;
}

.blog-search-toggle:hover {
    background: #f0f0f0;
    color: var(--primary-color);
}

.blog-search-expandable {
    position: absolute;
    top: 50px;
    right: 0;
    width: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.blog-search-expandable.active {
    width: 350px;
    opacity: 1;
    visibility: visible;
}

.blog-search-form {
    display: flex;
    background: white;
    border-radius: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    overflow: hidden;
    border: 2px solid var(--primary-color);
}

.blog-search-form input {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 20px;
    font-size: 0.95rem;
    color: var(--dark-color);
}

.blog-search-form input::placeholder {
    color: #999;
}

.blog-search-submit {
    background: var(--primary-color);
    border: none;
    padding: 10px 20px;
    color: white;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-search-submit:hover {
    background: #4a8bc4;
}

/* Inline search form in header center */
.blog-search-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
}

.blog-search-form-inline {
    display: flex;
    width: 100%;
    max-width: 600px;
    background: white;
    border-radius: 25px;
    box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 0.2);
    overflow: hidden;
    border: 1px solid var(--primary-color);
}

.blog-search-form-inline input {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 20px;
    font-size: 0.95rem;
    color: var(--dark-color);
}

.blog-search-form-inline input::placeholder {
    color: #999;
}

.blog-search-submit-inline {
    background: var(--primary-color);
    border: none;
    padding: 10px 20px;
    color: white;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-search-submit-inline:hover {
    background: #4a8bc4;
}

/* Search results dropdown */
.blog-search-results {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    margin-top: 8px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.blog-search-results.has-results {
    display: block;
}

.blog-search-results-list {
    padding: 0;
    margin: 0;
}

.blog-search-result-item {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--dark-color);
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

.blog-search-result-item:last-child {
    border-bottom: none;
}

.blog-search-result-item:hover {
    background: #f8f9fa;
    text-decoration: none;
    color: var(--dark-color);
}

.blog-search-result-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
    color: var(--primary-color);
}

.blog-search-result-excerpt {
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin-bottom: 4px;
    line-height: 1.4;
}

.blog-search-result-date {
    font-size: 0.75rem;
    color: #999;
}

.blog-search-no-results {
    padding: 20px;
    text-align: center;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Language switcher (header) */
.language-switcher-form {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.language-switcher-select {
    min-width: 7.5rem;
    padding: 0.35rem 2rem 0.35rem 0.5rem;
    font-size: 0.875rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    background-color: var(--html-bg-color, #fff);
    color: var(--text-color, #212529);
    cursor: pointer;
}

.language-switcher-label.visually-hidden,
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Auth buttons — базовые стили кнопок (контейнер .auth-buttons выше у header-right-content) */
.auth-buttons .btn {
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    margin-bottom: 0;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary-color);
    border-width: 1px !important;
    border-color: #5b9bd5 !important;
}

.btn-outline-primary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    -webkit-box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 0.2);
    -moz-box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 0.2);
    box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 0.2);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color) !important;
}

/* Гостевые кнопки шапки: как на главной (pill CTA + «Войти» без рамки) */
body:not(.is-cpanel) .header-auth-guest .header-auth-signup.btn-primary {
    background-color: var(--public-header-cta-bg) !important;
    border: none !important;
    color: var(--public-header-cta-text) !important;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.45rem 1.1rem !important;
    box-shadow: none;
}

body:not(.is-cpanel) .header-auth-guest .header-auth-signup.btn-primary:hover {
    background-color: var(--public-header-cta-bg) !important;
    filter: brightness(1.05);
    color: var(--public-header-cta-text) !important;
    border: none !important;
}

body:not(.is-cpanel) .header-auth-guest .header-auth-login.btn-outline-primary {
    display: inline-flex !important;
    align-items: center;
    min-height: 38px;
    padding: 0.35rem 0.65rem !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--public-header-login-muted) !important;
    text-decoration: none;
    border-radius: 0.25rem;
}

body:not(.is-cpanel) .header-auth-guest .header-auth-login.btn-outline-primary:hover {
    background: transparent !important;
    color: var(--public-header-login-hover) !important;
    border: none !important;
    box-shadow: none !important;
    opacity: 1 !important;
}

/* Hero section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    color: white;
    padding: 4rem 0;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Features section */
.features {
    padding: 4rem 0;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Courses section */
.courses {
    padding: 4rem 0;
    background-color: var(--light-color);
}

.course-card {
    border: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.course-card:hover {
    transform: translateY(-5px);
}

.course-card img {
    height: 200px;
    object-fit: cover;
}

/* Testimonials section */
.testimonials {
    padding: 4rem 0;
}

.testimonial-card {
    text-align: center;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.testimonial-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 1rem;
}

/* Main content */
.main-content {
    flex: 1;
    margin-top: var(--header-height);
    padding: 0;
}

.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

/* Для главной страницы убираем отступы сверху у контента */
body:not(.is-cpanel) .content-container {
    padding-top: 0;
}

/* Footer styles */
.footer-main {
    width: 100%;
    margin: 0;
    padding: 2rem 0;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
    /* background-color задается через настройки цветовой схемы в base.html */
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    width: 100%;
}

.footer-column {
    padding: 0 1rem;
}

.footer-column > h3,
.footer-accordion__summary {
    color: var(--dark-color);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer-accordion {
    margin: 0;
}

.footer-accordion__summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.footer-accordion__summary::-webkit-details-marker {
    display: none;
}

.footer-accordion__title {
    font-size: inherit;
    font-weight: inherit;
}

@media (min-width: 992px) {
    .footer-accordion__summary {
        display: block;
        cursor: default;
        pointer-events: none;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 991.98px) {
    .footer-accordion__summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        margin: 0;
        padding: 0.85rem 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        font-size: 1.05rem;
    }

    .footer-accordion__summary::after {
        content: "";
        flex-shrink: 0;
        width: 0.5rem;
        height: 0.5rem;
        margin-top: -0.2rem;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: rotate(45deg);
        opacity: 0.65;
        transition: transform 0.2s ease;
    }

    .footer-accordion[open] > .footer-accordion__summary::after {
        transform: rotate(-135deg);
        margin-top: 0.15rem;
    }

    .footer-accordion__panel {
        padding: 0.35rem 0 1.1rem;
    }

    .footer-column--accordion .footer-nav li:first-child {
        margin-top: 0.15rem;
    }

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

@media (prefers-reduced-motion: reduce) {
    .footer-accordion__summary::after {
        transition: none;
    }
}

.footer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav li {
    margin-bottom: 0.8rem;
}

.footer-nav a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.footer-nav a:hover {
    color: var(--primary-color);
}

.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 240px;
    align-items: stretch;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--light-color);
    color: var(--dark-color);
    border: none;
    padding: 0.8rem 1.2rem;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    width: 100%;
    min-width: 0;
    min-height: 52px;
    box-sizing: border-box;
    -webkit-box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 0.2);
    -moz-box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 0.2);
    box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 0.2);
}

.btn-social:hover {
    background-color: var(--secondary-color);
    color: white;
}

.btn-social i {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.footer-preferences {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    width: 100%;
    max-width: 240px;
    margin-top: 1.15rem;
}

.footer-preferences__form {
    width: 100%;
}

.footer-preferences__select-wrap {
    position: relative;
}

.footer-preferences__icon {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.78);
    pointer-events: none;
    z-index: 1;
}

.footer-preferences__icon svg {
    width: 1rem;
    height: 1rem;
    stroke-width: 2;
}

.footer-preferences__trigger {
    width: 100%;
    min-height: 52px;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.86);
    color: #f8fafc;
    padding: 0.82rem 2.5rem 0.82rem 2.8rem;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.3;
    text-align: left;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    cursor: pointer;
}

.footer-preferences__trigger:hover,
.footer-preferences__select-wrap.is-open .footer-preferences__trigger {
    background: rgba(15, 23, 42, 0.96);
}

.footer-preferences__trigger:focus {
    outline: none;
    border-color: rgba(94, 234, 212, 0.55);
    background: rgba(15, 23, 42, 0.96);
    box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.12);
}

.footer-preferences__caret {
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}

.footer-preferences__select-wrap.is-open .footer-preferences__caret {
    transform: translateY(-50%) rotate(180deg);
}

.footer-preferences__menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.45rem);
    z-index: 30;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 16px 32px rgba(2, 8, 23, 0.32);
}

/* Валюта — последний контрол в футере; меню открываем вверх, чтобы не уезжало за viewport */
.footer-preferences__select-wrap--drop-up .footer-preferences__menu {
    top: auto;
    bottom: calc(100% + 0.45rem);
    box-shadow: 0 -12px 28px rgba(2, 8, 23, 0.36);
}

.footer-preferences__option {
    display: block;
    width: 100%;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: rgba(248, 250, 252, 0.92);
    text-align: left;
    padding: 0.72rem 0.85rem;
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.footer-preferences__option:hover,
.footer-preferences__option:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.footer-preferences__option.is-selected {
    background: rgba(94, 234, 212, 0.12);
    color: #99f6e4;
}

.sidebar {
    display: none;
}

/* Переопределяем стили футера для лендинг-страниц */
body:not(.is-cpanel) .footer {
    height: auto;
    min-height: auto;
    margin: 0;
    padding: 0;
}

/* Responsive footer: планшет/мобила — одна колонка, аккордеон + соцкнопки в ряд */
@media (max-width: 991.98px) {
    .footer-main {
        padding: 1.35rem 0 1.75rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        padding: 0 1rem;
        gap: 0;
    }

    .footer-column {
        text-align: left;
        padding: 0;
    }

    .footer-column--social {
        padding-top: 0.85rem;
    }

    .footer-column--social .social-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: stretch;
        width: 100%;
        max-width: 100%;
        gap: 0.65rem;
    }

    .footer-column--social .btn-social {
        flex: 1 1 calc(50% - 0.35rem);
        min-width: 0;
        max-width: none;
        width: auto;
    }

    .footer-column--social .footer-preferences {
        max-width: 100%;
        margin-top: 0.85rem;
    }

    .footer-column--social .footer-preferences__menu {
        position: static;
        margin-top: 0.45rem;
    }
}

@media (max-width: 576px) {
    .footer {
        padding: 2rem 0;
    }
}

/* Responsive adjustments */
/*
 * Шапка: гамбургер + drawer. Гостю нужна более широкая зона (Войти + CTA), см. body.layout--header-guest.
 * Не трогать .nav-list--drawer в моб. панели (#mainNav — только центральная колонка).
 */
@media (max-width: 1280px) {
    body.layout--header-guest #mainNav > .nav-list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    body.layout--header-guest #mainNav > .nav-list.active {
        display: flex;
    }

    body.layout--header-guest .auth-buttons {
        gap: 0.5rem;
    }

    body.layout--header-guest .header-auth-guest--header-bar {
        display: none;
    }

    body.layout--header-guest .header-mobile-menu-btn {
        display: inline-flex;
    }

    body.layout--header-guest .auth-buttons .btn {
        padding: 0.4rem 0.65rem;
        font-size: 0.82rem;
    }

    body.layout--header-guest .header-container {
        padding: 0 0.5rem;
    }

    body.layout--header-guest .blog-search-expandable.active {
        width: 280px;
    }

    body.layout--header-guest .header-right {
        gap: 0.5rem;
    }
}

@media (max-width: 1100px) {
    #mainNav > .nav-list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    #mainNav > .nav-list.active {
        display: flex;
    }

    .auth-buttons {
        gap: 0.5rem;
    }

    .header-auth-guest--header-bar {
        display: none;
    }

    .header-mobile-menu-btn {
        display: inline-flex;
    }

    .auth-buttons .btn {
        padding: 0.4rem 0.65rem;
        font-size: 0.82rem;
    }

    .header-container {
        padding: 0 0.5rem;
    }

    .blog-search-expandable.active {
        width: 280px;
    }

    .header-right {
        gap: 0.5rem;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .feature-card {
        margin-bottom: 1rem;
    }
}

.footer-copyright {
    width: 100%;
    text-align: start;
    padding: 1.5rem 2rem;
    margin: 0;
    border-top: 1px solid rgba(0,0,0,0.1);
    /* background-color задается через настройки цветовой схемы в base.html */
}

.footer-copyright p {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin: 0;
    max-width: 1200px;
    margin: 0 auto;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .header-container,
    .content-container,
    .footer-container,
    .footer-copyright p {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Auth pages styles — высота по контенту, без растягивания на весь экран */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 0;
    padding: 1.5rem 1rem 2rem;
    background: var(--html-bg-color);
}

.auth-card {
    background: var(--functional-block-bg-color);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    padding: 2.5rem;
    width: 100%;
    max-width: 450px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

/* Вход / регистрация: карточка по центру по горизонтали */
.auth-container--compact {
    align-items: center;
    padding: 1.5rem 1rem 2rem;
    box-sizing: border-box;
}

.auth-container--compact.auth-container--page-centered {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    background: var(--html-bg-color);
}

/* Вертикальное центрирование карточки: flex на контейнере контента, не min-height на auth */
body:not(.is-cpanel) .content-container:has(.auth-container--page-centered) {
    min-height: calc(100dvh - var(--header-height));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    padding-top: 1.25rem;
    padding-bottom: 2.5rem;
}

/* 6-значный OTP (код из письма) */
.auth-otp {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: stretch;
    gap: 0.4rem;
    width: 100%;
    margin: 0 0 0.5rem;
}

.auth-otp__cell {
    flex: 1 1 0;
    min-width: 0;
    max-width: 2.75rem;
    height: 2.65rem;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.35rem 0.25rem !important;
    border-radius: 12px !important;
    color: #adb5bd !important;
    border: 2px solid rgba(0, 0, 0, 0.08) !important;
    -webkit-text-fill-color: #adb5bd;
}

.auth-otp__cell:focus {
    outline: none;
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 0 3px rgba(91, 155, 213, 0.2);
    color: #adb5bd !important;
}

.auth-otp.is-invalid .auth-otp__cell,
.auth-otp__cell.is-invalid {
    border-color: #dc3545 !important;
}

.auth-page--modal-look .js-otp-code-input.visually-hidden,
.auth-container .js-otp-code-input.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
}

/* Плоская auth-страница: те же размеры/радиусы/типографика, что в #auth-modal */
.auth-page--modal-look .auth-card--compact {
    max-width: 20.5rem;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 1rem 1rem 1.05rem;
    box-sizing: border-box;
}

.auth-form__lead--justify {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.auth-page--modal-look .auth-form__lead {
    color: var(--secondary-color);
    font-size: 0.8125rem;
    line-height: 1.45;
}

.auth-page--modal-look h1.auth-modal__title,
.auth-page--modal-look .auth-modal__title {
    color: var(--secondary-color);
}

.auth-page--modal-look .form-control:not(.auth-otp__cell),
.auth-page--modal-look .auth-body input[type="email"],
.auth-page--modal-look .auth-body input[type="password"],
.auth-page--modal-look .auth-body input[type="text"] {
    border-radius: 999px;
    color: #adb5bd;
}

.auth-page--modal-look .form-control:not(.auth-otp__cell)::placeholder,
.auth-page--modal-look .auth-body input[type="email"]::placeholder,
.auth-page--modal-look .auth-body input[type="password"]::placeholder,
.auth-page--modal-look .auth-body input[type="text"]::placeholder {
    color: #adb5bd;
    opacity: 1;
}

.auth-page--modal-look .form-control:not(.auth-otp__cell):focus,
.auth-page--modal-look .auth-body input[type="email"]:focus,
.auth-page--modal-look .auth-body input[type="password"]:focus,
.auth-page--modal-look .auth-body input[type="text"]:focus {
    color: #adb5bd;
}

/* Автозаполнение: Chrome накладывает жёлтый фон — перекрываем фон и цвет как у обычного поля */
.auth-page--modal-look .form-control:not(.auth-otp__cell):-webkit-autofill,
.auth-page--modal-look .form-control:not(.auth-otp__cell):-webkit-autofill:hover,
.auth-page--modal-look .form-control:not(.auth-otp__cell):-webkit-autofill:focus,
.auth-page--modal-look .form-control:not(.auth-otp__cell):-webkit-autofill:active,
.auth-page--modal-look .auth-body input:-webkit-autofill,
.auth-page--modal-look .auth-body input:-webkit-autofill:hover,
.auth-page--modal-look .auth-body input:-webkit-autofill:focus,
.auth-page--modal-look .auth-body input:-webkit-autofill:active {
    -webkit-text-fill-color: #adb5bd;
    color: #adb5bd;
    caret-color: var(--dark-color, #383a3f);
    -webkit-box-shadow: 0 0 0 1000px var(--html-bg-color) inset;
    box-shadow: 0 0 0 1000px var(--html-bg-color) inset;
    transition: background-color 5000s ease-in-out 0s;
}

.auth-page--modal-look .btn-login {
    text-transform: none;
    letter-spacing: 0.02em;
    font-size: 0.98rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.85rem 1rem;
    box-shadow: 0 2px 8px rgba(91, 155, 213, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-page--modal-look .btn-login:hover {
    box-shadow: 0 6px 20px rgba(91, 155, 213, 0.35);
    color: white;
    background: #4a8bc4;
    transform: none;
}

.auth-page--modal-look .btn-outline-primary.btn-sm,
.auth-page--modal-look .auth-links .btn.btn-outline-primary {
    border-radius: 999px;
    padding: 0.28rem 0.65rem;
    font-size: 0.8rem;
}

.auth-card--compact {
    padding: 1.35rem 1.5rem;
}

.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(1.25rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right))
        max(1.25rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.auth-modal[hidden] {
    display: none !important;
}

.auth-modal__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 20, 0.72);
    backdrop-filter: blur(8px);
}

.auth-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 20.5rem);
    max-height: min(90vh, calc(100dvh - 2.5rem));
    overflow-y: auto;
    margin: auto 0;
    box-sizing: border-box;
}

.auth-modal__dialog.auth-card {
    margin-left: 0;
    margin-right: 0;
}

.auth-modal__dialog.auth-card.auth-card--compact {
    padding: 1rem 1rem 1.05rem;
    max-width: 20.5rem;
}

.auth-modal__close {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    z-index: 2;
    width: 1.5rem;
    height: 1.5rem;
    border: none;
    background: transparent;
    color: rgba(56, 58, 63, 0.78);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.2s ease;
}

.auth-modal__close:hover,
.auth-modal__close:focus-visible {
    color: rgba(56, 58, 63, 0.98);
    outline: none;
}

.auth-modal__title {
    margin: 0 2.35rem 0.75rem 0;
    font-size: 1.05rem;
    font-weight: 700;
    text-align: center;
    color: var(--dark-color, #383a3f);
    line-height: 1.25;
}

.auth-modal .auth-modal__panel-inner .form-group,
.auth-page--modal-look .auth-modal__panel-inner .form-group {
    margin-bottom: 0.65rem;
}

.auth-modal .auth-buttons,
.auth-page--modal-look .auth-buttons {
    margin-top: 0.35rem;
    margin-bottom: 0.35rem;
}

.auth-modal .auth-modal__oauth,
.auth-page--modal-look .auth-modal__oauth {
    margin-top: 0.65rem;
    padding-top: 0.55rem;
}

.auth-modal .auth-modal__oauth-hint,
.auth-page--modal-look .auth-modal__oauth-hint {
    margin: 0 0 0.4rem;
    font-size: 0.72rem;
    font-weight: 500;
    text-align: center;
    color: var(--secondary-color, #6c757d);
}

.auth-modal .auth-modal__oauth-buttons,
.auth-page--modal-look .auth-modal__oauth-buttons {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 0.45rem;
}

/* global rule выше — width: 100% на form; в модалке сжимаем к реальной кнопке */
.auth-modal .auth-modal__oauth-buttons form.auth-oauth-provider,
.auth-page--modal-look .auth-modal__oauth-buttons form.auth-oauth-provider {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Как футерные .btn-social: --accent-color-2 из core/base; --bs-btn-* под Bootstrap .btn */
.auth-modal .btn-oauth.auth-modal__oauth-btn,
.auth-page--modal-look .btn-oauth.auth-modal__oauth-btn {
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
    min-height: 0;
    box-sizing: border-box;
    padding: 0;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--accent-color-2, #007bff);
    --bs-btn-border-color: rgba(255, 255, 255, 0.22);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--accent-color-2, #007bff);
    --bs-btn-hover-border-color: rgba(255, 255, 255, 0.3);
    background-color: var(--accent-color-2, #007bff);
    color: #fff;
    background-image: none;
    border: 1px solid rgba(255, 255, 255, 0.22);
    -webkit-box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 0.2);
    -moz-box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 0.2);
    box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 0.2);
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

/* Как body:not(.is-cpanel) .btn-social:hover в base */
.auth-modal .btn-oauth.auth-modal__oauth-btn:hover,
.auth-page--modal-look .btn-oauth.auth-modal__oauth-btn:hover {
    background-color: var(--accent-color-2, #007bff);
    color: #fff;
    --bs-btn-bg: var(--accent-color-2, #007bff);
    background-image: none;
    opacity: 0.9;
    -webkit-box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 0.25);
    -moz-box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 0.25);
    box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 0.25);
    transform: none;
    border-color: rgba(255, 255, 255, 0.3);
}

/* GitHub: иконка currentColor — белая на accent; Google — свои fill в SVG */
.auth-modal .btn-oauth.btn-oauth-github.auth-modal__oauth-btn,
.auth-page--modal-look .btn-oauth.btn-oauth-github.auth-modal__oauth-btn {
    color: #fff;
}

.auth-modal .btn-oauth.btn-oauth-github.auth-modal__oauth-btn:hover,
.auth-page--modal-look .btn-oauth.btn-oauth-github.auth-modal__oauth-btn:hover {
    color: #fff;
}

.auth-modal .btn-oauth.auth-modal__oauth-btn .btn-oauth-icon,
.auth-page--modal-look .btn-oauth.auth-modal__oauth-btn .btn-oauth-icon {
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-modal .btn-oauth.auth-modal__oauth-btn .btn-oauth-icon svg,
.auth-page--modal-look .btn-oauth.auth-modal__oauth-btn .btn-oauth-icon svg {
    display: block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    overflow: visible;
}

.auth-modal .auth-modal__links,
.auth-page--modal-look .auth-modal__links {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 0.5rem;
    margin-top: 0.75rem;
    text-align: center;
}

.auth-modal .auth-modal__links-muted,
.auth-page--modal-look .auth-modal__links-muted {
    font-size: 0.8rem;
    color: var(--secondary-color, #6c757d);
    white-space: nowrap;
}

.auth-modal .auth-modal__link,
.auth-modal .forgot-password,
.auth-page--modal-look .auth-modal__link,
.auth-page--modal-look .forgot-password {
    font-size: 0.8rem;
    white-space: nowrap;
}

.auth-modal .auth-modal__link-action,
.auth-page--modal-look .auth-modal__link-action {
    padding: 0.28rem 0.65rem;
    font-size: 0.8rem;
    border-radius: 999px;
}

.auth-modal__messaging {
    margin-bottom: 0.75rem;
}

.auth-modal__inline-errors {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.4;
    padding: 0.5rem 0.65rem;
    border-radius: 10px;
}

/* Ширина как у .form-control; ниже кнопки закрытия — за счёт padding-top у panel-inner */
.auth-modal .auth-modal__messaging .auth-modal__inline-errors,
.auth-page--modal-look .auth-modal__messaging .auth-modal__inline-errors {
    display: block;
    margin-top: 0.75rem;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

/* Поля и основной CTA в модалке — тот же «пилюльный» радиус, что у link-action */
.auth-modal .form-control,
.auth-modal .auth-body input[type="email"],
.auth-modal .auth-body input[type="password"],
.auth-modal .auth-body input[type="text"] {
    border-radius: 999px;
    /* Как .form-control::placeholder — введённый текст не тёмнее плейсхолдера */
    color: #adb5bd;
}

.auth-modal .form-control::placeholder,
.auth-modal .auth-body input[type="email"]::placeholder,
.auth-modal .auth-body input[type="password"]::placeholder,
.auth-modal .auth-body input[type="text"]::placeholder {
    color: #adb5bd;
    opacity: 1;
}

.auth-modal .form-control:focus,
.auth-modal .auth-body input[type="email"]:focus,
.auth-modal .auth-body input[type="password"]:focus,
.auth-modal .auth-body input[type="text"]:focus {
    color: #adb5bd;
}

.auth-modal .form-control:-webkit-autofill,
.auth-modal .form-control:-webkit-autofill:hover,
.auth-modal .form-control:-webkit-autofill:focus,
.auth-modal .form-control:-webkit-autofill:active,
.auth-modal .auth-body input:-webkit-autofill,
.auth-modal .auth-body input:-webkit-autofill:hover,
.auth-modal .auth-body input:-webkit-autofill:focus,
.auth-modal .auth-body input:-webkit-autofill:active {
    -webkit-text-fill-color: #adb5bd;
    color: #adb5bd;
    caret-color: var(--dark-color, #383a3f);
    -webkit-box-shadow: 0 0 0 1000px var(--html-bg-color) inset;
    box-shadow: 0 0 0 1000px var(--html-bg-color) inset;
    transition: background-color 5000s ease-in-out 0s;
}

.auth-modal .auth-modal__panel-inner.auth-body {
    /* Запас под absolutely-positioned .auth-modal__close (не пересекать ×) */
    padding-top: 1.5rem;
}

.auth-container--compact .auth-oauth {
    margin-top: 1.15rem;
    padding-top: 1rem;
}

.auth-container--compact .auth-oauth-label {
    margin-bottom: 0.65rem;
}

/* Смена email: блок свёрнут по умолчанию, раскрытие по клику на «Неверный адрес?» */
.auth-oauth--change-email > summary.auth-oauth-label--disclosure {
    list-style: none;
    cursor: pointer;
    user-select: none;
    margin-bottom: 0;
    padding: 0.2rem 0 0.35rem;
    transition: color 0.15s ease;
}
.auth-oauth--change-email > summary.auth-oauth-label--disclosure:hover {
    color: var(--primary-color, #0d6efd);
}
.auth-oauth--change-email > summary.auth-oauth-label--disclosure::-webkit-details-marker {
    display: none;
}
.auth-oauth--change-email[open] > summary.auth-oauth-label--disclosure {
    margin-bottom: 0.75rem;
}
.auth-oauth--change-email .auth-form {
    margin-top: 0.15rem;
}

.auth-container--compact .form-group {
    margin-bottom: 1rem;
}

.auth-container--compact .auth-links {
    margin-top: 1.25rem;
}

/* Отдельные /login и /signup: отступы как в модалке, не «широкие» .auth-container--compact */
.auth-page--modal-look.auth-container--compact .form-group {
    margin-bottom: 0.65rem;
}
.auth-page--modal-look.auth-container--compact .auth-oauth {
    margin-top: 0.65rem;
    padding-top: 0.55rem;
}
.auth-page--modal-look.auth-container--compact .auth-oauth-label {
    margin-bottom: 0;
}
.auth-page--modal-look.auth-container--compact .auth-links,
.auth-page--modal-look.auth-container--compact .auth-modal__links {
    margin-top: 0.75rem;
}

.auth-container--compact .auth-body .form-control {
    padding: 0.875rem 1rem;
}

.auth-card--profile {
    max-width: 36rem;
}

.profile-page-title {
    color: var(--dark-color);
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 1.25rem;
    text-align: center;
}

.profile-field-help {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8125rem;
    color: var(--secondary-color);
    line-height: 1.4;
}

.profile-account-info {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.profile-account-info__title {
    color: var(--dark-color);
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
}

.profile-account-info p {
    margin: 0 0 0.4rem;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.profile-account-info strong {
    color: var(--dark-color);
    font-weight: 600;
}

.profile-logout-wrap {
    margin-top: 1.25rem;
}

.profile-logout-wrap .btn-outline-danger {
    width: 100%;
    justify-content: center;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 12px;
    padding: 0.65rem 1rem;
    font-weight: 600;
}

.profile-auth-lead {
    text-align: center;
    margin-top: -0.35rem;
    margin-bottom: 1rem;
}

/* --- Блог: форма статьи / удаление (лендинг) --- */
.blog-shell {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.25rem 1rem 2.5rem;
    box-sizing: border-box;
}

.blog-shell--wide {
    max-width: 1140px;
}

.blog-shell__title {
    color: var(--dark-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    text-align: center;
}

.blog-shell__lead {
    text-align: center;
    color: var(--secondary-color);
    margin: 0 0 1.5rem;
    font-size: 0.95rem;
}

.blog-form-section {
    background: var(--functional-block-bg-color);
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 1rem;
}

.blog-form-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
}

.blog-form-section .form-label,
.blog-form-section label:not(.form-check-label) {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    display: block;
}

.blog-form-section .form-group {
    margin-bottom: 1rem;
}

.blog-delete-card {
    background: var(--functional-block-bg-color);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

.blog-delete-card h2 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0 0 0.75rem;
}

.blog-form-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem 0 1rem;
}

.blog-form-actions .btn {
    min-width: 180px;
    border-radius: 12px;
}

.blog-delete-actions {
    text-align: center;
    padding: 1rem 0;
}

.blog-delete-actions .btn {
    margin: 0 0.35rem;
    min-width: 160px;
    border-radius: 12px;
}

#blog-delete-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.blog-form-section .cke_chrome {
    border-radius: 12px !important;
    border: 2px solid rgba(0, 0, 0, 0.07) !important;
}

.auth-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-logo-img {
    height: 60px;
    width: auto;
    margin-bottom: 1rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h3 {
    color: var(--dark-color);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--secondary-color);
    font-size: 1rem;
    margin-bottom: 0;
}

.auth-body {
    width: 100%;
}

.auth-body .auth-copy {
    color: var(--secondary-color);
    font-size: 0.95rem;
    line-height: 1.55;
    margin: 0 0 1rem;
}

.auth-body .helptext {
    color: var(--secondary-color);
    font-size: 0.8125rem;
    line-height: 1.45;
    margin-top: 0.5rem;
}

.auth-body .helptext ul {
    margin: 0.35rem 0 0;
    padding-left: 1.25rem;
}

.auth-form {
    width: 100%;
}

.auth-oauth {
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.auth-oauth-label {
    text-align: center;
    font-size: 0.875rem;
    color: var(--secondary-color);
    margin: 0 0 1rem;
    font-weight: 500;
}

.auth-oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

/* OAuth: отдельная форма на провайдера (POST). Блок на всю ширину колонки — как у исходных <a>. */
.auth-oauth-buttons form.auth-oauth-provider {
    margin: 0;
    width: 100%;
}

.btn-oauth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid rgba(0, 0, 0, 0.1);
    background: var(--html-bg-color);
    color: var(--dark-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-sizing: border-box;
}

button.btn-oauth {
    cursor: pointer;
    font-family: inherit;
    line-height: 1.25;
    text-align: center;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
}

.btn-oauth:hover {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.15);
    color: var(--dark-color);
}

.btn-oauth-icon {
    display: inline-flex;
    flex-shrink: 0;
}

.btn-oauth-google:hover {
    border-color: rgba(66, 133, 244, 0.45);
}

.btn-oauth-github {
    color: #24292f;
}

.btn-oauth-github:hover {
    color: #24292f;
    border-color: rgba(36, 41, 47, 0.35);
}

.form-group {
    margin-bottom: 1.5rem;
}

.auth-form__lead {
    margin: 0 0 1rem;
    color: rgba(56, 58, 63, 0.82);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* В модалке: как .auth-password-strength__label */
.auth-modal .auth-form__lead {
    color: var(--secondary-color);
    font-size: 0.8125rem;
    line-height: 1.45;
}

.auth-form__lead--centered {
    text-align: center;
    max-width: 18rem;
    margin: 0 auto 1rem;
    padding-top: 0.9rem;
    box-sizing: border-box;
}

.auth-password-strength {
    margin-top: 0.75rem;
}

.auth-password-strength__track {
    width: 100%;
    height: 0.4rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.auth-password-strength__bar {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: #d9534f;
    transition: width 0.2s ease, background-color 0.2s ease;
}

.auth-password-strength__label,
.auth-password-match {
    margin: 0.45rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--secondary-color);
}

.auth-password-strength.is-weak .auth-password-strength__bar {
    width: 25%;
    background: #d9534f;
}

.auth-password-strength.is-ok .auth-password-strength__bar {
    width: 50%;
    background: #f0ad4e;
}

.auth-password-strength.is-good .auth-password-strength__bar {
    width: 75%;
    background: #5bc0de;
}

.auth-password-strength.is-strong .auth-password-strength__bar {
    width: 100%;
    background: #28a745;
}

.auth-password-match.is-match {
    color: #28a745;
}

.auth-password-match.is-mismatch {
    color: #d9534f;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 0.95rem;
}

.form-label i {
    color: var(--primary-color);
    width: 16px;
}

.form-control {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid rgba(0, 0, 0, 0.07);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--html-bg-color);
    position: relative;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(91, 155, 213, 0.1);
    background: var(--html-bg-color);
}

.form-control::placeholder {
    color: #adb5bd;
}

/* Поддержка стандартных форм (цепочка восстановления пароля) без класса form-control */
.auth-body input[type="email"],
.auth-body input[type="password"],
.auth-body input[type="text"] {
    width: 100%;
    padding: 1rem 1rem;
    border: 2px solid rgba(0, 0, 0, 0.07);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--html-bg-color);
}

.auth-body input[type="email"]:focus,
.auth-body input[type="password"]:focus,
.auth-body input[type="text"]:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(91, 155, 213, 0.1);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.form-check-input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--primary-color);
}

.form-check-label {
    color: var(--dark-color);
    font-weight: 500;
    cursor: pointer;
}

.btn-login {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--primary-color);
    border: none;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Модалка: без капса, чуть «чище» типографика */
.auth-modal .btn-login {
    text-transform: none;
    letter-spacing: 0.02em;
    font-size: 0.98rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.85rem 1rem;
    box-shadow: 0 2px 8px rgba(91, 155, 213, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(91, 155, 213, 0.3);
    color: white;
    background: #4a8bc4;
}

.auth-modal .btn-login:hover {
    box-shadow: 0 6px 20px rgba(91, 155, 213, 0.35);
    color: white;
    background: #4a8bc4;
    transform: none;
}

.auth-links {
    margin-top: 2rem;
    text-align: center;
}

.forgot-password {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.forgot-password:hover {
    color: var(--info-color);
    background: rgba(91, 155, 213, 0.1);
    text-decoration: none;
}

.register-link {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.register-link span {
    color: var(--secondary-color);
    font-size: 0.95rem;
}

.btn-sm {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    border-radius: 8px;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

.invalid-feedback {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Responsive design for auth */
@media (max-width: 576px) {
    .auth-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
        border-radius: 12px;
    }

    .auth-card--compact {
        padding: 1.15rem 1.25rem;
        margin: 0.5rem;
    }
    
    .auth-header h3 {
        font-size: 1.75rem;
    }
    
    .auth-subtitle {
        font-size: 0.9rem;
    }
    
    .form-control {
        padding: 0.875rem 0.875rem 0.875rem 2.5rem;
        font-size: 0.95rem;
    }
    
    .btn-login {
        padding: 0.875rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 1rem 0.5rem;
    }
    
    .auth-card {
        padding: 1.5rem 1rem;
    }
    
    .auth-logo-img {
        height: 50px;
    }
}

/* Error messages styling */
.auth-body .errorlist {
    color: #dc3545;
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
    font-size: 0.875rem;
}

