/**
 * 客户跟进表样式。
 *
 * 规范：全部颜色经由 var(--wb-*) 令牌声明，严禁任何颜色字面量（由 check:design 验证）。
 */

/* 客户跟进视图整幅撑满（与 5177 工作台板块一致，卡片撑满，不遮挡左侧栏） */
body[data-view="customers"] .main > .topbar,
body[data-view="customers"] .main > .banner-area,
body[data-view="customers"] .main > .site-footer,
body[data-view="customers"] .main > .view > .card,
body[data-view="customers"] #customersSection {
  max-width: none;
  width: 100%;
  min-width: 0;
  margin-left: 0;
  margin-right: 0;
}

.customers-module-layout {
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-3);
  min-height: 0;
  min-width: 0;
}

/* 顶部操作区与分类 Tabs（方案 A：外层浅底面板框） */
.customers-header-bar {
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-3);
  padding: var(--wb-space-3) var(--wb-space-4);
  background: var(--wb-panel-bg);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-panel);
}

.customers-categories-row {
  display: flex;
  align-items: center;
  gap: var(--wb-space-2);
  flex-wrap: wrap;
  padding: var(--wb-space-3) var(--wb-space-4);
  background: var(--wb-surface);
  border: 1px solid var(--wb-border-strong);
  border-radius: var(--wb-radius-panel);
  box-shadow: var(--wb-shadow-control);
}

.customers-cat-label {
  font-size: calc(var(--wb-fs-13) * 1.2);
  font-weight: 700;
  color: var(--wb-text-primary);
  white-space: nowrap;
  margin-right: var(--wb-space-1);
}

.customers-cat-tab {
  display: inline-flex;
  align-items: center;
  gap: var(--wb-space-2);
  min-height: 38px;
  padding: var(--wb-space-2) var(--wb-space-4);
  background: var(--wb-surface-muted);
  border: 1px solid var(--wb-border-strong);
  border-radius: var(--wb-radius-pill);
  color: var(--wb-text-primary);
  font-size: calc(var(--wb-fs-13) * 1.2);
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}

.customers-cat-tab:hover {
  background: var(--wb-accent-soft);
  color: var(--wb-accent-ink);
  border-color: var(--wb-accent);
}

.customers-cat-tab.is-active {
  background: var(--wb-accent);
  color: var(--wb-btn-primary-ink);
  border-color: var(--wb-accent-strong);
  font-weight: 700;
  box-shadow: var(--wb-shadow-control);
}

.customers-cat-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  font-size: calc(var(--wb-fs-11) * 1.2);
  font-weight: 700;
  padding: 0 var(--wb-space-1);
  border-radius: var(--wb-radius-pill);
  background: var(--wb-surface);
  color: var(--wb-text-secondary);
  border: 1px solid var(--wb-border);
}

.customers-cat-tab.is-active .customers-cat-badge {
  background: var(--wb-btn-primary-ink);
  color: var(--wb-accent-strong);
  border-color: var(--wb-btn-primary-ink);
}

.customers-cat-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: calc(var(--wb-fs-12) * 1.2);
  font-weight: 600;
  color: var(--wb-text-secondary);
  border: 1px dashed var(--wb-border-strong);
  border-radius: var(--wb-radius-control);
  background: transparent;
  cursor: pointer;
  transition: all .15s ease;
}

.customers-cat-add-btn:hover {
  border-color: var(--wb-accent);
  color: var(--wb-accent-ink);
  background: var(--wb-surface);
}

/* 5177 查找客户：紧贴标题行右侧（.customer-title-row） */
.customer-title-row {
  display: flex;
  align-items: center;
  gap: var(--wb-space-4);
  flex-wrap: wrap;
}

.customer-title-search-host .customer-global-search,
.heading-actions .customer-global-search,
.customer-global-search {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.customer-title-search-host .customers-search-input,
.heading-actions .customer-global-search .customers-search-input,
.customers-search-input {
  width: 240px;
  height: 32px;
  padding: var(--wb-space-1) var(--wb-space-3);
  font-size: var(--wb-fs-13);
  border: 1px solid var(--wb-border-strong);
  border-radius: var(--wb-radius-control);
  background: var(--wb-surface);
  color: var(--wb-text-primary);
}

.customer-title-search-host .customers-search-input:focus,
.customers-search-input:focus {
  outline: none;
  border-color: var(--wb-input-focus-border);
  box-shadow: var(--wb-focus-ring);
}

.customer-title-search-host .customer-search-results,
.customer-search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: auto;
  width: 320px;
  max-height: 280px;
  overflow-y: auto;
  margin-top: 0;
  background: var(--wb-panel-bg);
  border: 1px solid var(--wb-border-strong);
  border-radius: var(--wb-radius-control);
  box-shadow: var(--wb-shadow-panel);
  z-index: 50;
  padding: 4px 0;
}

.customer-search-item {
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--wb-table-border);
  transition: background .12s ease;
}

.customer-search-item:last-child {
  border-bottom: none;
}

.customer-search-item:hover,
.customer-search-item.is-active {
  background: var(--wb-table-row-hover-bg);
}

.customer-search-item-title {
  font-size: var(--wb-fs-13);
  font-weight: 700;
  color: var(--wb-text-primary);
  display: flex;
  justify-content: space-between;
}

.customer-search-item-meta {
  font-size: var(--wb-fs-11);
  color: var(--wb-text-secondary);
  margin-top: 2px;
}

/* 格式调整、排序控制与操作按键工具栏（三段在同一行：左排序、中格式、右按键） */
.customer-format-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wb-space-3);
  padding: var(--wb-space-2) var(--wb-space-3);
  background: var(--wb-fill-soft);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-panel);
  flex-wrap: wrap;
}

