/* =========================================================
   GEO 软件 Web 版 —— 设计系统 (SaaS 风格 / 玻璃拟态 / 双主题)
   纯手写，无第三方依赖，离线可用。
   ========================================================= */
:root {
  /* 雷米高统一品牌规范：品牌主标渐变 蓝→紫；GEO 产品色 靛蓝 */
  --brand-1: #3A82F4;
  --brand-2: #8C5BF4;
  --accent: #6366F2;
  --accent2: #8C5BF4;
  --accent-grad: linear-gradient(135deg, #3A82F4 0%, #8C5BF4 100%);
  --brand-master: linear-gradient(135deg, #3A82F4 0%, #8C5BF4 100%);
  --bg: #f4f6fb;
  --bg-grad: radial-gradient(1200px 600px at 10% -10%, #e9ecff 0%, transparent 55%),
             radial-gradient(1000px 500px at 110% 10%, #f3e8ff 0%, transparent 50%);
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #1f2430;
  --text-muted: #6b7280;
  --border: #e7eaf2;
  --border-strong: #d6dbe8;
  --shadow: 0 10px 30px -12px rgba(31, 41, 96, 0.18);
  --shadow-lg: 0 24px 60px -20px rgba(31, 41, 96, 0.30);
  --radius: 16px;
  --radius-sm: 10px;
  --ok: #16a34a;
  --warn: #d97706;
  --err: #dc2626;
  --info: #2563eb;
  --sidebar-w: 248px;
  --topbar-h: 64px;
}

[data-theme="dark"] {
  --bg: #0b0f1a;
  --bg-grad: radial-gradient(1200px 600px at 0% -10%, #1b2140 0%, transparent 55%),
             radial-gradient(1000px 500px at 110% 0%, #251a40 0%, transparent 50%);
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.03);
  --text: #e8ebf5;
  --text-muted: #9aa3b8;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s ease, color .3s ease;
}
.hidden { display: none !important; }
a { color: var(--accent); text-decoration: none; }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* =========================================================
   登录页
   ========================================================= */
.login-view {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-grad), var(--bg);
  padding: 20px;
}
.login-card {
  width: 400px; max-width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 38px 34px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.login-logo {
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--accent-grad);
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 20px;
  box-shadow: 0 8px 20px -6px rgba(99,102,241,.6);
}
.login-brand h1 { font-size: 19px; margin: 0; letter-spacing: .5px; }
.login-brand p { margin: 2px 0 0; font-size: 12px; color: var(--text-muted); }
.login-card h2 { margin: 0 0 6px; font-size: 22px; }
.login-card .sub { color: var(--text-muted); margin: 0 0 22px; font-size: 13px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; color: var(--text-muted); margin-bottom: 7px; }
.input, .select, textarea.input,
.inp, select.inp {
  width: 100%; padding: 11px 13px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text); font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
  font-family: inherit;
  box-sizing: border-box;
}
.input:focus, .select:focus, textarea.input:focus,
.inp:focus, select.inp:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,.18);
  background: var(--surface);
}
/* textarea 专项美化（覆盖 .inp 的单行外观） */
textarea.inp {
  min-height: 140px;
  padding: 14px 16px;
  font-size: 13.5px; line-height: 1.7;
  resize: vertical;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}
textarea.inp:hover {
  border-color: var(--accent);
}
textarea.inp::placeholder {
  color: var(--text-muted); opacity: .6;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer;
  font-size: 14px; font-weight: 600; font-family: inherit;
  transition: transform .15s ease, box-shadow .2s ease, background .2s, opacity .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--accent-grad); color: #fff; box-shadow: 0 10px 24px -10px rgba(99,102,241,.7); }
.btn-primary:hover { box-shadow: 0 14px 30px -10px rgba(99,102,241,.85); }
.btn-block { width: 100%; padding: 12px; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }
.btn-danger { background: #fff; color: var(--err); border-color: #f3c5c5; }
.btn-danger:hover { background: #fff5f5; }
[data-theme="dark"] .btn-danger { background: rgba(220,38,38,.12); border-color: rgba(220,38,38,.4); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-toggle { font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
.btn-toggle.on { background: var(--ok); color: #fff; box-shadow: 0 6px 16px -8px rgba(22,163,74,.7); }
.btn-toggle.on:hover { filter: brightness(1.06); }
.btn-toggle.off { background: rgba(220,38,38,.12); color: var(--err); border-color: rgba(220,38,38,.45); }
.btn-toggle.off:hover { background: rgba(220,38,38,.2); }
[data-theme="dark"] .btn-toggle.off { background: rgba(220,38,38,.22); }
/* 关键：统一按钮内图标尺寸，避免无尺寸的 inline SVG 在 flex 中撑成大图标/大按钮 */
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-lg svg { width: 20px; height: 20px; }
.login-hint { margin-top: 18px; font-size: 12px; color: var(--text-muted); text-align: center; }

/* =========================================================
   应用外壳
   ========================================================= */
.app { display: flex; height: 100vh; overflow: hidden; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 18px 14px; gap: 6px;
  transition: width .25s ease, transform .25s ease;
}
.side-brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 16px; }
.side-brand .login-logo { width: 38px; height: 38px; font-size: 17px; border-radius: 11px; }
.side-brand h1 { font-size: 16px; margin: 0; }
.side-brand p { margin: 1px 0 0; font-size: 11px; color: var(--text-muted); }
.nav-group-label { font-size: 11px; color: var(--text-muted); padding: 12px 12px 6px; letter-spacing: .6px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 11px;
  color: var(--text-muted); cursor: pointer; font-weight: 500;
  transition: background .18s, color .18s; font-size: 13.5px;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--accent-grad); color: #fff; box-shadow: 0 8px 18px -8px rgba(99,102,241,.6); }
.side-foot { margin-top: auto; font-size: 11px; color: var(--text-muted); padding: 8px 12px; }

/* 侧边栏导航滚动（22 个模块太多，必须可滚动才能看到全部） */
#side-nav {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column; gap: 4px;
  overflow-y: auto; overflow-x: hidden;
  padding: 4px 2px 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
#side-nav::-webkit-scrollbar { width: 6px; }
#side-nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
#side-nav::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
#side-nav::-webkit-scrollbar-track { background: transparent; }
/* 滚动提示：上下两端渐隐，让用户知道还有内容 */
.sidebar { position: relative; }
.sidebar::before, .sidebar::after {
  content: ""; position: absolute; left: 14px; right: 14px; height: 16px;
  pointer-events: none; z-index: 2; opacity: 0;
  transition: opacity .25s;
}
.sidebar::before { top: 86px; background: linear-gradient(to bottom, var(--surface), transparent); }
.sidebar::after { bottom: 36px; background: linear-gradient(to top, var(--surface), transparent); }
.sidebar.has-overflow-up::before { opacity: 1; }
.sidebar.has-overflow-down::after { opacity: 1; }

.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  height: var(--topbar-h); flex-shrink: 0;
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px; border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.topbar h2 { margin: 0; font-size: 18px; font-weight: 700; }
.topbar .spacer { flex: 1; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); cursor: pointer;
  display: grid; place-items: center; transition: background .18s, transform .15s;
}
.icon-btn:hover { background: var(--border); }
.icon-btn svg { width: 18px; height: 18px; }
.user-chip { display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 4px 6px; border-radius: 10px; position: relative; }
.user-chip:hover { background: var(--surface-2); }
.user-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px);
  width: 220px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 200;
  overflow: hidden; animation: ddIn .18s ease;
}
@keyframes ddIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.user-dropdown-head { display: flex; align-items: center; gap: 11px; padding: 14px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.user-dropdown-head .avatar { width: 38px; height: 38px; font-size: 15px; }
.user-dropdown-head .meta { line-height: 1.3; }
.user-dropdown-head .meta b { font-size: 14px; }
.user-dropdown-head .meta span { font-size: 12px; color: var(--text-muted); }
.user-dropdown-menu { padding: 6px; }
.dd-item {
  width: 100%; text-align: left; padding: 10px 12px; border-radius: 9px; border: 0; background: transparent;
  color: var(--text); font-size: 13.5px; cursor: pointer; display: flex; align-items: center; gap: 10px;
  transition: background .15s;
}
.dd-item:hover { background: var(--surface-2); }
.dd-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.dd-danger { color: var(--err); }
.dd-danger:hover { background: #fff5f5; }
[data-theme="dark"] .dd-danger:hover { background: rgba(220,38,38,.14); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-grad); color: #fff; display: grid; place-items: center; font-weight: 700; }
.user-chip .meta { line-height: 1.2; }
.user-chip .meta b { font-size: 13px; }
.user-chip .meta span { font-size: 11px; color: var(--text-muted); }

.content { flex: 1; overflow-y: auto; padding: 26px 28px 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; gap: 16px; flex-wrap: wrap; }
.page-head h3 { margin: 0; font-size: 22px; }
.page-head p { margin: 4px 0 0; color: var(--text-muted); font-size: 13px; }

/* =========================================================
   卡片 / 网格
   ========================================================= */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2,1fr); } .grid-3 { grid-template-columns: repeat(2,1fr);} }
@media (max-width: 760px) { .grid-2,.grid-3,.grid-4 { grid-template-columns: 1fr; } }

/* 数据监测 —— KPI 汇总卡 */
.kpi-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 18px; }
@media (max-width: 1100px) { .kpi-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; box-shadow: var(--shadow); }
.kpi-label { font-size: 12.5px; color: var(--text-muted); margin-bottom: 8px; }
.kpi-value { font-size: 24px; font-weight: 700; letter-spacing: -.5px; line-height: 1.1; }
.kpi-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 6px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card.glass { background: var(--surface); backdrop-filter: blur(16px); }
.card:hover { box-shadow: var(--shadow-lg); }
.card h4 { margin: 0 0 14px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.card h4 svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--accent); }
.card .card-desc { color: var(--text-muted); font-size: 12.5px; margin: -8px 0 14px; }

