/* ResearchPilot 设计系统 —— 全站共用，模块只用这里的令牌与组件类 */
:root {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --panel-2: #fafbfe;
  --border: #e4e7f0;
  --border-strong: #c9cede;
  --text: #1c2233;
  --muted: #6b7390;
  --faint: #9aa1b9;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef0fe;
  --accent-border: #c7cbfa;
  --ok: #16a34a;
  --ok-soft: #e9f9ef;
  --warn: #d97706;
  --warn-soft: #fef5e7;
  --danger: #dc2626;
  --danger-soft: #fdecec;
  --info: #0284c7;
  --info-soft: #e8f6fd;
  --sidebar-bg: #171c2e;
  --sidebar-text: #aab1cc;
  --sidebar-active: #ffffff;
  --shadow: 0 1px 3px rgba(20, 24, 50, .07), 0 4px 14px rgba(20, 24, 50, .05);
  --shadow-lg: 0 8px 32px rgba(20, 24, 50, .16);
  --radius: 10px;
  --radius-sm: 7px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-serif: Georgia, "Times New Roman", "Songti SC", serif;
  --mono: "Cascadia Code", Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: var(--font); color: var(--text); background: var(--bg); font-size: 14px; line-height: 1.55; }
#app { display: flex; height: 100vh; overflow: hidden; }

