/* 彼亿 GEO 监测 · Tech Console
   深色科技风：高对比、清晰层级；侧栏/按钮禁止白底白字 */
:root {
  --bg: #070b12;
  --bg-elev: #0c121c;
  --panel: #101826;
  --panel-2: #141e2e;
  --line: rgba(148, 183, 210, 0.14);
  --line-strong: rgba(148, 183, 210, 0.28);
  --text: #e8eef6;
  --text-dim: rgba(232, 238, 246, 0.68);
  --text-faint: rgba(232, 238, 246, 0.42);
  --cyan: #22d3ee;
  --cyan-deep: #0891b2;
  --teal: #2dd4bf;
  --amber: #fbbf24;
  --danger: #fb7185;
  /* 兼容旧变量名 */
  --signal: var(--cyan);
  --signal-deep: var(--cyan-deep);
  --gold: var(--amber);
  --ok-bg: rgba(34, 211, 238, 0.1);
  --warn-bg: rgba(251, 191, 36, 0.1);
  --danger-bg: rgba(251, 113, 133, 0.12);
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --latin: "JetBrains Mono", "Outfit", ui-monospace, monospace;
  --display: "Outfit", var(--font);
  --radius: 10px;
  --radius-sm: 8px;
  --shadow: 0 0 0 1px rgba(34, 211, 238, 0.04), 0 18px 40px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse 55% 40% at 85% -5%, rgba(34, 211, 238, 0.14), transparent 55%),
    radial-gradient(ellipse 40% 35% at 0% 100%, rgba(45, 212, 191, 0.08), transparent 50%),
    linear-gradient(180deg, #070b12 0%, #0a1018 100%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 20%, transparent 75%);
}
.topbar, .layout, .login-page, #modal-root { position: relative; z-index: 1; }
a { color: var(--cyan); text-decoration: none; }
a:hover { color: #67e8f9; }
button, input, textarea { font: inherit; }

/* ---------- Topbar ---------- */
.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 18, 0.88);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 40;
}
.topbar .brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.02rem;
  color: #fff;
  letter-spacing: 0.02em;
}
.topbar .brand span {
  margin-left: 0.45rem;
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--latin);
}
.topbar .meta {
  font-family: var(--latin);
  font-size: 0.72rem;
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.08);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
}
.topbar .actions { display: flex; gap: 0.5rem; align-items: center; }
.topbar .btn.ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text-dim);
}
.topbar .btn.ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
}

/* ---------- Layout ---------- */
.layout {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  min-height: calc(100vh - 56px);
}
.side {
  padding: 1.15rem 0.8rem 1.4rem;
  background: rgba(12, 18, 28, 0.92);
  border-right: 1px solid var(--line);
}
.side h3 {
  margin: 0.15rem 0.65rem 0.75rem;
  font-family: var(--latin);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 600;
}
.side button.item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text-dim);
  padding: 0.7rem 0.8rem;
  margin-bottom: 0.2rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.side button.item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}
.side button.item.active {
  color: #fff;
  background: rgba(34, 211, 238, 0.12);
  box-shadow: inset 2px 0 0 var(--cyan);
}

/* 侧栏：深底浅字，强制覆盖主区 outline 白底 */
.side .btn.outline {
  width: 100%;
  margin-top: 0.85rem;
  background: rgba(34, 211, 238, 0.08) !important;
  border: 1px solid rgba(34, 211, 238, 0.35) !important;
  color: var(--cyan) !important;
}
.side .btn.outline:hover {
  background: rgba(34, 211, 238, 0.16) !important;
  color: #fff !important;
  border-color: var(--cyan) !important;
}

.main {
  padding: 1.35rem clamp(1rem, 2.2vw, 1.75rem) 2.75rem;
  max-width: 1140px;
}