.stat {
  display: flex; flex-direction: column; gap: 6px;
}
.stat .label { font-size: 12.5px; color: var(--text-muted); display: flex; align-items: center; gap: 7px; }
.stat .value { font-size: 28px; font-weight: 800; letter-spacing: .5px; }
.stat .value small { font-size: 14px; font-weight: 600; color: var(--text-muted); }
.stat .delta { font-size: 12px; font-weight: 600; }
.delta.up { color: var(--ok); }
.delta.down { color: var(--err); }
.stat .ic { width: 34px; height: 34px; border-radius: 10px; background: rgba(99,102,241,.12); color: var(--accent); display: grid; place-items: center; }
.stat .ic svg { width: 18px; height: 18px; }

/* =========================================================
   表格
   ========================================================= */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl thead th {
  text-align: left; padding: 12px 14px; font-weight: 600;
  color: var(--text-muted); background: var(--surface-2);
  border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0;
}
table.tbl tbody td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl tbody tr:hover { background: var(--surface-2); }
table.tbl .center { text-align: center; }
table.tbl .mono { font-variant-numeric: tabular-nums; }
.empty { text-align: center; color: var(--text-muted); padding: 30px; font-size: 13px; }

/* 选择列 + 复选框 */
.tbl .sel-col { width: 42px; text-align: center; padding-left: 0; padding-right: 0; }
.tbl-check, .tbl-check-all { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; vertical-align: middle; }

/* 批量操作条 */
.batch-bar {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 14px; margin-bottom: 14px;
  box-shadow: var(--shadow); position: sticky; top: 0; z-index: 6;
  animation: slideDown .2s ease;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.batch-bar .batch-selall { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-muted); cursor: pointer; user-select: none; }
