/* ============================================================
 * base.css - 变量 / 主题 / 重置 / 登录页
 * ============================================================ */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --accent: #0ea5e9;
  --bg: #f1f5f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #1e293b;
  --text-2: #64748b;
  --text-3: #94a3b8;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --radius: 10px;
  --sidebar-w: 230px;
  --topbar-h: 58px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body[data-theme="green"] { --primary:#16a34a; --primary-dark:#15803d; --primary-light:#dcfce7; --accent:#22c55e; }
body[data-theme="purple"] { --primary:#7c3aed; --primary-dark:#6d28d9; --primary-light:#ede9fe; --accent:#a855f7; }
body[data-theme="orange"] { --primary:#ea580c; --primary-dark:#c2410c; --primary-light:#ffedd5; --accent:#f97316; }
body[data-theme="pink"] { --primary:#db2777; --primary-dark:#be185d; --primary-light:#fce7f3; --accent:#ec4899; }
body[data-theme="dark"] {
  --primary:#3b82f6; --primary-dark:#2563eb; --primary-light:#1e3a5f;
  --bg:#0f172a; --surface:#1e293b; --surface-2:#0f172a;
  --text:#e2e8f0; --text-2:#94a3b8; --text-3:#64748b; --border:#334155;
  --shadow:0 1px 3px rgba(0,0,0,.3); --shadow-md:0 4px 12px rgba(0,0,0,.4);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); font-size: 14px; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
button { cursor: pointer; }
a { color: var(--primary); text-decoration: none; }
svg { display: block; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(100,116,139,.3); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* 登录页 */
.login-screen { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 100; overflow: hidden; }
.login-bg { position: absolute; inset: 0; background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 45%, #0ea5e9 100%); }
.login-bg::before, .login-bg::after { content: ''; position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.12); }
.login-bg::before { width: 600px; height: 600px; top: -200px; right: -100px; }
.login-bg::after { width: 800px; height: 800px; bottom: -400px; left: -200px; background: rgba(255,255,255,.04); }
.login-card { position: relative; width: 400px; background: #fff; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.3); padding: 40px 36px 30px; }
.login-brand { text-align: center; margin-bottom: 30px; }
.login-logo { width: 60px; height: 60px; margin: 0 auto 14px; background: linear-gradient(135deg, #2563eb, #0ea5e9); color: #fff; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 600; box-shadow: 0 8px 20px rgba(37,99,235,.35); }
.login-brand h1 { font-size: 24px; color: #1e293b; margin-bottom: 6px; }
.login-brand p { color: #94a3b8; font-size: 13px; }
.login-form .lf-item { margin-bottom: 18px; }
.login-form label { display: block; font-size: 13px; color: #475569; margin-bottom: 8px; font-weight: 500; }
.login-form input { width: 100%; height: 44px; border: 1px solid #e2e8f0; border-radius: 8px; padding: 0 14px; outline: none; transition: .2s; background: #f8fafc; }
.login-form input:focus { border-color: #2563eb; background: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.login-btn { width: 100%; height: 44px; font-size: 15px; letter-spacing: 4px; margin-top: 8px; }
.login-tip { text-align: center; color: #94a3b8; font-size: 12px; margin-top: 14px; }
.login-footer { text-align: center; color: #cbd5e1; font-size: 12px; margin-top: 24px; padding-top: 18px; border-top: 1px solid #f1f5f9; }

/* 弹窗打开时锁定背景滚动，避免弹窗后页面跟着滚动 */
body.modal-open { overflow: hidden; }
