/* ============================================================
   responsive.css — 响应式规则
   桌面、平板、移动端适配
   ============================================================ */

/* ============================================================
   中等屏幕 (769px - 1200px)
   ============================================================ */
@media (max-width: 1200px) and (min-width: 769px) {
  .stats-grid:not(.task-stats-grid) {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .charts-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 16px;
    margin-bottom: 16px;
    grid-template-columns: unset !important;
  }
  .charts-row .card {
    flex: 1;
    min-width: 300px;
    max-width: 100%;
  }
  .tables-row {
    grid-template-columns: 1fr !important;
  }
  .quick-actions {
    grid-template-columns: repeat(2, 1fr);
  }

  /* 客户详情三栏 → 压缩 */
  .cdo-body {
    grid-template-columns: 220px 1fr 260px;
  }

  /* ---- 问题B: 侧边栏展开时内联样式网格覆盖 ---- */
  /* 4列 stats-grid → 2列（覆盖内联样式） */
  #page-dashboard .stats-grid,
  #page-workspace .stats-grid,
  #page-opportunities .stats-grid,
  #page-customers .stats-grid,
  #page-loans .stats-grid,
  #page-contracts .stats-grid,
  #page-orders .stats-grid,
  #page-commission .stats-grid,
  #page-advisors .stats-grid,
  #page-refund .stats-grid,
  #page-ocean .stats-grid,
  #page-finance .stats-grid,
  #page-credits .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* 5列 stats-grid → auto-fill 自适应（覆盖内联样式） */
  #page-funnel .stats-grid,
  #page-marketing .stats-grid,
  #page-channels .stats-grid,
  #page-reports .stats-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)) !important;
  }

  /* ---- 问题B: 图表行 & 特殊布局 ---- */
  /* 营销管理双栏布局 320px:1fr → 1fr 单列 */
  #page-marketing [style*="display:grid;grid-template-columns:320px 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* 财务报表图表行 1fr:320px → 1fr 单列 */
  #page-finance [style*="grid-template-columns:1fr 320px"] {
    grid-template-columns: 1fr !important;
  }

  /* ---- 问题C: SVG 图表容器防溢出 ---- */
  .card-body svg,
  .chart-container svg,
  .chart-box svg,
  [class*="chart"] svg {
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .card-body {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* ---- advisor 筛选栏换行 ---- */
  #page-advisors .page-actions,
  #page-advisors [style*="display:flex;flex-wrap:nowrap"] {
    flex-wrap: wrap !important;
    gap: var(--space-2);
  }

  /* ============================================================
     中屏补充修复：强制滚动条、防溢出、防折叠、图表换行
     ============================================================ */

  /* ---- 修复: 强制所有页面内容区具有滚动能力 ---- */
  .content {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* ---- 修复: 页面容器宽度保护 - 防止侧边栏展开时被挤压 ---- */
  [id^="page-"] {
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  /* ---- 修复: 所有页面的 card 容器溢出保护 ---- */
  [id^="page-"] .card {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  /* ---- 修复: 全局表格横向滚动保护（中屏） ---- */
  [id^="page-"] .table-container,
  [id^="page-"] .table-wrap,
  [id^="page-"] [class*="table-scroll"] {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  [id^="page-"] .data-table {
    min-width: auto !important;
    white-space: nowrap;
  }

  /* ---- 修复: 跟进记录 - 强制表格滚动条 ---- */
  #page-followups .data-table,
  #page-followups table {
    min-width: 800px !important;
    white-space: nowrap;
  }

  /* ---- 修复: 任务中心 - 强制表格滚动条 ---- */
  #page-tasks .data-table {
    min-width: 800px !important;
    white-space: nowrap;
  }

  /* ---- 修复: 智能匹配 - 强制表格滚动条 ---- */
  #page-matching .data-table {
    min-width: 700px !important;
    white-space: nowrap;
  }

  /* ============================================================
     第二轮新修复：跟进记录/智能匹配/审计日志/商机管理/平台团队/业绩看板
     ============================================================ */

  /* ---- 跟进记录: 覆盖内联 overflow:hidden ---- */
  /* 表格直接包在 <div style="...overflow:hidden"> 中，不在 .card 内 */
  #page-followups > div > div[style*="overflow: hidden"],
  #page-followups > div > div[style*="overflow:hidden"] {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* ---- 智能匹配: 覆盖内联 overflow:hidden ---- */
  #page-matching > div > div[style*="overflow: hidden"],
  #page-matching > div > div[style*="overflow:hidden"] {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* ---- 审计日志: 覆盖内联 overflow:hidden + 普通表格保护 ---- */
  #page-audit > div > div[style*="overflow: hidden"],
  #page-audit > div > div[style*="overflow:hidden"] {
    overflow-x: auto !important;
  }
  #page-audit table {
    min-width: 800px !important;
    white-space: nowrap !important;
  }
  #page-audit th {
    white-space: nowrap !important;
  }

  /* ---- 平台团队: 覆盖内联 overflow:hidden + 普通表格保护 ---- */
  #page-platform-team > div > div[style*="overflow: hidden"],
  #page-platform-team > div > div[style*="overflow:hidden"] {
    overflow-x: auto !important;
  }
  #page-platform-team table {
    min-width: 750px !important;
    white-space: nowrap !important;
  }
  #page-platform-team th {
    white-space: nowrap !important;
  }

  /* ---- 商机管理: 统计卡片 + 操作栏固定, 表格区域可滚动 ---- */
  #page-opportunities > div > .stats-grid {
    position: sticky;
    z-index: 10;
    top: 0;
    background: var(--bg);
  }
  #page-opportunities > div > .page-actions {
    position: sticky;
    z-index: 10;
    top: 165px;
    background: var(--bg);
  }

  /* ---- 业绩看板: 图表行(含产品分布环图) 中屏折单列 ---- */
  #page-dashboard > div > div[style*="grid-template-columns: 1fr 1.2fr"],
  #page-dashboard > div > div[style*="grid-template-columns:1fr 1.2fr"] {
    grid-template-columns: 1fr !important;
  }
  /* 产品分布卡片防止侧边栏展开时被挤压 */
  #page-dashboard .card:has(svg[viewBox="0 0 120 120"]) {
    min-width: 240px;
  }

  /* ---- 修复: 商机详情覆盖层 - 防止溢出 ---- */
  #oppDetailOverlay {
    overflow-x: auto !important;
  }
  #oppDetailOverlay [style*="display:flex;height:calc(100vh - 56px)"] {
    min-width: 800px !important;
    overflow-x: auto !important;
  }

  /* ---- 修复: 营销管理 - 筛选栏换行 + 推广链接表格可滑动 ---- */
  #page-marketing .page-actions {
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  /* 推广链接表格容器内联 overflow:hidden → auto */
  #page-marketing [style*="overflow: hidden"]:has(table.data-table),
  #page-marketing [style*="overflow:hidden"]:has(table.data-table) {
    overflow-x: auto !important;
  }

  /* ---- 修复: 商机管理 - 表格容器独立横向滚动（sticky 表头不动） ---- */
  #oppListContainer {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* ---- 修复: 平台团队 - 筛选栏换行 ---- */
  #page-platform-team .page-actions,
  #page-platform-team [style*="display:flex"] {
    flex-wrap: wrap !important;
    gap: var(--space-2);
  }

  /* ---- 修复: 审计日志 - 工具行换行 ---- */
  #page-audit [style*="display:flex"]:first-child {
    flex-wrap: wrap !important;
    gap: var(--space-2);
  }

  /* ---- 修复: 商机管理 - 页面溢出滚动 ---- */
  #page-opportunities {
    overflow-x: auto !important;
  }

  /* ---- 修复: 今日概览 - 卡片网格单列 ---- */
  #page-workspace .workspace-overview {
    grid-template-columns: 1fr !important;
  }

  /* ---- 修复: 今日概览表格溢出 ---- */
  #page-workspace .workspace-overview .card {
    overflow-x: auto !important;
  }
  #page-workspace .workspace-overview .data-table {
    min-width: 650px;
    white-space: nowrap;
  }
}