.batch-bar .batch-count { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.batch-bar .spacer { flex: 1; }
.row-actions .btn[title] { position: relative; }

/* =========================================================
   徽章 / 标签
   ========================================================= */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.ok { background: rgba(22,163,74,.12); color: var(--ok); }
.badge.err { background: rgba(220,38,38,.12); color: var(--err); }
.badge.warn { background: rgba(217,119,6,.14); color: var(--warn); }
.badge.info { background: rgba(37,99,235,.12); color: var(--info); }
.badge.ad { background: rgba(139,92,246,.14); color: #7c3aed; }
.badge.muted { background: var(--surface-2); color: var(--text-muted); }
.tag { display: inline-block; padding: 2px 9px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; color: var(--text-muted); margin: 2px; }

/* =========================================================
   工具栏 / 表单栅格
   ========================================================= */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-grid .col-2 { grid-column: span 2; }
@media (max-width: 760px) { .form-grid { grid-template-columns: 1fr; } .form-grid .col-2 { grid-column: span 1; } }
.row-actions { display: flex; gap: 6px; }

/* =========================================================
   弹窗
   ========================================================= */
.modal-mask {
  position: fixed; inset: 0; background: rgba(10,12,20,.5);
  backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 100; padding: 20px;
  animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.modal {
  width: 560px; max-width: 100%; max-height: 88vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 24px; box-shadow: var(--shadow-lg);
  animation: pop .22s cubic-bezier(.16,1,.3,1);
}
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0 } to { transform: none; opacity: 1 } }
.modal h3 { margin: 0 0 18px; font-size: 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* =========================================================
   Toast
   ========================================================= */
#toast-container { position: fixed; top: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  min-width: 260px; max-width: 380px; padding: 13px 16px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  display: flex; gap: 10px; align-items: flex-start; font-size: 13px;
  animation: slidein .25s cubic-bezier(.16,1,.3,1);
}
@keyframes slidein { from { transform: translateX(30px); opacity: 0 } to { transform: none; opacity: 1 } }
.toast .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.toast.ok .dot { background: var(--ok); }
.toast.err .dot { background: var(--err); }
.toast.info .dot { background: var(--info); }
.toast b { display: block; margin-bottom: 2px; }

/* =========================================================
   杂项
   ========================================================= */
.chart-box { width: 100%; }
.chart-box svg { width: 100%; height: auto; display: block; }

/* 图表空状态占位 */
.chart-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; min-height: 190px; color: var(--text-muted);
  background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 12px;
  text-align: center; padding: 18px;
}
.chart-empty .chart-empty-ic { width: 46px; height: 46px; border-radius: 13px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); display: grid; place-items: center; }
.chart-empty .chart-empty-ic svg { width: 24px; height: 24px; }
.chart-empty p { margin: 0; font-size: 13px; font-weight: 600; }
.chart-empty small { font-size: 12px; opacity: .85; max-width: 280px; }

/* 概览引导卡片 */
.guide-card {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, var(--surface)), var(--surface));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 18px;
}
.guide-card .guide-ic { width: 44px; height: 44px; border-radius: 13px; background: var(--accent-grad); color: #fff; display: grid; place-items: center; flex-shrink: 0; box-shadow: 0 8px 18px -8px rgba(99,102,241,.6); }
.guide-card .guide-ic svg { width: 24px; height: 24px; }
.guide-card .guide-tx { line-height: 1.5; }
.guide-card .guide-tx b { font-size: 15px; }
.guide-card .guide-tx span { color: var(--text-muted); font-size: 13px; }
.guide-card .spacer { flex: 1; }
.muted { color: var(--text-muted); }
.kpi-row { display: flex; gap: 18px; flex-wrap: wrap; }
.help-box { background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 12px; padding: 14px 16px; font-size: 12.5px; color: var(--text-muted); }
.help-box b { color: var(--text); }

/* 关键词可见性 —— 平台/设备筛选标签 */
.vis-tabs {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 18px;
}
.vis-tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-size: 13px; cursor: pointer;
  transition: all .18s ease;
  box-shadow: var(--shadow);
}
.vis-tab:hover { border-color: var(--accent); transform: translateY(-1px); }
.vis-tab.active {
  background: var(--accent-grad); color: #fff; border-color: transparent;
  box-shadow: 0 8px 18px -8px rgba(99,102,241,.6);
}
.vis-tab.active .vis-tab-count { background: rgba(255,255,255,.22); color: #fff; }
.vis-tab-label { font-weight: 600; }
.vis-tab-count {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-muted); font-size: 11.5px; font-weight: 600;
}

