
/* 页面层。骨架 + 各页面专属布局。 */

/* ---------- 基础排版 ---------- */
body {
  margin: 0; font-family: var(--font-sans); font-size: var(--fs-base);
  color: var(--n-800); background: var(--n-100); -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-ink); }
h1, h2, h3 { margin: 0; }
table { table-layout: auto; }   /* 长文本不撑破布局，从旧 app.css 迁过来 */

/* ---------- 侧栏 ---------- */
.app-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w);
  display: flex; flex-direction: column; overflow-y: auto;
  background: linear-gradient(180deg, var(--panel-1) 0%, var(--panel-2) 55%, var(--panel-1) 100%);
  z-index: var(--z-nav); transition: width .18s;
}
.app-sidebar__brand {
  height: var(--topbar-h); flex: none; display: flex; align-items: center; gap: var(--sp-2);
  padding: 0 var(--sp-4); color: var(--panel-ink); font-size: var(--fs-lg); font-weight: 700;
  text-decoration: none; white-space: nowrap;
  border-bottom: 1px solid rgba(243,238,226,.08);
}
.app-sidebar__brand em {
  color: var(--brand-400); font-style: normal; font-weight: 500;
}
.app-sidebar__group { padding: var(--sp-4) var(--sp-3) 0; }
.app-sidebar__group-label {
  padding: 0 var(--sp-3) var(--sp-2); font-size: var(--fs-xs); font-weight: var(--fw-semibold);
  color: var(--panel-ink-dim); letter-spacing: .06em;
}
.app-nav-item {
  display: flex; align-items: center; gap: var(--sp-3); height: 38px; padding: 0 var(--sp-3);
  border-radius: var(--r-md); color: var(--panel-ink-dim); font-size: var(--fs-base); text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.app-nav-item:hover { background: rgba(243, 238, 226, .07); color: var(--panel-ink); }
.app-nav-item.is-active {
  /* 原来是 brand-600→brand-700 实心橙药丸配白字（2.2–3.2:1），在深色面板上
     既糊又抢。改成深底常用做法：暖色薄底 + 亮赭文字 + 左侧实心指示条，
     文字对比度 10.6:1，选中态反而更明确。 */
  position: relative;
  background: rgba(217, 119, 6, .20);
  color: var(--brand-300); font-weight: var(--fw-semibold);
}
.app-nav-item.is-active::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 var(--r-xs) var(--r-xs) 0; background: var(--brand-500);
}
.app-nav-item svg { width: 18px; height: 18px; flex: none; }
.app-sidebar__foot { margin-top: auto; padding: var(--sp-3); }

/* 折叠态（仅 ≥768px 生效，窄屏走抽屉导航） */
@media (min-width: 768px) {
  body[data-sidebar="collapsed"] .app-sidebar { width: var(--sidebar-w-collapsed); }
  body[data-sidebar="collapsed"] .app-sidebar__brand-text,
  body[data-sidebar="collapsed"] .app-sidebar__group-label,
  body[data-sidebar="collapsed"] .app-nav-item__text { display: none; }
  body[data-sidebar="collapsed"] .app-nav-item { justify-content: center; padding: 0; }
  body[data-sidebar="collapsed"] .app-main { margin-left: var(--sidebar-w-collapsed); }
}

/* ---------- 主区与顶栏 ---------- */
.app-main {
  margin-left: var(--sidebar-w); min-height: 100vh;
  display: flex; flex-direction: column; transition: margin-left .18s;
}
.app-topbar {
  position: sticky; top: 0; z-index: var(--z-nav); flex: none;
  height: var(--topbar-h); display: flex; align-items: center; gap: var(--sp-4);
  padding: 0 var(--sp-6); background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--n-200); box-shadow: 0 1px 0 rgba(15,23,42,.03);
}
/* 标题块要能收缩：flex 子项默认 min-width:auto，不写 0 的话
   窄屏下标题宁可折行也不让位，页面名会被压成「线索 / 池」两行。 */
.app-topbar__titles { min-width: 0; }
.app-topbar__title { font-size: var(--fs-2xl); font-weight: var(--fw-bold); color: var(--n-900);
  letter-spacing: -0.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-topbar__right { margin-left: auto; display: flex; align-items: center; gap: var(--sp-3); }
.app-topbar__search { width: 220px; }
.app-topbar__toggle { display: none; }
.app-content { flex: 1; width: 100%; max-width: var(--content-max); margin: 0 auto; padding: var(--sp-6); }

/* ---------- 匿名页（登录、改密）---------- */
/* column 是必须的：base.html 会在 {% block body %} 之前渲染 flash / error 提示，
   row 布局下提示会与登录卡片并排成两列，页面直接错位。 */
.app--auth .app-content {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--sp-4); min-height: 100vh; padding: var(--sp-6);
}
.app--auth .app-topbar, .app--auth .app-sidebar { display: none; }

/* ---------- 窄屏 ---------- */


/* ==========================================================================
   以下为 2026-09-25 前端改造（Task 5 ~ Task 12）追加的页面级样式。
   约定与前半部分一致：只写语义类名，颜色一律走 tokens.css 的变量。
   ========================================================================== */

/* 等宽字体令牌。计划里它归 tokens.css，但本次改造的边界只允许改
   pages.css / app.js，先在这里定义；收尾时可整体挪回 tokens.css。 */
:root { --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ---------- 告警条 ----------
   计划把它放组件层，同样受改造边界限制，先落在页面层。 */
.alert { display: flex; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4);
  border: 1px solid; border-radius: var(--r-md); font-size: var(--fs-base); line-height: 1.6; }
.alert + .alert, .alert + .dash-block { margin-top: var(--sp-5); }
.alert__body { flex: 1; }
.alert a { color: inherit; font-weight: 500; }
.alert--warning { background: var(--warning-bg); border-color: var(--warning); color: var(--warning-fg); }
.alert--warning a { text-decoration: underline; }
.alert--danger  { background: var(--danger-bg);  border-color: var(--danger);  color: var(--danger-fg); }
.alert--info    { background: var(--info-bg);    border-color: var(--info);    color: var(--info-fg); }

/* ---------- 登录 / 改密 ---------- */
.auth-split {
  display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh;
  max-width: 1080px; margin: 0 auto; background: var(--n-0);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-3);
}
.auth-brand {
  position: relative; padding: var(--sp-10) var(--sp-8);
  background: linear-gradient(155deg, #1E293B 0%, #0F172A 55%, #1a1030 100%);
  color: var(--n-300); overflow: hidden;
}
.auth-brand__glow {
  position: absolute; width: 320px; height: 320px; right: -80px; top: -80px;
  background: radial-gradient(circle, rgba(255,107,53,.35) 0%, transparent 70%);
  pointer-events: none;
}
.auth-brand__logo { font-size: var(--fs-3xl); font-weight: 700; color: #fff; letter-spacing: .5px; }
.auth-brand__logo em {
  display: block; margin-top: var(--sp-2); font-style: normal; font-size: var(--fs-lg);
  font-weight: 500; color: var(--brand-300);
}
.auth-brand__slogan { margin: var(--sp-4) 0 var(--sp-7); font-size: var(--fs-lg); color: var(--n-200); }
.auth-brand__points {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: var(--sp-4);
}
.auth-brand__points li {
  padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md);
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08);
  font-size: var(--fs-sm); line-height: 1.6; color: var(--n-300);
}
.auth-brand__points strong { display: block; color: #fff; font-weight: 600; margin-bottom: 2px; }
.auth-brand__foot {
  position: absolute; left: var(--sp-8); bottom: var(--sp-8);
  font-size: var(--fs-xs); color: var(--n-500); letter-spacing: 2px;
}
.auth-form { padding: var(--sp-10) var(--sp-8); display: flex; flex-direction: column; justify-content: center; }
.auth-form__title { margin: 0; font-size: var(--fs-2xl); font-weight: 700; color: var(--n-900); }
.auth-form__sub { margin: var(--sp-2) 0 var(--sp-6); font-size: var(--fs-sm); color: var(--n-500); }
.auth-form__body { display: flex; flex-direction: column; gap: var(--sp-4); }
.auth-form__hint { margin: var(--sp-4) 0 0; font-size: var(--fs-xs); color: var(--n-500); line-height: 1.7; }
.auth-card { width: 100%; max-width: 460px; padding: var(--sp-8);
  background: var(--n-0); border: 1px solid var(--n-200); border-radius: var(--r-lg); box-shadow: var(--sh-2); }



/* ---------- 图标尺寸 ----------
   icon() 宏渲染的 <svg> 没有 width/height，只靠容器的 CSS 给尺寸；
   漏掉的地方会按替换元素默认的 300×150 把布局撑开，所以这几处显式兜住。 */
.empty-state__art svg { width: 100%; height: 100%; }
.detail-hero__back svg { width: 16px; height: 16px; }
.settings-warn__icon svg { width: 20px; height: 20px; }

/* ---------- 概览 ---------- */
.dash-block + .dash-grid { margin-top: var(--sp-5); }
.dash-stats__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-4); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--sp-5); }
.dash-col { display: flex; flex-direction: column; gap: var(--sp-5); min-width: 0; }
.dash-triptych { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-5); margin-top: var(--sp-5); }

.command-center {
  margin-top: var(--sp-5); padding: var(--sp-5);
  background: linear-gradient(135deg, var(--n-900) 0%, #1E293B 100%);
  border-radius: var(--r-lg); color: var(--n-0); box-shadow: var(--sh-2);
}
.command-center__intro {
  display: flex; align-items: flex-start; gap: var(--sp-4); margin-bottom: var(--sp-5);
}
.command-center__intro .btn { margin-left: auto; color: var(--n-100); border-color: rgba(255,255,255,.25); }
.command-center__intro .btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.command-center__actions {
  display: flex; flex-wrap: wrap; justify-content: flex-end;
  gap: var(--sp-2); margin-left: auto; flex: none;
}
.command-center__actions .btn { margin-left: 0; }
.command-center__eyebrow { color: var(--brand-300); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .08em; }
.command-center__title { margin-top: var(--sp-1); font-size: var(--fs-xl); color: #fff; }
.command-center__grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px; overflow: hidden; border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r-md); background: rgba(255,255,255,.1);
}
.cc-metric { min-width: 0; padding: var(--sp-4); background: rgba(255,255,255,.06); }
.cc-metric__label { color: var(--n-300); font-size: var(--fs-sm); }
.cc-metric__value {
  margin-top: var(--sp-2); color: #fff; font-size: var(--fs-2xl);
  font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums;
}
.cc-metric__hint { margin-top: var(--sp-1); color: var(--n-500); font-size: var(--fs-xs); line-height: 1.5; }
.cc-metric--money .cc-metric__value { color: var(--brand-300); }
.cc-metric--danger .cc-metric__value { color: #FCA5A5; }
.command-center__body {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr);
  gap: var(--sp-4); margin-top: var(--sp-4);
}
.cc-panel { min-width: 0; padding: var(--sp-4); background: var(--n-0); color: var(--n-800); border-radius: var(--r-md); }
.cc-panel__header { display: flex; align-items: flex-start; gap: var(--sp-3); }
.cc-panel__title { font-size: var(--fs-base); font-weight: 600; color: var(--n-900); }
.cc-panel__sub { margin: 2px 0 0; color: var(--n-500); font-size: var(--fs-xs); }
.cc-panel__header .btn, .cc-panel__header .badge { margin-left: auto; flex: none; }
.cc-rescue-list { margin-top: var(--sp-3); }
.cc-rescue-item {
  display: flex; align-items: center; gap: var(--sp-3); min-width: 0;
  padding: var(--sp-2) 0; border-top: 1px solid var(--n-100);
  color: inherit; text-decoration: none;
}
.cc-rescue-item:hover { color: var(--brand-700); }
.cc-rescue-item__status {
  flex: none; padding: 3px var(--sp-2); border-radius: var(--r-full);
  background: var(--info-bg); color: var(--info-fg); font-size: var(--fs-xs);
}
.cc-rescue-item__status.is-overdue { background: var(--danger-bg); color: var(--danger-fg); }
.cc-rescue-item__main { display: flex; flex-direction: column; min-width: 0; }
.cc-rescue-item__main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-sm); }
.cc-rescue-item__main small { color: var(--n-500); font-size: var(--fs-xs); }
.cc-rescue-item__time { margin-left: auto; flex: none; color: var(--n-500); font-size: var(--fs-xs); }
.cc-panel__empty { margin-top: var(--sp-4); color: var(--n-500); font-size: var(--fs-sm); }
.cc-panel--recovery { display: flex; flex-direction: column; }
.cc-recovery__value { margin-top: var(--sp-6); color: var(--success-fg); font-size: var(--fs-3xl); font-weight: 700; }
.cc-recovery__label { margin-top: var(--sp-1); color: var(--n-500); font-size: var(--fs-sm); }
.cc-recovery__link { align-self: flex-start; margin-top: auto; }

