/* ============================================================
   GEO 监控系统 — 设计系统（像素级对齐模力指数）
   所有值均为 getComputedStyle 实测，非估算
   ============================================================ */
:root {
  /* 色彩 token（HSL，shadcn 风格） */
  --primary: 240 75% 55%;
  --accent: 280 80% 55%;
  --background: 230 30% 97%;
  --foreground: 235 35% 12%;
  --secondary: 230 25% 93%;
  --muted: 230 20% 92%;
  --border-hsl: 230 20% 86%;
  --ring: 240 75% 55%;
  --destructive: 0 75% 55%;
  --card: 0 0% 100%;

  /* 常用实体色（实测） */
  --primary-color: rgb(79, 70, 229);       /* 主按钮 indigo-600 */
  --bg: rgb(245, 246, 250);                /* 页面背景 */
  --fg: rgb(20, 22, 41);                   /* 正文 */
  --fg-soft: rgb(17, 24, 39);              /* 标题 */
  --fg-secondary: rgb(55, 65, 81);         /* 次级文字 gray-700 */
  --muted: rgb(107, 114, 128);             /* gray-500 */
  --muted-light: rgb(156, 163, 175);       /* gray-400 */
  --border: rgb(229, 231, 235);            /* gray-200 */
  --border-light: rgb(243, 244, 246);      /* gray-100 */
  --border-input: rgb(212, 215, 226);      /* 输入框边框实测 */

  /* 字体 */
  --font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* 圆角 */
  --radius-sm: 8px;      /* 指标卡 */
  --radius-md: 10px;     /* 按钮/输入框 */
  --radius-lg: 12px;     /* 卡片/面板/弹窗 */

  /* 阴影（实测） */
  --shadow-card: 0 1px 3px 0 rgba(15, 23, 42, 0.08);
  --shadow-modal: 0 24px 48px rgba(0, 0, 0, 0.2);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
}

#app { display: flex; min-height: 100vh; }

/* ===== 侧边栏 ===== */
.sidebar {
  width: 220px;
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex; flex-direction: column;
}
.logo {
  font-size: 17px;
  font-weight: 600;
  padding: 0 12px 22px;
  color: var(--fg);
  letter-spacing: -0.2px;
}
.logo img.logo-img { height: 30px; width: auto; max-width: 100%; display: block; }
/* 标题行高固定 36px（原始高度）：LOGO 实际 64px，负 margin 上下各收 14px，
   溢出部分对称显示、不撑高行，同时保留占位宽度不遮右侧按钮 */
.page-head .head-title-wrap { display: flex; align-items: center; height: 36px; }
.head-title-wrap h1 { margin: 0; }
.head-title-wrap h1 img.head-logo-img { height: 64px; width: auto; display: block; margin: -14px 0; }
.sidebar nav a {
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--muted);
  margin-bottom: 4px;
  user-select: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}
.sidebar nav a:hover { background: rgb(243, 244, 246); color: var(--fg); }
.sidebar nav a.active {
  background: rgb(238, 242, 255);
  color: rgb(67, 56, 202);
  font-weight: 600;
}

/* ===== 主内容 ===== */
.main { flex: 1; min-width: 0; padding: 28px 36px; }
.main-share { min-width: 0; padding: 24px 32px; }
.page-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 22px;
}
h1 { font-size: 22px; font-weight: 600; color: var(--fg); letter-spacing: -0.3px; }
.sub { font-size: 13px; color: var(--muted); font-weight: 400; }
.hint { color: var(--muted); margin-bottom: 20px; font-size: 13px; }

/* ===== 按钮 ===== */
.btn-primary {
  background: rgb(79, 70, 229); color: #fff; border: none;
  padding: 10px 24px; border-radius: var(--radius-lg); cursor: pointer;
  font-size: 14px; font-weight: 500;
  transition: background 0.15s ease;
}
.btn-primary:hover { background: rgb(67, 56, 202); }
.btn-mini {
  background: #fff; color: rgb(75, 85, 99); border: 1px solid var(--border);
  padding: 6px 14px; border-radius: var(--radius-md); cursor: pointer;
  font-size: 13px; font-weight: 500;
  transition: background 0.15s ease;
}
.btn-mini:hover { background: rgb(243, 244, 246); }
.btn-mini:disabled, .btn-primary:disabled {
  opacity: 0.55; cursor: not-allowed; pointer-events: none;
}
.btn-mini.danger { color: rgb(190, 18, 60); }
.btn-mini.danger:hover { background: rgb(255, 241, 242); }
.btn-ghost {
  background: transparent; color: var(--muted); border: none;
  padding: 6px 12px; border-radius: var(--radius-md); cursor: pointer;
  font-size: 13px; font-weight: 500;
}
.btn-ghost:hover { background: rgb(243, 244, 246); color: var(--fg); }

/* ===== 项目卡片 ===== */
.card-list { display: flex; flex-direction: column; gap: 14px; }
.card {
  background: #fff; border: 1px solid var(--border);
  border-radius: 16px; padding: 20px 22px; box-shadow: var(--shadow-card);
}
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.card-title { font-size: 15px; font-weight: 600; color: var(--fg); }
.card-meta {
  display: flex; gap: 20px; color: var(--muted); font-size: 13px;
  flex-wrap: wrap; margin-bottom: 16px;
}
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.badge { font-size: 12px; padding: 3px 12px; border-radius: 20px; font-weight: 500; }
.badge-on { background: rgb(240, 253, 244); color: rgb(22, 101, 52); }
.badge-off { background: rgb(243, 244, 246); color: rgb(107, 114, 128); }

.empty {
  text-align: center; color: var(--muted); padding: 80px 0;
  background: #fff; border: 1px dashed var(--border); border-radius: var(--radius-lg);
}

/* ===== 指标卡（5 色，实测：圆角8px padding16px gap12px） ===== */
.metrics {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.metric {
  border-radius: var(--radius-sm);
  padding: 16px;
}
.m-label { font-size: 14px; font-weight: 500; line-height: 21px; margin-bottom: 6px; }
.m-val { font-size: 24px; font-weight: 700; line-height: 1.2; }
/* 5 色体系（实测 bg + 同色字） */
.metric-indigo { background: rgb(238, 242, 255); }
.metric-indigo .m-label, .metric-indigo .m-val, .metric-indigo .m-sub { color: rgb(67, 56, 202); }
.metric-purple { background: rgb(250, 245, 255); }
.metric-purple .m-label, .metric-purple .m-val, .metric-purple .m-sub { color: rgb(126, 34, 206); }
.metric-blue { background: rgb(239, 246, 255); }
.metric-blue .m-label, .metric-blue .m-val, .metric-blue .m-sub { color: rgb(29, 78, 216); }
.metric-rose { background: rgb(255, 241, 242); }
.metric-rose .m-label, .metric-rose .m-val, .metric-rose .m-sub { color: rgb(190, 18, 60); }
.metric-sky { background: rgb(240, 249, 255); }
.metric-sky .m-label, .metric-sky .m-val, .metric-sky .m-sub { color: rgb(3, 105, 161); }

/* 高位曝光内嵌三格 */
.metric-tiers { display: flex; flex-direction: column; gap: 5px; margin-top: 4px; }
.metric-tier { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; }
.metric-tier span:last-child { font-weight: 700; }

/* 情感倾向内嵌 */
.metric-senti { display: flex; flex-direction: column; gap: 7px; margin-top: 4px; }
.senti-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 500; }
.senti-row .senti-bar {
  flex: 1; height: 6px; border-radius: 3px; margin: 0 8px; background: rgb(229, 231, 235); overflow: hidden;
}
.senti-row .senti-fill { height: 100%; border-radius: 3px; }
.senti-fill.pos { background: rgb(22, 163, 74); }
.senti-fill.neu { background: rgb(107, 114, 128); }
.senti-fill.neg { background: rgb(225, 29, 72); }

/* ===== 区块标题（实测 18px/600/灰900） ===== */
.sec-title {
  font-size: 18px; font-weight: 600; color: rgb(17, 24, 39);
  margin: 26px 0 14px;
}

/* ===== 筛选栏（实测 padding 14px 16px） ===== */
.filter-bar {
  display: flex; gap: 14px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 14px 16px; margin-bottom: 20px; box-shadow: var(--shadow-card);
}
.filter-item { display: flex; align-items: center; gap: 8px; }
.filter-label { font-size: 13px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.select { min-width: 120px; }

/* ===== 区块 ===== */
.section { margin-bottom: 24px; }
.section-head {
  display: flex; justify-content: space-between; align-items: center;
  margin: 24px 0 12px;
}
.head-actions { display: flex; gap: 10px; align-items: center; }

/* ===== 答案浏览小框（实测 12px 圆角 + gray100 边框） ===== */
.answer-pager { display: flex; align-items: center; gap: 8px; }
.pager-text { font-size: 13px; color: var(--muted); min-width: 48px; text-align: center; }
.answer-browser {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  height: 420px; max-height: 420px;
}
.answer-col {
  min-width: 0; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  overflow: hidden;
}
.answer-col-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}
.answer-col-head .rank-badge { padding: 3px 8px; font-size: 11px; }
.col-title { font-size: 13px; font-weight: 600; color: var(--fg-secondary); }
.answer-col-body { flex: 1; overflow-y: auto; background: rgb(249, 250, 251); padding: 12px; }
.answer-col-body.source-body { background: rgb(249, 250, 251); }
.answer-sheet {
  background: #fff; border: 1px solid var(--border-light); border-radius: 8px;
  padding: 14px 16px; min-height: 100%;
}
.scrollable::-webkit-scrollbar { width: 8px; }
.scrollable::-webkit-scrollbar-thumb { background: rgb(209, 213, 219); border-radius: 4px; }
.scrollable::-webkit-scrollbar-track { background: transparent; }
.answer-meta { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.answer-meta-spacer { flex: 1; }
.btn-delete-run {
  border: 1px solid #fecaca; background: #fff1f2; color: #dc2626;
  font-size: 12px; padding: 3px 10px; border-radius: 999px; cursor: pointer;
  line-height: 1.5; transition: all .15s;
}
.btn-delete-run:hover { background: #fee2e2; border-color: #f87171; }
.answer-time { font-size: 12px; color: var(--muted); margin-left: auto; }
.no-source { color: var(--muted); font-size: 13px; padding: 20px 0; text-align: center; }
.source-item {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; margin-bottom: 8px;
}
.source-top { display: flex; align-items: flex-start; gap: 8px; }
.source-main { flex: 1; min-width: 0; }
.source-title { font-size: 12px; color: var(--fg-secondary); font-weight: 500; word-break: break-all; margin-bottom: 4px; }
.source-url { font-size: 12px; color: rgb(67, 56, 202); text-decoration: none; word-break: break-all; }
.source-url:hover { text-decoration: underline; }
.source-time { font-size: 11px; color: var(--muted); margin-top: 4px; }
.source-badge {
  flex-shrink: 0; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11px; font-weight: 600; color: rgb(55, 65, 81);
  background: rgb(243, 244, 246); padding: 2px 8px; border-radius: 6px;
}

/* 标签 */
.tag {
  font-size: 12px; padding: 3px 10px; border-radius: 8px; font-weight: 500;
  background: rgb(243, 244, 246); color: var(--muted);
}
.tag-model { background: rgb(238, 242, 255); color: rgb(67, 56, 202); }
.tag-ok { background: rgb(240, 253, 244); color: rgb(22, 101, 52); }
.tag-no { background: rgb(255, 241, 242); color: rgb(190, 18, 60); }
.tag-senti-pos { background: rgb(240, 253, 244); color: rgb(22, 101, 52); }
.tag-senti-neu { background: rgb(243, 244, 246); color: rgb(107, 114, 128); }
.tag-senti-neg { background: rgb(255, 241, 242); color: rgb(190, 18, 60); }
.answer-body { color: rgb(55, 65, 81); white-space: pre-wrap; font-size: 14px; line-height: 1.7; }

/* ===== 线段式 tab：浅色字 + 激活态底部 2px 深色下划线 ===== */
.word-tab-bar { display: flex; align-items: center; gap: 24px; }
.word-tab-line {
  position: relative; border: none; background: transparent;
  color: rgb(156, 163, 175); font-size: 13px; font-weight: 500;
  padding: 6px 0; cursor: pointer; transition: color 0.15s ease;
}
.word-tab-line:hover { color: rgb(75, 85, 99); }
.word-tab-line.on { color: rgb(17, 24, 39); font-weight: 600; }
.word-tab-line.on::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; background: rgb(17, 24, 39); border-radius: 1px;
}

/* ===== 词库分页器 ===== */
.word-pager {
  display: flex; align-items: center; gap: 6px; margin-top: 12px; flex-wrap: wrap;
}
.word-pager .btn-mini { font-size: 12px; padding: 4px 10px; }
.word-pager .word-pager-num { min-width: 28px; text-align: center; }
.word-pager .word-pager-num.word-pager-active {
  background: rgb(124, 58, 237); color: #fff; border-color: rgb(124, 58, 237); font-weight: 600;
}
.word-pager .btn-mini:disabled { opacity: .45; cursor: not-allowed; }
.word-pager-info { font-size: 12px; color: rgb(107, 114, 128); margin-left: 6px; }

/* ===== 表格（实测 th 12px/500/10px12px，td 14px/12px） ===== */
.table-wrap {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); overflow: hidden;
}
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  background: #fff; text-align: left; font-size: 14px; font-weight: 500;
  color: var(--fg); padding: 10px 12px;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.data-table td {
  font-size: 14px; color: rgb(107, 114, 128); padding: 12px;
  border-bottom: 1px solid var(--border-light); white-space: nowrap;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: rgb(249, 250, 251); }