/* 序号列 / 总数提示 / 证据列 */
.tbl .col-seq { width: 52px; text-align: center; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.vis-total { font-size: 12.5px; color: var(--text-muted); margin: -6px 0 12px; display: flex; align-items: center; gap: 10px; }
.vis-total b { color: var(--text); font-size: 13.5px; }
.vis-total .vis-pill { padding: 2px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.evi { display: block; font-size: 12px; line-height: 1.5; color: var(--text); max-width: 320px; }
.evi.miss { color: var(--text-muted); }

/* 平台回复快照（可见性采集证据） */
.snap-preview { display: inline-block; font-size: 12px; line-height: 1.5; color: var(--text); max-width: 360px; vertical-align: middle; cursor: pointer; }
.snap-preview:hover { color: var(--accent); text-decoration: underline; }
.btn-xs { padding: 2px 8px; font-size: 11.5px; }
.snap-head { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 18px; margin-bottom: 12px; font-size: 13px; color: var(--text-muted); }
.snap-head b { color: var(--text); font-weight: 600; }
.snap-detail {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Courier New", monospace;
  font-size: 12.5px; line-height: 1.65; color: var(--text); white-space: pre-wrap; word-break: break-word;
  margin: 0; max-height: 60vh; overflow: auto;
}

/* 显示字段设置弹层 */
.field-set-wrap { position: relative; }
.field-pop {
  position: absolute; z-index: 90; right: 0; top: calc(100% + 6px);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px;
  box-shadow: 0 18px 40px -16px rgba(0,0,0,.45); padding: 10px; min-width: 180px;
}
.field-pop .fp-title { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; padding: 0 2px; }
.field-pop label { display: flex; align-items: center; gap: 9px; padding: 7px 6px; border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.field-pop label:hover { background: var(--surface-2); }
.field-pop input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
/* 浮层弹窗：脱离祖先 overflow 裁剪，固定定位到视口 */
.field-pop.field-pop-portal {
  position: fixed; z-index: 9999; right: auto; top: auto; left: auto;
  max-height: 60vh; overflow-y: auto;
}

/* 通用表格工具栏（总数提示 + 显示字段） */
.smart-table { margin-top: 2px; }
.st-toolbar { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; flex-wrap: wrap; }
.st-total { font-size: 12.5px; color: var(--text-muted); }
.st-total b { color: var(--text); font-size: 13.5px; }

/* 品牌配置：标签输入 */
.brand-input-row { display: flex; gap: 8px; }
.brand-input-row .input { flex: 1; }
.brand-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; }
.chip-x { display: inline-flex; border: none; background: transparent; color: var(--text-muted); cursor: pointer; padding: 0; line-height: 0; }
.chip-x:hover { color: var(--err); }
.chip-x svg { width: 14px; height: 14px; }

/* 透出率条形 */
.rate-bars { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.rate-row { display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: 12px; }
.rate-name { font-size: 13px; color: var(--text); }
.rate-track { height: 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.rate-track > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), #22c55e); }
.rate-val { font-size: 12.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* 采集进度遮罩 */
.prog { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: rgba(10,12,20,.55); backdrop-filter: blur(3px); }
.prog.hidden { display: none; }
.prog-card { width: min(440px, 92vw); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px 26px; box-shadow: var(--shadow-lg); }
.prog-card h4 { margin: 0 0 6px; font-size: 17px; }
.prog-status { font-size: 13px; margin-bottom: 14px; }
.prog-bar { height: 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.prog-bar > i { display: block; height: 100%; width: 0%; background: var(--accent-grad); border-radius: 999px; transition: width .4s ease; }
.prog-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 9px; font-size: 12.5px; }
.prog-pct { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.prog-cur { max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prog-note { margin: 14px 0 0; font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.prog-eta { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
.warn-box { display: none; margin: 10px 0; padding: 10px 14px; border-radius: 10px; font-size: 12.5px; line-height: 1.55; border: 1px solid #f59e0b; background: rgba(245,158,11,0.12); color: #b45309; }
.warn-box b { color: #92400e; }


.kb-review-row { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; background: var(--surface); }
.kb-check { padding-top: 4px; }
.kb-check input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.kb-review-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.kb-review-line { display: flex; gap: 7px; }
.kb-review-line .kb-cat { flex: 0 0 110px; }
.kb-review-line .kb-q { flex: 1; }
.kb-review-fields .input { font-size: 13px; }
#kb-review-list { max-height: 52vh; overflow-y: auto; padding-right: 4px; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }
.spin { animation: rot 1s linear infinite; }
@keyframes rot { to { transform: rotate(360deg) } }
.danger-zone { border: 1px solid rgba(220,38,38,.3); border-radius: 14px; padding: 16px; }
[data-theme="dark"] .danger-zone { background: rgba(220,38,38,.06); }
.pref-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--border); }
.pref-row:last-child { border-bottom: none; }
.switch { position: relative; width: 44px; height: 24px; }
.switch input { display: none; }
.switch span { position: absolute; inset: 0; background: var(--border-strong); border-radius: 999px; transition: .2s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::before { transform: translateX(20px); }
.color-dot { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--border); cursor: pointer; }
.color-dot.active { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,.25); }

/* ============ 系统设置（重设计） ============ */
.settings-wrap { display: grid; grid-template-columns: 260px 1fr; gap: 22px; align-items: start; }
.settings-nav { position: sticky; top: 14px; display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; }
.snav { display: flex; align-items: center; gap: 12px; text-align: left; background: transparent; border: none; border-radius: 10px; padding: 12px 12px; cursor: pointer; color: var(--text-muted); transition: background .18s, color .18s; }
.snav:hover { background: var(--surface-2); color: var(--text); }
.snav.active { background: var(--accent-grad); color: #fff; box-shadow: 0 6px 18px -6px var(--accent); }
.snav.active .snav-ic { color: #fff; }
.snav-ic { display: inline-flex; width: 20px; height: 20px; color: var(--accent); }
.snav-ic svg { width: 20px; height: 20px; }
.snav-tx { display: flex; flex-direction: column; line-height: 1.25; }
.snav-tx b { font-size: 14px; font-weight: 600; }
.snav-tx small { font-size: 11.5px; opacity: .8; }
.settings-body { min-height: 420px; }
.set-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; }
.set-card-h { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.set-card-h h4 { margin: 0; font-size: 15px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.set-card-h h4 svg { width: 17px; height: 17px; color: var(--accent); }
/* 主题选择 */
.theme-pick { display: flex; gap: 14px; flex-wrap: wrap; }
.theme-opt { display: flex; flex-direction: column; align-items: center; gap: 8px; background: transparent; border: 2px solid var(--border); border-radius: 14px; padding: 12px; cursor: pointer; transition: border-color .18s, transform .18s; }
.theme-opt:hover { transform: translateY(-2px); }
.theme-opt.active { border-color: var(--accent); }
.theme-opt b { font-size: 13px; }
.theme-prev { width: 86px; height: 54px; border-radius: 10px; border: 1px solid var(--border-strong); }
.theme-light { background: linear-gradient(135deg,#f5f7fb,#e9edf5); }
.theme-dark { background: linear-gradient(135deg,#1c2230,#10141d); }
.accents { display: flex; gap: 12px; flex-wrap: wrap; }
.accents .color-dot { width: 30px; height: 30px; border-radius: 8px; }
.accents .color-dot.active { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
/* 平台列表 */
.plat-list { display: flex; flex-direction: column; gap: 10px; }
.plat-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; transition: border-color .18s, transform .18s; }
.plat-item:hover { border-color: var(--accent); transform: translateX(2px); }
.plat-info { display: flex; flex-direction: column; flex: 1; line-height: 1.3; }
.plat-info b { font-size: 14px; }
.plat-info small { font-size: 12px; color: var(--text-muted); }
/* 关于 */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 28px; }
.about-grid > div { display: flex; flex-direction: column; gap: 3px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.about-grid .muted { font-size: 12px; }
.about-grid b { font-size: 14px; }

/* 更新日志 */
.changelog { display: flex; flex-direction: column; gap: 4px; }
.cl-item { display: flex; gap: 14px; padding: 4px 0; position: relative; }
.cl-item::before { content: ""; position: absolute; left: 5px; top: 22px; bottom: -4px; width: 2px; background: var(--border); }
.cl-item:last-child::before { display: none; }
.cl-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); margin-top: 4px; flex-shrink: 0; }
.cl-body { flex: 1; padding-bottom: 14px; }
.cl-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cl-head b { font-size: 14px; }
.cl-date { font-size: 12px; color: var(--text-muted); }
.cl-list { margin: 8px 0 0; padding-left: 18px; }
.cl-list li { font-size: 13px; color: var(--text-muted); line-height: 1.7; }
@media (max-width: 860px) {
  .settings-wrap { grid-template-columns: 1fr; }
  .settings-nav { position: static; flex-direction: row; overflow-x: auto; }
  .snav { flex: 0 0 auto; }
  .about-grid { grid-template-columns: 1fr; }
}
/* 登录记住我 */
.remember-row { display: flex; align-items: center; gap: 8px; margin: 4px 0 14px; font-size: 13px; color: var(--text-muted); cursor: pointer; user-select: none; }
.remember-row input { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }

/* ---------- 多选下拉组件 ---------- */
.ms { position: relative; }
.ms-control { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; padding: 7px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; cursor: pointer; transition: border-color .15s, box-shadow .15s; font-size: 13.5px; }
.ms-control:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.ms-control:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.ms-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-text.muted { color: var(--text-muted); }
.ms-caret { color: var(--text-muted); display: flex; }
.ms-caret svg { width: 16px; height: 16px; }
.ms-panel { position: absolute; z-index: 80; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: 0 18px 40px -16px rgba(0,0,0,.45); overflow: hidden; max-height: 260px; display: flex; flex-direction: column; }
.ms-search { padding: 8px; border-bottom: 1px solid var(--border); }
.ms-search .input { width: 100%; min-height: 34px; padding: 6px 10px; font-size: 13px; }
.ms-opts { overflow-y: auto; padding: 6px; }
.ms-opt { display: flex; align-items: center; gap: 9px; padding: 8px 9px; border-radius: 8px; cursor: pointer; font-size: 13.5px; font-weight: normal; }
.ms-opt:hover { background: var(--surface-2); }
.ms-opt input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }
.ms-empty { padding: 14px; text-align: center; }

/* ---------- 外网访问卡片 ---------- */
.addr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 6px; }
.addr-cell { background: var(--input-bg); border: 1px solid var(--border); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.addr-cell .muted { font-size: 12px; }
.addr-cell code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; word-break: break-all; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); padding: 4px 8px; border-radius: 7px; }
.code-block { background: #0f1117; color: #d6e2f5; border-radius: 12px; padding: 16px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; line-height: 1.65; overflow-x: auto; margin: 12px 0 0; }
.guide { margin: 10px 0 0; padding-left: 20px; }
.guide li { font-size: 13.5px; line-height: 1.8; color: var(--text-muted); margin-bottom: 6px; }
.guide code, .guide b { color: var(--text); }
.guide code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--input-bg); padding: 1px 6px; border-radius: 6px; font-size: 12.5px; }

/* =========================================================
   雷米高统一品牌：Logo / 移动端 H5 / 手机访问浮窗
   ========================================================= */
.brand-logo-img {
  width: 40px; height: 40px; border-radius: 11px; object-fit: contain;
  background: #fff; box-shadow: 0 4px 12px -4px rgba(58,130,244,.45); flex-shrink: 0;
}
.side-brand .brand-logo-img { width: 38px; height: 38px; }
.login-logo.brand-logo-img { font-size: 0; line-height: 0; }

/* 手机扫码访问 浮动按钮 */
.mobile-fab {
  position: fixed; right: 18px; bottom: 22px; z-index: 600;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 17px; border: 0; border-radius: 999px;
  background: var(--brand-master); color: #fff; font-size: 14px; font-weight: 600;
  box-shadow: 0 12px 28px -8px rgba(58,130,244,.6); cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.mobile-fab:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -8px rgba(58,130,244,.72); }
.mobile-fab svg { width: 18px; height: 18px; }

/* 二维码弹窗 */
.qr-box { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 8px 0 2px; }
.qr-box img { width: 220px; height: 220px; border-radius: 16px; border: 1px solid var(--border); background: #fff; padding: 10px; }
.qr-box .qr-url { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; word-break: break-all; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); padding: 8px 12px; border-radius: 10px; max-width: 100%; }
.qr-box .qr-tip { font-size: 12.5px; color: var(--text-muted); line-height: 1.7; }
.qr-box .qr-copy { margin-top: 2px; }

/* ============ 移动端 H5 响应式 ============ */
@media (max-width: 820px) {
  .app { flex-direction: column; }
  .sidebar {
    width: 100%; flex-direction: row; align-items: center; gap: 10px;
    padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--border);
    overflow-x: auto; flex-shrink: 0;
  }
  .side-brand { padding: 0; flex-shrink: 0; }
  .side-brand p { display: none; }
  #side-nav { display: flex; flex-direction: row; gap: 6px; flex: 1; overflow-x: auto; padding-bottom: 2px; }
  .nav-item { flex-shrink: 0; padding: 8px 13px; white-space: nowrap; border-radius: 999px; }
  .nav-item svg { width: 16px; height: 16px; }
  .side-foot { display: none; }
  .topbar { padding: 0 12px; gap: 10px; }
  .topbar h2 { font-size: 16px; }
  .content { padding: 16px 14px 96px; }
  .modal { width: 100% !important; max-width: 100% !important; height: 100%; border-radius: 0; margin: 0; }
  .modal-mask { padding: 0; align-items: stretch; }
  table { display: block; overflow-x: auto; white-space: nowrap; }
  .card, .panel { padding: 14px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr !important; }
}
@media (max-width: 480px) {
  .user-chip .meta { display: none; }
  .topbar h2 { font-size: 15px; }
  .mobile-fab { right: 14px; bottom: 16px; padding: 11px 14px; font-size: 13px; }
}

/* ============ 2026-08-25 看板分析 / GEO 优化 ============ */
.kpi-tile { position: relative; transition: transform .12s ease, box-shadow .12s ease; }
.kpi-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-md, 0 6px 18px rgba(0,0,0,.08)); }
.kpi-tile:hover .kpi-drill-hint { opacity: 1; }
.kpi-drill-hint {
  position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--accent); opacity: .55; transition: opacity .12s ease;
}
.kpi-drill-hint svg { width: 12px; height: 12px; }
.geo-report-body { line-height: 1.8; font-size: 13.5px; color: var(--text); }
.geo-report-body h2 { font-size: 19px; margin: 6px 0 10px; }
.geo-report-body h3 { font-size: 15.5px; margin: 16px 0 8px; padding-bottom: 5px; border-bottom: 1px solid var(--border); }
.geo-report-body h4 { font-size: 14px; margin: 12px 0 6px; color: var(--accent); }
.geo-report-body p { margin: 5px 0; }
.geo-report-body b,
.geo-report-body strong { color: var(--accent); font-weight: 700; }
.geo-report-body em { color: var(--text-muted); font-style: normal; border-bottom: 1px dashed var(--border-strong); padding-bottom: 1px; }
.geo-report-body ul,
.geo-report-body ol { margin: 6px 0 6px 4px; padding-left: 22px; }
.geo-report-body li { margin: 3px 0; line-height: 1.7; }
.geo-report-body ul li { list-style: disc; }
.geo-report-body ol li { list-style: decimal; }
.geo-report-body .empty { color: var(--text-muted); padding: 18px 0; text-align: center; }
.md-dot { width: 9px; height: 9px; fill: currentColor; position: absolute; left: 0; top: 10px; }
.mobile-fab { position: fixed; right: 20px; bottom: 20px; z-index: 90; }

/* =========================================================
   使用帮助 · 知识地图（Modules.help）
   ========================================================= */
.help-hero {
  display: flex; gap: 18px; flex-wrap: wrap;
  padding: 20px 22px; margin-bottom: 16px;
  background: linear-gradient(135deg, #3A82F4 0%, #6366F1 55%, #8C5BF4 100%);
  border-radius: 16px; color: #fff;
  box-shadow: 0 12px 32px -12px rgba(99,102,241,.45);
}
.help-hero-text { flex: 1; min-width: 280px; }
.help-hero-text h2 { margin: 0 0 8px; font-size: 22px; font-weight: 700; }
.help-hero-text p { margin: 0; font-size: 13.5px; line-height: 1.7; opacity: .95; }
.help-hero-text p b { background: rgba(255,255,255,.18); padding: 1px 6px; border-radius: 6px; }
.help-hero-tip {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.25); border-radius: 12px;
  font-size: 12.5px; max-width: 320px; align-self: flex-start;
  backdrop-filter: blur(6px);
}
.help-hero-tip svg { width: 18px; height: 18px; flex-shrink: 0; }

.help-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 16px; }
.help-kpi {
  --accent: #6366F1;
  position: relative; padding: 18px 20px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden;
}
.help-kpi::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent);
}
.help-kpi-value { font-size: 30px; font-weight: 700; color: var(--accent); line-height: 1; }
.help-kpi-label { font-size: 12.5px; color: var(--text-muted); margin-top: 6px; }

.help-section { margin-top: 14px; }
.help-section h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin: 0 0 6px; color: var(--text); }
.help-section h3 svg { width: 18px; height: 18px; color: var(--accent); }
.help-section > p.muted { margin: 0 0 14px; }