/* 图表。viewBox 由 charts.py 的 W/H 决定，这里只管把它铺满卡片 */
.chart { display: block; width: 100%; height: auto; }
.chart__line { fill: none; stroke: var(--brand-500); stroke-width: 2;
  stroke-linejoin: round; stroke-linecap: round; }
.chart__line--alt { stroke: var(--success); stroke-dasharray: 4 3; }
.chart__area { fill: var(--brand-50); stroke: none; }
.chart__axis { display: flex; justify-content: space-between; margin-top: var(--sp-2);
  font-size: var(--fs-xs); color: var(--n-500); }
.chart-legend { display: inline-flex; gap: var(--sp-3); font-size: var(--fs-xs); color: var(--n-600); }
.chart-legend__dot { display: inline-block; width: 8px; height: 8px; border-radius: var(--r-full);
  margin-right: var(--sp-1); }
.chart-legend__dot--new { background: var(--brand-500); }
.chart-legend__dot--deal { background: var(--success); }

.ring-wrap { display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); }
.ring-figure { position: relative; width: 160px; height: 160px; }
.ring { width: 160px; height: 160px; }
.ring__track { fill: none; stroke: var(--n-200); }
.ring__value { fill: none; stroke: var(--brand-500); stroke-linecap: round; transition: stroke-dasharray .4s; }
.ring__num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-2xl); font-weight: 700; color: var(--n-900); }
.ring__hint { font-size: var(--fs-xs); color: var(--n-500); }

.dist-note { margin-bottom: var(--sp-3); font-size: var(--fs-xs); color: var(--n-500); }
.dist-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 44px;
  align-items: center; gap: var(--sp-3); padding: var(--sp-1) 0; }
.dist-row__count { text-align: right; font-size: var(--fs-sm); font-variant-numeric: tabular-nums;
  color: var(--n-600); }
.dist-ratios { display: flex; flex-wrap: wrap; gap: var(--sp-4); margin-top: var(--sp-4);
  padding-top: var(--sp-3); border-top: 1px solid var(--n-200);
  font-size: var(--fs-xs); color: var(--n-500); }

.queue-list__item { display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5); border-bottom: 1px solid var(--n-200); font-size: var(--fs-sm); }
.queue-list__item:last-child { border-bottom: 0; }
.queue-list__id { font-family: var(--font-mono); font-size: var(--fs-xs); }
.queue-list__reason { margin-left: auto; font-size: var(--fs-xs); color: var(--n-500); }

.mini-list__item { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) 0;
  font-size: var(--fs-sm); border-bottom: 1px solid var(--n-100); }
.mini-list__item:last-child { border-bottom: 0; }
.mini-list__main { font-weight: 500; color: var(--n-800); }
.mini-list__sub { color: var(--n-500); font-size: var(--fs-xs); }
.mini-list__count { margin-left: auto; color: var(--n-600); font-variant-numeric: tabular-nums; }

.kv__row { display: flex; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-1) 0;
  font-size: var(--fs-sm); }
.kv__k { color: var(--n-500); }
.kv__v { color: var(--n-700); }
.kv__error { margin-top: var(--sp-2); font-size: var(--fs-xs); color: var(--danger); word-break: break-all; }

/* 1280 以下：三栏先折成两栏，右列跟到主列下面 */
@media (max-width: 1279px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .dash-triptych { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-stats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .command-center__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* ---------- 客户列表（私客 / 公客池 / 全部客户） ---------- */
/* 归属的一句话解释：私客和公客池不是筛选器，是两种不同性质的东西，
   不解释的话新人第一天就会把公客当自己的客户跟。 */
.leads-scope-note {
  margin: 0 0 var(--sp-3); color: var(--ink-3);
  font-size: var(--fs-sm); line-height: 1.6;
}
.leads-toolbar { display: flex; align-items: center; gap: var(--sp-3);
  flex-wrap: wrap; margin-bottom: var(--sp-4); }
.leads-toolbar__right { margin-left: auto; display: flex; align-items: center; gap: var(--sp-2); }
/* 「共 N 条」这类短标签必须整块读：窄屏工具栏挤到最后只剩二十几像素，
   不写 nowrap 会被拆成竖排的「共 / 33 / 条」。 */
.leads-toolbar__count { font-size: var(--fs-sm); color: var(--n-500); white-space: nowrap; }
/* 导出对客服不可见，但不能只是「没有按钮」——那看起来像功能缺失。
   所以留一句说明，把「为什么没有」写在原地。 */
.leads-toolbar__hint { font-size: var(--fs-xs); color: var(--n-500); }

.bulk-bar { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap;
  padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-3);
  background: var(--n-0); border: 1px solid var(--n-200);
  border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.bulk-bar__count { min-width: 68px; font-size: var(--fs-sm); color: var(--n-500); }
.bulk-bar__hint { margin-left: auto; font-size: var(--fs-xs); color: var(--n-500); }
/* select 默认 width:100%，直接塞进 flex 工具栏会各占一整行，把批量栏撑成三行。
   这里收回宽度，压成一行。 */
.bulk-bar .select { width: auto; min-width: 150px; }
/* 批量记录跟进的输入框：批量栏里的 select 已经压成一行，
   这里给个能写下一句话的宽度，但别把工具栏挤到换行。 */
.bulk-bar__text { width: auto; min-width: 260px; flex: 1 1 260px; max-width: 420px; }

/* 线索池列多：压窄了「待分配」「广东深圳」会被折成两行，看着像没做完。
   给个宽度下限让短列不折行，容器不够宽时由 .table-wrap 横向滚动兜底。
   767px 以下走卡片模式，不需要这个下限。 */
@media (min-width: 768px) {
  .leads-table { min-width: 1120px; }
  /* 「整表导入」这类四字标签在窄列里会被拆成两行，来源列别折行 */
  .leads-table td[data-label="地域"],
  .leads-table td[data-label="来源"],
  .leads-table td[data-label="跟进"] .cell-stack__main { white-space: nowrap; }
}

/* 全选也套上 .lc-pick__hit（见 ui.css），方块本体在桌面端从原生 13px 放到 16px，
   点得准的是外面那圈 28px 的 label。手机端的 20px/44px 在 mobile.css 里，
   这条不能出 @media，否则会把手机端尺寸压回去。 */
@media (min-width: 768px) {
  .leads-table thead input[type="checkbox"] { width: 16px; height: 16px;
    accent-color: var(--brand-500); cursor: pointer; }
}

.contact--weixin { color: var(--brand-ink); font-weight: 500; }
.cell-stack__main { color: var(--n-800); }
.cell-stack__sub { font-size: var(--fs-xs); color: var(--n-500); }
.filter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }
.filter-grid .field--wide { grid-column: 1 / -1; }

/* 窄屏：表格转卡片。表头藏掉，每格用 data-label 把列名搬到值前面，
   不用另写一套卡片模板——两套模板必然漂移。
   卡片视觉再压一层：圆角、投影、留白，让它读起来是「卡片」而不是「折行的表格」。 */
/* 手机端规则统一归 mobile.css（见该文件头）。这里留着的 7 条是例外：
   本文件更后面的桌面块重定义了同属性，搬走会让手机端的胜负翻转。
   要动它们，得先把那处桌面重复消掉。 */
@media (max-width: 767px) {
  .lc-name-main:hover { color: var(--brand-ink); }
  .lc-clue { font-size: var(--fs-xs); color: var(--n-500); }
}

/* ---------- 线索详情 ---------- */
.detail { display: flex; flex-direction: column; gap: var(--sp-5); }

.detail-focus { display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .9fr);
  align-items: stretch; background: var(--n-0); border: 1px solid var(--n-200);
  border-radius: var(--r-lg); box-shadow: var(--sh-1); overflow: hidden; }
.detail-focus .detail-hero { border: 0; border-radius: 0; box-shadow: none;
  border-bottom: 1px solid var(--n-200); grid-column: 1; grid-row: 1; }
.detail-focus__body { display: contents; }
.detail-focus__body > .card { border: 0; border-radius: 0; box-shadow: none;
  min-width: 0; }
.detail-focus__history { grid-column: 1; grid-row: 2; border-top: 1px solid var(--n-200); }
.detail-focus__followup { grid-column: 2; grid-row: 1 / span 2;
  border-left: 1px solid var(--n-200) !important; }
.detail-focus__body .card__header { min-height: 58px; }

.workbench__header { align-items: center; gap: var(--sp-4); }
.workbench__header > div:first-child { min-width: 0; }
.workbench__score { display: inline-flex; align-items: baseline; gap: var(--sp-2);
  margin-left: auto; color: var(--n-500); white-space: nowrap; }
.workbench__score strong { color: var(--brand-700); font-size: var(--fs-xl); }
.workbench__score-label { font-size: var(--fs-xs); }
.workbench__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr);
  gap: var(--sp-5); }
.workbench__eyebrow { display: flex; align-items: center; gap: var(--sp-2);
  color: var(--n-500); font-size: var(--fs-xs); font-weight: 600; }
.workbench__summary-text { margin: var(--sp-2) 0 0; color: var(--n-800);
  line-height: 1.7; overflow-wrap: anywhere; }
.workbench__hint { margin: var(--sp-2) 0 0; color: var(--n-500);
  font-size: var(--fs-xs); line-height: 1.6; overflow-wrap: anywhere; }
.workbench__next { padding-left: var(--sp-5); border-left: 1px solid var(--n-200); }
.workbench__next-title { display: block; margin-top: var(--sp-2); color: var(--n-900);
  font-size: var(--fs-lg); line-height: 1.45; }
.workbench__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3); }
.workbench__missing, .workbench__scripts { margin-top: var(--sp-5);
  padding-top: var(--sp-4); border-top: 1px solid var(--n-200); }
.workbench__missing-list { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-2); }
.workbench__missing-item { display: inline-flex; align-items: center; min-height: 28px;
  padding: 0 var(--sp-2); border: 1px solid var(--warning);
  border-radius: var(--r-full); color: var(--warning-fg); background: var(--warning-bg);
  font-size: var(--fs-xs); }
