/* ===================== 登录页：AI 液冷动态视觉 ===================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: #030812;
    color: #e7f2ff;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===================== 背景层 ===================== */
.scene {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    background:
        radial-gradient(1100px 720px at 8% 6%, rgba(34, 211, 238, 0.16), transparent 62%),
        radial-gradient(900px 640px at 92% 12%, rgba(99, 102, 241, 0.2), transparent 60%),
        radial-gradient(1000px 800px at 50% 110%, rgba(14, 116, 144, 0.28), transparent 65%),
        linear-gradient(160deg, #04091a 0%, #061023 45%, #03070f 100%);
}

/* 网格 */
.grid-overlay {
    position: absolute;
    inset: -20%;
    background-image:
        linear-gradient(rgba(90, 190, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(90, 190, 255, 0.07) 1px, transparent 1px);
    background-size: 56px 56px;
    transform: perspective(620px) rotateX(58deg) translateY(-8%);
    mask-image: radial-gradient(circle at 50% 40%, #000 10%, transparent 72%);
    -webkit-mask-image: radial-gradient(circle at 50% 40%, #000 10%, transparent 72%);
    animation: gridDrift 22s linear infinite;
    pointer-events: none;
}

@keyframes gridDrift {
    to {
        background-position: 0 56px, 56px 0;
    }
}

/* 液冷光晕色块 */
.blobs {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.5;
    mix-blend-mode: screen;
}

.b1 {
    width: 460px;
    height: 460px;
    left: -80px;
    top: 4%;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.65), transparent 68%);
    animation: floatA 17s ease-in-out infinite;
}

.b2 {
    width: 400px;
    height: 400px;
    right: -60px;
    top: 12%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.6), transparent 68%);
    animation: floatB 21s ease-in-out infinite;
}

.b3 {
    width: 520px;
    height: 520px;
    left: 32%;
    bottom: -160px;
    background: radial-gradient(circle, rgba(129, 140, 248, 0.5), transparent 70%);
    animation: floatA 25s ease-in-out infinite reverse;
}

@keyframes floatA {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(46px, -52px) scale(1.16);
    }
}

@keyframes floatB {
    0%, 100% {
        transform: translate(0, 0) scale(1.05);
    }
    50% {
        transform: translate(-54px, 40px) scale(0.92);
    }
}

/* 上升气泡 */
.particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.bubble {
    position: absolute;
    bottom: -40px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 30%, rgba(190, 245, 255, 0.95), rgba(34, 211, 238, 0.35) 55%, rgba(34, 211, 238, 0) 72%);
    border: 1px solid rgba(160, 235, 255, 0.32);
    animation: rise linear infinite;
}

@keyframes rise {
    0% {
        transform: translateY(0) translateX(0) scale(0.7);
        opacity: 0;
    }
    8% {
        opacity: 0.85;
    }
    55% {
        transform: translateY(-46vh) translateX(16px) scale(1);
        opacity: 0.7;
    }
    100% {
        transform: translateY(-96vh) translateX(-14px) scale(1.1);
        opacity: 0;
    }
}

/* 底部水波 */
.waves {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 300px;
    pointer-events: none;
    opacity: 0.75;
}

.wave-track {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 200%;
    height: 100%;
    display: flex;
}

.wave-track svg {
    width: 50%;
    height: 100%;
    flex: 0 0 50%;
}

.wave-1 {
    animation: waveShift 18s linear infinite;
    opacity: 0.42;
}

.wave-2 {
    animation: waveShift 26s linear infinite reverse;
    opacity: 0.3;
}

.wave-3 {
    animation: waveShift 34s linear infinite;
    opacity: 0.22;
}

@keyframes waveShift {
    to {
        transform: translateX(-50%);
    }
}

/* ===================== 布局 ===================== */
.wrap {
    position: relative;
    z-index: 3;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 40px;
    padding: 48px 6vw;
    max-width: 1560px;
    margin: 0 auto;
}

/* ===================== 左侧液冷可视化 ===================== */
.visual {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

/* ===================== 右侧：品牌标识 + 登录栏 ===================== */
.login-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 22px;
    min-width: 0;
}

.logo-line {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 100%;
}

.logo-text {
    min-width: 0;
}

