body.auth-page-body {
    margin: 0;
    min-height: 100%;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 30%),
        radial-gradient(circle at bottom right, rgba(249, 115, 22, 0.12), transparent 28%),
        #f6f8fc;
}

.auth-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 0.86fr);
}

.auth-stage {
    position: relative;
    overflow: hidden;
    padding: 44px 48px 36px;
    color: #f8fbff;
    background: linear-gradient(145deg, #081225 0%, #13335e 52%, #1b4c86 100%);
}

.auth-stage-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,.78), transparent 92%);
}

.auth-stage-glow {
    position: absolute;
    border-radius: 999px;
    filter: blur(80px);
    pointer-events: none;
}

.auth-stage-glow-a {
    top: 14%;
    right: 8%;
    width: 260px;
    height: 260px;
    background: rgba(59, 130, 246, .34);
}

.auth-stage-glow-b {
    left: -10%;
    bottom: -16%;
    width: 360px;
    height: 360px;
    background: rgba(249, 115, 22, .26);
}

.auth-stage-top,
.auth-stage-body,
.auth-stage-footer {
    position: relative;
    z-index: 2;
}

.auth-stage-top,
.auth-stage-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-stage-brand {
    display: inline-flex;
    align-items: center;
    color: inherit;
    text-decoration: none;
    font-weight: 700;
}

.auth-stage-brand-image {
    display: block;
    width: 164px;
    max-width: 100%;
    height: auto;
}

.auth-stage-locale {
    font-size: 13px;
    color: rgba(248, 250, 252, .72);
}

.auth-stage-body {
    min-height: calc(100vh - 156px);
    display: grid;
    grid-template-columns: minmax(320px, 560px) minmax(280px, 1fr);
    align-items: center;
    gap: 28px;
}

.auth-characters-wrap {
    display: grid;
    place-items: center;
}

.auth-characters {
    position: relative;
    width: 550px;
    height: 400px;
}

.auth-figure {
    position: absolute;
    bottom: 0;
    transform-origin: bottom center;
    transition: transform .3s ease, height .3s ease;
    will-change: transform;
}

.auth-figure-purple {
    left: 70px;
    width: 180px;
    height: 400px;
    background: #6c3ff5;
    border-radius: 10px 10px 0 0;
    z-index: 1;
}

.auth-figure-black {
    left: 240px;
    width: 120px;
    height: 310px;
    background: #2d2d2d;
    border-radius: 8px 8px 0 0;
    z-index: 2;
}

.auth-figure-orange {
    left: 0;
    width: 240px;
    height: 200px;
    background: #ff9b6b;
    border-radius: 120px 120px 0 0;
    z-index: 3;
}

.auth-figure-yellow {
    left: 310px;
    width: 140px;
    height: 230px;
    background: #e8d754;
    border-radius: 70px 70px 0 0;
    z-index: 4;
}

.auth-face {
    position: absolute;
    display: flex;
    transition: left .3s ease, top .3s ease, transform .2s ease;
}

.auth-face-purple {
    left: 45px;
    top: 40px;
    gap: 32px;
}

.auth-face-black {
    left: 26px;
    top: 32px;
    gap: 24px;
}

.auth-face-orange {
    left: 82px;
    top: 90px;
    gap: 32px;
}

.auth-face-yellow {
    left: 52px;
    top: 40px;
    gap: 24px;
}

.auth-mouth-line {
    position: absolute;
    left: 40px;
    top: 88px;
    width: 80px;
    height: 4px;
    border-radius: 999px;
    background: #2d2d2d;
    transition: transform .2s ease;
}

.auth-eye-ball {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 999px;
    background: #ffffff;
    transition: height .12s ease;
}

.auth-eye-ball-small {
    width: 16px;
    height: 16px;
}

.auth-eye-ball-pupil {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #2d2d2d;
    transition: transform .2s ease;
}

.auth-eye-ball-pupil-small {
    width: 6px;
    height: 6px;
}

.auth-pupil {
    width: 12px;
    height: 12px;
    display: inline-block;
    border-radius: 999px;
    background: #2d2d2d;
    transition: transform .2s ease;
}

.auth-characters[data-auth-state="typing"] .auth-figure-purple {
    transform: skewX(-12deg) translateX(40px);
    height: 440px;
}