.workbench__script-list { display: grid; gap: var(--sp-2); margin-top: var(--sp-2); }
.workbench__script { display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: var(--sp-3); min-width: 0; }
.workbench__script-title { color: var(--n-700); font-size: var(--fs-sm); white-space: nowrap; }
.workbench__script-text { min-width: 0; color: var(--n-600); font-size: var(--fs-sm);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-profile-summary { margin-top: var(--sp-5); padding-top: var(--sp-4);
  border-top: 1px solid var(--n-200); }
.demo-profile-summary__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-3); margin-top: var(--sp-2); }
.demo-profile-summary__grid > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.demo-profile-summary__grid span { color: var(--n-500); font-size: var(--fs-xs); }
.demo-profile-summary__grid strong { color: var(--n-800); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.demo-environment-banner { position: fixed; z-index: 100; top: 0; left: 0; right: 0;
  padding: 6px 12px; color: #fff; background: var(--brand-700); text-align: center;
  font-size: var(--fs-xs); letter-spacing: 0; }
.demo-environment-banner + .app-sidebar,
.demo-environment-banner ~ .app-main .app-topbar { margin-top: 28px; }

.detail-hero { display: flex; align-items: flex-start; gap: var(--sp-5);
  padding: var(--sp-5); background: var(--n-0); border: 1px solid var(--n-200);
  border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.detail-hero__main { flex: 1; min-width: 0; }
.detail-hero__name-row { display: flex; align-items: center; gap: var(--sp-3); }
.detail-hero__name {
  appearance: none; border: 0; background: transparent; padding: 0;
  text-align: left; cursor: pointer;
}
.detail-hero__name:hover { color: var(--brand-ink); }
.detail-hero__back { display: inline-flex; align-items: center; gap: var(--sp-1);
  font-size: var(--fs-sm); color: var(--n-500); text-decoration: none; }
.detail-hero__back:hover { color: var(--brand-ink); }
.detail-hero__name { margin: var(--sp-2) 0 var(--sp-1);
  font-size: var(--fs-2xl); font-weight: 600; color: var(--n-900); }
.detail-hero__meta { display: flex; align-items: center; gap: var(--sp-3);
  flex-wrap: wrap; font-size: var(--fs-sm); color: var(--n-500); }
.mono { font-family: var(--font-mono); }

/* 1080px 以下收成单栏：操作栏是「打完标就看结果」的短流程，
   挤在右侧只剩 200px 反而更难用，不如落到下面。 */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px;
  gap: var(--sp-5); align-items: start; }
.detail-main { display: flex; flex-direction: column; gap: var(--sp-4); min-width: 0; }
.detail-aside { display: flex; flex-direction: column; gap: var(--sp-4);
  position: sticky; top: var(--sp-5); }

/* 阶段推进属于跟进动作，和记录跟进共用一个操作面板；不要再渲染成右侧独立卡片。 */
.detail-followup__stage {
  margin-top: var(--sp-5);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--n-200);
}
.detail-followup__stage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.detail-followup__stage-note {
  color: var(--n-500);
  font-size: var(--fs-xs);
  white-space: nowrap;
}

@media (max-width: 1080px) {
  .detail-focus { display: block; }
  .detail-focus__body { display: grid;
    grid-template-columns: minmax(0, 1fr); }
  .detail-focus__history, .detail-focus__followup {
    grid-column: 1; grid-row: auto; }
  .detail-focus__body > .card + .card { border-left: 0 !important;
    border-top: 1px solid var(--n-200); }
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .detail-aside { position: static; }
}

/* 联系方式 */
.contact-grid { display: grid; gap: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.contact__label { font-size: var(--fs-xs); color: var(--n-500); }
/* 号码是这页真正要被读出来的东西，21px 她嫌小。提到 27px（比正文大两档）。 */
.contact__value { margin-top: var(--sp-1); font-family: var(--font-mono);
  font-size: var(--fs-2xl); font-weight: 600; letter-spacing: .04em;
  color: var(--n-900); word-break: break-all; }
/* 脱敏态刻意做淡：一眼能看出「这不是全号」，避免客服照着 138****8888 拨出去。
   但只做淡一档（n-600），不能淡到看不清——她本人也要读这个号。 */
.contact__value.is-masked { color: var(--n-600); }
.contact__actions { display: flex; gap: var(--sp-2); margin-top: var(--sp-3); flex-wrap: wrap; }
.contact__line { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3); min-width: 0; }
.contact__line .contact__value { margin-top: 0; min-width: 0; }
.contact__line .contact__actions { margin-top: 0; }
/* 同意留痕是给客户答疑时要说出口的一句话，不是内部备注：字号比联系方式小一档，
   但不能弱化成灰色注释——客服被问「我什么时候同意过」时，这行就是答案。 */
.contact__consent { margin-top: var(--sp-3); padding-top: var(--sp-3);
  border-top: 1px solid var(--n-200); font-size: var(--fs-sm); color: var(--n-600); }
.contact-nav__button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-1);
  min-height: 44px; padding: 0 var(--sp-3);
  border: 1px solid var(--n-300); border-radius: var(--r-md);
  color: var(--n-700); background: var(--n-0); text-decoration: none;
  font-size: var(--fs-sm); font-weight: 600; white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.contact-nav__button:hover {
  border-color: var(--brand-500); color: var(--brand-700); background: var(--brand-50);
}
.contact-nav__button.is-disabled {
  color: var(--n-500); background: var(--n-100); border-color: var(--n-200);
  cursor: not-allowed;
}
.contact-nav__button.is-disabled:hover {
  color: var(--n-500); background: var(--n-100); border-color: var(--n-200);
}
.contact-nav__button:focus-visible {
  outline: 2px solid var(--brand-500); outline-offset: 2px;
}
.contact-nav__button .ico { width: 18px; height: 18px; }

/* 阶段选择胶囊。用原生 radio + 兄弟选择器，键盘可达、无 JS 状态 */
.chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip__label { display: inline-flex; align-items: center; height: 30px;
  padding: 0 var(--sp-3); font-size: var(--fs-sm); color: var(--n-600);
  background: var(--n-0); border: 1px solid var(--n-300);
  border-radius: var(--r-full); cursor: pointer; }
.chip__label:hover { border-color: var(--brand-500); color: var(--brand-ink); }
.chip input:checked + .chip__label { background: var(--brand-500);
  border-color: var(--brand-500); color: #fff; font-weight: 500; }
.chip input:focus-visible + .chip__label { outline: 2px solid var(--brand-500); outline-offset: 2px; }

/* 底部条「阶段」按钮滚到打标面板时的短暂高亮，告诉用户「就是这一块」 */
[data-stage-form].is-flash {
  box-shadow: 0 0 0 3px var(--brand-500); transition: box-shadow .3s; }

/* 只读信息表：左列定宽，右列可折行 */
.info-list { display: flex; flex-direction: column; gap: var(--sp-2); font-size: var(--fs-base); }
.info-list__row { display: flex; gap: var(--sp-3); }
.info-list__key { width: 96px; flex-shrink: 0; color: var(--n-500); }
.info-list__val { min-width: 0; color: var(--n-700); word-break: break-all; }

.detail-history-count { color: var(--n-500); font-size: var(--fs-xs); }
.follow-status {
  display: flex; gap: var(--sp-5); flex-wrap: wrap;
  border-bottom: 1px solid var(--n-200);
}
.follow-status > div { display: flex; flex-direction: column; gap: var(--sp-1); min-width: 150px; }
.follow-status__label { color: var(--n-500); font-size: var(--fs-xs); }
.follow-status strong { color: var(--n-800); font-size: var(--fs-base); font-weight: 600; }
.timeline__next { margin-top: var(--sp-1); color: var(--brand-ink); }
.profile-summary {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-4) var(--sp-5); margin: 0;
}
.profile-summary > div { min-width: 0; }
.profile-summary dt { color: var(--n-500); font-size: var(--fs-xs); }
.profile-summary dd { margin: var(--sp-1) 0 0; color: var(--n-800); overflow-wrap: anywhere; }
.profile-edit { margin-top: var(--sp-5); border-top: 1px solid var(--n-200); }
.profile-edit > summary {
  display: flex; align-items: center; gap: var(--sp-1);
  width: fit-content; min-height: 36px;
  color: var(--brand-700); font-weight: 600; cursor: pointer;
}
.profile-edit > summary svg { width: 16px; height: 16px; }
.profile-edit[open] > summary svg { transform: rotate(180deg); }
.profile-edit__body { padding-top: var(--sp-3); }

.profile-dialog {
  width: min(620px, calc(100vw - 32px)); max-width: none; margin: auto;
  padding: 0; border: 1px solid var(--n-200); border-radius: var(--r-lg);
  background: var(--n-0); box-shadow: var(--sh-3); overflow: hidden;
}
.profile-dialog::backdrop { background: rgba(15, 23, 42, .45); }
.profile-dialog__header {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-5); border-bottom: 1px solid var(--n-200);
}
.profile-dialog__title { color: var(--n-900); font-size: var(--fs-lg); font-weight: 600; }
.profile-dialog__sub { margin-top: var(--sp-1); color: var(--n-500); font-size: var(--fs-sm); }
.profile-dialog__header .icon-btn { margin-left: auto; flex: none; }
.profile-dialog__body { padding: var(--sp-5); }
.profile-dialog__footer {
  display: flex; justify-content: flex-end; gap: var(--sp-2);
  margin-top: var(--sp-5); padding-top: var(--sp-4);
  border-top: 1px solid var(--n-200);
}

.detail-followup__header { display:flex; align-items:center; justify-content:space-between; gap:var(--sp-3); }
.voice-followup { width:min(720px, calc(100vw - 32px)); max-height:88vh; padding:0; border:0;
  min-width:0; max-width:calc(100vw - 32px); border-radius:var(--r-xl);
  background:var(--n-0); box-shadow:var(--sh-4); overflow:hidden; overflow-x:hidden; }
.modal-open { overflow:hidden !important; }
html.modal-open { overscroll-behavior:none; }
.voice-followup__body { scrollbar-width:thin; }
.voice-followup__body::-webkit-scrollbar { width:5px; height:0; }
.voice-followup__body::-webkit-scrollbar-thumb { background:var(--n-300); border-radius:4px; }
.voice-followup__body::-webkit-scrollbar-track { background:transparent; }
.voice-followup__raw { min-width:0; }
.voice-followup__raw summary { padding:8px 0; font-weight:600; color:var(--n-700); cursor:pointer; }
.voice-followup__raw textarea, .voice-followup__preview textarea {
  overflow:hidden; resize:none; white-space:pre-wrap; overflow-wrap:anywhere; }
.voice-followup__footer { flex:none; display:flex; gap:12px; padding:16px 20px;
  border-top:1px solid var(--n-200); background:var(--n-0); }
.voice-followup__footer .btn { flex:1; min-width:0; min-height:44px; }
.voice-followup::backdrop { background:rgba(15,23,42,.52); }
.voice-followup[open] { display:flex; flex-direction:column; }
.voice-followup__header { flex:none; }
.voice-followup__body { min-height:0; flex:1; }
.voice-followup__body > * { flex-shrink:0; }
.voice-followup__body .btn { min-height:44px; }
.voice-followup__recording { display:flex; align-items:center; flex-wrap:wrap; gap:12px; color:var(--n-700); }
.voice-followup__recording meter { width:112px; height:18px; }
.voice-followup__audio-actions { display:flex; flex-wrap:wrap; gap:8px; }
.voice-followup__audio-actions .btn { min-height:44px; cursor:pointer; }
.voice-followup__header { display:flex; align-items:flex-start; gap:var(--sp-3); padding:var(--sp-5); border-bottom:1px solid var(--n-200); }
.voice-followup__header .icon-btn { margin-left:auto; flex:none; }
.voice-followup__title { color:var(--n-900); font-size:var(--fs-lg); font-weight:700; }
.voice-followup__body { display:flex; flex-direction:column; gap:var(--sp-3); padding:var(--sp-5);
  min-width:0; overflow-y:auto; overflow-x:hidden; overscroll-behavior:contain; }
.voice-followup__body > *, .voice-followup__preview, .voice-followup__preview .filter-grid,
.voice-followup__preview .field { min-width:0; max-width:100%; }
.voice-followup__body .input, .voice-followup__body .textarea, .voice-followup__body .select {
  min-width:0; max-width:100%; }