/* ============================================================
   移动端遮罩 & 汉堡菜单
   ============================================================ */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: calc(var(--z-sidebar) - 1);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.sidebar-overlay.show {
  display: block;
}

.hamburger-btn {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  width: 38px;
  height: 38px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 9px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hamburger-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-2);
  border-radius: 2px;
  transition: all 0.25s ease;
}

/* ============================================================
   平板/手机 (≤768px)
   ============================================================ */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    z-index: 101;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main {
    margin-left: 0;
  }

  .hamburger-btn {
    display: flex;
  }

  .topbar {
    padding-left: 56px;
  }

  /* 今日概览 */
  .workspace-overview {
    grid-template-columns: 1fr !important;
  }

  .workspace-overview .card {
    min-width: 0;
  }

  .workspace-overview .table-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -16px;
    padding: 0 16px;
  }

  .workspace-overview .table-scroll-wrapper .data-table {
    min-width: 500px;
    white-space: nowrap;
  }

  .workspace-overview .card-body {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .workspace-overview .card-head-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* 任务中心 */
  #page-tasks.task-center-page .task-stats-grid,
  .task-center-page .task-stats-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
  }

  .task-center-page .task-stats-grid .stat-card {
    padding: 10px 8px;
    min-width: 0;
  }

  .task-center-page .task-stats-grid .stat-val {
    font-size: 18px;
  }

  .task-center-page .task-stats-grid .stat-label {
    font-size: 10px;
  }

  .task-center-page .task-stats-grid .stat-icon {
    width: 28px;
    height: 28px;
    font-size: var(--fs-sm);
  }

  .task-center-page .task-table-container .table-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .task-center-page .task-table-container .data-table {
    min-width: 700px;
  }

  .task-center-page .page-actions {
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  /* 渠道管理 */
  #page-channels .stats-grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)) !important;
    gap: 8px;
  }

  #page-channels .stat-card {
    padding: 10px 8px;
    min-width: 0;
  }

  #page-channels .stat-val {
    font-size: var(--fs-md);
  }

  #page-channels .stat-label {
    font-size: 10px;
  }

  #page-channels .page-actions {
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  #page-channels .page-actions input.form-ctrl,
  #page-channels .page-actions select.form-ctrl {
    width: 100% !important;
    max-width: none !important;
  }

  /* 分销概览3个图表卡片 → 单列 */
  #chDistPanel-overview > div[style*="grid-template-columns: 1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* 分销概览统计卡片4列 → 2列 */
  #chDistPanel-overview > .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  #page-channels .data-table {
    min-width: 850px;
    white-space: nowrap;
  }

  #page-channels .data-table td,
  #page-channels .data-table th {
    padding: 7px 5px;
    font-size: var(--fs-xs);
  }

  #page-channels .data-table td:last-child button {
    padding: 3px 6px !important;
    font-size: 10px !important;
  }

  #page-channels #chBatchBar {
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  /* 成交录入表单在移动端 → 单列 */
  #chDistPanel-deals > div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* 分销配置双列 → 单列 */
  #chDistPanel-config > div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* 编辑渠道弹窗双列 → 单列 */
  #chEditModal div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* 分润/结算筛选栏 */
  #chDistPanel-commission div[style*="display:flex"]:has(select),
  #chDistPanel-settle div[style*="display:flex"]:has(select) {
    flex-wrap: wrap !important;
  }

  /* ---- 通用页面标题保护 ---- */
  .topbar-title,
  [id^="page-"] > .page-header,
  [id^="page-"] h2,
  [id^="page-"] h3 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* ---- 通用表格横向滚动保护 ---- */
  [id^="page-"] .table-container,
  [id^="page-"] .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  [id^="page-"] .data-table {
    min-width: 700px;
    white-space: nowrap;
  }

  /* ---- 各页面移动端表格 min-width 覆盖 ---- */
  #page-tasks .data-table { min-width: 800px; }
  #page-ocean .data-table { min-width: 800px; }
  #page-quotes .data-table { min-width: 850px; }
  #page-contracts .data-table { min-width: 850px; }
  #page-orders .data-table { min-width: 850px; }
  #page-commission .data-table { min-width: 850px; }
  #page-products .data-table { min-width: 1050px; }
  #page-reports .data-table { min-width: 800px; }
  #page-loans .data-table { min-width: 900px; }
  #page-payments .data-table { min-width: 950px; }
  #page-funnel .funnel-table { min-width: 600px; white-space: nowrap; }
  #page-refund table { min-width: 850px; white-space: nowrap; }
  #page-advisors table { min-width: 750px; white-space: nowrap; }
  #page-agents table { min-width: 800px; white-space: nowrap; }

  /* ---- 移动端: SVG 图表容器防溢出 ---- */
  .card-body svg,
  .chart-container svg,
  .chart-box svg,
  [class*="chart"] svg {
    max-width: 100% !important;
    overflow: hidden !important;
  }

  /* ---- 移动端: advisor 筛选栏换行 ---- */
  #page-advisors .page-actions,
  #page-advisors [style*="display:flex;flex-wrap:nowrap"] {
    flex-wrap: wrap !important;
    gap: var(--space-2);
  }

  /* 客户详情三栏 → 单栏 */
  .cdo-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
  }

  .cdo-left,
  .cdo-right {
    display: none;
  }
}