.logo-mark {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    background: linear-gradient(140deg, #22d3ee, #3b82f6 60%, #7c3aed);
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 17px;
    color: #04121f;
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.55), inset 0 0 14px rgba(255, 255, 255, 0.28);
    animation: markPulse 3.4s ease-in-out infinite;
}

@keyframes markPulse {
    0%, 100% {
        box-shadow: 0 0 26px rgba(34, 211, 238, 0.42), inset 0 0 12px rgba(255, 255, 255, 0.24);
    }
    50% {
        box-shadow: 0 0 46px rgba(34, 211, 238, 0.78), inset 0 0 18px rgba(255, 255, 255, 0.34);
    }
}

.logo-text h1 {
    font-size: 24px;
    letter-spacing: 2px;
    font-weight: 700;
    background: linear-gradient(100deg, #ffffff, #8be9f9 42%, #7ea9ff 78%, #ffffff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 220% auto;
    animation: textFlow 6s linear infinite;
}

@keyframes textFlow {
    to {
        background-position: 220% center;
    }
}

.logo-text p {
    font-size: 12px;
    letter-spacing: 4px;
    color: #74a8d8;
    margin-top: 3px;
    text-transform: uppercase;
}

/* 液冷 SVG */
.coolant-stage {
    position: relative;
    width: min(560px, 86vw);
    aspect-ratio: 1 / 1;
}

.coolant {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.svg-tube {
    fill: none;
    stroke: rgba(15, 38, 66, 0.95);
    stroke-width: 26;
    stroke-linecap: round;
}

.svg-tube-inner {
    fill: none;
    stroke: rgba(28, 62, 102, 0.85);
    stroke-width: 16;
    stroke-linecap: round;
}

.svg-liquid {
    fill: none;
    stroke: url(#liquidGrad);
    stroke-width: 11;
    stroke-linecap: round;
    stroke-dasharray: 42 26;
    filter: url(#glow);
    animation: flow 2.6s linear infinite;
}

.svg-liquid-slow {
    fill: none;
    stroke: url(#liquidGrad2);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 12 30;
    opacity: 0.85;
    animation: flow 4.4s linear infinite reverse;
}

@keyframes flow {
    to {
        stroke-dashoffset: -272;
    }
}

.svg-ring {
    fill: none;
    stroke: rgba(34, 211, 238, 0.28);
    stroke-width: 1.2;
    stroke-dasharray: 4 8;
}

.ring-rotate {
    transform-origin: 260px 260px;
    animation: spin 26s linear infinite;
}

.ring-rotate-rev {
    transform-origin: 260px 260px;
    animation: spin 18s linear infinite reverse;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 水泵转子：绕自身圆心旋转 */
.pump-rotor {
    transform-origin: 487px 260px;
    animation: spin 8s linear infinite reverse;
}

/* 中央风扇：蓝色发光旋转扇叶 */
.fan-blades {
    transform-origin: 260px 260px;
    animation: spin 3.2s linear infinite, fanGlow 2.4s ease-in-out infinite;
}

@keyframes fanGlow {
    0%, 100% {
        opacity: 0.85;
    }
    50% {
        opacity: 1;
    }
}

.fan-blade {
    fill: url(#fanGrad);
    stroke: rgba(190, 242, 255, 0.8);
    stroke-width: 0.7;
    stroke-linejoin: round;
}

/* 风扇中心轮毂 */
.fan-hub {
    fill: url(#hubGrad);
    stroke: rgba(125, 211, 252, 0.7);
    stroke-width: 1.2;
}

.fan-label {
    fill: #e6fbff;
    letter-spacing: 0.5px;
}

.core {
    animation: coreBeat 3s ease-in-out infinite;
    transform-origin: 260px 260px;
}

@keyframes coreBeat {
    0%, 100% {
        transform: scale(1);
        opacity: 0.92;
    }
    50% {
        transform: scale(1.045);
        opacity: 1;
    }
}

.fin {
    stroke: rgba(34, 211, 238, 0.5);
    stroke-width: 5;
    stroke-linecap: round;
    animation: finGlow 2.4s ease-in-out infinite;
}

.fin:nth-child(2) {
    animation-delay: 0.3s;
}

.fin:nth-child(3) {
    animation-delay: 0.6s;
}

.fin:nth-child(4) {
    animation-delay: 0.9s;
}

.fin:nth-child(5) {
    animation-delay: 1.2s;
}

@keyframes finGlow {
    0%, 100% {
        stroke: rgba(34, 211, 238, 0.28);
    }
    50% {
        stroke: rgba(125, 235, 255, 0.95);
    }
}

.svg-text {
    fill: #cfeaff;
    font-size: 13px;
    letter-spacing: 1px;
    font-family: "SFMono-Regular", Consolas, monospace;
}

.svg-text.dim {
    fill: #6f9bc4;
    font-size: 11px;
}

/* 核心内部上升气泡 */
.core-bubble {
    animation: bubUp 3.8s ease-in-out infinite;
}

.core-bubble.c2 {
    animation-duration: 4.6s;
    animation-delay: 0.7s;
}

.core-bubble.c3 {
    animation-duration: 4.1s;
    animation-delay: 1.4s;
}

@keyframes bubUp {
    0% {
        transform: translateY(0) scale(0.7);
        opacity: 0;
    }
    18% {
        opacity: 0.95;
    }
    70% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-74px) scale(1.05);
        opacity: 0;
    }
}

/* HUD 指标 */
.hud {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 560px;
}

.hud-item {
    flex: 1 1 150px;
    background: rgba(10, 24, 44, 0.62);
    border: 1px solid rgba(90, 190, 255, 0.2);
    border-radius: 12px;
    padding: 10px 13px;
    backdrop-filter: blur(10px);
}

.hud-item .k {
    font-size: 11px;
    color: #7ba4cd;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: space-between;
}

.hud-item .v {
    font-size: 17px;
    font-weight: 700;
    color: #8be9f9;
    margin-top: 2px;
    font-family: "SFMono-Regular", Consolas, monospace;
}

.hud-bar {
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    margin-top: 7px;
    overflow: hidden;
}

.hud-bar i {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #22d3ee, #7c3aed);
    transform-origin: left center;
    animation: barPulse 3.6s ease-in-out infinite;
}

/* 用 scaleX 替代 width，避免进度条每帧重排 */
@keyframes barPulse {
    0%, 100% {
        transform: scaleX(0.62);
    }
    50% {
        transform: scaleX(0.96);
    }
}

/* ===================== 右侧登录卡 ===================== */
.login-panel {
    position: relative;
    border-radius: 22px;
    padding: 1px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(2, 10, 24, 0.7);
    animation: panelIn 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes panelIn {
    from {
        opacity: 0;
        transform: translateY(26px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.login-panel::before {
    content: "";
    position: absolute;
    inset: -60%;
    background: conic-gradient(from 0deg,
        rgba(34, 211, 238, 0) 0deg,
        rgba(34, 211, 238, 0) 210deg,
        rgba(34, 211, 238, 0.85) 268deg,
        rgba(124, 58, 237, 0.9) 310deg,
        rgba(34, 211, 238, 0) 360deg);
    animation: spin 7s linear infinite;
    z-index: 0;
}

.login-inner {
    position: relative;
    z-index: 1;
    margin: 1px;
    border-radius: 21px;
    padding: 34px 32px 28px;
    background: linear-gradient(165deg, rgba(10, 22, 42, 0.94), rgba(6, 14, 28, 0.96));
    backdrop-filter: blur(20px);
    overflow: hidden;
}

/* 卡片内扫描光带 */
.login-inner::after {
    content: "";
    position: absolute;
    left: -30%;
    top: -40%;
    width: 60%;
    height: 180%;
    background: linear-gradient(100deg, transparent, rgba(140, 234, 255, 0.09), transparent);
    transform: rotate(14deg);
    animation: sweep 6.5s ease-in-out infinite;
    pointer-events: none;
    /* 光带只是背景装饰，必须压在表单内容之下：
       否则它每帧扫过登录框时会把输入框、按钮“遮”出一道亮带，观感即为闪烁 */
    z-index: 0;
}

/* 表单内容统一抬到光带之上，保证任何时刻都不被覆盖 */
.login-inner > * {
    position: relative;
    z-index: 1;
}

/* 用 transform 位移替代 left：left 属布局属性，每帧都会触发重排，
   在移动端表现为登录框区域闪烁 */
@keyframes sweep {
    0% {
        transform: translateX(0) rotate(14deg);
        opacity: 0;
    }
    35% {
        opacity: 1;
    }
    75% {
        transform: translateX(242%) rotate(14deg);
        opacity: 0;
    }
    100% {
        transform: translateX(242%) rotate(14deg);
        opacity: 0;
    }
}

.login-title {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: 1px;
}

.login-sub {
    font-size: 12.5px;
    color: #7ba4cd;
    margin: 6px 0 22px;
    letter-spacing: 0.4px;
}

.login-sub .dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22d3ee;
    margin-right: 6px;
    box-shadow: 0 0 10px #22d3ee;
    animation: blink 1.6s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.25;
    }
}

.form-item {
    margin-bottom: 16px;
}

.form-item label {
    display: block;
    font-size: 12.5px;
    color: #8bb0d6;
    margin-bottom: 7px;
    letter-spacing: 0.4px;
}

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

.input-wrap .icon {
    position: absolute;
    left: 13px;
    width: 17px;
    height: 17px;
    opacity: 0.72;
    pointer-events: none;
}

.input-wrap .icon path,
.input-wrap .icon circle {
    stroke: #6fd8ef;
    fill: none;
    stroke-width: 1.7;
    stroke-linecap: round;
}

.login-input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    border-radius: 11px;
    border: 1px solid rgba(90, 190, 255, 0.24);
    background: rgba(5, 13, 26, 0.78);
    color: #eaf6ff;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
}

.login-input::placeholder {
    color: #53779c;
}

.login-input:focus {
    border-color: #22d3ee;
    background: rgba(6, 18, 34, 0.9);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15), 0 0 22px rgba(34, 211, 238, 0.16) inset;
}

.login-btn {
    width: 100%;
    margin-top: 8px;
    padding: 13px;
    border: none;
    border-radius: 11px;
    background: linear-gradient(100deg, #22d3ee, #3b82f6 55%, #7c3aed);
    background-size: 200% auto;
    color: #03121f;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.24s ease;
    font-family: inherit;
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.26);
}

.login-btn:hover:not(:disabled) {
    background-position: 100% center;
    transform: translateY(-1px);
    box-shadow: 0 16px 38px rgba(34, 211, 238, 0.42);
}

.login-btn:disabled {
    opacity: 0.72;
    cursor: not-allowed;
}

.login-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 45%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    transform: skewX(-18deg);
    animation: btnShine 3.4s ease-in-out infinite;
    pointer-events: none;
}

/* 同样改为 transform 位移，避免主按钮每帧重排 */
@keyframes btnShine {
    0% {
        transform: translateX(0) skewX(-18deg);
    }
    45%, 100% {
        transform: translateX(422%) skewX(-18deg);
    }
}

.login-error {
    display: none;
    margin-bottom: 14px;
    padding: 10px 13px;
    border-radius: 10px;
    font-size: 12.5px;
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.42);
    color: #ffb3c1;
    animation: shake 0.36s ease;
}

.login-error.show {
    display: block;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-7px);
    }
    50% {
        transform: translateX(6px);
    }
    75% {
        transform: translateX(-4px);
    }
}

.login-foot {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(90, 190, 255, 0.14);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 11.5px;
    color: #5f83a8;
    flex-wrap: wrap;
}

.login-foot .secure {
    display: flex;
    align-items: center;
    gap: 6px;
}

.login-foot .secure i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 9px #22c55e;
    animation: blink 2s ease-in-out infinite;
}

/* ===================== 响应式 ===================== */
/* 窄桌面：右栏空间收窄，缩小品牌标题避免挤压 */
@media (max-width: 1300px) and (min-width: 1101px) {
    .logo-text h1 {
        font-size: 22px;
        letter-spacing: 1px;
    }
}

@media (max-width: 1100px) {
    /* 移动端恢复文档流滚动。不要用 height:100% + overflow-y:auto 这种
       “body 既是定高盒子又是滚动容器”的写法：iOS 上滚动主体会失效，
       登录卡超出首屏的部分被裁掉，表现为登录框被遮挡、底部按钮看不见 */
    html,
    body {
        height: auto;
    }

    body {
        overflow: visible;
    }

    .wrap {
        grid-template-columns: 1fr;
        gap: 26px;
        padding: 34px 5vw 60px;
        align-content: start;
        /* dvh 会剔除 iOS 地址栏占位，避免底部被裁切；旧浏览器回退 100vh */
        min-height: 100vh;
        min-height: 100dvh;
    }

    .visual {
        order: 2;
    }

    .login-side {
        order: 1;
        width: 100%;
        max-width: 460px;
        margin: 0 auto;
    }

    .login-panel {
        width: 100%;
    }

    /* 输入框字号 ≥16px，避免 iOS Safari 聚焦时自动放大页面 */
    .login-input {
        font-size: 16px;
    }

    .logo-text h1 {
        /* 移动端：字号随视口宽度自动缩放，窄屏也能单行完整显示，
           避免「冷极智算-AI算力液冷展保单系统」折成两排；上限 21px 与原移动端一致 */
        font-size: min(21px, calc(6.2vw - 6px));
        letter-spacing: 1px;
        white-space: nowrap;
    }

    .scene {
        /* 由外层文档负责滚动，这里只负责裁掉溢出的装饰层 */
        overflow: hidden;
        min-height: 100vh;
        min-height: 100dvh;
    }

    /* ---------- 移动端渲染性能：消除动画闪烁 ---------- */
    /* 卡片底色已接近不透明（94%），backdrop-filter 几乎没有视觉收益，
       却要在持续运动的背景上逐帧重算背景模糊，是移动端闪烁的主要来源 */
    .login-inner {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    /* HUD 指标卡同理：下垫持续运动的液冷光晕，模糊每帧都要重算 */
    .hud-item {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    /* 全屏网格用 background-position 做动画会逐帧重绘整屏，
       移动端关闭漂移（网格本身仍完整显示） */
    .grid-overlay {
        animation: none;
    }
}

@media (max-width: 560px) {
    /* 小屏压缩纵向间距，尽量让登录卡（含快速登录入口）在首屏内完整可见 */
    .wrap {
        padding: 22px 5vw 44px;
        gap: 20px;
    }

    .login-side {
        gap: 16px;
    }

    .logo-mark {
        width: 44px;
        height: 44px;
        border-radius: 13px;
        font-size: 15px;
    }

    .login-title {
        font-size: 19px;
    }

    .login-sub {
        margin: 5px 0 16px;
    }

    .login-inner {
        padding: 22px 18px 18px;
    }

    .form-item {
        margin-bottom: 13px;
    }

    .hud-item {
        flex: 1 1 100%;
    }
}

/* ==================== 微信一键登录 ==================== */
.wx-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 14px;
    color: #7d93b8;
    font-size: 12px;
}

.wx-divider i {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(125, 147, 184, 0.35), transparent);
}

.wx-login-btn {
    width: 100%;
    height: 46px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #07c160, #06ad56);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    box-shadow: 0 8px 22px rgba(7, 193, 96, 0.28);
}

.wx-login-btn svg {
    width: 21px;
    height: 21px;
    fill: currentColor;
}

.wx-login-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: 0 10px 26px rgba(7, 193, 96, 0.38);
}