.voice-followup__input-row { display:flex; align-items:center; gap:var(--sp-3); }
.voice-followup__textarea { min-height:120px; }
.voice-followup__preview { display:flex; flex-direction:column; gap:var(--sp-3); padding-top:var(--sp-4); border-top:1px solid var(--n-200); }
.voice-followup__section-title { color:var(--n-800); font-weight:700; }
.voice-followup__updates { display:flex; flex-direction:column; gap:var(--sp-2); }
.voice-followup__update { display:grid; grid-template-columns:20px 110px minmax(0,1fr); align-items:center; gap:var(--sp-2); padding:var(--sp-2) var(--sp-3); border:1px solid var(--n-200); border-radius:var(--r-md); cursor:pointer; }
.voice-followup__update input { width:18px; height:18px; accent-color:var(--brand-500); }
.voice-followup__update-label { color:var(--n-600); font-size:var(--fs-sm); }
.voice-followup__update-value { color:var(--n-800); overflow-wrap:anywhere; }
.voice-followup__score { color:var(--brand-700); font-weight:700; }
.voice-followup__evidence { color:var(--n-600); font-size:var(--fs-sm); line-height:1.6; }

/* ---------- 漏斗视图 ---------- */

.funnel { display: grid; gap: var(--sp-3);
  grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1080px) { .funnel { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .funnel { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 整列是一个链接，所以 <a> 要清掉下划线与默认色 */
.funnel__col { display: flex; flex-direction: column; gap: var(--sp-1);
  padding: var(--sp-4); background: var(--n-0); border: 1px solid var(--n-200);
  border-radius: var(--r-lg); box-shadow: var(--sh-1);
  text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
.funnel__col:hover { border-color: var(--brand-500); box-shadow: var(--sh-2); }
.funnel__step { font-size: var(--fs-xs); color: var(--n-500); }
.funnel__label { font-size: var(--fs-sm); color: var(--n-600); }
.funnel__count { font-size: var(--fs-3xl); font-weight: 700; line-height: 1.1;
  color: var(--n-900); font-variant-numeric: tabular-nums; }
.funnel__amount { font-size: var(--fs-xs); color: var(--brand-ink); }
/* margin-top:auto 让占比条贴列底，六列即使文字行数不同也齐平 */
.funnel__bar { margin-top: auto; }

/* 结果条：成交 / 无效 / 流失 / 整体转化率。工作总结先看结果，再看推进链。
   （原来这里是一节「旁路终态」，虚线框灰底只摆两个数——同一个页面的快照口径，
   现在并进这一条里了。） */
.funnel-results { display: grid; gap: var(--sp-3);
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); }
.funnel-results__cell { display: flex; flex-direction: column; gap: 2px;
  padding: var(--sp-4); background: var(--n-100); border-radius: var(--r-lg); }
.funnel-results__cell > span { font-size: var(--fs-xs); color: var(--n-600); }
.funnel-results__cell > strong { font-size: var(--fs-2xl); font-weight: 700;
  line-height: 1.15; font-variant-numeric: tabular-nums; }
.funnel-results__cell > small { font-size: var(--fs-xs); color: var(--brand-ink); }

/* 全公司 / 到人 的切换：人多的时候自己横滑，不许带得整页横滑 */
.funnel-scope { margin-bottom: var(--sp-4); }

.ratio-grid { display: grid; gap: var(--sp-3);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: var(--sp-5); }
.ratio-card { padding: var(--sp-4); background: var(--n-0);
  border: 1px solid var(--n-200); border-radius: var(--r-lg); }
.ratio-card__label { font-size: var(--fs-xs); color: var(--n-500); }
.ratio-card__value { margin-top: var(--sp-1); font-size: var(--fs-2xl); font-weight: 700;
  color: var(--n-900); font-variant-numeric: tabular-nums; }

/* ---------- 员工页 ---------- */
/* 200px 的下限在 390 上只排得下一列，四张卡竖着堆到屏幕外、每张中间全是空白。
   150px 让主流手机排成 2×2，一屏看完四个率。 */
.metric-grid { display: grid; gap: var(--sp-3);
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.metric-card { padding: var(--sp-4); background: var(--n-0);
  border: 1px solid var(--n-200); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.metric-card__label { font-size: var(--fs-sm); color: var(--n-500); }
/* 值刻意用 --n-300 这种浅灰：一眼看出是「占位」而不是「算出来是 0」 */
.metric-card__value { margin-top: var(--sp-1); font-size: var(--fs-2xl); font-weight: 700;
  color: var(--n-300); font-variant-numeric: tabular-nums; }
.metric-card__hint { margin-top: var(--sp-1); font-size: var(--fs-xs); color: var(--n-500); }

/* ---------- 回传对账 ---------- */
/* 工具栏直接复用线索池的 .leads-toolbar：那组样式本身与线索无关，
   只是名字带 leads。改名会牵动列表页，收益不抵风险，记进收尾的技术债。 */
.cb-filter { display: flex; align-items: flex-end; gap: var(--sp-3);
  flex-wrap: wrap; padding: var(--sp-4) var(--sp-5); margin-bottom: var(--sp-4); }
.cb-filter .field { min-width: 180px; }
.cb-error { margin-top: var(--sp-1); font-size: var(--fs-xs);
  color: var(--danger-fg); word-break: break-all; max-width: 280px; }

/* ---------- 系统设置 ---------- */
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5); }
/* 窄屏一列。这里必须写 minmax(0, 1fr) 而不是 1fr：1fr 等价于 minmax(auto, 1fr)，
   auto 的最小值是 min-content，表格页在 390px 下会被撑到 542px，整页横向溢出。 */
@media (max-width: 1024px) { .settings-grid { grid-template-columns: minmax(0, 1fr); } }

/* 字典表与用户表列多、内容长，放半栏会把中文名和代码挤成三行。
   这两张表走整宽堆叠，与上面的「投放账户」表同宽同节奏。
   同理必须有 minmax(0, 1fr)：只写 display:grid 的话隐式列按 max-content 定宽，
   里面那张 min-width:940px 的表格会把这列撑到 542px 顶破整页。 */
.settings-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-5); margin-top: var(--sp-5); }

/* 凭证告警条：缺 Secret 时线索池手机号全是「—」，这条必须比页面其他内容更显眼 */
.settings-warn { display: flex; align-items: flex-start; gap: var(--sp-3); margin-bottom: var(--sp-5); }
.settings-warn__icon { flex: none; color: var(--warning); }
.settings-warn__list { margin: var(--sp-2) 0 0; padding-left: var(--sp-5); }
.settings-warn__list li { font-size: var(--fs-sm); line-height: 1.7; }

/* 账户表列多，窄屏横向滚动，不折行 */
.settings-table { min-width: 940px; }
.settings-form { display: grid; gap: var(--sp-3); }
/* 行内表单用 flex 而不是 auto-fit 网格：网格会把提交按钮也当成一列 1fr，
   整宽时按钮被拉成一整条。flex 让输入项吃掉剩余宽度、按钮只占自己那么宽。 */
.settings-form--inline { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: flex-end; }
.settings-form--inline .field { flex: 1 1 170px; min-width: 0; }
.settings-form--inline .btn { flex: 0 0 auto; }
/* 行内展开的编辑表单：底色压深一档，和只读行区分开 */
.settings-form--edit { margin-top: var(--sp-3); padding: var(--sp-4); background: var(--n-100);
  border-radius: var(--r-md); }
.settings-form--edit .settings-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.settings-summary { color: var(--brand-ink); cursor: pointer; font-size: var(--fs-sm); white-space: nowrap; }
.settings-summary:hover { color: var(--brand-700); }

/* 同步是长请求（多账户回溯要跑一两分钟）。这条提示常驻在按钮下方，
   把「正在跑、别重复点」说清楚，免得客服以为页面卡死又点一次。 */
.sync-progress { margin-top: var(--sp-4); padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-sm); color: var(--brand-ink);
  background: var(--brand-50); border-radius: var(--r-md); }

.sync-log { display: flex; flex-direction: column; gap: var(--sp-1); font-size: var(--fs-xs); }
.sync-log__row { display: flex; gap: var(--sp-3); align-items: baseline; }
.sync-log__time { color: var(--n-500); font-variant-numeric: tabular-nums; }

/* ---------- 线索详情 P2：沟通记录 / AI 分析 / 军师作战卡 ---------- */
/* 六个标签在窄屏会顶到卡片边。原先允许换行，但换行后第二行没有下划线做视觉连接，
   「军师作战卡」孤零零掉在下面，看着像布局坏了。改成单行横向滚动：保持一行、
   保留滑动惯性、隐藏滚动条，这是移动端标签条的通行做法。
   padding-bottom 是给 .is-active 那条 bottom:-1px 的下划线留位置——overflow 一旦
   不是 visible，超出内容盒的部分会被裁掉，不留这 2px 下划线就没了。 */