/* ============================================================
   小屏手机 (≤375px)
   ============================================================ */
@media screen and (max-width: 375px) {
  html {
    font-size: 13px;
    -webkit-text-size-adjust: 100%;
  }

  body {
    min-width: 320px;
  }

  .topbar {
    padding: 10px 12px;
    padding-left: 56px;
  }

  .topbar-title {
    font-size: var(--fs-lg);
  }

  .topbar .form-ctrl {
    padding: 7px 10px;
    font-size: var(--fs-sm);
  }

  .hamburger-btn {
    width: 40px;
    height: 40px;
  }

  .hamburger-btn span {
    width: 18px;
  }

  .stat-card {
    padding: 10px 8px;
  }

  .stat-val {
    font-size: 18px;
  }

  .stat-label {
    font-size: 10px;
  }

  .stat-icon {
    width: 32px;
    height: 32px;
    font-size: var(--fs-md);
  }

  .workspace-overview .card {
    padding: var(--space-3);
  }

  .card-head {
    padding: 10px 12px;
  }

  .card-head-title {
    font-size: var(--fs-base);
  }

  .data-table {
    font-size: var(--fs-sm);
  }

  .data-table th,
  .data-table td {
    padding: 8px 6px;
  }

  .btn {
    padding: 8px 14px;
    font-size: var(--fs-sm);
  }

  .btn-sm {
    padding: 6px 10px;
    font-size: var(--fs-xs);
  }

  .modal-content {
    padding: 14px;
    border-radius: 14px 14px 0 0;
  }

  /* 渠道管理小屏微调 */
  #page-channels .stats-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)) !important;
    gap: 6px;
  }

  #page-channels .stat-card {
    padding: 8px 6px;
  }

  #page-channels .stat-val {
    font-size: var(--fs-md);
  }

  #page-channels .data-table {
    min-width: 750px;
    font-size: var(--fs-xs);
  }

  /* 分销概览3图表卡片 → 单列 */
  #chDistPanel-overview > div[style*="grid-template-columns: 1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* 成交录入/分销配置 双列 → 单列 */
  #chDistPanel-deals > div[style*="grid-template-columns: 1fr 1fr"],
  #chDistPanel-config > div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* 编辑弹窗双列 → 单列 */
  #chEditModal div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}
