.auth-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 18%, rgba(52, 211, 153, 0.20), transparent 34%),
        linear-gradient(135deg, #f8fafc 0%, #ecfdf5 42%, #ffffff 100%);
}

[data-theme="dark"] .auth-page,
.auth-page[data-theme="dark"] {
    background:
        radial-gradient(circle at 12% 18%, rgba(16, 185, 129, 0.18), transparent 34%),
        linear-gradient(135deg, #020617 0%, #052e25 46%, #0f172a 100%);
}

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

.auth-hero {
    color: #fff;
    background: linear-gradient(160deg, #064e3b 0%, #047857 52%, #10b981 100%);
    padding: clamp(2rem, 4vw, 4.5rem);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 3rem;
    min-height: 100vh;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
}

.auth-brand img {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.16);
    padding: 4px;
}

.auth-copy {
    max-width: 560px;
}

.auth-kicker {
    margin: 0 0 0.7rem;
    color: #a7f3d0;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.auth-copy h1 {
    color: #fff;
    font-size: clamp(2.4rem, 5vw, 4.8rem);
    margin: 0 0 1.35rem;
}

.auth-copy p {
    color: #d1fae5;
    font-size: 1.08rem;
    max-width: 44rem;
}

.auth-benefits {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.auth-benefits div {
    min-height: 96px;
    display: grid;
    align-content: center;
    gap: 0.55rem;
    padding: 1rem;
    border: 1px solid rgba(209, 250, 229, 0.25);
    background: rgba(255, 255, 255, 0.10);
    border-radius: 8px;
}

.auth-benefits i {
    font-size: 1.35rem;
}

.auth-benefits span {
    font-weight: 700;
    line-height: 1.35;
}

.auth-panel {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(1.5rem, 5vw, 5rem);
    background: var(--bg-surface);
}

.auth-language-switcher {
    position: absolute;
    top: clamp(1rem, 2.4vw, 2rem);
    right: clamp(1rem, 2.4vw, 2rem);
}

.auth-lang-toggle {
    min-height: 42px;
    padding: 0.5rem 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 8px;
    color: #047857;
    background: #fff;
    border-color: rgba(5, 150, 105, 0.22);
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.auth-lang-toggle:hover {
    background: #ecfdf5;
    border-color: rgba(5, 150, 105, 0.36);
}

.auth-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.auth-step {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-muted);
    border: 1px solid var(--border-glass);
    font-weight: 800;
    background: var(--bg-glass);
}

.auth-step.active {
    color: #fff;
    border-color: transparent;
    background: var(--gradient-primary);
}

.auth-step-line {
    width: 90px;
    height: 2px;
    background: var(--border-glass);
}

.auth-card-step {
    width: min(100%, 620px);
    margin: 0 auto;
    display: none;
}

.auth-card-step.active {
    display: block;
}

#telegramStep {
    text-align: center;
}

.auth-icon {
    width: 92px;
    height: 92px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    color: #059669;
    background: rgba(16, 185, 129, 0.12);
    font-size: 3.2rem;
}

.auth-card-step h2 {
    margin-bottom: 0.75rem;
    font-size: clamp(2rem, 4vw, 2.8rem);
}

.auth-card-step > p {
    max-width: 470px;
    margin-left: auto;
    margin-right: auto;
}

.auth-telegram-btn,
.auth-google-fallback {
    margin-top: 1.2rem;
    min-height: 48px;
}

.auth-submit-btn {
    margin-top: 1.2rem;
    min-height: 54px;
}

.auth-google-area {
    width: min(100%, 360px);
    margin: 1.25rem auto 0;
}

.auth-google-render {
    display: flex;
    justify-content: center;
    min-height: 44px;
}

.auth-google-render:empty {
    display: none;
}

.auth-google-fallback {
    width: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    color: #111827;
    background: #fff;
    border: 1px solid #dadce0;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.auth-google-fallback.is-visible {
    display: inline-flex;
}

.auth-google-fallback:disabled {
    cursor: not-allowed;
    opacity: 0.72;
    box-shadow: none;
}

.auth-google-mark {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 800;
    color: #4285f4;
    background: #fff;
}

.auth-google-note {
    margin: 0.65rem 0 0;
    color: var(--text-muted);
    font-size: 0.86rem;
    line-height: 1.45;
}

.auth-divider {
    width: min(100%, 360px);
    margin: 1.25rem auto 0;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-glass);
}

