/* ==========================================================================
   登录 / 认证页皮肤：科幻渐变背景 + 玻璃卡片
   主色 #004DE3，所有规则都限定在「简易布局」（登录、找回密码等）内
   ========================================================================== */

body.fi-body:has(.fi-simple-layout) {
    background: #04081a;
}

/* ---------------------------------------------------------------- 背景舞台 */

body.fi-body:has(.fi-simple-layout) .fi-simple-layout {
    position: relative;
    isolation: isolate;
    /* 只裁横向，纵向仍可滚动（小屏/软键盘弹出时不会把卡片切掉） */
    overflow-x: clip;
    padding: 3rem 1.15rem;
    background:
        /* radial-gradient(1100px 620px at 12% 6%, rgba(0, 77, 227, 0.58), transparent 62%), */
        /* radial-gradient(900px 620px at 88% 14%, rgba(122, 92, 255, 0.40), transparent 64%),
        radial-gradient(1000px 760px at 50% 108%, rgba(0, 200, 255, 0.30), transparent 66%),
        linear-gradient(160deg, #050b1f 0%, #061130 26%, #071439 52%, #050d27 74%, #030716 100%); */
}

.login-scene {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

/* 卡片背后的光晕：让玻璃有东西可以「折射」 */
.login-scene-halo {
    position: absolute;
    top: 52%;
    left: 50%;
    width: 40rem;
    height: 26rem;
    border-radius: 50%;
    background:
        /* radial-gradient(ellipse at 42% 42%, rgba(40, 120, 255, 0.34), transparent 62%), */
        /* radial-gradient(ellipse at 72% 70%, rgba(0, 200, 255, 0.22), transparent 64%),
        radial-gradient(ellipse at 28% 78%, rgba(110, 82, 255, 0.24), transparent 66%); */
    filter: blur(60px);
    transform: translate(-50%, -50%);
    animation: login-halo 18s ease-in-out infinite;
}

@keyframes login-halo {
    0%, 100% { opacity: 0.62; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.85; transform: translate(-50%, -50%) scale(1.05); }
}

/* .login-scene-grid {
    position: absolute;
    inset: 0;
    opacity: 0.6;
    background-image:
        linear-gradient(to right, rgba(120, 175, 255, 0.22) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(120, 175, 255, 0.22) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 48%, rgba(0, 0, 0, 0.2) 0%, #000 58%, transparent 100%);
    mask-image: radial-gradient(ellipse 80% 70% at 50% 48%, rgba(0, 0, 0, 0.2) 0%, #000 58%, transparent 100%);
    animation: login-grid-drift 24s linear infinite;
} */

@keyframes login-grid-drift {
    from {
        background-position: 0 0, 0 0;
    }

    to {
        background-position: 0 66px, 0 66px;
    }
}

.login-scene-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(72px);
    opacity: 0.6;
    mix-blend-mode: screen;
    will-change: transform;
}

/* .login-scene-glow-a {
    width: 34rem;
    height: 34rem;
    top: -12rem;
    left: -10rem;
    background: radial-gradient(circle, rgba(0, 77, 227, 0.95), transparent 68%);
    animation: login-float-a 24s ease-in-out infinite;
}

.login-scene-glow-b {
    width: 30rem;
    height: 30rem;
    top: 6%;
    right: -9rem;
    background: radial-gradient(circle, rgba(122, 92, 255, 0.85), transparent 70%);
    animation: login-float-b 28s ease-in-out infinite;
}

.login-scene-glow-c {
    width: 38rem;
    height: 38rem;
    bottom: -20rem;
    left: 26%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.72), transparent 70%);
    animation: login-float-c 32s ease-in-out infinite;
} */

@keyframes login-float-a {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(4rem, 3rem, 0) scale(1.08); }
}

@keyframes login-float-b {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(-3.5rem, 4rem, 0) scale(1.12); }
}

@keyframes login-float-c {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(3rem, -3rem, 0) scale(1.06); }
}

/* .login-scene-stars span {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--s);
    height: var(--s);
    border-radius: 50%;
    background: #dceaff;
    box-shadow: 0 0 7px rgba(140, 190, 255, 0.9);
    animation: login-twinkle var(--d) ease-in-out var(--delay) infinite alternate;
} */

