/* 统一身份认证页样式（在 style.css 之后引入）：左微信扫码 / 右账号登录 双栏布局 */
.auth-card { max-width: 900px; padding: 28px 34px 24px; }
.auth-subtitle { margin: 0 0 14px; text-align: center; font-size: 13px; letter-spacing: 2px; color: #6b7280; }

/* ---------- 双栏 ---------- */
.login-grid { display: flex; align-items: stretch; gap: 30px; }
.login-left {
    flex: 0 0 286px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    border-right: 1px solid #eef1f6; padding-right: 30px;
}
.login-right { flex: 1 1 auto; min-width: 0; }
.lr-title {
    font-size: 16px; font-weight: 700; color: #0f2b5b;
    border-bottom: 2px solid #eef1f6; padding-bottom: 9px; margin-bottom: 16px;
}

/* ---------- 底部三入口 ---------- */
.login-links { display: flex; align-items: center; gap: 9px; margin-top: 14px; font-size: 13px; }
.login-links a { color: #4b5563; text-decoration: none; cursor: pointer; }
.login-links a:hover { color: #1e5799; text-decoration: underline; }
.login-links i { color: #d1d9e6; font-style: normal; }

/* ---------- 微信区 ---------- */
.wx-box { text-align: center; width: 100%; }
.wx-qr { width: 190px; height: 190px; border: 1px solid #e5eaf2; border-radius: 10px; background: #fff; padding: 6px; }
.wx-qr-wrap { position: relative; display: inline-block; }
.wx-mask {
    position: absolute; inset: 0; display: none; align-items: center; justify-content: center; text-align: center;
    background: rgba(255, 255, 255, .93); color: #374151; font-size: 13px; line-height: 1.7; border-radius: 10px; cursor: pointer;
}
.wx-caption { margin: 12px 0 2px; font-size: 15px; font-weight: 700; color: #0f2b5b; }
.wx-tip { font-size: 12px; color: #6b7280; line-height: 1.8; margin: 0; min-height: 34px; }
.wx-agree-line { margin-top: 14px; width: 100%; }
.wx-offline {
    width: 190px; min-height: 190px; margin: 0 auto; border: 1px dashed #d1d9e6; border-radius: 10px;
    background: #fbfcfe; padding: 18px 14px; box-sizing: border-box; text-align: center;
}
.wx-offline-icon {
    display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
    border-radius: 8px; background: #07c160; color: #fff; font-size: 15px; margin-bottom: 8px;
}
.wx-offline b { display: block; color: #0f2b5b; font-size: 14px; margin-bottom: 8px; }
.wx-offline p { margin: 0; font-size: 12px; color: #6b7280; line-height: 1.9; }

/* ---------- 未开通占位 ---------- */
.mode-offline { padding: 10px 0 4px; }
.mode-offline b { display: block; color: #0f2b5b; font-size: 15px; margin-bottom: 8px; }
.mode-offline p { font-size: 13px; color: #6b7280; line-height: 1.9; margin: 0 0 14px; }

/* ---------- 通用控件 ---------- */
.code-line { display: flex; gap: 8px; align-items: flex-end; }
.code-line input { flex: 1; }
.btn-code {
    flex: 0 0 auto; padding: 0 12px; height: 38px; border: 1px solid #c9d5e6; border-radius: 7px;
    background: #f6f8fc; color: #1e5799; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.btn-code:disabled { color: #9aa4b5; cursor: not-allowed; background: #eef1f6; }
.btn-ghost {
    flex: 0 0 auto; padding: 0 16px; height: 40px; border: 1px solid #c9d5e6; border-radius: 8px;
    background: #fff; color: #4b5563; cursor: pointer; font-size: 13px;
}
.btn-ghost:hover { border-color: #1e5799; color: #1e5799; }
.captcha-line img { height: 38px; border-radius: 6px; cursor: pointer; }
.auth-hint { font-size: 12px; color: #6b7280; line-height: 1.8; margin: -4px 0 12px; }
.auth-hint.warn { color: #b45309; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 16px 0 10px; color: #9aa4b5; font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: #e5eaf2; }

/* ---------- 注册步骤 ---------- */
.register-wrap { max-width: 560px; margin: 0 auto; }
.steps { display: flex; gap: 6px; margin-bottom: 16px; font-size: 12px; color: #9aa4b5; }
.steps span { flex: 1; text-align: center; padding: 6px 0; border-radius: 6px; background: #f2f5fa; }
.steps span.on { background: #eaf1fb; color: #1e5799; font-weight: 700; }
.step-pane { display: none; }
.step-pane.active { display: block; }

/* ---------- MFA 弹层 ---------- */
.mfa-mask {
    position: fixed; inset: 0; background: rgba(8, 18, 34, .55); display: flex;
    align-items: center; justify-content: center; z-index: 60; padding: 16px;
}
.mfa-box { width: 100%; max-width: 360px; background: #fff; border-radius: 14px; padding: 22px 20px; }
.mfa-box h4 { margin: 0 0 6px; color: #0f2b5b; font-size: 16px; }
.mfa-box p { margin: 0 0 14px; font-size: 13px; color: #6b7280; line-height: 1.8; }
.mfa-actions { display: flex; gap: 10px; margin-top: 14px; }
.mfa-actions .btn-primary { flex: 1; margin: 0; }

/* ---------- 移动端 ---------- */
@media (max-width: 860px) {
    .auth-wrap { padding: 22px 12px 26px; }
    .auth-brand { margin-bottom: 16px; }
    .auth-brand h1 { font-size: 22px; letter-spacing: 1px; }
    .auth-brand p { font-size: 12px; margin-top: 6px; }

    .auth-card { padding: 20px 16px 18px; border-radius: 14px; }

    /* 手机端：账号登录在前，微信区在后；微信未开通则整块隐藏 */
    .login-grid { flex-direction: column; gap: 18px; }
    .login-right { order: 1; }
    .login-left {
        order: 2; flex: none; width: 100%;
        border-right: none; border-top: 1px solid #eef1f6; padding: 18px 0 0;
    }
    .auth-card[data-wechat="off"] .login-left { display: none; }

    .lr-title { font-size: 15px; padding-bottom: 8px; margin-bottom: 14px; }
    .auth-form label { margin-bottom: 12px; }
    .btn-primary { letter-spacing: 2px; }

    /* 底部三入口加大点击区域 */
    .login-links { justify-content: center; gap: 12px; font-size: 14px; margin-top: 16px; flex-wrap: wrap; }
    .login-links a { padding: 10px 4px; }

    .wx-qr { width: 168px; height: 168px; }
    .wx-offline { width: 168px; min-height: 168px; }
    .wx-caption { font-size: 14px; }
    .wx-agree-line { margin-top: 12px; }

    .register-wrap { max-width: none; }
    .steps { font-size: 11px; gap: 4px; margin-bottom: 14px; }
    .steps span { padding: 5px 0; }

    .mfa-box { max-width: none; padding: 20px 16px; }
}
@media (max-width: 360px) {
    .auth-brand h1 { font-size: 19px; letter-spacing: 0; }
    .login-links { gap: 8px; font-size: 13px; }
    .btn-code { padding: 0 9px; font-size: 12px; }
}
/* 刘海屏底部安全区 */
.auth-body .site-footer { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }

/* ---------- 夜间模式 ---------- */
html.theme-dark .auth-subtitle, html.theme-dark .wx-tip, html.theme-dark .auth-hint,
html.theme-dark .mode-offline p, html.theme-dark .wx-offline p { color: #8b949e; }
html.theme-dark .auth-hint.warn, html.theme-dark .mode-offline p { color: #fbbf24; }
html.theme-dark .btn-code, html.theme-dark .btn-ghost { background: #10161d; border-color: #2c3642; color: #c9d1d9; }
html.theme-dark .btn-ghost:hover { border-color: #58a6ff; color: #58a6ff; }
html.theme-dark .steps span { background: #10161d; color: #8b949e; }
html.theme-dark .steps span.on { background: #1b2a3f; color: #58a6ff; }
html.theme-dark .mfa-box { background: #151b23; }
html.theme-dark .mfa-box h4 { color: #e6edf3; }
html.theme-dark .mfa-box label { color: #c9d1d9; }
html.theme-dark .wx-qr, html.theme-dark .wx-offline { border-color: #2c3642; background: #10161d; }
html.theme-dark .wx-mask { background: rgba(21, 27, 35, .93); color: #c9d1d9; }
html.theme-dark .wx-caption, html.theme-dark .lr-title, html.theme-dark .mode-offline b, html.theme-dark .wx-offline b { color: #e6edf3; }
html.theme-dark .login-left { border-bottom-color: #2c3642; }
html.theme-dark .login-grid > .login-left { border-right-color: #2c3642; }
html.theme-dark .lr-title, html.theme-dark .login-left { border-color: #2c3642; }
html.theme-dark .auth-divider::before, html.theme-dark .auth-divider::after { background: #2c3642; }
html.theme-dark .login-links a { color: #9aa4b5; }
html.theme-dark .login-links a:hover { color: #58a6ff; }
