.auth-page {
    --auth-accent: rgb(var(--color-primary-500));
    --auth-accent-dark: rgb(var(--color-primary-700));
    --auth-text: #172033;
    --auth-muted: #6b7589;
    --auth-border: #e5e9f2;
    --auth-surface: #fff;
    --auth-background: #f6f7fb;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(460px, .78fr);
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    background: var(--auth-background);
    color: var(--auth-text);
    font-family: 'Inter Variable', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html.dark .auth-page {
    --auth-text: #f8fafc;
    --auth-muted: #94a3b8;
    --auth-border: #273449;
    --auth-surface: #111b2e;
    --auth-background: #08111f;
}

body > .marquee,
.cb-wrapper,
.tet-flowers,
.tt-wrap,
#popup-emc {
    display: none !important;
}

.auth-showcase {
    position: relative;
    isolation: isolate;
    display: flex;
    min-height: 100%;
    flex-direction: column;
    overflow: hidden;
    padding: clamp(32px, 4vw, 64px);
    color: #fff;
    background:
        radial-gradient(circle at 12% 8%, rgba(255, 255, 255, .2), transparent 30%),
        radial-gradient(circle at 90% 94%, rgba(255, 255, 255, .14), transparent 34%),
        linear-gradient(145deg, #7653e8 0%, #5935ce 48%, #32208b 100%);
}

.auth-showcase::before,
.auth-showcase::after {
    position: absolute;
    z-index: -1;
    width: 340px;
    height: 340px;
    content: '';
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 50%;
}

.auth-showcase::before {
    top: -190px;
    right: -80px;
    box-shadow: 0 0 0 70px rgba(255, 255, 255, .035), 0 0 0 140px rgba(255, 255, 255, .025);
}

.auth-showcase::after {
    bottom: -240px;
    left: -100px;
    box-shadow: 0 0 0 70px rgba(255, 255, 255, .035), 0 0 0 140px rgba(255, 255, 255, .025);
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 12px;
    color: #fff;
    font-size: 1rem;
    font-weight: 750;
    letter-spacing: -.01em;
}

.auth-brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    overflow: hidden;
    padding: 7px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 14px;
    background: rgba(255, 255, 255, .14);
    box-shadow: 0 10px 30px rgba(26, 14, 82, .22);
    backdrop-filter: blur(12px);
}

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

.auth-showcase-copy {
    position: relative;
    z-index: 2;
    max-width: 610px;
    margin-top: clamp(48px, 9vh, 104px);
}

.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    font-size: .72rem;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
    backdrop-filter: blur(12px);
}

.auth-eyebrow-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #8fffc1;
    box-shadow: 0 0 0 5px rgba(143, 255, 193, .12);
}

.auth-showcase-title {
    max-width: 560px;
    font-size: clamp(2.25rem, 4.4vw, 4.65rem);
    font-weight: 780;
    letter-spacing: -.055em;
    line-height: 1.04;
}

.auth-showcase-description {
    max-width: 530px;
    margin-top: 22px;
    color: rgba(255, 255, 255, .74);
    font-size: clamp(.95rem, 1.2vw, 1.08rem);
    line-height: 1.75;
}

.auth-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.auth-benefit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 12px;
    background: rgba(255, 255, 255, .09);
    color: rgba(255, 255, 255, .9);
    font-size: .78rem;
    font-weight: 650;
    backdrop-filter: blur(10px);
}

.auth-benefit svg {
    width: 16px;
    height: 16px;
    color: #a9ffd0;
}

.auth-illustration {
    position: absolute;
    z-index: 1;
    right: clamp(-70px, -3vw, -24px);
    bottom: clamp(-120px, -8vh, -52px);
    width: min(48vw, 610px);
    max-height: 58vh;
    object-fit: contain;
    opacity: .72;
    filter: drop-shadow(0 30px 35px rgba(25, 14, 78, .2));
    pointer-events: none;
}

.auth-panel {
    position: relative;
    z-index: 2;
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: clamp(28px, 4vw, 64px);
    background: radial-gradient(circle at 100% 0, rgba(139, 92, 246, .09), transparent 29%), var(--auth-background);
}

.auth-page--register .auth-panel {
    align-items: flex-start;
}