/* ============================================================
   全局客户管理页面 — 表格横向滑动保护（所有屏幕）
   解决宽屏下表格溢出导致页面级横向滚动条的问题
   ============================================================ */
#page-customers .card {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}
#page-customers .data-table th {
    white-space: nowrap !important;
}
#page-customers .data-table {
    min-width: 800px;
    white-space: nowrap;
}

/* ============================================================
   全局页面通用 — 表格横向溢出保护（所有屏幕）
   参照 #page-customers 的做法，为所有含表格页面添加溢出保护
   ============================================================ */

/* ---- 跟进管理 #page-followups（6列） ---- */
#page-followups .card { overflow-x: auto !important; -webkit-overflow-scrolling: touch; max-width: 100%; }
#page-followups .data-table th { white-space: nowrap !important; }
#page-followups .data-table { min-width: 700px; white-space: nowrap; }

/* ---- 任务中心 #page-tasks（7列） ---- */
#page-tasks .card { overflow-x: auto !important; -webkit-overflow-scrolling: touch; max-width: 100%; }
#page-tasks .data-table th { white-space: nowrap !important; }
#page-tasks .data-table { min-width: 800px; white-space: nowrap; }

/* ---- 线索管理 #page-leads（7列） ---- */
#page-leads .card { overflow-x: auto !important; -webkit-overflow-scrolling: touch; max-width: 100%; }
#page-leads .data-table th { white-space: nowrap !important; }
#page-leads .data-table { min-width: 750px; white-space: nowrap; }