.customer-sort-control {
  display: inline-flex;
  align-items: center;
  gap: var(--wb-space-2);
  font-size: var(--wb-fs-12);
  color: var(--wb-text-secondary);
  flex: 0 0 auto;
}

.customer-sort-control label {
  display: inline-flex;
  align-items: center;
  gap: var(--wb-space-1);
  font-weight: 600;
}

.customer-sort-control select {
  height: 28px;
  padding: 0 var(--wb-space-2);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
  background: var(--wb-surface);
  color: var(--wb-text-primary);
  font-size: var(--wb-fs-12);
}

.customer-cell-format-control {
  display: inline-flex;
  align-items: center;
  gap: var(--wb-space-2);
  font-size: var(--wb-fs-12);
  flex: 0 0 auto;
}

.customer-cell-format-control .toolbar-label {
  color: var(--wb-text-secondary);
  font-weight: 600;
  margin-right: var(--wb-space-1);
}

.customer-cell-format-control label {
  display: inline-flex;
  align-items: center;
  gap: var(--wb-space-1);
}

.customer-cell-format-control select {
  height: 28px;
  padding: 0 var(--wb-space-2);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
  background: var(--wb-surface);
  color: var(--wb-text-primary);
  font-size: var(--wb-fs-12);
}

.customer-font-size-step {
  min-width: 28px;
  height: 28px;
  padding: 0 var(--wb-space-2);
  font-weight: 700;
  font-size: var(--wb-fs-14);
}

.customer-font-size-step:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.customer-toolbar-actions {
  display: inline-flex;
  align-items: center;
  gap: var(--wb-space-2);
  flex: 0 0 auto;
  flex-wrap: wrap;
}

/* 单元格选中高亮 */
.customers-table td.is-cell-selected {
  outline: 2px solid var(--wb-accent);
  outline-offset: -2px;
  background: var(--wb-accent-soft);
}

/* 查找客户命中后的行跳转微脉冲 */
@keyframes customerJumpPulse {
  0% { background-color: var(--wb-accent-soft); }
  50% { background-color: var(--wb-table-row-selected-bg); }
  100% { background-color: transparent; }
}

.customers-table tr.is-jump-highlight {
  animation: customerJumpPulse 2.4s ease-out;
}

/* 工具栏：搜索、新增客户、动态列、导入导出 */
.customers-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wb-space-4);
  flex-wrap: wrap;
}

.customers-toolbar-left,
.customers-toolbar-right {
  display: flex;
  align-items: center;
  gap: var(--wb-space-3);
  flex-wrap: wrap;
}

.customers-search-input {
  width: 240px;
  padding: var(--wb-space-2) var(--wb-space-3);
  font-size: var(--wb-fs-13);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
  background: var(--wb-surface);
  color: var(--wb-text-primary);
}

.customers-search-input:focus {
  outline: none;
  border-color: var(--wb-input-focus-border);
}

/* 核心工作区：左右双栏（左侧表格，右侧详情抽屉） */
.customers-main-view {
  display: flex;
  gap: var(--wb-space-4);
  align-items: flex-start;
}

.customers-table-container {
  flex: 1;
  min-width: 0;
  background: var(--wb-panel-bg);
  border: 1px solid var(--wb-table-border);
  border-radius: var(--wb-radius-panel);
  overflow-x: auto;
  box-shadow: var(--wb-shadow-soft);
}

.customers-table {
  /* max-content：列宽完全由各列自己决定；min-width 保证窄表也能铺满页面。
     末尾的弹性空列吸收多余宽度，所以拖宽某一列时其它列不会被挤压。 */
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: var(--wb-fs-13);
  text-align: left;
  table-layout: fixed;
}

.customers-table .cu-filler-col {
  width: auto;
}

.customers-table th.cu-filler,
.customers-table td.cu-filler {
  padding: 0;
  border-bottom: 1px solid var(--wb-table-border);
}

.customers-table th {
  position: relative;
  background: var(--wb-table-head-bg);
  color: var(--wb-table-head-ink);
  padding: var(--wb-space-3) var(--wb-space-4);
  font-weight: 600;
  border-bottom: 1px solid var(--wb-table-border);
  white-space: nowrap;
  user-select: none;
  cursor: grab;
  box-sizing: border-box;
}

/* 2026-11-06 起表头换指针拖拽：pointer-sort 给被拖项加 .dragging */
.customers-table th.is-col-dragging,
.customers-table th.dragging {
  opacity: 0.45;
  background: var(--wb-accent-soft);
}

.customers-table th.drop-before::before,
.customers-table th.pointer-sort-over-before::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--wb-accent);
  z-index: 3;
}

.customers-table th.drop-after::after,
.customers-table th.pointer-sort-over-after::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--wb-accent);
  z-index: 3;
}

.customers-col-resizer {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  cursor: col-resize;
  z-index: 2;
  background: transparent;
  border: none;
  padding: 0;
}

.customers-col-resizer:hover,
.customers-col-resizer.is-resizing {
  background: var(--wb-accent);
}

.customers-table td {
  padding: var(--wb-space-3) var(--wb-space-4);
  border-bottom: 1px solid var(--wb-table-border);
  color: var(--wb-text-primary);
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
}

.customers-table tr:hover td {
  background: var(--wb-table-row-hover-bg);
}

.customers-table tr.is-selected td {
  background: var(--wb-table-row-selected-bg);
}

.customers-col-header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wb-space-2);
}

.customers-col-delete-btn {
  background: transparent;
  border: none;
  color: var(--wb-text-disabled);
  cursor: pointer;
  font-size: var(--wb-fs-11);
  padding: 0 var(--wb-space-1);
}

.customers-col-delete-btn:hover {
  color: var(--wb-danger);
}

.customers-table-cell-empty {
  color: var(--wb-text-placeholder);
}

.customers-table-actions-cell {
  white-space: nowrap;
  display: flex;
  gap: var(--wb-space-2);
}