.auth-card {
    width: min(100%, 470px);
    margin: auto;
    padding: clamp(24px, 3vw, 38px);
    border: 1px solid var(--auth-border);
    border-radius: 28px;
    background: color-mix(in srgb, var(--auth-surface) 94%, transparent);
    box-shadow: 0 22px 70px rgba(35, 43, 71, .1);
}

.auth-page--register .auth-card {
    width: min(100%, 500px);
}

html.dark .auth-card {
    box-shadow: 0 24px 80px rgba(0, 0, 0, .32);
}

.auth-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--auth-muted);
    font-size: .82rem;
    font-weight: 650;
    transition: color .2s ease, transform .2s ease;
}

.auth-back-link:hover {
    color: var(--auth-accent);
    transform: translateX(-2px);
}

.auth-back-link svg {
    width: 18px;
    height: 18px;
}

.auth-theme-button {
    position: relative;
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--auth-border);
    border-radius: 13px;
    background: var(--auth-surface);
}

.auth-theme-button .nui-theme-toggle {
    display: grid !important;
    width: 100%;
    height: 100%;
    place-items: center;
    cursor: pointer;
}

.auth-theme-button .nui-theme-toggle-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.auth-theme-button .nui-theme-toggle-inner {
    display: grid !important;
    width: 100%;
    height: 100%;
    place-items: center;
    color: var(--auth-muted);
}

.auth-theme-button .nui-sun,
.auth-theme-button .nui-moon {
    width: 18px;
    height: 18px;
}

html.dark .auth-theme-button .nui-sun,
html.light .auth-theme-button .nui-moon {
    display: none !important;
}

html.dark .auth-theme-button .nui-moon,
html.light .auth-theme-button .nui-sun {
    display: block !important;
}

.auth-heading {
    color: var(--auth-text);
    font-size: clamp(1.75rem, 3vw, 2.15rem);
    font-weight: 780;
    letter-spacing: -.04em;
    line-height: 1.15;
}

.auth-subheading {
    margin-top: 10px;
    color: var(--auth-muted);
    font-size: .9rem;
    line-height: 1.65;
}

.auth-google-button {
    display: flex;
    width: 100%;
    height: 52px;
    align-items: center;
    justify-content: center;
    gap: 11px;
    margin-top: 24px;
    border: 1px solid var(--auth-border);
    border-radius: 14px;
    background: var(--auth-surface);
    color: var(--auth-text);
    font-size: .88rem;
    font-weight: 700;
    box-shadow: 0 7px 18px rgba(24, 31, 53, .04);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.auth-google-button:hover {
    border-color: color-mix(in srgb, var(--auth-accent) 45%, var(--auth-border));
    box-shadow: 0 10px 25px rgba(86, 62, 180, .1);
    transform: translateY(-1px);
}

.auth-google-button:focus-visible,
.auth-back-link:focus-visible,
.auth-submit:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--auth-accent) 28%, transparent);
    outline-offset: 3px;
}

.auth-google-button svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 24px 0;
    color: var(--auth-muted);
    font-size: .72rem;
    font-weight: 650;
    white-space: nowrap;
}

.auth-divider::before,
.auth-divider::after {
    height: 1px;
    flex: 1;
    content: '';
    background: var(--auth-border);
}

.auth-form {
    display: grid;
    gap: 17px;
}

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

.auth-card .nui-input-wrapper,
.auth-card .nui-input-outer {
    position: relative;
}

.auth-card .nui-input-label {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--auth-text);
    font-size: .78rem;
    font-weight: 720;
}

.auth-card .nui-input {
    width: 100%;
    height: 52px !important;
    padding-right: 46px !important;
    padding-left: 46px !important;
    border: 1px solid var(--auth-border) !important;
    border-radius: 14px !important;
    outline: 0;
    background: color-mix(in srgb, var(--auth-surface) 90%, var(--auth-background)) !important;
    color: var(--auth-text) !important;
    font-size: .88rem;
    box-shadow: none !important;
    transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.auth-card .nui-input::placeholder {
    color: color-mix(in srgb, var(--auth-muted) 72%, transparent);
}

.auth-card .nui-input:hover {
    border-color: color-mix(in srgb, var(--auth-muted) 48%, var(--auth-border)) !important;
}

.auth-card .nui-input:focus {
    border-color: var(--auth-accent) !important;
    background: var(--auth-surface) !important;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--auth-accent) 13%, transparent) !important;
}