/* 工作台壳：主区铺满，取消旧版 max-width 造成的右侧大片空白 */
.layout.shell .main {
  max-width: none;
  width: 100%;
  min-width: 0;
  padding: 0;
  overflow: visible;
}
.layout.shell .main > .page-head,
.layout.shell .main > .kpi-grid,
.layout.shell .main > .panel-block {
  padding-left: 1.25rem;
  padding-right: 1.5rem;
}
.layout.shell .main > .page-head { padding-top: 1.15rem; }
.layout.shell .main > .panel-block:last-child { padding-bottom: 2rem; }

/* ---------- Surfaces ---------- */
.card, .panel, .kpi, .report-hero {
  background: linear-gradient(180deg, rgba(20, 30, 46, 0.95), rgba(16, 24, 38, 0.98));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card { padding: 1.15rem 1.2rem; }
.card h2, .card h3, .panel h2 {
  margin: 0 0 0.3rem;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 650;
  color: #fff;
}
.section-desc {
  margin: 0 0 0.95rem;
  color: var(--text-faint);
  font-size: 0.82rem;
}
.grid { display: grid; gap: 1rem; }

/* ---------- Page head ---------- */
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.page-title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.4rem, 2.3vw, 1.75rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}
.page-sub {
  margin: 0.4rem 0 0;
  color: var(--text-dim);
  font-size: 0.88rem;
}
.page-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ---------- KPI ---------- */
.kpi-block { margin-bottom: 1.2rem; }
.kpi-block-title {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  margin: 0 0 0.7rem;
  flex-wrap: wrap;
}
.kpi-block-title h2 {
  margin: 0;
  font-family: var(--latin);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  font-weight: 600;
}
.kpi-block-title span {
  color: var(--text-faint);
  font-size: 0.8rem;
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}
.kpi {
  padding: 1.05rem 1.1rem;
  position: relative;
  overflow: hidden;
}
.kpi::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.45);
}
.kpi.accent-gold::before {
  background: var(--amber);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.35);
}
.kpi.accent-muted::before {
  background: #64748b;
  box-shadow: none;
}
.kpi-label {
  margin: 0 0 0.45rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-dim);
}
.kpi-value {
  font-family: var(--latin);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #fff;
}
.kpi-value.teal { color: var(--cyan); }
.kpi-value.amber { color: var(--amber); }
.kpi-hint {
  margin: 0.55rem 0 0;
  font-size: 0.76rem;
  color: var(--text-faint);
  line-height: 1.4;
}

/* ---------- Charts ---------- */
.charts-2 {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 0.95rem;
  margin-bottom: 1.2rem;
}
.chart-wrap { height: 250px; }
.sov-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.7rem;
}
.sov-chip {
  font-size: 0.76rem;
  padding: 0.28rem 0.55rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--text-dim);
}
.sov-chip b {
  font-family: var(--latin);
  color: var(--cyan);
  margin-left: 0.28rem;
}

/* ---------- Alert ---------- */
.alert-banner {
  margin-bottom: 1rem;
  padding: 0.9rem 1.05rem;
  border-radius: var(--radius);
  background: var(--danger-bg);
  border: 1px solid rgba(251, 113, 133, 0.35);
}
.alert-banner h2 {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
  color: #fda4af;
  font-family: var(--display);
}
.alert-banner ul {
  margin: 0;
  padding-left: 1.1rem;
  color: #fecdd3;
  font-size: 0.86rem;
}

