/* ============================================================
   移动端适配（2026-11-03）
   目标：PC 和手机都能用，结构上方便以后包成 App
   ============================================================ */

/* 手机端（body.is-mobile 由 mobile.js 添加）*/
body.is-mobile {
  padding-top: 48px;      /* 给顶部栏留位 */
  padding-bottom: 56px;   /* 给底部栏留位 */
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-x: none;   /* 禁止横向滑动 */
}
/* 手机端彻底隐藏原侧栏（!important 压过基础 .sidebar 的 display:flex） */
body.is-mobile .sidebar,
body.is-mobile .nav-handle { display: none !important; }
body.is-mobile .main {
  margin-left: 0 !important;
  max-width: 100vw !important;
  width: 100% !important;
  padding: 10px 8px !important;
  box-sizing: border-box !important;
}
body.is-mobile #table-container {
  overflow-x: visible !important;
  width: 100% !important;
  padding: 0 !important;
}
body.is-mobile .members-grid { grid-template-columns: 1fr !important; }
/* ⚠️ 关键：index.html 第810行那条 1100px 媒体查询给表格设了 min-width:640px，
   在手机上把容器撑到 640px（屏幕只有 390），卡片再好看也没用 —— 必须压掉。
   它写在 index.html 的内联 <style> 里，比本文件优先级高，所以这里加 body 前缀 + !important */
body.is-mobile .data-table,
body.is-mobile #table-container .data-table,
body.is-mobile table.data-table,
body.is-mobile #table-container table.data-table {
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}
body.is-mobile #table-container,
body.is-mobile .panel-body,
body.is-mobile .panel {
  max-width: 100% !important;
  width: 100% !important;
  overflow-x: visible !important;
  box-sizing: border-box !important;
}

/* ── 顶部栏 ─────────────────────────────────────────── */
#m-topbar {
  position: fixed; top: 0; left: 0; right: 0; height: 48px;
  background: linear-gradient(135deg, #1e3a5f, #152238);
  color: #fff; display: none; align-items: center;
  padding: 0 6px; z-index: 1200;
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
body.is-mobile #m-topbar { display: flex; }
#m-topbar button {
  width: 40px; height: 40px; border: none; background: transparent;
  color: #dbe7f5; font-size: 19px; border-radius: 8px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
#m-topbar button:active { background: rgba(255,255,255,.14); }
#m-title {
  flex: 1; text-align: center; font-size: 15px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ── 抽屉导航 ───────────────────────────────────────── */
#m-drawer-mask {
  position: fixed; inset: 0; background: rgba(10,20,35,.5);
  opacity: 0; pointer-events: none; transition: .22s; z-index: 1300;
  backdrop-filter: blur(2px);
}
#m-drawer-mask.show { opacity: 1; pointer-events: auto; }
#m-drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: 76vw; max-width: 300px;
  background: linear-gradient(180deg, #1e3a5f 0%, #152238 100%);
  z-index: 1310; transform: translateX(-102%);
  transition: transform .26s cubic-bezier(.4,0,.2,1);
  display: none; flex-direction: column;
  box-shadow: 4px 0 24px rgba(0,0,0,.3);
}
body.is-mobile #m-drawer { display: flex; }
#m-drawer.show { transform: translateX(0); }
.m-drawer-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 14px 12px; border-bottom: 1px solid rgba(255,255,255,.1);
  color: #fff; font-size: 14px;
}
.m-drawer-hd button {
  width: 32px; height: 32px; border: none; background: rgba(255,255,255,.1);
  color: #cdd9ea; border-radius: 8px; font-size: 15px; cursor: pointer;
}
.m-drawer-body { flex: 1; overflow-y: auto; padding: 8px 8px 0; }
.m-nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 12px 12px; border: none; background: transparent;
  color: #c8d6e5; font-size: 14.5px; text-align: left;
  border-radius: 9px; cursor: pointer; margin-bottom: 2px;
}
.m-nav-item:active { background: rgba(255,255,255,.12); }
.m-nav-item .m-ico { font-size: 18px; width: 24px; text-align: center; }
.m-nav-item .m-lb { flex: 1; }