.auth-characters[data-auth-state="typing"] .auth-figure-black {
    transform: skewX(6deg);
}

.auth-characters[data-auth-state="guarding"] .auth-figure-purple {
    transform: skewX(-12deg) translateX(40px);
    height: 440px;
}

.auth-characters[data-auth-state="guarding"] .auth-eye-ball {
    height: 2px;
}

.auth-characters[data-auth-state="revealed"] .auth-figure-purple,
.auth-characters[data-auth-state="revealed"] .auth-figure-black,
.auth-characters[data-auth-state="revealed"] .auth-figure-orange,
.auth-characters[data-auth-state="revealed"] .auth-figure-yellow {
    transform: none;
}

.auth-stage-copy {
    max-width: 460px;
}

.auth-kicker {
    margin: 0 0 14px;
    font-size: 12px;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, .7);
}

.auth-stage-copy h1 {
    margin: 0;
    font-size: clamp(2.2rem, 4vw, 4.2rem);
    line-height: .98;
    letter-spacing: -.05em;
}

.auth-stage-text {
    margin: 18px 0 0;
    max-width: 42ch;
    font-size: 15px;
    line-height: 1.75;
    color: rgba(226, 232, 240, .76);
}

.auth-stage-list {
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}

.auth-stage-list li {
    position: relative;
    padding-left: 18px;
    line-height: 1.65;
    font-size: 14px;
    color: rgba(248, 250, 252, .8);
}

.auth-stage-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .68em;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #fb923c;
    box-shadow: 0 0 0 6px rgba(251, 146, 60, .16);
}

.auth-stage-footer {
    justify-content: flex-start;
    gap: 18px;
}

.auth-stage-footer a {
    color: rgba(248, 250, 252, .56);
    text-decoration: none;
    font-size: 13px;
}

.auth-stage-footer a:hover {
    color: rgba(255,255,255,.86);
}

.auth-panel {
    display: grid;
    place-items: center;
    padding: 40px 28px;
    min-height: 100vh;
    min-height: 100dvh;
    background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.98));
}

.auth-card-panel {
    width: min(430px, 100%);
    padding: 28px;
    border-radius: 28px;
    border: 1px solid rgba(148, 163, 184, .18);
    background: rgba(255,255,255,.92);
    box-shadow: 0 26px 70px rgba(15, 23, 42, .12);
}

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    text-decoration: none;
    font-size: 13px;
}

.auth-card-head {
    margin-top: 22px;
}

.auth-card-overline {
    margin: 0 0 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .22em;
    color: #64748b;
}

.auth-card-head h2 {
    margin: 0;
    font-size: 34px;
    line-height: 1;
    letter-spacing: -.05em;
    color: #0f172a;
}

.auth-card-subtitle {
    margin: 12px 0 0;
    color: #64748b;
    line-height: 1.65;
    font-size: 14px;
}

.auth-switcher {
    margin-top: 28px;
    display: inline-grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 6px;
    border-radius: 999px;
    background: #edf2f7;
}

.auth-switcher-btn {
    min-width: 138px;
    border: none;
    border-radius: 999px;
    padding: 11px 18px;
    background: transparent;
    color: #64748b;
    font: inherit;
    cursor: pointer;
    transition: background .22s ease, color .22s ease;
}

.auth-switcher-btn.is-active {
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
    color: #fff;
    box-shadow: 0 10px 24px rgba(29, 78, 216, .22);
}

.auth-page-error {
    margin-top: 20px;
    padding: 0 14px;
    max-height: 0;
    overflow: hidden;
    border-radius: 14px;
    background: #fff1f2;
    color: #be123c;
    font-size: 13px;
    line-height: 1.6;
    transition: max-height .24s ease, padding .24s ease;
}

.auth-page-error.is-visible {
    padding: 12px 14px;
    max-height: 120px;
}

.auth-page-form {
    margin-top: 20px;
    display: grid;
    gap: 15px;
}

.auth-page-form.is-hidden {
    display: none;
}

.auth-field {
    display: grid;
    gap: 7px;
}

.auth-field span {
    color: #334155;
    font-size: 13px;
    font-weight: 600;
}

