:root {
  --bg: #0f0f0f;
  --bg-elevated: #141414;
  --panel: #181818;
  --panel-2: #1c1c1c;
  --border: #2a2a2a;
  --border-soft: #232323;
  --text: #e8e8e8;
  --muted: #8a8a8a;
  --muted-2: #6b6b6b;
  --accent: #4ea1ff;
  --accent-dim: rgba(78, 161, 255, 0.14);
  --success: #3dd68c;
  --warn: #e6b84d;
  --danger: #f07178;
  --high: #3dd68c;
  --mid: #e6b84d;
  --low: #8a8a8a;
  --radius: 8px;
  --font: "Segoe UI", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", "SF Mono", Consolas, ui-monospace, monospace;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 28px;
  --font-size: clamp(13px, 0.35vw + 12.5px, 14px);
  --panel-pad-x: clamp(12px, 2.2vw, 28px);
  --panel-pad-y: clamp(14px, 2vw, 32px);
  --sidebar-width: 232px;
  --touch-min: 44px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--font-size);
  line-height: 1.45;
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

.app {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
  min-height: 100dvh;
}

.sidebar {
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  padding-bottom: calc(16px + var(--safe-bottom));
}

.nav-backdrop {
  display: none;
}

.mobile-chrome {
  display: none;
}

.btn-icon {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  width: var(--touch-min);
  height: var(--touch-min);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.btn-icon:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-icon .hamburger {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px 18px;
}

.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--accent);
}

.brand-name {
  font-weight: 600;
  letter-spacing: 0.2px;
}

.brand-sub {
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--text);
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.nav-group-toggle:hover {
  background: #1f1f1f;
}

.nav-caret {
  font-size: 11px;
  color: var(--muted);
  transition: transform 0.15s ease;
}

.nav-group:not(.open) .nav-caret {
  transform: rotate(-90deg);
}

.nav-sub {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 2px 0 4px 8px;
  margin-left: 6px;
  border-left: 1px solid var(--border-soft);
}

.nav-sub-label {
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
  letter-spacing: 0.04em;
  padding: 10px 10px 2px;
  user-select: none;
}

/* KOL 空壳导航占位 */
.kol-shell {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.kol-shell-row,
.kol-shell-tabs {
  padding: 8px 10px;
  border: 1px dashed var(--border-soft);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.kol-shell-box {
  padding: 28px 14px;
  border: 1px dashed var(--border-soft);
  border-radius: var(--radius);
  background: var(--panel-2);
  text-align: center;
}

.kol-shell-split {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.kol-shell-kpi .kol-shell-box {
  padding: 16px 12px;
}

.kol-crm-filters,
.kol-search-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
  margin: 0 0 10px;
}

.kol-crm-filters .input,
.kol-search-filters .input {
  min-width: 120px;
}

.kol-search-filters .field.grow {
  flex: 1 1 220px;
  min-width: 180px;
  margin: 0;
}

.kol-search-filters .field {
  margin: 0;
}

.kol-crm-batch,
.kol-search-subfilters,
.kol-search-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 10px;
}

.kol-crm-name {
  font-weight: 600;
}

.kol-crm-tags {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* Nox 对齐 · 网红 CRM 双栏 */
.kol-nox-crm-card > .card-head {
  margin-bottom: 4px;
}
.kol-nox-crm {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-height: 520px;
}
.kol-nox-crm-rail {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--panel-2);
  position: sticky;
  top: 8px;
}
.kol-nox-crm-views {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kol-nox-crm-view {
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
}
.kol-nox-crm-view:hover {
  background: var(--accent-dim);
}
.kol-nox-crm-view.active {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
}
.kol-nox-crm-viewbox {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border-soft);
}
.kol-nox-crm-viewbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.kol-nox-crm-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kol-nox-crm-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.kol-nox-crm-q {
  flex: 1 1 220px;
  min-width: 180px;
}
.kol-nox-crm-adv {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--panel-2);
}
.kol-nox-crm-adv .field {
  margin: 0;
}
.kol-nox-crm-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}
.kol-nox-crm-table {
  min-width: 1280px;
  margin: 0;
}
.kol-nox-crm-table th,
.kol-nox-crm-table td {
  white-space: nowrap;
  vertical-align: middle;
}
.kol-nox-crm-table th:nth-child(2),
.kol-nox-crm-table td:nth-child(2) {
  white-space: normal;
  min-width: 160px;
}
.kol-nox-crm-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}
.kol-nox-crm-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.kol-nox-crm-goto {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
@media (max-width: 900px) {
  .kol-nox-crm {
    grid-template-columns: 1fr;
  }
  .kol-nox-crm-rail {
    position: static;
  }
}

/* Nox 对齐 · 收藏夹四 Tab */
.kol-nox-fav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid var(--border-soft);
  margin: 0 0 14px;
}
.kol-nox-fav-tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 14px;
  cursor: pointer;
  font: inherit;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.kol-nox-fav-tab:hover {
  color: var(--text);
}
.kol-nox-fav-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}
.kol-nox-fav-pane {
  min-height: 320px;
}
.kol-nox-fav-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 360px;
  padding: 24px;
}
.kol-nox-fav-empty-art {
  font-size: 48px;
  line-height: 1;
  opacity: 0.85;
}
.kol-nox-fav-empty-text {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.kol-nox-fav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.kol-nox-fav-card-item {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--panel-2);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.kol-nox-fav-card-item:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.kol-nox-fav-card-item strong {
  font-size: 15px;
}
.kol-nox-fav-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.kol-nox-fav-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.kol-nox-fav-q {
  flex: 1 1 200px;
  min-width: 160px;
}
.kol-nox-fav-plats {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}
.kol-nox-fav-plat {
  border: 1px solid var(--border-soft);
  background: transparent;
  color: var(--text);
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}
.kol-nox-fav-plat.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}
.kol-nox-fav-detail {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}

/* 内容监控 · Nox /video-monitor/list */
.kol-nox-mon-kpi {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 4px 0 16px;
}
.kol-nox-mon-kpi-item {
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--panel-2);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.kol-nox-mon-kpi-label {
  font-size: 12px;
  color: var(--muted);
}
.kol-nox-mon-kpi-item strong {
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.kol-nox-mon-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 28px 16px 36px;
  border: 1px dashed var(--border-soft);
  border-radius: var(--radius);
  background: var(--panel-2);
}
.kol-nox-mon-sell,
.kol-nox-mon-pitch {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 960px;
}
.kol-nox-mon-sell-item,
.kol-nox-mon-pitch-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 12px;
  text-align: center;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--border-soft);
}
.kol-nox-mon-pitch-item span {
  font-size: 12px;
  color: var(--muted);
}
.kol-nox-mon-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.kol-nox-mon-list-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}
.kol-nox-mon-batch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--accent-dim);
}
.kol-nox-mon-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.kol-nox-mon-q {
  min-width: 220px;
  flex: 1 1 220px;
}
.kol-nox-mon-table-wrap {
  overflow-x: auto;
}
.kol-nox-mon-table th.kol-nox-mon-check,
.kol-nox-mon-table td.kol-nox-mon-check {
  width: 36px;
  text-align: center;
}
.kol-nox-mon-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}
@media (max-width: 1100px) {
  .kol-nox-mon-kpi {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .kol-nox-mon-sell,
  .kol-nox-mon-pitch {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .kol-nox-mon-kpi {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kol-nox-mon-sell,
  .kol-nox-mon-pitch {
    grid-template-columns: 1fr;
  }
}

/* 短链管理 · Nox /short-link */
.kol-nox-sl-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: -4px 0 12px;
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 8px;
}
.kol-nox-sl-tab {
  appearance: none;
  border: none;
  background: transparent;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  border-bottom: 2px solid transparent;
  margin-bottom: -9px;
}
.kol-nox-sl-tab:hover {
  color: var(--fg);
}
.kol-nox-sl-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}
.kol-nox-sl-kpi {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}
.kol-nox-sl-kpi-item {
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--panel-2);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.kol-nox-sl-kpi-item strong {
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
}
.kol-nox-sl-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 36px 16px;
  border: 1px dashed var(--border-soft);
  border-radius: var(--radius);
  background: var(--panel-2);
  text-align: center;
}
.kol-nox-sl-empty-text {
  margin: 0;
  color: var(--muted);
}
.kol-nox-sl-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.kol-nox-sl-q {
  min-width: 220px;
  flex: 1 1 220px;
}
.kol-nox-sl-table-wrap {
  overflow-x: auto;
}
.kol-nox-sl-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

/* 通用 Nox 列表壳（争议/邮件/TT/商品/物流/联盟/支付/推广） */
.kol-nox-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: -4px 0 12px;
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 8px;
}
.kol-nox-tab {
  appearance: none;
  border: none;
  background: transparent;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  border-bottom: 2px solid transparent;
  margin-bottom: -9px;
}
.kol-nox-tab:hover { color: var(--fg); }
.kol-nox-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}
.kol-nox-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.kol-nox-toolbar .input,
.kol-nox-toolbar .input-sm {
  min-width: 120px;
}
.kol-nox-toolbar .kol-nox-q {
  min-width: 200px;
  flex: 1 1 200px;
}
.kol-nox-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}
.kol-nox-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 36px 16px;
  border: 1px dashed var(--border-soft);
  border-radius: var(--radius);
  background: var(--panel-2);
  text-align: center;
  margin-bottom: 12px;
}
.kol-nox-empty p { margin: 0; color: var(--muted); }
.kol-nox-empty strong { display: block; margin-bottom: 4px; color: var(--fg); }

/* 网红搜索 · Nox */
.kol-nox-search-domain {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
}
.kol-nox-search-plats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.kol-nox-search-plat {
  appearance: none;
  border: 1px solid var(--border-soft);
  background: var(--panel-2);
  border-radius: var(--radius);
  padding: 6px 12px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  color: var(--muted);
}
.kol-nox-search-plat.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}
.kol-nox-search-object {
  display: inline-flex;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 10px;
}
.kol-nox-search-object button {
  appearance: none;
  border: none;
  background: transparent;
  padding: 6px 14px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  color: var(--muted);
}
.kol-nox-search-object button.active {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
}
.kol-nox-search-kw {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.kol-nox-search-kw .kol-nox-q { flex: 1 1 280px; }

.kol-search-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kol-search-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 140px auto;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.kol-search-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
}