/* ---- 客户公海 #page-ocean（7列 + checkbox） ---- */
#page-ocean .card { overflow-x: auto !important; -webkit-overflow-scrolling: touch; max-width: 100%; }
#page-ocean .data-table th { white-space: nowrap !important; }
#page-ocean .data-table { min-width: 800px; white-space: nowrap; }

/* ---- 转介绍 #page-referral（7列） ---- */
#page-referral .card { overflow-x: auto !important; -webkit-overflow-scrolling: touch; max-width: 100%; }
#page-referral .data-table th { white-space: nowrap !important; }
#page-referral .data-table { min-width: 750px; white-space: nowrap; }

/* ---- 报价管理 #page-quotes（8列） ---- */
#page-quotes .card { overflow-x: auto !important; -webkit-overflow-scrolling: touch; max-width: 100%; }
#page-quotes .data-table th { white-space: nowrap !important; }
#page-quotes .data-table { min-width: 850px; white-space: nowrap; }

/* ---- 合同管理 #page-contracts（8列） ---- */
#page-contracts .card { overflow-x: auto !important; -webkit-overflow-scrolling: touch; max-width: 100%; }
#page-contracts .data-table th { white-space: nowrap !important; }
#page-contracts .data-table { min-width: 850px; white-space: nowrap; }

/* ---- 订单跟踪 #page-orders（8列） ---- */
#page-orders .card { overflow-x: auto !important; -webkit-overflow-scrolling: touch; max-width: 100%; }
#page-orders .data-table th { white-space: nowrap !important; }
#page-orders .data-table { min-width: 850px; white-space: nowrap; }

/* ---- 提成核算 #page-commission（8列） ---- */
#page-commission .card { overflow-x: auto !important; -webkit-overflow-scrolling: touch; max-width: 100%; }
#page-commission .data-table th { white-space: nowrap !important; }
#page-commission .data-table { min-width: 850px; white-space: nowrap; }

/* ---- 业绩排行 #page-performance（7列） ---- */
#page-performance .card { overflow-x: auto !important; -webkit-overflow-scrolling: touch; max-width: 100%; }
#page-performance .data-table th { white-space: nowrap !important; }
#page-performance .data-table { min-width: 750px; white-space: nowrap; }

/* ---- 知识库 #page-knowledge（7列） ---- */
#page-knowledge .card { overflow-x: auto !important; -webkit-overflow-scrolling: touch; max-width: 100%; }
#page-knowledge .data-table th { white-space: nowrap !important; }
#page-knowledge .data-table { min-width: 750px; white-space: nowrap; }

/* ---- 产品管理 #page-products（10列 + checkbox） ---- */
#page-products .card { overflow-x: auto !important; -webkit-overflow-scrolling: touch; max-width: 100%; }
#page-products .data-table th { white-space: nowrap !important; }
#page-products .data-table { min-width: 1050px; white-space: nowrap; }

