.auth-page-body {
    --emerald: #314b7a;
    --emerald-light: #314b7a;
    --gold: #8f3345;
    --gold-light: #8f3345;
    --success: #8f3345;
    --text-primary: #18243d;
    --text-secondary: #36445f;
    --text-muted: #657087;
    --glass-bg: #f8f9fb;
    --glass-border: #d8deea;
    min-height: 100vh;
    background: #f4f5f8;
    color: #18243d;
}

.auth-page-body .background,
.auth-page-body > .orb {
    display: none;
}

.auth-page-body .login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 32px 16px;
}

.auth-page-body .auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    width: min(100%, 1240px);
    align-items: stretch;
    gap: 0;
    margin: auto;
    border-radius: 22px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 24px 70px rgba(24, 36, 61, 0.14);
}

.auth-story {
    position: sticky;
    top: 0;
    align-self: start;
    height: calc(100vh - 56px);
    min-height: 680px;
    overflow: hidden;
    background: #172847;
    color: #fff;
}

.auth-page-body .auth-story {
    position: relative;
    top: auto;
    align-self: stretch;
    height: auto;
}

.auth-story::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(180deg, rgba(16, 30, 55, 0.16) 0%, rgba(16, 30, 55, 0.48) 44%, rgba(16, 30, 55, 0.96) 100%);
}

.auth-story-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.auth-story-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: clamp(28px, 4vw, 52px);
}

.auth-story-brand {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 12px;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.auth-story-brand img,
.auth-story-brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    background: #8f3345;
    color: #fff;
    object-fit: contain;
    font-size: 22px;
}

.auth-story-brand img {
    background: transparent;
}

.auth-story-copy {
    max-width: 470px;
    padding-top: 56px;
}

.auth-story-kicker {
    display: inline-flex;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    background: rgba(143, 51, 69, 0.86);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.auth-story-copy h2 {
    margin: 18px 0 12px;
    color: #fff;
    font-size: clamp(32px, 3.2vw, 48px);
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 1.12;
}

.auth-story-copy p {
    max-width: 410px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 15px;
    line-height: 1.75;
}

.auth-story-points {
    display: grid;
    gap: 13px;
    margin-top: 32px;
}

.auth-story-points span {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.93);
    font-size: 14px;
}

.auth-story-points b {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 9px;
    background: #314b7a;
    color: #fff;
    font-size: 10px;
    letter-spacing: 0.04em;
}

.auth-story-caption {
    margin: 28px 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
}

.auth-form-panel {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(28px, 5vw, 64px);
    background: #fff;
}

.auth-form-panel .login-container {
    width: 100%;
    max-width: 560px;
}

.auth-form-panel .login-card {
    padding: 8px 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    color: #18243d;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.auth-form-panel .login-card::before {
    display: none;
}

.auth-form-panel .login-header {
    margin-bottom: 30px;
}

.auth-form-panel .login-title {
    color: #18243d;
    font-size: clamp(25px, 2.5vw, 32px);
    letter-spacing: -0.025em;
}

.auth-form-panel .login-logo {
    background: #8f3345;
    box-shadow: none;
}

.auth-form-panel .login-subtitle {
    color: #657087;
}

.auth-form-panel .form-label {
    color: #36445f;
    font-weight: 600;
}

.auth-form-panel .form-input {
    border-color: #d8deea;
    background: #f8f9fb;
    color: #18243d;
}

.auth-form-panel .form-input:focus {
    border-color: #314b7a;
    box-shadow: 0 0 0 3px rgba(49, 75, 122, 0.12);
}

.auth-form-panel .form-input::placeholder {
    color: #8992a4;
}

.auth-form-panel .form-row,
.auth-form-panel .checkbox-label {
    color: #59657b;
}

.auth-form-panel .checkbox-label input {
    accent-color: #8f3345;
}

.auth-form-panel .forgot-link,
.auth-form-panel .login-footer a {
    color: #8f3345;
    font-weight: 600;
}

.auth-form-panel .divider {
    color: #7a8498;
}

.auth-form-panel .login-footer {
    color: #59657b;
    text-align: center;
}

.auth-form-panel .alert-success {
    border-color: #e0b4bc !important;
    background: #fbf0f2 !important;
    color: #76293a !important;
}

.auth-form-panel .btn-primary,
.auth-form-panel .btn-primary:hover {
    background: #314b7a !important;
    background-image: none !important;
    color: #fff !important;
}

.auth-form-panel .btn-primary:hover {
    background: #1d2d4f !important;
}

.auth-form-panel .site-footer {
    color: #657087;
}

.auth-page-body .site-footer {
    margin: 16px 0 0;
    color: #737d91;
    font-size: 12px;
    text-align: center;
}

.auth-page-body .theme-toggle-float {
    z-index: 5;
    background: #8f3345;
    background-image: none;
    border-color: #8f3345;
    color: #fff;
}