/* @keyframes login-twinkle {
    from {
        opacity: 0.12;
        transform: scale(0.7);
    }

    to {
        opacity: 0.9;
        transform: scale(1.15);
    }
}

.login-scene-scan {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(90, 170, 255, 0.6), transparent);
    box-shadow: 0 0 20px rgba(70, 150, 255, 0.6);
    animation: login-scan 11s linear infinite;
}

@keyframes login-scan {
    0% { opacity: 0; transform: translateY(0); }
    12% { opacity: 0.9; }
    88% { opacity: 0.9; }
    100% { opacity: 0; transform: translateY(100vh); }
} */

/* ------------------------------------------------------------ 玻璃登录卡片 */

body.fi-body:has(.fi-simple-layout) .fi-simple-main-ctn {
    position: relative;
    z-index: 2;
}

body.fi-body:has(.fi-simple-layout) .fi-simple-main {
    position: relative;
    width: 100%;
    max-width: 25.5rem;
    margin-block: 0;
    padding: 2.6rem 2.1rem 2.25rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 24px;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0.02) 40%, rgba(0, 77, 227, 0.16) 100%),
        rgba(7, 16, 40, 0.46);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    backdrop-filter: blur(30px) saturate(180%);
    box-shadow:
        0 42px 90px -32px rgba(1, 12, 45, 0.95),
        0 0 65px -14px rgba(0, 77, 227, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

/* 渐变描边 */
body.fi-body:has(.fi-simple-layout) .fi-simple-main::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: linear-gradient(140deg, rgba(56, 198, 255, 0.75), rgba(0, 77, 227, 0.05) 38%, rgba(122, 92, 255, 0.65) 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

/* 顶部高光 */
body.fi-body:has(.fi-simple-layout) .fi-simple-main::after {
    content: "";
    position: absolute;
    top: -1px;
    right: 16%;
    left: 16%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(140, 200, 255, 0.95), transparent);
}

body.fi-body:has(.fi-simple-layout) .fi-simple-page-content {
    row-gap: 1.35rem;
}

/* ------------------------------------------------------------------ 页头 */

body.fi-body:has(.fi-simple-layout) .fi-simple-header {
    gap: 0.9rem;
}

body.fi-body:has(.fi-simple-layout) .fi-simple-header .fi-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    color: #ffffff;
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-shadow: 0 0 22px rgba(90, 160, 255, 0.55);
}

body.fi-body:has(.fi-simple-layout) .fi-simple-header .fi-logo::before {
    content: "";
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 2px;
    background: linear-gradient(135deg, #6fe0ff, #004de3);
    box-shadow: 0 0 16px rgba(56, 198, 255, 0.95);
    transform: rotate(45deg);
}

body.fi-body:has(.fi-simple-layout) .fi-simple-header-heading {
    color: #f4f8ff;
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-indent: 0.18em;
    text-shadow: 0 4px 30px rgba(0, 90, 255, 0.55);
}

.login-sub {
    margin: -0.3rem 0 0;
    color: rgba(178, 198, 232, 0.85);
    font-size: 0.78125rem;
    letter-spacing: 0.12em;
    text-align: center;
}

/* ------------------------------------------------------------------ 表单 */

body.fi-body:has(.fi-simple-layout) .fi-fo-field-label-content {
    color: #a9bde0;
    font-size: 0.8125rem;
    letter-spacing: 0.06em;
}

body.fi-body:has(.fi-simple-layout) .fi-fo-field-label-required-mark {
    color: #5fa2ff;
}

body.fi-body:has(.fi-simple-layout) .fi-input-wrp {
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.055);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.13);
    transition: background 0.18s ease, box-shadow 0.18s ease;
}

body.fi-body:has(.fi-simple-layout) .fi-input-wrp:hover {
    background: rgba(255, 255, 255, 0.08);
}

body.fi-body:has(.fi-simple-layout) .fi-input-wrp:focus-within {
    background: rgba(0, 77, 227, 0.16);
    box-shadow:
        inset 0 0 0 1px rgba(110, 165, 255, 0.95),
        0 0 0 4px rgba(0, 77, 227, 0.22),
        0 0 26px rgba(0, 110, 255, 0.38);
}

body.fi-body:has(.fi-simple-layout) .fi-input {
    color: #f2f7ff;
    background: transparent;
    caret-color: #6fa8ff;
}

body.fi-body:has(.fi-simple-layout) .fi-input::placeholder {
    color: rgba(190, 208, 240, 0.4);
}

body.fi-body:has(.fi-simple-layout) .fi-input:-webkit-autofill,
body.fi-body:has(.fi-simple-layout) .fi-input:-webkit-autofill:hover,
body.fi-body:has(.fi-simple-layout) .fi-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #f2f7ff;
    -webkit-box-shadow: 0 0 0 1000px rgba(12, 26, 62, 0.96) inset;
    caret-color: #6fa8ff;
}