.wx-login-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* 提示框语义变体（warn 琥珀 / success 绿色），默认仍为 error 红色 */
.login-error.warn {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.45);
    color: #fcd34d;
}

.login-error.success {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.45);
    color: #86efac;
}

/* ==================== 快速登录（口令 / 人脸） ==================== */
.quick-entry {
    width: 100%;
    margin-top: 14px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* iOS 12/13 的 flex 不支持 gap（Safari 14.1 才支持），用相邻兄弟外边距替代 */
    border-radius: 11px;
    border: 1px solid rgba(90, 190, 255, 0.34);
    background: rgba(9, 22, 42, 0.72);
    color: #a8dcf5;
    font-size: 14px;
    font-family: inherit;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-entry svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: #6fd8ef;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.quick-entry > * + * {
    margin-left: 9px;
}

.quick-entry:hover {
    border-color: #22d3ee;
    color: #e6faff;
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.quick-panel {
    margin-top: 4px;
}

.quick-head {
    display: flex;
    align-items: center;
    /* iOS 12/13 不支持 flex gap，间距交给相邻兄弟外边距 */
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(9, 22, 42, 0.72);
    border: 1px solid rgba(90, 190, 255, 0.2);
}

.quick-head > * + * {
    margin-left: 12px;
}

.quick-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 700;
    color: #03121f;
    background: linear-gradient(135deg, #22d3ee, #3b82f6 60%, #7c3aed);
}

.quick-meta {
    min-width: 0;
}

.quick-meta strong {
    display: block;
    font-size: 15px;
    color: #eaf6ff;
}

.quick-meta span {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: #7ba4cd;
}

.quick-lock {
    margin: 12px 0 0;
    padding: 10px 13px;
    border-radius: 10px;
    font-size: 12.5px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.45);
    color: #fcd34d;
}

