/* ============================================================
   Вход, регистрация, восстановление пароля, сообщения — в стиле главной
   (SITE_AUDIT_PLAN.md, 15.10.2026). Оболочка — app/views/auth/_shell_top.php.
   Всё под .auth-page: базовые .form-input / .btn из style.css в кабинете
   не меняются. Кнопки и галочки — чёрные (вкус владельца), ссылки — фиолетовые.
   ============================================================ */

@font-face {
    font-family: 'Inter Hero';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('/assets/fonts/inter-hero-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: 'Inter Hero';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('/assets/fonts/inter-hero-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+2000-206F;
}

@font-face {
    font-family: 'Caveat';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/caveat-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

.auth-page {
    margin: 0;
    min-height: 100vh;
    background: #fff;
    color: #11111b;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 100vh;
}

/* --- Бренд-панель --- */
.auth-brand {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 36px 56px 32px;
    background: #fbf8ff;
    border-right: 1px solid #efe8f8;
}

.auth-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: url('/assets/img/hero-silk-wave.webp') 30% 40% / auto 120% no-repeat;
    opacity: .9;
}

.auth-brand::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, #fbf8ff00 55%, #fbf8ffd9);
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.02em;
    color: #11111b;
    text-decoration: none;
}

.auth-logo:hover { text-decoration: none; }
.auth-logo-mark { width: 32px; height: 32px; flex: none; }

.auth-brand-body {
    position: relative;
    margin: auto 0;
    padding: 48px 0;
    max-width: 520px;
}

.auth-note {
    position: absolute;
    top: -24px;
    right: -10px;
    margin: 0;
    font-family: 'Caveat', cursive;
    font-size: 30px;
    line-height: 1.02;
    color: #c7a4ff;
    white-space: nowrap;
    transform: rotate(-10deg);
    pointer-events: none;
}

.auth-note span:nth-child(2) { padding-left: 18px; }
.auth-note span:nth-child(4) { padding-left: 38px; }

.auth-brand-title {
    margin: 0 0 34px;
    font-family: 'Inter Hero', Inter, sans-serif;
    font-size: clamp(44px, 4.6vw, 68px);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -.05em;
    color: #0b0b0f;
}