.detail .tabs {
  flex-wrap: nowrap; padding-bottom: 2px;
  overflow-x: auto; overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.detail .tabs::-webkit-scrollbar { display: none; }
.detail .tabs__item { flex: none; white-space: nowrap; }

.chat-toolbar, .ai-toolbar, .advisor-toolbar {
  margin-left: auto; display: flex; align-items: center; justify-content: flex-end;
  gap: var(--sp-2) var(--sp-3); flex-wrap: wrap; min-width: 0; }
.chat-toolbar__stats, .ai-toolbar__hint { font-size: var(--fs-xs); color: var(--n-500); }

/* 导入区：底色压深一档，和下面的消息列表分开 */
.chat-import { padding: var(--sp-4) var(--sp-5); background: var(--n-100);
  border-bottom: 1px solid var(--n-200); }
.chat-import__foot { display: flex; justify-content: flex-end; margin-top: var(--sp-4); }

.chat-list { display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; }
.chat-msg { padding: var(--sp-3) var(--sp-4); min-width: 0;
  background: var(--n-0); border: 1px solid var(--n-200); border-radius: var(--r-md); }
/* 我方消息用品牌浅底：一屏里「谁说的」比内容更先要看清 */
.chat-msg--out { background: var(--brand-50); border-color: var(--brand-100); }
.chat-msg__head { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.chat-msg__time { font-size: var(--fs-xs); color: var(--n-500); font-variant-numeric: tabular-nums; }
.chat-msg__sender { font-size: var(--fs-sm); font-weight: 500; color: var(--n-700); }
.chat-msg__body { margin-top: var(--sp-2); font-size: var(--fs-base); color: var(--n-800);
  line-height: 1.7; white-space: pre-wrap; word-break: break-word; }

.ai-warn, .advisor-warn { margin: var(--sp-5) var(--sp-5) 0; }
.ai-progress { margin: var(--sp-4) var(--sp-5) 0;
  font-size: var(--fs-sm); color: var(--brand-ink); }

.ai-list, .advisor-list { display: flex; flex-direction: column; gap: var(--sp-4); min-width: 0; }
.ai-item, .advisor-item { padding: var(--sp-4); min-width: 0;
  border: 1px solid var(--n-200); border-radius: var(--r-md); }
.ai-item__head, .advisor-item__head {
  display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.ai-item__time, .advisor-item__time {
  font-size: var(--fs-xs); color: var(--n-500); font-variant-numeric: tabular-nums; }
.ai-item__score { margin-left: auto; font-size: var(--fs-2xl); font-weight: 700; line-height: 1;
  color: var(--brand-ink); font-variant-numeric: tabular-nums; }
.ai-item__score span { margin-left: var(--sp-1); font-size: var(--fs-xs);
  font-weight: 500; color: var(--n-500); }
.ai-item__summary, .advisor-item__body { margin-top: var(--sp-2); font-size: var(--fs-base);
  color: var(--n-800); line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.ai-item__alert, .advisor-item__alert { margin-top: var(--sp-3); }

.ai-block { margin-top: var(--sp-3); }
.ai-block__label { font-size: var(--fs-xs); color: var(--n-500); }
.ai-block__list { margin: var(--sp-1) 0 0; padding-left: var(--sp-5);
  font-size: var(--fs-base); color: var(--n-700); line-height: 1.7; }
.ai-lines { display: flex; flex-direction: column; gap: var(--sp-1); margin-top: var(--sp-3); }
.ai-line { font-size: var(--fs-base); color: var(--n-700); line-height: 1.6; }
.ai-line__key { color: var(--n-500); }
.ai-line__val { word-break: break-word; }

.advisor-ask { padding: var(--sp-4) var(--sp-5); background: var(--n-100);
  border-bottom: 1px solid var(--n-200); }
.advisor-ask__foot { display: flex; align-items: center; justify-content: flex-end;
  gap: var(--sp-3); margin-top: var(--sp-3); flex-wrap: wrap; }
.advisor-ask__hint { font-size: var(--fs-sm); color: var(--brand-ink); }
.advisor-item__q { margin-top: var(--sp-2); font-size: var(--fs-sm);
  color: var(--n-500); line-height: 1.6; word-break: break-word; }



/* ==========================================================================
   2026-09-25 两端闭环改造：线索池就地打标 + 详情页移动端跟进。
   ========================================================================== */

/* ---------- 列表页：桌面端就地打标 ----------
   一个下拉替代「进详情 → 打标 → 等刷新 → 返回列表」四步。
   样式做成胶囊大小，视觉上仍是「阶段标签」，但可点。 */
.stage-quick {
  width: auto; min-width: 92px; height: 28px; padding: 0 var(--sp-2);
  font-size: var(--fs-xs); font-weight: 500; border-radius: var(--r-full);
  color: var(--n-700); background: var(--n-100); border-color: transparent;
  cursor: pointer;
}
.stage-quick:hover { border-color: var(--n-300); }
.stage-quick:disabled { opacity: .6; cursor: progress; }

/* ---------- 列表页：移动端卡片快捷操作 ----------
   卡片模式下每行底部多一条操作带。桌面端不显示（桌面用批量栏 + 就地打标）。 */
.lead-card-actions { display: none; }
/* 整列在桌面端不占位：不然 11 个 td 配 10 个 th，表头宽度会被拉开 */
.lead-card-actions-cell { display: none; }



/* ---------- 详情页：移动端底部操作条 ----------
   详情页在窄屏是一长条（六个标签页 + 右侧 aside 落到最底部），
   打完电话要往下滚很久才能记录跟进。这条把三个主操作钉在拇指区。 */


/* 跟进抽屉里的「常用话术」：一行一条，点了填进备注框 */
.sheet-quotes { display: flex; flex-direction: column; gap: var(--sp-2); }

/* ---------- 窄屏：预设视图条横向滚动 ----------
   线索池顶部有 7 个预设视图，390px 下容器只有 358px。默认的 inline-flex 会把
   每个标签压到内容宽度以下，「全部」被拆成上下两行、「待分配」拆成三行。
   改法同详情页标签条：单行 + 横向滚动，标签本身不参与收缩。 */




/* ---------- 个人信息处理规则（公开，无需登录） ---------- */
/* 这页主要在手机上被读，所以用流式字号与间距，不再新增断点。 */
.policy {
  max-width: 72ch; margin: 0 auto;
  padding: clamp(var(--sp-6), 5vw, var(--sp-16)) clamp(var(--sp-4), 5vw, var(--sp-8));
  color: var(--n-700); line-height: 1.85;
}
.policy__h1 { font-size: var(--fs-3xl); font-weight: 800; letter-spacing: -0.5px;
  color: var(--n-900); margin: 0 0 var(--sp-2); }
.policy__meta { font-size: var(--fs-sm); color: var(--n-500); margin: 0 0 var(--sp-6);
  padding-bottom: var(--sp-4); border-bottom: 1px solid var(--n-200); }
.policy__lead { font-size: var(--fs-md); color: var(--n-600); margin: 0 0 var(--sp-8); }
.policy__h2 { font-size: var(--fs-lg); font-weight: var(--fw-bold); color: var(--n-900);
  letter-spacing: -0.2px; margin: var(--sp-10) 0 var(--sp-3); }
.policy__p { margin: 0 0 var(--sp-3); }
.policy__ul { margin: 0 0 var(--sp-4); padding-left: var(--sp-6); }
.policy__ul li { margin-bottom: var(--sp-2); }
.policy strong { color: var(--n-900); font-weight: var(--fw-bold); }
.policy code { font-size: var(--fs-sm); background: var(--n-100);
  padding: 1px var(--sp-2); border-radius: var(--r-xs); }
.policy__table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm);
  margin: 0 0 var(--sp-4); }
.policy__table th, .policy__table td { text-align: left; padding: var(--sp-3) var(--sp-2);
  border-bottom: 1px solid var(--n-200); vertical-align: top; }
.policy__table th { color: var(--n-600); font-weight: var(--fw-semibold); }
.policy__foot { margin-top: var(--sp-10); padding-top: var(--sp-4);
  border-top: 1px solid var(--n-200); font-size: var(--fs-sm); color: var(--n-500); }
.policy__link { color: var(--brand-ink); }

/* ---------- 公开获客表单的同意勾选 ---------- */
.form-consent { display: flex; align-items: flex-start; gap: var(--sp-2);
  margin: var(--sp-4) 0 var(--sp-2); font-size: var(--fs-sm); line-height: 1.6;
  text-align: left; color: var(--n-600); cursor: pointer; }
.form-consent input { margin-top: 3px; width: 17px; height: 17px; flex: none;
  accent-color: var(--brand-600); }
.form-consent a { color: var(--brand-ink); text-decoration: underline; }

/* ---------- 今日工作台 ---------- */
.today-hero {
  background: var(--n-0); border: 1px solid var(--n-200); border-radius: var(--r-lg);
  padding: var(--sp-5) var(--sp-6) var(--sp-6); margin-bottom: var(--sp-6);
  box-shadow: var(--sh-2);
}
.today-hero__head { display: flex; align-items: baseline; gap: var(--sp-4); }
.today-hero__num { font-variant-numeric: tabular-nums; line-height: 1; }
.today-hero__num b { font-size: var(--fs-4xl); font-weight: 800; letter-spacing: -1px; color: var(--n-900); }
.today-hero__num span { font-size: var(--fs-lg); font-weight: 600; color: var(--n-400); margin-left: 2px; }
.today-hero__label { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--n-600); }
.today-hero__left { font-size: var(--fs-sm); color: var(--n-500); margin-top: 2px; }
.today-hero__bar { height: 6px; margin-top: var(--sp-4); border-radius: var(--r-full);
  background: var(--n-200); overflow: hidden; }
.today-hero__bar i { display: block; height: 100%; border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--brand-600), var(--brand-800));
  transition: width var(--transition-slow); }

/* 卡片区块头里的行动提示 */
.card__hint { font-size: var(--fs-sm); color: var(--n-500); margin-left: var(--sp-2); }
.log-view-tabs { margin-bottom: var(--sp-4); }
.log-view-tabs .tabs__item { text-decoration: none; }
.log-row__summary {
  max-width: 520px;
  margin-top: 3px;
  white-space: normal;
  overflow-wrap: anywhere;
}
/* 按天分段：整张表 100 行不留分隔就是一堵墙，插一条浅色日期条，读起来是「今天做了什么」 */
.log-day td {
  padding-top: var(--sp-4) !important;
  padding-bottom: 6px !important;
  background: transparent !important;
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .04em;
  color: var(--n-600); border-bottom: 0 !important;
}
.log-day:first-child td { padding-top: 0 !important; }
.today-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.today-card {
  display: flex; align-items: flex-start; gap: var(--sp-4);
  border: 1px solid var(--n-200); border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-5); background: var(--n-0);
  box-shadow: var(--sh-2);
  transition: box-shadow .16s ease, transform .16s ease, border-color .16s ease;
}
.today-card:hover { box-shadow: var(--sh-3); transform: translateY(-1px); border-color: var(--n-300); }
.today-card__body { flex: 1; min-width: 0; }

/* 时间列：约几点决定先打谁，所以它排在姓名左边，而不是埋在整行最后 */
.today-card__when {
  flex: none; width: 66px; padding-top: 2px; text-align: right;
  font-size: var(--fs-base); font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums; color: var(--n-600);
  border-right: 1px solid var(--n-200);
}
.today-card__when--late { color: var(--danger); }
.today-card__unbook { font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--n-400); }

/* 超期不再整张涂红：左列红字已经够醒目，通铺底色会让一屏全是红，
   反而看不出哪条最急。只在左侧留一道迅速衰减的浅红。 */
.today-card--overdue {
  border-color: var(--danger-bg);
  background: linear-gradient(90deg, var(--danger-bg) 0%, var(--n-0) 110px);
}
.today-card__head { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.today-card__name { font-weight: var(--fw-bold); color: var(--n-900); font-size: var(--fs-lg); text-decoration: none; }
.today-card__name:hover { color: var(--brand-ink); }
.today-card__meta {
  display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5);
  color: var(--n-600); font-size: var(--fs-sm); margin: var(--sp-2) 0 var(--sp-3);
}
.today-card__contact { font-variant-numeric: tabular-nums; color: var(--n-700); }
/* 客户列：姓名主角 + 线索 ID 小字（桌面列表同样生效） */
.lc-name-main { display: block; font-weight: 600; color: var(--n-900); text-decoration: none; }
.lc-name-main:hover { color: var(--brand-ink); }
.lc-clue { font-size: var(--fs-xs); color: var(--n-500); }
/* 留资标记：多次留资悬停看上次归属 */
.lc-flag { margin-left: var(--sp-2); vertical-align: middle; cursor: help; }
/* ---------- 管道看板 ---------- */
.board {
  display: flex; gap: var(--sp-3); overflow-x: auto; padding-bottom: var(--sp-4);
  align-items: flex-start;
}
.board-col {
  flex: 0 0 220px; display: flex; flex-direction: column;
  background: var(--n-0); border: 1px solid var(--n-200); border-radius: var(--r-lg);
  max-height: calc(100vh - 200px);
}
.board-col--side { opacity: .92; }
.board-col__head {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--n-200);
}
.board-col__title { font-weight: 600; color: var(--n-800); font-size: var(--fs-sm); }
.board-col__body {
  display: flex; flex-direction: column; gap: var(--sp-2);
  padding: var(--sp-3); overflow-y: auto; min-height: 120px;
}
.board-col__body.is-over {
  background: var(--brand-50); border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.board-card {
  padding: var(--sp-3); border: 1px solid var(--n-200); border-radius: var(--r-md);
  background: var(--n-0); box-shadow: var(--sh-1); cursor: grab;
}
.board-card.is-dragging { opacity: .5; }
.board-card__top { display: flex; align-items: center; gap: var(--sp-2); }
.board-card__name {
  flex: 1; min-width: 0; font-weight: 600; color: var(--n-900); text-decoration: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.board-card__move { flex: none; height: 24px; padding: 0 var(--sp-2); font-size: var(--fs-xs); }
.board-card__meta {
  display: flex; gap: var(--sp-3); margin-top: var(--sp-2);
  font-size: var(--fs-xs); color: var(--n-500);
}
.board-card__owner { margin-left: auto; color: var(--brand-ink); }
.board-more {
  display: block; text-align: center; padding: var(--sp-2);
  font-size: var(--fs-xs); color: var(--brand-ink);
}
.board-empty {
  padding: var(--sp-5) 0; text-align: center;
  color: var(--n-500); font-size: var(--fs-xs);
}
/* 详情页：返回条、联系方式内的线索切换、归属操作 */
.detail-hero__bar { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
/* 名字行里现在有：称呼、客户档案、合作/更多、公客/阶段/等级徽章。窄屏必须能换行，
   否则要么把名字挤成竖排单字，要么让徽章重叠。
   flex-shrink 归零：名字一缩就会被徽章挤成竖排单字，宁可让徽章换行。 */
.detail-hero__name-row { flex: 1 1 auto; min-width: 0; flex-wrap: wrap;
  row-gap: var(--sp-2); }
.detail-hero__name { min-width: 0; max-width: 100%; flex: 0 0 auto; overflow-wrap: anywhere; }
.detail-hero__actions {
  display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3);
}
/* 来源标签（主播 / 计划）与跟进人 */
.lc-tags {
  display: flex; flex-wrap: wrap; gap: var(--sp-1); margin-top: var(--sp-1);
}
.tag {
  display: inline-block; max-width: 160px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; padding: 1px var(--sp-2); border-radius: var(--r-full);
  font-size: var(--fs-xs); line-height: 1.6; vertical-align: middle;
}
.tag--source { background: var(--brand-50); color: var(--brand-700); }
.tag--mute { background: var(--n-100); color: var(--n-500); }
.lc-owner { color: var(--brand-ink); font-weight: 600; }
/* 保存视图 chips */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px var(--sp-2); border-radius: var(--r-full);
  border: 1px solid var(--n-200); background: var(--n-0);
  font-size: var(--fs-xs); color: var(--n-600); cursor: pointer;
}
.chip:hover { border-color: var(--brand-500); color: var(--brand-ink); }
.chip__x { color: var(--n-500); font-weight: 700; padding: 0 2px; }
.chip__x:hover { color: var(--danger); }

/* 数据大屏 */
.screen {
  background: linear-gradient(160deg, #0B1220 0%, #121A2E 60%, #0F172A 100%);
  border-radius: var(--r-lg); padding: var(--sp-6); color: var(--n-200);
  min-height: calc(100vh - 140px);
  /* 大屏是深底：纸上的暖灰 --n-500 压在 #0B1220 上只有 2.7:1，
     投到展厅电视上等于没有。大屏自己的次级文字改用冷灰（约 6.4:1）。 */
  --screen-dim: #9AA3B2;
}
.screen-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--sp-4); }
.screen-kpi {
  padding: var(--sp-5); border-radius: var(--r-lg); text-align: center;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
}
.screen-kpi__value { font-size: 40px; font-weight: 700; line-height: 1.1; color: #fff;
  font-variant-numeric: tabular-nums; }
