body.auth-page {
    display: grid;
    min-height: 100vh;
    align-items: start;
    justify-items: center;
    padding: clamp(1rem, 3vw, 2.5rem);
    background:
        radial-gradient(ellipse at 12% 8%, rgba(116, 102, 255, 0.1), transparent 30rem),
        #090d14;
    color: #edf4f6;
}

body.auth-page.auth-login {
    align-items: center;
}

.login-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(380px, 0.9fr);
    align-items: stretch;
    width: min(100%, 1080px);
    max-width: 1080px;
    margin: 0;
    overflow: visible;
    border: 1px solid rgba(207, 218, 228, 0.16);
    border-radius: 24px;
    background: #111a24;
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.42);
}

.login-form {
    min-width: 0;
    padding: clamp(2rem, 4.5vw, 3.5rem);
    border-radius: 24px 0 0 24px;
    background: linear-gradient(155deg, #151f2a, #101821);
}

.login-form .logo {
    margin-bottom: clamp(1.7rem, 4vh, 2.8rem);
    color: #a7b5c1;
    font-size: 1.05rem;
    font-weight: 750;
    letter-spacing: -0.035em;
}

.login-form h1 {
    margin-bottom: 0.4rem;
    color: #f2f6f8;
    font-size: clamp(1.9rem, 3vw, 2.35rem);
    font-weight: 700;
    letter-spacing: -0.06em;
    line-height: 1.12;
}

.login-form > p {
    margin-bottom: 1.15rem;
    color: #a7b5c1;
    font-size: 0.94rem;
    line-height: 1.6;
}

.pill-row {
    gap: 0.4rem;
    margin-bottom: 1.5rem;
}

.login-form .pill {
    padding: 0.32rem 0.58rem;
    border: 1px solid rgba(164, 185, 198, 0.16);
    background: rgba(140, 240, 220, 0.07);
    color: #b7d8d0;
    font-size: 0.7rem;
    font-weight: 600;
}

.login-form .form-group {
    margin-bottom: 0.9rem;
}

.login-form label {
    margin-bottom: 0.35rem;
    color: #dce5eb;
    font-size: 0.84rem;
    font-weight: 650;
}

.login-form input:not([type="checkbox"]):not([type="radio"]) {
    min-height: 46px;
    padding: 0.7rem 0.85rem;
    border: 1px solid rgba(164, 185, 198, 0.2);
    border-radius: 10px;
    background: #0c131b;
    color: #f2f6f8;
    font-size: 0.92rem;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.password-field {
    position: relative;
}

.login-form .password-field input {
    width: 100%;
    padding-right: 4.5rem;
}

.login-form .password-visibility-toggle {
    position: absolute;
    top: 50%;
    right: 0.55rem;
    min-height: 34px;
    padding: 0.35rem 0.55rem;
    transform: translateY(-50%);
    border: 1px solid rgba(164, 185, 198, 0.18);
    border-radius: 7px;
    background: #17232e;
    color: #a7e8dc;
    font-size: 0.75rem;
    font-weight: 650;
    cursor: pointer;
}

.login-form .password-visibility-toggle:hover {
    border-color: rgba(140, 240, 220, 0.5);
    color: #8cf0dc;
}

.login-form .password-visibility-toggle:focus-visible {
    outline: 2px solid #8cf0dc;
    outline-offset: 2px;
}

.login-form input:not([type="checkbox"]):not([type="radio"])::placeholder {
    color: #82919d;
}

.login-form input:not([type="checkbox"]):not([type="radio"]):focus {
    border-color: #51bfa9;
    background: #101923;
    box-shadow: 0 0 0 3px rgba(81, 191, 169, 0.14);
}

.login-form .form-group .hint,
.login-form .username-status {
    color: #91a0ad;
    font-size: 0.75rem;
    line-height: 1.45;
}

.login-form .username-status.available {
    color: #72d5b5;
}

.login-form .username-status.unavailable,
.login-form .username-status.invalid {
    color: #ff999e;
}

.login-form .username-suggestions {
    gap: 0.35rem;
}

.login-form .username-suggestions button {
    min-height: 32px;
    border-color: rgba(140, 240, 220, 0.3);
    background: rgba(140, 240, 220, 0.08);
    color: #b7eee0;
    font-size: 0.78rem;
}

.login-form .username-suggestions button:hover,
.login-form .username-suggestions button:focus-visible {
    border-color: #8cf0dc;
    color: #8cf0dc;
}

.login-form .checkbox-label {
    color: #a7b5c1;
    font-size: 0.8rem;
    line-height: 1.5;
}

.login-form .checkbox-label a {
    color: #8cf0dc;
    font-weight: 650;
}

.login-form .btn-login {
    width: 100%;
    min-height: 48px;
    margin: 0.15rem 0 0;
    border-radius: 10px;
    background: #142d2a;
    color: #f3fffb;
    box-shadow: 0 8px 18px rgba(20, 45, 42, 0.14);
    font-size: 0.92rem;
}

.login-form .btn-login:hover {
    background: #1c4840;
    box-shadow: 0 10px 24px rgba(20, 45, 42, 0.2);
}

.login-form .btn-login:disabled {
    cursor: wait;
    opacity: 0.7;
    transform: none;
}

.login-form .signup-link {
    margin-top: 1.2rem;
    color: #a7b5c1;
    font-size: 0.84rem;
}

.login-form .signup-link a {
    color: #8cf0dc;
    font-weight: 700;
}

.login-form .two-factor-panel h2 {
    margin-bottom: 0.4rem;
    color: #f2f6f8;
    font-size: 1.35rem;
}

.login-form .two-factor-panel > p {
    margin-bottom: 1.2rem;
    color: #a7b5c1;
    font-size: 0.88rem;
    line-height: 1.6;
}

.login-form .two-factor-secondary {
    margin: 0.25rem 0.8rem 0 0;
    padding: 0.5rem 0;
    border: 0;
    background: transparent;
    color: #8cf0dc;
    font-weight: 650;
    cursor: pointer;
}

.login-form .two-factor-secondary:disabled {
    cursor: wait;
    opacity: 0.7;
}

.login-form .two-factor-status {
    display: block;
    color: #91a0ad;
    font-size: 0.78rem;
}

.login-form .two-factor-status.success {
    color: #72d5b5;
}

.login-form #verificationPanel h2 {
    margin-bottom: 0.4rem;
    color: #f2f6f8;
    font-size: 1.35rem;
}

.login-form #verificationPanel > p {
    margin-bottom: 1.2rem;
    color: #a7b5c1;
    font-size: 0.88rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.login-form #verificationEmail {
    color: #dce5eb;
}