.cell-main { font-weight: 500; color: rgb(17, 24, 39); max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.cell-muted { color: rgb(107, 114, 128); }
.empty-cell { text-align: center; color: var(--muted); padding: 24px; }

/* ===== 引用分析 ===== */
.cite-section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 12px;
}
.cite-info {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%;
  font-size: 11px; font-weight: 600; color: rgb(107, 114, 128);
  background: rgb(243, 244, 246); cursor: help; margin-left: 6px;
}

/* 问号悬停 tooltip（图一/图二效果：黑底白字 + 向下三角） */
.help-badge {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%;
  font-size: 11px; font-weight: 600; color: rgb(107, 114, 128);
  background: rgb(243, 244, 246); cursor: help; margin-left: 6px;
  vertical-align: middle; flex-shrink: 0;
}
.help-badge .help-tip {
  position: absolute; bottom: 135%; left: 50%;
  transform: translateX(-50%);
  background: rgb(17, 24, 39); color: #fff;
  font-size: 12px; font-weight: 400; line-height: 1.4;
  padding: 6px 10px; border-radius: 6px;
  white-space: nowrap;
  opacity: 0; visibility: hidden;
  transition: opacity 0.15s ease;
  z-index: 60; pointer-events: none;
}
.help-badge .help-tip::after {
  content: ''; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: rgb(17, 24, 39);
}
.help-badge:hover .help-tip,
.help-badge:focus .help-tip {
  opacity: 1; visibility: visible;
}
.cite-actions { display: flex; gap: 8px; }
.btn-icon {
  display: inline-flex; align-items: center; gap: 4px;
  background: #fff; border: 1px solid var(--border); border-radius: 6px;
  padding: 5px 10px; font-size: 12px; color: rgb(55, 65, 81); cursor: pointer;
  transition: all 0.15s ease;
}
.btn-icon:hover { background: rgb(249, 250, 251); border-color: rgb(199, 210, 254); color: rgb(67, 56, 202); }
.btn-icon svg { width: 14px; height: 14px; }

.cite-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}
.cite-panel {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  display: flex; flex-direction: column;
  max-height: 480px;
  overflow: hidden;
}
.cite-panel-head {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 18px 10px; border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}
.cite-panel-head .cite-title { font-size: 14px; font-weight: 600; color: rgb(31, 41, 55); }
.cite-scroll {
  flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
  padding: 0 18px 12px;
}
.cite-scroll::-webkit-scrollbar { width: 8px; }
.cite-scroll::-webkit-scrollbar-track { background: transparent; }
.cite-scroll::-webkit-scrollbar-thumb { background: rgb(209, 213, 219); border-radius: 4px; }
.cite-scroll::-webkit-scrollbar-thumb:hover { background: rgb(156, 163, 175); }

.cite-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cite-table th {
  background: #fff; text-align: left; font-size: 13px; font-weight: 500;
  color: var(--fg); padding: 10px 8px;
  border-bottom: 1px solid var(--border); white-space: nowrap;
  position: sticky; top: 0; z-index: 1;
}
.cite-table th.th-c { text-align: center; width: 96px; }
.cite-table th.th-title { width: 46%; }
.cite-table th.th-chan { width: 30%; }
.cite-table th.sortable { cursor: pointer; user-select: none; }
.cite-table th.sortable:hover { background: rgb(249, 250, 251); color: rgb(55, 65, 81); }
.sort-arrow {
  display: inline-block; margin-left: 4px; font-size: 12px; font-weight: 700; opacity: 0.35;
  color: rgb(156, 163, 175);
  transition: opacity 0.15s, transform 0.15s, color 0.15s;
}
.sort-arrow.sort-arrow-desc { opacity: 1; color: rgb(31, 41, 55); }
.sort-arrow.sort-arrow-asc { opacity: 1; color: rgb(31, 41, 55); transform: rotate(180deg); }

.cite-table td {
  font-size: 13px; color: rgb(55, 65, 81); padding: 12px 8px;
  border-bottom: 1px solid var(--border-light); vertical-align: middle;
}
.cite-table tr:last-child td { border-bottom: none; }
.cite-table tbody tr:hover td { background: rgb(249, 250, 251); }
.cite-table td.td-c { text-align: center; font-variant-numeric: tabular-nums; }
.cite-table td.td-pct { background: rgb(249, 250, 251); font-weight: 600; color: rgb(31, 41, 55); }

.cite-name-cell {
  font-weight: 500; color: rgb(17, 24, 39);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cite-bullet {
  display: inline-block; vertical-align: middle; flex-shrink: 0;
  color: rgb(37, 99, 235); font-size: 9px; line-height: 1; margin-right: 8px;
}
.cite-name-text { display: inline-block; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: calc(100% - 18px); }
.cite-link { color: rgb(67, 56, 202); text-decoration: none; word-break: break-all; }
.cite-link:hover { text-decoration: underline; }
.cite-link-title {
  font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: inline-block; max-width: calc(100% - 18px); vertical-align: middle;
}
.cite-link-ellipsis {
  display: inline-block; max-width: 100%; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; vertical-align: middle;
}
.rank-count { font-size: 13px; font-weight: 600; color: rgb(31, 41, 55); font-variant-numeric: tabular-nums; }
.rank-pct { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 1px; }

/* ===== 情感倾向 ===== */
.senti-panel {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); padding: 20px 22px;
}
.senti-dist { display: flex; gap: 24px; }
.senti-big { text-align: center; min-width: 90px; }
.senti-num { font-size: 30px; font-weight: 700; }
.senti-cap { font-size: 13px; font-weight: 500; margin-top: 2px; }
.senti-big.pos .senti-num, .senti-big.pos .senti-cap { color: rgb(22, 163, 74); }
.senti-big.neu .senti-num, .senti-big.neu .senti-cap { color: rgb(107, 114, 128); }
.senti-big.neg .senti-num, .senti-big.neg .senti-cap { color: rgb(225, 29, 72); }
.senti-desc { font-size: 13px; color: var(--muted); margin-top: 14px; }

/* ===== 趋势图 ===== */
.chart-box {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); padding: 12px;
}

/* ===== 设置页 ===== */
.setting-list { display: flex; flex-direction: column; gap: 12px; }
.setting-row {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 18px 22px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-card);
}
.setting-info { flex: 1; min-width: 160px; }
/* 词表设置：标签/保存按钮在上方一行，输入框铺满整行 */
.setting-row.block { display: block; }
.setting-row.block textarea.input { width: 100%; max-width: 100%; }
.setting-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.setting-sub-label { font-size: 13px; font-weight: 600; color: var(--fg); margin: 12px 0 6px; }
.setting-label { font-weight: 600; color: var(--fg); font-size: 14px; }
.setting-status { font-size: 12px; color: rgb(22, 101, 52); margin-top: 3px; font-weight: 500; }
.empty-status { color: var(--muted); }

/* ===== 输入框（实测 px-3 py-2.5 圆角10px 边框 rgb(212,215,226)） ===== */
.input {
  flex: 1; max-width: 400px; border: 1px solid var(--border-input);
  border-radius: var(--radius-md); padding: 10px 12px; font-size: 14px; font-family: inherit;
  background: #fff; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus {
  outline: none; border-color: rgb(67, 56, 202);
  box-shadow: 0 0 0 3px rgb(67 56 202 / 0.1);
}
textarea.input { resize: vertical; }

