/* ==========================================================================
   手机端适配层 —— 只做「让页面在窄屏能用」，不重做业务布局
   加载方式见 src/View/layout/{shell,auth}.php 的 <link media="(max-width:1024px)">
   桌面端完全不加载，app.css 不受影响

   设计原则：
     1. 只处理「容器撑破视口」这一类问题，不改业务视觉
     2. 表格统一走「横滚」，绝不把行摊成竖排卡片
     3. 单个页面出问题，就在这个文件里单独加一小段，带注释说明
    ========================================================================== */

/* --------------------------------------------------------------------------
   0. 基础收口
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  html {
    -webkit-text-size-adjust: 100%;
  }

  body {
    overflow-x: hidden;
  }

  /* 固定宽容器一律改成自适应 */
  main,
  main.content,
  .page,
  .content,
  .wrap,
  .container,
  .card,
  .panel {
    max-width: 100% !important;
    box-sizing: border-box;
  }

  /* 任何元素都不许把页面顶宽 */
  img,
  video,
  iframe,
  svg {
    max-width: 100%;
    height: auto;
  }
}

/* --------------------------------------------------------------------------
   1. 表格 —— 恢复成真表格 + 横滚，不做行转卡片
   app.css 在窄屏把 table.data 的每行摊成竖排卡片（thead 隐藏、
   td 变 block、td::before 打标签），一屏只能看 1-2 条。
   这里把 display 全部改回 table 语义。
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  table.data {
    display: table !important;
    table-layout: auto !important;
    width: auto !important;
    min-width: 760px !important;   /* 7 列表至少要这么宽，否则单号 / 日期全被拆断 */
    max-width: none !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
  }

  table.data > thead { display: table-header-group !important; }
  table.data > tbody { display: table-row-group !important; }

  table.data thead tr,
  table.data tbody tr {
    display: table-row !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  table.data thead th,
  table.data tbody td {
    display: table-cell !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 8px 11px !important;
    border: 0 !important;
    border-bottom: 1px solid #eef1f5 !important;
    border-radius: 0 !important;
    background: transparent !important;
    vertical-align: middle !important;
    text-align: left !important;
    font-size: 12.5px !important;
    line-height: 1.45 !important;
    white-space: nowrap !important;   /* 默认不换行，避免「订单号 / 日期 / 金额」被拆成三行 */
  }

  /* 允许换行的只有这几类：明细 / 备注 / 说明 / 原因 */
  table.data tbody td[class*="detail"],
  table.data tbody td[class*="remark"],
  table.data tbody td[class*="memo"],
  table.data tbody td[class*="note"],
  table.data tbody td[data-th*="明细"],
  table.data tbody td[data-th*="备注"],
  table.data tbody td[data-th*="说明"],
  table.data tbody td[data-th*="原因"] {
    white-space: normal !important;
    word-break: break-word !important;
  }

  table.data thead th {
    background: #f7f8fa !important;
    font-weight: 600 !important;
    color: #4b5563 !important;
    white-space: nowrap !important;
    border-bottom: 1px solid #e5e7eb !important;
  }

  /* 干掉卡片化留下的 ::before 标签 */
  table.data tbody td::before,
  table.data tbody td::after {
    display: none !important;
    content: none !important;
  }

  /* 日期 / 单号 / 金额列不换行 */
  table.data tbody td:first-child,
  table.data tbody td:last-child,
  table.data tbody td.num,
  table.data tbody td.ta-r,
  table.data tbody td.nowrap,
  table.data tbody td[class*="date"],
  table.data tbody td[class*="time"],
  table.data tbody td[class*="num"],
  table.data tbody td[class*="amount"],
  table.data tbody td[class*="points"] {
    white-space: nowrap !important;
  }

  /* 单元格里的徽章 / 按钮保持行内，别拉成整行 */
  table.data tbody td .badge,
  table.data tbody td .chip,
  table.data tbody td .tag {
    display: inline-block !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 2px 4px 2px 0 !important;
    white-space: normal !important;
  }

  table.data tbody td .btn {
    width: auto !important;
    max-width: 100% !important;
    white-space: nowrap !important;
  }

  /* 表格里的小表单横排 */
  table.data tbody td form {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
    width: auto !important;
  }

  /* 包裹层横滚 */
  .table-wrap,
  .cm-scroll,
  .pr-table-wrap,
  .fz-table-wrap,
  .dp-table-wrap {
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
    max-width: 100% !important;
  }

  /* 表格直接装在卡里时，让卡片自己滚 */
  .card:has(> table.data),
  .card:has(> .table-wrap) {
    overflow-x: auto !important;
    overflow-y: visible !important;
  }
}

