/* Ruudy · P1 快赢增强样式（2026-10-20）
   ============================================================
   对应内测反馈 v1.0 在仓 P1 项：
     #1 待办分组折叠 —— 工作台组头可点折叠（配合 admin-p1.js）
     #2 紧凑排版     —— 列表行密度收紧 + 行业/赛道列不换行省略号
   纯样式，不新增视图、不碰 views.json、不改动存量 CSS（admin.css）。
   */

/* ---------- #1 待办分组折叠 ---------- */
/* 工作台已按「已逾期 / 今天 / 近期」分组渲染（.tdgroup > h4.subh + .tdcards）。
   这里只补「组头可点 + 折叠态」表现，不动 admin-collab.js 的分组逻辑。 */
.tdgroup > h4.subh {
  cursor: pointer;
  user-select: none;
}
.tdgroup > h4.subh::after {
  content: "\25BE"; /* ▾ */
  display: inline-block;
  margin-left: 8px;
  color: var(--muted);
  font-size: 12px;
  transition: transform .15s ease;
}
.tdgroup.is-collapsed > h4.subh::after {
  content: "\25B8"; /* ▸ */
}
.tdgroup.is-collapsed > .tdcards {
  display: none;
}
/* #1（补，2026-10-21）：组内**再按待办类型分小组**。反馈原文是「企业不平铺，
   按优先处理、一般处理等进行分类，隐藏式」—— 只有三个紧急度大组时，同一类待办
   （如 11 条「项目超期」）仍然平铺成一墙卡片。现在每个大组内按 kindLabel 拆成
   .tdsub，子组头同样可点折叠；分组口径取自待办自带字段，不新造一套。
   ⚠ 大组折叠要藏的是 .tdsubs（子组容器），不是 .tdcards —— 少这条规则，
   收起「已逾期」后子组卡片仍然挂在页面上，用户会以为折叠坏了。 */
.tdgroup > .tdsubs {
  margin-top: 12px;
}
.tdsub + .tdsub {
  margin-top: 14px;
}
.tdsub > .subh {
  cursor: pointer;
  user-select: none;
  font-size: var(--fs-sm);
  color: var(--muted);
}
.tdsub > .subh::after {
  content: "\25BE"; /* ▾ */
  display: inline-block;
  margin-left: 8px;
  font-size: 11px;
}
.tdsub.is-collapsed > .subh::after {
  content: "\25B8"; /* ▸ */
}
.tdsub.is-collapsed > .tdcards {
  display: none;
}
.tdgroup.is-collapsed > .tdsubs {
  display: none;
}

/* ---------- #2 紧凑排版 ---------- */
/* 主诉：线索库行业列竖排换行（"新能源/能源/技术"挤成 5 行） + 行高松散。
   对 .tw / .tbwrap 下的表格统一收 padding、行内 nowrap；行业列截断 + 悬浮 title。 */
.tw table,
.tbwrap table {
  font-size: 13px;
}
.tw table th,
.tbwrap table th,
.tw table td,
.tbwrap table td {
  padding: 6px 10px;
  line-height: 1.35;
  vertical-align: middle;
}
.tw table td,
.tbwrap table td {
  white-space: nowrap;
}
/* 行业 / 赛道列：允许截断而非换行（admin-p1.js 写入 title 做悬浮全量提示） */
.tw table td.is-clip,
.tbwrap table td.is-clip {
  max-width: 168px;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 操作列按钮不换行，分派按钮加入后不至于挤成两行 */
.tw table td.act,
.tbwrap table td.act {
  white-space: nowrap;
}
/* F-4 服务登记：进度条 + 服务专用时间线圆点 */
.svbar {
  position: relative;
  height: 16px;
  background: var(--paper-2);
  border-radius: 8px;
  overflow: hidden;
  margin: 4px 0 2px;
  max-width: 220px;
}
.svbar__fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: var(--ok);
}
.svbar__txt {
  position: absolute;
  right: 6px; top: 0;
  font-style: normal;
  font-size: 11px;
  line-height: 16px;
  color: var(--ok);
}
.timeline__dot--sv {
  background: var(--ok);
}
.tmut--issue {
  color: var(--danger);
}

/* ---------- 宽表自适应：线索库 / 惠算留资 / 惠算线索管理（2026-10-21） ----------
   用户反馈「线索库信息太宽，要往右拖拽才能看」。三张表 10–14 列，各列
   按内容撑宽 → 整表溢出 .tw。改固定布局：列宽按 nth-child 百分比分配，
   表宽严格等于容器宽度；长文本省略号 + title 悬浮看全称；标签与按钮
   允许列内换行（换行不撑宽，溢出才撑）。fixed 布局宽度是数学确定的：
   百分比和 = 100，内容只裁不撑。列宽不写进公共 tableFor（它服务所有表）。 */
