/* ============================================================
   移动端适配（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: 10px 12px;
  /* ⚠️ 2026-11-25 关键：td 在表格模型里 display:block 会被浏览器纠正成 table-cell，
     导致格子只能占半宽（左侧空、右侧挤）。必须把 tr 变成 flex 容器，
     让 td 成为 flex 项，才能让每个格子真正占满整行。 */
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
}
body.is-mobile .data-table.kv-cards tbody td {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  align-self: stretch !important;
  font-size: 12.5px !important; color: #334155;
  padding: 3px 0 !important; line-height: 1.55;
  flex-wrap: wrap;
}
/* 2026-11-25 修「卡片左边一大片空白」：
   原来 ::before 是 flex:0 0 66px + text-align:right 的固定占位，
   等于每个格子左边永远空出 66px —— 用户截图左侧那条空白就是它。
   改成「列名在上、值在下」的两行紧凑布局，左侧 0 占位。 */
body.is-mobile .data-table.kv-cards tbody td::before {
  content: attr(data-label);
  display: block;
  float: none;
  width: 100%;
  text-align: left;
  color: #a8b3c4;
  font-size: 10px;
  line-height: 1.35;
  margin-bottom: 1px;
}
/* 有列名的格子：列名一行、值一行，两者都占满整行 → 不再出现左右半宽 */
body.is-mobile .data-table.kv-cards tbody td[data-label] {
  display: block !important;
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
  clear: both;
  padding: 3px 0 !important;
}
/* 2026-11-25 会员卡片压高（第三刀，最关键）：
   原来 8 个字段各占一行（卡号/姓名/积分/业务员/手机/标签/动态/操作），
   卡片 308px、一屏只看 2 个。
   改成两列网格：短字段两两并排，姓名/标签/动态/操作独占整行。
   ⚠️ 必须用 :has(td[data-label="总积分"]) 限定「只对会员表」——
      因为会员表和出团表 class 都是 kv-cards，只有字段名能区分。
   ⚠️ tr 必须是 grid 容器，td 才能并排（表格模型下 td 会被纠正成 table-cell）。 */
@media (max-width: 768px) {
  body.is-mobile .data-table.kv-cards tbody tr:has(td[data-label="总积分"]):not(.kv-group) {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    column-gap: 10px !important;
    row-gap: 2px !important;
    align-items: start !important;
  }
  /* 短字段：并排（各占一半）——姓名不算短字段，它带小组标签，必须独占整行
     （实测：姓名格只有 170px，两个 75px 小组标签放不下 → 换行 → 卡片白高 24px） */
  body.is-mobile .data-table.kv-cards tbody tr:has(td[data-label="总积分"]):not(.kv-group) > td[data-label="总积分"],
  body.is-mobile .data-table.kv-cards tbody tr:has(td[data-label="总积分"]):not(.kv-group) > td[data-label="业务员"],
  body.is-mobile .data-table.kv-cards tbody tr:has(td[data-label="总积分"]):not(.kv-group) > td[data-label="手机"] {
    grid-column: auto !important;
    width: auto !important;
    min-width: 0 !important;
  }
  /* 长字段 + 卡片头：独占整行（姓名带小组标签，整行 350px 才能横排） */
  body.is-mobile .data-table.kv-cards tbody tr:has(td[data-label="总积分"]):not(.kv-group) > td[data-label="卡号"],
  body.is-mobile .data-table.kv-cards tbody tr:has(td[data-label="总积分"]):not(.kv-group) > td[data-label="姓名"],
  body.is-mobile .data-table.kv-cards tbody tr:has(td[data-label="总积分"]):not(.kv-group) > td.kv-title,
  body.is-mobile .data-table.kv-cards tbody tr:has(td[data-label="总积分"]):not(.kv-group) > td[data-label="客户标签"],
  body.is-mobile .data-table.kv-cards tbody tr:has(td[data-label="总积分"]):not(.kv-group) > td[data-label="最新动态"],
  body.is-mobile .data-table.kv-cards tbody tr:has(td[data-label="总积分"]):not(.kv-group) > td.actions {
    grid-column: 1 / -1 !important;
    width: auto !important;
    min-width: 0 !important;
  }
}

/* 名字那一行放大显示，不要前缀 */
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: 3px;
  width: 100% !important;
}
/* 2026-11-25 会员卡片压高：姓名下面那行【⭐小组 👥小组】原来两个标签竖着排占 38px，
   改横排只占 17px，整张卡从 308px → 约 285px。 */
body.is-mobile .data-table.kv-cards tbody td.kv-title > div {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center;
  gap: 4px !important;
  line-height: 1.3 !important;
}
body.is-mobile .data-table.kv-cards tbody td.kv-title > div > span {
  display: inline-block !important;
  font-size: 10.5px !important;
  white-space: nowrap;
}
/* ⚠️ 2026-11-25 关键发现：姓名下面那行小组标签原来是内联样式
   `<div style="margin-top:2px;line-height:1.5">`，内联优先级高于任何 CSS class，
   所以怎么改 mobile.css 都不生效（实测连改 3 轮没反应）。
   改成 class="kv-grp" 后由下面的规则控制：两个标签横排，38px → 17px。 */
body.is-mobile .data-table.kv-cards tbody td.kv-title .kv-grp,
body.is-mobile .data-table.kv-cards tbody td[data-label="姓名"] > div {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 4px !important;
  margin-top: 1px !important;
  line-height: 1.2 !important;
  /* ⚠️ 必须 width:100%：实测 div 只有 104px（td 是 170px），
     两个 75px 标签加起来 150 > 104 就换行了，等于白改。 */
  width: 100% !important;
  max-width: 100% !important;
}
body.is-mobile .data-table.kv-cards tbody td.kv-title .kv-grp > span,
body.is-mobile .data-table.kv-cards tbody td[data-label="姓名"] > div > span {
  display: inline-flex !important;
  align-items: center;
  font-size: 10px !important;
  padding: 0 4px !important;
  line-height: 1.5 !important;
  white-space: nowrap;
}
body.is-mobile .data-table.kv-cards tbody td.kv-title::before { content: none; }
/* 卡号/小字段：占满整行但右对齐，不再绝对定位留白 */
body.is-mobile .data-table.kv-cards tbody td.kv-sub {
  width: 100% !important; text-align: right; color: #b6c2d2 !important;
  font-size: 11px !important;
}
/* 全为 0 或 — 的项在手机上收起，避免一堆没用的 0 */
body.is-mobile .data-table.kv-cards tbody td.kv-zero { display: none !important; }
/* 2026-11-25 会员卡片压高（第二刀）：客户标签/最新动态里一堆小胶囊
   原来是自动换行，标签多就堆 2~3 行（客户标签 35px、最新动态 19px）。
   改成单行横向滚动：高度固定 1 行，多的右滑看，卡片不再被撑高。
   ⚠️ 只作用于卡片内部的小胶囊，不改变 td 本身的宽度/display。 */
