body.public-mode.auth-page {
    background:
        linear-gradient(135deg, rgba(46, 91, 210, 0.88), rgba(125, 34, 216, 0.94) 38%, rgba(18, 19, 31, 1) 38%),
        #151623;
}

body.auth-page .public-topbar,
body.auth-page .public-subnav {
    display: none;
}

body.auth-page .public-shell {
    max-width: 1280px;
}

body.auth-page .content-card {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none;
}

.auth-shell {
    min-height: calc(100vh - 28px);
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 22px;
    padding: 18px 0 34px;
}

.auth-top {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
}

.auth-brand,
.auth-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.auth-brand {
    color: #fff;
    font-size: 1.2rem;
}

.auth-brand span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: linear-gradient(135deg, #ef7d44, #f4488e);
    font-weight: 900;
}

.auth-brand span img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.auth-brand.has-wordmark span {
    display: none;
}

.auth-brand.has-wordmark .brand-logo-full {
    width: 170px;
    max-height: 45px;
}

@media (max-width: 920px) {
    .auth-brand.has-wordmark span {
        display: grid;
        background: transparent;
    }

    .auth-brand.has-wordmark .brand-logo-full {
        display: none;
    }
}

.auth-switch {
    color: rgba(255, 255, 255, 0.88);
    font-weight: 800;
}

.auth-switch a {
    padding: 12px 20px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    color: #fff;
}

.auth-card {
    align-self: center;
    display: grid;
    grid-template-columns: minmax(320px, 0.92fr) minmax(360px, 1fr);
    min-height: 620px;
    border-radius: 10px;
    overflow: hidden;
    background: #252632;
    box-shadow: 0 34px 100px rgba(0, 0, 0, 0.32);
}

.auth-card.compact {
    min-height: min(520px, calc(100vh - 108px));
    max-width: min(1120px, 100%);
    margin: 0 auto;
    grid-template-columns: minmax(420px, 1fr) minmax(460px, 1.05fr);
}

.auth-card.compact .auth-visual {
    min-height: min(520px, calc(100vh - 108px));
}

.auth-card.compact .auth-form-panel {
    display: grid;
    align-content: center;
    padding: clamp(22px, 2.4vw, 36px);
}

.auth-visual {
    position: relative;
    display: grid;
    align-items: end;
    min-height: 520px;
    padding: 36px;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 22%, rgba(255, 68, 173, 0.65), transparent 30%),
        radial-gradient(circle at 75% 62%, rgba(80, 26, 90, 0.86), transparent 26%),
        linear-gradient(135deg, #3a164c, #d91889 44%, #11121d);
}

.auth-visual img {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-visual::before,
.auth-visual::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: rgba(10, 10, 20, 0.46);
    filter: blur(2px);
}

.auth-visual:has(img)::before,
.auth-visual:has(img)::after {
    display: none;
}

.auth-visual::before {
    width: 260px;
    height: 540px;
    left: 24%;
    top: 6%;
    transform: rotate(-12deg);
}

.auth-visual::after {
    width: 420px;
    height: 300px;
    left: 42%;
    bottom: -80px;
    transform: rotate(12deg);
}

.auth-visual-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 36%, rgba(12, 13, 23, 0.8));
}

.auth-visual-copy {
    position: relative;
    z-index: 1;
    max-width: 520px;
}

.auth-eyebrow {
    margin: 0 0 10px;
    color: #ff6fa8;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.auth-visual h1,
.auth-form-panel h1,
.auth-form-panel h2 {
    margin: 0;
    color: #fff;
    line-height: 1.06;
}

.auth-visual h1 {
    font-size: clamp(2.1rem, 4vw, 4rem);
    font-family: var(--display-font);
}

.auth-visual p,
.auth-muted {
    color: #aab4c4;
    line-height: 1.55;
}

.auth-form-panel {
    padding: clamp(28px, 4vw, 52px);
    background: #252632;
}

.auth-form-panel h1,
.auth-form-panel h2 {
    max-width: 620px;
    font-size: clamp(1.8rem, 3vw, 3.1rem);
}

.auth-card.compact .auth-form-panel h1 {
    max-width: 760px;
    font-size: clamp(2rem, 2.7vw, 2.55rem);
    line-height: 1.04;
}

.auth-card.compact .auth-muted {
    margin: 14px 0 0;
}

.auth-card.compact .auth-form {
    gap: 12px;
    margin-top: 24px;
}

.auth-card.compact .auth-field,
.auth-card.compact .auth-form input,
.auth-card.compact .auth-form select {
    min-height: 42px;
    padding: 9px 14px;
}

.auth-card.compact .auth-choice-row label {
    min-width: 112px;
    padding: 9px 14px;
}

.auth-card.compact .auth-submit {
    min-height: 46px;
}

.auth-form {
    display: grid;
    gap: 18px;
    margin-top: 28px;
}

.auth-form label,
.auth-date span,
.auth-gender > span {
    display: grid;
    gap: 8px;
    color: #dfe7f3;
    font-weight: 800;
}

.auth-field,
.auth-form input,
.auth-form select {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #f7fbff;
    background: #333445;
    outline: none;
}

.auth-form input:focus,
.auth-form select:focus {
    border-color: rgba(45, 128, 255, 0.9);
    box-shadow: 0 0 0 3px rgba(45, 128, 255, 0.14);
}

.auth-field-grid,
.auth-date > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.auth-date > div {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.auth-gender {
    display: grid;
    gap: 14px;
    text-align: center;
}

.auth-gender #id_gender {
    display: flex;
    justify-content: center;
    gap: 14px;
    padding: 0;
    margin: 0;
    list-style: none;
}

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

.auth-gender.compact #id_gender {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.auth-date.compact {
    display: grid;
    gap: 8px;
}