/* 详情卡片抽屉 */
.customers-detail-drawer {
  width: 380px;
  flex-shrink: 0;
  align-self: flex-start;
  max-height: calc(100vh - 180px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--wb-panel-bg);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-panel);
  padding: var(--wb-space-5);
  box-shadow: var(--wb-shadow-panel);
}

.customers-detail-drawer .customers-detail-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: var(--wb-space-1);
}

.customers-detail-drawer .customers-detail-actions {
  flex: 0 0 auto;
  border-top: 1px solid var(--wb-border);
  padding-top: var(--wb-space-3);
  margin-top: var(--wb-space-3);
}

.customers-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--wb-space-3);
  border-bottom: 1px solid var(--wb-border);
  padding-bottom: var(--wb-space-3);
  margin-bottom: var(--wb-space-4);
}

.customers-detail-title {
  font-size: var(--wb-fs-16);
  font-weight: 600;
  color: var(--wb-text-primary);
  margin: 0;
}

/* ---------- 详情抽屉四区块 ---------- */
.cu-detail-title-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-2);
  min-width: 0;
}

.cu-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wb-space-1);
}

.cu-detail-tag {
  font-size: var(--wb-fs-11);
  padding: 0 var(--wb-space-2);
  border-radius: var(--wb-radius-pill);
  background: var(--wb-pill-bg);
  color: var(--wb-pill-ink);
}

.cu-detail-section {
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-3);
  padding-bottom: var(--wb-space-4);
  border-bottom: 1px solid var(--wb-border);
}

.cu-detail-section:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.cu-detail-section-title {
  font-size: var(--wb-fs-13);
  font-weight: 700;
  color: var(--wb-accent-ink);
  letter-spacing: 0.02em;
}

.cu-followup-create {
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-2);
}

.cu-followup-create-main {
  display: flex;
  align-items: center;
  gap: var(--wb-space-2);
}

.cu-followup-create-main .customers-field-input {
  flex: 1;
  min-width: 0;
}

.cu-followup-date-input {
  width: 100%;
}

.cu-followup-add-btn {
  flex: 0 0 auto;
  min-width: 36px;
  padding: 0 var(--wb-space-3);
  font-size: var(--wb-fs-15);
  line-height: 1.9;
}

.cu-next-contact-row {
  display: flex;
  align-items: center;
  gap: var(--wb-space-2);
}

.cu-next-contact-label {
  flex: 0 0 auto;
  font-size: var(--wb-fs-12);
  color: var(--wb-text-secondary);
}

.cu-next-contact-input {
  flex: 1;
  min-width: 0;
}

.cu-followup-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-2);
  max-height: 240px;
  overflow-y: auto;
}

.cu-followup-item {
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
  background: var(--wb-surface);
  padding: var(--wb-space-2) var(--wb-space-3);
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-1);
}

.cu-followup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wb-space-2);
}

.cu-followup-date {
  font-size: var(--wb-fs-11);
  font-weight: 600;
  color: var(--wb-accent-ink);
}

.cu-followup-actions {
  display: flex;
  gap: var(--wb-space-1);
}

.cu-followup-actions .btn {
  padding: 0 var(--wb-space-2);
  font-size: var(--wb-fs-11);
  line-height: 1.7;
}

.cu-followup-content {
  font-size: var(--wb-fs-12);
  color: var(--wb-text-primary);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
}

.cu-followup-edit {
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-2);
}

.cu-followup-edit-textarea {
  resize: vertical;
}

.cu-followup-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--wb-space-2);
}

.cu-followup-empty {
  font-size: var(--wb-fs-12);
  color: var(--wb-text-placeholder);
  margin: 0;
  padding: var(--wb-space-2) 0;
}

.cu-danger-text {
  color: var(--wb-danger);
}

.cu-profile-name-row {
  display: grid;
  grid-template-columns: 1fr 96px;
  gap: var(--wb-space-3);
  align-items: end;
}

.cu-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--wb-space-3);
}

.cu-profile-grid > .cu-field-wide,
.cu-more-details-body > .cu-field-wide {
  grid-column: 1 / -1;
}

.cu-more-details {
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
  background: var(--wb-surface-muted);
  padding: var(--wb-space-2) var(--wb-space-3);
}

.cu-more-details > summary {
  cursor: pointer;
  font-size: var(--wb-fs-12);
  font-weight: 600;
  color: var(--wb-text-secondary);
  user-select: none;
}

.cu-more-details-body {
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-3);
  padding-top: var(--wb-space-3);
}

.cu-add-field-btn {
  align-self: flex-start;
}

.customers-detail-close-btn {
  background: transparent;
  border: none;
  font-size: var(--wb-fs-16);
  color: var(--wb-text-secondary);
  cursor: pointer;
}

.customers-detail-body {
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-3);
}

.customers-field-group {
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-1);
}

.customers-field-label {
  font-size: var(--wb-fs-12);
  color: var(--wb-text-secondary);
}

.customers-field-input {
  width: 100%;
  padding: var(--wb-space-2) var(--wb-space-3);
  font-size: var(--wb-fs-13);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
  background: var(--wb-surface);
  color: var(--wb-text-primary);
  box-sizing: border-box;
}

.customers-field-input:focus {
  outline: none;
  border-color: var(--wb-input-focus-border);
}

.customers-detail-actions {
  display: flex;
  gap: var(--wb-space-2);
  margin-top: var(--wb-space-5);
  padding-top: var(--wb-space-4);
  border-top: 1px solid var(--wb-border);
  flex-wrap: wrap;
}

/* 空状态 */
.customers-empty-state {
  text-align: center;
  padding: var(--wb-space-10) var(--wb-space-4);
  color: var(--wb-text-secondary);
}

.customers-empty-icon {
  font-size: var(--wb-fs-24);
  margin-bottom: var(--wb-space-2);
}