.help-domains { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.help-domain {
  --accent: #6366F1;
  padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  border-top: 3px solid var(--accent);
  transition: transform .18s, box-shadow .18s;
}
.help-domain:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -12px var(--accent); }
.help-domain-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.help-domain-icon {
  width: 40px; height: 40px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.help-domain-icon svg { width: 20px; height: 20px; }
.help-domain-head b { font-size: 14.5px; display: block; }
.help-domain-head p { margin: 4px 0 0; font-size: 12px; color: var(--text-muted); line-height: 1.55; }
.help-domain-mods { display: flex; flex-wrap: wrap; gap: 6px; }
.help-mod-chip {
  display: inline-flex; padding: 4px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 12px; color: var(--text); cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.help-mod-chip:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.help-flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 12px; }
.help-flow-step {
  display: flex; gap: 12px; padding: 14px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; cursor: pointer;
  transition: transform .15s, border-color .15s;
}
.help-flow-step:hover { transform: translateX(3px); border-color: var(--accent); }
.help-flow-n {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%;
  background: linear-gradient(135deg, #3A82F4, #8C5BF4); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}
.help-flow-body { flex: 1; min-width: 0; }
.help-flow-body b { display: block; font-size: 13.5px; margin-bottom: 3px; }
.help-flow-body p { margin: 0 0 8px; font-size: 11.5px; color: var(--text-muted); line-height: 1.55; }
.help-flow-go {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px;
  color: var(--accent); font-weight: 600;
}
.help-flow-go svg { width: 12px; height: 12px; }

.help-faq details {
  border-bottom: 1px solid var(--border); padding: 10px 0;
}
.help-faq details:last-child { border-bottom: 0; }
.help-faq summary {
  font-size: 13.5px; font-weight: 600; cursor: pointer; color: var(--text);
  padding: 4px 0; list-style: none;
}
.help-faq summary::before { content: "▸"; display: inline-block; margin-right: 8px; transition: transform .15s; color: var(--accent); }
.help-faq details[open] summary::before { transform: rotate(90deg); }
.help-faq details p { margin: 6px 0 4px 22px; font-size: 12.5px; color: var(--text-muted); line-height: 1.7; }
.help-faq code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; font-size: 11.5px; }

.help-list { margin: 6px 0 0; padding-left: 22px; font-size: 13px; line-height: 1.8; }
.help-list li { margin: 4px 0; }
.help-list b { color: var(--accent); }
.help-list code { background: var(--surface-2); padding: 1px 6px; border-radius: 4px; font-size: 11.5px; }

/* 暗色主题适配（自动反转） */
:root[data-theme="dark"] .help-domain { background: rgba(255,255,255,.02); }
:root[data-theme="dark"] .help-kpi { background: rgba(255,255,255,.02); }
:root[data-theme="dark"] .help-flow-step { background: rgba(255,255,255,.02); }

/* =========================================================
   知识治理 · 仿真评测 共享样式
   ========================================================= */
.gov-pipeline {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px; margin-bottom: 18px; padding: 14px 18px;
  background: linear-gradient(135deg, rgba(58,130,244,.06) 0%, rgba(140,92,244,.06) 100%);
  border: 1px solid var(--border); border-radius: 14px;
}
.gov-pipe-step {
  display: flex; flex-direction: column; gap: 4px; padding: 6px 4px;
  border-left: 2px solid var(--accent);
}
.gov-pipe-step .gov-pipe-n {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.gov-pipe-step b { font-size: 13px; }
.gov-pipe-step p { margin: 0; font-size: 11px; color: var(--text-muted); }

.gov-kpi-row { margin-bottom: 14px; }
.gov-control { margin-bottom: 14px; }
.gov-card { margin-bottom: 14px; }
.gov-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 12px; flex-wrap: wrap; }
.gov-card-head h4 { margin: 0; font-size: 14.5px; }
.gov-card-head h4::before {
  content: ""; display: inline-block; width: 3px; height: 14px; background: var(--accent-grad);
  margin-right: 8px; vertical-align: -2px; border-radius: 2px;
}
.gov-card-meta { font-size: 11.5px; color: var(--text-muted); padding: 3px 9px; background: var(--surface-2); border-radius: 999px; }
.gov-card-meta.gov-warn { background: rgba(239,68,68,.12); color: #EF4444; }
.gov-card-meta.gov-ok { background: rgba(20,183,165,.12); color: #14B7A5; }
.gov-card-actions { display: flex; gap: 6px; }

/* 语义切片 */
.gov-chunks { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; padding-right: 4px; }
.gov-chunk {
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
  background: var(--surface-2);
}
.gov-chunk-head { display: flex; justify-content: space-between; font-size: 11.5px; margin-bottom: 6px; }
.gov-chunk-i { background: var(--accent); color: #fff; padding: 1px 8px; border-radius: 999px; font-weight: 600; }
.gov-chunk-body { font-size: 13px; line-height: 1.65; white-space: pre-wrap; }

/* 实体卡片 */
.gov-entities { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.gov-entity {
  border-left: 4px solid var(--accent);
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px;
}
.gov-entity-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.gov-entity-head b { font-size: 13.5px; }
.gov-entity-head .badge { font-size: 10.5px; padding: 2px 8px; border-radius: 999px; font-weight: 600; }
.gov-entity-attrs { font-size: 12px; color: var(--text-muted); line-height: 1.6; }

/* 关系 */
.gov-rels { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gov-rels b { font-size: 12.5px; margin-right: 4px; }
.gov-rel {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px;
  font-size: 11.5px;
}
.gov-rel-arrow { color: var(--accent); font-weight: 600; }

/* Schema 代码块 */
.gov-schema {
  background: #f6f7fb; padding: 14px; border-radius: 10px;
  white-space: pre-wrap; max-height: 360px; overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; line-height: 1.55; color: #1e293b;
  border: 1px solid var(--border);
  margin: 0;
}
.gov-schema-collapsed { max-height: 80px; }
:root[data-theme="dark"] .gov-schema { background: #0f172a; color: #cbd5e1; }

/* 事实校验问题 */
.gov-issues { display: flex; flex-direction: column; gap: 8px; }
.gov-issue {
  display: flex; gap: 12px; padding: 10px 14px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.gov-issue-err { border-left: 4px solid #EF4444; }
.gov-issue-warn { border-left: 4px solid #F49E0A; }
.gov-issue-info { border-left: 4px solid #0EA5E9; }
.gov-issue-sev { font-weight: 700; font-size: 11px; min-width: 36px; padding: 2px 8px; border-radius: 6px; text-align: center; align-self: flex-start; background: var(--accent); color: #fff; }
.gov-issue-err .gov-issue-sev { background: #EF4444; }
.gov-issue-warn .gov-issue-sev { background: #F49E0A; }
.gov-issue b { display: block; font-size: 13px; margin-bottom: 2px; }
.gov-issue span { font-size: 12px; color: var(--text-muted); }
.gov-issue-empty { padding: 18px; text-align: center; color: #14B7A5; font-size: 13.5px; background: rgba(20,183,165,.08); border-radius: 10px; border: 1px solid rgba(20,183,165,.2); }

/* 版本卡片 */
.gov-versions { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.gov-version { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; background: var(--surface); }
.gov-version-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.gov-version-n { font-weight: 700; font-size: 13px; padding: 2px 8px; background: var(--accent-grad); color: #fff; border-radius: 6px; }
.gov-version-note { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; min-height: 16px; }
.gov-version-actions { display: flex; gap: 6px; }
.badge-ok { background: rgba(20,183,165,.15); color: #14B7A5; padding: 1px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 600; }

/* 仿真评测 · 平台权重条 */
.sim-pw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.sim-pw-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--surface); }
.sim-pw-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.sim-pw-row { display: grid; grid-template-columns: 90px 1fr 40px 1.5fr; align-items: center; gap: 8px; padding: 4px 0; font-size: 11.5px; }
.sim-pw-label { font-weight: 500; }
.sim-pw-bar { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.sim-pw-fill { height: 100%; border-radius: 4px; transition: width .35s; }
.sim-pw-val { font-weight: 600; text-align: center; }

/* 诊断卡 */
.sim-diagnose { display: flex; gap: 14px; padding: 14px 18px; border-radius: 12px; border: 1px solid var(--border); }
.sim-diagnose-ok { background: rgba(20,183,165,.08); border-left: 4px solid #14B7A5; }
.sim-diagnose-warn { background: rgba(244,158,10,.08); border-left: 4px solid #F49E0A; }
.sim-diagnose-i {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700;
}
.sim-diagnose-ok .sim-diagnose-i { background: #14B7A5; color: #fff; }
.sim-diagnose-warn .sim-diagnose-i { background: #F49E0A; color: #fff; }
.sim-diagnose b { display: block; font-size: 14px; margin-bottom: 4px; }
.sim-diagnose p { margin: 0 0 6px; font-size: 12.5px; line-height: 1.6; }
.sim-diagnose code { background: var(--surface); padding: 1px 6px; border-radius: 4px; font-size: 12px; font-weight: 600; }
.sim-diagnose ul { margin: 4px 0 0 18px; font-size: 12.5px; color: var(--text); }
.sim-diagnose li { margin: 3px 0; line-height: 1.55; }

/* 评分卡 */
.sim-ranked { display: flex; flex-direction: column; gap: 8px; }
.sim-rank {
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px;
  background: var(--surface); transition: border-color .15s;
}
.sim-rank:hover { border-color: var(--accent); }
.sim-rank-ok { border-left: 4px solid #14B7A5; }
.sim-rank-mid { border-left: 4px solid #F49E0A; }
.sim-rank-low { border-left: 4px solid #EF4444; }
.sim-rank-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.sim-rank-i { font-weight: 700; font-size: 13px; padding: 2px 9px; background: var(--accent-grad); color: #fff; border-radius: 6px; flex-shrink: 0; }
.sim-rank-bars { flex: 1; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; min-width: 280px; }
.sim-rank-bars > span { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-muted); }
.sim-bar { flex: 1; height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; min-width: 50px; }
.sim-bar-fill { height: 100%; border-radius: 3px; transition: width .5s ease; }
.sim-rank-score { font-size: 16px; font-weight: 700; color: var(--accent); min-width: 40px; text-align: right; }
.sim-rank-body { font-size: 12.5px; line-height: 1.6; color: var(--text); white-space: pre-wrap; }

/* 暗色主题适配 */
:root[data-theme="dark"] .gov-chunk { background: rgba(255,255,255,.03); }
:root[data-theme="dark"] .gov-entity { background: rgba(255,255,255,.02); }
:root[data-theme="dark"] .gov-version { background: rgba(255,255,255,.02); }
:root[data-theme="dark"] .sim-rank { background: rgba(255,255,255,.02); }
:root[data-theme="dark"] .sim-pw-card { background: rgba(255,255,255,.02); }

/* =========================================================
   内容增强 · cx-* 样式（textarea 美化 + 输入区布局）
   ========================================================= */
.cx-grid {
  display: grid; grid-template-columns: 1fr 280px; gap: 16px;
  align-items: stretch;
}
@media (max-width: 900px) { .cx-grid { grid-template-columns: 1fr; } }

.cx-input-wrap {
  display: flex; flex-direction: column;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px; transition: border-color .2s;
}
.cx-input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,.12); }
.cx-input-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cx-label { font-size: 13px; font-weight: 600; color: var(--text); }
.cx-counter { font-size: 11.5px; color: var(--text-muted); padding: 2px 8px; background: var(--surface); border-radius: 999px; }
.cx-textarea {
  min-height: 180px !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-size: 14px !important; line-height: 1.7 !important;
  resize: vertical !important;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif !important;
}
.cx-textarea:focus { outline: none; }

.cx-side {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px;
}
.cx-side .form-field { margin: 0; }
.cx-side .form-field label { font-size: 12px; margin-bottom: 5px; }
.cx-btn {
  padding: 12px 18px !important; font-size: 14px !important;
  width: 100%; justify-content: center;
  background: linear-gradient(135deg, var(--accent) 0%, #8C5BF4 100%) !important;
  color: #fff !important; border: none !important;
  box-shadow: 0 4px 12px -4px rgba(99,102,241,.4);
  transition: transform .15s, box-shadow .15s;
}
.cx-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px -4px rgba(99,102,241,.55); }
.cx-tip {
  display: flex; align-items: flex-start; gap: 6px;
  font-size: 11.5px; color: var(--text-muted); line-height: 1.5;
  padding: 10px 12px; background: var(--surface); border-radius: 8px;
  border: 1px dashed var(--border);
}
.cx-tip svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--accent); margin-top: 2px; }

.cx-loading {
  display: flex; align-items: center; gap: 8px;
  padding: 16px; text-align: center; color: var(--text-muted);
  background: var(--surface-2); border-radius: 10px; margin-top: 12px;
  justify-content: center;
}
.cx-loading svg { width: 16px; height: 16px; animation: cx-spin 1.2s linear infinite; color: var(--accent); }
@keyframes cx-spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

.cx-advice { font-size: 13.5px; line-height: 1.7; }
.cx-version-body { font-size: 13px; line-height: 1.7; white-space: pre-wrap; color: var(--text); max-height: 300px; overflow-y: auto; }

:root[data-theme="dark"] .cx-input-wrap,
:root[data-theme="dark"] .cx-side { background: rgba(255,255,255,.03); }

/* =========================================================
   内容审核 · review-* 样式（两步审核：AI → 人工）
   ========================================================= */
.review-tabs {
  display: flex; gap: 6px; margin-bottom: 14px;
  background: var(--surface-2); padding: 4px; border-radius: 11px;
  width: fit-content;
}
.review-tab {
  border: none; background: transparent; cursor: pointer;
  padding: 8px 18px; border-radius: 8px; font-size: 13.5px;
  color: var(--text-muted); font-weight: 600; font-family: inherit;
  transition: background .15s, color .15s;
}
.review-tab:hover { color: var(--text); }
.review-tab.active { background: var(--accent-grad); color: #fff; box-shadow: 0 4px 10px -4px rgba(99,102,241,.4); }

.review-group { margin-bottom: 18px; }
.review-group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.review-cards { display: flex; flex-direction: column; gap: 10px; }
.review-card {
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); padding: 14px 16px;
  border-left: 4px solid var(--border);
  transition: border-color .15s, transform .15s;
}
.review-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.review-card-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.review-card-head b { font-size: 14px; }
.review-card-head .muted { font-size: 11.5px; }
.review-card-body { font-size: 12.5px; color: var(--text-muted); line-height: 1.65; margin-bottom: 8px; }
.review-ai-note {
  font-size: 12px; color: var(--accent); background: rgba(99,102,241,.07);
  border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; line-height: 1.55;
}
.review-card-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.review-hits { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.review-check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; flex-shrink: 0; }
.review-check input { width: 16px; height: 16px; accent-color: #6366F1; cursor: pointer; }
.review-batch-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 12px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
}
.review-batch-bar .muted { font-size: 12.5px; }
.review-batch-bar .btn[disabled] { opacity: .45; cursor: not-allowed; }

.review-words-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.review-words-head .muted { font-size: 12.5px; line-height: 1.6; }
.review-words-head b { color: var(--text); }

.review-viewer-title { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.review-viewer-body {
  font-size: 13px; line-height: 1.8; white-space: pre-wrap;
  background: var(--surface-2); border-radius: 10px; padding: 14px; max-height: 300px; overflow-y: auto;
}
.review-viewer-ai {
  margin-top: 12px; font-size: 12.5px; color: var(--accent);
  background: rgba(99,102,241,.07); border-radius: 10px; padding: 12px 14px; line-height: 1.6;
}
.review-viewer-ai b { display: block; margin-bottom: 4px; }

.review-modal .review-result { border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; font-size: 13px; line-height: 1.7; }
.review-ok { background: rgba(20,183,165,.1); border: 1px solid rgba(20,183,165,.3); color: var(--text); }
.review-ok b { color: #14B7A5; }
.review-err { background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.25); color: var(--text); }
.review-err b { color: #EF4444; }
.review-err ul { margin: 8px 0 0 18px; padding: 0; }
.review-err li { margin: 4px 0; }

:root[data-theme="dark"] .review-card { background: rgba(255,255,255,.02); }