.auth-brand-title span {
    background: linear-gradient(100deg, #6f5bea, #a35be8 55%, #d46fb8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-tools {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.auth-tools li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid #ece2f8;
    border-radius: 18px;
    background: #ffffffc4;
    backdrop-filter: blur(6px);
    font-size: 14px;
    line-height: 1.5;
    color: #6b6578;
}

.auth-tools strong {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #15101e;
}

.auth-tool-icon {
    display: grid;
    place-items: center;
    flex: 0 0 40px;
    height: 40px;
    border-radius: 13px;
    background: #f3edff;
    color: #8860e4;
}

.auth-tool-icon svg { width: 21px; height: 21px; }
.auth-tool-pink { background: #fdeef6; color: #d073a7; }
.auth-tool-blue { background: #edf0ff; color: #7077d8; }

.auth-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    font-size: 12.5px;
    color: #8a7d98;
}

.auth-legal a { color: #7a6c88; text-decoration: none; }
.auth-legal a:hover { color: #7a52d1; text-decoration: none; }

/* --- Форма --- */
.auth-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
}

.auth-logo-mobile,
.auth-legal-mobile { display: none; }

.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: #71717a;
}

.auth-eyebrow::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: linear-gradient(115deg, #6366F1, #A855F7 52%, #EC4899);
}

.auth-title {
    margin: 14px 0 12px;
    font-family: 'Inter Hero', Inter, sans-serif;
    font-size: clamp(32px, 3vw, 42px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.045em;
    color: #11111b;
}

.auth-title span { color: #8060dc; }

.auth-lead {
    margin: 0 0 28px;
    font-size: 16px;
    line-height: 1.6;
    color: #666574;
}

.auth-lead strong { color: #3f3f46; font-weight: 600; }

.auth-page .form-group { margin-bottom: 18px; }

.auth-page .form-label {
    margin-bottom: 7px;
    font-size: 13.5px;
    font-weight: 600;
    color: #3f3f46;
}

.auth-page .form-input {
    height: 50px;
    padding: 0 16px;
    font-size: 15px;
    border: 1px solid #e3dcee;
    border-radius: 14px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.auth-page .form-input:hover { border-color: #cfc3e3; }

.auth-page .form-input:focus {
    border-color: #8a5fe0;
    box-shadow: 0 0 0 4px #8a5fe01f;
}

/* Повтор пароля (20.10.2026, assets/js/password-match.js): совпали — зелёная рамка
   и метка «Пароли совпадают», не совпали — красная */
.auth-page .form-input.is-match { border-color: #3cc47c; }
.auth-page .form-input.is-match:focus { border-color: #22a565; box-shadow: 0 0 0 4px #22a5651f; }
.auth-page .form-input.is-mismatch { border-color: #f0a0a0; }
.auth-page .form-input.is-mismatch:focus { border-color: #e05a5a; box-shadow: 0 0 0 4px #e05a5a1a; }

.auth-page .pass-match {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 9px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}
.auth-page .pass-match[hidden] { display: none; }
.auth-page .pass-match.is-ok { color: #16a34a; }
.auth-page .pass-match.is-bad { color: #dc2626; }

.auth-page .pass-match-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.auth-page .pass-match.is-ok .pass-match-icon { background: #22c55e; box-shadow: 0 0 0 4px #22c55e1f; }
.auth-page .pass-match.is-bad .pass-match-icon { background: #ef4444; }

.auth-page .btn-primary {
    height: 52px;
    margin-top: 6px;
    padding: 0 22px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    background: var(--color-accent);
    box-shadow: 0 10px 24px -14px #0b0b0f80;
}

.auth-page .btn-primary:hover { background: #26222e; }
.auth-page .btn-primary:disabled { background: #8f8a99; box-shadow: none; }
.auth-page .btn-primary:focus-visible { outline: 3px solid #a76cf0; outline-offset: 3px; }

.auth-page .form-error,
.auth-page .form-success {
    margin: 4px 0 14px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.auth-page .consent-group { gap: 12px; margin-top: 4px; }
.auth-page .consent-label { font-size: 13px; line-height: 1.55; color: #6b6578; }
.auth-page .consent-label input[type="checkbox"] { width: 17px; height: 17px; margin-top: 1px; }

.auth-page .consent-label a,
.auth-page .auth-links a,
.auth-lead a {
    color: #8054ae;
    text-decoration: underline;
    text-decoration-color: #d9c6ef;
    text-underline-offset: 3px;
    border-bottom: 0;
}

.auth-page .consent-label a:hover,
.auth-page .auth-links a:hover,
.auth-lead a:hover { text-decoration-color: currentColor; }

.auth-page .auth-links {
    margin: 22px 0 0;
    text-align: left;
    font-size: 14px;
    color: #71717a;
}

.auth-page .auth-links-sep { margin: 0 10px; color: #cfc3e3; }

/* --- Адаптивность --- */
@media (max-width: 1100px) {
    .auth-brand { padding: 32px 36px 28px; }
    .auth-note { font-size: 25px; right: 0; }
}

@media (max-width: 900px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-brand { display: none; }

    .auth-main {
        position: relative;
        isolation: isolate;
        justify-content: flex-start;
        min-height: 100vh;
        padding: 28px 16px 24px;
    }

    .auth-main::before {
        content: '';
        position: absolute;
        inset: 0 0 auto;
        height: 340px;
        z-index: -1;
        background: url('/assets/img/hero-silk-wave.webp') 60% 0 / cover no-repeat;
        opacity: .5;
        -webkit-mask-image: linear-gradient(#000 30%, transparent);
        mask-image: linear-gradient(#000 30%, transparent);
    }

    /* flex, а не inline-flex: иначе метка над заголовком встаёт в строку с логотипом */
    .auth-logo-mobile { display: flex; width: max-content; margin-bottom: 40px; font-size: 20px; }
    .auth-logo-mobile .auth-logo-mark { width: 30px; height: 30px; }
    .auth-legal-mobile { display: flex; justify-content: center; margin-top: auto; padding-top: 40px; }
}

@media (max-width: 480px) {
    .auth-title { font-size: 32px; }
    .auth-lead { font-size: 15px; margin-bottom: 24px; }
}