/* 弹窗通用 (移动/复制/导入/选择器) */
#customerPickerModalRoot,
.customers-modal-container {
  position: fixed;
  inset: 0;
  z-index: var(--wb-z-modal);
  display: grid;
  place-items: center;
  padding: 20px;
  box-sizing: border-box;
}

.customers-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--wb-overlay-bg);
}

.customers-modal-dialog {
  position: relative;
  z-index: 100;
  width: min(600px, calc(100vw - 40px));
  max-width: 90vw;
  max-height: min(760px, calc(100vh - 60px));
  overflow-y: auto;
  background: var(--wb-panel-bg);
  border: 1px solid var(--wb-border-strong);
  border-radius: var(--wb-radius-panel);
  box-shadow: var(--wb-shadow-modal);
  padding: var(--wb-space-6);
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-4);
  margin: auto;
}

.customers-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--wb-border);
  padding-bottom: var(--wb-space-3);
  cursor: grab;
  user-select: none;
}
.customers-modal-header button { cursor: pointer; user-select: auto; }

.customers-modal-title {
  margin: 0;
  font-size: var(--wb-fs-18);
  color: var(--wb-text-primary);
}

.customers-modal-close {
  background: transparent;
  border: none;
  font-size: var(--wb-fs-18);
  color: var(--wb-text-secondary);
  cursor: pointer;
}

.customers-modal-body {
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-4);
}

.customers-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--wb-space-3);
  border-top: 1px solid var(--wb-border);
  padding-top: var(--wb-space-4);
}

/* 导入上传拖拽区 */
.customers-dropzone {
  border: 2px dashed var(--wb-border-strong);
  border-radius: var(--wb-radius-panel);
  padding: var(--wb-space-8) var(--wb-space-4);
  text-align: center;
  background: var(--wb-surface-muted);
  color: var(--wb-text-secondary);
  cursor: pointer;
  transition: all .2s ease;
}

.customers-dropzone * {
  pointer-events: none;
}

.customers-dropzone:hover,
.customers-dropzone.is-dragover {
  border-color: var(--wb-accent);
  background: var(--wb-accent-soft);
  color: var(--wb-accent-ink);
}

.customers-module-layout.is-global-dragover {
  outline: 2px dashed var(--wb-accent);
  outline-offset: -4px;
}

.customers-template-hint {
  font-size: var(--wb-fs-12);
  color: var(--wb-text-secondary);
  background: var(--wb-surface);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
  padding: var(--wb-space-3);
}

/* 导入弹窗：「按这个文件重排表格列」勾选（顺序以 Excel 为准，只动位置不动资料） */
.customers-reorder-toggle {
  display: flex;
  align-items: flex-start;
  gap: var(--wb-space-3);
  padding: var(--wb-space-3) var(--wb-space-4);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
  background: var(--wb-surface-muted);
  font-size: var(--wb-fs-13);
  color: var(--wb-text-primary);
  cursor: pointer;
}

.customers-reorder-toggle:hover {
  border-color: var(--wb-border-strong);
  background: var(--wb-accent-soft);
  color: var(--wb-accent-ink);
}

.customers-reorder-checkbox {
  flex: 0 0 auto;
  margin-top: 2px;
}

/* 轻量选择弹窗 CustomerPickerModal */
.customers-picker-list {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
  background: var(--wb-surface);
}

.customers-picker-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--wb-space-3) var(--wb-space-4);
  border-bottom: 1px solid var(--wb-border);
  cursor: pointer;
  transition: background .15s ease;
}

.customers-picker-item:last-child {
  border-bottom: none;
}

.customers-picker-item:hover {
  background: var(--wb-table-row-hover-bg);
}

.customers-picker-item.is-selected {
  background: var(--wb-table-row-selected-bg);
  border-left: 3px solid var(--wb-accent);
}

.customers-picker-item-main {
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-1);
}

.customers-picker-name {
  font-weight: 600;
  color: var(--wb-text-primary);
}

.customers-picker-meta {
  font-size: var(--wb-fs-12);
  color: var(--wb-text-secondary);
}

.customers-picker-tag {
  font-size: var(--wb-fs-11);
  padding: var(--wb-space-1) var(--wb-space-2);
  background: var(--wb-pill-bg);
  color: var(--wb-pill-ink);
  border-radius: var(--wb-radius-pill);
}

/* ============================================================
 * 单元格只读可复制 / 合并列 / 右键菜单 / 管理列表
 * ============================================================ */

/* 单元格：只读文本，允许选中复制；编辑统一走右侧面板 */
.customers-table td {
  user-select: text;
  cursor: default;
}

.customers-col-merged-tag {
  font-size: var(--wb-fs-11);
  padding: 0 var(--wb-space-1);
  border-radius: var(--wb-radius-pill);
  background: var(--wb-accent-soft);
  color: var(--wb-accent-ink);
  font-weight: 500;
}

.customers-table-cell-group {
  vertical-align: top;
}

.cu-merged-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cu-merged-inline {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wb-space-1);
}

.cu-merged-line {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 右键菜单 */
.customers-context-menu {
  position: fixed;
  z-index: var(--wb-z-menu);
  min-width: 208px;
  padding: var(--wb-space-1);
  background: var(--wb-surface);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
  box-shadow: var(--wb-shadow-menu);
}

.customers-context-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wb-space-2);
  width: 100%;
  padding: var(--wb-space-2) var(--wb-space-3);
  border: none;
  border-radius: var(--wb-radius-control);
  background: transparent;
  color: var(--wb-text-primary);
  font-size: var(--wb-fs-13);
  text-align: left;
  cursor: pointer;
}

.customers-context-menu-item:hover:not(:disabled) {
  background: var(--wb-accent-soft);
  color: var(--wb-accent-ink);
}