.auth-card .nui-input-icon {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    display: grid;
    width: 46px;
    height: 52px;
    place-items: center;
    color: var(--auth-muted);
    pointer-events: none;
}

.auth-card .nui-input-icon-inner {
    width: 19px;
    height: 19px;
}

.auth-card .wt-pw-eye {
    position: absolute;
    top: 6px !important;
    right: 6px !important;
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--auth-muted);
    transition: color .2s ease, background-color .2s ease;
}

.auth-card .wt-pw-eye:hover {
    background: color-mix(in srgb, var(--auth-accent) 10%, transparent);
    color: var(--auth-accent);
}

.auth-card .nui-input-error .nui-input {
    border-color: #f43f5e !important;
    box-shadow: 0 0 0 3px rgba(244, 63, 94, .08) !important;
}

.auth-card .nui-input-help-text {
    margin-top: 6px;
    font-size: .72rem;
    line-height: 1.45;
}

.auth-password-hint {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 8px;
    color: var(--auth-muted);
    font-size: .7rem;
    line-height: 1.5;
}

.auth-password-hint svg {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    margin-top: 2px;
    color: var(--auth-accent);
}

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 1px;
}

.auth-card .nui-checkbox-label-text {
    color: var(--auth-muted);
    font-size: .76rem;
    line-height: 1.5;
}

.auth-card .nui-checkbox-label-wrapper {
    min-width: 0;
}

.auth-link,
.auth-inline-link {
    color: var(--auth-accent);
    font-size: .76rem;
    font-weight: 700;
}

.auth-link:hover {
    color: var(--auth-accent-dark);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.auth-submit {
    display: flex;
    width: 100%;
    height: 52px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 3px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--auth-accent), var(--auth-accent-dark));
    color: #fff;
    font-size: .9rem;
    font-weight: 740;
    box-shadow: 0 13px 28px color-mix(in srgb, var(--auth-accent) 26%, transparent);
    transition: filter .2s ease, box-shadow .2s ease, transform .2s ease;
}

.auth-submit:hover:not(:disabled) {
    filter: saturate(1.12) brightness(1.03);
    box-shadow: 0 16px 32px color-mix(in srgb, var(--auth-accent) 34%, transparent);
    transform: translateY(-1px);
}

.auth-submit:disabled {
    cursor: not-allowed;
    opacity: .58;
    box-shadow: none;
}

.auth-submit svg {
    width: 18px;
    height: 18px;
}

.auth-switch {
    margin-top: 22px;
    color: var(--auth-muted);
    font-size: .8rem;
    text-align: center;
}

.auth-switch .auth-link {
    margin-left: 4px;
}

.auth-security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 20px;
    color: color-mix(in srgb, var(--auth-muted) 84%, transparent);
    font-size: .68rem;
}

.auth-security-note svg {
    width: 14px;
    height: 14px;
}

.auth-captcha-wrap {
    position: relative;
    z-index: 10;
    min-height: 50px;
    overflow: visible;
}

.auth-captcha-wrap .ws-captcha {
    width: 100%;
    min-height: 50px;
}

.auth-page--register .auth-form {
    gap: 14px;
}

.auth-page--register .auth-toolbar {
    margin-bottom: 22px;
}

.auth-page--register .auth-google-button {
    margin-top: 20px;
}

.auth-page--register .auth-divider {
    margin: 20px 0;
}

@media (max-width: 1100px) {
    .auth-page {
        display: block;
        overflow: visible;
    }

    .auth-showcase {
        display: none;
    }

    .auth-panel {
        min-height: 100vh;
        min-height: 100svh;
        padding: 32px 20px;
    }
}

@media (max-width: 560px) {
    .auth-panel {
        align-items: flex-start;
        padding: 0;
        background: var(--auth-surface);
    }

    .auth-card,
    .auth-page--register .auth-card {
        width: 100%;
        min-height: 100vh;
        min-height: 100svh;
        padding: 24px 20px 30px;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .auth-toolbar {
        margin-bottom: 26px;
    }

    .auth-heading {
        font-size: 1.75rem;
    }

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

    .auth-options {
        align-items: flex-start;
    }
}

@media (max-width: 370px) {
    .auth-options {
        flex-direction: column;
        gap: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-page *,
    .auth-page *::before,
    .auth-page *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