.auth-telegram-btn i {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #229ed9;
    background: #fff;
    font-size: 1rem;
    box-shadow: 0 3px 8px rgba(9, 87, 125, 0.18);
}

.auth-telegram-btn.btn-primary {
    width: min(100%, 360px);
    min-height: 48px;
    padding: 0.5rem 1rem;
    gap: 0.6rem;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(180deg, #2aabee 0%, #229ed9 100%);
    border: 1px solid rgba(26, 145, 202, 0.92);
    box-shadow: 0 10px 22px rgba(34, 158, 217, 0.22);
    font-weight: 700;
}

.auth-telegram-btn.btn-primary:hover {
    background: linear-gradient(180deg, #35b8f4 0%, #1f95cf 100%);
    box-shadow: 0 12px 26px rgba(34, 158, 217, 0.3);
    transform: translateY(-2px);
}

.auth-telegram-btn.btn-primary:focus-visible {
    outline: 3px solid rgba(42, 171, 238, 0.28);
    outline-offset: 3px;
}

.auth-telegram-btn.btn-primary:disabled {
    cursor: not-allowed;
    opacity: 0.72;
    box-shadow: none;
    transform: none;
}

.auth-note {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.auth-profile-header {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.auth-profile-header h2,
.auth-profile-header p {
    margin-bottom: 0.2rem;
}

.auth-link-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding: 1rem;
    border: 1px solid rgba(16, 185, 129, 0.22);
    border-radius: 8px;
    background: rgba(16, 185, 129, 0.08);
}

.auth-link-card[hidden] {
    display: none;
}

.auth-link-card strong {
    display: block;
    color: var(--text-primary);
}

.auth-link-card p {
    margin: 0.2rem 0 0;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.auth-link-telegram-btn {
    flex: 0 0 auto;
    min-height: 44px;
}

.auth-avatar {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #059669;
    background: rgba(16, 185, 129, 0.12);
    font-size: 2.4rem;
}

.auth-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.auth-field {
    display: grid;
    gap: 0.5rem;
}

.auth-field-wide {
    grid-column: 1 / -1;
}

.auth-field span {
    color: var(--text-primary);
    font-weight: 800;
    font-size: 0.92rem;
}

.auth-field input,
.auth-field select {
    width: 100%;
    min-height: 48px;
    border-radius: 8px;
    border: 1px solid var(--border-glass);
    background: var(--bg-dark);
    color: var(--text-primary);
    font: inherit;
    padding: 0.75rem 0.9rem;
    outline: none;
}

.auth-field input:focus,
.auth-field select:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.auth-date-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr 1fr;
    gap: 0.75rem;
}

#birthManual {
    margin-top: 0.75rem;
}

.auth-error {
    min-height: 1.4rem;
    margin: 1rem 0 0;
    color: #dc2626;
    font-weight: 700;
}

.auth-field.is-hidden {
    display: none;
}

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

    .auth-hero {
        min-height: auto;
        padding-bottom: 2rem;
    }

    .auth-panel {
        min-height: auto;
        padding-top: 5rem;
    }
}

@media (max-width: 640px) {
    .auth-benefits,
    .auth-form-grid,
    .auth-date-grid {
        grid-template-columns: 1fr;
    }

    .auth-profile-header {
        grid-template-columns: 1fr;
    }

    .auth-link-card {
        align-items: stretch;
        flex-direction: column;
    }

    .nsm7Bb-HzV7m-LgbsSe {
        min-height: 44px !important;
        height: 44px !important;
    }
}