.kol-search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}

.kol-search-metrics {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kol-search-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
}

.kol-disp-tabs .btn.active {
  border-color: var(--accent, #3b82f6);
  color: var(--text);
  background: var(--accent-dim, rgba(59, 130, 246, 0.12));
}

.kol-disp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.kol-disp-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: var(--panel-2);
  font-size: 12px;
  cursor: pointer;
}

.kol-disp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.kol-disp-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--bg);
  font-size: 12px;
}

.kol-disp-ev-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kol-disp-ev-thumb img,
.kol-disp-ev-thumb-img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border-soft);
}

.kol-disp-detail-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--panel-2);
  padding: 12px;
  margin-bottom: 10px;
}

.kol-log-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kol-log-tl-item {
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.kol-log-tl-time {
  margin-bottom: 4px;
}

@media (max-width: 900px) {
  .kol-shell-split {
    grid-template-columns: 1fr;
  }
  .kol-search-card {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .kol-search-metrics,
  .kol-search-actions {
    grid-column: 2;
  }
}

/* KOL · 详情抽屉 */
.kol-drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
}
.kol-drawer.hidden { display: none; }
.kol-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.kol-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(640px, 100%);
  height: 100%;
  background: var(--bg-elevated, #141414);
  border-left: 1px solid var(--border-soft);
  padding: 16px 18px 24px;
  overflow: auto;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.35);
}
.kol-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 4px;
}
@media (max-width: 720px) {
  .kol-drawer-panel { width: 100%; }
}


.nav-group.open .nav-sub {
  display: flex;
}

.nav-item {
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}