.login-form .verification-resend {
    margin-top: 0.8rem;
    padding: 0.5rem 0;
    border: 0;
    background: transparent;
    color: #8cf0dc;
    font-weight: 650;
    cursor: pointer;
}

.login-form .verification-resend:disabled {
    cursor: wait;
    opacity: 0.7;
}

.login-form .verification-status {
    display: block;
    color: #91a0ad;
    font-size: 0.78rem;
}

.login-form .verification-status.success {
    color: #72d5b5;
}

.auth-preview {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    padding: clamp(2.2rem, 4vw, 3.3rem);
    border-radius: 0 24px 24px 0;
    background:
        radial-gradient(ellipse at 80% 34%, rgba(127, 116, 255, 0.15), transparent 58%),
        radial-gradient(ellipse at 14% 80%, rgba(80, 207, 190, 0.1), transparent 54%),
        #101923;
}

.auth-preview-copy {
    position: relative;
    z-index: 1;
    margin: 0;
}

.auth-preview-eyebrow {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: #91e4d2;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.auth-preview-eyebrow i,
.auth-profile-label i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #8cf0dc;
    box-shadow: 0 0 12px rgba(140, 240, 220, 0.75);
}

.auth-preview-copy h2 {
    margin: 0.85rem 0 0.45rem;
    color: #f4f7fb;
    font-size: clamp(1.7rem, 2.6vw, 2.1rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.065em;
}

.auth-preview-copy h2 span {
    color: transparent;
    background: linear-gradient(100deg, #8cf0dc 8%, #a4a0ff 85%);
    background-clip: text;
    -webkit-background-clip: text;
}

.auth-preview-copy > p {
    max-width: 350px;
    margin: 0;
    color: #a4b0ba;
    font-size: 0.82rem;
    line-height: 1.65;
}

.auth-preview-stage {
    position: relative;
    display: grid;
    min-height: 355px;
    place-items: center;
    margin: 0.25rem -0.5rem 0;
}

.auth-preview-glow {
    position: absolute;
    width: 78%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(140, 240, 220, 0.14), rgba(164, 160, 255, 0.18));
    filter: blur(58px);
}

.auth-profile-card {
    position: relative;
    z-index: 1;
    width: min(100%, 290px);
    overflow: hidden;
    border: 1px solid rgba(215, 230, 239, 0.17);
    border-radius: 18px;
    background: linear-gradient(155deg, #1d2b37, #111b25);
    box-shadow: 0 28px 65px rgba(0, 0, 0, 0.42), 0 0 45px rgba(131, 118, 255, 0.09);
    transform: rotate(2deg);
    animation: authPreviewFloat 7s ease-in-out infinite;
}

.auth-preview-toolbar {
    display: flex;
    height: 38px;
    align-items: center;
    gap: 5px;
    padding: 0 11px;
    border-bottom: 1px solid rgba(203, 216, 231, 0.08);
    background: rgba(255, 255, 255, 0.025);
}

.auth-preview-toolbar > span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f47e83;
}

.auth-preview-toolbar > span:nth-child(2) { background: #f0c66f; }
.auth-preview-toolbar > span:nth-child(3) { background: #76cfa7; }

.auth-preview-toolbar div {
    width: 170px;
    margin: 0 auto;
    padding: 4px 8px;
    overflow: hidden;
    border: 1px solid rgba(203, 216, 231, 0.08);
    border-radius: 5px;
    color: #768497;
    font-size: 0.52rem;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auth-profile {
    padding: 1.1rem 1.2rem 0.9rem;
    text-align: center;
}

.auth-avatar {
    display: grid;
    width: 56px;
    height: 56px;
    place-items: center;
    margin: 0 auto 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 50%;
    background: linear-gradient(135deg, #d2a27d, #936e9e 58%, #526a8e);
    box-shadow: 0 8px 25px rgba(164, 160, 255, 0.18);
    color: white;
    font-size: 1rem;
    font-weight: 700;
}

.auth-profile-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    color: #9de8d9;
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.auth-profile-label i {
    width: 4px;
    height: 4px;
}

.auth-profile h3 {
    margin: 0.45rem 0 0.15rem;
    color: #f2f5fa;
    font-size: 1rem;
    font-weight: 600;
}

.auth-profile > p {
    margin: 0 0 0.8rem;
    color: #9aa8b9;
    font-size: 0.63rem;
}

.auth-profile-link {
    display: flex;
    min-height: 36px;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.45rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid rgba(203, 216, 231, 0.11);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.055);
    color: #dce5ed;
    text-align: left;
}

.auth-profile-link > span {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 6px;
    background: rgba(140, 240, 220, 0.1);
    color: #8cf0dc;
    font-size: 0.75rem;
}

.auth-profile-link strong {
    flex: 1;
    font-size: 0.63rem;
    font-weight: 600;
}

.auth-profile-link b {
    color: #8492a3;
    font-size: 0.68rem;
    font-weight: 500;
}

.auth-profile-link.featured {
    border-color: rgba(140, 240, 220, 0.26);
    background: rgba(140, 240, 220, 0.09);
}

.auth-profile-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.62rem;
    border-top: 1px solid rgba(203, 216, 231, 0.08);
    color: #8290a1;
    font-size: 0.43rem;
    letter-spacing: 0.1em;
}

.auth-profile-footer span,
.auth-profile-footer strong {
    color: #a5a1ff;
}

.auth-float-card {
    position: absolute;
    z-index: 2;
    right: -0.65rem;
    bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(215, 230, 239, 0.17);
    border-radius: 11px;
    background: #1a2833;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.38);
    animation: authFloatCard 6s ease-in-out infinite;
}

.auth-float-card > span {
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 8px;
    background: rgba(140, 240, 220, 0.12);
    color: #8cf0dc;
    font-size: 0.8rem;
}

.auth-float-card div {
    display: grid;
    gap: 0.08rem;
}

.auth-float-card strong { color: #e5ecf4; font-size: 0.65rem; }
.auth-float-card small { color: #8795a7; font-size: 0.55rem; }
.auth-float-card > b { margin-left: 0.25rem; color: #8cf0dc; font-size: 0.67rem; }

.auth-preview-footnote {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #a4b0ba;
    font-size: 0.72rem;
}

.auth-preview-footnote span { color: #8cf0dc; }

.auth-register .auth-preview {
    position: sticky;
    top: 2rem;
    align-self: start;
    min-height: min(760px, calc(100vh - 4rem));
    justify-content: center;
    margin: 2rem 0;
    border-radius: 24px;
}

@keyframes authPreviewFloat {
    0%, 100% { transform: translateY(0) rotate(2deg); }
    50% { transform: translateY(-8px) rotate(1deg); }
}

@keyframes authFloatCard {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@media (max-width: 850px) {
    body.auth-page,
    body.auth-page.auth-login {
        align-items: start;
        padding: 1rem;
    }

    .login-container {
        grid-template-columns: minmax(0, 1fr);
        width: min(100%, 600px);
    }

    .login-form {
        border-radius: 24px 24px 0 0;
    }

    .auth-preview,
    .auth-register .auth-preview {
        position: relative;
        top: auto;
        min-height: auto;
        margin: 0;
        padding: 2rem;
        border-radius: 0 0 24px 24px;
    }

    .auth-preview-stage { min-height: 350px; }
}

@media (max-width: 480px) {
    body.auth-page,
    body.auth-page.auth-login {
        padding: 0.6rem;
    }

    .login-container { border-radius: 18px; }

    .login-form {
        padding: 1.5rem 1.2rem;
        border-radius: 18px 18px 0 0;
    }

    .login-form .logo { margin-bottom: 1.5rem; }
    .login-form h1 { font-size: 1.8rem; }

    .auth-preview,
    .auth-register .auth-preview {
        padding: 1.6rem 1.2rem;
        border-radius: 0 0 18px 18px;
    }

    .auth-preview-stage { min-height: 330px; }
    .auth-profile-card { width: min(88%, 285px); }
    .auth-float-card { right: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-profile-card,
    .auth-float-card {
        animation: none;
    }
}