/* ===== 弹窗（三段式，实测） ===== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(17, 24, 39, 0.5);
  display: flex; align-items: center; justify-content: center; z-index: 100;
}
.modal-panel {
  background: #fff; border-radius: 12px; box-shadow: var(--shadow-modal);
  width: min(90vw, 1400px); display: flex; flex-direction: column;
  max-height: 88vh;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; flex-shrink: 0; border-bottom: 1px solid var(--border-light);
}
.modal-title { font-size: 16px; font-weight: 600; color: rgb(17, 24, 39); }
.modal-close {
  background: transparent; border: none; cursor: pointer; color: rgb(156, 163, 175);
  padding: 4px; border-radius: 6px; display: flex; align-items: center;
}
.modal-close:hover { background: rgb(243, 244, 246); color: rgb(55, 65, 81); }
.modal-body { flex: 1; overflow-y: auto; padding: 16px 24px; }
.modal-grid { display: grid; grid-template-columns: 45% 55%; }
.modal-col { display: flex; flex-direction: column; gap: 16px; }
.modal-col:first-child { padding-right: 20px; border-right: 1px solid var(--border-light); }
.modal-col:last-child { padding-left: 20px; }

/* 字段 */
.modal-fields { display: flex; flex-direction: column; gap: 16px; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: 14px; font-weight: 500; color: rgb(55, 65, 81); line-height: 21px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.req { color: rgb(239, 68, 68); margin-left: 2px; }
.textarea { resize: vertical; min-height: 120px; }
.q-count { font-size: 12px; color: var(--muted); }
.q-list { max-height: 180px; overflow-y: auto; margin-bottom: 8px; display: flex; flex-direction: column; gap: 6px; }
.q-item { display: flex; align-items: center; gap: 8px; background: rgb(249, 250, 251); border: 1px solid var(--border-light); border-radius: 8px; padding: 6px 10px; }
.q-item-idx { font-size: 12px; color: rgb(156, 163, 175); width: 16px; flex-shrink: 0; }
.q-item-text { flex: 1; font-size: 13px; color: rgb(17, 24, 39); word-break: break-all; }
.q-item-del { border: none; background: transparent; color: rgb(156, 163, 175); cursor: pointer; font-size: 14px; flex-shrink: 0; }
.q-item-del:hover { color: rgb(220, 38, 38); }
.q-empty { font-size: 12px; color: rgb(156, 163, 175); margin-bottom: 8px; }

/* pill 与智能推荐按钮 */
.pill {
  font-size: 12px; color: rgb(20, 22, 41); background: transparent;
  border: 1px solid var(--border); border-radius: 9999px; padding: 4px 10px;
  cursor: pointer; font-weight: 400;
}
.pill:hover { background: rgb(243, 244, 246); }
.smart-btn {
  font-size: 11px; color: rgb(20, 22, 41); background: #fff;
  border: 1px solid var(--border); border-radius: 12px; padding: 4px 10px;
  cursor: pointer;
}
.smart-btn:hover { background: rgb(249, 250, 251); }

/* 竞品标签 */
.comp-list { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.comp-tag {
  font-size: 13px; background: rgb(243, 244, 246); color: rgb(55, 65, 81);
  border-radius: 8px; padding: 4px 10px; display: flex; align-items: center; gap: 6px;
}
.comp-input {
  border: none; background: transparent; font-size: 13px; color: rgb(55, 65, 81);
  width: 80px; font-family: inherit; outline: none; padding: 0;
}
.comp-input:focus { border-bottom: 1px solid rgb(67, 56, 202); }
.comp-del { border: none; background: transparent; cursor: pointer; color: rgb(156, 163, 175); font-size: 14px; }
.comp-del:hover { color: rgb(239, 68, 68); }
.comp-empty { font-size: 13px; color: rgb(156, 163, 175); }
.comp-add {
  border: 1px dashed rgb(212, 215, 226); background: transparent; cursor: pointer;
  border-radius: 8px; width: 28px; height: 28px; color: rgb(107, 114, 128); font-size: 16px;
}
.comp-add:hover { border-color: rgb(67, 56, 202); color: rgb(67, 56, 202); }

/* 核心词列表（带序号，可增删） */
.core-list { display: flex; flex-direction: column; gap: 6px; }
.core-row {
  display: flex; align-items: center; gap: 6px;
  background: rgb(243, 244, 246); border-radius: 8px; padding: 6px 10px;
  cursor: pointer; border: 1px solid transparent;
}
.core-row.core-active {
  background: rgb(238, 242, 255); border-color: rgb(67, 56, 202);
}
.core-current { font-size: 12px; color: rgb(67, 56, 202); font-weight: 500; }
.core-index { font-size: 12px; color: rgb(156, 163, 175); width: 16px; text-align: center; flex-shrink: 0; }
.core-input {
  flex: 1; border: none; background: transparent; font-size: 13px;
  color: rgb(55, 65, 81); font-family: inherit; outline: none; padding: 2px 0;
}
.core-input:focus { border-bottom: 1px solid rgb(67, 56, 202); }
.core-del { border: none; background: transparent; cursor: pointer; color: rgb(156, 163, 175); font-size: 14px; flex-shrink: 0; }
.core-del:hover { color: rgb(239, 68, 68); }
.core-add {
  border: 1px dashed rgb(212, 215, 226); background: transparent; cursor: pointer;
  border-radius: 8px; padding: 6px; color: rgb(107, 114, 128); font-size: 12px;
}
.core-add:hover { border-color: rgb(67, 56, 202); color: rgb(67, 56, 202); }

/* 模型选择区 */
.model-box { background: rgb(243, 244, 246); border-radius: 10px; padding: 12px; }
.model-tools { display: flex; gap: 16px; margin-bottom: 8px; }
.check-line { font-size: 13px; color: rgb(55, 65, 81); display: flex; align-items: center; gap: 5px; cursor: pointer; }
.check-line input, .mini-check input { accent-color: rgb(79, 70, 229); cursor: pointer; }
.model-list { display: flex; flex-direction: column; gap: 4px; max-height: 280px; overflow-y: auto; }
.model-item { background: #fff; border-radius: 8px; padding: 8px 10px; }
.model-item.model-disabled { opacity: 0.55; }
.model-soon { font-size: 11px; color: rgb(156, 163, 175); margin-left: 4px; }
.label-disabled { color: rgb(156, 163, 175); cursor: not-allowed; }
.label-disabled input { cursor: not-allowed; }
.model-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.model-opts { display: flex; gap: 10px; }
.mini-check { font-size: 12px; color: rgb(107, 114, 128); display: flex; align-items: center; gap: 4px; cursor: pointer; }

/* 频次区 */
.freq-box { background: rgb(243, 244, 246); border-radius: 10px; padding: 14px; }
.freq-row { display: flex; align-items: center; margin-bottom: 10px; }
.field-inline { display: flex; align-items: center; }
.num-input { width: 70px; }

/* footer */
.modal-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; border-top: 1px solid var(--border); flex-shrink: 0; background: #fff;
}
.cost { font-size: 13px; color: var(--muted); }
.cost b { color: rgb(17, 24, 39); }
.footer-btns { display: flex; gap: 10px; }
.btn-cancel {
  background: rgb(243, 244, 246); color: rgb(55, 65, 81); border: none;
  padding: 8px 16px; border-radius: 12px; cursor: pointer; font-size: 14px; font-weight: 500;
}
.btn-cancel:hover { background: rgb(229, 231, 235); }
.btn-secondary {
  background: transparent; color: rgb(79, 70, 229); border: 1px solid rgb(79, 70, 229);
  padding: 8px 20px; border-radius: 12px; cursor: pointer; font-size: 14px; font-weight: 500;
}
.btn-secondary:hover { background: rgb(238, 242, 255); }

/* ===== toast ===== */
.toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%);
  background: rgb(20, 22, 41); color: #fff; padding: 11px 22px;
  border-radius: 10px; font-size: 13px; z-index: 200; box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .sidebar { width: 60px; }
  .sidebar .logo, .sidebar nav a span { display: none; }
  .answer-browser-inner { flex-direction: column; }
  .answer-col:first-child { border-right: none; border-bottom: 1px solid var(--border); }
  .cite-layout { grid-template-columns: 1fr; }
  .modal-grid { grid-template-columns: 1fr; }
  .modal-col:first-child { padding-right: 0; border-right: none; }
  .modal-col:last-child { padding-left: 0; }
  .selector-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .statistics-metric-row { grid-template-columns: repeat(2, 1fr); }
  .statistics-metric-row.metrics-row-4 { grid-template-columns: repeat(2, 1fr); }
  .grid.grid-cols-1.lg\:grid-cols-2 { grid-template-columns: 1fr; }
}

/* ============================================================
   复刻模力指数 — 顶部筛选区
   ============================================================ */
.monitor-filter-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 14px 16px; margin-bottom: 20px; box-shadow: var(--shadow-card);
}
.top-filter-sticky { position: sticky; top: 12px; z-index: 20; }
.selector-grid { display: grid; gap: 14px; }
.selector-grid-4 { grid-template-columns: repeat(4, 1fr); }
.selector-item { display: flex; align-items: center; gap: 8px; min-width: 0; }
.selector-label { font-size: 13px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.flex-1 { flex: 1; }
.min-w-0 { min-width: 0; }

.custom-dropdown { position: relative; }
.dropdown-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  border: 1px solid var(--border-input); border-radius: 8px; padding: 6px 10px;
  background: #fff; cursor: pointer; min-height: 32px; user-select: none;
}
.custom-dropdown.open .dropdown-trigger { border-color: rgb(79, 70, 229); }
.dropdown-trigger-main { display: flex; align-items: center; gap: 6px; min-width: 0; }
.dropdown-selected {
  font-size: 13px; color: rgb(17, 24, 39); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dropdown-arrow { width: 16px; height: 16px; color: rgb(156, 163, 175); flex-shrink: 0; }
.brand-badge {
  font-size: 11px; font-weight: 500; border-radius: 4px; padding: 1px 6px; flex-shrink: 0;
}
.brand-badge.boost { background: rgb(238, 242, 255); color: rgb(67, 56, 202); }
.brand-badge.competitor { background: rgb(255, 237, 213); color: rgb(194, 65, 12); }
.dropdown-menu {
  position: absolute; top: 100%; left: 0; right: 0; margin-top: 4px;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12); z-index: 50; max-height: 260px; overflow-y: auto;
}
.dropdown-option {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  font-size: 13px; color: rgb(55, 65, 81); cursor: pointer;
}
.dropdown-option:hover { background: rgb(249, 250, 251); }
.dropdown-option.selected { background: rgb(238, 242, 255); color: rgb(67, 56, 202); }
.break-words { word-break: break-all; }

/* ============================================================
   日期范围选择器（统一组件：日历弹层 + 快捷选项）
   ============================================================ */
