.auth-page-mode {
    background:
        radial-gradient(circle at top left, rgba(124, 16, 41, 0.07), transparent 30%),
        linear-gradient(180deg, #f5f5f5 0%, #f3f4f6 100%);
}

.auth-shell {
    min-height: calc(100vh - 164px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 0 24px;
}

.auth-stage {
    width: min(100%, 520px);
    margin: 0 auto;
}

.auth-card {
    background: #fff;
    border: 1px solid #ebe7ea;
    border-radius: 24px;
    padding: 28px;
}

.auth-card--choice {
    max-width: 406px;
    margin: 0 auto;
}

.auth-card--wide {
    max-width: 520px;
    margin: 0 auto;
}

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

.auth-card__head--compact {
    text-align: left;
}

.auth-card__head h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.1;
    font-weight: 500;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.auth-card__head p {
    margin: 12px 0 0;
    color: #74829a;
    font-size: 17px;
    line-height: 1.5;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--accent);
    font-weight: 500;
}

.auth-choice-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-btn {
    min-height: 54px;
    border-radius: 14px;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 18px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: transform .16s ease, background-color .16s ease, border-color .16s ease;
}

.auth-btn--block {
    width: 100%;
}

.auth-btn--primary {
    background: #86132f;
    color: #fff;
}

.auth-btn--primary:hover {
    background: #14ac76;
}

.auth-btn--ghost {
    background: #fff;
    color: #10213f;
    border-color: #86132f;
}

.auth-btn--ghost:hover {
    background: #f4fffb;
}

.auth-btn:active {
    transform: translateY(1px);
}

.auth-divider {
    position: relative;
    text-align: center;
    color: #10213f;
    font-size: 18px;
    font-weight: 500;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    border-top: 1px solid #e8edf3;
}

.auth-divider span {
    position: relative;
    z-index: 1;
    padding: 0 12px;
    background: #fff;
}

.auth-card__foot {
    margin-top: 18px;
}

.auth-card__foot--split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: #12213d;
    font-size: 15px;
}

.auth-card__foot--stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #667085;
    font-size: 15px;
}

.auth-card__foot a {
    color: #e23b43;
    font-weight: 500;
}

.auth-card__foot p {
    margin: 0;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-field span {
    color: #334155;
    font-size: 14px;
    font-weight: 500;
}

.auth-field input {
    width: 100%;
    min-height: 52px;
    border: 1px solid #dbe3ec;
    border-radius: 14px;
    background: #fff;
    padding: 0 16px;
    color: #0f172a;
    outline: none;
    transition: border-color .16s ease;
}

.auth-field input:focus {
    border-color: rgba(23, 191, 131, 0.8);
}

.auth-password {
    position: relative;
    display: block;
}

.auth-password input {
    padding-right: 52px;
}

.auth-password__toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: #f8fafc;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #475569;
    font-size: 14px;
}

.auth-check input {
    width: 18px;
    height: 18px;
    accent-color: #86132f;
}

.auth-note {
    padding: 14px 16px;
    border-radius: 14px;
    background: #f8fafc;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

.auth-alert {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}

.auth-alert--success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
}

.auth-alert--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

@media (max-width: 768px) {
    .auth-shell {
        min-height: calc(100vh - 146px);
        align-items: flex-start;
        padding-top: 94px;
    }

    .auth-stage {
        width: 100%;
        margin: 0 10px;
    }

    .auth-card {
        border-radius: 20px;
        padding: 26px 16px 18px;
    }

    .auth-card--choice {
        max-width: none;
    }

    .auth-card__head h1 {
        font-size: 32px;
        text-align: center;
    }

    .auth-card__head p {
        margin-top: 14px;
        font-size: 15px;
        text-align: center;
    }

    .auth-card__head--compact h1,
    .auth-card__head--compact p {
        text-align: left;
    }

    .auth-card__foot--split {
        font-size: 14px;
    }
}