.screen-kpi__label { margin-top: var(--sp-2); font-size: var(--fs-sm); color: var(--screen-dim); }
.screen-kpi--brand .screen-kpi__value { color: var(--brand-300); }
.screen-kpi--danger .screen-kpi__value { color: #F87171; }
.screen-kpi--warn .screen-kpi__value { color: #FBBF24; }
.screen-kpi--ok .screen-kpi__value { color: #34D399; }
.screen-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--sp-4); margin-top: var(--sp-5);
}
.screen-grid--followup { grid-template-columns: 1fr 1.4fr; }
.screen-panel {
  padding: var(--sp-5); border-radius: var(--r-lg);
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
}
.screen-panel__title { font-size: var(--fs-lg); color: #fff; margin-bottom: var(--sp-4); }
.screen-bar { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.screen-bar__label { width: 90px; font-size: var(--fs-sm); color: var(--n-300); }
.screen-bar__track { flex: 1; height: 12px; border-radius: var(--r-full);
  background: rgba(255,255,255,.08); overflow: hidden; }
.screen-bar__fill { height: 100%; border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--brand-500), var(--brand-300)); }
.screen-bar__num { width: 36px; text-align: right; font-weight: 600; color: #fff; }
.screen-rank { margin: 0; padding: 0; list-style: none; }
.screen-rank__item {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-2) 0; border-bottom: 1px solid rgba(255,255,255,.06);
}
.screen-rank__item.is-top .screen-rank__no { color: var(--brand-300); }
.screen-rank__no { width: 28px; font-weight: 700; color: var(--n-500); }
.screen-rank__name { flex: 1; color: #fff; }
.screen-rank__meta { color: var(--screen-dim); font-size: var(--fs-xs); white-space: nowrap; }
.screen-rank__score { font-weight: 700; color: var(--brand-300);
  font-variant-numeric: tabular-nums; }
.screen-followups { display: grid; gap: var(--sp-1); }
.screen-followup {
  display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) 0;
  color: inherit; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.06);
}
.screen-followup:hover .screen-followup__main strong { color: var(--brand-300); }
.screen-followup__time { width: 42px; color: var(--screen-dim); font-size: var(--fs-xs); }
.screen-followup__main { min-width: 0; display: grid; gap: 2px; }
.screen-followup__main strong,
.screen-followup__main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.screen-followup__main strong { color: #fff; font-size: var(--fs-sm); }
.screen-followup__main small { color: var(--screen-dim); font-size: var(--fs-xs); }
.screen-spark { display: flex; align-items: flex-end; gap: 4px; height: 160px; }
.screen-spark__col { flex: 1; background: rgba(255,255,255,.06); border-radius: 3px;
  height: 100%; display: flex; align-items: flex-end; }
.screen-spark__fill { width: 100%; border-radius: 3px 3px 0 0; min-height: 2px;
  background: linear-gradient(180deg, var(--brand-300), var(--brand-500)); }
.screen-note { margin: var(--sp-3) 0 0; color: var(--screen-dim); font-size: var(--fs-sm); }
.screen-foot { margin: var(--sp-4) 0 0; text-align: center; color: var(--screen-dim); font-size: var(--fs-xs); }
@media (max-width: 900px) {
  .screen-kpis { grid-template-columns: repeat(2, 1fr); }
  .screen-grid, .screen-grid--followup { grid-template-columns: 1fr; }
}
/* 手机端补齐：看板列宽、保存视图换行、大屏指标 */

/* 本周日程 */
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--sp-2); }
.cal-day {
  background: var(--n-0); border: 1px solid var(--n-200); border-radius: var(--r-md);
  min-height: 180px; display: flex; flex-direction: column;
}
.cal-day.is-today { border-color: var(--brand-500); box-shadow: 0 0 0 1px var(--brand-500); }
.cal-day__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-2); border-bottom: 1px solid var(--n-200);
  font-size: var(--fs-xs); color: var(--n-600);
}
.cal-day__body { padding: var(--sp-2); display: flex; flex-direction: column; gap: var(--sp-2); }
.cal-item {
  display: block; padding: var(--sp-2); border-radius: var(--r-sm);
  background: var(--brand-50); text-decoration: none; border-left: 3px solid var(--brand-500);
}
.cal-item__time { font-size: var(--fs-xs); color: var(--brand-700); font-weight: 600; }
.cal-item__name { font-size: var(--fs-sm); font-weight: 600; color: var(--n-900); }
.cal-item__sub { font-size: var(--fs-xs); color: var(--n-500); }
.cal-empty { text-align: center; color: var(--n-300); font-size: var(--fs-xs); padding: var(--sp-4) 0; }
.screen-target { display: flex; align-items: baseline; gap: var(--sp-3); font-size: var(--fs-xl); color: #fff; }
.screen-target__num { font-weight: 700; color: var(--brand-300); font-size: 32px; }
.screen-target__pct { font-weight: 700; color: var(--brand-300); }
.screen-target__pct.is-ok { color: #34D399; }

/* 催客话术条 */
.chase-item {
  position: relative; padding: var(--sp-3) var(--sp-8) var(--sp-3) var(--sp-3);
  border: 1px solid var(--n-200); border-radius: var(--r-md); background: var(--n-0);
}
.chase-item__title { font-size: var(--fs-sm); font-weight: 600; color: var(--brand-700); }
.chase-item__text { font-size: var(--fs-sm); color: var(--n-700); line-height: 1.6; margin-top: 2px; }
.chase-item .btn { position: absolute; top: var(--sp-3); right: var(--sp-3); }

.call-script__toolbar { display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.call-script__list { display: grid; gap: var(--sp-2); }
.call-script__list .chase-item { padding-right: 52px; }
.call-script__list .icon-btn { position: absolute; top: var(--sp-2); right: var(--sp-2); }
.call-script__notice { margin: var(--sp-2) 0 0; font-size: var(--fs-xs); color: var(--n-500); }
.script-editor { max-width: 760px; }
.script-editor__head, .script-editor__heading { display: flex; align-items: center;
  justify-content: space-between; gap: var(--sp-3); }
.script-editor__head { margin-bottom: var(--sp-4); }
.script-editor__head h1 { font-size: var(--fs-xl); }
.script-editor__heading h2 { font-size: var(--fs-base); }
.script-editor__section { padding: var(--sp-4) 0; border-top: 1px solid var(--n-200); }
.script-editor__section .textarea { width: 100%; min-height: 110px; margin-top: var(--sp-2); }

/* ==========================================================================
   2026-09-27 移动端体感改造：称呼闭环 + 触控目标 + 无限滚动。
   ========================================================================== */

/* ---------- 称呼闭环：未命名客户的「点此命名」入口 ----------
   「新进入未命名」是占位而不是数据，所以做成淡灰待办态；
   旁边挂一个小胶囊入口，点一下就地把称呼补上，不用先进详情页。
   .lc-name-block 是外层容器：块级 flex + 换行。桌面端姓名和入口同占一行，
   不给每一行白加一行高度；窄屏入口会宽度 100% 自己换到下一行。
   必须是块级（display:flex 而非 inline-flex）：inline-flex 时姓名会和
   后面的意向分徽章挤到同一行，那是另一套排版。 */
.lc-name-block {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--sp-1) var(--sp-2); min-width: 0;
}
.lc-name-main--todo { color: var(--n-500); font-weight: 500; }
.today-card__name--todo { color: var(--n-500); }
.lc-name-cta {
  display: inline-flex; align-items: center; justify-content: center;
  height: 22px; padding: 0 var(--sp-2);
  font-size: var(--fs-xs); font-weight: 500; line-height: 1;
  color: var(--brand-700); background: var(--brand-50);
  border: 1px dashed var(--brand-500); border-radius: var(--r-full);
  cursor: pointer; white-space: nowrap;
}
.lc-name-cta:hover { background: var(--brand-500); border-style: solid; color: #fff; }
.lc-name-input { width: 100%; max-width: 260px; margin-top: var(--sp-1); }

/* ---------- 线索池无限滚动 ----------
   桌面端不显示：一屏 20 条，翻页比滚动快，保留分页条。
   窄屏一屏只放得下两三张卡，翻页得先滚到底再点「下一页」，很别扭，
   所以滚到底自动续上。默认 display:none 也让 IntersectionObserver
   在桌面端永远不会触发——它对不可见元素不回调。
   窄屏那半边（显示 .leads-more、让分页条退场）在 mobile.css。 */
.leads-more { display: none; }

/* 本节新增元素的窄屏形态（触控目标、命名入口整行化、无限滚动开关、
   行选择框命中区）统一收在 mobile.css，本文件只留桌面基准。 */

/* 已流失客户回捞：统计是页面带，客户才是可重复操作的卡片。 */
.recovery-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--sp-4); margin-bottom: var(--sp-6);
}
.recovery-head h1 { margin: 0; font-size: var(--fs-2xl); color: var(--n-900); }
.recovery-head p { margin: var(--sp-2) 0 0; color: var(--n-600); }
.recovery-summary {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--n-200); border-bottom: 1px solid var(--n-200);
  margin-bottom: var(--sp-8);
}
.recovery-summary > div {
  display: flex; align-items: baseline; flex-wrap: wrap;
  gap: var(--sp-2); padding: var(--sp-4) 0;
}
.recovery-summary > div + div { padding-left: var(--sp-6); border-left: 1px solid var(--n-200); }
.recovery-summary span { color: var(--n-600); }
.recovery-summary strong { font-size: var(--fs-2xl); color: var(--n-900); }
.recovery-summary small { color: var(--n-500); }
.recovery-list__heading {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--sp-3); margin-bottom: var(--sp-3);
}
.recovery-list__heading h2 { font-size: var(--fs-lg); margin: 0; }
.recovery-list__heading span, .recovery-item__meta { color: var(--n-500); font-size: var(--fs-sm); }
.recovery-item {
  padding: var(--sp-4); margin-bottom: var(--sp-3);
  border: 1px solid var(--n-200); border-radius: var(--r-sm);
  background: var(--n-0);
}
.recovery-item__head { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2); }
.recovery-item__name { color: var(--n-900); font-size: var(--fs-lg); font-weight: 700; }
.recovery-item__meta { margin: var(--sp-2) 0 var(--sp-3); }
.recovery-item__script {
  padding: var(--sp-3); background: var(--n-100);
  border-left: 3px solid var(--info); border-radius: var(--r-sm);
}
.recovery-item__script span { color: var(--n-500); font-size: var(--fs-xs); }
.recovery-item__script p { margin: var(--sp-1) 0 0; line-height: 1.6; overflow-wrap: anywhere; }
.recovery-item__actions {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3);
}

