/* 第一服务驾驶舱 · 手机端回款/收缴阅读体验 v2（2026-11-04）
   v1 问题（/collection 项目明细表）：
   - 收缴率列(sticky 右, 实测 287px) + 服务中心列(sticky 左, 168px) 合计 455px，
     超出手机容器 340px，右列白底直接盖住中心名字 → 「看不全」根因；
   - tbody:last-child 选择器误涂「撤场项目」行；tfoot 合计行被白底格子压住。
   v2 方案（仅 ≤640，仅明细表 .aph-service-center-scroll table.data-table）：
   1) 表格强制 table-layout:fixed（auto 布局下 max-width 会被 min-content
      总宽分配无视；表格还有 React 内联 min-width:980px，须 !important），
      width:auto + 全列显式宽，App 自隐「逾期」两列时自动收缩；
   2) 两级 sticky：片区 60px(left:0) + 服务中心 130px(left:60px) 左锚，
      收缴率 118px 右锚；合计 308px ≤ 容器 340px，互不重叠；
      注意 tfoot 只有 7 格（无服务中心格），「华北合计」标签在片区列，
      收缴率合计是 nth-child(5) —— 不能隐藏片区列，否则合计标签消失；
   3) 收缴率格隐藏进度条，百分数与「达标 · 目标 xx%」两行堆叠。
   回滚：index.html 两行引用退回 v1 目录或删除。 */
@media (max-width: 640px) {
  /* ---- /collection 项目明细表：定宽布局 ---- */
  .aph-service-center-scroll table.data-table {
    table-layout: fixed !important;
    width: auto !important;
    min-width: 0 !important;
  }
  /* 列宽：片区 60 / 服务中心 130 / 应收 100 / 实收 100 / 未收 92 /
     收缴率 118 / 30天内逾期 72 / 90天以上 72（后两列 App 端自隐） */
  .aph-service-center-scroll table.data-table th:nth-child(1),
  .aph-service-center-scroll table.data-table tbody td:nth-child(1) {
    width: 84px;
    padding: 6px;
    font-size: 11px;
    white-space: nowrap;
  }
  .aph-service-center-scroll table.data-table th:nth-child(3),
  .aph-service-center-scroll table.data-table tbody td:nth-child(3),
  .aph-service-center-scroll table.data-table th:nth-child(4),
  .aph-service-center-scroll table.data-table tbody td:nth-child(4) {
    width: 100px;
  }
  .aph-service-center-scroll table.data-table th:nth-child(5),
  .aph-service-center-scroll table.data-table tbody td:nth-child(5) {
    width: 92px;
  }
  .aph-service-center-scroll table.data-table th:nth-child(7),
  .aph-service-center-scroll table.data-table tbody td:nth-child(7),
  .aph-service-center-scroll table.data-table th:nth-child(8),
  .aph-service-center-scroll table.data-table tbody td:nth-child(8) {
    width: 72px;
  }
  /* 片区：sticky 左第一级 */
  .aph-service-center-scroll table.data-table th:nth-child(1),
  .aph-service-center-scroll table.data-table tbody td:nth-child(1) {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #ffffff;
  }
  .aph-service-center-scroll table.data-table th:nth-child(1) {
    background: #16283c;
    z-index: 3;
  }
  /* 服务中心：sticky 左第二级（让开片区列） */
  .aph-service-center-scroll table.data-table th:nth-child(2),
  .aph-service-center-scroll table.data-table tbody td:nth-child(2) {
    position: sticky;
    left: 84px;
    z-index: 2;
    background: #ffffff;
    box-shadow: 2px 0 0 rgba(17, 24, 39, 0.08);
    width: 126px;
    min-width: 126px;
    max-width: 126px;
    padding: 6px 8px;
    font-size: 12.5px;
    line-height: 1.35;
    overflow: hidden;
  }
  .aph-service-center-scroll table.data-table th:nth-child(2) {
    background: #16283c;
    z-index: 3;
  }
  /* 收缴率：sticky 右 */
  .aph-service-center-scroll table.data-table th:nth-child(6),
  .aph-service-center-scroll table.data-table tbody td:nth-child(6) {
    position: sticky;
    right: 0;
    z-index: 2;
    background: #ffffff;
    box-shadow: -2px 0 0 rgba(17, 24, 39, 0.12);
    width: 118px;
    min-width: 118px;
    max-width: 118px;
    padding: 6px 8px;
    text-align: right;
    overflow: hidden;
  }
  .aph-service-center-scroll table.data-table th:nth-child(6) {
    background: #16283c;
    z-index: 3;
  }
  /* 收缴率格内部：去进度条、百分数与目标说明两行堆叠 */
  .aph-service-center-scroll table.data-table tbody td:nth-child(6) .flex {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
  }
  .aph-service-center-scroll table.data-table tbody td:nth-child(6) .progress-bar {
    display: none;
  }
  .aph-service-center-scroll table.data-table tbody td:nth-child(6) .num {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    white-space: nowrap;
    font-size: 13px;
    line-height: 1.3;
  }
  .aph-service-center-scroll table.data-table tbody td:nth-child(6) .r228-target {
    font-size: 10px;
    white-space: nowrap;
  }
  /* tfoot 合计行（仅 7 格）：片区列=「华北合计」标签 sticky 左，
     nth-child(5)=收缴率合计 sticky 右；整行深色底防横滑露白 */
  .aph-service-center-scroll table.data-table tfoot td {
    background: #16283c;
  }
  .aph-service-center-scroll table.data-table tfoot td:nth-child(1) {
    position: sticky;
    left: 0;
    z-index: 2;
  }
  .aph-service-center-scroll table.data-table tfoot td:nth-child(5) {
    position: sticky;
    right: 0;
    z-index: 2;
  }
  /* ---- /payment 手机搜索框（v1 原样保留） ---- */
  .m-search-box {
    display: flex;
    gap: 8px;
    margin: 8px 0 4px;
  }
  .m-search-box input {
    flex: 1;
    min-width: 0;
    height: 40px;
    padding: 0 12px;
    font-size: 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #111827;
  }
  .m-search-box input:focus {
    outline: 2px solid #c00020;
    outline-offset: 1px;
  }
  .m-search-box .m-search-clear {
    height: 40px;
    padding: 0 14px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #4b5563;
  }
}
@media (min-width: 641px) {
  .m-search-box { display: none; }
}