.nav-item:hover { background: #1f1f1f; color: var(--text); }
.nav-item.active {
  background: var(--accent-dim);
  color: var(--accent);
}

.nav-foundation {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section-label {
  padding: 4px 10px 6px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.85;
}

.nav-item-root {
  font-weight: 500;
  color: var(--text);
}

.sidebar-foot {
  margin-top: auto;
  padding: 12px 10px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.api-monitor {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}

.sidebar-status-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.sidebar-status-toggle:hover {
  background: #1f1f1f;
  color: var(--text);
}
.sidebar-status-toggle .nav-caret {
  transition: transform 0.2s ease;
}
.sidebar-foot.is-open .sidebar-status-toggle .nav-caret {
  transform: rotate(180deg);
}
.sidebar-status-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-status-body[hidden] {
  display: none !important;
}
.api-monitor-title {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.api-card {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
}

.api-card.api-card-warn-bg {
  background: rgba(234, 179, 8, 0.14);
  border-color: rgba(234, 179, 8, 0.45);
}

.api-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.api-card-label {
  font-size: 12px;
  color: var(--muted-2);
}

.api-card-value {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.api-card-sub {
  font-size: 11px;
  margin-top: 2px;
  line-height: 1.35;
}

.api-card-warn {
  margin-top: 6px;
  font-size: 11px;
  color: #b45309;
  line-height: 1.35;
}

.api-status-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 6px 28px 10px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 12px;
  color: var(--muted-2);
}

.api-strip-item { color: var(--text); }
.api-strip-sep { opacity: 0.45; }

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.meta-label { color: var(--muted-2); font-size: 12px; }

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 22px var(--panel-pad-x) 8px;
  border-bottom: 1px solid var(--border-soft);
}

.topbar h1 {
  margin: 0 0 4px;
  font-size: clamp(17px, 1.2vw + 14px, 20px);
  font-weight: 600;
}

.topbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.panel { padding: var(--panel-pad-y) var(--panel-pad-x) calc(var(--panel-pad-y) + var(--safe-bottom)); }
.panel.hidden { display: none; }
.hidden { display: none !important; }

.grid-2 {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.card-head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.2px;
}

.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12px; }

.btn {
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.btn:hover { border-color: #3a3a3a; background: #222; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #061018;
  font-weight: 600;
}

.btn-primary:hover { filter: brightness(1.05); background: var(--accent); }

.btn-ghost { background: transparent; }

.btn-restart {
  background: transparent;
  border-color: rgba(232, 160, 80, 0.55);
  color: #e8a050;
}
.btn-restart:hover {
  background: rgba(232, 160, 80, 0.12);
  border-color: rgba(232, 160, 80, 0.8);
}
.btn-restart:disabled {
  opacity: 0.55;
  cursor: wait;
}

.restart-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 10, 14, 0.86);
}
.restart-overlay.hidden { display: none; }
.restart-overlay-card {
  width: min(420px, 100%);
  padding: 22px 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  text-align: center;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}
.restart-overlay-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.restart-overlay-desc {
  margin: 0 0 12px;
  font-size: 0.9rem;
}
.restart-overlay-status {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.dropzone {
  display: block;
  border: 1px dashed #3a3a3a;
  border-radius: 8px;
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  background: #151515;
  transition: border-color 0.15s, background 0.15s;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.drop-title { font-weight: 500; margin-bottom: 4px; }
.drop-sub { font-size: 12px; }

.file-list {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--text);
  cursor: pointer;
}

.check input { accent-color: var(--accent); }

.field { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.field-label { color: var(--muted); font-size: 12px; }

.input,
textarea.input {
  background: #252525;
  color: #f2f2f2;
  caret-color: #f2f2f2;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  padding: 8px 10px;
  outline: none;
  width: 100%;
  -webkit-text-fill-color: #f2f2f2;
}

.input::placeholder,
textarea.input::placeholder {
  color: #9a9a9a;
  opacity: 1;
  -webkit-text-fill-color: #9a9a9a;
}

.input:focus,
textarea.input:focus {
  border-color: #4ea1ff;
  background: #2a2a2a;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
}

.textarea {
  resize: vertical;
  min-height: 180px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre;
  color: #f2f2f2;
}

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 10px;
  color: var(--muted-2);
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.row-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  margin-bottom: 4px;
}

.badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
}

.badge-ok {
  color: var(--success);
  border-color: rgba(61, 214, 140, 0.35);
  background: rgba(61, 214, 140, 0.08);
}

.badge-warn {
  color: var(--warn);
  border-color: rgba(230, 184, 77, 0.35);
  background: rgba(230, 184, 77, 0.08);
}

.badge-muted { background: #1a1a1a; }

.progress {
  height: 6px;
  background: #222;
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-bar {
  height: 100%;
  background: var(--accent);
  width: 0;
  transition: width 0.25s ease;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 12px;
}

.job-timing {
  margin: 8px 0 4px;
  font-size: 12px;
  color: var(--muted);
  min-height: 1.2em;
}

.job-timing.done {
  color: var(--success);
}

.btn-block {
  width: 100%;
  justify-content: center;
  margin-bottom: 8px;
}

.blacklist-panel {
  margin-top: 4px;
  padding-top: 4px;
}

.textarea-sm {
  min-height: 110px;
}

.hint {
  margin: 6px 0 0;
}

.head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.copy-group {
  display: flex;
  gap: 6px;
}

.copy-toast {
  margin: 10px 0 0;
  color: var(--success);
}

.stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.stat-pill {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  background: #151515;
  font-size: 12px;
}

.stat-pill strong { color: var(--text); font-weight: 600; }
.stat-pill span { color: var(--muted); margin-left: 6px; }

.filters { display: flex; gap: 6px; flex-wrap: wrap; }

.filter-block {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-label {
  color: var(--muted-2);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chip {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 999px;
  padding: 3px 10px;
  cursor: pointer;
  font-size: 12px;
}

.chip.active {
  color: var(--accent);
  border-color: rgba(78, 161, 255, 0.45);
  background: var(--accent-dim);
}

.table-wrap {
  overflow: auto;
  max-height: calc(100vh - 220px);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  background: #1a1a1a;
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
}

tr:hover td { background: #1a1a1a; }

/* 十字定位高亮（结果表） */
.table-crosshair tbody tr:hover td {
  background: inherit;
}

.table-crosshair tbody td:not(.col-check):not(.col-action) {
  cursor: cell;
}

.table-crosshair tbody tr.crosshair-row td.crosshair-row-cell {
  background: rgba(78, 161, 255, 0.05);
}

.table-crosshair tbody td.crosshair-col {
  background: rgba(78, 161, 255, 0.09);
}

.table-crosshair tbody td.crosshair-active {
  background: rgba(78, 161, 255, 0.2) !important;
  box-shadow: inset 0 0 0 1px rgba(78, 161, 255, 0.55);
  z-index: 1;
}

.table-crosshair thead th.crosshair-col-h {
  background: rgba(78, 161, 255, 0.14) !important;
  color: var(--accent);
  box-shadow: inset 0 -2px 0 rgba(78, 161, 255, 0.55);
}

.table-crosshair tbody tr.crosshair-row td.sticky-col,
.table-crosshair tbody tr.crosshair-row td.sticky-col-avatar,
.table-crosshair tbody tr.crosshair-row td.sticky-col-name,
.table-crosshair tbody tr.crosshair-row td.sticky-col-email,
.table-crosshair tbody td.sticky-col.crosshair-col,
.table-crosshair tbody td.sticky-col-avatar.crosshair-col,
.table-crosshair tbody td.sticky-col-name.crosshair-col,
.table-crosshair tbody td.sticky-col-email.crosshair-col {
  background: rgba(78, 161, 255, 0.07);
}

.table-crosshair tbody td.sticky-col.crosshair-active,
.table-crosshair tbody td.sticky-col-avatar.crosshair-active,
.table-crosshair tbody td.sticky-col-name.crosshair-active,
.table-crosshair tbody td.sticky-col-email.crosshair-active {
  background: rgba(78, 161, 255, 0.22) !important;
}

.table-crosshair tbody tr.row-fail td.crosshair-active {
  background: rgba(78, 161, 255, 0.16) !important;
}

.score {
  display: inline-block;
  min-width: 28px;
  text-align: center;
  border-radius: 4px;
  padding: 1px 8px;
  font-size: 12px;
  font-weight: 600;
}

.score-high { color: var(--high); background: rgba(61, 214, 140, 0.1); }
.score-mid { color: var(--warn); background: rgba(230, 184, 77, 0.1); }
.score-low { color: var(--muted); background: rgba(138, 138, 138, 0.1); }

.link {
  color: var(--accent);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 11px;
  word-break: break-all;
}

.link:hover { text-decoration: underline; }

.col-check {
  width: 36px;
  text-align: center;
}

.col-avatar {
  width: 64px;
  min-width: 64px;
  max-width: 88px;
  padding: 8px 6px;
  vertical-align: middle;
}

.col-action {
  width: 56px;
}

.avatar-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 52px;
}

.avatar-img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: #222;
  border: 1px solid var(--border);
  display: block;
}

.avatar-img.broken {
  opacity: 0.35;
}

.avatar-img-sm {
  width: 36px;
  height: 36px;
  border-radius: 7px;
}

.avatar-img-lg {
  width: 72px;
  height: 72px;
  border-radius: 10px;
}

.avatar-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px dashed #444;
  color: var(--muted-2);
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #151515;
}

.avatar-url-input {
  width: 100%;
  min-width: 0;
  padding: 3px 5px;
  font-size: 10px;
  font-family: var(--mono);
}

.modal-avatar-edit {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.modal-avatar-url {
  flex: 1;
  min-width: 180px;
}

.avatar-card-edit .avatar-cell {
  flex-direction: row;
  justify-content: flex-start;
  gap: 10px;
}

.avatar-card-edit .avatar-url-input {
  flex: 1;
  font-size: 12px;
  padding: 6px 8px;
}

.cell-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.cell-value {
  word-break: break-word;
  max-width: 280px;
}

.summary-text {
  max-width: 260px;
  line-height: 1.45;
  color: var(--text);
}

.btn-mini {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 4px;
  padding: 1px 8px;
  font-size: 11px;
  cursor: pointer;
  line-height: 1.5;
}

.btn-mini:hover {
  color: var(--text);
  border-color: #3a3a3a;
  background: #1a1a1a;
}

.btn-row-full {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 500;
}

.btn-row-full:hover {
  background: #3d8fef;
  border-color: #3d8fef;
  color: #fff;
}

.bio-bilingual {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 260px;
}

.bio-zh {
  color: var(--text);
  white-space: pre-wrap;
}

.bio-en {
  color: var(--muted);
  font-size: 12px;
  white-space: pre-wrap;
}

.email-none { color: var(--muted); }
.email-fail { color: var(--warn); }

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal.hidden { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
}

.modal-card {
  position: relative;
  width: min(720px, 100%);
  max-height: min(80vh, 900px);
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.modal-head-text {
  min-width: 0;
}

.modal-sub {
  margin: 4px 0 0;
  font-size: 12px;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-field {
  border-top: 1px solid var(--border-soft);
  padding-top: 8px;
}

.modal-field .label {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.modal-field .value {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
}

.modal-foot-split {
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.modal-card-wide {
  width: min(720px, 96vw);
}

.mail-modal-card {
  width: min(780px, 96vw);
  max-height: min(88vh, 960px);
}

.mail-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mail-provider-field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mail-provider-field .field-label {
  margin: 0;
  white-space: nowrap;
}

.mail-provider-select,
.mail-ai-card .input,
.mail-ai-card textarea.input,
#mailGenerateBtn,
#openMailBtn,
#copyMailBtn,
[data-close-mail].btn {
  min-height: 44px;
}

.mail-provider-select {
  min-width: 132px;
  width: auto;
}

.mail-provider-status {
  white-space: nowrap;
}

.mail-ai-card {
  background: #1a1a1a;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px 10px;
}

.mail-ai-card-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.mail-ai-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}

.mail-ai-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.mail-override-wrap {
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px dashed #3a3a3a;
  border-radius: 8px;
}

.mail-override-wrap > summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.mail-override-wrap[open] > summary {
  margin-bottom: 6px;
}

.field-error {
  color: #f07178;
  font-size: 12px;
  min-height: 16px;
  line-height: 1.3;
}

@media (max-width: 720px) {
  .mail-ai-grid { grid-template-columns: 1fr; }
  .mail-head-actions { width: 100%; }
  .mail-provider-field { flex-wrap: wrap; }
}

.modal-card-xl {
  width: min(920px, 96vw);
}

.crm-conflict-meta {
  margin: 0 0 10px;
  color: var(--muted);
}

.crm-conflict-table-wrap {
  overflow: auto;
  max-height: min(52vh, 480px);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
}

.crm-conflict-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.crm-conflict-table th,
.crm-conflict-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
  text-align: left;
}

.crm-conflict-table th {
  position: sticky;
  top: 0;
  background: var(--panel, #fff);
  z-index: 1;
  font-weight: 600;
}

.crm-conflict-check {
  width: 52px;
  text-align: center !important;
}

.crm-conflict-table td.crm-conflict-check {
  text-align: center;
}

.crm-conflict-diff {
  background: color-mix(in srgb, var(--accent, #2563eb) 8%, transparent);
}

.crm-conflict-val {
  white-space: pre-wrap;
  word-break: break-word;
  max-width: 280px;
  font-family: var(--mono);
  font-size: 12px;
}

.crm-conflict-val.is-empty {
  color: var(--muted);
  font-style: italic;
}

.crm-conflict-actions-right {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.modal-card-xl {
  width: min(920px, 96vw);
}

.crm-conflict-meta {
  margin: 0 0 10px;
  color: var(--muted);
}

.crm-conflict-table-wrap {
  max-height: min(52vh, 420px);
  overflow: auto;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
}

.crm-conflict-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.crm-conflict-table th,
.crm-conflict-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
  text-align: left;
}

.crm-conflict-table th {
  position: sticky;
  top: 0;
  background: var(--panel, #fff);
  z-index: 1;
  font-weight: 600;
}

.crm-conflict-check {
  width: 48px;
  text-align: center;
}

.crm-conflict-table td.crm-conflict-check {
  text-align: center;
}

.crm-conflict-diff {
  background: color-mix(in srgb, var(--accent, #2563eb) 8%, transparent);
}

.crm-conflict-cell {
  white-space: pre-wrap;
  word-break: break-word;
  max-width: 280px;
  line-height: 1.4;
}

.crm-conflict-actions-left,
.crm-conflict-actions-right {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.crm-editors-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 12px;
  padding-top: 4px;
}

.crm-editors-goto {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.modal-input {
  font-size: 13px;
}

.modal-input.textarea {
  min-height: 72px;
  font-family: var(--mono);
  font-size: 12px;
}

.modal-import {
  padding-bottom: 10px;
  margin-bottom: 4px;
  border-bottom: 1px dashed var(--border-soft);
}

.modal-import-input {
  min-height: 56px;
  font-family: var(--mono);
  font-size: 12px;
}

.modal-import-area {
  min-height: 220px;
  font-family: var(--mono);
  font-size: 12px;
}

.modal-import-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.import-cols-hint {
  word-break: break-all;
  line-height: 1.5;
  margin: 8px 0;
  color: var(--muted);
}

.import-file-zone {
  display: block;
  border: 1px dashed #3a3a3a;
  border-radius: 8px;
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  background: #151515;
  transition: border-color 0.15s, background 0.15s;
  margin-bottom: 12px;
}

.import-file-zone:hover,
.import-file-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.import-file-title {
  font-weight: 500;
  font-size: 13px;
  margin-bottom: 4px;
}

.import-file-name {
  margin-top: 8px;
  word-break: break-all;
}

.import-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 12px;
}

.import-divider::before,
.import-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-soft);
}

.modal-status-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.select-sm {
  width: auto;
  min-width: 96px;
  padding: 4px 8px;
  font-size: 12px;
  background: #151515;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.status-select {
  font-weight: 500;
}

.status-tag.status-todo,
.status-select.status-todo { color: var(--muted); }
.status-tag.status-sent,
.status-select.status-sent { color: var(--accent); }
.status-tag.status-replied,
.status-select.status-replied { color: var(--success); }
.status-tag.status-published,
.status-select.status-published { color: #a855f7; }
.status-tag.status-hold,
.status-select.status-hold { color: var(--warn); }

.sticky-col,
.sticky-col-2,
.sticky-col-3 {
  position: sticky;
  background: #1a1a1a;
  z-index: 2;
}

td.sticky-col,
td.sticky-col-2,
td.sticky-col-3 {
  background: var(--panel);
  z-index: 1;
}

tr:hover td.sticky-col,
tr:hover td.sticky-col-2,
tr:hover td.sticky-col-3 {
  background: #1a1a1a;
}

.sticky-col { left: 0; }
.sticky-col-2 { left: 36px; }
.sticky-col-3 { left: 92px; min-width: 72px; }

th.sticky-col,
th.sticky-col-2,
th.sticky-col-3 {
  z-index: 3;
}

.batch-bar {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: #1a1a1a;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.batch-bar.hidden { display: none; }

.batch-count {
  font-weight: 600;
  margin-right: 4px;
}

.batch-status {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

tr[data-email="fail"] td {
  background: rgba(230, 184, 77, 0.12);
}

tr[data-email="fail"]:hover td {
  background: rgba(230, 184, 77, 0.18);
}

.banners {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.banner {
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  border: 1px solid var(--border);
}

.banner-warn {
  background: rgba(230, 184, 77, 0.1);
  border-color: rgba(230, 184, 77, 0.35);
  color: #f0d48a;
}

.btn-accent {
  border-color: rgba(61, 214, 140, 0.55) !important;
  color: var(--success) !important;
  background: rgba(61, 214, 140, 0.1) !important;
}

.guide-card h2 { margin: 0 0 10px; font-size: 16px; }
.guide-steps {
  margin: 0 0 12px;
  padding-left: 1.2em;
  color: var(--muted);
  line-height: 1.7;
}
.guide-steps strong { color: var(--text); }

.pipeline-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 12px;
}

.pipe-step {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted-2);
}

.pipe-step.active {
  color: var(--accent);
  border-color: rgba(78, 161, 255, 0.5);
  background: var(--accent-dim);
  font-weight: 600;
}

.pipe-step.done {
  color: var(--success);
  border-color: rgba(61, 214, 140, 0.35);
}

.pipe-sep { color: var(--muted-2); font-size: 11px; }

.fail-box {
  margin-top: 12px;
  border: 1px solid rgba(240, 113, 120, 0.35);
  background: rgba(240, 113, 120, 0.06);
  border-radius: 8px;
  padding: 10px 12px;
}

/* 爬虫汇总：满屏嵌入 apify-key-pool UI（与独立控制台一致） */
body.crawler-hub-active .topbar,
body.crawler-hub-active .api-status-strip,
body.crawler-hub-active #configBanners {
  display: none !important;
}
body.crawler-hub-active .main {
  overflow: auto;
  min-height: 100vh;
  min-height: 100dvh;
}
body.crawler-hub-active #panel-crawler.panel-crawler-apify {
  flex: 1 1 auto;
  display: block;
  padding: 0;
  margin: 0;
  min-height: 0;
  overflow: visible;
  background: #0c0e12;
}
#apifyHubRoot [hidden] { display: none !important; }
@media (max-width: 900px) {
  body.crawler-hub-active {
    --crawler-hub-chrome: 52px;
  }
}
.panel-crawler-apify .apify-crawler-frame {
  min-height: 70vh;
}
.contacts-crawl-card {
  margin-top: 16px;
}
.contacts-crawl-opts {
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
}
.contacts-crawl-opts .field-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.contacts-site-box,
.contacts-email-box {
  margin-top: 12px;
  overflow-x: auto;
}
.contacts-result-table {
  width: 100%;
  font-size: 12px;
}
.contacts-email-list {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: 13px;
}
.contacts-email-list li {
  margin: 4px 0;
}
.foundation-hint {
  margin: 0 0 12px;
  line-height: 1.5;
}

.fail-box.hidden { display: none; }

.fail-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.fail-list {
  margin: 0;
  padding-left: 1.1em;
  max-height: 160px;
  overflow: auto;
  font-size: 12px;
}

.fail-list a { color: var(--accent); word-break: break-all; }
.fail-list .err { color: var(--danger); margin-left: 6px; }

.results-head { align-items: flex-start; }

.filter-inline {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-inline.grow { flex: 1; min-width: 160px; }

.input-xs {
  width: 88px;
  padding: 4px 8px;
}

.input-sm {
  width: 100%;
  min-width: 140px;
  padding: 6px 10px;
}

.col-picker {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: #151515;
}

.col-picker.hidden { display: none; }

.col-picker-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 8px;
}

.col-picker-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}

.empty-results {
  text-align: center;
  padding: 36px 16px;
  color: var(--muted);
}

.empty-results.hidden { display: none; }

.sticky-col,
.sticky-col-avatar,
.sticky-col-name,
.sticky-col-email {
  position: sticky;
  background: #1a1a1a;
  z-index: 2;
}

td.sticky-col,
td.sticky-col-avatar,
td.sticky-col-name,
td.sticky-col-email {
  background: var(--panel);
  z-index: 1;
}

tr:hover td.sticky-col,
tr:hover td.sticky-col-avatar,
tr:hover td.sticky-col-name,
tr:hover td.sticky-col-email {
  background: #1a1a1a;
}

th.sticky-col,
th.sticky-col-avatar,
th.sticky-col-name,
th.sticky-col-email {
  z-index: 3;
}

.result-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.result-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: #151515;
}

.result-card.fail {
  border-color: rgba(230, 184, 77, 0.45);
  background: rgba(230, 184, 77, 0.08);
}

.result-card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.result-card-main { flex: 1; min-width: 0; }

.result-card-name {
  font-weight: 600;
  margin-bottom: 4px;
}

.result-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
}

.result-card-email {
  font-size: 13px;
  word-break: break-all;
  margin-bottom: 8px;
}

.result-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.desktop-only {}
.mobile-only { display: none !important; }
.vendor-card-list,
.crm-card-list,
.media-card-list,
.contacts-card-list,
.shipment-card-list,
.alert-card-list,
.users-card-list,
.articles-card-list,
.press-card-list { display: none; }
.vendor-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; width: 100%; }
.vendor-toolbar-main { display: contents; }
.vendor-toolbar-filters { display: contents; }

/* —— 自适应壳层：平板 / 手机 —— */
@media (max-width: 960px) {
  .app {
    grid-template-columns: 1fr;
  }

  .mobile-chrome {
    display: flex;
    align-items: center;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 40;
    padding: calc(10px + var(--safe-top)) 12px 10px;
    background: rgba(15, 15, 15, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
  }

  .mobile-chrome-brand {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
  }

  .mobile-chrome-title {
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-chrome-sub {
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
  }

  body.nav-open {
    overflow: hidden;
  }

  body.nav-open .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(86vw, 300px);
    z-index: 60;
    border-right: 1px solid var(--border);
    border-bottom: 0;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-top: calc(12px + var(--safe-top));
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.45);
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  .sidebar .api-monitor {
    display: none;
  }

  .grid-2 { grid-template-columns: 1fr; }
  .topbar {
    flex-direction: column;
    padding-top: 14px;
  }
  .topbar h1 { font-size: 18px; }
  #pageDesc { font-size: 12px; }
  .desktop-only { display: none !important; }
  .mobile-only { display: flex !important; }
  .sticky-col,
  .sticky-col-avatar,
  .sticky-col-name,
  .sticky-col-email { position: static; }
  .batch-bar {
    left: 8px;
    right: 8px;
    transform: none;
    width: auto;
  }
  .head-actions { justify-content: flex-start; }
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .card-head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .vendor-toolbar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }
  .vendor-toolbar-main {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
  }
  .vendor-toolbar-main .input[type="search"],
  .vendor-toolbar-main input[type="search"] {
    flex: 1 1 160px;
    min-width: 0 !important;
  }
  .vendor-toolbar-filters {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--panel-2);
  }
  .vendor-toolbar-filters.open {
    display: flex;
  }
  .vendor-table-desktop {
    display: none !important;
  }
  .vendor-card-list,
  .crm-card-list,
  .media-card-list,
  .contacts-card-list,
  .shipment-card-list,
  .alert-card-list,
  .users-card-list,
  .articles-card-list,
  .press-card-list {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
  }
  .vendor-card.is-overdue {
    box-shadow: inset 3px 0 0 #e07070;
  }
  .vendor-card.is-delivered {
    box-shadow: inset 3px 0 0 #5cb88a;
  }
  .contacts-create-form {
    grid-template-columns: 1fr !important;
  }
  .results-head .head-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .results-head .filter-block,
  .results-head .filter-inline,
  .results-head .copy-group {
    width: 100%;
  }
  .batch-bar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px calc(10px + var(--safe-bottom));
  }
  .vendor-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel-2);
    padding: 12px;
  }
  .vendor-card.is-starred {
    box-shadow: inset 3px 0 0 #e8b84a;
  }
  .vendor-card-top {
    display: flex;
    gap: 8px;
    align-items: flex-start;
  }
  .vendor-card-body {
    flex: 1;
    min-width: 0;
  }
  .vendor-card-name {
    font-weight: 600;
    margin: 0 0 4px;
  }
  .vendor-card-meta {
    color: var(--muted);
    font-size: 12px;
    margin: 0 0 8px;
  }
  .vendor-card-price {
    font-family: var(--mono);
    font-weight: 700;
    font-size: 15px;
    margin: 0 0 4px;
  }
  .vendor-card-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px;
  }
  .vendor-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
  }
  .modal-card.media-detail-card,
  .modal-card,
  .modal-card-wide,
  .modal-card-xl,
  .mail-modal-card {
    width: calc(100% - 16px);
    max-width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
    margin: 8px;
    border-radius: 12px;
    padding: 12px 14px;
  }
  .modal {
    align-items: flex-end;
    padding: 0;
  }
  .btn, .btn-sm, .input, .select-sm, .input-sm {
    min-height: 40px;
  }
  .btn-star {
    min-width: var(--touch-min);
    min-height: var(--touch-min);
  }

  /* 通用宽表：可横向滑动，避免挤压碎字 */
  .table-wrap:not(.vendor-table-desktop) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-inline: -4px;
    padding-bottom: 4px;
  }
  .table-wrap:not(.vendor-table-desktop) .table-compact {
    min-width: 680px;
  }
  .crm-table-desktop,
  .media-table-desktop,
  .contacts-table-desktop,
  .shipment-table-desktop,
  .alert-table-desktop,
  .users-table-desktop,
  .articles-table-desktop,
  .press-table-desktop {
    display: none !important;
  }

  .head-actions {
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }
  .head-actions > .input,
  .head-actions > select,
  .head-actions > .select-sm,
  .head-actions > input[type="search"],
  .head-actions > input[type="date"],
  .review-toolbar > .field {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
  }
  .review-toolbar {
    flex-wrap: wrap;
  }
  .crm-edit-grid {
    grid-template-columns: 1fr !important;
  }
  .crm-editors-pager {
    flex-wrap: wrap;
    gap: 8px;
  }
  .filters {
    flex-wrap: wrap;
  }
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr !important;
  }

  /* 抽屉全宽 */
  .contacts-drawer-panel,
  .kol-drawer-panel {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* 表单 / 结果区 */
  .field {
    min-width: 0;
  }
  textarea.input,
  .textarea {
    min-height: 96px;
  }
  .banners {
    padding-inline: var(--panel-pad-x);
  }
  .divider-v {
    display: none;
  }

  /* 用户管理等紧凑表 */
  #usersTable {
    min-width: 520px;
  }
}