.auth-field input {
    width: 100%;
    min-height: 50px;
    padding: 0 15px;
    border-radius: 16px;
    border: 1px solid #dbe4ee;
    background: #f8fafc;
    color: #0f172a;
    font: inherit;
    font-size: 16px;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.auth-field input:focus {
    outline: none;
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.auth-password-wrap {
    position: relative;
}

.auth-password-wrap input {
    padding-right: 52px;
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
}

.auth-password-icon-hide {
    display: none;
}

.auth-password-toggle.is-visible .auth-password-icon-show {
    display: none;
}

.auth-password-toggle.is-visible .auth-password-icon-hide {
    display: block;
}

.auth-submit-btn,
.auth-social-btn {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 18px;
    border: none;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
    touch-action: manipulation;
}

.auth-submit-btn {
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
    color: #fff;
    box-shadow: 0 14px 34px rgba(29, 78, 216, .22);
}

.auth-submit-btn:hover,
.auth-social-btn:hover {
    transform: translateY(-1px);
}

.auth-inline-link {
    justify-self: start;
    border: none;
    background: transparent;
    padding: 0;
    color: #2563eb;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.auth-support-copy {
    margin: -2px 0 2px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
}

.auth-divider {
    position: relative;
    margin: 22px 0 16px;
    text-align: center;
}

.auth-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    border-top: 1px solid #e2e8f0;
}

.auth-divider span {
    position: relative;
    padding: 0 12px;
    background: rgba(255,255,255,.92);
    color: #94a3b8;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .18em;
}

.auth-social-btn {
    width: 100%;
    border: 1px solid #d7e3f4;
    background: #fff;
    color: #0f172a;
}

.auth-social-btn.is-disabled {
    opacity: .56;
    pointer-events: auto;
}

@media (max-width: 1100px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-stage {
        padding: 28px 20px 22px;
    }

    .auth-stage-body {
        min-height: auto;
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .auth-characters {
        width: 420px;
        height: 320px;
        transform: scale(.82);
        transform-origin: center top;
    }
}

@media (max-width: 900px) {
    .auth-shell {
        display: block;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .auth-stage {
        display: none;
    }

    .auth-panel {
        min-height: 100vh;
        min-height: 100dvh;
        place-items: start center;
        padding:
            max(16px, env(safe-area-inset-top))
            max(16px, env(safe-area-inset-right))
            max(20px, calc(20px + env(safe-area-inset-bottom)))
            max(16px, env(safe-area-inset-left));
        background:
            radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 34%),
            radial-gradient(circle at bottom right, rgba(249, 115, 22, 0.08), transparent 30%),
            linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.99));
    }

    .auth-card-panel {
        width: min(100%, 520px);
        padding: 24px 18px;
        border-radius: 24px;
        box-shadow: 0 18px 44px rgba(15, 23, 42, .12);
    }

    .auth-back-link {
        min-height: 40px;
    }

    .auth-card-head {
        margin-top: 18px;
    }

    .auth-card-head h2 {
        font-size: 30px;
    }

    .auth-card-subtitle {
        font-size: 15px;
    }

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

    .auth-switcher {
        width: 100%;
    }

    .auth-switcher-btn {
        min-width: 0;
    }
}

@media (max-width: 720px) {
    .auth-panel {
        padding:
            max(16px, env(safe-area-inset-top))
            max(16px, env(safe-area-inset-right))
            max(24px, calc(24px + env(safe-area-inset-bottom)))
            max(16px, env(safe-area-inset-left));
    }

    .auth-card-panel {
        padding: 22px 16px 18px;
        border-radius: 22px;
    }

    .auth-characters {
        width: 320px;
        height: 230px;
        transform: scale(.6);
    }

    .auth-back-link {
        font-size: 12px;
    }

    .auth-card-overline {
        font-size: 10px;
    }

    .auth-card-head h2 {
        font-size: 27px;
    }

    .auth-switcher {
        gap: 6px;
        padding: 5px;
    }

    .auth-switcher-btn {
        min-height: 44px;
        padding-inline: 14px;
        font-size: 14px;
    }

    .auth-submit-btn,
    .auth-social-btn {
        min-height: 50px;
    }
}

@media (max-width: 420px) {
    .auth-card-panel {
        padding: 20px 14px 16px;
    }

    .auth-card-head h2 {
        font-size: 25px;
    }

    .auth-card-subtitle,
    .auth-stage-text,
    .auth-support-copy {
        font-size: 14px;
    }
}
