/* ============================================================
   AUTH PAGES — Login / Register / Forgot / Reset
   ============================================================ */

.auth-page {
    min-height: calc(100vh - 80px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
}

/* Левая часть — форма */
.auth-form-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    background: var(--color-bg);
}

.auth-form {
    width: 100%;
    max-width: 440px;
}

.auth-form .eyebrow { margin-bottom: 16px; }

.auth-form h1 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    margin-bottom: 12px;
    line-height: 1.15;
}

.auth-form .auth-sub {
    color: var(--color-text-soft);
    font-size: 1.05rem;
    margin-bottom: 36px;
    line-height: 1.6;
}

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

.auth-form .input {
    padding: 14px 16px;
    font-size: 1.02rem;
}

.auth-form .password-wrap {
    position: relative;
}
.auth-form .password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    transition: color .2s;
}
.auth-form .password-toggle:hover {
    color: var(--color-accent);
}
.auth-form .password-toggle svg { width: 18px; height: 18px; }
.auth-form .password-toggle .eye-off { display: none; }
.auth-form .password-toggle.visible .eye-on { display: none; }
.auth-form .password-toggle.visible .eye-off { display: block; }

/* Сила пароля */
.password-strength {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}
.password-strength span {
    flex: 1;
    height: 3px;
    background: var(--color-bg-soft);
    border-radius: 1px;
    transition: background .2s;
}
.password-strength.weak    span:nth-child(-n+1) { background: #c97766; }
.password-strength.medium  span:nth-child(-n+2) { background: var(--color-ochre); }
.password-strength.strong  span:nth-child(-n+3) { background: var(--color-leaf); }
.password-strength.elite   span:nth-child(-n+4) { background: var(--color-leaf-bright); }

.password-hint {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin-top: 6px;
}

/* Капча */
.captcha {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    padding: 16px;
    background: var(--color-bg-soft);
    border: 1px solid var(--color-border);
    border-radius: 4px;
}
.captcha-svg {
    width: 140px;
    height: 50px;
    border-radius: 2px;
    flex-shrink: 0;
}
.captcha-input {
    flex: 1;
}
.captcha-input label {
    font-size: 0.85rem;
    color: var(--color-text-soft);
    margin-bottom: 4px;
    display: block;
}
.captcha-input input {
    width: 100%;
    padding: 8px 12px;
    background: var(--color-bg);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: 2px;
    font-size: 1rem;
    font-family: 'JetBrains Mono', monospace;
    text-align: center;
}
.captcha-refresh {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 2px;
    transition: color .2s, transform .3s;
}
.captcha-refresh:hover {
    color: var(--color-accent);
    transform: rotate(180deg);
}

/* Чекбоксы */
.checkbox-field {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    cursor: pointer;
    font-size: 0.92rem;
    color: var(--color-text);
    line-height: 1.5;
}
.checkbox-field input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--color-leaf);
}
.checkbox-field a {
    color: var(--color-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-form .btn-submit {
    width: 100%;
    padding: 16px;
    font-size: 1.05rem;
    margin-bottom: 24px;
}

/* Разделитель и доп.ссылки */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

.auth-links {
    text-align: center;
    font-size: 0.95rem;
    color: var(--color-text-soft);
}
.auth-links a {
    color: var(--color-accent);
    font-weight: 500;
}

/* Уведомления */
.alert {
    padding: 14px 18px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
    border-left: 3px solid;
    background: var(--color-surface);
}
.alert-error {
    border-left-color: #c97766;
    color: #d99a8a;
}
.alert-notice {
    border-left-color: var(--color-leaf);
    color: var(--color-leaf-bright);
}
.alert-warning {
    border-left-color: var(--color-ochre);
    color: var(--color-ochre-bright);
}

/* Правая часть — иллюстративная */
.auth-aside {
    position: relative;
    background: linear-gradient(135deg, var(--color-forest) 0%, var(--color-water-deep) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    overflow: hidden;
}

.auth-aside::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--bg-noise);
    opacity: 0.4;
    pointer-events: none;
}

.auth-aside-content {
    position: relative;
    z-index: 1;
    max-width: 480px;
    color: var(--color-text);
}

.auth-aside-content h2 {
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    margin-bottom: 20px;
    color: var(--color-heading);
}

.auth-aside-content p {
    color: var(--color-text);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 28px;
}

.auth-aside-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.auth-aside-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-text);
    font-size: 1rem;
}
.auth-aside-features svg {
    width: 22px;
    height: 22px;
    color: var(--color-leaf-bright);
    flex-shrink: 0;
}

.auth-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.2;
}

@media (max-width: 900px) {
    .auth-page { grid-template-columns: 1fr; }
    .auth-aside { display: none; }
    .auth-form-wrap { padding: 40px 20px; }
}