.customers-context-menu-item:disabled {
  color: var(--wb-text-disabled);
  cursor: default;
}

.customers-context-menu-hint {
  font-size: var(--wb-fs-11);
  color: var(--wb-text-placeholder);
}

.customers-context-menu-section {
  padding: var(--wb-space-1) var(--wb-space-3);
  font-size: var(--wb-fs-11);
  font-weight: 600;
  color: var(--wb-text-secondary);
}

.customers-context-menu-sep {
  height: 1px;
  margin: var(--wb-space-1) 0;
  background: var(--wb-border);
}

/* 管理列表弹窗 */
.cu-manage-dialog {
  width: 620px;
  max-width: 94vw;
}

.cu-manage-body {
  max-height: 62vh;
  overflow-y: auto;
}

.cu-manage-section {
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-2);
}

.cu-manage-section + .cu-manage-section {
  margin-top: var(--wb-space-4);
  padding-top: var(--wb-space-4);
  border-top: 1px solid var(--wb-border);
}

.cu-manage-section-title {
  font-size: var(--wb-fs-14);
  font-weight: 700;
  color: var(--wb-accent-ink);
}

.cu-manage-hint {
  margin: 0;
  font-size: var(--wb-fs-12);
  color: var(--wb-text-secondary);
}

.cu-manage-column-list {
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-1);
}

.cu-manage-column-row {
  display: flex;
  align-items: center;
  gap: var(--wb-space-2);
  padding: var(--wb-space-1) var(--wb-space-2);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
  background: var(--wb-surface);
}

.cu-manage-index {
  flex: 0 0 18px;
  font-size: var(--wb-fs-11);
  color: var(--wb-text-placeholder);
  text-align: center;
}

.cu-manage-name-input {
  flex: 1 1 auto;
  min-width: 0;
}

.cu-manage-badge {
  flex: 0 0 auto;
  font-size: var(--wb-fs-11);
  padding: 0 var(--wb-space-2);
  border-radius: var(--wb-radius-pill);
  background: var(--wb-surface-muted);
  color: var(--wb-text-secondary);
}

.cu-manage-row-actions {
  display: inline-flex;
  gap: var(--wb-space-1);
}

.cu-manage-icon-btn {
  padding: 0 var(--wb-space-2);
  min-width: 26px;
  line-height: 1.7;
}

.cu-manage-add-row {
  display: flex;
  gap: var(--wb-space-2);
}

.cu-manage-add-row .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.cu-manage-add-row .customers-field-input {
  flex: 1 1 auto;
}

/* 已移除的预置列：提示行 + 恢复入口（节奏贴 .cu-manage-add-row，弱化态用虚线边 + 软底） */
.cu-manage-restore-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wb-space-2);
  padding: var(--wb-space-1) var(--wb-space-2);
  border: 1px dashed var(--wb-border-strong);
  border-radius: var(--wb-radius-control);
  background: var(--wb-panel-bg-soft);
}

.cu-manage-restore-text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--wb-fs-12);
  color: var(--wb-text-secondary);
  overflow-wrap: anywhere;
}

.cu-manage-restore-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.cu-manage-merge-host {
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-2);
}

.cu-manage-merge-group {
  border: 1px solid var(--wb-accent);
  border-radius: var(--wb-radius-control);
  background: var(--wb-accent-soft);
  padding: var(--wb-space-2);
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-2);
}

.cu-manage-merge-head {
  display: flex;
  align-items: center;
  gap: var(--wb-space-2);
}

.cu-manage-merge-badge {
  flex: 0 0 auto;
  font-size: var(--wb-fs-11);
  font-weight: 600;
  padding: 0 var(--wb-space-2);
  border-radius: var(--wb-radius-pill);
  background: var(--wb-accent);
  color: var(--wb-btn-primary-ink);
}

.cu-manage-merge-title {
  flex: 1 1 auto;
  min-width: 0;
}

.cu-manage-merge-keys {
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-1);
}

.cu-manage-merge-key-row {
  display: flex;
  align-items: center;
  gap: var(--wb-space-2);
  padding: var(--wb-space-1) var(--wb-space-2);
  border-radius: var(--wb-radius-control);
  background: var(--wb-surface);
}

.cu-manage-merge-order {
  flex: 0 0 34px;
  font-size: var(--wb-fs-11);
  color: var(--wb-text-placeholder);
}

.cu-manage-merge-key-label {
  flex: 1 1 auto;
  font-size: var(--wb-fs-12);
  color: var(--wb-text-primary);
}

.cu-manage-merge-actions {
  display: flex;
  justify-content: flex-end;
}

.cu-manage-pick-wrap {
  border: 1px dashed var(--wb-border-strong);
  border-radius: var(--wb-radius-control);
  padding: var(--wb-space-2);
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-2);
}

.cu-manage-pick-title {
  font-size: var(--wb-fs-12);
  font-weight: 600;
  color: var(--wb-text-secondary);
}

.cu-manage-pick-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wb-space-2);
}

.cu-manage-pick-item {
  display: inline-flex;
  align-items: center;
  gap: var(--wb-space-1);
  font-size: var(--wb-fs-12);
  color: var(--wb-text-primary);
}

.cu-manage-merge-footer {
  display: flex;
  justify-content: flex-end;
}

.cu-manage-empty {
  margin: 0;
  font-size: var(--wb-fs-12);
  color: var(--wb-text-placeholder);
}

/* ============================================================
 * 管理列表（四列：序号 / 列名 / 类型 / 合并管理）
 * ============================================================ */

.cu-manage-head-copy { min-width: 0; }
.cu-manage-sub {
  margin: 3px 0 0;
  font-size: var(--wb-fs-11);
  color: var(--wb-text-secondary);
}

.cu-manage-table-wrap {
  overflow-x: auto;
}

.cu-manage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--wb-fs-12);
}