.auth-choice-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.auth-choice-row label {
    min-width: 126px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 999px;
    border: 1px solid rgba(115, 151, 206, 0.6);
    color: #aeb9ca;
    background: transparent;
    cursor: pointer;
}

.auth-choice-row input {
    width: auto;
    min-height: auto;
    accent-color: #ff5b99;
}

.auth-gender #id_gender li {
    list-style: none;
}

.auth-gender label {
    min-width: 126px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 999px;
    border: 1px solid rgba(115, 151, 206, 0.6);
    color: #aeb9ca;
    background: transparent;
    cursor: pointer;
}

.auth-gender input {
    width: auto;
    min-height: auto;
    accent-color: #ff5b99;
}

.auth-submit {
    min-height: 50px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, #2c83ff, #f04b88);
    font-weight: 900;
    cursor: pointer;
}

.auth-submit:disabled,
.auth-submit[aria-disabled="true"] {
    color: #929bad;
    background: #445064;
    cursor: not-allowed;
    opacity: 0.78;
}

.auth-alert,
.auth-form .errorlist {
    margin: 0;
    padding: 12px 14px;
    border-radius: 10px;
    color: #ffd9e1;
    background: rgba(214, 55, 88, 0.18);
    list-style: none;
}

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

.auth-links a {
    color: #8db7ff;
    font-weight: 800;
}

@media (max-width: 980px) {
    body.public-mode.auth-page {
        overflow-x: hidden;
    }

    body.auth-page .public-shell {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .auth-shell {
        width: 100%;
        min-width: 0;
        padding: 10px 12px 24px;
        overflow-x: hidden;
    }

    .auth-card,
    .auth-card.compact {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        min-height: 0;
    }

    .auth-card.compact .auth-visual,
    .auth-visual {
        min-height: 260px;
        max-height: 42svh;
    }
}

@media (max-width: 640px) {
    body.public-mode.auth-page {
        background: #151623;
    }

    .auth-shell {
        min-height: calc(100svh - 72px);
        padding: 0 0 20px;
        gap: 0;
    }

    .auth-card,
    .auth-card.compact {
        background: transparent;
        box-shadow: none;
        overflow: visible;
        border-radius: 0;
    }

    .auth-card.compact .auth-visual,
    .auth-visual {
        display: none;
    }

    .auth-card.compact .auth-form-panel,
    .auth-form-panel {
        padding: 22px 18px 20px;
        background: transparent;
    }

    .auth-card.compact .auth-form-panel h1,
    .auth-form-panel h1,
    .auth-form-panel h2 {
        font-size: clamp(1.85rem, 8.4vw, 2.35rem);
        line-height: 1.05;
    }

    .auth-muted {
        margin: 12px 0 0;
        line-height: 1.45;
    }

    .auth-form {
        gap: 14px;
        margin-top: 20px;
    }

    .auth-top,
    .auth-switch {
        align-items: stretch;
        flex-direction: column;
    }

    .auth-gender #id_gender,
    .auth-choice-row {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 9px;
        width: 100%;
        padding: 0;
        border: 0;
        background: transparent;
    }

    .auth-field-grid {
        display: grid;
        grid-template-columns: 1fr;
    }

    .auth-date > div {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 9px;
    }

    .auth-choice-row label,
    .auth-gender label {
        width: 100%;
        min-width: 0;
        padding: 10px 8px;
        font-size: 0.86rem;
        white-space: nowrap;
    }

    .auth-field,
    .auth-form input,
    .auth-form select {
        min-height: 44px;
        border-radius: 7px;
        background: #303243;
    }

    .auth-submit {
        min-height: 46px;
    }
}
