.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.auth-stage {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 32px 20px;
    box-sizing: border-box;
    font-family: "Onest", system-ui, sans-serif;
    font-synthesis: none;
    background:
        radial-gradient(ellipse 50% 40% at 18% 18%, rgba(255, 255, 255, 0.75), transparent 60%),
        radial-gradient(ellipse 40% 36% at 82% 22%, rgba(191, 219, 254, 0.9), transparent 62%),
        radial-gradient(ellipse 46% 40% at 70% 88%, rgba(147, 197, 253, 0.55), transparent 60%),
        linear-gradient(165deg, #e0f2fe 0%, #dbeafe 42%, #eff6ff 100%);
}

.auth-shell {
    width: min(960px, 100%);
    height: 720px;
    display: grid;
    grid-template-columns: 400px minmax(0, 1fr);
    border-radius: 28px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.78);
    box-shadow:
        0 28px 70px rgba(37, 99, 235, 0.18),
        0 8px 24px rgba(15, 23, 42, 0.06);
}

.auth-visual {
    min-height: 0;
    height: 100%;
    background: #dbeafe url("/static/auth-hero.jpg") center 36% / cover no-repeat;
}

.auth-glass {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    box-sizing: border-box;
    background: rgba(248, 251, 255, 0.62);
    backdrop-filter: blur(22px) saturate(1.35);
    -webkit-backdrop-filter: blur(22px) saturate(1.35);
    border-left: 1px solid rgba(255, 255, 255, 0.7);
    padding: 32px 36px 24px;
    overflow: auto;
}

.auth-panel {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
}

/* Короткая форма входа иначе садится в нижнюю половину карточки. */
.auth-panel--login {
    padding-bottom: 36px;
}

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0;
}

.auth-brand img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: block;
}

.auth-brand span {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.auth-tagline {
    margin: 8px 0 22px;
    text-align: center;
    font-size: 14px;
    line-height: 1.45;
    color: #64748b;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    margin: 0 0 22px;
    background: rgba(226, 232, 240, 0.72);
    border-radius: 14px;
}

.auth-tab {
    display: block;
    text-align: center;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 11px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
}

.auth-tab.is-active {
    background: #fff;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.auth-tab:hover {
    color: #0f172a;
}

.auth-notice {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(191, 219, 254, 0.9);
    color: #334155;
    font-size: 13px;
    line-height: 1.45;
}

.auth-error {
    margin: 0 0 14px;
    padding: 12px;
    background: rgba(254, 242, 242, 0.92);
    color: #b91c1c;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.45;
}

.auth-error a {
    color: #1d4ed8;
}

.auth-invite {
    margin: 0 0 14px;
    padding: 12px 14px;
    background: rgba(239, 246, 255, 0.9);
    border: 1px solid #bfdbfe;
    border-radius: 12px;
}

.auth-invite-kicker {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #1d4ed8;
}

.auth-invite-title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.auth-invite-prices {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 3px;
    font-size: 13px;
    color: #334155;
}

.auth-invite-note {
    margin: 8px 0 0;
    font-size: 12px;
    color: #64748b;
    line-height: 1.45;
}

.auth-form .field {
    position: relative;
    margin-bottom: 12px;
}

.auth-form .field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    display: flex;
    pointer-events: none;
    z-index: 1;
}

.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    padding: 13px 14px 13px 42px;
    font-size: 15px;
    font-family: inherit;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 12px;
}

.auth-form input::placeholder {
    color: #94a3b8;
}

.auth-form input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    background: #fff;
}

.auth-help {
    margin: -4px 0 12px;
    font-size: 12px;
    line-height: 1.4;
    color: #64748b;
}

.auth-form button[type="submit"] {
    width: 100%;
    margin-top: 6px;
    padding: 13px 16px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    background: #2563eb;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28);
}

.auth-form button[type="submit"]:hover {
    background: #1d4ed8;
}

.auth-form button[type="submit"]:disabled {
    background: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
}

.auth-forgot {
    margin: 14px 0 0;
    text-align: center;
    font-size: 14px;
}

.auth-forgot a,
.auth-switch a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

.auth-forgot a:hover,
.auth-switch a:hover,
.consent-text a:hover {
    text-decoration: underline;
}

.auth-switch {
    margin: 18px 0 0;
    text-align: center;
    font-size: 14px;
    color: #64748b;
}

.consent-row {
    margin: 8px 0 12px;
}

.consent-label {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    column-gap: 10px;
    align-items: start;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.45;
    color: #334155;
}

.consent-label input {
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: #2563eb;
}

.consent-text a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

.auth-glass .legal-links {
    margin-top: 16px;
    text-align: center;
    font-size: 12px;
    line-height: 1.6;
}

.auth-glass .legal-links a {
    color: #64748b;
    text-decoration: none;
}

.auth-glass .legal-links a:hover {
    color: #2563eb;
}

.auth-home {
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.auth-home:hover {
    color: #1d4ed8;
}

@media (max-width: 800px) {
    .auth-stage {
        justify-content: flex-start;
        padding: 16px 12px calc(16px + env(safe-area-inset-bottom, 0px));
    }

    .auth-shell {
        width: min(440px, 100%);
        height: auto;
        grid-template-columns: 1fr;
    }

    .auth-visual {
        height: 168px;
        min-height: 168px;
        background-position: 28% 42%;
    }

    .auth-glass {
        height: auto;
        overflow: visible;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.75);
        padding: 22px 16px 18px;
    }

    .auth-panel,
    .auth-panel--login {
        display: block;
        padding-bottom: 0;
    }

    .auth-brand span {
        font-size: 24px;
    }
}