.cu-manage-table th {
  text-align: left;
  font-size: var(--wb-fs-11);
  font-weight: 600;
  color: var(--wb-text-secondary);
  padding: var(--wb-space-2) var(--wb-space-2);
  border-bottom: 1px solid var(--wb-border);
}

.cu-manage-table td {
  padding: var(--wb-space-1) var(--wb-space-2);
  border-bottom: 1px solid var(--wb-border);
  vertical-align: middle;
}

.cu-manage-table .cu-manage-idx {
  width: 52px;
  color: var(--wb-text-placeholder);
  font-size: var(--wb-fs-11);
}

.cu-manage-table .cu-manage-type {
  width: 84px;
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-11);
  white-space: nowrap;
}

.cu-manage-table .cu-manage-actions-cell {
  width: 188px;
  text-align: right;
  white-space: nowrap;
}
.cu-manage-actions-cell .cu-manage-delete-btn { margin-left: var(--wb-space-1); }
.cu-manage-actions-cell .cu-manage-delete-btn:disabled {
  color: var(--wb-text-disabled);
  cursor: not-allowed;
}

.cu-manage-name-cell { min-width: 0; }

.cu-manage-row-merged td {
  background: var(--wb-accent-soft);
}

.cu-merge-name-cell {
  display: flex;
  align-items: stretch;
  gap: var(--wb-space-2);
}

.cu-merge-bracket {
  flex: 0 0 auto;
  width: 12px;
  margin-left: 4px;
  border-left: 2px solid var(--wb-accent);
  border-top: 2px solid var(--wb-accent);
  border-bottom: 2px solid var(--wb-accent);
  border-radius: 5px 0 0 5px;
}

.cu-merge-name-lines {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cu-merge-name-line {
  font-size: var(--wb-fs-12);
  line-height: 1.45;
  color: var(--wb-text-primary);
}

.cu-merge-name-line.is-secondary {
  color: var(--wb-text-secondary);
}

.cu-merge-manage-btn {
  white-space: nowrap;
}

.cu-merge-manage-btn.is-merged {
  border-color: var(--wb-accent);
  background: var(--wb-accent);
  color: var(--wb-btn-primary-ink);
  font-weight: 600;
}

/* ============================================================
 * 合并管理弹窗
 * ============================================================ */

.cu-merge-dialog {
  width: 560px;
  max-width: 92vw;
}

.cu-merge-head-copy { min-width: 0; }

.cu-merge-sub {
  margin: 3px 0 0;
  font-size: var(--wb-fs-11);
  color: var(--wb-text-secondary);
}

.cu-merge-body {
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-4);
  max-height: 62vh;
  overflow-y: auto;
}

.cu-merge-sec {
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-2);
}

.cu-merge-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wb-space-2);
}

.cu-merge-sec-title {
  font-size: var(--wb-fs-12);
  font-weight: 700;
  color: var(--wb-accent-ink);
}

.cu-merge-preview-note {
  font-size: var(--wb-fs-11);
  color: var(--wb-text-secondary);
  background: var(--wb-surface-muted);
  border-radius: var(--wb-radius-pill);
  padding: 0 var(--wb-space-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 62%;
}

.cu-merge-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-1);
}

.cu-merge-row {
  display: flex;
  align-items: center;
  gap: var(--wb-space-2);
  padding: var(--wb-space-2);
  border: 1px solid var(--wb-accent);
  border-radius: var(--wb-radius-control);
  background: var(--wb-accent-soft);
}

.cu-merge-order {
  flex: 0 0 46px;
  font-size: var(--wb-fs-11);
  color: var(--wb-accent-ink);
}

.cu-merge-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--wb-fs-12);
  color: var(--wb-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cu-merge-remove {
  flex: 0 0 auto;
  width: 24px;
  height: 22px;
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
  background: var(--wb-surface);
  color: var(--wb-danger);
  font-size: var(--wb-fs-11);
  cursor: pointer;
}

.cu-merge-empty {
  font-size: var(--wb-fs-12);
  color: var(--wb-text-placeholder);
  padding: var(--wb-space-2) 0;
}

.cu-merge-slot {
  padding: var(--wb-space-3);
  text-align: center;
  font-size: var(--wb-fs-11);
  color: var(--wb-text-placeholder);
  border: 1px dashed var(--wb-border-strong);
  border-radius: var(--wb-radius-control);
}

.cu-merge-available {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wb-space-2);
}

.cu-merge-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--wb-space-1);
  padding: var(--wb-space-1) var(--wb-space-3);
  font-size: var(--wb-fs-12);
  color: var(--wb-text-primary);
  background: var(--wb-surface-muted);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-pill);
  cursor: pointer;
}

.cu-merge-chip:hover {
  border-color: var(--wb-accent);
  color: var(--wb-accent-ink);
}

.cu-merge-chip-plus {
  font-weight: 600;
  color: var(--wb-accent);
}

.cu-merge-count {
  font-size: var(--wb-fs-11);
  color: var(--wb-text-secondary);
}

.cu-merge-dirty {
  font-size: var(--wb-fs-11);
  color: var(--wb-accent-ink);
}

.cu-merge-foot {
  gap: var(--wb-space-2);
}

.cu-merge-foot-note {
  margin-right: auto;
  font-size: var(--wb-fs-11);
  color: var(--wb-text-secondary);
}


/* 右键菜单：二级分类菜单 */
.customers-context-menu-item.has-submenu {
  justify-content: space-between;
}

.customers-context-caret {
  font-size: var(--wb-fs-11);
  color: var(--wb-text-placeholder);
}

.customers-context-menu-item.is-danger {
  color: var(--wb-danger);
}

.customers-context-submenu {
  position: relative;
}