/* ---------- 侧边栏 ---------- */
#sidebar { width: 216px; min-width: 216px; background: var(--sidebar-bg); color: var(--sidebar-text); display: flex; flex-direction: column; }
.brand { display: flex; gap: 10px; align-items: center; padding: 18px 16px 14px; }
.brand-logo { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; font-family: var(--font-serif); font-size: 19px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.brand-name { color: #fff; font-weight: 600; font-size: 15px; letter-spacing: .2px; }
.brand-sub { font-size: 11px; color: var(--sidebar-text); }
#nav { flex: 1; overflow-y: auto; padding: 6px 10px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; color: var(--sidebar-text); margin-bottom: 2px; font-size: 13.5px; border: none; background: none; width: 100%; text-align: left; font-family: inherit; }
.nav-item:hover { background: rgba(255,255,255,.07); color: #e2e6f5; }
.nav-item.active { background: rgba(99,102,241,.28); color: var(--sidebar-active); }
.nav-item .nav-flag { margin-left: auto; font-size: 10px; background: linear-gradient(135deg,#f59e0b,#ef4444); color: #fff; border-radius: 99px; padding: 1px 7px; }
.nav-item svg { flex: none; }
.nav-sep { margin: 10px 12px 6px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: #5d6580; }
.sidebar-foot { padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.08); }
.llm-status { display: flex; align-items: center; gap: 8px; font-size: 12px; cursor: pointer; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-gray { background: #64748b; } .dot-green { background: #22c55e; box-shadow: 0 0 6px #22c55e88; } .dot-red { background: #ef4444; } .dot-yellow { background: #eab308; }

/* ---------- 顶栏 ---------- */
#main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
#topbar { height: 52px; background: var(--panel); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 14px; padding: 0 18px; flex: none; }
#project-switcher { display: flex; align-items: center; gap: 8px; }
#global-search { flex: 1; max-width: 480px; position: relative; }
#topbar-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
#page { flex: 1; overflow-y: auto; position: relative; }
.page-pad { padding: 22px 26px; max-width: 1280px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.page-title { font-size: 20px; font-weight: 650; }
.page-desc { color: var(--muted); font-size: 13px; margin-top: 3px; }
.page-head-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- 基础控件 ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--panel); color: var(--text); cursor: pointer; font-size: 13px; font-family: inherit; transition: all .12s; white-space: nowrap; }
.btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-danger { color: var(--danger); border-color: #f3b6b6; }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--accent-soft); border-color: transparent; }
.btn-sm { padding: 4px 9px; font-size: 12px; border-radius: 6px; }
.btn-icon { padding: 6px; }
.input, .select, textarea.input { padding: 7px 11px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-size: 13px; font-family: inherit; background: #fff; color: var(--text); outline: none; transition: border .12s, box-shadow .12s; }
.input:focus, .select:focus, textarea.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder { color: var(--faint); }
textarea.input { resize: vertical; line-height: 1.5; }
label.field { display: block; margin-bottom: 12px; }
label.field > span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; font-weight: 550; }
label.field .input, label.field .select { width: 100%; }
.hint { font-size: 12px; color: var(--faint); margin-top: 4px; }

/* ---------- 卡片与面板 ---------- */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 16px 18px; }
.card-title { font-weight: 620; font-size: 14px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.row { display: flex; align-items: center; gap: 8px; }
.row-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12px; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; }
.flex1 { flex: 1; min-width: 0; }

/* ---------- 标签 / 徽章 ---------- */
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-border); padding: 1px 8px; border-radius: 99px; cursor: default; }
.tag .tag-x { cursor: pointer; opacity: .6; } .tag .tag-x:hover { opacity: 1; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; padding: 2px 8px; border-radius: 99px; font-weight: 550; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-gray { background: #eef0f5; color: var(--muted); }

/* ---------- 文献引用卡（全产品复用） ---------- */
.paper-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 11px 13px; transition: border .12s; }
.paper-card:hover { border-color: var(--accent-border); }
.paper-card .pc-title { font-weight: 600; font-size: 13.5px; line-height: 1.4; color: var(--text); }
.paper-card .pc-title a { color: inherit; text-decoration: none; }
.paper-card .pc-title a:hover { color: var(--accent); text-decoration: underline; }
.paper-card .pc-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.paper-card .pc-ids { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 5px; }
.paper-card .pc-ids a { font-size: 11.5px; color: var(--accent); text-decoration: none; font-family: var(--mono); }
.paper-card .pc-ids a:hover { text-decoration: underline; }
.paper-card .pc-actions { display: flex; gap: 6px; margin-top: 8px; align-items: center; flex-wrap: wrap; }
.cite-num { color: var(--accent); font-weight: 600; font-size: 12px; margin-right: 4px; }

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; padding: 8px 10px; background: var(--panel-2); border-bottom: 1px solid var(--border); color: var(--muted); font-weight: 600; font-size: 12px; white-space: nowrap; }
.table td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:hover td { background: var(--panel-2); }

/* ---------- 空状态 / 引导 ---------- */
.empty-state { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty-state .es-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.empty-state .es-title { font-size: 15px; font-weight: 620; color: var(--text); margin-bottom: 5px; }
.empty-state .es-desc { font-size: 13px; max-width: 420px; margin: 0 auto 16px; }
.onboard-banner { background: linear-gradient(120deg, #eef0fe, #f5f0ff); border: 1px solid var(--accent-border); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px; display: flex; gap: 14px; align-items: center; }

/* ---------- 模态 / 提示 ---------- */
#modal-root .modal-mask { position: fixed; inset: 0; background: rgba(18,22,40,.45); display: flex; align-items: center; justify-content: center; z-index: 100; animation: fadeIn .15s; }
.modal { background: var(--panel); border-radius: 14px; box-shadow: var(--shadow-lg); width: 560px; max-width: 94vw; max-height: 88vh; display: flex; flex-direction: column; animation: popIn .16s; }
.modal.modal-wide { width: 880px; }
.modal-head { padding: 15px 20px 11px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--border); }
.modal-head .modal-title { font-weight: 640; font-size: 15px; flex: 1; }
.modal-body { padding: 16px 20px; overflow-y: auto; flex: 1; }
.modal-foot { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: scale(.96) translateY(6px); } }
#toast-root { position: fixed; top: 16px; right: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #20263c; color: #fff; padding: 10px 16px; border-radius: 9px; box-shadow: var(--shadow-lg); font-size: 13px; max-width: 380px; animation: slideIn .2s; display: flex; gap: 8px; align-items: center; }
.toast-ok { background: #14532d; } .toast-error { background: #7f1d1d; } .toast-warn { background: #78350f; }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } }

/* ---------- 下拉菜单 ---------- */
.dropdown { position: relative; }
.dropdown-menu { position: absolute; top: calc(100% + 4px); left: 0; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); min-width: 200px; z-index: 60; padding: 4px; max-height: 320px; overflow-y: auto; }
.dropdown-menu.menu-right { left: auto; right: 0; }
.menu-item { padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; display: flex; gap: 8px; align-items: center; }
.menu-item:hover { background: var(--accent-soft); }
.menu-item.active { color: var(--accent); font-weight: 600; }

/* ---------- 聊天 ---------- */
.chat-layout { display: flex; height: 100%; }
.chat-sessions { width: 220px; min-width: 220px; border-right: 1px solid var(--border); background: var(--panel); display: flex; flex-direction: column; }
.chat-sessions-list { flex: 1; overflow-y: auto; padding: 8px; }
.session-item { padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; margin-bottom: 2px; display: flex; align-items: center; gap: 6px; }
.session-item:hover { background: var(--panel-2); }
.session-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 550; }
.session-item .si-del { margin-left: auto; opacity: 0; color: var(--muted); }
.session-item:hover .si-del { opacity: .8; }
.chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
.chat-msgs { flex: 1; overflow-y: auto; padding: 22px 8%; }
.msg { margin-bottom: 18px; max-width: 100%; }
.msg-user .msg-bubble { background: var(--accent); color: #fff; border-radius: 14px 14px 4px 14px; padding: 10px 15px; margin-left: auto; max-width: 78%; width: fit-content; white-space: pre-wrap; word-break: break-word; }
.msg-assistant .msg-bubble { background: var(--panel); border: 1px solid var(--border); border-radius: 4px 14px 14px 14px; padding: 14px 17px; box-shadow: var(--shadow); }
.msg-role { font-size: 11.5px; color: var(--faint); margin-bottom: 4px; }
.msg-content { font-size: 13.8px; line-height: 1.7; word-break: break-word; }
.msg-content h1, .msg-content h2, .msg-content h3 { margin: 12px 0 6px; font-size: 1.05em; }
.msg-content p { margin: 6px 0; }
.msg-content ul, .msg-content ol { margin: 6px 0 6px 20px; }
.msg-content code { background: #f0f1f7; border-radius: 4px; padding: 1px 5px; font-family: var(--mono); font-size: .9em; }
.msg-content pre { background: #1e2336; color: #dbe2ff; padding: 12px; border-radius: 8px; overflow-x: auto; margin: 8px 0; }
.msg-content pre code { background: none; color: inherit; }
.msg-content .cite-ref { color: var(--accent); cursor: pointer; font-weight: 600; font-size: .88em; vertical-align: super; line-height: 1; }
.msg-content .cite-ref-invalid { color: #dc2626; cursor: help; text-decoration: underline dotted; }
.msg-cites { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.msg-feedback { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.fb-btn { border: 1px solid var(--border); background: transparent; border-radius: 7px; padding: 2px 8px; cursor: pointer; font-size: 14px; line-height: 1.4; opacity: .6; transition: all .12s; }
.fb-btn:hover { opacity: 1; background: var(--panel-2); }
.fb-btn.on { opacity: 1; border-color: var(--accent); background: var(--accent-soft); }
.code-chip { background: var(--panel-2); padding: 3px 9px; border-radius: 6px; cursor: pointer; font-size: 13px; letter-spacing: .5px; user-select: all; }
.code-chip:hover { background: var(--accent-soft); color: var(--accent); }
.session-item.sel { background: var(--accent-soft); }
.table tr.row-sel td { background: var(--accent-soft); }

/* 文献库 · Zotero 式分组栏 */
.lib-layout { display: flex; gap: 16px; align-items: flex-start; }
.lib-folders { flex: 0 0 188px; width: 188px; position: sticky; top: 12px; }
.lib-folders-title { font-weight: 700; font-size: 13px; color: var(--muted); margin: 2px 0 8px; padding-left: 4px; }
.lib-folders-sep { height: 1px; background: var(--border); margin: 6px 4px; }
.lib-folder { display: flex; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 8px; cursor: pointer; font-size: 13.5px; color: var(--text); }
.lib-folder:hover { background: var(--panel-2); }
.lib-folder.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.lib-folder-count { font-size: 12px; color: var(--muted); background: var(--panel-2); border-radius: 10px; padding: 0 7px; min-width: 20px; text-align: center; }
.lib-folder.active .lib-folder-count { background: var(--panel); color: var(--accent); }
.lib-folder-menu { opacity: 0; font-weight: 700; color: var(--muted); padding: 0 3px; cursor: pointer; letter-spacing: 1px; }
.lib-folder:hover .lib-folder-menu { opacity: .7; }
.lib-folder-menu:hover { opacity: 1 !important; color: var(--text); }
@media (max-width: 720px) { .lib-layout { flex-direction: column; } .lib-folders { width: 100%; flex-basis: auto; position: static; } }
.sess-check { font-size: 15px; width: 18px; display: inline-block; flex: 0 0 auto; }
.chat-input-wrap { padding: 12px 8% 18px; background: linear-gradient(transparent, var(--bg) 30%); }
.chat-input-box { background: var(--panel); border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: var(--shadow); padding: 10px 12px; }
.chat-input-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.chat-input-box textarea { width: 100%; border: none; outline: none; resize: none; font-family: inherit; font-size: 14px; max-height: 160px; background: transparent; color: var(--text); }
.chat-input-tools { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.chip { font-size: 11.5px; background: var(--panel-2); border: 1px solid var(--border); padding: 2px 9px; border-radius: 99px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.thinking-dots::after { content: "…"; animation: think 1.2s infinite; }
@keyframes think { 0% { content: "·"; } 33% { content: "··"; } 66% { content: "···"; } }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #c9cede; border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #a8aec4; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 科研插画工作台 ---------- */
.ill-editor { display: flex; flex-direction: column; height: 100%; }
.ill-toolbar { display: flex; align-items: center; gap: 4px; padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--panel); flex-wrap: wrap; }
.ill-body { flex: 1; display: flex; min-height: 0; }
.ill-left { width: 256px; min-width: 256px; border-right: 1px solid var(--border); background: var(--panel); overflow-y: auto; padding: 10px; }
.ill-right { width: 256px; min-width: 256px; border-left: 1px solid var(--border); background: var(--panel); overflow-y: auto; padding: 10px; }
.ill-canvas-wrap { flex: 1; overflow: auto; background: repeating-conic-gradient(#eef0f5 0% 25%, #f6f7fb 0% 50%) 50% / 22px 22px; display: flex; align-items: flex-start; justify-content: center; padding: 24px; }
.ill-canvas { box-shadow: var(--shadow-lg); }
.fc-host { outline: none; }
.fc-svg { display: block; }
.fc-el { cursor: move; }
.fc-handle { cursor: nwse-resize; }
.ill-sec { margin-bottom: 14px; }
.ill-sec-title { font-size: 12px; font-weight: 650; color: var(--muted); margin-bottom: 7px; display: flex; align-items: center; gap: 6px; text-transform: none; }
.ill-asset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.ill-asset-tile { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 3px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); cursor: pointer; transition: all .1s; }
.ill-asset-tile:hover { border-color: var(--accent); background: var(--accent-soft); }
.ill-asset-ico { color: #334; line-height: 0; }
.ill-asset-name { font-size: 10px; color: var(--muted); text-align: center; line-height: 1.1; }
.ill-mini { display: flex; align-items: center; gap: 4px; padding: 5px 7px; border: 1px solid var(--border); border-radius: 7px; background: var(--panel); cursor: pointer; font-size: 11.5px; font-family: inherit; color: var(--text); }
.ill-mini:hover { border-color: var(--accent); color: var(--accent); }
.ill-cat.active { background: var(--accent-soft); color: var(--accent); }
.ill-prop { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ill-prop-label { font-size: 12px; color: var(--muted); width: 56px; flex: none; }
.ill-prop-ctrl { flex: 1; min-width: 0; }

/* ---------- 写作编辑器 ---------- */
.we-editor { display: flex; flex-direction: column; height: 100%; }
.we-toolbar { display: flex; align-items: center; gap: 3px; padding: 7px 12px; border-bottom: 1px solid var(--border); background: var(--panel); flex-wrap: wrap; }
.we-body { flex: 1; display: flex; min-height: 0; }
.we-left { width: 230px; min-width: 230px; border-right: 1px solid var(--border); background: var(--panel); overflow-y: auto; }
.we-main { flex: 1; overflow-y: auto; background: var(--bg); display: flex; justify-content: center; padding: 24px; }
.we-paper { background: #fff; width: 760px; max-width: 100%; min-height: 600px; box-shadow: var(--shadow); border-radius: 4px; padding: 48px 56px; }
.we-right { width: 280px; min-width: 280px; border-left: 1px solid var(--border); background: var(--panel); overflow-y: auto; padding: 12px; }
.we-sec-tab { padding: 9px 12px; cursor: pointer; font-size: 13px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 7px; }
.we-sec-tab:hover { background: var(--panel-2); }
.we-sec-tab.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; border-left: 3px solid var(--accent); }
.we-content { outline: none; font-family: var(--font-serif); font-size: 15.5px; line-height: 1.9; color: #1a1a1a; }
.we-content:empty::before { content: attr(data-placeholder); color: var(--faint); }
.we-content h1 { font-size: 24px; margin: 4px 0 12px; }
.we-content h2 { font-size: 19px; margin: 18px 0 8px; }
.we-content h3 { font-size: 16px; margin: 14px 0 6px; }
.we-content p { margin: 8px 0; }
.we-content ul, .we-content ol { margin: 8px 0 8px 24px; }
/* 正文引用：顶刊式上标小数字，紧贴前面文字的右上角，不占行高、不另起一行 */
.cite-node { color: var(--accent); font-weight: 600; cursor: pointer; font-size: .66em; vertical-align: super; line-height: 0; padding: 0 1px; border-radius: 3px; white-space: nowrap; user-select: none; font-family: var(--font); }
.cite-node:hover { background: var(--accent-soft); }
.fig-node { display: block; margin: 16px auto; text-align: center; padding: 10px; border: 1px dashed var(--border-strong); border-radius: 8px; background: var(--panel-2); max-width: 90%; user-select: none; }
.fig-node img { max-width: 100%; max-height: 280px; }
.fig-node .fig-cap { font-size: 12.5px; color: var(--muted); margin-top: 6px; font-family: var(--font); }
.placeholder-warn { background: var(--warn-soft); color: var(--warn); border: 1px dashed var(--warn); border-radius: 5px; padding: 1px 7px; font-size: .85em; font-family: var(--font); }
.we-ref-list { font-family: var(--font-serif); font-size: 13.5px; line-height: 1.7; }
.we-ref-list li { margin: 5px 0; }

/* ---------- 数据网格 ---------- */
.dg-wrap { overflow: auto; border: 1px solid var(--border); border-radius: 8px; max-height: 440px; }
.dg-table { border-collapse: collapse; font-size: 13px; }
.dg-table th, .dg-table td { border: 1px solid var(--border); padding: 0; }
.dg-table th { background: var(--panel-2); padding: 6px 8px; font-weight: 600; position: sticky; top: 0; z-index: 1; white-space: nowrap; }
.dg-table td input { border: none; outline: none; padding: 5px 8px; width: 100%; font-family: inherit; font-size: 13px; background: transparent; min-width: 80px; }
.dg-table td input:focus { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.dg-rowhead { background: var(--panel-2); color: var(--faint); text-align: center; font-size: 11px; padding: 0 6px !important; }
.stat-pill { display: inline-flex; flex-direction: column; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); min-width: 90px; }
.stat-pill .sp-label { font-size: 11px; color: var(--muted); }
.stat-pill .sp-val { font-size: 16px; font-weight: 650; }

/* ---------- 证据审查 ---------- */
.ev-score { width: 120px; height: 120px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; }
.ev-issue { display: flex; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; cursor: pointer; }
.ev-issue:hover { border-color: var(--accent-border); background: var(--panel-2); }
.ev-issue .ev-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; }

/* ---------- 打印 ---------- */
@media print { #sidebar, #topbar { display: none; } }