@media (min-width: 961px) {
  .crm-card-list,
  .media-card-list,
  .contacts-card-list,
  .shipment-card-list,
  .alert-card-list,
  .users-card-list,
  .articles-card-list,
  .press-card-list,
  .vendor-card-list {
    display: none !important;
  }
  .vendor-toolbar-filters {
    display: contents;
  }
  #crmFilterToggle,
  #mediaFilterToggle,
  #pressDistFilterToggle,
  #guestPostFilterToggle {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .kpi-grid {
    grid-template-columns: 1fr 1fr;
  }
  .api-status-strip {
    font-size: 11px;
    padding-left: var(--panel-pad-x);
    padding-right: var(--panel-pad-x);
  }
  .topbar-actions .btn {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar,
  .nav-backdrop {
    transition: none !important;
  }
}

/* CRM / Dashboard */
.board-foundation-hint {
  margin: 0 0 12px;
  padding: 8px 10px;
  border-left: 3px solid var(--accent, #3b82f6);
  background: color-mix(in srgb, var(--accent, #3b82f6) 8%, transparent);
  border-radius: 0 6px 6px 0;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.kpi-card {
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px;
}

.kpi-card.kpi-warn { border-color: var(--warn); }

.kpi-card.kpi-good {
  border-color: var(--success, #3d9a6a);
}

.kpi-hint {
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.link-btn:hover {
  text-decoration: underline;
}

.menu-wrap {
  position: relative;
  display: inline-block;
}

.menu-pop {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 40;
  min-width: 140px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel, #171a21);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.menu-pop.hidden {
  display: none;
}

.menu-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text, #e8e8e8);
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}

.menu-item:hover {
  background: rgba(78, 161, 255, 0.12);
  color: var(--accent);
}

.kpi-date-card {
  min-width: 200px;
}

.kpi-date-fields {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.kpi-date-fields .input {
  width: 100%;
}

.kpi-date-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.kpi-date-hint {
  font-size: 11px;
}

.kpi-label {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.kpi-value {
  font-size: 22px;
  font-weight: 600;
  font-family: var(--mono);
}

.table-compact {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table-compact th,
.table-compact td {
  border-bottom: 1px solid var(--border-soft);
  padding: 8px 10px;
  text-align: left;
  vertical-align: middle;
}

.table-compact th {
  color: var(--muted);
  font-weight: 500;
}

.row-overdue { background: rgba(230, 184, 77, 0.08); }
.row-delivered td:first-child { box-shadow: inset 3px 0 0 #3ecf7a; }
.row-overdue td { border-bottom-color: rgba(230, 184, 77, 0.25); }

.badge-warn {
  background: rgba(230, 184, 77, 0.18);
  color: var(--warn);
}

.contact-masked {
  border: 1px dashed var(--warn);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(230, 184, 77, 0.06);
}

.warn-text { color: var(--warn); font-size: 13px; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 10px 0;
}

.drawer-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-soft);
}

.drawer-section:last-child { border-bottom: 0; }

.drawer-section h4 {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.center { text-align: center; }

.btn-xs {
  padding: 2px 6px;
  font-size: 11px;
}

.inline-field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.topbar-actions.hidden { display: none; }

.crm-actions {
  white-space: nowrap;
  vertical-align: middle;
}

.crm-actions .btn {
  display: inline-block;
  vertical-align: middle;
  margin-right: 4px;
}

.crm-actions .btn:last-child {
  margin-right: 0;
}

.col-crm-email {
  max-width: 260px;
  width: 220px;
}

.crm-email-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.crm-email-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-gmail-btn {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 1px 7px;
  font-size: 11px;
  line-height: 1.4;
}

.crm-name-link {
  color: var(--accent, #7db7ff);
  text-decoration: none;
  font-weight: 600;
}

.crm-name-link:hover {
  text-decoration: underline;
}

.crm-source-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 168px;
  overflow: hidden;
  color: var(--accent, #7db7ff);
  text-decoration: none;
}

.crm-source-link:hover .crm-source-text {
  text-decoration: underline;
}

.crm-source-icon {
  flex: 0 0 auto;
  font-size: 11px;
  opacity: 0.85;
}

.crm-source-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.crm-source-tag {
  display: inline-block;
  max-width: 168px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--border, #333);
  background: #1a1a1a;
  font-size: 11px;
  color: var(--muted, #aaa);
}

.crm-avatar-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: #222;
  display: block;
}

.crm-avatar-thumb.broken { opacity: 0.35; }

.crm-avatar-ph {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px dashed #444;
  color: var(--muted-2);
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #151515;
}

.crm-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}

.crm-edit-grid .field-span-2 { grid-column: 1 / -1; }

/* 关注领域多标签 */
.beat-topics-field {
  width: 100%;
}

.beat-topics-wrap {
  position: relative;
  width: 100%;
}

.beat-topics-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel-2, #121212);
  cursor: text;
}

.beat-topics-box:focus-within {
  border-color: rgba(78, 161, 255, 0.45);
  box-shadow: 0 0 0 2px rgba(78, 161, 255, 0.12);
}

.beat-topics-chips {
  display: contents;
}

.beat-topic-chip,
.beat-topic-chip-view {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(78, 161, 255, 0.28);
  background: rgba(78, 161, 255, 0.1);
  color: var(--text);
  font-size: 12px;
  line-height: 1.4;
  word-break: break-word;
}

.beat-topic-chip-view {
  margin: 0 4px 2px 0;
}

.beat-topic-chip-x {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 0 0 2px;
}

.beat-topic-chip-x:hover {
  color: var(--text);
}

.beat-topics-search {
  flex: 1 1 120px;
  min-width: 120px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  padding: 2px 4px;
}

.beat-topics-search::placeholder {
  color: var(--muted-2, var(--muted));
}

.beat-topics-dropdown {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 4px;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel, #1a1a1a);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.beat-topics-dropdown.hidden {
  display: none;
}

.beat-topics-option {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
}

.beat-topics-option:hover,
.beat-topics-option.is-active {
  background: rgba(78, 161, 255, 0.12);
  color: var(--accent, #4ea1ff);
}

.beat-topics-empty {
  padding: 10px 12px;
}

.beat-topics-hint {
  margin: 6px 0 0;
}

.beat-topics-view-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 0;
}

.crm-avatar-edit {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.crm-avatar-edit .avatar-preview-slot {
  flex-shrink: 0;
}

.crm-avatar-edit .field {
  flex: 1;
  margin: 0;
}

@media (max-width: 720px) {
  .crm-edit-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

.charts-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 14px;
  margin: 14px 0 8px;
}

.chart-box {
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 12px;
  min-height: 220px;
}

.chart-title {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.social-links-display {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.45;
  max-width: 100%;
}

.social-link-line {
  display: block;
  width: 100%;
}

.social-link-label {
  color: var(--muted);
  margin-right: 2px;
}

#resultTable td .social-links-display,
#resultCards .social-links-display {
  min-width: 160px;
  max-width: 320px;
}

.log-error-banner {
  background: rgba(240, 113, 120, 0.12);
  border: 1px solid rgba(240, 113, 120, 0.35);
  color: var(--danger);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 13px;
}

@media (max-width: 1100px) {
  .charts-grid { grid-template-columns: 1fr; }
}

.col-article-shot {
  width: 96px;
  min-width: 96px;
}

.article-shot-thumb {
  width: 88px;
  height: 56px;
  object-fit: cover;
  object-position: top center;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #1a1a1a;
  display: block;
}

.article-shot-thumb.broken { opacity: 0.35; }

.article-shot-lg {
  width: 220px;
  height: 140px;
}

.article-shot-ph {
  width: 88px;
  height: 56px;
  border-radius: 6px;
  border: 1px dashed #444;
  color: var(--muted-2);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #151515;
}

.article-title-cell {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.col-check {
  width: 36px;
  text-align: center;
}

/* 用户管理：行级多选必须在「用户名」列前，与表头全选对齐 */
#usersTable .col-check {
  width: 40px;
  min-width: 40px;
  max-width: 44px;
  padding-left: 10px;
  padding-right: 6px;
  text-align: center;
  vertical-align: middle;
}
#usersTable .col-check input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 0;
  padding: 0;
  accent-color: var(--accent);
  cursor: pointer;
  vertical-align: middle;
  flex-shrink: 0;
}
#usersTable .col-username {
  white-space: nowrap;
}

.divider-v {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 4px;
  align-self: center;
}

.article-shot-btn {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: block;
}

.user-role-select {
  min-width: 120px;
}

.shot-lightbox-card {
  max-width: min(960px, 96vw);
}

.shot-lightbox-body {
  text-align: center;
}

.shot-lightbox-img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  object-fit: contain;
  background: #111;
}

.shot-lightbox-actions {
  margin-top: 10px;
}

.press-price-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 50vh;
  overflow: auto;
}

.press-price-row {
  display: grid;
  grid-template-columns: 1fr minmax(140px, 180px);
  gap: 12px;
  align-items: end;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.press-price-url {
  word-break: break-all;
  color: var(--text);
  line-height: 1.4;
  padding-bottom: 6px;
}

@media (max-width: 720px) {
  .press-price-row {
    grid-template-columns: 1fr;
  }
}

.press-manual-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.col-press-shot {
  width: 72px;
}

.press-shot-preview img {
  max-width: 220px;
  max-height: 140px;
  border-radius: 6px;
  border: 1px solid var(--border);
  object-fit: cover;
}

.press-cost-btn {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
  font: inherit;
}

.press-cost-btn:hover {
  color: var(--accent);
}

.press-cost-note-thread {
  max-height: 320px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.press-cost-note-item {
  border-bottom: 1px solid var(--border-soft, var(--border));
  padding-bottom: 8px;
}

.press-cost-note-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.press-cost-note-text {
  white-space: pre-wrap;
  line-height: 1.45;
}

.press-owner-select {
  min-width: 88px;
  max-width: 120px;
}

.version-btn {
  display: inline;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  vertical-align: baseline;
}

.version-btn:hover #appVersion,
.version-btn:focus-visible #appVersion {
  color: var(--accent);
  text-decoration: underline;
}

.changelog-card {
  max-width: min(520px, 94vw);
}

.changelog-body {
  max-height: min(60vh, 480px);
  overflow: auto;
}

.changelog-ver-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.changelog-ver {
  font-family: var(--mono, ui-monospace, monospace);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--accent);
}

.changelog-list {
  margin: 0;
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
  line-height: 1.45;
}

.changelog-history {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.changelog-history summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.9rem;
  user-select: none;
}

.changelog-history-block {
  margin-top: 12px;
}

.changelog-history-block .changelog-ver {
  font-size: 0.95rem;
}

/* —— 联盟可视化复盘看板（暗色 UI 统一配色 + 规整网格） —— */
.review-shell {
  background: var(--panel);
  border: 1px solid var(--border);
}

.review-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
  margin: 0 0 10px;
  padding: 10px 12px;
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}

.review-toolbar .field {
  margin: 0;
  min-width: 0;
}

.review-status {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 12px;
}

.review-status p,
#pbBoardStatus,
#awinBoardStatus,
#impactBoardStatus {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

.review-status p.is-error,
#pbBoardStatus.is-error {
  color: var(--danger, #e11d48);
}

.review-board {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.review-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
}

.review-title {
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-weight: 650;
  color: var(--text);
  letter-spacing: 0.01em;
}

.review-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.report-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

.review-toolbar-actions {
  margin: 0;
  flex-shrink: 0;
}

.report-toolbar .btn-sm,
.btn.btn-sm {
  padding: 4px 10px;
  font-size: 12.5px;
  line-height: 1.3;
}

.report-toolbar .menu-pop {
  min-width: 168px;
}

/* Markdown 周报（含 details 折叠清单） */
.md-report {
  margin: 0 0 14px;
  padding: 14px 16px;
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text);
}

.md-report--empty {
  color: var(--muted);
}

.md-report h1,
.md-report h2,
.md-report h3 {
  margin: 14px 0 8px;
  font-weight: 650;
  color: var(--text);
}

.md-report h1 { font-size: 1.15rem; }
.md-report h2 { font-size: 1.05rem; }
.md-report h3 { font-size: 0.95rem; }

.md-report p { margin: 6px 0; }
.md-report ul { margin: 6px 0 10px 1.1rem; padding: 0; }
.md-report li { margin: 3px 0; }
.md-report hr {
  border: 0;
  border-top: 1px solid var(--border-soft);
  margin: 14px 0;
}
.md-report blockquote {
  margin: 8px 0;
  padding: 6px 10px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  background: rgba(78, 161, 255, 0.06);
}

.md-report details {
  margin: 10px 0 14px;
  padding: 8px 10px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.md-report summary {
  cursor: pointer;
  font-weight: 650;
  color: var(--accent);
  list-style: none;
  outline: none;
}

.md-report summary::-webkit-details-marker {
  display: none;
}

.md-report summary::before {
  content: "▸ ";
  color: var(--muted);
}

.md-report details[open] summary::before {
  content: "▾ ";
}

.md-report .md-table {
  margin-top: 8px;
  font-size: 12.5px;
}

/* 全局诊断级联菜单 + 月度目标 */
.diag-cascade {
  min-width: 280px;
  padding: 10px;
  right: 0;
}

.diag-cascade-section {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
}

.diag-cascade-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}

.diag-radio {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  margin: 4px 0;
  cursor: pointer;
}

.diag-period-fields {
  padding-left: 4px;
}

.diag-cascade-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.diag-scope-banner {
  margin: 0 0 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(78, 161, 255, 0.1);
  border: 1px solid rgba(78, 161, 255, 0.28);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

.diag-ask-panel {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.diag-ask-title {
  font-weight: 650;
  font-size: 14px;
  margin-bottom: 4px;
}

.diag-ask-engine-selector {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: 0 0 10px;
}

.diag-ask-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 16px;
  margin: 0 0 10px;
}

.diag-ask-thread {
  max-height: min(52vh, 520px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--panel);
}

.diag-ask-thread:empty {
  display: none;
}

.diag-ask-bubble {
  max-width: min(920px, 96%);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: var(--panel-2);
}

.diag-ask-bubble-user {
  align-self: flex-end;
  background: var(--accent-dim, rgba(56, 132, 255, 0.12));
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border-soft));
}

.diag-ask-bubble-assistant {
  align-self: flex-start;
}

.diag-ask-bubble-role {
  margin: 0 0 6px;
  font-weight: 600;
}

.diag-ask-bubble-body {
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
}

.diag-ask-bubble-body .diag-ask-answer {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.diag-ask-engine-selector .filter-inline {
  gap: 6px;
}

.diag-ask-model-field {
  min-width: 260px;
}

.diag-ask-model-field .field-label {
  margin-bottom: 2px;
}

.diag-ask-model-field select {
  min-width: 260px;
  max-width: 420px;
}

.diag-ask-composer {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-wrap: wrap;
}

.diag-ask-input-shell {
  flex: 1 1 320px;
  min-width: 240px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--panel);
  padding: 8px 10px 6px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.diag-ask-input-shell:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(78, 161, 255, 0.18);
}

.diag-ask-chips-in {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border-soft);
}