.customers-context-submenu-panel {
  position: absolute;
  left: calc(100% - 4px);
  top: calc(-1 * var(--wb-space-1));
  min-width: 168px;
  display: none;
  padding: var(--wb-space-1);
  background: var(--wb-surface);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
  box-shadow: var(--wb-shadow-menu);
}

.customers-context-submenu.is-open > .customers-context-submenu-panel {
  display: block;
}

.customers-context-submenu.flip-left > .customers-context-submenu-panel {
  left: auto;
  right: calc(100% - 4px);
}

/* 删除客户二次确认 */
.cu-confirm-dialog {
  width: 420px;
}

.cu-confirm-text {
  margin: 0;
  font-size: var(--wb-fs-14);
  color: var(--wb-text-primary);
}

.cu-confirm-hint {
  margin: var(--wb-space-2) 0 0;
  font-size: var(--wb-fs-12);
  color: var(--wb-text-secondary);
  line-height: 1.6;
}

/* 客户回收站 */
.cu-trash-dialog { width: 560px; }
.cu-trash-body { max-height: 56vh; overflow-y: auto; }
.cu-trash-list { display: flex; flex-direction: column; gap: var(--wb-space-2); }
.cu-trash-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wb-space-3);
  padding: var(--wb-space-2) var(--wb-space-3);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
  background: var(--wb-surface);
}
.cu-trash-main { min-width: 0; }
.cu-trash-name { font-size: var(--wb-fs-13); font-weight: 600; color: var(--wb-text-primary); }
.cu-trash-meta { margin-top: 2px; font-size: var(--wb-fs-11); color: var(--wb-text-secondary); }
.cu-trash-actions { display: flex; gap: var(--wb-space-2); flex: 0 0 auto; }
.cu-trash-empty { margin: 0; padding: var(--wb-space-6) 0; text-align: center; color: var(--wb-text-placeholder); font-size: var(--wb-fs-12); }

/* ============================================================
 * 双层表头（A/B/C 列标）+ 行号列 + 整行/整列选择 + 行高拖拽
 * ============================================================ */

.customers-table .cu-letter-row th {
  height: 24px;
  padding: 0 var(--wb-space-2);
  background: var(--wb-table-head-bg);
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-11);
  font-weight: 600;
  text-align: center;
  border-bottom: 1px solid var(--wb-table-border);
  border-right: 1px solid var(--wb-table-border);
  cursor: pointer;
  user-select: none;
}

.customers-table .cu-letter-row th:hover {
  background: var(--wb-accent-soft);
  color: var(--wb-accent-ink);
}

.customers-table .cu-letter-row th.is-col-selected {
  background: var(--wb-accent);
  color: var(--wb-btn-primary-ink);
}

.customers-table .cu-corner,
.customers-table .cu-row-header-corner {
  width: 46px;
  min-width: 46px;
  text-align: center;
  color: var(--wb-text-placeholder);
}

.customers-table .cu-corner {
  cursor: pointer;
  font-size: var(--wb-fs-11);
}

.customers-table .cu-corner::after {
  content: "◢";
  font-size: 10px;
}

.customers-table .cu-row-header-corner {
  font-size: var(--wb-fs-11);
  font-weight: 600;
}

.customers-table td.cu-row-number {
  position: relative;
  width: 46px;
  min-width: 46px;
  padding: 0;
  text-align: center;
  background: var(--wb-surface-muted);
  color: var(--wb-text-placeholder);
  font-size: var(--wb-fs-11);
  cursor: default;
  user-select: none;
  border-right: 1px solid var(--wb-table-border);
}

.customers-table td.cu-row-number:hover {
  background: var(--wb-accent-soft);
  color: var(--wb-accent-ink);
}

.customers-table tr.is-row-cell-selected td {
  background: var(--wb-accent-soft);
}

.customers-table tr.is-row-cell-selected td.cu-row-number {
  background: var(--wb-accent);
  color: var(--wb-btn-primary-ink);
}

.customers-table .cu-row-resizer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 6px;
  cursor: row-resize;
}

.customers-table .cu-row-resizer:hover {
  background: var(--wb-accent);
}

/* 管理列表：拖行号调整列顺序 */
.cu-manage-table td.cu-manage-idx {
  display: flex;
  align-items: center;
  gap: var(--wb-space-1);
  white-space: nowrap;
}

