:root{
  /* v0.8.43 视觉重做：A 骨架（圆角 12 / 双层投影 / 更松的行高）+ B 配色（深色侧栏 + 橙红强调）。
   * 只改视觉层，不动尺寸与布局：.btn 仍是 40/30 高、表格列宽不动，所以既有适配规则全部继续有效。
   * 强调色从深海军蓝换成橙红 #e04a2f，与公司 logo 的暖调呼应；侧栏压成近黑 #16181d，
   * 导航从内容区里"退出去"，眼睛先落在数据上。 */
  --bg:#f5f6f8;
  --panel:#ffffff;
  --panel-2:#f7f8fa;
  --ink:#16171b;
  --tx:#16171b;          /* 历史别名：早先有 10 处写 var(--tx) 却没定义，声明被静默丢弃，这里补齐 */
  --sub:#5f6675;
  --mute:#8d94a2;
  --line:#e6e8ed;
  --line-2:#f0f1f5;
  --brand:#e04a2f;
  --brand-2:#c33c23;
  --blue:#c33c23;        /* 历史别名，同上，随品牌色走 */
  --brand-soft:#fdefeb;
  --amber:#96610a;
  --amber-soft:#fdf5e5;
  --red:#c02b1b;
  --red-soft:#fdecea;
  --green:#0b7355;
  --green-soft:#e7f5f0;
  --radius:12px;
  --shadow:0 1px 2px rgba(16,24,40,.04),0 10px 26px -18px rgba(16,24,40,.22);
  /* 侧栏（深色） */
  --side:#16181d;
  --side-ink:#b6bdcb;
  --side-dim:#5d6373;
  --side-line:rgba(255,255,255,.075);
  --side-on:rgba(255,255,255,.085);
  /* 图标：24 网格、1.7 描边、currentColor 由 mask 着色（见文件末尾「图标」一节） */
}
*{box-sizing:border-box}
/* 整页横向滑动一律禁止：手机上手指一歪整页跟着平移，固定顶栏与内容就"错位"，松手才回弹。
   真正需要横滚的地方（表格 .tb-wrap、标签条 .tabs/.seg2）自己显式 overflow-x:auto。 */