/* 投放质量：读数为主，保留密集表格；窄屏在 mobile.css 转为逐计划对照。 */
.quality-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--sp-4); margin-bottom: var(--sp-4);
}
.quality-head h1 { margin: 0; font-size: var(--fs-xl); color: var(--n-900); }
.quality-head p { margin: var(--sp-2) 0 0; color: var(--n-600); font-size: var(--fs-sm); }
.quality-head .segmented { flex: none; }
.quality-summary {
  display: flex; flex-wrap: wrap; gap: var(--sp-3);
  padding: var(--sp-3) 0; border-top: 1px solid var(--n-200);
  color: var(--n-700); font-weight: 600;
}
.quality-summary__warn { color: var(--warning-fg); font-weight: 500; }
.quality-table { width: 100%; white-space: nowrap; }
.quality-table th, .quality-table td { padding: var(--sp-3) var(--sp-2); }
.quality-table td { font-variant-numeric: tabular-nums; }
.quality-table__plan { min-width: 170px; white-space: normal; }
.quality-table__plan a, .quality-table__plan strong {
  display: block; font-weight: 600; color: var(--n-900); overflow-wrap: anywhere;
}
.quality-table__plan a { color: var(--brand-700); }
.quality-table__plan small, .quality-table td small {
  display: block; margin-top: var(--sp-1); color: var(--n-500); font-size: var(--fs-xs);
}
.quality-footnote { margin: var(--sp-3) 0 0; color: var(--n-500); font-size: var(--fs-xs); }

/* ---------- 详情页改版（2026-10-29 她标的六处） ---------- */


/* 作战台弹窗比档案宽：里面是两栏 + 话术，窄了会挤成一坨 */
.workbench-dialog { width: min(880px, calc(100vw - 32px)); }
.workbench-dialog .profile-dialog__body { max-height: 68vh; overflow: auto; }

/* 更多操作：低频且危险的动作。一行一条带说明，删除标红——
   放在弹窗里不是为了藏功能，是为了「不会手滑点掉不可逆的那一个」。 */
.more-actions { display: grid; gap: var(--sp-2); }
.more-actions__item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  min-height: 56px; padding: var(--sp-3) var(--sp-4); text-align: left; cursor: pointer;
  border: 1px solid var(--n-200); border-radius: var(--r-md); background: var(--n-0); }
.more-actions__item strong { font-size: var(--fs-md); font-weight: var(--fw-semibold); color: var(--n-900); }
.more-actions__item span { font-size: var(--fs-sm); color: var(--n-500); }
.more-actions__item:hover { border-color: var(--n-400); background: var(--n-50); }
.more-actions__item--danger strong { color: var(--danger-fg); }
.more-actions__item--danger:hover { border-color: var(--danger); background: var(--danger-bg); }

/* 阶段折叠：还在（无效/成交要回传平台），但不再是「保存跟进」下面那排显眼大按钮 */
.detail-followup__stage-details { margin-top: var(--sp-5); padding-top: var(--sp-3);
  border-top: 1px solid var(--n-200); }
.detail-followup__stage-details > summary { min-height: 32px; cursor: pointer;
  font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--n-600); }
.detail-followup__stage-sub { margin-left: var(--sp-2); font-weight: 400; color: var(--n-500); }
.detail-followup__stage { margin-top: var(--sp-3); }

/* ---------- 今日电话小宠物（记录跟进右上角） ---------- */
.detail-followup__tools { display: flex; align-items: center; gap: var(--sp-2);
  margin-left: auto; min-width: 0; }
.pet-wrap { position: relative; }
.pet { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; cursor: pointer;
  padding: 3px 10px 3px 3px; border: 1px solid var(--n-200); border-radius: 999px;
  background: var(--n-0); }
.pet:hover { border-color: var(--n-400); }
.pet__face { width: 30px; height: 30px; flex: none; }
.pet__ear { fill: var(--brand-200); }
.pet__head { fill: var(--n-100); }
.pet__eyes circle { fill: var(--n-700); }
.pet__eyes path, .pet__mouth { fill: none; stroke: var(--n-700); stroke-width: 1.6; stroke-linecap: round; }
.pet__blush { fill: var(--brand-300); opacity: 0; }
/* 心情只切换 SVG 里已有的部件，不改 path 的 d —— Firefox 不支持那个 CSS 属性 */
.pet__eyes-shut, .pet__eyes-flat, .pet__mouth-smile { display: none; }
.pet[data-pet-stage="idle"] .pet__eyes-open { display: none; }
.pet[data-pet-stage="idle"] .pet__eyes-flat { display: block; }
.pet[data-pet-stage="done"] .pet__eyes-open { display: none; }
.pet[data-pet-stage="done"] .pet__eyes-shut { display: block; }
.pet[data-pet-stage="hot"] .pet__mouth-flat, .pet[data-pet-stage="sprint"] .pet__mouth-flat,
.pet[data-pet-stage="done"] .pet__mouth-flat { display: none; }
.pet[data-pet-stage="hot"] .pet__mouth-smile, .pet[data-pet-stage="sprint"] .pet__mouth-smile,
.pet[data-pet-stage="done"] .pet__mouth-smile { display: block; }
.pet[data-pet-stage="sprint"] .pet__blush, .pet[data-pet-stage="done"] .pet__blush { opacity: .85; }
.pet[data-pet-stage="hot"] .pet__head, .pet[data-pet-stage="sprint"] .pet__head { fill: var(--brand-100); }
.pet[data-pet-stage="done"] .pet__head { fill: var(--brand-200); }
.pet[data-pet-stage="done"] .pet__ear { fill: var(--brand-300); }
.pet[data-pet-stage="sprint"] .pet__face, .pet[data-pet-stage="done"] .pet__face {
  animation: pet-bounce 1.6s ease-in-out infinite; }
@keyframes pet-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .pet__face { animation: none !important; } }
.pet__count { font-size: var(--fs-sm); color: var(--n-600); font-variant-numeric: tabular-nums; }
.pet__count strong { font-size: var(--fs-md); color: var(--n-900); }
.pet__of { color: var(--n-500); }

.pet__panel { position: absolute; top: calc(100% + 8px); right: 0; z-index: 30; width: 236px;
  padding: var(--sp-4); background: var(--n-0); border: 1px solid var(--n-200);
  border-radius: var(--r-lg); box-shadow: var(--sh-3); }
.pet__line { margin: 0 0 var(--sp-3); font-size: var(--fs-sm); color: var(--n-800); }
.pet__bar { height: 8px; border-radius: 999px; background: var(--n-100); overflow: hidden; }
.pet__bar i { display: block; height: 100%; border-radius: 999px; background: var(--action);
  transition: width .3s ease; }
.pet__pct { margin-top: 6px; font-size: var(--fs-xs); color: var(--n-500);
  font-variant-numeric: tabular-nums; }
.pet__goal-row { display: flex; align-items: center; gap: var(--sp-2); margin-top: var(--sp-3);
  padding-top: var(--sp-3); border-top: 1px solid var(--n-200); }
.pet__goal { font-size: var(--fs-sm); color: var(--n-600); }
.pet__goal-row .input { width: 72px; }

/* 联系方式并进头部之后：靠一条分隔线和一点留白跟档案区分开，不再另起一张卡 */
.detail-hero__contact { margin-top: var(--sp-4); padding-top: var(--sp-4);
  border-top: 1px solid var(--n-200); }
/* 购房需求条她 2026-11-06 说「不需要」，那一块连样式一起撤了：
   四项内容仍在「客户档案」弹窗里。 */

/* 「记录跟进」从卡头挪到表单第一行（她说挪到「沟通结果」的位置）：
   原来一个卡头 56px 只放标题和猫，现在整张卡往上提一屏。 */
.detail-followup__title { margin: 0 0 var(--sp-3);
  font-size: var(--fs-md); font-weight: var(--fw-semibold); color: var(--ink); }

/* 今日通话的小猫挪到名字行右上角 */
.detail-hero__pet { margin-left: auto; flex: none; }
.detail-hero__pet .pet-wrap { position: relative; }

.detail-hero__audit { margin: 0 0 var(--sp-2); font-size: var(--fs-xs); color: var(--n-500); }
.detail-hero__nav { display: flex; gap: var(--sp-2); margin-left: auto; flex: none; }

/* 跟进方式 + 客户等级并排：两个都是「选一个」，不该各占一整条 */
.detail-followup__picks { display: grid; gap: var(--sp-3);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.detail-followup__picks .field { margin-bottom: 0; }
.chips--tight { gap: var(--sp-1); }
.chips--tight .chip__label { padding: 0 var(--sp-2); font-size: var(--fs-sm); }

/* 沟通结果：跟进是这页最重要的动作，输入框要像个能写字的地方。
   .input/.textarea 是固定 48px 高，所以这里必须显式给 min-height。 */
.followup-content { min-height: 148px; height: auto; font-size: var(--fs-md);
  line-height: 1.7; resize: vertical; }

/* 联系方式块顶部那行：左边审计提示，右边客户分析入口 */
.detail-hero__contact-head { display: flex; align-items: center; gap: var(--sp-3);
  margin-bottom: var(--sp-3); }
.detail-hero__contact-head .btn { margin-left: auto; }

/* 单选外壳这层不能有自己的底色。`.chip` 同时被三种东西用过（灰色标签块、
   可点的单选外壳、带 × 的筛选标签），ui.css 又最后加载，于是外壳先画了一颗
   sunken 灰胶囊，里面那颗白色 .chip__label 再盖上去——胶囊边上就露出一圈灰，
   她指着说「这里不用搞这个阴影」。用 .chip.chip-radio 提权，压过 ui.css 的 .chip。 */
.chip.chip-radio { display: inline-flex; height: auto; padding: 0;
  background: none; border: 0; border-radius: 0; }
.chip.chip-radio:hover { border-color: transparent; color: inherit; }

/* ---------- 头部压行（2026-10-29 她标的第三条） ---------- */
/* 号码 + 看全号 + 没接/通了 + 上一条/下一条 排一行；微信号下一行。
   间距收到 sp-2：11 位号码 + 五个控件要在 636px 的窄列里排成一行，sp-3 就会
   把「下一条」顶到第二行，她说的「一行能做的事情做了三行」就又回来了。 */
.contact-line { display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--sp-2) var(--sp-2); }
.contact-line .contact__label { margin: 0; }
.contact-line .contact__value { margin: 0; }
.contact-line .contact__actions { margin: 0; }
/* 微信号跟着号码一起居中：上一行居中了、这一行还贴左边缘，两条线就不成对 */
.contact-line--wx { margin-top: var(--sp-2); justify-content: center; }
/* 手机号是这页第一个要读出来的东西，她说「再大一点，再往中间放一点」。
   做法：三列网格（左右两列等宽、中间自适应）——号码永远落在卡片中线上，标签贴
   在它左边，上一条/下一条贴在最右边；三个动作（查看全号/没接/通了）落到号码
   正下方、同样居中。号码是标题，动作是它的工具条。
   用网格而不是「号码居中 + 上下条绝对定位」：列一窄，绝对定位的按钮就会压在
   号码上（1200px 两栏时量到过）。 */
.contact-line--phone { display: grid; align-items: center;
  grid-template-columns: minmax(min-content, 1fr) auto minmax(min-content, 1fr);
  gap: var(--sp-2) var(--sp-3); }
.contact-line--phone .contact__label { grid-column: 1; grid-row: 1; justify-self: end; }
.contact-line--phone .contact__value[data-contact-value="phone"] { grid-column: 2; grid-row: 1; }
.contact__value[data-contact-value="phone"] { font-size: var(--fs-3xl);
  line-height: 1.12; letter-spacing: .005em; }