.cu-manage-drag {
  color: var(--wb-text-placeholder);
  font-size: var(--wb-fs-12);
  letter-spacing: -2px;
  padding: 0 2px;
  border-radius: var(--wb-radius-control);
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.cu-manage-drag:hover {
  color: var(--wb-accent-ink);
  background: var(--wb-surface-muted);
}

.cu-manage-table tr.is-dragging {
  opacity: .55;
}

.cu-manage-table tr.drop-before td {
  box-shadow: inset 0 2px 0 var(--wb-accent);
}

.cu-manage-table tr.drop-after td {
  box-shadow: inset 0 -2px 0 var(--wb-accent);
}

/* ==========================================
   跟进提醒条＋清单（跟进表⑥，2026-11-03）
   ========================================== */
.customers-reminder-strip {
  display: flex;
  align-items: center;
  gap: var(--wb-space-3);
  padding: var(--wb-space-2) var(--wb-space-4);
  background: var(--wb-banner-warn-bg);
  border: 1px solid var(--wb-banner-warn-border);
  border-radius: var(--wb-radius-control);
  color: var(--wb-banner-warn-ink);
  font-size: var(--wb-fs-13);
}

.customers-reminder-icon { font-size: var(--wb-fs-15); }

.customers-reminder-text { flex: 1; }

.customers-reminder-btn {
  font-size: var(--wb-fs-12);
  padding: 2px var(--wb-space-3);
}

.customers-reminder-section-title {
  margin: 0 0 var(--wb-space-2);
  font-size: var(--wb-fs-13);
  color: var(--wb-text-primary);
}

.customers-reminder-section { border-left: 3px solid var(--wb-border); padding-left: var(--wb-space-3); }
.customers-reminder-section.is-overdue { border-left-color: var(--wb-danger); }
.customers-reminder-section.is-today { border-left-color: var(--wb-banner-warn-ink); }
.customers-reminder-section.is-soon { border-left-color: var(--wb-banner-info-ink); }

.customers-reminder-row {
  display: flex;
  align-items: center;
  gap: var(--wb-space-3);
  padding: var(--wb-space-1) 0;
  font-size: var(--wb-fs-13);
}

.customers-reminder-name {
  background: transparent;
  border: none;
  padding: 0;
  color: var(--wb-accent-ink);
  cursor: pointer;
  font-size: var(--wb-fs-13);
  text-decoration: underline;
}
.customers-reminder-name:hover { color: var(--wb-accent); }

.customers-reminder-when { color: var(--wb-text-secondary); }
.customers-reminder-last { margin-left: auto; color: var(--wb-text-secondary); font-size: var(--wb-fs-12); }

.customers-reminder-empty { color: var(--wb-empty-ink); font-size: var(--wb-fs-12); }

.customers-reminder-footnote {
  margin: 0;
  font-size: var(--wb-fs-12);
  color: var(--wb-text-secondary);
}

/* ==========================================
   返单统计弹窗（跟进表⑥，2026-11-03）
   ========================================== */
.customers-stats-dialog { width: min(880px, calc(100vw - 40px)); }

.customers-stats-windows { display: flex; gap: var(--wb-space-2); flex-wrap: wrap; }

.customers-stats-window {
  border: 1px solid var(--wb-border-strong);
  background: var(--wb-panel-bg);
  color: var(--wb-input-ink);
  border-radius: var(--wb-radius-pill);
  padding: var(--wb-space-1) var(--wb-space-4);
  font-size: var(--wb-fs-13);
  cursor: pointer;
}
.customers-stats-window:hover { background: var(--wb-surface-muted); }
.customers-stats-window.is-active {
  background: var(--wb-accent);
  border-color: var(--wb-accent);
  color: var(--wb-ink-on-accent);
}

.customers-stats-summary { margin: 0; font-size: var(--wb-fs-13); color: var(--wb-text-primary); }

.customers-stats-note { margin: 0; font-size: var(--wb-fs-13); color: var(--wb-text-secondary); }

.customers-stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--wb-fs-13);
}
.customers-stats-table th,
.customers-stats-table td {
  border-bottom: 1px solid var(--wb-border);
  padding: var(--wb-space-2) var(--wb-space-3);
  text-align: left;
  color: var(--wb-input-ink);
}
.customers-stats-table th {
  color: var(--wb-text-secondary);
  font-weight: 600;
  font-size: var(--wb-fs-12);
}
.customers-stats-table tr.is-repeat td { background: var(--wb-accent-soft); }
.customers-stats-table .customers-stats-repeat { color: var(--wb-accent-ink); font-weight: 600; }

.customers-stats-footnote {
  margin: 0;
  font-size: var(--wb-fs-12);
  color: var(--wb-text-secondary);
}

/* ==================== 跟进表②：列去向预览＋档案字段管理（2026-11-03） ==================== */

.cu-detail-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wb-space-2);
}

.cu-manage-fields-btn {
  flex: 0 0 auto;
}

.customers-import-columns {
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-1);
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-panel);
  padding: var(--wb-space-2);
  margin: var(--wb-space-2) 0;
  text-align: left;
  background: var(--wb-surface-muted);
}

.customers-import-column-row {
  display: flex;
  align-items: center;
  gap: var(--wb-space-2);
  padding: var(--wb-space-1) var(--wb-space-2);
  border-radius: var(--wb-radius-control);
  cursor: pointer;
  font-size: var(--wb-fs-13);
}

.customers-import-column-row:hover {
  background: var(--wb-accent-soft);
}

.customers-import-column-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--wb-input-ink);
  font-weight: 600;
}

.customers-import-column-kind {
  flex: 0 0 auto;
  font-size: var(--wb-fs-12);
  color: var(--wb-accent-ink);
  background: var(--wb-accent-soft);
  border-radius: var(--wb-radius-pill);
  padding: 0 var(--wb-space-2);
}

.customers-import-column-note {
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--wb-fs-12);
  color: var(--wb-text-secondary);
  text-align: right;
}

.customers-import-summary {
  margin: 0 0 var(--wb-space-1);
  font-weight: 600;
  color: var(--wb-input-ink);
}

.customers-import-confirm {
  margin-top: var(--wb-space-3);
}

.cu-archive-manage-list {
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-1);
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-panel);
  padding: var(--wb-space-2);
  margin: var(--wb-space-2) 0;
}

.cu-archive-manage-row {
  display: flex;
  align-items: center;
  gap: var(--wb-space-2);
  padding: var(--wb-space-1) var(--wb-space-2);
  border-radius: var(--wb-radius-control);
}

.cu-archive-manage-row:hover {
  background: var(--wb-surface-muted);
}

.cu-archive-manage-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: var(--wb-input-ink);
}

.cu-archive-manage-badge {
  flex: 0 0 auto;
  font-size: var(--wb-fs-12);
  color: var(--wb-text-secondary);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-pill);
  padding: 0 var(--wb-space-2);
}

.cu-archive-manage-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--wb-space-1);
  flex: 0 0 auto;
  font-size: var(--wb-fs-12);
  color: var(--wb-text-secondary);
  cursor: pointer;
}

.cu-archive-manage-delete {
  color: var(--wb-danger);
}

.cu-archive-manage-add {
  display: flex;
  align-items: center;
  gap: var(--wb-space-2);
  margin-top: var(--wb-space-2);
}

.cu-archive-manage-add .customers-field-input {
  flex: 1;
  min-width: 0;
}