.diag-ask-chip {
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11.5px;
  line-height: 1.3;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.diag-ask-chip:hover,
.diag-ask-chip.is-active {
  border-color: var(--accent);
  background: rgba(78, 161, 255, 0.12);
}

.diag-ask-textarea {
  width: 100%;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  resize: vertical;
  min-height: 52px;
  padding: 4px 2px 8px !important;
  font-size: 13px;
  line-height: 1.45;
}

.diag-ask-composer > #mergedAskBtn {
  align-self: flex-end;
  min-width: 88px;
  height: 40px;
}

.diag-ask-progress {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(78, 161, 255, 0.35);
  background: rgba(78, 161, 255, 0.1);
}

.diag-ask-progress-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.diag-ask-progress-head #mergedAskElapsed {
  margin-left: auto;
}

.diag-ask-steps {
  margin: 10px 0 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 6px;
  font-size: 12.5px;
}

.diag-ask-steps li {
  padding: 6px 10px;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.12);
  color: var(--muted);
}

.diag-ask-steps li.is-active {
  color: var(--text);
  background: rgba(78, 161, 255, 0.18);
  font-weight: 600;
}

.diag-ask-steps li.is-done {
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
}

.diag-ask-steps li.is-error {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.12);
}

.diag-ask-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(78, 161, 255, 0.08);
  color: var(--muted);
  font-size: 13px;
}