/* ---------- Table ---------- */
.history-card { margin-bottom: 1.2rem; }
.section-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}
table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
th, td {
  padding: 0.8rem 0.45rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
th {
  font-family: var(--latin);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 600;
}
td { color: var(--text-dim); }
td.num {
  font-family: var(--latin);
  font-weight: 650;
  color: #fff;
}
tr:last-child td { border-bottom: 0; }
tr:hover td { background: rgba(34, 211, 238, 0.04); }
.actions-cell { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.btn.tiny {
  padding: 0.28rem 0.5rem;
  font-size: 0.74rem;
  border-radius: 5px;
}

/* ---------- Insights ---------- */
.insight-list { display: grid; gap: 0.55rem; margin-top: 0.65rem; }
.insight-item {
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}
.insight-item.high {
  background: var(--danger-bg);
  border-color: rgba(251, 113, 133, 0.35);
}
.insight-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.28rem;
}
.insight-top strong { font-size: 0.9rem; color: #fff; }
.insight-item p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.52rem 0.95rem;
  font-size: 0.86rem;
  font-weight: 650;
  cursor: pointer;
  background: linear-gradient(180deg, #22d3ee, #0891b2);
  color: #041016;
  transition: filter .15s, border-color .15s, color .15s, background .15s;
}
.btn:hover { filter: brightness(1.08); color: #041016; text-decoration: none; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }
.btn.primary-lg { padding: 0.62rem 1.15rem; }
.btn.outline {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}
.btn.outline:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
}
.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text-dim);
}
.btn.ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.06);
}
.btn.danger {
  background: linear-gradient(180deg, #fb7185, #e11d48);
  color: #fff;
}

.tag {
  display: inline-block;
  padding: 0.12rem 0.48rem;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--latin);
  letter-spacing: 0.04em;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
  border: 1px solid var(--line);
}
.tag.ok {
  background: rgba(45, 212, 191, 0.12);
  color: var(--teal);
  border-color: rgba(45, 212, 191, 0.3);
}
.tag.no {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: rgba(251, 113, 133, 0.35);
}

/* ---------- Forms / login ---------- */
label {
  display: block;
  margin: 0.65rem 0 0.3rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
}
input[type=text], input[type=password], textarea {
  width: 100%;
  padding: 0.72rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}
textarea { min-height: 160px; resize: vertical; }

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  isolation: isolate;
}
.login-box {
  width: min(100%, 420px);
  padding: 2rem 1.75rem;
  background: #121c2c;
  border: 1px solid rgba(34, 211, 238, 0.45);
  border-radius: 12px;
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.08),
    0 24px 60px rgba(0, 0, 0, 0.55);
  color: #e8eef6;
}
.login-box h1 {
  margin: 0 0 0.4rem;
  font-family: var(--display);
  font-size: 1.5rem;
  color: #ffffff;
  font-weight: 700;
}
.login-box > p {
  margin: 0 0 1.15rem;
  color: rgba(232, 238, 246, 0.75);
  font-size: 0.9rem;
}
.login-box .muted {
  color: rgba(232, 238, 246, 0.5) !important;
}
.login-box label {
  color: rgba(232, 238, 246, 0.78);
}
.login-box input {
  margin-bottom: 0.75rem;
  background: #0a1018;
  border: 1px solid rgba(148, 183, 210, 0.35);
  color: #ffffff;
}
.login-box input::placeholder {
  color: rgba(232, 238, 246, 0.35);
}
.login-box input:focus {
  border-color: #22d3ee;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2);
}
.login-box .btn {
  margin-top: 0.35rem;
  color: #041016;
  font-weight: 700;
}
.err {
  color: #fb7185;
  min-height: 1.25em;
  font-size: 0.86rem;
  margin-bottom: 0.35rem;
}
.muted { color: var(--text-dim); }
.row { display: flex; gap: 0.55rem; flex-wrap: wrap; align-items: center; }
.answer {
  white-space: pre-wrap;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  max-height: 240px;
  overflow: auto;
  font-size: 0.88rem;
  color: var(--text-dim);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Modal ---------- */
body.modal-open { overflow: hidden; }
#modal-root { z-index: 1000; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 12, 0.72);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 1.15rem;
  animation: rise .18s ease both;
}
.modal-panel {
  width: min(100%, 520px);
  max-height: min(86vh, 740px);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #141e2e, #0e1624);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.08), 0 24px 60px rgba(0, 0, 0, 0.5);
}
.modal-panel.wide {
  width: min(100%, 880px);
  max-height: min(92vh, 900px);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}
