/* ==================== 登录页样式 ==================== */
.login-body { background: #fff; }
.login-page { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }

/* ---------- 左侧品牌区 ---------- */
.login-brand { position: relative; overflow: hidden; background: linear-gradient(150deg, #05102e 0%, #0a1c47 45%, #062a6e 100%); color: #fff; padding: 42px 8%; display: flex; flex-direction: column; }
.lb-bg { position: absolute; inset: 0; pointer-events: none; }
.lb-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse at 40% 40%, #000, transparent 75%); }
.lb-glow { position: absolute; border-radius: 50%; filter: blur(90px); }
.lb-glow-1 { width: 440px; height: 440px; background: rgba(0,110,255,.32); top: -100px; left: -60px; }
.lb-glow-2 { width: 360px; height: 360px; background: rgba(90,80,255,.2); bottom: -100px; right: -80px; }
.lb-brand { position: relative; z-index: 1; align-self: flex-start; }
.lb-brand .brand-name { color: #fff; }
.lb-content { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 520px; padding: 40px 0; }
.lb-badge { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; padding: 7px 16px; border-radius: 30px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); font-size: 13px; color: #cfe0ff; margin-bottom: 26px; }
.lb-content h2 { font-size: clamp(32px, 3.2vw, 46px); line-height: 1.3; font-weight: 800; letter-spacing: -.5px; }
.lb-content h2 span { background: linear-gradient(90deg, #6db3ff, #4d8dff 45%, #a78bfa); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lb-content > p { font-size: 15px; line-height: 1.9; color: #b9c8e8; margin-top: 20px; }
.lb-points { display: flex; flex-direction: column; gap: 20px; margin-top: 38px; }
.lb-point { display: flex; align-items: center; gap: 14px; }
.lp-ic { width: 42px; height: 42px; border-radius: 11px; flex-shrink: 0; display: grid; place-items: center; font-size: 18px; color: #7fb4ff; background: rgba(91,157,255,.14); border: 1px solid rgba(123,180,255,.25); }
.lb-point strong { display: block; font-size: 15px; font-weight: 700; }
.lb-point small { display: block; font-size: 12.5px; color: #94a8d0; margin-top: 2px; }
.lb-mini-chart { margin-top: 40px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 18px 20px; backdrop-filter: blur(8px); }
.lmc-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 600; color: #e6efff; }
.lmc-live { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 400; color: #4dffb0; }
.lmc-live i { width: 6px; height: 6px; border-radius: 50%; background: #4dffb0; animation: pulse 2s infinite; }
.lmc-bars { display: flex; align-items: flex-end; gap: 6px; height: 76px; margin: 16px 0 12px; }
.lmc-bars i { flex: 1; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #5b9dff, rgba(91,157,255,.15)); transform-origin: bottom; animation: barGrow 1.2s ease both; }
.lmc-bars i:nth-last-child(-n+3) { background: linear-gradient(180deg, #7ef0c0, rgba(126,240,192,.15)); }
.lmc-foot { display: flex; justify-content: space-between; font-size: 11px; color: #93a8d2; }
.lmc-foot b { color: #fff; font-size: 12px; }
.lmc-foot b.down { color: #ff8a8a; }
.lb-footer { position: relative; z-index: 1; font-size: 12px; color: #6f86b5; }

/* ---------- 右侧表单区 ---------- */
.login-form-side { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; background: #fff; }
.back-home { position: absolute; top: 34px; right: 40px; font-size: 13px; color: #8b95a8; transition: color .2s; }
.back-home:hover { color: var(--blue); }
.form-box { width: 100%; max-width: 420px; }
.form-head { text-align: center; margin-bottom: 28px; }
.form-head h1 { font-size: 30px; font-weight: 800; color: var(--ink); letter-spacing: -.5px; }
.form-head p { font-size: 14px; color: var(--muted); margin-top: 10px; }

/* 模式切换 Tab */
.auth-tabs { display: flex; position: relative; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.auth-tab { flex: 1; padding: 12px 0 14px; border: 0; background: transparent; font-size: 15px; font-weight: 600; color: #96a0b3; cursor: pointer; position: relative; transition: color .2s; }
.auth-tab.active { color: var(--blue); }
.auth-tab.active::after { content: ''; position: absolute; left: 50%; bottom: -1px; transform: translateX(-50%); width: 40px; height: 3px; border-radius: 3px; background: var(--blue); }

/* 登录方式切换 */
.login-methods { display: flex; gap: 26px; margin-bottom: 24px; }
.lm-btn { border: 0; background: transparent; padding: 0 0 6px; font-size: 13.5px; font-weight: 600; color: #96a0b3; cursor: pointer; position: relative; transition: color .2s; }
.lm-btn.active { color: var(--ink); }
.lm-btn.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--blue); }

/* 表单 */
.auth-form { display: none; }
.auth-form.active { display: block; animation: fadeUp .35s ease; }
.method-pane { display: none; }
.method-pane.active { display: block; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: #3d465c; margin-bottom: 8px; }
.input-wrap { display: flex; align-items: center; height: 48px; border: 1px solid #dfe5ef; border-radius: 9px; background: #fbfcfe; padding: 0 14px; transition: border-color .2s, box-shadow .2s, background .2s; }
.input-wrap:focus-within { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(0,86,255,.08); }
.input-wrap.error { border-color: #ff5b5b; box-shadow: 0 0 0 3px rgba(255,91,91,.08); }
.iw-icon { display: flex; color: #aab4c6; margin-right: 10px; flex-shrink: 0; }
.input-wrap:focus-within .iw-icon { color: var(--blue); }
.input-wrap input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 14px; color: var(--ink); font-family: inherit; }
.input-wrap input::placeholder { color: #b4bdcc; }
.field-error { display: block; min-height: 0; margin-top: 6px; font-size: 12px; color: #ff5b5b; }
.field-error:not(:empty) { min-height: 16px; }
.pwd-toggle { display: flex; border: 0; background: transparent; color: #aab4c6; cursor: pointer; padding: 4px; margin-left: 6px; }
.pwd-toggle:hover { color: var(--blue); }
.captcha-canvas { margin-left: 10px; border-radius: 6px; cursor: pointer; flex-shrink: 0; background: #eef3fb; }
.code-btn { margin-left: 10px; flex-shrink: 0; border: 0; background: #eaf1ff; color: var(--blue); font-size: 12.5px; font-weight: 600; padding: 8px 12px; border-radius: 6px; cursor: pointer; white-space: nowrap; transition: background .2s; }
.code-btn:hover:not(:disabled) { background: #dbe8ff; }
.code-btn:disabled { color: #aab4c6; background: #f0f2f6; cursor: not-allowed; }
.form-row { display: flex; justify-content: space-between; align-items: center; margin: -2px 0 22px; }
.checkbox-label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #6b7385; cursor: pointer; }
.checkbox-label input { width: 15px; height: 15px; accent-color: var(--blue); cursor: pointer; }
.text-link { border: 0; background: transparent; padding: 0; font-size: inherit; color: var(--blue); cursor: pointer; }
.text-link:hover { text-decoration: underline; }
.sms-tip { font-size: 12.5px; color: #a0a9ba; margin: -4px 0 20px; }
.pwd-strength { display: flex; align-items: center; gap: 5px; margin-top: 9px; }
.pwd-strength i { flex: 1; height: 3px; border-radius: 2px; background: #e8ecf4; transition: background .25s; }
.pwd-strength span { font-size: 11px; color: #a0a9ba; margin-left: 6px; white-space: nowrap; }
.pwd-strength.s1 i:nth-child(-n+1) { background: #ff5b5b; }
.pwd-strength.s2 i:nth-child(-n+2) { background: #ffa940; }
.pwd-strength.s3 i:nth-child(-n+3) { background: #36c48a; }
.agree-row { margin-bottom: 4px; }

/* 提交按钮 */
.submit-btn { position: relative; width: 100%; height: 50px; border: 0; border-radius: 9px; background: var(--blue); color: #fff; font-size: 16px; font-weight: 700; letter-spacing: 2px; cursor: pointer; margin-top: 6px; box-shadow: 0 10px 24px rgba(0,86,255,.24); transition: background .2s, transform .2s, box-shadow .2s; }
.submit-btn:hover:not(:disabled) { background: #0046d6; transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0,86,255,.32); }
.submit-btn:disabled { opacity: .75; cursor: not-allowed; }
.btn-spinner { display: none; position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.submit-btn.loading .btn-text { visibility: hidden; }
.submit-btn.loading .btn-spinner { display: block; }

/* 分隔线与第三方登录 */
.divider { position: relative; text-align: center; margin: 26px 0 20px; }
.divider::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); }
.divider span { position: relative; padding: 0 14px; background: #fff; font-size: 12px; color: #a0a9ba; }
.social-login { display: flex; justify-content: center; gap: 30px; }
.social-btn { display: flex; flex-direction: column; align-items: center; gap: 7px; border: 0; background: transparent; font-size: 12px; color: #6b7385; cursor: pointer; }
.social-btn svg { width: 40px; height: 40px; padding: 9px; border-radius: 50%; background: #f5f7fb; color: #5b6579; transition: all .2s; }
.social-btn[data-provider="微信"] svg { color: #22c55e; }
.social-btn[data-provider="企业微信"] svg { color: #2b7fff; }
.social-btn[data-provider="钉钉"] svg { color: #1b8fff; }
.social-btn:hover svg { transform: translateY(-3px); background: #eaf1ff; }

/* 底部切换提示 */
.login-switch-tip, .form-switch-tip { text-align: center; font-size: 13px; color: #8b95a8; margin-top: 24px; }
.form-switch-tip { margin-top: 20px; }
.form-bottom { position: absolute; bottom: 26px; left: 0; right: 0; display: flex; justify-content: center; gap: 24px; font-size: 12px; color: #aab4c6; }

/* ---------- 忘记密码弹窗 ---------- */
.modal-overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(8,18,42,.55); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal { position: relative; width: 100%; max-width: 440px; background: #fff; border-radius: 16px; padding: 34px; box-shadow: 0 30px 80px rgba(0,0,0,.25); transform: translateY(20px); transition: transform .25s; max-height: 90vh; overflow-y: auto; }
.modal-overlay.open .modal { transform: none; }
.modal-close { position: absolute; top: 16px; right: 18px; border: 0; background: transparent; font-size: 26px; line-height: 1; color: #aab4c6; cursor: pointer; }
.modal-close:hover { color: var(--ink); }
.modal h3 { font-size: 22px; font-weight: 800; }
.modal-sub { font-size: 13px; color: var(--muted); margin: 8px 0 24px; }

/* ---------- Toast ---------- */
.toast { position: fixed; top: 28px; left: 50%; transform: translate(-50%, -20px); z-index: 3000; padding: 13px 24px; border-radius: 10px; font-size: 14px; color: #fff; background: #323b52; box-shadow: 0 12px 30px rgba(0,0,0,.2); opacity: 0; visibility: hidden; transition: opacity .3s, transform .3s, visibility .3s; display: flex; align-items: center; gap: 9px; }
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast.success { background: #17a673; }
.toast.error { background: #e5484d; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .login-page { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-form-side { min-height: 100vh; }
  .back-home { top: 24px; right: 24px; }
}
@media (max-width: 480px) {
  .login-form-side { padding: 80px 20px 70px; }
  .form-head h1 { font-size: 26px; }
  .social-login { gap: 20px; }
  .form-bottom { flex-direction: column; align-items: center; gap: 6px; bottom: 18px; }
}