.diag-ask-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(78, 161, 255, 0.25);
  border-top-color: var(--accent);
  animation: diag-ask-spin 0.8s linear infinite;
  flex: 0 0 auto;
}

@keyframes diag-ask-spin {
  to { transform: rotate(360deg); }
}

.diag-ask-answer {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  background: var(--panel);
  font-size: 13px;
  line-height: 1.55;
}

.diag-ask-answer .diag-ask-meta {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.diag-ask-answer table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 12px;
  font-size: 12px;
}

.diag-ask-answer th,
.diag-ask-answer td {
  border-bottom: 1px solid var(--border-soft);
  padding: 6px 8px;
  text-align: left;
}

.diag-ask-answer th { color: var(--muted); font-weight: 600; }

.diag-ask-section {
  margin: 10px 0 6px;
  font-weight: 650;
}

.card-inset {
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.target-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.target-settings-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.target-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.target-card {
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 12px;
  min-width: 0;
}

.target-card--wide {
  grid-column: span 1;
}

.target-card-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.target-card-value {
  font-size: 1.15rem;
  font-weight: 700;
  font-family: var(--mono);
}

.target-card-sub {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.target-card-sub.ok { color: var(--success, #3ecf8e); }
.target-card-sub.bad { color: var(--danger, #ff6b6b); }

.target-card-footer {
  font-size: 13px;
  line-height: 1.45;
}

.target-bar {
  margin-top: 10px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.target-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s ease;
}

.target-bar--ahead { background: #3ecf8e; }
.target-bar--ontrack { background: #4ea1ff; }
.target-bar--behind { background: #ff6b6b; }

@media (max-width: 900px) {
  .target-progress {
    grid-template-columns: 1fr;
  }
}




.review-hero {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.review-hero-card--warn {
  border-color: color-mix(in srgb, var(--warn) 55%, var(--border-soft));
  background: color-mix(in srgb, var(--warn) 10%, var(--panel-2));
}

.review-hero-card--warn .review-hero-value {
  color: var(--warn);
}

.review-core-notes {
  padding: 10px 12px;
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
}

.review-core-notes-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.review-core-notes ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.review-core-notes strong {
  color: var(--text);
}

.review-category {
  padding: 12px;
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}

.review-category-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.wow-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wow-pill {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--mono);
}

.wow-pill.wow-up {
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 40%, var(--border));
  background: color-mix(in srgb, var(--success) 12%, transparent);
}

.wow-pill.wow-down {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 40%, var(--border));
  background: color-mix(in srgb, var(--danger) 12%, transparent);
}

.review-hero-dense {
  margin-bottom: 12px;
}

.review-alert-list {
  margin: 0 0 10px;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
}

.review-alert-list .sev-critical { color: var(--danger); }
.review-alert-list .sev-high { color: var(--warn); }
.review-alert-list .sev-medium { color: var(--text); }

.review-diag-card {
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.review-diag-title {
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 4px;
}

/* —— 合并总看板 · AI 诊断报告 —— */
.diag-report {
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.diag-report--empty {
  min-height: 120px;
  justify-content: center;
}

.diag-empty {
  text-align: center;
  padding: 18px 12px;
}

.diag-empty-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.diag-top {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.diag-score-wrap {
  position: relative;
  width: 112px;
  height: 112px;
  margin: 0 auto;
}

.diag-ring {
  width: 112px;
  height: 112px;
}

.diag-ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 8;
}

.diag-ring-value {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dasharray 0.4s ease;
}

.diag-ring-value.tone-good { stroke: var(--success); }
.diag-ring-value.tone-warn { stroke: var(--warn); }
.diag-ring-value.tone-bad { stroke: var(--danger); }
.diag-ring-value.tone-muted { stroke: var(--muted); }

.diag-score-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.diag-score-num {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}

.diag-report--good .diag-score-num { color: var(--success); }
.diag-report--warn .diag-score-num { color: var(--warn); }
.diag-report--bad .diag-score-num { color: var(--danger); }

.diag-score-label {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

.diag-hero-copy {
  min-width: 0;
}

.diag-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.diag-chip {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.diag-chip--gm {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: var(--accent-dim);
}

.diag-chip--dp {
  color: #7dd3c7;
  border-color: color-mix(in srgb, #7dd3c7 45%, var(--border));
  background: rgba(125, 211, 199, 0.12);
}

.diag-chip--fb {
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 40%, var(--border));
}

.diag-chip--alert {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 40%, var(--border));
  background: color-mix(in srgb, var(--danger) 10%, transparent);
}

.diag-headline {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--text);
  line-height: 1.4;
}

.diag-narrative {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.diag-tilt {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border-soft));
  background: var(--accent-dim);
  font-size: 12.5px;
  color: var(--text);
}

.diag-tilt-label {
  flex-shrink: 0;
  font-weight: 600;
  color: var(--accent);
}

.diag-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.diag-col {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 12px;
  min-width: 0;
}

.diag-col-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.diag-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}

.diag-col--wins {
  border-top: 2px solid var(--success);
}
.diag-col--wins .diag-dot { background: var(--success); }

.diag-col--risks {
  border-top: 2px solid var(--danger);
}
.diag-col--risks .diag-dot { background: var(--danger); }

.diag-col--actions {
  border-top: 2px solid var(--accent);
}
.diag-col--actions .diag-dot { background: var(--accent); }

.diag-col ul {
  margin: 0;
  padding-left: 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text);
}

.diag-plan {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.diag-plan-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--border-soft);
}

.diag-plan-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.diag-pri {
  font-size: 11px;
  font-weight: 700;
  font-family: var(--mono);
  height: fit-content;
  text-align: center;
  padding: 4px 0;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.diag-pri--p0 {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 45%, var(--border));
  background: color-mix(in srgb, var(--danger) 12%, transparent);
}
.diag-pri--p1 {
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 45%, var(--border));
  background: color-mix(in srgb, var(--warn) 12%, transparent);
}
.diag-pri--p2 {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: var(--accent-dim);
}

.diag-plan-focus {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.diag-plan-action {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--text);
}

.diag-platforms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.diag-plat-card {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--panel);
}

.diag-plat-name {
  font-size: 11px;
  font-weight: 650;
  color: var(--accent);
  margin-bottom: 6px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.diag-plat-text {
  font-size: 12.5px;
  color: var(--text);
  line-height: 1.45;
}

@media (max-width: 900px) {
  .diag-cols,
  .diag-platforms {
    grid-template-columns: 1fr;
  }
  .diag-top {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .diag-badges {
    justify-content: center;
  }
  .diag-tilt {
    text-align: left;
  }
}

.review-hero-card {
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 12px 14px;
  min-height: 86px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.review-hero-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.review-hero-value {
  font-size: 1.35rem;
  font-weight: 650;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  font-family: var(--mono);
}

.review-hero-sub {
  margin-top: 6px;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

/* 左右两列严格对齐：上图+产品 / 下渠道+达人 */
.review-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "daily products"
    "channels influencers";
  gap: 10px;
  align-items: stretch;
}

.review-panel {
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 12px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.review-panel-daily { grid-area: daily; }
.review-panel-products { grid-area: products; }
.review-panel-channels { grid-area: channels; }
.review-panel-influencers { grid-area: influencers; }

.review-panel-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 10px;
  letter-spacing: 0.02em;
}

.review-chart {
  width: 100%;
  min-height: 168px;
  flex: 1;
}

.review-chart svg {
  width: 100%;
  height: auto;
  display: block;
}

.review-bars {
  display: flex;
  flex-direction: column;
  gap: 11px;
  justify-content: center;
  flex: 1;
  min-height: 140px;
}

.review-bar-row {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: center;
}

.review-bar-label {
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.review-bar-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.review-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  min-width: 0;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent);
}

.review-bar-pct {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: var(--mono);
}

.review-panel .table-wrap {
  flex: 1;
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
}

.review-table {
  margin: 0;
}

.review-table th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1;
}

.review-table td,
.review-table th {
  font-size: 12px;
  border-color: var(--border-soft);
}

.review-table td {
  color: var(--text);
}

.review-table tbody tr:hover td {
  background: var(--accent-dim);
}

.review-raw {
  margin-top: 14px;
  border-top: 1px solid var(--border-soft);
  padding-top: 10px;
  color: var(--muted);
}

.review-raw summary {
  cursor: pointer;
  user-select: none;
  font-size: 0.88rem;
  color: var(--muted);
}

.review-raw summary:hover {
  color: var(--accent);
}

@media (max-width: 1100px) {
  .review-hero {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .review-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "daily"
      "channels"
      "products"
      "influencers";
  }
  .review-panel .table-wrap {
    max-height: none;
  }
}

@media (max-width: 560px) {
  .review-hero {
    grid-template-columns: 1fr;
  }
  .review-bar-row {
    grid-template-columns: 84px minmax(0, 1fr) 40px;
  }
  .review-hero-value {
    font-size: 1.2rem;
  }
}

/* 取消佣金 / 高风险联盟商监控 */
.review-cancel {
  margin-top: 14px;
  padding: 12px;
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}

.review-cancel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 10px;
  margin-top: 10px;
}

.cancel-risk-banner {
  margin: 10px 0 4px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(180, 40, 40, 0.18);
  border: 1px solid rgba(255, 107, 107, 0.45);
  color: #ffc9c9;
  font-size: 13px;
  line-height: 1.45;
}

.cancel-risk-banner--ok {
  background: rgba(40, 120, 70, 0.12);
  border-color: rgba(80, 180, 110, 0.35);
  color: #b8e0c4;
}

.cancel-risk-banner-title {
  font-weight: 700;
  margin-bottom: 4px;
  color: #ff8a8a;
}

.cancel-risk-names {
  margin: 6px 0 0;
  font-size: 12px;
  color: #ffb4b4;
}

.risk-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.risk-pill--high {
  background: rgba(255, 80, 80, 0.2);
  color: #ff6b6b;
  border: 1px solid rgba(255, 107, 107, 0.5);
}

.risk-pill--medium {
  background: rgba(240, 192, 64, 0.15);
  color: #f0c040;
  border: 1px solid rgba(240, 192, 64, 0.45);
}

.risk-pill--low {
  background: rgba(120, 120, 120, 0.15);
  color: #aaa;
  border: 1px solid rgba(140, 140, 140, 0.35);
}

@media (max-width: 960px) {
  .review-cancel-grid {
    grid-template-columns: 1fr;
  }
  .review-grid {
    grid-template-columns: 1fr !important;
  }
  .press-toolbar {
    width: 100%;
  }
  .press-toolbar > .input,
  .press-toolbar > select,
  .press-toolbar > label {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
  }
  #logsTable {
    min-width: 640px;
  }
  .main {
    min-width: 0;
  }
  .col-press-shot img,
  .col-article-shot img {
    max-width: 72px;
    height: auto;
  }
}



/* ���� ��Ʒ�����������̨�������ش�̨���֣� ���� */
.radar-console {
  --radar-cyan: #3ecfcf;
  --radar-border: #5a5a5a;
  --radar-panel: #1a1a1a;
}
.radar-block {
  border: 1px solid var(--radar-border);
  background: var(--radar-panel);
  border-radius: 4px;
  padding: 14px 16px 16px;
  margin: 12px 0;
}
.radar-block-title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--radar-cyan);
  letter-spacing: 0.02em;
}
.radar-kw-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-bottom: 10px;
}
.radar-import-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid #777;
  border-radius: 4px;
  background: #2a2a2a;
  color: #e8e8e8;
  cursor: pointer;
  font-size: 0.92rem;
}
.radar-import-btn:hover { border-color: var(--radar-cyan); color: #fff; }
.radar-import-icon { color: var(--radar-cyan); font-size: 1rem; }
.radar-import-status { color: #c8c8c8; font-size: 0.9rem; }
.radar-kw-area {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #666;
  border-radius: 3px;
  background: #111;
  color: #f0f0f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
  line-height: 1.45;
}
.radar-kw-area:focus {
  outline: none;
  border-color: var(--radar-cyan);
}
.radar-kw-area.is-dragover {
  border-color: var(--radar-cyan);
  box-shadow: 0 0 0 2px rgba(62, 207, 207, 0.25);
}
.radar-country-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}
.radar-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #e0e0e0;
  font-size: 0.95rem;
  cursor: pointer;
  user-select: none;
}
.radar-check input { accent-color: var(--radar-cyan); width: 15px; height: 15px; }
.radar-opts-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  margin-bottom: 12px;
}
.radar-opts-row--slider { margin-bottom: 0; }
.radar-opt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ddd;
  font-size: 0.95rem;
  margin: 0;
}
.radar-opt--grow { flex: 1; min-width: 260px; }
.radar-input-num {
  width: 64px;
  padding: 4px 8px;
  border: 1px solid #666;
  border-radius: 3px;
  background: #111;
  color: #fff;
  text-align: center;
}
.radar-select {
  min-width: 180px;
  padding: 5px 8px;
  border: 1px solid #666;
  border-radius: 3px;
  background: #111;
  color: #fff;
}
.radar-opt input[type="range"] {
  flex: 1;
  min-width: 140px;
  accent-color: var(--radar-cyan);
}
.radar-interval-val {
  color: var(--radar-cyan);
  font-variant-numeric: tabular-nums;
  min-width: 3.2em;
}
.radar-progress-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.radar-progress-label {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  color: #ccc;
  white-space: nowrap;
}
.radar-progress-track {
  flex: 1;
  min-width: 120px;
  height: 8px;
  border: 1px solid #666;
  border-radius: 2px;
  background: #111;
  overflow: hidden;
}
.radar-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #2a9d9d, var(--radar-cyan));
  transition: width 0.35s ease;
}
.radar-quota {
  color: #e8a838;
  font-size: 0.9rem;
  white-space: nowrap;
}
.radar-advanced {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px dashed #444;
  border-radius: 4px;
  color: #aaa;
}
.radar-advanced summary {
  cursor: pointer;
  color: var(--radar-cyan);
  font-weight: 600;
}
.radar-log {
  max-height: 220px;
  overflow: auto;
  padding: 10px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 6px;
  border: 1px solid #333;
}
.radar-dash-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.radar-dash-kpi {
  border: 1px solid #444;
  border-radius: 4px;
  padding: 10px 12px;
  background: #111;
}
.radar-dash-kpi-label {
  display: block;
  font-size: 0.75rem;
  color: #999;
  margin-bottom: 4px;
}
.radar-dash-kpi strong {
  color: var(--radar-cyan);
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
}
.radar-stream-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.radar-stream-panel {
  max-height: 280px;
  overflow: auto;
  padding: 8px 10px;
  background: #0d0d0d;
  border: 1px solid #444;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.radar-stream-empty { padding: 16px; text-align: center; }
.radar-stream-row {
  display: grid;
  grid-template-columns: 64px 56px 1fr;
  gap: 8px;
  align-items: start;
  padding: 6px 8px;
  border-left: 3px solid #555;
  background: rgba(255,255,255,0.03);
  animation: radarStreamIn 0.35s ease;
}
.radar-stream-row.is-accepted { border-left-color: #3ecfcf; }
.radar-stream-row.is-rejected { border-left-color: #e08a3c; }
.radar-stream-row.is-info { border-left-color: #7a7a7a; }
.radar-stream-time { color: #888; font-size: 0.78rem; }
.radar-stream-tag {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #bbb;
}
.radar-stream-body { color: #e8e8e8; word-break: break-word; line-height: 1.35; }
.radar-stream-body a { color: var(--radar-cyan); }
@keyframes radarStreamIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}
.radar-input-text {
  min-width: 180px;
  flex: 1;
  padding: 5px 8px;
  border: 1px solid #666;
  border-radius: 3px;
  background: #111;
  color: #fff;
}
.radar-serper-masked-list { max-height: 100px; overflow: auto; }
@media (max-width: 720px) {
  .radar-opts-row { gap: 12px; }
  .radar-progress-foot { flex-direction: column; align-items: stretch; }
  .radar-quota { text-align: right; }
  .radar-stream-row { grid-template-columns: 1fr; }
}

/* —— DTC运营 · 独立站报告嵌入 —— */
.panel-dtc {
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 88px);
}
.panel-dtc.hidden { display: none !important; }
.dtc-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(255,255,255,0.02);
}
.dtc-toolbar-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dtc-toolbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.dtc-frame-wrap {
  flex: 1;
  min-height: 0;
  background: #f5f6f8;
}
.dtc-frame {
  width: 100%;
  height: calc(100vh - 150px);
  min-height: 640px;
  border: 0;
  display: block;
  background: #f5f6f8;
}

.secrets-summary { margin: 8px 0 14px; }
.secrets-groups { display: flex; flex-direction: column; gap: 18px; }
.secrets-group-title { margin: 0 0 8px; font-size: 14px; font-weight: 600; }

/* —— KOL · INS 数据清洗（主系统配色 / 原子板块布局） —— */
.ins-busy {
  margin: 0 0 12px;
  padding: 8px 10px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--accent-dim);
  color: var(--text);
}

.ins-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 8px;
}

.ins-block {
  border: 1px solid var(--border-soft);
  background: var(--panel-2);
  border-radius: var(--radius);
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ins-block-span {
  grid-column: 1 / -1;
}

.ins-block-title {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
  letter-spacing: 0.01em;
}

.ins-block .field {
  margin-top: 4px;
}

.ins-input-lg {
  min-height: 144px;
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.45;
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
}

.ins-block-actions {
  margin-top: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.ins-inline-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px 12px;
}

.ins-inline-fields .field.grow {
  flex: 1 1 220px;
  min-width: 180px;
  margin-top: 0;
}

.ins-limit-field {
  flex: 0 0 110px;
  margin-top: 0;
}

.ins-limit-field .input-sm {
  min-width: 0;
  width: 100%;
}

.ins-results-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  margin: 0 0 8px;
}

.ins-results-toolbar .ins-input-lg {
  flex: 1 1 240px;
  min-width: 180px;
  min-height: 40px;
  height: 40px;
  padding: 8px 12px;
  font-size: 14px;
  resize: none;
}

.ins-results-toolbar .input:not(.ins-input-lg) {
  flex: 0 1 140px;
  min-width: 110px;
}

.ins-sync-hint {
  margin: 0 0 10px;
}

.ins-result {
  margin-top: 0;
}

.ins-results-pager {
  margin-top: 10px;
  justify-content: flex-end;
  gap: 8px;
}

#insResultsTable .col-check {
  width: 36px;
  text-align: center;
}

