/* ========== 设计语言 ==========
 * 配色走"专业工具感"：米色底 + 墨色主文字 + 靛青 accent + 暖橙 highlight
 * 字体：标题用 Fraunces（衬线有性格），正文用 Inter Tight，数据用 JetBrains Mono
 * 整体克制、干净，适合工作场景长时间使用
 */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,500;0,9..144,600&family=Inter+Tight:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --bg: #f7f3ea;
  --bg-card: #fbf8f1;
  --bg-accent: #fef6d8;
  --ink: #1a1a1a;
  --ink-2: #3d3d3d;
  --muted: #8a8275;
  --border: #e0d6c2;
  --border-strong: #b8a986;
  --accent: #1e4a5f;
  --accent-2: #d97533;
  --ok: #426b2f;
  --warn: #b85c00;
  --err: #8b2c2c;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.serif { font-family: 'Fraunces', Georgia, serif; }

button { font-family: inherit; }
input, textarea, select {
  font-family: inherit;
  font-size: 14px;
  outline: none;
}

/* ========== 布局 ========== */
.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px 80px;
}

/* ========== 顶部 ========== */
.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1.5px solid var(--ink);
  margin-bottom: 28px;
  gap: 20px;
  flex-wrap: wrap;
}
.brand .eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.brand h1 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 32px;
  line-height: 1.05;
  margin: 0;
  letter-spacing: -0.01em;
}
.brand h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.topbar .nav { display: flex; gap: 10px; flex-wrap: wrap; }

/* ========== 按钮 ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  transition: transform .08s, box-shadow .15s;
  text-decoration: none;
}
.btn:hover:not(:disabled) {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--accent-2);
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.ghost {
  background: transparent;
  color: var(--ink);
}
.btn.ghost:hover:not(:disabled) {
  background: var(--bg-accent);
  box-shadow: 3px 3px 0 var(--border-strong);
}
.btn.accent {
  background: var(--accent-2);
  border-color: var(--accent-2);
  color: white;
}
.btn.xs { padding: 5px 10px; font-size: 11.5px; }

/* ========== 步骤卡片 ========== */
.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  margin-bottom: 18px;
  transition: opacity 0.2s;
}
.step.disabled { opacity: 0.5; pointer-events: none; }
.step-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px dashed var(--border);
}
.step-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
}
.step-title {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.step-badge {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  padding: 3px 8px;
  border: 1px solid var(--border-strong);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.step-badge.done { color: var(--ok); border-color: var(--ok); }
.step-body { padding: 20px; }

/* ========== 上传区（紧凑条 + 文件卡片） ========== */
.upload-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.upload-hint {
  color: var(--muted);
  font-size: 11.5px;
}
.file-selected {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--bg-accent);
  border: 1px solid var(--border-strong);
  flex-wrap: wrap;
}
.file-selected .file-info { flex: 1; min-width: 0; }
.file-selected .file-label {
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.file-selected .file-path {
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
  word-break: break-all;
}
.file-selected .file-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.file-selected .file-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* 全屏拖拽覆盖层 */
.drop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 26, 0.78);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.drop-overlay.hidden { display: none; }
.drop-overlay-inner {
  border: 2px dashed var(--bg);
  padding: 60px 80px;
  text-align: center;
  color: var(--bg);
}
.drop-overlay-icon {
  font-family: 'Fraunces', serif;
  font-size: 72px;
  font-style: italic;
  line-height: 1;
  margin-bottom: 12px;
  color: var(--accent-2);
}
.drop-overlay-text {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 6px;
}
.drop-overlay-hint {
  font-size: 12px;
  color: rgba(251, 248, 241, 0.7);
  letter-spacing: 0.1em;
}

/* ========== 识别结果 ========== */
.info-strip {
  display: flex;
  gap: 18px;
  padding: 10px 14px;
  background: var(--bg-accent);
  border: 1px solid var(--border);
  margin-top: 14px;
  font-size: 12.5px;
  flex-wrap: wrap;
  align-items: center;
}
.info-strip .item {
  display: flex;
  gap: 6px;
  align-items: center;
}
.info-strip .item .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: var(--muted);
}
.info-strip .item .val {
  font-weight: 600;
  color: var(--ink);
}
.info-strip .item .val.ok { color: var(--ok); }
.info-strip .item .val.warn { color: var(--warn); }