body.fi-body:has(.fi-simple-layout) .fi-input-wrp-actions button,
body.fi-body:has(.fi-simple-layout) .fi-input-wrp-suffix .fi-icon {
    color: rgba(170, 195, 235, 0.75);
}

/* 密码输入框右侧分隔线本来是浅灰，在深色玻璃上太跳 */
body.fi-body:has(.fi-simple-layout) .fi-input-wrp-suffix,
body.fi-body:has(.fi-simple-layout) .fi-input-wrp-prefix,
body.fi-body:has(.fi-simple-layout) .fi-input-wrp-content-ctn {
    border-color: rgba(255, 255, 255, 0.14);
    background-color: transparent;
}

/* 校验失败：输入框变红 */
body.fi-body:has(.fi-simple-layout) .fi-input-wrp:has([aria-invalid="true"]) {
    background: rgba(255, 70, 100, 0.1);
    box-shadow:
        inset 0 0 0 1px rgba(255, 110, 130, 0.85),
        0 0 0 4px rgba(255, 70, 100, 0.14);
}

body.fi-body:has(.fi-simple-layout) .fi-input-wrp-actions button:hover {
    color: #ffffff;
}

body.fi-body:has(.fi-simple-layout) .fi-fo-field-wrp-error-message {
    color: #ff9fae;
    font-size: 0.75rem;
}

/* 记住我 */
body.fi-body:has(.fi-simple-layout) input[type="checkbox"].fi-checkbox-input {
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.07);
    --tw-ring-color: rgba(255, 255, 255, 0.28);
    transition: background-color 0.16s ease, box-shadow 0.16s ease;
}

body.fi-body:has(.fi-simple-layout) input[type="checkbox"].fi-checkbox-input:checked {
    border-color: transparent;
    background-color: #2f7bff;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.4 8.6l3 3 6.2-7'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 76% 76%;
    box-shadow: 0 0 14px rgba(47, 123, 255, 0.65);
}

/* 登录按钮 */
body.fi-body:has(.fi-simple-layout) .fi-btn.fi-color-primary {
    position: relative;
    height: 2.85rem;
    border-radius: 12px;
    background: linear-gradient(118deg, #0038b8 0%, #004de3 42%, #2f7bff 100%);
    color: #ffffff;
    font-weight: 650;
    letter-spacing: 0.24em;
    text-indent: 0.24em;
    box-shadow:
        0 18px 36px -14px rgba(0, 77, 227, 0.98),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: transform 0.16s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

body.fi-body:has(.fi-simple-layout) .fi-btn.fi-color-primary:hover {
    filter: brightness(1.07);
    transform: translateY(-1px);
    box-shadow:
        0 24px 46px -16px rgba(0, 96, 255, 1),
        inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

body.fi-body:has(.fi-simple-layout) .fi-btn.fi-color-primary:active {
    transform: translateY(0);
    filter: brightness(0.97);
}

body.fi-body:has(.fi-simple-layout) .fi-btn.fi-color-primary > .fi-icon {
    color: #ffffff;
}

/* ------------------------------------------------------------------ 页脚 */

.login-foot {
    position: fixed;
    right: 0;
    bottom: 1.15rem;
    left: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    color: rgba(168, 188, 224, 0.5);
    font-size: 0.6875rem;
    letter-spacing: 0.12em;
    pointer-events: none;
}

.login-foot-dot {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: #3ee08f;
    box-shadow: 0 0 10px rgba(62, 224, 143, 0.95);
    animation: login-foot-pulse 2.2s ease-in-out infinite;
}

@keyframes login-foot-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.82); }
}

.login-foot-sep {
    color: rgba(255, 255, 255, 0.18);
}

/* ---------------------------------------------------------------- 响应式 */

@media (max-width: 480px) {
    body.fi-body:has(.fi-simple-layout) .fi-simple-layout {
        padding: 1.75rem 1rem 3.25rem;
    }

    body.fi-body:has(.fi-simple-layout) .fi-simple-main {
        padding: 2.15rem 1.35rem 1.85rem;
        border-radius: 20px;
    }

    body.fi-body:has(.fi-simple-layout) .fi-simple-header-heading {
        font-size: 1.35rem;
    }

    .login-foot {
        font-size: 0.625rem;
        letter-spacing: 0.06em;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-scene-grid,
    .login-scene-glow,
    .login-scene-stars span,
    .login-scene-scan,
    .login-foot-dot {
        animation: none;
    }
}
