/* 聚能推 · 用户端 DeepSeek 风格主题
   简洁大气：白/浅灰中性色、细边框、轻阴影、品牌紫点缀、大量留白 */
:root {
  --bg: #f7f7f8;
  --card: #ffffff;
  --primary: #4f46e5;
  --primary-d: #4338ca;
  --primary-soft: #eef0ff;
  --grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --grad-soft: linear-gradient(135deg, #eef0ff 0%, #f5f0ff 100%);
  --text: #1f2329;
  --muted: #8a8f99;
  --border: #ececee;
  --border-strong: #dcdde0;
  --ok: #16a34a;
  --err: #dc2626;
  --pending: #d97706;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-lg: 0 8px 30px rgba(16, 24, 40, 0.1);
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
}
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; }

/* ---------- 通用控件 ---------- */
label { font-size: 13px; color: var(--muted); display: block; margin: 14px 0 6px; }
input, select, textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}
textarea { resize: vertical; }

button { font-family: inherit; cursor: pointer; border: none; }
.btn-primary {
  background: var(--primary);
  color: #fff;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  transition: background .15s, transform .12s, box-shadow .15s;
  box-shadow: 0 1px 2px rgba(79, 70, 229, .2);
}
.btn-primary:hover { background: var(--primary-d); box-shadow: 0 4px 12px rgba(79, 70, 229, .25); }
.btn-primary:active { transform: translateY(0); }
.btn-primary.full { width: 100%; margin-top: 18px; }
button.ghost {
  background: #fff; color: var(--text); border: 1px solid var(--border-strong);
  border-radius: 10px; padding: 9px 16px; font-size: 14px; transition: all .15s;
}
button.ghost:hover { border-color: var(--primary); color: var(--primary); background: #fafaff; }
button.danger { background: #fff; color: var(--err); border: 1px solid #f3c6cc; border-radius: 10px; padding: 8px 14px; font-size: 13px; }
button.danger:hover { background: #fdeef0; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* logo 标记 */
.logo-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--grad); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 19px;
  box-shadow: 0 3px 10px rgba(79, 70, 229, .28);
}
.logo-mark.sm { width: 28px; height: 28px; border-radius: 8px; font-size: 14px; box-shadow: none; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.sec-title { margin: 0 0 14px; font-size: 16px; font-weight: 600; }
.page-title { margin: 0 0 4px; font-size: 21px; font-weight: 600; letter-spacing: -.2px; }
.page-sub { margin: 0 0 20px; color: var(--muted); }

/* ---------- 登录 / 落地（分屏） ---------- */
.auth-wrap { display: flex; min-height: 100vh; }
.auth-hero {
  position: relative; overflow: hidden;
  flex: 1;
  background: linear-gradient(150deg, #1e1b4b 0%, #312e81 55%, #4f46e5 130%);
  color: #fff;
  padding: 56px;
  display: flex; flex-direction: column; justify-content: center;
}
.hero-brand { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 600; letter-spacing: .5px; }
.hero-brand .logo-mark { background: rgba(255,255,255,0.16); box-shadow: none; }
.hero-title { font-size: 40px; line-height: 1.25; font-weight: 600; margin: 28px 0 16px; letter-spacing: -.5px; }
.hero-sub { font-size: 15px; line-height: 1.8; opacity: .9; margin: 0 0 30px; }
.hero-feats { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; max-width: 460px; }
.hero-feats li { display: flex; gap: 14px; align-items: flex-start; font-size: 14px; line-height: 1.6; }
.hero-feats b { font-weight: 600; }
.hero-feats div { opacity: .92; }
.hf-ico {
  flex: none; width: 34px; height: 34px; border-radius: 10px;
  background: rgba(255,255,255,0.14); display: inline-flex; align-items: center; justify-content: center; font-size: 17px;
}
.hero-foot { margin-top: 36px; font-size: 12px; opacity: .65; }
.hero-blob { position: absolute; border-radius: 50%; filter: blur(6px); opacity: .22; }
.blob-a { width: 300px; height: 300px; background: #818cf8; top: -80px; right: -60px; }
.blob-b { width: 220px; height: 220px; background: #a78bfa; bottom: -50px; left: -40px; }

.auth-panel { width: 440px; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: 28px; }
.auth-card { width: 100%; max-width: 360px; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 30px 28px; box-shadow: var(--shadow-lg); }
.auth-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.auth-name { font-size: 18px; font-weight: 600; }
.tabs { display: flex; gap: 4px; background: #f1f2f4; padding: 4px; border-radius: 10px; margin-bottom: 6px; }
.tab { flex: 1; border: none; background: transparent; color: var(--muted); font-size: 14px; font-weight: 500; padding: 9px 0; border-radius: 8px; transition: all .15s; }
.tab.active { background: #fff; color: var(--primary); box-shadow: 0 1px 4px rgba(16,24,40,0.08); }
.auth-foot { margin-top: 20px; text-align: center; font-size: 12px; color: var(--muted); }

/* ---------- 顶栏 ---------- */
.topbar {
  height: 60px; background: #fff; border-bottom: 1px solid var(--border);
  padding: 0 24px; display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; letter-spacing: -.2px; }
.who-pill { font-size: 13px; color: var(--text); background: #f1f2f4; padding: 6px 12px; border-radius: 999px; font-weight: 500; }

/* ---------- 控制台布局 ---------- */
.dash { display: flex; align-items: flex-start; min-height: calc(100vh - 60px); }
.sidebar {
  width: 216px; flex: none; background: #fff; border-right: 1px solid var(--border);
  padding: 14px 10px; position: sticky; top: 60px; height: calc(100vh - 60px);
  display: flex; flex-direction: column; gap: 2px; overflow-y: auto;
  scrollbar-width: none; -ms-overflow-style: none;
}
.sidebar::-webkit-scrollbar { display: none; }
.nav-group { font-size: 11px; color: #b5b8bf; font-weight: 500; padding: 14px 12px 6px; letter-spacing: .5px; }
.nav-item {
  text-align: left; border: none; background: transparent; color: #565b64;
  font-size: 13.5px; font-weight: 500; padding: 9px 12px; border-radius: 8px;
  cursor: pointer; transition: background .12s, color .12s; display: flex; align-items: center; gap: 9px;
}
.nav-item:hover { background: #f3f3f5; color: var(--text); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.sidebar-tip { margin-top: auto; font-size: 12px; color: var(--muted); line-height: 1.6; padding: 12px; background: #fafafa; border: 1px solid var(--border); border-radius: 10px; }

.content { flex: 1; padding: 28px 34px; max-width: 1020px; }

/* 统计卡 */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s, transform .12s; }
.stat-card:hover { border-color: #c7c4f5; box-shadow: 0 4px 14px rgba(79,70,229,.08); transform: translateY(-1px); }
.stat-num { font-size: 26px; font-weight: 600; color: var(--primary); letter-spacing: -.5px; line-height: 1.3; }
.stat-label { margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.stat-link { display: inline-block; margin-top: 5px; font-size: 11.5px; color: var(--primary); text-decoration: none; opacity: .75; transition: opacity .15s; }
.stat-link:hover { opacity: 1; }

/* 代码块 */
.code-block {
  background: #0f1729; color: #d7e3ff; padding: 16px 18px; border-radius: 12px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 13px;
  line-height: 1.7; overflow-x: auto; white-space: pre; margin: 4px 0 18px;
}

/* ---------- 令牌 / 列表 ---------- */
.token-box { font-family: monospace; background: #f6f6f7; padding: 11px 13px; border-radius: 10px; word-break: break-all; font-size: 13px; border: 1px solid var(--border); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid2 > div { min-width: 0; }

/* 表格 */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 500; font-size: 12px; }
tr:last-child td { border-bottom: none; }

/* 状态标签 */
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.tag.ok { background: #eaf7ef; color: var(--ok); }
.tag.fail { background: #fdecef; color: var(--err); }
.tag.pending { background: #fdf3e0; color: var(--pending); }

img.qr { width: 200px; height: 200px; border: 1px solid var(--border); border-radius: 12px; display: block; margin-top: 6px; }

/* toast */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: #1f2329; color: #fff; padding: 11px 20px; border-radius: 10px; font-size: 14px;
  opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 100; box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .auth-hero { display: none; }
  .auth-panel { width: 100%; }
  .sidebar { width: 100%; position: static; height: auto; flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--border); padding: 8px; }
  .sidebar-tip { display: none; }
  .nav-group { display: none; }
  .nav-item { white-space: nowrap; flex: none; }
  .dash { flex-direction: column; }
  .content { padding: 18px; }
}
@media (max-width: 560px) {
  .grid2 { grid-template-columns: 1fr; }
  .hero-title { font-size: 30px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- 配额进度条（网格卡片） ---------- */
.quota-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 6px; }
.quota-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.quota-card:hover { border-color: #c7c4f5; box-shadow: var(--shadow); }
.qc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.qc-label { font-size: 13px; font-weight: 500; color: var(--text); }
.qc-remain { font-size: 11.5px; color: var(--muted); background: #f4f4f6; padding: 2px 8px; border-radius: 999px; }
.qc-num { font-size: 20px; font-weight: 600; letter-spacing: -.3px; margin-bottom: 10px; }
.qc-div { font-size: 12.5px; color: #b0b4bd; font-weight: 400; margin-left: 2px; }
.quota-track { height: 6px; border-radius: 6px; background: #eef0f2; overflow: hidden; }
.quota-fill { height: 100%; border-radius: 6px; background: var(--primary); transition: width .4s ease; }
.qc-foot { margin-top: 6px; }
.qc-pct { font-size: 11.5px; }
@media (max-width: 960px) { .quota-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .quota-grid { grid-template-columns: 1fr; } }

/* ---------- 套餐卡片 ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.plan-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .12s, box-shadow .12s, border-color .15s;
}
.plan-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.plan-card.cur { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }
.plan-name { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.plan-price { font-size: 26px; font-weight: 600; margin: 8px 0 12px; color: var(--primary); letter-spacing: -.5px; }
.plan-price .muted { font-size: 13px; color: var(--muted); font-weight: 400; }
.plan-feats { list-style: none; padding: 0; margin: 0 0 16px; font-size: 13px; color: var(--text); display: grid; gap: 8px; flex: 1; }
.plan-feats li::before { content: "✓ "; color: var(--ok); font-weight: 600; }

/* ---------- 渠道绑定 ---------- */
.ch-tabs { display: flex; gap: 4px; background: #f1f2f4; padding: 4px; border-radius: 10px; margin: 14px 0 18px; width: fit-content; }
.ch-tab { border: none; background: transparent; color: var(--muted); font-size: 14px; font-weight: 500; padding: 9px 18px; border-radius: 8px; transition: all .15s; }
.ch-tab.active { background: #fff; color: var(--primary); box-shadow: 0 1px 4px rgba(16,24,40,0.08); }
.ch-form { margin-top: 6px; }

/* ---------- 功能市场 ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 6px; }
.feat-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .12s, box-shadow .12s, border-color .15s;
}
.feat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: #c7c4f5; }
.feat-type {
  display: inline-block; align-self: flex-start; font-size: 12px; font-weight: 500;
  color: var(--primary); background: var(--primary-soft); padding: 3px 10px; border-radius: 999px; margin-bottom: 8px;
}
.feat-title { font-size: 16px; font-weight: 600; }
.feat-desc { font-size: 13px; color: var(--muted); margin-top: 6px; flex: 1; line-height: 1.6; }

/* 预置 RSS 源卡片 */
.rss-source-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.rss-source-card {
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s;
}
.rss-source-card:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); }

/* ---- 表格 ---- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-top: 6px; }
.tbl th, .tbl td { text-align: left; padding: 9px 10px; border-bottom: 1px solid #f0f0f2; }
.tbl th { color: var(--muted); font-weight: 500; background: #fafafa; font-size: 12.5px; }
.tbl tr:hover td { background: #fafaff; }
.bad { color: #dc2626; font-weight: 600; }
.ghost.sm { padding: 5px 10px; font-size: 12.5px; }
.pt-pane { animation: fade .2s ease; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }

/* 图形商标上传 */
.drop-zone { border: 2px dashed #d4d6da; border-radius: 10px; padding: 22px; text-align: center; color: #6b7280; cursor: pointer; transition: all .2s; background: #fafafa; }
.drop-zone:hover { border-color: #6366f1; background: #fafaff; }
.drop-zone.dragover { border-color: #6366f1; background: #eef0ff; }
.img-match-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.img-match-card { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; }
.img-match-card img { width: 100%; height: 90px; object-fit: contain; background: #f8fafc; }
.img-match-card .rank { position: absolute; background: #6366f1; color: #fff; font-size: 11px; padding: 2px 7px; border-radius: 0 0 8px 0; }
.img-match-card .info { padding: 7px 9px; font-size: 12px; }
.img-match-card .info b { font-size: 12.5px; }
.img-match-card .info .st { font-size: 11px; padding: 1px 6px; border-radius: 4px; }
.st-reg { background: #fee2e2; color: #dc2626; }
.st-rej { background: #fef3c7; color: #b45309; }
.st-inv { background: #e5e7eb; color: #6b7280; }

/* 弹窗（modal） */
.modal-mask { position: fixed; inset: 0; background: rgba(23, 26, 34, .4); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal-mask.hidden { display: none !important; }
.modal-card { background: var(--c-card, #fff); border-radius: 16px; padding: 22px 26px; width: min(420px, 92vw); box-shadow: 0 24px 60px rgba(0,0,0,.18); }
.modal-card h3 { font-size: 16px; margin-bottom: 6px; }
.modal-card .tbl-wrap { overflow-x: auto; }
.modal-card .tbl { min-width: 560px; }
/* 弹窗多选（渠道/监控类型） */
.chk-row { display: flex; gap: 14px; flex-wrap: wrap; margin: 4px 0 10px; }
.chk-row .chk { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: #374151; cursor: pointer; background: #fafafa; border: 1px solid var(--border); border-radius: 7px; padding: 5px 10px; }
.chk-row .chk:hover { border-color: #6366f1; background: #f5f6ff; }
.chk-row input[type=checkbox] { accent-color: #6366f1; width: 15px; height: 15px; }

/* ---------- AI 助手聊天（旧内嵌版，保留兼容） ---------- */
.ai-chat-wrap { display: flex; gap: 14px; margin-top: 14px; height: 560px; min-height: 420px; }
.ai-conv-list { width: 200px; flex: none; overflow-y: auto; border: 1px solid var(--border); border-radius: 12px; padding: 8px; background: #fff; }
.ai-conv-item { padding: 8px 10px; border-radius: 8px; font-size: 13px; color: #374151; cursor: pointer; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; position: relative; }
.ai-conv-item:hover { background: #f3f3f5; }
.ai-conv-item.active { background: var(--primary-soft); color: #4338ca; font-weight: 500; }
.ai-conv-item .del { position: absolute; right: 6px; top: 6px; display: none; color: #b91c1c; font-size: 12px; padding: 0 3px; }
.ai-conv-item:hover .del { display: block; }
.ai-chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ai-chat-box { flex: 1; overflow-y: auto; border: 1px solid var(--border); border-radius: 12px; padding: 18px 16px; background: #fafafa; }
.ai-msg { margin-bottom: 16px; display: flex; align-items: flex-start; gap: 8px; }
.ai-msg .bubble { max-width: 82%; padding: 10px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.75; word-break: break-word; }
.ai-msg.user { justify-content: flex-end; }
.ai-msg.user .bubble { background: #4f46e5; color: #fff; border-bottom-right-radius: 4px; box-shadow: 0 1px 3px rgba(79,70,229,.25); }
.ai-msg.assistant { justify-content: flex-start; }
.ai-msg.assistant .bubble { background: #fff; color: #1f2329; border: 1px solid #ececee; border-bottom-left-radius: 4px; box-shadow: var(--shadow); }
.ai-avatar { width: 30px; height: 30px; flex: none; border-radius: 50%; background: linear-gradient(135deg,#4f46e5,#8b5cf6); display: flex; align-items: center; justify-content: center; font-size: 15px; color: #fff; margin-top: 2px; }
.ai-msg .meta { font-size: 11px; color: #9aa0ab; margin-top: 5px; }
.ai-msg.user .meta { text-align: right; }
.ai-tool-tag { display: inline-flex; align-items: center; gap: 4px; margin: 8px 0 0 38px; padding: 4px 12px; background: var(--primary-soft); color: #4f46e5; border-radius: 999px; font-size: 11.5px; line-height: 1.5; }
.ai-tool-tag a { color: #4f46e5; font-weight: 500; }
.ai-msg .cursor { display: inline-block; width: 8px; height: 14px; background: #4f46e5; vertical-align: -2px; margin-left: 2px; animation: ai-blink 1s steps(1) infinite; }
@keyframes ai-blink { 50% { opacity: 0; } }
.ai-msg .bubble b { font-weight: 600; }
.ai-msg .bubble i { font-style: italic; }
.ai-msg .bubble h5 { font-size: 13.5px; font-weight: 600; margin: 8px 0 4px; color: inherit; }
.ai-msg .bubble p { margin: 4px 0; }
.ai-msg .bubble ul, .ai-msg .bubble ol { margin: 4px 0; padding-left: 22px; }
.ai-msg .bubble li { margin: 2px 0; }
.ai-msg .bubble code { background: #eef0f6; color: #4f46e5; padding: 1px 6px; border-radius: 5px; font-size: 12px; font-family: ui-monospace, Consolas, monospace; }
.ai-msg .bubble a { color: #4f46e5; text-decoration: underline; }
.ai-msg.user .bubble b { color: #fff; }
.ai-msg.user .bubble code { background: rgba(255,255,255,.22); color: #fff; }
.ai-msg.user .bubble a { color: #e0e7ff; }
.ai-input-row { display: flex; gap: 10px; margin-top: 10px; }
.ai-input-row textarea { flex: 1; resize: none; border: 1px solid var(--border-strong); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; font-family: inherit; outline: none; }
.ai-input-row textarea:focus { border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,.1); }

/* 顶栏 AI 助手入口 */
.btn-ai { display: inline-flex; align-items: center; gap: 4px; padding: 6px 14px; background: linear-gradient(135deg,#4f46e5,#7c3aed); color: #fff !important; border-radius: 999px; font-size: 13px; font-weight: 500; text-decoration: none; box-shadow: 0 2px 6px rgba(79,70,229,.28); transition: transform .15s, box-shadow .15s; }
.btn-ai:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(79,70,229,.32); }

/* 卡片标题（app.js 常用） */
.card-title { margin: 0 0 12px; font-size: 15.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }

/* ---------- 用量分析（概览页） ---------- */
.usage-balance { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; background: linear-gradient(135deg, #f5f4ff, #f0f6ff); border: 1px solid #e6e4f8; border-radius: 12px; padding: 18px 22px; margin-bottom: 16px; }
.ub-label { font-size: 12.5px; color: var(--muted); }
.ub-num { font-size: 30px; font-weight: 600; color: var(--primary); letter-spacing: -.5px; margin: 2px 0 4px; }
.ub-note { font-size: 12px; color: var(--muted); }
.ub-actions { display: flex; gap: 8px; }
.usage-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.usage-stat { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.us-num { font-size: 20px; font-weight: 600; color: var(--text); letter-spacing: -.3px; }
.us-title { font-size: 13px; color: var(--muted); margin-top: 3px; }
.us-sub { font-size: 11.5px; color: #b0b4bd; margin-top: 2px; }
.usage-chart-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.usage-days { border: 1px solid var(--border-strong); background: #fff; color: var(--muted); font-size: 12.5px; padding: 5px 12px; border-radius: 8px; cursor: pointer; transition: all .15s; }
.usage-days:hover { border-color: var(--primary); color: var(--primary); }
.usage-days.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.chart-wrap { border: 1px solid var(--border); border-radius: 12px; padding: 16px 14px 10px; background: #fff; }
.chart-plot { display: flex; align-items: flex-end; gap: 6px; height: 180px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.chart-bars { display: flex; align-items: flex-end; gap: 3px; height: 150px; width: 100%; }
.bar { border-radius: 4px 4px 0 0; min-width: 8px; transition: height .3s ease; position: relative; }
.bar-ai { background: linear-gradient(180deg, #6d5cf0, #4f46e5); }
.bar-push { background: #d6d8dd; }
.bar-val { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--muted); white-space: nowrap; }
.chart-date { font-size: 10.5px; color: #b0b4bd; }
.chart-date.today { color: var(--primary); font-weight: 600; }
@media (max-width: 960px) { .usage-stats { grid-template-columns: repeat(2, 1fr); } }