.drp { position: relative; min-width: 0; }
.drp-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  border: 1px solid var(--border-input); border-radius: 8px; padding: 8px 12px;
  background: #fff; cursor: pointer; min-height: 38px; user-select: none;
}
.drp-trigger.on { border-color: rgb(79, 70, 229); box-shadow: 0 0 0 3px rgb(79 70 229 / 0.1); }
.drp-label { font-size: 13px; color: rgb(17, 24, 39); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drp-label.ph { color: rgb(107, 114, 128); }
.drp-arrow { width: 15px; height: 15px; color: rgb(156, 163, 175); flex-shrink: 0; transition: transform .15s; }
.drp-arrow.up { transform: rotate(180deg); }
.drp-popup {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 80;
  display: flex; background: #fff; border: 1px solid var(--border-light); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.14); overflow: hidden;
}
.drp-popup.right { left: auto; right: 0; }
.drp-quick { width: 130px; padding: 10px; border-right: 1px solid var(--border-light); background: #fafafa; }
.drp-quick-item {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 8px 12px; border-radius: 8px; font-size: 13px; color: rgb(55, 65, 81);
  cursor: pointer; margin-bottom: 2px;
}
.drp-quick-item:hover { background: rgb(249, 250, 251); }
.drp-quick-item.on { background: rgb(238, 242, 255); color: rgb(67, 56, 202); font-weight: 500; }
.drp-check { font-size: 12px; }
.drp-cal { width: 320px; padding: 12px 14px; }
.drp-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.drp-nav { background: transparent; border: none; font-size: 18px; color: rgb(107, 114, 128); cursor: pointer; padding: 2px 10px; }
.drp-nav:hover { color: rgb(79, 70, 229); }
.drp-month { font-size: 15px; font-weight: 600; color: rgb(17, 24, 39); }
.drp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.drp-wd { text-align: center; font-size: 12px; color: rgb(156, 163, 175); padding: 6px 0; }
.drp-day {
  position: relative; text-align: center; font-size: 13px; color: rgb(55, 65, 81);
  padding: 7px 0; border-radius: 50%; cursor: pointer; z-index: 1;
}
.drp-day:hover { background: rgb(243, 244, 246); }
.drp-day.out { color: rgb(200, 207, 217); }
.drp-day.today { color: rgb(124, 58, 237); font-weight: 700; }
.drp-day.inr { background: rgb(238, 242, 255); border-radius: 0; }
.drp-day.sel { background: rgb(124, 58, 237); color: #fff; font-weight: 600; border-radius: 50%; }
.drp-day.sel.inr { border-radius: 50%; }
.drp-footer { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.drp-range-text { flex: 1; font-size: 12px; color: rgb(107, 114, 128); }
.drp-range-text i { font-style: normal; margin: 0 4px; }
.drp-btn {
  background: #fff; border: 1px solid var(--border); border-radius: 6px;
  padding: 6px 14px; font-size: 13px; color: rgb(55, 65, 81); cursor: pointer;
}
.drp-btn:hover { background: rgb(249, 250, 251); }
.drp-btn.primary { background: rgb(124, 58, 237); border-color: rgb(124, 58, 237); color: #fff; }
.drp-btn.primary:hover { background: rgb(109, 40, 217); }
/* 带文字标签的筛选栏（后台发稿统计：铺满整行 + 标签） */
.calls-filter.fill-row2 { gap: 14px; }
.calls-filter.fill-row2 .flt-item { flex: 1 1 0; display: flex; align-items: center; gap: 8px; min-width: 0; }
.calls-filter.fill-row2 .flt-label { font-size: 13px; color: var(--muted); white-space: nowrap; }
.calls-filter.fill-row2 .flt-item select, .calls-filter.fill-row2 .flt-item .drp { flex: 1 1 0; min-width: 0; }
.calls-filter.fill-row2 > .btn-mini { flex: 0 0 auto; align-self: flex-end; }

/* 日期选择器触发框：全站统一宽度基准 */
.drp-trigger { width: 100%; min-width: 220px; max-width: 320px; }

/* 添加/编辑监控：客户搜索下拉 */
.cust-combo { position: relative; }
.cust-combo-drop {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 60;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12); max-height: 240px; overflow-y: auto;
}
.cust-combo-opt {
  padding: 8px 12px; font-size: 13px; color: rgb(55, 65, 81); cursor: pointer;
}
.cust-combo-opt:hover { background: rgb(249, 250, 251); }
.cust-combo-opt.on { background: rgb(238, 242, 255); color: rgb(67, 56, 202); }

.date-range {
  display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0;
  border: 1px solid var(--border-input); border-radius: 8px; padding: 4px 8px;
  background: #fff; min-height: 32px;
}
.date-icon { width: 14px; height: 14px; color: rgb(156, 163, 175); flex-shrink: 0; }
.date-input {
  flex: 1; min-width: 0; border: none; outline: none; font-size: 11px; color: rgb(107, 114, 128);
  background: transparent; text-align: center;
}
.date-sep { font-size: 11px; color: rgb(156, 163, 175); flex-shrink: 0; }
.date-clear { width: 13px; height: 13px; color: rgb(156, 163, 175); flex-shrink: 0; cursor: pointer; }
.date-clear:hover { color: rgb(107, 114, 128); }

/* ============================================================
   复刻模力指数 — 统计卡片（白底容器 + 5 张浅色指标）
   ============================================================ */
.statistics-card {
  background: #fff; border: 1px solid var(--border-light); border-radius: 12px;
  padding: 20px; box-shadow: var(--shadow-card); margin-bottom: 20px;
}
.statistics-card-header {
  font-size: 16px; font-weight: 600; color: rgb(17, 24, 39); margin-bottom: 14px;
}
.statistics-metric-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
/* 发稿统计视图：四张指标卡，间距拉大减少两侧空白 */
.statistics-metric-row.metrics-row-4 { grid-template-columns: repeat(4, 1fr); gap: 24px; }
.statistics-metric { border-radius: 8px; padding: 16px; }
.statistics-metric-label { display: flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.statistics-metric-value { font-size: 24px; font-weight: 700; line-height: 28.8px; }
.statistics-metric-indigo { background: rgb(238, 242, 255); }
.statistics-metric-indigo .statistics-metric-label, .statistics-metric-indigo .statistics-metric-value { color: rgb(67, 56, 202); }
.statistics-metric-purple { background: rgb(250, 245, 255); }
.statistics-metric-purple .statistics-metric-label, .statistics-metric-purple .statistics-metric-value { color: rgb(126, 34, 206); }
.statistics-metric-blue { background: rgb(239, 246, 255); }
.statistics-metric-blue .statistics-metric-label, .statistics-metric-blue .statistics-metric-value { color: rgb(29, 78, 216); }
.statistics-metric-rose { background: rgb(255, 241, 242); }
.statistics-metric-rose .statistics-metric-label { color: rgb(190, 18, 60); }
.statistics-metric-sky { background: rgb(240, 249, 255); }
.statistics-metric-sky .statistics-metric-label { color: rgb(3, 105, 161); }

.statistics-mini-row { display: flex; justify-content: space-between; font-size: 13px; font-weight: 500; margin-top: 6px; }
.statistics-mini-row span:first-child { color: rgb(107, 114, 128); }
.statistics-mini-row span:last-child { font-weight: 700; }
.statistics-mini-progress { height: 6px; border-radius: 3px; margin-top: 3px; background: rgb(229, 231, 235); overflow: hidden; }
.statistics-mini-progress-rose { background: rgb(254, 205, 211); }
.statistics-mini-bar { height: 100%; border-radius: 3px; }
.statistics-mini-bar-rose-strong { background: rgb(244, 63, 94); }
.statistics-mini-bar-rose { background: rgb(251, 113, 133); }
.statistics-mini-bar-emerald { background: rgb(16, 185, 129); }
.statistics-mini-bar-slate { background: rgb(148, 163, 184); }
.statistics-mini-bar-red { background: rgb(220, 38, 38); }
.statistics-mini-bar-sky { background: rgb(14, 165, 233); }
.statistics-empty { text-align: center; color: rgb(156,163,175); font-size: 13px; padding: 10px 4px; }

/* ============================================================
   模型配置弹窗 — API 配置列表（多 API 绑定 + 优先级切换）
   ============================================================ */
.model-api-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.model-api-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 8px; margin-bottom: 8px; background: #fafafa; }
.model-api-info { min-width: 0; flex: 1; }
.model-api-name { font-weight: 600; font-size: 13px; color: #111827; }
.model-api-sub { font-size: 12px; color: #6b7280; word-break: break-all; line-height: 1.5; }
.key-wrap { position: relative; }
.key-wrap .input { padding-right: 44px; }
.key-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border: none; background: transparent; color: #374151; font-size: 14px; cursor: pointer;
}
.key-eye:hover { opacity: .7; }
.model-api-neg { color: #dc2626; }
.model-api-off { color: #dc2626; font-size: 12px; margin-left: 6px; }
.model-api-ops { display: flex; gap: 4px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; max-width: 260px; }
.model-api-form { border: 1px solid #d1d5db; border-radius: 8px; padding: 12px; margin-top: 8px; background: #fff; }
.model-api-form-ops { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* ============================================================
   复刻模力指数 — 词库表彩色药丸
   ============================================================ */
.wordlib-table th { font-size: 14px; font-weight: 500; padding: 10px 8px; text-align: left; background: #fff; color: var(--fg); }
.wordlib-table th .sort-arrow { font-size: 10px; opacity: 0.7; }
.th-idx { color: rgb(107, 114, 128); }
.th-main { color: rgb(55, 65, 81); }
.th-indigo { color: rgb(79, 70, 229); }
.th-purple { color: rgb(147, 51, 234); }
.th-blue { color: rgb(37, 99, 235); }
.th-rose1 { color: rgb(225, 29, 72); }
.th-rose2 { color: rgb(244, 63, 94); }
.th-rose3 { color: rgb(253, 164, 175); }
.th-emerald { color: rgb(5, 150, 105); }
.th-slate { color: rgb(100, 116, 139); }
.th-red { color: rgb(220, 38, 38); }

.cell-badge {
  display: inline-block; font-size: 12px; font-weight: 500; border-radius: 9999px;
  padding: 2px 10px; border: 1px solid transparent; white-space: nowrap;
}
.cell-indigo { background: rgb(238, 242, 255); color: rgb(67, 56, 202); border-color: rgb(199, 210, 254); }
.cell-purple { background: rgb(250, 245, 255); color: rgb(126, 34, 206); border-color: rgb(233, 213, 255); }
.cell-blue { background: rgb(239, 246, 255); color: rgb(29, 78, 216); border-color: rgb(191, 219, 254); }
.cell-rose1 { background: rgb(255, 228, 230); color: rgb(225, 29, 72); border-color: rgb(254, 205, 211); }
.cell-rose2 { background: rgb(255, 228, 230); color: rgb(244, 63, 94); border-color: rgb(254, 205, 211); }
.cell-rose3 { background: rgb(255, 241, 242); color: rgb(251, 113, 133); border-color: rgb(254, 205, 211); }
.cell-emerald { background: rgb(236, 253, 245); color: rgb(5, 150, 105); border-color: rgb(167, 243, 208); }
.cell-slate { background: rgb(241, 245, 249); color: rgb(100, 116, 139); border-color: rgb(226, 232, 240); }
.cell-red { background: rgb(254, 242, 242); color: rgb(220, 38, 38); border-color: rgb(254, 226, 226); }
.td-idx { color: rgb(107, 114, 128); }

/* ============================================================
   复刻模力指数 — 趋势/竞品/模型图表区
   ============================================================ */
/* ===== 趋势分析 tab：线段式（无背景容器） ===== */
.trend-tab-bar { display: flex; align-items: center; gap: 20px; }
.trend-tab-line {
  position: relative; border: none; background: transparent;
  color: rgb(107, 114, 128); font-size: 13px; font-weight: 500;
  padding: 4px 0; cursor: pointer; transition: color 0.15s ease;
}
.trend-tab-line:hover { color: rgb(55, 65, 81); }
.trend-tab-line.on { color: rgb(17, 24, 39); font-weight: 600; }
.trend-tab-line.on::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; background: rgb(17, 24, 39); border-radius: 1px;
}
.chart-box { width: 100%; }

/* 趋势图 DOM tooltip（覆盖层）：兜底 ECharts 原生悬停在部分环境不触发的问题 */
.trend-chart-shell { position: relative; }
.trend-hover-layer {
  position: absolute; inset: 13px; /* 对齐 .chart-box 的 1px 边框 + 12px 内边距 */
  z-index: 2; cursor: default; background: transparent;
}
.trend-tip {
  position: absolute; z-index: 30; pointer-events: none;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  padding: 8px 10px; font-size: 12px; color: #374151; min-width: 150px;
}

/* 两列图 */
.grid-cols-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-bottom: 24px; }
@media (min-width: 1024px) {
  .grid.grid-cols-1.lg\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
}
.grid.grid-cols-1 { display: grid; grid-template-columns: 1fr; gap: 24px; margin-bottom: 24px; }
.mb-6 { margin-bottom: 24px; }
.p-6 { padding: 24px; }
.px-6 { padding-left: 24px; padding-right: 24px; }
.pt-6 { padding-top: 24px; }
.pb-4 { padding-bottom: 16px; }
.mb-4 { margin-bottom: 16px; }
.text-lg { font-size: 18px; line-height: 28px; }
.font-semibold { font-weight: 600; }
.text-gray-900 { color: rgb(17, 24, 39); }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-6 { gap: 24px; }

/* ============================================================
   复刻模力指数 — 工具类 + help icon + tooltip
   ============================================================ */
.gap-1 { gap: 4px; }
.w-4 { width: 16px; }
.h-4 { height: 16px; }
.h-6 { height: 24px; }
.h-7 { height: 28px; }
.px-2 { padding-left: 8px; padding-right: 8px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.p-0\.5 { padding: 2px; }
.rounded { border-radius: 4px; }
.rounded-md { border-radius: 6px; }
.rounded-lg { border-radius: 10px; }
.rounded-xl { border-radius: 12px; }
.text-xs { font-size: 12px; line-height: 16px; }
.text-sm { font-size: 14px; line-height: 20px; }
.font-medium { font-weight: 500; }
.bg-white { background: #fff; }
.bg-gray-100 { background: rgb(243, 244, 246); }
.text-gray-800 { color: rgb(31, 41, 55); }
.text-gray-500 { color: rgb(107, 114, 128); }
.text-gray-700 { color: rgb(55, 65, 81); }
.text-gray-400 { color: rgb(156, 163, 175); }
.text-indigo-500 { color: rgb(99, 102, 241); }
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.flex-shrink-0 { flex-shrink: 0; }
.transition-colors { transition: color .15s ease, background-color .15s ease; }
.hover\:text-gray-700:hover { color: rgb(55, 65, 81); }
.hover\:text-gray-600:hover { color: rgb(75, 85, 99); }

/* help icon + tooltip（模力指数） */
.tooltip-container { position: relative; display: inline-flex; align-items: center; }
.help-icon { cursor: help; }
.metric-help-icon { width: 14px; height: 14px; flex-shrink: 0; }
.metric-help-icon-indigo { color: rgb(129, 140, 248); }
.metric-help-icon-purple { color: rgb(192, 132, 252); }
.metric-help-icon-blue { color: rgb(96, 165, 250); }
.metric-help-icon-rose { color: rgb(251, 113, 133); }
.metric-help-icon-sky { color: rgb(56, 189, 248); }
.tooltip {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: #fff; color: rgb(17, 24, 39); padding: 12px; border-radius: 8px;
  font-size: 12px; line-height: 16.8px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border: 1px solid rgb(229, 231, 235); z-index: 99999; width: max-content; max-width: 280px;
  opacity: 0; visibility: hidden; transition: opacity .15s ease, visibility .15s ease;
  pointer-events: none; white-space: normal;
}
.tooltip-container:hover .tooltip { opacity: 1; visibility: visible; }
.tooltip-list { display: flex; flex-direction: column; gap: 2px; }
.tooltip-line { font-size: 12px; line-height: 16.8px; }
.tooltip-line strong { font-weight: 600; }

/* ============================================================
   复刻模力指数 — 问题下拉分组（核心词 + 问句）
   ============================================================ */
.cw-question-dropdown-menu { width: 320px; }
.dropdown-search { padding: 8px; border-bottom: 1px solid var(--border-light); }
.search-input-wrap { position: relative; display: flex; align-items: center; }
.search-icon {
  position: absolute; left: 10px; width: 14px; height: 14px; color: rgb(156, 163, 175); pointer-events: none;
}
.search-input-wrap input {
  width: 100%; padding: 6px 10px 6px 30px; font-size: 13px;
  border: 1px solid var(--border-input); border-radius: 6px; outline: none; color: rgb(17, 24, 39);
}
.search-input-wrap input:focus { border-color: rgb(79, 70, 229); }
.dropdown-list-scroll { max-height: 280px; overflow-y: auto; }
.dropdown-group-header {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  background: rgb(249, 250, 251); cursor: pointer; user-select: none;
  border-top: 1px solid var(--border-light);
}
.dropdown-group-header:hover { background: rgb(243, 244, 246); }
.dropdown-group-checkbox {
  width: 16px; height: 16px; border: 1px solid rgb(209, 213, 219); border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  background: #fff; color: #fff;
}
.dropdown-group-checkbox .check-on { width: 12px; height: 12px; color: rgb(79, 70, 229); }
.dropdown-group-name { font-size: 13px; font-weight: 600; color: rgb(17, 24, 39); }
.dropdown-group-count { font-size: 12px; color: rgb(156, 163, 175); }
.dropdown-group-collapse-icon { margin-left: auto; width: 12px; height: 12px; color: rgb(156, 163, 175); transition: transform 0.15s; }
.dropdown-group-collapse-icon svg { width: 12px; height: 12px; }
.dropdown-group-collapse-icon:not(.is-collapsed) { transform: rotate(180deg); }
.dropdown-question-option { padding: 6px 12px 6px 36px; }
.dropdown-option-inner { display: flex; align-items: center; gap: 8px; width: 100%; }
.dropdown-option-inner.align-start { align-items: flex-start; }
.dropdown-option-inner input[type="checkbox"] { width: 14px; height: 14px; accent-color: rgb(79, 70, 229); flex-shrink: 0; }
.dropdown-option > input[type="checkbox"] { width: 14px; height: 14px; accent-color: rgb(79, 70, 229); flex-shrink: 0; }
.dropdown-group-checkbox.checked { background: rgb(79, 70, 229); border-color: rgb(79, 70, 229); }
.dropdown-group-checkbox.checked .check-on { color: #fff; }
.dropdown-empty { padding: 16px; text-align: center; font-size: 13px; color: var(--muted); }

/* ============================================================
   复刻模力指数 — 日期下拉（点击任意位置弹出）
   ============================================================ */
.date-range-wrap { position: relative; flex: 1; min-width: 0; }
.date-range {
  display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0;
  border: 1px solid var(--border-input); border-radius: 8px; padding: 4px 8px;
  background: #fff; min-height: 32px; cursor: pointer; user-select: none;
}
.date-range:hover { border-color: rgb(79, 70, 229); }
.date-val { font-size: 11px; color: rgb(107, 114, 128); flex: 1; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.date-dropdown {
  position: absolute; top: 100%; left: 0; right: 0; margin-top: 4px;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12); z-index: 50; padding: 8px;
}
.date-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.date-quick-btn {
  border: 1px solid var(--border); background: #fff; color: rgb(55, 65, 81);
  font-size: 12px; padding: 4px 10px; border-radius: 6px; cursor: pointer;
}
.date-quick-btn:hover { background: rgb(238, 242, 255); color: rgb(67, 56, 202); border-color: rgb(199, 210, 254); }
.date-custom { display: flex; align-items: center; gap: 6px; }
.date-custom-input {
  flex: 1; min-width: 0; border: 1px solid var(--border-input); border-radius: 6px;
  padding: 4px 6px; font-size: 12px; color: rgb(17, 24, 39); outline: none;
}
.date-custom-input:focus { border-color: rgb(79, 70, 229); }

/* ===== 登录页（抄模力指数） ===== */
.login-page {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center;
  background: linear-gradient(135deg, rgb(245, 246, 250) 0%, rgb(237, 232, 248) 100%);
  overflow: hidden;
}
.login-bg-decor { position: absolute; inset: 0; pointer-events: none; }
.decor-circle {
  position: absolute; border-radius: 50%;
}
.decor-circle-1 { width: 384px; height: 384px; right: -10%; bottom: -10%; background: rgba(139, 92, 246, 0.10); }
.decor-circle-2 { width: 256px; height: 256px; right: -5%; top: 40%; background: rgba(59, 130, 246, 0.10); }
.decor-square { position: absolute; border-radius: 18px; }
.decor-square-1 { width: 128px; height: 128px; right: 10%; top: 15%; border: 2px solid rgba(54, 54, 226, 0.20); transform: translateY(-30px); animation: float-y-1 6s ease-in-out infinite; }
.decor-square-2 { width: 96px; height: 96px; left: 10%; bottom: 15%; border: 2px solid rgba(139, 92, 246, 0.20); transform: translateY(-20px); animation: float-y-2 5s ease-in-out infinite; }
.decor-square-3 { width: 96px; height: 96px; right: 5%; bottom: 35%; background: rgba(139, 92, 246, 0.10); animation: float-y 7s ease-in-out infinite; }
.decor-diamond {
  position: absolute; width: 64px; height: 64px; left: 5%; top: 45%;
  background: rgba(54, 54, 226, 0.10); transform: rotate(45deg);
  border-radius: 12px; animation: float-y 8s ease-in-out infinite;
}
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}
@keyframes float-y-1 {
  0%, 100% { transform: translateY(-30px); }
  50% { transform: translateY(-46px); }
}
@keyframes float-y-2 {
  0%, 100% { transform: translateY(-20px); }
  50% { transform: translateY(-36px); }
}

.login-brand {
  margin-top: 60px; display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
}
.brand-logo-img {
  height: 64px; width: auto; max-width: calc(100vw - 64px);
  object-fit: contain; display: block;
}

.login-card {
  margin-top: 48px; width: 448px; max-width: calc(100vw - 32px);
  background: #fff; border-radius: 16px;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.10), 0 8px 10px -6px rgba(0,0,0,0.10);
  padding: 32px; position: relative; z-index: 1;
}
.login-title { font-size: 22px; font-weight: 600; color: rgb(20, 22, 41); text-align: center; margin-bottom: 8px; }
.login-subtitle { font-size: 14px; color: rgb(100, 116, 139); text-align: center; margin-bottom: 24px; }

.login-form { display: flex; flex-direction: column; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 13px; font-weight: 500; color: rgb(55, 65, 81); }
.form-input {
  width: 100%; height: 48px; padding: 8px 12px;
  background: rgb(248, 250, 252); border: 1px solid rgb(226, 232, 240);
  border-radius: 12px; font-size: 14px; color: rgb(20, 22, 41);
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.form-input:focus {
  border-color: rgb(139, 92, 246);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}
.form-input:disabled { opacity: 0.6; cursor: not-allowed; }
.form-input.has-icon { padding-right: 40px; }
.form-input-wrap { position: relative; }
.eye-btn {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; color: rgb(148, 163, 184); cursor: pointer; padding: 0;
}
.eye-btn:hover { color: rgb(79, 70, 229); }
.eye-btn svg { width: 18px; height: 18px; }

.login-error {
  background: rgb(254, 242, 242); border: 1px solid rgb(252, 165, 165);
  color: rgb(185, 28, 28); padding: 8px 12px; border-radius: 8px;
  font-size: 13px; line-height: 18px;
}

.btn-login {
  width: 100%; height: 48px; margin-top: 8px;
  background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
  color: #fff; border: none; border-radius: 12px;
  font-size: 15px; font-weight: 500; cursor: pointer;
  transition: opacity 0.15s, transform 0.05s;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}
.btn-login:hover:not(:disabled) { opacity: 0.92; }
.btn-login:active:not(:disabled) { transform: scale(0.99); }
.btn-login:disabled { opacity: 0.6; cursor: not-allowed; }

/* ===== sidebar 底部退出登录 ===== */
.sidebar-foot {
  margin-top: auto;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-light);
  color: rgb(100, 116, 139); font-size: 13px;
  cursor: pointer; user-select: none;
  transition: background 0.15s, color 0.15s;
}
.sidebar-foot:hover { background: rgb(248, 250, 252); color: rgb(17, 24, 39); }
.logout-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
  color: #fff; font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.logout-text { font-weight: 500; }

/* ===== 分享弹窗 ===== */
.share-mask {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(15, 23, 42, 0.45);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(2px);
}
.share-panel {
  position: relative;
  width: 420px; max-width: calc(100vw - 32px);
  background: #fff; border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  padding: 28px 28px 24px;
  animation: share-pop 0.22s ease;
}
@keyframes share-pop {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.share-close { position: absolute; top: 14px; right: 14px; }
.share-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.share-icon {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
  color: #fff;
}
.share-title { font-size: 17px; font-weight: 600; color: rgb(17, 24, 39); }
.share-subtitle { font-size: 13px; color: rgb(107, 114, 128); margin-top: 2px; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-body { display: flex; flex-direction: column; gap: 16px; }
.share-link-row { display: flex; gap: 8px; }
.share-link-input {
  flex: 1; min-width: 0; height: 42px; padding: 8px 12px;
  background: rgb(248, 250, 252); border: 1px solid rgb(226, 232, 240);
  border-radius: 10px; font-size: 12px; color: rgb(55, 65, 81);
  outline: none;
}
.share-link-input:focus { border-color: rgb(139, 92, 246); }
.share-copy-btn {
  height: 42px; padding: 0 16px; flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgb(238, 242, 255); border: 1px solid rgb(199, 210, 254);
  color: rgb(67, 56, 202); border-radius: 10px;
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: all 0.15s;
}
.share-copy-btn:hover { background: rgb(224, 231, 255); }
.share-copy-btn.copied { background: rgb(209, 250, 229); border-color: rgb(167, 243, 208); color: rgb(6, 95, 70); }
.share-qr-row { display: flex; justify-content: center; }
.share-qr-box {
  padding: 12px; border: 1px solid rgb(229, 231, 235); border-radius: 12px;
  background: #fff; text-align: center;
}
.share-qr-box canvas { display: block; margin: 0 auto; }
.share-qr-tip { font-size: 12px; color: rgb(156, 163, 175); margin-top: 8px; }
.share-features {
  display: flex; flex-direction: column; gap: 8px;
  background: rgb(249, 250, 251); border-radius: 12px; padding: 12px 14px;
}
.share-feature { display: flex; align-items: center; gap: 8px; font-size: 13px; color: rgb(55, 65, 81); }
.share-check {
  width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  background: rgb(209, 250, 229); color: rgb(6, 95, 70);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.share-foot { margin-top: 20px; }
.share-done { height: 44px; font-size: 14px; }
.share-qr-canvas { display: flex; justify-content: center; align-items: center; min-height: 154px; }
.share-qr-canvas img, .share-qr-canvas canvas { display: block; }

/* ============================================================
   像素级复刻图一/图二：section-card 双层卡片 + Markdown + 行式来源
   ============================================================ */

/* 通用白色容器 */
.section-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 18px 20px 20px;
}
.section-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.section-card-head .sec-title {
  margin: 0;
  flex-shrink: 0;
}
.section-card-head-center {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 500;
  color: rgb(17, 24, 39);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.section-card-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* 按钮微调 */
.btn-icon-plain {
  background: transparent;
  border: none;
  color: rgb(107, 114, 128);
  font-size: 16px;
  padding: 4px 8px;
}
.btn-icon-plain:hover {
  background: rgb(243, 244, 246);
  color: rgb(55, 65, 81);
}

/* 答案浏览：问题标题 + 分页 */
.answer-section-head {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}
.answer-question-title {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  color: rgb(17, 24, 39);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.answer-pager {
  display: flex;
  align-items: center;
  gap: 4px;
}
.answer-pager .pager-text {
  font-size: 13px;
  color: rgb(107, 114, 128);
  min-width: 44px;
  text-align: center;
}
/* 标签行内的模型切换器：推到行尾，与外层答案浏览切换器同款样式 */
.answer-pager-inline { margin-left: auto; flex-shrink: 0; }

/* 答案内容区元信息 */
.answer-date {
  font-size: 12px;
  color: rgb(107, 114, 128);
  margin-right: 4px;
}
.tag-mode {
  background: rgb(243, 244, 246);
  color: rgb(75, 85, 99);
}

/* 答案正文 Markdown 渲染 */
.answer-body {
  font-size: 14px;
  line-height: 1.75;
  color: rgb(55, 65, 81);
}
.answer-body p { margin-bottom: 10px; }
.answer-body p:last-child { margin-bottom: 0; }
.answer-body h1, .answer-body h2, .answer-body h3, .answer-body h4 {
  font-weight: 600;
  color: rgb(17, 24, 39);
  margin: 16px 0 10px;
}
.answer-body h3 { font-size: 15px; }
.answer-body h4 { font-size: 14px; }
.answer-body ul, .answer-body ol {
  padding-left: 20px;
  margin-bottom: 10px;
}
.answer-body li { margin-bottom: 4px; }
.answer-body strong { color: rgb(17, 24, 39); font-weight: 600; }

/* 品牌高亮：蓝色下划线 */
.brand-highlight {
  color: rgb(37, 99, 235);
  text-decoration: underline;
  text-decoration-color: rgba(37, 99, 235, 0.6);
  text-underline-offset: 2px;
  cursor: default;
}

/* Markdown 表格（图一效果） */
.answer-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 12px 0;
  border: 1px solid rgb(229, 231, 235);
  border-radius: 8px;
  overflow: hidden;
}
.answer-body thead {
  background: rgb(249, 250, 251);
}
.answer-body th, .answer-body td {
  padding: 10px 12px;
  border-bottom: 1px solid rgb(229, 231, 235);
  text-align: left;
  vertical-align: top;
}
.answer-body th {
  font-weight: 600;
  color: rgb(17, 24, 39);
}
.answer-body td {
  color: rgb(55, 65, 81);
}
.answer-body tbody tr:last-child td {
  border-bottom: none;
}
.answer-body tbody tr:hover td {
  background: rgb(249, 250, 251);
}

/* 「品牌未出现」红色角标 */
.brand-missing-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 500;
  color: rgb(190, 18, 60);
  background: rgb(255, 241, 242);
  border: 1px solid rgb(254, 205, 211);
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 6px;
  white-space: nowrap;
}

/* 答案底部排名汇总条（图二效果：绿★ + 蓝 company #N） */
.answer-rank-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}
.rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
}
.rank-star {
  color: rgb(245, 158, 11);
  font-size: 13px;
  line-height: 1;
}
.rank-badge-green {
  background: rgb(240, 253, 244);
  color: rgb(22, 101, 52);
  border: 1px solid rgb(187, 247, 208);
}
.rank-badge-blue {
  background: rgb(238, 242, 255);
  color: rgb(67, 56, 202);
  border: 1px solid rgb(199, 210, 254);
}
.rank-badge-none {
  background: rgb(243, 244, 246);
  color: rgb(107, 114, 128);
  border: 1px solid rgb(229, 231, 235);
}
.rank-badge-teal {
  background: rgb(236, 253, 245);
  color: rgb(6, 95, 70);
  border: 1px solid rgb(167, 243, 208);
}

/* 行式引用来源（图一） */
.source-body {
  padding: 12px 16px;
}
.source-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
}
.source-row:last-child {
  margin-bottom: 0;
}
.source-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.source-row-title {
  font-size: 13px;
  font-weight: 600;
  color: rgb(30, 58, 138);
  text-decoration: none;
  line-height: 1.5;
  word-break: break-all;
}
.source-row-title:hover {
  text-decoration: underline;
}
.source-row-url {
  font-size: 11px;
  color: rgb(156, 163, 175);
  text-decoration: none;
  word-break: break-all;
  line-height: 1.4;
}
.source-row-url:hover {
  color: rgb(37, 99, 235);
}
.source-row-badge {
  flex-shrink: 0;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
  color: rgb(55, 65, 81);
  background: rgb(243, 244, 246);
  padding: 3px 8px;
  border-radius: 6px;
}

/* 引用分析：圆角 pill 占比 + 色调调整 */
.cite-layout {
  gap: 16px;
}
.cite-panel {
  border: 1px solid var(--border);
  box-shadow: none;
}
.cite-panel-head {
  padding: 12px 16px;
}
.cite-scroll {
  padding: 0 16px 12px;
}
.cite-table th {
  color: var(--fg);
  font-weight: 600;
  padding: 10px 8px;
}
.cite-table td {
  padding: 4px 8px;
  color: rgb(55, 65, 81);
  border-bottom: none;
}
.cite-bullet {
  color: rgb(37, 99, 235);
  font-size: 9px;
  margin-right: 8px;
}
.cite-link {
  color: rgb(37, 99, 235);
}
.cite-link:hover {
  color: rgb(29, 78, 216);
}
.pct-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 3px 10px;
  background: rgb(243, 244, 246);
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  color: rgb(31, 41, 55);
  font-variant-numeric: tabular-nums;
}
.td-num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: rgb(31, 41, 55);
}

/* 答案浏览区块高度调整 */
.answer-section-card .answer-browser {
  height: 420px;
  max-height: 420px;
}
.answer-section-card .answer-col-head {
  background: #fff;
}

/* 响应式 */
@media (max-width: 900px) {
  .section-card { padding: 14px; }
  .section-card-head { flex-wrap: wrap; }
  .section-card-head-center,
  .answer-question-title { width: 100%; text-align: left; order: 3; }
  .answer-section-card .answer-browser { height: auto; grid-template-columns: 1fr; }
}

/* ===== 旗舰版看板视图切换（分析/表格） ===== */
.view-switch { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-right: 4px; }
.view-switch-btn {
  padding: 8px 16px; font-size: 14px; color: var(--muted); background: #fff; border: none; cursor: pointer;
  transition: all .15s; border-right: 1px solid var(--border);
}
.view-switch-btn:last-child { border-right: none; }
.view-switch-btn:hover { color: var(--fg); background: rgb(248,250,252); }
.view-switch-btn.on { background: rgb(124,58,237); color: #fff; font-weight: 500; }

/* ===== 表格视图（像素级复刻模力指数） ===== */
/* 表格视图整体容器 */
.table-view-wrap { display: flex; flex-direction: column; gap: 0; }
/* 顶部 tab 栏(卡头)：左=统计信息固定黑粗标题；右=紫色切换 */
.table-view-tabs {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #fff; border: 1px solid rgb(229,231,235);
  border-radius: 12px 12px 0 0; padding: 10px 14px;
}
.table-view-title { font-size: 15px; font-weight: 700; color: rgb(17,24,39); cursor: default; }
/* 右侧紫色切换（复用分析/表格视图切换风格） */
.tv-switch { display: flex; align-items: center; border: 1px solid rgb(229,231,235); border-radius: 8px; overflow: hidden; }
.tv-switch-btn {
  height: 28px; padding: 0 14px; font-size: 12px; color: rgb(107,114,128); background: #fff;
  border: none; cursor: pointer; transition: all .15s; border-right: 1px solid rgb(229,231,235);
}
.tv-switch-btn:last-child { border-right: none; }
.tv-switch-btn:hover { color: var(--fg); background: rgb(248,250,252); }
.tv-switch-btn.on { background: rgb(124,58,237); color: #fff; font-weight: 500; }

/* 表格列颜色：Top 用橙色（表头更深），正面/负面用绿色（表头更深） */
.th-orange { color: rgb(194,65,12) !important; font-weight: 700; }
.td-num.td-orange, td.td-orange { color: rgb(249,115,22) !important; }
/* 标准版 Top 用紫色（对应分析/表格视图切换紫 rgb(124,58,237)，表头略深） */
.th-violet { color: rgb(109,40,217) !important; font-weight: 700; }
.td-num.td-violet, td.td-violet { color: rgb(124,58,237) !important; }
.th-green { color: rgb(21,128,61) !important; font-weight: 700; }
.td-num.td-green, td.td-green { color: rgb(34,197,94) !important; }
/* 负面用红色（表头更深） */
.th-red { color: rgb(153,27,27) !important; font-weight: 700; }
.td-num.td-red, td.td-red { color: rgb(239,68,68) !important; }
/* 除首列外居中对齐（center-cell-table 内） */
.center-cell-table .th-center, .center-cell-table .td-center { text-align: center !important; }
.center-cell-table .th-left, .center-cell-table .cell-main.th-left { text-align: left; }
/* 内容引用明细标题超链接 */
.cite-title-link { color: rgb(37,99,235); text-decoration: none; }
.cite-title-link:hover { text-decoration: underline; }
.cite-title-cell { max-width: 420px; }

/* 白色卡片容器（对应参考页 stats-module-shell 内卡片） */
.tv-card {
  background: #fff; border: 1px solid rgb(229,231,235); border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05); padding: 16px;
}
.tv-card-col { display: flex; flex-direction: column; gap: 16px; }

/* 统计信息/信源统计：左右分栏（媒体排行 320px | 内容明细 1fr） */
.reference-layout { display: grid; grid-template-columns: 320px 1fr; gap: 16px; }
.reference-panel { display: flex; flex-direction: column; min-width: 0; min-height: 0; border: 1px solid rgb(229,231,235); border-radius: 8px; background: #fff; overflow: hidden; }
.reference-panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 14px; border-bottom: 1px solid rgb(243,244,246); background: rgb(249,250,251);
}
.reference-panel-title { font-size: 14px; font-weight: 600; color: rgb(17,24,39); margin: 0; }
.reference-panel-meta { font-size: 12px; color: rgb(107,114,128); white-space: nowrap; }
.reference-panel-body { padding: 8px 10px; overflow-y: auto; max-height: 520px; }

/* 媒体排行行（列表式） */
.media-row { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 6px; }
.media-row:hover { background: rgb(249,250,251); }
/* 媒体引用排行表头分隔线：与「内容引用明细」表头一致（下边框 + 底部留白） */
.media-row.media-head {
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding-bottom: 8px;
  margin-bottom: 4px;
}
.media-row.media-head:hover { background: transparent; }
.media-rank { width: 20px; font-size: 12px; color: rgb(156,163,175); text-align: right; flex-shrink: 0; }
.media-name { flex: 1; min-width: 0; font-size: 13px; color: rgb(31,41,55); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-num { font-size: 12px; color: rgb(107,114,128); font-family: monospace; flex-shrink: 0; }
.media-pct { font-size: 12px; color: rgb(107,114,128); font-family: monospace; width: 52px; text-align: right; flex-shrink: 0; }
.tv-card .reference-panel-body { max-height: 360px; }

/* 内容引用明细表格滚动 */
.table-scroll { overflow-x: auto; }
.tv-card .table-scroll table th { font-size: 14px; color: var(--fg); font-weight: 500; }

/* 模型/竞品统计：模块内上下两块 */
.tv-inner { border: 1px solid rgb(229,231,235); border-radius: 8px; overflow: hidden; background: #fff; }
.tv-inner-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid rgb(243,244,246); background: rgb(249,250,251); }
.sticky-head { position: sticky; top: 0; z-index: 5; }
.tv-inner .table-scroll { max-height: 420px; overflow: auto; }
.tv-inner table th { position: sticky; top: 0; background: #fff; z-index: 4; }

/* 监控问题明细单元格 */
.question-cell { max-width: 420px; }
.q-model-tag { display: inline-block; font-size: 11px; color: rgb(79,70,229); background: rgb(238,242,255); border-radius: 4px; padding: 1px 6px; margin-bottom: 4px; }
.q-text { font-size: 13px; color: rgb(17,24,39); font-weight: 500; line-height: 1.45; }
.q-meta { font-size: 11px; color: rgb(156,163,175); margin-top: 2px; }
.answer-cell { font-size: 12px; color: rgb(75,85,99); line-height: 1.5; white-space: pre-wrap; min-width: 300px; max-width: 560px; }

/* 视图切换按钮组（置于最右侧） */
.view-switch-btn-group { display: flex; align-items: center; }
.page-head .head-title-wrap { display: flex; align-items: center; height: 36px; }
.page-head .head-actions { margin-left: 8px; }
.page-head .head-actions.view-switch-btn-group { margin-left: auto; }

/* 卡体：与 tab 栏同卡（去掉上圆角/顶部边框，由 tab 栏的 border-b 分隔） */
.tv-card-body {
  background: #fff; border: 1px solid rgb(229,231,235); border-top: none;
  border-radius: 0 0 12px 12px; padding: 14px;
}
.tv-card-body .tv-inner { border: 1px solid rgb(229,231,235); border-radius: 8px; overflow: hidden; }
.tv-card-body > .tv-inner:not(:last-child) { margin-bottom: 0; }

/* ===== 监控问题分页 + 快照凭证 ===== */
.q-pager { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.q-pager .q-page-size { height: 26px; border: 1px solid var(--border); border-radius: 6px; font-size: 12px; padding: 0 4px; color: var(--fg); background: #fff; }
.q-pager .btn-mini { font-size: 12px; padding: 3px 9px; }
.q-pager .word-pager-num { min-width: 26px; text-align: center; }
.q-pager .word-pager-num.word-pager-active { background: rgb(124,58,237); color: #fff; border-color: rgb(124,58,237); font-weight: 600; }
.q-pager .btn-mini:disabled { opacity: .45; cursor: not-allowed; }

.q-table .q-model-tag { margin-right: 6px; }
.snapshot-badge {
  display: inline-block; margin-left: 6px; padding: 0 6px; font-size: 11px; line-height: 1.6;
  color: rgb(37,99,235); background: rgb(239,246,255); border: 1px solid rgb(191,219,254); border-radius: 4px;
  font-weight: 500; vertical-align: middle;
}
.snapshot-link {
  padding: 1px 8px; font-size: 11px; color: rgb(37,99,235); background: rgb(239,246,255);
  border: 1px solid rgb(191,219,254); border-radius: 4px; cursor: pointer; transition: all .15s;
}
.snapshot-link:hover { background: rgb(219,234,254); }

/* 快照凭证弹窗 */
.snapshot-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 200; display: flex; align-items: center; justify-content: center; }
.snapshot-panel {
  background: #fff; border-radius: 14px; width: min(860px, 92vw); max-height: 88vh; display: flex; flex-direction: column;
  box-shadow: 0 20px 50px rgba(0,0,0,.25); overflow: hidden;
}
.snapshot-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.snapshot-head h3 { font-size: 16px; font-weight: 600; margin: 0; }
.snapshot-meta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; padding: 12px 20px; background: rgb(249,250,251); border-bottom: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.snapshot-body { padding: 18px 20px; overflow-y: auto; }
.snapshot-section-title { font-size: 12px; font-weight: 600; color: rgb(107,114,128); margin: 14px 0 8px; }
.snapshot-section-title:first-child { margin-top: 0; }
.snapshot-answer { font-size: 14px; line-height: 1.8; color: var(--fg); white-space: pre-wrap; }
.snap-cite { color: rgb(124,58,237); font-weight: 600; }
.snapshot-sources { margin: 0; padding-left: 20px; font-size: 13px; }
.snapshot-sources li { margin-bottom: 6px; }
.snapshot-sources a { color: rgb(37,99,235); text-decoration: none; }
.snapshot-sources a:hover { text-decoration: underline; }
.snapshot-site { color: var(--muted); font-size: 12px; }
.snapshot-mentioned { font-size: 13px; color: rgb(5,150,105); }

/* AI收录明细：完全展示（无内部滚动），分页在底部 */
.q-table-scroll { overflow-x: auto; }
.q-table-scroll table { width: 100%; border-collapse: collapse; }
.q-pager-bottom { padding: 12px 14px; border-top: 1px solid rgb(243,244,246); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.q-pager-bottom .q-page-size { height: 26px; border: 1px solid var(--border); border-radius: 6px; font-size: 12px; padding: 0 4px; color: var(--fg); background: #fff; }
.q-pager-bottom .btn-mini { font-size: 12px; padding: 3px 9px; }
.q-pager-bottom .word-pager-num { min-width: 26px; text-align: center; }
.q-pager-bottom .word-pager-num.word-pager-active { background: rgb(124,58,237); color: #fff; border-color: rgb(124,58,237); font-weight: 600; }
.q-pager-bottom .btn-mini:disabled { opacity: .45; cursor: not-allowed; }

/* 信源统计：媒体引用排行与内容明细等高（360px）滚动，避免左栏限高导致下方留白 */
.tv-card .reference-panel-body.media-limit { max-height: 360px; overflow-y: auto; }

/* ===== 添加自定义模型弹窗 ===== */
.custom-model-panel { max-width: 560px; }
.custom-model-sub { margin-left: 8px; font-size: 12px; font-weight: 400; color: var(--muted); }
.key-input-wrap { position: relative; display: flex; align-items: center; }
.key-input-wrap .input { padding-right: 40px; }
.eye-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  background: none; border: none; color: var(--muted); cursor: pointer; border-radius: 6px;
}
.eye-toggle:hover { color: var(--fg); background: rgb(243,244,246); }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px 12px; }
.feature-check { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--fg); cursor: pointer; }
.feature-check input { width: 15px; height: 15px; accent-color: rgb(124,58,237); }
.think-tip { margin: 2px 0 14px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px; border-top: 1px solid rgb(243,244,246); }
.btn-ghost { padding: 8px 20px; font-size: 13px; border: 1px solid rgb(209,213,219); border-radius: 8px; background: #fff; color: var(--fg); cursor: pointer; transition: all .15s; }
.btn-ghost:hover { background: rgb(248,250,252); }
.btn-save { padding: 8px 24px; font-size: 13px; border: none; border-radius: 8px; background: rgb(17,24,39); color: #fff; cursor: pointer; transition: opacity .15s; font-weight: 500; }
.btn-save:hover { opacity: .88; }
.btn-mini.danger { color: rgb(220,38,38); border-color: rgb(252,165,165); }
.btn-mini.danger:hover { background: rgb(254,226,226); }

/* ============================================================
   采集任务（跨端全局可见）：进度条 / 暂停继续停止 / 批量 / 定时徽标 / 模型告警
   ============================================================ */
/* 项目卡左上角批量多选框 */
.batch-check {
  width: 16px; height: 16px; accent-color: rgb(124,58,237);
  flex-shrink: 0; cursor: pointer;
}
/* 每日定时徽标 */
.schedule-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 500; color: rgb(180, 83, 9);
  background: rgb(254, 243, 199); border: 1px solid rgb(253, 230, 138);
  border-radius: 20px; padding: 2px 10px; white-space: nowrap;
}
/* 批量执行按钮有勾选时高亮 */
.btn-batch-ready {
  background: rgb(124,58,237); border-color: rgb(124,58,237); color: #fff; font-weight: 500;
}
.btn-batch-ready:hover { background: rgb(109,40,217); }
/* 项目卡「立即执行」按钮 */
.btn-run { background: rgb(238,242,255); border-color: rgb(199,210,254); color: rgb(67,56,202); font-weight: 500; }
.btn-run:hover { background: rgb(224,231,255); }

/* 模型 API 失效告警（项目卡：横向小标签） */
.model-warns { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.model-warn {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 500; color: rgb(190, 18, 60);
  background: rgb(255, 241, 242); border: 1px solid rgb(254, 205, 211);
  border-radius: 6px; padding: 3px 10px; cursor: pointer; white-space: nowrap;
}
.model-warn:hover { background: rgb(254, 226, 226); }
/* 看板顶部告警条 */
.model-warn-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  background: rgb(255, 241, 242); border: 1px solid rgb(254, 205, 211);
  border-radius: 10px; padding: 10px 14px; margin-bottom: 16px;
}

/* 进行中任务（项目卡内嵌） */
.card-job {
  background: rgb(248, 250, 252); border: 1px solid var(--border-light);
  border-radius: 10px; padding: 8px 12px; margin: 4px 0 12px;
}
.card-job.job-paused { background: rgb(255, 251, 235); border-color: rgb(253, 230, 138); }
.job-line { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.job-status-icon {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.job-status-icon::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: currentColor;
}
.job-status-icon.pending { color: rgb(107, 114, 128); }
.job-status-icon.running { color: rgb(79, 70, 229); }
.job-status-icon.running::before { animation: job-pulse 1.2s ease-in-out infinite; }
.job-status-icon.paused { color: rgb(217, 119, 6); }
.job-status-icon.done { color: rgb(5, 150, 105); }
.job-status-icon.cancelled { color: rgb(107, 114, 128); }
.job-status-icon.error { color: rgb(220, 38, 38); }
@keyframes job-pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.job-num { font-size: 13px; font-weight: 700; color: rgb(17, 24, 39); font-variant-numeric: tabular-nums; white-space: nowrap; }
.job-current {
  flex: 1; min-width: 0; font-size: 12px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.job-actions { display: flex; gap: 6px; flex-shrink: 0; }
.job-btn { font-size: 12px; padding: 3px 9px; }
/* 进度条 */
.progress { height: 6px; border-radius: 3px; background: rgb(229, 231, 235); overflow: hidden; }
.progress.grow { flex: 1; min-width: 120px; }
.progress-bar {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, rgb(139,92,246), rgb(59,130,246));
  transition: width .4s ease;
}
/* 看板顶部任务进度条 */
.dash-job-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: rgb(248, 250, 252); border: 1px solid var(--border-light);
  border-radius: 10px; padding: 10px 14px; margin-bottom: 16px;
}
.dash-job-bar.job-paused { background: rgb(255, 251, 235); border-color: rgb(253, 230, 138); }

/* ===== 每日定时表单 ===== */
.tab-switch { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.tab-btn {
  padding: 5px 14px; font-size: 12px; color: var(--muted); background: #fff;
  border: none; cursor: pointer; transition: all .15s; border-right: 1px solid var(--border);
}
.tab-btn:last-child { border-right: none; }
.tab-btn:hover { color: var(--fg); background: rgb(248,250,252); }
.tab-btn.on { background: rgb(124,58,237); color: #fff; font-weight: 500; }
.freq-sep { color: rgb(209, 213, 219); font-size: 13px; }
.opt-disabled { opacity: .55; cursor: not-allowed; }
.time-input { width: 130px; }
.freq-tip { margin-top: 8px; font-size: 12px; color: rgb(79, 70, 229); line-height: 1.6; }
.freq-tip b { font-weight: 600; }
.freq-tip-muted { color: var(--muted); }

/* ===== 执行采集弹窗 / 批量执行弹窗 ===== */
.run-panel { max-width: 520px; }
.run-body { padding: 18px 24px; }
.run-tip { margin: 0 0 8px; font-size: 13px; color: rgb(55, 65, 81); }
.run-tip-list { margin: 0 0 14px; padding-left: 18px; }
.run-tip-list li { font-size: 12px; color: var(--muted); line-height: 1.8; }
.run-model-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.run-model-list .model-item { justify-content: flex-start; padding: 8px 12px; }
.run-empty-tip { margin-top: 12px; font-size: 12px; color: var(--muted); }
.run-warn { margin-top: 12px; font-size: 12px; color: rgb(180, 83, 9); background: rgb(254, 243, 199); border-radius: 6px; padding: 6px 10px; }
.run-count { font-size: 12px; color: var(--muted); align-self: center; }


/* ===== 调用记录页 ===== */
.calls-filter { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.calls-filter .input { max-width: 180px; }
.calls-summary { font-size: 13px; color: rgb(107,114,128); margin-right: 6px; }
.calls-pager { display: flex; gap: 12px; align-items: center; margin-top: 12px; font-size: 13px; color: rgb(107,114,128); }
.calls-detail { margin-top: 16px; padding: 14px 16px; background: rgb(249,250,251); border: 1px solid var(--border); border-radius: 10px; font-size: 13px; color: rgb(55,65,81); line-height: 1.8; }
.calls-detail h3 { margin: 0 0 6px; font-size: 14px; color: rgb(17,24,39); }
.cell-q { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-sub { color: rgb(156,163,175); font-size: 12px; }
.cell-mono { font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.row-clicked td { background: rgb(238, 242, 255) !important; }
.badge-success { background: rgb(240,253,244); color: rgb(22,101,52); }
.badge-failed { background: rgb(254,242,242); color: rgb(185,28,28); }
.badge-pending { background: rgb(255,247,237); color: rgb(154,52,18); }
.badge-skipped { background: rgb(243,244,246); color: rgb(107,114,128); }


/* 调用记录：横向滚动 + 表格最小宽（避免右列被裁切）+ 分页弹性间隔 */
.calls-table-wrap { overflow-x: auto; }
.calls-table-wrap .data-table { min-width: 1180px; }
.calls-pager-spacer { flex: 1; }


/* ===== 侧边栏收缩 ===== */
.sidebar-top { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 16px; }
.sidebar-toggle { background: none; border: none; cursor: pointer; color: var(--muted); padding: 6px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }
.sidebar-toggle:hover { background: rgb(243, 244, 246); color: var(--fg); }
.nav-mark { display: none; }
.sidebar nav a { display: flex; align-items: center; gap: 8px; }
.sidebar.collapsed { width: 58px; padding: 16px 8px; }
.sidebar.collapsed .logo { display: none; }
.sidebar.collapsed .sidebar-top { justify-content: center; padding: 0 0 16px; }
.sidebar.collapsed nav { width: 100%; }
.sidebar.collapsed nav a { justify-content: center; padding: 10px 0; }
.sidebar.collapsed .nav-mark { display: inline-block; font-size: 15px; }
.sidebar.collapsed .nav-text { display: none; }
.sidebar.collapsed .sidebar-foot { justify-content: center; }
.sidebar.collapsed .logout-text { display: none; }

/* ===== 调用记录日期筛选 ===== */
.calls-date-sep { color: rgb(107, 114, 128); font-size: 13px; }

/* ===== 登录记住密码 ===== */
.remember-row { margin: 2px 0 12px; display: flex; }
.remember-label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: rgb(107, 114, 128); cursor: pointer; user-select: none; }
.remember-label input { cursor: pointer; }


/* ===== 发稿统计页 ===== */
.art-bars { display: flex; flex-direction: column; gap: 8px; }
/* 后台发稿统计：分布图最多显示约 10 条，超出滚动 */
.art-bars.art-bars-limit { max-height: 372px; overflow-y: auto; }
.art-bar-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: rgb(55,65,81); padding: 3px 12px; }
.art-bar-label { width: 96px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.art-bar-track { flex: 1; background: rgb(243,244,246); border-radius: 6px; height: 14px; overflow: hidden; }
.art-bar-fill { height: 100%; background: linear-gradient(90deg, rgb(99,102,241), rgb(139,92,246)); border-radius: 6px; min-width: 2px; }
.art-bar-num { width: 32px; text-align: right; font-variant-numeric: tabular-nums; color: rgb(107,114,128); }
.art-collect-badge { background: rgb(240,253,244); color: rgb(22,101,52); font-size: 12px; padding: 2px 8px; border-radius: 12px; font-weight: 500; }
.art-import-tip { font-size: 12px; color: rgb(107,114,128); margin-bottom: 10px; line-height: 1.6; }
.art-import-status { margin-top: 10px; padding: 10px 12px; border-radius: 8px; font-size: 13px; line-height: 1.6; }
.art-import-status.ok { background: rgb(240,253,244); color: rgb(22,101,52); }
.art-import-status.bad { background: rgb(254,242,242); color: rgb(185,28,28); }
.art-fail-list { margin: 6px 0 0 18px; padding: 0; }

/* ===== 统计版发稿视图：大气面板（借鉴 reference-panel 骨架，客户报告风） ===== */
.stat-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16,24,40,0.04);
  overflow: hidden;
}
.stat-panel-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 8px;
  padding: 20px 24px 12px;
}
.stat-panel-head h3 {
  font-size: 16px; font-weight: 600; color: rgb(17,24,39); margin: 0; line-height: 1.45;
}
.stat-panel-meta { font-size: 13px; color: rgb(107,114,128); white-space: nowrap; padding-bottom: 2px; }
.stat-panel-body { padding: 4px 14px 20px; }
.stat-panel .data-table th {
  background: #fff; font-size: 14px; font-weight: 500; color: var(--fg);
  padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.stat-panel .data-table td {
  font-size: 14px; color: rgb(75,85,99); padding: 14px; border-bottom: 1px solid var(--border-light);
}
.stat-panel .data-table tr:last-child td { border-bottom: none; }
.stat-panel .data-table tbody tr:hover td { background: rgb(250,250,252); }
/* 序号列 */
.stat-panel th.th-idx, .stat-panel td.idx-cell {
  width: 44px; text-align: center; font-variant-numeric: tabular-nums;
}
.stat-panel td.idx-cell { color: rgb(156,163,175); font-size: 13px; }
/* 表格内链接 / 数字列补充定位 */
.stat-panel .idx-cell + td { padding-left: 4px; }
/* 发稿明细分页条 */
.stat-pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 18px; }
.stat-pager button {
  border: 1px solid var(--border); background: #fff; color: rgb(55,65,81);
  font-size: 13px; line-height: 1; padding: 9px 18px; border-radius: 8px; cursor: pointer;
  transition: all .15s;
}
.stat-pager button:hover:not(:disabled) { border-color: rgb(167,139,250); color: rgb(79,70,229); background: rgb(250,250,255); }
.stat-pager button:disabled { opacity: .45; cursor: not-allowed; }
.stat-pager-info { font-size: 13px; color: rgb(107,114,128); display: inline-flex; align-items: center; gap: 6px; }
.stat-pager-input {
  width: 52px; text-align: center; border: 1px solid var(--border-input); border-radius: 8px;
  padding: 5px 4px; font-size: 13px; color: rgb(55,65,81); outline: none; background: #fff;
}
.stat-pager-input:focus { border-color: rgb(139,92,246); }
/* 空状态单元格（发稿统计视图用） */
.stat-panel .empty-td { text-align: center; color: rgb(156,163,175); padding: 28px 14px; font-size: 13px; }

/* 看板发稿明细：固定列宽（标题列自适应但不过宽），标题溢出省略 */
.art-detail-table { table-layout: fixed; }
.art-detail-table th, .art-detail-table td { overflow: hidden; }
.art-detail-table .th-idx, .art-detail-table td.idx-cell { width: 56px; }
.art-detail-table .th-media-type, .art-detail-table td:nth-child(3) { width: 110px; }
.art-detail-table .th-media-col, .art-detail-table td:nth-child(4) { width: 170px; }
.art-detail-table .th-date-col, .art-detail-table td:nth-child(5) { width: 130px; }
.art-detail-table .art-title-cell { padding-right: 10px; }
.art-detail-table .art-title-cell a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 渠道名称设置：自动发现候选列表 */
.chan-auto-list { display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; margin-bottom: 8px; }
.chan-auto-item { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 1px solid var(--border-light); border-radius: 8px; }
.chan-auto-domain { font-size: 14px; font-weight: 600; color: var(--fg); }
.chan-auto-meta { font-size: 12px; }
.chan-matched-badge { font-size: 12px; color: rgb(22,101,52); background: rgb(220,252,231); border: 1px solid rgb(187,247,208); border-radius: 4px; padding: 2px 8px; white-space: nowrap; }

/* 批量编辑：未勾选字段的禁用态 */
.muted { opacity: 0.45; }


/* 发稿统计-客户版 曲线图（参考趋势分析的 DOM 悬停弹窗） */
.dash-art-chart-shell { position: relative; }
.dash-art-hover-layer { position: absolute; inset: 13px; z-index: 2; cursor: default; background: transparent; }
.dash-art-tip { position: absolute; z-index: 30; pointer-events: none; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.12); padding: 8px 10px; font-size: 12px; color: #374151; min-width: 150px; }


/* ============================================================
   统计分页器（发稿记录/收录排名/发稿明细通用：每页条数+页码圆点）
   ============================================================ */
.sp-pager { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.sp-size { font-size: 13px; color: rgb(107,114,128); display: inline-flex; align-items: center; gap: 6px; margin-right: 6px; }
.sp-size select {
  height: 28px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 13px; padding: 0 4px; color: var(--fg); background: #fff; cursor: pointer;
}
.sp-btn {
  background: #fff; border: 1px solid var(--border); border-radius: 9999px;
  padding: 5px 14px; font-size: 13px; color: rgb(75,85,99); cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.sp-btn:hover:not(:disabled) { background: rgb(249,250,251); color: rgb(79,70,229); }
.sp-btn:disabled { opacity: .45; cursor: not-allowed; }
.sp-num {
  min-width: 30px; height: 30px; border: 1px solid var(--border); border-radius: 50%;
  background: #fff; font-size: 13px; color: rgb(75,85,99); cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.sp-num:hover { background: rgb(243,244,246); }
.sp-num.on { background: rgb(124,58,237); border-color: rgb(124,58,237); color: #fff; font-weight: 600; }
.sp-dots { color: rgb(156,163,175); font-size: 13px; padding: 0 2px; }
.sp-total { font-size: 13px; color: rgb(107,114,128); margin-left: 6px; }

/* 启动骨架屏（Vue 挂载前显示，挂载后随 #app 内容替换消失） */
.boot-loading {
  position: fixed; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
  background: rgb(249, 250, 251); z-index: 9999;
}
.boot-logo { font-size: 22px; font-weight: 700; color: rgb(124,58,237); letter-spacing: 1px; }
.boot-spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgb(229,231,235); border-top-color: rgb(124,58,237);
  animation: boot-spin .8s linear infinite;
}
.boot-text { font-size: 13px; color: rgb(107,114,128); }
@keyframes boot-spin { to { transform: rotate(360deg); } }


/* 设置页：情感词/渠道名称 左右两列布局 */
.senti-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.chan-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; }
.chan-grid textarea { width: 100%; }
.chan-grid .chan-auto-list { max-height: 330px; }

/* 统计分页器：板块底部居中 */
.sp-pager { justify-content: center; }


/* 渠道名称：结构化映射表格 */
.chan-table { display: flex; flex-direction: column; gap: 8px; }
.chan-row { display: grid; grid-template-columns: 1fr 1.2fr 1.4fr 70px 70px; gap: 8px; align-items: center; }
.chan-row input { min-width: 0; }
.chan-row-head { font-size: 12px; color: rgb(156,163,175); font-weight: 500; padding: 0 2px; }
.chan-src { font-size: 12px; color: rgb(79,70,229); background: rgb(238,242,255); border-radius: 4px; padding: 2px 6px; text-align: center; }
.chan-src.auto { color: rgb(180,83,9); background: rgb(254,243,199); }


/* 模型 logo（API 设置上传/模型统计/添加项目模型选择） */
.model-logo-box {
  width: 44px; height: 44px; flex-shrink: 0; border: 1px dashed var(--border);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; overflow: hidden; background: #fff; position: relative;
}
.model-logo-box:hover { border-color: rgb(124,58,237); }
.model-logo-box img { width: 100%; height: 100%; object-fit: contain; }
.model-logo-add { font-size: 11px; color: rgb(156,163,175); text-align: center; line-height: 1.2; }
.model-logo-img { width: 22px; height: 22px; object-fit: contain; vertical-align: middle; margin-right: 6px; border-radius: 4px; }
