/* ============================================================
 * 批 V19 V19-7 手机排版（改法清单 #427，审核方 11-18 18:4x 通过；需求 docs/审核/修改要求_2026-11-18_批V19_1118反馈.md › V19-7）
 *   ① 项目 360 四个页签（财务、进度、人员与签证、资料文件）+ 节点抽屉外框：马桂侠手机上（安卓，约 390 宽）财务页签乱。
 *   ② 外勤单、财务 › 付款申请列表和财务页顶（四格、时间筛选）、签证抽屉底栏（审核方 #427 拆的第二件）。
 *   · 整份文件只有下面这一个 @media (max-width: 600px) 块：电脑宽度、601–767（小平板 / 横屏，照旧「宽表在卡片里左右滑」，批 V1 V-02）一条规则都不加。
 *   · 表格换卡片：public/js/mcards.js 给白名单里的表挂 m-cards、把表头文字抄进每格 data-lb（字段名不新增文字，中俄跟着表头）；
 *     这里只认 m-cards / data-lb 排版。600 以上没有任何样式用到它们。
 *   · 金额可见不变：只换格子的位置，格子里的内容（运营岗只有状态条和已收 / 未收 / 部分到账）一个字不动。
 *   · !important 只有两处，都是盖模板里的行内样式：360 财务指标卡的列数（Core.kpis 写的一行 4 个）、抽屉里行内写死两栏的表单（odicomm.js 的 ODI 证书字段）。
 * ============================================================ */