html,body{margin:0;padding:0;max-width:100%;overflow-x:hidden;overscroll-behavior-x:none}
body{
  background:var(--bg);
  color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;
  font-size:14px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  -webkit-text-size-adjust:100%;
}
button,input,select,textarea{font-family:inherit;font-size:inherit;color:inherit}
a{color:var(--brand-2);text-decoration:none}
.num{font-variant-numeric:tabular-nums;font-feature-settings:"tnum"}
/* 可点卡片（KPI 下钻）只在真的有内容时才是链接态；键盘 Tab 到达时给一圈可见焦点 */
.kpi-link{cursor:pointer}
.kpi-link:hover{border-color:#f2d5cb}
button:focus-visible,a:focus-visible,[role="button"]:focus-visible,.fchip:focus-visible,.pg-n:focus-visible,.pg-nav:focus-visible{outline:2px solid var(--brand-2);outline-offset:2px}
.hide{display:none!important}

/* ---------- 登录 ---------- */
/* 品牌底色对齐公司 logo：深海军蓝对角渐变（左上亮、右下沉），与「晶」字标同源 */
.login-wrap{min-height:100vh;display:grid;grid-template-columns:1.05fr .95fr}
.login-side{background:linear-gradient(135deg,#2a2d34 0%,#1c1e24 45%,#12141a 100%);color:#fff;padding:56px 52px;display:flex;flex-direction:column;justify-content:space-between;position:relative;overflow:hidden}
.login-side:after{content:"";position:absolute;right:-140px;bottom:-160px;width:520px;height:520px;border-radius:50%;background:radial-gradient(circle,rgba(224,74,47,.30) 0%,rgba(224,74,47,.10) 45%,transparent 70%);pointer-events:none}
.login-side:before{content:"";position:absolute;right:56px;top:64px;width:150px;height:96px;opacity:.16;pointer-events:none;
  background:
    linear-gradient(#fff,#fff) 0 78px/28px 18px no-repeat,
    linear-gradient(#fff,#fff) 40px 52px/28px 44px no-repeat,
    linear-gradient(#fff,#fff) 80px 26px/28px 70px no-repeat;
  /* 呼应公司 logo 的柱状图意象 */
}
.login-brand{display:flex;align-items:center;gap:10px;font-size:15px;letter-spacing:.5px}
/* 登录页品牌：白底小方块托住正式 logo，深蓝底上才看得清（透明图直接贴深蓝会糊） */
.login-mark{width:30px;height:30px;border-radius:7px;background:#fff;display:grid;place-items:center;overflow:hidden}
.login-mark img{width:22px;height:22px;display:block}
.login-title{font-size:32px;line-height:1.35;font-weight:500;margin:0 0 16px;letter-spacing:-.5px}
.login-desc{color:rgba(255,255,255,.72);font-size:14px;max-width:400px;line-height:1.8}
.login-feats{margin-top:34px;display:grid;gap:14px;max-width:400px}
.login-feat{display:flex;gap:11px;align-items:flex-start;font-size:13px;color:rgba(255,255,255,.82)}
.login-feat i{width:5px;height:5px;border-radius:50%;background:#f2684a;margin-top:8px;flex:0 0 auto}
.login-foot{font-size:12px;color:rgba(255,255,255,.45)}
.login-main{display:grid;place-items:center;padding:40px}
.login-card{width:100%;max-width:360px}
.login-card h2{font-size:20px;font-weight:500;margin:0 0 6px}
.login-card p.tip{color:var(--sub);font-size:13px;margin:0 0 26px}
.seg{display:flex;gap:0;border-bottom:1px solid var(--line);margin-bottom:22px}
.seg button{background:none;border:none;padding:9px 2px;margin-right:22px;color:var(--sub);cursor:pointer;border-bottom:2px solid transparent;font-size:13px}
.seg button.on{color:var(--brand);border-bottom-color:var(--brand);font-weight:500}
.field{margin-bottom:14px}
.field label{display:block;font-size:12px;color:var(--sub);margin-bottom:6px}
.field input{width:100%;max-width:100%;min-width:0;height:40px;border:1px solid var(--line);border-radius:8px;padding:0 12px;background:#fff;outline:none;transition:border-color .15s,box-shadow .15s}
.field input:focus{border-color:var(--brand-2);box-shadow:0 0 0 3px rgba(224,74,47,.1)}
.field .row{display:flex;gap:8px}
.field .row input{flex:1}
.btn{height:40px;border-radius:8px;border:1px solid transparent;padding:0 16px;cursor:pointer;font-size:13px;font-weight:500;transition:background .15s,opacity .15s;display:inline-flex;align-items:center;justify-content:center;gap:6px;white-space:nowrap}
.btn-primary{background:var(--brand);color:#fff;width:100%}
.btn-primary:hover{background:#c33c23}
.btn-primary:disabled{opacity:.55;cursor:not-allowed}
.btn-ghost{background:#fff;border-color:var(--line);color:var(--ink)}
.btn-ghost:hover{background:var(--panel-2)}
.btn-sm{height:30px;padding:0 10px;font-size:12px;border-radius:7px}
.btn-danger{background:var(--red-soft);color:var(--red);border-color:#f4c9c4}
.btn-soft{background:var(--brand-soft);color:var(--brand-2);border-color:#f6d5cb}
.err{color:var(--red);font-size:12px;margin-top:8px;min-height:18px}
.sms-btn{flex:0 0 104px;height:40px;border-radius:8px;border:1px solid var(--line);background:#fff;cursor:pointer;font-size:12px;color:var(--brand-2)}
.sms-btn:disabled{color:var(--mute);cursor:not-allowed}

/* ---------- 壳层 ---------- */
.shell{display:grid;grid-template-columns:212px 1fr;min-height:100vh}
.side{background:var(--side);border-right:1px solid #23262d;display:flex;flex-direction:column;position:sticky;top:0;height:100vh;scrollbar-width:thin;scrollbar-color:#3a3f49 transparent}
.side-brand{padding:20px 18px 16px;display:flex;align-items:center;gap:10px;border-bottom:1px solid var(--side-line)}
.side-mark{width:27px;height:27px;border-radius:8px;background:linear-gradient(135deg,#f2684a,#c33c23);color:#fff;display:grid;place-items:center;font-size:12px;font-weight:500;box-shadow:0 4px 12px -6px rgba(224,74,47,.9)}
.side-brand b{font-size:13.5px;font-weight:500;letter-spacing:.2px;color:#fff}
.side-brand span{display:block;font-size:10px;color:#6b7280;letter-spacing:.8px;margin-top:-1px}
.nav{padding:12px 10px;flex:1;overflow:auto}
.nav-group{font-size:10.5px;color:var(--side-dim);padding:12px 10px 6px;letter-spacing:.7px}
.nav a{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:8px;color:var(--side-ink);font-size:13px;margin-bottom:1px;position:relative;transition:background .14s,color .14s}
.nav a:hover{background:rgba(255,255,255,.055);color:#e8ebf0}
.nav a.on{background:var(--side-on);color:#fff;font-weight:500}
.nav a.on:after{content:"";position:absolute;left:-10px;top:6px;bottom:6px;width:3px;border-radius:0 3px 3px 0;background:var(--brand)}
/* 导航前的小圆点已由图标取代（v0.8.43）。元素仍在 DOM 里，隐藏而不删：
 * 删掉要改 main.js 的模板，而这里只要一行 CSS，回归面小得多。 */
.nav a .dot{display:none}
.nav a .cnt{margin-left:auto;background:rgba(224,74,47,.18);color:#ff947c;font-size:11px;padding:0 6px;border-radius:9px;line-height:17px;font-variant-numeric:tabular-nums}
.nav a.on .cnt{background:var(--brand);color:#fff}
.side-user{border-top:1px solid var(--side-line);padding:12px 14px;display:flex;align-items:center;gap:9px}
.avatar{width:30px;height:30px;border-radius:50%;background:rgba(224,74,47,.18);color:#ff947c;display:grid;place-items:center;font-size:12px;font-weight:500;flex:0 0 auto}
.side-user .nm{font-size:12.5px;line-height:1.3;color:#e8ebf0}
.side-user .rl{font-size:11px;color:#6b7280}
.side-user button{margin-left:auto;background:none;border:none;color:#6b7280;cursor:pointer;font-size:11px;padding:4px}
.side-user button:hover{color:#ff7a5e}

.main{min-width:0;display:flex;flex-direction:column}
.topbar{height:58px;background:rgba(255,255,255,.92);backdrop-filter:saturate(180%) blur(8px);-webkit-backdrop-filter:saturate(180%) blur(8px);border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 24px;gap:14px;position:sticky;top:0;z-index:20}
.topbar h1{font-size:15px;font-weight:500;margin:0}
.topbar .crumb{color:var(--mute);font-size:12px}
.topbar .right{margin-left:auto;display:flex;align-items:center;gap:10px;font-size:12px;color:var(--sub)}
/* 测试期身份切换器 */
.act-bar{margin-left:auto;display:flex;align-items:center;gap:7px;font-size:12px;flex:0 1 auto;min-width:0}
.act-bar .act-tag{font-size:11px;padding:2px 7px;border-radius:5px;background:var(--brand-soft);color:var(--brand);white-space:nowrap;font-weight:500}
.act-bar.on .act-tag{background:var(--red-soft);color:var(--red)}
.act-sel{height:28px;border:1px solid var(--line);border-radius:7px;background-color:#fff;font-size:12px;padding:0 20px 0 6px;max-width:280px;color:var(--ink);font-family:inherit;min-width:0}
.act-bar.on .act-sel{border-color:#e7b4ae;background:#fff}
.act-bar button{height:26px;padding:0 8px;font-size:11.5px;border:1px solid var(--line);background:#fff;border-radius:6px;cursor:pointer;color:var(--sub);font-family:inherit}
.act-bar.on{padding:3px 7px;border-radius:8px;background:var(--red-soft);border:1px solid #f3c9c4}
.topbar .right{margin-left:10px}
.view{padding:22px 24px 56px;max-width:1440px;width:100%}

/* ---------- 通用 ---------- */
.card{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
/* 卡片内的第一/最后一个子元素贴边时，别让内边距与圆角打架 */
.card>*:first-child{border-top-left-radius:var(--radius);border-top-right-radius:var(--radius)}
.card-h{padding:14px 16px;border-bottom:1px solid var(--line-2);display:flex;align-items:center;gap:10px}
.card-h h3{margin:0;font-size:13.5px;font-weight:500}
.card-h .sub{font-size:11.5px;color:var(--mute)}
.card-h .right{margin-left:auto;display:flex;gap:8px;align-items:center}
.card-b{padding:16px}
/* 卡片体里用内联 display:grid 做单列堆叠时，轨道必须显式 minmax(0,1fr)：
   默认 auto 轨道按 max-content 定宽，一条 nowrap 的长合同名/长编号就能把整张卡
   乃至整个弹窗撑出可视区，手机上表现为「整块内容跟着横滑、左侧标签被切掉」。 */
.card-b[style*="display:grid"]{grid-template-columns:minmax(0,1fr)}
.grid{display:grid;gap:14px}
/* 网格子项必须能收缩：`1fr` 轨道的自动最小尺寸是子项的 min-content，
 * 一整条「待签合同的请购 · 128,000.00 元 · PR-2026-1104 等」就是 426px，
 * 在 390 的手机上把整张卡撑出可视区、右边被切掉 48px（只有采购岗的待办卡会踩到，
 * 因为只有他会渲染这条长句）。给子项补 min-width:0，轨道才肯让路。 */
.grid>*{min-width:0}
.g6{grid-template-columns:repeat(3,1fr)}
.g5{grid-template-columns:repeat(5,1fr)}
.g4{grid-template-columns:repeat(4,1fr)}
.g3{grid-template-columns:repeat(3,1fr)}
.g2{grid-template-columns:repeat(2,1fr)}
@media(max-width:1320px){.g5{grid-template-columns:repeat(3,1fr)}}
@media(max-width:1100px){.g4{grid-template-columns:repeat(2,1fr)}.g5{grid-template-columns:repeat(2,1fr)}.g6{grid-template-columns:repeat(2,1fr)}.g3,.g2{grid-template-columns:1fr}}
/* 五张卡在窄屏落成 2 列时，第 5 张会孤零零占半行——单数个时让最后一张铺满整行，
 * 否则右边留一块空白，看着像少渲染了一张。 */
@media(max-width:1100px){.g5>.kpi:last-child:nth-child(odd){grid-column:1/-1}}

.kpi{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:15px 16px;box-shadow:var(--shadow)}
.kpi .lab{font-size:11.5px;color:var(--sub);display:flex;align-items:center;gap:6px}
.kpi .val{font-size:23px;font-weight:500;letter-spacing:-.4px;margin-top:7px;line-height:1.15}
.kpi .val small{font-size:12px;font-weight:400;color:var(--mute);margin-left:3px;letter-spacing:0}
.kpi .foot{font-size:11.5px;color:var(--mute);margin-top:6px;display:flex;gap:8px;align-items:center}
.tag{display:inline-flex;align-items:center;gap:4px;font-size:11px;padding:1px 7px;border-radius:20px;line-height:18px;white-space:nowrap}
.tag-gray{background:#f1f3f6;color:var(--sub)}
.tag-blue{background:#e8f0fb;color:#2f5a8f}
.tag-amber{background:var(--amber-soft);color:var(--amber)}
.tag-red{background:var(--red-soft);color:var(--red)}
.tag-green{background:var(--green-soft);color:var(--green)}

table.tb{width:100%;border-collapse:collapse;font-size:13px}
table.tb th{text-align:left;font-weight:500;color:var(--sub);font-size:11.5px;padding:9px 12px;background:var(--panel-2);border-bottom:1px solid var(--line);white-space:nowrap}
table.tb td{padding:10px 12px;border-bottom:1px solid var(--line-2);vertical-align:middle}
table.tb tr:last-child td{border-bottom:none}
table.tb tbody tr:hover{background:#fbfcfd}
/* 整行可点开单据的行，给出可点击暗示 */
table.tb tbody tr[data-row]{cursor:pointer}
table.tb tbody tr[data-row]:hover{background:#f4f8ff}
table.tb td.r,table.tb th.r{text-align:right}
table.tb .pname{font-weight:500;color:var(--ink)}
/* 事由格里的票据入口：审核人不必进详情就能逐张看凭证 */
.pname-t{display:block}
.row-att{
  display:inline-flex;align-items:center;gap:3px;margin-top:5px;
  padding:1px 7px;border:1px solid #cfe0f3;border-radius:20px;
  background:#fdf5f2;color:var(--brand-2);
  font-size:11px;font-weight:400;line-height:1.6;letter-spacing:.2px;
  font-family:inherit;appearance:none;-webkit-appearance:none;
  cursor:pointer;white-space:nowrap;
}
.row-att .arw{font-size:12px;line-height:1;opacity:.7}
.row-att:hover{background:#fbe6df;border-color:#efc9bd}
.row-att:active{transform:scale(.97)}
.row-att:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.row-att.none{border-color:var(--line);background:transparent;color:var(--mute);cursor:default}
.row-att.none:hover{background:transparent;border-color:var(--line)}
table.tb .pcode{font-size:11px;color:var(--mute);font-variant-numeric:tabular-nums}
/* 合同台账里的项目编号是通往项目详情的入口，但别做成蓝色下划线抢视线 */
table.tb a.pcode{display:inline-block;text-decoration:none;border-bottom:1px dashed var(--line)}
table.tb a.pcode:hover{color:var(--brand-2);border-bottom-color:var(--brand-2)}
.tb-wrap{overflow:auto}
/* 详情页返回：桌面与手机都要有。早先只在窄屏显示，PC 上进了详情就只能靠侧栏重进列表。 */
.back-link{
  display:inline-flex;align-items:center;gap:6px;margin-bottom:12px;
  height:30px;padding:0 12px 0 10px;border:1px solid var(--line);border-radius:7px;
  background:#fff;font-size:12.5px;color:var(--sub);text-decoration:none;box-shadow:var(--shadow);
  transition:background .15s,border-color .15s,color .15s;
}
.back-link:hover{color:var(--brand);border-color:#f2d5cb;background:var(--brand-soft)}
.clickable{cursor:pointer}
/* 手机端防双击放大：浏览器对快速连点（双击）默认触发页面缩放，操作表格时极易误触。
   touch-action:manipulation 只禁双击缩放，保留滚动与捏合缩放；配合 viewport 的
   user-scalable=no 双保险，同时消除 iOS 上 input 聚焦时 font<16px 的自动放大。 */
*{touch-action:manipulation}
.tb tbody tr.clickable:active{background:var(--brand-soft)}
/* 刚保存的那一行：闪一下让人看见「我这一笔进去了」，4s 后自动褪去，不做成常驻高亮 */
.tb tbody tr.row-focus>td{background:#fff4d6;box-shadow:inset 0 0 0 9999px rgba(255,214,102,.28);transition:background .4s}
.tb tbody tr.row-focus>td:first-child{box-shadow:inset 3px 0 0 var(--amber),inset 0 0 0 9999px rgba(255,214,102,.28)}
/* 表格里的按钮必须自适应宽度。.btn-primary 默认 width:100% 是给表单/弹窗整行按钮用的，
   落进单元格会跟着列宽被拉成一大块深色砖头（报销审批列曾如此），高度也会被撑开。
   行内操作统一用 .row-acts 按钮组，间距由容器给，不靠空格。 */
.tb td .btn,.tb th .btn{width:auto}
/* 不许折行的三类单元格：金额/日期（.num）、状态标签、项目编号。
   之前列被长文本挤窄后，「2026-10」被拆成「2026-」「10」，「在建」竖着排，
   表格看起来像没做完。列宽不够时让表格整体横滚，比拆字好读。 */
.tb td.num,.tb th.num{white-space:nowrap}
.tb .tag{white-space:nowrap}
.tb td .pcode{white-space:nowrap}
/* 项目编号下面那行项目名：一行显示不下就省略，别再折成三行把行高撑开 */
.tb td .pcode+div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:180px}
/* 长文本收口（v0.8.47）：不在数据层 slice 字符串——切完看不出后面还有字，
   「特来电充电项目年度劳务合同」被切成「…劳务合」，读的人以为数据错了。
   桌面本行放不下用省略号、title 看全文；手机卡片本来就窄，整段换行给全。 */
.tb td .clip{display:inline-block;max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom}
.tb td .clip2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;white-space:normal}
/* 防止 nowrap 把「主文本列」挤成竖排：事由/项目/说明给足最小宽度，整体放不下就横滚 */
.tb th[data-sk="title"]{min-width:170px}
.tb th[data-sk="proj"]{min-width:110px}
.tb th[data-sk="desc"]{min-width:160px}
.row-acts{display:inline-flex;gap:6px;align-items:center;white-space:nowrap}
.row-acts .btn{width:auto}
/* 表格内的合计/小计行 */
table.tb tr.sum-row td{background:var(--panel-2);font-weight:500;border-top:1px solid var(--line)}
table.tb tr.sum-row td .num{font-weight:500}
/* 表格里的迷你占比条（比 hbars 紧凑，用于透视表） */
.sbar{display:flex;align-items:center;gap:7px;min-width:96px}
.sbar .sbar-t{flex:1;height:6px;border-radius:3px;background:#eef1f5;overflow:hidden;min-width:40px}
.sbar .sbar-t i{display:block;height:100%;border-radius:3px;background:var(--brand-2)}
.sbar .sbar-v{font-size:11.5px;color:var(--sub);font-variant-numeric:tabular-nums;min-width:38px;text-align:right}

/* ---------- 分页条 ----------
   上千行的台账不翻页就只能靠浏览器滚动，回到顶部/跳到某页都得重新找位置。
   页码只渲染当前页左右各 2 页，长列表也不会把工具条撑爆。 */
.pager{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:10px 14px;border-top:1px solid var(--line-2);font-size:12px;color:var(--sub)}
.pager .pg-info{margin-right:auto}
.pager .pg-info b{color:var(--ink);font-weight:500}
.pg-nav,.pg-n{height:26px;min-width:26px;padding:0 8px;border:1px solid var(--line);border-radius:6px;background:#fff;color:var(--sub);font-size:12px;cursor:pointer;line-height:1.3}
.pg-nav:hover:not(:disabled),.pg-n:hover{color:var(--brand);border-color:#f2d5cb}
.pg-nav:disabled{opacity:.45;cursor:default}
.pg-nums{display:inline-flex;align-items:center;gap:4px}
.pg-n.on{background:var(--brand);border-color:var(--brand);color:#fff;font-weight:500}
.pg-gap{color:var(--mute);padding:0 1px}
/* 每页条数 / 顶栏切换身份：两个不走 .inp 的原生下拉，统一自绘箭头 */
.pg-size,.act-sel{appearance:none;-webkit-appearance:none;background:#fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238a94a3' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 7px center;cursor:pointer}
.pg-size{height:26px;border:1px solid var(--line);border-radius:6px;background-color:#fff;padding:0 20px 0 6px;font-size:12px;color:var(--sub)}

.bar{height:5px;border-radius:3px;background:#eef1f5;overflow:hidden;min-width:56px}
.bar i{display:block;height:100%;border-radius:3px;background:var(--brand-2)}
.bar i.warn{background:#d99a2b}
.bar i.over{background:var(--red)}
.pos{color:var(--red)}
.neg{color:var(--green)}
.toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:14px}
.toolbar .sp{margin-left:auto}
/* 筛选控件带：桌面与搜索、按钮同排平铺；手机上单独成一条可横滑的带（见窄屏规则） */
.toolbar .tb-filters{display:flex;gap:8px;align-items:center;flex-wrap:wrap;min-width:0}
/* 工具条右侧动作组：筛选 / 导出 / 新建，位置固定，不随页签宽度漂移 */
.t-acts{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.t-acts .btn{width:auto}
/* 筛选按钮上「有几个条件在生效」的小圆点 */
.t-acts .btn{position:relative}
/* 卡片头右侧的按钮也要自己的定位上下文，否则计数徽标会飘到外层容器上 */
.card-h .right .btn{position:relative}
/* 筛选按钮上的「条件计数」徽标。
   原来是个 7px 纯色圆点，只表示「有」，不表示「几个」——用户读出来的意思是
   「有新内容 / 未读」，和「筛选已生效」完全不搭。改成带数字的徽标后自解释。 */
.fdot{position:absolute;top:-5px;right:-5px;min-width:14px;height:14px;padding:0 4px;box-sizing:border-box;border-radius:999px;background:var(--brand);color:#fff;font-size:9.5px;font-weight:600;font-style:normal;line-height:14px;text-align:center;letter-spacing:0;box-shadow:0 0 0 2px #fff}

/* ---------- 可折叠筛选面板（报销列表；同一套也用于其它带筛选的列表） ---------- */
.fpanel{background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow);padding:12px 14px;margin-bottom:12px}
.fpanel[hidden]{display:none}
.fp-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;min-height:30px}
/* 单一取值维度整行不渲染（元素上带 hidden，display:flex 会盖掉 UA 的隐藏） */
.fp-row[hidden]{display:none}
.fp-row+.fp-row{margin-top:9px;padding-top:9px;border-top:1px dashed var(--line-2)}
.fp-l{flex:0 0 52px;font-size:11.5px;color:var(--mute);letter-spacing:.2px}
.fchips{display:flex;flex-wrap:wrap;gap:6px;min-width:0}
.fchip{height:28px;padding:0 12px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--sub);font-size:12.5px;line-height:1;font-family:inherit;font-weight:400;cursor:pointer;transition:background .12s,border-color .12s,color .12s}
.fchip:hover{border-color:var(--brand-2);color:var(--ink)}
.fchip.on{background:var(--brand-soft);border-color:var(--brand-2);color:var(--brand);font-weight:500}
.fp-sel{width:auto;min-width:132px;max-width:220px;height:28px;font-size:12.5px;color:var(--ink)}
.fp-dates{display:flex;align-items:center;gap:6px;min-width:0;flex:1 1 240px;max-width:340px}
.fp-dates .inp{flex:1 1 0;min-width:0;height:28px;font-size:12.5px;padding:0 8px}
.fp-to{flex:0 0 auto;font-size:11.5px;color:var(--mute)}
.fp-foot{display:flex;align-items:center;gap:10px;margin-top:11px;padding-top:10px;border-top:1px solid var(--line-2)}
.fp-hint{flex:1;min-width:0;font-size:11.5px;color:var(--mute);line-height:1.6}
.fp-foot .btn{width:auto;flex:0 0 auto}

/* 合同台账的节点条：逾期/临期筛选，与列表头同一条视觉层级 */
.ct-nodebar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:9px 14px;border-bottom:1px solid var(--line-2)}
.ct-nodebar .fp-hint{flex:1 1 auto;min-width:0;text-align:right}
/* 搜索框与节点 chips 同一行：chips 可换行，搜索框吃掉剩余宽度但不抢走整行 */
.ct-nodebar .search{flex:0 1 260px;min-width:170px;height:30px}

/* 列表头条：合计口径 + 右侧操作键（筛选/导出/全选） */
.list-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 14px;border-bottom:1px solid var(--line-2);font-size:12px;color:var(--sub);line-height:1.6}
.list-head #sum,.list-head #evsum{flex:1 1 auto;min-width:0}
.list-head .lh-acts{display:flex;align-items:center;gap:8px;flex:0 0 auto;margin-left:auto}
.list-head .lh-acts .btn{width:auto;position:relative}
.list-head .m-only{display:none}

/* 批量操作条：桌面在表格下方，手机吸底 */
.batch-bar{display:none;padding:9px 14px;border-top:1px solid var(--line-2);font-size:12.5px;color:var(--ink)}
.batch-bar.on{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.batch-bar .bb-txt{flex:1 1 auto;min-width:0}
.batch-bar .bb-sub{color:var(--sub);font-size:11.5px;margin-left:8px}
.batch-bar .bb-acts{display:flex;align-items:center;gap:8px;flex:0 0 auto;flex-wrap:wrap}
.batch-bar .btn{width:auto}

/* 确认付款弹窗里的单据清单 */
.pay-list{margin-top:10px;border:1px solid var(--line-2);border-radius:9px;max-height:240px;overflow:auto}
.pay-row{display:flex;align-items:center;gap:10px;padding:7px 11px;font-size:12.5px}
.pay-row+.pay-row{border-top:1px solid var(--line-2)}
.pay-row .no{flex:0 0 auto;color:var(--sub);font-variant-numeric:tabular-nums}
.pay-row .nm{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pay-row .num{flex:0 0 auto;font-weight:500}

/* 勾选列：桌面与手机都可用（手机把它做成卡片右上角的勾选圈） */
.cb-col{white-space:nowrap}
.cb-col input{width:15px;height:15px;accent-color:var(--brand);margin:0;cursor:pointer;vertical-align:middle}
.search{height:32px;border:1px solid var(--line);border-radius:7px;padding:0 10px;background:#fff;min-width:190px;outline:none}
.search:focus{border-color:var(--brand-2)}
/* 占位文字统一退到次级灰、不随输入值加粗，避免筛选区看起来「一把粗黑字」 */
input::placeholder,textarea::placeholder,.search::placeholder{color:var(--mute);font-weight:400;font-size:12.5px;opacity:1}
/* min-width/max-width 一起锁：下拉的固有宽度由最长选项决定（macOS 上尤其宽），
   只写 width:100% 挡不住它把父容器顶开。 */
select.inp,input.inp,textarea.inp{height:32px;border:1px solid var(--line);border-radius:7px;padding:0 9px;background:#fff;outline:none;width:100%;min-width:0;max-width:100%;color:var(--ink);font-weight:400}
textarea.inp{height:auto;padding:8px 9px;resize:vertical;min-height:64px;line-height:1.6}
/* 所有下拉统一自绘箭头：原生箭头在 macOS/Windows 里高低粗细不一，跟 32px 控件高度也对不齐。
   箭头画在右侧 9px 处，文字区留出 26px，长选项省略不压箭头。 */
select.inp{appearance:none;-webkit-appearance:none;-moz-appearance:none;background:#fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238a94a3' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 9px center;padding-right:26px;cursor:pointer;text-overflow:ellipsis}
select.inp:hover,input.inp:hover,textarea.inp:hover,.search:hover{border-color:#ecd5ce}
/* 悬停要放在 :focus 规则之前：聚焦时仍以品牌色聚焦环为准 */
select.inp:focus,input.inp:focus,textarea.inp:focus{border-color:var(--brand-2);box-shadow:0 0 0 3px rgba(224,74,47,.08)}
select.inp:disabled,input.inp:disabled,textarea.inp:disabled,.search:disabled{background:var(--panel-2);color:var(--mute);border-color:var(--line-2);cursor:not-allowed}
/* 只读回显（系统发号的编号、算出来的金额）：浅底表示「不能填」，但文字保持正常对比度
 * —— 用 :disabled 会把编号淡成灰字，看单号时反而费劲。 */
input.inp[readonly]{background:var(--panel-2);color:var(--tx);border-color:var(--line-2);cursor:default}
input.inp[readonly]:focus{border-color:var(--line-2);box-shadow:none}
/* 勾选/单选统一主题色，不再各写一遍 */
input[type=checkbox],input[type=radio]{accent-color:var(--brand)}
/* 分组标题在下拉里退一级灰，跟选项区分层次 */
select.inp optgroup{font-size:12px;color:var(--sub)}
/* 列宽用 minmax(0,1fr) 而不是 1fr：grid 轨道的 1fr 最小尺寸是 auto，
   会被子内容的 min-content 顶开。微信/企微把字号调大后，表单里一行提示
   （如「不含税合同额约 X · 计划毛利率 Y」）的整段文字就能把单列撑到 960px，
   表现是弹窗左右两侧内容都被切掉、要横着划才能看全。 */
.form-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px 14px}
.form-grid>*{min-width:0}
.form-grid .full{grid-column:1/-1}
.f{display:block;min-width:0}
.f>span{display:block;font-size:11.5px;color:var(--sub);margin-bottom:5px}
.f>span em{color:var(--red);font-style:normal}
/* 报销事由：输入框 + 「重新生成」，手机上也保持一行不换行 */
.title-row{display:flex;gap:8px;align-items:center}
.title-row .inp{flex:1;min-width:0}
.title-row .btn{flex:0 0 auto;white-space:nowrap}
/* 说明文字允许在任意位置断行：默认中文能断，但混排的英文/编号/URL 不断，
   窄屏会把整段顶出容器。 */
.hint{font-size:11px;color:var(--mute);margin-top:4px;overflow-wrap:anywhere}
/* 报销类型卡片：下拉要展开才知道三个选项差在哪，选错就记错账，改成一屏可见的三选一 */
.etype{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.etype-card{position:relative;display:flex;flex-direction:column;gap:3px;padding:10px 11px;border:1px solid var(--line);border-radius:10px;background:#fff;cursor:pointer;transition:border-color .15s,background .15s,box-shadow .15s}
.etype-card:hover{border-color:#f0cfc5;background:var(--panel-2)}
.etype-card.on{border-color:var(--brand);background:var(--brand-soft);box-shadow:0 0 0 2px rgba(224,74,47,.09)}
.etype-card input{position:absolute;opacity:0;pointer-events:none}
.etype-card b{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:500;color:var(--ink);line-height:1.4}
.etype-card .s{font-size:11.5px;color:var(--sub);line-height:1.5}
.etype-card .to{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:2px}
.etype-card .to em{font-style:normal;font-size:10.5px;color:var(--brand-2);background:#fff;border:1px solid #f6d5cb;border-radius:6px;padding:0 5px;line-height:1.7}
.etype-card .to i{font-style:normal;font-size:10.5px;color:var(--mute)}
.etype-def{display:none;font-style:normal;font-size:10px;font-weight:400;color:#fff;background:var(--brand-2);border-radius:6px;padding:1px 5px;white-space:nowrap}
/* 只在「默认卡且当前选中」时露出来：切走之后还挂着标签会让人以为系统推荐的是另一张 */
.etype-card.on .etype-def{display:inline}
.etype-card[data-v="market"] .to em{color:var(--amber);border-color:#f0dcc0}
.etype-card[data-v="admin"] .to em{color:var(--sub);border-color:var(--line)}
@media (max-width:640px){
  .etype{grid-template-columns:minmax(0,1fr)}
  .etype-card{padding:9px 10px}
}

.empty{padding:44px 20px;text-align:center;color:var(--mute);font-size:13px}
.empty b{display:block;color:var(--sub);font-weight:500;margin-bottom:4px;font-size:13.5px}

/* 弹窗 */
.overlay{position:fixed;inset:0;background:rgba(17,24,39,.42);display:grid;grid-template-columns:minmax(0,1fr);place-items:center;z-index:100;padding:20px;overflow:auto}
.modal{background:#fff;border-radius:12px;width:100%;max-width:620px;min-width:0;box-shadow:0 12px 40px rgba(16,24,40,.18);max-height:92vh;display:flex;flex-direction:column}
.modal.wide{max-width:840px}
.modal-h{padding:16px 20px;border-bottom:1px solid var(--line-2);display:flex;align-items:center}
.modal-h h3{margin:0;font-size:14.5px;font-weight:500}
.modal-h button{margin-left:auto;background:none;border:none;font-size:19px;color:var(--mute);cursor:pointer;line-height:1;padding:0 2px}
/* 只允许纵向滚动：表单里任何一处内容超宽（长选项、长数字、长说明）都会被兜住，
   不会让整个弹窗变成"要横着划才看得全"——那样左右两侧的字都被切掉，最难用。 */
.modal-b{padding:18px 20px;overflow-y:auto;overflow-x:hidden}
.modal-f{padding:13px 20px;border-top:1px solid var(--line-2);display:flex;gap:8px;justify-content:flex-end}

/* 提示条放右上角：居中会压住弹窗标题（新建报销单时最明显） */
#toast-root{position:fixed;top:14px;right:16px;left:auto;transform:none;z-index:400;display:flex;flex-direction:column;gap:8px;align-items:flex-end;max-width:min(420px,calc(100vw - 32px));pointer-events:none}
.toast{background:#1f2937;color:#fff;padding:9px 15px;border-radius:8px;font-size:13px;line-height:1.6;box-shadow:0 6px 20px rgba(0,0,0,.18);animation:tin .18s ease;max-width:100%;pointer-events:auto}
.toast.ok{background:#0d5c3f}
.toast.bad{background:#8f1f16}
@keyframes tin{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}

/* 图表 */
.hbar{display:grid;grid-template-columns:150px 1fr 92px;gap:10px;align-items:center;padding:7px 0;font-size:12.5px}
.hbar .nm{color:#2c3644;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hbar .track{height:16px;background:#f2f4f7;border-radius:4px;overflow:hidden;position:relative}
.hbar .track i{display:block;height:100%;border-radius:4px;background:#3d7cbd}
.hbar .v{text-align:right;font-variant-numeric:tabular-nums;color:var(--sub)}
.legend{display:flex;gap:14px;flex-wrap:wrap;font-size:11.5px;color:var(--sub);margin-top:8px}
.legend i{display:inline-block;width:8px;height:8px;border-radius:2px;margin-right:5px}

.stat-row{display:flex;gap:26px;flex-wrap:wrap;padding:2px 0}
.stat{display:flex;flex-direction:column;gap:2px}
.stat .k{font-size:11px;color:var(--mute)}
.stat .v{font-size:16px;font-weight:500;font-variant-numeric:tabular-nums}

/* ---------- 分析：筛选条 ---------- */
.flt{display:flex;gap:8px;flex-wrap:wrap;align-items:center;background:#fff;border:1px solid var(--line);border-radius:10px;padding:9px 12px;margin-bottom:14px;box-shadow:var(--shadow);position:sticky;top:58px;z-index:6}
.flt .flt-l{font-size:11.5px;color:var(--mute)}
.flt .sp{flex:1;min-width:8px}
.flt select.inp{width:auto;min-width:104px;max-width:210px}
/* 筛选条里的按钮与 32px 控件同高，之前 btn-sm 30px 挂在行里差 2px，视觉上总像没对齐 */
.flt .btn{width:auto;height:32px}
/* 成本分析：期初（月初/季初/年初）没有记录时的智能提示条，暖色与校验提示区分 */
.an-empty{display:flex;align-items:center;gap:8px 10px;flex-wrap:wrap;border:1px solid #ecdcc3;background:linear-gradient(135deg,#fffaf3,#fdf7ec);border-radius:10px;padding:10px 14px;margin-bottom:14px}
.an-empty .t{font-size:13px;font-weight:500;color:#7a5a17}
.an-empty .s{font-size:12px;color:#9a8a63;flex:1 1 auto;min-width:0}
.an-empty .btn{width:auto;flex:0 0 auto}
.flt input[type=date]{height:32px;border:1px solid var(--line);border-radius:7px;padding:0 8px;background:#fff;font-size:12.5px;color:var(--ink);outline:none;font-family:inherit}
.flt input[type=date]:focus{border-color:var(--brand-2)}
.seg2{display:inline-flex;border:1px solid var(--line);border-radius:8px;overflow:hidden;background:#fff}
.seg2 button{border:none;background:none;padding:0 11px;height:32px;font-size:12.5px;color:var(--sub);cursor:pointer;border-right:1px solid var(--line-2);font-family:inherit}
.seg2 button:last-child{border-right:none}
.seg2 button.on{background:var(--brand-soft);color:var(--brand);font-weight:500}
.seg2 button:hover:not(.on){background:var(--panel-2)}
/* 台账页内「销售合同 / 成本合同」这类二级切换用胶囊样式，和顶层文字页签区分层次 */
.seg2-lead{margin-bottom:12px}

/* ---------- 分析：维度页签行与口径说明 ---------- */
/* 维度页签 + 笔数统计 + 只看有成本 是三种不同性质的东西，各自成套：
   桌面上排一行、靠 margin-left:auto 把开关推到右边；手机上页签自己横滑，其余折行。 */
.dim-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:16px 0 10px}
.dim-meta{font-size:11.5px;color:var(--mute)}
.dim-chk{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--sub);cursor:pointer;margin-left:auto;white-space:nowrap}
.dim-chk input{width:15px;height:15px;margin:0;accent-color:var(--brand);flex:none}
/* 合同维度的「全部/销售/成本」自己靠右（该维度没有开关占位） */
.dim-bar>.seg2{margin-left:auto}
.an-note{padding:10px 14px;border-top:1px solid var(--line-2);font-size:11.5px;color:var(--mute);line-height:1.7}
.caliber{font-size:12.5px;line-height:1.95;color:#2c3644}

/* ---------- 概览：合同资金与待办 ---------- */
.fund{display:grid;gap:14px}
.fund-t{display:flex;justify-content:space-between;align-items:baseline;font-size:12.5px;color:var(--sub);margin-bottom:6px;gap:8px}
.fund-t b{color:var(--ink);font-weight:500;font-variant-numeric:tabular-nums}
.fund-b{height:9px;border-radius:5px;background:#eef1f5;overflow:hidden}
.fund-b i{display:block;height:100%;border-radius:5px;background:var(--brand-2)}
.fund-b i.g{background:var(--green)}
.fund-f{font-size:11.5px;color:var(--mute);margin-top:5px}
/* ---------- 概览：公司资金面（经营视角第二排） ---------- */
.cash-row{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}
.cash-tile{border:1px solid var(--line);border-radius:10px;padding:11px 13px;min-width:0}
.cash-tile .ct-lab{font-size:11.5px;color:var(--sub);white-space:nowrap}
.cash-tile .ct-val{font-size:19px;font-weight:500;margin-top:3px;font-variant-numeric:tabular-nums}
.cash-tile .ct-foot{font-size:11px;color:var(--mute);margin-top:3px;line-height:1.5}
.cash-tile.cash-acts{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:7px}
@media (max-width:980px){.cash-row{grid-template-columns:repeat(2,1fr)}.cash-tile.cash-acts{grid-column:1 / -1}}
.todo-i{display:flex;align-items:center;gap:10px;padding:9px 0;border-bottom:1px solid var(--line-2);font-size:13px;cursor:pointer}
.todo-i:last-child{border-bottom:none}
.todo-i:hover{background:#fbfcfd}
.todo-i .t-ico{width:26px;height:26px;border-radius:7px;display:grid;place-items:center;font-size:11px;background:var(--panel-2);color:var(--sub);flex:0 0 auto}
.todo-i .t-nm{flex:1;min-width:0}
.todo-i .t-nm span{display:block;font-size:11.5px;color:var(--mute);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.todo-i .t-n{font-size:15px;font-weight:500;font-variant-numeric:tabular-nums;min-width:24px;text-align:right;color:var(--sub)}
.todo-i.hot .t-ico{background:var(--red-soft);color:var(--red)}
.todo-i.hot .t-n{color:var(--red)}
.dash-acts{display:flex;gap:8px;flex-wrap:wrap}
.dash-acts .btn{width:auto}

/* 概览「统计范围」条：数字变小必须有解释——排除几个、什么状态、多少合同额 */
.scope-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:8px 12px;margin-bottom:12px;background:var(--panel-2);border:1px solid var(--line);border-radius:10px}
.sb-lab{font-size:11.5px;color:var(--sub);font-weight:500}
.sb-chips{display:flex;gap:6px;flex-wrap:wrap}
.sb-note{flex:1 1 240px;min-width:0;font-size:11.5px;color:var(--mute);line-height:1.6}
.sb-note b{color:var(--ink);font-weight:500}
.scope-bar #sbPick{margin-left:auto}
/* 选项目面板 */
.sp-head{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;font-size:12px;color:var(--sub);margin-bottom:8px}
.sp-hint{font-size:11.5px;color:var(--mute)}
.sp-list{max-height:46vh;overflow:auto;border:1px solid var(--line);border-radius:10px}
.sp-row{display:grid;grid-template-columns:18px 96px minmax(0,1fr) 68px 82px;gap:8px;align-items:center;padding:8px 10px;border-bottom:1px solid var(--line-2);font-size:12.5px;cursor:pointer}
.sp-row:last-child{border-bottom:none}
.sp-row:hover{background:var(--brand-soft)}
.sp-row input{width:16px;height:16px;accent-color:var(--brand);margin:0}
.sp-code{color:var(--mute);font-variant-numeric:tabular-nums;white-space:nowrap}
.sp-nm{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sp-st{color:var(--sub);font-size:11.5px;white-space:nowrap}
.sp-amt{text-align:right;font-size:12px;white-space:nowrap}

/* 项目详情 */
.detail-h{display:flex;align-items:flex-start;gap:16px;margin-bottom:16px;flex-wrap:wrap}
.detail-h h2{margin:0 0 4px;font-size:19px;font-weight:500;letter-spacing:-.2px}
.detail-h .meta{font-size:12px;color:var(--sub);display:flex;gap:14px;flex-wrap:wrap}
.detail-h .acts{margin-left:auto;display:flex;gap:8px}
.tabs{display:flex;gap:2px;border-bottom:1px solid var(--line);margin-bottom:16px}
.tabs button{background:none;border:none;padding:9px 14px;color:var(--sub);cursor:pointer;font-size:13px;border-bottom:2px solid transparent;margin-bottom:-1px}
.tabs button.on{color:var(--brand);border-bottom-color:var(--brand);font-weight:500}
/* 台账聚合页：页签复用各页原有渲染函数，它们自带 .view 内边距，这里去掉避免双层留白；
 * 窄屏页签允许横向滑动（只滑页签条本身，不牵动整页） */
.ledger-body>.view{padding:0 0 56px}
#ltabs{overflow-x:auto;scrollbar-width:none}
#ltabs::-webkit-scrollbar{display:none}
#ltabs button{white-space:nowrap}
/* 页签上标件数（审核中心：待我审批 / 待审成本 / 我审核过的）：小一号、淡一点，
 * 免得数字把页签名压成主角 */
.tabs button .cnt{font-style:normal;margin-left:5px;font-size:11.5px;color:var(--mute);font-variant-numeric:tabular-nums}
.tabs button.on .cnt{color:var(--brand)}
/* 页签右侧的口径说明：桌面显示，手机让位给列表（页签名本身已经说清是哪一批） */
.tab-hint{font-size:11.5px;color:var(--mute)}
@media(max-width:640px){.tab-hint{display:none}}

/* AI */
.ai-wrap{padding:0 16px 14px}
.ai-scope{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px;color:var(--sub);padding:11px 0;border-bottom:1px solid var(--line-2);line-height:1.6}
.ai-scope .ai-badge{background:var(--brand-soft);color:var(--brand);border-radius:6px;padding:1px 7px;font-size:11.5px;font-weight:500}
.ai-scope .mute{color:var(--mute)}
.ai-scope .ai-sep{width:1px;height:12px;background:var(--line)}
.chat{display:flex;flex-direction:column;height:calc(100vh - 250px);min-height:380px;position:relative}
.chat-log{flex:1;overflow:auto;padding:12px 2px 6px;display:flex;flex-direction:column;gap:14px}
.msg{display:flex;gap:10px;max-width:86%}
.msg .av{width:26px;height:26px;border-radius:6px;display:grid;place-items:center;font-size:11px;flex:0 0 auto}
.msg.u{align-self:flex-end;flex-direction:row-reverse}
.msg.u .av{background:var(--brand);color:#fff}
.msg.a .av{background:var(--brand-soft);color:var(--brand)}
.msg .bd{background:#fff;border:1px solid var(--line);border-radius:10px;padding:10px 13px;font-size:13px;line-height:1.75;white-space:pre-wrap;word-break:break-word}
.msg.u .bd{background:var(--brand-soft);border-color:#d6e4f5}
.chat-in{display:flex;gap:8px;padding-top:12px;border-top:1px solid var(--line-2);margin-top:12px}
.chat-in input{flex:1;height:38px;border:1px solid var(--line);border-radius:8px;padding:0 12px;outline:none}
.chat-in input:focus{border-color:var(--brand-2)}
.chips{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:9px}
.chip{font-size:11.5px;padding:5px 11px;border:1px solid var(--line);border-radius:15px;background:#fff;cursor:pointer;color:var(--sub);transition:border-color .12s,color .12s,background .12s}
.chip:hover{border-color:var(--brand-2);color:var(--brand);background:var(--brand-soft)}
/* 问答进行中：引导按钮灰掉，避免连点堆出好几个「读取中」 */
.chip:disabled{opacity:.45;cursor:progress;background:#fff;border-color:var(--line);color:var(--mute)}
.chip:disabled:hover{border-color:var(--line);color:var(--mute);background:#fff}
/* 等待模型的气泡：正文 + 右侧「停止」，秒数写在正文里证明还活着 */
.msg.pending{align-items:flex-start}
.msg.pending .bd{color:var(--sub)}
.ai-think{color:var(--mute)}
/* 模型的思考过程：边思考边长字，正文一开始流就自动折叠，不把答案顶出屏幕 */
.ai-cot{margin:4px 0 2px;border:1px dashed var(--line);border-radius:8px;background:var(--panel-2);padding:6px 9px;font-size:12px;color:var(--mute)}
.ai-cot summary{cursor:pointer;color:var(--sub);font-size:11.5px;list-style:none}
.ai-cot summary::-webkit-details-marker{display:none}
.ai-cot summary:before{content:"▸ ";color:var(--mute)}
.ai-cot[open] summary:before{content:"▾ "}
.ai-cot-b{margin-top:5px;max-height:150px;overflow:auto;white-space:pre-wrap;line-height:1.7;color:var(--mute);font-size:11.5px}
.ai-ans:empty{display:none}
.ai-ans{white-space:pre-wrap}
/* 工具取数痕迹：一行一个「已查：xx · n 条」，让人看得见数字从哪来，不是模型编的 */
.ai-trace{margin:2px 0 6px;display:flex;flex-direction:column;gap:2px}
.ai-trace-i{font-size:11.5px;color:var(--mute);line-height:1.6}
.ai-trace-i:before{content:"· ";color:var(--brand-2)}
.ai-trace-i.bad{color:var(--red)}
.ai-stop{flex:0 0 auto;align-self:center;border:1px solid var(--line);background:#fff;color:var(--sub);font-size:11.5px;padding:3px 10px;border-radius:12px;cursor:pointer;font-family:inherit}
.ai-stop:hover{border-color:var(--red);color:var(--red)}
.ai-stop:disabled{opacity:.5;cursor:default}
.ai-retry{display:flex;justify-content:flex-start;padding-left:36px}

/* 输入区合成器：一个圆角容器装输入与工具，发送键固定在右下角 */
.composer{border:1px solid var(--line);border-radius:16px;background:#fff;padding:7px 10px 7px;transition:border-color .15s,box-shadow .15s}
.composer:focus-within{border-color:var(--brand-2);box-shadow:0 0 0 3px rgba(224,74,47,.1)}
.cmp-in{width:100%;border:none;outline:none;resize:none;font-size:13.5px;line-height:1.7;font-family:inherit;color:var(--tx);max-height:132px;padding:4px 2px;background:transparent;display:block}
.cmp-in::placeholder{color:var(--mute)}
.cmp-bar{display:flex;align-items:center;gap:8px;margin-top:2px}
.cmp-tools{display:flex;gap:6px}
.cmp-btn{display:inline-flex;align-items:center;gap:4px;height:28px;padding:0 9px;border-radius:14px;border:1px solid var(--line);background:#fff;color:var(--sub);font-size:12px;cursor:pointer;transition:border-color .12s,color .12s}
.cmp-btn:hover{border-color:#c9d7e8;color:var(--brand)}
.cmp-btn .at{font-weight:600;color:var(--brand-2)}
.cmp-hint{margin-left:auto;font-size:11px;color:var(--mute)}
.cmp-send{width:30px;height:30px;border-radius:50%;border:none;background:var(--brand);color:#fff;display:grid;place-items:center;cursor:pointer;flex:0 0 auto;transition:background .12s}
.cmp-send:disabled{background:#dfe4ea;cursor:not-allowed}
.cmp-send:not(:disabled):hover{background:#0e2f57}

/* ＠项目 选择面板 */
.pmenu{position:absolute;left:10px;right:10px;bottom:92px;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 30px rgba(16,24,40,.14);padding:8px;z-index:6}
.pmenu-list{max-height:220px;overflow:auto;margin-top:6px;display:grid;gap:2px}
.pm-item{display:flex;gap:8px;align-items:center;width:100%;text-align:left;border:none;background:none;padding:6px 8px;border-radius:7px;cursor:pointer;font-size:12.5px;color:var(--tx)}
.pm-item:hover{background:var(--brand-soft)}
.pm-code{color:var(--brand-2);flex:none;font-variant-numeric:tabular-nums}
.pm-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pm-empty{padding:8px;color:var(--mute);font-size:12px}

/* 合同登记面板：比 ＠项目 高，带文本框；[hidden] 必须显式写，
   否则上面的 display:grid 会盖掉 hidden 属性（面板关不掉）。 */
.cmenu{position:absolute;left:10px;right:10px;bottom:92px;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 30px rgba(16,24,40,.14);padding:10px;z-index:6;display:grid;gap:8px}
.cmenu[hidden]{display:none}
.cmenu-h{font-size:12px;color:var(--sub)}
.cmenu textarea{min-height:76px;resize:vertical;font-size:13px;line-height:1.6}
.cmenu-f{display:flex;gap:8px;justify-content:flex-end}
.cmenu-t{font-size:11px;color:var(--mute);line-height:1.6}

.alert{display:flex;flex-wrap:wrap;gap:10px;padding:11px 13px;border-radius:8px;font-size:12.5px;line-height:1.7;align-items:flex-start}
.alert-warn{background:var(--amber-soft);color:#7a4a06;border:1px solid #f3e0be}
.alert-bad{background:var(--red-soft);color:#8f1f16;border:1px solid #f4cdc8}
.alert-info{background:var(--brand-soft);color:#8f2f19;border:1px solid #f6d5cb}
.list-line{display:flex;gap:10px;align-items:center;padding:9px 0;border-bottom:1px solid var(--line-2);font-size:12.5px}
.list-line:last-child{border-bottom:none}
.list-line .g{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.list-line .v{font-variant-numeric:tabular-nums;color:var(--sub)}

/* ---------- 成员授权勾选清单 ---------- */
.pick-tools{display:flex;gap:6px;margin-bottom:10px;flex-wrap:wrap;align-items:center}
.pick-tools .inp{height:34px}
.pick-list{max-height:44vh;overflow:auto;border:1px solid var(--line);border-radius:10px;background:#fff;-webkit-overflow-scrolling:touch}
.pick-row{display:flex;align-items:center;gap:9px;padding:8px 11px;border-bottom:1px solid var(--line-2);cursor:pointer;font-size:13px;margin:0}
.pick-row:last-child{border-bottom:none}
.pick-row:hover{background:var(--panel-2)}
.pick-row.on{background:var(--brand-soft)}
.pick-row[hidden]{display:none}
.pick-row input{width:16px;height:16px;flex:0 0 auto;margin:0;accent-color:var(--brand);cursor:pointer}
.pick-row input:disabled{cursor:default}
.pick-row .av{width:24px;height:24px;border-radius:50%;background:#eef2f7;color:var(--sub);display:grid;place-items:center;font-size:10.5px;flex:0 0 auto}
.pick-row.on .av{background:#fff;color:var(--brand)}
.pick-row .nm{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pick-row .mk{font-style:normal;font-size:10px;color:var(--brand);background:#fff;border:1px solid #f6d5cb;border-radius:8px;padding:0 5px;margin-left:6px;white-space:nowrap}
/* 项目行的编号：手机上 .meta 被隐藏，编号必须留在名称行内，否则「G335 信息化」和
 * 「G335 边坡」这种只差后缀的项目根本分不清哪个是哪个 */
.pick-row .pcode{font-style:normal;font-size:11px;color:var(--mute);margin-right:6px}
.pick-row .meta{font-size:11.5px;color:var(--mute);max-width:42%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pick-sum{margin-top:9px;font-size:12.5px;color:var(--sub)}
.pick-sum b{color:var(--brand);font-variant-numeric:tabular-nums}
/* 流程「指定人员」：已选标签 + 选择按钮（原来 3 行多选框会撑高压行、名字被截断） */
.wf-pick{display:flex;align-items:center;gap:6px;min-width:0}
.wf-pick .btn{flex:0 0 auto;padding:0 9px;height:30px}
.wf-chips{flex:1;min-width:0;display:flex;flex-wrap:wrap;gap:4px;align-items:center;max-height:54px;overflow:hidden}
.wf-chip{display:inline-block;max-width:100%;padding:1px 7px;border-radius:6px;background:var(--brand-soft);color:var(--brand);font-size:11.5px;line-height:1.7;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wf-pick-none{font-size:12px;color:var(--mute)}

/* ---------- 报销与审批流 ---------- */
.alert-ok{margin-top:12px;padding:9px 12px;border-radius:8px;background:var(--green-soft);color:var(--green);font-size:12.5px}
.att-row{display:flex;align-items:center;gap:9px;padding:7px 0;border-bottom:1px solid var(--line-2);font-size:12.5px}
.att-row:last-child{border-bottom:none}
.att-ico{width:20px;height:20px;border-radius:5px;background:var(--brand-soft);color:var(--brand-2);display:grid;place-items:center;font-size:10px;flex:0 0 auto}
.att-nm{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.att-sz{color:var(--mute);font-size:11.5px}
.flow{display:grid}
.flow-step{display:flex;gap:10px;padding-bottom:14px;position:relative}
.flow-step:last-child{padding-bottom:0}
.flow-step .dot{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;font-size:11px;flex:0 0 auto;background:var(--line-2);color:var(--sub);border:1px solid var(--line)}
.flow-step.ok .dot{background:var(--green-soft);color:var(--green);border-color:transparent}
.flow-step.bad .dot{background:var(--red-soft);color:var(--red);border-color:transparent}
.flow-step.wait .dot{background:var(--amber-soft);color:var(--amber);border-color:transparent}
.flow-step .bd{flex:1;min-width:0;padding-top:1px}
.flow-step .nm{font-size:13px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.flow-step .who{font-size:11.5px;color:var(--sub);background:var(--panel-2);padding:1px 7px;border-radius:9px}
.flow-step .who.mute{color:var(--mute)}
.flow-step .cm{font-size:12px;color:var(--sub);margin-top:3px}
.flow-step .tm{font-size:11px;color:var(--mute);margin-top:2px}
/* 表格内小尺寸控件：下拉右侧留出箭头位，输入框保持紧凑 */
.tb select.inp{height:30px;padding:0 22px 0 7px;font-size:12.5px}
.tb input.inp{height:30px;padding:0 7px;font-size:12.5px}

/* ---------- 费用明细卡片（填报与详情共用，窄屏自动堆叠） ---------- */
.item-list{display:grid;gap:10px}
.item-card{border:1px solid var(--line);border-radius:10px;background:#fff;overflow:hidden}
.item-card:focus-within{border-color:#f5d8ce;box-shadow:0 0 0 3px rgba(224,74,47,.07)}
/* 提交时缺发票/凭证的行 */
.item-card.need-inv{border-color:#e7a8a1;background:#fffafa}
.item-card.need-inv .ic-h{background:var(--red-soft);border-bottom-color:#f3c9c4}
.ic-h{display:flex;align-items:center;gap:8px;padding:6px 10px;background:var(--panel-2);border-bottom:1px solid var(--line-2);font-size:12px;color:var(--sub);flex-wrap:wrap}
.ic-h .sp{flex:1;min-width:0}
/* 行头两个金额成组：窄屏放不下时整组换到下一行并靠右，不会只剩一个「含税」吊在左边 */
.ic-amts{display:flex;align-items:baseline;gap:8px;margin-left:auto;white-space:nowrap}
/* 行头「发票 N 张」= 点开该行票据照片的入口（审核按项核对，少滚一趟） */
button.tag-link{border:0;font-family:inherit;appearance:none;-webkit-appearance:none;cursor:pointer;padding-right:5px;text-decoration:underline dotted;text-underline-offset:2px;transition:background .12s,transform .12s}
button.tag-link .tag-arw{font-size:12px;line-height:1;margin-left:1px;opacity:.72;text-decoration:none}
button.tag-link:hover{background:#dbe8f7}
button.tag-link:active{transform:scale(.96)}
button.tag-link:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.ic-no{font-weight:500;color:var(--ink);font-variant-numeric:tabular-nums}
/* 识别来源标记（v0.8.21）：这一行出自哪张凭证，窄屏也不换行 */
.ic-h .ic-src{display:inline-block;max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0 6px;border-radius:4px;background:var(--panel-3,rgba(0,0,0,.05));color:var(--sub);font-size:11.5px}
.ic-b{display:grid;grid-template-columns:1.25fr 1.8fr 1.05fr 1fr .75fr;gap:10px;padding:10px}
/* 明细行客户列：只有市场费用单据才出现（一张单可集中报销多个客户） */
.ic-f.f-cust{display:none}
.item-list.has-cust .ic-f.f-cust{display:block}
.item-list.has-cust .ic-b{grid-template-columns:1.2fr 1.1fr 1.5fr 1fr .95fr .7fr}
/* 付款采购明细卡片（v0.8.16）：品名/规格/单位/数量/单价/类别 六列 */
.item-list.pay-items .ic-b{grid-template-columns:1.35fr 1.05fr .55fr .5fr .8fr .7fr}
/* 预算明细（v0.8.32）：品名 规格 单位 数量 单价 科目 */
.item-list.budget-items .ic-b{grid-template-columns:1.6fr 1.3fr .55fr .7fr .9fr 1.3fr}
/* 客户下拉 + 「全部」批量应用（替代已取消的表头主客户） */
.cust-cell{display:flex;gap:6px;align-items:center;min-width:0}
.ic-f.f-cust>div.cust-cell{padding-top:0;min-height:0}
.cust-cell .inp{flex:1 1 auto;min-width:0}
.cust-cell .btn{flex:0 0 auto;height:30px;padding:0 8px;font-size:12px;white-space:nowrap}
.ic-f{display:block;min-width:0}
.ic-f>span{display:block;font-size:11px;color:var(--mute);margin-bottom:4px}
.ic-f>div{font-size:13px;padding-top:6px;min-height:24px;word-break:break-word}
/* 明细行下的发票条：可预览、可删除 */
.ic-att{display:flex;flex-wrap:wrap;gap:6px;padding:0 10px 10px}
.ic-att:empty{display:none}
.att-chip{display:inline-flex;align-items:center;gap:6px;max-width:100%;padding:4px 6px 4px 8px;border:1px solid var(--line);border-radius:16px;background:var(--panel-2);font-size:11.5px;color:var(--sub)}
.att-chip.is-new{border-style:dashed;border-color:#f0cfc5;background:#fdf8f6}
.att-dot{width:6px;height:6px;border-radius:50%;background:#4a9d6e;flex:0 0 auto}
.att-dot.new{background:#c8912f}
.att-chip .att-nm{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ink)}
/* 付款凭证条：详情里是可点的按钮（点开看图），确认付款弹窗里是只读回显 */
.att-row-wrap{display:flex;flex-wrap:wrap;gap:6px}
.att-row-wrap:empty{display:none}
button.att-chip{font:inherit;cursor:pointer;text-align:left}
button.att-chip:hover{border-color:var(--brand)}
.att-chip .ac-ico{flex:0 0 auto;width:18px;height:18px;border-radius:5px;background:var(--panel);
  border:1px solid var(--line);display:inline-flex;align-items:center;justify-content:center;
  font-size:10px;color:var(--brand)}
.att-chip .ac-nm{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ink)}
.att-mini{flex:0 0 auto;padding:1px 6px;border:1px solid var(--line);border-radius:10px;background:#fff;font-size:11px;color:var(--sub);cursor:pointer;line-height:1.6}
.att-mini:hover{color:var(--brand);border-color:#f5d8ce}
.att-mini.att-x{padding:1px 5px;color:var(--mute);font-size:13px}
.att-mini.att-x:hover{color:#c0392b;border-color:#f3c9c4;background:var(--red-soft)}
.att-mini:disabled{opacity:.5;cursor:default}
.att-empty{font-size:11.5px;color:var(--mute)}
.att-view{padding:4px 2px}
/* 详情页附件行：整行可点进连续查看器；按钮成组，避免窄屏被拆散 */
.att-row{cursor:pointer}
.att-row:hover{background:var(--panel-2)}
.att-row:focus-visible{outline:2px solid var(--brand);outline-offset:-2px;border-radius:6px}
.att-line{flex:0 0 auto}
.att-acts{display:flex;gap:6px;flex:0 0 auto;align-items:center}
.att-acts .btn{height:26px;padding:0 9px;font-size:12px}

/* ---------- 附件连续查看器（手机审核票据逐张翻看） ---------- */
.av{position:fixed;inset:0;z-index:200;display:flex;flex-direction:column;background:rgba(10,14,20,.965);color:#e9eff7}
.av-h{flex:0 0 auto;display:flex;align-items:center;gap:8px;padding:10px 12px;padding-top:calc(10px + env(safe-area-inset-top,0px));border-bottom:1px solid rgba(255,255,255,.1)}
.av-t{flex:1;min-width:0}
.av-nm{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.av-meta{margin-top:2px;font-size:11.5px;color:rgba(233,239,247,.58)}
.av-ib{flex:0 0 auto;width:30px;height:30px;display:grid;place-items:center;border:1px solid rgba(255,255,255,.18);border-radius:8px;background:rgba(255,255,255,.07);color:#e9eff7;font-size:14px;line-height:1;cursor:pointer;text-decoration:none}
.av-ib:hover{background:rgba(255,255,255,.15)}
/* .av-ib 自带 display:grid，会盖掉 hidden 的 UA 样式，这里补一条才真的能隐藏（如非图片/PDF 时藏旋转键） */
.av-ib[hidden]{display:none}
.av-b{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;overflow:auto;padding:8px;-webkit-overflow-scrolling:touch}
.av-stage{display:flex;align-items:center;justify-content:center;width:100%;height:100%;min-height:0}
.av-stage img{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:4px}
.av-stage iframe{width:min(100%,900px);height:100%;min-height:70vh;border:0;border-radius:6px;background:#fff}
/* PDF：iOS/微信 webview 不能内嵌 PDF（iframe 白屏），改用 canvas 逐页画（见 pdf-view.js） */
/* 页面被压成横条的根因：.av-pdf 是 flex 行容器（默认 align-items:stretch），.av-pdfpgs
 * 被拉成整屏高；它内部又是列 flex，而 .av-pgw 带 overflow:hidden（自动最小尺寸被算成 0），
 * 于是页数一多每页被压到十几像素——看着像一整片格子，其实什么也读不出来。
 * 修法：让页块按自身高度撑开、不参与压缩（align-self:flex-start + flex:0 0 auto）。 */
.av-pdf{width:100%;height:100%;min-height:0;overflow:auto;display:flex;justify-content:center;align-items:flex-start;-webkit-overflow-scrolling:touch}
.av-pdfpgs{flex:0 0 auto;align-self:flex-start;height:auto;width:100%;max-width:900px;display:flex;flex-direction:column;gap:8px;padding:0 0 4px}
.av-pgw{flex:0 0 auto;background:#fff;border-radius:6px;overflow:hidden;box-shadow:0 2px 10px rgba(0,0,0,.35)}
.av-pg{display:block;width:100%;height:auto}
/* 旋转（手机拍照方向常是反的）：只转视觉，尺寸由 JS 按可用区域换轴换算，比例不变形。
 * 旋转后的元素布局盒会超出舞台，裁掉溢出即可（视觉内容仍居中）；放大模式下保留滚动。 */
.av-stage img{transition:transform .18s ease}
.av.is-rot .av-stage img{max-width:none;max-height:none}
.av.is-rot:not(.is-pan) .av-stage{overflow:hidden}
.av-pgtip{background:#fff;color:#8a94a6;font-size:11px;line-height:1;text-align:center;padding:6px 0}
/* 自由缩放（v0.3.7）：倍率由 JS 给显式像素，>1 时舞台变成内容尺寸、容器滚动看局部。
 * 关键是 max-width/max-height 必须放开，否则 CSS 会把放大后的图又压回一屏。 */
.av.is-pan .av-b{align-items:flex-start;justify-content:flex-start;cursor:grab}
.av.is-drag .av-b{cursor:grabbing;user-select:none}
.av.is-pan .av-stage{display:block;width:max-content;min-width:100%;height:auto}
.av.is-pan .av-stage img{max-width:none;max-height:none}
/* 缩放控件：− / 百分比 / ＋ 三颗连成一组，中间那颗同时也是「回到适应窗口」 */
.av-z{flex:0 0 auto;display:flex;align-items:center;gap:4px}
.av-z .av-ib{width:28px;height:30px;font-size:15px}
.av-z .av-zp{width:auto;min-width:46px;padding:0 4px;font-size:11.5px;letter-spacing:0}
.av-z[hidden]{display:none}
.av-msg{padding:40px 18px;text-align:center;font-size:13px;line-height:1.9;color:rgba(233,239,247,.75)}
.av-f{flex:0 0 auto;display:flex;align-items:center;gap:8px;padding:8px 12px;padding-bottom:calc(8px + env(safe-area-inset-bottom,0px));border-top:1px solid rgba(255,255,255,.1)}
.av-nav{flex:1;min-width:0;height:40px;border:1px solid rgba(255,255,255,.18);border-radius:9px;background:rgba(255,255,255,.08);color:#e9eff7;font-size:13px;cursor:pointer}
.av-nav:hover:not(:disabled){background:rgba(255,255,255,.16)}
.av-nav:disabled{opacity:.32;cursor:default}
.av-idx{flex:0 0 auto;min-width:54px;text-align:center;font-size:12px;color:rgba(233,239,247,.66)}
/* 宽屏下别让「上一张/下一张」拉成半屏宽，收成固定宽度居中 */
@media(min-width:641px){
  .av-f{justify-content:center}
  .av-nav{flex:0 0 150px}
  .av-idx{min-width:64px;font-size:12.5px}
}
/* 窄屏头部挤：缩放三颗收窄一点，文件名仍然优先截断（名字不是操作入口） */
@media(max-width:480px){
  .av-h{gap:6px;padding-left:10px;padding-right:10px}
  .av-z{gap:3px}
  .av-z .av-ib{width:26px;height:30px}
  .av-z .av-zp{min-width:40px;font-size:11px}
}
.sec-h{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;margin:16px 0 8px}
.sec-h b{font-size:13px;font-weight:500}
.sec-h span{font-size:11.5px;color:var(--mute)}
.sum-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:10px;font-size:12.5px;color:var(--sub)}
.sum-bar .sp{flex:1}

/* ---------- 手机 / 平板适配 ---------- */
.navtoggle{display:none;flex-direction:column;justify-content:center;gap:4px;width:34px;height:34px;padding:0 9px;border:1px solid var(--line);border-radius:8px;background:#fff;cursor:pointer;flex:0 0 auto}
.navtoggle i{display:block;height:1.5px;background:var(--ink);border-radius:2px}
.nav-back{display:none}

@media(max-width:1100px){
  .ic-b{grid-template-columns:1fr 1fr 1fr}
  .item-list.has-cust .ic-b{grid-template-columns:1fr 1fr 1fr}
  .item-list.pay-items .ic-b{grid-template-columns:1fr 1fr 1fr}
  .item-list.budget-items .ic-b{grid-template-columns:1fr 1fr 1fr}
  .item-list.budget-items .ic-f.f-desc{grid-column:span 2}
  .ic-f.f-desc{grid-column:span 2}
}
@media(max-width:900px){
  .shell{grid-template-columns:1fr}
  .side{position:fixed;left:0;top:0;bottom:0;z-index:60;width:250px;height:100%;transform:translateX(-101%);transition:transform .22s ease;box-shadow:0 10px 34px rgba(16,24,40,.18)}
  .side{will-change:transform}
  .shell.nav-open .side{transform:none}
  .nav-back{display:none;position:fixed;inset:0;background:rgba(17,24,39,.42);z-index:55}
  .shell.nav-open .nav-back{display:block}
  .navtoggle{display:flex}
  .topbar{height:52px;padding:0 12px;gap:9px}
  .topbar h1{font-size:14.5px}
  .topbar .crumb,.topbar .right{display:none}
  /* 手机上顶栏只能留一个控件：身份下拉必须在，否则切走之后没法一眼看出自己在谁的身份里 */
  .act-sel{max-width:150px;font-size:12px;height:28px}
  .act-bar .act-tag{font-size:10px;padding:1px 5px}
  .act-bar button{display:none}
  .act-bar.on{padding:2px 4px}
  .view{padding:14px 12px 44px}
  .tb-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
  table.tb{min-width:560px}
  .card-h{padding:12px 12px;flex-wrap:wrap}
  .card-b{padding:12px}
  .toolbar{gap:6px}
  .toolbar .search{flex:1;min-width:0}
  .detail-h .acts{margin-left:0;width:100%}
  .tabs{overflow-x:auto;-webkit-overflow-scrolling:touch}
  .tabs button{white-space:nowrap}
  /* 工具条：页签自己横滑，右侧动作组独占一行、三个按钮等宽平分，
     不再出现「导出在上、新建报销掉到下一行」的错位 */
  .toolbar>#tab{flex:1 1 100%;margin:0}
  .toolbar .sp{display:none}
  .t-acts{flex:1 1 100%;justify-content:flex-end;gap:6px}
  .t-acts .btn{flex:1 1 0;min-width:0;padding:0 8px}
  /* 筛选面板：一行一个维度，胶囊自动换行；日期两个框并排且不会被压成 0 宽 */
  .fpanel{padding:10px 12px;border-radius:10px}
  .fp-row{gap:8px;align-items:flex-start}
  .fp-row+.fp-row{margin-top:8px;padding-top:8px}
  .fp-l{flex:0 0 100%;font-size:11px;margin-bottom:-2px}
  .fchips{gap:6px}
  .fchip{height:26px;padding:0 10px;font-size:12px}
  .fp-sel{min-width:0;max-width:none;flex:1 1 140px;height:28px}
  .fp-dates{flex:1 1 100%;max-width:none;gap:5px}
  .fp-dates .inp{height:28px;font-size:13px}
  .fp-foot{margin-top:9px;padding-top:8px}
  .list-head{padding:9px 12px;font-size:11.5px;gap:6px}
  .list-head #evsum{flex:1 1 100%}
  .list-head .lh-acts{flex:1 1 100%;justify-content:flex-end;gap:6px}
  .list-head .m-only{display:inline-flex}
  /* 整行可点进详情（v0.8.37）：桌面是表格行、手机是卡片，都该给个手型 */
  .tb tbody>tr.pr-row{cursor:pointer}
  /* 手机勾选：卡片右上角一个小勾选圈，不占正文宽度 */
  .tb-m tbody>tr{position:relative;padding-right:40px}

  .tb-m tbody>tr:has(input.ck:checked){border-color:var(--brand-2);box-shadow:0 0 0 2px rgba(224,74,47,.10)}
  .tb-m tbody>tr>td.cb-col{display:block;position:absolute;top:9px;right:9px;width:auto!important;padding:0;z-index:2}
  .tb-m tbody>tr>td.cb-col::before{display:none}
  .tb-m tbody>tr>td.cb-col input{width:19px;height:19px;border-radius:50%}
  .tb-m tbody>tr>td.m-head{padding-right:32px}
  /* 批量条吸底：勾完一屏的单，动作按钮始终在手边 */
  .batch-bar.on{position:sticky;bottom:0;z-index:6;background:#fff;box-shadow:0 -6px 16px -12px rgba(16,24,40,.35);border-radius:0 0 10px 10px;padding:9px 12px calc(9px + env(safe-area-inset-bottom,0px))}
  .batch-bar .bb-txt{flex:1 1 100%;font-size:12px}
  .batch-bar .bb-sub{display:block;margin:2px 0 0;font-size:11px}
  .batch-bar .bb-acts{flex:1 1 100%;gap:6px}
  /* 审批人会同时看到「批量通过」和「确认付款」两个动作：不许压字，放不下就换行 */
  .batch-bar .bb-acts .btn{flex:1 1 auto;min-width:74px;padding:0 8px;white-space:nowrap}
  /* 筛选条在手机上不吸顶（吸顶会吃掉半屏），控件换行排布 */
  .flt{position:static;padding:8px 10px;gap:6px}
  .flt .sp{display:none}
  .flt .flt-l{flex:0 0 auto}
  /* 日期与下拉都按可用宽度平分：320px 下也不会挤成重叠、压成 0 宽 */
  .flt select.inp{flex:1 1 0;max-width:none;min-width:0;font-size:13px;height:32px}
  .flt input[type=date]{flex:1 1 0;min-width:0;font-size:13px;height:32px}
  .seg2{flex:1 1 100%;overflow-x:auto}
  .seg2 button{flex:1 0 auto}
  .chat{height:calc(100vh - 200px)}
}
@media(max-width:640px){
  .ic-b{grid-template-columns:1fr 1fr}
  /* 顶栏三件套窄屏互挤：320px 下标题被挤成一字一行（竖排）、身份下拉溢出屏幕 4px。
     标题与徽标都允许省略号；「切换身份」小标签收掉（下拉自带 aria-label，含义不丢）。 */
  .topbar h1{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:0 1 auto}
  .test-badge{max-width:30vw;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:0 1 auto}
  .act-bar .act-tag{display:none}
  .act-sel{max-width:132px}
  .item-list.has-cust .ic-b{grid-template-columns:1fr 1fr}
  .item-list.pay-items .ic-b{grid-template-columns:1fr 1fr}
  .item-list.budget-items .ic-b{grid-template-columns:1fr 1fr}
  .item-list.budget-items .ic-f.f-desc{grid-column:1/-1}
  .ic-f.f-desc,.ic-f.f-cat,.ic-f.f-date{grid-column:1/-1}
  .item-list.pay-items .ic-f.f-desc{grid-column:1/-1}
  /* 手机端客户名较长：客户与科目各占一行，避免挤成小字 */
  .item-list.has-cust .ic-f.f-cust{grid-column:1/-1}
  /* 附件行：窄屏下长文件名原先把「查看/移除」挤到第二行、甚至只剩半个按钮在外面。
     改成两行网格——首行「凭 + 第几项 + 按钮组」，次行「文件名（可两行）+ 大小」，
     文件名再长也只影响自己那一行，按钮位置固定。 */
  .att-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"ico line acts" "ico nm sz";column-gap:8px;row-gap:3px;align-items:center;padding:10px 0}
  .att-row .att-ico{grid-area:ico;align-self:start;margin-top:1px}
  .att-row .att-line{grid-area:line;justify-self:start;font-size:11px}
  .att-row .att-acts{grid-area:acts;justify-self:end}
  .att-row .att-sz{grid-area:sz;justify-self:end;font-size:11px}
  .att-row .att-nm{grid-area:nm;min-width:0;white-space:normal;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.4;font-size:12.5px;word-break:break-all}
  /* 附件卡片表头：手机上说明文字会挤掉「逐张查看」，这里收掉说明、按钮靠右 */
  .att-card .card-h .sub{display:none}
  .att-card .card-h .right{margin-left:auto;width:auto}
  .av-nav{height:44px}
  .av-stage iframe{min-height:60vh}
  .overlay{padding:0;place-items:stretch}
  /* 详情页头部操作按钮（编辑档案/成员授权/归档/录入成本/删除）：320px 下五个按钮
     一行放不下，超出屏幕右缘。允许换行、每个按钮可收缩，不再横向顶破。 */
  .detail-h .acts{flex-wrap:wrap;row-gap:8px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%}
  .detail-h .acts .btn{width:100%;min-width:0}
  /* 主操作（录入成本）与破坏性操作（删除）各占整行：中间不夹半格空位 */
  .detail-h .acts .btn-primary{grid-column:1/-1}
  /* 删除是破坏性动作，独占一行，不和「录入成本」挤在一起误触 */
  .detail-h .acts .btn-danger{grid-column:1/-1}
  .modal,.modal.wide{max-width:none;width:100%;max-height:100vh;max-height:100dvh;height:100vh;height:100dvh;border-radius:0}
  .modal-h{padding:13px 14px}
  /* 手机端弹窗铺满整屏，内容区撑开剩余高度：底部按钮贴底，不再挂在内容下方 */
  .modal-b{padding:14px 12px;flex:1 1 auto;min-height:0}
  /* 页脚按钮多了（请购详情有 4 个）时，原来靠 flex:1 均分会让文字顶到按钮外面：
   * 加了图标后 390px 更挤。改成「按内容宽度均分、放不下就换行」——
   * min-width 用默认的 auto（内容兜底），不再压到 0，文字就不会被挤到框外。 */
  .modal-f{padding:10px 12px;gap:6px;flex-wrap:wrap}
  .modal-f .btn{flex:1 1 auto;padding:0 8px}
  .form-grid{grid-template-columns:minmax(0,1fr)}
  .grid.g4,.grid.g3,.grid.g2{grid-template-columns:1fr}
  .kpi .val{font-size:20px}
  .stat-row{gap:18px}
  .login-wrap{grid-template-columns:1fr}
  .login-side{display:none}
  .login-main{padding:24px 18px}
  .ic-h{font-size:11.5px;gap:6px}
  .ic-h .num{font-size:12px}
  .alert{font-size:12px}
  /* iOS 聚焦不缩放 */
  input.inp,select.inp,textarea.inp,.search,.field input{font-size:16px}
  .tb select.inp,.tb input.inp{font-size:16px}
  .btn-sm{height:36px;font-size:12.5px}
  .tag{font-size:11px}
  /* 触控尺寸：筛选胶囊与分页按钮抬到 30px，手指点得准（26px 常常点偏） */
  .fchip{height:30px;padding:0 12px;font-size:12.5px}
  .pg-nav,.pg-n{height:30px;min-width:30px;font-size:12.5px}
  .pg-size{height:30px}
  /* 列表头：合计占满一行后，右侧「全选本页」靠右落位，不再孤零零挂在左边 */
  .list-head .m-only{margin-left:auto}
  /* 概览快捷动作：保持单行横排（四个动作一起出现，顺序＝常用频次）。
   * 390px 下四键等高铺满；更窄（320）放不下时整条横滑，不折行、不压字 */
  .dash-acts{display:flex;flex-wrap:nowrap;gap:6px;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding-bottom:1px}
  .dash-acts::-webkit-scrollbar{display:none}
  .dash-acts .btn{flex:1 1 0;min-width:max-content;height:38px;padding:0 12px;font-size:13px;white-space:nowrap}
  .dash-acts .btn:only-child{flex:0 1 auto}
  /* 统计范围条：说明独占一行（数字变小的原因不能省），「选项目」靠右 */
  .scope-bar{gap:8px;padding:8px 10px}
  .sb-note{flex:1 1 100%;order:3;font-size:11px}
  .scope-bar #sbPick{display:none}
  .sp-row{grid-template-columns:18px minmax(0,1fr) 82px}
  .sp-code,.sp-st{display:none}
  /* 成员授权：手机端清单占满剩余高度，部门名太长先隐掉 */
  .pick-tools .inp{height:38px}
  .pick-list{max-height:none;flex:1;min-height:180px}
  .pick-row{padding:10px 11px;font-size:14px}
  .pick-row input{width:18px;height:18px}
  .pick-row .meta{display:none}
  /* 手机端提示条铺满顶部，避免长文案挤成一条 */
  #toast-root{left:10px;right:10px;max-width:none;align-items:stretch;top:8px}
  /* 明细表（请购/付款的编辑行与详情查看）：手机上收掉「规格 / 单位 / 类别」三列——
     审批人核的是品名 × 数量 × 单价，规格多数为空、类别默认货物；
     隐藏列的 input 值仍留在 DOM，提交不受影响。收完一屏能放下，
     不再是 720px 宽的横滑表（弹窗里横滑两次才看到单价，是「表单看不全」的重灾区）。
     inline 的 min-width/width 用 !important 压掉，让 auto 布局自行分配。 */
  .item-tb .c-spec,.item-tb .c-unit,.item-tb .c-kind{display:none}
  /* auto 布局下 number 输入框按 20 字符固有宽渲染，列宽根本压不下来；
     换 fixed 布局由表头分配，剩余列均分，320px 也能一屏放下 */
  .item-tb{min-width:0!important;width:100%;table-layout:fixed}
  .item-tb thead th[style]{min-width:auto!important;width:auto!important}
  /* 品名列分到约三分之一，数字列显式给百分比——不能留 auto：
     Chrome 的 fixed 布局会把 display:none 的隐藏列也计入剩余宽度均分，
     留 auto 的列只能拿到 1/4 份（36px），金额 nowrap 直接溢出压到隔壁列 */
  .item-tb thead th:first-child{width:37%!important}
  .item-tb thead th:nth-child(4){width:12%!important}
  .item-tb thead th:nth-child(5){width:19%!important}
  .item-tb thead th:nth-child(6){width:21%!important}
  .item-tb th:last-child{width:44px!important}
  /* 详情查看表（view-tb）第一列是 # 不是品名，上面的 38% 会把序号列撑到 1/3、
     品名和数字列全被压扁（2026-11-14 用户截图实测）。列序不同，单独分配 */
  .item-tb.view-tb thead th:first-child{width:7%!important}
  .item-tb.view-tb thead th{padding-left:4px;padding-right:4px}
  .item-tb.view-tb thead th:nth-child(2){width:34%!important}
  .item-tb.view-tb thead th:nth-child(5){width:11%!important}
  .item-tb.view-tb thead th:nth-child(6){width:22%!important}
  .item-tb.view-tb thead th:nth-child(7){width:26%!important}
  /* 320px 屏按百分比压完后单价放不下，给个下限让它横滚，好过数字互相叠 */
  .item-tb.view-tb{min-width:340px!important}
  /* 明细区标题行原来是 float 右浮的「＋添加一行」，窄屏会和文字挤在一行里错位；
     flex 换行后按钮自然落位 */
  .pd-h{display:flex;flex-wrap:wrap;gap:4px 8px;align-items:center}
  .pd-h [style*="float"]{float:none!important;margin-top:0!important;margin-left:auto}
  .item-tb tbody input.inp,.item-tb tbody select.inp{width:100%!important;min-width:0;padding-left:6px;padding-right:6px}
  .item-tb td,.item-tb tbody th{padding-left:4px;padding-right:4px}
}
@media(max-width:400px){
  .ic-b{grid-template-columns:1fr}
  .item-list.has-cust .ic-b{grid-template-columns:1fr}
  .item-list.pay-items .ic-b{grid-template-columns:1fr}
  .item-list.budget-items .ic-b{grid-template-columns:1fr}
  .item-list.budget-items .ic-f.f-desc{grid-column:auto}
  .item-list.pay-items .ic-f.f-desc{grid-column:auto}
  .ic-f.f-desc,.ic-f.f-cat,.ic-f.f-date{grid-column:auto}
  .modal-f .btn{font-size:12px;padding:0 6px}
  /* 概览四键：320px 仍要一行放下，收字号与内边距，不做横滑 */
  .dash-acts{gap:5px}
  .dash-acts .btn{padding:0 8px;font-size:12px}
}

/* AI 凭证识别：预填提示条。用暖黄区分于普通校验提示（红）与说明（灰） */
.ai-bar{border:1px solid #e8dcc8;background:#fdf9f0;border-radius:8px;padding:10px 12px;margin-bottom:14px}
.ai-bar-h{display:flex;gap:8px;align-items:baseline;flex-wrap:wrap;font-size:12px}
.ai-bar-h b{color:#8a5a00;font-weight:500}
.ai-bar-h span{color:#a0895f;font-size:11.5px}
.ai-bar-l{margin:6px 0 0;padding-left:16px;font-size:11.5px;color:#8a6d3b;line-height:1.7}
.ai-bar-l li{list-style:disc}

/* 明细行发票号标识：AI 识别写入，提交时数据库验重；× 可清除（识别有误时） */
.ic-invno{display:flex;align-items:center;gap:6px;margin-top:6px;padding:4px 8px;border-radius:6px;background:#f6f8fb;font-size:11.5px;color:var(--sub)}
.ic-invno b{color:var(--tx);font-weight:500;letter-spacing:.3px}
.ic-invno span{color:var(--mute);font-size:10.5px;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ic-invno [data-clrinv]{border:0;background:none;cursor:pointer;font-size:13px;line-height:1;color:var(--mute);padding:2px 4px;border-radius:4px}
.ic-invno [data-clrinv]:hover{background:#e8ecf2;color:var(--tx)}

/* 对话式补全卡片：识别后在聊天流里问关键几项，答完才生成单据 */
.ai-q{background:var(--card,#fff);border:1px solid #e6e9ef;border-radius:10px;padding:12px 14px;max-width:560px;box-shadow:0 1px 2px rgba(16,24,40,.04)}
.ai-q-h{display:flex;gap:8px;align-items:baseline;flex-wrap:wrap;margin-bottom:10px}
.ai-q-h b{font-size:13px;font-weight:600;color:var(--tx)}
.ai-q-h span{font-size:11.5px;color:var(--mute)}
.ai-q-i{padding:9px 0;border-top:1px dashed #eceff4}
.ai-q-i:first-of-type{border-top:0}
.ai-q-l{font-size:12.5px;color:var(--tx);margin-bottom:6px;display:flex;gap:6px;align-items:baseline;flex-wrap:wrap}
.ai-q-l em{color:#dc2626;font-style:normal}
.ai-q-l span{font-size:11px;color:var(--mute);font-weight:400}
.ai-q-r{display:flex;gap:8px;align-items:center}
.ai-q-r .inp:first-child{flex:1;min-width:0}
.ai-q-r .inp:last-child{width:150px;flex:none}
.ai-q .inp{width:100%;font-size:13px;padding:7px 9px}
.ai-q-f{display:flex;gap:8px;justify-content:flex-end;align-items:center;margin-top:12px;padding-top:10px;border-top:1px solid #eef1f6}
.ai-q-f .btn{padding:0 12px;height:32px}
@media(max-width:640px){
  .ai-q{padding:10px 11px;max-width:none}
  .ai-q .inp{font-size:16px}
  .ai-q-f .btn{flex:1}
}
/* 补全卡片直接在聊天流里承担「气泡」角色，需要自己占满剩余宽度 */
.msg .ai-q{flex:1;min-width:0}

/* 顶栏铃铛：未读数直接压在图标右上角，点开进消息页 */
.bell{position:relative;width:30px;height:30px;border:1px solid var(--line);background:#fff;border-radius:9px;display:inline-flex;align-items:center;justify-content:center;color:var(--sub);cursor:pointer;padding:0;transition:.15s}
.bell:hover{color:var(--brand);border-color:#f3cdc4;background:var(--brand-soft)}
.bell-dot{position:absolute;top:-5px;right:-5px;min-width:16px;height:16px;padding:0 4px;border-radius:9px;background:#dc2626;color:#fff;font-size:10px;font-style:normal;line-height:16px;text-align:center;font-weight:500}

/* 消息与待办 */
.nt-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding-bottom:10px;border-bottom:1px solid #eef1f6}
.nt-seg{display:inline-flex;border:1px solid #e5e8ef;border-radius:7px;overflow:hidden}
.nt-seg button{border:0;background:#fff;padding:5px 12px;font-size:12.5px;color:var(--sub);cursor:pointer}
.nt-seg button.on{background:#fdefeb;color:var(--blue);font-weight:500}
.nt-hint{font-size:12px;color:var(--mute)}
.nt-item{display:flex;gap:10px;padding:12px 4px;border-bottom:1px solid #f2f4f8;text-decoration:none;color:inherit}
.nt-item:last-child{border-bottom:0}
.nt-item:hover{background:#f8fafc}
.nt-dot{width:7px;height:7px;border-radius:50%;background:transparent;flex:none;margin-top:7px}
.nt-item.un .nt-dot{background:#dc2626}
.nt-main{flex:1;min-width:0}
.nt-head{display:flex;gap:8px;align-items:baseline;flex-wrap:wrap}
.nt-head b{font-size:13px;font-weight:500;color:var(--tx)}
.nt-item.un .nt-head b{font-weight:600}
.nt-head time{font-size:11.5px;color:var(--mute);margin-left:auto;white-space:nowrap}
.nt-tag{font-size:10.5px;padding:1px 6px;border-radius:4px;background:#f1f3f7;color:var(--sub);flex:none}
.nt-tag.nt-wait{background:#fef3c7;color:#92400e}
.nt-tag.nt-ok{background:#dcfce7;color:#166534}
.nt-tag.nt-bad{background:#fee2e2;color:#991b1b}
.nt-tag.nt-warn{background:#ffedd5;color:#9a3412}
.nt-body{font-size:12.5px;color:var(--sub);margin-top:4px;line-height:1.55;word-break:break-word}
.nt-empty{padding:36px 12px;text-align:center;color:var(--mute);font-size:13px}
@media(max-width:640px){
  .nt-head time{margin-left:0}
}

/* ---- 合同详情 kv 网格 ---- */
.kv-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 20px}
.kv{display:flex;gap:8px;align-items:baseline;min-width:0;font-size:13px}
.kv span{color:var(--mute);flex:none}
/* b 是 flex 子项，不给 min-width:0 就会以整段文本作为最小宽度，
   把弹窗（grid 子项）一起撑到视口外——手机上表现为「关闭按钮不见了、右侧被裁」。 */
.kv b{font-weight:500;color:var(--tx);word-break:break-all;min-width:0;flex:1;overflow-wrap:anywhere}
.bad-text{color:var(--red)}

/* ---- 互链：项目 ⇄ 合同 ---- */
.link{color:var(--brand-2);text-decoration:none;border-bottom:1px dashed rgba(224,74,47,.35)}
.link:hover{color:var(--brand);border-bottom-color:var(--brand)}
.rel-row{display:flex;align-items:center;gap:8px;width:100%;text-align:left;background:#fff;border:1px solid var(--line);border-radius:8px;padding:7px 10px;cursor:pointer;font-size:12.5px;color:var(--tx);transition:background .12s,border-color .12s}
.rel-row:hover{background:var(--brand-soft);border-color:#f6d5cb}
.rel-row .rel-no{color:var(--sub);font-variant-numeric:tabular-nums;flex:none}
.rel-row .rel-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rel-row .rel-amt{flex:none;color:var(--ink);font-variant-numeric:tabular-nums}
@media(max-width:640px){.kv-grid{grid-template-columns:1fr}}

/* ==================== 手机端适配 v2 ====================
   1) 列表型表格在窄屏转卡片（.tb-m）。中文可在任意字符断行，7~9 列的表格在
      390px 宽会把项目名压成一行一个字——这不是列宽写错，是 table auto 布局
      对可断行文本的下限就是「一个字」。转卡片后横向溢出彻底消失。
      列名标签由 ui.js 从 thead 自动写入 td[data-l]，渲染代码不必手写。
   2) 仍需横滚的表格（透视表、弹窗内明细）改为按列给最小宽度，不再用固定
      总宽 560px：窄表不该被迫横滚，宽表自然溢出。
   3) 图表在手机用更窄的 viewBox（ui.js 内判断）+ height:auto，避免
      preserveAspectRatio=none 把文字横向压扁。 */

@media(max-width:900px){
  /* 窄屏表格：按列给下限，替代原来的 table{min-width:560px} */
  table.tb{min-width:0}
  table.tb th,table.tb td{min-width:86px}
  table.tb th:first-child,table.tb td:first-child{min-width:140px}
  table.tb th.num,table.tb td.num,table.tb th.r,table.tb td.r{min-width:94px}
  /* 金额与日期折行会变成「2026-10- / 20」，宁可让表格横滚 */
  table.tb td.num,table.tb th.num{white-space:nowrap}
  /* 横滚表格点按不闪灰块 */
  .tb-wrap{-webkit-tap-highlight-color:transparent}
  /* 还能往右滑时压一道内阴影当提示（绝对定位在容器内，不随内容滚动） */
  .tb-wrap.can-scroll:not(.tb-m){box-shadow:inset -18px 0 16px -16px rgba(16,24,40,.3)}
  /* 横滚表格的首列（项目/科目名）吸左：滑到右边看数字时还能认出是哪一行 */
  .tb-wrap:not(.tb-m) table.tb th:first-child,
  .tb-wrap:not(.tb-m) table.tb td:first-child{
    position:sticky;left:0;z-index:2;background:#fff;
  }
  .tb-wrap:not(.tb-m) table.tb th:first-child{background:var(--panel-2);z-index:3}
  .tb-wrap:not(.tb-m) table.tb td:first-child{box-shadow:1px 0 0 var(--line-2)}
  .tb-wrap:not(.tb-m) table.tb tbody tr:hover td:first-child{background:#fbfcfd}
  /* 工具栏里的页签不再被右侧按钮挤扁 */
  .toolbar .tabs{flex:1 1 auto;min-width:0;margin-bottom:0}
  .toolbar .sp{display:none}
  .toolbar>.btn{margin-left:auto}
  /* 身份切换器别占满顶栏 */
  .act-bar{gap:4px}
  .act-sel{max-width:112px}
  /* 详情页返回在桌面端已常显，这里只收窄内边距，别让它在小屏多占一行高度 */
  .back-link{margin-bottom:10px;height:28px;padding:0 10px 0 8px;font-size:12px}
  /* AI 对话用可视高度，避免 iOS 地址栏收合后输入框被顶出屏幕 */
  .chat{height:calc(100dvh - 236px);min-height:300px}
  /* 底部安全区（iPhone 横条 / 小程序底部留白） */
  .view{padding-bottom:calc(44px + env(safe-area-inset-bottom,0px))}
  .side{padding-bottom:env(safe-area-inset-bottom,0px)}
  .modal-f{padding-bottom:calc(10px + env(safe-area-inset-bottom,0px))}
}

@media(max-width:640px){
  /* KPI 四卡排两行两列；竖排四张会吃掉整屏 */
  .grid.g4,.grid.g5{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .kpi{padding:12px}
  .kpi .val{font-size:19px}
  .kpi .foot{flex-wrap:wrap}
  /* 卡片头按钮组换行后铺满，不再挤在标题右边 */
  .card-h .right{margin-left:0;width:100%;flex-wrap:wrap}
  /* 图表等比缩放（配合 ui.js 的窄屏 viewBox） */
  svg[viewBox],svg[viewbox]{height:auto!important}
  /* 横向条形图改两行：名称与数值一行，条形占一行 */
  .hbar{grid-template-columns:1fr auto;grid-template-areas:"nm v" "track track";gap:1px 8px;padding:6px 0}
  .hbar .nm{grid-area:nm}
  .hbar .v{grid-area:v;font-size:11.5px}
  .hbar .track{grid-area:track;margin-top:3px}
  .detail-h h2{font-size:17px}
  /* AI 输入区：手机上藏掉快捷键提示（没有物理键盘），发送键与工具键放大到 32px */
  .cmp-hint{display:none}
  .cmp-send{margin-left:auto}
  .cmp-btn{height:30px}
  .cmp-send{width:32px;height:32px}
  .composer{padding:6px 8px}
  .pmenu{bottom:88px}
  /* 合同面板比 @项目 高，手机上要让开快捷问题那一行，否则会把 chips 压住 */
  .cmenu{bottom:124px}
  .cmenu textarea{font-size:16px} /* 手机输入框 <16px 会被 iOS 自动放大 */
  /* 时间快捷段与页签：手机收紧内边距，六个选项能一行放下，不用横滑 */
  .seg2 button{padding:0 8px;font-size:12px}
  .tabs button{padding:9px 11px;font-size:12.5px}
  /* 工具条三段式：搜索 / 筛选带 / 动作行。之前搜索和按钮混排，按钮随内容宽度乱换行，
     经常出现「导出」孤零零占一行。现在每段职责固定，动作行按内容等比铺满。 */
  .toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
  .toolbar .search{order:1;flex:1 1 100%;min-width:0;height:38px}
  .toolbar .sp{display:none}
  .toolbar .tb-filters{order:2;flex:1 1 100%;display:flex;gap:8px;align-items:center;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;padding:1px 0 2px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .toolbar .tb-filters::-webkit-scrollbar{display:none}
  /* 还能往右滑时压一道内阴影，别让人以为筛选就这几项 */
  .toolbar .tb-filters.can-scroll{box-shadow:inset -16px 0 14px -14px rgba(16,24,40,.35);padding-right:12px;border-radius:8px}
  .toolbar .tb-filters>select.inp{flex:0 0 auto;width:auto!important;min-width:96px;max-width:47vw;height:36px}
  .toolbar .tb-filters>.btn{flex:0 0 auto;width:auto!important;height:36px}
  .toolbar .tb-filters>.cf{flex:0 0 auto}
  .toolbar .tb-filters .cf-btn{height:36px;max-width:47vw}
  /* 动作行：导出 / AI 登记 / 新建…按内容等比铺满一行，主操作仍用实心色区分 */
  .toolbar>.btn{order:3;flex:1 1 auto;width:auto!important;min-width:0;height:40px;padding:0 10px;font-size:12.5px}
  .toolbar>.btn.btn-primary{flex:1.15 1 auto}
  /* 合同台账的搜索框在节点条里：手机上也独占一行，别和 chips 挤成半截 */
  .ct-nodebar{flex-wrap:wrap}
  .ct-nodebar .search{flex:1 1 100%;max-width:none;height:38px;order:-1}
  .ct-nodebar .fchips{flex:1 1 100%}
  .ct-nodebar .fp-hint{flex:1 1 100%;text-align:left}

  /* ---------- 列表卡片化 ---------- */
  .tb-m{overflow:visible}
  .tb-m table.tb{display:block;width:100%;min-width:0}
  .tb-m thead{display:none}
  .tb-m tbody,.tb-m tfoot{display:block}
  .tb-m tbody>tr{
    display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 12px;
    margin:0 0 9px;padding:11px 12px 10px;background:#fff;
    border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow);
  }
  .tb-m tbody>tr:last-child{margin-bottom:0}
  .tb-m table tbody tr:hover{background:#fff}
  .tb-m table td{
    display:block;border:0;padding:0;min-width:0!important;
    font-size:13px;line-height:1.5;word-break:break-word;
  }
  .tb-m table td.r{text-align:left}
  /* 列名标签 */
  .tb-m table td::before{
    content:attr(data-l);display:block;margin-bottom:1px;
    font-size:10.5px;line-height:1.5;color:var(--mute);
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  }
  /* 首列＝卡片标题，不带标签；order:-1 保证它排在最上面（有些表主名称在第 3 列） */
  .tb-m table td.m-head{grid-column:1/-1;order:-1}
  .tb-m table td.m-head::before{display:none}
  .tb-m table td.m-head .pname{font-size:14px;line-height:1.45}
  /* 操作列整行按钮组 */
  .tb-m table td.m-acts{
    grid-column:1/-1;order:99;display:flex;flex-wrap:wrap;gap:8px;
    margin-top:1px;padding-top:9px;border-top:1px dashed var(--line-2);
  }
  .tb-m table td.m-acts::before{display:none}
  .tb-m table td.m-acts .btn{height:32px;padding:0 13px}
  /* 空格不占位；跨列（空状态）整行显示且不带标签 */
  .tb-m table td.m-blank{display:none}
  .tb-m table td.m-full{grid-column:1/-1}
  .tb-m table td.m-full::before{display:none}
  /* 长文本列（成本说明）手机上占整行：挤在半栏里会折成三行，右栏金额反而显小 */
  .tb-m table td.m-wide{grid-column:1/-1}
  .tb-m tr.sum-row{display:grid}
  .tb-m tr.sum-row td{background:transparent;border:0;padding-top:0}
  /* 手机上卡片是两栏窄格，硬切一行更看不出内容 → 收口改整段换行（v0.8.47） */
  .tb-m table td .clip{display:block;max-width:none;white-space:normal;overflow:visible;text-overflow:clip}
  .tb-m table td .clip2{-webkit-line-clamp:3}
  /* 编号下面那行项目名：桌面靠 .pcode+div 省略号，手机上换成整段换行 */
  .tb-m table td .pcode+div{white-space:normal;max-width:none;overflow:visible;text-overflow:clip}
}

/* ---------- 金额展示 ---------- */
/* 大额：精确值在上，万/亿在下。用于项目列表、合同台账这类金额列较窄的表 */
.amt-big{display:inline-flex;flex-direction:column;align-items:flex-end;line-height:1.3}
.amt-big i{font-style:normal;font-size:10.5px;color:var(--mute);font-variant-numeric:tabular-nums}
@media(max-width:640px){
  .tb-m table td .amt-big{align-items:flex-start}
}
/* 表格上方的小开关（含归档等） */
.mini-chk{display:inline-flex;align-items:center;gap:5px;font-size:12px;color:var(--sub);cursor:pointer;user-select:none;white-space:nowrap}
.mini-chk input{width:14px;height:14px;accent-color:var(--brand);margin:0}

/* ---------- 成本科目分组 ---------- */
.cat-groups{display:grid;gap:14px}
.cat-grp{border:1px solid var(--line-2);border-radius:9px;padding:11px 13px;background:var(--panel-2)}
.cat-grp-h{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:13px}
.cat-grp-h b{font-weight:500}
.cat-grp-d{font-size:11.5px;color:var(--mute);line-height:1.6}
.cat-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}
.cat-chip{display:inline-flex;align-items:center;gap:5px;font-size:12px;background:#fff;border:1px solid var(--line);border-radius:6px;padding:3px 9px;color:#2c3644}
.cat-chip b{font-weight:500;color:var(--mute);font-size:11px}
@media(max-width:640px){
  .cat-chip{font-size:11.5px;padding:3px 8px}
  .cat-grp{padding:10px 11px}
}

/* ---- 科目筛选（多选 + 搜索 + 分组） ----
   触发器与下拉同形：矩形白底、同高、灰箭头。之前是蓝色胶囊，夹在一排 rect 下拉中间
   像另一个体系；选中有值时再切成蓝边浅蓝底，仍然能一眼看出「这个维度筛了东西」。 */
.cf{position:relative;display:inline-flex}
.cf-btn{gap:0;position:relative;height:32px;max-width:220px;padding:0 24px 0 9px;justify-content:flex-start;background:#fff;border-color:var(--line);color:var(--ink);font-weight:400}
.cf-btn:hover{background:#fff;border-color:#ecd5ce;color:var(--ink)}
.cf.on .cf-btn{border-color:#b9cfe8;background:var(--brand-soft);color:var(--brand);font-weight:500}
.cf-txt{max-width:168px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* 箭头用与 select 同款 chevron（旋转边框画），不用实心三角 */
.cf-car{position:absolute;right:9px;top:50%;width:6px;height:6px;margin:-4px 0 0;border:0;border-right:1.5px solid #8a94a3;border-bottom:1.5px solid #8a94a3;transform:rotate(45deg)}
.cf.on .cf-car{border-color:var(--brand-2)}
.cf-pop{position:absolute;top:calc(100% + 6px);left:0;z-index:40;width:308px;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 10px 26px rgba(224,74,47,.16);padding:8px;display:flex;flex-direction:column;gap:6px}
.cf-pop[hidden]{display:none}
.cf-q{height:32px;border:1px solid var(--line);border-radius:7px;padding:0 9px;font-size:12.5px;font-family:inherit;color:var(--ink);outline:none;width:100%}
.cf-q:focus{border-color:var(--brand-2)}
.cf-list{max-height:302px;overflow:auto;overscroll-behavior:contain}
.cf-g{padding:2px 0 6px}
.cf-gt{font-size:11px;color:var(--mute);padding:6px 6px 4px;display:flex;align-items:center;gap:6px}
.cf-gt span{color:#9aa4b2}
.cf-i{display:flex;align-items:center;gap:8px;width:100%;border:none;background:none;text-align:left;padding:6px 7px;border-radius:6px;cursor:pointer;font-family:inherit;font-size:12.5px;color:var(--ink)}
.cf-i:hover{background:var(--panel-2)}
.cf-i i{width:13px;height:13px;border:1px solid var(--line);border-radius:4px;flex:0 0 auto;position:relative;background:#fff}
.cf-i.on i{background:var(--brand);border-color:var(--brand)}
.cf-i.on i::after{content:'';position:absolute;left:3.5px;top:1px;width:4px;height:7px;border:solid #fff;border-width:0 1.5px 1.5px 0;transform:rotate(42deg)}
.cf-i b{font-weight:500;color:var(--mute);font-size:11.5px;min-width:26px}
.cf-i.on{background:var(--brand-soft)}
.cf-i.on b{color:var(--brand)}
.cf-empty{padding:14px 8px;font-size:12px;color:var(--mute);text-align:center}
.cf-foot{display:flex;align-items:center;gap:8px;border-top:1px solid var(--line-2);padding-top:6px}
.cf-n{font-size:11.5px;color:var(--mute)}
.cf-foot .sp{flex:1}
.cf-clear{height:26px;padding:0 9px;font-size:12px;border-radius:6px;border:1px solid var(--line);background:#fff;color:var(--sub);cursor:pointer;font-family:inherit}
.cf-clear:hover{background:var(--panel-2)}
@media(max-width:900px){
  .cf{flex:1 1 132px}
  .cf-btn{width:100%}
  .cf-pop{position:fixed;left:10px;right:10px;bottom:10px;top:auto;width:auto;max-height:68vh}
  .cf-list{max-height:52vh}
}

/* ---- 文件上传区（拖拽/点选，替代原生 file 控件） ---- */
.up{position:relative;display:flex;align-items:center;gap:11px;min-height:74px;padding:13px 14px;border:1.5px dashed #c6d5e7;border-radius:10px;background:var(--panel-2);transition:border-color .15s,background .15s}
.up:hover{border-color:var(--brand-2);background:#f4f8fd}
.up.drag{border-color:var(--brand);border-style:solid;background:var(--brand-soft)}
.up.on{border-style:solid;border-color:var(--line);background:#fff;cursor:default}
.up>input[type=file]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;font-size:0}
.up.on>input[type=file]{display:none}
.up-ic{flex:0 0 auto;width:36px;height:36px;border-radius:9px;background:#e8f0fa;color:var(--brand-2);display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:600;letter-spacing:.4px}
.up.on .up-ic{background:var(--brand-soft);color:var(--brand)}
.up-tx{min-width:0;flex:1;display:flex;flex-direction:column;gap:2px}
.up-tx b{font-size:13px;font-weight:500;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.up-tx span{font-size:11.5px;color:var(--mute);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.up-tx em{font-style:normal;color:var(--brand-2)}
.up-x{position:relative;z-index:2;flex:0 0 auto;width:26px;height:26px;padding:0;border:1px solid var(--line);border-radius:7px;background:#fff;color:var(--sub);font-size:14px;line-height:1;font-family:inherit;cursor:pointer}
.up-x:hover{background:var(--red-soft);border-color:#f2c7c2;color:var(--red)}
.up-x[hidden]{display:none}
.up-bad{border-color:#f2c7c2;background:var(--red-soft)}
@media(max-width:640px){
  .up{min-height:68px;padding:11px 12px;gap:9px}
  .up-ic{width:32px;height:32px;border-radius:8px}
  .up-tx b{font-size:12.5px}
  .up-tx span{font-size:11px}
}

/* 版本更新提示条：部署后旧标签页提示刷新 */
.build-bar{position:fixed;left:50%;transform:translateX(-50%);top:12px;z-index:9999;display:flex;align-items:center;gap:12px;padding:9px 14px;border-radius:10px;background:linear-gradient(135deg,#ff6a3d,#ff9f2e);color:#fff;font-size:13px;box-shadow:0 8px 24px rgba(255,106,61,.35);max-width:calc(100vw - 32px)}
.build-bar span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.build-bar button{border:0;background:#fff;color:#c2410c;font-weight:600;padding:5px 12px;border-radius:7px;cursor:pointer;font-size:12px;font-family:inherit;flex:0 0 auto}
.build-bar button:hover{background:#fff7ed}

/* 报销页 AI 识票入口：与 .ai-bar 同色系，但用橙色虚线强调「可点」 */
.scan-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:10px 12px;margin-bottom:12px;border:1px dashed #f0c69a;border-radius:8px;background:linear-gradient(135deg,#fffaf3,#fdf9f0)}
.scan-h{min-width:0;flex:1}
.scan-h b{display:block;font-size:12.5px;color:#8a5a00;font-weight:600;margin-bottom:2px}
.scan-h span{font-size:11.5px;color:#a0895f;line-height:1.6}
.scan-a{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.scan-s{font-size:11.5px;color:var(--mute);max-width:240px;line-height:1.5}
@media (max-width:640px){.scan-bar{align-items:stretch}.scan-a{justify-content:space-between}.scan-s{max-width:none}}

/* 多张凭证核对：一张票一行，认不出的金额当场补，不用回表单里找是哪一行。
   列表不设 max-height：手机端弹窗本身是全屏的，由 .modal-b 统一滚动，
   否则第 N 行会被截在框里，看着像少了一张票。 */
.bp-list{display:flex;flex-direction:column;gap:8px}
.bp-row{border:1px solid var(--line);border-radius:10px;padding:8px 10px;background:#fff}
.bp-h{display:flex;align-items:center;gap:8px;font-size:12.5px;min-width:0}
.bp-h>b{flex:0 0 auto;width:20px;height:20px;border-radius:50%;background:var(--brand-soft);color:var(--brand);display:grid;place-items:center;font-size:11px;font-weight:500}
.bp-nm{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bp-k{flex:0 0 auto;color:var(--sub);font-size:11.5px;white-space:nowrap}
.bp-warn{color:var(--amber);font-weight:500}
.bp-f{display:flex;align-items:center;gap:6px;margin-top:7px}
.bp-lab{flex:0 0 auto;font-size:11.5px;color:var(--sub)}
.bp-f .inp{height:32px;flex:1 1 auto;min-width:0}
/* 税率选项用短标签（13% 货物 / 0% 无票），窄屏也放得下 */
.bp-f select.inp{flex:0 0 118px}
@media (max-width:640px){
  .bp-h{flex-wrap:wrap}
  .bp-k{order:3;flex:1 0 100%}
}

/* 表头排序：可点列的鼠标形态与升降序箭头 */
.tb th[data-sk]{cursor:pointer;user-select:none;white-space:nowrap}
.tb th[data-sk]:hover{color:var(--blue)}
.tb th[data-sk]::after{content:'⇅';margin-left:3px;font-size:10px;opacity:.28;font-weight:400}
.tb th[data-sk].sort-asc::after{content:'▲';opacity:.85;color:var(--blue)}
.tb th[data-sk].sort-desc::after{content:'▼';opacity:.85;color:var(--blue)}

/* 测试期徽标：数据性质提醒，正式上线把 config.js 的 TEST_MODE.on 改 false 即消失 */
.test-badge{display:inline-flex;align-items:center;gap:5px;padding:3px 9px;border-radius:999px;border:1px dashed #f0b36b;background:#fff8ee;color:#a35a00;font-size:11px;font-weight:600;white-space:nowrap}
.test-badge::before{content:'';width:6px;height:6px;border-radius:50%;background:#f59e0b}
@media (max-width:760px){.test-badge{font-size:10px;padding:2px 7px}}

/* ---------- 组织架构树（设置页） ----------
   一棵树看全层级：部门 → 子部门 → 岗位。以前两张平表并排，
   手机上要来回滑着对「这个岗位属于哪个部门」，层级一深就看不出上下级。 */
.org-wrap{padding-top:11px}
.org-head{display:flex;align-items:center;gap:14px;flex-wrap:wrap;font-size:12px;color:var(--sub);padding-bottom:9px;border-bottom:1px solid var(--line-2)}
.org-legend{display:inline-flex;align-items:center;gap:5px}
.org-legend i{width:9px;height:9px;border-radius:2px;display:inline-block}
.org-legend .lg-dept{background:var(--brand-2)}
.org-legend .lg-pos{background:#fbe4dc;border:1px solid #eec4b6}
.org-tip{color:var(--mute)}
.org-add{margin-left:auto;display:flex;gap:6px;flex-wrap:wrap}
.org-tree{font-size:13px;padding-top:2px}
.org-tree ul{list-style:none;margin:0;padding:0}
.ot-root>li+li{border-top:1px solid var(--line-2)}
.ot-row{display:flex;align-items:center;gap:8px;padding:9px 0;min-height:48px}
.ot-tg{width:18px;height:18px;flex:0 0 auto;border:1px solid var(--line);border-radius:5px;background:#fff;cursor:pointer;display:grid;place-items:center;color:var(--mute);font-size:10px;font-family:inherit;padding:0}
.ot-tg:after{content:"▾";display:block;transform:rotate(-90deg);transition:transform .15s}
.ot-d[data-open="1"]>.ot-row .ot-tg:after{transform:none}
.ot-tg:disabled{opacity:.3;cursor:default}
.ot-main{min-width:0;flex:1}
.ot-t{display:flex;align-items:center;gap:7px;flex-wrap:wrap;line-height:1.5}
.ot-s{font-size:11.5px;color:var(--mute);line-height:1.6}
.ot-cnt{font-size:11px;color:var(--sub);background:var(--panel-2);border:1px solid var(--line-2);border-radius:10px;padding:0 7px;white-space:nowrap}
.ot-cnt i{font-style:normal;color:var(--mute)}
.ot-lead{font-size:11.5px;color:var(--brand-2);background:var(--brand-soft);border-radius:10px;padding:0 7px;white-space:nowrap}
.ot-warn{color:var(--amber);background:var(--amber-soft)}
.ot-lead i{font-style:normal;color:var(--mute);margin-left:6px;font-size:10.5px}
/* 分管领导：与「负责人」并排但不是同一件事，用虚线框区分，避免读成两个岗位 */
.ot-sup{font-size:11.5px;color:var(--sub);border:1px dashed var(--line);border-radius:10px;padding:0 7px;white-space:nowrap}
.ot-btns{display:flex;gap:5px;flex:0 0 auto;align-items:center}
.ot-b{border:1px solid var(--line);background:#fff;color:var(--sub);border-radius:12px;font-size:11.5px;padding:2px 9px;cursor:pointer;font-family:inherit;white-space:nowrap}
.ot-b:hover{border-color:var(--brand-2);color:var(--brand)}
.ot-b-pri{color:var(--brand);border-color:#f2d5cb;background:var(--brand-soft)}
.ot-kids{margin-left:18px;padding-left:10px;border-left:1px dashed var(--line)}
.ot-d[data-open="0"]>.ot-kids{display:none}
.ot-kids-flat{margin-left:0;padding-left:0;border-left:0}
.ot-p{display:flex;align-items:center;gap:8px;padding:5px 0;min-height:34px}
.ot-pd{width:6px;height:6px;border-radius:2px;background:#fbe4dc;border:1px solid #eec4b6;flex:0 0 auto}
.ot-pos{font-size:12.5px;color:var(--ink)}
.ot-note{font-size:11px;color:var(--mute)}
.ot-general{margin-top:10px;border-top:1px solid var(--line-2);padding-top:9px}
.ot-gh{font-size:12px;color:var(--sub);display:flex;gap:8px;align-items:baseline;flex-wrap:wrap;margin-bottom:2px}
.ot-gh span{font-size:11px;color:var(--mute)}
.ot-foot{margin-top:11px;background:var(--amber-soft);color:#7a4b06;border-radius:8px;padding:8px 10px;font-size:12px;line-height:1.75}
@media (max-width:640px){
  .ot-row{flex-wrap:wrap;row-gap:6px}
  .ot-btns{width:100%;padding-left:26px;justify-content:flex-start}
  .ot-b{font-size:11px;padding:2px 8px}
  .ot-kids{margin-left:11px;padding-left:8px}
  .ot-cnt{font-size:10.5px;padding:0 6px}
  .org-head{gap:10px}
  .org-tip{display:none}
}

/* ---------- 报销审批流程：桌面表格 / 手机卡片 ----------
   4 列表格在 390px 下「审批路径」整列被挤出屏幕，而它恰恰是最该看的；
   手机改成一条规则一张卡：条件一行，路径竖排带序号，几级审批一眼数得清。 */
.wf-cards{display:none}
.wf-card{border:1px solid var(--line-2);border-radius:10px;padding:10px 12px;margin-bottom:10px;background:var(--panel)}
.wf-ch{display:flex;align-items:center;gap:8px;font-size:13px;margin-bottom:8px}
.wf-no{flex:0 0 auto;width:18px;height:18px;border-radius:50%;background:var(--brand-soft);color:var(--brand);font-size:11px;display:grid;place-items:center}
.wf-cl{display:flex;gap:8px;font-size:12px;line-height:1.7;padding:3px 0}
.wf-ck{flex:0 0 30px;color:var(--mute);font-size:11.5px;padding-top:1px}
.wf-cv{min-width:0;flex:1;color:#2c3644;word-break:break-word}
.wf-steps{list-style:none;margin:0;padding:0;counter-reset:wf}
.wf-steps li{position:relative;padding:0 0 9px 20px;counter-increment:wf}
.wf-steps li:before{content:counter(wf);position:absolute;left:0;top:1px;width:15px;height:15px;border-radius:50%;background:var(--brand-soft);color:var(--brand);font-size:10px;display:grid;place-items:center}
.wf-steps li:after{content:"";position:absolute;left:7px;top:17px;bottom:0;width:1px;background:var(--line)}
.wf-steps li:last-child{padding-bottom:0}
.wf-steps li:last-child:after{display:none}
.wf-steps b{font-weight:500;color:var(--ink)}
.wf-steps i{font-style:normal;color:var(--mute);font-size:11.5px;margin-left:6px}
.wf-steps em{font-style:normal;font-size:10.5px;color:var(--brand);background:var(--brand-soft);border-radius:8px;padding:0 5px;margin-left:5px}
.wf-none{color:var(--amber);font-size:12px}
@media (max-width:640px){
  .wf-table{display:none}
  .wf-cards{display:block;padding:10px 12px 0}
  .wf-card{margin-bottom:9px}
}

/* ---------- 审批流程配置弹窗：桌面六列 / 手机四行 ----------
   原来的六列最小 644px，手机上「具体选谁」整块被推到屏幕外，规则根本配不了。 */
.wf-node{display:grid;grid-template-columns:26px minmax(110px,1fr) 152px minmax(170px,1.5fr) 148px 38px;gap:6px;align-items:center;margin-bottom:6px}
.wf-node .inp{min-width:0}
@media (max-width:640px){
  .wf-node{
    grid-template-columns:22px 1fr 34px;
    grid-template-areas:"num name del" "type type type" "who who who" "mode mode mode";
    row-gap:6px;padding-bottom:9px;margin-bottom:9px;border-bottom:1px dashed var(--line-2)
  }
  .wf-num{grid-area:num;align-self:center}
  .wf-name{grid-area:name}
  .wf-del{grid-area:del;justify-self:end;padding:0 6px}
  .wf-type{grid-area:type}
  .wf-who{grid-area:who}
  .wf-mode{grid-area:mode}
  .wf-node .inp{width:100%}
  /* 条件行同理：字段占满一行，操作符和值并排 */
  [data-cond]{flex-wrap:wrap;row-gap:6px;padding-bottom:6px}
  [data-cond] [data-cf="field"]{flex:1 1 100%!important}
  [data-cond] [data-cf="op"]{flex:0 0 104px!important}
  [data-cond] [data-cvwrap]{flex:1 1 auto!important;min-width:0}
  .wf-ruleh{flex-wrap:wrap;row-gap:6px}
  .wf-ruleh input[data-rf="name"]{flex:1 1 100%!important}
  .wf-ruleh select[data-rf="logic"]{flex:1 1 auto!important}
}

/* ==================== 手机端：成本分析 ====================
   截图里的三个问题都不是「列宽写错」，是窄屏下三种布局的必然结果：
   1) 透视表最多 9 列（项目维度），390px 一定横滚；空状态那格是 colspan 跨列，
      文字按整表宽度居中，落到屏幕外就像「文案被裁了一半」。→ 透视表卡片化。
   2) 六个维度页签（项目/科目/人员/部门/月份/合同履约）挤在一行，字号已被压到 12px，
      再加一个「只看有期间成本的项目」开关就会被挤成两截。→ 页签单行横滑，开关单独一行靠右。
   3) 筛选条 sticky 在顶栏下，手机上折成四五行，吸顶时吃掉近半屏。→ 手机上不吸顶，控件两列排。
   4) 科目结构「名称 + 占比条 + 金额」三段横排，在 390px 会把名称压成两三个字。→ 改两行。 */
@media(max-width:640px){
  .flt{position:static;gap:6px;padding:8px 10px}
  .flt .flt-l{font-size:11px}
  .flt .seg2{max-width:100%;overflow-x:auto;overflow-y:hidden}
  .flt .seg2 button{flex:0 0 auto;padding:0 9px;height:30px;font-size:12px}
  .flt input[type=date]{flex:1 1 calc(50% - 24px);min-width:0;width:auto;height:30px;font-size:12px;padding:0 6px}
  .flt select.inp{flex:1 1 calc(50% - 3px);min-width:0;max-width:none;height:30px;font-size:12.5px}
  .flt .search{flex:1 1 100%;min-width:0;height:30px}
  .flt .sp{display:none}
  .flt>.btn{flex:1 1 auto;height:32px}

  .dim-bar{gap:8px;margin:14px 0 8px}
  .dim-seg{flex:1 1 100%;min-width:0;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;scrollbar-width:none}
  .dim-seg::-webkit-scrollbar{display:none}
  .dim-seg .seg2{width:max-content;min-width:100%;overflow:visible}
  .dim-seg .seg2 button{flex:0 0 auto;white-space:nowrap;padding:0 11px;height:34px}
  .dim-meta{order:2}
  .dim-chk{order:3;margin-left:auto;min-height:28px}
  .dim-bar>.seg2{order:4;flex:0 0 auto;margin-left:auto}

  .list-line{flex-wrap:wrap;row-gap:3px}
  .list-line .ln-bar{flex:1 1 100%!important;width:auto!important;order:3}
  .list-line .v{margin-left:auto;min-width:0!important}

  /* 合计行：卡片模式下也做成一张卡（两列），首格「合计 N 个项目」占整行。
     border 必须带 table.tb 提权——桌面那条 table.tb tr.sum-row td 的
     border-top 优先级更高，否则每格之间会多出五道毫无意义的横线。 */
  .tb-m tfoot tr.sum-row{
    display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px;
    margin:0 0 9px;padding:11px 12px 10px;background:#fff;
    border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow);
  }
  .tb-m table.tb tr.sum-row td{border:0;padding:0;background:transparent;font-size:13px}
  .tb-m table.tb tr.sum-row td:first-child{grid-column:1/-1;font-size:12.5px;color:var(--sub);font-weight:500}
  .tb-m table.tb tr.sum-row td:first-child::before{display:none}
  /* 合计行末尾补充说明（如计划毛利率）：它不属于任何一列，独占一行，别挂列名 */
  .tb-m table.tb tr.sum-row td.m-sum-note{grid-column:1/-1;font-size:11.5px;color:var(--mute)}
  .tb-m table.tb tr.sum-row td.m-sum-note::before{display:none}

  .card-h{flex-wrap:wrap;row-gap:2px}
  .card-h .sub{min-width:0}
  .empty{padding:30px 14px}
  .caliber{font-size:12px;line-height:1.8}
}

/* ---------- 收付款「AI 登记」块 ---------- */
/* 虚线框：这是可选的辅助入口，不能抢了表单主视觉 */
.pai-box{border:1px dashed var(--line);border-radius:10px;padding:10px 12px;margin-bottom:14px;background:var(--panel-2)}
.pai-h{display:flex;gap:8px;align-items:baseline;flex-wrap:wrap;margin-bottom:8px}
.pai-h b{font-weight:600;font-size:13px}
.pai-h span{color:var(--mute);font-size:11.5px}
.pai-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.pai-hint{font-size:11.5px;color:var(--mute)}
.pai-note{margin-top:8px;font-size:12px;line-height:1.75;color:var(--sub);background:var(--panel);border-radius:8px;padding:8px 10px}
.pai-warn{color:var(--red)}
.pai-ok{color:var(--green)}
@media(max-width:640px){
  .pai-note{font-size:11.5px}
  .pai-row .btn{flex:1 1 100%}
  .pai-hint{flex:1 1 100%}
}

/* ---------- 设置页：模块标签 + 短信通道卡 ---------- */
/* 设置页原来一屏十几个卡片，找「短信通道」要滚很久；按模块切换后每屏只留相关卡片 */
.set-tabs{display:flex;gap:6px;overflow-x:auto;padding:3px;margin-bottom:14px;background:var(--panel-2);border-radius:10px;-webkit-overflow-scrolling:touch}
/* 内联模块（组织架构/成本科目）：渲染函数自带 .view，嵌进来去掉外层留白 */
.set-pane>.view{padding:0 0 40px}
.set-tab{flex:0 0 auto;border:0;background:transparent;color:var(--sub);font-size:13px;padding:7px 13px;border-radius:8px;cursor:pointer;white-space:nowrap}
.set-tab:hover{color:var(--ink)}
.set-tab.is-on{background:#fff;color:var(--ink);font-weight:600;box-shadow:0 1px 3px rgba(21,31,46,.08)}
.set-pane[hidden]{display:none}

.sms-head{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.sw-row{display:inline-flex;gap:7px;align-items:center;font-size:13px;cursor:pointer}
.sw-row input{width:16px;height:16px;accent-color:var(--brand)}
.sms-state{font-size:12px}
.sms-state.is-on{color:var(--green)}
.sms-state.is-off{color:var(--mute)}
.sms-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px 12px}
.sms-grid .f{display:grid;gap:4px}
.sms-grid .f>span{font-size:12.5px;color:var(--sub)}
.sms-grid .f-full{grid-column:1/-1}
.sms-grid .inp{height:32px}
@media(max-width:760px){.sms-grid{grid-template-columns:1fr}}
/* 模板内容较长，单行输入看不全，手机上尤其明显 —— 用两行文本框，可手动拉高 */
.sms-grid textarea.inp{height:auto;min-height:56px;padding:7px 9px;line-height:1.6;resize:vertical;font-family:inherit}

/* 登录页协议同意行（v261028bu）：与小程序登录页同口径，未勾选不发验证码 */
.agree-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--sub);
  cursor: pointer;
}
.agree-row input {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin: 2px 0 0;
  accent-color: var(--brand);
  cursor: pointer;
}
.agree-row a {
  color: var(--brand);
  text-decoration: none;
}
.agree-row a:hover {
  text-decoration: underline;
}

/* 表头副标签：一个列里放「计划利润 / 计划成本」两个口径时用，避免再加一列 */
th .th-sub{display:block;font-size:10.5px;font-weight:400;color:var(--mute);margin-top:2px}

/* ---------- 付款确认页 ---------- */
.cnt-inline{display:inline-flex;align-items:center;justify-content:center;min-width:17px;height:17px;padding:0 5px;border-radius:9px;background:var(--red-soft);color:var(--red);font-size:11px;line-height:1;font-weight:500;vertical-align:1px}
.tabs button .cnt-inline{margin-left:4px}

/* ---------- 概览 · 年度目标达成行（pages-work.js planBand） ----------
 * 一条指标一行：名称 + 进度条（条上竖线＝日历进度）+ 实际/目标 + 达成率。
 * 不做合计，所以没有 tfoot，也不需要合计行样式。 */
.pl-line{display:flex;align-items:center;gap:12px;padding:8px 0}
.pl-line+.pl-line{border-top:1px solid var(--line-2)}
.pl-name{flex:0 0 138px;font-size:12.5px;color:var(--ink)}
.pl-name span{display:block;font-size:11px;color:var(--mute);line-height:1.5;margin-top:1px}
.pl-bar{flex:1;position:relative;height:7px;background:var(--line-2);border-radius:4px}
.pl-bar i{display:block;height:100%;border-radius:4px}
.pl-bar b{position:absolute;top:-3px;width:1px;height:13px;background:var(--mute);opacity:.6}
.pl-num{flex:0 0 122px;text-align:right;font-size:12.5px}
.pl-num span{color:var(--mute);font-size:11px}
.pl-rate{flex:0 0 54px;text-align:right;font-size:12.5px;font-weight:500}
@media (max-width:760px){
  .pl-line{flex-wrap:wrap;gap:6px 10px}
  .pl-name{flex:1 0 100%}
  .pl-bar{flex:1 1 auto}
  .pl-num{flex:0 0 auto}
  .pl-rate{flex:0 0 46px}
}

/* ---------- 采购付款：明细表 / 详情 / 审批时间轴 ----------
   明细是审批人唯一的价格依据，所以表头不换行、金额右对齐、合计单独一行；
   时间轴用左侧竖线 + 圆点，靠颜色区分已过/当前/驳回，不靠文字堆叠。 */
.item-tb th{font-size:11.5px;color:var(--mute);font-weight:500;white-space:nowrap}
.item-tb td{vertical-align:middle}
/* 合计从 tfoot 搬到表外一行：tfoot 的 colspan 会横跨手机端被隐藏的列，
   Chrome 的 fixed 布局里会撑出几十px的幽灵宽度，表格看着没超宽、右边却多出一段能滑动的空白 */
.item-sum{display:flex;justify-content:flex-end;align-items:baseline;gap:10px;
  padding:7px 12px;border-top:1px solid var(--line-2);font-size:12px;color:var(--sub)}
.item-sum b{color:var(--ink);font-weight:600;font-variant-numeric:tabular-nums;font-size:13px}
.pd-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.pd-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px 16px;margin:12px 0 4px;font-size:12.5px;color:var(--sub);line-height:1.6}
.pd-meta b{color:var(--ink);font-weight:500}
.pd-h{font-size:13px;font-weight:600;margin:16px 0 8px;display:flex;align-items:center;gap:6px}

/* 付款类型选择卡（新建付款申请第一步）：三选一，卡片本身可点，
 * 手机上单列、桌面三列——按 480 断点切，别用 auto-fit 让它在窄屏挤出 1px 半张卡 */
.pay-type-grid{display:grid;gap:10px}
.pay-type-card{display:flex;align-items:flex-start;gap:10px;width:100%;text-align:left;
  border:1px solid var(--line-2);border-radius:11px;background:var(--panel);padding:12px;cursor:pointer;
  font:inherit;color:inherit;transition:border-color .15s,box-shadow .15s}
.pay-type-card:hover,.pay-type-card:focus-visible{border-color:var(--brand);box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 12%,transparent);outline:none}
.ptc-ico{flex:0 0 34px;height:34px;border-radius:9px;background:var(--panel-2);display:flex;
  align-items:center;justify-content:center;font-size:14px;font-weight:600;color:var(--brand)}
.ptc-body{display:flex;flex-direction:column;gap:3px;min-width:0}
.ptc-body b{font-size:13.5px;font-weight:600;color:var(--ink)}
.ptc-body span{font-size:12px;color:var(--sub);line-height:1.55}
@media(min-width:480px){.pay-type-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
.flow{display:grid}
.flow-node{position:relative;padding:0 0 16px 22px}
.flow-node:last-child{padding-bottom:2px}
.flow-node::before{content:'';position:absolute;left:5px;top:16px;bottom:0;width:1px;background:var(--line-2)}
.flow-node:last-child::before{display:none}
.fn-dot{position:absolute;left:0;top:5px;width:11px;height:11px;border-radius:50%;background:var(--line);box-shadow:0 0 0 2px #fff,0 0 0 3px var(--line-2)}
.flow-node.done .fn-dot{background:var(--green);box-shadow:0 0 0 2px #fff,0 0 0 3px var(--green)}
.flow-node.cur .fn-dot{background:var(--brand);box-shadow:0 0 0 2px #fff,0 0 0 3px var(--brand)}
.flow-node.reject .fn-dot{background:var(--red);box-shadow:0 0 0 2px #fff,0 0 0 3px var(--red)}
.fn-t{font-size:13px;font-weight:500;margin-bottom:3px}
.fn-s{font-size:12px;color:var(--sub);line-height:1.75}
.fn-c{font-size:12px;color:var(--mute);margin-top:2px;white-space:pre-wrap}
@media(max-width:640px){
  .pd-meta{grid-template-columns:1fr}
}

/* ---------------- 组织架构（#/org） ----------------
 * 组织树按部门分卡：一屏能看到「每个部门谁负责、有几个人」，
 * 这是这一页唯一的核心动作（找人），不是表格能替代的——表格只能一人一行，看不出归属。
 * 卡片高度不统一是刻意的：按人数自然伸缩，强行等高会在大部门里塞滚动条。 */
.org-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
@media(max-width:1280px){.org-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:820px){.org-grid{grid-template-columns:1fr}}
.org-card{border:1px solid var(--line);border-radius:var(--radius);background:var(--panel);overflow:hidden}
.org-card-bad{border-color:#f3c2bd;background:#fffbfa}
.org-h{display:flex;align-items:center;justify-content:space-between;gap:8px;
  padding:9px 12px;background:var(--panel-2);border-bottom:1px solid var(--line-2)}
.org-t{display:flex;align-items:center;gap:7px;font-size:13.5px}
.org-t b{font-weight:600;color:var(--ink)}
.org-meta{padding:7px 12px;font-size:12px;color:var(--sub);border-bottom:1px solid var(--line-2);line-height:1.7}
.org-meta b{color:var(--ink);font-weight:500}
.org-meta .org-miss{color:var(--amber);font-weight:500}
.org-list{padding:4px 0}
.org-empty{padding:14px 12px;font-size:12px;color:var(--mute)}
/* 人员行：头像 + 姓名 + 岗位三段定宽，第三段留弹性。
   窄屏只压岗位（-pos），姓名与企微圆点永远不折行——没人能靠猜知道「王…」是谁。 */
.org-p{display:flex;align-items:center;gap:8px;padding:6px 12px;cursor:pointer;font-size:12.5px}
.org-p:hover{background:var(--brand-soft)}
.org-av{flex:0 0 auto;width:22px;height:22px;border-radius:50%;background:var(--brand-soft);color:var(--brand);
  display:grid;place-items:center;font-size:10.5px;font-weight:500}
.org-nm{flex:0 0 auto;font-weight:500;color:var(--ink);white-space:nowrap}
.org-pos{flex:1 1 auto;min-width:0;color:var(--sub);font-size:11.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.org-flag{font-style:normal;margin-left:5px;font-size:10px;color:var(--brand);background:var(--brand-soft);
  border-radius:3px;padding:0 4px;font-weight:500}
.org-dot{flex:0 0 auto;width:6px;height:6px;border-radius:50%;background:#d3d9e2}
.org-dot.on{background:var(--green)}
/* 名册里的部门分组行：部门是他「能不能被审批链找到」的第一层归属，
   所以分组的视觉权重要高于普通行，但不能做成卡片（25 人分 6 段，卡片会撑爆屏）。 */
.tb tr.grp td{background:var(--panel-2);font-size:12px;font-weight:600;color:var(--sub);
  padding:7px 10px;border-top:1px solid var(--line);border-bottom:1px solid var(--line-2)}
.tb tr.grp:first-child td{border-top:0}
.tb tr.grp .grp-sub{font-weight:400;color:var(--mute);margin-left:8px}

/* ==================== 图标（v0.8.43） ====================
 * 只用 CSS mask + 内联 SVG（data-uri），不引图标库、不发外部请求：
 * 系统在企业微信 webview 里跑，离线与弱网都不能白块；颜色由 currentColor 给，
 * 所以图标天然跟随文字色（导航悬停、选中、危险按钮都自动对上）。
 *
 * 用法：<span class="ic ic-plus"></span>；尺寸用 .ic-14 / .ic-18 改。
 * 规范：24 网格、1.7 描边、圆头圆角，新增图标照这个画，别混线的粗细。
 * 注意 data-uri 里 # 必须写成 %23，否则整条声明作废（且不报错，只静默失效）。
 */
.ic{display:inline-block;width:16px;height:16px;flex:0 0 auto;background:currentColor;
  -webkit-mask:var(--ic) center/contain no-repeat;mask:var(--ic) center/contain no-repeat;
  vertical-align:-3px}
.ic-14{width:14px;height:14px;vertical-align:-2px}
.ic-18{width:18px;height:18px;vertical-align:-4px}
.ic-22{width:22px;height:22px;vertical-align:-5px}

/* --- 按钮里的图标（v0.8.44） ---
 * .btn 本来就是 inline-flex + gap:6px，图标直接当子元素即可，不用再补间距；
 * 尺寸比字号略大一点（13px 字配 15px 图、12px 字配 13px 图），描边才不会被压细。
 * 危险按钮给 .8 的不透明度：红底上的红图标本来就闷，压一点更沉，别压到看不清。 */
.btn .ic{width:15px;height:15px;vertical-align:0}
.btn-sm .ic{width:13px;height:13px}
.btn-danger .ic{opacity:.85}

/* --- 导航 --- */
.nav a .ic{width:17px;height:17px;opacity:.9;transition:opacity .14s}
.nav a:hover .ic{opacity:1}
.nav a.on .ic{opacity:1}

/* --- 侧栏菜单图标 --- */
.ic-dashboard{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16v6H4zM4 14h7v6H4zM15 14h5v6h-5z'/%3E%3C/svg%3E")}
.ic-plan{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h16v14H4zM8 3v4M16 3v4M4 10h16M9 15l2 2 4-4'/%3E%3C/svg%3E")}
.ic-analysis{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19h16M6 15l4-5 3 3 5-7'/%3E%3C/svg%3E")}
.ic-ledger{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h13v18H6a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2zM9 8h7M9 12h7M9 16h4'/%3E%3C/svg%3E")}
.ic-projects{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7h6l2 2h10v10H3zM3 7v12'/%3E%3C/svg%3E")}
.ic-costs{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18M9 8l3 4 3-4M12 12v6M9.5 13.5h5M9.5 16.5h5'/%3E%3C/svg%3E")}
.ic-purchases{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4h2l2.3 10.3a1.6 1.6 0 0 0 1.6 1.3h8.2a1.6 1.6 0 0 0 1.6-1.3L20.5 8H6M10 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2M17.5 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2'/%3E%3C/svg%3E")}
.ic-payments{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7h18v11H3zM3 7l2-3h14l2 3M16 12.5h3'/%3E%3C/svg%3E")}
.ic-expenses{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h12v18l-3-2-3 2-3-2-3 2zM9 8h6M9 12h6'/%3E%3C/svg%3E")}
.ic-contracts{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3h7l4 4v14H7zM14 3v4h4M10 13h5M10 17h3'/%3E%3C/svg%3E")}
.ic-market{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3a9 9 0 1 0 9 9h-9zM12 3v9h9'/%3E%3C/svg%3E")}
.ic-reviews{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4h14v16H5zM9 12l2 2 4-4'/%3E%3C/svg%3E")}
.ic-inbox{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16l2 7v7H2v-7zM2 12h6l2 3h4l2-3h6'/%3E%3C/svg%3E")}
.ic-assistant{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 3l1.8 4.9L17.7 9.7l-4.9 1.8L11 16.4l-1.8-4.9L4.3 9.7l4.9-1.8zM18.4 15.4l.7 1.8 1.8.7-1.8.7-.7 1.8-.7-1.8-1.8-.7 1.8-.7z'/%3E%3C/svg%3E")}
.ic-settings{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7h18M3 17h18M12 7a2.4 2.4 0 1 1-4.8 0 2.4 2.4 0 0 1 4.8 0M16.8 17a2.4 2.4 0 1 1-4.8 0 2.4 2.4 0 0 1 4.8 0'/%3E%3C/svg%3E")}

/* --- 通用动作图标 --- */
.ic-plus{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E")}
.ic-download{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11M8 11l4 4 4-4M5 20h14'/%3E%3C/svg%3E")}
.ic-check{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12l5 5L20 6'/%3E%3C/svg%3E")}
.ic-clock{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18M12 8v5l3 2'/%3E%3C/svg%3E")}
.ic-search{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.5 18a7.5 7.5 0 1 0 0-15 7.5 7.5 0 0 0 0 15M20 20l-4.2-4.2'/%3E%3C/svg%3E")}
.ic-user{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8M4.5 21a7.5 7.5 0 0 1 15 0'/%3E%3C/svg%3E")}

/* --- 按钮动作图标（v0.8.44）
 * 只给「高频、有明确语义」的动作配图标：新建/提交/通过/驳回/撤回/保存/导出/上传/付款。
 * 同一动作全站同一个图标——新建永远是 +，通过永远是 ✓，驳回永远是 ×，
 * 别出现「这里用 ✓ 表示保存、那里用 ✓ 表示通过」这种要多想一步的事。
 * 「查看/详情」在表格行里出现几十次，一律不加图标（加了满屏眼睛，反而看不清哪颗能推进单据）。
 */
.ic-x{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E")}
.ic-send{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 3L10.5 13.5M21 3l-6.7 18.5L10.5 13.5 2.5 9.8z'/%3E%3C/svg%3E")}
.ic-undo{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 14.5L4.5 10 9 5.5M4.5 10H14a5.5 5.5 0 0 1 0 11h-3'/%3E%3C/svg%3E")}
.ic-save{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4h11l3 3v13H5zM8.5 4v6h7V4M8.5 20v-5.5h8V20'/%3E%3C/svg%3E")}
.ic-upload{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20V6.5M7.5 11L12 6.5 16.5 11M4.5 20h15'/%3E%3C/svg%3E")}
.ic-edit{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h4L19 9l-4-4L4 16zM14 6l4 4'/%3E%3C/svg%3E")}
.ic-trash{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M9.5 7V4h5v3M6.5 7l1 13h9l1-13M10 11v5.5M14 11v5.5'/%3E%3C/svg%3E")}
.ic-eye{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.5 12s4.2-7.5 10.5-7.5S22.5 12 22.5 12 18.3 19.5 12 19.5 1.5 12 1.5 12zM15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0'/%3E%3C/svg%3E")}
.ic-archive{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 4.5h17v4h-17zM5.5 8.5v11h13v-11M10 12.5h4'/%3E%3C/svg%3E")}
.ic-lock{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 11h12v9H6zM8.5 11V8a3.5 3.5 0 0 1 7 0v3'/%3E%3C/svg%3E")}
.ic-cash{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 7h19v10h-19zM12 15.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7'/%3E%3C/svg%3E")}