.bio-btn {
    width: 100%;
    margin: 14px 0 4px;
    padding: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* iOS 12/13 不支持 flex gap，间距交给下方相邻兄弟外边距 */
    border: 1px solid rgba(90, 190, 255, 0.34);
    border-radius: 11px;
    background: rgba(9, 22, 42, 0.85);
    color: #cdefff;
    font-size: 14.5px;
    font-family: inherit;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bio-btn > * + * {
    margin-left: 9px;
}

.bio-btn svg {
    width: 22px;
    height: 22px;
    fill: #6fd8ef;
}

.bio-btn:hover:not(:disabled) {
    border-color: #22d3ee;
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14);
}

.bio-btn:disabled {
    opacity: 0.72;
    cursor: not-allowed;
}

.pin-area {
    margin-top: 14px;
}

.pin-dots {
    display: flex;
    justify-content: center;
    /* iOS 12/13 不支持 flex gap，改为相邻兄弟外边距 */
    min-height: 16px;
    margin-bottom: 8px;
}

.pin-dots > * + * {
    margin-left: 12px;
}

.pin-dots i {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 1.5px solid rgba(111, 216, 239, 0.55);
    transition: all 0.16s ease;
}

.pin-dots i.on {
    background: #22d3ee;
    border-color: #22d3ee;
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.7);
}

