/* 采购报销(2026-10-17, docs/EXPENSE-PLAN.md §五, 画板 A~F): 选择器全挂 #exRoot; 色字全走 styles.css 令牌; 页头/磁贴/芯片/表格/页签/底栏是 desk-ui.css 共用件。
   画板里没有令牌的两档淡边(浅绿 / 浅红钮边、拒绝条边)用 color-mix 从 --good / --bad 调出来, 不写死色值。 */
#exRoot { display: flex; flex-direction: column; gap: 12px; padding: 0 0 24px; color: var(--ink); }
#exRoot [hidden] { display: none !important; }
#exRoot > :not(.du-head):not(.ex-drawer):not(.du-mbar), #exRoot .ex-stats > :not(.du-head) { margin-left: 24px; margin-right: 24px; }   /* 页头白条通栏, 其余左右 24px(画板 D/F) */
#exRoot > .ex-stats { margin: 0; } #exRoot .ex-head .du-search { width: 220px; }
#exRoot .ex-grow { flex: 1 1 auto; }
#exRoot .sub { font-size: 11.5px; color: var(--muted-2); font-weight: 400; }
#exRoot .ex-b { font-weight: 700; }
#exRoot .ex-red { color: var(--cta-hover); } #exRoot .ex-warn { color: var(--warn); }
#exRoot .ex-mo { display: none; }
#exRoot .ex-lbl { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
#exRoot .ex-sel { height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font: inherit; font-size: 13px; color: var(--ink); }
#exRoot .ex-tiles { display: flex; flex-wrap: wrap; gap: 10px; }
#exRoot .ex-sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
#exRoot .ex-ok { color: var(--good); border-color: color-mix(in srgb, var(--good) 30%, var(--surface)); }
#exRoot .ex-no { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 28%, var(--surface)); }
#exRoot .ex-link { flex: none; padding: 0; border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 400; color: var(--cta-hover); cursor: pointer; white-space: nowrap; }
#exRoot .ex-st { display: inline-block; flex: none; padding: 1px 8px; border-radius: 9px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
#exRoot .ex-st.wait { background: var(--warn-soft); color: var(--warn); } #exRoot .ex-st.ok { background: var(--good-soft); color: var(--good); }
#exRoot .ex-st.pay { background: var(--soft); color: var(--muted); } #exRoot .ex-st.no { background: var(--bad-soft); color: var(--bad); }
#exRoot .ex-st.draft { background: var(--surface); color: var(--muted-2); border: 1px dashed var(--line); }
#exRoot .ex-empty { padding: 40px 16px; text-align: center; color: var(--muted-2); font-size: 13px; }
/* 列表 + 右栏(D) */
#exRoot .ex-body { display: flex; gap: 12px; align-items: flex-start; }
#exRoot .ex-listwrap { flex: 1 1 auto; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
#exRoot .ex-tw { overflow-x: auto; }
#exRoot .ex-table { min-width: 760px; }
#exRoot.ex-open .ex-table { min-width: 700px; } #exRoot.ex-open .ex-table.ex-hasck :is(th, td):is(:nth-child(4), :nth-child(7)) { display: table-cell; } #exRoot.ex-open .ex-table.ex-hasck :is(th, td):is(:nth-child(5), :nth-child(8)) { display: none; }   /* 有勾选列时右移一格 */ #exRoot.ex-open .ex-table :is(th, td):is(:nth-child(4), :nth-child(7)) { display: none; }   /* 右栏开着时让出类别 / 税票两列, 操作列不被挤出 */
#exRoot .ex-table tbody tr[data-row] { cursor: pointer; }
#exRoot .ex-table tbody tr[data-row]:hover td { background: var(--panel); }
#exRoot .ex-table tr.on td { background: var(--primary-50); }
#exRoot .ex-wrap { white-space: normal; min-width: 180px; }
#exRoot .ex-foot { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: 12px; color: var(--muted-2); }
#exRoot .ex-side { display: none; flex: 0 0 440px; min-width: 0; flex-direction: column; gap: 10px; padding-bottom: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
#exRoot.ex-open .ex-side { display: flex; }
#exRoot .ex-phead { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
#exRoot .ex-back { flex: none; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; } #exRoot .ex-back:hover { background: var(--soft); }
#exRoot .ex-pt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
#exRoot .ex-pt b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#exRoot .ex-h2 { margin: 0; font-size: 18px; font-weight: 700; line-height: 24px; white-space: nowrap; }
#exRoot .ex-card { margin: 0 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
#exRoot .ex-hero { display: flex; align-items: baseline; gap: 8px; padding: 14px; }
#exRoot .ex-big { flex: none; font-size: 24px; font-weight: 700; color: var(--cta-hover); font-variant-numeric: tabular-nums; white-space: nowrap; }
#exRoot .ex-kv { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 6px 14px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; box-sizing: border-box; }
#exRoot .ex-kv:last-child { border-bottom: 0; }
#exRoot .ex-kv .k { flex: none; width: 64px; color: var(--muted); font-size: 13px; }
#exRoot .ex-kv .v { flex: 1 1 auto; min-width: 0; }
#exRoot .ex-thumbs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }   /* 第 2 期: 桌面一行 2 张等比不裁(右栏 440 / 抽屉 560), 手机 3 张 */
#exRoot .ex-kv:has(.ex-ph) { flex-direction: column; align-items: stretch; gap: 6px; } #exRoot .ex-kv:has(.ex-ph) .k { width: auto; }
#exRoot .ex-ph { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; box-sizing: border-box; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); color: var(--muted-2); font-size: 11px; }
#exRoot .ex-ph img { width: 100%; height: 100%; object-fit: cover; }
#exRoot .ex-thumbs .ex-ph { width: auto; height: auto; aspect-ratio: 1 / 1; max-height: 220px; background: var(--surface); cursor: zoom-in; }
#exRoot .ex-thumbs .ex-ph img { object-fit: contain; }
#exRoot .ex-thumbs .ex-add { aspect-ratio: auto; height: 64px; background: var(--primary-50); cursor: pointer; }
#exRoot .ex-req { margin-left: 2px; font-style: normal; color: var(--bad); }
#exRoot .ex-tls { padding: 8px 0; } #exRoot .ex-tlh { padding: 2px 14px 6px; }
#exRoot .ex-tl { display: flex; gap: 10px; padding: 6px 14px; font-size: 13.5px; }
#exRoot .ex-dot { flex: none; width: 10px; height: 10px; margin-top: 5px; border-radius: 5px; background: var(--line); }
#exRoot .ex-dot.on { background: var(--primary-2); } #exRoot .ex-dot.ok { background: var(--good); } #exRoot .ex-dot.no { background: var(--bad); }
#exRoot .ex-tl-on { font-weight: 600; color: var(--warn); }
#exRoot .ex-rej { display: flex; flex-direction: column; gap: 4px; margin: 0 12px; padding: 10px 14px; border: 1px solid color-mix(in srgb, var(--bad) 25%, var(--surface)); border-radius: 10px; background: var(--bad-soft); font-size: 12.5px; color: var(--warn); }
#exRoot .ex-rej b { color: var(--bad); }
#exRoot .ex-f { display: flex; flex-direction: column; gap: 6px; min-width: 0; } #exRoot .ex-f label { font-size: 12.5px; color: var(--muted); }
#exRoot .ex-note { margin: 0 12px; }
#exRoot .ex-inp2 { height: 36px; min-width: 0; padding: 0 10px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font: inherit; font-size: 13.5px; color: var(--ink); }
#exRoot .ex-inp2:focus { border-color: var(--primary-2); outline: 0; }
#exRoot .ex-hint { padding: 0 16px; }
#exRoot .ex-acts { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface); }
#exRoot .ex-acts .primary { flex: 1 1 auto; }
/* 新建 / 编辑(A) */
#exRoot .ex-frow { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border-bottom: 1px solid var(--line-soft); }
#exRoot .ex-frow:last-child { border-bottom: 0; }
#exRoot .ex-top { align-items: flex-start; padding-top: 8px; padding-bottom: 8px; }
#exRoot .ex-top .ex-fl { line-height: 28px; }
#exRoot .ex-col { flex-direction: column; align-items: stretch; gap: 2px; padding-bottom: 8px; }
#exRoot .ex-line { display: flex; align-items: center; gap: 10px; }
#exRoot .ex-fl { flex: none; width: 52px; font-size: 13px; color: var(--muted); }
#exRoot .ex-inp { flex: 1 1 auto; min-width: 0; height: 42px; padding: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 15px; color: var(--ink); }
#exRoot .ex-amtrow { min-height: 58px; }
#exRoot .ex-amtin { display: flex; align-items: baseline; gap: 4px; flex: 1 1 auto; min-width: 0; color: var(--cta-hover); font-size: 18px; font-weight: 700; }
#exRoot .ex-amtin input { flex: 1 1 auto; min-width: 0; height: 50px; padding: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 28px; color: var(--cta-hover); }
#exRoot .ex-chips { display: flex; flex-wrap: wrap; gap: 6px; }
#exRoot .ex-recent { display: flex; align-items: center; gap: 6px; padding-left: 62px; overflow-x: auto; scrollbar-width: none; }
#exRoot .ex-recent .du-chip { flex: none; height: 26px; font-size: 12.5px; }
#exRoot .ex-gys { display: flex; flex-direction: column; gap: 4px; padding: 8px 14px; border-bottom: 1px solid var(--line-soft); }
#exRoot .ex-gopt { display: block; width: 100%; padding: 8px 4px; border: 0; border-bottom: 1px solid var(--line-soft); background: none; font: inherit; font-size: 13.5px; color: var(--ink); text-align: left; cursor: pointer; }
#exRoot .ex-sw { position: relative; flex: none; width: 40px; height: 24px; padding: 0; border: 0; border-radius: 12px; background: var(--line); cursor: pointer; }
#exRoot .ex-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 9px; background: var(--surface); transition: left var(--transition); }
#exRoot .ex-sw[aria-checked="true"] { background: var(--primary-2); } #exRoot .ex-sw[aria-checked="true"]::after { left: 19px; }
#exRoot .ex-tk { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; }
#exRoot .ex-tkh { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; } #exRoot .ex-tkh b { font-size: 13.5px; }
#exRoot .ex-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
#exRoot .ex-grid .ex-ph { width: auto; height: auto; aspect-ratio: 1 / 1; }
#exRoot .ex-add { flex-direction: column; gap: 4px; border: 1px dashed var(--primary-2); background: var(--primary-50); color: var(--warn); font-size: 12px; font-weight: 600; cursor: pointer; }
#exRoot .ex-padd { width: 84px; height: 64px; }
#exRoot .ex-del { position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 11px; background: color-mix(in srgb, var(--ink) 65%, transparent); color: var(--surface); font-size: 13px; line-height: 22px; cursor: pointer; }
/* 核销抽屉(E) */
#exRoot .ex-drawer { position: fixed; inset: 0; z-index: 9999; }   /* 压过右下角站内提醒卡 .chat-corner(9998) */
#exRoot .ex-mask { position: absolute; inset: 0; background: color-mix(in srgb, var(--ink) 28%, transparent); }
#exRoot .ex-dpanel { position: absolute; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; width: 560px; max-width: 100%; background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg); }
#exRoot .ex-dhead { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
#exRoot .ex-dhead .ex-pt b { font-size: 16px; }
#exRoot .ex-x { width: 36px; padding: 0; font-size: 18px; }
#exRoot .ex-dinfo { padding: 6px 6px; background: var(--panel); border-bottom: 1px solid var(--line-soft); }
#exRoot .ex-dinfo .ex-kv { border: 0; min-height: 0; }
#exRoot .ex-dbody { flex: 1 1 auto; display: flex; flex-direction: column; gap: 16px; padding: 16px 20px; overflow: auto; }
#exRoot .ex-g3 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
#exRoot .ex-gbox { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--primary-2); border-radius: 10px; background: var(--primary-50); font-size: 13px; }
#exRoot .ex-gbox > b { font-size: 13.5px; color: var(--warn); }
#exRoot .ex-gbox .ex-kv { min-height: 0; padding: 0; border: 0; font-size: 13px; }
/* 批量核销(第 2 期): 待付款页签勾选条 + 抽屉清单 */
#exRoot .ex-bbar { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border: 1px solid var(--primary-2); border-radius: 10px; background: var(--primary-50); font-size: 13px; }
#exRoot .ex-ck { width: 28px; text-align: center; } #exRoot .ex-ck input { width: 16px; height: 16px; margin: 0; cursor: pointer; } #exRoot .ex-ck input:disabled { cursor: not-allowed; }
#exRoot .ex-blist { display: flex; flex-direction: column; max-height: 240px; overflow: auto; padding: 4px 20px; }
#exRoot .ex-brow { display: flex; align-items: center; gap: 10px; min-height: 34px; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
#exRoot .ex-brow > span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#exRoot .ex-btot { border-bottom: 0; font-weight: 700; padding-right: 34px; }
#exRoot .ex-brm { flex: none; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 16px; cursor: pointer; } #exRoot .ex-brm:hover:not(:disabled) { background: var(--soft); color: var(--bad); }
/* 看图层(第 2 期): 压过抽屉(9999) */
#exRoot .ex-light { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 56px 16px 16px; box-sizing: border-box; background: color-mix(in srgb, var(--ink) 88%, transparent); }
#exRoot .ex-limg { width: 100%; height: 100%; object-fit: contain; }
#exRoot .ex-lbar { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 8px; padding: 10px 16px; color: var(--surface); font-size: 13px; }
#exRoot .ex-lbar .du-btn { height: 32px; text-decoration: none; } #exRoot .ex-lx { width: 36px; padding: 0; font-size: 18px; }
#exRoot .ex-lnav { position: absolute; top: 50%; width: 44px; height: 64px; margin-top: -32px; padding: 0; border: 0; border-radius: 8px; background: color-mix(in srgb, var(--surface) 18%, transparent); color: var(--surface); font-size: 30px; cursor: pointer; }
#exRoot .ex-lnav.prev { left: 12px; } #exRoot .ex-lnav.next { right: 12px; } #exRoot .ex-lnav:hover { background: color-mix(in srgb, var(--surface) 30%, transparent); }
#exRoot .ex-err { padding: 10px 12px; border-radius: 8px; background: var(--bad-soft); color: var(--bad); font-size: 13px; font-weight: 600; }
#exRoot .ex-dfoot { display: flex; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); }
/* 统计(F) */
#exRoot .ex-stats { display: none; flex-direction: column; gap: 12px; }
#exRoot.ex-m-stats .ex-stats { display: flex; }
#exRoot.ex-m-stats > .ex-head, #exRoot.ex-m-stats > .ex-tiles, #exRoot.ex-m-stats > .ex-msum, #exRoot.ex-m-stats > .ex-tabs, #exRoot.ex-m-stats > .ex-bbar, #exRoot.ex-m-stats > .ex-body, #exRoot.ex-m-stats > .ex-mbar { display: none; }
#exRoot .ex-items { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#exRoot .ex-g3s { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }   /* 按人 · 按类别 / 按商家 · 近 6 月 */
#exRoot .ex-stats .ex-card { margin: 0; overflow: hidden; }
#exRoot .ex-card h3 { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; font-weight: 600; }
#exRoot .ex-bar { min-width: 90px; height: 10px; overflow: hidden; border-radius: 5px; background: var(--primary-50); }
#exRoot .ex-bar i { display: block; height: 100%; border-radius: 5px; background: var(--primary); }
#exRoot .ex-bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; box-sizing: border-box; padding: 14px 16px 10px; }
#exRoot .ex-bc { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1 1 0; min-width: 0; }
#exRoot .ex-bc b { width: 100%; max-width: 38px; border-radius: 4px 4px 0 0; background: var(--primary); }
#exRoot .ex-bc b.cur { background: var(--primary-2); opacity: .6; }
#exRoot .ex-bc span { font-size: 11px; color: var(--muted); white-space: nowrap; }
#exRoot .ex-cust { display: inline-flex; align-items: center; gap: 6px; }
@media (min-width: 769px) {   /* 桌面右栏吸顶 + 动作条吸底: 详情再长「通过」也在首屏; 提醒卡让到右栏 / 抽屉左边 */
  #exRoot .ex-side { position: sticky; top: 8px; align-self: flex-start; max-height: calc(100vh - 16px); overflow: auto; }
  #exRoot .ex-side .ex-acts { position: sticky; bottom: 0; z-index: 1; }
  body:has(#exRoot.ex-open) .chat-corner, body:has(#exDrawer:not([hidden])) .chat-corner { right: 470px; }
}
/* 手机(A/B/C 板): 列表 / 表单 / 详情一屏一样, 底栏 du-mbar 坐在 #mobileTabs 上方 */
@media (max-width: 768px) {
  #exRoot { gap: 10px; padding: 0 12px 150px; }
  #exRoot > :not(.du-head):not(.ex-drawer):not(.du-mbar), #exRoot .ex-stats > :not(.du-head) { margin-left: 0; margin-right: 0; }
  #exRoot .ex-head .du-search { width: 100%; }
  #exRoot .ex-dt { display: none; }
  #exRoot .ex-mo { display: flex; }
  #exRoot .ex-tiles { flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  #exRoot .ex-msum { gap: 8px; }
  #exRoot .ex-msum > div { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
  #exRoot .ex-msum span { font-size: 11.5px; color: var(--muted-2); }
  #exRoot .ex-msum b { font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; }
  #exRoot .ex-body { display: block; }
  #exRoot .ex-row { flex-direction: row; align-items: center; gap: 10px; padding: 7px 12px; }
  #exRoot .ex-rl { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
  #exRoot .ex-rl .l1 b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #exRoot .ex-amt { flex: none; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
  #exRoot .ex-amt.dim { color: var(--muted); }
  #exRoot .ex-amt.del { color: var(--muted); text-decoration: line-through; }
  #exRoot.ex-open > .ex-head, #exRoot.ex-open > .ex-tiles, #exRoot.ex-open > .ex-msum, #exRoot.ex-open > .ex-mbar, #exRoot.ex-open .ex-listwrap { display: none; }
  #exRoot .ex-side { gap: 10px; border: 0; border-radius: 0; background: none; }
  #exRoot .ex-phead { padding: 0; border: 0; }
  #exRoot .ex-card, #exRoot .ex-rej, #exRoot .ex-note { margin: 0; }
  #exRoot .ex-hint { padding: 0 4px; }
  #exRoot .ex-acts { flex-wrap: nowrap; padding: 8px 12px; }
  #exRoot .ex-acts .ex-cancel, #exRoot .ex-acts .ex-no { flex: 0 0 96px; }
  #exRoot .ex-g3s { grid-template-columns: minmax(0, 1fr); }
  #exRoot .ex-thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  #exRoot .ex-dhead, #exRoot .ex-dbody, #exRoot .ex-dfoot { padding-left: 14px; padding-right: 14px; }
  body.rail-off #exRoot { padding-bottom: 80px; }   /* 无侧栏角色(driver 等)没有 #mobileTabs(styles.css rail-off), 底栏贴底 */
  body.rail-off #exRoot .du-mbar { bottom: env(safe-area-inset-bottom, 0px); }
}