/* 字段映射预览 */
.mapping-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.field-cell {
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 11.5px;
  cursor: pointer;
  transition: transform .08s ease-out, box-shadow .12s ease-out, background .12s;
  user-select: none;
}
.field-cell:hover {
  transform: translate(-1px, -1px);
  box-shadow: 2px 2px 0 var(--border-strong);
  background: var(--bg-card);
}
.field-cell.unmatched:hover { box-shadow: 2px 2px 0 var(--warn); background: #ffe9cf; }
.field-cell.ignored:hover   { box-shadow: 2px 2px 0 var(--muted); }
.field-cell:active {
  transform: translate(1px, 1px);
  box-shadow: 0 0 0 transparent;
  background: var(--bg-accent);
  transition-duration: .04s;
}
.field-cell.unmatched:active { background: #ffd9a8; box-shadow: 0 0 0 transparent; }
.field-cell .source {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}
.field-cell .col-letter {
  display: inline-block;
  padding: 1px 5px;
  background: var(--ink);
  color: var(--bg);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  min-width: 14px;
  text-align: center;
  flex-shrink: 0;
}
.field-cell.unmatched .col-letter { background: var(--warn); }

/* 跨项目忽略次数徽章 */
.ignore-stat-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 1px 6px;
  background: var(--muted);
  color: white;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  border-radius: 1px;
  flex-shrink: 0;
  transition: background .12s, transform .08s;
}
.ignore-stat-badge:hover {
  background: var(--ink);
  transform: translate(-1px, -1px);
}

/* 忽略详情弹窗 */
.ignore-detail-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 400px;
  overflow-y: auto;
}
.ignore-detail-list li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  padding: 6px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 12px;
  align-items: center;
}
.ignore-detail-list .proj-name { color: var(--ink); font-weight: 500; }
.ignore-detail-list .ignore-col { color: var(--ink-2); }
.ignore-detail-list .ignore-time { color: var(--muted); font-size: 11px; white-space: nowrap; }
.field-cell .src-text {
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.field-cell .target {
  font-size: 11px;
  color: var(--accent);
  font-weight: 500;
}
.field-cell.unmatched { background: #fff3e5; border-color: var(--warn); }
.field-cell.unmatched .target { color: var(--warn); }
.field-cell.ai { background: #e8f0f3; border-color: var(--accent); }

/* 手动指派：当前项目里由用户手动选定的字段。字典吸纳别名后下次上传将恢复普通样式 */
/* 手动指派：使用绿色系，和未识别（橙黄）+ AI 识别（蓝绿）清楚区分 */
.field-cell.manual {
  background: #e8f1de;
  border-color: var(--ok);
  border-left: 3px solid var(--ok);
}
.field-cell.manual .col-letter { background: var(--ok); }
.field-cell.manual .target { color: var(--ok); font-weight: 600; }
.field-cell.manual:hover { box-shadow: 2px 2px 0 var(--ok); background: #d9e9c7; }
.field-cell.manual:active { background: #c7dcaf; }
.manual-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 5px;
  background: var(--ok);
  color: white;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.4;
  border-radius: 1px;
  vertical-align: 1px;
}

/* AI 基于手动说明识别的字段 */
.field-cell.has-note {
  border-left: 3px solid var(--accent);
  background: #eff4f7;
}
.field-cell.has-note .col-letter { background: var(--accent); }
.field-cell.has-note .target { color: var(--accent); font-weight: 600; }
.field-cell.has-note:hover { box-shadow: 2px 2px 0 var(--accent); background: #e1ecf1; }

/* 只有手动说明但 AI 没给出 key */
.field-cell.note-only {
  background: #f5f0e1;
  border-color: var(--border-strong);
  border-left: 3px dashed var(--accent);
}
.field-cell.note-only .target { color: var(--ink-2); }

.manual-note-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 5px;
  background: var(--accent);
  color: white;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.4;
  border-radius: 1px;
  vertical-align: 1px;
  cursor: help;
}
.manual-note-badge.conf-high   { background: var(--ok); }
.manual-note-badge.conf-medium { background: var(--accent); }
.manual-note-badge.conf-low    { background: var(--muted); }
.field-cell.ignored {
  background: repeating-linear-gradient(-45deg, var(--bg), var(--bg) 6px, #ece4d2 6px, #ece4d2 7px);
  border-color: var(--border-strong);
  opacity: 0.85;
}
.field-cell.ignored .src-text { text-decoration: line-through; color: var(--muted); }
.field-cell.ignored .target { color: var(--muted); }
.field-cell.ignored .col-letter { background: var(--muted); }

/* target 行：左边目标 label，右边忽略/取消按钮 */
.field-cell .target-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.field-action {
  flex-shrink: 0;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  padding: 2px 7px;
  cursor: pointer;
  letter-spacing: 0.05em;
  line-height: 1.3;
}
.field-cell.unmatched .field-action {
  border-color: var(--warn);
  color: var(--warn);
}
.field-cell.unmatched .field-action:hover {
  background: var(--warn);
  color: white;
}
.field-cell.ignored .field-action:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

/* 映射列表顶部的一行：警告 + 按钮（按钮最右） */
.mapping-header {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.mapping-header .unmatched-warn {
  color: var(--warn);
  font-size: 12px;
  flex: 1;
  min-width: 0;
}

/* ========== Brief 输入 ========== */
textarea.brief {
  width: 100%;
  min-height: 180px;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink);
  resize: vertical;
}
textarea.brief:focus { border-color: var(--accent); background: #fff; }

/* 需求分组 */
.chip-group {
  margin-top: 14px;
  padding: 10px 12px 12px;
  border: 1px solid var(--border);
  background: var(--bg);
}
.chip-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.chip-group-head .chip-group-title { flex: 0 0 auto; }
.chip-group-head .chip-group-hint { flex: 1; }
.chip-group-head .group-add-btn { flex: 0 0 auto; }
.chip-group-title {
  font-family: 'Fraunces', serif;
  font-size: 14px;
  font-weight: 500;
}
.chip-group-hint {
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.chip-group-hard    { border-left: 3px solid var(--ink); }
.chip-group-soft    { border-left: 3px solid var(--border-strong); }
.chip-group-exclude { border-left: 3px solid var(--err); background: #fff7f5; }
.chip-group-ai      { border-left: 3px solid var(--accent); background: #f1f6f9; }
.chip-group-condition { border-left: 3px solid var(--accent); }
.chip-group-exclusion { border-left: 3px solid var(--err); background: #fff7f5; }

/* ============ AI 解析 loading 动效 ============ */
.btn.is-loading {
  cursor: progress;
  opacity: 0.9;
  pointer-events: none;
  padding-left: 14px;
}
.btn .btn-spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -2px;
}
.btn .btn-loading-text { margin-left: 2px; }
.btn .btn-loading-dots::after {
  display: inline-block;
  content: '';
  width: 14px;
  text-align: left;
  animation: loadingDots 1.2s steps(4, end) infinite;
}
@keyframes loadingDots {
  0%   { content: '';     }
  25%  { content: '.';    }
  50%  { content: '..';   }
  75%  { content: '...';  }
  100% { content: '';     }
}

.step-badge.is-loading {
  color: var(--accent);
  border-color: var(--accent);
  animation: badgePulse 1.2s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}

/* 解析中占位区 */
.brief-loading {
  margin-top: 14px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
}
.brief-loading-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.loading-dot-row { display: inline-flex; gap: 4px; }
.loading-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  animation: bounceDot 1.2s ease-in-out infinite;
}
.loading-dot:nth-child(2) { animation-delay: 0.15s; }
.loading-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounceDot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%           { transform: scale(1);   opacity: 1; }
}
.loading-msg {
  font-size: 13px;
  color: var(--ink-2);
  flex: 1;
}
.loading-msg b { color: var(--accent); }
.loading-elapsed {
  font-size: 11px;
  color: var(--muted);
  padding: 2px 6px;
  border: 1px solid var(--border);
  background: var(--bg);
}
.loading-skeleton { display: flex; flex-direction: column; gap: 8px; }
.sk-row { display: flex; gap: 6px; flex-wrap: wrap; }
.sk-chip {
  height: 24px;
  border-radius: 2px;
  background: linear-gradient(90deg, #eee7d7 0%, #f5efdf 50%, #eee7d7 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
.sk-chip.w-sm { width: 70px; }
.sk-chip.w-md { width: 120px; }
.sk-chip.w-lg { width: 180px; }
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.loading-tip {
  margin-top: 14px;
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.brief-ai-error {
  margin-top: 12px;
  padding: 10px 14px;
  background: #fdf3f2;
  border: 1px solid var(--err);
  color: var(--err);
  font-size: 12.5px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.brief-ai-error span.mono { font-size: 11px; letter-spacing: 0.05em; }
.brief-ai-ok {
  margin-top: 10px;
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.05em;
}

/* chip 的 label / value 都可编辑（虚线下划线） */
.chip.editable .chip-label,
.chip.editable .chip-value {
  cursor: text;
  border-bottom: 1px dotted var(--border-strong);
}
.chip.editable .chip-label:hover,
.chip.editable .chip-value:hover {
  background: rgba(0,0,0,0.05);
}
.chip.chip-condition { background: var(--bg); }
.chip.chip-exclusion { background: #ffe4e4; border-color: var(--err); color: var(--err); }
.chip.chip-exclusion .chip-label { color: var(--err); opacity: 0.7; }

/* 新增条件输入行（每组内置） */
.chip-add-row {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  align-items: center;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}
.chip-add-row input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  font-size: 12.5px;
}
.chip-add-row input:focus { border-color: var(--accent); background: #fff; }

/* 空组态 */
.chip-empty {
  font-size: 11px;
  color: var(--muted);
  padding: 4px 0;
}

/* 行内编辑 input（替代 chip-value 显示） */
.chip.editable .chip-value { cursor: text; border-bottom: 1px dotted var(--border-strong); }
.chip.editable .chip-value:hover { background: rgba(0,0,0,0.04); }
.chip-inline-edit {
  font-family: inherit;
  font-size: 12px;
  padding: 1px 4px;
  border: 1px solid var(--accent-2);
  background: #fff;
  min-width: 100px;
  max-width: 280px;
}
.chip-inline-edit:focus { outline: none; box-shadow: 0 0 0 2px rgba(217, 117, 51, 0.25); }

/* 需求下方的「筛选博主」按钮 */
.brief-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

/* 删除按钮 */
.chip .chip-remove {
  border: none;
  background: transparent;
  color: currentColor;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px 0 6px;
  margin-left: 2px;
  opacity: 0.4;
  transition: opacity .12s;
}
.chip:hover .chip-remove { opacity: 1; }
.chip .chip-remove:hover { color: var(--err); }

/* 条件芯片 */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip.custom { border-style: dashed; }
.chip {
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--ink);
  display: inline-flex;
  gap: 6px;
}
.chip .chip-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: var(--muted);
}
.chip.hard { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip.hard .chip-label { color: rgba(255,255,255,0.65); }
.chip.soft { background: var(--bg-accent); border-color: var(--accent-2); }
.chip.exclude { background: #ffe4e4; border-color: var(--err); color: var(--err); }
.chip.exclude .chip-label { color: var(--err); opacity: 0.7; }
.chip.ai { background: #e8f0f3; border-color: var(--accent); }

/* ========== 候选表格 ========== */
.candidate-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 12px;
}
.candidate-toolbar .count { color: var(--accent); font-weight: 700; font-size: 13px; }

/* 表格容器不再自己开滚动框（那会变成独立滚动容器、让表头一滑就固定、还吃掉可视高度）。
   overflow:visible → 由整个页面滚动，表头靠 sticky 贴到搜索框那条下面，可视区域最大化。 */
.candidate-wrap { overflow: visible; border: 1px solid var(--border); }
table.candidates {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 900px;
}
.candidates thead th {
  background: var(--ink);
  color: var(--bg);
  padding: 10px 12px;
  text-align: left;
  font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  /* 表头吸顶到页面视口：贴在 sticky 搜索框工具条(top:0)下面。
     --cand-thead-top = 工具条实测高度，由 JS 在渲染/缩放时写入(默认 50px 兜底)。
     z-index 必须低于工具条(10)，避免短暂重叠时盖住工具条。 */
  position: sticky;
  top: var(--cand-thead-top, 50px);
  z-index: 3;
}
.candidates tbody td {
  padding: 12px;
  border-top: 1px solid var(--border);
  vertical-align: top;
}
.candidates tbody tr:hover { background: var(--bg-accent); }
.candidates tbody tr.selected { background: #fff5e0; }
.candidates .mono-cell { font-family: 'JetBrains Mono', monospace; font-size: 12px; }
.candidates .name { font-weight: 600; font-size: 13.5px; }
.candidates .muted { color: var(--muted); font-size: 11.5px; }

/* 推荐等级 */
.grade {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 2px;
  letter-spacing: 0.05em;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;          /* "推荐/可选/备选" 不换行 */
}
/* 城市列：短城市名(≤4字)不换行 */
.candidates td .cell-city { white-space: nowrap; }
.grade.推荐 { background: var(--ok); color: white; }
.grade.可选 { background: var(--warn); color: white; }
.grade.备选 { background: var(--muted); color: white; }
.grade.不匹配 { background: var(--err); color: white; }

/* ── 平台醒目徽章：小红书=红底白字；抖音=黑底青字(品牌色) ── */
.plat-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 3px;
  letter-spacing: 0.04em;
  line-height: 1.5;
  white-space: nowrap;
  vertical-align: middle;
}
.plat-badge.plat-xhs { background: #ff2442; color: #fff; }                 /* 小红书红 */
.plat-badge.plat-dy  { background: #000; color: #25f4ee;                   /* 抖音黑底青字 */
  text-shadow: 1px 0 0 rgba(254,44,85,0.55); }                            /* 抖音标志性青/品红重影 */
.plat-badge.plat-other { background: var(--muted); color: #fff; }
.kol-plat-line { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.kol-plat-line .mono-cell { font-size: 11px; }

.reasons {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 4px;
}
.reasons .pro { color: var(--ok); display: block; }
.reasons .con { color: var(--err); display: block; }
.reasons .neu { color: var(--muted); display: block; }

/* WPS 风格：勾选列+达人列 rowspan 合并；数据占第1行、判断依据占第2行；整块=一个博主，统一套色 */
.candidates .td-kol { vertical-align: top; }
/* 数据行与其判断依据行合体：去掉中间那条横线 */
.candidates tbody tr.cand-data-row:has(+ tr.cand-reason-row) > td { border-bottom: none; }
.candidates tbody tr.cand-reason-row td { border-top: none; padding-top: 0; }
.candidates tbody tr.cand-reason-row .reason-cell {
  padding: 1px 10px 11px 6px;
  background: rgba(30, 74, 95, 0.022);
}
/* 选中/hover 时，判断依据行也跟着一起套色（两行=一个博主） */
.candidates tbody tr.cand-reason-row.selected .reason-cell { background: #fff5e0; }
.candidates tbody tr.cand-data-row:hover + tr.cand-reason-row .reason-cell,
.candidates tbody tr.cand-reason-row:hover .reason-cell { background: var(--bg-accent); }
.candidates tbody tr.cand-reason-row .reason-label {
  display: inline-block; font-size: 10px; color: var(--muted);
  border: 1px solid var(--border); padding: 0 5px; border-radius: 2px;
  margin-right: 10px; vertical-align: middle;
}
/* 判断依据：以「条件」为单位换行——容器 flex-wrap 让塞不下的条件整条换到下一行；
   单个条件内部 nowrap 不折断，保证不撑开表格、也不影响阅读。 */
.reason-flow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 16px; }
.reason-flow .reason-label { flex: 0 0 auto; margin-right: 0; }
.reason-flow .ri-item { font-size: 11px; white-space: nowrap; }
.reason-flow .pro { color: var(--ok); }
.reason-flow .con { color: var(--err); }
.reason-flow .neu { color: var(--muted); }

input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--accent-2);
  cursor: pointer;
}

/* ========== 导出区 ========== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.stat-card {
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
}
.stat-card .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.stat-card .val {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  font-weight: 500;
}

/* ========== 项目列表页 ========== */
.project-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.project-card {
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: box-shadow .15s, transform .08s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.project-card:hover {
  box-shadow: 3px 3px 0 var(--accent-2);
  transform: translate(-1px, -1px);
}
.project-card .p-title {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
}
.project-card .p-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.project-card .p-status {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10.5px;
  font-family: 'JetBrains Mono', monospace;
  border: 1px solid var(--border-strong);
  width: fit-content;
}
.project-card .p-status.draft { color: var(--muted); }
.project-card .p-status.in_progress { color: var(--warn); border-color: var(--warn); }
.project-card .p-status.completed { color: var(--ok); border-color: var(--ok); }

.project-card.new-project {
  background: var(--bg);
  border: 1.5px dashed var(--border-strong);
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 110px;
}
.project-card.new-project:hover { border-color: var(--accent-2); }
.project-card.new-project .plus {
  font-family: 'Fraunces', serif;
  font-size: 28px;
  color: var(--accent);
  font-style: italic;
}
.project-card.new-project .text { color: var(--muted); font-size: 13px; }

/* 列表页头部 + 视图切换 */
.list-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; gap: 12px; flex-wrap: wrap;
}
.list-head-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.proj-view-seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 4px; overflow: hidden; }
.proj-view-seg button {
  border: none; background: var(--bg); color: var(--muted);
  font-size: 12px; padding: 5px 12px; cursor: pointer; font-family: inherit;
}
.proj-view-seg button + button { border-left: 1px solid var(--border-strong); }
.proj-view-seg button.active { background: var(--accent); color: #fff; }
.proj-empty { padding: 28px; text-align: center; }

/* 卡片：时间行 + 底部状态/已选 */
.project-card .p-times {
  display: flex; flex-wrap: wrap; gap: 8px;
  font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--muted);
  margin-top: 2px;
}
.project-card .p-foot { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.p-selected {
  display: inline-block; padding: 2px 8px; font-size: 10.5px;
  font-family: 'JetBrains Mono', monospace; color: var(--ok);
  border: 1px solid var(--ok); border-radius: 10px;
}

/* 表格视图 */
.proj-table-scroll { border: 1px solid var(--border); overflow-x: auto; }
table.proj-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.proj-table thead th {
  background: #2a2a2a; color: #f0ece2; text-align: left; font-weight: 500;
  padding: 9px 12px; white-space: nowrap; position: sticky; top: 0;
}
table.proj-table tbody td { padding: 9px 12px; border-top: 1px solid var(--border); white-space: nowrap; }
table.proj-table tbody tr.proj-row { cursor: pointer; }
table.proj-table tbody tr.proj-row:hover { background: var(--bg-accent); }
table.proj-table .pt-name { font-weight: 600; color: var(--ink); }
table.proj-table .pt-time { color: var(--muted); font-size: 11px; }
table.proj-table .p-status {
  display: inline-block; padding: 1px 7px; font-size: 10px;
  font-family: 'JetBrains Mono', monospace; border: 1px solid var(--border-strong);
}
table.proj-table .p-status.draft { color: var(--muted); }
table.proj-table .p-status.in_progress { color: var(--warn); border-color: var(--warn); }
table.proj-table .p-status.completed { color: var(--ok); border-color: var(--ok); }

/* ========== 对话框 ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 26, 0.5);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-card);
  border: 1.5px solid var(--ink);
  max-width: 500px;
  width: 100%;
  box-shadow: 6px 6px 0 rgba(26, 26, 26, 0.28), 0 24px 60px -20px rgba(26, 26, 26, 0.45);
  animation: modalRise .14s ease-out;
}
@keyframes modalRise {
  from { transform: translateY(6px); opacity: 0; }
  to   { transform: translateY(0);   opacity: 1; }
}
.modal-head {
  padding: 14px 20px;
  border-bottom: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-head .title {
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-weight: 500;
}
.modal-close {
  background: transparent;
  color: var(--bg);
  border: none;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.modal-body { padding: 20px; }
.modal-body .field {
  margin-bottom: 14px;
}
.modal-body .field-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.modal-body input[type="text"],
.modal-body input[type="password"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  font-size: 13px;
}
.modal-body input:focus { border-color: var(--accent); background: #fff; }
.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}

/* ========== Toast ========== */
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  padding: 10px 18px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  z-index: 300;
  max-width: 90%;
}
#toast.show { opacity: 1; }
#toast.err { background: var(--err); }
#toast.ok { background: var(--ok); }

/* ========== 空状态 ========== */
.empty {
  padding: 36px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  border: 1px dashed var(--border);
  background: var(--bg);
}

/* ========== 达人单元格：头像 + 名字超链接 ========== */
.kol-cell {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.kol-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  color: var(--ink-2, #555);
}
.kol-avatar.fallback {
  background: var(--bg-accent, #fef6d8);
}
.kol-cell-text { min-width: 0; flex: 1; }
.kol-name-wrap { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.kol-name-link {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
}
.kol-name-link:hover {
  color: var(--accent, #1e4a5f);
  border-bottom-color: var(--accent, #1e4a5f);
}
/* 名字按性别套色（马卡龙清雅色：女粉 / 男蓝，低饱和） */
/* 性别配色：米黄底上原色太淡费眼，加饱和度+压暗提对比 */
.kol-name-link.sex-f, .name.sex-f { color: #c43d68; }
.kol-name-link.sex-m, .name.sex-m { color: #2f6fb3; }
/* 候选表「性别」列徽章：窄，刚好放下 男/女；男蓝女粉 */
.sex-badge { display: inline-block; min-width: 14px; text-align: center; font-size: 12px; font-weight: 600; }
.sex-badge.sex-m { color: #2f6fb3; }
.sex-badge.sex-f { color: #c43d68; }
.sex-badge.sex-none { color: var(--muted); font-weight: 400; }
.kol-name-link.sex-f:hover { color: #a82c54; border-bottom-color: #a82c54; }
.kol-name-link.sex-m:hover { color: #235a96; border-bottom-color: #235a96; }
.kol-link-tag {
  font-size: 11px;
  color: var(--muted);
  cursor: help;
}
/* 排重名单弹窗：每条 */
.bl-list .bl-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 5px 6px;
  font-size: 13px;
  border-bottom: 1px dashed var(--border);
}
.bl-list .bl-no {
  color: var(--muted);
  font-size: 11px;
  min-width: 32px;
  text-align: right;
}
.bl-list mark {
  background: #fff3a3;
  color: inherit;
  padding: 0 1px;
  font-weight: 600;
}

/* chip 编辑 popover */
.chip-edit-pop {
  position: absolute;
  z-index: 1000;
  min-width: 360px;
  max-width: 720px;
  max-height: 70vh;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  box-shadow: 0 6px 22px rgba(0,0,0,0.18);
  padding: 10px 12px;
  font-size: 12.5px;
}
.chip-edit-pop .chip-edit-head {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}
.chip-edit-pop .chip-edit-body { margin-bottom: 8px; }
.chip-edit-pop .chip-edit-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

/* 候选 toolbar 搜索框 + 下拉 */
.kol-search-input {
  padding: 5px 10px;
  font-size: 12.5px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: #fff;
  width: 240px;
  outline: none;
  transition: border-color 120ms;
}
.kol-search-input:focus { border-color: var(--accent, #1e4a5f); }
.kol-search-pop {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 100;
  width: 360px;
  max-height: 380px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.kol-search-empty {
  padding: 14px 12px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.kol-search-item {
  display: flex;
  gap: 10px;
  padding: 8px 10px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.kol-search-item:last-child { border-bottom: none; }
.kol-search-item:hover { background: var(--bg-accent, #fef6d8); }
.kol-search-item.in-list { opacity: 0.55; }
.kol-search-ava {
  width: 32px; height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  border: 1px solid var(--border);
}
.kol-search-ava.fb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-accent, #fef6d8);
  color: var(--ink-2, #555);
  font-weight: 600;
  font-size: 13px;
}
.kol-search-meta { flex: 1; min-width: 0; }
.kol-search-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* 整行可点击 */
.candidates tbody tr { cursor: pointer; }
.candidates tbody tr a, .candidates tbody tr button, .candidates tbody tr input { cursor: default; }
.candidates tbody tr a, .candidates tbody tr .kol-name-link { cursor: pointer; }

/* 手动添加博主: hover 显示删除按钮 */
.candidates td.td-check {
  position: relative;
  vertical-align: top;
  padding-top: 14px;
}
.cand-del-btn {
  display: none;
  position: absolute;
  left: 50%;
  top: 36px;
  transform: translateX(-50%);
  width: 22px; height: 22px;
  padding: 0;
  border: 1px solid #d97533;
  background: #fff5e0;
  color: #d97533;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  font-weight: 600;
}
.cand-del-btn:hover { background: #d97533; color: #fff; }
.candidates tbody tr.is-manual:hover .cand-del-btn { display: inline-flex; align-items: center; justify-content: center; }

/* ===== 「不合适」一键挪动 / 不合适表（灰色，表示不太合适） ===== */
.cand-unfit-btn {
  display: none;
  position: absolute; left: 50%; top: 36px; transform: translateX(-50%);
  width: 22px; height: 22px; padding: 0;
  border: 1px solid #c4c4c4; background: #f0f0f0; color: #888;
  border-radius: 50%; cursor: pointer; font-size: 13px; line-height: 1; font-weight: 600;
}
.cand-unfit-btn:hover { background: #888; color: #fff; }
.candidates:not(.unfit-table) tbody tr:hover .cand-unfit-btn { display: inline-flex; align-items: center; justify-content: center; }
.candidates tbody tr.is-manual .cand-unfit-btn { top: 62px; }
.cand-restore-btn {
  width: 26px; height: 22px; padding: 0;
  border: 1px solid var(--ok); background: #eef7f0; color: var(--ok);
  border-radius: 4px; cursor: pointer; font-size: 13px; line-height: 1;
}
.cand-restore-btn:hover { background: var(--ok); color: #fff; }

.unfit-section { margin-top: 18px; }
.unfit-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 4px; }
.unfit-title { font-weight: 600; color: #6b6b6b; }
.unfit-count {
  font-size: 11px; padding: 0 7px; border-radius: 9px;
  background: #e3e3e3; color: #666; font-variant-numeric: tabular-nums;
}
.unfit-hint { color: var(--muted); font-size: 11px; }
.unfit-jump-up { color: #6b6b6b; }
.unfit-wrap { border-color: #d8d8d8; }
.unfit-table { background: #f5f5f5; }
.unfit-table thead th { background: #eaeaea; color: #666; }
.unfit-table tbody tr td { color: #7a7a7a; }
.unfit-table tbody tr:hover { background: #efefef; }
.unfit-table tbody tr.cand-reason-row .reason-cell { background: #efefef; }
.unfit-table .kol-name-link, .unfit-table .name { filter: grayscale(0.55); }

/* 非报备提示条 */
.nonreport-banner {
  margin-bottom: 12px; padding: 8px 12px;
  border: 1px solid #d8a14b; background: #fdf4e3; color: #9a6a16;
  font-size: 12.5px; font-weight: 500; line-height: 1.65;
}
.nonreport-banner b { color: #7d5410; }
.nonreport-hint { color: #b08640; font-weight: 400; }

/* 报价列：主数字(有效价) + 小字来源/算式。避免"表里的价和星图后台对不上"说不清 */
.price-main { display: block; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price-src {
  display: block; margin-top: 1px; white-space: nowrap;
  font-size: 11px; color: var(--muted); font-weight: 400;
}
/* 报价表头上的「非报备×0.75」小徽标（表头吸顶，提示条滚走了它还在） */
.th-nr {
  display: inline-block; margin-left: 5px; padding: 0 5px;
  border: 1px solid #e0b869; border-radius: 3px;
  background: #fdf4e3; color: #9a6a16;
  font-size: 10.5px; font-weight: 500; line-height: 16px; vertical-align: 1px;
  cursor: help;
}

/* 浮动"跳到不合适表"按钮（灰色） */
.unfit-jump-btn {
  position: fixed; right: 18px; bottom: 24px; z-index: 60;
  padding: 8px 14px; border: 1px solid #c4c4c4; background: #f0f0f0; color: #666;
  border-radius: 20px; cursor: pointer; font-size: 12.5px; font-weight: 600;
  box-shadow: 2px 2px 0 rgba(120,120,120,.25);
}
.unfit-jump-btn:hover { background: #6b6b6b; color: #fff; }
.candidates tbody tr.is-manual {
  background: rgba(30, 74, 95, 0.04);
}
.candidates tbody tr.is-manual td:first-child::before {
  content: "+";
  position: absolute;
  left: 4px; top: 4px;
  font-size: 10px;
  color: var(--accent, #1e4a5f);
  font-weight: 700;
}

/* 排重清单命中：行、徽章 */
.candidates tbody tr.is-blocklisted {
  background: rgba(217, 117, 51, 0.06);
  outline: 1px solid rgba(217, 117, 51, 0.25);
  outline-offset: -1px;
}
.candidates tbody tr.is-blocklisted td { opacity: 0.78; }
.candidates tbody tr.is-blocklisted .kol-name-link {
  color: #b85525;
  border-bottom-color: transparent;
}
.kol-blocklist-badge {
  display: inline-block;
  font-size: 10px;
  padding: 1px 6px;
  margin-left: 4px;
  background: #fbe8d4;
  color: #b85525;
  border: 1px solid #f0c89a;
  border-radius: 2px;
  font-weight: 500;
  white-space: nowrap;
}

/* 接单跟进状态在候选列表的标记：已婉拒（醒目红）/ 已确认接单（绿） */
.kol-booking-holder { display: inline; }
.kol-booking {
  display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 7px; margin-left: 5px;
  border-radius: 3px; white-space: nowrap; vertical-align: middle; letter-spacing: .02em;
}
.kol-booking.declined { background: #fbe0e0; color: #c0392b; border: 1px solid #e8a9a9; }
.kol-booking.confirmed { background: #dcf3e6; color: #1f8a4c; border: 1px solid #9fd9ba; }
.kol-booking-cancel { cursor: pointer; user-select: none; }
.kol-booking-cancel:hover { background: #f6c2c2; border-color: #d98a8a; }
/* 「已导出」标记：与 .kol-booking 同一套尺寸（10px/1px 7px/圆角 3px），配色用中性靛蓝 ——
   它陈述的是"这位给过甲方了"这个事实，不是好坏评价，别用红绿抢走接单状态的注意力。 */
.kol-exported {
  display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 7px; margin-left: 5px;
  border-radius: 3px; white-space: nowrap; vertical-align: middle; letter-spacing: .02em;
  background: #e6ecf7; color: #3a5a8c; border: 1px solid #b9c9e2; cursor: help;
}
.kol-exported b { font-weight: 800; }

/* 工具条上的分批导出统计 + 一键勾选 */
.ex-stat { font-size: 12px; color: var(--muted); white-space: nowrap; cursor: help; }
.ex-stat b { color: var(--ink); font-weight: 700; }
.ex-stat b.ex-pending { color: #3a5a8c; }
.ex-none { font-size: 12px; color: var(--muted); white-space: nowrap; cursor: help; }

/* 预览面板里的重复导出提示。只提示不拦截，所以用提示色不用报错色 */
.ex-dup-tip {
  margin: 10px 16px 0; padding: 8px 12px; font-size: 12.5px; line-height: 1.7;
  background: #fff6e5; border: 1px solid #f0d9a8; color: #6b4e12;
}
.ex-dup-tip b { color: #a8690a; }
/* 「达人」表头后的 F 快捷键提示：比表头文字更浅、更小、正常字重 */
.th-fhint { font-size: 10px; font-weight: 400; color: var(--muted); opacity: 0.7; margin-left: 6px; white-space: nowrap; }

/* ── 候选列表「发送状态」列：已发博主(静蓝) / 博主已回(未读动态绿·已读静态绿) ── */
.ss { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.ss-none { color: var(--muted); font-weight: 400; }
.ss-sent { background: #e8f1f8; color: #2b6a86; border: 1px solid #cfe1ee; }
.ss-open { cursor: pointer; }
.ss-open:hover { filter: brightness(0.97); }
/* 已回未读=动态：饱和绿 + 呼吸光晕，一眼看到 */
.ss-unread { background: #dcf3e6; color: #157a41; border: 1px solid #7fcea2; font-weight: 700;
  animation: ssPulse 1.5s ease-in-out infinite; }
@keyframes ssPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(31, 138, 76, 0.0); }
  50% { box-shadow: 0 0 0 4px rgba(31, 138, 76, 0.18); }
}
/* 已回已读=静态灰绿，安静 */
.ss-read { background: #eef1ee; color: #6a8072; border: 1px solid #d8e0d9; }

/* ── 右下角"博主回复了"提示：展示 3 秒滑入滑出，可点/按F打开群聊 ── */
#replyToastHost {
  position: fixed; right: 18px; bottom: 18px; z-index: 4000;
  display: flex; flex-direction: column-reverse; gap: 10px; pointer-events: none;
}
.reply-toast {
  pointer-events: auto; cursor: pointer; width: 316px; max-width: 80vw;
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--ink, #1e2a33); color: #fff; border-radius: 10px; padding: 12px 12px 12px 14px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.28); border-left: 4px solid #2ec76b;
  transform: translateX(120%); opacity: 0; transition: transform .28s cubic-bezier(.2,.8,.2,1), opacity .28s;
}
.reply-toast.show { transform: translateX(0); opacity: 1; }
.reply-toast .rt-ico { font-size: 18px; line-height: 1.2; flex: 0 0 auto; }
.reply-toast .rt-body { flex: 1 1 auto; min-width: 0; }
.reply-toast .rt-title { font-size: 13px; font-weight: 700; }
.reply-toast .rt-tag { font-size: 9.5px; font-weight: 700; background: #2ec76b; color: #06331b;
  border-radius: 3px; padding: 1px 5px; margin: 0 5px; vertical-align: middle; }
.reply-toast .rt-proj { font-size: 11px; opacity: 0.72; margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reply-toast .rt-msg { font-size: 12px; margin-top: 4px; line-height: 1.4;
  background: rgba(255,255,255,.08); border-radius: 5px; padding: 5px 7px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.reply-toast .rt-msg-empty { opacity: 0.6; font-style: italic; }
.reply-toast .rt-hint { font-size: 10.5px; opacity: 0.6; margin-top: 5px; }
.reply-toast .rt-hint kbd { background: rgba(255,255,255,.16); border-radius: 3px; padding: 0 4px; font-family: inherit; }
.reply-toast .rt-close { flex: 0 0 auto; background: none; border: none; color: #fff; opacity: 0.5;
  cursor: pointer; font-size: 13px; line-height: 1; padding: 2px 3px; }
.reply-toast .rt-close:hover { opacity: 0.95; }

/* ── 侧栏项目标题的回复未读信封 + 数量角标（绝对定位在标题行右侧，常驻） ── */
.pn-title-row:has(.pn-envelope) .pn-title { padding-right: 26px; }   /* 给信封留位，标题省略号不压到信封 */
.pn-title-row:has(.pn-envelope) .pn-status { right: 28px; }          /* 有信封时 hover 状态徽章左移，两者不重叠 */
.pn-envelope {
  position: absolute; top: 50%; right: 0; transform: translateY(-50%); z-index: 2;
  font-size: 17px; line-height: 1; color: #17a94f; cursor: pointer;
}
.pn-envelope:hover { color: #0f8a3c; }
/* 角标：flex 居中数字（修"偏下"）、字号小一点 */
.pn-env-badge {
  position: absolute; top: -6px; left: 9px;
  display: flex; align-items: center; justify-content: center;
  min-width: 14px; height: 14px; padding: 0 3px; box-sizing: border-box;
  background: #e5484d; color: #fff; font-size: 8.5px; font-weight: 700; line-height: 1;
  border-radius: 8px; border: 1.5px solid var(--bg-card, #fff);
}
/* 已婉拒行：整体弱化、左侧红条，一眼看出被排除；确认接单行左侧绿条 */
.candidates tbody tr.is-declined td { opacity: 0.62; }
.candidates tbody tr.is-declined .kol-booking { opacity: 1; }
.candidates tbody tr.cand-data-row.is-declined td:first-child { box-shadow: inset 3px 0 0 #c0392b; }
.candidates tbody tr.cand-data-row.is-confirmed td:first-child { box-shadow: inset 3px 0 0 #1f8a4c; }

.kol-tags { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 3px; }
.kol-tags .chip {
  padding: 1px 6px;
  font-size: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--ink-2);
  border-radius: 2px;
}

/* ========== 达人详情 popover ========== */
.kol-detail-pop {
  position: absolute;
  z-index: 1000;
  width: 780px;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  box-shadow: 0 6px 22px rgba(0,0,0,0.18);
  padding: 0;
  font-size: 12px;
  line-height: 1.5;
}
/* 头部 145×145 头像右上角背景, 左侧文字 */
.kol-detail-pop .pop-head {
  display: flex;
  align-items: stretch;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.kol-detail-pop .pop-head-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
/* 头像：右上角固定 155×155 正方形(1:1)，不随内容拉伸 */
.kol-detail-pop .pop-head-avatar {
  flex: 0 0 auto;
  align-self: flex-start;
  width: 155px;
  height: 155px;
}
.kol-detail-pop .pop-head-avatar a { display: block; width: 155px; height: 155px; }
.kol-detail-pop .pop-head-avatar img,
.kol-detail-pop .pop-head-avatar .pop-avatar-fallback {
  width: 155px;
  height: 155px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}
.kol-detail-pop .pop-head-avatar .pop-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-accent);
  color: var(--muted);
  font-size: 38px;
  font-weight: 600;
}
.kol-detail-pop .pop-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.kol-detail-pop .pop-name {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kol-detail-pop .pop-subname {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.kol-detail-pop .pop-grade-line {
  display: flex;
  align-items: center;
  gap: 6px;
}
.kol-detail-pop .pop-grade {
  display: inline-block;
  padding: 1px 10px;
  border-radius: 10px;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}
.kol-detail-pop .pop-score-pct { font-size: 13px; font-weight: 700; color: var(--ink); }
.kol-detail-pop .pop-score-raw { font-size: 10.5px; color: var(--muted); }

/* 头部右侧的"基础信息"小条 (多个 chip 横排) */
.kol-detail-pop .pop-basics {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 6px;
}
.kol-detail-pop .pop-basic {
  font-size: 11.5px;
  color: var(--ink);
  white-space: nowrap;
}
.kol-detail-pop .pop-basic-k {
  color: var(--muted);
  margin-right: 3px;
  font-size: 10.5px;
}
/* 近期 IP 属地一行（2026-09-11）：与上面 .pop-basics 同字号；可悬停看最近几个属地 */
.kol-detail-pop .pop-ip { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-top: 4px;
  font-size: 12px; color: var(--ink-2); cursor: help; }
.kol-detail-pop .pop-ip b { font-weight: 600; color: var(--ink); }
.kol-detail-pop .pop-ip-at { color: var(--muted); font-size: 11.5px; }
.kol-detail-pop .pop-ip-more { color: var(--accent); font-size: 11.5px; border-bottom: 1px dashed currentColor; }
/* 详情浮层可点击「性别」校准：男/女 两个小按钮，选中高亮（男蓝女粉） */
.kol-detail-pop .pop-sex { display: inline-flex; align-items: center; gap: 3px; }
.kol-detail-pop .pop-sex-btn {
  font-size: 11px; line-height: 1.5; padding: 0 7px; cursor: pointer;
  border: 1px solid var(--border-strong); border-radius: 3px; background: var(--bg); color: var(--ink-2);
}
.kol-detail-pop .pop-sex-btn:hover { border-color: var(--accent); }
.kol-detail-pop .pop-sex-btn.on[data-sex="1"] { background: #2f6fb3; color: #fff; border-color: #2f6fb3; }
.kol-detail-pop .pop-sex-btn.on[data-sex="2"] { background: #c43d68; color: #fff; border-color: #c43d68; }

/* 主体两列网格: 左窄右宽 (左侧字段标签简单, 右侧多是 type/tags 等长内容) */
.kol-detail-pop .pop-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 0;
  border-bottom: 1px solid var(--border);
}
.kol-detail-pop .pop-cell {
  padding: 10px 14px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  min-width: 0;
}
.kol-detail-pop .pop-cell:nth-child(2n) { border-right: none; }
.kol-detail-pop .pop-cell:nth-last-child(-n+2) { border-bottom: none; }

/* 报价红字 */
.kol-detail-pop .pop-price-red {
  color: #d23a3a;
  font-weight: 700;
}

/* 通用 section（受众/评分明细单列） */
.kol-detail-pop .pop-section {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
}
.kol-detail-pop .pop-section:last-child { border-bottom: none; }
.kol-detail-pop .pop-section-title,
.kol-detail-pop .pop-cell .pop-section-title {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 4px;
  padding-bottom: 2px;
  border-bottom: 1px dashed var(--border);
}
.kol-detail-pop table.pop-kv {
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11.5px;
}
.kol-detail-pop table.pop-kv td {
  padding: 1.5px 0;
  vertical-align: top;
  word-break: break-word;
}
.kol-detail-pop table.pop-kv td:first-child {
  width: 78px;
  color: var(--muted);
  white-space: nowrap;
  font-size: 10.5px;
}
.kol-detail-pop .pop-link { color: var(--accent, #1e4a5f); text-decoration: none; }
.kol-detail-pop .pop-aud-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
}
.kol-detail-pop .pop-aud-tag {
  font-size: 10.5px;
  color: var(--muted);
  min-width: 30px;
}
.kol-detail-pop .pop-reasons .pop-reason {
  font-size: 11.5px;
  padding: 2px 0;
}
.kol-detail-pop .pop-reasons .pop-reason.pro { color: var(--ok, #2a8a4a); }
.kol-detail-pop .pop-reasons .pop-reason.con { color: var(--err, #d97533); }

/* 推荐依据表 */
.kol-detail-pop .pop-bd {
  width: 100%;
  font-size: 11px;
  border-collapse: collapse;
}
.kol-detail-pop .pop-bd thead th {
  text-align: left;
  font-weight: 500;
  color: var(--muted);
  padding: 3px 4px 3px 0;
  font-size: 10.5px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
/* 最后一列为文字依据，长句允许换行，避免挤出详情浮层。 */
.kol-detail-pop .pop-bd thead th:last-child,
.kol-detail-pop .pop-bd tbody td:last-child {
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  padding-left: 8px;
  padding-right: 4px;
}
.kol-detail-pop .pop-bd tbody td {
  padding: 3px 4px 3px 0;
  vertical-align: top;
  border-bottom: 1px dashed var(--border);
}
.kol-detail-pop .pop-bd tr.g-pos { background: rgba(42,138,74,0.04); }
.kol-detail-pop .pop-bd tr.g-neg { background: rgba(217,117,51,0.06); }
.kol-detail-pop .pop-bd .bd-dim { font-weight: 600; color: var(--ink); white-space: nowrap; }
.kol-detail-pop .pop-bd .bd-actual { color: var(--ink); }
.kol-detail-pop .pop-bd .bd-expected { color: var(--muted); font-size: 10.5px; }
.kol-detail-pop .pop-bd .bd-gain {
  text-align: right;
  white-space: nowrap;
  font-weight: 600;
}
.kol-detail-pop .pop-bd tr.g-pos .bd-gain { color: var(--ok, #2a8a4a); }
.kol-detail-pop .pop-bd tr.g-neg .bd-gain { color: var(--err, #d97533); }
.kol-detail-pop .pop-bd .bd-weight {
  font-weight: 400;
  color: var(--muted);
  margin-left: 1px;
}

/* 头像点击链接 */
.kol-avatar-link {
  display: inline-block;
  flex-shrink: 0;
  text-decoration: none;
  border-radius: 50%;
  transition: transform 120ms;
}
.kol-avatar-link:hover { transform: scale(1.05); }
.kol-avatar-link .kol-avatar { cursor: pointer; }

/* ========== 粉丝年龄堆叠条 ========== */
.age-bar {
  display: inline-flex;
  width: 700px;
  min-width: 700px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  cursor: help;
  font-family: 'JetBrains Mono', monospace;
}
.age-seg {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 10px;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  transition: filter 120ms ease;
}
.age-seg:hover { filter: brightness(1.1); }
.age-seg .age-seg-pct {
  font-size: 11px;
  font-weight: 600;
}
.age-seg .age-seg-key {
  font-size: 8.5px;
  opacity: 0.85;
}

/* ========== 导出预览表格 ========== */
/* 「预览并导出」的列选择条：夹在标题栏和预览表之间，勾选即时生效 */
.ex-colbar { padding: 10px 18px 12px; border-bottom: 1px solid var(--border); background: var(--bg-card); flex: none; }
.ex-colhint { font-size: 11.5px; color: var(--muted); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ex-colhint b { color: var(--ink-2); }
.ex-colbar { max-height: 40vh; overflow-y: auto; }
.ex-colopts { display: flex; flex-wrap: wrap; gap: 6px 8px; }
/* 列分组：默认提报表 + 三组可另外加的（与博主管理列池同一套语义） */
.ex-colgroup { margin-top: 9px; }
.ex-colgroup-t { font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 5px;
  display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.ex-colgroup-n { font-size: 11px; font-weight: 400; color: var(--muted); }
.ex-colopt { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--ink-2);
  cursor: pointer; border: 1px solid var(--border); border-radius: 5px; padding: 3px 8px; background: var(--bg); }
.ex-colopt.on { border-color: var(--accent); color: var(--accent); background: var(--bg-accent); }
.ex-colopt input { margin: 0; }
/* 混平台提示条：导出会分成两个 sheet，这件事必须一眼看到，所以比普通提示重一档 */
.ex-colhint-mix { display: block; margin: 2px 0 8px; padding: 7px 10px; border-radius: 6px;
  background: var(--bg-accent); border: 1px solid var(--border); color: var(--ink-2); line-height: 1.7; }
/* 平台专属列的小图标：只是标记，别喧宾夺主 */
.ex-colonly { font-size: 11px; opacity: .85; }
.preview-table {
  border-collapse: collapse;
  font-size: 12px;
  width: max-content;
  min-width: 100%;
}
/* 墨绿·鎏金：仅表头单元格右侧一条墨绿分隔线；数据格不画边框（原样） */
.preview-table th, .preview-table td {
  border: none;
  padding: 6px 12px;
  text-align: left;
  white-space: nowrap;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preview-table th {
  background: #14352E;
  color: #EFEADF;
  font-weight: 700;
  border-right: 1px solid #1F4A40;
  position: sticky;
  top: 0;
  z-index: 1;
}
.preview-table th:last-child { border-right: none; }
.preview-table th .ph-text { font-weight: 700; font-size: 12px; }
.preview-table th .ph-key { font-size: 10px; color: rgba(239,234,223,0.6); font-weight: 400; margin-top: 1px; }
.preview-table tbody tr:nth-child(even) td { background: #F4F8F4; }
.preview-table tbody td:first-child { color: #9AA39D; }
.preview-table .pv-link a { color: #C08A2E; font-weight: 700; text-decoration: none; }
.preview-table .pv-link a:hover { text-decoration: underline; }
.preview-table .cell-empty {
  color: var(--muted);
  background: repeating-linear-gradient(
    45deg, transparent, transparent 4px,
    rgba(0,0,0,0.03) 4px, rgba(0,0,0,0.03) 8px
  );
}

/* ========== 候选 toolbar：sticky 始终可见 ========== */
.candidate-toolbar.sticky-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-card, #fff);
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* ========== 候选表头：可点击排序 + 阈值徽章 ========== */
/* 表头本身是深色底白色字（见 .candidates thead th），所以 hover/active 都要在深底上做高亮，
   不能用浅色，否则白字会消失。 */
.candidates th.th-sort {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  /* 注意：不能用 position: relative —— 会覆盖 thead th 的 sticky，导致只有非排序列吸顶。
     sticky 本身也是定位上下文，排序角标的绝对定位照常工作。 */
  position: sticky;
  top: var(--cand-thead-top, 50px);
  z-index: 3;
  transition: background 120ms ease, color 120ms ease;
}
.candidates th.th-sort:hover {
  background: var(--ink-2);                 /* 比 ink 略亮的深色 */
  color: var(--bg-accent);                  /* 暖白色，比纯白更醒目 */
}
.candidates th.th-sort:hover .th-thr {
  color: var(--bg-accent);
  opacity: 0.85;
}
.candidates th.sort-active {
  background: var(--accent-2);              /* 当前排序列：橙色高亮 */
  color: #fff;
}
.candidates th.sort-active:hover {
  background: var(--accent-2);
  color: #fff;
  filter: brightness(1.08);
}
.candidates th.sort-active .th-thr {
  color: rgba(255, 255, 255, 0.82);
}
.candidates th .th-thr {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 2px;
  letter-spacing: 0.04em;
  text-transform: none;
}

/* ========== Brief 新增条件：标签下拉 + 值多选 ========== */
.chip-add-row select.group-add-label {
  padding: 4px 8px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  min-width: 160px;
  margin-right: 8px;
}
.chip-add-row .group-add-value-wrap {
  display: inline-block;
  margin-right: 8px;
}
.chip-add-row .group-add-value-wrap input[type="text"] {
  padding: 4px 8px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 4px;
  min-width: 220px;
}
.vchk-shell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  border: 1px dashed var(--border);
  border-radius: 4px;
  background: #fafafa;
  max-width: 760px;
}
.vchk-search {
  padding: 4px 10px;
  font-size: 12.5px;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 120ms;
}
.vchk-search:focus { outline: none; border-color: var(--accent, #1e4a5f); }
.vchk-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: flex-start;
  /* 容下 ≈ 200 个常见标签的折行后高度; 超出再滚 */
  max-height: 420px;
  overflow-y: auto;
  padding: 2px;
}
.vchk-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.vchk mark {
  background: #fff3a3;
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
  font-weight: 600;
}
/* 搜索时：命中项加底色边框、未命中淡化但仍可见 */
.vchk.vchk-hit {
  background: #fff8d6;
  outline: 1px solid #f0c84e;
  border-radius: 3px;
}
.vchk.vchk-dim { opacity: 0.45; }
.vchk.vchk-dim:hover { opacity: 1; }   /* 鼠标悬停恢复, 方便 still 选 */
.vchk.cat-hidden { display: none; }    /* 达人类型分类 tab 过滤掉的标签 */

/* 达人类型「分类 tab」：平台(抖音/小红书) + 来源(商务标签) 过滤 */
.cat-tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.cat-tabs-k { font-size: 11px; }
.cat-tab {
  font-size: 12px; padding: 3px 10px; cursor: pointer;
  border: 1px solid var(--border-strong, #b8a986); border-radius: 11px;
  background: var(--bg, #f7f3ea); color: var(--muted, #8a8275); line-height: 1.4;
}
.cat-tab:hover { color: var(--ink-2, #3d3d3d); }
.cat-tab.on { background: var(--accent, #1e4a5f); color: #fff; border-color: var(--accent, #1e4a5f); }
.cat-tab-sep { width: 1px; height: 16px; background: var(--border, #e0d6c2); margin: 0 2px; }
.cat-tab-hint { font-size: 11px; margin-left: auto; }
.vchk-count { font-size: 10px; color: var(--muted, #8a8275); }   /* 标签后的博主数量 */

/* ========== 数值输入 + 快捷符号按钮 ========== */
.num-shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  max-width: 720px;
}
.num-shell input.group-add-value {
  flex: 1 1 240px;
  min-width: 220px;
  padding: 4px 8px;
  font-size: 13px;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
}
.num-quick {
  display: inline-flex;
  gap: 2px;
}
.num-quick button {
  padding: 3px 9px;
  font-size: 13px;
  font-family: 'JetBrains Mono', 'PingFang SC', monospace;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  border-radius: 3px;
  min-width: 30px;
  user-select: none;
}
.num-quick button:hover {
  background: var(--bg-accent);
  border-color: var(--accent, #1e4a5f);
}
.num-hint {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 11.5px;
  padding-top: 2px;
  line-height: 1.4;
}
.vchk {
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  user-select: none;
}
.vchk input { margin: 0; }
.vthr-hint {
  font-size: 11px;
  color: var(--muted);
  margin-left: 8px;
  padding-left: 8px;
  border-left: 1px solid var(--border);
}
/* 受众占比阈值输入：选中项合计 ≥ X% */
.vthr-set {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--ink-2);
  margin-left: 8px; padding-left: 8px; border-left: 1px solid var(--border);
}
.vthr-set .vchk-thr {
  width: 50px; padding: 2px 5px; font-size: 12px; text-align: center;
  border: 1px solid var(--border-strong); border-radius: 3px; background: var(--bg);
}
.vthr-set .vchk-thr:focus { border-color: var(--accent); outline: none; }
/* 达人类型 AND/OR 切换 */
.vchk-mode {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  margin-left: 12px;
  padding: 2px 8px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
  background: #fff;
}
.vchk-mode:hover { background: var(--bg-accent, #fef6d8); }
.vchk-mode input[type=checkbox] { margin: 0; }

/* 标签集条 */
.tagset-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 6px 2px 8px; margin-bottom: 6px; border-bottom: 1px dashed var(--border);
}
.tagset-bar .tagset-k { font-size: 11px; margin-right: 2px; }
.tagset-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--bg-accent, #fef6d8); border: 1px solid var(--border-strong);
  border-radius: 12px; padding: 1px 4px 1px 9px; font-size: 12px;
}
.tagset-chip .ts-name { cursor: pointer; }
.tagset-chip:hover { border-color: var(--accent); }
.tagset-chip .ts-n {
  font-size: 9.5px; color: var(--muted); background: #fff;
  border-radius: 8px; padding: 0 5px;
}
.tagset-chip .ts-del {
  border: none; background: transparent; color: var(--muted);
  cursor: pointer; font-size: 14px; line-height: 1; padding: 0 2px;
}
.tagset-chip .ts-del:hover { color: var(--err); }
.tagset-chip .ts-upd {
  border: none; background: transparent; color: var(--muted);
  cursor: pointer; font-size: 12px; line-height: 1; padding: 0 1px;
}
.tagset-chip .ts-upd:hover { color: var(--accent); }
/* 共享(管理员)标签集：淡蓝底 + 只读角标，与个人标签集区分 */
.tagset-chip.is-shared { background: var(--bg-info, #eef4fb); border-color: var(--accent); }
.tagset-chip .ts-shared {
  font-size: 9px; color: var(--accent); background: #fff;
  border-radius: 8px; padding: 0 5px; white-space: nowrap;
}
.tagset-add {
  border: 1px dashed var(--ok); background: #eaf4ee; color: var(--ok);
  border-radius: 12px; padding: 2px 9px; font-size: 12px; cursor: pointer;
}
.tagset-add:hover { background: var(--ok); color: #fff; }

/* 条件集条（在条件区底部） */
.cond-sets {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin: 8px 0 4px; padding-top: 8px; border-top: 1px dashed var(--border);
}
.cond-sets .cs-k { font-size: 11px; margin-right: 2px; }
.condset-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--bg-accent, #fef6d8); border: 1px solid var(--border-strong);
  border-radius: 12px; padding: 1px 4px 1px 9px; font-size: 12px;
}
.condset-chip:hover { border-color: var(--accent); }
.condset-chip .cs-name { cursor: pointer; }
.condset-chip .cs-n {
  font-size: 9.5px; color: var(--muted); background: #fff; border-radius: 8px; padding: 0 5px;
}
.condset-chip .cs-upd, .condset-chip .cs-del {
  border: none; background: transparent; color: var(--muted);
  cursor: pointer; line-height: 1; padding: 0 1px;
}
.condset-chip .cs-upd { font-size: 12px; }
.condset-chip .cs-del { font-size: 14px; }
.condset-chip .cs-upd:hover { color: var(--accent); }
.condset-chip .cs-del:hover { color: var(--err); }
.condset-add {
  border: 1px dashed var(--ok); background: #eaf4ee; color: var(--ok);
  border-radius: 12px; padding: 2px 9px; font-size: 12px; cursor: pointer;
}
.condset-add:hover { background: var(--ok); color: #fff; }

/* ========== Error panel（异常展示） ========== */
.err-panel {
  margin: 12px 0;
  padding: 14px 16px;
  border: 1px solid #fbb6b6;
  background: #fff5f5;
  border-radius: 6px;
  color: #5a1f1f;
  font-size: 13px;
}
.err-panel .err-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: #b91c1c;
}
.err-panel .err-msg {
  margin: 4px 0 10px;
  white-space: pre-wrap;
  word-break: break-word;
}
.err-panel .err-line {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin: 2px 0;
  font-size: 12px;
}
.err-panel .err-line .err-k {
  flex: 0 0 64px;
  color: #88595d;
}
.err-panel code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  background: #fde8e8;
  padding: 1px 6px;
  border-radius: 3px;
  word-break: break-all;
}
.err-panel .err-details {
  margin-top: 10px;
}
.err-panel .err-details summary {
  cursor: pointer;
  user-select: none;
  font-size: 12px;
  color: #88595d;
}
.err-panel .err-details pre {
  margin-top: 8px;
  padding: 10px;
  background: #fff;
  border: 1px solid #f3c8c8;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre;
  color: #4a1717;
}
.err-panel .err-foot {
  margin-top: 10px;
  font-size: 11.5px;
  color: #88595d;
}

/* ========== Utilities ========== */
.hidden { display: none !important; }
.loading {
  display: inline-block;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ 登录页 ============ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--bg-card);
  border: 1.5px solid var(--ink);
  padding: 32px 28px;
  box-shadow: 6px 6px 0 var(--border);
}
.login-card .field-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.login-card input[type="text"],
.login-card input[type="password"] {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  font-size: 13px;
  box-sizing: border-box;
}
.login-card input:focus { border-color: var(--accent); background: #fff; outline: none; }

/* ============ 顶栏用户区 ============ */
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
}
.user-chip .user-name {
  font-size: 12px;
  color: var(--ink-2);
  padding: 3px 8px;
  background: var(--bg-accent);
  border: 1px solid var(--border);
}

/* ============ 详情浮层：标签区 ============ */
.pop-tags .tagrow { margin-bottom: 8px; }
.pop-tags .tagrow:last-child { margin-bottom: 0; }
.tagrow-head { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.tagrow-k {
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px;
  color: var(--muted); letter-spacing: 0.04em;
}
.tag-edit-btn {
  border: 1px solid var(--border-strong); background: var(--bg);
  color: var(--accent); font-size: 10.5px; padding: 1px 7px; cursor: pointer;
  border-radius: 3px; line-height: 1.5;
}
.tag-edit-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.tagrow-v { display: flex; flex-wrap: wrap; gap: 4px; }
.tagchip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--bg-accent); border: 1px solid var(--border);
  border-radius: 3px; padding: 1px 7px; font-size: 11.5px; color: var(--ink-2);
}
/* 命中所选类目的标签：高亮（模糊匹配的关键词子串用 <b> 加粗） */
.tagchip.hit {
  background: #fff3cd; border-color: var(--accent-2); color: var(--ink);
}
.tagchip.hit b { color: var(--accent-2); font-weight: 700; }
/* 枚举条件"全不选"按钮 */
.vchk-clear {
  margin-left: 12px; padding: 2px 10px; font-size: 12px; cursor: pointer;
  border: 1px dashed var(--border-strong); border-radius: 12px;
  background: #fff; color: var(--ink-2);
}
.vchk-clear:hover { border-color: var(--err); color: var(--err); }

/* ============ 详情浮层：受众画像紧凑网格 ============ */
.pop-aud-time {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  color: var(--muted); font-weight: 400; margin-left: 6px;
}
.aud-grid { display: flex; flex-direction: column; gap: 5px; }
.aud-row { display: flex; align-items: baseline; gap: 8px; }
.aud-k {
  flex: 0 0 48px; font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px; color: var(--muted); text-align: right;
}
.aud-v { flex: 1; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.aud-chip {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 3px; padding: 0 6px; font-size: 11.5px; color: var(--ink-2);
}
.aud-chip b { font-weight: 600; color: var(--ink); }
.gender-mini { display: inline-flex; align-items: center; gap: 8px; }
.gm-bar {
  display: inline-block; width: 70px; height: 7px; border-radius: 4px;
  background: #5b8fb9; overflow: hidden; position: relative;
}
.gm-bar i { display: block; height: 100%; background: #d96b9a; }
.gm-txt { font-size: 11.5px; color: var(--ink-2); }

/* 表格里的紧凑年龄 */
.age-mini { font-size: 12px; white-space: nowrap; }
.age-mini b { font-weight: 600; }

/* ============ 标签编辑弹层 ============ */
.tag-selected-box {
  display: flex; flex-wrap: wrap; gap: 5px; min-height: 34px;
  padding: 6px 8px; border: 1px solid var(--border-strong); background: var(--bg);
}
.tagchip.removable { background: var(--bg-accent); border-color: var(--border-strong); }
.tagchip .tc-x {
  border: none; background: transparent; color: var(--muted);
  cursor: pointer; font-size: 14px; line-height: 1; padding: 0 0 0 2px;
}
.tagchip .tc-x:hover { color: var(--err); }
.tag-options-box {
  display: flex; flex-wrap: wrap; gap: 5px; max-height: 240px; overflow-y: auto;
  padding: 8px; border: 1px solid var(--border); background: var(--bg-card);
}
/* 批量输入预览：空格分隔一次输入多个标签时，回车前先看清会加哪几个、哪些是新建的 */
.km-bulk-preview { margin-top: 6px; padding: 7px 9px; background: var(--bg-accent);
  border: 1px dashed var(--border-strong); }
.km-bulk-preview .km-pv-t { font-size: 11.5px; color: var(--muted); margin-bottom: 5px; }
.km-bulk-preview .km-pv-list { display: flex; flex-wrap: wrap; gap: 5px; }
.tagchip.selectable { cursor: pointer; }
.tagchip.selectable:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.tagchip.selectable:hover .tc-n { color: #e6eef2; }
.tagchip .tc-n {
  font-family: 'JetBrains Mono', monospace; font-size: 9.5px;
  color: var(--muted); margin-left: 3px;
}
.tagchip.addnew {
  cursor: pointer; background: #eaf4ee; border-color: var(--ok); color: var(--ok);
}
.tagchip.addnew:hover { background: var(--ok); color: #fff; }
#tagEditModal input[type="text"] {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border-strong);
  background: var(--bg); font-size: 13px; box-sizing: border-box;
}
#tagEditModal input[type="text"]:focus { border-color: var(--accent); background: #fff; outline: none; }

/* ============ 头部左侧内联标签（名称✎：chip 自然换行） ============ */
.kol-detail-pop .pop-tags-inline {
  margin-top: 7px; display: flex; flex-direction: column; gap: 4px;
}
.kol-detail-pop .tagline { display: flex; align-items: baseline; gap: 2px; font-size: 12px; line-height: 1.6; }
.kol-detail-pop .tagline-k {
  flex: 0 0 auto; white-space: nowrap;
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: var(--muted);
}
.kol-detail-pop .tagk { color: var(--muted); }
.kol-detail-pop .tagk.edit { cursor: pointer; color: var(--accent); }
.kol-detail-pop .tagk.edit:hover { color: var(--accent-2); }
.kol-detail-pop .tagk-ico { margin-left: 2px; font-size: 10px; opacity: 0.75; }
.kol-detail-pop .tagline-v { flex: 1; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }

/* ============ 受众画像 mini 柱状图 ============ */
.kol-detail-pop .pop-aud-hint {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  color: var(--muted); font-weight: 400; margin-left: 6px;
}
/* 画像卡片：单行横向滚动，不换行（省竖向空间，滚轮可左右滑） */
.kol-detail-pop .aud-cards {
  display: flex; flex-wrap: nowrap; gap: 8px;
  overflow-x: auto; overflow-y: hidden; padding-bottom: 5px;
  scrollbar-width: thin;
}
.kol-detail-pop .aud-cards::-webkit-scrollbar { height: 6px; }
.kol-detail-pop .aud-cards::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
.kol-detail-pop .aud-card {
  flex: 0 0 auto; padding: 3px 8px 3px; border: 1px solid var(--border);
  border-top: 2px solid var(--border-strong);   /* 顶部色条=维度配色(内联覆盖) */
  border-radius: 3px; background: var(--bg-card);
}
/* 标题=image 概览("上海居多"), 居中、维度配色(内联) */
.kol-detail-pop .aud-card-img {
  font-size: 10.5px; font-weight: 600; text-align: center; max-width: 120px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 3px;
}
/* 柱状图方块：相对定位 + 顶部预留 16px 色带，类别名浮在右上角(距角 2px) */
.kol-detail-pop .aud-bars {
  position: relative; display: flex; align-items: flex-end;
  gap: 6px; height: 64px; padding-top: 16px; box-sizing: border-box;
}
.kol-detail-pop .aud-cat {
  position: absolute; top: 2px; right: 2px; z-index: 2; pointer-events: none;
  font-family: 'JetBrains Mono', monospace; font-size: 9px;
  color: var(--muted); line-height: 1; white-space: nowrap;
  background: var(--bg-card); padding: 0 1px; border-radius: 2px;
}
.kol-detail-pop .mb-col {
  display: flex; flex-direction: column; align-items: center;
  justify-content: flex-end; min-width: 28px;
}
.kol-detail-pop .mb-pct {
  font-family: 'JetBrains Mono', monospace; font-size: 9.5px;
  color: var(--ink-2); line-height: 1; margin-bottom: 2px;
}
.kol-detail-pop .mb-bar {
  width: 16px; background: linear-gradient(180deg, var(--accent), #3d7a93);
  border-radius: 2px 2px 0 0;
}
.kol-detail-pop .mb-key {
  font-size: 9px; color: var(--muted); margin-top: 3px;
  max-width: 44px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 受众画像 跟随光标的即时浮层 */
.aud-tip {
  position: fixed; z-index: 1200; pointer-events: none;
  background: #1f1f1f; color: #fff; border-radius: 5px;
  padding: 7px 10px; font-size: 11.5px; line-height: 1.55;
  box-shadow: 0 6px 18px rgba(0,0,0,0.32);
  max-width: 260px; max-height: 60vh; overflow: hidden;
}
.aud-tip .audtip-h { font-weight: 600; margin-bottom: 4px; color: #ffd9a8; }
.aud-tip .audtip-row { display: flex; justify-content: space-between; gap: 18px; }
.aud-tip .audtip-row .mono { color: #ffd9a8; font-family: 'JetBrains Mono', monospace; }

/* ============ 搜索条件历史（筛选按钮前的 5 个版本） ============ */
.brief-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.search-history { display: flex; align-items: center; gap: 6px; flex: 1; flex-wrap: wrap; min-width: 0; }
.search-history .sh-title {
  font-size: 10.5px; color: var(--muted); letter-spacing: 0.04em; white-space: nowrap;
}
.sh-chip {
  display: inline-flex; align-items: center; gap: 5px;
  max-width: 200px; padding: 3px 8px; font-size: 11.5px; cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--bg); color: var(--ink-2);
  border-radius: 3px; line-height: 1.4; overflow: hidden; white-space: nowrap;
}
.sh-chip:hover { border-color: var(--accent); color: var(--accent); }
.sh-chip.active { border-color: var(--accent-2); background: var(--bg-accent); color: var(--ink); font-weight: 600; }
.sh-chip .sh-ts { font-size: 9.5px; color: var(--muted); }
.sh-chip.active .sh-ts { color: var(--accent-2); }
.sh-chip .sh-meta { font-size: 9.5px; color: var(--muted); }

/* 撤销按钮（在「新增」旁） */
.group-undo-btn { color: var(--accent-2); }
.group-undo-btn:disabled { color: var(--muted); opacity: 0.5; cursor: default; }

/* 画像浮层里的 description 一行 */
.aud-tip .audtip-desc { color: #e8d9c0; margin-bottom: 5px; max-width: 240px; white-space: normal; }

/* ===== 项目删除入口（卡片右上角 hover 显形 / 表格行内） ===== */
.project-card { position: relative; }
.project-card .p-del {
  position: absolute; top: 8px; right: 8px;
  font-size: 11px; padding: 2px 8px; line-height: 1.4;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .12s;
}
.project-card:hover .p-del { opacity: 1; }
.project-card .p-del:hover { color: var(--err); border-color: var(--err); }
.proj-table .p-del-row {
  font-size: 11px; padding: 2px 8px; background: transparent;
  border: 1px solid var(--border); color: var(--muted); cursor: pointer;
}
.proj-table .p-del-row:hover { color: var(--err); border-color: var(--err); }

/* ===== 筛选漏斗 / 可解释筛选面板 ===== */
.exclusion-panel {
  border: 1px solid var(--border); background: var(--bg-card);
  margin-bottom: 14px; font-size: 12.5px;
}
.exclusion-panel summary {
  cursor: pointer; padding: 9px 12px; font-weight: 600;
  display: flex; align-items: center; gap: 8px; list-style: none;
}
.exclusion-panel summary::-webkit-details-marker { display: none; }
.exclusion-panel .funnel-stat { color: var(--muted); font-weight: 400; font-size: 11.5px; }
.exclusion-list { padding: 4px 12px 12px; }
.excl-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0; border-top: 1px dashed var(--border);
}
.excl-dim { min-width: 120px; font-weight: 500; }
.excl-count { color: var(--err); font-variant-numeric: tabular-nums; min-width: 70px; }
.excl-expected { color: var(--muted); flex: 1; font-size: 11.5px; }
.excl-relax {
  font-size: 11px; padding: 3px 10px; background: transparent;
  border: 1px solid var(--accent-2); color: var(--accent-2); cursor: pointer; white-space: nowrap;
}
.excl-relax:hover { background: var(--accent-2); color: #fff; }

/* ===== 候选表多级排序：表头徽标 + 提示 ===== */
.th-sort { cursor: pointer; user-select: none; white-space: nowrap; }
.th-sort:hover { color: var(--accent-2); }
.th-sort.sort-active { color: var(--accent-2); }
.th-sort-mark { font-size: 10px; }
.th-sort-prio {
  font-size: 8.5px; font-weight: 700; margin-left: 1px;
  padding: 0 2px; border-radius: 6px; background: var(--accent-2); color: #fff;
  vertical-align: super; line-height: 1;
}
.sort-hint { color: var(--muted); font-size: 11px; cursor: default; }

/* ════════════════════════════════════════════════════════════════════
   两栏 master-detail 布局（左项目导航 / 右详情）
   ════════════════════════════════════════════════════════════════════ */
#appRoot.page {
  max-width: none; margin: 0; padding: 0;
  height: 100vh; overflow: hidden;
  display: flex; flex-direction: column;
}
#appRoot > .topbar {
  padding: 12px 22px; margin-bottom: 0; flex-shrink: 0;
}
.app-shell { flex: 1; min-height: 0; display: flex; }

/* ── 左栏 ── */
.sidebar {
  width: 288px; flex-shrink: 0;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 12px; gap: 9px; overflow: hidden;
}
.sidebar-new { width: 100%; }
.sidebar-search input {
  width: 100%; padding: 7px 10px; font-size: 12.5px;
  border: 1px solid var(--border); background: var(--bg); border-radius: 6px;
}
.sidebar-filters { display: flex; flex-wrap: wrap; gap: 4px; }
.sidebar-filters button {
  font-size: 11px; padding: 3px 9px; border: 1px solid var(--border);
  background: var(--bg); border-radius: 11px; cursor: pointer; color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
}
.sidebar-filters button:hover { border-color: var(--border-strong); color: var(--ink-2); }
.sidebar-filters button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.sidebar-tools { display: flex; align-items: center; justify-content: space-between; font-size: 11px; }
.sidebar-timeby { font-size: 11px; margin-top: -2px; }
.meta-toggle { display: flex; align-items: center; gap: 5px; cursor: pointer; color: var(--muted); user-select: none; }
.sidebar-list { flex: 1; overflow-y: auto; margin: 0 -6px; padding: 2px 6px; }

.pn-group { margin-bottom: 2px; }
/* 品牌分组标题 = 分类标签（muted 小字 + 分隔线），刻意区别于下面的项目色块卡 */
.pn-group-head {
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 10px 4px 4px; font-size: 11px; color: var(--muted); font-weight: 600;
  letter-spacing: 0.03em;
  position: sticky; top: 0; background: var(--bg-card); z-index: 1;
}
.pn-group + .pn-group .pn-group-head { border-top: 1px solid var(--border); margin-top: 2px; }
.pn-group-head:hover { color: var(--ink-2); }
.pn-group-ico { width: 9px; font-size: 9px; color: var(--border-strong); }
.pn-group-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn-group-n { color: var(--border-strong); font-size: 11px; }
/* 品牌组：未导出/已导出 数量色块（背景色与列表项状态色 st-in_progress / st-completed 一致，只显数字） */
.pn-group-cnt { flex: 0 0 auto; display: inline-flex; gap: 3px; align-items: center; }
.pn-cnt { min-width: 15px; text-align: center; font-size: 10.5px; line-height: 15px; padding: 0 4px; border-radius: 3px; color: #4a463d; }
.pn-cnt-todo { background: #fbeccc; }   /* 未导出（进行中/草稿）= 列表 st-in_progress 底色 */
.pn-cnt-done { background: #e6f0d8; }   /* 已导出（completed）= 列表 st-completed 底色 */

/* 项目卡：状态色块，把 标题+状态+(已选/时间/创建人) 包成一块 */
.proj-nav-item {
  position: relative; padding: 8px 10px; margin: 4px 0; border-radius: 7px;
  cursor: pointer; border: 1.5px solid transparent; transition: filter .1s;
}
.proj-nav-item.st-draft       { background: #efece3; }
.proj-nav-item.st-in_progress { background: #fbeccc; }
.proj-nav-item.st-completed   { background: #e6f0d8; }
.proj-nav-item:hover { filter: brightness(0.965); }
.proj-nav-item.active { border-color: var(--accent); }
/* 标题行：名字占满；状态绝对定位在右，长名字尾部被状态遮住（按需求允许） */
.pn-title-row { position: relative; min-height: 18px; }
.pn-title {
  display: block; font-size: 13px; font-weight: 500; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 状态徽章默认隐藏（卡片底色已表达状态），鼠标指向项目时才显示文字 */
.pn-status {
  display: none;
  position: absolute; top: 50%; right: 0; transform: translateY(-50%);
  font-size: 10px; padding: 1px 7px; border-radius: 7px; line-height: 1.5;
  font-family: 'JetBrains Mono', monospace; white-space: nowrap;
}
.proj-nav-item:hover .pn-status { display: block; }
.pn-status.s-draft       { background: #d8d2c4; color: #5f5e5a; }
.pn-status.s-in_progress { background: var(--warn); color: #fff; }
.pn-status.s-completed   { background: var(--ok);   color: #fff; }
/* 可选明细：已选 · 创建时间 · 创建人（由"显示明细"开关控制，三者一起） */
.pn-meta { margin-top: 4px; font-size: 10.5px; color: var(--ink-2); opacity: 0.82; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proj-nav-empty { padding: 22px 10px; font-size: 12px; text-align: center; line-height: 1.7; }

/* ── 右栏 ── */
.detail-pane { flex: 1; min-width: 0; overflow: auto; padding: 18px 24px 64px; }
.detail-empty { height: 100%; display: flex; align-items: center; justify-content: center; }
.detail-empty-inner { text-align: center; color: var(--muted); }
.de-title { font-size: 19px; color: var(--ink-2); margin-bottom: 8px; }
.de-sub { font-size: 12px; margin-bottom: 20px; line-height: 1.7; max-width: 420px; }

/* 新建视图 */
.create-view { max-width: 880px; }
.create-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.create-hint { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; line-height: 1.8; }
.create-hint b { color: var(--ink-2); }
.create-brief {
  width: 100%; min-height: 340px; padding: 14px; border: 1px solid var(--border-strong);
  background: var(--bg-card); font-size: 14px; line-height: 1.7; resize: vertical;
  border-radius: 6px; font-family: inherit;
}
.create-brief:focus { outline: none; border-color: var(--accent); }
.create-actions { display: flex; gap: 10px; margin-top: 14px; }
/* 新建视图·定询勾选框 */
.create-inquiry { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2);
  cursor: pointer; margin: 12px 0 2px; }
.create-inquiry input { width: 15px; height: 15px; accent-color: var(--accent); flex: none; }
/* 定询模式·需求区横幅 */
.inquiry-banner { margin-top: 10px; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--bg-info); }
.inq-head { font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.inq-ok { color: var(--ok); font-size: 13px; margin: 4px 0; line-height: 1.6; }
.inq-bad { color: var(--warn); font-size: 13px; margin: 6px 0; line-height: 1.6; }
.inq-bad .mono { color: var(--muted); font-size: 11px; margin-top: 2px; }
.inq-fuzzy { font-size: 11px; color: var(--accent-2); background: var(--bg-accent); padding: 0 5px; border-radius: 4px; margin-left: 3px; white-space: nowrap; }
/* 卡片内容框自动增高：给最小高度、随内容长高、尽量不出滚动条 */
.ce-autogrow { min-height: 180px; overflow-y: hidden; resize: none; }

/* 详情头部：可编辑名 / 品牌 */
.detail-header { border-bottom: 1px solid var(--border); padding-bottom: 13px; margin-bottom: 16px; }
.dh-titlerow { display: flex; align-items: center; gap: 9px; }
.dh-name { font-family: 'Fraunces', serif; font-size: 21px; font-weight: 500; cursor: pointer; line-height: 1.2; }
.dh-name:hover { color: var(--accent); }
.dh-edit { border: none; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; padding: 2px 3px; }
.dh-edit:hover { color: var(--accent); }
.dh-del { border: 1px solid var(--border); background: transparent; color: var(--err); cursor: pointer; font-size: 12px; padding: 3px 12px; border-radius: 4px; }
.dh-del:hover { background: var(--err); color: #fff; border-color: var(--err); }
.dh-meta { margin-top: 7px; font-size: 12px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dh-meta .dh-sep { color: var(--border-strong); }
.dh-brand-wrap b { color: var(--ink); font-weight: 600; }
.dh-input { font-size: 15px; padding: 3px 7px; border: 1px solid var(--accent); border-radius: 4px; font-family: inherit; }

/* 详情分段 */
.d-section { margin-bottom: 18px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-card); }
.d-section-head { display: flex; align-items: center; gap: 9px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.d-section-title { font-size: 13px; font-weight: 600; color: var(--ink); }
.d-optional { font-size: 11px; color: var(--muted); border: 1px solid var(--border); border-radius: 9px; padding: 0 7px; }
.d-section-body { padding: 14px; }
.d-collapsible .d-section-head { cursor: pointer; user-select: none; }
.d-collapsible.collapsed .d-section-body { display: none; }
.d-collapsible.collapsed .d-section-head { border-bottom: none; }
.d-collapse-ico { color: var(--muted); font-size: 12px; transition: transform 120ms ease; display: inline-block; }
.d-collapsible:not(.collapsed) .d-collapse-ico { transform: rotate(90deg); }

/* 通用状态徽章（侧栏/头部复用） */
.p-status { display: inline-block; font-size: 11px; padding: 1px 9px; border: 1px solid var(--border); border-radius: 9px; color: var(--muted); font-family: 'JetBrains Mono', monospace; }
.p-status.in_progress { color: var(--warn); border-color: var(--warn); }
.p-status.completed { color: var(--ok); border-color: var(--ok); }
.p-status.draft { color: var(--muted); }

/* 窄屏：收窄侧栏 */
@media (max-width: 1024px) {
  .sidebar { width: 230px; }
}

/* ════════════════════════════════════════════════════════════════════
   顶栏移除 → logo 进侧栏顶部、用户菜单进侧栏底部头像；状态 hover 才显示
   ════════════════════════════════════════════════════════════════════ */
/* 侧栏顶部小 logo（删掉了英文 eyebrow，标题缩小） */
.sidebar-brand {
  font-family: 'Fraunces', serif; font-weight: 500; font-size: 17px;
  letter-spacing: -0.01em; color: var(--ink); line-height: 1.1; padding: 2px;
}
.sidebar-brand em { font-style: italic; font-weight: 400; color: var(--accent); }

/* 侧栏底部：头像 + 弹出菜单（改密码 / 后台 / 退出） */
.sidebar-user { position: relative; border-top: 1px solid var(--border); padding-top: 8px; margin-top: 2px; flex-shrink: 0; }
.su-trigger {
  display: flex; align-items: center; gap: 8px; width: 100%;
  border: none; background: transparent; cursor: pointer; padding: 5px 4px; border-radius: 6px;
}
.su-trigger:hover { background: var(--bg-accent); }
.su-avatar {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
}
.su-name { flex: 1; text-align: left; font-size: 12.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.su-caret { color: var(--muted); font-size: 11px; transition: transform 120ms; }
.sidebar-user.open .su-caret { transform: rotate(180deg); }
.su-menu {
  position: absolute; bottom: calc(100% + 4px); left: 0; right: 0;
  background: var(--bg-card); border: 1px solid var(--border-strong); border-radius: 8px;
  padding: 4px; box-shadow: 0 4px 18px rgba(40,30,15,0.16); z-index: 30;
}
.su-item {
  display: block; width: 100%; text-align: left; border: none; background: transparent;
  padding: 8px 10px; font-size: 12.5px; color: var(--ink); cursor: pointer; border-radius: 5px; text-decoration: none;
}
.su-item:hover { background: var(--bg-accent); }
.su-logout { color: var(--err); }

/* accent 按钮 hover 阴影改用墨色，避免橙底+橙影糊成一团 */
.btn.accent:hover:not(:disabled) { box-shadow: 3px 3px 0 var(--ink); }

/* 需求原文：详情页默认展示、可编辑，比新建时矮一些；上方一行提示 */
/* 原文框：按内容自适应高度，封顶 390px（超过则内部滚动），内容少则自动变矮 */
textarea.brief-detail { min-height: 0; height: auto; max-height: 390px; overflow-y: auto; resize: none; margin-bottom: 12px; }
.brief-hint { font-size: 11px; color: var(--muted); margin-bottom: 6px; }

/* ════════ 人员筛选（一级，管理员）+ 项目总览表 ════════ */
.sidebar-person { display: flex; gap: 6px; align-items: center; }
.person-select {
  flex: 1; min-width: 0; padding: 5px 8px; font-size: 12px;
  border: 1px solid var(--border-strong); background: var(--bg); border-radius: 6px;
  color: var(--ink); font-family: inherit; cursor: pointer;
}
#overviewBtn { flex-shrink: 0; white-space: nowrap; }

/* 总览模态：宽 */
.modal.modal-wide { max-width: min(1180px, 94vw); width: 94vw; }
.modal.modal-wide .modal-body { max-height: 78vh; overflow: auto; }
.ov-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; position: sticky; top: 0; background: var(--bg-card); padding-bottom: 8px; z-index: 2; }
.ov-toolbar input { flex: 1; min-width: 220px; padding: 7px 10px; font-size: 13px; border: 1px solid var(--border-strong); background: var(--bg); border-radius: 6px; }
.ov-toolbar select { padding: 7px 10px; font-size: 13px; border: 1px solid var(--border-strong); background: var(--bg); border-radius: 6px; cursor: pointer; }
.ov-table-wrap { overflow-x: auto; }
.ov-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ov-table thead th {
  position: sticky; top: 0; background: var(--ink); color: var(--bg);
  padding: 8px 12px; text-align: left; white-space: nowrap; cursor: pointer;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.04em; user-select: none;
}
.ov-table thead th.ov-center { text-align: center; }
.ov-table thead th:hover { background: var(--ink-2); }
.ov-table thead th.active { color: var(--bg-accent); }
.ov-table tbody td { padding: 8px 12px; border-top: 1px solid var(--border); white-space: nowrap; }
.ov-table tbody tr { cursor: pointer; }
.ov-table tbody tr:hover { background: var(--bg-accent); }
.ov-table .ov-name { font-weight: 500; color: var(--ink); max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.ov-table .ov-time { color: var(--muted); font-size: 11.5px; }
.ov-table .ov-center { text-align: center; }
.ov-table .ov-num, .ov-table thead th.ov-num { text-align: right; white-space: nowrap; }

/* ========== 群发消息面板（导出区 · 仅管理员） ========== */
.bc-warn {
  background: var(--bg-accent); border: 1px solid var(--border-strong); border-left: 3px solid var(--warn);
  padding: 8px 11px; font-size: 12px; color: var(--ink-2); margin-bottom: 10px; line-height: 1.6;
}
.bc-warn code { font-family: 'JetBrains Mono', monospace; font-size: 11px; }
.bc-warn.bc-bad { border-left-color: var(--err); color: var(--err); }
.bc-summary { font-size: 12.5px; color: var(--ink-2); margin-bottom: 10px; }
.bc-table-wrap { border: 1px solid var(--border); max-height: 320px; overflow: auto; margin-bottom: 12px; }
.bc-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.bc-table thead th {
  position: sticky; top: 0; background: var(--ink); color: var(--bg); text-align: left;
  padding: 6px 10px; font-size: 10.5px; font-family: 'JetBrains Mono', monospace; letter-spacing: 0.06em;
}
.bc-table tbody td { padding: 6px 10px; border-top: 1px solid var(--border); vertical-align: top; }
.bc-table tbody tr:hover { background: var(--bg-accent); }
.bc-unmatched td { color: var(--muted); }
.bc-inactive { font-size: 10px; color: var(--muted); border: 1px solid var(--border); padding: 0 4px; }
.bc-reb-up { color: var(--ok); font-weight: 700; background: rgba(34, 160, 90, 0.16); border-radius: 4px; }
.bc-excl { font-size: 10px; color: #fff; background: var(--accent); padding: 0 5px; border-radius: 2px; white-space: nowrap; }
.bc-unbound { border: 1px dashed var(--border); border-radius: 6px; padding: 8px 10px; margin-bottom: 12px; background: var(--bg-accent); }
.bc-unbound-head { font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bc-unbound-head .btn { margin-left: 2px; }
.bc-unbound-list { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.6; }
/* 通知经纪人拉群弹窗 */
.nb-summary { font-size: 12.5px; color: var(--ink-2); margin: 10px 0; }
.nb-warn { background: rgba(184,92,0,.08); border: 1px solid var(--warn); border-radius: 5px; padding: 7px 10px; font-size: 12px; color: var(--warn); margin-bottom: 8px; line-height: 1.6; }
.nb-list { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow: auto; margin-bottom: 12px; }
.nb-row { border: 1px solid var(--border); border-left: 3px solid var(--ok); border-radius: 5px; padding: 8px 10px; background: var(--bg); }
.nb-broker { font-size: 13px; font-weight: 600; color: var(--ink); }
.nb-contact { font-size: 10.5px; font-weight: 400; color: var(--ok); margin-left: 4px; }
.nb-bloggers { font-size: 12px; color: var(--ink-2); margin: 3px 0; }
.nb-msg { font-size: 11.5px; color: var(--muted); background: var(--bg-accent); border-radius: 4px; padding: 5px 8px; white-space: pre-wrap; line-height: 1.5; }
/* 群发消息下方：AI 分析 / 预览卡片 按钮条 */
.bc-cardbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
/* 卡片栏里的勾选框去掉默认下边距，才能和右侧按钮/说明在同一行垂直居中 */
.bc-cardbar .bc-at { margin-bottom: 0; }
/* 群发·固定消息只读预览 */
.bc-msg-preview { margin: 6px 0 0; padding: 12px 14px; border: 1px dashed var(--border);
  border-radius: 8px; background: var(--bg-info); font-family: inherit; font-size: 13px;
  line-height: 1.7; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
/* 商单邀约卡 · 手机端预览（照搬设计稿 reference.html 的视觉；卡片内部全用内联样式，这里只管外框） */
.card-preview-modal { width: auto; max-width: 460px; }
#cardPreviewBody { padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; background: #e9e7e2; }
.mcn-hint { font-size: 12px; color: #8a5a00; background: #fff9ec; border: 1px solid #e9c46a; border-radius: 8px; padding: 8px 12px; max-width: 402px; line-height: 1.6; }
.mcn-phone { width: 402px; max-width: 100%; height: min(74vh, 760px); background: #f4f5f8; border-radius: 28px; overflow: hidden; box-shadow: 0 24px 60px -20px rgba(0,0,0,.35); position: relative; font-family: 'Noto Sans SC', system-ui, -apple-system, sans-serif; }
.mcn-content { padding: 16px 20px 118px; height: 100%; overflow-y: auto; }
.mcn-content::-webkit-scrollbar { display: none; }
.mcn-actionbar { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 20px 20px; display: flex; gap: 12px; background: #f4f5f8; }
.mcn-actionbar::before { content: ''; position: absolute; left: 0; right: 0; top: -44px; height: 44px; background: linear-gradient(to top, #f4f5f8, rgba(244,245,248,0)); pointer-events: none; }
.mcn-decline { flex: 1; border: none; background: #eef0f4; color: #6b7280; font-size: 15px; font-weight: 600; padding: 14px; border-radius: 16px; cursor: pointer; font-family: inherit; }
.mcn-accept { flex: 1.6; border: none; background: #2f5bea; color: #fff; font-size: 16px; font-weight: 800; padding: 14px; border-radius: 16px; box-shadow: 0 10px 22px -8px rgba(47,91,234,.7); cursor: pointer; font-family: inherit; }
.bc-at { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); cursor: pointer; margin-bottom: 12px; }
.bc-field { margin-bottom: 12px; }
.bc-label { font-size: 11.5px; color: var(--muted); margin-bottom: 5px; }
.bc-field textarea {
  width: 100%; box-sizing: border-box; border: 1px solid var(--border-strong); background: var(--bg);
  padding: 8px 10px; font-size: 13px; line-height: 1.5; resize: vertical; font-family: inherit;
}
.bc-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
#bcResults { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.bc-ok { font-size: 12px; color: var(--ok); }
.bc-maybe { font-size: 12px; color: var(--warn); word-break: break-all; }
.bc-bad { font-size: 12px; color: var(--err); word-break: break-all; }
.bc-ext { font-size: 10px; color: #fff; background: var(--accent-2); padding: 0 5px; border-radius: 2px; white-space: nowrap; }
/* 群发面板合作类型标签：以博主实际 cooperation_type 为准（与候选表一致），中性底色 */
.bc-coop { font-size: 10px; color: #55606b; background: #eef1f4; border: 1px solid #dde3e8; padding: 0 5px; border-radius: 2px; white-space: nowrap; }
.bc-skip td { color: var(--muted); background: repeating-linear-gradient(135deg, transparent, transparent 6px, rgba(217,117,51,0.05) 6px, rgba(217,117,51,0.05) 12px); }
.bc-mc { font-size: 10.5px; color: var(--muted); font-family: 'JetBrains Mono', monospace; }
.bc-follow { white-space: nowrap; }
.bc-status-sel {
  font-size: 11px; padding: 2px 4px; border: 1px solid var(--border-strong); border-radius: 4px;
  background: var(--bg); color: var(--ink-2); margin-right: 6px; cursor: pointer;
}
.bc-status-sel.bc-status-pending { border-color: var(--warn); color: var(--warn); }
.bc-status-sel.bc-status-confirmed { border-color: var(--ok); color: var(--ok); font-weight: 600; }
.bc-status-sel.bc-status-declined { border-color: var(--err); color: var(--err); }

/* ========== 群聊（查历史消息 + 发消息/@博主，仅管理员） ========== */
/* 浮层本身：可拖动(标题栏) + 可缩放(右下角原生 resize) + 记住位置大小(JS 写 inline style)。
   默认更窄一些(640px，而不是 modal-wide 共用的 1180px)，位置/尺寸最终以 JS 内联样式为准。 */
#chatLogModal .modal.modal-wide {
  position: fixed; max-width: none; width: 920px;
  min-width: 380px; max-height: 92vh; min-height: 320px;
  resize: both; overflow: hidden; display: flex; flex-direction: column;
}
#chatLogModal .modal-head { flex: 0 0 auto; }
#chatLogModal .modal-body {
  flex: 1 1 auto; min-height: 0; overflow: hidden;
  display: flex; flex-direction: column;
}
.cl-head { flex: 0 0 auto; margin-bottom: 10px; line-height: 1.6; }
.cl-toolbar { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.cl-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.cl-toolbar label { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-2); cursor: pointer; }
.cl-list {
  flex: 1 1 auto; min-height: 60px;
  overflow-y: auto; overflow-x: hidden; border: 1px solid var(--border); border-radius: 6px;
  padding: 12px; background: var(--bg); display: flex; flex-direction: column; gap: 10px;
}
.cl-bubble-row { display: flex; flex-direction: column; max-width: 76%; }
.cl-bubble-row.cl-self { align-self: flex-end; align-items: flex-end; }
.cl-bubble-row.cl-target { align-self: flex-start; }
.cl-bubble-row.cl-other { align-self: flex-start; opacity: 0.75; }
.cl-meta { font-size: 10.5px; color: var(--muted); margin-bottom: 3px; }
.cl-bubble { padding: 7px 11px; border-radius: 10px; font-size: 13px; line-height: 1.5; word-break: break-word; white-space: pre-wrap; background: var(--bg-accent); border: 1px solid var(--border); color: var(--ink); }
.cl-self .cl-bubble { background: var(--accent); color: #fff; border-color: var(--accent); }
/* 目标博主的发言要一眼认出来：加粗上色的昵称 + 徽标 + 更明显的气泡边框/左侧色条 */
.cl-target .cl-meta { color: var(--ok); font-weight: 700; }
.cl-target .cl-bubble { background: rgba(34, 160, 90, 0.16); border: 1.5px solid var(--ok); border-left: 4px solid var(--ok); }
.cl-badge-talent {
  display: inline-block; font-size: 9.5px; font-weight: 700; color: #fff; background: var(--ok);
  padding: 1px 6px; border-radius: 3px; letter-spacing: .02em; vertical-align: middle; margin-left: 2px;
}
.cl-media { font-style: italic; color: var(--muted); }
/* 消息时间：默认 opacity:0 保留位置空间、悬停整条消息才淡入；相对时间用暖色与时间区分 */
.cl-time { opacity: 0; transition: opacity .12s ease; color: var(--muted); font-size: 10px;
  font-family: 'JetBrains Mono', ui-monospace, monospace; white-space: nowrap; }
.cl-bubble-row:hover .cl-time { opacity: 1; }
.cl-time-rel { margin-left: 4px; color: #d08a3a; }
/* 有人 @ 我方机器人号：整条消息加亮 + 徽标，一眼看到需要跟进 */
.cl-bubble-row.cl-at-bot { opacity: 1; }
.cl-bubble-row.cl-at-bot .cl-bubble { background: rgba(224, 160, 32, 0.16); border: 1.5px solid #e0a020; border-left: 4px solid #e0a020; }
.cl-badge-atbot { display: inline-block; font-size: 9.5px; font-weight: 700; color: #7a4c00; background: #ffd479;
  padding: 1px 6px; border-radius: 3px; letter-spacing: .02em; vertical-align: middle; margin-left: 2px; }
.cl-footer { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
/* AI 建议回复卡：夹在消息列表和输入框之间；可直接发送/填入编辑/换一条 */
.aisug { flex: 0 0 auto; margin-top: 10px; padding: 9px 12px 10px; background: var(--bg-accent);
  border: 1px solid var(--border-strong); border-left: 4px solid var(--accent); border-radius: 6px; }
.aisug-head { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--accent); }
.aisug-hint { flex: 1 1 auto; font-size: 11px; font-weight: 400; color: var(--muted); }
.aisug-x { flex: 0 0 auto; border: none; background: none; cursor: pointer; color: var(--muted);
  font-size: 15px; line-height: 1; padding: 2px 4px; }
.aisug-x:hover { color: var(--err); }
.aisug-replyto { margin-top: 5px; font-size: 11.5px; line-height: 1.5; color: var(--muted);
  padding-left: 7px; border-left: 2px solid var(--border-strong);
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.aisug-text { margin-top: 6px; font-size: 13px; line-height: 1.6; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.aisug-loading { margin-top: 6px; font-size: 12px; color: var(--muted); }
.aisug-btns { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

.cl-compose { flex: 0 0 auto; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.cl-at-toggle { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; margin-bottom: 8px; }
.cl-msg-input {
  width: 100%; box-sizing: border-box; border: 1px solid var(--border-strong); background: var(--bg);
  padding: 8px 10px; font-size: 13px; line-height: 1.5; font-family: inherit;
  resize: vertical; min-height: 56px; height: 68px; max-height: 40vh;
}
.cl-compose-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.cl-compose-btns { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
/* 待发图片预览条：缩略图 + 文件名/大小 + 发送/取消 */
.cl-img-preview { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; padding: 8px;
  border: 1px solid var(--border-strong); border-radius: 6px; background: var(--bg-card); }
.cl-img-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 4px; flex: 0 0 auto;
  border: 1px solid var(--border); background: var(--bg); }
.cl-img-meta { flex: 1 1 auto; min-width: 0; }
.cl-img-name { font-size: 12.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-img-size { font-size: 11px; margin-top: 2px; }
.cl-img-cancel { flex: 0 0 auto; }
/* 待发文件的图标块：占位与图片缩略图一致，保证两种预览条高度不跳 */
.cl-file-icon { width: 56px; height: 56px; flex: 0 0 auto; border-radius: 4px;
  border: 1px solid var(--border); background: var(--bg);
  display: flex; align-items: center; justify-content: center; font-size: 26px; }
#clMembersBtn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* 群聊右侧面板：备注/备忘 + 快捷回复 */
.cl-layout { flex: 1 1 auto; min-height: 0; display: flex; }
.cl-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.cl-side { flex: 0 0 268px; min-width: 0; display: flex; flex-direction: column; border-left: 1px solid var(--border); margin-left: 12px; padding-left: 12px; }
.cl-side-tabs { flex: 0 0 auto; display: flex; gap: 6px; margin-bottom: 8px; }
.cl-side-tab { flex: 1; padding: 6px 8px; font-size: 12.5px; border: 1px solid var(--border); background: var(--bg); border-radius: 6px; cursor: pointer; color: var(--ink-2); text-align: center; }
.cl-side-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.cl-side-panel { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.cl-side-add { flex: 0 0 auto; margin-bottom: 8px; }
.cl-side-ta { width: 100%; min-height: 54px; resize: vertical; padding: 7px 9px; font-size: 12.5px; line-height: 1.6; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--bg); font-family: inherit; box-sizing: border-box; }
.cl-side-add-row { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.cl-note-scope { flex: 1; padding: 4px 6px; font-size: 11.5px; border: 1px solid var(--border); border-radius: 5px; background: var(--bg); }
.cl-note-scope-fixed { flex: 1; font-size: 11px; color: var(--muted); }
.cl-qr-global { display: flex; align-items: center; gap: 4px; flex: 1; font-size: 11px; color: var(--ink-2); cursor: pointer; }
.cl-side-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 7px; }
.cl-side-empty { color: var(--muted); font-size: 12px; text-align: center; padding: 18px 8px; }
.cl-note, .cl-qr { border: 1px solid var(--border); border-radius: 7px; padding: 8px 9px; background: var(--bg-card); }
.cl-note-content, .cl-qr-content { font-size: 12.5px; line-height: 1.6; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.cl-qr-content { cursor: pointer; }
.cl-qr-content:hover { color: var(--accent); }
.cl-note-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 5px; font-size: 10.5px; color: var(--muted); }
.cl-note-badge { display: inline-block; font-size: 9.5px; padding: 0 4px; border-radius: 3px; background: var(--bg-accent); color: var(--ink-2); border: 1px solid var(--border); }
.cl-note-badge.proj { background: var(--accent); color: #fff; border-color: var(--accent); }
.cl-note-editbtns { display: flex; gap: 6px; flex: 0 0 auto; }
.cl-note-act { font-size: 11px; color: var(--accent-2); background: none; border: none; cursor: pointer; padding: 0 2px; }
.cl-note-act:hover { text-decoration: underline; }
.cl-note-edit-ta, .cl-qr-edit-ta { width: 100%; min-height: 50px; resize: vertical; padding: 6px 8px; font-size: 12.5px; border: 1px solid var(--accent); border-radius: 5px; background: var(--bg); font-family: inherit; box-sizing: border-box; }
@media (max-width: 680px) {
  .cl-layout { flex-direction: column; }
  .cl-side { flex: 0 0 auto; max-height: 240px; border-left: none; border-top: 1px solid var(--border); margin-left: 0; padding-left: 0; margin-top: 10px; padding-top: 10px; }
}

/* 群成员 / 指定博主 面板 */
.cl-members { flex: 0 0 auto; max-height: 40vh; overflow-y: auto; border: 1px solid var(--border-strong); border-radius: 6px; margin-bottom: 10px; background: var(--bg-card); }
.cl-mem-head { position: sticky; top: 0; z-index: 1; background: var(--ink); color: var(--bg); display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 7px 10px; font-size: 12px; }
.cl-mem-head .cl-mem-title { font-weight: 600; }
.cl-mem-head .btn { background: transparent; color: var(--bg); border-color: rgba(255,255,255,.5); }
/* 用 ID 选择器提高优先级，压过 .btn.ghost:hover:not(:disabled)(0,4,0) 那条浅底 hover——
   否则 hover 时浅色字落到浅色底上看不清（本次修复）。 */
#clMemClose { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
#clMemClose:hover:not(:disabled) { background: rgba(255,255,255,.22); color: #fff; border-color: #fff; box-shadow: none; }
.cl-mem-desig { padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--ink-2); display: flex; flex-direction: column; gap: 5px; }
.cl-desig-row { display: flex; gap: 8px; align-items: baseline; }
.cl-desig-k { flex: 0 0 58px; color: var(--muted); font-size: 11px; }
.cl-desig-src { font-size: 9.5px; color: var(--accent); border: 1px solid var(--accent); border-radius: 3px; padding: 0 4px; }
.cl-desig-ok { font-size: 9.5px; color: var(--ok); }
.cl-desig-clear { margin-left: 6px; }
.cl-mem-warn { background: rgba(184,92,0,.1); border: 1px solid var(--warn); border-radius: 4px; padding: 6px 8px; font-size: 11.5px; color: var(--warn); line-height: 1.5; }
.cl-mem-tip { font-size: 11px; color: var(--muted); line-height: 1.5; }
.cl-mem-list { padding: 4px 0; }
/* 头部第二行状态里的小样式 */
.cl-syncing { color: var(--accent); }
.cl-via { color: var(--muted); font-size: 11px; }
.cl-warn-inline { color: var(--warn); }
.cl-mem-group { font-size: 10.5px; color: var(--muted); padding: 6px 12px 2px; letter-spacing: .04em; }
.cl-mem { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 12px; font-size: 12.5px; }
.cl-mem:hover { background: var(--bg-accent); }
.cl-mem.cur { background: rgba(34, 160, 90, 0.1); }
.cl-mem-name { color: var(--ink); }
.cl-mem-staff { font-size: 9.5px; color: var(--muted); border: 1px solid var(--border); border-radius: 2px; padding: 0 4px; vertical-align: middle; }
.cl-mem-gw { font-size: 9.5px; color: var(--accent-2); border: 1px solid var(--accent-2); border-radius: 2px; padding: 0 4px; vertical-align: middle; }
.cl-gw-at { display: inline-flex; align-items: center; gap: 4px; margin-right: 6px; }
.cl-mem-badge { font-size: 10px; font-weight: 700; color: #fff; background: var(--ok); padding: 1px 6px; border-radius: 3px; white-space: nowrap; }

/* 群发面板 @id 列的来源标记 */
.bc-at-manual { font-size: 9.5px; font-weight: 700; color: #fff; background: var(--ok); padding: 1px 5px; border-radius: 3px; }
.bc-at-auto { font-size: 9.5px; color: var(--accent); border: 1px solid var(--accent); border-radius: 3px; padding: 0 4px; }
.bc-at-hint { font-size: 10px; color: var(--warn); display: inline-block; margin: 0 2px; }

/* ========== 导出确认 + 写入 CRM 询单管理 面板 ========== */
.ec-summary { font-size: 13.5px; color: var(--ink-2); margin-bottom: 12px; }
.ec-write { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink); cursor: pointer;
  background: var(--bg-accent); border: 1px solid var(--border-strong); padding: 8px 11px; margin-bottom: 10px; }
#ecInquiryFields { border: 1px solid var(--border); padding: 12px; margin-bottom: 12px; }
.ec-field { margin-bottom: 12px; }
.ec-field:last-child { margin-bottom: 0; }
.ec-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.ec-req { color: var(--err); font-size: 11px; }
.ec-role { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.ec-role-k { font-size: 12px; color: var(--ink-2); min-width: 70px; }
.ec-sub { padding-left: 8px; }
.ec-radio { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.ec-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ec-grid2 input[type=text] { width: 100%; box-sizing: border-box; border: 1px solid var(--border-strong);
  background: var(--bg); padding: 6px 9px; font-size: 13px; font-family: inherit; }
.ec-note { font-size: 11px; color: var(--muted); margin-top: 8px; line-height: 1.6; }
.ec-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

/* ========== 博主管理面板（仅管理员）========== */
.modal.modal-fullish {
  max-width: 1440px;
  width: 96vw;
  height: 92vh;
  display: flex;
  flex-direction: column;
}
.modal-fullish .modal-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 18px;
}

.km-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.km-toolbar .km-search {
  width: 240px; padding: 7px 10px; border: 1px solid var(--border-strong);
  background: var(--bg); font-size: 13px;
}
.km-toolbar .km-search:focus { border-color: var(--accent); background: #fff; outline: none; }
.km-toolbar .km-sel {
  padding: 7px 8px; border: 1px solid var(--border-strong); background: var(--bg);
  font-size: 12.5px; cursor: pointer;
}
.km-toolbar .km-tip { font-size: 11px; color: var(--muted); }

.km-bulkbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 12px; background: var(--bg-accent);
  border: 1px solid var(--border-strong); font-size: 13px;
}
.km-bulkbar b { color: var(--accent-2); }

.km-table-wrap { flex: 1; min-height: 0; overflow: auto; border: 1px solid var(--border); position: relative; }
.km-table-wrap.km-loading { opacity: .55; pointer-events: none; }

/* 可选列面板 + 列方案 */
.km-colpanel { border: 1px solid var(--border-strong); background: var(--bg-card); border-radius: 8px; padding: 10px 12px; margin: 2px 0 4px; }
.km-colhint { font-size: 11.5px; color: var(--muted); margin-bottom: 8px; }
/* 里面现在是按平台分的组（各组自己 flex 换行），所以外层改成纵向堆叠 */
.km-colopts { display: block; }
.km-colopt { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--ink-2); cursor: pointer;
  border: 1px solid var(--border); border-radius: 6px; padding: 3px 9px; user-select: none; }
.km-colopt.on { border-color: var(--accent); color: var(--accent); background: var(--bg-accent); }
.km-colopt input { margin: 0; }
/* 列选择器按平台分组：通用 / 小红书专属 / 抖音专属 */
.km-colgroup { margin-bottom: 10px; }
.km-colgroup:last-child { margin-bottom: 0; }
.km-colgroup-t { font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 5px;
  display: flex; align-items: baseline; gap: 7px; }
.km-colgroup-n { font-size: 11px; font-weight: 400; color: var(--muted); }
.km-colgroup-b { display: flex; flex-wrap: wrap; gap: 6px 8px; }
/* 当前按平台筛选时，另一平台那组淡化——勾了也是一列「—」 */
.km-colgroup.dim { opacity: .5; }
/* 表头的平台标识：小红书=书、抖音=音 */
.km-plat-tag { display: inline-block; margin-left: 4px; padding: 0 3px; border-radius: 3px;
  font-size: 9.5px; font-style: normal; font-weight: 700; line-height: 1.5; vertical-align: 1px; }
.km-plat-tag.xhs { background: #ffe1e4; color: #c2334a; }
.km-plat-tag.xt { background: #e2e2e6; color: #333; }
.km-colpanel-foot { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.km-colpanel-foot input { flex: 1; min-width: 0; border: 1px solid var(--border-strong); background: var(--bg); padding: 6px 9px; font-size: 12.5px; font-family: inherit; }
.km-colpanel-manage { margin-top: 9px; font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.km-mypreset { display: inline-flex; align-items: center; gap: 3px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 2px 4px 2px 8px; }
.km-mypreset a { color: var(--accent); text-decoration: none; }
.km-mypreset b { cursor: pointer; color: var(--muted); font-weight: 700; padding: 0 4px; }
.km-mypreset b:hover { color: var(--err); }
.km-linkcell a { color: var(--accent); text-decoration: none; font-size: 12px; }
.km-casecell { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.km-muted { color: var(--muted); }
/* 画像分布：所有项逐行列出（按占比降序），行背景是按比例的浅色条 */
.km-dist { white-space: nowrap; min-width: 116px; padding-top: 6px; padding-bottom: 6px; vertical-align: top; }
.km-dist .kmd-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; line-height: 1.65; padding: 0 5px; border-radius: 3px;
  background: linear-gradient(to right, rgba(217, 117, 51, .13) var(--w), transparent var(--w));
}
.km-dist .kmd-k { color: var(--muted); }
.km-dist .kmd-v { margin-left: auto; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
/* 粉丝量变化幅度：涨/掉一眼看出来（用 warn 橙而非绿色——管理层不喜欢绿色标"好"） */
.km-up { color: var(--warn); }
.km-down { color: var(--err); }
table.km-table td.center-cell { text-align: center; }
.km-empty-state, .km-error { padding: 40px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.km-error { color: var(--err); }

table.km-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.km-table thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--ink); color: var(--bg);
  text-align: left; padding: 8px 10px; font-size: 11.5px; font-weight: 500;
  letter-spacing: .03em; white-space: nowrap;
}
/* 非标签格不换行；标签格 chip 走 flex-wrap，不受 white-space 影响仍能换行。
   标签全展示后行高随标签数变化，统一顶对齐更整齐。 */
table.km-table tbody td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; white-space: nowrap; }
table.km-table tbody tr:hover { background: var(--bg-accent); }
.km-cb-cell { width: 36px; text-align: center; }

/* ⚠ td 必须保持 table-cell：别在 td 上用 display:flex，否则该格不再撑满行高，
   下边框停在内容高度处 → 与同行其它格的行线错位。flex 放到内层 div。 */
.km-kol { min-width: 190px; cursor: default; }
.km-kol-inner { display: flex; align-items: center; gap: 9px; }
.km-ava { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1px solid var(--border); }
.km-ava.fb {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; font-size: 14px; font-weight: 600;
}
.km-kol-text { min-width: 0; }
.km-name { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.km-plat { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.km-grade { font-size: 11px; color: var(--muted); }

/* 标签列要够宽，让 chip 一行能排多个（标签全部展示、不截断） */
.km-tagcell { min-width: 200px; max-width: 380px; }
.km-tagcell .km-chips { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.km-chip {
  display: inline-block; background: var(--bg-accent); border: 1px solid var(--border);
  padding: 1px 7px; font-size: 11.5px; border-radius: 2px; color: var(--ink-2); white-space: nowrap;
}
.km-chip-more { background: transparent; border-style: dashed; color: var(--muted); cursor: help; }
.km-tag-empty { color: var(--muted); }
/* 搜索命中：整枚 chip 加底色 + 命中子串 <mark> 高亮，方便一眼看出命中在哪 */
.km-chip-hit { background: #ffeec2; border-color: var(--accent-2); }
mark.km-hit { background: #ffd24d; color: var(--ink); border-radius: 2px; padding: 0 1px; font-weight: 600; }
.km-tagcell.editable { cursor: pointer; }
.km-tagcell.editable:hover { background: #fff; outline: 1px solid var(--border-strong); }
.km-edit { margin-left: 5px; color: var(--accent); font-size: 12px; opacity: 0; transition: opacity .12s; }
.km-tagcell.editable:hover .km-edit { opacity: 1; }

.km-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.km-pginfo { color: var(--muted); font-size: 12px; }
.km-pgbtns { display: flex; align-items: center; gap: 10px; }
.km-pgnow { font-size: 12px; color: var(--ink-2); }

.km-bulk-radios { display: flex; gap: 16px; flex-wrap: wrap; }
.km-bulk-radios label { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; cursor: pointer; }

/* 批量替换标签 */
.km-replace-hint { font-size: 12px; color: var(--ink-2); line-height: 1.7; background: var(--bg-accent);
  border: 1px solid var(--border); padding: 8px 10px; margin-bottom: 12px; }
.km-rep-preview { margin-top: 10px; }
.km-rep-stat { font-size: 12.5px; margin-bottom: 6px; }
.km-rep-stat b { color: var(--accent-2); font-size: 14px; }
.km-rep-empty { color: var(--muted); font-size: 12.5px; padding: 8px 0; }
.km-rep-table-wrap { max-height: 240px; overflow: auto; border: 1px solid var(--border); }
table.km-rep-table { width: 100%; border-collapse: collapse; font-size: 12px; }
table.km-rep-table th { position: sticky; top: 0; background: var(--ink); color: var(--bg);
  text-align: left; padding: 5px 8px; font-weight: 500; }
table.km-rep-table td { padding: 4px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.km-rep-old { color: var(--muted); }
.km-rep-arrow { color: var(--accent-2); text-align: center; }
.km-rep-new { color: var(--ink); font-weight: 600; }
/* ── 录入询单 / 线索 弹层 ────────────────────────────────────────── */
.iq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.iq-f { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.iq-grid .iq-f { margin-bottom: 0; }
.iq-l { font-size: 12px; color: var(--ink); font-weight: 600; }
.iq-hint { font-size: 10.5px; color: var(--muted); font-weight: 400; }
.iq-req { font-size: 10.5px; color: var(--err); font-weight: 400; }
.iq-f input[type=text], .iq-f input:not([type]), .iq-f select, .iq-f textarea, .iq-search input {
  width: 100%; box-sizing: border-box; border: 1px solid var(--border-strong);
  background: var(--bg); padding: 6px 9px; font-size: 13px; font-family: inherit; color: var(--ink); }
.iq-f textarea { resize: vertical; line-height: 1.5; }
.iq-f input[readonly] { background: var(--bg-accent); color: var(--muted); cursor: not-allowed; }
.iq-cb { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; padding-top: 18px; }
.iq-search { position: relative; }
.iq-dd { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; background: var(--bg-card);
  border: 1px solid var(--border-strong); border-top: none; max-height: 220px; overflow: auto;
  box-shadow: 0 6px 18px rgba(0,0,0,.12); display: none; }
.iq-dd.open { display: block; }
.iq-dd-item { padding: 7px 10px; font-size: 13px; cursor: pointer; border-bottom: 1px solid var(--border); }
.iq-dd-item:hover { background: var(--bg-accent); }
.iq-dd-item .mono { color: var(--muted); font-size: 11px; margin-left: 6px; }
.iq-dd-empty { padding: 8px 10px; font-size: 12px; color: var(--muted); }
.iq-talents { display: flex; flex-wrap: wrap; gap: 6px; }
.iq-chip { background: var(--bg-accent); border: 1px solid var(--border); border-radius: 3px; padding: 3px 8px; font-size: 12px; }
.iq-chip .mono { color: var(--muted); font-size: 10.5px; margin-left: 3px; }
.iq-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
@media (max-width: 640px) { .iq-grid { grid-template-columns: 1fr; } }
/* 询单弹层 v2：分区 + 平台标签 + 折叠更多 */
.iq-form { display: flex; flex-direction: column; gap: 14px; }
.iq-meta { font-size: 12px; color: var(--muted); }
.iq-meta b { color: var(--ink); }
.iq-sec { border: 1px solid var(--border); border-radius: 5px; padding: 12px 14px; }
.iq-sec-h { font-size: 12px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.iq-span2 { grid-column: 1 / -1; }
.iq-platchips { display: flex; flex-wrap: wrap; gap: 8px; }
.iq-platchip { border: 1px solid var(--border-strong); background: var(--bg); color: var(--ink); font-size: 12.5px; padding: 5px 13px; border-radius: 14px; cursor: pointer; font-family: inherit; }
.iq-platchip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.iq-more { border: 1px dashed var(--border-strong); border-radius: 5px; padding: 10px 14px; }
.iq-more > summary { cursor: pointer; font-size: 12.5px; color: var(--ink); font-weight: 600; user-select: none; }
/* 自动填写高亮 + 提报达人头像 */
.iq-auto { background: #eef4ff !important; }
.iq-autohint { font-size: 11px; color: #3b6fd4; }
.iq-tchip { display: inline-flex; align-items: center; gap: 5px; background: var(--bg-accent); border: 1px solid var(--border); border-radius: 16px; padding: 3px 10px 3px 3px; font-size: 12px; }
.iq-tava { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; flex: none; }
.iq-tava-ph { display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; font-size: 11px; line-height: 20px; }
.iq-tchip .mono { color: var(--muted); font-size: 10.5px; }
/* 联系人内联 + 新增客户/联系人面板 + 下拉新增项 */
.iq-inline { display: flex; gap: 8px; align-items: center; }
.iq-inline select { flex: 1; }
.iq-addpanel { margin-top: 10px; border: 1px solid var(--accent); border-radius: 5px; padding: 10px 12px; background: var(--bg-accent); }
.iq-addpanel-h { font-size: 12px; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
.iq-addpanel-act { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.iq-dd-add { padding: 8px 10px; font-size: 12.5px; color: var(--accent); cursor: pointer; border-top: 1px solid var(--border); font-weight: 600; }
.iq-dd-add:hover { background: var(--bg-accent); }
.iq-rolerow { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.iq-rolek { font-size: 11.5px; color: var(--muted); min-width: 60px; }
.iq-rolerow .iq-platchips { gap: 6px; }

/* ════════════════ 更新日志 / 升级说明（左下角入口 + 图文双 Tab 弹窗）════════════════ */
.sidebar-changelog {
  margin: 6px 0 4px; padding: 7px 10px; width: 100%; box-sizing: border-box;
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  background: transparent; border: 1px dashed var(--border); border-radius: 7px;
  color: var(--ink-2); font-size: 12.5px; font-family: inherit; text-align: left;
}
.sidebar-changelog:hover { background: var(--bg-accent); border-color: var(--border-strong); color: var(--ink); }
.sidebar-changelog .cl-gift { font-size: 14px; }
.sidebar-changelog .cl-new-dot, .su-item .cl-new-dot { display: inline-block; vertical-align: middle; width: 7px; height: 7px; border-radius: 50%; background: #e5484d; margin-left: 2px;
  box-shadow: 0 0 0 0 rgba(229, 72, 77, .5); animation: clDot 1.6s ease-in-out infinite; }
@keyframes clDot { 0%,100% { box-shadow: 0 0 0 0 rgba(229,72,77,.5); } 50% { box-shadow: 0 0 0 4px rgba(229,72,77,0); } }

.cl-modal { position: relative; max-width: 880px; width: 92vw; max-height: 88vh;
  padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.cl-hero { position: relative; padding: 20px 24px; color: #fff;
  background: linear-gradient(120deg, #1e4a5f 0%, #2a6f7a 60%, #3a8f7a 100%);
  display: flex; align-items: center; gap: 14px; flex: 0 0 auto; }
.cl-hero .cl-close { position: absolute; top: 10px; right: 12px; color: #fff; opacity: .85; }
.cl-hero .cl-close:hover { opacity: 1; }
.cl-hero-emoji { font-size: 34px; line-height: 1; }
.cl-hero-title { font-size: 19px; font-weight: 700; }
.cl-hero-sub { font-size: 12px; opacity: .85; margin-top: 3px; }

.cl-tabs { display: flex; gap: 4px; padding: 8px 16px 0; border-bottom: 1px solid var(--border);
  background: var(--bg-card, #fff); flex: 0 0 auto; }
.cl-tab { display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  padding: 7px 14px 8px; border: none; background: none; cursor: pointer; font-family: inherit;
  font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 2.5px solid transparent; margin-bottom: -1px; }
.cl-tab:hover { color: var(--ink-2); }
.cl-tab.active { color: var(--ink); border-bottom-color: var(--accent, #2a6f7a); }
.cl-tab-hint { font-size: 10px; font-weight: 400; color: var(--muted); }

.cl-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; background: var(--bg, #f7f4ef); padding: 6px 18px 20px; }
.cl-tabpane { display: none; }
.cl-tabpane.active { display: block; }

.cl-section { margin-top: 16px; }
.cl-sec-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.cl-sec-badge { font-size: 16px; }
.cl-sec-title { font-size: 14px; font-weight: 700; color: var(--ink); }
.cl-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 680px) { .cl-cards { grid-template-columns: 1fr; } }
.cl-card { display: flex; gap: 11px; padding: 11px 13px; background: var(--bg-card, #fff);
  border: 1px solid var(--border); border-left: 3px solid var(--accent, #2a6f7a); border-radius: 8px; }
.cl-card-ico { font-size: 18px; line-height: 1.3; flex: 0 0 auto; width: 22px; text-align: center; }
.cl-card-title { font-size: 13px; font-weight: 700; color: var(--ink); }
.cl-card-desc { font-size: 12px; color: var(--ink-2); line-height: 1.6; margin-top: 3px; }
.cl-card-desc b { color: var(--ink); font-weight: 700; }
.cl-card-desc code { font-family: 'JetBrains Mono', monospace; font-size: 11px; background: var(--bg-accent);
  padding: 0 4px; border-radius: 3px; }
.cl-card-preview { margin-top: 7px; padding: 6px 8px; background: var(--bg-accent); border-radius: 5px;
  font-size: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
/* 卡片色调（左侧色条 + 图标底色） */
.cl-tone-blue   { border-left-color: #3b6fb0; }
.cl-tone-teal   { border-left-color: #2a8a7a; }
.cl-tone-green  { border-left-color: #2e9e57; }
.cl-tone-amber  { border-left-color: #d68a2e; }
.cl-tone-purple { border-left-color: #7b6cb6; }

/* 迷你预览小组件（图文用，复用真实观感） */
.cl-mini-msg { background: var(--bg-card, #fff); border: 1px solid var(--border); border-radius: 8px;
  padding: 4px 9px; font-size: 12px; }
.cl-mini-time { color: #d08a3a; font-size: 10px; font-family: 'JetBrains Mono', monospace; margin-left: 4px; }
.cl-mini-toast { background: #1e2a33; color: #fff; border-left: 3px solid #2ec76b; border-radius: 7px;
  padding: 5px 10px; font-size: 11.5px; }
.cl-mini-toast b { color: #fff; }
.cl-mini-proj { position: relative; font-size: 12px; color: var(--ink); }
.cl-mini-env { position: relative; margin-left: 4px; color: #17a94f; font-size: 15px; }
.cl-mini-env .cl-mini-badge { position: absolute; top: -6px; left: 9px; min-width: 13px; height: 13px;
  display: inline-flex; align-items: center; justify-content: center; background: #e5484d; color: #fff;
  font-size: 8px; font-weight: 700; border-radius: 7px; border: 1.5px solid var(--bg-card, #fff); }
.cl-mini-thr { font-size: 12px; color: var(--ink-2); }
.cl-mini-thr b { background: var(--bg-card, #fff); border: 1px solid var(--border-strong); border-radius: 3px;
  padding: 1px 6px; color: var(--ink); }
/* 更新日志里演示报价列的迷你样例 */
.cl-mini-price { display: inline-block; font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums; }
.cl-mini-psrc { display: block; font-size: 11px; color: var(--muted); }

/* ═══════════ 达人商务看板（#boardView / 12-board.js） ═══════════ */
.sidebar-board {
  margin: 6px 0 0; padding: 7px 10px; width: 100%; box-sizing: border-box;
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  background: transparent; border: 1px solid var(--border); border-radius: 7px;
  color: var(--ink-2); font-size: 12.5px; font-family: inherit; text-align: left; font-weight: 500;
}
.sidebar-board:hover { background: var(--bg-accent); border-color: var(--border-strong); color: var(--ink); }

.board-view { max-width: 1200px; margin: 0 auto; }
.bd-loading { padding: 60px 0; text-align: center; color: var(--muted); font-size: 13px; }
.bd-loading .spinner { width: 22px; height: 22px; margin: 0 auto 12px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--accent); animation: bdSpin 0.9s linear infinite; }
@keyframes bdSpin { to { transform: rotate(360deg); } }

.bd-head { display: flex; align-items: flex-end; justify-content: space-between; margin: 4px 0 14px; }
.bd-title { font-size: 22px; color: var(--ink); }
.bd-sub { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.bd-refresh { border: 1px solid var(--border); background: var(--bg-card); border-radius: 4px;
  font-size: 11px; padding: 1px 8px; margin-left: 6px; cursor: pointer; color: var(--ink-2); font-family: inherit; }
.bd-refresh:hover { border-color: var(--border-strong); color: var(--ink); }

/* KPI 条 */
.bd-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 14px; }
.bd-kpi { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; }
.bd-kpi-v { font-size: 24px; font-weight: 600; color: var(--accent); line-height: 1.1; }
.bd-kpi-l { font-size: 12px; color: var(--ink-2); margin-top: 4px; font-weight: 500; }
.bd-kpi-s { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* 筛选条（吸顶） */
.bd-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 10px; margin-bottom: 14px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 8px; position: sticky; top: 0; z-index: 10; }
.bd-f-group { display: inline-flex; gap: 4px; }
.bd-f-sep { width: 1px; height: 18px; background: var(--border); }
.bd-chip { border: 1px solid var(--border); background: var(--bg-card); color: var(--ink-2);
  border-radius: 20px; font-size: 12px; padding: 3px 11px; cursor: pointer; font-family: inherit; }
.bd-chip:hover { border-color: var(--border-strong); color: var(--ink); }
.bd-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 500; }
.bd-search { margin-left: auto; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-card);
  font-size: 12.5px; padding: 5px 10px; width: 180px; font-family: inherit; color: var(--ink); }
.bd-search:focus { outline: none; border-color: var(--accent); }

/* 卡片 */
.bd-grid2 { display: grid; grid-template-columns: 3fr 2fr; gap: 14px; margin-bottom: 14px; }
.bd-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
  padding: 14px 16px; margin-bottom: 14px; min-width: 0; }
.bd-grid2 .bd-card { margin-bottom: 0; }
.bd-card-t { font-size: 14.5px; font-weight: 600; color: var(--ink); margin-bottom: 12px;
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.bd-card-s { font-size: 11px; font-weight: 400; color: var(--muted); }
.bd-empty { padding: 26px 0; text-align: center; color: var(--muted); font-size: 12.5px; }
.bd-note { font-size: 11px; color: var(--muted); margin-top: 8px; }

/* 独家/外采小签 */
.bd-sign { display: inline-block; font-size: 10.5px; line-height: 16px; padding: 0 6px;
  border-radius: 3px; border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.bd-sign-kol { background: #e8f0e2; border-color: #b5cba3; color: #426b2f; }
.bd-sign-coop { background: #e8eef5; border-color: #a8bfd4; color: #2c5478; }
.bd-sign-new { background: #fdf4e3; border-color: #e0b869; color: #9a6a16; }

/* 头像 */
.bd-ava { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex: 0 0 26px;
  border: 1px solid var(--border); background: var(--bg); }
.bd-ava-fb { display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--ink-2); }

/* 🔥 热度榜 */
.bd-hot { display: flex; flex-direction: column; gap: 3px; }
.bd-hot-row { display: flex; align-items: center; gap: 7px; padding: 4px 6px; border-radius: 6px; cursor: default; }
.bd-hot-row:hover { background: var(--bg-accent); }
.bd-hot-rank { width: 20px; text-align: right; color: var(--muted); font-size: 11.5px; flex: 0 0 20px; }
.bd-hot-row:nth-child(-n+3) .bd-hot-rank { color: var(--accent-2); font-weight: 700; }
.bd-hot-name { font-size: 12.5px; color: var(--ink); max-width: 120px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.bd-hot-bar { flex: 1; height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; min-width: 40px; }
.bd-hot-bar i { display: block; height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, #2a6f7a 100%); }
.bd-hot-n { font-size: 12px; color: var(--ink); width: 40px; text-align: right; flex: 0 0 40px; }
/* 成单：与提报次数并排，弱化一档避免抢主指标的视觉 */
.bd-hot-ord { font-size: 11px; color: var(--muted); flex: 0 0 52px; text-align: right; }
.bd-hot-last { font-size: 10.5px; flex: 0 0 72px; text-align: right; }

/* 达人名/头像外链（规则同候选表：名字→蒲公英/星图，头像→小红书/抖音） */
.bd-name-link { text-decoration: none; border-bottom: 1px solid transparent; }
.bd-name-link:hover { color: var(--accent); border-bottom-color: var(--accent); }
.bd-link-tag { font-size: 9px; color: var(--muted); margin-left: 2px; vertical-align: super; }
.bd-name-link:hover .bd-link-tag { color: var(--accent); }
.bd-ava-link { display: inline-flex; flex: 0 0 auto; line-height: 0; text-decoration: none; }
.bd-ava-link:hover .bd-ava { transform: scale(1.08); border-color: var(--accent); }
.bd-ava-link .bd-ava { transition: transform .12s ease, border-color .12s ease; }

/* 📈 趋势 SVG */
.bd-trend { width: 100%; height: auto; display: block; }
.bd-svg-n { font-size: 10px; fill: var(--ink-2); font-family: 'JetBrains Mono', monospace; }
.bd-svg-x { font-size: 9px; fill: var(--muted); font-family: 'JetBrains Mono', monospace; }

/* 表格（沉睡 / 价值榜） */
.bd-scroll { max-height: 440px; overflow: auto; border: 1px solid var(--border); border-radius: 6px; }
.bd-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.bd-table th { position: sticky; top: 0; z-index: 2; background: var(--bg-accent); color: var(--ink-2);
  font-size: 11.5px; font-weight: 600; text-align: left; padding: 7px 10px;
  border-bottom: 1px solid var(--border-strong); white-space: nowrap; }
.bd-table td { padding: 6px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.bd-table tbody tr:hover { background: var(--bg-accent); }
.bd-td-name { display: flex; align-items: center; gap: 6px; }
.bd-th-sort { cursor: pointer; user-select: none; }
.bd-th-sort:hover, .bd-th-sort.on { color: var(--accent); }

/* 距今色阶 */
.bd-age { display: inline-block; font-size: 11.5px; padding: 1px 8px; border-radius: 10px; font-family: 'JetBrains Mono', monospace; }
.bd-age-ok { background: #e8f0e2; color: #426b2f; }
.bd-age-warm { background: #fdf4e3; color: #9a6a16; }
.bd-age-warn { background: #fbe9d9; color: #b85c00; }
.bd-age-hot { background: #f6dede; color: #8b2c2c; font-weight: 600; }
.bd-age-never { background: #eee9dd; color: var(--muted); }

/* 🌱 新入库卡片 */
.bd-newgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px;
  max-height: 420px; overflow: auto; }
.bd-newcard { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; background: var(--bg); }
.bd-newcard:hover { border-color: var(--border-strong); }
.bd-new-untouched { background: #fffaf0; border-color: #e0b869; }
.bd-new-top { display: flex; align-items: center; gap: 8px; }
.bd-new-nm { flex: 1; min-width: 0; }
.bd-new-nm .bd-hot-name { max-width: 100%; display: block; }
.bd-new-meta { font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.bd-new-bot { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 11px; color: var(--ink-2); flex-wrap: wrap; }
.bd-untag { background: var(--accent-2); color: #fff; font-size: 10.5px; padding: 0 7px; border-radius: 3px;
  line-height: 17px; font-weight: 600; }
.bd-donetag { color: #426b2f; font-size: 10.5px; }

/* 提报明细悬停浮层 */
.bd-pop { position: fixed; display: none; z-index: 1200; background: var(--bg-card);
  border: 1px solid var(--border-strong); border-radius: 8px; box-shadow: 4px 4px 0 rgba(26,26,26,.08);
  padding: 10px 12px; max-height: 320px; overflow: auto; }
.bd-pop-head { display: flex; align-items: center; gap: 7px; padding-bottom: 8px; margin-bottom: 6px;
  border-bottom: 1px solid var(--border); font-size: 13px; flex-wrap: wrap; }
.bd-pop-row { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 3px 0; }
.bd-pop-proj { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.bd-pop-brand { font-size: 10.5px; background: var(--bg-accent); border: 1px solid var(--border);
  border-radius: 3px; padding: 0 5px; color: var(--ink-2); white-space: nowrap; }

/* 移动端 / 窄屏 */
@media (max-width: 1024px) {
  .bd-kpis { grid-template-columns: repeat(3, 1fr); }
  .bd-grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .bd-kpis { grid-template-columns: repeat(2, 1fr); }
  .bd-search { width: 100%; margin-left: 0; }
  .bd-hot-last { display: none; }
}


/* ═══ 30天新入库达人：头像 New 角标（renderNicknameCell，同时置顶展示） ═══ */
.kol-ava-wrap { position: relative; display: inline-block; flex: 0 0 auto; }
.kol-new-badge {
  position: absolute; top: -5px; left: -7px; z-index: 2;
  background: var(--accent-2); color: #fff;
  font-size: 9px; font-weight: 700; line-height: 13px; padding: 0 5px;
  border-radius: 7px; letter-spacing: .3px; pointer-events: none;
  box-shadow: 0 1px 0 rgba(26,26,26,.18);
}

/* ═══ 常驻「重点关注」横条（候选结果表格上方一行，CRM is_key=1） ═══ */
.key-strip {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg-accent);
}
.key-strip-label { flex: 0 0 auto; font-weight: 700; color: var(--accent-2); font-size: 13px; white-space: nowrap; }
.key-strip-list { display: flex; align-items: center; gap: 8px; flex: 1 1 auto;
  overflow-x: auto; overflow-y: hidden; padding-bottom: 2px; }
.key-strip-hint { color: var(--muted); font-size: 12px; white-space: nowrap; }
/* 一个达人 chip：头像 + 名称 */
.key-chip {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  padding: 3px 10px 3px 3px; border: 1px solid var(--border-strong); border-radius: 16px;
  background: var(--bg-card); cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s, box-shadow .12s;
}
.key-chip:not(.in-list):hover { border-color: var(--accent-2); box-shadow: 1px 1px 0 rgba(217,117,51,.18); }
.key-chip-ava { width: 24px; height: 24px; border-radius: 50%; object-fit: cover;
  flex: 0 0 24px; border: 1px solid var(--border); background: var(--bg); }
.key-chip-ava-fb { display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--ink-2); }
.key-chip-name { font-size: 12.5px; color: var(--ink); font-weight: 500; max-width: 130px;
  overflow: hidden; text-overflow: ellipsis; }
/* 已在筛选结果中：套色 + ✓，不可点击 */
.key-chip.in-list {
  cursor: default; background: #e3f0da; border-color: #bcd6a4; opacity: .92;
}
.key-chip.in-list .key-chip-name { color: #3f6b2b; }
.key-chip-tick { color: #3f6b2b; font-weight: 700; font-size: 12px; }
.key-chip.adding { opacity: .55; cursor: default; }

/* 看板右列：趋势图下的子块（商务提报榜 / 热门项目） */
.bd-subblock { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--border); }
.bd-sub-t { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 8px;
  display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.bd-mini-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.bd-mini-name { flex: 0 0 76px; font-size: 12px; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-mini-proj { flex: 1 1 auto; }
.bd-proj-n { flex: 0 0 auto; font-size: 11px; color: var(--muted); }
.bd-proj-ord { font-size: 10.5px; color: var(--muted); flex: 0 0 auto; }

/* 昵称后「独/合」合作类型圆角徽标（独家/合作 一眼分辨） */
.kol-type-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 4px; margin-left: 5px;
  border-radius: 8px; font-size: 10.5px; font-weight: 700; line-height: 1;
  vertical-align: middle; flex: 0 0 auto; cursor: default;
}
.kol-type-badge.tk { background: #e3f0da; color: #3f6b2b; border: 1px solid #bcd6a4; }  /* 独家=绿 */
.kol-type-badge.tc { background: #e4edf7; color: #2c5580; border: 1px solid #aac4dd; }  /* 合作=蓝 */

/* ═══════════ 网页卡片（接单表单）配置编辑器 ═══════════ */
#cardEditorModal .modal-wide{max-width:1080px;width:96vw}
.ce-loading{padding:40px;text-align:center;color:var(--muted)}
.ce-grid{display:grid;grid-template-columns:1fr 400px;gap:18px}
.ce-left{min-width:0}
.ce-hint{background:var(--bg-accent);border:1px solid var(--border);border-radius:10px;padding:10px 12px;
  font-size:12.5px;color:var(--ink-2);line-height:1.6;margin-bottom:14px}
.ce-row{margin-bottom:13px}
.ce-row2{display:flex;gap:12px;margin-bottom:13px}
.ce-row2 > div:first-child{width:88px;flex:none}
.ce-lb{display:block;font-size:12.5px;font-weight:700;color:var(--ink);margin-bottom:6px}
.ce-lb .ce-sub{font-weight:400;color:var(--muted);font-size:11.5px}
.ce-lb code{background:var(--bg-accent);border:1px solid var(--border);border-radius:4px;padding:0 4px;font-size:11px;color:var(--accent-2)}
.ce-left input[type=text],.ce-left textarea{width:100%;padding:9px 11px;border:1.5px solid var(--border);border-radius:9px;
  font-size:14px;background:var(--bg-card);color:var(--ink);font-family:inherit;outline:none;transition:.15s}
.ce-left textarea{resize:vertical;line-height:1.6}
.ce-left input:focus,.ce-left textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(30,74,95,.12)}
.ce-genbar{display:flex;align-items:center;gap:10px;margin-top:4px;flex-wrap:wrap}
.ce-genmsg{margin-top:8px;font-size:12px;color:var(--muted);min-height:16px}
/* 落地页文案逐条编辑（失焦即存） */
.ce-specedit{margin-top:6px}
.ce-spec-line{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.ce-specedit input,.ce-specedit textarea{border:1px solid var(--border-strong);background:var(--bg);
  padding:6px 9px;font-size:13px;font-family:inherit;width:100%;box-sizing:border-box}
.ce-specedit input:focus,.ce-specedit textarea:focus{border-color:var(--accent);background:#fff;outline:none}
.ce-spec-sec{border:1px solid var(--border);border-radius:8px;padding:10px;margin-bottom:10px;background:var(--bg-card)}
/* 接单硬性要求编辑块（2026-09-15）：暖橙底和博主页那块同色系，一眼知道这是"会醒目展示给博主"的内容 */
.ce-must-t{color:#a8620a}
.ce-must-list{border:1px solid #f1c27d;border-radius:8px;padding:8px 10px 2px;margin-bottom:10px;background:#fff8ee}
.ce-must-row{display:flex;align-items:center;gap:6px;margin-bottom:6px}
.ce-must-row.off .ce-must-text,.ce-must-row.off .ce-must-kind{opacity:.45}
.ce-must-on-wrap{display:flex;align-items:center;cursor:pointer}
.ce-must-on-wrap input{width:15px;height:15px;margin:0;cursor:pointer}
.ce-must-kind{flex:0 0 84px;font-size:12.5px;padding:4px 4px;border:1px solid var(--border);border-radius:6px;background:#fff}
.ce-must-text{flex:1;min-width:0;font-size:13px;padding:5px 8px;border:1px solid var(--border);border-radius:6px;background:#fff}
.ce-must-text:focus{border-color:var(--accent);outline:none}
.ce-must-empty{font-size:12px;color:var(--muted);line-height:1.6;padding:2px 0 6px}
.ce-sp-h{font-weight:700}
.ce-sp-b{resize:vertical;min-height:38px;margin-bottom:8px}
.ce-sp-items{display:flex;flex-direction:column;gap:6px}
.ce-sp-item{display:flex;align-items:center;gap:6px}
.ce-sp-del{cursor:pointer;color:var(--muted);font-weight:700;padding:0 5px;flex:none;font-size:15px;line-height:1}
.ce-sp-del:hover{color:var(--err)}
.ce-sp-add{align-self:flex-start}
/* ④ 快捷填写选项：一行一个字段，右侧是可编辑的小药丸 */
.ce-quick-fld{display:flex;align-items:flex-start;gap:10px;padding:8px 10px;margin-bottom:8px;
  border:1px solid var(--border);border-radius:8px;background:var(--bg-card)}
.ce-quick-lb{flex:0 0 128px;font-size:12.5px;font-weight:700;color:var(--ink);padding-top:6px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ce-quick-chips{flex:1 1 auto;display:flex;flex-wrap:wrap;gap:6px;align-items:center;min-width:0}
.ce-quick-chip{display:inline-flex;align-items:center;gap:2px;padding:2px 4px 2px 8px;
  border:1px solid var(--border-strong);border-radius:999px;background:var(--bg)}
.ce-quick-chip input{width:78px;border:none;background:transparent;font-size:12.5px;padding:3px 0;
  color:var(--ink);outline:none}
/* ④ 填写项：一行一个问题（问题名 + 类型 + 删除），下面按类型挂「选项」或「快捷」 */
.ce-fld-row{padding:8px 10px;margin-bottom:8px;border:1px solid var(--border);
  border-radius:8px;background:var(--bg-card)}
.ce-fld-head{display:flex;align-items:center;gap:8px}
.ce-fld-label{flex:1 1 auto;min-width:0;font-size:12.5px;padding:5px 8px;
  border:1px solid var(--border-strong);border-radius:6px;background:var(--bg);color:var(--ink)}
.ce-fld-type{flex:0 0 88px;font-size:12px;padding:5px 4px;border:1px solid var(--border-strong);
  border-radius:6px;background:var(--bg);color:var(--ink)}
.ce-fld-sub{display:flex;align-items:flex-start;gap:8px;margin-top:7px;padding-left:2px}
.ce-fld-tag{flex:0 0 34px;font-size:11px;color:var(--muted);padding-top:5px}
.ce-spec-foot{display:flex;align-items:center;gap:10px;margin-top:4px}
.ce-sp-state{font-size:11.5px;color:var(--muted)}
.ce-genmsg .ok{color:#12a150;font-weight:700}
.ce-genmsg .warn{color:#c9820a;font-weight:700}
.ce-right{min-width:0}
.ce-preview-head{font-size:12.5px;font-weight:700;color:var(--ink);margin-bottom:8px;display:flex;align-items:center;gap:8px}
.ce-pv-state{font-size:11px;color:var(--muted);font-weight:400}
.ce-phone{border:1px solid var(--border);border-radius:16px;overflow:hidden;background:#f3f5f9;
  height:min(76vh,760px)}
.ce-phone iframe{width:100%;height:100%;border:none;display:block}
/* 预览列吸顶：左侧内容长时，右侧预览跟随滚动保持可见 */
.ce-right{position:sticky;top:0;align-self:start}
.ce-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px;
  padding-top:14px;border-top:1px solid var(--border);flex-wrap:wrap}
.ce-actions .an-note{max-width:60%}
.bc-webcard{margin-top:6px;padding-top:8px;border-top:1px dashed var(--border)}
.an-note.ok{color:#12a150}
@media(max-width:820px){
  .ce-grid{grid-template-columns:1fr}
  .ce-phone{height:min(70vh,560px)}
  .ce-right{position:static}
}

/* ═══════════ 候选表：接单状态列 + 筛选 + 查看弹窗 ═══════════ */
.cf-accepted{border:none;background:#e9f7ef;color:#12a150;font-size:12px;font-weight:700;
  padding:4px 10px;border-radius:999px;cursor:pointer;white-space:nowrap;transition:.12s}
.cf-accepted:hover{background:#12a150;color:#fff}
/* 「已打开未提交」：琥珀色 = 待跟进信号。刻意跟已接单的绿、暂不考虑的灰都拉开距离——
   这一档是最该单独催的高意向博主，扫一眼表就要能挑出来。 */
.cf-opened{border:none;background:#fff2df;color:#c06a14;font-size:12px;font-weight:700;
  padding:4px 10px;border-radius:999px;cursor:pointer;white-space:nowrap;transition:.12s}
.cf-opened:hover{background:#c06a14;color:#fff}
.cf-opened-n{font-weight:800;opacity:.75;margin-left:1px}
/* 接单状态筛选下拉：选项自带各档人数，商务不用再逐行数 */
.cf-status-filter{font-size:12.5px;font-weight:600;color:var(--muted);cursor:pointer;
  padding:4px 10px;border:1px solid var(--border);border-radius:999px;background:#fff;transition:.12s}
.cf-status-filter.on{color:#c06a14;border-color:#e8b982;background:#fff2df}
.cfv-head{padding:2px 2px 12px;border-bottom:1px solid var(--border);margin-bottom:12px}
.cfv-name{font-size:16px;font-weight:800;color:var(--ink);display:flex;align-items:center;gap:9px}
.cfv-badge{font-size:11px;font-weight:700;color:#a85a1f;background:#fef6d8;padding:2px 9px;border-radius:999px}
.cfv-time{font-size:12px;color:var(--muted);margin-top:5px}
.cfv-list{display:flex;flex-direction:column;gap:0}
/* 问答式上下堆叠：问题整行、答案独立一行放大——替代原窄左列被挤换行的丑排版 */
.cfv-item{padding:11px 2px 12px;border-bottom:1px dashed var(--border)}
.cfv-item:last-child{border-bottom:none}
.cfv-q{font-size:12.5px;line-height:1.5;color:var(--muted);margin-bottom:6px}
.cfv-a{font-size:15px;font-weight:600;line-height:1.45;color:var(--ink);word-break:break-word;white-space:pre-wrap;padding-left:10px;border-left:2px solid var(--border)}
.cfv-no{color:#d0574a}

/* ═══════════ 卡片编辑器：分区标题 + 企微群卡片小预览(仿真) ═══════════ */
.ce-block-t{font-size:13.5px;font-weight:800;color:var(--ink);margin:2px 0 12px;padding-left:9px;
  border-left:3px solid var(--accent)}
.ce-block-t .ce-sub{font-weight:400}
/* ① 企微卡片：标题/描述改成自动生成后，原来两个输入框的位置换成这段说明 */
.ce-auto-note{font-size:12px;color:var(--muted);line-height:1.85;margin:0 0 12px;
  padding:9px 12px;background:var(--bg);border:1px solid var(--border);border-radius:8px}
.ce-auto-note b{color:var(--ink)}
.ce-auto-note code{font-size:11.5px;padding:1px 5px;background:var(--bg-card);
  border:1px solid var(--border);border-radius:4px}
.ce-wxcard-label{font-size:11.5px;color:var(--muted);margin:2px 2px 6px}
.ce-wxcard{background:#ededed;border-radius:12px;padding:12px 12px 14px}
.wxc-sender{display:flex;align-items:center;gap:7px;font-size:12px;color:#576b95;font-weight:500;margin-bottom:7px}
.wxc-ava{width:20px;height:20px;border-radius:5px;background:var(--accent);color:#fff;display:flex;
  align-items:center;justify-content:center;font-size:11px;font-weight:800;flex:none}
.wxc-bubble{background:#fff;border-radius:8px;padding:12px 13px;max-width:320px;box-shadow:0 1px 2px rgba(0,0,0,.05)}
.wxc-title{font-size:15px;font-weight:600;color:#111;line-height:1.4;margin-bottom:9px;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.wxc-mid{display:flex;align-items:flex-start;gap:10px}
/* pre-line：描述里"博主名/提报截止"是分行的，预览必须照样分行显示才等于博主看到的样子 */
.wxc-desc{flex:1;font-size:12.5px;color:#888;line-height:1.5;white-space:pre-line;
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.wxc-thumb{width:46px;height:46px;flex:none;border-radius:6px;background:#f2f2f2;display:flex;
  flex-direction:column;align-items:center;justify-content:center;font-size:16px;color:#bbb}
.wxc-thumb span{font-size:9px;margin-top:1px}

/* 候选表：暂不考虑单元格 + 查看弹窗婉拒态 */
.cf-declined{border:none;background:#f4f4f5;color:#9aa0a6;font-size:12px;font-weight:700;
  padding:4px 10px;border-radius:999px;cursor:pointer;white-space:nowrap;transition:.12s}
.cf-declined:hover{background:#e5484d;color:#fff}
.cfv-badge.decl{color:#9aa0a6;background:#f4f4f5}
.cfv-decl-note{padding:14px;background:var(--bg-accent);border:1px solid var(--border);border-radius:10px;
  font-size:13.5px;color:var(--ink-2)}
/* 暂不考虑的原因（2026-09-11）：单元格里跟在「✗ 暂不考虑」后面，同 12px、弱一档的灰；
   悬停时整个按钮变红底白字，原因跟着变白（继承 color）。截断防止长原因把列撑宽。 */
.cf-declined{max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle}
.cf-why{font-weight:600;margin-left:5px;padding-left:6px;border-left:1px solid currentColor;opacity:.9}
.cf-why b{font-weight:800}
.cfv-decl-t{margin:14px 0 6px;font-size:12.5px;font-weight:700;color:var(--ink-2)}
.ex-colsplit{margin-left:4px;padding:0 4px;border-radius:4px;font-size:10.5px;color:var(--muted);border:1px solid var(--border)}
.cfv-hist{margin:0;padding:0;list-style:none;font-size:12.5px;color:var(--muted)}
.cfv-hist li{padding:6px 0;border-top:1px dashed var(--border)}
.cfv-hist-at{margin-right:8px}
.cfv-decl-list{margin:0;padding:0;list-style:none}
.cfv-decl-list li{padding:9px 12px;margin-bottom:6px;border:1px solid var(--border);border-radius:9px;
  background:#fff;font-size:14px;color:var(--ink);line-height:1.6;word-break:break-word}

/* 群发面板：混合群(同群多位博主)提示徽标 */
.bc-multi{display:inline-block;font-size:10.5px;font-weight:700;color:#8a5a00;background:#fef3c7;
  border:1px solid #f4dfa0;border-radius:6px;padding:1px 6px;margin-left:4px;white-space:nowrap}

/* 「分成」列的数据异常警告：CRM 两列对不上时，把数值差异直接摆到商务眼前。
   返点是钱、发出去撤不回，所以用最强的珊瑚红，且不靠 hover 才出现。 */
.bc-comm-cell { color: var(--muted); }
.bc-comm-odd { color: var(--err); font-weight: 700; }
.bc-odd-badge {
  display: inline-block; margin-left: 5px; padding: 0 6px;
  font-size: 10px; font-weight: 700; line-height: 1.7; white-space: nowrap; cursor: help;
  color: #8b2c2c; background: #fdeaea; border: 1px solid #f0c4c4; border-radius: 6px;
}
/* 整行压一层极淡的红底，扫一眼就能看出这行有钱的问题。
   选择器必须带 .bc-table tbody（0,1,3）—— 窄屏块里的 `.bc-table tr`（0,1,2）会把
   卡片底色设成 --bg-card，优先级不够就只在桌面生效、手机上白压。 */
.bc-table tbody tr:has(.bc-odd-badge) { background: #fffafa; }

/* 「算不出返点被拦下」的群：一条都没发出去，用最强警示色，放在结果区最前面。
   商务以为发了、实际没发，是这个面板里后果最严重的一种情况。 */
.bc-blocked { border: 2px solid #e5a3a3; border-radius: 10px; background: #fff5f5;
  padding: 11px 13px; margin-bottom: 12px; }
.bc-blk-h { font-size: 13.5px; font-weight: 800; color: #8b2c2c; margin-bottom: 6px; }
.bc-blk-sub { font-size: 12px; color: #7a4a4a; line-height: 1.75; margin-bottom: 9px; }
.bc-blk-sub b { color: #8b2c2c; }
.bc-blk-row { display: flex; gap: 10px; padding: 5px 0; border-top: 1px dashed #efc9c9;
  font-size: 12.5px; align-items: baseline; }
.bc-blk-g { font-weight: 700; color: var(--ink); flex: 0 0 auto; max-width: 45%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-blk-r { color: #8b2c2c; flex: 1; min-width: 0; word-break: break-all; }
@media (max-width: 768px), (max-height: 500px) {
  .bc-blk-row { flex-direction: column; gap: 2px; }
  .bc-blk-g { max-width: none; white-space: normal; }
}

/* ========== 群发面板：搜索框 + 问题概览筛选条 ==========
   商务打开面板常有几十行，真正要他动手的只有两三行。这一条把问题按类型汇总到顶部，
   点一下只看那一类。配色沿用面板既有语义：珊瑚红=会发错/发不出去，琥珀=能发但不精确。 */
.bc-filter { margin-bottom: 10px; }
.bc-filter-row { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.bc-search {
  flex: 1; min-width: 0; max-width: 320px;
  /* 16px 是硬底线：低于它 iOS Safari / 企微内置浏览器一聚焦就把整页放大且回不去 */
  font-size: 16px; padding: 6px 10px;
  border: 1px solid var(--border); border-radius: 7px;
  background: var(--bg-card); color: var(--ink); transition: border-color .12s, box-shadow .12s;
}
.bc-search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(30,74,95,.10); }
.bc-search::placeholder { color: var(--muted); }
.bc-filter-count { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

.bc-issues { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.bc-issue-head { font-size: 12px; font-weight: 700; margin-right: 2px; white-space: nowrap; }
.bc-issue-head-bad { color: var(--err); }
.bc-issue-head-ok  { color: var(--accent); }

.bc-chip {
  font-size: 11.5px; font-weight: 600; line-height: 1.6;
  padding: 2px 9px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  background: var(--bg-card); color: var(--ink-2);
  border: 1px solid var(--border); transition: .12s;
}
.bc-chip:hover { border-color: var(--border-strong); }
.bc-chip b { font-weight: 800; margin-left: 1px; }
.bc-chip-bad  { color: #8b2c2c; background: #fdeaea; border-color: #f0c4c4; }
.bc-chip-warn { color: #8a5a00; background: #fef3c7; border-color: #f4dfa0; }
/* 选中态：加深描边 + 轻微内阴影，不靠颜色反转（反转在暖色底上会糊成一片） */
.bc-chip-on { border-width: 2px; padding: 1px 8px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.04); }
.bc-chip-all.bc-chip-on { border-color: var(--accent); color: var(--accent); background: var(--bg-accent); }
.bc-chip-bad.bc-chip-on  { border-color: #8b2c2c; }
.bc-chip-warn.bc-chip-on { border-color: #8a5a00; }

@media (max-width: 768px), (max-height: 500px) {
  /* 窄屏：搜索框占满一行，胶囊条改横向滑动（换行会把表格挤到屏幕外） */
  .bc-filter-row { flex-wrap: wrap; }
  .bc-search { max-width: none; width: 100%; }
  .bc-issues { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding-bottom: 3px; scrollbar-width: none; }
  .bc-issues::-webkit-scrollbar { display: none; }
  .bc-issue-head { position: sticky; left: 0; background: var(--bg-card); padding-right: 4px; z-index: 1; }
}

/* 枚举弹窗：一键勾选搜索结果按钮 */
.vchk-check-hits{font-size:11.5px;font-weight:600;color:var(--accent);background:var(--bg-accent);
  border:1px solid var(--border);border-radius:6px;padding:2px 9px;cursor:pointer;margin-right:6px;transition:.12s}
.vchk-check-hits:hover{background:var(--accent);color:#fff;border-color:var(--accent)}


/* 发版后提示刷新的浮条（frontend/js/shared/version-check.js）。
   固定右下角、不遮挡操作区；刻意做得克制——它只是提示，不是警报。 */
#verUpdateBar { position: fixed; right: 18px; bottom: 18px; z-index: 9999;
  display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 14px;
  border: 1px solid var(--border-strong); border-radius: 10px; background: var(--bg-card);
  box-shadow: 0 6px 20px -8px rgba(0,0,0,.28); font-size: 13px; color: var(--ink); }
#verUpdateBar .vu-txt { white-space: nowrap; }
#verUpdateBar .vu-btn { padding: 5px 12px; border: none; border-radius: 7px;
  background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 700;
  cursor: pointer; white-space: nowrap; font-family: inherit; }
#verUpdateBar .vu-x { border: none; background: transparent; color: var(--muted);
  cursor: pointer; font-size: 13px; padding: 2px 4px; line-height: 1; }
@media (max-width: 640px) {
  #verUpdateBar { left: 12px; right: 12px; bottom: 12px; justify-content: space-between; }
  #verUpdateBar .vu-txt { white-space: normal; }
}

/* 群聊消息里的图片：缩略图 + 点击看大图（取不到图时保持 .cl-media 文字占位） */
.cl-msg-img { max-width: 220px; max-height: 220px; border-radius: 6px; display: block;
  border: 1px solid var(--border); background: var(--bg); cursor: zoom-in; object-fit: cover; }
.cl-msg-img:hover { border-color: var(--accent); }
.cl-imgviewer { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.82);
  display: flex; align-items: center; justify-content: center; cursor: zoom-out; padding: 24px; }
.cl-imgviewer img { max-width: 94vw; max-height: 94vh; object-fit: contain;
  box-shadow: 0 8px 40px rgba(0,0,0,.5); }

/* ═══════════ 候选区：本项目询单条 ═══════════
   商务录完询单后系统内没有任何入口再看到它（每单至少要改一次状态：提报→承接/未承接），
   只能绕去 CRM 改而且不回流；CRM 推送失败的「稍后可重推」也一直是死胡同。
   这条就是那个缺失的入口：chip 点开=编辑，推送失败的单独标出来并给「重推」。 */
.inq-strip{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 10px;padding:9px 12px;
  background:var(--bg-card);border:1px solid var(--border);border-radius:10px}
.inq-strip-t{font-size:12.5px;font-weight:700;color:var(--ink-2);white-space:nowrap}
.inq-strip-tip{font-size:11.5px;color:var(--muted);margin-left:auto}
.inq-chip{display:inline-flex;align-items:center;gap:5px}
.inq-open{display:inline-flex;align-items:center;gap:6px;cursor:pointer;font-size:12.5px;
  color:var(--ink-2);background:#fff;border:1px solid var(--border);border-radius:999px;
  padding:3px 11px 3px 4px;transition:.12s;max-width:280px}
.inq-open:hover{border-color:var(--border-strong);background:var(--bg-accent)}
/* 状态标签：刻意不用绿色标「已承接」（管理层不喜欢绿色标肯定值），成单走项目主色系的暖橙 */
.inq-st{font-size:11px;font-weight:700;padding:2px 7px;border-radius:999px;white-space:nowrap}
.iqs-lead{color:#6b6459;background:#efeae0}
.iqs-sub{color:#1e4a5f;background:#dfeaef}
.iqs-won{color:#a8541a;background:#fbe6d2}
.iqs-lost{color:#8b2c2c;background:#f7e2e2}
/* 长项目名省略，全名走 chip 的 title（UI 军规：长文省略 + 悬停看全） */
.inq-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.inq-money{font-family:'JetBrains Mono',monospace;font-size:11.5px;color:var(--muted);flex:none}
/* 没标出来的话商务会以为已经进 CRM 了，实际那边什么都没有 */
.inq-fail{font-size:11px;font-weight:700;color:#8b2c2c;background:#f7e2e2;
  padding:2px 7px;border-radius:999px;white-space:nowrap}
.inq-nocrm{font-size:11px;color:var(--muted);white-space:nowrap}
.inq-repush{cursor:pointer;font-size:11.5px;font-weight:700;color:#fff;background:var(--accent-2);
  border:none;border-radius:999px;padding:3px 10px;transition:.12s;white-space:nowrap}
.inq-repush:hover{filter:brightness(.93)}
.inq-repush:disabled{opacity:.6;cursor:default}

/* ═══════════ 催报未回复的博主 ═══════════
   名单来自回复监控（已发未回），排除已提交接单表单 / 点过「暂不考虑」/ 已手工标接单婉拒者。
   人工触发、只发文字不重发卡片、失败即停 —— 理由见 js/app/14-remind.js 顶部。 */
.rm-sum{font-size:13.5px;color:var(--ink-2);margin-bottom:10px;line-height:1.6}
.rm-warn{font-size:12.5px;color:#8a5a00;background:#fef3c7;border:1px solid #f4dfa0;
  border-radius:8px;padding:8px 11px;margin-bottom:10px}
.rm-list{max-height:210px;overflow:auto;border:1px solid var(--border);border-radius:9px;
  background:var(--bg-card);padding:4px 0;margin-bottom:14px}
.rm-row{display:flex;align-items:center;gap:10px;padding:6px 12px;font-size:12.5px}
.rm-row:not(:last-child){border-bottom:1px dashed var(--border)}
.rm-g{font-weight:600;color:var(--ink-2);min-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rm-n{color:var(--muted);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rm-noat{font-size:11px;font-weight:700;color:#8a5a00;background:#fef3c7;
  padding:1px 7px;border-radius:999px;white-space:nowrap}
.rm-lab{display:block;font-size:12.5px;font-weight:700;color:var(--ink-2);margin-bottom:6px}
.rm-ta{width:100%;font-family:inherit;font-size:13.5px;line-height:1.6;color:var(--ink);
  padding:10px 12px;border:1px solid var(--border);border-radius:9px;background:#fff;resize:vertical}
.rm-ta:focus{outline:none;border-color:var(--border-strong)}
.rm-tip{font-size:12px;color:var(--muted);margin:7px 2px 0;line-height:1.6}
.rm-actions{display:flex;align-items:center;gap:9px;justify-content:flex-end;margin-top:14px}
.rm-progress{flex:1;font-size:12.5px;color:var(--muted)}
.rm-results{margin-top:12px;display:flex;flex-direction:column;gap:5px}

/* ═══════════ 群发结果：仅补发失败的群 ═══════════
   **默认一个都不勾**是刻意的：网关 502 超时时消息很可能已经发出去了
   （vwork.py 在那条路径上刻意把 guard 留在 sending），失败 ≠ 没收到。
   所以先给「查群聊记录」核对，勾选权交给商务。 */
.bcr-box{margin-top:10px}
.bcr-list{margin:9px 0 0;border:1px solid var(--border);border-radius:9px;background:#fff;overflow:hidden}
.bcr-row{display:flex;align-items:center;gap:8px;padding:6px 10px}
.bcr-row:not(:last-child){border-bottom:1px dashed var(--border)}
.bcr-pick{display:flex;align-items:center;gap:8px;flex:1;cursor:pointer;min-width:0}
.bcr-kind{font-weight:800;font-size:13px;flex:none}
.bcr-err{color:#8b2c2c}
.bcr-maybe{color:#b85c00}
.bcr-g{font-size:12.5px;font-weight:600;color:var(--ink-2);min-width:140px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bcr-n{font-size:12px;color:var(--muted);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bcr-foot{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-top:9px}
/* 每行下面一行原因：为什么没确认成功 / 是不是确定没发出去。行允许换行，原因占满整行，
   左侧缩进对齐到群名（跳过复选框 + 状态符号那 ~30px）。与 .bcr-n 同 12px、同 muted 色。 */
.bcr-row{flex-wrap:wrap}
.bcr-why{flex:0 0 100%;padding-left:30px;font-size:12px;color:var(--muted);line-height:1.5;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* 确定没发出去的行：淡淡的底色 + 原因用错误色，一眼分出"该直接重发"和"先去核对" */
.bcr-unsent{background:#fdf3f2}
.bcr-unsent .bcr-why{color:#8b2c2c}

/* ═══════════ 飞书一键登录按钮 ═══════════
   飞书品牌蓝(#3370FF)只用在这个按钮上——它是"用飞书登录"的身份识别，
   不是本站配色的一部分。图标用内联 SVG 的 data URI，不引任何外部资源
   （CSP 干净、离线也能显示；外链飞书 CDN 在内网环境会挂）。 */
.lark-btn{display:flex;align-items:center;justify-content:center;gap:8px;
  background:#3370FF;color:#fff;border:1px solid #3370FF;font-weight:600;
  padding:10px 14px;border-radius:8px;cursor:pointer;transition:.12s}
.lark-btn:hover:not(:disabled){background:#245bdb;border-color:#245bdb;color:#fff}
.lark-ico{width:17px;height:17px;flex:none;background:no-repeat center/contain;
  background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M4.3 5.6c-.5-.4-.3-1.2.4-1.2h13.1c.5 0 .9.3 1 .8l1.5 5.2c-3 1-6.2.3-8.6-1.7L4.3 5.6z'/%3E%3Cpath d='M3.2 9.4c-.4-.5 0-1.2.6-1.1l6.3 1.1c2.9 2.4 6.8 3.1 10.3 1.9l.6 2.1c-5 3.6-11.9 2.6-15.7-2.3l-2.1-1.7z'/%3E%3Cpath d='M2.6 14.6c-.5-.3-.3-1.1.3-1.1l4.4.2c4.4 4 11 4.4 15.9 1l-3.6 4.4c-1 1.2-2.7 1.5-4.1.8l-12.9-5.3z'/%3E%3C/svg%3E")}
/* "或用账号密码"分隔线：两侧横线 + 中间小字 */
.lark-or{display:flex;align-items:center;gap:10px;margin:14px 0 2px;
  font-size:11.5px;color:var(--muted)}
.lark-or::before,.lark-or::after{content:'';flex:1;height:1px;background:var(--border)}

/* ════════════════════════════════════════════════════════════════════
   手机适配 —— 只在下面两个条件内生效，桌面布局一个像素都不改
   ────────────────────────────────────────────────────────────────────
   实测数据（量出来的，不是估的）：
   · 竖屏 375×812 改前：侧栏固定 230px 吃掉 61% 宽度，内容区只剩 145px，
     候选表 1146px 挤在 67px 可视区 → 横滑 17.1 倍；工具条自己占 619px（76% 屏高）。
     改后：内容区 375px、横滑 3.6 倍、工具条 145px（18% 屏高）。
   · 横屏 812×375：**宽度 812 超过 768，所以断点必须带高度条件才命中** ——
     横屏手机的特征是"矮"不是"窄"（iPhone 横屏宽度 812/844/896 都有）。
     只写 max-width 的话用户转横屏什么都不会变（第一版就这么漏的，实测才发现）。

   逗号 = or：竖屏手机走 max-width，横屏手机走 max-height。
   桌面 1200×800 两条都不命中；只有把窗口拉矮到 500px 以下才命中，那时也确实该紧凑。
   ════════════════════════════════════════════════════════════════════ */
/* 桌面端：汉堡按钮和灰底都不存在（只在下面的媒体查询里放出来） */
.nav-toggle, .sb-backdrop { display: none; }

@media (max-width: 768px), (max-height: 500px) {
  /* 侧栏脱离文档流做成抽屉：不再挤压内容区 */
  .app-shell > .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 60;
    width: 272px; max-width: 84vw;
    transform: translateX(-100%);
    transition: transform .22s ease;
    box-shadow: 0 0 40px -8px rgba(60,45,20,.5);
  }
  .app-shell.sb-open > .sidebar { transform: translateX(0); }
  /* 抽屉打开时的灰底：点它收起（比只能点汉堡按钮好用） */
  .sb-backdrop {
    display: block;
    position: fixed; inset: 0; z-index: 55; background: rgba(26,26,26,.38);
    opacity: 0; pointer-events: none; transition: opacity .22s ease;
  }
  .app-shell.sb-open .sb-backdrop { opacity: 1; pointer-events: auto; }
  /* 内容区拿全宽。顶部必须给汉堡按钮腾出一行 —— 按钮是 fixed 在左上角的，
     不腾位置就会压住项目标题的头几个字（实测截图里「笔记本…」的「笔」被盖住）。
     代价是少 44px 纵向空间，但工具条那一项省下的更多（横屏 157→96px），净赚。 */
  .detail-pane { padding: 46px 12px 64px; }
  /* 汉堡按钮：只在窄屏出现，固定在左上角 */
  .nav-toggle {
    display: flex; align-items: center; justify-content: center;
    position: fixed; top: 8px; left: 8px; z-index: 58;
    width: 38px; height: 38px; padding: 0;
    font-size: 17px; line-height: 1;
    background: var(--bg-card); color: var(--ink);
    border: 1px solid var(--border-strong); border-radius: 10px;
    box-shadow: 0 2px 10px -4px rgba(60,45,20,.45);
  }
  /* 抽屉开着时按钮跟着移到抽屉右侧，别被盖住 */
  .app-shell.sb-open .nav-toggle { left: auto; right: 8px; }

  /* 工具条：实测竖屏下按钮全换行堆叠，自己吃掉 619px（812 高屏幕的 76%），
     横屏也占 42%。改成单行横滑——高度从 6 行压到 1 行，数据行才看得见。 */
  .candidate-toolbar {
    flex-direction: column; align-items: stretch; gap: 6px;
    padding: 8px 10px;
  }
  .candidate-toolbar > div {
    flex-wrap: nowrap !important;
    overflow-x: auto; overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .candidate-toolbar > div::-webkit-scrollbar { display: none; }
  .candidate-toolbar .btn { flex: none; }
  .kol-search-wrap { flex: none; min-width: 190px; }
}

/* 语音转文字（2026-08-04）：文字铺在语音条下面。
   「转文字」是个低调的小字按钮 —— 它是次要动作，不该跟语音条抢注意力。 */
.cl-vt {
  display: block; margin-top: 5px; padding: 6px 9px;
  background: var(--bg); border-left: 2px solid var(--accent); border-radius: 0 6px 6px 0;
  font-size: 12.5px; line-height: 1.6; color: var(--ink-2); white-space: pre-wrap; word-break: break-word;
}
.cl-vt-wait, .cl-vt-bad { color: var(--muted); border-left-color: var(--border-strong); }
.cl-vt-act {
  display: inline-block; margin-top: 5px; margin-left: 8px;
  font-size: 11.5px; color: var(--muted); cursor: pointer;
  border-bottom: 1px dashed var(--border-strong); line-height: 1.5;
}
.cl-vt-act:hover, .cl-vt-act:focus-visible { color: var(--accent); border-bottom-color: var(--accent); outline: none; }
.cl-self .cl-vt { background: rgba(255,255,255,.14); color: rgba(255,255,255,.92); }
.cl-self .cl-vt-act { color: rgba(255,255,255,.75); border-bottom-color: rgba(255,255,255,.4); }

/* ════════ 群聊语音条（2026-08-04）════════
   企微语音是 SILK v3，浏览器放不了 —— 转发器转 mp3 后用 <audio> 放。
   观感照微信：一条可点气泡，左侧三格声波（播放时逐格亮起循环），右侧秒数。
   宽度跟时长走（JS 里按秒算 min-width），一眼看出这条是长是短。 */
.cl-voice {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 12px; border-radius: 14px; cursor: pointer;
  background: var(--bg); border: 1px solid var(--border-strong);
  user-select: none; -webkit-tap-highlight-color: transparent;
  transition: border-color .15s, background .15s;
}
.cl-voice:hover, .cl-voice:focus-visible { border-color: var(--accent); outline: none; }
/* 三格声波：静止时只亮第一格（像微信的小喇叭），播放时三格依次亮 */
.cl-voice-ico { display: inline-flex; align-items: flex-end; gap: 2px; height: 15px; flex: none; }
.cl-voice .cl-wave {
  display: block; width: 3px; border-radius: 2px; background: var(--muted);
  transition: background .15s;
}
.cl-voice .cl-w1 { height: 6px; }
.cl-voice .cl-w2 { height: 10px; opacity: .45; }
.cl-voice .cl-w3 { height: 14px; opacity: .45; }
.cl-voice.playing .cl-wave { background: var(--accent); }
.cl-voice.playing .cl-w1 { animation: clWave 1s infinite steps(1) 0s; }
.cl-voice.playing .cl-w2 { animation: clWave 1s infinite steps(1) .33s; }
.cl-voice.playing .cl-w3 { animation: clWave 1s infinite steps(1) .66s; }
@keyframes clWave { 0%, 33% { opacity: 1; } 34%, 100% { opacity: .3; } }
.cl-voice-sec { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cl-voice.playing .cl-voice-sec { color: var(--accent); font-weight: 600; }
.cl-voice-spin { font-size: 11px; color: var(--muted); }
/* 自己发的那侧气泡是深色底，声波和秒数要跟着反色，否则糊成一团看不见 */
.cl-self .cl-voice { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.28); }
.cl-self .cl-voice .cl-wave { background: rgba(255,255,255,.75); }
.cl-self .cl-voice-sec, .cl-self .cl-voice-spin { color: rgba(255,255,255,.9); }
@media (prefers-reduced-motion: reduce) { .cl-voice.playing .cl-wave { animation: none; opacity: 1; } }

/* ════════════════════════════════════════════════════════════════════
   宽弹层 + 群发名单 · 窄屏（2026-08-03）
   ────────────────────────────────────────────────────────────────────
   用户 2026-08-03 定：`/m/quick.html` 冻结不再维护，手机上要用的功能一律走
   桌面版页面 + 窄屏适配。「紧急发卡」那条链路的替代就是这里的**群发面板**，
   所以它必须在手机上真能操作。

   实测改之前（375×812）：弹层只有 353×693（`max-width: min(1180px,94vw)`），
   内容区被 `78vh` 卡在 633px 而实际内容有 1114px，下半截要在一个矮框里再滚一次；
   7 列的名单表挤进 310px，**每个字一行**——「重试@」竖成三行、群名「技术测试（QY小组）」
   竖成六行，跟用户 2026-07-31 报的「名字被挤成竖排」是同一种难看。

   改法：① 所有 .modal-wide 弹层在窄屏占满全屏、内容区不再二次限高；
   ② 名单表 → **一位博主一张卡**（表头隐藏，列名由 td[data-l] 贴在值前面）。
   ≥768px 且不矮的视口一个像素都不变。
   ════════════════════════════════════════════════════════════════════ */

/* 桌面基线：滑动确认不存在（有鼠标 + 确认弹窗，按钮就够了）。
   ⚠️ 必须写在下面那个媒体查询**之前** —— 同特异性(0,1,0)，写在后面会把窄屏的
   display:block 压掉（这个坑当天踩了两次：群聊抽屉一次、这里一次）。 */
.bc-slide-wrap { display: none; margin-top: 10px; }
.bc-slide {
  position: relative; height: 54px; border-radius: 14px;
  background: var(--bg-accent); border: 1.5px solid var(--accent);
  overflow: hidden; touch-action: none; user-select: none;
}
.bc-slide-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); opacity: .16; }
.bc-slide-tip {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: var(--accent); pointer-events: none; padding: 0 54px;
}
.bc-slide-kn {
  position: absolute; left: 3px; top: 3px; width: 50px; height: 46px; border-radius: 11px;
  background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 900; cursor: grab;
  box-shadow: 0 3px 10px -3px rgba(30,74,95,.7);
}
.bc-slide.done { background: var(--ok, #426b2f); border-color: var(--ok, #426b2f); }
.bc-slide.done .bc-slide-tip { color: #fff; }
.bc-slide.busy, .bc-slide.disabled { opacity: .55; }
.bc-slide.busy .bc-slide-kn, .bc-slide.disabled .bc-slide-kn { cursor: default; }

@media (max-width: 768px), (max-height: 500px) {
  /* ① 宽弹层占满全屏。#chatLogModal 有自己更具体的规则（带 id），不受这条影响。 */
  .modal-overlay { padding: 0; align-items: stretch; justify-content: stretch; }
  .modal-overlay > .modal.modal-wide {
    width: 100%; max-width: none; height: 100%; max-height: none;
    border: none; border-radius: 0; display: flex; flex-direction: column;
  }
  .modal-overlay > .modal.modal-wide > .modal-head { flex: 0 0 auto; padding: 9px 12px; }
  .modal-overlay > .modal.modal-wide > .modal-head .title { font-size: 15px; }
  /* 带上 .modal.modal-wide 才压得过 `.modal.modal-wide .modal-body{max-height:78vh}`(0,3,0) */
  .modal-overlay > .modal.modal-wide > .modal-body {
    flex: 1 1 auto; min-height: 0; max-height: none; overflow: auto;
    padding: 12px 12px calc(14px + env(safe-area-inset-bottom));
  }
  /* 普通窄弹层（500px 那种）：别拉成全屏，只是别顶到屏幕边 */
  .modal-overlay > .modal:not(.modal-wide) { margin: auto; max-width: calc(100vw - 20px); }

  /* ② 群发名单：表格 → 卡片。7 列在 375px 上无论怎么调都会挤成竖排。 */
  /* 名单区不再自己限高滚动：手机上"框中框"两层滚动很难操作（手指常滚错那一层，
     而且第二张卡永远被裁一半，看着像坏了）。改成整页滚，一屏看不完就往下滑。 */
  .bc-table-wrap { overflow-x: visible; max-height: none; border: none; }
  .bc-table, .bc-table tbody, .bc-table tr, .bc-table td { display: block; width: auto; }
  .bc-table thead { display: none; }        /* 列名改由每格自己的 ::before 显示 */
  .bc-table tr {
    border: 1px solid var(--border-strong); border-radius: 10px;
    padding: 9px 11px; margin-bottom: 9px; background: var(--bg-card);
  }
  .bc-table td { border: none; padding: 3px 0; display: flex; align-items: baseline; gap: 8px; }
  .bc-table td::before {
    content: attr(data-l); flex: 0 0 68px; color: var(--muted);
    font-size: 11.5px; line-height: 1.7;
  }
  /* 博主名当卡片标题：不用再标"博主"两个字 */
  .bc-table td[data-l="博主"] { font-size: 15px; font-weight: 700; padding-bottom: 6px; }
  .bc-table td[data-l="博主"]::before { display: none; }
  /* 「@对象」「跟进」里有按钮/下拉，给它们换行的余地，别再被压成竖排 */
  .bc-table td[data-l="@对象"], .bc-table td[data-l="跟进"] { flex-wrap: wrap; }
  .bc-table td[data-l="跟进"] { padding-top: 7px; }
  .bc-table .bc-status-sel { flex: 1 1 auto; min-width: 120px; }

  /* 返点/截止时间这些输入框：≥16px 防 iOS 聚焦缩放，宽度别写死 */
  .bc-field input[type="number"], .bc-field input[type="datetime-local"] {
    font-size: 16px; width: 100% !important; max-width: 260px;
  }
  .bc-actions { flex-wrap: wrap; gap: 8px; }
  .bc-actions > div { width: 100%; }
  .bc-actions > div .btn { flex: 1 1 auto; }
  /* 群发按钮换成滑动确认：手机上误触一下就发给一整批博主，企微撤不回 */
  #bcSendBtn { display: none; }
  .bc-slide-wrap { display: block; }
}

/* ════════════════════════════════════════════════════════════════════
   群聊窗口 · 窄屏（2026-08-03）
   ────────────────────────────────────────────────────────────────────
   企微通知里的「👉 直接在群里回复」多半是在**手机上**点开的，所以这个窗口
   必须在手机上真能用。用户 2026-08-03 定：不再做独立的移动端页面，
   以后全部用桌面版页面、只打磨窄屏展示。

   实测改之前（375×812）：窗口只有 585px 高（浪费 227px），
   **消息区只剩 79px**，而工具条自己就吃掉 116px（比聊天内容还高），
   底部「标记跟进结果」被裁掉，右侧的备注/快捷回复面板被挤到 top=757 完全看不见。

   改法四条：① 窗口占满全屏；② 工具条/跟进标记压成单行横滑；
   ③ 消息区拿走剩下的全部高度；④ 备注/快捷回复从右侧栏改成**底部抽屉**。
   ≥768px 且不矮的视口一个像素都不变（约束 17）。
   ════════════════════════════════════════════════════════════════════ */

/* 桌面基线：抽屉相关的几个件不存在（只在窄屏出现）。
   ⚠️ 这段必须写在媒体查询**前面** —— 它和窄屏里的 display 规则特异性相同(0,1,0)，
   写在后面就会反过来把窄屏的显示压掉（实测：遮罩和收起按钮 display:none，
   抽屉推上来了却点不掉）。 */
.cl-side-backdrop, .cl-side-drawer-close, .cl-side-open-btn { display: none; }
.cl-qr-strip {
  display: none; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; padding: 2px 0 6px; margin-bottom: 2px;
}
.cl-qr-strip::-webkit-scrollbar { display: none; }
.cl-qr-chip {
  flex: 0 0 auto; max-width: 62vw; padding: 7px 12px; font-size: 13.5px;
  border: 1px solid var(--border-strong); border-radius: 999px;
  background: var(--bg); color: var(--ink-2); cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  -webkit-tap-highlight-color: transparent;
}
.cl-qr-chip:active { background: var(--bg-accent); border-color: var(--accent); }
.cl-qr-strip-empty { flex: 0 0 auto; font-size: 12px; color: var(--muted); padding: 7px 2px; }

@media (max-width: 768px), (max-height: 500px) {
  #chatLogModal.modal-overlay { padding: 0; align-items: stretch; justify-content: stretch; }
  /* 覆盖 JS 记住的窗口位置/尺寸（_clApplyWinState 窄屏已不再写 inline，这里是双保险：
     从宽屏拖成窄屏时上一次的 inline 还挂在元素上）。手指也没法精确拖窗，索性全屏。 */
  #chatLogModal .modal.modal-wide {
    inset: 0 !important;
    width: 100% !important; height: 100% !important;
    max-width: none; max-height: none; min-width: 0; min-height: 0;
    border: none; border-radius: 0; box-shadow: none; resize: none;
  }
  #chatLogModal .modal-head { padding: 9px 12px; cursor: default; }
  #chatLogModal .modal-head .title { font-size: 15px; }
  /* ⚠️ 必须带上 .modal.modal-wide：`.modal.modal-wide .modal-body{max-height:78vh}`（第 2804 行）
     特异性比 `#chatLogModal .modal-body` 里的类部分高，不写全就压不住 ——
     实测表现是窗口明明全屏、内容却只占 633px（78vh），底部白掉 137px。 */
  #chatLogModal .modal.modal-wide .modal-body {
    padding: 0; max-height: none; overflow: hidden;
  }
  /* 内边距下放给 .cl-main：这样 .cl-layout 是满宽的，底部抽屉才能真正贴到屏幕两边
     （挂在 body 上的话抽屉会比屏幕窄 20px，两侧露出底色，很像没做完） */
  .cl-main { padding: 8px 10px 6px; }

  /* 抬头：群名一行、跟进对象一行，别再折成三行 */
  .cl-head { margin-bottom: 6px; line-height: 1.4; font-size: 13px; }
  .cl-head > div:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cl-head .mono { display: none; }          /* 群号手机上没人读，纯占地方 */

  /* 工具条：单行横滑（照 .candidate-toolbar 的做法），高度 116px → 一行 */
  .cl-toolbar {
    flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
    gap: 7px; margin-bottom: 6px; padding-bottom: 6px;
  }
  .cl-toolbar::-webkit-scrollbar { display: none; }
  .cl-toolbar > *, .cl-presets > * { flex: 0 0 auto; }
  .cl-presets { flex-wrap: nowrap; }
  .cl-toolbar label { white-space: nowrap; }

  /* 消息区：把剩下的高度全拿走（改之前只有 79px） */
  .cl-list { min-height: 120px; padding: 10px 8px; }
  .cl-bubble-row { max-width: 88%; }         /* 窄屏 76% 太窄，一句话折好几行 */

  /* 发送区：提示文字收起（那行字在手机上比输入框还长），按钮一行放得下 */
  .cl-compose { margin-top: 8px; padding-top: 8px; }
  #clSendHint { display: none; }
  .cl-compose-actions { justify-content: flex-end; margin-top: 6px; }
  /* ⚠️ 16px 是硬底线：小于它 iOS Safari / 企微内置浏览器一聚焦就把整页放大，
     放大后就再也回不去了（form.html / m/quick.html 同款约定）。 */
  .cl-msg-input { font-size: 16px; min-height: 44px; }
  .cl-at-toggle { font-size: 12px; }

  /* 跟进标记：同样压成单行横滑，别再吃掉 77px */
  .cl-footer {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; margin-top: 8px; padding-top: 8px; gap: 6px;
  }
  .cl-footer::-webkit-scrollbar { display: none; }
  .cl-footer > * { flex: 0 0 auto; }

  /* ── 备注 / 快捷回复：右侧栏 → 底部抽屉 ──
     268px 的侧栏在 375px 屏上没有立足之地（实测被挤出屏幕外，等于功能消失）。
     改成从底部推上来的抽屉：默认收起，点发送区的「📝 备注·快捷回复」拉起。 */
  /* 竖排即可（.cl-side 是 fixed，不参与流）。**不能写 height:100%** ——
     父容器高度本来就由 flex 撑开，子元素再声明 100% 会形成循环，
     浏览器只好退化成"按内容算"，结果整个 body 只有 633px、底部空 137px（实测踩过）。 */
  .cl-layout { flex-direction: column; position: relative; }
  .cl-main { min-height: 0; }
  /* ⚠️ 抽屉和遮罩用 **absolute**（相对 .cl-layout）而不是 fixed。
     踩过：`.modal` 上挂着 `animation: modalRise`，只要动画还在（哪怕已跑完但状态未清），
     它就会成为内部 fixed 元素的**包含块** —— 抽屉的 bottom:0 不再是"屏幕底部"，
     实测算到了 y=829（屏幕外），点开按钮遮罩亮了、抽屉却推不上来，非常难查。
     absolute 相对这个窗口自己定位，不受任何祖先 transform/animation 影响，语义也更对：
     抽屉属于这个群聊窗口，不属于视口。 */
  .cl-side {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 12;
    flex: none; margin: 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    height: 68vh; max-height: 68vh;
    background: var(--bg-card); border: none; border-top: 1.5px solid var(--ink);
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -10px 30px -12px rgba(26,26,26,.45);
    transform: translateY(102%); transition: transform .22s ease;
  }
  .cl-layout.cl-side-open .cl-side { transform: translateY(0); }
  /* 抽屉顶部的小横杠：一眼看出这块能往下拉收起 */
  .cl-side::before {
    content: ""; display: block; width: 38px; height: 4px; margin: -2px auto 8px;
    background: var(--border-strong); border-radius: 3px;
  }
  .cl-side-drawer-close {
    display: block;
    position: absolute; top: 4px; right: 8px; z-index: 2;
    background: none; border: none; font-size: 22px; line-height: 1;
    color: var(--muted); padding: 4px 8px; cursor: pointer;
  }
  .cl-side-backdrop {
    display: block;              /* 桌面基线那条 display:none 写在本块之前，同特异性、后者赢 */
    position: absolute; inset: 0; z-index: 11;   /* 同上：绝不用 fixed */
    background: rgba(26,26,26,.34); opacity: 0; pointer-events: none;
    transition: opacity .22s ease;
  }
  .cl-layout.cl-side-open .cl-side-backdrop { opacity: 1; pointer-events: auto; }
  .cl-side-ta { font-size: 16px; }           /* 同上：防 iOS 聚焦缩放 */
  .cl-side-tab { padding: 9px 8px; font-size: 13.5px; }
  .cl-side-open-btn { display: inline-flex; }

  /* 快捷回复胶囊条：贴在输入框上方横向滑动，点一下把话填进输入框。
     手机上打字慢，这条是"回一句话"最省事的路径，所以不藏进抽屉。 */
  .cl-qr-strip { display: flex; }
}

/* ════════════════════════════════════════════════════════════════════
   触屏设备（没有 hover 能力）：把"悬停才出现"的按钮改成常显
   ────────────────────────────────────────────────────────────────────
   实测清单：删筛选条件的 ×、删手动加的博主、标「不合适」、删项目、编辑标签 ——
   这些只有 :hover 才显形，在触屏上要么点不到、要么得先点一下"唤出"再点一次才生效，
   而且没人知道要点两次。(hover: none) 精确命中触屏，鼠标设备完全不受影响。

   ⚠️ 这批按钮**混用了两种隐藏方式**，必须分组写：只写 opacity 的话，
   那三个 display:none 的元素纹丝不动（无效代码，而且不报错，很难发现）。
   ════════════════════════════════════════════════════════════════════ */
@media (hover: none) {
  /* 第一组：原本是 opacity: 0 */
  .chip .chip-remove,
  .project-card .p-del,
  .km-tagcell.editable .km-edit {
    opacity: 1 !important;
  }
  /* 第二组：原本是 display: none —— 各自恢复成它 hover 态的那个 display 值 */
  .candidates tbody tr.is-manual .cand-del-btn,
  .candidates:not(.unfit-table) tbody tr .cand-unfit-btn {
    display: inline-flex !important;
    align-items: center; justify-content: center;
  }
  .proj-nav-item .pn-status { display: block !important; }
}

/* 博主管理：合作口径「无合作」标记 —— 与「0」和「—」都要区分开，
   0 = 接了合作但表现为 0；无合作 = 压根没接过；— = 数据缺失。三种投放判断完全不同。 */
.km-nocoop { color: var(--muted); font-style: normal; opacity: .8; }

/* 博主管理：标签筛选按钮的生效态（收起面板后也要一眼看出"还在筛着"） */
.km-tagbtn-on { color: var(--accent-2); border-color: var(--accent-2); background: #fdf3ea; }

/* ════════════════════════════════════════════════════════════════════
   博主管理：右侧大抽屉（2026-07-30 由"独立网页"改回来）
   ────────────────────────────────────────────────────────────────────
   之前做成独立页 /kols.html 是为了拿 100% 宽度，但那样每次都要切标签页，
   看完博主再回来接着干别的事很别扭（用户反馈）。抽屉两头兼顾：
   宽度接近整屏，又能一键收起继续在工作台里操作。

   仍然**只改 CSS**，不动 #kolMgmtModal 那层 DOM 结构和 class ——
   10-kol-mgmt.js 到处依赖 openModal/closeModal 与 `#kolMgmtModal.open` 的存在性
   （_kmLoad 开头那个"面板已关就别往隐藏 DOM 里写"的守卫）。
   ════════════════════════════════════════════════════════════════════ */
#kolMgmtModal.modal-overlay {
  padding: 0;
  align-items: stretch;
  justify-content: flex-end;      /* 贴右边 */
}
#kolMgmtModal > .modal {
  width: 94vw;
  max-width: none;                /* 覆盖 .modal-fullish 的 1440px 上限 */
  height: 100vh;
  max-height: none;
  border: none;
  border-left: 1.5px solid var(--ink);
  border-radius: 0;
  /* 阴影往左打，看着像"盖在工作台上面的一层" */
  box-shadow: -18px 0 60px -20px rgba(26, 26, 26, .5);
  animation: kmDrawerIn .2s ease-out;
}
@keyframes kmDrawerIn { from { transform: translateX(3%); opacity: .85 } to { transform: none; opacity: 1 } }
/* 左边故意留一条工作台的缝：一眼看出这是"浮在上面的抽屉"、点灰底就能回去，
   而不是以为整页被替换掉了（那正是独立页让人不适的地方）。 */
@media (max-width: 900px) {
  #kolMgmtModal > .modal { width: 100vw; border-left: none; }
}

/* ═══════════ 博主详情浮层：历史合作（其它项目）═══════════
   AUDIT-260727 第 8 条。配色沿用候选表「接单状态」列（.cf-accepted 绿 / .cf-opened 琥珀）——
   同一件事在两个地方不该是两种颜色。刻意不显示报价：卡片里的自报价是针对那个项目的档期/形式
   给的，摆成"历史报价"会被读成"他一贯要这个价"（服务端也根本不下发）。 */
.kol-detail-pop .pop-hist { padding: 8px 14px; }
.kol-detail-pop .pop-hist-sum { font-weight: 400; color: var(--muted); text-transform: none; letter-spacing: 0; }
.kol-detail-pop .pop-hist-row {
  display: flex; align-items: center; gap: 7px;
  font-size: 11.5px; line-height: 1.9; min-width: 0;
}
.kol-detail-pop .pop-hist-when { color: var(--muted); font-size: 10.5px; flex: none; }
.kol-detail-pop .pop-hist-tag { font-weight: 700; flex: none; white-space: nowrap; }
.kol-detail-pop .pop-hist-proj {
  color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.kol-detail-pop .pop-hist-note { color: var(--muted); flex: none; white-space: nowrap; }
.kol-detail-pop .hist-submitted { color: #12a150; }
.kol-detail-pop .hist-declined  { color: #c0392b; }
.kol-detail-pop .hist-opened    { color: #c06a14; }
.kol-detail-pop .hist-pending,
.kol-detail-pop .hist-sent      { color: var(--muted); }

/* ═══════════ 侧栏「找达人」全局搜索（2026-07-31）═══════════
   与项目无关的快捷入口：看数据 / 直接进他的企微群聊。

   ⚠️ 下拉必须 position:fixed（由 JS 按输入框位置定位），不能用 absolute：
   .sidebar 是 `width:230~288px; overflow:hidden`，absolute 的子元素会被它**裁掉**，
   而且宽度被锁死在侧栏内宽（实测只剩 ~190px），名字区被挤到 11px、
   一个字一行竖着排、行高 129px —— 第一版就是这么翻的车。 */
.sidebar-search.ks-wrap { position: relative; margin-top: -4px; }
.ks-pop {
  position: fixed; z-index: 1200;          /* 浮在侧栏与内容区之上 */
  background: var(--bg-card, #fff); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.14);
  max-height: 62vh; overflow-y: auto; padding: 5px;
}
.ks-empty { padding: 16px 12px; font-size: 12.5px; color: var(--muted); text-align: center; line-height: 1.8; }
.ks-row {
  display: flex; align-items: center; gap: 10px; padding: 7px 9px;
  border-radius: 7px; transition: background .12s; cursor: default;
}
.ks-row:hover { background: var(--bg, #f7f5f0); }
.ks-ava { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; }
.ks-ava-fb {
  display: flex; align-items: center; justify-content: center;
  background: #efe9dd; color: #8a7f6b; font-size: 14px; font-weight: 700;
}
/* min-width:0 是必须的：flex 子项默认 min-width:auto，不给 0 的话里面的长昵称
   撑不下也不会启用省略号，而是把整列挤扁（就是名字竖排的直接原因）。 */
.ks-main { min-width: 0; flex: 1 1 auto; }
.ks-line1 { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.ks-name {
  font-size: 13.5px; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
/* 名字/头像可点跳转（2026-08-04）：名字→星图·蒲公英后台，头像→达人主页。
   平时看不出是链接（下拉里一排蓝字太吵），hover 才提示可点。
   没有对应链接的那几位仍是纯文本 .ks-name / 纯 .ks-ava，压根点不动。 */
.ks-name-link { text-decoration: none; cursor: pointer; }
.ks-name-link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.ks-ava-link { flex: none; display: block; line-height: 0; border-radius: 50%; cursor: pointer; }
.ks-ava-link:hover .ks-ava { outline: 2px solid var(--accent); outline-offset: 1px; }
.ks-plat {
  flex: none; font-size: 10px; padding: 1px 6px; border-radius: 999px;
  background: #eef2f7; color: #4a6b8a; white-space: nowrap;
}
.ks-plat.xhs { background: #fdeef0; color: #b4485c; }
.ks-line2 {
  font-size: 11.5px; color: var(--muted); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ks-fans { font-weight: 600; color: var(--ink-2, #6b6455); }
/* 操作按钮：**带文字**，不要纯图标。
   纯图标版实测长这样 —— 28px 灰方块里一个淡淡的 emoji，看上去像两个空按钮，
   根本看不出是"群聊"和"详情"（而这两个动作正是这个搜索框存在的理由，不该藏起来）。
   380px 宽度放得下：34(头像)+10+文字区+10+~104(两个按钮) 之后名字区还有 200px 出头。
   也不做 hover 才显形 —— 那是候选表里"辅助操作"的处理，这里它们是主角。 */
.ks-acts { display: flex; gap: 5px; flex: none; }
.ks-act {
  padding: 4px 9px; line-height: 1.4; white-space: nowrap;
  font-size: 12px; color: var(--ink-2, #5c564a);
  border: 1px solid var(--border); background: var(--bg-card, #fff);
  border-radius: 6px; cursor: pointer; transition: .12s;
}
.ks-act:hover { border-color: var(--accent, #1e4a5f); color: var(--accent, #1e4a5f); background: var(--bg, #f5f3ef); }
.ks-act:disabled { opacity: .45; cursor: default; }

/* 群聊图片占位骨架（2026-07-31）。
   以前这里直接把 content 铺出来 —— 而 image 消息的 content 是**裸 CDN 链接**
   （docs/API.md §3.1b），于是商务先看到一长串 URL、一两秒后才变成图片。
   现在渲染时就只给 [图片] + 骨架，等真图换上来。 */
.cl-media-img.cl-img-loading {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 118px; min-height: 76px; padding: 6px 10px; border-radius: 8px;
  background: linear-gradient(100deg, #ece8e0 30%, #f6f3ee 50%, #ece8e0 70%);
  background-size: 240% 100%; animation: cl-img-shimmer 1.25s ease-in-out infinite;
}
.cl-media-img.cl-img-loading .cl-media { font-size: 11.5px; color: #9b9384; }
@keyframes cl-img-shimmer { from { background-position: 130% 0; } to { background-position: -30% 0; } }
/* 无头浏览器不推进动画帧，动画类会让"最终态"判定失真（LESSONS 有这条）；
   用户端不受影响，只在 prefers-reduced-motion 下也一并停掉。 */
@media (prefers-reduced-motion: reduce) { .cl-media-img.cl-img-loading { animation: none; } }

/* ═══════════ 群聊里的接单卡片状态（2026-07-31）═══════════
   自己发出去的卡片下面标一行"对方动没动"：已接单 / 暂不考虑 / 已打开×N / 未打开 + 时间点。
   口径与候选表「接单状态」列一致（提交过的以提交为准）。配色也沿用那一套。 */
.cl-card-status {
  display: flex; flex-wrap: wrap; gap: 4px 10px;
  margin-top: 4px; padding: 5px 9px;
  background: var(--bg, #f7f5f0); border: 1px dashed var(--border); border-radius: 7px;
  font-size: 11.5px; line-height: 1.6; max-width: 100%;
}
.cl-self .cl-card-status { margin-left: auto; }    /* 我方消息靠右，状态条跟着 */
.cl-cs-item { display: inline-flex; align-items: baseline; gap: 4px; color: var(--muted); }
.cl-cs-item b { font-weight: 700; }
.cl-cs-at { font-size: 10.5px; color: var(--muted); opacity: .85; }
.cl-cs-accepted b { color: #12a150; }
.cl-cs-declined b { color: #c0392b; }
.cl-cs-opened  b { color: #c06a14; }
.cl-cs-sent    b { color: var(--muted); }
/* 图文链接（接单卡片）气泡：只显示标题，不铺那串专属 URL（对商务没用、还很长）。
   完整原文在 title 里；"对方动没动"看下面的 .cl-card-status。 */
.cl-link { display: inline-block; font-weight: 600; }

/* ════════ 接单信息浮层：可滚动 + 翻页（2026-08-06 用户报）════════
   .modal-body 原本只有 padding、**没有限高也没有 overflow** —— 表单字段一多
   （OPPO 那种 20+ 问的需求），下半截直接被裁掉且滚不动，等于看不到。 */
#cfViewModal .modal { max-width: 620px; display: flex; flex-direction: column; max-height: 88vh; }
#cfViewModal .modal-head { flex: 0 0 auto; }
#cfViewModal .modal-body {
  flex: 1 1 auto; min-height: 0;     /* min-height:0 是关键：不给它，flex 子项不会收缩，照样溢出 */
  overflow-y: auto; overscroll-behavior: contain;
}
/* 翻页条：吸顶，翻很长的表单时不用滚回去才能点下一位 */
.cfv-nav {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 8px 0 10px; margin-bottom: 2px;
  background: var(--bg-card); border-bottom: 1px solid var(--border);
}
.cfv-nav-pos { font-size: 12px; color: var(--muted); min-width: 54px; text-align: center; }
.cfv-nav .btn[disabled] { opacity: .38; cursor: not-allowed; }
/* 窄屏：弹层占满，翻页按钮也要够大好点 */
@media (max-width: 768px), (max-height: 500px) {
  #cfViewModal .modal { max-height: 100%; }
  .cfv-nav .btn { padding: 7px 12px; }
}

/* ========== 全站悬停提示（js/shared/tooltip.js 接管原生 title）==========
   原生 title 要等 1~2 秒才出来且样式不可控，全站 290+ 处都吃这个亏。
   这里只负责长相；"立刻出现/离开消失"的行为在那个 js 里。 */
.tt-pop {
  position: fixed; z-index: 9999; left: 0; top: 0;
  max-width: 340px; padding: 7px 10px;
  font-size: 12.5px; line-height: 1.65; color: var(--ink, #1a1a1a);
  background: var(--bg-card, #fbf8f1);
  border: 1px solid var(--border-strong, #b8a986); border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .13);
  /* title 里原本靠 \n 分行的提示（返点差异说明那类）要继续分行；长词也得断得掉 */
  white-space: pre-line; word-break: break-word;
  opacity: 0; visibility: hidden; pointer-events: none;   /* 不吃鼠标，否则会挡住下面的元素 */
  transition: opacity .09s ease;
}
.tt-pop.tt-on { opacity: 1; visibility: visible; }
