/* ===================================================
   代采平台 全平台自适应样式（Bootstrap 5 增强版）
   支持：桌面 / 平板 / 手机 全端响应式
   =================================================== */

/* ========== 全局基础 ========== */
body {
  background: #f5f6fa;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}

/* ========== 前台浅色 navbar（用户端） ========== */
.app-navbar {
  background: #fff;
  border-bottom: 1px solid #eaecef;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.app-navbar .navbar-brand { font-weight: 700; letter-spacing: 1px; color: #2b3678f; }
.app-navbar .nav-link { color: #495057; padding: .5rem 1rem; border-radius: 6px; }
.app-navbar .nav-link:hover { background: #f1f3f6; }
.app-navbar .nav-link.active { background: #e7f1ff; color: #0d6efd; }

.card { border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.card-header { background: #fff; border-bottom: 1px solid #eef0f3; font-weight: 600; }
.table-hover tbody tr:hover { background: #f8f9fc; }

/* 状态徽章
 * ⚠️ 2026-10-22 修复：原来这些是无作用域的全局选择器，
 *    而 admin.css 在 front.css **之后**加载 → 前台的「已完成」徽章被后台的绿色覆盖，
 *    前后台同状态色值不一致（前台设计稿是灰 #6c757d）。
 *    加 .admin-shell 作用域后：后台页面用后台色板，前台页面用 front.css 的色板，互不干扰。 */
.admin-shell .badge-status-pending    { background:#ffc107; color:#212529; }
.admin-shell .badge-status-auditing   { background:#0dcaf0; }
.admin-shell .badge-status-processing { background:#0d6efd; }
.admin-shell .badge-status-completed  { background:#198754; }
.admin-shell .badge-status-failed     { background:#dc3545; }
.admin-shell .badge-status-cancelled  { background:#6c757d; }
.admin-shell .badge-status-returned   { background:#fd7e14; }
.badge-settled {
  background: linear-gradient(135deg, #28a745, #20c997) !important;
  color: #fff !important; font-weight: 600; padding: 6px 12px;
  border-radius: 20px; font-size: 13px;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}
.badge-pay-paid   { background:#198754; }
.badge-pay-unpaid { background:#6c757d; }
.badge-pay-refunded { background:#0dcaf0; color:#212529; }
.text-money       { color: #dc3545; font-weight: 600; }
.bg-soft-primary  { background:#e7f1ff; }
.empty-tip        { text-align:center; padding:40px 0; color:#999; }

/* ========== 后台管理 深色侧边栏风格 ========== */
.admin-shell {
  display: flex;
  min-height: 100vh;
}

/* ===== 侧边栏 ===== */
.admin-sidebar {
  width: 240px;
  flex: 0 0 240px;
  background: linear-gradient(180deg, #1f2940 0%, #1a2236 100%);
  color: #cfd6e4;
  padding: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1050;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 侧边栏品牌区 */
.admin-sidebar .brand {
  padding: 16px 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  white-space: nowrap;
  overflow: hidden;
}
.admin-sidebar .brand .logo {
  width: 30px; height: 30px; flex-shrink: 0;
  border-radius: 6px;
  background: linear-gradient(135deg,#0d6efd,#6610f2);
  display: inline-flex; align-items: center; justify-content: center;
  color:#fff; font-size:14px; font-weight:700;
}
.admin-sidebar .brand .brand-name {
  flex: 1; overflow: hidden; text-overflow: ellipsis;
  transition: opacity 0.3s;
}

/* 移动端关闭按钮 */
.sidebar-close-btn {
  background: none; border: none; color: rgba(255,255,255,.6);
  font-size: 16px; cursor: pointer; padding: 2px 6px;
  border-radius: 4px; flex-shrink: 0; margin-left: auto;
  transition: color 0.2s;
}
.sidebar-close-btn:hover { color: #fff; }

/* 导航项 */
.admin-sidebar .nav-section-title {
  padding: 14px 20px 6px;
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 1px; color: #6b7592;
  white-space: nowrap;
}
.admin-sidebar .nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px;
  color: #cfd6e4; text-decoration: none;
  font-size: 14px; border-left: 3px solid transparent;
  white-space: nowrap; overflow: hidden;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.admin-sidebar .nav-item:hover {
  background: rgba(255,255,255,.04); color: #fff;
}
.admin-sidebar .nav-item.active {
  background: rgba(13,110,253,.18); color: #fff;
  border-left-color: #0d6efd;
}
.admin-sidebar .nav-item .icon {
  width: 18px; text-align: center;
  flex-shrink: 0; opacity: 0.85;
}
.admin-sidebar .nav-item .label {
  overflow: hidden; text-overflow: ellipsis;
  transition: opacity 0.3s;
}
/* 二级导航（如 AI 管理下的子页面） */
.admin-sidebar .nav-item.nav-subitem {
  padding: 7px 20px 7px 34px;
  font-size: 13px;
  color: #aeb7c9;
}
.admin-sidebar .nav-item.nav-subitem .icon {
  width: auto; opacity: 0.6;
}

/* ===== 主内容区 ===== */
.admin-main {
  flex: 1;
  background: #f3f4f9;
  min-width: 0;
  display: flex; flex-direction: column;
}

/* 顶部栏 */
.admin-topbar {
  background: #fff; height: 60px; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid #e6e8ef;
  position: sticky; top: 0; z-index: 1040;
  gap: 12px;
}
.admin-topbar .page-title {
  font-size: 17px; font-weight: 600; color: #222b45;
  margin: 0; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.admin-topbar .user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px; border-radius: 30px; background: #f3f4f9;
  white-space: nowrap;
}
.admin-topbar .user-chip .avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg,#0d6efd,#6610f2);
  color: #fff; display: inline-flex; align-items: center;
  justify-content: center; font-weight: 600; font-size: 13px; flex-shrink: 0;
}

/* 移动端汉堡菜单按钮 */
.sidebar-toggle-btn {
  display: flex; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 6px; border-radius: 6px;
  transition: background 0.2s;
  flex-shrink: 0;
}
.sidebar-toggle-btn:hover { background: #f0f0f5; }
.sidebar-toggle-btn span {
  display: block; width: 22px; height: 2px;
  background: #495057; border-radius: 2px;
  transition: background 0.2s;
}

/* 遮罩层 */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1045;
  backdrop-filter: blur(2px);
}

/* 内容区 */
.admin-content {
  padding: 20px;
  flex: 1;
}

/* 卡片 */
.admin-card {
  background: #fff; border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  padding: 18px; margin-bottom: 18px;
  overflow: hidden;
}
.admin-card .card-title {
  font-size: 15px; font-weight: 600; margin: 0 0 14px; color: #222b45;
}

/* ===== 表格（桌面端） ===== */
.admin-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: #fff; border-radius: 8px; overflow: hidden;
}
.admin-table thead th {
  background: #1f2940; color: #cfd6e4; font-weight: 500;
  font-size: 13px; padding: 12px 14px; text-align: left;
  border-bottom: 1px solid #2b3550;
  white-space: nowrap;
}
.admin-table thead th .sort { color: #6b7592; margin-left: 4px; cursor: pointer; }
.admin-table tbody td {
  padding: 12px 14px; border-bottom: 1px solid #f1f3f6;
  font-size: 14px; color: #222b45;
}
.admin-table tbody tr:hover td { background: #f8f9fc; }
.admin-table tbody tr:last-child td { border-bottom: none; }

/* ===== 2026-10-27 用户要求：多列并一 + 居中 + 列间留空隙 =====
   用户管理：用户名/昵称/手机 三列并一、余额/冻结 两列并一
   任务管理：平台单号/外部单号 两列并一、实付/订单金额/接单RMB 三列并一
   并出来的单元格内容一律居中，行距拉开，避免上下行贴在一起看不清。
   ⚠️ 列变少但内容变高，若仍按 width:100% 压缩，用户名/手机号/金额会被折成竖排
      → 给表格 min-width，让容器横向滚动（宁可左右滑动，也不要挤成竖排字）。 */
.table-roomy-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* width:max-content + min-width:100% —— 内容撑多宽就多宽，至少满屏；
   不写死 min-width，避免大屏下出现不必要的横向滚动条。 */
.admin-table.table-roomy { width: max-content; min-width: 100%; }
.admin-table.table-roomy thead th { padding: 12px 18px; }
.admin-table.table-roomy tbody td { padding: 13px 18px; }
.admin-table thead th.text-center { text-align: center; }
.admin-table tbody td.text-center { text-align: center; }
/* 多行小字块（业务统计/合规/可接国家）也不要被压成竖排 */
.admin-table.table-roomy small.user-stat,
.admin-table.table-roomy small.user-comp,
.admin-table.table-roomy .nowrap-cell { white-space: nowrap; }

/* 合并单元格：多行信息纵向居中 + 居中文本，且不折行 */
.admin-table tbody td.merge-cell { text-align: center; vertical-align: middle; line-height: 1.6; white-space: nowrap; }
.merge-cell .mc-line-1 { font-weight: 600; color: #1f2940; }
.merge-cell .mc-line-2 { font-size: 13px; color: #5b657a; }
.merge-cell .mc-line-3 { font-size: 12px; color: #8892a6; }
/* 金额专用（余额红 / 冻结橙 / 接单所得蓝） */
.merge-cell .mc-money   { font-weight: 600; color: #dc3545; }
.merge-cell .mc-frozen  { font-size: 12px; color: #d97706; }
.merge-cell .mc-earn    { font-weight: 600; color: #0d6efd; }
/* 合并单元格里的徽章行（状态/支付 上下两行）务必水平居中，不能左右散开 */
.merge-cell .mc-badge-row { display: flex; align-items: center; justify-content: center; gap: 4px; flex-wrap: nowrap; }
/* 发布者 / 接单者前面的「发」「接」小标签：发=蓝、接=绿，一眼区分角色 */
.merge-cell .mc-tag {
  display: inline-block; margin-right: 5px; padding: 0 4px;
  font-size: 10px; font-weight: 700; line-height: 1.5; border-radius: 3px;
  background: #eef2f7; color: #5b657a;
}
.merge-cell .mc-tag-pub { background: #e7f1ff; color: #0b5ed7; }
.merge-cell .mc-tag-wor { background: #e6f6ee; color: #0f7b45; }

/* 操作列图标按钮 */
.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0; border-radius: 6px;
  border: none; cursor: pointer; font-size: 14px; margin-right: 4px;
  vertical-align: middle;
}
.btn-icon:last-child { margin-right: 0; }
.btn-icon.btn-edit    { background:#e7f1ff; color:#0d6efd; }
.btn-icon.btn-edit:hover    { background:#cfe2ff; }
.btn-icon.btn-del     { background:#fde2e2; color:#dc3545; }
.btn-icon.btn-del:hover     { background:#f7c8c8; }
.btn-icon.btn-view    { background:#e6f4ea; color:#198754; }
.btn-icon.btn-view:hover    { background:#cee9d4; }
.btn-icon.btn-toggle  { background:#fff3cd; color:#b58500; }
.btn-icon.btn-toggle:hover  { background:#ffe69c; }
.btn-icon.btn-ai-on   { background:#e6f4ea; color:#198754; font-weight:700; }
.btn-icon.btn-ai-on:hover   { background:#cee9d4; }
.btn-icon.btn-ai-off  { background:#e9ecef; color:#8a939c; font-weight:700; }
.btn-icon.btn-ai-off:hover  { background:#dde1e5; }

/* ===== 分页 ===== */
.admin-pager {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px; background: #fff; border-radius: 8px;
  margin-top: 14px; font-size: 13px; color: #6c757d;
  flex-wrap: wrap; gap: 10px;
}
.admin-pager .pages {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.admin-pager .pages a,
.admin-pager .pages span {
  min-width: 32px; height: 32px; padding: 0 10px;
  border-radius: 6px; background: #f3f4f9; color: #495057;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; transition: background 0.15s, color 0.15s;
}
.admin-pager .pages a:hover { background: #e7f1ff; color: #0d6efd; }
.admin-pager .pages .active { background: #0d6efd; color: #fff; }

/* ===== 统计卡片（桌面） ===== */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px; margin-bottom: 18px;
}
.admin-stat {
  padding: 18px; border-radius: 10px; color: #fff;
  position: relative; overflow: hidden;
}
.admin-stat::before {
  content: ''; position: absolute; right: -10px; bottom: -10px;
  width: 80px; height: 80px; border-radius: 50%;
  background: rgba(255,255,255,.1);
}
.admin-stat.s1 { background: linear-gradient(135deg,#0d6efd,#0a58ca); }
.admin-stat.s2 { background: linear-gradient(135deg,#6610f2,#520dc2); }
.admin-stat.s3 { background: linear-gradient(135deg,#198754,#146c43); }
.admin-stat.s4 { background: linear-gradient(135deg,#fd7e14,#ca6510); }
.admin-stat.s5 { background: linear-gradient(135deg,#17a2b8,#117a8b); }
.admin-stat.s6 { background: linear-gradient(135deg,#1e3a5f,#0f2027); }
.admin-stat.s7 { background: linear-gradient(135deg,#28a745,#20c997); }
.admin-stat.s8 { background: linear-gradient(135deg,#6c757d,#495057); }
/* s9 拼单退（部分退款单）—— 用橙红警示色，和普通单一眼区分 */
.admin-stat.s9 { background: linear-gradient(135deg,#e8590c,#c2410c); }
.admin-stat.s10 { background: linear-gradient(135deg,#0f766e,#134e4a); }
.admin-stat .label { font-size: 13px; opacity: .88; }
.admin-stat .num { font-size: 26px; font-weight: 700; margin-top: 6px; }

/* 已结算徽章 */
.badge-settled {
  background: linear-gradient(135deg, #28a745, #20c997) !important;
  color: #fff !important; font-weight: 600; padding: 5px 12px;
  border-radius: 20px; font-size: 12px;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
  display: inline-block;
}

/* 上传框 */
.upload-box {
  border: 2px dashed #ced4da; padding: 20px; text-align: center;
  border-radius: 8px; cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.upload-box:hover { border-color: #0d6efd; background: #f8fbff; }

/* ========== 表单样式增强 ========== */
.form-label { font-weight: 500; color: #495057; font-size: 14px; }

/* ========== QR码缩略图 ========== */
.qr-thumb {
  width: 48px; height: 48px; object-fit: contain;
  border: 1px solid #ddd; border-radius: 4px;
  cursor: pointer; background: #fff; padding: 2px;
  transition: border-color 0.2s;
}
.qr-thumb:hover { border-color: #0d6efd; }
.qr-empty {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; color: #aaa;
  border: 1px dashed #ddd; border-radius: 4px;
  font-size: 11px;
}

/* ========== 移动端卡片列表（替代表格） ========== */
.mobile-card-list {
  display: none;
}
.mobile-card-item {
  background: #fff; border-radius: 10px; padding: 14px;
  margin-bottom: 12px; box-shadow: 0 2px 6px rgba(0,0,0,.04);
  border-left: 3px solid transparent;
}
.mobile-card-item.status-active { border-left-color: #0d6efd; }
.mobile-card-item .mc-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.mobile-card-item .mc-title {
  font-size: 14px; font-weight: 600; color: #222b45;
}
.mobile-card-item .mc-body {
  font-size: 13px; color: #6c757d; line-height: 1.6;
}
.mobile-card-item .mc-row {
  display: flex; justify-content: space-between;
  padding: 3px 0; border-bottom: 1px solid #f1f3f6;
}
.mobile-card-item .mc-row:last-child { border-bottom: none; }
.mobile-card-item .mc-label { color: #999; }
.mobile-card-item .mc-value { font-weight: 500; color: #222b45; }
.mobile-card-item .mc-actions {
  margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap;
}

/* ========== ========================================
   响应式断点规则（移动优先）
   ======================================== */

/* ---- 平板（≤ 991px） ---- */
@media (max-width: 991.98px) {
  .admin-stats {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
  }
  .admin-stat .num { font-size: 22px; }

  .admin-content { padding: 14px; }
  .admin-card { padding: 14px; }

  .admin-topbar { padding: 0 14px; }
}

/* ---- 手机（≤ 767.98px） ---- */
@media (max-width: 767.98px) {
  /* 侧边栏默认隐藏（滑入） */
  .admin-sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: 260px;
    transform: translateX(-100%);
    z-index: 1051;
    box-shadow: 4px 0 20px rgba(0,0,0,.3);
  }
  .admin-sidebar.sidebar-open {
    transform: translateX(0);
  }

  /* 遮罩显示 */
  .sidebar-overlay.overlay-active { display: block; }

  /* 主内容区填满 */
  .admin-main { width: 100%; }

  /* 顶部栏 */
  .admin-topbar { height: 54px; padding: 0 14px; }
  .admin-topbar .page-title { font-size: 15px; }
  .admin-topbar .btn-outline-secondary {
    padding: 4px 10px; font-size: 12px;
  }
  .admin-topbar .user-chip { padding: 4px 8px; }
  .admin-topbar .user-chip .avatar { width: 26px; height: 26px; font-size: 12px; }

  /* 内容区内边距 */
  .admin-content { padding: 12px; }

  /* 隐藏 PC 表格，显示手机卡片 */
  .admin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .admin-table { min-width: 700px; }
  .mobile-card-list { display: block; }
  .mobile-card-list.hidden-cards { display: none; }

  /* 统计卡片 */
  .admin-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .admin-stat { padding: 14px 12px; }
  .admin-stat .label { font-size: 12px; }
  .admin-stat .num { font-size: 20px; }

  /* 卡片 */
  .admin-card { padding: 12px; border-radius: 8px; margin-bottom: 12px; }
  .admin-card .card-title { font-size: 14px; }

  /* 搜索表单 */
  .admin-card form.d-flex {
    flex-direction: column; gap: 8px;
  }
  .admin-card form.d-flex > * {
    max-width: 100% !important; width: 100%;
  }
  .admin-card form.d-flex .ms-auto {
    margin-left: 0 !important;
    text-align: center;
    padding-top: 6px;
  }

  /* 分页 */
  .admin-pager { flex-direction: column; align-items: flex-start; gap: 8px; }
  .admin-pager .pages { width: 100%; justify-content: flex-start; }

  /* 操作按钮行 */
  .admin-table tbody td:last-child,
  .admin-table thead th:last-child {
    white-space: normal;
    min-width: 120px;
  }

  /* 徽章紧凑 */
  .badge { font-size: 11px; padding: 3px 7px; }
  .badge-settled { font-size: 11px; padding: 4px 10px; }

  /* 手机端 QR 码放大 */
  .qr-thumb { width: 40px; height: 40px; }
  .qr-empty { width: 40px; height: 40px; font-size: 10px; }
}

/* ---- 超小屏（≤ 374px） ---- */
@media (max-width: 374.98px) {
  .admin-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .admin-stat .num { font-size: 18px; }
  .admin-stat .label { font-size: 11px; }
  .admin-content { padding: 10px; }
}

/* ---- 滚动条美化（webkit） ---- */
.admin-sidebar::-webkit-scrollbar { width: 4px; }
.admin-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 4px; }

/* ---- 防止表格横向撑破布局 ---- */
.admin-table { table-layout: fixed; }

/* ---- 打印样式 ---- */
@media print {
  .admin-sidebar, .admin-topbar, .admin-pager { display: none !important; }
  .admin-main { width: 100% !important; }
  .admin-content { padding: 0 !important; }
}

/* 任务管理：统计卡+筛选区滚动吸顶（topbar 60px / 移动端 54px） */
.admin-pin {
  position: sticky; top: 60px; z-index: 1030;
  background: #f3f4f9; padding-bottom: 6px;
}
@media (max-width: 991.98px) { .admin-pin { top: 54px; } }
/* 手机端不吸顶：统计区随页面滚动，避免遮挡数据 */
@media (max-width: 767.98px) {
  .admin-pin { position: static; z-index: auto; }
}

/* ===== 后台 AI 会话停靠大窗（右侧，切导航不消失，仅手动隐藏） ===== */
.ai-dock {
  position: fixed; top: 60px; right: 0; bottom: 0; z-index: 1025;
  width: min(560px, 44vw);
  background: #fff; border-left: 1px solid #e5e8ef;
  box-shadow: -10px 0 28px rgba(15, 23, 42, .07);
  display: flex; flex-direction: column; overflow: hidden;
}
.ai-dock-head {
  padding: 12px 16px; border-bottom: 1px solid #eef0f3; background: #f8f9fc;
  display: flex; justify-content: space-between; align-items: center; flex: 0 0 auto;
}
.ai-dock-logo {
  display: inline-block; background: linear-gradient(135deg,#0d6efd,#7c3aed);
  color: #fff; font-size: 11px; font-weight: 700; border-radius: 6px;
  padding: 2px 6px; margin-right: 6px; vertical-align: 1px;
}
.ai-dock .ai-msgs { flex: 1 1 auto; overflow-y: auto; padding: 14px 16px; }
.ai-dock .ai-msg { max-width: 82%; font-size: 13.5px; }
.ai-dock .ai-input { padding: 12px 16px; border-top: 1px solid #eef0f3; flex: 0 0 auto; display: flex; gap: 8px; }
/* 打开时正文让出宽度，不遮挡 */
.admin-content.with-ai-dock { margin-right: min(560px, 44vw); transition: margin-right .18s ease; }
@media (max-width: 1399.98px) { .ai-dock { width: min(480px, 46vw); } .admin-content.with-ai-dock { margin-right: min(480px, 46vw); } }
@media (max-width: 991.98px) {
  .ai-dock { top: 54px; width: 100vw; box-shadow: none; }
  .admin-content.with-ai-dock { margin-right: 0; }
}

/* ===== 任务管理表格：表头固定（滚动时吸顶）+ 表格内纵向滚动 ===== */
.tasks-table-wrap {
  max-height: calc(100vh - 250px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
/* 覆盖 .admin-table 的 overflow:hidden（它会阻断 sticky），改由内部滚动容器裁剪 */
.tasks-table-wrap .admin-table { overflow: visible; border-radius: 0; }
.tasks-table-wrap .admin-table thead th {
  position: sticky; top: 0; z-index: 5;
}
/* 保留表头首尾圆角 */
.tasks-table-wrap .admin-table thead th:first-child { border-top-left-radius: 8px; }
.tasks-table-wrap .admin-table thead th:last-child { border-top-right-radius: 8px; }