/* 动作单独占整行，居中排在号码底下 */
.contact-line--phone .contact__actions { grid-column: 1 / -1; grid-row: 2;
  justify-content: center; }
.contact-line--phone .quick-tag { padding: 0 12px; }
/* 上一条/下一条贴在这一行右端：号码居中之后，右侧原来是空的 */
.contact-line--phone .detail-hero__nav { grid-column: 3; grid-row: 1;
  justify-self: end; margin: 0; }
/* 1081–1270：两栏布局里 hero 只剩 408–536px，号码和上一条并排会把号码挤偏、
   「手机号」还会折成两行。这一段号码独占一行居中，按钮行分成左右两端。 */
@media (min-width: 1081px) and (max-width: 1270px) {
  .contact-line--phone { grid-template-columns: minmax(0, 1fr); row-gap: var(--sp-2); }
  .contact-line--phone .contact__label { grid-column: 1; grid-row: 1; justify-self: start; }
  .contact-line--phone .contact__value[data-contact-value="phone"] { grid-column: 1; grid-row: 1; justify-self: center; }
  .contact-line--phone .contact__actions { grid-column: 1; grid-row: 2; justify-self: start; }
  .contact-line--phone .detail-hero__nav { grid-column: 1; grid-row: 2; justify-self: end; }
}
/* 跟号码并排的按钮收一档：字号 12、图标 16、内边距 8。44px 的可点区域没变。 */
.contact-line--phone .contact-nav__button { padding: 0 var(--sp-2);
  font-size: var(--fs-xs); gap: 2px; }
.contact-line--phone .contact-nav__button .ico { width: 16px; height: 16px; }
/* 微信号是字母串，不是要拨的号码：同样 27px 的等宽字排出来又宽又笨，
   降一档到 21px，「手机号最大」这件事才立得住。 */
.contact__value[data-contact-value="weixin"] { font-size: var(--fs-xl); }

/* ---------- 今天拨过没有（2026-11-06 她的通话流程） ---------- */
/* 她一通一通往下打，回到这一屏只靠记忆就会把同一个人再打一遍。拨过的人号码块
   整块盖一层淡墨绿——「中间区域」就是她说的那块，遮罩不是边框，扫一眼能分辨。
   没拨过的保持纸底，两态差要够大到不用读文字。 */
.detail-hero__contact { position: relative; }
.detail-hero__contact .contact-line--phone {
  border-radius: var(--r-lg);
  transition: background-color .18s ease, box-shadow .18s ease;
}
.detail-hero__contact.is-dialled .contact-line--phone {
  background: var(--success-bg);
  box-shadow: inset 0 0 0 1px rgba(20, 104, 90, .18);
  padding: var(--sp-3);
}
.contact__dialed { align-self: center; font-size: var(--fs-xs); font-weight: 600;
  color: var(--success-fg); letter-spacing: .01em; white-space: nowrap; }
.detail-hero__contact:not(.is-dialled) .contact__dialed { display: none; }
/* 6 个一行时给「方式」和「等级」之间一道缝，读起来是两组而不是六坨 */
.detail-followup__picks-split { display: none; }
.contact__label--wx { margin-left: 0 !important; }
/* 联系方式这几行里的按钮收窄左右内边距（16→12）：窄列里号码放大之后，
   动作按钮短一点才不会把上一条/下一条挤到下一行。 */
.contact-line .btn--sm { padding: 0 var(--sp-3); }
.detail-hero__actions--inline { display: inline-flex; flex-wrap: wrap;
  align-items: center; gap: var(--sp-2); margin: 0; }
.detail-hero__meta { flex-wrap: wrap; }

/* ---------- 客户分析：圆形 AI 浮球 ---------- */
/* 原来是一颗占着 meta 行的文字按钮，她说「变成一个可以自由拖动、随地放的弹出浮窗，
   做成一个圆圆的 AI 的感觉」。fixed + pointer 拖动（JS 在 app.js initAiFab），
   位置存 localStorage；有弹窗时 dialog 在 top layer，压不到它。 */
.ai-fab {
  position: fixed; right: var(--sp-5); bottom: 104px;
  width: 62px; height: 62px; padding: 0;
  display: inline-flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 1px;
  border: 0; border-radius: 50%; z-index: 45;
  color: #FFF; cursor: grab; touch-action: none;
  /* 渐变的每一档都要压得住白字（≥4.5:1）：最浅的一档到 #CC470F 为止，
     再亮就是白字看不清的浅橙了。高光改用 inset 阴影做，不再靠浅色渐变。 */
  background: linear-gradient(155deg, #CC470F 0%, #B03B0D 52%, #8A2F0D 100%);
  box-shadow: 0 12px 28px rgba(194, 65, 12, .34),
              0 2px 6px rgba(23, 26, 22, .18),
              inset 0 1px 0 rgba(255, 255, 255, .4);
  transition: transform .18s ease, box-shadow .18s ease;
}
/* 外圈那层淡光，让圆球看起来是「浮」着的，不是贴了张圆片 */
.ai-fab::after {
  content: ""; position: absolute; inset: -7px; border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 146, 60, .38), rgba(251, 146, 60, 0) 70%);
  pointer-events: none;
}
.ai-fab:hover { transform: translateY(-2px) scale(1.04); }
.ai-fab:focus-visible { outline: 3px solid var(--brand-500); outline-offset: 3px; }
.ai-fab.is-dragging { cursor: grabbing; transition: none;
  transform: scale(1.06); }
.ai-fab__icon { width: 24px; height: 24px; }
.ai-fab__label { font-size: 12px; font-weight: 700; letter-spacing: .08em;
  line-height: 1; margin-left: .08em; }
/* 优先级挂在球右上角，像一条未读角标：不说一句话也知道这颗球在报什么 */
.ai-fab__score {
  position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px;
  padding: 0 5px; border-radius: var(--r-full); background: var(--n-0);
  color: var(--brand-700); border: 1px solid rgba(194, 65, 12, .25);
  font-size: 12px; font-weight: 700; line-height: 20px; text-align: center;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 6px rgba(23, 26, 22, .18);
}
/* 跟进记录：标题、条数、下次跟进、最近联系合成一行 */
.history-head { flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); }
.history-head .detail-history-count { margin-left: 0; }
.history-head__meta { font-size: var(--fs-xs); color: var(--n-500); }
.history-head__meta strong { color: var(--n-800); font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums; margin-left: 4px; }

/* 历史条数一多，左栏就一直往下长，右栏的「记录跟进」下面留一大片空白
   （高度跟到最长的左栏）。桌面端把时间线收进自己的滚动区，两栏高度接近，
   平台信息/回传记录这些分栏也不用翻很久才看得到。手机端不嵌套滚动。 */
@media (min-width: 1081px) {
  .detail-focus__history .timeline { max-height: calc(100vh - 460px); min-height: 280px;
    overflow-y: auto; overscroll-behavior: contain; padding-right: var(--sp-1); }
  /* 默认滚动条在 Windows 上是一条深灰实心，压在时间线上很抢眼 */
  .detail-focus__history .timeline::-webkit-scrollbar { width: 8px; }
  .detail-focus__history .timeline::-webkit-scrollbar-track { background: transparent; }
  .detail-focus__history .timeline::-webkit-scrollbar-thumb { background: var(--n-300);
    border-radius: var(--r-full); }
  .detail-focus__history .timeline::-webkit-scrollbar-thumb:hover { background: var(--n-400); }
}

/* ---------- 团队页 · 邀请链接（2026-11-06） ---------- */
.invite-form .field { min-width: 0; }
.invite-result { display: flex; gap: var(--sp-2); align-items: center;
  margin-top: var(--sp-3); flex-wrap: wrap; }
.invite-result .input { flex: 1 1 240px; min-width: 0; font-size: var(--fs-sm); }
.invite-hint { margin-top: var(--sp-2); font-size: var(--fs-xs); color: var(--n-500); }
.invite-hint a { color: var(--brand-ink); }
.invite-pending { margin-top: var(--sp-4); padding-top: var(--sp-3); border-top: 1px solid var(--hair); }
.invite-pending__title { margin-bottom: var(--sp-1); font-size: var(--fs-sm);
  font-weight: var(--fw-semibold); color: var(--ink-2); }
.invite-pending__row { display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-2) 0; }
.invite-pending__row + .invite-pending__row { border-top: 1px dashed var(--hair); }
.invite-pending__who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.invite-pending__who strong { font-size: var(--fs-sm); color: var(--ink); }
.invite-pending__who span, .invite-pending__who small { font-size: var(--fs-xs); color: var(--ink-3); }
.invite-pending__row .btn { flex: none; }
.settings-scope { margin: 0 0 var(--sp-5); font-size: var(--fs-sm); color: var(--n-600); }
.settings-scope a { color: var(--brand-ink); font-weight: 500; }

/* ---------- 团队页 · 人事两块表单（2026-11-06） ---------- */
/* 她截图说「歪七扭八的」：原来是 inline-flex + align-items:flex-end，标签一长一短
   就把角色框挤成一粒、按钮掉到别人那一行。改成同一套网格：字段等宽、按钮独占一行。 */
.hr-grid { display: grid; gap: var(--sp-5); margin-top: var(--sp-5);
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.hr-form { min-width: 0; }
.hr-form__title { margin: 0 0 var(--sp-3); font-size: var(--fs-md);
  font-weight: var(--fw-semibold); color: var(--ink); }
.hr-fields { display: grid; gap: var(--sp-3) var(--sp-4);
  grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
.hr-fields .field { margin-bottom: 0; min-width: 0; }
.hr-fields .field--full { grid-column: 1 / -1; }
.hr-fields .input, .hr-fields .select { width: 100%; }
.hr-fields .hr-form__submit { grid-column: 1 / -1; justify-self: start; }

/* 320/窄屏：两列会让「姓名 / 角色」各自只剩一百来像素，退回一列 */
@media (max-width: 479px) {
  .hr-fields { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 团队排行：宽屏表格 / 窄屏卡片（2026-11-06） ---------- */
/* 10 列在 1100 以下必然要左右拖，她指着表格说「左右拉的 还有显示都有问题」。
   横滑看排名本来就不成立：拉到第五列之后，已经不知道自己看的是哪一行的数。 */
.rank-list { display: none; }
.rank-card {
  padding: var(--sp-4);
  background: var(--n-0);
  border: 1px solid var(--n-200);
  border-radius: var(--r-lg);
}
.rank-card__head { display: flex; align-items: center; gap: var(--sp-3); }
.rank-card__no { flex: none; width: 26px; font-family: var(--font-mono);
  font-size: var(--fs-md); font-weight: 700; color: var(--n-500); }
.rank-card__who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rank-card__who strong { font-size: var(--fs-md); }
.rank-card__who span { font-size: var(--fs-xs); color: var(--ink-3); }
.rank-card__score { flex: none; font-size: var(--fs-2xl); font-weight: 700;
  font-variant-numeric: tabular-nums; }
.rank-card__score small { margin-left: 2px; font-size: var(--fs-xs);
  font-weight: 500; color: var(--ink-3); }
.rank-card__stats { display: grid; gap: var(--sp-3) var(--sp-4);
  grid-template-columns: repeat(3, minmax(0, 1fr)); margin: var(--sp-4) 0 0; }
.rank-card__stats dt { font-size: var(--fs-xs); color: var(--ink-3); }
.rank-card__stats dd { margin: 2px 0 0; font-size: var(--fs-md); font-weight: 600;
  font-variant-numeric: tabular-nums; }
.rank-card__stats dd small { display: block; font-size: var(--fs-xs);
  font-weight: 400; color: var(--ink-3); }
.rank-card__deal { margin-top: var(--sp-3); padding-top: var(--sp-3);
  border-top: 1px solid var(--hair); font-size: var(--fs-sm); color: var(--ink-2); }

@media (max-width: 1100px) {
  .rank-table { display: none; }
  .rank-list { display: grid; gap: var(--sp-3); padding: var(--sp-4); }
}
@media (max-width: 359px) {
  .rank-card__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
