/* Светлые страницы входа, регистрации и восстановления доступа */
.page.auth {
    --auth-ink: #172033;
    --auth-muted: #66728d;
    --auth-line: #dce3f1;
    --primary: #665ff4;
    --primary-hover: #554dcf;
    --primary-soft: rgba(102, 95, 244, .13);
    --panel: #ffffff;
    --panel-2: #fbfcff;
    --text: var(--auth-ink);
    --text-soft: #34405a;
    --text-muted: var(--auth-muted);
    --line: var(--auth-line);
    --line-soft: #e8ebf4;
    --success: #0f9f72;
    --success-soft: #e8f8f2;
    --warning: #d98611;
    --warning-soft: #fff6e8;
    --danger: #d94646;
    --danger-soft: #fff0f0;
    position: relative;
    display: grid;
    grid-template-columns: minmax(390px, 560px) minmax(0, 1fr);
    gap: clamp(28px, 4.5vw, 76px);
    min-height: 100vh;
    padding: clamp(24px, 3.5vw, 56px);
    place-items: center stretch;
    overflow: hidden;
    color: var(--auth-ink);
    background:
        radial-gradient(circle at 8% 8%, rgba(102, 95, 244, .13) 0, transparent 24%),
        radial-gradient(circle at 45% 95%, rgba(15, 186, 131, .08) 0, transparent 26%),
        linear-gradient(145deg, #ffffff 0%, #f8f9fd 48%, #f0efff 100%);
}

.page.auth::before {
    content: '';
    position: absolute;
    top: -92px;
    left: -72px;
    width: 230px;
    height: 230px;
    border: 1px solid rgba(102, 95, 244, .18);
    border-radius: 50%;
    pointer-events: none;
}

.page.auth::after {
    content: '';
    z-index: 1;
    grid-column: 2;
    grid-row: 1;
    align-self: stretch;
    width: 100%;
    min-height: min(840px, calc(100vh - 48px));
    border: 1px solid rgba(211, 218, 236, .9);
    border-radius: clamp(24px, 2.2vw, 36px);
    background-color: #f2f1ff;
    background-image: url('/htmls/assets/images/auth-growth-visual.jpg');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    box-shadow: 0 28px 76px rgba(36, 44, 81, .14);
}

.auth-card {
    z-index: 2;
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    max-width: 560px;
    justify-self: center;
    padding: clamp(28px, 3.2vw, 46px);
    border: 1px solid rgba(220, 227, 241, .95);
    border-radius: 28px;
    color: var(--auth-ink);
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 24px 70px rgba(36, 44, 81, .12);
    backdrop-filter: blur(14px);
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
    color: var(--auth-ink);
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -.04em;
}

.auth-logo::before {
    content: '';
    width: 28px;
    height: 28px;
    border-radius: 9px 9px 13px 9px;
    background: linear-gradient(135deg, #665ff4, #8e65f2);
    box-shadow: 0 8px 18px rgba(102, 95, 244, .28);
    transform: rotate(-7deg);
}

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

.auth-title {
    margin: 0 0 12px;
    color: var(--auth-ink);
    font-size: clamp(30px, 3vw, 42px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -.04em;
}

.auth-text {
    max-width: 470px;
    margin: 0 0 28px;
    color: var(--auth-muted);
    font-size: 16px;
    line-height: 1.6;
}

.auth-card .btn {
    width: 100%;
    min-height: 50px;
    border-radius: 13px;
    font-weight: 800;
}

.auth-card .btn--primary:not(.js-yandex-login-btn) {
    border-color: transparent;
    background: linear-gradient(135deg, #665ff4, #7759ef);
    box-shadow: 0 13px 28px rgba(102, 95, 244, .24);
}

.auth-card .btn--primary:not(.js-yandex-login-btn):hover {
    background: linear-gradient(135deg, #5b54e7, #6949df);
    box-shadow: 0 17px 34px rgba(102, 95, 244, .3);
}

.auth-card .form-label {
    color: #34405a;
    font-weight: 700;
}

.auth-card .form-control {
    min-height: 50px;
    border-color: #dce3f1;
    border-radius: 13px;
    color: var(--auth-ink);
    background: #fbfcff;
}

.auth-card .form-control::placeholder {
    color: #9aa4b8;
}

.auth-card .form-control:focus {
    border-color: #8d87f7;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 95, 244, .12);
}

.auth-card .form-control-wrap.phone-input-wrap select:focus + input,
.auth-card .form-control-wrap.phone-input-wrap input:focus {
    border-color: #8d87f7;
    box-shadow: 0 0 0 4px rgba(102, 95, 244, .12);
}

.login-methods {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    padding: 4px;
    border-radius: 14px;
    background: #f1f3f9;
}

.login-method {
    flex: 1;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 11px;
    color: var(--auth-muted);
    background: transparent;
    cursor: pointer;
    font-weight: 700;
    transition: color .2s ease, background .2s ease, box-shadow .2s ease;
}

.login-method:hover {
    color: var(--auth-ink);
}

.login-method.is-active {
    border-color: #e1e4ef;
    color: #554dcf;
    background: #fff;
    box-shadow: 0 5px 15px rgba(36, 44, 81, .08);
}

.login-identifier-wrap.is-hidden {
    display: none;
}

.auth-links {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.auth-footer,
.auth-links {
    color: var(--auth-muted);
    font-size: 14px;
}

.auth-footer a,
.auth-links a,
.auth-card .legal-consent a {
    color: #5e56df;
    font-weight: 700;
}

.auth-footer a:hover,
.auth-links a:hover,
.auth-card .legal-consent a:hover {
    color: #4438ca;
}

.auth-card .legal-consent {
    color: var(--auth-muted);
}

.auth-card .auth-yandex__or {
    color: var(--auth-muted);
}

.auth-card .auth-yandex__or::before,
.auth-card .auth-yandex__or::after {
    background: var(--auth-line);
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
}

@media (max-width: 1050px) {
    .page.auth {
        display: grid;
        grid-template-columns: minmax(0, 620px);
        justify-content: center;
        padding: clamp(24px, 6vw, 64px) 22px;
        overflow: visible;
    }

    .page.auth::after {
        display: none;
    }

    .auth-card {
        grid-column: 1;
        width: 100%;
    }
}

@media (max-width: 640px) {
    .page.auth {
        display: block;
        min-height: 100vh;
        padding: 14px;
        background:
            radial-gradient(circle at 100% 0, rgba(102, 95, 244, .15) 0, transparent 34%),
            linear-gradient(180deg, #f9faff 0, #f2f1ff 100%);
    }

    .page.auth::before {
        display: none;
    }

    .auth-card {
        max-width: none;
        padding: 24px 20px;
        border-radius: 22px;
        backdrop-filter: none;
    }

    .auth-logo {
        margin-bottom: 25px;
    }

    .auth-title {
        font-size: 30px;
    }

    .auth-text {
        margin-bottom: 24px;
        font-size: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-card .btn,
    .login-method {
        transition: none;
    }
}