.pin-tip {
    text-align: center;
    font-size: 12px;
    color: #7ba4cd;
    margin-bottom: 12px;
}

.pin-pad {
    display: grid;
    gap: 9px;
}

.pin-pad.digit {
    grid-template-columns: repeat(3, 1fr);
}

.pin-pad.letter {
    grid-template-columns: repeat(6, 1fr);
    gap: 7px;
}

.pin-key {
    height: 48px;
    border-radius: 11px;
    border: 1px solid rgba(90, 190, 255, 0.2);
    background: rgba(8, 20, 38, 0.86);
    color: #eaf6ff;
    font-size: 18px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.14s ease;
    -webkit-tap-highlight-color: transparent;
}

.pin-pad.letter .pin-key {
    height: 40px;
    font-size: 15px;
}

.pin-key:hover {
    border-color: #22d3ee;
    background: rgba(12, 30, 54, 0.95);
}

.pin-key:active {
    transform: scale(0.95);
    background: rgba(34, 211, 238, 0.18);
}

.pin-key.fn {
    color: #9fd8ea;
    font-size: 16px;
}

.pin-key.empty {
    border: none;
    background: none;
    cursor: default;
}

.pin-tools {
    display: flex;
    align-items: center;
    justify-content: center;
    /* iOS 12/13 不支持 flex gap，改为相邻兄弟外边距 */
    flex-wrap: wrap;
    margin: 12px 0 4px;
}

.pin-tools > * + * {
    margin-left: 14px;
}

.pin-tool {
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid rgba(90, 190, 255, 0.24);
    background: transparent;
    color: #8bb0d6;
    font-size: 12.5px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.18s ease;
}

.pin-tool.active {
    border-color: #22d3ee;
    color: #03121f;
    background: linear-gradient(100deg, #22d3ee, #3b82f6);
}

.quick-back {
    width: 100%;
    margin-top: 14px;
    padding: 9px;
    border: none;
    background: transparent;
    color: #7ba4cd;
    font-size: 12.5px;
    font-family: inherit;
    letter-spacing: 0.5px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.quick-back:hover {
    color: #22d3ee;
}

@media (max-width: 560px) {
    .pin-pad.letter {
        grid-template-columns: repeat(5, 1fr);
    }

    .pin-pad.letter .pin-key {
        height: 42px;
    }
}
