*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

@keyframes login-float {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes login-pulse-slow {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

@keyframes login-shake {
    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

:root {
    --login-dvh: 100dvh;
    --login-keyboard-offset: 0px;
    --login-safe-top: env(safe-area-inset-top, 0px);
    --login-safe-right: env(safe-area-inset-right, 0px);
    --login-safe-bottom: env(safe-area-inset-bottom, 0px);
    --login-safe-left: env(safe-area-inset-left, 0px);
}

html {
    height: 100%;
    background: #020617;
    overflow-x: clip;
    overscroll-behavior: none;
}

body.login-page {
    font-family: var(--font-sans);
    min-height: 100%;
    height: 100%;
    width: 100%;
    background: #020617;
    color: #f8fafc;
    overflow: hidden;
    overflow-x: clip;
    position: relative;
    overscroll-behavior: none;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.login-page a,
body.login-page button,
body.login-page input,
body.login-page [role="button"] {
    -webkit-tap-highlight-color: transparent;
}

.cyber-dots {
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

.tech-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    z-index: 1;
    overflow: hidden;
}

.bg-grid-pattern {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.4;
    pointer-events: none;
    will-change: transform, opacity;
}

.blob-1 {
    background-color: #2563eb;
    width: 500px;
    height: 500px;
    top: -10%;
    left: 10%;
    animation: login-float 6s ease-in-out infinite;
}

.blob-2 {
    background-color: #9333ea;
    width: 600px;
    height: 600px;
    top: 20%;
    right: -10%;
    animation: login-pulse-slow 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.blob-3 {
    background-color: #059669;
    width: 400px;
    height: 400px;
    bottom: 10%;
    left: -5%;
    animation: login-float 6s ease-in-out infinite 3s;
}

.login-shell {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 100%;
    min-height: var(--login-dvh, 100dvh);
    height: var(--login-dvh, 100dvh);
    padding:
        calc(var(--login-safe-top) + clamp(0.75rem, 2.2vw, 1.5rem))
        calc(var(--login-safe-right) + clamp(0.75rem, 2.5vw, 1.75rem))
        calc(var(--login-safe-bottom) + clamp(0.75rem, 2vw, 1.5rem))
        calc(var(--login-safe-left) + clamp(0.75rem, 2.5vw, 1.75rem));
    overflow: clip;
}

.login-scroll {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable both-edges;
    display: flex;
    justify-content: center;
    scroll-padding-block: 1rem 6rem;
}

.login-scroll-body {
    width: min(100%, 540px);
    min-height: 100%;
    padding-block: 0.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-wrapper {
    position: relative;
    width: 100%;
    max-width: min(440px, 100%);
    padding: clamp(0.75rem, 2vw, 1.5rem);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: auto 0;
}

.login-card {
    position: relative;
    z-index: 2;
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    padding: 2.5rem;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.4),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    transition: transform 0.32s ease, box-shadow 0.32s ease, border-color 0.32s ease;
}

.display-none {
    display: none !important;
}

@media (hover: hover) and (pointer: fine) {
    .login-card:hover {
        transform: translateY(-5px);
        box-shadow:
            0 30px 60px -12px rgba(0, 0, 0, 0.6),
            0 0 40px rgba(59, 130, 246, 0.15);
        border-color: rgba(255, 255, 255, 0.2);
    }
}

.brand-section {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo-container {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 4px 20px rgba(0, 0, 0, 0.5);
    padding: 1rem;
}

.logo-container img {
    max-width: 100%;
    height: auto;
}

.brand-section h1 {
    font-family: var(--font-sans);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    background: linear-gradient(to bottom right, #ffffff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-section p {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.form-group {
    margin-bottom: 1.25rem;
    position: relative;
}

.form-group:last-of-type {
    margin-bottom: 0.5rem;
}

.form-group-spacious {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1.25rem;
    color: #64748b;
    font-size: 1rem;
    transition: color 0.24s ease;
    pointer-events: none;
}

.form-control,
.otp-digit {
    appearance: none;
    -webkit-appearance: none;
}

.form-control {
    width: 100%;
    min-height: 54px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1rem 1rem 1rem 3rem;
    color: #ffffff;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: border-color 0.24s ease, box-shadow 0.24s ease, background-color 0.24s ease;
}

.form-control::placeholder {
    color: #475569;
}

.form-control:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.4);
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.form-control:focus ~ .input-icon {
    color: #3b82f6;
}

.password-toggle {
    position: absolute;
    right: 0.85rem;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    color: #64748b;
    cursor: pointer;
    transition: color 0.24s ease, background-color 0.24s ease, opacity 0.24s ease;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}

.forgot-link,
.btn-secondary,
.login-2fa-switch {
    touch-action: manipulation;
}

.forgot-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #93c5fd;
    text-decoration: none;
    float: right;
    transition: color 0.24s ease, opacity 0.24s ease;
    font-weight: 500;
}

.forgot-link:hover,
.forgot-link:focus-visible {
    color: #ffffff;
    outline: none;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    cursor: pointer;
}

.remember-me input {
    accent-color: #3b82f6;
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

.remember-me span {
    font-size: 0.875rem;
    color: #cbd5e1;
}

.btn-modern {
    width: 100%;
    min-height: 54px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
    border: 0;
    border-radius: 14px;
    padding: 1rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease, opacity 0.24s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    touch-action: manipulation;
}

.btn-modern:hover,
.btn-modern:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.6);
    background: linear-gradient(135deg, #4f46e5, #3b82f6);
    outline: none;
}

.btn-modern:active {
    transform: translateY(0);
}

.btn-modern:disabled,
.btn-modern.is-busy,
.password-toggle.is-busy,
.forgot-link.is-busy,
.btn-secondary.is-busy,
.login-2fa-switch.is-busy {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
}

.btn-secondary {
    display: block;
    text-align: center;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.24s ease, opacity 0.24s ease;
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
    color: #ffffff;
    outline: none;
}

.alert-error {
    display: none;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.alert-error.active {
    display: block;
    animation: login-shake 0.5s;
}

.login-footer {
    margin-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    line-height: 1.5;
}

.forgot-step-help {
    font-size: 0.875rem;
    color: #cbd5e1;
    margin-bottom: 0;
    text-align: center;
}

.forgot-resend {
    text-align: center;
    margin-top: 1rem;
}

.forgot-resend a {
    color: #3b82f6;
    font-size: 0.8rem;
    text-decoration: none;
}

.otp-container {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.otp-digit {
    width: 100%;
    aspect-ratio: 1;
    min-height: 56px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease, background-color 0.24s ease;
    touch-action: manipulation;
}

@media (pointer: coarse), (max-width: 820px) {
    .form-control,
    .otp-digit,
    .login-2fa-input {
        font-size: 16px;
    }
}

.otp-digit:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.login-2fa-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding:
        calc(var(--login-safe-top) + 1rem)
        calc(var(--login-safe-right) + 1rem)
        calc(var(--login-safe-bottom) + 1rem)
        calc(var(--login-safe-left) + 1rem);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.login-2fa-overlay.active {
    display: flex;
}

.login-2fa-modal {
    position: relative;
    margin: auto;
    width: 100%;
    max-width: 400px;
    max-height: calc(var(--login-dvh, 100dvh) - 2rem - var(--login-safe-top) - var(--login-safe-bottom));
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.login-2fa-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 0;
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    font-size: 1.25rem;
    cursor: pointer;
    transition: background-color 0.24s ease, color 0.24s ease, opacity 0.24s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

.login-2fa-close:hover,
.login-2fa-close:focus-visible {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
}

.login-2fa-head h2 {
    font-family: var(--font-sans);
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.login-2fa-head p {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-bottom: 1.5rem;
}

.login-2fa-form {
    margin-bottom: 1.5rem;
}

.login-2fa-switch {
    background: none;
    border: 0;
    color: #3b82f6;
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    transition: color 0.24s ease, opacity 0.24s ease;
}

.login-2fa-switch:hover,
.login-2fa-switch:focus-visible {
    color: #bfdbfe;
    outline: none;
}

.login-2fa-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.login-2fa-cancel {
    flex: 1;
    min-height: 52px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.24s ease, opacity 0.24s ease;
    touch-action: manipulation;
}

.login-2fa-cancel:hover,
.login-2fa-cancel:focus-visible {
    background: rgba(255, 255, 255, 0.1);
    outline: none;
}

.login-2fa-submit {
    flex: 2;
    margin: 0;
}

.login-2fa-kicker {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #3b82f6;
    font-weight: 700;
}

.login-2fa-input {
    padding-left: 1rem;
    letter-spacing: 2px;
    font-weight: 700;
}

body.login-page.login-2fa-open {
    overflow: hidden;
}

@supports not ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
    .login-card,
    .login-2fa-modal {
        background: rgba(15, 23, 42, 0.92);
    }
}

.panda-container {
    position: relative;
    width: 160px;
    height: 120px;
    margin: 0 auto -0.15rem;
    z-index: 10;
    pointer-events: none;
    isolation: isolate;
    transition: opacity 0.24s ease;
    --eye-x: 0px;
    --eye-y: 0px;
    --head-x: 0px;
    --head-y: 0px;
    --patch-y: 0px;
    --patch-scale: 1;
    --head-rot: 0deg;
    --mouth-h: 10px;
    --mouth-w: 30px;
    --mouth-border: 2px solid #1e293b;
    --mouth-border-t: none;
    --mouth-y: 75px;
    --ear-y: 0px;
    --ear-rot-l: -25deg;
    --ear-rot-r: 25deg;
}

.panda-head {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 160px;
    height: 110px;
    background: #ffffff;
    border-radius: 50% 50% 40% 40% / 60% 60% 40% 40%;
    box-shadow: inset -5px -10px 20px rgba(0, 0, 0, 0.1), 0 10px 20px rgba(0, 0, 0, 0.2);
    transform: translate(var(--head-x), var(--head-y)) rotate(var(--head-rot));
    transform-origin: bottom center;
    transition: background 0.3s ease, transform 0.2s ease-out;
    z-index: 2;
}

.panda-ear {
    position: absolute;
    top: -15px;
    width: 50px;
    height: 45px;
    background: radial-gradient(circle at 35% 30%, #3f4c61 0%, #2a3648 46%, #192334 100%);
    border-radius: 50%;
    z-index: 1;
    border: 2px solid rgba(148, 163, 184, 0.28);
    transition: transform 0.3s ease;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
    will-change: transform;
    outline: 1px solid rgba(203, 213, 225, 0.18);
    outline-offset: -2px;
}

.panda-ear.left {
    left: 5px;
    transform: translateY(var(--ear-y)) rotate(var(--ear-rot-l));
}

.panda-ear.right {
    right: 5px;
    transform: translateY(var(--ear-y)) rotate(var(--ear-rot-r));
}

.panda-eye-patch {
    position: absolute;
    top: 25px;
    width: 48px;
    height: 58px;
    background: #1e293b;
    border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%;
    transition: transform 0.2s ease-out;
}

.panda-eye-patch.left {
    left: 22px;
    transform: translate(calc(var(--head-x) * 0.4), calc(var(--head-y) * 0.4 + var(--patch-y))) rotate(-15deg) scale(var(--patch-scale));
}

.panda-eye-patch.right {
    right: 22px;
    transform: translate(calc(var(--head-x) * 0.4), calc(var(--head-y) * 0.4 + var(--patch-y))) rotate(15deg) scale(var(--patch-scale));
}

.panda-eye {
    position: absolute;
    top: 18px;
    width: 16px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    overflow: hidden;
    transition: height 0.3s ease, top 0.3s ease;
}

.left .panda-eye {
    right: 12px;
}

.right .panda-eye {
    left: 12px;
}

.panda-pupil {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: #000000;
    border-radius: 50%;
    transform: translate(calc(-50% + var(--eye-x)), calc(-50% + var(--eye-y)));
    transition: transform 0.1s;
}

.panda-pupil::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 3px;
    height: 3px;
    background: #ffffff;
    border-radius: 50%;
}

.panda-nose {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 12px;
    background: #1e293b;
    border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%;
}

.panda-mouth {
    position: absolute;
    top: var(--mouth-y);
    left: 50%;
    transform: translateX(-50%);
    width: var(--mouth-w);
    height: var(--mouth-h);
    border-bottom: var(--mouth-border);
    border-top: var(--mouth-border-t);
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.panda-arm {
    position: absolute;
    bottom: -30px;
    width: 45px;
    height: 70px;
    background: #ffffff;
    border-radius: 30px;
    box-shadow: inset -2px -5px 10px rgba(0, 0, 0, 0.1), 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 10;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform-origin: bottom center;
}

.panda-arm::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 25px;
    height: 20px;
    background: #1e293b;
    border-radius: 50%;
    opacity: 0.1;
}

.panda-arm.left {
    left: -10px;
    transform: rotate(-20deg) translateY(40px);
}

.panda-arm.right {
    right: -10px;
    transform: rotate(20deg) translateY(40px);
}

.panda-container.password-focus .panda-arm.left {
    transform: rotate(35deg) translateY(-85px) translateX(25px);
}

.panda-container.password-focus .panda-arm.right {
    transform: rotate(-35deg) translateY(-85px) translateX(-25px);
}

.panda-container.password-focus {
    --head-y: 10px;
}

.panda-container.password-peek .panda-arm.left {
    transform: rotate(15deg) translateY(-40px) translateX(-10px);
}

.panda-container.password-peek .panda-arm.right {
    transform: rotate(-35deg) translateY(-85px) translateX(-25px);
}

.panda-container.sad {
    --head-y: 15px;
    --head-rot: 5deg;
    --patch-y: 5px;
    --patch-scale: 0.9;
    --ear-y: 15px;
    --ear-rot-l: -65deg;
    --ear-rot-r: 65deg;
    --mouth-border: none;
    --mouth-border-t: 3px solid #1e293b;
    --mouth-w: 20px;
    --mouth-h: 15px;
    --mouth-y: 85px;
}

.panda-container.sad .panda-head {
    background: #f1f5f9;
}

.panda-container.sad .panda-pupil {
    background: transparent;
    border: 2px solid #1e293b;
    border-radius: 0;
    width: 12px;
    height: 12px;
    transform: translate(-50%, -50%) rotate(45deg) !important;
    transition: all 0.3s ease;
}

.panda-container.sad .panda-pupil::after {
    width: 12px;
    height: 12px;
    background: transparent;
    border-bottom: 2px solid #1e293b;
    top: -2px;
    left: -2px;
    border-radius: 0;
    transform: rotate(90deg) translate(-2px, -2px);
}

.panda-container.happy {
    --head-y: -15px;
    --ear-y: -5px;
    --mouth-y: 70px;
    --mouth-w: 40px;
    --mouth-h: 25px;
    --mouth-border: 5px solid #1e293b;
}

.panda-container.happy .panda-eye {
    height: 10px;
    top: 23px;
}

.panda-container.happy .panda-pupil {
    display: none;
}

.panda-container.happy .panda-arm.left {
    transform: rotate(-130deg) translateY(-20px) translateX(-50px);
}

.panda-container.happy .panda-arm.right {
    transform: rotate(130deg) translateY(-20px) translateX(50px);
}

.panda-container.curious {
    --head-rot: 10deg;
    --head-y: 5px;
}

body[data-login-reduced-effects='1'] .blob {
    animation: none;
    filter: none;
    opacity: 0.18;
}

body[data-login-reduced-effects='1'] .blob-2,
body[data-login-reduced-effects='1'] .blob-3 {
    display: none;
}

body[data-login-reduced-effects='1'] .login-card,
body[data-login-reduced-effects='1'] .login-2fa-modal,
body[data-login-reduced-effects='1'] .login-2fa-overlay {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body[data-login-reduced-effects='1'] .login-card,
body[data-login-reduced-effects='1'] .login-2fa-modal {
    background: rgba(15, 23, 42, 0.92);
}

body[data-login-reduced-effects='1'] .bg-grid-pattern {
    opacity: 0.32;
}

body[data-login-reduced-effects='1'] .tech-bg {
    background:
        radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.22), transparent 32%),
        linear-gradient(140deg, #0f172a 0%, #111827 52%, #020617 100%);
}

body[data-login-reduced-effects='1'] .login-card,
body[data-login-reduced-effects='1'] .btn-modern,
body[data-login-reduced-effects='1'] .panda-head,
body[data-login-reduced-effects='1'] .panda-ear,
body[data-login-reduced-effects='1'] .panda-eye,
body[data-login-reduced-effects='1'] .panda-eye-patch,
body[data-login-reduced-effects='1'] .panda-arm,
body[data-login-reduced-effects='1'] .panda-mouth,
body[data-login-reduced-effects='1'] .panda-pupil {
    transition-duration: 0.01ms !important;
    animation: none !important;
}

body[data-login-reduced-effects='1'] .panda-container {
    opacity: 0.92;
}

body[data-login-keyboard-open='1'] .login-scroll-body {
    align-items: flex-start;
}

body[data-login-keyboard-open='1'] .login-wrapper {
    gap: 0.75rem;
    margin: 0;
    padding-block: 0.25rem 0.75rem;
}

body[data-login-keyboard-open='1'] .login-card {
    padding: 1.25rem 1rem;
    border-radius: 20px;
}

body[data-login-keyboard-open='1'] .brand-section {
    margin-bottom: 1.2rem;
}

body[data-login-keyboard-open='1'] .logo-container {
    width: 60px;
    height: 60px;
    margin-bottom: 0.8rem;
}

body[data-login-keyboard-open='1'] .brand-section h1 {
    font-size: 1.55rem;
}

body[data-login-keyboard-open='1'] .brand-section p {
    font-size: 0.72rem;
    letter-spacing: 1.5px;
}

body[data-login-keyboard-open='1'] .remember-me {
    margin-top: 0.85rem;
    margin-bottom: 1rem;
}

body[data-login-keyboard-open='1'] .login-footer {
    margin-top: 0.5rem;
}

@media (max-width: 720px) {
    .login-shell {
        padding-top: calc(var(--login-safe-top) + 0.5rem);
    }

    .login-wrapper {
        max-width: 100%;
        padding-inline: 0.25rem;
    }

    .login-card {
        padding: 1.5rem 1.25rem;
        border-radius: 22px;
    }

    .login-footer {
        margin-top: 1rem;
    }

    .login-2fa-modal {
        padding: 1.5rem 1rem;
        border-radius: 20px;
    }
}

@media (max-width: 560px) {
    .brand-section {
        margin-bottom: 1.9rem;
    }

    .logo-container {
        width: 72px;
        height: 72px;
        margin-bottom: 1.1rem;
    }

    .brand-section h1 {
        font-size: 1.75rem;
    }

    .otp-container {
        gap: 0.35rem;
    }

    .otp-digit {
        font-size: 1.3rem;
        min-height: 52px;
    }

    .panda-container {
        width: 144px;
        height: 108px;
        transform: scale(0.92);
    }
}

@media (max-height: 760px) {
    .login-scroll-body {
        align-items: flex-start;
    }

    .login-wrapper {
        gap: 0.75rem;
        margin: 0;
        padding-block: 0.35rem 0.75rem;
    }

    .login-card {
        padding: 1.4rem 1.1rem;
        border-radius: 22px;
    }

    .brand-section {
        margin-bottom: 1.6rem;
    }

    .logo-container {
        width: 68px;
        height: 68px;
        margin-bottom: 1rem;
    }

    .brand-section h1 {
        font-size: 1.7rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .remember-me {
        margin-top: 1rem;
        margin-bottom: 1.25rem;
    }

    .login-footer {
        margin-top: 0.5rem;
    }
}

@media (max-height: 640px) {
    .login-shell {
        padding-top: calc(var(--login-safe-top) + 0.35rem);
        padding-bottom: calc(var(--login-safe-bottom) + 0.5rem);
    }

    .login-card {
        padding: 1.2rem 1rem;
        border-radius: 20px;
    }

    .brand-section {
        margin-bottom: 1.2rem;
    }

    .logo-container {
        width: 60px;
        height: 60px;
        margin-bottom: 0.75rem;
    }

    .brand-section h1 {
        font-size: 1.55rem;
    }

    .brand-section p {
        font-size: 0.72rem;
        letter-spacing: 1.5px;
    }

    .form-control,
    .btn-modern,
    .login-2fa-cancel {
        min-height: 50px;
    }

    .remember-me {
        margin-top: 0.85rem;
        margin-bottom: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .blob,
    .login-card,
    .btn-modern,
    .otp-digit,
    .panda-head,
    .panda-ear,
    .panda-eye,
    .panda-eye-patch,
    .panda-arm,
    .panda-mouth,
    .panda-pupil {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}