/* ── 底部快捷栏 ─────────────────────────────────────── */
#m-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: 56px;
  background: rgba(255,255,255,.98);
  border-top: 1px solid #e8eef7;
  display: none; z-index: 1200;
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -2px 12px rgba(0,0,0,.06);
}
body.is-mobile #m-tabbar { display: flex; }
#m-tabbar button {
  flex: 1; border: none; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 10.5px; color: #94a3b8; position: relative;
  padding: 6px 0;
}
#m-tabbar button span { font-size: 19px; line-height: 1; }
#m-tabbar button.on { color: #7c3aed; font-weight: 600; }
#m-tabbar button.on span { transform: scale(1.08); }
#m-todo-dot {
  position: absolute; top: 4px; right: calc(50% - 18px);
  width: 8px; height: 8px; border-radius: 50%; background: #dc2626;
  display: none;
}

/* ── 手机端把顶栏按钮的触控区加大 ─────────────────────── */
body.is-mobile .btn,
body.is-mobile .search-icon,
body.is-mobile button.mtab-icon {
  min-height: 36px;
}
body.is-mobile .btn-sm { padding: 7px 11px !important; font-size: 12.5px !important; }

/* 手机端表格：卡片式 */
body.is-mobile .data-table { display: block; width: 100%; }
body.is-mobile .data-table thead { display: none; }
body.is-mobile .data-table tbody { display: block; }
body.is-mobile .data-table tbody tr {
  display: block; position: relative;
  background: #fff; border: 1px solid #eef2f7; border-radius: 12px;
  margin-bottom: 9px; padding: 11px 12px 9px 36px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
body.is-mobile .data-table tbody td {
  display: block; width: auto !important; border: none !important;
  padding: 0 !important; text-align: left !important; white-space: normal !important;
}
/* ── 邀约记录 / 其它宽表：不以「第几列」定样式，改用 data-label 通用卡片 ──
   原理：给 td 加 data-label="列名"，手机端每项显示成「列名 值」。
   这样不管表格有几列、列怎么变，手机上都不会挤爆。 */
body.is-mobile .data-table.kv-cards tbody tr {
  padding-left: 12px; padding-top: 11px;
}
body.is-mobile .data-table.kv-cards tbody td {
  display: flex !important; align-items: baseline; gap: 8px;
  font-size: 12.5px !important; color: #334155;
  padding: 2px 0 !important; line-height: 1.55;
  /* ⚠️ 2026-11-06 关键修复（用户报「手机上一屏只显示一个会员」）：
     这条规则只写了 display:flex，没重置 width，
     于是桌面端的固定列宽（客户标签 118px / 操作 200px / 业务员 56px）
     在手机上继续生效，每个 td 被压在窄条里折成 4~6 行，
     整张卡片从 ~200px 撑到 525px，一屏只能看见一个人。
     这里必须把宽度彻底放开，让每个 td 独占整行。 */
  width: auto !important;
  max-width: 100% !important;
  min-width: 0 !important;
  flex-wrap: wrap;
}
body.is-mobile .data-table.kv-cards tbody td::before {
  content: attr(data-label);
  flex: 0 0 66px; color: #94a3b8; font-size: 11.5px;
  text-align: right;
}
/* 名字那一行放大显示，不要前缀 */
body.is-mobile .data-table.kv-cards tbody td.kv-title {
  font-size: 15.5px !important; font-weight: 700; color: #1a1a2e;
  display: block !important; margin-bottom: 4px;
}
body.is-mobile .data-table.kv-cards tbody td.kv-title::before { content: none; }
/* 全为 0 或 — 的项在手机上收起，避免一堆没用的 0 */
body.is-mobile .data-table.kv-cards tbody td.kv-zero { display: none !important; }
/* 操作按钮 */
/* 分组标题条（成交记录按团分组、其它按地区分组）——手机上做成黄色横幅 */
body.is-mobile .data-table.kv-cards tbody tr.kv-group {
  background: linear-gradient(90deg, #fef9e7, #fffbeb) !important;
  border: 1px solid #fde68a !important;
  border-radius: 9px !important;
  padding: 9px 11px !important;
  margin: 12px 0 7px 0 !important;
  box-shadow: none !important;
}
body.is-mobile .data-table.kv-cards tbody tr.kv-group td {
  display: block !important; padding: 0 !important;
  font-size: 12.5px !important; color: #92400e !important;
  font-weight: 600; line-height: 1.6;
}
body.is-mobile .data-table.kv-cards tbody tr.kv-group td::before { content: none !important; }
/* 分组条里的换行项拆成多行显示 */
body.is-mobile .data-table.kv-cards tbody tr.kv-group td br { display: none; }
body.is-mobile .data-table.mb-cards tbody td:first-child {
  position: absolute; left: 10px; top: 12px; width: auto !important;
}
body.is-mobile .data-table.mb-cards tbody td:first-child input { width: 19px; height: 19px; }
body.is-mobile .data-table.mb-cards tbody td:nth-child(2) {
  position: absolute; right: 12px; top: 11px;
  font-size: 10.5px !important; color: #b6c2d2 !important;
}
body.is-mobile .data-table.mb-cards tbody td:nth-child(3) {
  font-size: 15.5px !important; font-weight: 700; color: #1a1a2e; margin-bottom: 4px;
}
body.is-mobile .data-table.mb-cards tbody td:nth-child(4),
body.is-mobile .data-table.mb-cards tbody td:nth-child(5) {
  display: inline-block; font-size: 12.5px !important; color: #64748b; margin-right: 12px;
}
body.is-mobile .data-table.mb-cards tbody td:nth-child(4)::before { content: '👤 '; }
body.is-mobile .data-table.mb-cards tbody td:nth-child(5)::before { content: '📱 '; }
body.is-mobile .data-table.mb-cards tbody td:nth-child(6),
body.is-mobile .data-table.mb-cards tbody td:nth-child(7) { margin-top: 6px; }
body.is-mobile .data-table.mb-cards tbody td:nth-child(6) > div[style*="flex"] {
  flex-direction: column !important; gap: 3px !important;
}
body.is-mobile .data-table tbody td.actions {
  margin-top: 9px !important; padding-top: 9px !important;
  border-top: 1px dashed #eef2f7 !important;
  width: auto !important; min-width: 0 !important;
}
body.is-mobile .data-table tbody td.actions .act-row {
  display: flex !important; flex-wrap: wrap !important; gap: 6px !important;
}
body.is-mobile .data-table tbody td.actions .act-row > .btn {
  flex: 1 1 auto !important; min-width: 62px; justify-content: center;
  padding: 8px 9px !important; font-size: 12.5px !important;
}

/* 弹窗全屏化（App 感） */
body.is-mobile .modal {
  width: calc(100vw - 12px) !important; max-width: none !important;
  max-height: 88vh !important; margin: 0 !important;
  border-radius: 14px;
}
body.is-mobile .modal-body { padding: 13px !important; max-height: 70vh; }
body.is-mobile .modal-header { padding: 12px 14px !important; }
body.is-mobile .modal-header h3 { font-size: 15px !important; }
body.is-mobile #modal-overlay { align-items: flex-end !important; padding-bottom: 60px; }

/* 工具栏 / 筛选项 收紧 */
body.is-mobile .compact-hd { flex-wrap: wrap !important; padding: 7px 9px !important; gap: 6px !important; }
body.is-mobile .compact-hd h3 { font-size: 14px !important; }
body.is-mobile .compact-hd .toolbar { gap: 5px !important; flex-wrap: wrap !important; }
body.is-mobile .compact-hd .toolbar .btn {
  font-size: 11.5px !important; padding: 5px 8px !important; min-height: 32px;
}
body.is-mobile .search-box { flex: 1 1 130px; }
body.is-mobile .search-box input { width: 100% !important; font-size: 13px !important; }
body.is-mobile .mtabs { padding: 7px 9px !important; gap: 6px !important; }
body.is-mobile .mtab, body.is-mobile .mtab-bf,
body.is-mobile .mtab-todo, body.is-mobile .mtab-inq,
body.is-mobile .mtab-hidden { font-size: 12px !important; padding: 6px 11px !important; }
body.is-mobile .mtab-bf { margin-left: 0 !important; }
body.is-mobile .mtab-select { max-width: 100% !important; font-size: 13px !important; }

/* 概览统计卡两列 */
body.is-mobile .stats-row { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
body.is-mobile .stat-card { padding: 10px !important; }

/* 询价中心卡片 */
body.is-mobile .ic-card { flex: 1 1 45% !important; min-width: 0 !important; }
body.is-mobile .ic-head { flex-wrap: wrap !important; gap: 5px !important; padding: 10px 4px !important; }
body.is-mobile .ic-meta { margin-left: 0 !important; width: 100%; }
body.is-mobile .ic-body { padding-left: 8px !important; }
body.is-mobile .ic-info { flex-direction: column; gap: 3px !important; }

/* 待跟进卡片 */
body.is-mobile .ft-item { flex-wrap: wrap !important; }
body.is-mobile .ft-acts { width: 100%; margin-top: 6px; }
body.is-mobile .ft-acts .btn { flex: 1; justify-content: center; }

/* 分页 */
body.is-mobile .pagination { padding: 8px 6px !important; font-size: 12px; flex-wrap: wrap; }

/* ══════════════════════════════════════════════════════════
   手机端「最新动态」里的锁定期标签（2026-11-06 修）
   症状：截图显示「🔒 剩 59 天」被压成一个字一行的竖条，
        整张卡片被撑到 545px 高，一屏只能看到一个会员。

   ⚠️ 踩过的坑（务必别重犯）：
      我一度加了
        body.is-mobile .data-table.kv-cards tbody td { min-width:0; flex-wrap:wrap; }
      想让它别被压扁 —— 结果把上面那条「td 必须 display:block; width:auto」
      的卡片式布局破坏了，桌面列宽重新生效（客户标签 118px、操作 200px），
      每行被挤成 4~6 折，卡片高度从 ~200px 撑到 545px。
      **所以这里只约束标签自己，绝不再动 td 的布局属性。**

   正确做法：让包装层能撑开、标签按词换行（中文不能一个字一行）。
   ══════════════════════════════════════════════════════════ */
body.is-mobile .inq-lock-wrap {
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
}
body.is-mobile .inq-lock-wrap > span {
  white-space: normal !important;
  word-break: keep-all !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 2px;
  font-size: 10.5px !important;
  line-height: 1.5 !important;
  padding: 1px 8px !important;
  max-width: 100%;
}

/* ══════════════════════════════════════════════════════════
   手机端会员卡片「瘦身」（2026-11-06）
   用户反馈：「整个屏幕就显示了一个会员」
   实测这张卡 444px 高，一屏 844px 只能放 1.9 张。拆解：
       卡号+姓名+积分+业务员+手机  122px
       客户标签                  123px  ← 太长
       最新动态                   81px
       操作按钮 6 个              84px  ← 太大
   其他模块（成交记录 277px）看着正常，是因为字段少。
   会员表信息先天就多，所以手机上做分层：
     · 标签只显示一行（超出用 +N 收起来），不全铺开
     · 操作按钮缩小、排成一行 3 个
     · 次要信息（卡号、总积分）字号压小
   目标：单卡 ≤ 300px，一屏能看到 2~3 个会员。
   ══════════════════════════════════════════════════════════ */

/* 客户标签：手机端横向流式排列，一行放得下几个就放几个
   ⚠️ 2026-11-06 重写（用户反馈「一屏只显示一个会员」）
   之前的问题：.tagcols 是两列 grid，每列只有 ~58px 宽，
       而 .tagcol>div 又设了 nowrap → 每个标签独占一行竖着堆，
       这一格从 24px 撑到 63px；加上「最新动态」72px，
       单卡 359px，844px 屏幕只放得下 2 张，观感就是「一屏一个」。
   正确做法：不隐藏第二列，直接把两列拆平成一个横向 flex 流，
       标签按自然宽度排，超出自动换行。这样 6 个标签约占 2 行 ~44px。
   ══════════════════════════════════════════════════════════ */
body.is-mobile .tagcols {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 3px 4px !important;
  grid-template-columns: none !important;
}
body.is-mobile .tagcols > .tagcol {
  display: contents !important;   /* 拆掉两列外壳，子项直接参与外层 flex */
}
body.is-mobile .tagcols > .tagcol > div {
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  line-height: 1 !important;
  font-size: 10.5px !important;
  display: inline-flex !important;
  margin: 0 !important;
}
body.is-mobile .tagcols > .tagcol > div > span {
  font-size: 10.5px !important;
  padding: 1px 7px !important;
  line-height: 1.5 !important;
}
/* 桌面端不需要「还有 N 个」这种手机上才用的提示 */
body.is-mobile .tagcol > div:nth-child(n+4) { display: inline-flex !important; }

/* 卡号：手机上不需要那么醒目，压小 */
body.is-mobile .data-table.kv-cards tbody td.kv-title {
  font-size: 13px !important;
  margin-bottom: 2px !important;
}

/* 最新动态：内部标签允许换行，但整体收紧 */
body.is-mobile .data-table tbody td[data-label="最新动态"] div {
  flex-wrap: wrap !important;
  gap: 3px !important;
}

/* ══════════════════════════════════════════════════════════
   手机端「最新动态」压成一行（2026-11-06）
   这一格原本是三组内容竖着叠：锁定期标签 / 微信标签 / 最后联系时间，
   在手机上占了 81px。改成横向一行流式排列，超出的自然换行，
   并把行距收紧 → 目标 ~40px。
   ══════════════════════════════════════════════════════════ */
body.is-mobile .data-table tbody td[data-label="最新动态"] {
  line-height: 1.4 !important;
  /* ⚠️ 2026-11-06：td 必须是 flex 容器 + 允许换行，
     子 div 用 display:contents 拆平，所有标签（锁期/微信/时间）
     才真正排在同一条流里。否则每个 div 各占一行，72px 下不去。 */
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 3px 4px !important;
}
body.is-mobile .data-table tbody td[data-label="最新动态"] > div {
  display: contents !important;
}
body.is-mobile .data-table tbody td[data-label="最新动态"] > div > span,
body.is-mobile .data-table tbody td[data-label="最新动态"] > span {
  display: inline-flex !important;
  align-items: center !important;
  vertical-align: middle;
  margin: 0 !important;
}
body.is-mobile .data-table tbody td[data-label="最新动态"] > div > span {
  font-size: 10px !important;
  padding: 0 6px !important;
  line-height: 1.6 !important;
}
/* 最后联系那行也并进去 */
body.is-mobile .data-table tbody td[data-label="最新动态"] > div:last-child {
  font-size: 10px !important;
  color: #94a3b8 !important;
}


/* ══════════════════════════════════════════════════════════
   2026-11-06 修「客户标签」格虚高
   现象：里面的 .tagcols 只有 43px，但 td 量出来 72px，白多 29px。
   原因：td 是 display:flex + align-items:baseline，
        基线对齐时要给「中文标签 + 前面的『客户标签』文字」留行高，
        于是一个 20px 的标签被撑到 43px 的行盒以上。
   修法：标签这类纯标签格改成 align-items:flex-start，不对基线。
   ══════════════════════════════════════════════════════════ */
body.is-mobile .data-table.kv-cards tbody td[data-label="客户标签"] {
  align-items: flex-start !important;
  padding-top: 1px !important;
}
body.is-mobile .data-table.kv-cards tbody td[data-label="客户标签"]::before {
  line-height: 1.5 !important;
}
body.is-mobile .data-table.kv-cards tbody td[data-label="最新动态"] {
  align-items: flex-start !important;
}

/* ══════════════════════════════════════════════════════════
   会员卡手机端重构（2026-11-07）
   用户反馈：「手机端客户管理界面还是不太好，空白区太多，不自然，
            手机端看询价客户显示效果就特别好，字体大小、所占区域都很好」

   诊断（实测数据）：
     每张卡 335px，9 个字段各占一行，每行左边固定留 66px 装「列名」，
     于是：
       · 卡号/总积分/业务员/手机 四行，内容只有几个字，右边大片空白
       · 标签列名 + 内容各占一半，视觉上被切成两栏
       · 335px 一张卡，844px 屏幕只放 2 张
     而询价卡的写法是：**主信息一行、次信息一行、不画列名**，所以显干净。

   现在改成同样的思路：
     · 姓名行：大字 + 编号（不占额外行）
     · 积分/业务员/手机：并成一条信息流，中间用 · 分隔，不再各占一行
     · 标签、动态：整行铺开，去掉 66px 占位
     · 操作按钮：一行 6 个小图标
   目标：单卡 ≈200px，一屏 3~4 张。
   ══════════════════════════════════════════════════════════ */

/* 卡片外壳：收紧内边距 */
body.is-mobile .data-table.kv-cards tbody tr {
  padding: 10px 11px 8px !important;
  margin-bottom: 8px !important;
  border-radius: 11px !important;
}

/* 每格：去掉 66px 列名占位，改成整行铺 */
body.is-mobile .data-table.kv-cards tbody td {
  display: block !important;
  padding: 1px 0 !important;
  line-height: 1.45 !important;
  font-size: 12.5px !important;
}
body.is-mobile .data-table.kv-cards tbody td::before { content: none !important; }

/* 姓名行：大字标题，和卡号同一行不浪费空间 */
body.is-mobile .data-table.kv-cards tbody td.kv-title {
  font-size: 15.5px !important;
  font-weight: 700 !important;
  color: #1a1a2e !important;
  margin: 0 0 2px 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  line-height: 1.3 !important;
  /* 右边留出卡号的位置，别被盖住 */
  padding-right: 58px !important;
  min-height: 0 !important;
}
/* 姓名行里的分组小标签压小，别撑高整行 */
body.is-mobile .data-table.kv-cards tbody td.kv-title > * {
  font-size: 11px !important;
  line-height: 1.3 !important;
}

/* 卡号：右上角小灰字（2026-11-07 修：原来 top:11px 跟姓名行重叠，
   姓名行自身有 40px 高，卡号会压在字上。改成贴卡片右上角、视线之外不抢戏） */
body.is-mobile .data-table.kv-cards tbody td[data-label="卡号"] {
  position: absolute;
  top: 9px; right: 11px;
  font-size: 10px !important;
  color: #cbd5e1 !important;
  line-height: 1.2 !important;
  padding: 0 !important;
  z-index: 2;
}

/* 短信息（总积分 / 业务员 / 手机）：并成一条流，不再各占一行
   ⚠️ 用 inline-block + 右侧分隔点，视觉上像「1,880 分 · 成交表 · 139…」 */
body.is-mobile .data-table.kv-cards tbody td[data-label="总积分"],
body.is-mobile .data-table.kv-cards tbody td[data-label="业务员"],
body.is-mobile .data-table.kv-cards tbody td[data-label="手机"] {
  display: inline-block !important;
  vertical-align: middle;
  font-size: 12px !important;
  color: #64748b !important;
  padding: 0 !important;
  line-height: 1.5 !important;
  margin-right: 8px !important;
  max-width: 46%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 积分留在前面用主色强调 */
body.is-mobile .data-table.kv-cards tbody td[data-label="总积分"] {
  color: #7c3aed !important;
  font-weight: 700;
}
/* 用「·」自然分隔，代替原来的三行 */
body.is-mobile .data-table.kv-cards tbody td[data-label="业务员"]::after {
  content: '';
}
/* 让这三项排在同一行：给它们一个共同的行容器效果 */
body.is-mobile .data-table.kv-cards tbody tr {
  display: block;
}
body.is-mobile .data-table.kv-cards tbody td[data-label="总积分"],
body.is-mobile .data-table.kv-cards tbody td[data-label="业务员"],
body.is-mobile .data-table.kv-cards tbody td[data-label="手机"] {
  font-size: 12px !important;
}

/* 客户标签：整行铺开，标签之间 3px */
body.is-mobile .data-table.kv-cards tbody td[data-label="客户标签"] {
  margin: 3px 0 0 0 !important;
  padding: 0 !important;
}
body.is-mobile .data-table.kv-cards tbody td[data-label="客户标签"] .tagcols {
  gap: 3px 4px !important;
}

/* 最新动态：整行铺开 */
body.is-mobile .data-table.kv-cards tbody td[data-label="最新动态"] {
  margin: 2px 0 0 0 !important;
  padding: 0 !important;
}

/* ══════════════════════════════════════════════════════════
   操作按钮（2026-11-07 统一，此前有 3 套规则互相覆盖导致高度 72px）
   设计：一行 3 个 × 2 行，按钮文字完整不截断，点着不误触。
   ══════════════════════════════════════════════════════════ */
body.is-mobile .data-table.kv-cards tbody td.kv-action {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin: 8px 0 0 0 !important;
  padding: 8px 0 0 0 !important;
  border-top: 1px solid #f1f5f9 !important;
  min-height: 0 !important;
}
/* ⚠️ 2026-11-07 坑：原来写 flex:0 0 calc(33.333% - 4px) + min-width:0，
   在 flex 容器里被压到 11px 宽，文字全被截掉，按钮变成两根细条。
   改成「三列等分用 flex:1 1 0 + 明确的 basis 0」，
   靠 flex-basis:0 + flex-grow:1 平分，不用百分比计算。 */
body.is-mobile .data-table.kv-cards tbody td.kv-action .btn {
  flex: 1 1 0 !important;
  width: auto !important;
  min-width: 74px !important;      /* 保证能放下 4 个汉字 */
  max-width: none !important;
  justify-content: center !important;
  padding: 7px 4px !important;
  font-size: 12px !important;
  line-height: 1.3 !important;
  border-radius: 7px !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}