#insResultsTable td.mono a {
  word-break: break-all;
}

.ins-result-meta {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.ins-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ins-result-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 12px;
  min-width: 0;
}

.ins-result-card h4 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 650;
}

.ins-result-card p {
  margin: 0 0 6px;
}

.ins-result-card a {
  color: var(--accent);
  word-break: break-all;
}

.ins-metric-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.ins-metric-row strong {
  color: var(--text);
  font-weight: 600;
}

@media (max-width: 900px) {
  .ins-tool-grid {
    grid-template-columns: 1fr;
  }
  .ins-result-grid {
    grid-template-columns: 1fr;
  }
  .ins-block-span {
    grid-column: auto;
  }
}

/* —— KOL · YT 视频效果分析（对齐 Nox 报告卡） —— */
.yt-tool-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin: 0 0 12px;
}

.yt-tool-row .field.grow {
  flex: 1 1 280px;
  min-width: 0;
  margin: 0;
}

.yt-tool-actions {
  padding-bottom: 2px;
}

.yt-report {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.yt-report-hero {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.yt-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: calc(var(--radius) - 2px);
  background: var(--bg);
}

.yt-report-kicker {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.yt-title {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 650;
}

.yt-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.yt-metric-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--panel-2);
  padding: 14px 14px 12px;
  min-width: 0;
}

