* { box-sizing: border-box; }
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
/* 科技蓝主背景：中等深度蓝渐变（与首页横幅同色系） */
body {
    background: linear-gradient(135deg, #0d2b6e 0%, #16419f 45%, #2563eb 80%, #3b82f6 100%) fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}
/* 细网格纹理 */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 36px 36px;
    z-index: 0;
    pointer-events: none;
}
/* 光晕层：缓慢呼吸 */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 18% 22%, rgba(96, 165, 250, .28) 0, transparent 40%),
        radial-gradient(circle at 82% 75%, rgba(59, 130, 246, .32) 0, transparent 45%),
        radial-gradient(circle at 60% 8%, rgba(147, 197, 253, .18) 0, transparent 38%);
    z-index: 0;
    pointer-events: none;
    animation: glowPulse 9s ease-in-out infinite alternate;
}
@keyframes glowPulse {
    from { opacity: .65; }
    to { opacity: 1; }
}

/* 上浮光点粒子 */
.bg-decor {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}
.bg-decor span {
    position: absolute;
    bottom: -40px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .35);
    box-shadow: 0 0 12px rgba(147, 197, 253, .8);
    animation: floatUp linear infinite;
}
.bg-decor span:nth-child(1) { left: 12%; width: 6px; height: 6px; animation-duration: 14s; }
.bg-decor span:nth-child(2) { left: 28%; animation-duration: 18s; animation-delay: 2s; }
.bg-decor span:nth-child(3) { left: 45%; animation-duration: 12s; animation-delay: 4s; }
.bg-decor span:nth-child(4) { left: 63%; width: 5px; height: 5px; animation-duration: 20s; animation-delay: 1s; }
.bg-decor span:nth-child(5) { left: 78%; width: 9px; height: 9px; animation-duration: 16s; animation-delay: 3s; }
.bg-decor span:nth-child(6) { left: 90%; width: 6px; height: 6px; animation-duration: 22s; animation-delay: 5s; }
@keyframes floatUp {
    0% { transform: translateY(0); opacity: 0; }
    10% { opacity: .8; }
    90% { opacity: .15; }
    100% { transform: translateY(-110vh); opacity: 0; }
}

/* 整体卡片容器：毛玻璃外框（半透明 + 背景模糊），内嵌双面板 */
.login-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: stretch;
    width: 760px;
    max-width: 92vw;
    min-height: 440px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.14);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 18px;
    overflow: hidden;
    box-shadow:
        0 24px 70px rgba(2, 10, 40, 0.4),
        0 6px 22px rgba(2, 10, 40, 0.25);
}

/* 左侧品牌区：中调蓝渐变（与背景同色系、不再压深） + 顶部光泽 */
.login-brand {
    position: relative;
    overflow: hidden;
    flex: 1 1 45%;
    background: linear-gradient(160deg, #2563eb 0%, #3b82f6 55%, #409EFF 100%);
    border-radius: 12px 0 0 12px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 30px;
    text-align: center;
}
.login-brand::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 0%, rgba(255, 255, 255, .3) 0, transparent 52%),
        radial-gradient(circle at 12% 95%, rgba(13, 42, 110, .25) 0, transparent 58%);
    pointer-events: none;
}
.login-brand > * {
    position: relative;
    z-index: 1;
}
.login-brand img {
    width: 130px;
    max-width: 55%;
    border-radius: 50%;
    background: #fff;
    padding: 14px;
    box-sizing: border-box;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.login-brand h2 {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 12px;
    letter-spacing: 2px;
}
.login-brand p {
    font-size: 13px;
    opacity: 0.9;
    margin: 0;
    line-height: 1.7;
}

/* 右侧表单区 */
.login-form {
    flex: 1 1 55%;
    padding: 44px 48px;
    background: #fff;
    border-radius: 0 12px 12px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.login-form h3 {
    font-size: 20px;
    color: #2c3e50;
    margin: 0 0 6px;
    font-weight: 600;
}
.login-form .sub-title {
    font-size: 13px;
    color: #9aa0a6;
    margin: 0 0 24px;
}

/* 错误提示条 */
.login-tips {
    background: #fff1f0;
    border: 1px solid #ffa39e;
    color: #d4380d;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.5;
}

/* 输入项 */
.form-item {
    position: relative;
    margin-bottom: 18px;
}
.form-item > .fa {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #b0b6bc;
    font-size: 15px;
    z-index: 2;
    pointer-events: none;
    transition: color 0.2s ease;
}
.form-item input {
    width: 100%;
    height: 42px;
    padding: 0 12px 0 38px;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    font-size: 14px;
    color: #2c3e50;
    background: #f7f8fa;
    outline: none;
    transition: all 0.2s ease;
}
.form-item input::placeholder {
    color: #b0b6bc;
}
.form-item input:focus {
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.form-item:focus-within > .fa {
    color: #2563eb;
}

/* 短信验证码 */
.form-item.has-action input {
    padding-right: 100px;
}

/* 密码可见切换 */
.form-item.has-toggle input {
    padding-right: 38px;
}
.toggle-pwd {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #b0b6bc;
    font-size: 16px;
    cursor: pointer;
    z-index: 2;
    transition: color 0.2s ease;
    user-select: none;
}
.toggle-pwd:hover {
    color: #2563eb;
}
.sms-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #2563eb;
    font-size: 13px;
    padding: 4px 8px;
    cursor: pointer;
    white-space: nowrap;
    z-index: 2;
}
.sms-btn:disabled {
    color: #b0b6bc;
    cursor: not-allowed;
}

/* 图形验证码 */
.captcha-row {
    display: flex;
    gap: 10px;
    margin-bottom: 22px;
}
.captcha-row input {
    flex: 1;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    font-size: 14px;
    color: #2c3e50;
    background: #f7f8fa;
    outline: none;
    transition: all 0.2s ease;
}
.captcha-row input::placeholder {
    color: #b0b6bc;
}
.captcha-row input:focus {
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.captcha-row img {
    height: 42px;
    width: 120px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid #e1e4e8;
    transition: opacity 0.2s ease;
    object-fit: contain;
}
.captcha-row img:hover {
    opacity: 0.85;
}

/* 记住我复选行 */
.remember-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: -8px 0 16px;
    font-size: 12px;
    color: #7b8496;
    cursor: pointer;
    user-select: none;
}
.remember-row input[type="checkbox"] {
    margin: 0;
    accent-color: #2563eb;
    cursor: pointer;
}

/* 登录按钮：蓝色渐变 */
.btn-login {
    width: 100%;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #2563eb 0%, #409EFF 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 6px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.45);
}
.btn-login:active {
    transform: translateY(0);
}
.btn-login:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
}
.btn-login .spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 顶部 toast 提示 */
.login-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(0, 0, 0, 0.78);
    color: #fff;
    padding: 10px 22px;
    border-radius: 6px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    max-width: 80vw;
}
.login-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 修复浏览器自动填充残留样式 */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: #2c3e50;
    -webkit-box-shadow: 0 0 0 1000px #f7f8fa inset;
    transition: background-color 5000s ease-in-out 0s;
}

/* 响应式：移动端 */
@media (max-width: 680px) {
    .login-wrap {
        flex-direction: column;
        width: 94vw;
        min-height: auto;
    }
    .login-brand {
        flex: none;
        padding: 26px 20px 18px;
    }
    .login-brand img {
        width: 80px;
        margin-bottom: 10px;
    }
    .login-brand h2 {
        font-size: 18px;
        margin-bottom: 4px;
    }
    .login-brand p {
        display: none;
    }
    .login-form {
        padding: 28px 22px 32px;
    }
}