.auth-page-body .theme-toggle-float svg {
    color: inherit;
}

html[data-theme="light"] .auth-page-body .theme-toggle-float {
    background: #8f3345;
    border-color: #8f3345;
}

html[data-theme="dark"] .auth-page-body {
    --text-primary: #f5f6fa;
    --text-secondary: rgba(245, 246, 250, 0.78);
    --text-muted: rgba(245, 246, 250, 0.58);
    --glass-bg: #202f4d;
    --glass-border: #394966;
    background: #111a2e;
    color: #f5f6fa;
}

html[data-theme="dark"] .auth-page-body .auth-shell,
html[data-theme="dark"] .auth-page-body .auth-form-panel,
html[data-theme="dark"] .auth-page-body .auth-form-panel .login-card {
    background: #17233c;
}

html[data-theme="dark"] .auth-page-body .auth-form-panel .login-title {
    color: #f5f6fa;
}

html[data-theme="dark"] .auth-page-body .auth-form-panel .login-subtitle,
html[data-theme="dark"] .auth-page-body .auth-form-panel .form-row,
html[data-theme="dark"] .auth-page-body .auth-form-panel .checkbox-label,
html[data-theme="dark"] .auth-page-body .auth-form-panel .login-footer,
html[data-theme="dark"] .auth-page-body .site-footer {
    color: rgba(245, 246, 250, 0.72);
}

html[data-theme="dark"] .auth-page-body .auth-form-panel .form-label {
    color: rgba(245, 246, 250, 0.88);
}

html[data-theme="dark"] .auth-page-body .auth-form-panel .form-input {
    border-color: #394966;
    background: #202f4d;
    color: #f5f6fa;
}

html[data-theme="dark"] .auth-page-body .auth-form-panel .form-input::placeholder {
    color: rgba(245, 246, 250, 0.48);
}

html[data-theme="dark"] .auth-page-body .auth-form-panel .divider {
    color: rgba(245, 246, 250, 0.6);
}

html[data-theme="dark"] .auth-page-body .auth-form-panel .alert-success {
    border-color: rgba(234, 163, 170, 0.45) !important;
    background: rgba(143, 51, 69, 0.2) !important;
    color: #f0c1c7 !important;
}

html[data-theme="dark"] .auth-page-body .theme-toggle-float {
    background: #682435;
    border-color: #682435;
}

html[data-theme="dark"] .auth-page-body .theme-toggle-float:hover {
    background: #8f3345;
    border-color: #8f3345;
}

@media (max-width: 900px) {
    .auth-page-body .login-page {
        padding: 20px;
    }

    .auth-page-body .auth-shell {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "form"
            "story";
        max-width: 680px;
    }

    .auth-form-panel {
        grid-area: form;
        padding: clamp(26px, 6vw, 52px);
    }

    .auth-page-body.auth-register-page .auth-story {
        position: relative;
        top: auto;
        grid-area: story;
        height: 340px;
        min-height: 0;
    }

    .auth-story-content {
        padding: 30px;
    }

    .auth-story-copy {
        padding-top: 24px;
    }

    .auth-story-copy h2 {
        max-width: 500px;
        font-size: clamp(28px, 5vw, 38px);
    }

    .auth-story-points {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
        margin-top: 20px;
    }

    .auth-story-points span {
        align-items: flex-start;
        gap: 7px;
        font-size: 11px;
    }

    .auth-story-points b {
        flex: 0 0 27px;
        width: 27px;
        height: 27px;
    }

    .auth-story-caption {
        display: none;
    }
}

@media (max-width: 520px) {
    .auth-page-body .login-page {
        padding: 10px 10px 14px;
    }

    .auth-page-body .auth-shell {
        border-radius: 15px;
    }

    .auth-form-panel {
        padding: 24px 18px;
    }

    .auth-form-panel .login-header {
        margin-bottom: 24px;
    }

    .auth-form-panel .login-title {
        font-size: 25px;
    }

    .auth-form-panel .form-group {
        margin-bottom: 18px;
    }

    .auth-form-panel .form-input {
        padding: 12px 14px;
    }

    .auth-form-panel .form-row {
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 22px;
    }

    .auth-form-panel .checkbox-label,
    .auth-form-panel .forgot-link {
        font-size: 12px;
    }

    .auth-story {
        height: 330px;
    }

    .auth-story-content {
        padding: 22px;
    }

    .auth-story-copy {
        padding-top: 20px;
    }

    .auth-story-copy h2 {
        margin: 13px 0 8px;
        font-size: 28px;
    }

    .auth-story-copy p {
        font-size: 13px;
        line-height: 1.55;
    }

    .auth-story-points {
        gap: 8px;
        margin-top: 15px;
    }

    .auth-story-points span {
        flex-direction: column;
        font-size: 10px;
    }

    .auth-page-body .theme-toggle-float {
        top: 12px;
        right: 12px;
    }
}
