* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100vh;
    font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
    color: #1e293b;
    background: linear-gradient(135deg, #1565d8 0%, #0f4aa8 60%, #0a3577 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* ========== 背景装饰圆 ========== */
.bg-deco {
    position: fixed;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    pointer-events: none;
}
.deco-1 { width: 480px; height: 480px; top: -120px; left: -120px; }
.deco-2 { width: 360px; height: 360px; bottom: -100px; right: -80px; }

/* ========== 登录卡片容器 ========== */
.login-wrap {
    display: flex;
    width: 880px;
    max-width: 92vw;
    height: 520px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* ========== 左侧品牌区 ========== */
.left-panel {
    flex: 1.1;
    background: linear-gradient(160deg, #1565d8 0%, #0f4aa8 100%);
    color: #fff;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}
.left-panel .logo-row {
    display: flex;
    align-items: center;
    gap: 14px;
}
.left-panel .logo-box {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.left-panel .logo-box img { width: 44px; height: 44px; object-fit: contain; }
.left-panel .brand {
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 2px;
}
.left-panel .brand-sub {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 4px;
    letter-spacing: 1px;
}
.left-panel .hero-title {
    font-size: 30px;
    font-weight: bold;
    line-height: 1.3;
    letter-spacing: 2px;
}
.left-panel .hero-sub {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 14px;
    line-height: 1.7;
    letter-spacing: 1px;
}
.left-panel .left-footer {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 1px;
}
.left-panel .left-footer .pby {
    color: rgba(255, 255, 255, 0.4);
    display: block;
    margin-top: 4px;
}

/* ========== 右侧表单区 ========== */
.right-panel {
    flex: 1;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.right-panel h2 {
    margin: 0 0 6px 0;
    font-size: 22px;
    font-weight: bold;
    color: #1e293b;
}
.right-panel .sub {
    color: #64748b;
    font-size: 12px;
    margin-bottom: 30px;
}

/* ========== 表单字段 ========== */
.field {
    margin-bottom: 18px;
}
.field label {
    display: block;
    font-size: 12px;
    color: #475569;
    margin-bottom: 6px;
    font-weight: 500;
}
.input-row {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    transition: all 0.2s;
}
.input-row:focus-within {
    border-color: #1565d8;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(21, 101, 216, 0.12);
}
.input-row .icon {
    width: 38px;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}
.input-row input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 11px 12px 11px 0;
    font-size: 13px;
    color: #1e293b;
    margin: 0;
    width: auto;
    height: auto;
    box-shadow: none;
}

/* 密码可见切换按钮 */
.input-row .pwd-toggle {
    width: 38px;
    text-align: center;
    cursor: pointer;
    color: #94a3b8;
    font-size: 14px;
    padding-right: 4px;
    user-select: none;
}
.input-row .pwd-toggle:hover { color: #475569; }

/* 错误提示行（保留给 checkpassdo 使用） */
.err-msg-inline {
    font-size: 12px;
    color: #dc2626;
    min-height: 16px;
    margin-top: 6px;
    margin-bottom: 4px;
    display: none;
    flex-wrap: nowrap;
}

/* 记住我 */
.remember-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}
.remember-row .ant-checkbox-wrapper {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #475569;
    cursor: pointer;
}
.remember-row .ant-checkbox {
    margin-right: 6px;
}
.remember-row .ant-checkbox-inner {
    border-radius: 4px;
}

/* 登录按钮 */
.login-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(135deg, #1565d8 0%, #0f4aa8 100%);
    cursor: pointer;
    letter-spacing: 4px;
    margin-top: 6px;
    box-shadow: 0 6px 18px rgba(21, 101, 216, 0.25);
    transition: all 0.2s;
}
.login-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(21, 101, 216, 0.35); }
.login-btn:active { transform: translateY(0); }
.login-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* 底部提示 */
.tip {
    text-align: center;
    font-size: 11px;
    color: #94a3b8;
    margin-top: 20px;
}

/* ========== 响应式：小屏幕 ========== */
@media (max-width: 768px) {
    .login-wrap {
        flex-direction: column;
        width: 94vw;
        height: auto;
        max-height: 96vh;
    }
    .left-panel {
        flex: none;
        padding: 30px 24px;
        text-align: center;
    }
    .left-panel .logo-row { justify-content: center; }
    .left-panel .hero-title { font-size: 22px; }
    .left-panel .hero-sub { font-size: 11px; }
    .right-panel {
        flex: none;
        padding: 30px 24px;
    }
}

/* ========== ant-design 验证状态适配 ========== */
.input-row input.ant-input-status-error {
    background: #fef2f2;
}
.input-row:focus-within input.ant-input-status-error {
    background: #fff;
}
.err-msg-inline .ant-form-item-explain-error {
    color: #dc2626;
    font-size: 12px;
}

/* 隐藏不需要的元素 */
#darkswitch { display: none !important; }
#mobilelogin { display: none !important; }

/* ========== 加载画面（覆盖在登录卡片上层） ========== */
#loginloading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: linear-gradient(135deg, #1565d8 0%, #0f4aa8 60%, #0a3577 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
/* 覆盖 headlogin.css 中可能干扰的背景 */
#loginloading.app-loading {
    background: linear-gradient(135deg, #1565d8 0%, #0f4aa8 60%, #0a3577 100%);
}

#loginform {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
