  .admin-login {
    max-width: 400px;
    margin: 80px auto;
    padding: 30px;
    background: var(--bg-card);
    border: 1.5px solid var(--ink);
  }
  /* ════════════════════════════════════════════════════════════════
     后台主框架：左侧分组导航 + 右侧内容（2026-07-30 从顶部横排 Tab 改过来）
     ────────────────────────────────────────────────────────────────
     14 个 Tab 横排时会换成两行、还挤成一片，看不出哪些功能是一类的。
     改成左栏竖排 + 业务分组后，右栏也能拿到整片宽度放表格。
     ⚠️ `.tabs` / `.tab` / `.tab-pane` 这些 class 名**刻意保留** ——
     06-main.js 的切换逻辑按它们工作，换名字会静默失效（点了没反应）。
     ════════════════════════════════════════════════════════════════ */
  .admin-shell {
    display: flex;
    align-items: flex-start;
    gap: 22px;
  }
  .admin-side {
    flex: 0 0 178px;
    position: sticky;           /* 内容区滚很长时导航跟着走，不用滚回顶部换 Tab */
    top: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .admin-main {
    flex: 1;
    min-width: 0;               /* 没有它，宽表格会把左栏挤没 */
  }
  .tabs {
    display: flex;
    flex-direction: column;     /* 竖排 */
    align-items: stretch;
    gap: 1px;
    border-bottom: none;        /* 竖排没有"底部下划线"这回事 */
    margin-bottom: 0;
  }
  /* 分组小标题：把 14 项按业务归成 4 组，一眼看出哪些是一类 */
  .side-group {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.12em;
    color: var(--muted);
    text-transform: uppercase;
    padding: 12px 10px 4px;
    border-top: 1px solid var(--border);
    margin-top: 6px;
  }
  .side-group:first-child { border-top: none; margin-top: 0; padding-top: 2px; }
  .tab {
    white-space: nowrap;        /* 「AI 回复」这类短词绝不折行 */
    text-align: left;
    padding: 7px 10px;
    background: transparent;
    border: none;
    border-left: 2px solid transparent;   /* 选中标记从底部下划线改成左侧竖条 */
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--muted);
    transition: .12s;
  }
  .tab:hover { color: var(--ink); background: var(--bg-accent); }
  .tab.active {
    color: var(--ink);
    background: var(--bg-accent);
    border-left-color: var(--accent-2);
    font-weight: 600;
  }
  /* 外链型条目（博主管理是独立页）：长得和 Tab 一样，但点了是开新窗口 */
  .tab-link { display: block; text-decoration: none; }
  .tab-ext { font-size: 10px; opacity: .55; }
  /* 侧栏底部的概览数字：两列紧凑排，别把侧栏拉得太高 */
  .admin-side .stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin: 0;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }
  .admin-side .stats-grid .stat-card { padding: 6px 8px; }
  .admin-side .stats-grid .label { font-size: 9.5px; letter-spacing: .04em; }
  .admin-side .stats-grid .val { font-size: 16px; }
  /* 窄屏：分栏退回上下排，导航横着滑（后台以电脑为主，这里只求不坏） */
  @media (max-width: 860px) {
    .admin-shell { flex-direction: column; }
    .admin-side { position: static; flex: none; width: 100%; }
    .tabs { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 2px; }
    .side-group { display: none; }
    .tab { border-left: none; border-bottom: 2px solid transparent; border-radius: 4px 4px 0 0; }
    .tab.active { border-left: none; border-bottom-color: var(--accent-2); }
    .admin-side .stats-grid { grid-template-columns: repeat(3, 1fr); }
  }
  .tab-pane { display: none; }
  .tab-pane.active { display: block; }

  table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
  }
  .data-table thead th {
    background: var(--ink);
    color: var(--bg);
    padding: 8px 12px;
    text-align: left;
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .data-table tbody td {
    padding: 8px 12px;
    border-top: 1px solid var(--border);
    vertical-align: top;
  }
  .data-table tbody tr:hover { background: var(--bg-accent); }
  .data-table tbody tr.schema-detail:hover { background: var(--bg-card); }
  .data-table pre {
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--ink-2);
    white-space: pre-wrap;
    word-break: break-all;
    max-width: 600px;
  }
  .schema-detail td { background: var(--bg-card); padding: 14px 16px; }
  .alias-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
  }
  .alias-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 4px 3px 10px;
    background: var(--bg);
    border: 1px solid var(--border-strong);
    font-size: 12px;
  }
  .alias-chip button.alias-remove {
    border: none;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0 4px;
  }
  .alias-chip button.alias-remove:hover { color: var(--err); }
  .alias-chip.wildcard {
    background: #eaf4ee;
    border-color: var(--ok);
    font-family: 'JetBrains Mono', monospace;
  }
  .alias-chip.wildcard > span:first-child::before {
    content: '🔍 ';
    font-size: 10px;
    opacity: 0.7;
  }
  .alias-chip .alias-text {
    cursor: pointer;
    border-radius: 2px;
    padding: 1px 2px;
  }
  .alias-chip .alias-text:hover {
    background: rgba(0,0,0,0.06);
  }
  .alias-edit-input {
    padding: 2px 6px;
    border: 1px solid var(--accent);
    background: #fff;
    border-radius: 3px;
    font-size: 12.5px;
    font-family: inherit;
    min-width: 120px;
    margin: 0 4px;
  }
  .alias-add-form {
    display: flex;
    gap: 8px;
    align-items: center;
  }
  .alias-add-form input {
    flex: 1;
    max-width: 320px;
    padding: 6px 8px;
    border: 1px solid var(--border-strong);
    background: var(--bg);
    font-size: 12.5px;
  }
  .alias-add-hint {
    margin-top: 4px;
    font-size: 10.5px;
    color: var(--muted);
    letter-spacing: 0.02em;
  }

  /* 手动说明队列 */
  .tab-badge {
    display: inline-block;
    margin-left: 4px;
    background: var(--accent-2);
    color: white;
    font-size: 10px;
    padding: 0 6px;
    border-radius: 8px;
    line-height: 16px;
    min-width: 14px;
    text-align: center;
  }
  .tab-badge:empty { display: none; }

  .notes-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
    flex-wrap: wrap;
  }
  .notes-status-switch {
    display: inline-flex;
    border: 1px solid var(--border-strong);
  }
  .notes-status-btn {
    border: none;
    background: var(--bg-card);
    padding: 6px 14px;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    color: var(--muted);
    border-right: 1px solid var(--border);
  }
  .notes-status-btn:last-child { border-right: none; }
  .notes-status-btn.active { background: var(--ink); color: var(--bg); }
  .notes-status-btn span {
    display: inline-block;
    margin-left: 4px;
    background: rgba(0,0,0,0.12);
    padding: 0 5px;
    border-radius: 2px;
    font-size: 10px;
  }
  .notes-status-btn.active span { background: rgba(255,255,255,0.18); }

  .notes-list { display: flex; flex-direction: column; gap: 12px; }
  .notes-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--border);
    background: var(--bg);
  }
  .note-card {
    border: 1px solid var(--border);
    background: var(--bg-card);
  }
  .note-card.status-pending   { border-left: 3px solid var(--warn); }
  .note-card.status-processed { border-left: 3px solid var(--ok); opacity: 0.9; }
  .note-card.status-dismissed { border-left: 3px solid var(--muted); opacity: 0.75; }
  .note-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--bg);
    border-bottom: 1px dashed var(--border);
    flex-wrap: wrap;
    gap: 8px;
  }
  .note-head-left { display: flex; align-items: center; gap: 10px; }
  .note-proj { font-size: 12px; color: var(--ink-2); }
  .note-status-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    padding: 1px 6px;
    background: var(--ink);
    color: var(--bg);
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }
  .note-card.status-processed .note-status-tag { background: var(--ok); }
  .note-card.status-dismissed .note-status-tag { background: var(--muted); }
  .note-time { font-size: 11px; color: var(--muted); }

  .note-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
  .note-row { display: flex; gap: 12px; align-items: flex-start; }
  .note-row-label {
    flex: 0 0 72px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    color: var(--muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding-top: 2px;
  }
  .note-header {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
  }
  .note-note {
    flex: 1;
    white-space: pre-wrap;
    font-size: 13px;
    color: var(--ink-2);
    background: var(--bg);
    padding: 6px 10px;
    border: 1px solid var(--border);
  }
  .note-ai { flex: 1; display: flex; flex-direction: column; gap: 4px; }
  .note-suggest { font-size: 13px; color: var(--accent); font-weight: 500; }
  .note-conf {
    display: inline-block;
    margin-left: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    padding: 1px 5px;
    background: var(--muted);
    color: white;
    letter-spacing: 0.05em;
  }
  .note-conf.conf-high   { background: var(--ok); }
  .note-conf.conf-medium { background: var(--accent); }
  .note-conf.conf-low    { background: var(--warn); }
  .note-explain { font-size: 12px; color: var(--muted); font-style: italic; }

  .note-actions {
    border-top: 1px solid var(--border);
    padding: 10px 14px 14px;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .note-action-title {
    font-size: 10.5px;
    color: var(--muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 6px;
  }
  .note-action-row {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 4px;
  }
  .note-action-row input[type="text"], .note-action-row select {
    flex: 1;
    min-width: 180px;
    padding: 6px 8px;
    border: 1px solid var(--border-strong);
    background: var(--bg);
    font-size: 12.5px;
  }
  .note-action-row select { min-width: 260px; }
  .note-merge-label {
    font-size: 11.5px;
    color: var(--ink-2);
    display: inline-flex;
    gap: 4px;
    align-items: center;
    cursor: pointer;
    white-space: nowrap;
  }

  /* 弹层：admin.html 也引了 styles.css（第 7 行），遮罩/外框/头部/关闭按钮的完整规则都在那边，
   * 这里以前整套抄了一遍（注释误写成"原本没引 modal 规则"），主样式表改了后台不跟着变。
   * 现在只保留后台真正需要的差异：
   * 1) 后台的字段治理/时间线等弹层内容很长，要限高 + 让内容区自己滚（主应用弹层不限高）；
   * 2) 后台信息密度更高，头部/内容内边距比主应用略紧；
   * 3) 头部字体：主样式表只给了 .modal-head .title，这里让右上角 × 也用同一套字体（后台独有）。
   * 各弹层的宽度写在 admin.html 的行内 style 上，这里不再重复给 max-width。 */
  .modal {
    max-height: calc(100vh - 80px);
    display: flex; flex-direction: column;
  }
  .modal-head {
    padding: 12px 18px;
    font-family: 'Fraunces', serif; font-weight: 500;
  }
  .modal-body { padding: 16px 18px; overflow-y: auto; }

  .gov-impact {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 10px 12px;
    margin-bottom: 14px;
  }
  .gov-impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 10px;
  }
  .gov-impact-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .gov-impact-val {
    font-family: 'Fraunces', serif;
    font-size: 20px;
    font-weight: 500;
  }
  .gov-impact-val.warn { color: var(--warn); }
  .gov-impact-refs { margin-top: 10px; }
  .gov-impact-refs summary { cursor: pointer; font-size: 11.5px; color: var(--muted); }
  .gov-impact-refs ul { margin: 6px 0 0; padding-left: 18px; }

  .gov-section {
    padding: 12px;
    border: 1px solid var(--border);
    margin-bottom: 12px;
    background: var(--bg-card);
  }
  .gov-section.gov-danger { border-color: var(--err); background: #fdf3f2; }
  .gov-section-title {
    font-family: 'Fraunces', serif;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 4px;
  }
  .gov-section-hint {
    font-size: 11.5px;
    color: var(--muted);
    margin-bottom: 10px;
    line-height: 1.5;
  }
  .gov-row {
    display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
    margin-bottom: 6px;
  }
  .gov-row input[type="text"], .gov-row select {
    flex: 1; min-width: 200px; padding: 6px 8px;
    border: 1px solid var(--border-strong); background: var(--bg);
    font-size: 12.5px;
  }
  .gov-checkboxes { font-size: 11.5px; color: var(--ink-2); gap: 14px; }
  .gov-checkboxes label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; white-space: nowrap; }

  /* ===== 待确认别名：已有别名 + 模糊推荐 ===== */
  #aliasTable td { vertical-align: top; padding-top: 8px; padding-bottom: 8px; }
  .al-field-key { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; color: var(--ink); }
  .al-field-label { font-size: 11px; color: var(--muted); margin-top: 1px; }
  .al-field-dead { font-size: 11px; color: var(--err); margin-top: 1px; }
  .al-existing { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 3px; align-items: center; max-width: 320px; }
  .al-existing-k { font-size: 10px; color: var(--muted); margin-right: 2px; }
  .al-chip {
    display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 3px;
    background: var(--bg-accent); border: 1px solid var(--border); color: var(--ink-2);
    max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom;
  }
  .al-chip.more { background: transparent; border-style: dashed; color: var(--muted); }
  /* 推荐区 */
  .al-reco { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
  .al-reco-k { font-size: 10px; color: var(--muted); margin-right: 2px; }
  .al-reco-chip {
    cursor: pointer; font-size: 11px; padding: 1px 7px; border-radius: 10px;
    border: 1px solid var(--border-strong); background: var(--bg); color: var(--ink-2);
    display: inline-flex; align-items: center; gap: 4px;
  }
  .al-reco-chip:hover { border-color: var(--accent); color: var(--accent); }
  .al-reco-chip .pct { font-family: 'JetBrains Mono', monospace; font-size: 9.5px; color: var(--muted); }
  .al-reco-chip.cur { background: #eaf4ee; border-color: var(--ok); color: var(--ok); cursor: default; }
  .al-reco-chip.cur .pct { color: var(--ok); }
  .al-badge { font-size: 10px; padding: 1px 6px; border-radius: 3px; white-space: nowrap; }
  .al-badge.ok { background: #eaf4ee; color: var(--ok); border: 1px solid var(--ok); }
  .al-badge.warn { background: #fdf0e6; color: var(--accent-2); border: 1px solid var(--accent-2); }

  /* 用户角色分配下拉 */
  .role-select {
    font-size: 12px; padding: 2px 6px; border: 1px solid var(--border-strong);
    background: var(--bg); cursor: pointer;
  }

  /* ===== 回收站 ===== */
  .trash-group { margin-bottom: 22px; }
  .trash-group h3 {
    font-size: 13px; font-weight: 600; margin: 0 0 8px;
    display: flex; align-items: center; gap: 8px;
  }
  .trash-group h3 .cnt { color: var(--muted); font-weight: 400; font-size: 11.5px; }
  .trash-empty { color: var(--muted); font-size: 12px; padding: 6px 0; }
  .trash-restore {
    font-size: 11px; padding: 2px 10px; background: transparent;
    border: 1px solid var(--ok); color: var(--ok); cursor: pointer;
  }
  .trash-restore:hover { background: var(--ok); color: #fff; }
  .trash-purge {
    font-size: 11px; padding: 2px 10px; background: transparent;
    border: 1px solid var(--err); color: var(--err); cursor: pointer; margin-left: 6px;
  }
  .trash-purge:hover { background: var(--err); color: #fff; }

  /* ════════════════════ 数据分析 Tab ════════════════════ */
  .an-toolbar {
    display: flex; justify-content: space-between; align-items: center;
    gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
  }
  .an-filters { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
  .an-fl {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; color: var(--muted);
  }
  .an-fl select, .an-mini-select {
    padding: 5px 9px; border: 1px solid var(--border-strong);
    background: var(--bg); font-size: 12.5px; color: var(--ink);
  }
  .an-note { color: var(--muted); font-size: 11px; font-weight: 400; }

  /* 指标说明折叠面板 */
  .an-gloss { margin-bottom: 14px; border: 1px solid var(--border); background: var(--bg); }
  .an-gloss > summary {
    cursor: pointer; padding: 9px 12px; font-size: 12.5px; color: var(--accent);
    font-weight: 600; list-style: none; user-select: none;
  }
  .an-gloss > summary::-webkit-details-marker { display: none; }
  .an-gloss[open] > summary { border-bottom: 1px solid var(--border); }
  .an-gloss-body {
    padding: 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px;
  }
  .an-gloss-title {
    font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: var(--muted);
    letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 6px;
    border-bottom: 1px solid var(--border); padding-bottom: 4px;
  }
  .an-gloss-row { display: grid; grid-template-columns: 96px 1fr; gap: 8px; padding: 3px 0; font-size: 12px; }
  .an-gloss-k { color: var(--ink); font-weight: 600; }
  .an-gloss-v { color: var(--ink-2); line-height: 1.5; }
  .an-stat[title], .an-kpi[title], .data-table th[title] { cursor: help; }

  .an-kpis {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px; margin-bottom: 14px;
  }
  .an-kpi { padding: 10px 12px; background: var(--bg); border: 1px solid var(--border); }
  .an-kpi-l {
    font-family: 'JetBrains Mono', monospace; font-size: 9.5px; color: var(--muted);
    letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 5px;
  }
  .an-kpi-v { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 500; }

  .an-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
  @media (max-width: 860px) { .an-grid2 { grid-template-columns: 1fr; } }
  .an-card { background: var(--bg-card); border: 1px solid var(--border); padding: 14px; margin-bottom: 12px; }
  .an-card-t {
    font-family: 'Fraunces', serif; font-size: 14px; font-weight: 500;
    margin-bottom: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  }

  /* 漏斗 */
  .an-funnel { display: flex; flex-direction: column; gap: 7px; }
  .an-funnel-row { display: grid; grid-template-columns: 72px 1fr 44px; align-items: center; gap: 8px; }
  .an-funnel-label { font-size: 12px; color: var(--ink-2); text-align: right; }
  .an-funnel-track { position: relative; background: var(--bg); border: 1px solid var(--border); height: 26px; }
  .an-funnel-bar { height: 100%; background: var(--accent); transition: width .3s; min-width: 2px; }
  .an-funnel-val {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--ink);
  }
  .an-funnel-conv { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: var(--muted); text-align: right; }
  .an-funnel-conv.ok { color: var(--ok); }
  .an-funnel-conv.warn { color: var(--warn); }
  .an-funnel-conv.err { color: var(--err); font-weight: 600; }

  /* SVG 轴 / 图例 */
  .an-axis { font-family: 'JetBrains Mono', monospace; font-size: 9px; fill: var(--muted); }
  .an-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
  .an-leg { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--ink-2); }
  .an-leg i { width: 10px; height: 10px; display: inline-block; border-radius: 2px; }

  /* 漏斗形 SVG 文字 */
  .an-fn-band { transition: opacity .15s; }
  .an-fn-band:hover { opacity: 0.85; }
  .an-fn-label { font-size: 12px; fill: var(--ink-2); }
  .an-fn-val { font-size: 13px; font-weight: 700; fill: #fff;
    paint-order: stroke; stroke: rgba(26,26,26,0.35); stroke-width: 2.4px; stroke-linejoin: round; }
  .an-fn-conv { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; font-weight: 600; }

  /* 每日趋势：透明热区 + 悬停明细浮层 */
  .an-dayhit { fill: transparent; cursor: pointer; }
  .an-dayhit:hover { fill: rgba(30,74,95,0.07); }
  .an-tip-pop {
    position: fixed; z-index: 300; display: none; min-width: 132px;
    background: var(--bg-card); border: 1px solid var(--ink);
    box-shadow: 3px 3px 0 rgba(26,26,26,0.22); padding: 8px 10px; pointer-events: none;
    font-size: 12px;
  }
  .an-tt-date { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted);
    margin-bottom: 5px; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
  .an-tt-row { display: flex; align-items: center; gap: 6px; padding: 1.5px 0; }
  .an-tt-row i { width: 9px; height: 9px; border-radius: 2px; flex: 0 0 auto; }
  .an-tt-row span { flex: 1; color: var(--ink-2); }
  .an-tt-row b { font-family: 'JetBrains Mono', monospace; color: var(--ink); }
  .an-tt-total { margin-top: 5px; padding-top: 4px; border-top: 1px solid var(--border);
    font-size: 11.5px; color: var(--ink); text-align: right; }

  /* 分类横条 */
  .an-catbars { display: flex; flex-direction: column; gap: 6px; }
  .an-catbar-row { display: grid; grid-template-columns: 70px 1fr 40px; align-items: center; gap: 8px; }
  .an-catbar-label { font-size: 12px; color: var(--ink-2); }
  .an-catbar-track { background: var(--bg); border: 1px solid var(--border); height: 16px; }
  .an-catbar-bar { height: 100%; min-width: 2px; }
  .an-catbar-val { font-size: 11.5px; color: var(--muted); text-align: right; }

  /* 质量指标 */
  .an-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
  .an-stat { padding: 8px 4px; }
  .an-stat-l { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
  .an-stat-v { font-family: 'Fraunces', serif; font-size: 20px; font-weight: 500; }
  .an-stat-s { font-size: 10.5px; color: var(--muted); margin-top: 2px; }

  /* 问题洞察 */
  .an-insights { display: flex; flex-direction: column; gap: 8px; }
  .an-insight { display: flex; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-left-width: 3px; background: var(--bg); }
  .an-insight.err { border-left-color: var(--err); }
  .an-insight.warn { border-left-color: var(--warn); }
  .an-insight.info { border-left-color: var(--accent); }
  .an-insight.ok { border-left-color: var(--ok); }
  .an-ins-icon {
    flex: 0 0 20px; width: 20px; height: 20px; border-radius: 50%; color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
  }
  .an-insight.err .an-ins-icon { background: var(--err); }
  .an-insight.warn .an-ins-icon { background: var(--warn); }
  .an-insight.info .an-ins-icon { background: var(--accent); }
  .an-insight.ok .an-ins-icon { background: var(--ok); }
  .an-ins-title { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
  .an-ins-metric {
    font-family: 'JetBrains Mono', monospace; font-size: 11px; padding: 1px 6px;
    background: var(--bg-accent); border: 1px solid var(--border-strong);
  }
  .an-ins-detail { font-size: 12px; color: var(--ink-2); margin-top: 3px; line-height: 1.5; }

  /* 表格里的徽章 / 状态 */
  .an-rolebadge {
    font-size: 9px; background: var(--accent); color: #fff; padding: 0 4px; border-radius: 2px;
  }
  .an-status { font-size: 11px; padding: 1px 7px; border-radius: 2px; white-space: nowrap; }
  .an-status-draft { background: var(--bg-accent); color: var(--ink-2); }
  .an-status-in_progress { background: #e7eef0; color: var(--accent); }
  .an-status-completed { background: #eaf4ee; color: var(--ok); }
  .an-del { font-size: 10px; color: var(--err); border: 1px solid var(--err); padding: 0 4px; border-radius: 2px; }
  .an-proj-row { cursor: pointer; }
  .an-proj-row:hover { background: var(--bg-accent); }

  /* 项目时间线弹窗 */
  .tl-head {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
    padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid var(--border);
  }
  .tl-sum { font-size: 12px; color: var(--muted); }
  .tl-list { display: flex; flex-direction: column; }
  .tl-item {
    display: grid; grid-template-columns: 14px 84px 1fr; align-items: start;
    gap: 8px; padding: 7px 0; position: relative;
  }
  .tl-item + .tl-item { border-top: 1px dashed var(--border); }
  .tl-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 3px; }
  .tl-time { font-size: 11px; color: var(--muted); }
  .tl-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
  .tl-label { font-size: 12.5px; font-weight: 600; color: var(--ink); }
  .tl-detail { font-size: 12px; color: var(--ink-2); }
  .tl-actor { font-size: 11px; color: var(--muted); margin-left: auto; }

  /* ════════════════════ 达人群发 Tab ════════════════════ */
  .vw-warn {
    background: var(--bg-accent); border: 1px solid var(--border-strong); border-left: 3px solid var(--warn);
    padding: 9px 12px; font-size: 12px; color: var(--ink-2); margin-bottom: 12px; line-height: 1.6;
  }
  .vw-warn code { font-family: 'JetBrains Mono', monospace; font-size: 11px; }
  .vw-toolbar {
    display: flex; justify-content: space-between; align-items: center;
    gap: 12px; flex-wrap: wrap; margin-bottom: 12px;
  }
  .vw-status { font-size: 11.5px; color: var(--ink-2); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
  .vw-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .vw-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 4px; }
  .vw-dot.ok { background: var(--ok); }
  .vw-dot.bad { background: var(--err); }

  .vw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
  @media (max-width: 920px) { .vw-grid { grid-template-columns: 1fr; } }

  .vw-groups { max-height: 560px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
  .vw-group { border: 1px solid var(--border); background: var(--bg); padding: 9px 11px; cursor: pointer; }
  .vw-group:hover { background: var(--bg-accent); }
  .vw-group.sel { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); background: var(--bg-accent); }
  .vw-group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
  .vw-group-name { font-size: 13px; font-weight: 600; color: var(--ink); }
  .vw-group-n { font-size: 11px; color: var(--muted); flex: 0 0 auto; }
  .vw-group-id { font-size: 10.5px; color: var(--muted); margin: 2px 0 6px; word-break: break-all; }
  .vw-tals { display: flex; flex-direction: column; gap: 2px; }
  .vw-tal { display: flex; align-items: baseline; gap: 6px; font-size: 11.5px; flex-wrap: wrap; }
  .vw-tal-name { color: var(--ink-2); font-weight: 500; }
  .vw-tal-nick { color: var(--muted); font-size: 11px; }
  .vw-tal-id { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: var(--muted); }
  .vw-inactive { font-size: 10px; color: var(--muted); border: 1px solid var(--border); padding: 0 4px; }
  .vw-unbound { font-size: 10px; color: #fff; background: var(--accent-2); border-radius: 2px; padding: 0 5px; font-weight: 600; margin-left: 4px; vertical-align: middle; }
  .vw-group-unbound { border-left: 3px solid var(--accent-2); }

  .vw-compose-card { position: sticky; top: 12px; }
  .vw-target { font-size: 12.5px; color: var(--ink-2); margin-bottom: 10px; }
  .vw-field { margin-bottom: 12px; }
  .vw-label { font-size: 11.5px; color: var(--muted); margin-bottom: 5px; }
  .vw-field select { padding: 6px 9px; border: 1px solid var(--border-strong); background: var(--bg); font-size: 12.5px; min-width: 180px; }
  .vw-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;
  }
  .vw-picks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
  .vw-pick { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-2); cursor: pointer; }
  .vw-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

  .vw-err { color: var(--err); font-size: 12px; padding: 8px 10px; border: 1px solid var(--err); background: #fbeeee; margin-bottom: 8px; }
  .vw-ok { color: var(--ok); font-size: 12px; padding: 8px 10px; border: 1px solid var(--ok); background: #eef5ec; margin-top: 10px; }
  .vw-ok code, .vw-err code { font-family: 'JetBrains Mono', monospace; font-size: 11px; word-break: break-all; }

  .vw-confirm > div { font-size: 12.5px; margin-bottom: 6px; color: var(--ink-2); }
  .vw-ck { display: inline-block; min-width: 38px; color: var(--muted); font-size: 11px; }
  .vw-msg-prev {
    margin: 4px 0 0; background: var(--bg); border: 1px solid var(--border); padding: 8px 10px;
    font-family: inherit; font-size: 12.5px; white-space: pre-wrap; word-break: break-word; max-height: 160px; overflow: auto;
  }

/* ── 群聊记录：左侧群列表 + 右侧聊天气泡 ─────────────────────── */
.vwc-wrap { display: grid; grid-template-columns: 260px 1fr; gap: 12px; align-items: stretch; height: 560px; }
.vwc-left { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.vwc-search { border: none; border-bottom: 1px solid var(--border); background: var(--bg); padding: 8px 10px; font-size: 12.5px; font-family: inherit; }
.vwc-search:focus { outline: none; background: var(--bg-card); }
.vwc-groups { flex: 1; overflow-y: auto; }
.vwc-hint { padding: 16px; font-size: 12.5px; }
.vwc-group { padding: 9px 12px; border-bottom: 1px solid var(--border); cursor: pointer; }
.vwc-group:hover { background: var(--bg-accent); }
.vwc-group.sel { background: var(--bg-accent); box-shadow: inset 3px 0 0 var(--accent-2, #d97533); }
.vwc-g-name { font-size: 13px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vwc-g-meta { display: flex; justify-content: space-between; margin-top: 3px; font-size: 11px; color: var(--muted); }
.vwc-g-time { color: var(--muted); }

.vwc-right { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--bg); }
.vwc-chat-head { flex: 0 0 auto; padding: 9px 14px; border-bottom: 1px solid var(--border); background: var(--bg-card);
  font-size: 13.5px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.vwc-cnt { font-size: 11px; font-weight: 400; color: var(--muted); }
.vwc-chat-head .vwc-cnt:last-child { margin-left: auto; }
.vwc-msgs { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
/* 一条消息：昱AI(self) 靠右、群成员(other) 靠左 */
.vwc-row { display: flex; flex-direction: column; max-width: 72%; }
.vwc-row.other { align-self: flex-start; align-items: flex-start; }
.vwc-row.self { align-self: flex-end; align-items: flex-end; }
.vwc-meta { font-size: 10.5px; color: var(--muted); margin-bottom: 3px; padding: 0 4px; }
.vwc-t { color: var(--muted); }
.vwc-bubble { font-size: 13px; line-height: 1.6; padding: 8px 12px; border-radius: 12px; white-space: pre-wrap; word-break: break-word; }
.vwc-row.other .vwc-bubble { background: var(--bg-card); border: 1px solid var(--border); color: var(--ink); border-top-left-radius: 3px; }
.vwc-row.self .vwc-bubble { background: #d6ebd3; border: 1px solid #b0d3ab; color: #1c3a17; border-top-right-radius: 3px; }
.vwc-row.atbot .vwc-bubble { box-shadow: 0 0 0 2px #f0b866; }
.vwc-media { color: var(--muted); font-style: italic; }
.vwc-staff { font-size: 9.5px; background: var(--bg-accent); border: 1px solid var(--border); border-radius: 3px; padding: 0 3px; color: var(--ink-2); }
.vwc-atbot { font-size: 9.5px; background: #f0b866; color: #5a3a00; border-radius: 3px; padding: 0 4px; font-weight: 700; }
@media (max-width: 860px) {
  .vwc-wrap { grid-template-columns: 1fr; height: auto; }
  .vwc-left { max-height: 220px; }
  .vwc-right { height: 420px; }
}

/* ── 询单分析 Tab ───────────────────────────────────────────── */
/* 企微联系人选择器（绑定商务用，点选不手打） */
.wxp-bar { display: flex; gap: 8px; align-items: center; }
.wxp-bar input { flex: 1; min-width: 0; border: 1px solid var(--border-strong); background: var(--bg);
  padding: 7px 10px; font-size: 13px; font-family: inherit; }
.wxp-bar input:focus { border-color: var(--accent); background: #fff; outline: none; }
.wxp-hint { font-size: 11.5px; color: var(--muted); margin: 8px 0 6px; }
.wxp-list { max-height: 46vh; overflow-y: auto; border: 1px solid var(--border); }
.wxp-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; cursor: pointer;
  border-bottom: 1px solid var(--border); }
.wxp-row:last-child { border-bottom: none; }
.wxp-row:hover { background: var(--bg-accent); }
.wxp-row.on { background: var(--bg-accent); }
.wxp-ava { width: 30px; height: 30px; border-radius: 50%; flex: none; object-fit: cover; background: var(--border); }
.wxp-ava.fb { display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--ink-2); }
.wxp-txt { min-width: 0; flex: 1; }
.wxp-name { font-size: 13px; color: var(--ink); }
.wxp-name b { color: var(--accent); font-size: 11px; }
.wxp-sub { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wxp-empty, .wxp-err { padding: 22px 12px; text-align: center; font-size: 12.5px; color: var(--muted); }
.wxp-err { color: var(--err); }
.wxp-err a { color: var(--accent); }
.wxp-foot { margin-top: 10px; display: flex; justify-content: flex-end; }

/* 经纪人别名（达人群发 Tab；弹窗列表复用上面的 wxp-*） */
.vwba-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.vwba-row:last-child { border-bottom: none; }
.vwba-broker { flex: none; min-width: 88px; font-size: 13px; font-weight: 600; color: var(--ink);
  padding-top: 3px; white-space: nowrap; }
.vwba-names { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.vwba-chip { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; color: var(--ink);
  background: var(--bg-accent); border: 1px solid var(--border); padding: 2px 4px 2px 9px; }
.vwba-x { border: none; background: none; cursor: pointer; color: var(--muted); font-size: 13px;
  line-height: 1; padding: 2px 5px; }
.vwba-x:hover { color: var(--err); }
.vwba-del { flex: none; }

/* 「AI 回复」Tab：建议 vs 实发对照列表 */
.airep-item { padding: 9px 0; border-bottom: 1px solid var(--border); }
.airep-item:last-child { border-bottom: none; }
.airep-meta { font-size: 11px; color: var(--muted); margin-bottom: 4px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.airep-badge { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 3px; }
.airep-badge.asis { color: #fff; background: var(--accent); }
.airep-badge.edited { color: #7a4c00; background: #ffd479; }
.airep-badge.custom { color: #fff; background: var(--err); }
.airep-badge.ignored { color: var(--ink-2); background: var(--border); }
.airep-line { font-size: 12.5px; line-height: 1.6; margin: 2px 0; word-break: break-word; }
.airep-k { color: var(--muted); font-size: 11.5px; }
.airep-final { background: var(--bg-accent); padding: 2px 6px; border-left: 3px solid var(--accent-2, #d97533); }
.airep-days.active { border-color: var(--accent); color: var(--accent); font-weight: 700; }

.iqa-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.iqa-toolbar select { padding: 5px 8px; border: 1px solid var(--border-strong); background: var(--bg); font-size: 12.5px; }
.iqa-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 16px; }
.iqa-kpi { border: 1px solid var(--border); background: var(--bg-card); padding: 12px 14px; }
.iqa-kpi-v { font-size: 22px; font-weight: 700; color: var(--accent); line-height: 1.1; }
.iqa-kpi-l { font-size: 12px; color: var(--ink); margin-top: 4px; }
.iqa-kpi-s { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.iqa-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.iqa-card { border: 1px solid var(--border); background: var(--bg-card); padding: 12px 14px; }
.iqa-card h4 { margin: 0 0 10px; font-size: 13px; color: var(--ink); }
.iqa-bars { display: flex; flex-direction: column; gap: 6px; }
.iqa-bar-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.iqa-bar-name { width: 90px; flex: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.iqa-bar-track { flex: 1; height: 12px; background: var(--bg-accent); border-radius: 2px; overflow: hidden; }
.iqa-bar-fill { display: block; height: 100%; background: var(--accent); }
.iqa-bar-val { width: 92px; flex: none; text-align: right; color: var(--muted); font-size: 11px; }
.iqa-funnel { display: flex; flex-direction: column; gap: 6px; }
.iqa-fn-row { display: flex; align-items: center; gap: 8px; }
.iqa-fn-stage { width: 64px; flex: none; font-size: 12px; color: var(--ink-2); }
.iqa-fn-bar { background: var(--accent); color: #fff; font-size: 12px; padding: 4px 8px; border-radius: 2px; min-width: 28px; text-align: right; }
.iqa-fn-conv { width: 44px; flex: none; font-size: 11.5px; text-align: right; }
.iqa-table { width: 100%; margin-top: 4px; }
.iqa-table th, .iqa-table td { font-size: 12px; padding: 5px 8px; }
.iqa-table td:first-child { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px) { .iqa-kpis { grid-template-columns: repeat(2, 1fr); } .iqa-2col { grid-template-columns: 1fr; } }

/* 卡片接单分析（复用 iqa-*，补：时间窗条 / 每日堆叠柱 / 状态 pill / 明细折叠） */
#csRoot .iqa-kpis { grid-template-columns: repeat(auto-fit, minmax(108px, 1fr)); }
.cs-win-bar { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.cs-win.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.cs-daily { display: flex; align-items: flex-end; gap: 6px; height: 108px; padding-top: 6px; overflow-x: auto; }
.cs-day { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 20px; }
.cs-day-col { display: flex; flex-direction: column; justify-content: flex-end; width: 18px; height: 80px;
  background: var(--bg); border-radius: 2px; overflow: hidden; }
.cs-seg { width: 100%; display: block; }
.cs-day-lbl { font-size: 10px; color: var(--muted); white-space: nowrap; }
.cs-status { font-size: 11.5px; font-weight: 500; }
.cs-detail > summary { cursor: pointer; font-size: 13px; font-weight: 500; color: var(--ink); }
.cs-detail > summary a { font-size: 12px; font-weight: 400; }

/* 好友推荐 Tab（复用 iqa-*/cs-win-bar，补：双色日柱 / 线索筛选条 / 就地编辑列） */
#shRoot .iqa-kpis { grid-template-columns: repeat(auto-fit, minmax(108px, 1fr)); }
.sh-win.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.sh-daily { display: flex; align-items: flex-end; gap: 7px; height: 108px; padding-top: 6px; overflow-x: auto; }
.sh-day { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 22px; }
.sh-day-col { display: flex; align-items: flex-end; justify-content: center; gap: 2px; height: 80px; }
.sh-bar { width: 8px; display: block; border-radius: 2px 2px 0 0; min-height: 2px; }
.sh-day-lbl { font-size: 10px; color: var(--muted); white-space: nowrap; }
.sh-chk { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
/* 新线索群推送设置条 */
.sh-notify { display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 9px 12px; margin-bottom: 14px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 8px; }
.sh-notify .sh-chk { color: var(--ink); font-size: 12.5px; }
.sh-notify select { padding: 5px 9px; border: 1px solid var(--border-strong);
  background: var(--bg-card); color: var(--ink); font-size: 12.5px; border-radius: 6px;
  max-width: 300px; }
.sh-roomq { width: 130px; padding: 5px 9px; border: 1px solid var(--border-strong);
  background: var(--bg-card); color: var(--ink); font-size: 12.5px; border-radius: 6px; }
.sh-cur-room { font-size: 12.5px; color: var(--muted); }
.sh-cur-room b { color: var(--ink); }
.sh-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 10px; }
.sh-filter select, .sh-filter input { padding: 5px 9px; border: 1px solid var(--border-strong);
  background: var(--bg-card); color: var(--ink); font-size: 12.5px; border-radius: 6px; }
.sh-filter input { min-width: 190px; }
/* 列一多表就比卡片宽（备注列被挤到标题竖排、整张表溢出到卡片外面）。
   统一包一层横向滚动容器：表按自然宽度排，容器里滑，绝不撑破卡片。 */
.sh-tblwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.sh-tblwrap > table { min-width: 100%; }
.sh-lead-table td { white-space: nowrap; }
/* 项目列：可点的项目名 + 「看分享页」按钮 + 截止倒计时小字
   （倒计时由服务端按北京时间算好，前端只上色） */
.sh-proj-row { display: flex; align-items: center; gap: 6px; }
.sh-proj-n { background: none; border: none; padding: 0; font: inherit; font-weight: 500;
  color: var(--accent); cursor: pointer; text-align: left; max-width: 190px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-proj-n:hover { text-decoration: underline; }
/* 分享页查看弹窗：上面一条真实链接，下面 iframe 就是好友看到的页面 */
.sh-view-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.sh-view-link { flex: 1; min-width: 220px; font-size: 11.5px; background: var(--bg);
  border: 1px solid var(--border); padding: 5px 8px; word-break: break-all; }
.sh-view-note { font-size: 11.5px; margin-bottom: 10px; line-height: 1.6; }
.sh-viewframe { display: block; width: 100%; height: min(68vh, 660px);
  border: 1px solid var(--border); background: #f3f5f9; }
.sh-ddl { display: inline-block; margin-top: 2px; font-size: 11px; color: var(--muted); }
/* 阈值按本业务真实尺度：DDL 常只有几小时 → 6 小时内转橙、2 小时内/已截止转红
   （见 share.py _DDL_URGENT_SEC/_DDL_SOON_SEC；用通用的"3天/24小时"会全红等于没标） */
.sh-ddl.soon { color: var(--accent-2, #d97533); font-weight: 600; }
.sh-ddl.urgent, .sh-ddl.over { color: var(--err); font-weight: 600; }
/* 手机号/备注：点一下复制、双击就改，别做多步弹窗（用户偏好） */
.sh-phone { cursor: pointer; font-variant-numeric: tabular-nums; }
.sh-phone:hover { color: var(--accent); text-decoration: underline; }
.sh-remark { cursor: text; max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
/* 经纪人：双击改派；专属链接：点一下复制 */
.sh-broker { cursor: cell; }
.sh-broker:hover { color: var(--accent); }
.sh-bklink { cursor: pointer; font-size: 11.5px; max-width: 340px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.sh-bklink:hover { color: var(--accent); text-decoration: underline; }
.sh-st { padding: 3px 6px; border: 1px solid var(--border-strong); background: var(--bg-card);
  color: var(--ink); font-size: 12px; border-radius: 5px; }
/* UA 很长，列内截断，悬停 title 看全 */
.sh-ua { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11px; color: var(--muted); }


/* ===== 消息通知 Tab（复用 --bg-card/--ink/--muted/--border/--accent/--err；避开绿色标肯定值） ===== */
.notif-root { padding: 4px 2px; }
.notif-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.notif-sel, .notif-q { padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: 8px;
  background: var(--bg-card); color: var(--ink); font-size: 13px; }
.notif-q { min-width: 180px; flex: 0 1 220px; }
.notif-stat { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.notif-list { display: flex; flex-direction: column; gap: 8px; }
.notif-empty { padding: 28px; text-align: center; color: var(--muted); font-size: 13px; }
.notif-empty.err { color: var(--err); }
.notif-item { display: flex; gap: 11px; padding: 11px 13px; border: 1px solid var(--border);
  border-left: 3px solid var(--border-strong); border-radius: 10px; background: var(--bg-card); }
.notif-item.nt-accept { border-left-color: var(--accent); }
.notif-item.nt-decline { border-left-color: var(--err); }
.notif-item.nt-reply { border-left-color: #4b83c4; }
.notif-ico { font-size: 20px; line-height: 1.2; flex: none; }
.notif-main { flex: 1 1 auto; min-width: 0; }
.notif-head { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.notif-title { font-weight: 700; font-size: 13.5px; color: var(--ink); }
.notif-push { font-size: 11px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--border-strong);
  color: var(--muted); white-space: nowrap; }
.notif-push.np-sent { color: var(--accent); border-color: var(--accent); }
.notif-push.np-failed { color: var(--err); border-color: var(--err); }
.notif-push.np-skipped { color: var(--muted); }
.notif-push.np-pending { color: #b9820a; border-color: #e6c07a; }
.notif-body { font-size: 12.8px; color: var(--ink); line-height: 1.55; white-space: normal;
  word-break: break-word; }
.notif-err { margin-top: 4px; font-size: 11.5px; color: var(--err); }
.notif-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 6px; font-size: 11.5px; color: var(--muted); }
/* 正文里的网址：让人一眼看出可点（后台是审计视图，正文要跟真实私信逐字一致） */
.notif-link { color: var(--accent); text-decoration: none; word-break: break-all; }
.notif-link:hover { text-decoration: underline; }
/* 一键进群：存量通知正文里没有链接，靠这个按钮也能进 */
.notif-chat {
  margin-left: auto; flex: none; text-decoration: none;
  font-size: 11.5px; line-height: 1; padding: 4px 9px; border-radius: 6px;
  border: 1px solid var(--border-strong); background: var(--bg-card); color: var(--ink-2);
}
.notif-chat:hover { border-color: var(--accent); color: var(--accent); }
.notif-stat .np-sent { color: var(--accent); }
.notif-stat .np-failed { color: var(--err); }
.notif-stat .np-skipped { color: var(--muted); }
.notif-stat .np-pending { color: #b9820a; }


/* 发版后提示刷新的浮条（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; }
}

/* ── 更新日志（后台专用时间线）─────────────────────────────── */
.chlog-form { border: 1px solid var(--border-strong); background: var(--bg-card); padding: 12px; margin-bottom: 16px; }
.chlog-form-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.chlog-in { border: 1px solid var(--border-strong); background: var(--bg); padding: 6px 9px;
  font-size: 12.5px; font-family: inherit; box-sizing: border-box; }
.chlog-in:focus { border-color: var(--accent); outline: none; }
.chlog-ta { width: 100%; min-height: 96px; line-height: 1.7; resize: vertical; margin-bottom: 8px; }

/* 时间线：左侧一条竖线，按日期分组 */
.chlog-tl { position: relative; padding-left: 14px; }
.chlog-tl::before { content: ''; position: absolute; left: 3px; top: 6px; bottom: 6px;
  width: 1px; background: var(--border); }
.chlog-day { margin-bottom: 18px; }
.chlog-day-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.chlog-dot { position: absolute; left: 0; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); margin-top: 5px; }
.chlog-date { font-size: 12px; color: var(--ink-2); font-weight: 700; }
.chlog-items { display: flex; flex-direction: column; gap: 8px; }
.chlog-item { border: 1px solid var(--border); background: var(--bg-card); padding: 9px 11px; }
.chlog-item-h { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.chlog-cat { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 3px; flex: none; }
.chlog-feat { color: #fff; background: var(--accent); }
.chlog-impr { color: #7a4c00; background: #ffd479; }
.chlog-fix  { color: #fff; background: var(--err); }
.chlog-ops  { color: var(--ink-2); background: var(--border); }
.chlog-ver { font-size: 11px; color: var(--muted); flex: none; }
.chlog-title { font-size: 13px; font-weight: 600; color: var(--ink); flex: 1 1 auto; min-width: 120px; }
.chlog-acts { display: flex; gap: 4px; flex: none; }
.chlog-body { margin-top: 6px; }
.chlog-line { font-size: 12.5px; line-height: 1.75; color: var(--ink-2);
  padding-left: 11px; position: relative; word-break: break-word; white-space: pre-wrap; }
.chlog-line::before { content: '·'; position: absolute; left: 2px; color: var(--muted); }
.chlog-meta { margin-top: 6px; font-size: 10.5px; color: var(--muted); }

/* 群聊记录里的图片缩略图 + 大图浮层（与商务端同款观感） */
.vwc-msg-img { max-width: 200px; max-height: 200px; border-radius: 6px; display: block;
  border: 1px solid var(--border); background: var(--bg); cursor: zoom-in; object-fit: cover; }
.vwc-msg-img:hover { border-color: var(--accent); }
.vwc-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; }
.vwc-imgviewer img { max-width: 94vw; max-height: 94vh; object-fit: contain; }

/* ════════ 催办 · AI 开关（2026-08-05）════════
   这两块都会让系统在没人看着时真发消息/真花钱，所以"当前是开是关"必须一眼可见。 */
.ap-sec { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
  padding: 16px 18px; margin-bottom: 16px; }
.ap-sec-t { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.ap-sec-note { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin-bottom: 12px; }
.ap-row { display: flex; align-items: center; gap: 10px; margin: 10px 0; font-size: 13px; }
.ap-row.ap-col { flex-direction: column; align-items: stretch; gap: 5px; }
.ap-row input[type=number] { width: 78px; padding: 5px 8px; border: 1px solid var(--border-strong);
  background: var(--bg); font-size: 13px; }
.ap-row textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--border-strong);
  background: var(--bg); font: inherit; font-size: 13px; line-height: 1.7; resize: vertical; }
/* 开关：拨动式，比复选框更像"总闸" */
.ap-switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.ap-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.ap-slider { width: 40px; height: 22px; border-radius: 999px; background: var(--border-strong);
  position: relative; transition: background .18s; flex: none; }
.ap-slider::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; transition: transform .18s; }
.ap-switch input:checked + .ap-slider { background: var(--accent); }
.ap-switch input:checked + .ap-slider::after { transform: translateX(18px); }
.ap-switch input:focus-visible + .ap-slider { outline: 2px solid var(--accent); outline-offset: 2px; }
.ap-label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
/* 命中预览：开之前就看清会发给谁 */
.ap-preview { margin: 12px 0; padding: 10px 12px; background: var(--bg); border-radius: 6px;
  border-left: 3px solid var(--accent); font-size: 12.5px; }
.ap-preview-empty { border-left-color: var(--border-strong); color: var(--muted); }
.ap-preview-t { margin-bottom: 6px; color: var(--ink-2); }
.ap-preview-row { display: flex; gap: 10px; padding: 3px 0; align-items: baseline; flex-wrap: wrap; }
.ap-pv-name { font-weight: 600; color: var(--ink); }
.ap-pv-proj { color: var(--ink-2); }
.ap-pv-ddl { color: var(--muted); font-size: 11.5px; }
.ap-actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.ap-log { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ap-log th, .ap-log td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.ap-log th { color: var(--muted); font-weight: 600; font-size: 11.5px; }
.ap-bad { color: var(--err); cursor: help; }