.modal-close {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  font-size: 1.15rem;
  cursor: pointer;
}
.modal-close:hover { color: #fff; border-color: var(--cyan); }
.modal-body {
  padding: 1.1rem 1.2rem;
  overflow: auto;
  flex: 1;
  color: var(--text);
}
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.9rem 1.2rem;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0 0 12px 12px;
}
.progress-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan-deep), var(--cyan));
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.45);
  transition: width .28s ease;
}
.progress-pct {
  margin: 0.55rem 0 0;
  font-family: var(--latin);
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--text-dim);
}
.suggest-stage {
  margin: 1rem 0 0.5rem;
  font-family: var(--latin);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 650;
  color: var(--cyan);
}
.suggest-stage:first-child { margin-top: 0; }
.suggest-list { display: grid; gap: 0.4rem; }
.suggest-item {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin: 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-dim);
  cursor: pointer;
}
.suggest-item:hover {
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(34, 211, 238, 0.06);
  color: #fff;
}
.suggest-item input { margin-top: 0.2rem; }

.run-current {
  margin-top: 1rem;
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}
.run-current .k {
  display: block;
  font-family: var(--latin);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.3rem;
}
.run-current p {
  margin: 0;
  color: #fff;
  font-size: 0.92rem;
}

.compare-archives {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin-bottom: 1rem;
}
.compare-arch {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}
.compare-arch.after {
  background: rgba(34, 211, 238, 0.08);
  border-color: rgba(34, 211, 238, 0.35);
}
.compare-arch .k {
  display: block;
  font-family: var(--latin);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.25rem;
}
.compare-arch strong {
  display: block;
  font-family: var(--latin);
  font-size: 1.35rem;
  color: #fff;
}
.compare-arch .t { font-size: 0.8rem; color: var(--text-dim); }
.compare-charts {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}
.compare-chart-card {
  padding: 0.7rem 0.8rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.2);
}
.compare-chart-wrap { height: 210px; }
.compare-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.compare-chip {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  font-size: 0.78rem;
}
.compare-chip .label { color: var(--text-dim); }
.compare-chip .delta { font-family: var(--latin); font-weight: 700; }
.compare-chip .delta.up { color: var(--teal); }
.compare-chip .delta.down { color: var(--danger); }
.compare-chip .delta.flat { color: var(--text-faint); }

@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .charts-2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .kpi-grid,
  .compare-archives,
  .compare-charts { grid-template-columns: 1fr; }
  .main { padding: 1rem 0.9rem 2.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- GEO 侧栏壳 ---------- */
.layout.shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 56px);
  gap: 0;
}
.nav-side {
  border-right: 1px solid var(--line);
  background: rgba(12, 18, 28, 0.92);
  padding: 1rem 0.75rem 2rem;
  overflow-y: auto;
}
.nav-group { margin-bottom: 1.1rem; }
.nav-label {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-family: var(--latin);
  padding: 0 0.65rem 0.35rem;
}
.nav-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text-dim);
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.92rem;
}
.nav-item:hover { background: rgba(34, 211, 238, 0.08); color: var(--text); }
.nav-item.active {
  background: rgba(34, 211, 238, 0.14);
  color: #fff;
  box-shadow: inset 2px 0 0 var(--cyan);
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 1.25rem;
}
.kpi-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
}
.kpi-card .k { font-size: 0.75rem; color: var(--text-faint); }
.kpi-card .v {
  font-family: var(--latin);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--cyan);
  margin-top: 0.25rem;
}
.panel-block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}
.table-wrap { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
table.data th, table.data td {
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 0.45rem;
  text-align: left;
  vertical-align: top;
}
table.data th { color: var(--text-faint); font-weight: 500; }
.tag {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  border: 1px solid var(--line);
}
.tag.ok { color: var(--teal); border-color: rgba(45,212,191,.35); }
.tag.warn { color: var(--amber); }
.tag.bad { color: var(--danger); }
.form-row { margin-bottom: 0.75rem; }
.form-row label { display: block; font-size: 0.82rem; color: var(--text-dim); margin-bottom: 0.3rem; }
.form-row input, .form-row textarea, .form-row select {
  width: 100%;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
}
.form-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.75rem; }
.split-2 {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1rem;
}
@media (max-width: 960px) {
  .layout.shell { grid-template-columns: 1fr; }
  .nav-side { display: flex; flex-wrap: wrap; gap: 0.25rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .nav-group { margin: 0; display: contents; }
  .nav-label { display: none; }
  .split-2 { grid-template-columns: 1fr; }
}
.list-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.45rem;
  cursor: pointer;
}
.list-item.active, .list-item:hover {
  border-color: rgba(34,211,238,.45);
  background: rgba(34,211,238,.06);
}
.pre-wrap {
  white-space: pre-wrap;
  line-height: 1.7;
  font-size: 0.92rem;
  color: var(--text-dim);
}