#ld-table table.tb, #hs-table table.tb, #hsc-host-hsc-leads table.tb { table-layout: fixed; }
#ld-table table.tb td, #hs-table table.tb td, #hsc-host-hsc-leads table.tb td {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 表头同样省略：列头 nowrap 超宽时会叠到邻列上方 */
#ld-table table.tb th, #hs-table table.tb th, #hsc-host-hsc-leads table.tb th {
  overflow: hidden; text-overflow: ellipsis;
}
/* 主信息两行式单元格：公司名 / 联系人下的职务·手机小字，各自单独一行省略 */
#ld-table table.tb td:first-child b, #ld-table table.tb td:first-child .hint,
#ld-table table.tb td:nth-child(2) .hint,
#hs-table table.tb td:nth-child(3) b, #hs-table table.tb td:nth-child(3) .hint,
#hsc-host-hsc-leads table.tb td:nth-child(3) b, #hsc-host-hsc-leads table.tb td:nth-child(3) .hint {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 画像标签一列常带多个 pill：列内换行堆叠，避免横向撑宽 */
/* 画像标签列：云枢惠算线索主表（#ld-table）共 12 列，画像标签固定在第 9 列。
   ★ 上一次这条注释写的是「11 列、第 8 列，曾误判插入『负责人』列已回退」——
     那次回退是对的（「负责人」只是「转客户」表单字段，不是表列）。
     2026-11-02 二测 D6 加的「承接人」不一样：它进了 tableFor 的表头数组，
     是**真的表列**，所以列数确实变成 12、画像标签确实后移到第 9 列。
     两者的区分标准是「表头数组里有没有这一项」，不是「名字听起来像不像人」。 */
#ld-table table.tb td:nth-child(9) { white-space: normal; }
/* 操作列：按钮组 flex 换行右对齐（覆盖 td.act 的 nowrap；藏一个按钮算事故） */
#ld-table table.tb td.act { white-space: normal; overflow: visible; display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
/* 线索库主表 12 列：fixed 布局下百分比和须 = 100，少配一列就会把整表重新撑出容器，
   等于回到「要横向拖拽才能看全」的老毛病。列顺序：
   企业 1 / 联系人 2 / 承接人 3 / 赛道 4 / 渠道 5 / 来源 6 / 意向区域 7 /
   意向度 8 / 画像标签 9 / 状态 10 / 录入时间 11 / 操作 12。
   企业 18 / 联系人 9 / 承接人 8 / 赛道 5 / 渠道 5 / 来源 6 / 意向区域 8 /
   意向度 4 / 画像标签 7 / 状态 5 / 录入时间 8 / 操作 17 = 100 */
#ld-table table.tb th:nth-child(1) { width: 18%; } #ld-table table.tb th:nth-child(2) { width: 9%; }
#ld-table table.tb th:nth-child(3) { width: 8%; }  #ld-table table.tb th:nth-child(4) { width: 5%; }
#ld-table table.tb th:nth-child(5) { width: 5%; }  #ld-table table.tb th:nth-child(6) { width: 6%; }
#ld-table table.tb th:nth-child(7) { width: 8%; }  #ld-table table.tb th:nth-child(8) { width: 4%; }
#ld-table table.tb th:nth-child(9) { width: 7%; }  #ld-table table.tb th:nth-child(10) { width: 5%; }
#ld-table table.tb th:nth-child(11) { width: 8%; } #ld-table table.tb th:nth-child(12) { width: 17%; }
/* 惠算留资入池表 14 列（首列复选框）：时间 9 / 企业 12 / 联系人 7 / 手机 9 /
   红利 9 / 评级 4 / 热度 4 / 行业 7 / 园区 9 / 渠道 6 / 数据 4 / 状态 5 / 操作 12 */
#hs-table table.tb th:nth-child(1) { width: 3%; }  #hs-table table.tb th:nth-child(2) { width: 9%; }
#hs-table table.tb th:nth-child(3) { width: 12%; } #hs-table table.tb th:nth-child(4) { width: 7%; }
#hs-table table.tb th:nth-child(5) { width: 9%; }  #hs-table table.tb th:nth-child(6) { width: 9%; }
#hs-table table.tb th:nth-child(7) { width: 4%; }  #hs-table table.tb th:nth-child(8) { width: 4%; }
#hs-table table.tb th:nth-child(9) { width: 7%; }  #hs-table table.tb th:nth-child(10) { width: 9%; }
#hs-table table.tb th:nth-child(11) { width: 6%; } #hs-table table.tb th:nth-child(12) { width: 4%; }
#hs-table table.tb th:nth-child(13) { width: 5%; } #hs-table table.tb th:nth-child(14) { width: 12%; }
/* 惠算线索管理表 10 列：时间 9 / 来源 5 / 客户 18 / 评级热度 8 / 红利 9 /
   渠道合作方 12 / 状态 7 / 回流 7 / SLA 10 / 操作 15 */
#hsc-host-hsc-leads table.tb th:nth-child(1) { width: 9%; }  #hsc-host-hsc-leads table.tb th:nth-child(2) { width: 5%; }
#hsc-host-hsc-leads table.tb th:nth-child(3) { width: 18%; } #hsc-host-hsc-leads table.tb th:nth-child(4) { width: 8%; }
#hsc-host-hsc-leads table.tb th:nth-child(5) { width: 9%; }  #hsc-host-hsc-leads table.tb th:nth-child(6) { width: 12%; }
#hsc-host-hsc-leads table.tb th:nth-child(7) { width: 7%; } #hsc-host-hsc-leads table.tb th:nth-child(8) { width: 7%; }
#hsc-host-hsc-leads table.tb th:nth-child(9) { width: 10%; } #hsc-host-hsc-leads table.tb th:nth-child(10) { width: 15%; }