/* --------------------------------------------------------------------------
   2. 手机 ≤640
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  /* 页面标题区：标题和右侧按钮上下堆 */
  .page-head {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .page-head h1,
  .page-head h2,
  .page-head .page-title {
    font-size: 18px !important;
    line-height: 1.35 !important;
    white-space: normal !important;
  }

  .page-head .spacer {
    display: none !important;
  }

  .page-head .btn,
  .page-head > .actions {
    width: 100% !important;
    justify-content: center !important;
  }

  /* 统计卡：两列 */
  .stats,
  .stat-grid,
  [class*="stats"] {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .stat,
  .stat-card {
    min-width: 0 !important;
    padding: 10px !important;
    overflow: visible !important;
  }

  /* 统计卡里的数字和标签都缩一档，两列排得下 */
  .stat .k,
  .stat .label,
  .stat-label,
  .stat .num,
  .stat .v {
    font-size: 11px !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  .stat strong,
  .stat .value {
    font-size: 20px !important;
    line-height: 1.2 !important;
  }

  /* 表单：单列 */
  .form-grid,
  .form-row,
  .grid-2,
  .grid-3 {
    display: block !important;
  }

  .form-grid > *,
  .form-row > *,
  .grid-2 > *,
  .grid-3 > * {
    width: 100% !important;
    margin-bottom: 10px !important;
  }

  .input,
  .select,
  textarea,
  input:not([type="checkbox"]):not([type="radio"]) {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  /* 卡片内边距收一档 */
  .card {
    padding: 12px !important;
  }

  .card-head {
    padding: 10px 0 !important;
  }

  /* 抽屉：保持侧滑（弹窗走文件末尾的居中规则） */
  .drawer {
    position: fixed !important;
    left: 10px !important;
    right: 10px !important;
    top: 10px !important;
    bottom: 10px !important;
    width: auto !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    transform: none !important;
    overflow-y: auto !important;
  }

  /* Tab 条：可横滚 */
  .tabs,
  .tab-bar,
  [class*="tabs"] {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap !important;
  }

  .tabs > *,
  .tab-bar > * {
    flex: 0 0 auto !important;
  }

  /* 卡片底部操作按钮组：允许换行 */
  .card-ops,
  .wd-ops,
  .row-ops {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    justify-content: flex-start !important;
  }

  .card-ops .btn,
  .wd-ops .btn,
  .row-ops .btn {
    flex: 0 0 auto !important;
    width: auto !important;
  }

  /* 顶栏：标题单行 + 不挤压 */
  .topbar {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 0 10px !important;
    min-height: 52px !important;
  }

  .topbar-title {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    font-size: 15px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .topbar-actions {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
  }

  /* 搜索区：输入框 + 按钮同一行 */
  .mk-order-search,
  .order-search {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .mk-order-search .input,
  .order-search .input {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .mk-order-search .btn,
  .order-search .btn {
    flex: 0 0 auto !important;
    width: auto !important;
    white-space: nowrap !important;
  }
}

/* --------------------------------------------------------------------------
   3. 超窄 ≤380
   -------------------------------------------------------------------------- */
@media (max-width: 380px) {
  .card {
    padding: 10px !important;
  }

  .page-head h1,
  .page-head h2 {
    font-size: 17px !important;
  }

  table.data {
    min-width: 600px !important;
  }

  table.data thead th,
  table.data tbody td {
    padding: 7px 9px !important;
    font-size: 12px !important;
  }

  .btn {
    padding: 7px 12px !important;
    font-size: 12.5px !important;
  }
}

/* --------------------------------------------------------------------------
   4. 登录页
   app.css 的 body.auth-page 是 flex + justify-content:center，
   内容比视口宽时居中会把左边挤出屏幕（「接单、交单、结算」首字被切）。
   .auth-split 还有 overflow:hidden + max-height，把登录按钮整块裁掉。
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  body.auth-page,
  body.auth-split-page {
    display: block !important;
    justify-content: initial !important;
    align-items: initial !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100vh;
    padding: 0 !important;
  }

  .auth-main {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 12px 12px 24px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
  }

  .auth-split {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  .auth-left,
  .auth-right {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    overflow: visible !important;
    box-sizing: border-box;
  }

  .auth-left {
    padding: 22px 16px !important;
  }

  /* 左侧宣传区文案按容器宽走，别留 400px 硬宽 */
  .auth-left h1,
  .auth-left h2,
  .auth-left .al-title,
  .auth-left .al-desc,
  .al-desc,
  .al-title {
    width: auto !important;
    max-width: 100% !important;
    white-space: normal !important;
    word-break: break-word;
  }

  .auth-left h1,
  .auth-left .al-title {
    font-size: 22px !important;
    line-height: 1.32 !important;
  }
}

@media (max-width: 640px) {
  /* 登录卡片撑满 */
  .auth-box {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 18px 16px !important;
    box-sizing: border-box;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .auth-box > *,
  .auth-box form,
  .auth-box form > * {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
  }

  /* 记住用户名 + 忘记密码：允许换行但别挤压文字 */
  .auth-row {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px 12px !important;
    width: 100% !important;
  }

  .auth-row > * {
    white-space: nowrap !important;
    flex: 0 0 auto;
  }

  /* 登录按钮撑满、够高 */
  .auth-box .btn,
  .auth-box button[type="submit"] {
    width: 100% !important;
    height: 46px !important;
    justify-content: center;
  }
}

/* ==========================================================================
   页面专项：/agent/commission 佣金明细（.cm-page）
   只作用于这一页，不影响其它页面

   实测问题：
     卡片 .db-cd 宽 77，里面 .db-cd-ic 图标就占 38，
     剩下的 .db-cd-tx / .db-cd-num / .db-cd-lab 全被压到 3px 宽，
     标签带 nowrap+ellipsis，于是「累计佣金」显示成「累...」
     表格 min-width 600，订单号列只分到 80px（20 字符要 130），
     明细列只分到 97px（要 250），行高被撑到 140px
   ========================================================================== */
@media (max-width: 1024px) {

  /* ---------------- ① KPI 卡片 ----------------
     结构：.cm-stats(网格) > .db-todo(一张卡片容器) > .db-cd × 2(每个指标)
     原来 .cm-stats 是 2 列、.db-todo 内又 2 列 = 375 屏上挤 4 列，
     每列 77px，图标吃 30，文字区只剩 34px，「下级人数」被压到 11px。
     改成：.cm-stats 单列铺满，.db-todo 内 2 列，每个 db-cd 拿到 ~166px。 */
  .cm-page .cm-stats {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .cm-page .cm-stats .db-todo {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  /* 每个指标块自己是一张白卡 */
  .cm-page .cm-stats .db-cd {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 56px !important;
    padding: 10px !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    box-shadow: 0 1px 3px rgba(16,24,40,.06) !important;
    overflow: visible !important;
  }

  /* 图标收小，不再吃掉正文宽度 */
  .cm-page .cm-stats .db-cd-ic {
    flex: 0 0 28px !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 7px !important;
  }

  .cm-page .cm-stats .db-cd-ic svg {
    width: 16px !important;
    height: 16px !important;
  }

  /* 正文区拿回剩余宽度 */
  .cm-page .cm-stats .db-cd-tx {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: 1px !important;
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    overflow: visible !important;
  }

  .cm-page .cm-stats .db-cd-num {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    font-size: 19px !important;
    line-height: 1.15 !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  /* 关键：标签不再用省略号截断，允许换行 */
  .cm-page .cm-stats .db-cd-lab {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    font-size: 11px !important;
    line-height: 1.3 !important;
    color: #6b7280 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-break: break-word !important;
  }

  /* ---------------- ② 明细列表 ---------------- */
  .cm-page table.cm-table.data {
    min-width: 880px !important;
    width: auto !important;
    table-layout: fixed !important;
  }

  .cm-page table.cm-table.data thead th,
  .cm-page table.cm-table.data tbody td {
    padding: 9px 8px !important;
    vertical-align: middle !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    white-space: nowrap !important;
  }

  /* 逐列定宽 —— 时间 / 订单号 / 用户 / 佣金 / 状态 / 余额 / 明细 */
  .cm-page table.cm-table.data th:nth-child(1),
  .cm-page table.cm-table.data td:nth-child(1) { width: 132px !important; }

  .cm-page table.cm-table.data th:nth-child(2),
  .cm-page table.cm-table.data td:nth-child(2) { width: 146px !important; }

  .cm-page table.cm-table.data th:nth-child(3),
  .cm-page table.cm-table.data td:nth-child(3) { width: 72px !important; }

  .cm-page table.cm-table.data th:nth-child(4),
  .cm-page table.cm-table.data td:nth-child(4) {
    width: 54px !important;
    text-align: right !important;
  }

  .cm-page table.cm-table.data th:nth-child(5),
  .cm-page table.cm-table.data td:nth-child(5) {
    width: 108px !important;
    white-space: normal !important;   /* 状态两行：徽章 + 解冻时间 */
  }

  .cm-page table.cm-table.data th:nth-child(6),
  .cm-page table.cm-table.data td:nth-child(6) {
    width: 82px !important;
    text-align: right !important;
  }

  .cm-page table.cm-table.data th:nth-child(7),
  .cm-page table.cm-table.data td:nth-child(7) {
    width: 280px !important;
    white-space: normal !important;
  }

  /* 订单号：单行等宽小字，绝不拆行 */
  .cm-page table.cm-table.data .cm-no,
  .cm-page table.cm-table.data td:nth-child(2) {
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace !important;
    font-size: 11px !important;
    white-space: nowrap !important;
    letter-spacing: .2px !important;
  }

  /* 佣金：单行，别拆成 +2 / 0 */
  .cm-page table.cm-table.data .cm-amt {
    display: inline !important;
    white-space: nowrap !important;
    font-size: 13px !important;
    font-weight: 700 !important;
  }

  /* 下级用户名 */
  .cm-page table.cm-table.data .cm-user {
    display: inline !important;
    white-space: nowrap !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
  }

  /* 状态列：徽章 + 解冻时间上下两行，各自单行 */
  .cm-page table.cm-table.data td:nth-child(5) .badge {
    display: inline-block !important;
    white-space: nowrap !important;
    font-size: 11px !important;
    padding: 2px 7px !important;
    margin: 0 0 3px 0 !important;
  }

  .cm-page table.cm-table.data td:nth-child(5) .cm-fz-at {
    display: block !important;
    margin: 0 !important;
    font-size: 10.5px !important;
    line-height: 1.3 !important;
    color: #9ca3af !important;
    white-space: nowrap !important;
  }

  /* 明细列：主句一行自然折行，订单号单独一行小灰字 */
  .cm-page .cm-detail {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
  }

  .cm-page .cm-detail-main {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 11.5px !important;
    line-height: 1.45 !important;
    color: #6b7280 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  .cm-page .cm-detail-main > b,
  .cm-page .cm-detail-who {
    display: inline !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
  }

  .cm-page .cm-detail-sub {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 2px 0 0 !important;
    padding: 0 !important;
    font-size: 10.5px !important;
    line-height: 1.35 !important;
    color: #9ca3af !important;
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* 行高收回到正常，别再 140px */
  .cm-page table.cm-table.data tbody tr {
    height: auto !important;
  }

  /* 表格容器横滚 */
  .cm-page .cm-scroll {
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
}

/* ==========================================================================
   页面专项：/user/market 接单大厅 + /user/orders 我的订单
   （两个页面共用 .mk-* 和 .oc8-* 组件，改一处两边都好）

   实测问题一「可接任务」：
     .mk-thead / .mk-tr 都是 display:grid，但 grid-template-columns 只写了
     3 列（120px 84px 96px），而两者各有 5 个子元素（任务/模板/成本/库存/按钮）。
     第 4、5 个元素自动流到第二行，.mk-td-stock 直接塌成 w=0，
     所以「库存」那一列永远空白。

   实测问题二「我的订单」：
     .oc8-head 被压到 321px，9 列挤成 28/14/24/69/11/13/18/18/43；
     数据行 .order-card 是 1120px，9 列 121/61/105/296/51/59/78/80/188。
     表头和数据各走一套坐标 → 10 处列间重叠（「状态」压「购买日期」等）。
   ========================================================================== */
@media (max-width: 1024px) {

  /* ---------------- ① 可接任务：补齐 5 列 ---------------- */
  .mk-thead,
  .mk-tr {
    display: grid !important;
    grid-template-columns: 130px 108px 96px 110px 92px !important;
    grid-auto-flow: row !important;
    align-items: center !important;
    gap: 0 !important;
    width: 536px !important;
    min-width: 536px !important;
    max-width: none !important;
    box-sizing: border-box !important;
  }

  .mk-thead > *,
  .mk-tr > * {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 8px 8px 8px 11px !important;
    overflow: hidden !important;
  }

  .mk-thead > * {
    font-size: 11.5px !important;
    font-weight: 600 !important;
    color: #4b5563 !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
  }

  .mk-tr > * {
    font-size: 12px !important;
    line-height: 1.45 !important;
    white-space: normal !important;
  }

  /* 库存列（第 4 个）之前塌成 0，这里强制成块并给宽 */
  .mk-thead > *:nth-child(4),
  .mk-tr > .mk-td-stock,
  .mk-td-stock {
    display: block !important;
    width: 110px !important;
    min-width: 110px !important;
    max-width: 110px !important;
    font-size: 11.5px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* 按钮列（第 5 个） */
  .mk-thead > *:nth-child(5),
  .mk-tr > .mk-td-act,
  .mk-td-act {
    display: block !important;
    width: 92px !important;
    min-width: 92px !important;
    max-width: 92px !important;
    padding-left: 6px !important;
  }

  .mk-thead > *:nth-child(5) { visibility: hidden; }

  .mk-td-act .btn {
    display: inline-flex !important;
    width: auto !important;
    max-width: 100% !important;
    padding: 5px 9px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
  }

  /* 模板那排小标签允许换行 */
  .mk-tr .mk-td-tpl {
    white-space: normal !important;
    overflow: hidden !important;
  }

  .mk-tr .mk-td-tpl > span,
  .mk-tr .mk-td-tpl > b,
  .mk-tr .mk-td-tpl > em {
    display: inline-block !important;
    max-width: 100% !important;
    margin: 1px 4px 1px 0 !important;
    font-size: 10.5px !important;
    white-space: normal !important;
    word-break: break-word !important;
  }

  /* 包裹层横滚 */
  .card:has(.mk-thead),
  .card:has(.mk-tr) {
    overflow-x: auto !important;
    overflow-y: visible !important;
  }

  /* ---------------- ② 我的订单：表头与数据同宽同步 ----------------
     数据行的 9 列实测是 121/62/105/296/51/59/78/81/188 = 1120px。
     表头必须用完全一样的列宽和总宽，否则一定错位。 */
  .oc8-head,
  .order-thead.oc8-head {
    display: grid !important;
    grid-template-columns: 121px 62px 105px 278px 51px 160px 78px 81px 184px !important;
    grid-auto-flow: row !important;
    align-items: center !important;
    gap: 0 !important;
    width: 1120px !important;
    min-width: 1120px !important;
    max-width: none !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }

  .oc8-head > * {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 9px 6px 9px 10px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    color: #4b5563 !important;
    line-height: 1.35 !important;
  }

  /* 数据行同宽同列 */
  .oc8-grid > .order-card,
  .order-card.oc8 {
    grid-template-columns: 121px 62px 105px 278px 51px 160px 78px 81px 184px !important;
    width: 1120px !important;
    min-width: 1120px !important;
    max-width: none !important;
    box-sizing: border-box !important;
  }

  .oc8-grid > .order-card > * {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* 表头和数据一起横滚 */
  .card:has(.oc8-head),
  .card:has(.oc8-grid),
  .card:has(.order-card) {
    overflow-x: auto !important;
    overflow-y: visible !important;
  }
}

/* ==========================================================================
   /user/market + /user/orders 的表头对齐收尾

   实测：.oc8-head 和 .order-card 的容器几何完全一致
     （都是 l=27 / w=1120 / padding-left=14）
   但表头格子只占 40px（该列是 121px），数据格子占满 121px。
   说明表头格子被 justify-self / 内容宽度按中心对齐了，没撑满列。
   强制所有表头格子 justify-self:stretch + width:100% + 左对齐。
   ========================================================================== */
@media (max-width: 1024px) {

  .mk-thead,
  .oc8-head,
  .order-thead.oc8-head {
    justify-items: stretch !important;
    align-items: center !important;
    align-content: center !important;
  }

  .mk-thead > *,
  .oc8-head > * {
    justify-self: stretch !important;
    align-self: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    text-align: left !important;
  }

  /* 表头容器内边距与数据行保持一致（都是 14px 左右），避免二次偏移 */
  .mk-thead,
  .oc8-head {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  /* 数据行同理，保证两边的可用内容宽度一样 */
  .mk-tr,
  .oc8-grid > .order-card,
  .order-card.oc8 {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
}

/* ==========================================================================
   /user/market + /user/orders 数据行格子撑满所在列

   实测：表头 9 列已是 121/62/105/296/51/59/78/81/188（正确），
   但数据行的格子退回内容宽度：第 4 列 296 → 204，
   第 5/7/8 列因为内容是「10」「—」「—」直接缩到 15px。
   两边的格子宽度不一致，左边界自然对不齐（最大偏 75px）。
   强制数据格子 justify-self:stretch + width:100%。
   ========================================================================== */
@media (max-width: 1024px) {

  .oc8-grid > .order-card > *,
  .order-card.oc8 > *,
  .mk-tr > * {
    justify-self: stretch !important;
    align-self: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 数据行容器本身也开 stretch，防止内容把列挤变形 */
  .oc8-grid > .order-card,
  .order-card.oc8,
  .mk-tr {
    justify-items: stretch !important;
    align-items: center !important;
  }

  /* 数字列右对齐，视觉上跟表头一致（表头也是这列） */
  .oc8-grid > .order-card > *:nth-child(5),
  .oc8-grid > .order-card > *:nth-child(6) {
    text-align: right !important;
    padding-right: 10px !important;
  }

  .oc8-head > *:nth-child(5),
  .oc8-head > *:nth-child(6) {
    text-align: right !important;
    padding-right: 10px !important;
  }
}

/* ==========================================================================
   最后一刀：列间距 dift

   实测两边列宽已经完全一致（121/62/105/296/51/59/78/81/188），
   但左边界每推进一列就多偏 6px：
     第1列 表头 l=42  数据 l=42   （0）
     第2列 表头 l=163 数据 l=169  （+6）
     第3列 表头 l=225 数据 l=237  （+12）
   等差数列 → 说明页面上有一条 column-gap:6px 只作用在数据行（或表头）
   把两边的 column-gap / row-gap 全部锁成 0。
   ========================================================================== */
@media (max-width: 1024px) {

  .oc8-head,
  .order-thead.oc8-head,
  .oc8-grid,
  .order-grid.oc8-grid,
  .oc8-grid > .order-card,
  .order-card.oc8,
  .mk-thead,
  .mk-tr {
    column-gap: 0 !important;
    row-gap: 0 !important;
    gap: 0 !important;
    grid-column-gap: 0 !important;
    grid-row-gap: 0 !important;
  }

  /* 顺带把可能有 margin 的格子也清零，防止再冒一次累积偏移 */
  .oc8-head > *,
  .oc8-grid > .order-card > *,
  .order-card.oc8 > *,
  .mk-thead > *,
  .mk-tr > * {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* ==========================================================================
   /user/orders「实得（审核后）」列里那个冻结徽章

   实测：
     第6列 .oc-cell.oc-num 只有 59px
     但里面 .fz-cell 宽 129px：
       .fz-amt   「100」
       .fz-pill  「● 冻结中 | 3天13小时」  (129px)
     溢出 70px，压到第 5 列（积分）和第 7 列（提交）上。
   上面已经把第 6 列加宽到 160px，这里再把徽章收紧一档，保证一定装得下。
   ========================================================================== */
@media (max-width: 1024px) {

  /* 冻结单元格：金额一行、徽章一行，纵向排列 */
  .oc8-grid > .order-card .fz-cell,
  .order-card.oc8 .fz-cell {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: 2px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    overflow: hidden !important;
  }

  .oc8-grid > .order-card .fz-amt,
  .order-card.oc8 .fz-amt {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    font-size: 12.5px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
  }

  /* 徽章本体：整体压缩，装得进 160px */
  .oc8-grid > .order-card .fz-pill,
  .order-card.oc8 .fz-pill {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 3px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    padding: 1px 5px !important;
    box-sizing: border-box !important;
    font-size: 9.5px !important;
    line-height: 1.5 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    border-radius: 999px !important;
  }

  .oc8-grid > .order-card .fz-pill > *,
  .order-card.oc8 .fz-pill > * {
    flex: 0 0 auto !important;
    min-width: 0 !important;
    font-size: inherit !important;
    line-height: inherit !important;
    white-space: nowrap !important;
  }

  /* 圆点和小竖线收细 */
  .oc8-grid > .order-card .fz-dot,
  .order-card.oc8 .fz-dot {
    width: 4px !important;
    height: 4px !important;
  }

  .oc8-grid > .order-card .fz-div,
  .order-card.oc8 .fz-div {
    width: 1px !important;
    height: 8px !important;
  }

  /* 倒计时文字再小半档 */
  .oc8-grid > .order-card .oc-countdown,
  .order-card.oc8 .oc-countdown {
    font-size: 9.5px !important;
    font-variant-numeric: tabular-nums !important;
  }

  /* 第 5 / 6 列表头右对齐、内边距收窄，配合数字列 */
  .oc8-head > *:nth-child(6) {
    padding-left: 4px !important;
    padding-right: 8px !important;
    text-align: left !important;
  }

  .oc8-grid > .order-card > *:nth-child(6) {
    padding-left: 4px !important;
    padding-right: 8px !important;
  }
}

/* ==========================================================================
   「可接任务」改成 A 方案：卡片竖排三段
   老板选的是预览页的 A——任务名+库存 / 模板标签 / 成本+按钮

   现有 DOM 是表格两段：
     .mk-thead  表头 5 个 span（任务 / 可提交模板 / 账号成本 / 库存 / 空）
     .mk-tr     数据行 5 个 div，顺序是：name / tpl / cost / stock / act
   纯 CSS 卡片化：
     ① 藏掉表头（卡片不需要表头）
     ② .mk-tr 变卡片，用 grid-template-areas 重排成三行
          name  stock
          tpl   tpl
          cost  act
     ③ 去掉外层横滚，多张卡片自然竖排
   ========================================================================== */
@media (max-width: 1024px) {

  /* ① 藏表头 */
  .mk-thead,
  .order-thead.oc8-head + .mk-thead {
    display: none !important;
  }

  /* ② 卡片本体 */
  .mk-tr {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "name stock"
      "tpl  tpl"
      "cost act" !important;
    grid-auto-flow: row !important;
    gap: 9px 10px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 12px !important;
    margin: 0 0 9px 0 !important;
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    box-shadow: 0 1px 2px rgba(16,24,40,.04) !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  .mk-tr:last-child {
    margin-bottom: 0 !important;
  }

  /* 卡片内所有格子重置掉表格时代的定宽和裁剪 */
  .mk-tr > * {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
  }

  /* 五个格子归位 */
  .mk-tr > .mk-td-name  { grid-area: name  !important; align-self: center !important; }
  .mk-tr > .mk-td-stock { grid-area: stock !important; align-self: center !important;
                          justify-self: end !important; text-align: right !important; }
  .mk-tr > .mk-td-tpl   { grid-area: tpl   !important; align-self: start !important; }
  .mk-tr > .mk-td-cost  { grid-area: cost  !important; align-self: center !important; }
  .mk-tr > .mk-td-act   { grid-area: act   !important; align-self: center !important;
                          justify-self: end !important;
                          display: flex !important; align-items: center !important; }

  /* 任务名 */
  .mk-tr > .mk-td-name {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    word-break: break-word !important;
  }

  /* 库存 */
  .mk-tr > .mk-td-stock {
    font-size: 11.5px !important;
    line-height: 1.4 !important;
    white-space: nowrap !important;
  }

  /* 模板标签：允许换行铺满整行 */
  .mk-tr > .mk-td-tpl {
    white-space: normal !important;
    line-height: 1.5 !important;
  }

  .mk-tr > .mk-td-tpl > *,
  .mk-tr > .mk-td-tpl span,
  .mk-tr > .mk-td-tpl b,
  .mk-tr > .mk-td-tpl em,
  .mk-tr > .mk-td-tpl a {
    display: inline-block !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 4px 4px 0 !important;
    padding: 1px 7px !important;
    font-size: 10.5px !important;
    line-height: 1.5 !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
  }

  /* 成本 */
  .mk-tr > .mk-td-cost {
    font-size: 12px !important;
    color: #6b7280 !important;
    line-height: 1.4 !important;
    white-space: nowrap !important;
  }

  .mk-tr > .mk-td-cost b,
  .mk-tr > .mk-td-cost strong,
  .mk-tr > .mk-td-cost .num {
    display: inline !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    margin-right: 1px !important;
  }

  /* 接单按钮 */
  .mk-tr > .mk-td-act .btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    max-width: 100% !important;
    height: 30px !important;
    padding: 0 14px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
  }

  /* ③ 外层不再横滚，卡片竖排 */
  .card:has(.mk-tr),
  .card:has(.mk-thead) {
    overflow-x: visible !important;
    overflow-y: visible !important;
  }

  /* 卡片之间的容器 */
  .mk-body,
  .mk-list,
  .mk-items {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }
}

/* ==========================================================================
   「我的订单」改成 A 方案：卡片四段式
   老板选的是预览页的 A——订单号+状态 / 任务名 / 账号密码 / 日期+数字+按钮

   现有 DOM：.order-card 里 9 个格子，顺序固定
     1 .oc-main          订单号 + 任务名（自带两行）
     2 .oc-badge-cell    状态徽章
     3 .oc-date          购买日期
     4 .oc-acct-cell     账号 + 密码 + 眼睛
     5 .oc-num           积分
     6 .oc-num           实得（审核后）+ 冻结徽章
     7 .oc-cell          去提交 / —
     8 .oc-reject-time   被拒时间
     9 .oc-remark-in     审核备注

   排成 4 行 4 列：
     行1 ┌ main（跨1-2）           badge（跨3-4） ┐
     行2 │ acct（整行）                            │
     行3 │ date  num1  num2        act              │
     行4 └ reject（跨1-2）         remark（跨3-4）  ┘
   ========================================================================== */
@media (max-width: 1024px) {

  /* ① 藏表头 */
  .oc8-head,
  .order-thead.oc8-head {
    display: none !important;
  }

  /* ② 卡片本体 */
  .oc8-grid {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .oc8-grid > .order-card,
  .order-card.oc8 {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto auto !important;
    grid-auto-flow: row !important;
    column-gap: 8px !important;
    row-gap: 7px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 11px 12px !important;
    margin: 0 0 9px 0 !important;
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    box-shadow: 0 1px 2px rgba(16,24,40,.04) !important;
    box-sizing: border-box !important;
    align-items: center !important;
  }

  .oc8-grid > .order-card:last-child,
  .order-card.oc8:last-child {
    margin-bottom: 0 !important;
  }

  /* 卡片内格子重置掉表格时代的定宽裁剪 */
  .oc8-grid > .order-card > *,
  .order-card.oc8 > * {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    white-space: normal !important;
  }

  /* ③ 九宫格归位 */
  /* 行1：订单号+任务名  |  状态 */
  .oc8-grid > .order-card > *:nth-child(1),
  .order-card.oc8 > *:nth-child(1) { grid-column: 1 / 3 !important; grid-row: 1 !important; }
  .oc8-grid > .order-card > *:nth-child(2),
  .order-card.oc8 > *:nth-child(2) { grid-column: 3 / 5 !important; grid-row: 1 !important;
                                    justify-self: end !important; align-self: start !important; }

  /* 行2：账号密码 整行 */
  .oc8-grid > .order-card > *:nth-child(4),
  .order-card.oc8 > *:nth-child(4) { grid-column: 1 / 5 !important; grid-row: 2 !important; }

  /* 行3：日期 | 积分 | 实得 | 按钮 */
  .oc8-grid > .order-card > *:nth-child(3),
  .order-card.oc8 > *:nth-child(3) { grid-column: 1 !important; grid-row: 3 !important; }
  .oc8-grid > .order-card > *:nth-child(5),
  .order-card.oc8 > *:nth-child(5) { grid-column: 2 !important; grid-row: 3 !important;
                                    text-align: right !important; }
  .oc8-grid > .order-card > *:nth-child(6),
  .order-card.oc8 > *:nth-child(6) { grid-column: 3 !important; grid-row: 3 !important;
                                    text-align: right !important; }
  .oc8-grid > .order-card > *:nth-child(7),
  .order-card.oc8 > *:nth-child(7) { grid-column: 4 !important; grid-row: 3 !important;
                                    justify-self: end !important;
                                    display: flex !important; align-items: center !important; }

  /* 行4：被拒时间 | 审核备注 */
  .oc8-grid > .order-card > *:nth-child(8),
  .order-card.oc8 > *:nth-child(8) { grid-column: 1 / 3 !important; grid-row: 4 !important; }
  .oc8-grid > .order-card > *:nth-child(9),
  .order-card.oc8 > *:nth-child(9) { grid-column: 3 / 5 !important; grid-row: 4 !important; }

  /* ④ 各字段排版 */

  /* 订单号 + 任务名 */
  .oc8-grid > .order-card .oc-main,
  .order-card.oc8 .oc-main {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    min-width: 0 !important;
    line-height: 1.35 !important;
  }

  /* 订单号：等宽小灰字 */
  .oc8-grid > .order-card .oc-main > .oc-no,
  .order-card.oc8 .oc-main > .oc-no,
  .oc8-grid > .order-card .oc-main > :first-child,
  .order-card.oc8 .oc-main > :first-child {
    display: block !important;
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace !important;
    font-size: 10.5px !important;
    color: #9ca3af !important;
    letter-spacing: .2px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* 任务名 */
  .oc8-grid > .order-card .oc-main > .oc-task,
  .order-card.oc8 .oc-main > .oc-task,
  .oc8-grid > .order-card .oc-main > :nth-child(2),
  .order-card.oc8 .oc-main > :nth-child(2) {
    display: block !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    word-break: break-word !important;
  }

  /* 状态徽章 */
  .oc8-grid > .order-card .badge,
  .order-card.oc8 .badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: 22px !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  /* 账号密码 */
  .oc8-grid > .order-card .acct-card,
  .order-card.oc8 .acct-card {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 5px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 3px 8px !important;
    background: #f7f8fa !important;
    border: 1px solid #eef1f5 !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .oc8-grid > .order-card .acct-card > *,
  .order-card.oc8 .acct-card > * {
    min-width: 0 !important;
    flex: 0 1 auto !important;
  }

  .oc8-grid > .order-card .acct-seg,
  .order-card.oc8 .acct-seg {
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace !important;
    font-size: 11px !important;
    color: #4b5563 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
  }

  /* 日期 */
  .oc8-grid > .order-card .oc-date,
  .order-card.oc8 .oc-date {
    font-size: 11.5px !important;
    color: #9ca3af !important;
    white-space: nowrap !important;
  }

  /* 积分 / 实得 */
  .oc8-grid > .order-card .oc-num,
  .order-card.oc8 .oc-num {
    font-size: 12px !important;
    color: #6b7280 !important;
    white-space: nowrap !important;
    line-height: 1.35 !important;
  }

  .oc8-grid > .order-card .oc-num b,
  .order-card.oc8 .oc-num b {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
  }

  /* 冻结徽章：一行放不下就让它在实得那格里折行 */
  .oc8-grid > .order-card .fz-cell,
  .order-card.oc8 .fz-cell {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 2px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  .oc8-grid > .order-card .fz-amt,
  .order-card.oc8 .fz-amt {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    white-space: nowrap !important;
  }

  .oc8-grid > .order-card .fz-pill,
  .order-card.oc8 .fz-pill {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 3px !important;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    padding: 1px 6px !important;
    border-radius: 999px !important;
    font-size: 9.5px !important;
    line-height: 1.5 !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
  }

  .oc8-grid > .order-card .fz-pill > *,
  .order-card.oc8 .fz-pill > * {
    flex: 0 0 auto !important;
    font-size: inherit !important;
    white-space: nowrap !important;
  }

  .oc8-grid > .order-card .fz-dot,
  .order-card.oc8 .fz-dot { width: 4px !important; height: 4px !important; }
  .oc8-grid > .order-card .fz-div,
  .order-card.oc8 .fz-div { width: 1px !important; height: 8px !important; }

  /* 去提交按钮 */
  .oc8-grid > .order-card .btn,
  .order-card.oc8 .btn,
  .oc8-grid > .order-card a.btn,
  .order-card.oc8 a.btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: 28px !important;
    padding: 0 12px !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
  }

  /* 被拒时间 / 审核备注：只在有内容时才占位 */
  .oc8-grid > .order-card .oc-reject-time,
  .order-card.oc8 .oc-reject-time,
  .oc8-grid > .order-card .oc-remark-in,
  .order-card.oc8 .oc-remark-in {
    font-size: 10.5px !important;
    color: #dc2626 !important;
    line-height: 1.4 !important;
    white-space: normal !important;
    word-break: break-word !important;
  }

  /* 内容只有「—」时把那一行压扁 */
  .oc8-grid > .order-card > *:nth-child(8):has(> .weak),
  .oc8-grid > .order-card > *:nth-child(9):has(> .weak) {
    display: none !important;
  }

  /* ⑤ 容器不再横滚 */
  .card:has(.oc8-grid),
  .card:has(.oc8-head),
  .card:has(.order-card) {
    overflow-x: visible !important;
    overflow-y: visible !important;
  }

  .order-scroll,
  .order-grid.oc8-grid {
    overflow: visible !important;
  }
}

/* ==========================================================================
   「我的订单」A 方案 · 行3 列宽修正
   实测问题：grid-template-columns 算成 99.5/24.8/131.6/15.1，
   日期列吃掉 99px，把「10」挤成 24px，「100」占 131px 把「—」推到最右。
   改成 auto + 1fr 组合，日期按内容宽、数字吃剩余、按钮靠右。
   ========================================================================== */
@media (max-width: 1024px) {

  .oc8-grid > .order-card,
  .order-card.oc8 {
    grid-template-columns: auto minmax(0, 1fr) auto auto !important;
  }

  /* 日期：按内容宽，字号压到 11 */
  .oc8-grid > .order-card > *:nth-child(3),
  .order-card.oc8 > *:nth-child(3) {
    grid-column: 1 !important;
    grid-row: 3 !important;
    justify-self: start !important;
    font-size: 11px !important;
    color: #9ca3af !important;
  }

  /* 积分：吃中间剩余宽度，左对齐 */
  .oc8-grid > .order-card > *:nth-child(5),
  .order-card.oc8 > *:nth-child(5) {
    grid-column: 2 !important;
    grid-row: 3 !important;
    justify-self: start !important;
    text-align: left !important;
    padding-left: 6px !important;
  }

  /* 实得：靠右 */
  .oc8-grid > .order-card > *:nth-child(6),
  .order-card.oc8 > *:nth-child(6) {
    grid-column: 3 !important;
    grid-row: 3 !important;
    justify-self: end !important;
    text-align: right !important;
    padding-left: 8px !important;
  }

  /* 按钮 / 占位：最右 */
  .oc8-grid > .order-card > *:nth-child(7),
  .order-card.oc8 > *:nth-child(7) {
    grid-column: 4 !important;
    grid-row: 3 !important;
    justify-self: end !important;
    padding-left: 8px !important;
  }

  /* 第7格内容只是「—」时直接藏掉，别占地方 */
  .oc8-grid > .order-card > *:nth-child(7):has(> .weak),
  .oc8-grid > .order-card > *:nth-child(7):has(> .muted),
  .order-card.oc8 > *:nth-child(7):has(> .weak),
  .order-card.oc8 > *:nth-child(7):has(> .muted) {
    display: none !important;
  }

  /* 实得那一格如果只有「—」也藏 */
  .oc8-grid > .order-card > *:nth-child(6):has(> .weak),
  .order-card.oc8 > *:nth-child(6):has(> .weak) {
    display: none !important;
  }

  /* 日期单行不换行，压到最小 */
  .oc8-grid > .order-card .oc-date,
  .order-card.oc8 .oc-date {
    font-size: 11px !important;
    white-space: nowrap !important;
    letter-spacing: -.1px !important;
  }

  /* 积分数字：跟实得一样大小 */
  .oc8-grid > .order-card .oc-num,
  .order-card.oc8 .oc-num {
    font-size: 12px !important;
    line-height: 1.3 !important;
  }

  /* 第 8/9 格（被拒时间 / 审核备注）内容只有「—」时藏掉 */
  .oc8-grid > .order-card > *:nth-child(8):has(> .weak),
  .oc8-grid > .order-card > *:nth-child(8):has(> .muted),
  .oc8-grid > .order-card > *:nth-child(9):has(> .weak),
  .oc8-grid > .order-card > *:nth-child(9):has(> .muted),
  .order-card.oc8 > *:nth-child(8):has(> .weak),
  .order-card.oc8 > *:nth-child(8):has(> .muted),
  .order-card.oc8 > *:nth-child(9):has(> .weak),
  .order-card.oc8 > *:nth-child(9):has(> .muted) {
    display: none !important;
  }

  /* 行3 三个格子高度对齐，别一个 36 一个 18 */
  .oc8-grid > .order-card > *:nth-child(3),
  .oc8-grid > .order-card > *:nth-child(5),
  .oc8-grid > .order-card > *:nth-child(6),
  .oc8-grid > .order-card > *:nth-child(7),
  .order-card.oc8 > *:nth-child(3),
  .order-card.oc8 > *:nth-child(5),
  .order-card.oc8 > *:nth-child(6),
  .order-card.oc8 > *:nth-child(7) {
    align-self: center !important;
    height: auto !important;
    min-height: 0 !important;
  }
}

/* ==========================================================================
   /user/orders 卡片溢出兜底
   实测 375/390/414/428/768 五个宽度卡片都严格在父容器内（左右各留 11px），
   但保险起见再加一层硬约束：父容器裁切 + 卡片宽度锁死 100%。
   ========================================================================== */
@media (max-width: 1024px) {

  .order-scroll,
  .order-table,
  .oc8-grid,
  .order-grid.oc8-grid {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    box-sizing: border-box !important;
  }

  .oc8-grid > .order-card,
  .order-card.oc8 {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }

  /* 卡片内部任何东西都不许横向顶出去 */
  .oc8-grid > .order-card > *,
  .order-card.oc8 > * {
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* 可接任务卡片同样兜一层 */
  .mk-tr {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }

  .card:has(.mk-tr),
  .card:has(.oc8-grid) {
    overflow-x: hidden !important;
    overflow-y: visible !important;
  }
}

/* ==========================================================================
   「下级列表」改成 C 方案：排行（名次 + 收益条形）

   模板已配合的部分（src/View/agent/team.php）：
     · rows 按 earned 降序 usort
     · <tr style="--gain-pct:N%">  最高收益那条 = 100%
     · <table class="data tm-list">  专属钩子

   10 个原有列 → 重排成 4 行：
     ┌①┐ 用户名              1,700
     │  │ ████████████░░░░░  收益
     │  │ 代理 US3R22  [操作]
     └  ┘ 1,300 积分 · 10 单
   ========================================================================== */
@media (max-width: 1024px) {

  table.data.tm-list {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    table-layout: auto !important;
    border-collapse: collapse !important;
  }

  /* 藏表头 */
  table.data.tm-list > thead,
  table.data.tm-list thead {
    display: none !important;
  }

  table.data.tm-list > tbody,
  table.data.tm-list tbody {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    counter-reset: trank !important;
  }

  /* 每一行 = 一条排行 */
  table.data.tm-list > tbody > tr,
  table.data.tm-list tbody > tr {
    counter-increment: trank !important;
    display: grid !important;
    grid-template-columns: 22px minmax(0, 1fr) auto !important;
    grid-template-areas:
      "rank name num"
      "rank bar  num"
      "rank meta act" !important;
    column-gap: 9px !important;
    row-gap: 3px !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 10px 2px !important;
    margin: 0 !important;
    border: 0 !important;
    border-bottom: 1px solid #f3f4f6 !important;
    background: transparent !important;
    box-sizing: border-box !important;
  }

  table.data.tm-list > tbody > tr:last-child,
  table.data.tm-list tbody > tr:last-child {
    border-bottom: 0 !important;
  }

  /* 所有格子清掉表格时代的定宽裁剪 */
  table.data.tm-list > tbody > tr > td,
  table.data.tm-list tbody > tr > td {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    white-space: normal !important;
    text-align: left !important;
  }

  /* ── ① 名次（ID 列改成序号） ───────────────────────────── */
  table.data.tm-list > tbody > tr > td:nth-child(1),
  table.data.tm-list tbody > tr > td:nth-child(1) {
    grid-area: rank !important;
    align-self: center !important;
    font-size: 0 !important;          /* 藏掉真实 ID */
    line-height: 0 !important;
  }

  table.data.tm-list > tbody > tr > td:nth-child(1)::before,
  table.data.tm-list tbody > tr > td:nth-child(1)::before {
    content: counter(trank) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
    height: 20px !important;
    border-radius: 6px !important;
    background: #f3f4f6 !important;
    color: #6b7280 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
  }

  /* 前三名配色：金 / 银 / 铜 */
  table.data.tm-list > tbody > tr:nth-child(1) > td:nth-child(1)::before {
    background: #fef3c7 !important; color: #b45309 !important;
  }
  table.data.tm-list > tbody > tr:nth-child(2) > td:nth-child(1)::before {
    background: #e5e7eb !important; color: #4b5563 !important;
  }
  table.data.tm-list > tbody > tr:nth-child(3) > td:nth-child(1)::before {
    background: #fef3c7 !important; color: #b45309 !important; opacity: .72 !important;
  }

  /* ── ② 用户名 ──────────────────────────────────────────── */
  table.data.tm-list > tbody > tr > td:nth-child(2),
  table.data.tm-list tbody > tr > td:nth-child(2) {
    grid-area: name !important;
    align-self: end !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    line-height: 1.35 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* ── ③ 身份 ────────────────────────────────────────────── */
  table.data.tm-list > tbody > tr > td:nth-child(3),
  table.data.tm-list tbody > tr > td:nth-child(3) {
    grid-area: meta !important;
    align-self: start !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    font-size: 10px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  /* ── ④ 邀请码 ──────────────────────────────────────────── */
  table.data.tm-list > tbody > tr > td:nth-child(4),
  table.data.tm-list tbody > tr > td:nth-child(4) {
    grid-area: meta !important;
    align-self: start !important;
    justify-self: start !important;
    margin-left: 62px !important;    /* 让开身份标签 */
    font-size: 10px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  table.data.tm-list .iv-chip {
    display: inline-block !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    background: #eff6ff !important;
    color: #2563eb !important;
    border: 1px solid #dbeafe !important;
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace !important;
    font-size: 9.5px !important;
    letter-spacing: .2px !important;
    line-height: 1.4 !important;
    white-space: nowrap !important;
  }

  /* ── ⑤ 积分（折到 meta 下方的小字） ───────────────────── */
  table.data.tm-list > tbody > tr > td:nth-child(5),
  table.data.tm-list tbody > tr > td:nth-child(5) {
    grid-area: bar !important;
    align-self: end !important;
    font-size: 10.5px !important;
    color: #9ca3af !important;
    white-space: nowrap !important;
    text-align: left !important;
  }

  table.data.tm-list > tbody > tr > td:nth-child(5)::before,
  table.data.tm-list tbody > tr > td:nth-child(5)::before {
    content: "积分 " !important;
    display: inline !important;
    font-size: 9.5px !important;
    color: #b6bcc6 !important;
    margin-right: 2px !important;
    white-space: nowrap !important;
  }

  /* ── ⑥ 订单数 ──────────────────────────────────────────── */
  table.data.tm-list > tbody > tr > td:nth-child(6),
  table.data.tm-list tbody > tr > td:nth-child(6) {
    grid-area: bar !important;
    align-self: end !important;
    justify-self: start !important;
    margin-left: 74px !important;
    font-size: 10.5px !important;
    color: #9ca3af !important;
    white-space: nowrap !important;
    text-align: left !important;
  }

  table.data.tm-list > tbody > tr > td:nth-child(6)::before,
  table.data.tm-list tbody > tr > td:nth-child(6)::before {
    content: "订单 " !important;
    display: inline !important;
    font-size: 9.5px !important;
    color: #b6bcc6 !important;
    margin-right: 2px !important;
    white-space: nowrap !important;
  }

  /* ── ⑦ 累计收益：绿色数字 + 比例条 ────────────────────── */
  table.data.tm-list > tbody > tr > td:nth-child(7),
  table.data.tm-list tbody > tr > td:nth-child(7) {
    grid-area: num !important;
    align-self: center !important;
    justify-self: end !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 5px !important;
    width: auto !important;
    min-width: 76px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #16a34a !important;
    white-space: nowrap !important;
    text-align: right !important;
    line-height: 1.15 !important;
  }

  /* 比例条：宽度 = var(--gain-pct)，底色灰、推进段蓝 */
  table.data.tm-list > tbody > tr > td:nth-child(7)::after,
  table.data.tm-list tbody > tr > td:nth-child(7)::after {
    content: "" !important;
    display: block !important;
    width: 74px !important;
    height: 4px !important;
    border-radius: 2px !important;
    background-color: #eef1f5 !important;
    background-image: linear-gradient(90deg, #2563eb, #60a5fa) !important;
    background-repeat: no-repeat !important;
    background-position: 0 0 !important;
    background-size: var(--gain-pct, 0%) 100% !important;
  }

  /* 收益为 0 的那条数字压灰 */
  table.data.tm-list > tbody > tr[data-earned="0"] > td:nth-child(7) {
    color: #d1d5db !important;
  }

  /* ── ⑧ 状态 ────────────────────────────────────────────── */
  table.data.tm-list > tbody > tr > td:nth-child(8),
  table.data.tm-list tbody > tr > td:nth-child(8) {
    grid-area: meta !important;
    align-self: start !important;
    justify-self: end !important;
    font-size: 10px !important;
    line-height: 1 !important;
  }

  table.data.tm-list > tbody > tr > td:nth-child(8) .badge {
    height: 18px !important;
    padding: 0 6px !important;
    font-size: 9.5px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  /* ── ⑨ 注册时间：移动端藏掉 ────────────────────────────── */
  table.data.tm-list > tbody > tr > td:nth-child(9),
  table.data.tm-list tbody > tr > td:nth-child(9) {
    display: none !important;
  }

  /* ── ⑩ 操作 ────────────────────────────────────────────── */
  table.data.tm-list > tbody > tr > td:nth-child(10),
  table.data.tm-list tbody > tr > td:nth-child(10) {
    grid-area: act !important;
    align-self: end !important;
    justify-self: end !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    white-space: nowrap !important;
  }

  table.data.tm-list > tbody > tr > td:nth-child(10) .btn,
  table.data.tm-list tbody > tr > td:nth-child(10) .btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: 24px !important;
    padding: 0 9px !important;
    font-size: 10.5px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
  }

  /* 容器不横滚 */
  .card:has(table.data.tm-list) {
    overflow-x: hidden !important;
    overflow-y: visible !important;
  }

  .table-wrap:has(table.data.tm-list) {
    overflow: visible !important;
  }
}

/* ==========================================================================
   /user/orders 卡片里「订单号 + 任务名」左对齐

   实测 .oc-main 的 text-align = center，两个子元素 .order-card-no /
   .order-card-title 也是 center，整块被居中，看着像缩进。
   父级 app.css 的 .order-card 用了居中排版（PC 端卡片样式），移动端这里掰回左。
   ========================================================================== */
@media (max-width: 1024px) {

  .oc8-grid > .order-card .oc-main,
  .order-card.oc8 .oc-main {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    text-align: left !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .oc8-grid > .order-card .oc-main > *,
  .order-card.oc8 .oc-main > * {
    text-align: left !important;
    align-self: flex-start !important;
    margin-left: 0 !important;
    margin-right: auto !important;
    width: auto !important;
    max-width: 100% !important;
  }

  /* 订单号：等宽小灰字，贴左 */
  .oc8-grid > .order-card .order-card-no,
  .order-card.oc8 .order-card-no {
    display: block !important;
    text-align: left !important;
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace !important;
    font-size: 10.5px !important;
    color: #9ca3af !important;
    letter-spacing: .2px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* 任务名：粗体，贴左 */
  .oc8-grid > .order-card .order-card-title,
  .order-card.oc8 .order-card-title {
    display: block !important;
    text-align: left !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    word-break: break-word !important;
  }
}

/* ==========================================================================
   「佣金明细」列表改成 D 方案：按日期分组 + 当日合计

   模板已配合（src/View/agent/commission.php）：
     · PHP 按 created_at 前 10 位分组，每组前插一行
         <tr class="cm-day" data-day="YYYY-MM-DD" data-sum="N"><td colspan="7">…</td></tr>
     · JS render() 跨页追加时同样插日期头（renderedDays() 去重）

   7 列重排成「日期头 + 两行」：
     00-00 ──────────────── +65
     ● user1   04:37:48   +20  [冻结中]
       SO202611290339540786
   ========================================================================== */
@media (max-width: 1024px) {

  /* 容器收口 */
  .cm-page .cm-list,
  .cm-page .cm-scroll {
    overflow-x: hidden !important;
    overflow-y: visible !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .cm-page table.cm-table.data {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    table-layout: auto !important;
    border-collapse: collapse !important;
  }

  .cm-page table.cm-table.data > thead {
    display: none !important;
  }

  .cm-page table.cm-table.data > tbody {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  /* ── 日期头 ─────────────────────────────────────────── */
  .cm-page table.cm-table.data > tbody > tr.cm-day {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 12px 0 5px !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  .cm-page table.cm-table.data > tbody > tr.cm-day:first-child {
    padding-top: 2px !important;
  }

  .cm-page table.cm-table.data > tbody > tr.cm-day > td {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    color: #6b7280 !important;
    letter-spacing: .3px !important;
    white-space: nowrap !important;
  }

  .cm-page .cm-day-lbl {
    flex: 0 0 auto !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    color: #6b7280 !important;
  }

  .cm-page .cm-day-line {
    flex: 1 1 auto !important;
    height: 1px !important;
    background: #eef1f5 !important;
    min-width: 12px !important;
  }

  .cm-page .cm-day-sum {
    flex: 0 0 auto !important;
    font-size: 9.5px !important;
    font-weight: 700 !important;
    color: #16a34a !important;
    font-variant-numeric: tabular-nums !important;
  }

  /* ── 数据行：两行 grid ───────────────────────────────── */
  .cm-page table.cm-table.data > tbody > tr[data-id] {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto auto !important;
    grid-template-areas:
      "user time amt st"
      "ono  ono  ono ono" !important;
    column-gap: 8px !important;
    row-gap: 2px !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 6px 0 6px 12px !important;
    margin: 0 !important;
    border: 0 !important;
    border-bottom: 0 !important;
    background: transparent !important;
    box-sizing: border-box !important;
    position: relative !important;
  }

  /* 时间线小圆点 */
  .cm-page table.cm-table.data > tbody > tr[data-id]::before {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    top: 13px !important;
    width: 5px !important;
    height: 5px !important;
    border-radius: 50% !important;
    background: #16a34a !important;
  }

  /* 冻结的那条点变橙 */
  .cm-page table.cm-table.data > tbody > tr[data-id]:has(.badge-warn)::before {
    background: #d97706 !important;
  }

  /* 所有格子重置 */
  .cm-page table.cm-table.data > tbody > tr[data-id] > td {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    white-space: nowrap !important;
    text-align: left !important;
    height: auto !important;
    line-height: 1.3 !important;
  }

  /* ① 时间 → 第二列，只显示时分秒 */
  .cm-page table.cm-table.data > tbody > tr[data-id] > td:nth-child(1) {
    grid-area: time !important;
    font-size: 10.5px !important;
    color: #9ca3af !important;
    font-variant-numeric: tabular-nums !important;
  }

  /* ② 订单号 → 第二行整行 */
  .cm-page table.cm-table.data > tbody > tr[data-id] > td:nth-child(2) {
    grid-area: ono !important;
    font-size: 9.5px !important;
    line-height: 1.3 !important;
    padding-top: 1px !important;
  }

  .cm-page .cm-no {
    display: inline-block !important;
    max-width: 100% !important;
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace !important;
    font-size: 9.5px !important;
    color: #b6bcc6 !important;
    letter-spacing: .1px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* ③ 下级用户 → 第一列 */
  .cm-page table.cm-table.data > tbody > tr[data-id] > td:nth-child(3) {
    grid-area: user !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
  }

  .cm-page table.cm-table.data > tbody > tr[data-id] .cm-user {
    display: inline-block !important;
    max-width: 100% !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* ④ 佣金 → amt 列，右对齐 */
  .cm-page table.cm-table.data > tbody > tr[data-id] > td:nth-child(4) {
    grid-area: amt !important;
    justify-self: end !important;
    display: block !important;
    text-align: right !important;
    font-size: 13px !important;
    padding-right: 6px !important;
  }

  .cm-page table.cm-table.data > tbody > tr[data-id] .cm-amt {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #16a34a !important;
    font-variant-numeric: tabular-nums !important;
  }

  /* ⑤ 状态 → st 列，右对齐 */
  .cm-page table.cm-table.data > tbody > tr[data-id] > td:nth-child(5) {
    grid-area: st !important;
    justify-self: end !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    margin-right: 0 !important;
  }

  /* 把佣金塞到第一行第三列（跟状态同格） */
  .cm-page table.cm-table.data > tbody > tr[data-id] > td:nth-child(5) .badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 18px !important;
    padding: 0 6px !important;
    border-radius: 999px !important;
    font-size: 9px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  .cm-page table.cm-table.data > tbody > tr[data-id] .cm-fz-at {
    font-size: 9px !important;
    color: #b45309 !important;
    white-space: nowrap !important;
  }

  /* ⑥ 变动后余额 → 藏（移动端不需要） */
  .cm-page table.cm-table.data > tbody > tr[data-id] > td:nth-child(6) {
    display: none !important;
  }

  /* ⑦ 明细文字 → 藏（跟订单号重复） */
  .cm-page table.cm-table.data > tbody > tr[data-id] > td:nth-child(7) {
    display: none !important;
  }

  /* 加载 / 到底提示 */
  .cm-page .cm-loading,
  .cm-page .cm-end {
    padding: 12px 0 !important;
    font-size: 11.5px !important;
  }

  /* 卡片不再横滚 */
  .card:has(.cm-table) {
    overflow-x: hidden !important;
    overflow-y: visible !important;
  }
}

/* ==========================================================================
   「佣金明细」D 方案 · 收尾修正
   实测问题：
     ① 日期头的「11-29 ─── +65」被挤成两行（tr.cm-day 高 52~62px）
     ② 冻结状态的「冻结中」+「11-30 04:37 解冻」竖排，把行撑到 69px
   ========================================================================== */
@media (max-width: 1024px) {

  /* 日期头：强制单行，中间横线自己撑开 */
  .cm-page table.cm-table.data > tbody > tr.cm-day > td {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .cm-page .cm-day-lbl {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    order: 1 !important;
  }

  .cm-page .cm-day-line {
    flex: 1 1 auto !important;
    min-width: 8px !important;
    height: 1px !important;
    background: #eef1f5 !important;
    order: 2 !important;
  }

  .cm-page .cm-day-sum {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    order: 3 !important;
  }

  /* 日期头压扁 */
  .cm-page table.cm-table.data > tbody > tr.cm-day {
    padding: 11px 0 4px !important;
    line-height: 1 !important;
  }

  /* 状态列：徽章和解冻时间并排，不许折行 */
  .cm-page table.cm-table.data > tbody > tr[data-id] > td:nth-child(5) {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 4px !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .cm-page table.cm-table.data > tbody > tr[data-id] > td:nth-child(5) .badge {
    flex: 0 0 auto !important;
  }

  /* 解冻时间改成缩写，一行塞得下：11-30 04:37 解冻 → 11-30 解冻 */
  .cm-page table.cm-table.data > tbody > tr[data-id] .cm-fz-at {
    flex: 0 0 auto !important;
    display: none !important;
  }

  /* 用徽章 title 兜住完整时间（浏览器悬浮可见），视觉上只留徽章 */
  .cm-page table.cm-table.data > tbody > tr[data-id] > td:nth-child(5) .badge-warn::after {
    content: "" !important;
  }

  /* 冻结那条行高跟已入账对齐 */
  .cm-page table.cm-table.data > tbody > tr[data-id] {
    min-height: 0 !important;
  }
}

/* ==========================================================================
   「佣金明细」合计条 · 手机端
   PC 端样式在模板内联 <style> 里（绿底卡片），这里只做手机端尺寸微调
   ========================================================================== */
@media (max-width: 1024px) {
  .cm-page .cm-total {
    margin: 10px 0 2px !important;
    padding: 10px 12px !important;
    border-radius: 8px !important;
  }
  .cm-page .cm-total-lbl {
    font-size: 11.5px !important;
  }
  .cm-page .cm-total-val {
    font-size: 17px !important;
    font-weight: 800 !important;
    color: #16a34a !important;
  }
  .cm-page .cm-sum-all {
    color: #16a34a !important;
    font-weight: 700 !important;
  }
  .cm-page .cm-sum-sep {
    margin: 0 3px !important;
    color: #d1d5db !important;
  }
  /* 「没有更多了」跟在合计条后面，别贴太紧 */
  .cm-page .cm-end {
    padding: 10px 0 4px !important;
  }
}

/* ==========================================================================
   「下级列表」微调
   ① 状态徽章（正常）从右侧挪到左侧，跟「下级代理」「US3R22」排同一行
   ② meta 行扩宽到第 1-3 列，容得下三样东西
   ========================================================================== */
@media (max-width: 1024px) {

  /* meta 行扩宽：身份 / 邀请码 / 状态三样并排，操作按钮仍占第 4 列 */
  table.data.tm-list > tbody > tr > td:nth-child(3),
  table.data.tm-list > tbody > tr > td:nth-child(4),
  table.data.tm-list > tbody > tr > td:nth-child(8) {
    grid-column: 1 / 4 !important;
  }

  /* 身份：最左 */
  table.data.tm-list > tbody > tr > td:nth-child(3) {
    justify-self: start !important;
    margin-left: 0 !important;
  }

  /* 邀请码：让开身份 */
  table.data.tm-list > tbody > tr > td:nth-child(4) {
    justify-self: start !important;
    margin-left: 62px !important;
  }

  /* 状态：挪到左边，跟在邀请码后面 */
  table.data.tm-list > tbody > tr > td:nth-child(8) {
    justify-self: start !important;
    margin-left: 128px !important;
    text-align: left !important;
  }

  table.data.tm-list > tbody > tr > td:nth-child(8) .badge {
    height: 18px !important;
    padding: 0 6px !important;
    font-size: 9.5px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }
}

/* ==========================================================================
   「下级列表」重排：序号并入昵称行 + 下面几行统一左边缘

   旧布局问题：
     rank L=2 / name L=33 / meta L=2 —— 三行左边缘各不相同，视觉错位
   新布局（3 列 22px | 1fr | auto）：
     ① user2                   1,700
        积分 1,300  订单 10    ████
        下级代理 US3R22 正常   [降回用户]
   ========================================================================== */
@media (max-width: 1024px) {

  table.data.tm-list > tbody > tr[data-earned] {
    display: grid !important;
    grid-template-columns: 22px minmax(0, 1fr) auto !important;
    grid-template-areas:
      "rank name num"
      ".    bar  num"
      ".    meta act" !important;
    column-gap: 8px !important;
    row-gap: 2px !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 10px 2px !important;
    margin: 0 !important;
    border: 0 !important;
    border-bottom: 1px solid #f3f4f6 !important;
    background: transparent !important;
    box-sizing: border-box !important;
  }

  /* ① 名次：跟昵称同一行，靠上一点 */
  table.data.tm-list > tbody > tr[data-earned] > td:nth-child(1) {
    grid-area: rank !important;
    align-self: center !important;
    justify-self: start !important;
    margin: 0 !important;
  }

  /* ② 昵称：紧挨名次右边 */
  table.data.tm-list > tbody > tr[data-earned] > td:nth-child(2) {
    grid-area: name !important;
    align-self: end !important;
    justify-self: start !important;
    margin: 0 !important;
    text-align: left !important;
  }

  /* ③ 积分：第二行，从昵称左边缘开始 */
  table.data.tm-list > tbody > tr[data-earned] > td:nth-child(5) {
    grid-area: bar !important;
    align-self: center !important;
    justify-self: start !important;
    margin: 0 !important;
    text-align: left !important;
  }

  /* ④ 订单数：同行，让开积分 */
  table.data.tm-list > tbody > tr[data-earned] > td:nth-child(6) {
    grid-area: bar !important;
    align-self: center !important;
    justify-self: start !important;
    margin-left: 74px !important;
    text-align: left !important;
  }

  /* ⑤ 身份：第三行，从昵称左边缘开始 */
  table.data.tm-list > tbody > tr[data-earned] > td:nth-child(3) {
    grid-area: meta !important;
    align-self: center !important;
    justify-self: start !important;
    margin-left: 0 !important;
  }

  /* ⑥ 邀请码：让开身份 */
  table.data.tm-list > tbody > tr[data-earned] > td:nth-child(4) {
    grid-area: meta !important;
    align-self: center !important;
    justify-self: start !important;
    margin-left: 62px !important;
  }

  /* ⑦ 状态：让开邀请码 */
  table.data.tm-list > tbody > tr[data-earned] > td:nth-child(8) {
    grid-area: meta !important;
    align-self: center !important;
    justify-self: start !important;
    margin-left: 128px !important;
    text-align: left !important;
  }

  /* ⑧ 累计收益：跨前两行，右对齐 */
  table.data.tm-list > tbody > tr[data-earned] > td:nth-child(7) {
    grid-area: num !important;
    grid-row: 1 / 3 !important;
    align-self: center !important;
    justify-self: end !important;
    margin: 0 !important;
  }

  /* ⑨ 操作按钮：第三行最右 */
  table.data.tm-list > tbody > tr[data-earned] > td:nth-child(10) {
    grid-area: act !important;
    align-self: center !important;
    justify-self: end !important;
    margin: 0 !important;
  }
}

/* ==========================================================================
   「我的定价」改成 E 方案：价格对比条

   模板已配合（src/View/agent/pricing.php）：
     · <tr style="--cut-pct:N%" data-cut="M" data-rest="R">   抽成占回收价百分比
     · 回收价 td 内加 <span class="pr-bar pr-bar-p"><i style="width:100%"></i></span>
     · 抽成 td 内加 <span class="pr-bar pr-bar-c"><i style="width:N%"></i></span>
                     <span class="pr-rest">下级拿 R</span>

   5 列重排成 4 行：
     41级3000万             [41级3000万]
     E2E任务-无库存
     回收 ████████████████  35
     抽成 ██░░░░░░░░░░░░░░   3      下级拿 17   [设置]
   ========================================================================== */
@media (max-width: 1024px) {

  .pr-card .pr-body,
  .card:has(.pr-table) {
    overflow-x: hidden !important;
    overflow-y: visible !important;
  }

  .pr-card table.pr-table.data {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    table-layout: auto !important;
    border-collapse: collapse !important;
  }

  .pr-card table.pr-table.data > thead {
    display: none !important;
  }

  .pr-card table.pr-table.data > tbody {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  /* 每行一张卡 */
  .pr-card table.pr-table.data > tbody > tr {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "name lv"
      "task task"
      "barp barp"
      "barc act" !important;
    column-gap: 8px !important;
    row-gap: 3px !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 11px 12px !important;
    margin: 0 0 8px 0 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: 0 1px 2px rgba(16,24,40,.04) !important;
    box-sizing: border-box !important;
  }

  .pr-card table.pr-table.data > tbody > tr:last-child {
    margin-bottom: 0 !important;
  }

  .pr-card table.pr-table.data > tbody > tr > td {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    white-space: normal !important;
    text-align: left !important;
    height: auto !important;
  }

  /* ① 模板名 */
  .pr-card table.pr-table.data > tbody > tr > td:nth-child(1) {
    grid-area: name !important;
    align-self: end !important;
    min-width: 0 !important;
  }

  .pr-card .pr-name {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* 任务名挪到第二行整行 */
  .pr-card .pr-task {
    display: block !important;
    font-size: 10px !important;
    color: #9ca3af !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin-top: 1px !important;
  }

  /* 把「任务名」从 td1 里提出来 —— 用 td1 的 grid-row 覆盖 */
  .pr-card table.pr-table.data > tbody > tr > td:nth-child(1) {
    grid-row: 1 / 3 !important;
    align-self: start !important;
    padding-top: 1px !important;
  }

  /* ② 档次 → 右上角 */
  .pr-card table.pr-table.data > tbody > tr > td:nth-child(2) {
    grid-area: lv !important;
    align-self: start !important;
    justify-self: end !important;
    grid-row: 1 !important;
  }

  .pr-card .iv-chip {
    display: inline-block !important;
    padding: 1px 6px !important;
    border-radius: 4px !important;
    background: #f3f4f6 !important;
    color: #6b7280 !important;
    border: 1px solid #e5e7eb !important;
    font-size: 9px !important;
    line-height: 1.5 !important;
    white-space: nowrap !important;
  }

  /* ③ 回收价 → 第三行，条形 + 数值 */
  .pr-card table.pr-table.data > tbody > tr > td:nth-child(3) {
    grid-area: barp !important;
    grid-column: 1 / 3 !important;
    display: grid !important;
    grid-template-columns: 30px minmax(0, 1fr) 44px !important;
    gap: 7px !important;
    align-items: center !important;
    margin-top: 5px !important;
  }

  .pr-card table.pr-table.data > tbody > tr > td:nth-child(3)::before {
    content: "回收" !important;
    font-size: 9.5px !important;
    color: #9ca3af !important;
    white-space: nowrap !important;
  }

  /* ④ 抽成 → 第四行 */
  .pr-card table.pr-table.data > tbody > tr > td:nth-child(4) {
    grid-area: barc !important;
    grid-column: 1 !important;
    display: grid !important;
    grid-template-columns: 30px minmax(0, 1fr) 44px !important;
    gap: 7px !important;
    align-items: center !important;
    margin-top: 1px !important;
  }

  .pr-card table.pr-table.data > tbody > tr > td:nth-child(4)::before {
    content: "抽成" !important;
    font-size: 9.5px !important;
    color: #9ca3af !important;
    white-space: nowrap !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  /* 条形本体 */
  .pr-card .pr-bar {
    display: block !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 100% !important;
    height: 6px !important;
    border-radius: 3px !important;
    background: #eef1f5 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .pr-card .pr-bar > i {
    display: block !important;
    height: 100% !important;
    border-radius: 3px !important;
    min-width: 0 !important;
  }

  .pr-card .pr-bar-p > i {
    background: linear-gradient(90deg, #94a3b8, #cbd5e1) !important;
  }

  .pr-card .pr-bar-c > i {
    background: linear-gradient(90deg, #2563eb, #60a5fa) !important;
  }

  /* 数值 */
  .pr-card .pr-num {
    grid-column: 3 !important;
    grid-row: 1 !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    text-align: right !important;
    font-variant-numeric: tabular-nums !important;
    white-space: nowrap !important;
  }

  .pr-card .pr-cut-val {
    grid-column: 3 !important;
    grid-row: 1 !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    color: #2563eb !important;
    text-align: right !important;
    font-variant-numeric: tabular-nums !important;
    white-space: nowrap !important;
  }

  .pr-card .pr-cut-empty {
    grid-column: 3 !important;
    grid-row: 1 !important;
    font-size: 10.5px !important;
    color: #c7ccd4 !important;
    text-align: right !important;
    white-space: nowrap !important;
  }

  /* 「下级拿 N」放第二行右侧（barc 区的第二行） */
  .pr-card .pr-rest {
    grid-column: 2 !important;
    grid-row: 2 !important;
    font-size: 9.5px !important;
    color: #9ca3af !important;
    white-space: nowrap !important;
    text-align: left !important;
    margin-top: 2px !important;
  }

  /* ⑤ 操作按钮 → 右下 */
  .pr-card table.pr-table.data > tbody > tr > td:nth-child(5) {
    grid-area: act !important;
    grid-column: 2 !important;
    grid-row: 4 !important;
    align-self: end !important;
    justify-self: end !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    margin-top: 2px !important;
  }

  .pr-card table.pr-table.data > tbody > tr > td:nth-child(5) .btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: 26px !important;
    padding: 0 11px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
  }
}

/* ==========================================================================
   全站弹窗 · 手机端统一居中卡片

   之前 L284 那条把 .modal / .ui-dialog / .ui-dialog-sm 拉成 left/right/top/bottom:10px，
   等于贴边满屏，老板看着就是「全是全屏的」。
   这里统一改成：居中、最大 420px 宽、最高 82vh、圆角 14px、内部滚动。

   覆盖的弹窗类型（全站扫出来的）：
     .ui-dialog / .ui-dialog-sm   ← 主力，10 个模板在用
     .modal                       ← 含 .dp-pay-modal / .wd-acc-modal / .wt-modal / .wt-co-modal
     .ro-modal-box                ← 充值订单弹窗的卡片层（.ro-modal 是遮罩，不动）
     .ann-box                     ← 公告弹窗的卡片层（.ann-modal 是遮罩，不动）
     .rv-modal                    ← 审核弹窗
   ========================================================================== */
@media (max-width: 1024px) {

  .ui-dialog,
  .ui-dialog-sm,
  .modal,
  .ro-modal-box,
  .ann-box,
  .rv-modal {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    width: calc(100% - 48px) !important;
    max-width: 400px !important;
    min-width: 0 !important;
    max-height: 82vh !important;
    height: auto !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    box-shadow: 0 16px 48px rgba(16, 24, 40, .18) !important;
    z-index: 1200 !important;
  }

  /* .ui-dialog 打开时本来就被 app.css 切成 display:flex，这里只补方向 */
  .ui-dialog.open[style*="flex"],
  .ui-dialog.open,
  .ui-dialog:not([style*="none"]) {
    flex-direction: column !important;
  }

  /* 头部：固定不滚 */
  .ui-dialog > .ui-dialog-head,
  .modal > .modal-head,
  .ro-modal-box > .ro-modal-head,
  .ann-box > .ann-head {
    flex: 0 0 auto !important;
    padding: 13px 15px !important;
    border-bottom: 1px solid #eef1f5 !important;
    border-radius: 14px 14px 0 0 !important;
    background: #fff !important;
    min-width: 0 !important;
  }

  .ui-dialog > .ui-dialog-head h3,
  .modal > .modal-head h3,
  .ro-modal-box > .ro-modal-head h3,
  .ann-box > .ann-head h3 {
    font-size: 14.5px !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  /* 主体：唯一可滚区 */
  .ui-dialog > .ui-dialog-body,
  .modal > .modal-body,
  .ro-modal-box > .ro-modal-body,
  .ann-box > .ann-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    padding: 14px 15px !important;
    font-size: 13px !important;
    color: #1f2937 !important;
    box-sizing: border-box !important;
  }

  /* 底部：固定不滚 */
  .ui-dialog > .ui-dialog-foot,
  .modal > .modal-foot,
  .ro-modal-box > .ro-modal-foot,
  .ann-box > .ann-foot {
    flex: 0 0 auto !important;
    padding: 12px 15px !important;
    border-top: 1px solid #eef1f5 !important;
    border-radius: 0 0 14px 14px !important;
    background: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* 弹窗里的按钮不给撑爆 */
  .ui-dialog .btn,
  .modal .btn,
  .ro-modal-box .btn,
  .ann-box .btn {
    max-width: 100% !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
  }

  .ui-dialog .ui-dialog-foot .btn,
  .modal .modal-foot .btn {
    flex: 0 0 auto !important;
  }

  /* 弹窗内的输入框不许溢出 */
  .ui-dialog .input,
  .ui-dialog select,
  .ui-dialog textarea,
  .modal .input,
  .modal select,
  .modal textarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 弹窗里的表格不许横滚顶出卡片 */
  .ui-dialog .table-wrap,
  .modal .table-wrap {
    max-width: 100% !important;
    overflow-x: auto !important;
  }

  /* 弹窗里的图片不许撑破 */
  .ui-dialog img,
  .modal img,
  .ann-box img {
    max-width: 100% !important;
    height: auto !important;
  }

  /* .modal 打开是 block（不是 flex），靠 max-height + overflow 兜 */
  .modal > .modal-body {
    max-height: calc(82vh - 112px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
  }

  /* 遮罩层拉满全屏、层级在弹窗下面 */
  .ro-modal,
  .ann-modal,
  .modal-mask,
  .ui-dialog-mask {
    position: fixed !important;
    inset: 0 !important;
    z-index: 1190 !important;
  }

  /* 窄屏（≤360）才再压一档，别跟主规则打架 */
  @media (max-width: 360px) {
    .ui-dialog,
    .ui-dialog-sm,
    .modal,
    .ro-modal-box,
    .ann-box,
    .rv-modal {
      width: calc(100vw - 28px) !important;
      max-width: none !important;
      max-height: 86vh !important;
      border-radius: 12px !important;
    }
  }
}

/* ==========================================================================
   /user/withdraw 两个卡片宽 390px，把移动端布局视口撑到 406px，
   连带弹窗的 50% 基准都算错。这里收口。
   ========================================================================== */
@media (max-width: 1024px) {
  .wd-apply-card,
  .wd-rec-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .wd-page,
  .card:has(.wd-apply-card),
  .card:has(.wd-rec-card) {
    overflow-x: hidden !important;
  }

  /* 内部如果有固定宽度的元素一并收 */
  .wd-apply-card *,
  .wd-rec-card * {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* ==========================================================================
   「冻结明细」改成 B 方案：紧凑两行

   模板 8 列（src/View/user/freeze.php）：
     1 账号  2 任务  3 积分  4 原因  5 状态  6 冻结时间  7 到期时间  8 剩余

   压成两行：
     sj2611280920 ⧉                    10
     E2E任务-无库存 · 下线佣金冻结#135   2天17小时  [冻结中]

   冻结时间 / 到期时间 两条在手机端省掉（倒计时已经把「还剩多久」说完了）
   ========================================================================== */
@media (max-width: 1024px) {

  .fz-table, .card:has(.fz-table) {
    overflow-x: hidden !important;
  }

  .page:has(.fz-table) table.fz-table.data,
  table.fz-table.data {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    table-layout: auto !important;
    border-collapse: collapse !important;
  }

  table.fz-table.data > thead {
    display: none !important;
  }

  table.fz-table.data > tbody {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  /* 每行一张小卡 */
  table.fz-table.data > tbody > tr {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto auto !important;
    grid-template-areas:
      "acct acct  pts  pts"
      "task rsn  cd   bd" !important;
    column-gap: 8px !important;
    row-gap: 3px !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 9px 11px !important;
    margin: 0 0 6px 0 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 9px !important;
    background: #fff !important;
    box-sizing: border-box !important;
  }

  table.fz-table.data > tbody > tr:last-child {
    margin-bottom: 0 !important;
  }

  table.fz-table.data > tbody > tr > td {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    white-space: nowrap !important;
    text-align: left !important;
    height: auto !important;
  }

  /* ① 账号 → 第一行左 */
  table.fz-table.data > tbody > tr > td:nth-child(1) {
    grid-area: acct !important;
    grid-column: 1 / 3 !important;
    justify-self: start !important;
    align-self: center !important;
    overflow: hidden !important;
  }

  .fz-table .acct-card {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    max-width: 100% !important;
    padding: 2px 7px !important;
    border-radius: 6px !important;
    background: #f7f8fa !important;
    border: 1px solid #e5e7eb !important;
    font-size: 10.5px !important;
    line-height: 1.35 !important;
    box-sizing: border-box !important;
  }

  .fz-table .acct-u {
    display: inline-block !important;
    max-width: 100% !important;
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace !important;
    font-size: 10.5px !important;
    color: #374151 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .fz-table .acct-cp {
    flex: 0 0 auto !important;
    font-size: 9.5px !important;
    color: #c7ccd4 !important;
    line-height: 1 !important;
  }

  /* ② 积分 → 第一行右 */
  table.fz-table.data > tbody > tr > td:nth-child(3) {
    grid-area: pts !important;
    grid-column: 3 / 5 !important;
    justify-self: end !important;
    align-self: center !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    color: #1f2937 !important;
    font-variant-numeric: tabular-nums !important;
    text-align: right !important;
  }

  /* ③ 任务 + 原因 → 第二行左，原因跟在任务后面小字灰 */
  table.fz-table.data > tbody > tr > td:nth-child(2) {
    grid-area: task !important;
    grid-column: 1 !important;
    justify-self: start !important;
    align-self: center !important;
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 11px !important;
    color: #6b7280 !important;
    padding-right: 5px !important;
  }

  /* 原因：跟在任务后面，独立一列，超长省略 */
  table.fz-table.data > tbody > tr > td:nth-child(4) {
    grid-area: rsn !important;
    grid-column: 2 !important;
    justify-self: start !important;
    align-self: center !important;
    display: block !important;
    margin-left: 0 !important;
    font-size: 9.5px !important;
    color: #b6bcc6 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* ④ 剩余倒计时 → 第二行右（前） */
  table.fz-table.data > tbody > tr > td:nth-child(8) {
    grid-area: cd !important;
    grid-column: 3 !important;
    justify-self: end !important;
    align-self: center !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    color: #b45309 !important;
    font-variant-numeric: tabular-nums !important;
    text-align: right !important;
    margin-right: 5px !important;
  }

  /* ⑤ 状态徽章 → 第二行右（后） */
  table.fz-table.data > tbody > tr > td:nth-child(5) {
    grid-area: bd !important;
    grid-column: 4 !important;
    justify-self: end !important;
    align-self: center !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    text-align: right !important;
  }

  table.fz-table.data > tbody > tr > td:nth-child(5) .badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 17px !important;
    padding: 0 6px !important;
    border-radius: 999px !important;
    font-size: 9px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  /* ⑥⑦ 冻结时间 / 到期时间 → 手机端省掉（倒计时已经说明了） */
  table.fz-table.data > tbody > tr > td:nth-child(6),
  table.fz-table.data > tbody > tr > td:nth-child(7) {
    display: none !important;
  }
}

/* ==========================================================================
   「冻结明细」对齐预览页 B 方案（两处差异）

   ① 第二行去掉「原因」—— 预览页只有 任务 + 倒计时 + 状态
   ② 状态 Tab 换成预览页那种「浅灰底 + 白色选中块」
   ========================================================================== */
@media (max-width: 1024px) {

  /* ---- ① 第二行只留 任务 / 倒计时 / 状态，原因不显示 ---- */
  table.fz-table.data > tbody > tr > td:nth-child(4) {
    display: none !important;
  }

  /* 任务跨前两列（原因那格空出来的位置） */
  table.fz-table.data > tbody > tr > td:nth-child(2) {
    grid-column: 1 / 3 !important;
    padding-right: 8px !important;
  }

  /* 倒计时回到第 3 列 */
  table.fz-table.data > tbody > tr > td:nth-child(8) {
    grid-column: 3 !important;
    margin-right: 5px !important;
  }

  /* 状态回到第 4 列 */
  table.fz-table.data > tbody > tr > td:nth-child(5) {
    grid-column: 4 !important;
  }

  /* ---- ② 状态 Tab：浅灰底 + 白色选中块 ---- */
  .card-head .seg,
  .fz-page .seg,
  .seg {
    display: flex !important;
    gap: 4px !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 3px !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: #f3f4f6 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .seg > .seg-item {
    flex: 1 1 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    min-width: 0 !important;
    height: 28px !important;
    padding: 0 4px !important;
    border: 0 !important;
    border-radius: 7px !important;
    background: transparent !important;
    font-size: 11.5px !important;
    font-weight: 400 !important;
    color: #6b7280 !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
  }

  /* 选中态：白底 + 蓝字 + 一点阴影 */
  .seg > .seg-item.is-on,
  .seg > .seg-item.on {
    background: #ffffff !important;
    color: #2563eb !important;
    font-weight: 700 !important;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .08) !important;
  }

  /* 计数小胶囊 */
  .seg > .seg-item .seg-n {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 15px !important;
    height: 15px !important;
    padding: 0 4px !important;
    border-radius: 999px !important;
    background: #e5e7eb !important;
    color: #6b7280 !important;
    font-size: 9px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
  }

  .seg > .seg-item.is-on .seg-n,
  .seg > .seg-item.on .seg-n {
    background: #eff6ff !important;
    color: #2563eb !important;
  }

  /* 外面那层如果原来是 card-head 里的行内条，收口 */
  .card-head:has(.seg) {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .card-head:has(.seg) > .seg {
    flex: 1 1 100% !important;
    margin-left: 0 !important;
  }
}

/* ==========================================================================
   「冻结明细」头部重排（手机端）

   模板 src/View/user/freeze.php 的 card-head 里有：
     h2 冻结明细 / .seg 状态Tab / .spacer / form.fz-search（input + 按钮 + 清除）

   要的顺序：
     冻结明细
     [输入框          ] [搜索]     ← 并排一行
     [冻结中 4][已解冻 2][全部 3]   ← Tab 挪到下方
     表格...
   ========================================================================== */
@media (max-width: 1024px) {

  /* card-head 换行 + 按 order 重排 */
  .card-head:has(.fz-search) {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px 0 !important;
  }

  .card-head:has(.fz-search) > h2 {
    order: 1 !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
  }

  .card-head:has(.fz-search) > .spacer {
    display: none !important;
  }

  /* 搜索栏 → 第二行，整行 */
  .card-head:has(.fz-search) > .fz-search {
    order: 2 !important;
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  /* Tab → 第三行 */
  .card-head:has(.fz-search) > .seg {
    order: 3 !important;
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  /* 输入框吃掉剩余宽度 */
  .fz-search > .input {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 32px !important;
    margin: 0 !important;
    padding: 0 11px !important;
    font-size: 12px !important;
    border-radius: 7px !important;
    box-sizing: border-box !important;
  }

  /* 搜索 / 清除按钮不缩 */
  .fz-search > .btn {
    flex: 0 0 auto !important;
    width: auto !important;
    height: 32px !important;
    padding: 0 12px !important;
    margin: 0 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    border-radius: 7px !important;
    box-sizing: border-box !important;
  }

  /* 表单里藏着的 st 字段不占位 */
  .fz-search > input[type="hidden"] {
    display: none !important;
  }
}

/* ==========================================================================
   「冻结明细」行内收尾修正

   ① 「冻结中」徽章视觉上没贴右 —— 徽章自带 6px 右内边距，文字比上面的金额
      往左偏 6px。补一个负 margin 让文字右边缘跟金额对齐。
   ② 金额前面加「冻结金额：」，数字改绿。
   ========================================================================== */
@media (max-width: 1024px) {

  /* ---- ① 徽章贴右 ---- */
  table.fz-table.data > tbody > tr > td:nth-child(5) {
    justify-self: end !important;
    justify-content: flex-end !important;
    margin-right: -4px !important;  /* 抵消徽章内边距，让文字右边缘跟金额对齐 */
    padding-right: 0 !important;
  }

  table.fz-table.data > tbody > tr > td:nth-child(5) .badge {
    padding: 0 6px !important;
    margin: 0 !important;
  }

  /* 倒计时也往右挪一点，跟徽章之间留 6px */
  table.fz-table.data > tbody > tr > td:nth-child(8) {
    margin-right: 6px !important;
  }

  /* ---- ② 金额：加「冻结金额：」+ 数字变绿 ---- */
  table.fz-table.data > tbody > tr > td:nth-child(3) {
    color: #16a34a !important;
    font-weight: 800 !important;
    display: inline-flex !important;
    align-items: baseline !important;
    gap: 2px !important;
    justify-self: end !important;
  }

}

/* ==========================================================================
   「冻结明细」金额一行显示：冻结金额：280

   之前标签和数字竖排，是因为没锁 nowrap、且 pts 区宽度只有 74px。
   这里锁 nowrap + 放宽金额区（让它跨列 2-5），保证一行塞得下。
   ========================================================================== */
@media (max-width: 1024px) {

  /* 主 grid 改 5 列，金额前缀占位更灵活 */
  table.fz-table.data > tbody > tr {
    grid-template-columns: auto minmax(0, 1fr) auto auto !important;
    grid-template-areas:
      "acct acct  pts  pts"
      "task task  cd   bd" !important;
  }

  /* 金额格：块级右对齐，「冻结金额：280」一行 */
  table.fz-table.data > tbody > tr > td.fz-pts,
  table.fz-table.data > tbody > tr > td:nth-child(3) {
    display: block !important;
    grid-column: 3 / 5 !important;
    justify-self: end !important;
    width: auto !important;
    max-width: none !important;
    white-space: nowrap !important;
    text-align: right !important;
    line-height: 1.25 !important;
    overflow: visible !important;
  }

  table.fz-table.data .fz-pts-lbl {
    display: inline !important;
    font-size: 9.5px !important;
    font-weight: 400 !important;
    color: #9ca3af !important;
    white-space: nowrap !important;
    vertical-align: 1px !important;
  }

  table.fz-table.data .fz-pts-num {
    display: inline !important;
    font-size: 13.5px !important;
    font-weight: 800 !important;
    color: #16a34a !important;
    font-variant-numeric: tabular-nums !important;
    white-space: nowrap !important;
  }

  /* 账号不要再跨到第 3 列，让金额往左有位置 */
  table.fz-table.data > tbody > tr > td:nth-child(1) {
    grid-column: 1 / 3 !important;
  }

  /* 任务占前两列 */
  table.fz-table.data > tbody > tr > td:nth-child(2) {
    grid-column: 1 / 3 !important;
  }

  /* 倒计时 / 状态仍在 3、4 列 */
  table.fz-table.data > tbody > tr > td:nth-child(8) {
    grid-column: 3 !important;
  }

  table.fz-table.data > tbody > tr > td:nth-child(5) {
    grid-column: 4 !important;
  }
}

/* ==========================================================================
   「冻结明细」字号加大 + 第二行基线对齐

   老板反馈：字太小、倒计时(解冻时间)和「冻结中」徽章没对齐
   ========================================================================== */
@media (max-width: 1024px) {

  /* ---- 卡片内边距 + 行高放开 ---- */
  table.fz-table.data > tbody > tr {
    padding: 12px 13px !important;
    row-gap: 5px !important;
    margin-bottom: 8px !important;
  }

  /* ---- 账号：10.5 → 12.5 ---- */
  .fz-table .acct-card {
    padding: 3px 8px !important;
    border-radius: 7px !important;
  }

  .fz-table .acct-u {
    font-size: 12.5px !important;
  }

  .fz-table .acct-cp {
    font-size: 11px !important;
  }

  /* ---- 任务名：11 → 12.5 ---- */
  table.fz-table.data > tbody > tr > td:nth-child(2) {
    font-size: 12.5px !important;
    line-height: 1.35 !important;
  }

  /* ---- 金额：标签 9.5 → 11，数字 13.5 → 16.5 ---- */
  table.fz-table.data .fz-pts-lbl {
    font-size: 11px !important;
    vertical-align: 2px !important;
  }

  table.fz-table.data .fz-pts-num {
    font-size: 16.5px !important;
    line-height: 1.15 !important;
  }

  /* ---- 第二行两格统一垂直居中，基线一条线 ---- */
  table.fz-table.data > tbody > tr > td:nth-child(8),
  table.fz-table.data > tbody > tr > td:nth-child(5) {
    align-self: center !important;
    align-items: center !important;
    height: auto !important;
  }

  /* ---- 倒计时：10 → 12.5，单一 line-height ---- */
  table.fz-table.data > tbody > tr > td:nth-child(8) {
    font-size: 12.5px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    display: block !important;
    margin-right: 7px !important;
    padding: 0 !important;
  }

  /* ---- 徽章：9 → 10.5，高度 17 → 20 ---- */
  table.fz-table.data > tbody > tr > td:nth-child(5) {
    display: flex !important;
    justify-content: flex-end !important;
    margin-right: -6px !important;
    padding: 0 !important;
  }

  table.fz-table.data > tbody > tr > td:nth-child(5) .badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 20px !important;
    padding: 0 7px !important;
    font-size: 10.5px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    border-radius: 999px !important;
  }

  /* 破折号/分隔之类小字一起抬 */
  .fz-table .weak,
  .fz-table .muted {
    font-size: 12px !important;
  }
}

/* ==========================================================================
   「积分流水」改成 A 方案：卡片两行

   模板 5 列（src/View/user/points.php）：
     1 时间  2 类型(彩色徽章)  3 变动(+/-)  4 变动后余额  5 备注

   排布：
     [提现]                          -10
     11-29 13:53:25  申请提现     余 955
   ========================================================================== */
@media (max-width: 1024px) {

  .card:has(.pt-table) {
    overflow-x: hidden !important;
  }

  .card:has(.pt-table) .table-wrap {
    overflow-x: hidden !important;
  }

  table.pt-table.data {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    table-layout: auto !important;
    border-collapse: collapse !important;
  }

  table.pt-table.data > thead {
    display: none !important;
  }

  table.pt-table.data > tbody {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  /* 每行一张卡 */
  table.pt-table.data > tbody > tr {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    grid-template-areas:
      "badge badge dlt"
      "tm    rmk   bal" !important;
    column-gap: 8px !important;
    row-gap: 4px !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 9px 11px !important;
    margin: 0 0 6px 0 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: 0 1px 2px rgba(16,24,40,.04) !important;
    box-sizing: border-box !important;
  }

  table.pt-table.data > tbody > tr:last-child {
    margin-bottom: 0 !important;
  }

  /* 行间距收一档 */
  table.pt-table.data > tbody > tr {
    row-gap: 3px !important;
  }

  table.pt-table.data > tbody > tr > td {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    white-space: nowrap !important;
    text-align: left !important;
    height: auto !important;
  }

  /* ① 类型徽章 → 第一行左 */
  table.pt-table.data > tbody > tr > td:nth-child(2) {
    grid-area: badge !important;
    grid-column: 1 / 3 !important;
    justify-self: start !important;
    align-self: center !important;
  }

  table.pt-table.data > tbody > tr > td:nth-child(2) .badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 20px !important;
    padding: 0 8px !important;
    border-radius: 5px !important;
    font-size: 10.5px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  /* ② 变动金额 → 第一行右 */
  table.pt-table.data > tbody > tr > td:nth-child(3) {
    grid-area: dlt !important;
    grid-column: 3 !important;
    justify-self: end !important;
    align-self: center !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #16a34a !important;
    font-variant-numeric: tabular-nums !important;
    text-align: right !important;
  }

  table.pt-table.data > tbody > tr > td:nth-child(3).money-neg {
    color: #dc2626 !important;
  }

  /* ③ 时间 → 第二行左 */
  table.pt-table.data > tbody > tr > td:nth-child(1) {
    grid-area: tm !important;
    grid-column: 1 !important;
    justify-self: start !important;
    align-self: center !important;
    font-size: 10px !important;
    color: #9ca3af !important;
    font-variant-numeric: tabular-nums !important;
  }

  /* ④ 备注 → 第二行中 */
  table.pt-table.data > tbody > tr > td:nth-child(5) {
    grid-area: rmk !important;
    grid-column: 2 !important;
    justify-self: start !important;
    align-self: center !important;
    font-size: 10.5px !important;
    color: #b6bcc6 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* ⑤ 变动后余额 → 第二行右 */
  table.pt-table.data > tbody > tr > td:nth-child(4) {
    grid-area: bal !important;
    grid-column: 3 !important;
    justify-self: end !important;
    align-self: center !important;
    font-size: 10px !important;
    color: #b6bcc6 !important;
    font-variant-numeric: tabular-nums !important;
    text-align: right !important;
  }

  table.pt-table.data > tbody > tr > td:nth-child(4)::before {
    content: "余 " !important;
    display: inline !important;
    font-size: 9.5px !important;
    font-weight: 400 !important;
    color: #9ca3af !important;
    white-space: nowrap !important;
  }

  /* 分页 */
  .card:has(.pt-table) .pager {
    padding: 12px 0 0 !important;
    font-size: 12px !important;
  }
}

/* ==========================================================================
   「收款信息」→ E 横向信息条
   「提现记录」→ A 卡片两行

   两块都是 div.wd-*-row > span 结构（grid），不是 table
   ========================================================================== */
@media (max-width: 1024px) {

  /* ==================================================================
     ① 收款信息 E：横向信息条
        span1 通道 / span2 账号 / span3 姓名 / span4 收款码 / span5 默认 / span6 操作
     ================================================================== */

  .wd-acc-card .wd-acc-list {
    padding: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .wd-acc-card .wd-acc-row-head {
    display: none !important;
  }

  .wd-acc-card .wd-acc-row:not(.wd-acc-row-head) {
    display: grid !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    grid-template-columns: auto auto minmax(0, 1fr) !important;
    grid-template-areas:
      "ch  ch  df"
      "no  nm  qr"
      "ops ops ops" !important;
    gap: 8px 7px !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 11px !important;
    margin: 0 0 8px 0 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: 0 1px 2px rgba(16,24,40,.04) !important;
    box-sizing: border-box !important;
  }

  .wd-acc-card .wd-acc-row:not(.wd-acc-row-head):last-child {
    margin-bottom: 0 !important;
  }

  .wd-acc-card .wd-acc-row:not(.wd-acc-row-head) > span {
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    text-align: left !important;
    justify-self: start !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: visible !important;
    white-space: nowrap !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    align-self: center !important;
  }

  /* span1 通道 → 徽章 */
  .wd-acc-card .wd-acc-row:not(.wd-acc-row-head) > span:nth-child(1) {
    grid-area: ch !important;
    grid-column: 1 / 3 !important;
    display: inline-flex !important;
    align-items: center !important;
    height: 20px !important;
    padding: 0 8px !important;
    border-radius: 5px !important;
    background: #dbeafe !important;
    color: #1d4ed8 !important;
    font-size: 10.5px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    justify-self: start !important;
    align-self: center !important;
  }

  /* span2 账号 → 小标签 */
  .wd-acc-card .wd-acc-row:not(.wd-acc-row-head) > span:nth-child(2) {
    grid-area: no !important;
    grid-column: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
    height: 20px !important;
    padding: 0 7px !important;
    border-radius: 999px !important;
    background: #f7f8fa !important;
    border: 1px solid #eef1f5 !important;
    font-size: 9.5px !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    font-variant-numeric: tabular-nums !important;
    line-height: 1 !important;
  }

  .wd-acc-card .wd-acc-row:not(.wd-acc-row-head) > span:nth-child(2)::before {
    content: "账号" !important;
    display: inline !important;
    font-size: 9px !important;
    font-weight: 400 !important;
    color: #9ca3af !important;
  }

  /* span3 姓名 → 小标签 */
  .wd-acc-card .wd-acc-row:not(.wd-acc-row-head) > span:nth-child(3) {
    grid-area: nm !important;
    grid-column: 2 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
    height: 20px !important;
    padding: 0 7px !important;
    border-radius: 999px !important;
    background: #f7f8fa !important;
    border: 1px solid #eef1f5 !important;
    font-size: 9.5px !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    line-height: 1 !important;
  }

  .wd-acc-card .wd-acc-row:not(.wd-acc-row-head) > span:nth-child(3)::before {
    content: "姓名" !important;
    display: inline !important;
    font-size: 9px !important;
    font-weight: 400 !important;
    color: #9ca3af !important;
  }

  /* span4 收款码 → 小标签 */
  .wd-acc-card .wd-acc-row:not(.wd-acc-row-head) > span:nth-child(4) {
    grid-area: qr !important;
    grid-column: 3 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
    height: 20px !important;
    padding: 0 7px !important;
    border-radius: 999px !important;
    background: #f7f8fa !important;
    border: 1px solid #eef1f5 !important;
    font-size: 9.5px !important;
    font-weight: 700 !important;
    color: #2563eb !important;
    line-height: 1 !important;
    justify-self: end !important;
  }

  .wd-acc-card .wd-acc-row:not(.wd-acc-row-head) > span:nth-child(4)::before {
    content: "收款码" !important;
    display: inline !important;
    font-size: 9px !important;
    font-weight: 400 !important;
    color: #9ca3af !important;
  }

  /* 有码 → 蓝字「已传」；无码 → 灰字 */
  .wd-acc-card .wd-acc-row:not(.wd-acc-row-head) > span:nth-child(4) .wd-qr-thumb {
    display: inline-flex !important;
    align-items: center !important;
    gap: 2px !important;
    color: #2563eb !important;
    text-decoration: none !important;
    font-size: 9.5px !important;
  }

  .wd-acc-card .wd-acc-row:not(.wd-acc-row-head) > span:nth-child(4) .wd-qr-thumb img {
    display: none !important;
  }

  .wd-acc-card .wd-acc-row:not(.wd-acc-row-head) > span:nth-child(4) .wd-qr-thumb::after {
    content: "已传" !important;
  }

  .wd-acc-card .wd-acc-row:not(.wd-acc-row-head) > span:nth-child(4) .weak {
    color: #9ca3af !important;
    font-weight: 400 !important;
  }

  /* span5 默认 → 右上角徽章 */
  .wd-acc-card .wd-acc-row:not(.wd-acc-row-head) > span:nth-child(5) {
    grid-area: df !important;
    grid-column: 3 !important;
    justify-self: end !important;
    align-self: center !important;
  }

  .wd-acc-card .wd-acc-row:not(.wd-acc-row-head) .wd-def-tag {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 20px !important;
    padding: 0 8px !important;
    border-radius: 5px !important;
    background: #dcfce7 !important;
    color: #15803d !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  /* span6 操作 → 底部右对齐 */
  .wd-acc-card .wd-acc-row:not(.wd-acc-row-head) > span:nth-child(6) {
    grid-area: ops !important;
    grid-column: 1 / 4 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    padding-top: 4px !important;
    border-top: 1px dashed #f3f4f6 !important;
    margin-top: 2px !important;
    justify-self: stretch !important;
  }

  .wd-acc-card .wd-acc-row:not(.wd-acc-row-head) > span:nth-child(6) form {
    display: inline-flex !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .wd-acc-card .wd-acc-row:not(.wd-acc-row-head) > span:nth-child(6) .btn {
    height: 26px !important;
    padding: 0 10px !important;
    margin: 0 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
  }

  /* ==================================================================
     ② 提现记录 A：卡片两行
        span1 单号+账号 / span2 积分 / span3 状态 / span4 时间 / span5 备注
     ================================================================== */

  .wd-rec-card .wd-rec-list {
    padding: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .wd-rec-card .wd-rec-row-head {
    display: none !important;
  }

  .wd-rec-card .wd-rec-row:not(.wd-rec-row-head) {
    display: grid !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "st  pts"
      "no  tm"
      "rmk rmk" !important;
    gap: 4px 8px !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 10px 11px !important;
    margin: 0 0 8px 0 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: 0 1px 2px rgba(16,24,40,.04) !important;
    box-sizing: border-box !important;
  }

  .wd-rec-card .wd-rec-row:not(.wd-rec-row-head):last-child {
    margin-bottom: 0 !important;
  }

  .wd-rec-card .wd-rec-row:not(.wd-rec-row-head) > span {
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    text-align: left !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: visible !important;
    white-space: normal !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  /* span3 状态 → 第一行左 */
  .wd-rec-card .wd-rec-row:not(.wd-rec-row-head) > span:nth-child(3) {
    grid-area: st !important;
    grid-column: 1 !important;
    justify-self: start !important;
    align-self: center !important;
    display: inline-flex !important;
    align-items: center !important;
  }

  .wd-rec-card .wd-rec-row:not(.wd-rec-row-head) > span:nth-child(3) .badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 20px !important;
    padding: 0 8px !important;
    border-radius: 5px !important;
    font-size: 10.5px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  /* span2 积分 → 第一行右 */
  .wd-rec-card .wd-rec-row:not(.wd-rec-row-head) > span:nth-child(2) {
    grid-area: pts !important;
    grid-column: 2 !important;
    justify-self: end !important;
    align-self: center !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #2563eb !important;
    font-variant-numeric: tabular-nums !important;
    text-align: right !important;
    white-space: nowrap !important;
  }

  /* span1 单号 + 账号 → 第二行 */
  .wd-rec-card .wd-rec-row:not(.wd-rec-row-head) > span:nth-child(1) {
    grid-area: no !important;
    grid-column: 1 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 5px !important;
    width: 100% !important;
    min-width: 0 !important;
    justify-self: stretch !important;
    overflow: hidden !important;
  }

  /* 单号：完整显示，不缩 */
  .wd-rec-card .wd-rec-row:not(.wd-rec-row-head) > span:nth-child(1) .wd-rec-no {
    flex: 0 0 auto !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    color: #6b7280 !important;
    font-variant-numeric: tabular-nums !important;
    white-space: nowrap !important;
    overflow: visible !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  /* 账号：被压缩时省略，不抢单号的位置 */
  .wd-rec-card .wd-rec-row:not(.wd-rec-row-head) > span:nth-child(1) .wd-rec-acc {
    flex: 1 1 auto !important;
    font-size: 9px !important;
    color: #b6bcc6 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-width: 0 !important;
  }

  /* span4 时间 → 塞进第二行（跟单号同行右侧已经够挤，单独放第三行左） */
  .wd-rec-card .wd-rec-row:not(.wd-rec-row-head) > span:nth-child(4) {
    grid-area: tm !important;
    grid-column: 2 !important;
    font-size: 9.5px !important;
    color: #9ca3af !important;
    font-variant-numeric: tabular-nums !important;
    white-space: nowrap !important;
    justify-self: end !important;
    align-self: center !important;
  }

  /* span5 备注 / 驳回原因 → 紧跟时间右侧 */
  .wd-rec-card .wd-rec-row:not(.wd-rec-row-head) > span:nth-child(5) {
    grid-area: rmk !important;
    grid-column: 1 / 3 !important;
    font-size: 9.5px !important;
    color: #b6bcc6 !important;
    justify-self: stretch !important;
    text-align: left !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
  }

  /* 备注为空（'—'）时整格不占高度，卡片就是标准两行 */
  .wd-rec-card .wd-rec-row:not(.wd-rec-row-head) > span:nth-child(5):empty,
  .wd-rec-card .wd-rec-row:not(.wd-rec-row-head) > span:nth-child(5) .weak:only-child {
    display: none !important;
  }

  /* 驳回原因红色 */
  .wd-rec-card .wd-rec-row:not(.wd-rec-row-head) > span:nth-child(5).wd-reject-why {
    color: #dc2626 !important;
    font-weight: 600 !important;
  }

}

/* ==========================================================================
   「提交提现申请」按钮拉满宽度 —— 跟上面输入框同长
   ========================================================================== */
@media (max-width: 1024px) {

  .wd-apply-card .wd-apply-form .wd-apply-submit,
  .wd-apply-card .wd-apply-submit {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    height: 40px !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
  }

  /* 表单本身也拉满 */
  .wd-apply-card .wd-apply-form {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* 输入框/下拉框统一宽度，保证视觉同长 */
  .wd-apply-card .wd-apply-form .input,
  .wd-apply-card .wd-apply-form .select {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* ==========================================================================
   自检修复：admin 宽表格手机端撑破视口
   - /admin/withdraw-review  table.data 860px → 超 337px
   - /admin/recharge         table.table.data 600px → 超 268px
   - /admin/review           .review-seg / .filter-form 342px → 超 8px
   做法：表格容器横滑（不重排表格）；表单类收宽
   ========================================================================== */
@media (max-width: 1024px) {

  /* ---- ① 带表格的 card-body / table-wrap 允许横滑 ---- */
  .card-body:has(> table),
  .card-body:has(> .table-wrap),
  .table-wrap:has(> table),
  .card:has(> table),
  .card:has(.table-wrap > table) > .table-wrap {
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 表格自身保持内容宽，别压扁 */
  .card-body > table,
  .table-wrap > table {
    width: auto !important;
    max-width: none !important;
    margin-bottom: 0 !important;
  }

  /* 滚动条细一点，不占高度 */
  .card-body::-webkit-scrollbar,
  .table-wrap::-webkit-scrollbar {
    height: 4px;
  }
  .card-body::-webkit-scrollbar-thumb,
  .table-wrap::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 2px;
  }

  /* ---- ② 审核页筛选条收宽（原本 342px 超 8px）---- */
  .review-seg,
  .rv-filter-form,
  .filter-form {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .filter-form .field,
  .filter-form .field.grow,
  .rv-filter-form .field {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .filter-form .input,
  .filter-form .select,
  .rv-filter-form .input,
  .rv-filter-form .select {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .filter-form .btn,
  .rv-filter-form .btn {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* ---- ③ 页面级兜底：任何页面都不许横向撑破 ---- */
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }
}