/* ---------- 问题监控三栏（对齐彼亿主工作台） ---------- */
.qm-wrap {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 0;
  width: 100%;
  min-height: calc(100vh - 56px);
  margin: 0;
}
.qm-list {
  border-right: 1px solid var(--line);
  background: rgba(10,16,24,.9);
  padding: 0.85rem 0.7rem 1.5rem;
  /* 列表过长时单独滚动；详情区不套第二层滚动条 */
  overflow-y: auto;
  max-height: calc(100vh - 56px);
  position: sticky;
  top: 56px;
  align-self: start;
}
.qm-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.qm-list-head h2 { margin: 0; font-size: 0.95rem; }
.qm-search {
  width: 100%;
  margin-bottom: 0.65rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  font-size: 0.86rem;
}
.qm-card {
  text-align: left;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 10px;
  padding: 0.7rem 0.75rem;
  margin-bottom: 0.5rem;
  color: var(--text);
  cursor: pointer;
}
.qm-card.active {
  border-color: rgba(34,211,238,.5);
  box-shadow: 0 0 0 1px rgba(34,211,238,.2);
}
.qm-card .t { font-weight: 600; margin-bottom: 0.25rem; }
.qm-card .meta { font-size: 0.78rem; color: var(--text-faint); }
.qm-detail {
  padding: 1rem 1.5rem 2.5rem;
  overflow: visible;
  max-height: none;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.bar-row { display: flex; align-items: center; gap: 0.5rem; margin: 0.28rem 0; font-size: 0.82rem; }
.bar-track {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,.06);
  border-radius: 99px;
  overflow: hidden;
}
.bar-fill { height: 100%; border-radius: 99px; }
.bar-fill.top { background: linear-gradient(90deg,#22d3ee,#2dd4bf); }
.bar-fill.pos { background: #34d399; }
.bar-fill.neu { background: #94a3b8; }
.bar-fill.neg { background: #fb7185; }
.filter-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(8px);
  background: color-mix(in srgb, var(--bg, #0b1220) 88%, transparent);

  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 1rem;
}
.filter-bar select {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  font-size: 0.84rem;
}
.progress-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(34,211,238,.25);
  background: rgba(34,211,238,.08);
  border-radius: 8px;
  margin-bottom: 0.85rem;
  font-size: 0.86rem;
}
.progress-box .track {
  flex: 1;
  height: 8px;
  background: rgba(0,0,0,.25);
  border-radius: 99px;
  overflow: hidden;
}
.progress-box .fill {
  height: 100%;
  background: var(--cyan);
}
.answer-box {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0.85rem;
  width: 100%;
}
.answer-pane {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  min-height: 160px;
  max-height: none;
  overflow: visible;
}
.engine-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-family: var(--latin);
  border: 1px solid var(--line);
  background: rgba(34,211,238,.08);
  color: var(--cyan);
}
.engine-checks label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-right: 0.75rem;
  font-size: 0.86rem;
}
@media (max-width: 1100px) {
  .qm-wrap { grid-template-columns: 1fr; }
  .qm-list {
    max-height: none;
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .answer-box { grid-template-columns: 1fr; }
}


.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1rem;
}
.charts-grid .panel-block { margin-bottom: 0; }
#engine-meta {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  flex-wrap: wrap;
}
.eng-dot {
  font-family: var(--latin);
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.eng-dot.on {
  color: var(--teal);
  border-color: rgba(45,212,191,.4);
  background: rgba(45,212,191,.1);
}
.eng-dot.off {
  color: var(--text-faint);
  opacity: 0.85;
}
@media (max-width: 1100px) {
  .charts-grid { grid-template-columns: 1fr; }
}


/* —— 对齐增强：首页 / 舆情词云 / 报告列表 —— */
.home-grid { grid-template-columns: 1fr 1.2fr; }
.kpi-card .kpi-hint {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: var(--text-faint);
}
.sent-card {
  border-bottom: 1px solid var(--line);
  padding: 0.95rem 0;
}
.cloud-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.55rem;
}
.cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  min-height: 2rem;
}
.cloud-tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: calc(0.72rem * var(--s, 1));
  border: 1px solid var(--line);
}
.cloud-tag.pos {
  color: #34d399;
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.35);
}
.cloud-tag.neg {
  color: #fb7185;
  background: rgba(251, 113, 133, 0.1);
  border-color: rgba(251, 113, 133, 0.35);
}
.sent-detail-item {
  border-top: 1px solid var(--line);
  padding: 0.65rem 0;
}
.report-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 70vh;
  overflow: auto;
}
.report-item {
  text-align: left;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  color: inherit;
  cursor: pointer;
}
.report-item:hover { border-color: rgba(34, 211, 238, 0.45); }
.report-item.active {
  border-color: rgba(34, 211, 238, 0.65);
  background: rgba(34, 211, 238, 0.08);
}
.report-item .t { font-weight: 600; margin-bottom: 0.2rem; }
.report-item .meta { font-size: 0.78rem; color: var(--text-faint); }
.md-preview {
  margin-top: 1rem;
  line-height: 1.65;
  font-size: 0.92rem;
}
.md-preview h2, .md-preview h3, .md-preview h4 { margin: 1rem 0 0.4rem; }
.md-preview p { margin: 0.35rem 0; }
.md-preview li { margin-left: 1.1rem; list-style: disc; }
@media (max-width: 900px) {
  .cloud-wrap { grid-template-columns: 1fr; }
  .home-grid { grid-template-columns: 1fr; }
}

