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;
}

.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: space-between;
    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-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(580px, calc(100vh - 118px));
    max-width: 1060px;
    margin: 0 auto;
    grid-template-columns: minmax(360px, 0.95fr) minmax(440px, 1fr);
}

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

.auth-card.compact .auth-form-panel {
    display: grid;
    align-content: center;
    padding: clamp(24px, 3vw, 46px);
}

.guest-auth-gate .auth-submit {
    opacity: 0.72;
}

.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: 720px;
    font-size: clamp(2rem, 3vw, 2.72rem);
    line-height: 1.08;
}

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

.auth-card.compact .auth-form {
    gap: 14px;
    margin-top: 32px;
}

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

.auth-card.compact .auth-choice-row label {
    min-width: 112px;
    padding: 10px 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-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-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) {
    .auth-card {
        grid-template-columns: 1fr;
    }

    .auth-visual {
        min-height: 280px;
    }
}

@media (max-width: 640px) {
    .auth-top,
    .auth-switch,
    .auth-gender #id_gender {
        align-items: stretch;
        flex-direction: column;
    }

    .auth-field-grid,
    .auth-date > div {
        grid-template-columns: 1fr;
    }
}