/* ---- 报告管理 #page-reports（7列 + checkbox + 收藏） ---- */
#page-reports .card { overflow-x: auto !important; -webkit-overflow-scrolling: touch; max-width: 100%; }
#page-reports .data-table th { white-space: nowrap !important; }
#page-reports .data-table { min-width: 800px; white-space: nowrap; }

/* ---- 放款记录 #page-loans（9列） ---- */
#page-loans .card { overflow-x: auto !important; -webkit-overflow-scrolling: touch; max-width: 100%; }
#page-loans .data-table th { white-space: nowrap !important; }
#page-loans .data-table { min-width: 900px; white-space: nowrap; }

/* ---- 渠道管理 #page-channels（11列 + checkbox） ---- */
#page-channels .card { overflow-x: auto !important; -webkit-overflow-scrolling: touch; max-width: 100%; }
#page-channels .data-table th { white-space: nowrap !important; }
#page-channels .data-table { min-width: 1100px; white-space: nowrap; }
/* 成交审核表（13列：完整分润链） */
#page-channels .ch-review-table { min-width: 1600px !important; }

/* ---- 财务报表 #page-finance（6列） ---- */
#page-finance .card { overflow-x: auto !important; -webkit-overflow-scrolling: touch; max-width: 100%; }
#page-finance .data-table th { white-space: nowrap !important; }
#page-finance .data-table { min-width: 700px; white-space: nowrap; }

/* ---- 销售漏斗 #page-funnel（5列，使用 .funnel-table） ---- */
#page-funnel .card { overflow-x: auto !important; -webkit-overflow-scrolling: touch; max-width: 100%; }
#page-funnel th { white-space: nowrap !important; }
#page-funnel .funnel-table { min-width: 600px; white-space: nowrap; }

/* ---- 智能匹配 #page-matching（6列） ---- */
#page-matching .card { overflow-x: auto !important; -webkit-overflow-scrolling: touch; max-width: 100%; }
#page-matching .data-table th { white-space: nowrap !important; }
#page-matching .data-table { min-width: 700px; white-space: nowrap; }

/* ---- 支付记录 #page-payments（9列，含图片预览列） ---- */
#page-payments .card { overflow-x: auto !important; -webkit-overflow-scrolling: touch; max-width: 100%; }
#page-payments .data-table th { white-space: nowrap !important; }
#page-payments .data-table { min-width: 950px; white-space: nowrap; }

/* ---- 退款管理 #page-refund（8列，使用原生 <table>） ---- */
#page-refund .card { overflow-x: auto !important; -webkit-overflow-scrolling: touch; max-width: 100%; }
#page-refund th { white-space: nowrap !important; }
#page-refund table { min-width: 850px; white-space: nowrap; }

/* ---- 团队管理 #page-advisors（7列，成员列表使用原生 <table>） ---- */
#page-advisors .card { overflow-x: auto !important; -webkit-overflow-scrolling: touch; max-width: 100%; }
#page-advisors th { white-space: nowrap !important; }
#page-advisors table { min-width: 750px; white-space: nowrap; }

/* ---- 代理管理 #page-agents（部分含表格） ---- */
#page-agents .card { overflow-x: auto !important; -webkit-overflow-scrolling: touch; max-width: 100%; }
#page-agents th { white-space: nowrap !important; }
#page-agents table { min-width: 800px; white-space: nowrap; }
/* ---- 审计日志 #page-audit（6列，使用普通 table） ---- */
#page-audit .card { overflow-x: auto !important; -webkit-overflow-scrolling: touch; max-width: 100%; }
#page-audit th { white-space: nowrap !important; }
#page-audit table { min-width: 800px; white-space: nowrap; }

/* ---- 平台团队 #page-platform-team（成员列表使用普通 table） ---- */
#page-platform-team .card { overflow-x: auto !important; -webkit-overflow-scrolling: touch; max-width: 100%; }
#page-platform-team th { white-space: nowrap !important; }
#page-platform-team table { min-width: 750px; white-space: nowrap; }