.scene-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  padding: 0.85rem 1rem;
}

/* —— 引源卡片 / 回答快照 / 舆情维度 —— */
.cite-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  max-height: 260px;
  overflow: auto;
}
.cite-cards.dense { grid-template-columns: 1fr; max-height: 420px; }
.cite-card {
  display: block;
  position: relative;
  padding: 0.65rem 0.7rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  color: inherit;
  text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.cite-card:hover {
  border-color: rgba(34,211,238,.45);
  transform: translateY(-1px);
}
.cite-badge {
  display: inline-block;
  font-size: 0.68rem;
  padding: 0.12rem 0.4rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: var(--text-faint);
  margin-bottom: 0.25rem;
}
.cite-q {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  font-family: var(--latin);
  font-size: 0.78rem;
  color: #fbbf24;
}
.cite-host { font-size: 0.72rem; color: var(--text-faint); }
.cite-title {
  font-size: 0.82rem;
  margin-top: 0.15rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.badge-video .cite-badge { color: #fb7185; border-color: rgba(251,113,133,.4); }
.badge-product .cite-badge { color: #fbbf24; border-color: rgba(251,191,36,.4); }
.badge-news .cite-badge { color: #60a5fa; border-color: rgba(96,165,250,.4); }
.badge-owned .cite-badge { color: #34d399; border-color: rgba(52,211,153,.45); }
.badge-gov .cite-badge { color: #a78bfa; border-color: rgba(167,139,250,.4); }

.snap-card {
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px dashed rgba(34,211,238,.35);
  background: linear-gradient(135deg, rgba(34,211,238,.06), rgba(167,139,250,.05));
  font-size: 0.86rem;
  line-height: 1.55;
  white-space: pre-wrap;
  max-height: 220px;
  overflow: auto;
}
.aspect-row { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.5rem; }
.aspect-chip {
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.aspect-chip.positive { color: #34d399; border-color: rgba(52,211,153,.4); }
.aspect-chip.negative { color: #fb7185; border-color: rgba(251,113,133,.4); }
.aspect-chip.mixed { color: #fbbf24; border-color: rgba(251,191,36,.4); }
.aspect-board { display: grid; gap: 0.55rem; margin: 0.75rem 0 1rem; }
.aspect-bar .t { font-weight: 600; font-size: 0.85rem; margin-bottom: 0.2rem; }
.aspect-bar .tracks {
  display: flex; gap: 0.25rem; height: 8px;
  background: rgba(255,255,255,.05); border-radius: 99px; overflow: hidden; margin-bottom: 0.2rem;
}
.aspect-bar .tracks i { display: block; height: 100%; }
.aspect-bar .tracks .pos { background: #34d399; }
.aspect-bar .tracks .neg { background: #fb7185; }

.page-head .page-title { letter-spacing: 0.01em; }
.qm-card { transition: border-color .15s, box-shadow .15s; }
.filter-bar select, .filter-bar input {
  transition: border-color .15s;
}

.key-config-btn {
  cursor: pointer;
  font: inherit;
}
.key-config-btn:hover {
  filter: brightness(1.12);
  box-shadow: 0 0 0 1px rgba(34,211,238,.35);
}

button.eng-dot {
  cursor: pointer;
  font: inherit;
  background: transparent;
}
button.eng-dot:hover { filter: brightness(1.15); }
.cite-snip {
  font-size: 0.72rem;
  color: var(--text-faint);
  margin-top: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.attr-item {
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 0;
}

.funnel-bars { display: flex; flex-direction: column; gap: 0.45rem; }
.funnel-row { display: grid; grid-template-columns: 5.5rem 1fr 2.5rem; align-items: center; gap: 0.5rem; font-size: 0.85rem; }
.funnel-row i {
  display: block; height: 10px; border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8, #22d3ee);
}
.funnel-row i.m { background: linear-gradient(90deg, #34d399, #2dd4bf); }
.funnel-row i.c { background: linear-gradient(90deg, #a78bfa, #e879f9); }
.funnel-row b { font-family: var(--latin); text-align: right; }
.risk-list .risk-item { font-size: 0.8rem; padding: 0.35rem 0; border-bottom: 1px solid var(--line); }
.risk-list .risk-item.high { color: #fb7185; }
.ticket-row {
  display: flex; gap: 0.55rem; align-items: flex-start;
  padding: 0.55rem 0; border-bottom: 1px solid var(--line);
  cursor: pointer; font-size: 0.88rem;
}
.ticket-row.done { opacity: 0.45; text-decoration: line-through; }
.ticket-row input { margin-top: 0.25rem; }
.risk-quote { color: #fb7185; }
.table-wrap td.ok { color: #34d399; font-weight: 600; }
.table-wrap td.bad { color: #fb7185; font-weight: 600; }
.fact-box { margin-top: 0.45rem; }
.fact-item { font-size: 0.78rem; margin: 0.2rem 0; line-height: 1.4; }
.fact-item.supported .tag { background: rgba(52,211,153,.15); color: #34d399; }
.fact-item.weak .tag { background: rgba(251,191,36,.15); color: #fbbf24; }
.fact-item.unsupported .tag { background: rgba(251,113,133,.15); color: #fb7185; }
.cite-card.badge-web:has(.cite-host:contains) { }

/* 获客点击 */
.page-actions select {
  min-width: 220px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
}
.click-code {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-family: var(--latin);
  font-size: 0.78rem;
  color: var(--cyan);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 0.45rem 0 0;
}
.click-ol { margin: 0.35rem 0 0.6rem; padding-left: 1.2rem; color: var(--text-dim); font-size: 0.88rem; }
.click-ol li { margin: 0.28rem 0; }
.click-item { padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.click-item:last-child { border-bottom: 0; }
.click-item-t { font-weight: 600; margin-bottom: 0.2rem; }
.click-guide { align-items: start; }
@media (max-width: 960px) {
  .click-guide { grid-template-columns: 1fr; }
}