.yt-metric-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.yt-metric-value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
  word-break: break-word;
}

.yt-metric-sub {
  margin-top: 6px;
}

.yt-section {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--panel-2);
  padding: 12px 14px 14px;
}

.yt-section-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 650;
}

.yt-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.yt-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--bg);
  font-size: 12px;
  color: var(--text);
}

.yt-desc {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  max-height: 280px;
  overflow: auto;
}

@media (max-width: 900px) {
  .yt-report-hero {
    grid-template-columns: 1fr;
  }
  .yt-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .yt-metric-grid {
    grid-template-columns: 1fr;
  }
}

/* 主域名联系人抓取结果 · 媒体库 */
.media-kpis {
  margin: 14px 0;
}

.media-name {
  font-weight: 650;
  margin-bottom: 3px;
}

.media-contact-stack {
  min-width: 220px;
  line-height: 1.65;
}

.media-reason {
  margin-top: 5px;
  max-width: 150px;
  word-break: break-word;
}

.badge-danger {
  color: #ff7b7b;
  border-color: rgba(255, 85, 85, 0.35);
  background: rgba(255, 85, 85, 0.08);
}

.media-detail-card {
  width: min(880px, calc(100vw - 40px));
  max-width: 880px;
}

.media-detail-section {
  border-bottom: 1px solid var(--border-soft);
  padding: 4px 0 14px;
  margin-bottom: 14px;
}

.media-detail-section h4 {
  margin: 0 0 8px;
  font-size: 14px;
}

.media-detail-list {
  display: grid;
  gap: 8px;
}

.media-detail-item {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 8px 10px;
  overflow-wrap: anywhere;
}

.media-review-list {
  margin: 0;
  padding-left: 20px;
  color: var(--warn);
  font-size: 13px;
}

/* Contacts · Monday 风格列表与邮件时间线 */
.contacts-create-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto auto;
  gap: 8px;
  padding: 0 16px 12px;
  align-items: center;
}
.contacts-create-form.hidden { display: none; }
.contacts-row { cursor: pointer; }
.contacts-row:hover { background: rgba(255, 255, 255, 0.03); }
.contacts-activity-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--panel-2, #1a1a1a);
  font-size: 12px;
}
.contacts-mail-icon { display: block; }
.contacts-drawer {
  position: fixed;
  inset: 0;
  z-index: 82;
}
.contacts-drawer.hidden { display: none; }
.contacts-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.contacts-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(560px, 100%);
  height: 100%;
  background: var(--bg-elevated, #141414);
  border-left: 1px solid var(--border-soft);
  padding: 16px 18px 28px;
  overflow: auto;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.35);
}
.contacts-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.contacts-timeline {
  position: relative;
  padding-left: 18px;
}
.contacts-timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--border-soft);
}
.contacts-tl-item {
  position: relative;
  margin-bottom: 14px;
}
.contacts-tl-dot {
  position: absolute;
  left: -16px;
  top: 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4ea1ff;
  box-shadow: 0 0 0 3px rgba(78, 161, 255, 0.18);
}
.contacts-tl-card {
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--panel-2, #1a1a1a);
  padding: 10px 12px;
}
.contacts-tl-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.contacts-tl-subject {
  margin: 0 0 6px;
  font-size: 14px;
}
.contacts-tl-body summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
}
.contacts-tl-html {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: normal;
}
@media (max-width: 900px) {
  .contacts-create-form { grid-template-columns: 1fr 1fr; }
  .contacts-drawer-panel { width: 100%; }
}

/* Guest Post 看板（PR主看板二级） */
.gp-name {
  font-weight: 600;
}
.gp-type {
  display: inline-block;
  font-size: 12px;
  color: var(--muted);
}
.gp-price-cell {
  min-width: 140px;
}
.gp-price {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  line-height: 1.35;
}
.gp-price-lg {
  font-size: 20px;
  margin: 4px 0 6px;
}
.gp-detail-price {
  padding: 12px 14px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2, #1a1a1a);
}

/* 新闻稿分发看板（PR主看板二级） */
.pd-name {
  font-weight: 600;
}
.pd-coverage {
  max-width: 280px;
  line-height: 1.4;
  color: var(--text);
}
.pd-price-cell {
  min-width: 148px;
}
.pd-price {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  line-height: 1.35;
}
.pd-price-lg {
  font-size: 20px;
  margin: 4px 0 6px;
}
.pd-package {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.35;
}
.pd-link-type {
  display: inline-block;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--panel-2, #1a1a1a);
}
.pd-detail-price {
  padding: 12px 14px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2, #1a1a1a);
}
.pd-detail-price .pd-package {
  font-size: 14px;
  color: var(--text);
  margin: 0 0 6px;
}
.pd-editable {
  cursor: text;
  border-radius: 4px;
  padding: 2px 4px;
  margin: 0 -4px;
  border: 1px solid transparent;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.pd-editable:hover,
.pd-editable:focus {
  border-color: var(--border);
  background: var(--panel, rgba(255, 255, 255, 0.03));
  outline: none;
}
.pd-editable-ph {
  font-style: italic;
}
.pd-inline-input {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
}
.pd-inline-textarea {
  min-height: 72px;
  resize: vertical;
  font: inherit;
  line-height: 1.45;
}
.pd-notes-section {
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
  background: var(--panel-2, rgba(255, 255, 255, 0.02));
}
.pd-notes-section h4 {
  margin-top: 0;
}
.pd-edit-hint {
  margin-left: 8px;
  font-weight: 400;
}
.pd-edit-tip {
  margin-top: 12px;
}
#pressDistDetailTitle.pd-editable {
  display: inline-block;
  max-width: 100%;
}
.pd-detail-meta-line .pd-editable,
.pd-detail-meta-line .pd-inline-field {
  display: inline;
  padding: 0 2px;
}
.pd-row-notes {
  margin-top: 2px;
  max-width: 240px;
}

/* 新闻稿分发 / Guest Post 星标 */
.col-star {
  width: 44px;
  text-align: center;
  vertical-align: middle;
}
.btn-star {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}
.btn-star:hover {
  color: #e8b84a;
  background: rgba(232, 184, 74, 0.12);
}
.btn-star.is-starred {
  color: #e8b84a;
}
.vendor-star-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.vendor-star-bar .small {
  color: var(--muted);
}
tr.is-starred-row td:first-child {
  box-shadow: inset 3px 0 0 #e8b84a;
}
