:root {
  --sidebar-bg: #1c2333;
  --sidebar-fg: #aeb9d0;
  --accent: #3b6ef6;
  --accent-deep: #2b56d4;
  --accent-grad: linear-gradient(135deg, #3b6ef6 0%, #5a8bff 100%);
  --bg: #f4f6fa;
  --card: #ffffff;
  --text: #24292f;
  --muted: #6b7280;
  --border: #e3e8ef;
  --shadow-sm: 0 1px 3px rgba(16,24,40,.06);
  --shadow-md: 0 4px 14px rgba(16,24,40,.08);
  --shadow-lg: 0 10px 32px rgba(16,24,40,.14);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Microsoft YaHei", system-ui, sans-serif; color: var(--text); background: var(--bg); }

.layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: var(--sidebar-bg); color: var(--sidebar-fg); display: flex; flex-direction: column; flex-shrink: 0;
  position: sticky; top: 0; height: 100vh; }  /* 侧栏冻结：任何页面滚动都不带走菜单 */
.brand { font-size: 16px; font-weight: 700; color: #fff; padding: 18px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.nav { flex: 1; padding: 8px; overflow-y: auto; }
.nav-group { font-size: 11px; letter-spacing: 1px; color: #5c6a8a; padding: 14px 10px 4px; }
.nav-item { display: block; color: var(--sidebar-fg); text-decoration: none; padding: 8px 10px; border-radius: 6px; font-size: 14px; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: var(--accent); color: #fff; }
.sidebar-footer { font-size: 11px; color: #5c6a8a; padding: 10px 16px; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; background: var(--card); border-bottom: 1px solid var(--border); padding: 10px 24px; }
.global-search input { width: 320px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 20px; font-size: 13px; outline: none; }
.topbar-right { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.user { color: var(--muted); }
.btn-ghost { color: var(--muted); text-decoration: none; font-size: 13px; }
.btn-ghost:hover { color: var(--accent); }

.content { padding: 24px; }
.content h2 { margin-bottom: 8px; }
.muted { color: var(--muted); font-size: 13px; }

.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 16px; }
.module-card { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 18px; text-decoration: none; color: var(--text); transition: box-shadow .15s, transform .15s; }
.module-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); transform: translateY(-2px); }
.module-card h3 { margin: 8px 0 6px; font-size: 16px; }
.module-card p { font-size: 13px; color: var(--muted); line-height: 1.6; }
.module-milestone { display: inline-block; background: #eef3ff; color: var(--accent); font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 10px; }

.placeholder-box { margin-top: 16px; background: var(--card); border: 1px dashed var(--border); border-radius: 10px; padding: 40px; text-align: center; font-size: 14px; line-height: 2; }
.placeholder-tag { display: inline-block; background: #fff4e5; color: #d97706; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 10px; margin-bottom: 8px; }

.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #1c2333 0%, #2a3b66 100%); }
.auth-card { background: #fff; border-radius: 12px; padding: 36px 40px; width: 360px; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.auth-card h1 { font-size: 20px; text-align: center; }
.auth-sub { text-align: center; color: var(--muted); font-size: 12px; margin: 8px 0 20px; }
.auth-card input { width: 100%; padding: 10px 12px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; outline: none; }
.auth-card input:focus { border-color: var(--accent); }
.auth-card button { width: 100%; padding: 10px; background: var(--accent); color: #fff; border: none; border-radius: 8px; font-size: 15px; cursor: pointer; }
.auth-card button:hover { filter: brightness(1.08); }
.auth-alt { display: block; text-align: center; margin-top: 14px; font-size: 13px; color: var(--accent); text-decoration: none; }
.alert-error { background: #fdecec; color: #c0392b; font-size: 13px; padding: 8px 12px; border-radius: 6px; margin-bottom: 12px; }

/* ===== M1 文档库 ===== */
.docs-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.docs-search { display: flex; gap: 8px; flex: 1; max-width: 640px; }
.docs-search input[type=search] { flex: 1; padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; outline: none; }
.docs-search input:focus { border-color: var(--accent); }
.docs-search select { padding: 8px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; background: #fff; }
.docs-actions { display: flex; gap: 8px; }
.btn-primary { padding: 8px 16px; background: var(--accent); color: #fff; border: none; border-radius: 8px; font-size: 13px; cursor: pointer; text-decoration: none; display: inline-block; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost2 { padding: 8px 16px; background: #fff; color: var(--text); border: 1px solid var(--border); border-radius: 8px; font-size: 13px; cursor: pointer; }
.btn-ghost2:hover { border-color: var(--accent); color: var(--accent); }
.btn-del { padding: 4px 10px; background: none; color: var(--muted); border: none; font-size: 12px; cursor: pointer; }
.btn-del:hover { color: #c0392b; }
.docs-table { width: 100%; background: var(--card); border: 1px solid var(--border); border-radius: 10px; border-collapse: collapse; overflow: hidden; }
.docs-table th { text-align: left; font-size: 12px; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--border); background: #fafbfd; }
.docs-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: top; }
.docs-table tr:last-child td { border-bottom: none; }
.doc-title { color: var(--text); font-weight: 600; text-decoration: none; }
.doc-title:hover { color: var(--accent); }
.snippet { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.6; }
.snippet mark { background: #fff3c4; padding: 0 2px; border-radius: 2px; }
.badge { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 10px; }
.b-upload { background: #eef3ff; color: var(--accent); }
.b-created { background: #eefaf1; color: #1a7f4b; }
.b-briefing { background: #fff4e5; color: #d97706; }
.b-neican { background: #f3e8ff; color: #7c3aed; }
.b-crew { background: #e0f2fe; color: #0284c7; }
.empty-tip { text-align: center; color: var(--muted); padding: 40px 0 !important; font-size: 13px; }
dialog { border: none; border-radius: 12px; padding: 24px; width: 560px; box-shadow: 0 16px 48px rgba(0,0,0,.2); }
dialog::backdrop { background: rgba(0,0,0,.4); }
dialog h3 { margin-bottom: 14px; }
dialog input, dialog textarea { width: 100%; padding: 9px 12px; margin-bottom: 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit; outline: none; }
dialog textarea { resize: vertical; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.doc-head h2 { margin-bottom: 4px; }
.doc-meta { margin-bottom: 12px; }
.doc-ops { display: flex; gap: 8px; margin-bottom: 16px; }
.doc-body { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 24px; font-size: 14px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; font-family: "Microsoft YaHei", Consolas, monospace; }

/* ===== M2 简报流水线 ===== */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
.brief-form { display: flex; gap: 10px; margin: 16px 0; flex-wrap: wrap; }
.brief-form input { flex: 1; min-width: 240px; padding: 9px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; outline: none; }
.brief-form input:focus { border-color: var(--accent); }
.brief-form select { padding: 9px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; background: #fff; }
.jstatus { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 10px; }
.st-pending { background: #f1f3f7; color: var(--muted); }
.st-run { background: #eef3ff; color: var(--accent); animation: pulse 1.2s infinite; }
.st-done { background: #eefaf1; color: #1a7f4b; }
.st-fail { background: #fdecec; color: #c0392b; }
@keyframes pulse { 50% { opacity: .55; } }

/* ===== M3 热点跟踪 ===== */
.hs-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.hs-date { font-size: 14px; font-weight: 400; }
.hs-actions { display: flex; gap: 8px; }
.stale-banner { background: #fff8e6; border: 1px solid #f0d488; color: #8a6100; border-radius: 8px; padding: 10px 14px; font-size: 13px; margin: 12px 0; }
.hs-dates { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0; }
.date-chip { font-size: 12px; padding: 4px 10px; border-radius: 14px; background: #fff; border: 1px solid var(--border); color: var(--muted); text-decoration: none; }
.date-chip:hover { border-color: var(--accent); color: var(--accent); }
.date-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.hs-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.pf-chip { font-size: 12px; padding: 3px 10px; border-radius: 12px; border: 1px solid var(--accent); background: #eef3ff; color: var(--accent); cursor: pointer; }
.pf-chip.off { border-color: var(--border); background: #f1f3f7; color: var(--muted); text-decoration: line-through; }
.hs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.hs-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.hs-card-title { font-weight: 700; font-size: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.hs-list { list-style: none; }
.hs-list li { display: flex; align-items: baseline; gap: 6px; padding: 5px 0; font-size: 13px; line-height: 1.5; }
.hs-list a { color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-list a:hover { color: var(--accent); }
.hs-rank { flex-shrink: 0; width: 20px; text-align: right; font-weight: 700; color: var(--muted); font-size: 12px; }
.hs-trend { flex-shrink: 0; font-size: 11px; font-weight: 700; padding: 0 4px; border-radius: 8px; }
.t-new { background: #fdecec; color: #e11d48; }
.t-up { background: #eefaf1; color: #1a7f4b; }
.t-down { background: #f1f3f7; color: var(--muted); }
.crawl-status { margin-top: 16px; font-size: 13px; }
.crawl-log { max-height: 180px; overflow-y: auto; background: #0d1117; color: #9fe8b5; font-size: 11px; padding: 10px; border-radius: 8px; margin-top: 8px; white-space: pre-wrap; }

/* ===== M4 内参工作台 ===== */
.mk-done { background: #eefaf1; color: #1a7f4b; }
.nc-ops { display: flex; gap: 8px; margin-top: 8px; }
.nc-status { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 10px; vertical-align: middle; margin-left: 8px; }
.s-outline { background: #f1f3f7; color: var(--muted); }
.s-writing { background: #eef3ff; color: var(--accent); }
.s-done { background: #eefaf1; color: #1a7f4b; }
.np-materials { max-height: 160px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; }
.np-materials label { display: block; font-size: 13px; padding: 3px 0; }
.nc-layout { display: flex; gap: 14px; margin-top: 16px; align-items: flex-start; }
.nc-tree { flex: 1; min-width: 320px; max-width: 480px; padding: 10px; }
.nc-tree-head { font-size: 12px; color: var(--muted); padding: 4px 8px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; display: flex; justify-content: space-between; }
.nc-node { display: flex; align-items: center; gap: 6px; padding: 5px 8px 5px 12px; border-radius: 6px; font-size: 13px; position: relative; }
.nc-node:hover { background: #f6f8fc; }
.nc-node:hover .nc-node-ops { visibility: visible; }
.nc-dot { font-size: 10px; color: #cbd2dd; }
.nc-dot.done { color: #1a7f4b; }
.nc-node-title { flex: 1; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nc-node-title.sel { color: var(--accent); font-weight: 700; }
.nc-vinfo { font-size: 11px; }
.nc-node-ops { visibility: hidden; display: flex; gap: 4px; }
.op { cursor: pointer; color: var(--muted); font-size: 13px; padding: 0 3px; }
.op:hover { color: var(--accent); }
.drop-next { cursor: move; color: #cbd2dd; font-size: 11px; padding: 2px 4px; border-radius: 4px; }
.drop-next.over { background: var(--accent); color: #fff; }
.nc-detail { flex: 1.6; padding: 16px; min-width: 0; }
.nc-d-head { display: flex; gap: 8px; margin-bottom: 10px; }
.nc-d-head input { flex: 1; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-weight: 600; }
.nc-detail textarea { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-size: 13px; font-family: inherit; margin-bottom: 10px; }
#d-content { line-height: 1.8; }
.nc-d-gen { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.nc-d-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ===== 分析工具箱（第一波） ===== */
.b-viewpoint { background: #fff0f6; color: #c02670; }
.b-braintrust { background: #eef3ff; color: #4338ca; }
.b-debate { background: #fef3c7; color: #b45309; }
.b-matrix { background: #ecfeff; color: #0e7490; }
.b-trends { background: #eefaf1; color: #047857; }
.b-judge { background: #f1f5f4; color: #37544c; }
.b-review { background: #f5f3ff; color: #6d28d9; }
.ana-form { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.ana-form input, .ana-form textarea, .ana-form select { padding: 9px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit; outline: none; }
.ana-form input:focus, .ana-form textarea:focus { border-color: var(--accent); }
.ana-form button { align-self: flex-start; }
.ana-result-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.ana-result .doc-body { max-height: 60vh; overflow-y: auto; }
.ana-loading { margin-top: 12px; padding: 12px 16px; font-size: 13px; display: flex; align-items: center; gap: 10px; }
.b-industry { background: #f0fdf4; color: #15803d; }
.b-sentiment { background: #fff7ed; color: #c2410c; }
.b-policy { background: #f8fafc; color: #475569; }

/* ===== 圆桌研讨 ===== */
.rt-controls { display: flex; align-items: center; gap: 12px; }
.rt-controls select { padding: 8px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; }
.rt-experts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.rt-card { background: var(--card); border: 2px solid var(--border); border-radius: 10px; padding: 12px 14px; cursor: pointer; transition: border-color .12s; position: relative; }
.rt-card:hover { border-color: #b8c6e8; }
.rt-card.sel { border-color: var(--accent); background: #f5f8ff; }
.rt-card-head { display: flex; gap: 10px; align-items: center; }
.rt-avatar { width: 38px; height: 38px; border-radius: 50%; background: #eef1f7; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.rt-check { margin-left: auto; color: var(--accent); font-weight: 700; font-size: 16px; }
.rt-builtin { font-size: 10px; background: #f1f3f7; color: var(--muted); border-radius: 8px; padding: 1px 6px; vertical-align: 2px; }
.rt-soul { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.rt-ops { margin-top: 8px; display: flex; gap: 12px; font-size: 12px; visibility: hidden; }
.rt-card:hover .rt-ops { visibility: visible; }
.rt-e-row { display: flex; gap: 8px; }
.rt-posts { margin: 18px 0; display: flex; flex-direction: column; gap: 12px; }
.rt-round-divider { text-align: center; color: var(--muted); font-size: 12px; letter-spacing: 2px; margin: 10px 0; }
.rt-post { display: flex; gap: 12px; }
.rt-post-body { background: var(--card); border: 1px solid var(--border); border-radius: 2px 12px 12px 12px; padding: 10px 16px; font-size: 14px; line-height: 1.7; max-width: 860px; }
.rt-post-body b { display: block; margin-bottom: 4px; font-size: 13px; color: var(--accent); }
.rt-summary { border: 2px solid #c9d8f0; background: #f8faff; }
.rt-summary-head { font-weight: 700; font-size: 15px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.rt-typing .rt-avatar { animation: pulse 1.2s infinite; }

/* ===== 智库问答（批次1） ===== */
.qa-thread { display: flex; flex-direction: column; gap: 14px; margin: 16px 0; min-height: 240px; }
.qa-empty { text-align: center; color: var(--muted); padding: 50px 0; font-size: 14px; }
.qa-empty a { color: var(--accent); }
.qa-msg { max-width: 860px; font-size: 14px; line-height: 1.8; }
.qa-user { align-self: flex-end; background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 14px 14px 2px 14px; }
.qa-bot { align-self: flex-start; background: var(--card); border: 1px solid var(--border); padding: 14px 18px; border-radius: 2px 14px 14px 14px; width: 100%; }
.qa-bot .doc-body { padding: 0; border: none; background: none; }
.qa-cite { color: var(--accent); font-weight: 700; cursor: pointer; }
.qa-cits { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin-top: 12px; }
.qa-cit { display: block; background: #f7f9fd; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-size: 12px; text-decoration: none; color: var(--text); }
.qa-cit:hover { border-color: var(--accent); }
.qa-cit .snippet { color: var(--muted); margin-top: 3px; }
.qa-inputbar { display: flex; gap: 10px; align-items: flex-end; position: sticky; bottom: 0; }
.qa-inputbar textarea { flex: 1; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; font-family: inherit; resize: none; }

/* ===== 批次3 舆情系统化 ===== */
.tab-bar { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin: 14px 0 16px; }
.tab { padding: 9px 18px; border: none; background: none; font-size: 14px; color: var(--muted); cursor: pointer; border-radius: 8px 8px 0 0; }
.tab:hover { color: var(--accent); }
.tab.active { color: var(--accent); font-weight: 700; border-bottom: 2px solid var(--accent); margin-bottom: -2px; }
.plan-trend { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 14px; }
.plan-bar { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.plan-bar-track { flex: 1; height: 12px; background: #eef1f7; border-radius: 6px; overflow: hidden; }
.plan-bar-fill { height: 100%; background: linear-gradient(90deg, #6a9bff, var(--accent)); }
.cluster-card { cursor: pointer; }
.cluster-items { margin-top: 10px; border-top: 1px dashed var(--border); padding-top: 6px; text-align: left; }
.stance-badge { font-size: 11px; font-weight: 400; background: #f1f3f7; color: var(--muted); border-radius: 8px; padding: 1px 7px; vertical-align: 1px; }

/* ===== 批次6：助手抽屉 / MD渲染 / 图例 ===== */
#ai-fab { position: fixed; right: 24px; bottom: 24px; width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, #3b6ef6, #7c3aed); color: #fff; font-size: 24px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(59,110,246,.4); z-index: 900; }
#ai-fab:hover { transform: scale(1.08); }
#ai-drawer { position: fixed; top: 0; right: -420px; width: 400px; height: 100vh; background: #fff;
  border-left: 1px solid var(--border); box-shadow: -8px 0 30px rgba(0,0,0,.12); z-index: 901;
  display: flex; flex-direction: column; transition: right .22s ease; }
#ai-drawer.open { right: 0; }
.ai-drawer-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.ai-drawer-head .btn-del { margin-left: auto; }
.ai-drawer-thread { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; background: var(--bg); }
.ai-drawer-thread .qa-msg { font-size: 13px; max-width: 100%; }
.ai-drawer-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.ai-drawer-input textarea { flex: 1; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; font-family: inherit; resize: none; }
.md .md-h { margin: 12px 0 6px; font-size: 15px; border-left: 3px solid var(--accent); padding-left: 8px; }
.md p { margin: 6px 0; }
.md .md-ul { margin: 6px 0 6px 20px; }
.md .md-ul li { margin: 3px 0; }
.md code { background: #eef1f7; border-radius: 4px; padding: 1px 5px; font-size: 12px; }
.md-code { background: #0d1117; color: #9fe8b5; padding: 10px; border-radius: 8px; overflow-x: auto; font-size: 12px; }
a.tab { text-decoration: none; display: inline-block; }
.graph-legend { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; }
.graph-legend span { display: inline-flex; align-items: center; gap: 4px; }
.graph-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.set-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.set-row label { width: 110px; font-size: 13px; color: var(--muted); flex-shrink: 0; }
.set-row input:not([type=checkbox]) { flex: 1; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; }
.np-materials label { display: flex; align-items: center; gap: 6px; font-size: 13px; padding: 4px 0; }
.np-materials input[type=checkbox] { flex-shrink: 0; margin: 0; }

/* ===== 深度研究（crew 收编） ===== */
.crew-stepper { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px; margin-bottom: 14px; }
.crew-stepper .step { font-size: 12px; color: var(--muted); background: #f1f3f7; border-radius: 12px; padding: 3px 10px; }
.crew-stepper .step.done { background: #eefaf1; color: #1a7f4b; font-weight: 700; }
.crew-action { margin-bottom: 14px; font-size: 14px; }
.crew-candidates { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 10px; }
.crew-cand { background: #f7f9fd; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.crew-art { margin-bottom: 14px; }
.crew-art h3 { font-size: 14px; margin-bottom: 8px; }
.crew-pre { max-height: 320px; overflow: auto; background: #f6f8fc; border-radius: 8px; padding: 10px 12px; font-size: 11px; line-height: 1.5; white-space: pre-wrap; }

/* ===== 批次7 通知中心 ===== */
.bell-wrap { position: relative; }
.bell { font-size: 17px; cursor: pointer; position: relative; }
.bell b { position: absolute; top: -6px; right: -10px; background: #e11d48; color: #fff; font-size: 10px;
  border-radius: 8px; padding: 0 5px; min-width: 14px; text-align: center; }
.bell-panel { position: absolute; right: 0; top: 30px; width: 330px; background: #fff; border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.14); z-index: 950; }
.bell-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px;
  border-bottom: 1px solid var(--border); font-size: 13px; }
.bell-list { max-height: 340px; overflow-y: auto; }
.bell-item { padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 13px; }
.bell-item.unread { background: #f5f8ff; }
.bell-item a { color: var(--accent); text-decoration: none; font-weight: 600; }
.bell-item .snippet { margin-top: 2px; }
.wf-step { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.wf-step select { padding: 7px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; }
.wf-step textarea { flex: 1; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; font-family: inherit; resize: vertical; }
.b-fail { background: #fdecec; color: #c0392b; }

/* ===== 视觉升级层 v2：层次 / 质感 / 细节（不改结构，只加观感） ===== */

/* 全局滚动条 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #c9d2e0; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #aab7cc; background-clip: content-box; border: 2px solid transparent; }
::-webkit-scrollbar-track { background: transparent; }

/* 品牌区：logo 标记 + 渐变点缀 */
.brand { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.brand::before { content: "🧠"; width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  background: var(--accent-grad); display: flex; align-items: center; justify-content: center; font-size: 15px;
  box-shadow: 0 2px 8px rgba(59,110,246,.35); }

/* 侧栏导航：指示条 + 图标底色 */
.nav-item { position: relative; transition: background .12s, color .12s, padding-left .15s; }
.nav-item.active { box-shadow: inset 3px 0 0 0 #7c9bff; }
.nav-item.active::before { content: ""; position: absolute; left: -8px; top: 20%; height: 60%; width: 3px;
  border-radius: 2px; background: #8fb0ff; }

/* 页面主标题：左侧强调条 */
.content h2 { display: flex; align-items: center; gap: 10px; font-size: 20px; }
.content h2::before { content: ""; width: 4px; height: 20px; border-radius: 2px; background: var(--accent-grad); }

/* 卡片：静置浮起 + 悬停加深 */
.card { box-shadow: var(--shadow-sm); }
.module-card { box-shadow: var(--shadow-sm); overflow: hidden; }
.module-card::after { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px;
  background: var(--accent-grad); opacity: 0; transition: opacity .18s; }
.module-card:hover { box-shadow: var(--shadow-md); }
.module-card:hover::after { opacity: 1; }
.cluster-card:hover, .rt-card:hover { box-shadow: var(--shadow-sm); }

/* 统计卡（驾驶舱）：图标 + 数字 + 标签 三段式 */
.stat-card { display: flex; align-items: center; gap: 12px; cursor: default !important; }
.stat-icon { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0; background: #eef3ff; }
.stat-icon.t-blue { background: #e8efff; }
.stat-icon.t-green { background: #e6f7ee; }
.stat-icon.t-orange { background: #fff3e2; }
.stat-icon.t-purple { background: #f1e9ff; }
.stat-icon.t-rose { background: #ffebee; }
.stat-icon.t-cyan { background: #e0f6fb; }
.stat-body { min-width: 0; }
.stat-num { font-size: 22px; font-weight: 800; line-height: 1.2; letter-spacing: -.5px; }
.stat-num small { font-size: 12px; font-weight: 500; color: var(--muted); }
.stat-label { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* 研究漏斗：节点胶囊化 */
.card .funnel-node { display: inline-flex; align-items: center; gap: 6px; background: #f6f8fc; border: 1px solid var(--border);
  border-radius: 16px; padding: 4px 12px; font-size: 13px; }
.card .funnel-node b { font-size: 15px; }

/* 表格：行悬停 + 表头字距 */
.docs-table tr:hover td { background: #f8faff; }
.docs-table th { letter-spacing: .5px; text-transform: none; }

/* 按钮：主按钮渐变 + 悬停动效 */
.btn-primary { background: var(--accent-grad); box-shadow: 0 2px 8px rgba(59,110,246,.28); transition: box-shadow .15s, transform .15s, filter .15s; }
.btn-primary:hover { filter: brightness(1.06); box-shadow: 0 4px 14px rgba(59,110,246,.4); transform: translateY(-1px); }
.btn-ghost2 { transition: border-color .15s, color .15s, box-shadow .15s; }
.btn-ghost2:hover { box-shadow: var(--shadow-sm); }

/* 输入控件：聚焦光圈 */
.global-search input:focus, .docs-search input:focus, .brief-form input:focus,
.ana-form input:focus, .ana-form textarea:focus, dialog input:focus, dialog textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,110,246,.12); }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid rgba(59,110,246,.5); outline-offset: 1px; }

/* 高频入口：胶囊链接 */
.card a { text-decoration: none; }
.highfreq-link { display: inline-flex; align-items: center; gap: 6px; background: #f6f8fc; border: 1px solid var(--border);
  border-radius: 18px; padding: 6px 14px; font-size: 13px; color: var(--text); transition: all .15s; }
.highfreq-link:hover { border-color: var(--accent); color: var(--accent); background: #f0f5ff; transform: translateY(-1px);
  box-shadow: var(--shadow-sm); }

/* 徽章与状态：描边收敛 */
.badge, .jstatus, .module-milestone, .nc-status { border-radius: 6px; }
.st-run { box-shadow: 0 0 0 2px rgba(59,110,246,.12); }

/* 对话框：入场动画 + 顶部渐变线 */
dialog { animation: dlg-in .18s ease; }
dialog::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--accent-grad); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

/* 抽屉与悬浮球：质感 */
#ai-fab { transition: transform .15s, box-shadow .15s; box-shadow: 0 8px 24px rgba(91,80,246,.45); }
#ai-fab:hover { box-shadow: 0 10px 30px rgba(91,80,246,.55); }
#ai-drawer { border-top: 3px solid transparent; border-image: linear-gradient(90deg, #3b6ef6, #7c3aed) 1; }

/* 空状态：插画化 */
.qa-empty, .empty-tip { color: var(--muted); }
.placeholder-box { background: linear-gradient(180deg, #fbfcfe, #f6f8fc); }

/* 徽标徽章（docs 来源色点） */
.b-upload, .b-created, .b-briefing, .b-neican, .b-template { border-radius: 6px; font-weight: 600; }
.b-template { background: #e0f2fe; color: #0369a1; }

/* 列表行 hover 提亮（圆桌专家卡 / 简报任务） */
.rt-card { transition: border-color .12s, box-shadow .15s, transform .15s; }
.rt-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.rt-card.sel { box-shadow: 0 0 0 3px rgba(59,110,246,.15); }

/* 顶栏：毛玻璃 */
.topbar { position: sticky; top: 0; z-index: 100; backdrop-filter: blur(8px); background: rgba(255,255,255,.85); }

/* ===== 看板化驾驶舱（参考 MatDash/HashBuilds KPI 范式，纯 SVG/CSS 零依赖） ===== */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat-spark { margin-left: auto; flex-shrink: 0; }
.kpi-spark { display: block; }
.kpi-mini { font-size: 12px; text-align: right; padding: 4px 6px; background: #f6f8fc; border-radius: 6px; white-space: nowrap; }
.delta { font-size: 11px; font-weight: 700; border-radius: 6px; padding: 1px 6px; margin-left: 8px; vertical-align: 3px; }
.delta.up { background: #e6f7ee; color: #059669; }
.delta.down { background: #fdecec; color: #e11d48; }

.dash-mid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; margin-bottom: 16px; }
.dash-low { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; }
@media (max-width: 1100px) { .dash-mid, .dash-low { grid-template-columns: 1fr; } }
.dash-panel { padding: 16px 18px; }
.panel-title { display: block; font-size: 14px; margin-bottom: 12px; }

/* 漏斗可视化：渐缩比例条 */
.funnel-viz { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.funnel-row { display: flex; }
.funnel-bar { display: flex; align-items: center; gap: 8px; min-height: 38px; border-radius: 8px;
  padding: 4px 14px; color: #fff; font-size: 13px; transition: transform .15s; }
.funnel-bar:hover { transform: translateX(4px); }
.funnel-icon { font-size: 14px; }
.funnel-name { font-weight: 600; opacity: .92; }
.funnel-val { font-size: 16px; font-weight: 800; margin-left: auto; }
.funnel-sub { font-size: 10px; opacity: .85; background: rgba(255,255,255,.22); border-radius: 6px; padding: 0 6px; }
.funnel-conv { margin-top: 10px; font-size: 12px; }

/* 构成环图（SVG stroke-dasharray） */
.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut { transform: rotate(0deg); }
.donut-num { font-size: 9px; font-weight: 800; fill: var(--text); }
.donut-label { font-size: 4px; fill: var(--muted); }
.donut-legend { display: flex; flex-direction: column; gap: 7px; font-size: 13px; }
.donut-legend span { display: flex; align-items: center; gap: 7px; }
.donut-legend i { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.donut-legend b { margin-left: 2px; }

/* 动态时间线 */
.timeline { display: flex; flex-direction: column; }
.tl-item { display: flex; align-items: center; gap: 10px; padding: 8px 2px; font-size: 13px;
  border-bottom: 1px dashed var(--border); position: relative; }
.tl-item:last-child { border-bottom: none; }
.tl-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 0 3px rgba(0,0,0,.05); }
.tl-item .doc-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }

/* 高频入口大卡 */
.highfreq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.highfreq-big { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: 10px; text-decoration: none; color: var(--text); font-size: 14px; font-weight: 700;
  transition: all .15s; background: linear-gradient(180deg, #fff, #f8faff); }
.highfreq-big:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px);
  box-shadow: var(--shadow-md); }
.hf-ico { font-size: 20px; }
.highfreq-big small { font-size: 11px; color: var(--muted); font-weight: 400; }

/* 文档库统计条 */
.docs-statbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }

/* ===== 对话工作台（LobeChat 视觉语言）===== */
.chat-shell { display: flex; gap: 0; margin: -24px; height: calc(100vh - 55px); background: var(--bg); }
/* 高度锁死在视口内（55px=顶栏），滚动只发生在 .chat-scroll 内部——页面本身不滚，侧栏自然不动 */
.chat-side { width: 250px; flex-shrink: 0; border-right: 1px solid var(--border); padding: 14px 10px;
  display: flex; flex-direction: column; gap: 10px; background: #fbfcfe; }
.chat-new { padding: 11px; border: 1px solid var(--border); border-radius: 10px; background: #fff;
  font-size: 14px; font-weight: 700; cursor: pointer; color: var(--accent); transition: all .15s;
  box-shadow: var(--shadow-sm); }
.chat-new:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.chat-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.chat-item { padding: 9px 12px; border-radius: 8px; font-size: 13px; cursor: pointer; color: var(--text);
  transition: background .12s; overflow: hidden; }
.chat-item:hover { background: #eef2f9; }
.chat-item.on { background: #e4ebfa; color: var(--accent-deep); font-weight: 600; }
.chat-item-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-item-x { float: right; border: none; background: none; color: transparent; cursor: default; }
.chat-side-foot { font-size: 11px; line-height: 1.7; padding: 8px 6px; border-top: 1px dashed var(--border); }

.chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 28px 24px; scroll-behavior: smooth; }
.chat-thread { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }

/* 欢迎态 */
.chat-hero { max-width: 640px; margin: 8vh auto 0; text-align: center; }
.chat-hero-ava { width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 24px;
  background: var(--accent-grad); display: flex; align-items: center; justify-content: center;
  font-size: 34px; box-shadow: 0 12px 32px rgba(59,110,246,.35); }
.chat-hero h2 { font-size: 22px; margin-bottom: 8px; justify-content: center; }
.chat-hero h2::before { display: none; }
.chat-hero p { margin-bottom: 22px; }
.chat-hero-examples { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chat-hero-examples button { padding: 13px 16px; border: 1px solid var(--border); border-radius: 12px;
  background: #fff; font-size: 13px; cursor: pointer; text-align: left; color: var(--text);
  transition: all .15s; box-shadow: var(--shadow-sm); }
.chat-hero-examples button:hover { border-color: var(--accent); color: var(--accent);
  transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* 气泡 */
.cb { display: flex; gap: 12px; align-items: flex-start; }
.cb.user { justify-content: flex-end; }
.cb-b { max-width: 82%; padding: 12px 16px; font-size: 14px; line-height: 1.75; }
.cb.user .cb-b { background: var(--accent-grad); color: #fff; border-radius: 16px 16px 4px 16px;
  box-shadow: 0 4px 12px rgba(59,110,246,.25); white-space: pre-wrap; }
.cb.bot .cb-ava { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-grad);
  display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(59,110,246,.28); }
.cb.bot .cb-b { background: var(--card); border: 1px solid var(--border); border-radius: 4px 16px 16px 16px;
  box-shadow: var(--shadow-sm); width: fit-content; min-width: 60px; }
.cb.bot .md { white-space: normal; }
.cursor { display: inline-block; width: 8px; height: 15px; background: var(--accent); margin-left: 2px;
  vertical-align: -2px; animation: pulse .9s infinite; border-radius: 2px; }

/* 任务卡片 */
.task-card { min-width: 300px; padding: 14px 16px; }
.tc-head { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.tc-note { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.tc-row { display: flex; align-items: center; gap: 10px; }
.tc-row a { font-size: 12px; padding: 5px 12px; }

/* 输入区 */
.chat-inputbar { padding: 14px 24px 20px; background: linear-gradient(180deg, transparent, var(--bg) 30%); }
.chat-input-wrap { max-width: 800px; margin: 0 auto; display: flex; align-items: flex-end; gap: 10px;
  background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 10px 12px;
  box-shadow: var(--shadow-md); transition: box-shadow .15s, border-color .15s; }
.chat-input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,110,246,.12), var(--shadow-md); }
.chat-input-wrap textarea { flex: 1; border: none; outline: none; resize: none; font-size: 14px;
  font-family: inherit; line-height: 1.6; max-height: 160px; background: transparent; }
.chat-send { width: 38px; height: 38px; border-radius: 12px; border: none; background: var(--accent-grad);
  color: #fff; font-size: 16px; cursor: pointer; flex-shrink: 0; transition: all .15s;
  box-shadow: 0 3px 10px rgba(59,110,246,.3); }
.chat-send:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(59,110,246,.4); }
.chat-send:disabled { opacity: .5; cursor: default; }

/* 项目卡（深度研究/自动化）：头部图标 + 进度条 */
.crew-card-head { display: flex; align-items: center; gap: 12px; }
.crew-progress { height: 7px; background: #eef1f7; border-radius: 4px; overflow: hidden; margin-top: 12px; }
.crew-progress-fill { height: 100%; border-radius: 4px; background: var(--accent-grad); transition: width .4s; }
.crew-progress-fill.done { background: linear-gradient(90deg, #10b981, #34d399); }
.crew-progress-label { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); margin-top: 5px; }
.auto-card.disabled { opacity: .72; }
.pulse-inline { display: inline-block; animation: pulse 1.2s infinite; }

/* 热点榜单：前三名奖牌 + 热度条 */
.hs-rank-medal { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 11px; font-weight: 800; color: #fff; }
.hs-rank-medal.m1 { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.hs-rank-medal.m2 { background: linear-gradient(135deg, #94a3b8, #cbd5e1); }
.hs-rank-medal.m3 { background: linear-gradient(135deg, #d97706, #f59e0b); opacity: .85; }
.hs-heat { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, rgba(59,110,246,.07), rgba(59,110,246,.13)); border-radius: 6px; z-index: 0; }
.hs-list li { position: relative; z-index: 1; }


/* ===== 巡检修复：折行/对比度/一致性（2026-08-29 5.3-flash 视觉巡检）===== */
.docs-table td, .docs-table th { white-space: nowrap; }          /* 表格单元格不再折行（日期/列名/删除） */
.docs-table td:first-child { white-space: normal; }               /* 标题列允许换行 */
.rt-builtin { white-space: nowrap; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }  /* 专家标签胶囊不折行 */
.rt-card-head > div { min-width: 0; }
.nav-group { color: #8a97b5 !important; font-weight: 600; }       /* 侧栏分组对比度提升 */
.stale-banner, .muted { }
.badge.b-crew { background: #e0f2fe; color: #0284c7; }