@media (max-width: 600px) {

  /* ---------- 通用卡片：一行一张卡；第一格当标题；其余格子左边是字段名（data-lb），右边是值；操作在最下面靠右 ---------- */
  table.m-cards, table.m-cards > tbody, table.m-cards > tfoot { display: block; width: 100%; min-width: 0; }
  table.m-cards > thead { display: none; }
  table.m-cards > tbody > tr, table.m-cards > tfoot > tr { display: block; position: relative; margin: 10px 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
  table.m-cards > tbody > tr[hidden], table.m-cards > tfoot > tr[hidden] { display: none; }
  table.m-cards > tbody > tr > td, table.m-cards > tfoot > tr > td { display: block; position: static; width: auto; min-width: 0; max-width: none; height: auto; padding: 3px 0; border: 0; background: transparent; box-shadow: none; text-align: left; white-space: normal; overflow-wrap: break-word; }
  table.m-cards > tbody > tr > td:empty, table.m-cards > tfoot > tr > td:empty { display: none; }
  table.m-cards > tbody > tr > td:first-child, table.m-cards > tfoot > tr > td:first-child { font-size: 14px; }
  table.m-cards > tbody > tr > td.num, table.m-cards > tfoot > tr > td.num { text-align: left; }
  .ui-sec-bd.flush table.m-cards > tbody > tr > td:first-child, .ui-sec-bd.flush table.m-cards > tfoot > tr > td:first-child { padding-left: 0; }
  /* 字段名：左边一栏 96 宽（float 进左内边距，td 是 flow-root，字段名折两行也撑得住高度） */
  table.m-cards > tbody > tr > td[data-lb]:not(:first-child), table.m-cards > tfoot > tr > td[data-lb]:not(:first-child) { display: flow-root; padding-left: 104px; }
  table.m-cards > tbody > tr > td[data-lb]:not(:first-child)::before, table.m-cards > tfoot > tr > td[data-lb]:not(:first-child)::before {
    content: attr(data-lb); float: left; width: 96px; margin-left: -104px; font-size: 12px; line-height: 20px; font-weight: 400; color: var(--text-3); text-align: left; white-space: normal; overflow-wrap: break-word;
  }
  /* 操作那一格（.u-row-acts / .o3-op）、「›」那一格：不要字段名；操作整行靠右，按钮放不下整个换行 */
  table.m-cards > tbody > tr > td:is(td.o3-op, td.go, :has(.u-row-acts)), table.m-cards > tbody > tr > td[data-lb]:not(:first-child):is(td.o3-op, td.go, :has(.u-row-acts)) { display: block; padding: 8px 0 0; text-align: right; }
  table.m-cards > tbody > tr > td[data-lb]:not(:first-child):is(td.o3-op, td.go, :has(.u-row-acts))::before { content: none; }
  table.m-cards .u-row-acts { flex-wrap: wrap; justify-content: flex-end; }
  /* 格子里的长标签、审批进度：放不下在词和词之间换行，不伸出卡片 */
  table.m-cards td .tag, table.m-cards td .apc-s { white-space: normal; }
  table.m-cards[data-legacy] td .u-tag { white-space: normal; height: auto; }   /* 批 V19 V19-13c 公共底：换过皮的表（带 data-legacy）里老标签换成 u-tag（高写死 20、一行不折），卡片里长标签照旧折行不撑出；别的页的 u-tag 不受影响 */
  /* 整行只有一格的（分组行、展开行、空表提示）：不画成卡片，整宽 */
  table.m-cards > tbody > tr:has(> td:only-child[colspan]) { margin: 12px 12px 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
  table.m-cards > tbody > tr > td:only-child[colspan] { padding: 4px 0; }

  /* ---------- 项目 360 › 财务：指标卡一行 2 个；标题、小字换行不截断 ---------- */
  .ui-kpis.o3-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px; }
  .o3-kpis > .ui-kpi { min-height: 0; padding: 10px 12px; }
  .o3-kpis .ui-kpi-lb { white-space: normal; align-items: flex-start; }
  .o3-kpis .ui-kpi-lb > span:first-child { overflow: visible; text-overflow: clip; }
  .o3-kpis .ui-kpi-v { font-size: 18px; }
  .o3-kpis .ui-kpi-sub { white-space: normal; overflow: visible; text-overflow: clip; }

  /* ---------- 360 财务 › 账单期次：一期一张卡（期次名 + 状态（右上）→ 主体 → 到期 → 收款进度和金额 → 触发 → 收款动作和核销明细，按钮各占一份宽） ----------
   *   批 V19 V19-13b（#434，审核方 ★5「mcards 按类名」）：格子按类名认，不按第几格——各期主体都一样时不出「主体」那一格，第几格会错位。 */
  #o3-bill table.m-cards > tbody > tr[data-bill] { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "lb st" "ent ent" "due due" "pg pg" "trg trg" "xc xc"; column-gap: 8px; }
  #o3-bill table.m-cards > tbody > tr[data-bill][hidden] { display: none; }
  #o3-bill table.m-cards > tbody > tr[data-bill] > td.o3-lbc { grid-area: lb; }
  #o3-bill table.m-cards > tbody > tr[data-bill] > td.o3-ent { grid-area: ent; }
  #o3-bill table.m-cards > tbody > tr[data-bill] > td.o3-pcell { grid-area: pg; width: auto; min-width: 0; padding: 6px 0 2px; }
  #o3-bill table.m-cards > tbody > tr[data-bill] > td.o3-trg { grid-area: trg; }
  #o3-bill table.m-cards > tbody > tr[data-bill] > td.o3-duec { grid-area: due; }
  #o3-bill table.m-cards > tbody > tr[data-bill] > td.o3-st { grid-area: st; padding: 0; text-align: right; }
  #o3-bill table.m-cards > tbody > tr[data-bill] > td.o3-acts { grid-area: xc; width: auto; padding: 8px 0 0; text-align: left; }
  #o3-bill table.m-cards > tbody > tr[data-bill] > td:is(.o3-pcell, .o3-st, .o3-acts)::before { content: none; }
  #o3-bill table.m-cards > tbody > tr[data-bill] > td:is(.o3-pcell, .o3-st, .o3-acts) { padding-left: 0; }
  #o3-bill table.m-cards > tbody > tr[data-bill] > td.o3-lbc b { font-size: 15px; }
  #o3-bill table.m-cards td.o3-acts .o3-claim { align-items: stretch; }
  #o3-bill table.m-cards td.o3-acts .u-row-acts { display: flex; flex-wrap: wrap; width: 100%; max-width: none; }
  #o3-bill table.m-cards td.o3-acts .u-row-acts > .u-btn { flex: 1 1 auto; white-space: nowrap; }   /* 放得下两个就一排各占一份，放不下（俄文）各占一整行 */
  #o3-bill table.m-cards td.o3-acts > .o3-ib { margin-top: 6px; }
  #o3-bill table.m-cards .o3-amt { white-space: normal; }
  #o3-bill table.m-cards .o3-amt > b, #o3-bill table.m-cards .o3-amt > span { white-space: nowrap; }
  /* 逾期：原来是第一格左边一条红线，换到整张卡左边 */
  #o3-bill table.m-cards > tbody > tr.o3-over { box-shadow: inset 3px 0 0 var(--red); }
  #o3-bill table.m-cards > tbody > tr.o3-over > td:first-child { box-shadow: none; }
  #o3-bill table.m-cards > tbody > tr.o3-xable.open { border-color: var(--brand); }
  /* 分组标题（合同期次 / 代垫应收 / 合同外 / 收费计划）：整宽一块；合计每个币种一行（「｜」换成换行） */
  #o3-bill table.m-cards > tbody > tr.o3-grp { margin: 14px 12px 0; padding: 8px 12px; border-radius: 8px; background: #f8fafc; }
  #o3-bill table.m-cards > tbody > tr.o3-grp > td { padding: 0; font-size: 13px; }
  #o3-bill .o3-grp-sub { display: block; margin: 2px 0 0; }
  #o3-bill .o3-grp-sum { display: block; margin: 4px 0 0; }
  #o3-bill .o3-grp-sum .o3-sep { display: block; height: 0; overflow: hidden; }
  /* 核销明细（点「▸」展开）：接在那张卡下面 */
  #o3-bill table.m-cards > tbody > tr.o3-xrow { margin: -6px 12px 10px; padding: 10px 12px 8px; border: 1px solid var(--border); border-top: 0; border-radius: 0 0 10px 10px; background: #f8fbff; }
  #o3-bill table.m-cards > tbody > tr.o3-xrow[hidden] { display: none; }
  /* 收费计划组折起来的「还有 N 期未触发」 */
  #o3-bill table.m-cards > tbody > tr.o3-bp-fold { margin: 4px 12px 0; }
  #o3-bill table.m-cards > tbody > tr.o3-bp-fold > td { background: transparent; }

  /* ---------- 360 财务 › 收费计划：服务项 + 状态（右上）→ 周期 × 期数、每期金额、服务期、出账 → 调整 ---------- */
  #o3-plans table.m-cards > tbody > tr[data-plan] { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "svc st" "cyc cyc" "amt amt" "per per" "iss iss" "op op"; column-gap: 8px; }
  #o3-plans table.m-cards > tbody > tr[data-plan] > td:nth-child(1) { grid-area: svc; }
  #o3-plans table.m-cards > tbody > tr[data-plan] > td:nth-child(2) { grid-area: cyc; }
  #o3-plans table.m-cards > tbody > tr[data-plan] > td:nth-child(3) { grid-area: amt; }
  #o3-plans table.m-cards > tbody > tr[data-plan] > td:nth-child(4) { grid-area: per; }
  #o3-plans table.m-cards > tbody > tr[data-plan] > td:nth-child(5) { grid-area: iss; }
  #o3-plans table.m-cards > tbody > tr[data-plan] > td:nth-child(6) { grid-area: st; padding-left: 0; text-align: right; }
  #o3-plans table.m-cards > tbody > tr[data-plan] > td:nth-child(7) { grid-area: op; padding: 8px 0 0; text-align: right; }
  #o3-plans table.m-cards > tbody > tr[data-plan] > td:nth-child(6)::before, #o3-plans table.m-cards > tbody > tr[data-plan] > td:nth-child(7)::before { content: none; }

  /* ---------- 360 财务 › 发票：期次 + 金额 / 税率（右上，主信息）→ 状态 → 类型、开票主体、抬头、号码、申请人、# ---------- */
  #od-inv table.m-cards > tbody > tr.inv-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "bl amt" "st st" "ty ty" "ent ent" "ttl ttl" "no no" "ap ap" "id id"; column-gap: 8px; }
  #od-inv table.m-cards > tbody > tr.inv-row > td:nth-child(1) { grid-area: id; font-size: 12px; color: var(--text-3); }
  #od-inv table.m-cards > tbody > tr.inv-row > td:nth-child(2) { grid-area: ty; }
  #od-inv table.m-cards > tbody > tr.inv-row > td:nth-child(3) { grid-area: ent; }
  #od-inv table.m-cards > tbody > tr.inv-row > td:nth-child(4) { grid-area: bl; padding-left: 0; font-size: 15px; font-weight: 600; color: var(--text); }
  #od-inv table.m-cards > tbody > tr.inv-row > td:nth-child(5) { grid-area: amt; padding-left: 0; text-align: right; font-weight: 600; }
  #od-inv table.m-cards > tbody > tr.inv-row > td:nth-child(6) { grid-area: ttl; }
  #od-inv table.m-cards > tbody > tr.inv-row > td:nth-child(7) { grid-area: st; padding: 4px 0; }
  #od-inv table.m-cards > tbody > tr.inv-row > td:nth-child(8) { grid-area: no; }
  #od-inv table.m-cards > tbody > tr.inv-row > td:nth-child(9) { grid-area: ap; }
  #od-inv table.m-cards > tbody > tr.inv-row > td:nth-child(4)::before, #od-inv table.m-cards > tbody > tr.inv-row > td:nth-child(5)::before, #od-inv table.m-cards > tbody > tr.inv-row > td:nth-child(7)::before { content: none; }
  #od-inv table.m-cards > tbody > tr.inv-row > td:nth-child(7) { padding-left: 0; }
  #od-inv table.m-cards .inv-ttl { max-width: none; }

  /* ---------- 360 财务 › 费用与代垫：项目 + 主体 · 金额（右上）→ 承担方式、收款方 → 状态和付款信息 → 操作 ---------- */
  #o3-exp table.m-cards > tbody > tr[data-exp] { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "item amt" "bear bear" "pay pay" "st st" "op op"; column-gap: 8px; }
  #o3-exp table.m-cards > tbody > tr[data-exp] > td:nth-child(1) { grid-area: item; }
  #o3-exp table.m-cards > tbody > tr[data-exp] > td:nth-child(2) { grid-area: bear; }
  #o3-exp table.m-cards > tbody > tr[data-exp] > td:nth-child(3) { grid-area: amt; max-width: 150px; padding-left: 0; text-align: right; }
  #o3-exp table.m-cards > tbody > tr[data-exp] > td:nth-child(4) { grid-area: pay; }
  #o3-exp table.m-cards > tbody > tr[data-exp] > td:nth-child(5) { grid-area: st; padding: 4px 0 0; }
  #o3-exp table.m-cards > tbody > tr[data-exp] > td:nth-child(6) { grid-area: op; }
  #o3-exp table.m-cards > tbody > tr[data-exp] > td:nth-child(3)::before, #o3-exp table.m-cards > tbody > tr[data-exp] > td:nth-child(5)::before { content: none; }
  #o3-exp table.m-cards > tbody > tr[data-exp] > td:nth-child(5) { padding-left: 0; }

  /* ---------- 360 进度 › 节点表：第一行 代号 + 节点名（按词换行）和关键 / 外勤小字；第二行 承办人 · 计划完成 · 状态；「›」在右上 ---------- */
  table.o3u-ntbl.m-cards > tbody > tr { display: grid; grid-template-columns: auto auto minmax(0, 1fr); grid-template-areas: "nd nd nd" "who plan st"; column-gap: 12px; row-gap: 6px; align-items: center; margin: 8px 12px; padding: 10px 34px 10px 12px; }
  table.o3u-ntbl.m-cards > tbody > tr > td { padding: 0; }
  table.o3u-ntbl.m-cards > tbody > tr > td[data-lb]:not(:first-child) { display: block; padding: 0; text-align: left; }
  table.o3u-ntbl.m-cards > tbody > tr > td[data-lb]:not(:first-child)::before { content: none; }
  table.o3u-ntbl.m-cards > tbody > tr > td:nth-child(1) { grid-area: nd; }
  table.o3u-ntbl.m-cards > tbody > tr > td:nth-child(2) { grid-area: who; }
  table.o3u-ntbl.m-cards > tbody > tr > td:nth-child(3) { grid-area: plan; }
  table.o3u-ntbl.m-cards > tbody > tr > td:nth-child(4) { grid-area: st; justify-self: end; }
  table.o3u-ntbl.m-cards > tbody > tr > td.go, table.o3u-ntbl.m-cards > tbody > tr > td.go[data-lb]:not(:first-child) { position: absolute; right: 10px; top: 12px; width: auto; padding: 0; }
  table.o3u-ntbl.m-cards .u-cell .m { flex-wrap: wrap; }
  table.o3u-ntbl.m-cards .u-cell .s { flex-wrap: wrap; }
  table.o3u-ntbl.m-cards > tbody > tr.over { box-shadow: inset 3px 0 0 var(--u-danger); }

  /* ---------- 360 各页签的页签内容不横滚（审核方 #427 19:3x 俄文 390 第 1、3 条：页签内容 .o3-body 自己带横向滚动条，原来只量了整页） ----------
   *   进度页工具条右边那组（改派 / 导出 / 表格·时间轴）原来不换行，俄文把 .o3-body 撑到 423（可视 351）——放不下就换行；
   *   区块标题（资料文件的「订单号 · 路径」等）原来 nowrap、右边硬切——折行 */
  .o3-body .u-toolbar-r { flex-wrap: wrap; row-gap: 8px; }
  .o3-body .ui-sec-hd > h3, .o3-body .ui-sec-hd > .sub { min-width: 0; white-space: normal; overflow-wrap: anywhere; }   /* .sub：客户信息「注册地址」那行说明 375 宽中文也伸出 7 px */

  /* ---------- 节点抽屉：「关联表单」里的文件名按词换行，不再一个字一行 ---------- */
  /* 抽屉里的标签（节点抽屉「带什么」的材料等）原来 nowrap，俄文一条 662 宽、抽屉只有 372，后面看不到也滚不过去（审核方 #427 19:3x 第 2 条）——放不下就折行、高度跟着内容 */
  /* 抽屉里行内写死两栏的表单（节点抽屉 C02 的 ODI 证书 #odi-cert-form / #nd-odi，odicomm.js）：俄文日期框两个并排比抽屉宽、右边被切——手机上一栏（行内样式只能 !important 盖） */
  #drawer-root .form-grid[style*="grid-template-columns:1fr 1fr"] { grid-template-columns: minmax(0, 1fr) !important; }
  /* 上传框下面那行说明（格式 · 可多选 · 单个大小）原来 nowrap，抽屉、「更多 › 合同」里伸出去——换行 */
  .fu-line-hint { white-space: normal; }
  #drawer-root .drawer-bd .tag { max-width: 100%; height: auto; white-space: normal; overflow-wrap: anywhere; }
  #drawer-root .drawer-bd .u-dbody.mods .u-tag { max-width: 100%; height: auto; white-space: normal; overflow-wrap: anywhere; }   /* 批 V19 V19-13c 公共底：老抽屉换成新抽屉以后正文照旧走模块化（Core.modularize 挂 .mods，只有老抽屉的正文才有），里面换成 u-tag 的标签照旧折行 */
  #drawer-root .drawer-bd.mods dd { min-width: 0; word-break: normal; overflow-wrap: anywhere; }   /* 原来 .desc dd 是 break-all：俄文在词中间断成「опера / ционный」 */
  /* 「关联表单」每一行（模板名 · 上传人日期 · 下载 · 生成）原来一行排开不换行，名字被挤成一个字一行：名字独占一行，其余放不下往下排 */
  #drawer-root .drawer-bd.mods #nf-box > div { flex-wrap: wrap; row-gap: 2px; }
  /* 抽屉「基本信息」左栏字段名 112 → 96：375 宽俄文「＋ Загрузить шаблон」按钮比右栏宽 5 px（按钮里不许折字，用例 5956），右栏让出 16 px */
  #drawer-root .drawer-bd.mods .mod .desc { grid-template-columns: 96px minmax(0, 1fr); }
  /* 抽屉里各块的标题行（如「Оформление визы · 0 чел. · В раздел «Визы» ›」）原来一行排开，375 宽俄文右边伸出 3 px——放不下就换行 */
  #drawer-root .drawer-bd.mods .mod-hd { flex-wrap: wrap; row-gap: 4px; }
  #drawer-root .drawer-bd.mods #nf-box > div > span:first-child { min-width: 100%; }
  /* 「本节点外勤」下面那排按钮（关联外勤 / ＋ 任务）放不下就换行 */
  #drawer-root .drawer-bd.mods .nf-box .flex { flex-wrap: wrap; }

  /* ========== ② 外勤单、付款申请列表和财务页顶、签证抽屉（审核方 #427 18:4x 拆的第二件） ========== */

  /* ---------- 外勤单：单号 + 状态（右上）→ 时间、客户 / 事项、订单号、地点、外勤 / 陪同、复核、材料与办成标志 → 操作；表头隐藏（原来俄文表头竖着叠字、互相压住） ---------- */
  table.ft-tbl.m-cards > tbody > tr.ft-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "no st" "time time" "cli cli" "ord ord" "place place" "who who" "rv rv" "mat mat" "op op"; column-gap: 8px; }
  table.ft-tbl.m-cards > tbody > tr.ft-row > td:nth-child(1) { grid-area: no; }
  table.ft-tbl.m-cards > tbody > tr.ft-row > td:nth-child(2) { grid-area: time; }
  table.ft-tbl.m-cards > tbody > tr.ft-row > td:nth-child(3) { grid-area: cli; }
  table.ft-tbl.m-cards > tbody > tr.ft-row > td:nth-child(4) { grid-area: ord; }
  table.ft-tbl.m-cards > tbody > tr.ft-row > td:nth-child(5) { grid-area: place; }
  table.ft-tbl.m-cards > tbody > tr.ft-row > td:nth-child(6) { grid-area: who; }
  table.ft-tbl.m-cards > tbody > tr.ft-row > td:nth-child(7) { grid-area: rv; }
  table.ft-tbl.m-cards > tbody > tr.ft-row > td:nth-child(8) { grid-area: mat; }
  table.ft-tbl.m-cards > tbody > tr.ft-row > td:nth-child(9) { grid-area: st; padding-left: 0; text-align: right; }
  table.ft-tbl.m-cards > tbody > tr.ft-row > td:nth-child(10) { grid-area: op; }
  table.ft-tbl.m-cards > tbody > tr.ft-row > td:nth-child(9)::before { content: none; }
  table.ft-tbl.m-cards > tbody > tr.ft-row > td:nth-child(1) b { font-size: 15px; }
  table.ft-tbl.m-cards .clamp1 { white-space: normal; -webkit-line-clamp: 3; line-clamp: 3; }

  /* ---------- 财务 › 付款申请列表：编号当标题（批量复核时勾选框在左上），其余字段一行一个，金额加粗；原来 2261 宽，一屏只露编号、状态、主体 ---------- */
  table.fp-tbl.m-cards > tbody > tr.fp-row:has(> td.fp-ck-td) { padding-left: 44px; }
  table.fp-tbl.m-cards > tbody > tr.fp-row > td.fp-ck-td { position: absolute; left: 14px; top: 12px; width: auto; padding: 0; }
  table.fp-tbl.m-cards > tbody > tr.fp-row > td.fp-ck-td + td[data-lb] { display: block; padding-left: 0; font-size: 15px; font-weight: 600; }
  table.fp-tbl.m-cards > tbody > tr.fp-row > td.fp-ck-td + td[data-lb]::before { content: none; }
  table.m-cards > tbody > tr > td.r { text-align: left; }
  table.fp-tbl.m-cards > tbody > tr.fp-row > td.r { font-weight: 600; }

  /* ---------- 财务页顶的四格（收钱 / 付钱 / 月底 / 设置）：数字挪到名称下面，名称和说明换行不截断（俄文「Закрытие месяца」原来被切） ---------- */
  .f5-g { display: grid; grid-template-columns: 36px minmax(0, 1fr); grid-template-areas: "ic tx" "ic n"; align-items: start; gap: 4px 10px; padding: 12px; }
  .f5-g-ic { grid-area: ic; }
  .f5-g-tx { grid-area: tx; }
  .f5-g-n { grid-area: n; flex-direction: row; align-items: baseline; gap: 4px; }
  .f5-g-nm { white-space: normal; line-height: 20px; }
  /* 时间筛选（全部 / 本月 / … / 自定义）：按钮里的字不拆行，放不下整个按钮换到下一行 */
  .fpd-seg button { flex: 1 0 auto; white-space: nowrap; }

  /* ---------- 签证抽屉底栏：俄文主按钮（«Заполнить поля шага»）原来右边被切——放不下就换行，主按钮靠右 ---------- */
  .drawer-ft:has(> #vd-actbar) { flex-wrap: wrap; row-gap: 8px; }
  .drawer-ft:has(> #vd-actbar) > .vd-foot-r { margin-left: auto; max-width: 100%; }
  /* 底栏「更多」的菜单原来从按钮左边往右开（drop-start），俄文按钮在中间，菜单右边伸出屏幕 27 px——改成跟按钮右边对齐往左开 */
  .drawer-ft:has(> #vd-actbar) .u-more > .u-more-menu { left: auto; right: 0; }

  /* ========== V19-7b 其余常用页（改法清单 #443，审核方 11-18 22:2x 点头，★1–★8 照默认） ========== */

  /* ---------- 公共：工具条右边那组、统计卡标题 ----------
   *   工具条右边那组（账单与收款「导出 / 登记收款」、经营总览「哈国视图 / 数据更新」…）放不下就换行；统计卡标题换行不截断（应收看板「应收余额（未收期次…」、人事 KPI） */
  .u-toolbar-r { flex-wrap: wrap; row-gap: 8px; }
  .stat-card .lb { white-space: normal; overflow: visible; text-overflow: clip; }
  /* 分段按钮组放不下就换行：360 进度（CEO 账号多一颗「待双人核 N」，俄文 375 原来横拖 6 px，审核方 #427 19:3x）、经营总览的时间段 */
  .o3u-ntool .u-seg, #o6-bar .u-seg { flex-wrap: wrap; }   /* 经营总览用 id 写：.o6- 开头的类只许写在 core-v17-o6.css 里（用例 5651 ⑤） */

  /* ---------- 公共：第一格只有一个勾选框的（资金账户对账、批量勾选），勾选框放左上，第二格当标题 ---------- */
  table.m-cards > tbody > tr:has(> td:first-child > input[type="checkbox"]:only-child) { padding-left: 44px; }
  table.m-cards > tbody > tr > td:first-child:has(> input[type="checkbox"]:only-child) { position: absolute; left: 14px; top: 12px; width: auto; padding: 0; }
  table.m-cards > tbody > tr > td:first-child:has(> input[type="checkbox"]:only-child) + td[data-lb] { display: block; padding-left: 0; font-size: 15px; }
  table.m-cards > tbody > tr > td:first-child:has(> input[type="checkbox"]:only-child) + td[data-lb]::before { content: none; }

  /* ---------- 订单列表：一单一张卡；勾选框左上、「›」右上；「客户 · 订单」当标题；格子里的一行省略改成最多两行（★4） ---------- */
  #ou3-list table.ou3-tbl.m-cards > tbody > tr { padding: 10px 34px 10px 44px; }
  #ou3-list table.ou3-tbl.m-cards > tbody > tr > td.bt-ck { position: absolute; left: 14px; top: 12px; width: auto; padding: 0; }
  #ou3-list table.ou3-tbl.m-cards > tbody > tr > td.bt-ck + td[data-lb] { display: block; padding-left: 0; font-size: 15px; }
  #ou3-list table.ou3-tbl.m-cards > tbody > tr > td.bt-ck + td[data-lb]::before { content: none; }
  #ou3-list table.ou3-tbl.m-cards > tbody > tr > td.go, #ou3-list table.ou3-tbl.m-cards > tbody > tr > td.go[data-lb]:not(:first-child) { position: absolute; right: 10px; top: 12px; width: auto; padding: 0; }
  #ou3-list table.ou3-tbl.m-cards .cut { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; white-space: normal; overflow: hidden; }

  /* 批 V19 V19-13c 公共底：本文件里带 .card / table.tbl 的结构选择器后面都并列一份 u-card / u-tbl 带 data-legacy 的（换皮时加的标记；:where 不加优先级，和原来一样高）；应收看板另加一份 .fb-stats ~（skin-ops #497 把顶上那排统计卡换成新数字条 u-stat fb-stats） */
  /* ---------- 财务 › 应收看板：一期一张卡（订单 + 客户 · 顾问当标题，其余一行一个；★1 表没有专门 class，用结构选择器） ---------- */
  #fin-body .stat-grid:not([id]) ~ .card > .card-bd.flush > table.tbl.m-cards > tbody > tr > td:first-child a, #fin-body .stat-grid:not([id]) ~ .u-card:where([data-legacy]) > .card-bd.flush > table.u-tbl:where([data-legacy]).m-cards > tbody > tr > td:first-child a, #fin-body .fb-stats ~ .u-card:where([data-legacy]) > .card-bd.flush > table.u-tbl:where([data-legacy]).m-cards > tbody > tr > td:first-child a { font-weight: 600; }

  /* ---------- 财务 › 发票（10 列，比 360 多一列「订单」）：期次 + 金额 / 税率（右上）→ 状态 → 订单 · 客户、类型、开票主体、抬头、号码、申请人、# ---------- */
  #fin-body table.inv-tbl.m-cards > tbody > tr.inv-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "bl amt" "st st" "ord ord" "ty ty" "ent ent" "ttl ttl" "no no" "ap ap" "id id"; column-gap: 8px; }
  #fin-body table.inv-tbl.m-cards > tbody > tr.inv-row > td:nth-child(1) { grid-area: id; font-size: 12px; color: var(--text-3); }
  #fin-body table.inv-tbl.m-cards > tbody > tr.inv-row > td:nth-child(2) { grid-area: ord; }
  #fin-body table.inv-tbl.m-cards > tbody > tr.inv-row > td:nth-child(3) { grid-area: ty; }
  #fin-body table.inv-tbl.m-cards > tbody > tr.inv-row > td:nth-child(4) { grid-area: ent; }
  #fin-body table.inv-tbl.m-cards > tbody > tr.inv-row > td:nth-child(5) { grid-area: bl; padding-left: 0; font-size: 15px; font-weight: 600; color: var(--text); }
  #fin-body table.inv-tbl.m-cards > tbody > tr.inv-row > td:nth-child(6) { grid-area: amt; padding-left: 0; text-align: right; font-weight: 600; }
  #fin-body table.inv-tbl.m-cards > tbody > tr.inv-row > td:nth-child(7) { grid-area: ttl; }
  #fin-body table.inv-tbl.m-cards > tbody > tr.inv-row > td:nth-child(8) { grid-area: st; padding: 4px 0; padding-left: 0; }
  #fin-body table.inv-tbl.m-cards > tbody > tr.inv-row > td:nth-child(9) { grid-area: no; }
  #fin-body table.inv-tbl.m-cards > tbody > tr.inv-row > td:nth-child(10) { grid-area: ap; }
  #fin-body table.inv-tbl.m-cards > tbody > tr.inv-row > td:nth-child(5)::before, #fin-body table.inv-tbl.m-cards > tbody > tr.inv-row > td:nth-child(6)::before, #fin-body table.inv-tbl.m-cards > tbody > tr.inv-row > td:nth-child(8)::before { content: none; }
  #fin-body table.inv-tbl.m-cards .inv-ttl { max-width: none; }

  /* ---------- 财务 › 费用与代垫（9 列）：项目 + 金额（右上）→ 订单、付费方 · 主体、收款方、状态、支付信息、备注 → 操作 ---------- */
  table.fexp-tbl.m-cards > tbody > tr > td { min-width: 0; width: auto; }
  table.fexp-tbl.m-cards > tbody > tr:not(:has(> td:only-child[colspan])) { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "item amt" "ord ord" "pay pay" "rcv rcv" "st st" "pinfo pinfo" "note note" "op op"; column-gap: 8px; }
  table.fexp-tbl.m-cards > tbody > tr > td:nth-child(1) { grid-area: ord; }
  table.fexp-tbl.m-cards > tbody > tr > td:nth-child(2) { grid-area: item; padding-left: 0; }
  table.fexp-tbl.m-cards > tbody > tr > td:nth-child(3) { grid-area: pay; }
  table.fexp-tbl.m-cards > tbody > tr > td:nth-child(4) { grid-area: amt; padding-left: 0; text-align: right; font-weight: 600; }
  table.fexp-tbl.m-cards > tbody > tr > td:nth-child(5) { grid-area: rcv; }
  table.fexp-tbl.m-cards > tbody > tr > td:nth-child(6) { grid-area: st; padding-left: 0; }
  table.fexp-tbl.m-cards > tbody > tr > td:nth-child(7) { grid-area: pinfo; }
  table.fexp-tbl.m-cards > tbody > tr > td:nth-child(8) { grid-area: note; }
  table.fexp-tbl.m-cards > tbody > tr > td:nth-child(9) { grid-area: op; padding: 8px 0 0; text-align: right; }
  table.fexp-tbl.m-cards > tbody > tr > td:nth-child(2)::before, table.fexp-tbl.m-cards > tbody > tr > td:nth-child(4)::before, table.fexp-tbl.m-cards > tbody > tr > td:nth-child(6)::before, table.fexp-tbl.m-cards > tbody > tr > td:nth-child(9)::before { content: none; }

  /* ---------- 财务 › 退款审批：表格原来被模板里的行内宽度（OPS_VIS_W：max-width: calc(100vw - 300px)，给电脑侧栏让位）挤成 90 px（375 下 75 px）——手机上盖掉（★2，行内样式只能 !important）；
   *   卡片：类型 + 金额（右上）→ 订单 · 申请人、期次、理由、审批进度和操作、# ---------- */
  #fin-body .fa-scroll[style*="max-width"] { max-width: none !important; }
  table.fa-tbl.m-cards > tbody > tr > td { min-width: 0; max-width: none; width: auto; }
  table.fa-tbl.m-cards > tbody > tr:not(:has(> td:only-child[colspan])) { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "ty amt" "ord ord" "per per" "rsn rsn" "prog prog" "id id"; column-gap: 8px; }
  table.fa-tbl.m-cards > tbody > tr > td:nth-child(1) { grid-area: id; font-size: 12px; color: var(--text-3); }
  table.fa-tbl.m-cards > tbody > tr > td:nth-child(2) { grid-area: ty; padding-left: 0; }
  table.fa-tbl.m-cards > tbody > tr > td:nth-child(3) { grid-area: ord; }
  table.fa-tbl.m-cards > tbody > tr > td:nth-child(4) { grid-area: per; }
  table.fa-tbl.m-cards > tbody > tr > td:nth-child(5) { grid-area: amt; padding-left: 0; text-align: right; font-weight: 600; }
  table.fa-tbl.m-cards > tbody > tr > td:nth-child(6) { grid-area: rsn; }
  table.fa-tbl.m-cards > tbody > tr > td:nth-child(7) { grid-area: prog; padding-left: 0; }
  table.fa-tbl.m-cards > tbody > tr > td:nth-child(2)::before, table.fa-tbl.m-cards > tbody > tr > td:nth-child(5)::before, table.fa-tbl.m-cards > tbody > tr > td:nth-child(7)::before { content: none; }
  table.fa-tbl.m-cards .fa-acts { flex-wrap: wrap; }   /* 「批准 / 驳回」原来一行不换，俄文 375 «Отклонить» 伸出 7 px */

  /* ---------- 财务 › 账单与收款：待处理列表（.f5-tbl，≤ 767 时写死 min-width 860）改卡片 ---------- */
  #f5-list table.f5-tbl.m-cards { min-width: 0; }

  /* ---------- 财务 › 月结与汇率：两栏里的表（期间汇总、锁定、汇率）和红冲记录改卡片；期间汇总表头第一格是「主体 月份」，留作小标题（★6） ---------- */
  #fin-body .grid2 > .card > .card-bd > table.tbl.mb8.m-cards > thead, #fin-body .grid2 > .u-card:where([data-legacy]) > .card-bd > table.u-tbl:where([data-legacy]).mb8.m-cards > thead { display: block; }
  #fin-body .grid2 > .card > .card-bd > table.tbl.mb8.m-cards > thead > tr, #fin-body .grid2 > .u-card:where([data-legacy]) > .card-bd > table.u-tbl:where([data-legacy]).mb8.m-cards > thead > tr { display: block; }
  #fin-body .grid2 > .card > .card-bd > table.tbl.mb8.m-cards > thead > tr > th, #fin-body .grid2 > .u-card:where([data-legacy]) > .card-bd > table.u-tbl:where([data-legacy]).mb8.m-cards > thead > tr > th { display: none; }
  #fin-body .grid2 > .card > .card-bd > table.tbl.mb8.m-cards > thead > tr > th:first-child, #fin-body .grid2 > .u-card:where([data-legacy]) > .card-bd > table.u-tbl:where([data-legacy]).mb8.m-cards > thead > tr > th:first-child { display: block; padding: 2px 12px; border: 0; background: transparent; white-space: normal; }

  /* 月结「结账前检查 · 主体 月份」那行（标题 + 「不通过 N 项」标签，行内写的 flex 不换行）：标题被挤成一个字一行——放不下就换行 */
  #fin-body .fr-close > .flex { flex-wrap: wrap; }

  /* ---------- 人力资源首页：KPI 一行 2 个（原来一行 5 个、每个最少 150，把整页撑到 818）；两栏 / 三栏的框改一栏；请假备案改卡片（★3） ---------- */
  .hrx-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .hrx-row.hrx-c2, .hrx-row.hrx-c3 { grid-template-columns: minmax(0, 1fr); }
  table.lvx-req.m-cards .lvx-st { white-space: normal; }   /* 审批轨迹那一行（「提交 … · 代申请 …」）换行 */
  table.lvx-req.m-cards .lvx-st > span { white-space: nowrap; }   /* 人名不拆开（不然「田 / 华」一个字一行） */

  /* ---------- 期限台账：一条一张卡——事项（标题）+ 级别（右上）→ 类型、订单 / 客户、到期日、剩余、负责人、状态 → 操作 ---------- */
  table.dl-tbl.m-cards > tbody > tr > td { min-width: 0; }
  table.dl-tbl.m-cards > tbody > tr:not(:has(> td:only-child[colspan])) { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "item lvl" "ty ty" "ord ord" "due due" "left left" "own own" "st st" "op op"; column-gap: 8px; }
  table.dl-tbl.m-cards > tbody > tr > td:nth-child(1) { grid-area: lvl; text-align: right; }
  table.dl-tbl.m-cards > tbody > tr > td:nth-child(2) { grid-area: ty; }
  table.dl-tbl.m-cards > tbody > tr > td:nth-child(3) { grid-area: item; padding-left: 0; font-weight: 600; }
  table.dl-tbl.m-cards > tbody > tr > td:nth-child(4) { grid-area: ord; }
  table.dl-tbl.m-cards > tbody > tr > td:nth-child(5) { grid-area: due; }
  table.dl-tbl.m-cards > tbody > tr > td:nth-child(6) { grid-area: left; }
  table.dl-tbl.m-cards > tbody > tr > td:nth-child(7) { grid-area: own; }
  table.dl-tbl.m-cards > tbody > tr > td:nth-child(8) { grid-area: st; }
  table.dl-tbl.m-cards > tbody > tr > td:nth-child(9) { grid-area: op; padding: 8px 0 0; text-align: right; }
  table.dl-tbl.m-cards > tbody > tr > td:nth-child(3)::before, table.dl-tbl.m-cards > tbody > tr > td:nth-child(9)::before { content: none; }
  table.dl-tbl.m-cards > tbody > tr.dl-need { box-shadow: inset 3px 0 0 var(--red); }
  table.dl-tbl.m-cards > tbody > tr.dl-need > td:first-child { box-shadow: none; }

  /* ---------- 客户：「来源渠道占比」那张统计卡行内写了 min-width 300，两列时把整页撑到 502——手机上占整行 ---------- */
  #cu-stats > .cu-chcard { grid-column: 1 / -1; }
  /* 筛选行里的下拉框（客户页「全部行业」，最长的选项很长）原来按最长选项撑宽，俄文把整页撑到 459——不超过一行宽 */
  .filter-bar select, .filter-bar input { max-width: 100%; }
}