body.is-mobile .data-table.kv-cards tbody td[data-label="客户标签"],
body.is-mobile .data-table.kv-cards tbody td[data-label="最新动态"] {
  overflow: hidden;
}
body.is-mobile .data-table.kv-cards tbody td[data-label="客户标签"] > *,
body.is-mobile .data-table.kv-cards tbody td[data-label="最新动态"] > * {
  max-height: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
body.is-mobile .data-table.kv-cards tbody td[data-label="客户标签"] > *::-webkit-scrollbar,
body.is-mobile .data-table.kv-cards tbody td[data-label="最新动态"] > *::-webkit-scrollbar {
  display: none;
}
/* 2026-11-25 修「卡片左边一大片空白」的总收口：
   任何 kv-cards 的格子都不许绝对定位 / 不许留左内边距。
   原来 mb-cards 的 td:nth-child(2) 是 position:absolute; right:12px，
   把卡号甩到右上角、左侧空一整列 —— 用户截图那条空白就是它。 */
body.is-mobile .data-table.kv-cards tbody td {
  position: static !important;
  float: none !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  text-align: left !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
/* 卡号这类次要信息：整行右对齐，不再绝对定位 */
body.is-mobile .data-table.kv-cards tbody td.kv-cardno {
  text-align: right !important;
  font-size: 10.5px !important;
  color: #b6c2d2 !important;
  padding-bottom: 2px !important;
}
/* 操作按钮 */
/* 2026-11-25 手机端操作按钮：
   会员表用的是 .act-grid（不是 .act-row），原来被固定成 3 列 × 74px，
   7 个按钮堆成 3 行共 112px 高，卡片被撑到 383px。
   改成 4 列均分，7 个按钮只占 2 行 ≈ 60px。 */
body.is-mobile .data-table.kv-cards tbody td.actions .act-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 5px !important;
  width: 100% !important;
}
body.is-mobile .data-table.kv-cards tbody td.actions .act-grid > .btn,
body.is-mobile .data-table tbody td.actions .act-grid > button {
  min-width: 0 !important;
  width: 100% !important;
  padding: 5px 1px !important;
  font-size: 11px !important;
  line-height: 1.15 !important;
  min-height: 30px !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  justify-content: center;
}
/* 2026-11-25：会员表 7 个按钮要压到 2 行以内且更矮。
   4 列 × 30px + 5px 间距 ≈ 65px（原 77px）。 */
body.is-mobile .data-table.kv-cards tbody td.actions {
  padding-top: 4px !important;
  margin-top: 2px !important;
}
/* 7 个按钮原来垂直堆成 112px 高，改成每行 4 个的网格，高度降到 ~60px。 */
/* 2026-11-25 操作按钮布局：
   原来固定 4 列 grid → 出团管理只有 3 个按钮时每列被压到 27px，
   图标按钮 ✏️/🗑 只剩 20px（手指点不到，体检脚本报 FAIL）。
   改成 flex 弹性：每个按钮至少 62px，放不下就换行。
   会员表 7 个按钮 → 一行 4 个；出团管理 3 个 → 一行 3 个各 100px+。 */
body.is-mobile .data-table.kv-cards tbody td.actions .act-row,
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.kv-cards tbody td.actions .act-row > .btn,
body.is-mobile .data-table tbody td.actions .act-row > .btn,
body.is-mobile .data-table tbody td.actions .act-row > button {
  flex: 1 1 62px !important;
  min-width: 62px !important;
  width: auto !important;
  justify-content: center;
  padding: 6px 4px !important;
  font-size: 11.5px !important;
  line-height: 1.25 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 分组标题条（成交记录按团分组、其它按地区分组）——手机上做成黄色横幅 */
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;
}

/* ============================================================
   📮 交账中（2026-11-25）
   ============================================================ */
.ds-wrap { padding: 2px 0 20px; }
.ds-head { margin-bottom: 10px; }
.ds-title { font-size: 17px; font-weight: 800; color: #1a1a2e; }
.ds-sub { font-size: 12px; color: #8892a4; margin-top: 2px; }

/* 月份选择 */
.ds-month {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 9px;
  padding: 8px 11px; margin-bottom: 10px; font-size: 12.5px; color: #475569;
}
.ds-month select {
  flex: 1; min-width: 0; padding: 5px 8px; font-size: 12.5px;
  border: 1px solid #d0d5dd; border-radius: 6px; background: #fff;
}

/* 四个统计卡片：手机 2×2，桌面 4 列 */
.ds-cards {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 8px; margin-bottom: 12px;
}
.ds-card {
  background: #fff; border-radius: 11px; padding: 11px 12px;
  border: 1px solid #e8edf4; box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
.ds-card .k { font-size: 11.5px; color: #8892a4; margin-bottom: 5px; white-space: nowrap; }
.ds-card .v { font-size: 19px; font-weight: 800; letter-spacing: -.3px; line-height: 1.15; }
.ds-card.a .v { color: #1a73e8; }
.ds-card.b .v { color: #10b981; }
.ds-card.c .v { color: #f59e0b; }
.ds-card.d .v { color: #7c3aed; }
.ds-card .ds-tot { font-size: 11px; font-weight: 500; color: #94a3b8; margin-left: 3px; }
@media (min-width: 760px) {
  .ds-cards { grid-template-columns: repeat(4, 1fr); }
  .ds-card .v { font-size: 22px; }
}

/* 排行榜 */
.ds-rank {
  background: #fff; border: 1px solid #e8edf4; border-radius: 11px;
  padding: 10px 12px; margin-bottom: 12px;
}
.ds-rank-t { font-size: 12.5px; font-weight: 700; color: #334155; margin-bottom: 7px; }
.ds-rank-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0; font-size: 13px; border-top: 1px solid #f3f6fa;
}
.ds-rank-row:first-of-type { border-top: none; }
.ds-rank-row .m { flex: 0 0 22px; text-align: center; font-size: 13px; }
.ds-rank-row .w { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #334155; }
.ds-rank-row .a { flex: 0 0 auto; font-weight: 700; color: #1a73e8; font-variant-numeric: tabular-nums; }
.ds-rank-row.me { background: #faf5ff; border-radius: 7px; padding-left: 6px; padding-right: 6px; }

/* 待审列表 */
.ds-sec { font-size: 13px; font-weight: 700; color: #334155; margin: 14px 0 8px; }
.ds-empty {
  background: #fff; border: 1px dashed #d8e0ea; border-radius: 10px;
  padding: 22px 14px; text-align: center; font-size: 12.5px; color: #8892a4; line-height: 1.7;
}
.ds-list { display: flex; flex-direction: column; gap: 8px; }
.ds-item {
  background: #fff; border: 1px solid #e8edf4; border-radius: 10px;
  padding: 10px 12px; cursor: pointer; transition: border-color .15s;
}
.ds-item:active { border-color: #7c3aed; }
.ds-item.adm { border-left: 3px solid #f59e0b; }
.ds-item .l1 { display: flex; align-items: center; gap: 7px; font-size: 13.5px; color: #1a1a2e; }
.ds-item .l1 b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-item .st.pending {
  flex: 0 0 auto; font-size: 10.5px; padding: 1px 7px; border-radius: 999px;
  background: #fff7e6; color: #b45309; border: 1px solid #fde68a; font-weight: 700;
}
.ds-item .l2 { font-size: 11.5px; color: #64748b; margin-top: 4px; }
.ds-item .l3 { font-size: 11px; color: #94a3b8; margin-top: 2px; }

/* 明细表（可编辑） */
.ds-bhead { display: flex; align-items: baseline; gap: 8px; margin-bottom: 9px; font-size: 13px; }
.ds-bhead span { font-size: 11.5px; color: #8892a4; }
.ds-tblwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 8px; border: 1px solid #e8edf4; }
.ds-tbl { border-collapse: collapse; width: 100%; min-width: 560px; background: #fff; }
.ds-tbl th {
  background: #f7f9fc; font-size: 11.5px; color: #64748b; font-weight: 600;
  padding: 7px 8px; text-align: left; white-space: nowrap; border-bottom: 1px solid #e8edf4;
}
.ds-tbl td { border-bottom: 1px solid #f3f6fa; padding: 0; }
.ds-tbl tr:last-child td { border-bottom: none; }
.ds-in {
  width: 100%; box-sizing: border-box; border: none; background: transparent;
  padding: 8px; font-size: 12.5px; color: #1a1a2e; border-radius: 5px;
  transition: background .15s;
}
.ds-in:focus { outline: 2px solid #c4b5fd; outline-offset: -2px; background: #fff; }
.ds-tip { font-size: 11.5px; color: #8892a4; margin-top: 9px; line-height: 1.6; }

/* ============================================================
   手机端成交卡片：真正压缩空白（2026-11-25 二次修）
   ────────────────────────────────────────────────────
   第一次改错了：只把 td 改成 block + 去掉列名前缀，
   结果 9 个字段还是各占一行 → 卡片仍 285px 高，右边全空。
   而且 td 的 data-label 实际是空的，attr(data-label) 取不到东西。

   正确做法：用 nth-child 把短字段两两并排（CSS Grid），
   长字段（客户名、操作）独占整行。
   列序：1日期 2客户 3手机 4出发 5天数 6回团 7收客价 8利润 9操作
   ============================================================ */
@media (max-width: 768px) {
  /* 卡片本身做成网格容器：两列 */
  body.is-mobile .data-table.kv-deal tbody tr:not(.kv-group),
  .data-table.kv-deal tbody tr:not(.kv-group) {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    column-gap: 10px;
    row-gap: 2px;
    padding: 9px 11px !important;
    margin-bottom: 7px !important;
    align-items: start;
  }
  /* 每个格子：取消 block 独占，回到正常流 */
  body.is-mobile .data-table.kv-deal tbody tr:not(.kv-group) > td,
  .data-table.kv-deal tbody tr:not(.kv-group) > td {
    display: block !important;
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 2px 0 !important;
    font-size: 12.5px !important;
    line-height: 1.5 !important;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* 不再显示列名前缀（原来 66px 占位的元凶） */
  body.is-mobile .data-table.kv-deal tbody tr:not(.kv-group) > td::before,
  .data-table.kv-deal tbody tr:not(.kv-group) > td::before {
    content: none !important;
    display: none !important;
  }

  /* ① 日期：独占第一行，小灰字 */
  body.is-mobile .data-table.kv-deal tbody tr:not(.kv-group) > td:nth-child(1),
  .data-table.kv-deal tbody tr:not(.kv-group) > td:nth-child(1) {
    grid-column: 1 / -1;
    font-size: 11px !important;
    color: #94a3b8 !important;
    padding-bottom: 0 !important;
  }
  /* ② 客户名+业务员：独占整行 */
  body.is-mobile .data-table.kv-deal tbody tr:not(.kv-group) > td:nth-child(2),
  .data-table.kv-deal tbody tr:not(.kv-group) > td:nth-child(2) {
    grid-column: 1 / -1;
  }
  /* ③ 手机：独占整行（要完整显示号码） */
  body.is-mobile .data-table.kv-deal tbody tr:not(.kv-group) > td:nth-child(3),
  .data-table.kv-deal tbody tr:not(.kv-group) > td:nth-child(3) {
    grid-column: 1 / -1;
    font-size: 12px !important;
    color: #64748b !important;
  }
  /* ④⑤ 出发 / 天数 → 并排左 右 */
  /* ⑥⑦ 回团 / 收客价 → 并排左 右 */
  /* ⑧ 利润 → 左列； ⑨ 操作 → 右列 */
  body.is-mobile .data-table.kv-deal tbody tr:not(.kv-group) > td:nth-child(4),
  body.is-mobile .data-table.kv-deal tbody tr:not(.kv-group) > td:nth-child(6),
  body.is-mobile .data-table.kv-deal tbody tr:not(.kv-group) > td:nth-child(8),
  .data-table.kv-deal tbody tr:not(.kv-group) > td:nth-child(4),
  .data-table.kv-deal tbody tr:not(.kv-group) > td:nth-child(6),
  .data-table.kv-deal tbody tr:not(.kv-group) > td:nth-child(8) {
    grid-column: 1;
  }
  body.is-mobile .data-table.kv-deal tbody tr:not(.kv-group) > td:nth-child(5),
  body.is-mobile .data-table.kv-deal tbody tr:not(.kv-group) > td:nth-child(7),
  body.is-mobile .data-table.kv-deal tbody tr:not(.kv-group) > td:nth-child(9),
  .data-table.kv-deal tbody tr:not(.kv-group) > td:nth-child(5),
  .data-table.kv-deal tbody tr:not(.kv-group) > td:nth-child(7),
  .data-table.kv-deal tbody tr:not(.kv-group) > td:nth-child(9) {
    grid-column: 2;
  }
  /* 数值醒目一点 */
  body.is-mobile .data-table.kv-deal tbody tr:not(.kv-group) > td:nth-child(7),
  body.is-mobile .data-table.kv-deal tbody tr:not(.kv-group) > td:nth-child(8),
  .data-table.kv-deal tbody tr:not(.kv-group) > td:nth-child(7),
  .data-table.kv-deal tbody tr:not(.kv-group) > td:nth-child(8) {
    font-weight: 700 !important;
    font-variant-numeric: tabular-nums;
  }
  /* 操作按钮右对齐、别占太宽 */
  body.is-mobile .data-table.kv-deal tbody tr:not(.kv-group) > td:nth-child(9),
  .data-table.kv-deal tbody tr:not(.kv-group) > td:nth-child(9) {
    text-align: right;
    padding-top: 4px !important;
  }
  body.is-mobile .data-table.kv-deal tbody tr:not(.kv-group) > td:nth-child(9) .btn,
  .data-table.kv-deal tbody tr:not(.kv-group) > td:nth-child(9) .btn {
    min-width: 0 !important;
    padding: 4px 8px !important;
    font-size: 11.5px !important;
  }

  /* 团头横幅收紧 */
  body.is-mobile .data-table.kv-cards tbody tr.kv-group,
  .data-table.kv-cards tbody tr.kv-group {
    padding: 7px 10px !important;
    margin: 9px 0 6px 0 !important;
  }

  /* ── 二次压缩（2026-11-25 截图复核后）──────────────────
     ① 客户名前一行日期(1) + 客户名(2) 并排，省一整行
     ② 手机号(3) 不再独占，跟日期那行合到右侧
     ③ 业务员/单号那三行内部压紧
     ④ 行间距再收 1px
     ──────────────────────────────────────────────── */
  /* 日期和手机号同一行：日期占左列，手机占右列 */
  body.is-mobile .data-table.kv-deal tbody tr:not(.kv-group) > td:nth-child(1),
  .data-table.kv-deal tbody tr:not(.kv-group) > td:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
  }
  body.is-mobile .data-table.kv-deal tbody tr:not(.kv-group) > td:nth-child(3),
  .data-table.kv-deal tbody tr:not(.kv-group) > td:nth-child(3) {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    text-align: right;
    font-size: 11.5px !important;
  }
  /* 客户名块紧跟其后，独占整行 */
  body.is-mobile .data-table.kv-deal tbody tr:not(.kv-group) > td:nth-child(2),
  .data-table.kv-deal tbody tr:not(.kv-group) > td:nth-child(2) {
    grid-row: 2;
    margin-bottom: 2px;
  }
  /* 客户名块内部三行压紧 */
  body.is-mobile .data-table.kv-deal tbody tr:not(.kv-group) > td:nth-child(2) > div,
  .data-table.kv-deal tbody tr:not(.kv-group) > td:nth-child(2) > div {
    line-height: 1.35 !important;
    font-size: 10.5px !important;
    margin-top: 1px !important;
  }
  /* 行间距再收 */
  body.is-mobile .data-table.kv-deal tbody tr:not(.kv-group),
  .data-table.kv-deal tbody tr:not(.kv-group) {
    row-gap: 0 !important;
  }
}

/* ============================================================
   ⚙️ AI 识别设置（2026-11-25）
   ============================================================ */
.ds-aip-entry { margin: -4px 0 10px; }
.ds-aip-entry .btn { font-size: 12px; padding: 5px 11px; }
.aip-tip {
  background: #f5f3ff; border: 1px solid #ddd6fe; color: #5b21b6;
  border-radius: 9px; padding: 10px 12px; font-size: 12.5px; line-height: 1.7;
  margin-bottom: 12px;
}
.aip-sec {
  font-size: 13px; font-weight: 700; color: #334155;
  margin: 14px 0 8px; padding-bottom: 5px; border-bottom: 1px solid #eef2f7;
}
.aip-item { margin-bottom: 12px; }
.aip-fld { font-size: 12px; color: #64748b; margin: 8px 0 4px; font-weight: 600; }
.aip-ta {
  width: 100%; box-sizing: border-box; min-height: 78px;
  border: 1px solid #d0d5dd; border-radius: 8px; padding: 9px 10px;
  font-size: 12.5px; line-height: 1.7; font-family: inherit; color: #1a1a2e;
  resize: vertical; background: #fff;
}
.aip-ta:focus { outline: 2px solid #c4b5fd; outline-offset: -1px; }
.aip-ta[readonly] { background: #f7f9fc; color: #64748b; }
.aip-in {
  width: 100%; box-sizing: border-box; border: 1px solid #d0d5dd;
  border-radius: 8px; padding: 8px 10px; font-size: 12.5px;
  font-family: inherit; color: #1a1a2e; background: #fff; margin-bottom: 2px;
}
.aip-in:focus { outline: 2px solid #c4b5fd; outline-offset: -1px; }
.aip-empty {
  background: #fff; border: 1px dashed #d8e0ea; border-radius: 10px;
  padding: 18px 14px; text-align: center; font-size: 12.5px; color: #8892a4;
}
.aip-flist { display: flex; flex-direction: column; gap: 7px; }
.aip-frow {
  display: flex; align-items: center; gap: 9px;
  background: #fff; border: 1px solid #e8edf4; border-radius: 9px; padding: 9px 11px;
}
.aip-fname { flex: 1; min-width: 0; font-size: 13px; color: #1a1a2e; }
.aip-fname code {
  font-size: 11px; background: #f1f5f9; color: #64748b;
  padding: 1px 5px; border-radius: 4px; margin-left: 4px;
}
.aip-fmeta { font-size: 11px; color: #94a3b8; margin-top: 3px; }
.aip-fops { display: flex; gap: 5px; flex: 0 0 auto; }
.aip-fops .btn { font-size: 11.5px; padding: 4px 9px; }
@media (max-width: 768px) {
  .aip-frow { flex-wrap: wrap; }
  .aip-fops { width: 100%; justify-content: flex-end; margin-top: 6px; }
}

/* ============================================================
   📥 导出成交表弹窗（2026-11-25）
   ============================================================ */
.dep-item {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; background: #fff; border: 1px solid #e8edf4;
  border-radius: 10px; padding: 11px 13px; margin-bottom: 8px;
}
.dep-item.mine {
  border-color: #a7f3d0; background: #f0fdf4; cursor: pointer;
}
.dep-item.mine:active { background: #dcfce7; }
.dep-n { flex: 1; min-width: 0; font-size: 13.5px; color: #1a1a2e; font-weight: 600; }
.dep-n small { display: block; font-size: 11px; color: #94a3b8; font-weight: 400; margin-top: 2px; }
.dep-a { flex: 0 0 auto; font-size: 12.5px; color: #10b981; font-weight: 700; }
.dep-sec {
  font-size: 12.5px; font-weight: 700; color: #334155;
  margin: 14px 0 8px; padding-bottom: 5px; border-bottom: 1px solid #eef2f7;
}
.dep-req {
  display: flex; align-items: center; justify-content: space-between;
  gap: 9px; background: #f8fafc; border: 1px solid #e8edf4;
  border-radius: 9px; padding: 9px 11px; margin-bottom: 6px;
}
.dep-st { font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: 700; white-space: nowrap; }
.dep-st.ok   { background: #dcfce7; color: #15803d; }
.dep-st.wait { background: #fff7e6; color: #b45309; }
.dep-st.no   { background: #fee2e2; color: #b91c1c; }

/* 交账中作为「成交管理」子视图时的返回栏（2026-11-25） */
.ds-backbar { margin-bottom: 10px; }
.ds-backbar .btn {
  font-size: 12px; padding: 5px 11px;
  border-color: #cbd5e1; color: #475569;
}
@media (max-width: 768px) {
  .ds-backbar { position: sticky; top: 0; z-index: 5; padding: 6px 0; background: #f0f2f5; }
}

/* ============================================================
   📅 排班（2026-11-25）
   卡片格式：前台 s1曾丽民(正常) s2肖庆(带团划线)  侧台 …
   ============================================================ */
.duty-wrap { padding: 2px 0 24px; }
.duty-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.duty-title { font-size: 17px; font-weight: 800; color: #1a1a2e; }
.duty-sub { font-size: 12px; color: #8892a4; }

/* 智能输入框 */
.duty-ai {
  background: #faf8ff; border: 1px solid #e9e3ff; border-radius: 11px;
  padding: 10px 12px; margin-bottom: 12px;
}
.duty-ta {
  width: 100%; box-sizing: border-box; min-height: 66px;
  border: 1px solid #ddd6fe; border-radius: 9px; padding: 9px 10px;
  font-size: 12.5px; line-height: 1.65; font-family: inherit; color: #1a1a2e;
  resize: vertical; background: #fff;
}
.duty-ta:focus { outline: 2px solid #c4b5fd; outline-offset: -1px; }
.duty-ai-ops { display: flex; gap: 7px; margin-top: 8px; flex-wrap: wrap; }
.duty-tip { font-size: 12px; margin-top: 7px; line-height: 1.6; color: #64748b; }

/* 翻页条 */
.duty-nav {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap;
}
.duty-range { font-size: 12px; color: #64748b; font-weight: 600; padding: 0 4px; }

/* 卡片网格：一行 7 个 */
.duty-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 8px; margin-bottom: 4px;
}
.duty-fold { display: none; margin-top: 10px; }
.duty-fold.show { display: grid; }
.duty-foldbar {
  background: #fff; border: 1px dashed #cbd5e1; border-radius: 9px;
  padding: 9px 12px; margin: 10px 0 0; font-size: 12.5px; color: #64748b;
  cursor: pointer; user-select: none;
}
.duty-foldbar:active { background: #f8fafc; }

/* 单张卡片 */
.duty-card {
  background: #fff; border: 1px solid #e8edf4; border-radius: 10px;
  padding: 8px 9px; min-height: 92px; box-sizing: border-box;
}
.duty-card.wk { background: #fefefe; border-color: #fde8e8; }
.duty-card.today { border-color: #a78bfa; border-width: 2px; background: #fbf9ff; padding: 7px 8px; }
.duty-date {
  font-size: 12px; font-weight: 700; color: #334155;
  padding-bottom: 5px; margin-bottom: 5px; border-bottom: 1px solid #f1f5f9;
  display: flex; align-items: center; gap: 4px; white-space: nowrap;
}
.duty-date em { font-style: normal; font-size: 10.5px; color: #94a3b8; font-weight: 500; }
.today-tag {
  font-size: 9px; background: #7c3aed; color: #fff;
  padding: 1px 5px; border-radius: 999px; font-weight: 700; margin-left: auto;
}
.duty-line { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 4px; align-items: center; }
.duty-post {
  font-size: 10px; color: #fff; background: #6366f1;
  padding: 1px 5px; border-radius: 4px; font-weight: 700; flex: 0 0 auto;
}
.duty-post.side { background: #0ea5e9; }

/* 人员小块 */
.dp {
  font-size: 10.5px; color: #1a1a2e; background: #f8fafc;
  border: 1px solid #e8edf4; border-radius: 5px; padding: 1px 4px;
  cursor: pointer; white-space: nowrap; line-height: 1.5;
}
.dp b { font-weight: 600; }
.dp i { font-style: normal; color: #94a3b8; font-size: 9.5px; margin-left: 1px; }
.dp.mine { border-color: #c4b5fd; background: #faf5ff; }

/* ★ 带团/请假：灰色 + 删除线（用户要求） */
.dp.away {
  color: #b6bfcc !important;
  background: #f4f6f8 !important;
  border-color: #eceff3 !important;
  text-decoration: line-through;
  text-decoration-color: #cbd5e1;
}
.dp.away b, .dp.away i { color: #b6bfcc !important; }

/* 空位 */
.dp.empty {
  color: #c7d0dc; background: #fff; border: 1px dashed #dde5ee;
}

/* 手机端：一天一卡，单列 */
@media (max-width: 768px) {
  .duty-grid { grid-template-columns: 1fr; gap: 7px; }
  .duty-card { min-height: 0; padding: 10px 12px; }
  .duty-date { font-size: 13px; }
  .dp { font-size: 12px; padding: 3px 7px; }
  .duty-post { font-size: 10.5px; padding: 2px 6px; }
  .duty-fold.show { display: grid; }
  .duty-ai-ops .btn { flex: 1 1 auto; }
}
/* 平板：一行 4 个 */
@media (min-width: 761px) and (max-width: 1100px) {
  .duty-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ── s序号：红字（用户要求「s1表示左边开始的顺序序号，红字标识」）── */
.dp-sn {
  font-style: normal;
  color: #dc2626 !important;
  font-weight: 700;
  font-size: 10px;
  margin-right: 1px;
  letter-spacing: -.2px;
}
.dp.away .dp-sn { color: #f0a8a8 !important; }
.dp.empty .dp-sn { color: #f2b8b8 !important; }

/* ── 排班设置弹窗 ── */
@media (max-width: 768px) {
  /* 2026-11-25 手机端「⚙️ 设置」被挤/被遮：
     原来 duty-head 是 flex + nowrap，标题+副标题+按钮挤在一行，
     小屏（375/390）上按钮容易贴边或被顶部栏压住。
     改成两行：标题+按钮一行，副标题换行到下面。 */
  .duty-head {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 6px 8px !important;
    margin-bottom: 8px !important;
  }
  .duty-head .duty-title {
    font-size: 16px !important;
    white-space: nowrap;
  }
  .duty-head .duty-sub {
    order: 3;
    flex: 0 0 100%;
    font-size: 11.5px !important;
    color: #94a3b8;
  }
  .duty-set-btn {
    margin-left: auto !important;
    flex: 0 0 auto !important;
    font-size: 12.5px !important;
    padding: 6px 12px !important;
    min-height: 34px;
    min-width: 76px;
    white-space: nowrap;
    /* 确保不被任何父容器的 overflow 裁掉 */
    position: relative;
    z-index: 2;
  }
}
.dset-row { display: flex; gap: 9px; margin-bottom: 8px; flex-wrap: wrap; }
.dset-f { flex: 1; min-width: 110px; }
.dset-f label {
  display: block; font-size: 11.5px; color: #64748b;
  font-weight: 600; margin-bottom: 3px;
}
.dset-tip {
  font-size: 11.5px; color: #8892a4; line-height: 1.65;
  background: #f8fafc; border-radius: 7px; padding: 7px 9px; margin-bottom: 9px;
}
.dset-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.dset-item {
  display: flex; align-items: center; justify-content: space-between; gap: 9px;
  background: #fff; border: 1px solid #e8edf4; border-radius: 8px; padding: 8px 11px;
  font-size: 13px;
}
.dset-item small { display: block; font-size: 11px; color: #94a3b8; margin-top: 2px; }
.dset-add {
  border-top: 1px dashed #e2e8f0; padding-top: 11px; margin-top: 11px;
}
@media (max-width: 768px) {
  .dset-row { flex-direction: column; }
  .dset-f { flex: 1 1 auto; }
}

/* ── 小日历卡片（2026-11-25）── */
.dcal {
  background: #fff; border: 1px solid #e8edf4; border-radius: 11px;
  padding: 10px 12px; margin-bottom: 12px; max-width: 320px;
}
.dcal-hd {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px; font-size: 13px; font-weight: 700; color: #334155;
}
.dcal-hd button {
  width: 26px; height: 26px; border: 1px solid #e2e8f0; background: #fff;
  border-radius: 6px; cursor: pointer; font-size: 15px; line-height: 1;
  color: #64748b; padding: 0;
}
.dcal-wk {
  display: grid; grid-template-columns: repeat(7, 1fr);
  font-size: 10.5px; color: #94a3b8; text-align: center; margin-bottom: 4px;
}
.dcal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dcal-e { height: 26px; }
.dcal-d {
  height: 26px; display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: #334155; border-radius: 6px; cursor: pointer;
}
.dcal-d:active { background: #f1f5f9; }
.dcal-d.wk { color: #94a3b8; }
.dcal-d.today { color: #7c3aed; font-weight: 800; }
.dcal-d.sel { background: #7c3aed; color: #fff; font-weight: 700; }

/* ── 周规则勾选 chips ── */
/* 2026-11-25 修「七天勾不上」：
   实测 7 个 checkbox 都能 checked=true，但视觉没变化（背景仍 #fff），
   说明 input:checked + span 被别处同权重规则覆盖了。
   这里全部加 !important，并同时用 :has() 兜底（不依赖兄弟选择器）。 */
.wkchips { display: flex; gap: 5px; flex-wrap: wrap; }
.wkchip { cursor: pointer; user-select: none; display: inline-block; }
.wkchip input { display: none !important; }
.wkchip span {
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  width: 32px !important; height: 32px !important;
  border: 1.5px solid #d8e0ea !important; border-radius: 8px !important;
  font-size: 12.5px !important; color: #94a3b8 !important;
  background: #fff !important; transition: .12s;
  box-sizing: border-box;
}
.wkchip input:checked + span,
.wkchip:has(input:checked) span {
  background: #7c3aed !important;
  color: #fff !important;
  border-color: #7c3aed !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 4px rgba(124,58,237,.35);
}

/* ── 特殊排班标记 ── */
.dp.special { border-color: #fbbf24 !important; background: #fffbeb !important; }
.dp-sp {
  font-style: normal; text-decoration: none;
  font-size: 9px; color: #b45309; background: #fef3c7;
  border: 1px solid #fde68a; border-radius: 3px;
  padding: 0 3px; margin-left: 2px; cursor: pointer;
}
.dp.away .dp-sp { display: none; }
@media (max-width: 768px) {
  .dcal { max-width: none; }
}

/* ============================================================
   2026-11-25 从 index.html 迁入（统一到「手机端样式只在这一个文件里」）
   原来这两段写在 index.html 内联 <style> 里，和 mobile.css 的规则互相覆盖，
   谁生效取决于书写顺序 —— 这就是「调一下就乱」的根源之一。
   ============================================================ */
/* ============================================================
   2026-11-25 出团管理手机端收口（体检脚本查出的两个问题）
   ① 图标按钮 ✏️/🗑 只有 20px 宽 → 手指点不到（判据 <26px FAIL）
   ② 卡片 242px 高 → 8 个字段各占一行（团号/线路/出发/天数/回团/导游/经手人/状态）
      压法同成交记录：短字段两两并排，长字段独占整行。
   ============================================================ */
@media (max-width: 768px) {
  /* ① 操作按钮：列宽随按钮数量自适应，每列至少 62px
     （原来 act-row 是固定 4 列均分，出团管理只有 3 个按钮 → 每列被压到 27px，
       图标按钮 ✏️/🗑 只剩 20px，手指点不到） */
  .data-table tbody td.actions .act-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  .data-table tbody td.actions .act-row > .btn,
  .data-table tbody td.actions .act-row > button {
    flex: 1 1 62px !important;
    min-width: 62px !important;
    min-height: 32px !important;
    padding: 6px 4px !important;
  }

  /* ② 出团卡片：短字段两两并排 */
  body.is-mobile .data-table.kv-cards tbody tr:has(td[data-label="团号"]) {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    column-gap: 10px;
    row-gap: 3px;
    padding: 9px 11px !important;
  }
  /* 团号 + 线路 + 操作：独占整行 */
  body.is-mobile .data-table.kv-cards tbody tr:has(td[data-label="团号"]) > td[data-label="团号"],
  body.is-mobile .data-table.kv-cards tbody tr:has(td[data-label="团号"]) > td[data-label="线路"],
  body.is-mobile .data-table.kv-cards tbody tr:has(td[data-label="团号"]) > td.actions {
    grid-column: 1 / -1;
  }
  /* 并排的格子：列名小字在上、值在下，宽度均分 */
  body.is-mobile .data-table.kv-cards tbody tr:has(td[data-label="团号"]) > td[data-label] {
    width: auto !important;
    min-width: 0 !important;
  }
  /* 空值格（导游为空）不占位 */
  body.is-mobile .data-table.kv-cards tbody tr:has(td[data-label="团号"]) > td.kv-zero {
    display: none !important;
  }
}

/* ── 从 index.html 迁入的第二段：弹窗 + 表格卡片化 ── */
@media (max-width: 768px) {
  /* 询价弹窗双栏 → 单栏 */
  .modal.modal-qt .modal-body.qt-wrap { grid-template-columns: 1fr; gap: 12px; padding: 12px; }
  .modal.modal-qt .qt-right { max-height: 30vh; }
  .modal.modal-qt .qt-footer { padding: 10px 12px; }
  .modal.modal-qt .qt-footer .btn { flex: 1; min-width: 0; }

  /* 表格卡片化基础：不横滑、主内容占满 */
  .data-table { min-width: 0 !important; width: 100% !important; }
  .data-table td.actions { min-width: 100% !important; width: 100% !important;
    padding: 8px 4px !important; }
  .data-table td.actions .act-row { gap: 5px; }
  .data-table td.actions .act-row > .btn { min-width: 62px; min-height: 32px;
    padding: 7px 9px; font-size: 12px; }
  #table-container { overflow-x: visible !important; }
  .main { margin-left: 0 !important; max-width: 100vw !important; }
}

/* ============================================================
   排班设置 · 三标签页（2026-11-25 重做，用户要求「简洁、业务员好操作」）
   ============================================================ */
.dtabs {
  display: flex; gap: 4px; margin-bottom: 12px;
  border-bottom: 1px solid #e8edf4; padding-bottom: 8px; flex-wrap: wrap;
}
.dtab {
  flex: 0 0 auto; padding: 6px 11px; border-radius: 8px;
  border: 1px solid #e2e8f0; background: #fff; color: #64748b;
  font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.dtab.on { background: #7c3aed; border-color: #7c3aed; color: #fff; }

/* 每周规则一览（所有人可见） */
.wklist { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.wkrow {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: #fff; border: 1px solid #e8edf4; border-radius: 9px; padding: 8px 11px;
}
.wkrow-l { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.wkrow-l b { font-weight: 700; color: #1a1a2e; }
.wkrow-l span { font-size: 11px; color: #94a3b8; }
.wkrow-r { display: flex; align-items: center; gap: 3px; }
.wkc {
  width: 24px; height: 24px; display: inline-flex; align-items: center;
  justify-content: center; border-radius: 6px; font-size: 11.5px;
  background: #f8fafc; color: #cbd5e1; border: 1px solid #eef2f7;
}
.wkc.on { background: #7c3aed; color: #fff; border-color: #7c3aed; font-weight: 700; }
.wkc-del {
  width: 24px; height: 24px; border-radius: 6px; border: 1px solid #fecaca;
  background: #fef2f2; color: #dc2626; font-size: 12px; cursor: pointer;
  margin-left: 4px; padding: 0; line-height: 1;
}

/* 快捷勾选按钮 */
.qk {
  padding: 5px 11px; border-radius: 7px; border: 1px solid #d8e0ea;
  background: #fff; color: #475569; font-size: 12px; cursor: pointer;
}
.qk:active { background: #f1f5f9; }

/* 新增块 */
.dsadd {
  border-top: 1px dashed #e2e8f0; padding-top: 12px; margin-top: 12px;
}
.dsadd-title { font-size: 12.5px; font-weight: 700; color: #7c3aed; margin-bottom: 8px; }

/* 月度统计表 */
.stbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.stbl th {
  background: #f8fafc; color: #64748b; font-weight: 600; font-size: 11.5px;
  padding: 6px 4px; text-align: center; border-bottom: 1px solid #e8edf4;
  white-space: nowrap;
}
.stbl th:first-child, .stbl td:first-child { text-align: left; padding-left: 8px; }
.stbl td { padding: 7px 4px; text-align: center; border-bottom: 1px solid #f1f5f9; }
.stbl tbody tr:active { background: #faf5ff; }
.stbl .num { font-variant-numeric: tabular-nums; }
.stbl .tour { color: #0ea5e9; font-weight: 700; }
.stbl .leave { color: #f59e0b; font-weight: 700; }
.stbl .rest { color: #94a3b8; }
.stbl .sp { color: #b45309; font-weight: 700; }
.stbl td.normal { color: #10b981; }
.stbl td.tour { color: #0ea5e9; font-weight: 600; }
.stbl td.leave { color: #f59e0b; font-weight: 600; }

@media (max-width: 768px) {
  .dtabs { gap: 3px; }
  .dtab { padding: 5px 9px; font-size: 12px; }
  .wkrow { padding: 7px 9px; }
  .wkrow-l { font-size: 12.5px; }
  .wkc { width: 22px; height: 22px; font-size: 11px; }
  .stbl { font-size: 12px; }
  .stbl th, .stbl td { padding: 6px 2px; }
}

/* ============================================================
   排班规则编辑器（2026-11-25 重做）
   用户要求：七天自由勾选、每天独立时段、命名保存、可复制
   ============================================================ */
.rsec {
  display: flex; align-items: baseline; gap: 8px;
  margin-bottom: 8px; flex-wrap: wrap;
}
.rsec-t { font-size: 13px; font-weight: 700; color: #1a1a2e; }
.rsec-s { font-size: 11px; color: #94a3b8; }

/* 七天行：每天一行 「☑ 周一  08:30 ~ 17:30」 */
.rkdays { display: flex; flex-direction: column; gap: 6px; }
.rkday {
  display: flex; align-items: center; gap: 10px;
  background: #f8fafc; border: 1.5px solid #e8edf4; border-radius: 9px;
  padding: 8px 11px; transition: .12s;
}
.rkday.on { background: #faf5ff; border-color: #c4b5fd; }
.rkday-hd { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; cursor: pointer; }
.rk-on {
  width: 20px !important; height: 20px !important;
  accent-color: #7c3aed; cursor: pointer; margin: 0;
  flex: 0 0 auto;
}
.rkday-n { font-size: 13.5px; font-weight: 600; color: #94a3b8; min-width: 42px; }
.rkday.on .rkday-n { color: #1a1a2e; font-weight: 700; }
.rkday-time {
  display: flex; align-items: center; gap: 5px; flex: 1;
  justify-content: flex-end;
}
.rkday:not(.on) .rkday-time { opacity: .35; pointer-events: none; }
.rkday-time input[type="time"] {
  border: 1px solid #dde5ee; border-radius: 6px; padding: 4px 5px;
  font-size: 12px; color: #334155; background: #fff;
  width: 84px; font-family: inherit;
}
.rkday-time span { color: #cbd5e1; font-size: 11px; }

/* 快捷预设 */
.rk-quick { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 10px; }

/* 已保存规则卡片 */
.rsets { display: flex; flex-direction: column; gap: 8px; }
.rset {
  background: #fff; border: 1px solid #e8edf4; border-radius: 10px;
  padding: 10px 12px;
}
.rset-hd { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.rset-hd b { font-size: 13.5px; color: #1a1a2e; }
.rset-t { font-size: 11px; color: #7c3aed; background: #faf5ff; padding: 1px 6px; border-radius: 5px; }
.rset-u { font-size: 10.5px; color: #94a3b8; }
.rset-wk { display: flex; gap: 3px; margin-bottom: 8px; }
.wc {
  width: 24px; height: 24px; display: inline-flex; align-items: center;
  justify-content: center; border-radius: 6px; font-size: 11.5px;
  background: #f8fafc; color: #cbd5e1; border: 1px solid #eef2f7;
}
.wc.on { background: #7c3aed; color: #fff; border-color: #7c3aed; font-weight: 700; }
.rset-ops { display: flex; gap: 5px; }
.rset-ops .qk { font-size: 11.5px; padding: 4px 10px; }
.rset-ops .qk.del { color: #dc2626; border-color: #fecaca; background: #fef2f2; }

@media (max-width: 768px) {
  .rkday { padding: 9px 10px; gap: 7px; }
  .rkday-time input[type="time"] { width: 78px; font-size: 12px; }
  .rkday-n { min-width: 38px; font-size: 13px; }
}

/* 规则卡片按钮（2026-11-25 补齐：套用/复制/编辑/删除） */
.rset-ops { display: flex; gap: 5px; flex-wrap: wrap; }
.rset-ops .qk.pri {
  background: #7c3aed; color: #fff; border-color: #7c3aed; font-weight: 600;
}
.rset-o {
  font-size: 10px; color: #94a3b8; background: #f8fafc;
  padding: 1px 5px; border-radius: 4px;
}
/* 七天小圆点悬停能看到具体时段（title） */
.rset-wk .wc { cursor: help; }

/* ═══════════════════════════════════════════════
   排班框架 v2（2026-11-25）：模板 → 绑定 → 生成
   ═══════════════════════════════════════════════ */
.tpl-hint {
  font-size: 11.5px; color: #7c3aed; background: #faf5ff;
  border-radius: 7px; padding: 6px 9px; margin-bottom: 9px;
  line-height: 1.55;
}
/* 每天的岗位下拉 */
.rk-post {
  border: 1px solid #dde5ee; border-radius: 6px; padding: 4px 3px;
  font-size: 11.5px; color: #334155; background: #fff;
  width: 70px; font-family: inherit; flex: 0 0 auto;
}
.rkday.on .rk-post { border-color: #c4b5fd; font-weight: 600; }

/* 模板卡片 */
.tpl-list { display: flex; flex-direction: column; gap: 8px; }
.tpl-card {
  background: #fff; border: 1px solid #e8edf4; border-radius: 10px;
  padding: 10px 12px;
}
.tpl-hd { display: flex; align-items: baseline; gap: 7px; margin-bottom: 7px; flex-wrap: wrap; }
.tpl-hd b { font-size: 13.5px; color: #1a1a2e; }
.tpl-days { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 9px; }
.tpl-d {
  display: inline-flex; align-items: center; gap: 3px;
  background: #f8fafc; border: 1px solid #eef2f7; border-radius: 6px;
  padding: 2px 7px; font-size: 11px; color: #475569;
}
.tpl-d em { font-style: normal; font-weight: 700; color: #7c3aed; }
.tpl-d small { color: #94a3b8; font-size: 10px; }

/* 员工排班列表 */
.asg-list { display: flex; flex-direction: column; gap: 9px; }
.asg-person {
  background: #fff; border: 1px solid #e8edf4; border-radius: 10px; padding: 10px 12px;
}
.asg-name {
  font-size: 14px; font-weight: 700; color: #1a1a2e;
  padding-bottom: 7px; margin-bottom: 7px; border-bottom: 1px solid #f1f5f9;
}
.asg-item {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 0; flex-wrap: wrap;
}
.asg-t { font-size: 12px; color: #475569; flex: 0 0 auto; }
.asg-t b { font-weight: 600; color: #334155; }
.asg-item .rset-wk { margin-bottom: 0; flex: 1; min-width: 0; }
.asg-item .wkc-del { margin-left: auto; }

@media (max-width: 768px) {
  .rk-post { width: 64px; font-size: 11px; }
  .rkday-time { gap: 3px; }
  .asg-name { font-size: 13.5px; }
}

/* 岗位管理列表（2026-11-25） */
.post-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.post-row {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid #e8edf4; border-radius: 9px; padding: 9px 11px;
}
.post-n { flex: 1; min-width: 0; }
.post-n b { font-size: 13.5px; color: #1a1a2e; display: block; }
.post-code { font-size: 10.5px; color: #94a3b8; }
.post-s { display: flex; align-items: center; gap: 5px; }
.post-s label { font-size: 11px; color: #94a3b8; }
.post-in {
  width: 56px; border: 1px solid #dde5ee; border-radius: 6px;
  padding: 4px 6px; font-size: 12px; text-align: center;
  font-family: inherit; color: #334155;
}

/* ═══════════════════════════════════════════════
   规则与例外（2026-11-26）
   ═══════════════════════════════════════════════ */
.r2-sec {
  font-size: 11.5px; color: #64748b; font-weight: 600;
  margin: 11px 0 6px;
}
.r2-pri { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.prib {
  width: 38px; height: 34px; border-radius: 8px;
  border: 1.5px solid #dde5ee; background: #fff; color: #94a3b8;
  font-size: 13px; font-weight: 700; cursor: pointer; transition: .12s;
}
.prib.on {
  background: #7c3aed !important; color: #fff !important;
  border-color: #7c3aed !important;
  box-shadow: 0 1px 5px rgba(124,58,237,.35);
}
.r2-prit { font-size: 11.5px; color: #7c3aed; font-weight: 600; }

/* 规则列表 */
.r2list { display: flex; flex-direction: column; gap: 7px; }
.r2item {
  position: relative;
  background: #fff; border: 1px solid #e8edf4;
  border-left: 3px solid #cbd5e1;
  border-radius: 9px; padding: 9px 30px 9px 11px;
}
.r2item.cancel { border-left-color: #ef4444; }
.r2item.base { border-left-color: #22c55e; }
.r2item.special { border-left-color: #f59e0b; }
.r2i-hd { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 3px; }
.r2i-k { font-size: 10.5px; color: #64748b; }
.r2i-hd b { font-size: 13px; color: #1a1a2e; }
.r2i-ai {
  font-size: 9px; background: #ede9fe; color: #7c3aed;
  padding: 1px 5px; border-radius: 4px; font-weight: 700;
}
.r2i-pri {
  margin-left: auto; font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 5px;
}
.r2i-pri.p1 { background: #fee2e2; color: #dc2626; }
.r2i-pri.p2 { background: #ffedd5; color: #ea580c; }
.r2i-pri.p3 { background: #fef9c3; color: #ca8a04; }
.r2i-pri.p4 { background: #e0f2fe; color: #0284c7; }
.r2i-pri.p5 { background: #f1f5f9; color: #64748b; }
.r2i-bd { font-size: 11px; color: #94a3b8; line-height: 1.5; }
.r2i-bd em { font-style: normal; color: #7c3aed; font-weight: 600; }
/* 2026-11-30：删除按钮原来在卡片里掉到第二行左侧，改成右上角绝对定位 */
.r2item > .wkc-del { position: absolute; top: 8px; right: 8px; margin-left: 0; }
.r2item { padding-right: 42px; }

/* ═══════════════════════════════════════════════
   手机号/身份证 点击复制（2026-11-26）
   用户需求：电脑点一下出复制，手机触摸点一下也出复制
   ═══════════════════════════════════════════════ */
.th-sub {
  font-size: 10px; color: #94a3b8; font-weight: 400; margin-left: 2px;
}
.cell-copy { line-height: 1.35; }
.cpv {
  display: block;
  font-size: 12.5px;
  color: #334155;
  cursor: pointer;
  padding: 1px 3px;
  margin: -1px -3px;
  border-radius: 4px;
  transition: background .12s, color .12s;
  position: relative;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.cpv:hover { background: #f1f5f9; color: #7c3aed; }
.cpv:active { background: #ede9fe; }
.cpv-sub {
  font-size: 11px;
  color: #94a3b8;
  letter-spacing: .2px;
}
.cpv-sub:hover { color: #7c3aed; }
/* 复制成功反馈 */
.cpv.copied {
  background: #dcfce7 !important;
  color: #15803d !important;
}
.cpv.copied::after {
  content: '已复制';
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 6px;
  background: #15803d;
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 10;
  animation: cpvFade 1.2s forwards;
}
@keyframes cpvFade {
  0% { opacity: 0; transform: translateY(-50%) translateX(-4px); }
  15% { opacity: 1; transform: translateY(-50%) translateX(0); }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

@media (max-width: 768px) {
  .cpv { font-size: 13px; padding: 2px 4px; margin: -2px -4px; }
  .cpv-sub { font-size: 11.5px; }
  .cell-copy { width: 100%; }
}

/* ═══════════════════════════════════════════════
   批量查信息（2026-11-26）
   ═══════════════════════════════════════════════ */
.bi-wrap { padding: 2px 0 30px; }
.bi-head h3 { font-size: 17px; color: #1a1a2e; margin: 0 0 3px; }
.bi-sub { font-size: 12px; color: #94a3b8; margin-bottom: 12px; }

.bi-panel {
  background: #fff; border: 1px solid #e8edf4; border-radius: 12px;
  padding: 14px 16px; margin-bottom: 14px;
}
.bi-step {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; color: #1a1a2e; margin-bottom: 9px;
}
.bi-n {
  width: 20px; height: 20px; border-radius: 50%;
  background: #7c3aed; color: #fff; font-size: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; flex: 0 0 auto;
}
.bi-ta {
  width: 100%; min-height: 150px; box-sizing: border-box;
  border: 1.5px solid #dde5ee; border-radius: 9px;
  padding: 10px 12px; font-size: 12.5px; line-height: 1.6;
  font-family: Consolas, Monaco, monospace;
  color: #334155; resize: vertical;
}
.bi-ta:focus { outline: none; border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124,58,237,.1); }
.bi-ta::placeholder { color: #b6bfcc; }
.bi-row { margin-top: 10px; }
.bi-f label { display: block; font-size: 11.5px; color: #64748b; margin-bottom: 4px; }
.bi-actions { display: flex; gap: 8px; margin-top: 12px; }

/* 统计条 */
.bi-sum {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 11px; flex-wrap: wrap;
}
.bi-stat {
  display: flex; flex-direction: column; align-items: center;
  background: #f8fafc; border-radius: 9px; padding: 7px 14px;
  min-width: 62px;
}
.bi-stat b { font-size: 17px; line-height: 1.1; }
.bi-stat span { font-size: 10.5px; color: #94a3b8; margin-top: 1px; }
.bi-stat.ok b { color: #334155; }
.bi-stat.good b { color: #15803d; }
.bi-stat.bad b { color: #dc2626; }
.bi-stat.dup b { color: #ea580c; }
.bi-engine {
  margin-left: auto; font-size: 11px; color: #7c3aed;
  background: #faf5ff; padding: 4px 10px; border-radius: 6px;
}

/* 结果表 */
.bi-table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid #e8edf4; }
.bi-table {
  width: 100%; border-collapse: collapse; background: #fff; font-size: 12.5px;
}
.bi-table thead th {
  background: #f8fafc; color: #64748b; font-weight: 600; font-size: 11.5px;
  padding: 8px 10px; text-align: left; border-bottom: 1px solid #e8edf4;
  white-space: nowrap;
}
.bi-table tbody td {
  padding: 7px 10px; border-bottom: 1px solid #f1f5f9; color: #334155;
  vertical-align: middle;
}
.bi-table tbody tr:last-child td { border-bottom: none; }
.bi-bad-row { background: #fffbfb; }
.bi-check { font-size: 11px; }
.bi-issue { color: #dc2626; }
.bi-pass { color: #15803d; }
.bi-dup {
  font-size: 11px; background: #fff7ed; color: #ea580c;
  padding: 1px 6px; border-radius: 4px;
}
.bi-dash { color: #cbd5e1; }
.bi-warn {
  margin-top: 10px; font-size: 12px; color: #b45309;
  background: #fffbeb; border: 1px solid #fde68a;
  border-radius: 8px; padding: 8px 12px;
}
.bi-foot { display: flex; gap: 8px; margin-top: 14px; }

@media (max-width: 768px) {
  .bi-panel { padding: 12px 13px; border-radius: 10px; }
  .bi-ta { min-height: 130px; font-size: 12px; }
  .bi-stat { padding: 6px 10px; min-width: 52px; }
  .bi-stat b { font-size: 15px; }
  .bi-table { font-size: 12px; }
  .bi-table thead th, .bi-table tbody td { padding: 6px 8px; }
  .bi-actions .btn, .bi-foot .btn { flex: 1; }
}

/* 按姓名查号码结果（2026-11-26） */
.lk-list { display: flex; flex-direction: column; gap: 9px; }
.lk-item {
  background: #fff; border: 1px solid #e8edf4;
  border-left: 3px solid #7c3aed; border-radius: 10px;
  padding: 11px 13px;
}
.lk-item.lk-miss { border-left-color: #ef4444; background: #fffbfb; }
.lk-item.lk-partial { border-left-color: #f59e0b; }
.lk-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.lk-hd b { font-size: 14.5px; color: #1a1a2e; }
.lk-tag {
  font-size: 10.5px; padding: 2px 8px; border-radius: 5px; font-weight: 600;
}
.lk-tag.ok { background: #ecfdf5; color: #047857; }
.lk-tag.warn { background: #fffbeb; color: #b45309; }
.lk-tag.miss { background: #fef2f2; color: #dc2626; }

.lk-hits { display: flex; flex-direction: column; gap: 7px; }
.lk-row {
  background: #f8fafc; border-radius: 8px; padding: 8px 10px;
  border: 1px solid #eef2f7;
}
.lk-row.lk-full { background: #f6fdf9; border-color: #d1fae5; }
.lk-line { display: flex; align-items: baseline; gap: 7px; line-height: 1.5; }
.lk-k {
  font-size: 10.5px; color: #94a3b8; flex: 0 0 42px;
}
.lk-v {
  display: inline-block !important;
  font-size: 13px;
  color: #1a1a2e;
  font-weight: 600;
  letter-spacing: .3px;
}
.lk-v.cpv-sub { font-weight: 400; font-size: 12px; color: #475569; }
.lk-none { font-size: 12px; color: #cbd5e1; }
.lk-meta { font-size: 10.5px; color: #94a3b8; margin-top: 4px; }

@media (max-width: 768px) {
  .lk-item { padding: 10px 11px; }
  .lk-hd b { font-size: 14px; }
  .lk-k { flex: 0 0 38px; font-size: 10px; }
  .lk-v { font-size: 13.5px; }
}

/* AI 整理结果的备选项（2026-11-26） */
.lk-alts {
  margin-top: 7px; padding-top: 7px; border-top: 1px dashed #e8edf4;
}
.lk-alt-t { font-size: 10.5px; color: #94a3b8; margin-bottom: 3px; }
.lk-alt {
  font-size: 11.5px; color: #64748b; padding: 2px 0;
  font-family: Consolas, Monaco, monospace;
}

/* ============================================================
   📅 排班表 UI 美化（2026-11-30）
   覆盖上方老样式；整段可整块删除还原。
   ============================================================ */
.duty-wrap { padding: 4px 0 28px; }

/* 头部：标题/副标题/设置 */
.duty-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 18px; margin-bottom: 14px;
  background: linear-gradient(135deg, #f6f4ff 0%, #eef4ff 100%);
  border: 1px solid #e6e0fb; border-radius: 14px;
}
.duty-title { font-size: 19px; font-weight: 800; color: #312e81; letter-spacing: .3px; }
.duty-sub {
  font-size: 12px; color: #6d5fb0; font-weight: 600;
  background: #fff; border: 1px solid #e6e0fb; border-radius: 999px;
  padding: 3px 11px;
}
.duty-set-btn { margin-left: auto; }

/* 顶部两栏：AI 输入 + 日历 */
.duty-top {
  display: grid; grid-template-columns: minmax(0, 1fr) 296px;
  gap: 14px; align-items: stretch; margin-bottom: 16px;
}
.duty-ai {
  background: linear-gradient(155deg, #fcfbff 0%, #f4f1ff 100%);
  border: 1px solid #e8e2fb; border-radius: 14px;
  padding: 16px 18px; margin-bottom: 0;
  box-shadow: 0 2px 12px rgba(99,102,241,.05);
}
.duty-ta {
  width: 100%; min-height: 104px; box-sizing: border-box;
  border: 1.5px solid #e0d9f8; border-radius: 11px;
  padding: 12px 14px; font-size: 13px; line-height: 1.8;
  background: #fff; color: #1e293b; resize: vertical;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.02);
}
.duty-ta::placeholder { color: #a5aec0; }
.duty-ta:focus { outline: none; border-color: #a78bfa; box-shadow: 0 0 0 3px rgba(167,139,250,.16); }
.duty-ai-ops { display: flex; gap: 9px; margin-top: 11px; flex-wrap: wrap; }
.duty-ai-ops .btn { border-radius: 9px; font-weight: 700; padding: 7px 15px; }
.duty-tip { font-size: 12px; margin-top: 9px; line-height: 1.6; color: #6b5fa8; }

/* 日历卡片 */
.dcal {
  background: #fff; border: 1px solid #e8ecf4; border-radius: 14px;
  padding: 14px; box-shadow: 0 2px 12px rgba(15,23,42,.05);
  display: flex; flex-direction: column;
}
.dcal-hd {
  font-size: 14px; color: #312e81; font-weight: 800;
  padding-bottom: 9px; margin-bottom: 9px; border-bottom: 1px solid #f1eefe;
}
.dcal-hd button {
  width: 28px; height: 28px; border-radius: 8px;
  border: 1px solid #e6e0fb; background: #faf8ff; color: #7c5fd0;
}
.dcal-hd button:hover { background: #f0ebff; }
.dcal-wk { color: #a3aabd; font-size: 11px; margin-bottom: 5px; }
.dcal-grid { gap: 3px; }
.dcal-e { height: 29px; }
.dcal-d {
  height: 29px; border-radius: 7px; font-size: 12px;
  transition: background .12s, transform .12s;
}
.dcal-d:hover { background: #f0ebff; transform: scale(1.06); }
.dcal-d.wk { color: #f0a0a0; }
.dcal-d.today { color: #7c3aed; font-weight: 800; box-shadow: inset 0 0 0 1.5px #c4b5fd; }
.dcal-d.sel { background: linear-gradient(135deg, #8b5cf6, #6366f1); color: #fff; font-weight: 700; box-shadow: 0 2px 6px rgba(99,102,241,.3); }
.dcal-d.sel.today { background: linear-gradient(135deg, #a855f7, #7c3aed); }

/* 翻页条 */
.duty-nav {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: #fff; border: 1px solid #eef0f6; border-radius: 11px;
  padding: 8px 12px; margin-bottom: 14px;
}
.duty-nav .btn { border-radius: 8px; font-weight: 600; }
.duty-range {
  font-size: 12px; color: #475569; font-weight: 700;
  background: #f4f6fa; padding: 4px 11px; border-radius: 7px;
}

/* 折叠条 */
.duty-foldbar {
  background: linear-gradient(135deg, #fafbff, #f4f7ff);
  border: 1px dashed #cbd5e1; border-radius: 10px;
  padding: 10px 14px; margin: 12px 0 0; font-size: 12.5px; color: #64748b;
  transition: background .15s;
}
.duty-foldbar:hover { background: #f0f4ff; color: #4338ca; }

/* 排班卡片网格 */
.duty-grid { gap: 10px; margin-bottom: 4px; }
.duty-card {
  background: #fff; border: 1px solid #e8ecf4; border-radius: 12px;
  padding: 10px 11px; min-height: 98px; box-sizing: border-box;
  box-shadow: 0 1px 5px rgba(15,23,42,.04);
  transition: transform .14s, box-shadow .14s, border-color .14s;
}
.duty-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(15,23,42,.09); border-color: #d8dcf0; }
.duty-card.wk { background: #fffbfb; border-color: #fae4e4; }
.duty-card.today {
  border: 2px solid #a78bfa; border-radius: 13px; padding: 9px 10px;
  background: linear-gradient(160deg, #faf7ff 0%, #fff 100%);
  box-shadow: 0 3px 14px rgba(139,92,246,.16);
}
.duty-date {
  font-size: 12.5px; font-weight: 800; color: #334155;
  padding-bottom: 6px; margin-bottom: 7px;
  border-bottom: 1px solid #eef1f7;
  display: flex; align-items: center; gap: 5px; white-space: nowrap;
}
.duty-card.today .duty-date { color: #6d28d9; border-bottom-color: #e9dcfb; }
.duty-date em { font-size: 10.5px; color: #94a3b8; font-weight: 500; }
.today-tag {
  font-size: 9.5px; background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #fff; padding: 2px 7px; border-radius: 999px;
  font-weight: 700; margin-left: auto; box-shadow: 0 1px 4px rgba(109,40,217,.3);
}
.duty-line { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 5px; align-items: center; }
.duty-post {
  font-size: 10px; color: #fff; font-weight: 700;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  padding: 2px 6px; border-radius: 5px; flex: 0 0 auto;
  box-shadow: 0 1px 3px rgba(99,102,241,.25);
}
.duty-post.side { background: linear-gradient(135deg, #0ea5e9, #38bdf8); box-shadow: 0 1px 3px rgba(14,165,233,.25); }

/* 人员小块 */
.dp {
  font-size: 10.5px; color: #1e293b; background: #f8fafc;
  border: 1px solid #e8edf4; border-radius: 6px; padding: 2px 5px;
  cursor: pointer; white-space: nowrap; line-height: 1.5;
  transition: background .12s, border-color .12s;
}
.dp:hover { background: #f0f4ff; border-color: #c7d2fe; }
.dp b { font-weight: 700; }
.dp i { font-size: 9.5px; }
.dp.mine { border-color: #c4b5fd; background: #faf5ff; }
.dp.empty { color: #b8c2d0; background: #fff; border: 1px dashed #dde5ee; }
.dp.empty:hover { color: #7c3aed; border-color: #a78bfa; background: #faf5ff; }
.dp.away { color: #b6bfcc !important; background: #f4f6f8 !important; border-color: #eceff3 !important; text-decoration: line-through; text-decoration-color: #cbd5e1; }
.dp.away b, .dp.away i { color: #b6bfcc !important; }

/* 响应式 */
@media (min-width: 761px) and (max-width: 1100px) {
  .duty-top { grid-template-columns: minmax(0,1fr) 270px; }
}
@media (max-width: 760px) {
  .duty-top { grid-template-columns: 1fr; }
  .dcal { max-width: 100%; }
  .duty-head { padding: 12px 14px; }
  .duty-title { font-size: 17px; }
  .duty-card { min-height: 0; padding: 11px 12px; }
  .duty-grid { gap: 8px; }
}

/* ============================================================
   排班顶部二次精简 v2（2026-11-30）：AI卡紧凑 / 速览填空 / 日历精简
   覆盖上方 v1 样式；整段可整块删除还原。
   ============================================================ */
.duty-top { display:grid; grid-template-columns: minmax(0,1fr) minmax(0,1.15fr) 232px; gap:12px; align-items:stretch; margin-bottom:14px; }

/* AI 紧凑卡 */
.duty-ai { padding:11px 13px; border-radius:13px; }
.duty-ai-hd { display:flex; align-items:center; gap:6px; margin-bottom:7px; }
.duty-ai-ico { font-size:14px; }
.duty-ai-hd b { font-size:12.5px; color:#312e81; font-weight:800; }
.duty-ai-hd small { margin-left:auto; font-size:10px; color:#9aa5b8; }
.duty-ta { min-height:40px; height:40px; padding:9px 11px; font-size:11.5px; line-height:1.5; border-radius:9px; }
.duty-ai-ops { margin-top:8px; gap:7px; }
.duty-ai-ops .btn { padding:5px 11px; font-size:11.5px; border-radius:8px; }
.duty-tip { margin-top:6px; font-size:10.5px; min-height:0; }
.duty-tip:empty { display:none; }

/* 近期排班速览 */
.duty-quick { background:#fff; border:1px solid #e8ecf4; border-radius:13px; padding:10px 13px; box-shadow:0 2px 10px rgba(15,23,42,.04); overflow:hidden; }
.dq-hd { display:flex; align-items:center; justify-content:space-between; font-size:12.5px; font-weight:800; color:#312e81; padding-bottom:7px; margin-bottom:4px; border-bottom:1px solid #f1eefe; }
.dq-hd span { font-size:10px; font-weight:600; color:#8b7fd0; background:#f4f1ff; padding:2px 7px; border-radius:999px; }
.dq-day { padding:5px 0; border-bottom:1px dashed #eef1f7; }
.dq-day:last-child { border-bottom:0; padding-bottom:0; }
.dq-date { font-size:11px; font-weight:800; color:#475569; display:flex; align-items:center; gap:5px; line-height:1.4; }
.dq-date em { font-size:9.5px; color:#a3aabd; font-weight:500; font-style:normal; }
.dq-date b { font-size:9px; color:#fff; background:linear-gradient(135deg,#8b5cf6,#6d28d9); padding:1px 6px; border-radius:999px; margin-left:auto; }
.dq-day.today .dq-date { color:#6d28d9; }
.dq-line { display:flex; align-items:baseline; gap:6px; margin-top:2px; font-size:10.5px; }
.dq-post { flex:0 0 auto; font-size:9px; font-weight:700; color:#fff; background:linear-gradient(135deg,#6366f1,#818cf8); padding:1px 5px; border-radius:4px; }
.dq-post.side { background:linear-gradient(135deg,#0ea5e9,#38bdf8); }
.dq-names { color:#334155; line-height:1.4; }
.dq-names u { text-decoration:none; }
.dq-none { color:#b8c2d0; font-style:normal; }
.dq-empty { font-size:11px; color:#9aa5b8; padding:10px 0; }

/* 精简日历 */
.dcal { padding:10px; border-radius:13px; }
.dcal-hd { font-size:12px; padding-bottom:6px; margin-bottom:6px; }
.dcal-hd button { width:22px; height:22px; border-radius:6px; font-size:14px; line-height:1; }
.dcal-wk { font-size:9.5px; margin-bottom:4px; }
.dcal-grid { gap:2px; }
.dcal-e, .dcal-d { height:22px; }
.dcal-d { font-size:10px; border-radius:5px; }
.dcal-d.today { box-shadow:inset 0 0 0 1.2px #c4b5fd; }

@media (min-width:761px) and (max-width:1180px){
  .duty-top { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .duty-quick { grid-column:1 / -1; grid-row:2; }
}
@media (max-width:760px){
  .duty-top { grid-template-columns:1fr; }
  .duty-quick { grid-column:auto; grid-row:auto; }
  .dcal { max-width:100%; }
}

/* ============================================================
   排班 UI v3 重做（2026-11-30）：清爽紧凑 · 标签化
   覆盖上方 v1/v2；整段可整块删除还原。
   ============================================================ */
.duty-wrap { padding: 2px 0 24px; }
.duty-head { display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:12px 16px; margin-bottom:12px; background:#fff; border:1px solid #e9edf5; border-radius:12px; box-shadow:0 1px 4px rgba(15,23,42,.04); }
.duty-title { font-size:17px; font-weight:800; color:#1e293b; letter-spacing:.2px; }
.duty-sub { font-size:11.5px; color:#64748b; font-weight:600; background:#f4f6fa; border-radius:999px; padding:3px 10px; }
.duty-set-btn { margin-left:auto; }

.duty-top { display:grid; grid-template-columns:minmax(0,1fr) 262px; gap:12px; align-items:start; margin-bottom:12px; }

.duty-ai { background:#fff; border:1px solid #e9edf5; border-radius:12px; padding:14px; box-shadow:0 1px 4px rgba(15,23,42,.04); }
.duty-ai-hd { display:flex; align-items:center; gap:6px; margin-bottom:8px; }
.duty-ai-ico { font-size:15px; }
.duty-ai-hd b { font-size:13px; color:#1e293b; font-weight:800; }
.duty-ai-hd small { margin-left:auto; font-size:10.5px; color:#94a3b8; font-weight:500; }
.duty-ta { width:100%; box-sizing:border-box; min-height:42px; height:42px; padding:10px 12px; font-size:12px; line-height:1.5; color:#1e293b; background:#f8fafc; border:1.5px solid #e5eaf2; border-radius:9px; resize:vertical; }
.duty-ta::placeholder { color:#a5aec0; }
.duty-ta:focus { outline:none; background:#fff; border-color:#a78bfa; box-shadow:0 0 0 3px rgba(167,139,250,.14); }
.duty-ai-ops { display:flex; gap:8px; margin-top:9px; flex-wrap:wrap; }
.duty-ai-ops .btn { border-radius:8px; font-weight:700; padding:6px 13px; font-size:12px; }
.duty-tip { font-size:11px; margin-top:7px; line-height:1.5; color:#7c6fb0; }
.duty-tip:empty { display:none; }

.dcal { background:#fff; border:1px solid #e9edf5; border-radius:12px; padding:12px; box-shadow:0 1px 4px rgba(15,23,42,.04); }
.dcal-hd { display:flex; align-items:center; justify-content:space-between; font-size:12.5px; font-weight:800; color:#1e293b; padding-bottom:8px; margin-bottom:6px; border-bottom:1px solid #f1f4f9; }
.dcal-hd button { width:24px; height:24px; border-radius:7px; border:1px solid #e5eaf2; background:#f8fafc; color:#7c5fd0; font-size:14px; line-height:1; cursor:pointer; }
.dcal-hd button:hover { background:#f0ebff; }
.dcal-wk { display:grid; grid-template-columns:repeat(7,1fr); color:#a3aabd; font-size:10px; text-align:center; margin-bottom:4px; }
.dcal-wk span { text-align:center; }
.dcal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:2px; }
.dcal-e, .dcal-d { height:24px; }
.dcal-d { display:flex; align-items:center; justify-content:center; border-radius:6px; font-size:11px; cursor:pointer; color:#475569; transition:background .12s,transform .1s; }
.dcal-d:hover { background:#f0ebff; transform:scale(1.08); }
.dcal-d.wk { color:#f0a0a0; }
.dcal-d.today { color:#7c3aed; font-weight:800; box-shadow:inset 0 0 0 1.3px #c4b5fd; }
.dcal-d.sel { background:linear-gradient(135deg,#8b5cf6,#6366f1); color:#fff; font-weight:700; }

.duty-nav { display:flex; align-items:center; gap:8px; flex-wrap:wrap; background:#fff; border:1px solid #eef1f7; border-radius:10px; padding:7px 11px; margin-bottom:12px; }
.duty-nav .btn { border-radius:8px; font-weight:600; }
.duty-range { font-size:11.5px; color:#475569; font-weight:700; background:#f4f6fa; padding:4px 10px; border-radius:7px; }

.duty-foldbar { background:#fafbff; border:1px dashed #cbd5e1; border-radius:9px; padding:9px 13px; margin:10px 0 0; font-size:12px; color:#64748b; cursor:pointer; }
.duty-foldbar:hover { background:#f0f4ff; color:#4338ca; }

.duty-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(196px,1fr)); gap:9px; margin-bottom:4px; }
.duty-card { background:#fff; border:1px solid #e9edf5; border-radius:11px; padding:10px 11px; min-height:92px; box-sizing:border-box; box-shadow:0 1px 3px rgba(15,23,42,.03); transition:box-shadow .14s,border-color .14s; }
.duty-card:hover { box-shadow:0 4px 14px rgba(15,23,42,.08); border-color:#dbe2ee; }
.duty-card.wk { background:#fffbfb; border-color:#f7e3e3; }
.duty-card.today { border:2px solid #a78bfa; padding:9px 10px; background:linear-gradient(160deg,#faf7ff,#fff); }
.duty-date { font-size:12.5px; font-weight:800; color:#334155; padding-bottom:6px; margin-bottom:7px; border-bottom:1px solid #eef1f7; display:flex; align-items:center; gap:5px; white-space:nowrap; }
.duty-card.today .duty-date { color:#6d28d9; border-bottom-color:#e9dcfb; }
.duty-date em { font-size:10.5px; color:#94a3b8; font-weight:500; font-style:normal; }
.today-tag { font-size:9.5px; background:linear-gradient(135deg,#8b5cf6,#6d28d9); color:#fff; padding:2px 7px; border-radius:999px; font-weight:700; margin-left:auto; }
.duty-line { display:flex; flex-wrap:wrap; gap:4px; margin-bottom:5px; align-items:center; }
.duty-post { font-size:10px; color:#fff; font-weight:700; background:linear-gradient(135deg,#6366f1,#818cf8); padding:2px 6px; border-radius:5px; flex:0 0 auto; }
.duty-post.side { background:linear-gradient(135deg,#0ea5e9,#38bdf8); }

.dp { display:inline-flex; align-items:center; gap:3px; font-size:10.5px; color:#1e293b; background:#f8fafc; border:1px solid #e8edf4; border-radius:6px; padding:2px 6px; cursor:pointer; white-space:nowrap; line-height:1.5; transition:background .12s,border-color .12s; }
.dp:hover { background:#f0f4ff; border-color:#c7d2fe; }
.dp b { font-weight:700; }
.dp .dp-sn { font-size:9px; color:#94a3b8; }
.dp.mine { border-color:#c4b5fd; background:#faf5ff; }
.dp.has-tag { background:#fff; }
.dp.empty { color:#b8c2d0; background:#fff; border:1px dashed #dde5ee; }
.dp.empty:hover { color:#7c3aed; border-color:#a78bfa; background:#faf5ff; }
.dp-tag { display:inline-flex; align-items:center; gap:2px; font-size:9.5px; font-weight:700; font-style:normal; padding:1px 5px; border-radius:5px; line-height:1.5; margin-left:1px; }

.tag-picker-mask { position:fixed; inset:0; background:rgba(15,23,42,.42); z-index:9999; display:flex; align-items:center; justify-content:center; padding:16px; }
.tag-picker { background:#fff; border-radius:16px; width:min(520px,94vw); max-height:82vh; overflow:auto; box-shadow:0 20px 60px rgba(15,23,42,.3); }
.tp-hd { display:flex; align-items:center; justify-content:space-between; padding:15px 18px; border-bottom:1px solid #f1f4f9; position:sticky; top:0; background:#fff; }
.tp-hd b { font-size:14.5px; color:#1e293b; }
.tp-hd button { width:28px; height:28px; border-radius:8px; border:1px solid #e5eaf2; background:#f8fafc; color:#64748b; font-size:14px; cursor:pointer; }
.tp-hd button:hover { background:#fee2e2; color:#dc2626; }
.tp-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(122px,1fr)); gap:8px; padding:15px 18px; }
.tp-item { display:flex; align-items:center; gap:7px; padding:10px 11px; border:1.5px solid #eef1f7; border-radius:10px; font-size:12.5px; font-weight:600; color:#334155; cursor:pointer; transition:border-color .12s,background .12s,transform .1s; }
.tp-item:hover { border-color:#a78bfa; background:#faf5ff; transform:translateY(-1px); }
.tp-item .tp-ico { width:24px; height:24px; display:inline-flex; align-items:center; justify-content:center; border-radius:7px; font-size:13px; }
.tp-item.tp-normal { border-color:#bbf7d0; }
.tp-item.tp-normal:hover { border-color:#22c55e; background:#f0fdf4; }
.tp-tip { padding:0 18px 15px; font-size:11px; color:#94a3b8; }
.tp-cur { margin:0 18px 8px; padding:7px 10px; background:#f8fafc; border:1px solid #eef1f7; border-radius:9px; font-size:11.5px; color:#475569; line-height:1.6; }
.tp-end { display:flex; align-items:center; gap:9px; margin:0 18px 4px; padding:8px 10px; background:#fffbeb; border:1px solid #fde68a; border-radius:9px; }
.tp-end label { font-size:11.5px; color:#b45309; font-weight:600; white-space:nowrap; }
.tp-end input { flex:1; min-width:0; border:1px solid #fcd34d; border-radius:7px; padding:5px 8px; font-size:12px; color:#334155; background:#fff; }

@media (max-width:760px){
  .duty-top { grid-template-columns:1fr; }
  .duty-grid { grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:8px; }
}

/* ============================================================
   排班布局 v4（2026-11-30）：左窄栏(AI+可折叠日历) + 右排班表
   ============================================================ */
.duty-layout { display:grid; grid-template-columns:300px minmax(0,1fr); gap:14px; align-items:start; }
.duty-side { display:flex; flex-direction:column; gap:12px; align-self:start; }
.duty-main { min-width:0; }
.dcal-fold-hd { display:none; }
.duty-side .duty-ai { padding:12px; }
.duty-side .duty-ai-hd small { display:none; }
.duty-side .duty-ta { min-height:40px; height:40px; }
.duty-side .duty-ai-eg { gap:5px; margin:6px 0 2px; }
.duty-side .duty-ai-eg span { font-size:11px; padding:2px 7px; }

@media (max-width:900px){
  .duty-layout { grid-template-columns:1fr; gap:10px; }
  .duty-side { gap:8px; }
  .dcal-fold-hd { display:flex; align-items:center; justify-content:space-between; gap:6px; padding:10px 13px; background:#fff; border:1px solid #e9edf5; border-radius:11px; font-size:12.5px; font-weight:700; color:#334155; cursor:pointer; }
  .dcal-wrap { display:none; }
  .dcal-wrap.open { display:block; }
}
