/* ============================================================
   业务结算系统 · 样式表（浅色主题）
   ============================================================ */
:root {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #fafbfd;
  --border: #e4e8f0;
  --border-strong: #d3dae6;
  --text: #1c2536;
  --text-2: #4a5568;
  --muted: #8b95a7;
  --primary: #2f6fed;
  --primary-soft: #eaf1fe;
  --primary-dark: #1f56c9;
  --green: #12a15c;
  --green-soft: #e6f7ef;
  --red: #e0393e;
  --red-soft: #fdecec;
  --amber: #d78a06;
  --amber-soft: #fff5e2;
  --purple: #7c4ddb;
  --purple-soft: #f2ecfe;
  --teal: #0d9a9a;
  --teal-soft: #e3f6f6;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(24, 39, 75, .05), 0 4px 16px rgba(24, 39, 75, .05);
  --shadow-lg: 0 8px 40px rgba(24, 39, 75, .14);
  --sidebar-w: 220px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

/* ---------------- 布局 ---------------- */
#app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.brand { padding: 20px 18px 16px; display: flex; align-items: center; gap: 10px; }
/* 品牌头像（鸿禧 · 方案C「恒流」）：设计稿自带圆角方形，只脱掉了白底，
   所以这里不写 border-radius —— 让图里的圆角自己等比缩放，34px 到 78px 都不走形。 */
.brand .brandimg { width: 34px; height: 34px; flex: 0 0 34px; display: block; }
.brand .bt { min-width: 0; }
.brand .name { font-weight: 650; font-size: 14.5px; line-height: 1.25; }
.brand .sub { font-size: 11px; color: var(--muted); margin-top: 1px; }
/* 侧栏品牌区格言（用户 09-18 20:39 定案 · 方案 A：两行小字）
   ★ 字号 10px 是**按可用宽度算过的**：侧栏 220 - 左右 padding 36 - 头像 34 - 两个 gap 20
     - 收起按钮 26 = 104px；「鸿启万象 · 禧伴同行」10px 下约 96px，留 8px 余量。
     故意**不写 white-space:nowrap** —— 万一日后字体/字号有变，宁可它自己折行，
     也不要横向溢出把侧栏撑出滚动条。 */
.brand .sb-motto { margin-top: 3px; display: flex; flex-direction: column; gap: 1px; }
.brand .sb-motto span {
  font-size: 10px; line-height: 1.5; color: var(--muted); letter-spacing: .3px;
}

/* 侧栏折叠：按钮 + 收起态 */
.brand .toggle {
  margin-left: auto; width: 26px; height: 26px; flex: 0 0 26px;
  border-radius: 7px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-2);
  cursor: pointer; font-size: 13px; line-height: 1; display: grid; place-items: center;
}
.brand .toggle:hover { background: var(--surface-2); color: var(--text); }
.sidebar { transition: width .16s ease, flex-basis .16s ease; }
.sidebar.collapsed { width: 62px; flex: 0 0 62px; }
.sidebar.collapsed .brand { padding: 16px 0 12px; flex-direction: column; gap: 9px; }
.sidebar.collapsed .brand .bt { display: none; }
/* 折叠成 62px 时放不下格言（.bt 整体已隐藏，这条是二次保险） */
.sidebar.collapsed .brand .sb-motto { display: none; }
.sidebar.collapsed .brand .toggle { transform: rotate(180deg); margin-left: 0; }
.sidebar.collapsed .nav { padding: 4px 8px; }
.sidebar.collapsed .nav-group {
  height: 1px; padding: 0; margin: 10px 6px; background: var(--border);
  font-size: 0; letter-spacing: 0; overflow: hidden;
}
.sidebar.collapsed .nav-item { justify-content: center; padding: 10px 0; gap: 0; }
.sidebar.collapsed .nav-item .t { display: none; }
.sidebar.collapsed .sidebar-foot { text-align: center; padding: 12px 4px; }
.sidebar.collapsed .sidebar-foot .txt { display: none; }

.nav { padding: 6px 10px; flex: 1; overflow-y: auto; min-height: 0; }
/* ⚠️ min-height:0 不能省 —— flex 子项默认 min-height:auto，菜单变多时
   它会被内容撑高，把侧栏底部的状态栏顶出去（v0.4.0 加了「系统」组后才暴露） */
.nav-group { font-size: 11px; color: var(--muted); padding: 10px 10px 5px; letter-spacing: .06em; }
.nav-item {
  display: flex; align-items: center; gap: 9px;
  /* ⚠️ v0.4.0 加了「系统」组后菜单变长，9px 会让最后一项落到滚动区外
     （默认看不见「用户与权限」）→ 收到 8px，15 项省下 30px，刚好放得下 */
  padding: 8px 11px; border-radius: var(--radius-sm);
  color: var(--text-2); cursor: pointer; user-select: none;
  margin-bottom: 2px; transition: background .12s, color .12s;
  font-size: 13.5px;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav-item .ico { width: 17px; text-align: center; font-size: 14px; }

.sidebar-foot { padding: 12px; border-top: 1px solid var(--border); font-size: 11px; color: var(--muted); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.dot.on { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.dot.off { background: #c8cfdb; }
.dot.warn { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 58px; flex: 0 0 58px;
  background: rgba(255,255,255,.86); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px; padding: 0 22px;
  position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 16px; margin: 0; font-weight: 650; }
.topbar .spacer { flex: 1; }
.content { padding: 20px 22px 40px; flex: 1; }

/* ---------------- 通用组件 ---------------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-head {
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.card-head h3 { margin: 0; font-size: 14px; font-weight: 650; }
.card-head .sub { font-size: 12px; color: var(--muted); }
.card-head .spacer { flex: 1; }
.card-body { padding: 16px 18px; }
.card-body.tight { padding: 10px 14px; }

.grid { display: grid; gap: 16px; }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-21 { grid-template-columns: 2fr 1fr; }
@media (max-width: 1180px) { .g-4 { grid-template-columns: repeat(2, 1fr); } .g-21 { grid-template-columns: 1fr; } }
@media (max-width: 820px) { .g-4, .g-3, .g-2 { grid-template-columns: 1fr; } }

.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.kpi .label { font-size: 12.5px; color: var(--muted); }
.kpi .value { font-size: 25px; font-weight: 680; letter-spacing: -.5px; line-height: 1.15; }
.kpi .foot { font-size: 11.5px; color: var(--muted); }
.kpi .bar { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.kpi.blue .bar { background: var(--primary); } .kpi.blue .value { color: var(--primary); }
.kpi.green .bar { background: var(--green); } .kpi.green .value { color: var(--green); }
.kpi.red .bar { background: var(--red); } .kpi.red .value { color: var(--red); }
.kpi.amber .bar { background: var(--amber); } .kpi.amber .value { color: var(--amber); }
.kpi.purple .bar { background: var(--purple); } .kpi.purple .value { color: var(--purple); }
.kpi.teal .bar { background: var(--teal); } .kpi.teal .value { color: var(--teal); }

.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  padding: 7px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text-2); cursor: pointer; transition: all .13s; white-space: nowrap;
  font-size: 13px;
}
.btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn.danger:hover { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.btn.sm { padding: 4px 9px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.input, select.input, textarea.input {
  width: 100%; padding: 8px 11px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); outline: none;
  transition: border-color .13s, box-shadow .13s;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.input.sm { padding: 6px 9px; font-size: 13px; }
label.field { display: block; margin-bottom: 12px; }
label.field > span { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 5px; font-weight: 550; }
/* ---------------- 工具栏 / 筛选栏（R4-16：一行放下，其余折叠） ----------------
   背景：旧规则 `.toolbar{flex-wrap:wrap}` + `input{min-width:180px}` 会把**日期框也撑到 180px**
   （日期文字只需 ~100px），一行放不下就零散折行 —— 就是用户说的「叠行、占地方」。
   实测（1440 逻辑分辨率，内容区可用宽约 1176px）：垫付台账需要 1468px、经销商结算台账 1606px。
   现在改成：筛选区可收缩、操作区不压缩并靠右、次要筛选与次要操作收进「⋯ 更多」。 */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .grow { flex: 1; min-width: 160px; }
.toolbar .input, .toolbar select { width: auto; }
/* ① 去掉 180px 硬下限：日期框按内容宽，文本输入框（搜索）改弹性吃剩余空间 */
.toolbar input.input { min-width: 0; }
.toolbar input[type="date"].input { width: 138px; flex: 0 0 auto; }
/* ★ R4-52：对账明细表的查询框改成「月份」→ 月份框也要定宽，否则会落到下面
   :not([type=date]) 的弹性规则上被拉长/压扁（预览稿里已验过） */
.toolbar input[type="month"].input { width: 148px; flex: 0 0 auto; }
.toolbar input.input:not([type="date"]):not([type="month"]) { flex: 1 1 160px; min-width: 104px; max-width: 280px; }
.toolbar select.input { flex: 0 1 auto; }
/* ② 分组：筛选区吸收剩余宽度；操作区固定宽、靠右，不被压缩 */
.toolbar .tb-filters { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; }
.toolbar .tb-acts { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; margin-left: auto; }

/* ③「⋯ 更多」折叠面板：放次要筛选条件 + 次要操作（点开全都在，功能不删） */
.tb-more { position: relative; flex: 0 0 auto; }
.tb-more .menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; display: none;
  min-width: 224px; padding: 6px; background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: var(--shadow-lg);
}
.tb-more.open .menu { display: block; }
.tb-more .menu .grp { font-size: 11px; color: var(--muted); padding: 7px 10px 5px; letter-spacing: .04em; }
.tb-more .menu .mi {
  display: flex; align-items: center; gap: 7px; width: 100%; text-align: left;
  padding: 8px 10px; border: none; background: none; border-radius: 7px;
  font-size: 12.5px; color: var(--text-2); cursor: pointer; white-space: nowrap;
}
.tb-more .menu .mi:hover { background: var(--surface-2); color: var(--text); }
.tb-more .menu .sep { height: 1px; background: var(--border); margin: 5px 4px; }
.tb-more .menu .fld { display: block; padding: 2px 10px 8px; }
.tb-more .menu .fld > span { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.tb-more .menu select.input, .tb-more .menu input.input { width: 100%; max-width: none; flex: none; min-width: 0; }
.tb-more .menu .chk {
  display: flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 7px;
  font-size: 12.5px; color: var(--text-2); cursor: pointer;
}
.tb-more .menu .chk:hover { background: var(--surface-2); color: var(--text); }
/* 折叠面板里的「按月/按周/按日」分段控件（本页原来没有样式，顺手补上） */
.tb-more .menu .tabs { display: flex; gap: 0; padding: 2px 10px 8px; }
.tb-more .menu .tabs .tb {
  flex: 1; padding: 6px 0; font-size: 12.5px; cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2);
}
.tb-more .menu .tabs .tb + .tb { border-left: none; }
.tb-more .menu .tabs .tb:first-child { border-radius: 7px 0 0 7px; }
.tb-more .menu .tabs .tb:last-child { border-radius: 0 7px 7px 0; }
.tb-more .menu .tabs .tb.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th {
  text-align: left; padding: 10px 13px; color: var(--muted); font-weight: 600;
  font-size: 12px; background: var(--surface-2); border-bottom: 1px solid var(--border);
  white-space: nowrap; position: sticky; top: 0;
}
table.tbl td { padding: 10px 13px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.tbl tbody tr:hover { background: var(--surface-2); }
table.tbl tbody tr:last-child td { border-bottom: none; }

/* 台账滚动区：给容器限高，表头才能真的钉住（只写 th{position:sticky} 而容器不限高是无效的） */
.ledger-scroll {
  max-height: calc(100vh - 268px); min-height: 240px;
  overflow: auto; overscroll-behavior: contain;
}
/* ★ R4-72（用户 2026-10-09）：台账两类特殊行上底色 —— 一眼看出「充值」与「用充值抵扣」。
   浅绿 = 充值行（客户预付款）、浅蓝 = 用充值余额抵扣的发放行（客户自己的钱付的，结欠不增长）。
   ⚠️ 要盖住斑马纹 → 用 tr.xxx td 提高优先级（与 .ins-repay 同一手法）。 */
.ledger-scroll .tbl.compact tr.ins-charge td { background: #e6f7ef; }
.ledger-scroll .tbl.compact tr.ins-credit td { background: #e9f2ff; }
/* ★ R4-98b（2026-10-17 用户 15:33）：「**还款数据的底色要与充值不同**，以便区分」。
   原来是：充值=浅绿、用充值抵扣的发放行=浅蓝，**还款行根本没定义**（全白）。
   ⇒ 还款行用**浅黄**，左边再压一道色条，三种行一眼分得开。 */
.ledger-scroll .tbl.compact tr.ins-repay td { background: #fff6e2; }
.ledger-scroll .tbl.compact tr.ins-repay td:first-child {
  box-shadow: inset 3px 0 0 #c08a2e;
}
.ledger-scroll .tbl.compact tr.ins-charge td:first-child {
  box-shadow: inset 3px 0 0 #3b8a54;
}
.ledger-scroll thead th {
  position: sticky; top: 0; z-index: 3;
  box-shadow: inset 0 -1px 0 var(--border-strong, #ccd4e0), 0 2px 6px rgba(20, 35, 60, .06);
}

/* ★ R4-71d（用户 2026-10-09）：台账「合计行」—— 与表头一样**常驻（吸底）**，
   滚到哪都看得见合计。背景必须不透明，否则滚过去的行会透出来。 */
/* ⚠️ 吸底必须写在 <tfoot> 上：写在 <td> 上会被限制在自己那一行盒内、抬不起来（实测过） */
.ledger-scroll tfoot { position: sticky; bottom: 0; z-index: 3; }
.ledger-scroll tfoot td {
  background: var(--surface-2);          /* 必须不透明，否则滚过去的行会透出来 */
  font-weight: 600;
  box-shadow: inset 0 1px 0 var(--border-strong), 0 -2px 6px rgba(20, 35, 60, .05);
}
.ledger-scroll tfoot td.tot-label { font-weight: 650; color: var(--text); }
/* 合计行下面的口径脚注（累计类列显示期末数、不累加） */
.foot-note {
  margin: 6px 10px 2px; padding-top: 7px;
  border-top: 1px solid var(--border);
  font-size: 11.5px; line-height: 1.7; color: var(--muted);
}

/* 明细下方的汇总区标题 */
.sum-head {
  display: flex; align-items: baseline; gap: 10px;
  margin: 20px 2px 10px; font-size: 13px; font-weight: 650; color: var(--text);
}
.sum-head .muted { font-weight: 400; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.empty { padding: 46px 20px; text-align: center; color: var(--muted); }
.empty .big { font-size: 30px; opacity: .35; display: block; margin-bottom: 8px; }

.pager { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }
.pager .spacer { flex: 1; }
.pager button { padding: 4px 10px; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; }
.pager button:disabled { opacity: .45; cursor: not-allowed; }

.tag { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.tag.gray { background: #eef1f6; color: var(--text-2); }
.tag.blue { background: var(--primary-soft); color: var(--primary); }
.tag.green { background: var(--green-soft); color: var(--green); }
.tag.red { background: var(--red-soft); color: var(--red); }
.tag.amber { background: var(--amber-soft); color: var(--amber); }
.tag.purple { background: var(--purple-soft); color: var(--purple); }
.tag.teal { background: var(--teal-soft); color: var(--teal); }

/* ---------------- 图表 ---------------- */
.chart-box { width: 100%; height: 260px; position: relative; }
.chart-box canvas { width: 100%; height: 100%; display: block; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-2); padding: 0 18px 4px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; }

.bar-list { display: flex; flex-direction: column; gap: 11px; }
.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 12.5px; }
.bar-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.bar-row .vl { font-variant-numeric: tabular-nums; color: var(--text); font-weight: 600; }
.bar-track { grid-column: 1 / -1; height: 6px; border-radius: 4px; background: #eef1f6; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #2f6fed, #7aa5f7); }

/* ---------------- 群聊 ---------------- */
.chat-shell { display: flex; flex-direction: column; height: calc(100vh - 160px); min-height: 420px; }
.chat-head { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.chat-head .avatar { width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(135deg,#12a15c,#3ecf8e); color: #fff; display: grid; place-items: center; font-size: 15px; }
.chat-head .t { font-weight: 620; font-size: 13.5px; }
.chat-head .s { font-size: 11.5px; color: var(--muted); }
.chat-log { flex: 1; overflow-y: auto; padding: 18px; background: #f0f2f5; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 9px; max-width: 78%; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg .avatar { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 8px; display: grid; place-items: center; font-size: 14px; color: #fff; }
.msg.bot .avatar { background: linear-gradient(135deg,#12a15c,#3ecf8e); }
.msg.me .avatar { background: linear-gradient(135deg,#2f6fed,#6f9bff); }
.msg .bubble {
  background: var(--surface); border-radius: 10px; padding: 10px 13px;
  box-shadow: 0 1px 2px rgba(0,0,0,.06); line-height: 1.62; font-size: 13.5px;
  word-break: break-word; white-space: pre-wrap;
}
.msg.me .bubble { background: #d6f5c8; }
.msg .bubble code { background: #eef1f6; padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.msg .bubble b, .msg .bubble strong { font-weight: 680; }
.msg .bubble .sys { color: var(--muted); font-size: 12px; }
.chat-time { text-align: center; font-size: 11px; color: var(--muted); }
.chat-input { border-top: 1px solid var(--border); padding: 12px; display: flex; gap: 9px; background: var(--surface); align-items: flex-end; }
.chat-input textarea { flex: 1; resize: none; height: 42px; max-height: 120px; line-height: 1.5; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border-strong); outline: none; }
.chat-input textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

.quick-cmds { display: flex; gap: 7px; flex-wrap: wrap; padding: 0 2px 10px; }
.chip {
  padding: 4px 11px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border-strong);
  font-size: 12px; cursor: pointer; color: var(--text-2); transition: all .12s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

/* ---------------- 文件库 ---------------- */
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 14px; }
.file-card {
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: var(--surface); cursor: pointer; transition: all .15s; display: flex; flex-direction: column;
}
.file-card:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.file-thumb { height: 116px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; position: relative; }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-thumb .ph { font-size: 30px; opacity: .75; }
.file-meta { padding: 9px 11px; border-top: 1px solid var(--border); }
.file-meta .fn { font-size: 12.5px; font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta .fs { font-size: 11px; color: var(--muted); margin-top: 3px; display: flex; justify-content: space-between; gap: 6px; }
.dropzone {
  border: 2px dashed var(--border-strong); border-radius: var(--radius); padding: 26px;
  text-align: center; color: var(--muted); transition: all .15s; cursor: pointer; background: var(--surface-2);
}
.dropzone.hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }

/* ---------------- 弹窗 ---------------- */
.mask {
  position: fixed; inset: 0; background: rgba(20, 28, 45, .45); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 24px;
  animation: fade .14s ease;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.99) } to { opacity: 1; transform: none } }
.modal {
  background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 620px; max-height: 90vh; display: flex; flex-direction: column;
  animation: pop .16s ease;
}
.modal.wide { max-width: 940px; }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; }
.modal-head h3 { margin: 0; font-size: 15px; font-weight: 650; }
.modal-head .x { margin-left: auto; cursor: pointer; color: var(--muted); font-size: 20px; line-height: 1; padding: 0 4px; }
.modal-head .x:hover { color: var(--text); }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }

/* ---------------- 提示 ---------------- */
#toasts { position: fixed; top: 18px; right: 18px; z-index: 300; display: flex; flex-direction: column; gap: 9px; }
/* ★ 09-16 用户：保存成功的提示要**毛玻璃**效果，且 2 秒自动关闭（时长在 app.js 的 toast()） */
.toast {
  padding: 11px 16px; border-radius: 9px;
  background: rgba(255, 255, 255, .68);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .62);
  border-left: 3px solid var(--primary);
  box-shadow: var(--shadow-lg);
  font-size: 13px; animation: pop .18s ease; max-width: 380px;
}
.toast.ok { border-left-color: var(--green); }
.toast.err { border-left-color: var(--red); }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.mb0 { margin-bottom: 0; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt20 { margin-top: 20px; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex.wrap { flex-wrap: wrap; }
.right { margin-left: auto; }
.hr { height: 1px; background: var(--border); margin: 16px 0; }
.kv { display: grid; grid-template-columns: 92px 1fr; gap: 7px 12px; font-size: 13px; }
.kv .k { color: var(--muted); }

.spinner { width: 16px; height: 16px; border: 2px solid var(--border-strong); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg) } }

code.inline { background: #eef1f6; padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }

.steps { counter-reset: s; }
.steps > li { margin-bottom: 10px; line-height: 1.7; }
.steps > li::marker { color: var(--primary); font-weight: 700; }

pre.raw { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 12px; overflow: auto; font-size: 12px; max-height: 260px; }

/* ============================================================
   汽车经销商业务 · 补充样式
   ============================================================ */
.mt16 { margin-top: 16px; }
.nowrap { white-space: nowrap; }
.tbl td.nowrap { white-space: nowrap; }

/* 紧凑型表格（结算台账列较多） */
.tbl.compact th { padding: 8px 8px; font-size: 11.5px; white-space: nowrap; }
.tbl.compact td { padding: 7px 8px; font-size: 12.5px; }
.tbl.compact .btn.sm { padding: 3px 7px; font-size: 11.5px; }
.tbl.compact td.acts { white-space: normal; line-height: 2.1; }

/* ★ 2026-09-20 用户：「目前备注的行间距有点小，内容看不清」
   → **保险垫付台账**（`.ledger-scroll` 包着的那张）单独把行高放松一档：
     行高 40px → 46px；备注列也给它留够行距。
     水平 padding 同时从 8px 收到 6px —— **14 列能省 56px，而内容一个字都不用缩**
     （比压缩列宽划算得多），用来抵消横向溢出。
   ⚠️ 只影响这一张表 —— 经销商 / 费用的紧凑表不动 */
.ledger-scroll .tbl.compact th { padding: 9px 5px; }
.ledger-scroll .tbl.compact td { padding: 10px 5px; }
.ledger-scroll .tbl.compact td.ellip,
.ledger-scroll .tbl.compact td .ellip { line-height: 1.6; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ★ R4-31 经销商台账：操作列折叠成一行（用户 13:21：不要因为按钮换行影响查看） */
.tbl td.acts-fold { white-space: nowrap; line-height: 1.6; }
.actrow { display: flex; gap: 6px; align-items: center; }
.actrow .btn { padding: 3px 9px; font-size: 12px; line-height: 1.5; }
.amenu { margin-top: 5px; display: inline-flex; flex-direction: column; gap: 2px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 5px 14px rgba(0,0,0,.10); padding: 3px; min-width: 76px; }
.amenu[hidden] { display: none; }
.amenu button { border: 0; background: none; text-align: left; padding: 5px 9px;
  font-size: 12px; border-radius: 5px; cursor: pointer; color: var(--text-1);
  white-space: nowrap; }
.amenu button:hover { background: var(--surface-2); }
.amenu button.danger { color: var(--red); }
/* ★ R4-31 可发放金额有手工调整时的「调」小标 */
/* ★ R4-32 明细名称：长了好几个附件名也不撑出滚动条，超出截断、悬停看全 */
.tbl td.fname { max-width: 210px; }
.tbl td.fname a { color: inherit; }

/* ★ R4-33 明细名称列：第一个附件名（截断）+ 📎总数角标
   用户 2026-09-17 14:33：要能看出是几个附件，但**不换行、不占行高**。
   ⚠️ display:flex 不能直接写到 <td> 上（会破坏表格列宽计算），必须套一层 div。
   ⚠️ 角标必须放在「截断容器外面」—— 否则名字一长，角标会跟着被省略号裁掉。 */
.tbl td.fcell { max-width: 210px; }
.fbox { display: flex; align-items: center; gap: 6px; min-width: 0; line-height: 1.5; }
.fbox > .fname-ellip { flex: 1 1 auto; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; line-height: 1.5; }
/* flex 项会把上下 padding 算进高度（inline 元素不会）→ 压成与正文行盒等高，行高才一致 */
.fbox > .tag { flex: 0 0 auto; line-height: 1.5; padding: 0 8px; }
.fname-ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fname-hit { cursor: pointer; }
.fname-hit:hover { color: var(--primary); text-decoration: underline; }
.tag.cnt { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.tag-adj { display: inline-block; padding: 0 6px; margin-left: 4px; border-radius: 999px;
  font-size: 10.5px; font-weight: 650; vertical-align: 1px; cursor: help;
  background: #fdf3d8; color: #8a6100; border: 1px solid #f0d9a0; }

/* 详情弹窗的键值对 */
.kv .v { text-align: right; font-variant-numeric: tabular-nums; }
.kv .v.strong { font-weight: 700; }
.kv .v.warn { color: var(--amber); }
.kv .v.ok { color: var(--green); font-weight: 600; }
.kv .v.muted { color: var(--muted); }
.modal-body .kv { grid-template-columns: 128px 1fr; gap: 8px 12px; }
.modal-body .grid .kv { border-bottom: 1px dashed var(--border); padding-bottom: 6px; }
.modal-body .grid .kv:last-child { border-bottom: none; }

/* ---------------- 业务明细表（可打印） ---------------- */
.print-sheet {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 28px 20px;
}
.sheet-head { border-bottom: 2px solid var(--text); padding-bottom: 12px; margin-bottom: 16px; }
.sheet-head h2 { margin: 0 0 6px; font-size: 20px; letter-spacing: .5px; }
.sheet-sub { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 12.5px; color: var(--text-2); }
.sheet-sub b { color: var(--text); }

/* ---------------- 暂缓维护提示条（首页总览） ---------------- */
.freeze-note {
  display: flex; align-items: flex-start; gap: 8px;
  background: var(--amber-soft); color: #7a4e05;
  border: 1px solid #f0dcb4; border-left: 3px solid var(--amber);
  border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px;
  font-size: 12.5px; line-height: 1.7;
}
.freeze-note .ico { line-height: 1.5; }

@media print {
  .sidebar, .topbar, .toolbar, .no-print, #toasts, .modal-foot { display: none !important; }
  .main { margin-left: 0 !important; }
  .content { padding: 0 !important; overflow: visible !important; }
  body, html { background: #fff !important; height: auto !important; }
  .print-sheet { border: none !important; box-shadow: none !important; border-radius: 0 !important; padding: 0 !important; }
  .table-wrap { overflow: visible !important; max-height: none !important; }
  .tbl th, .tbl td { font-size: 10.5px !important; padding: 5px 6px !important; }
  @page { size: A4 landscape; margin: 10mm; }
}

/* ---------------- 保险业务 · 垫资台账 ---------------- */
/* ★ 还款行 = 淡黄底（2026-10-17 用户：要与**充值行的浅绿**区分开）。
   原来这里是淡绿半透明，和充值行几乎一样，肉眼分不出 ⇒ 改浅黄，见上面 .ledger-scroll 那段。 */
.tbl tr.ins-repay td { background: #fff6e2; }
.tbl tr.ins-repay:hover td { background: #fff0cf; }
.tbl td.strong { font-weight: 700; }
.tbl td .tag + span { margin-left: 6px; }

/* ============================================================
   登录与权限（登录页 / 安装向导 / 锁屏 / 我的账户）
   ------------------------------------------------------------
   ⚠️ 一律用 hx- 前缀，且**不改全局 --primary** ——
   登录页是浅橘，系统内部仍保持蓝色，两套配色互不干扰。
   ============================================================ */
html.hx-overlay-open, html.hx-overlay-open body { overflow: hidden; }
#authRoot { position: relative; z-index: 300; }

/* ---- 通用小控件（刻意不复用系统 .btn / .input，避免互相污染） ---- */
.hx-logo { display: block; object-fit: contain; flex: 0 0 auto; }
.hx-logo.lg { filter: drop-shadow(0 12px 22px rgba(160, 110, 70, .28)); }
.hx-brandrow { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.hx-bt { font-weight: 700; font-size: 17px; color: #3d2c20; letter-spacing: .5px; }
.hx-bs { font-size: 12px; color: #a8835f; margin-top: 3px; }
.hx-input {
  width: 100%; padding: 11px 13px; font-size: 14.5px; border-radius: 10px;
  border: 1px solid var(--border-strong); background: #fff; color: var(--text);
  font-family: inherit; letter-spacing: .5px; transition: .15s;
}
.hx-input:focus { outline: none; border-color: #e5915c; box-shadow: 0 0 0 3px rgba(233, 144, 90, .16); }
.hx-field { margin-bottom: 14px; }
.hx-field label { display: block; font-size: 12px; color: #a8835f; margin-bottom: 6px; }
.hx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; font-size: 14px; font-weight: 600; font-family: inherit;
  border-radius: 10px; border: 1px solid #eccfb5; background: #fff; color: #a4703f;
  cursor: pointer; transition: .16s; white-space: nowrap;
}
.hx-btn:hover { border-color: #e5915c; color: #c9682f; }
.hx-btn.primary {
  background: linear-gradient(135deg, #e8863f, #d9702f);
  border-color: #d9702f; color: #fff; box-shadow: 0 8px 20px -12px rgba(200, 105, 50, .7);
}
.hx-btn.primary:hover { background: linear-gradient(135deg, #d9702f, #c25f24); border-color: #c25f24; color: #fff; }
.hx-btn.danger { border-color: #f0c8c0; color: #b4452f; }
.hx-btn.danger:hover { background: #fdece7; border-color: #e0a494; color: #98341f; }
.hx-btn.sm { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }
.hx-btn.wide { width: 100%; margin-top: 6px; }
.hx-btn:disabled, .hx-fp:disabled { opacity: .6; cursor: default; }
.hx-alert { padding: 10px 13px; border-radius: 10px; font-size: 12.5px; line-height: 1.75; margin: 12px 0; }
.hx-alert.info { background: #fdf1e7; color: #b06a32; border: 1px solid #f2d9c4; }
.hx-alert.warn { background: #fdf0e0; color: #9a6320; border: 1px solid #f1d9b6; }
.hx-alert.err { background: #fdece7; color: #a8452b; border: 1px solid #f3cfc0; }
.hx-alert.ok { background: #e9f7f0; color: #16794c; border: 1px solid #c7ebd9; }
.hx-note { font-size: 11.5px; color: #b3957c; line-height: 1.8; margin-top: 14px; text-align: center; }
.hx-loading { color: var(--muted); font-size: 12.5px; padding: 8px 0; }
.hx-sep { height: 1px; margin: 22px 0 20px;
  background: linear-gradient(90deg, transparent, #efd6c1 18%, #efd6c1 82%, transparent); }

/* ---- 指纹按钮 ---- */
.hx-fp {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  border: 1px solid #f0d5bd; background: #fff; border-radius: var(--radius);
  padding: 13px 15px; cursor: pointer; transition: .16s; font-family: inherit;
  box-shadow: 0 8px 20px -14px rgba(190, 102, 50, .5);
}
.hx-fp:hover, .hx-fp.on { border-color: #e5915c; background: #fdf2e8; }
.hx-fp .hx-fpi {
  width: 44px; height: 44px; flex: 0 0 auto; border-radius: 12px; background: #fdeade;
  color: #d3702f; display: flex; align-items: center; justify-content: center;
}
.hx-fp .t1 { display: block; font-weight: 650; font-size: 14.5px; color: #402e20; }
.hx-fp .t2 { display: block; font-size: 11.5px; color: #ad8a68; margin-top: 4px; }
.hx-fp .hx-arr { color: #d9a279; font-size: 18px; flex: 0 0 auto; margin-left: auto; }
.hx-fp.big { padding: 15px 16px; }

/* ---- ① 安装向导 ---- */
/* ★ 暖色柔光底：三个全屏界面（向导 / 登录 / 锁屏）共用同一套「光斑 + 暖渐变」
   —— 毛玻璃卡片得背后有东西可"磨"，否则再透也只是块白板 */
.hx-setup {
  position: fixed; inset: 0; z-index: 300; overflow: auto;
  display: flex; align-items: center; justify-content: center; padding: 40px 22px;
  background:
    radial-gradient(760px 520px at 14% 6%, rgba(233, 144, 90, .34), transparent 60%),
    radial-gradient(680px 500px at 88% 94%, rgba(203, 150, 108, .30), transparent 58%),
    linear-gradient(168deg, #fffaf5 0%, #fdf0e3 52%, #fbe3d0 100%);
}
.hx-setup-card {
  width: 100%; max-width: 430px; color: #3d2c20;
  background: rgba(255, 255, 255, .66);
  backdrop-filter: blur(24px) saturate(150%); -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, .7); border-radius: 22px; padding: 30px 28px 22px;
  box-shadow: 0 28px 64px -32px rgba(150, 90, 50, .48), inset 0 1px 0 rgba(255, 255, 255, .85);
}
.hx-steps { display: flex; gap: 8px; margin-bottom: 22px; }
.hx-step {
  flex: 1; display: flex; align-items: center; gap: 7px; font-size: 12px;
  color: #c0a68f; padding: 8px 10px; border-radius: 9px; background: #fdf7f2;
}
.hx-step .n {
  width: 20px; height: 20px; flex: 0 0 auto; border-radius: 50%; font-size: 11.5px;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid #e7cdb6; color: #b8997d;
}
.hx-step.on { color: #c9682f; }
.hx-step.on .n { background: #e0864a; border-color: #e0864a; color: #fff; }
.hx-code {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 18px 0; padding: 18px 8px; border-radius: 14px; background: #fff8f1;
  border: 1px dashed #eec9a8; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 25px; font-weight: 700; letter-spacing: 3px; color: #c9682f;
}
.hx-code b { color: #ddb797; font-weight: 400; }
.hx-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #7d6650; cursor: pointer; margin: 4px 0 12px; }
.hx-check input { width: 16px; height: 16px; accent-color: #d9702f; }

/* ---- ② 登录页 ---- */
.hx-login {
  position: fixed; inset: 0; z-index: 300; overflow: auto;
  display: flex; align-items: center; justify-content: center; padding: 40px 22px;
  background:
    radial-gradient(760px 520px at 14% 6%, rgba(233, 144, 90, .34), transparent 60%),
    radial-gradient(680px 500px at 88% 94%, rgba(203, 150, 108, .30), transparent 58%),
    linear-gradient(168deg, #fffaf5 0%, #fdf0e3 52%, #fbe3d0 100%);
}
/* ★ 毛玻璃卡片（用户 09-16 13:35：原来是一整块淡橙平铺，太素） */
.hx-login-box {
  width: 100%; max-width: 392px;
  background: rgba(255, 255, 255, .52);
  backdrop-filter: blur(24px) saturate(155%); -webkit-backdrop-filter: blur(24px) saturate(155%);
  border: 1px solid rgba(255, 255, 255, .7); border-radius: 24px;
  padding: 32px 26px 24px;
  box-shadow: 0 28px 64px -32px rgba(150, 90, 50, .48), inset 0 1px 0 rgba(255, 255, 255, .85);
}
.hx-lc-brand { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.hx-lc-brand .name { font-weight: 700; font-size: 19px; letter-spacing: 2.5px; color: #43301f; }
.hx-motto { margin-top: 15px; display: flex; flex-direction: column; gap: 3px; text-align: center; }
.hx-motto span { font-size: 12.5px; line-height: 1.9; letter-spacing: 2.2px; color: #b8845d; }
/* ★ 毛玻璃卡片上的控件也要半透明，否则像在白卡片上贴了张纸 */
.hx-login-box .hx-input { border-color: rgba(238, 214, 194, .85); background: rgba(255, 253, 251, .66); }
.hx-login-box .hx-btn { border-color: rgba(236, 207, 181, .85); color: #a4703f; background: rgba(255, 255, 255, .58); }
.hx-login-box .hx-fp { background: rgba(255, 255, 255, .5); border-color: rgba(240, 213, 189, .85); }
.hx-login-box .hx-fp:hover, .hx-login-box .hx-fp.on { background: rgba(255, 249, 242, .78); }
.hx-links { margin-top: 13px; text-align: center; font-size: 12.5px; color: #a8835f; }
.hx-links span { cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.hx-links span:hover { color: #c9682f; }
.hx-foot { margin-top: 26px; text-align: center; font-size: 11.5px; color: #c3a992; }

/* ---- ③ 锁屏遮罩（深底，与登录页区分：这是"已经在系统里"的状态） ---- */
.hx-lock {
  position: fixed; inset: 0; z-index: 320; display: flex; align-items: center; justify-content: center;
  /* ★ 与登录页同一套「暖色柔光底」。
     但**底色是半透明的** —— 锁屏是盖在系统界面上的，得让背后虚化的内容透出来，
     否则毛玻璃就白做了（用户 09-16 13:43：锁屏也要淡橙色） */
  background:
    radial-gradient(760px 520px at 14% 6%, rgba(233, 144, 90, .34), transparent 60%),
    radial-gradient(680px 500px at 88% 94%, rgba(203, 150, 108, .30), transparent 58%),
    linear-gradient(168deg, rgba(255, 250, 245, .84) 0%, rgba(253, 240, 227, .84) 52%,
                    rgba(251, 227, 208, .84) 100%);
  backdrop-filter: blur(26px) saturate(150%); -webkit-backdrop-filter: blur(26px) saturate(150%);
}
/* ★ 白毛玻璃面板（与登录卡片同族） */
.hx-lock-card {
  width: 100%; max-width: 380px; text-align: center; padding: 34px 26px 28px;
  background: rgba(255, 255, 255, .52);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, .72); border-radius: 26px;
  box-shadow: 0 28px 64px -32px rgba(150, 90, 50, .46), inset 0 1px 0 rgba(255, 255, 255, .85);
}
.hx-clock { font-size: 62px; font-weight: 200; color: #43301f; letter-spacing: 1px; line-height: 1;
  font-variant-numeric: tabular-nums; }
.hx-date { color: #a8835f; font-size: 13.5px; margin-top: 10px; }
.hx-lock-av { width: 132px; height: 132px; margin: 24px auto 14px; }
.hx-lock-av .hx-logo { width: 132px; height: 132px; filter: drop-shadow(0 10px 24px rgba(190, 102, 50, .26)); }
.hx-uname { color: #3d2c20; font-size: 17px; font-weight: 650; }
.hx-ustate { color: #a8835f; font-size: 12.5px; margin-top: 5px; }
/* ★ 控件**不再**覆盖颜色 —— 回落到全局 .hx-btn / .hx-input（暖色系），与登录页一致 */
.hx-lock .hx-btn { margin-top: 24px; }
.hx-lock .hx-input { margin-top: 24px; text-align: center; }
.hx-lock .hx-alert { text-align: left; }
.hx-lnkrow { margin-top: 16px; display: grid; gap: 10px; justify-items: center; }
.hx-lnk { color: #a8835f; font-size: 12.5px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.hx-lnk:hover { color: #c9682f; }
.hx-hint { color: #b3957c; font-size: 11.5px; line-height: 1.7; }

/* ---- ④ 我的账户（顶栏胶囊 + 弹窗） ---- */
.whoami {
  display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 5px;
  border-radius: 999px; border: 1px solid transparent; cursor: pointer; transition: .15s;
}
.whoami:hover { background: var(--surface-2); border-color: var(--border); }
.whoami .brandimg { display: block; object-fit: contain; }
.whoami .wt { display: flex; flex-direction: column; line-height: 1.25; }
.whoami .wn { font-size: 12.5px; font-weight: 600; }
.whoami .wr { font-size: 10.5px; color: var(--muted); }

.hx-acct { position: fixed; inset: 0; z-index: 450; display: flex; align-items: center; justify-content: center; padding: 30px 20px; }
.hx-acct-mask { position: absolute; inset: 0; background: rgba(24, 39, 75, .34); backdrop-filter: blur(3px); }
.hx-acct-card {
  position: relative; width: 100%; max-width: 520px; max-height: 86vh; overflow: auto;
  background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg);
}
.hx-acct-card .hd {
  display: flex; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--surface); border-radius: 16px 16px 0 0; z-index: 2;
}
.hx-acct-card .hd h3 { margin: 0; font-size: 15px; font-weight: 650; }
.hx-acct-card .hd .x { margin-left: auto; cursor: pointer; color: var(--muted); font-size: 20px; line-height: 1; }
.hx-acct-card .hd .x:hover { color: var(--text); }
.hx-acct-card .bd { padding: 18px; }
.hx-acct-card .hx-alert { margin: 12px 0; }
.hx-acct-top { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.hx-acct-top .nm { font-size: 15.5px; font-weight: 650; }
.hx-acct-top .sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.hx-sec { margin-top: 18px; }
.hx-sec-t { font-size: 12px; font-weight: 650; color: var(--muted); margin-bottom: 8px; letter-spacing: .5px; }
.hx-rows { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.hx-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  font-size: 13px; border-bottom: 1px solid var(--border);
}
.hx-row:last-child { border-bottom: none; }
.hx-row > span:first-child { font-weight: 600; flex: 0 0 84px; }
.hx-row .muted { color: var(--muted); flex: 1; font-size: 12.5px; }
.hx-row .hx-btn { flex: 0 0 auto; }
.hx-logs { border: 1px solid var(--border); border-radius: 10px; padding: 6px 12px; max-height: 190px; overflow: auto; }
.hx-logrow { display: flex; align-items: center; gap: 9px; padding: 6px 0; font-size: 12.5px; border-bottom: 1px solid var(--border); }
.hx-logrow:last-child { border-bottom: none; }
.hx-lgtag { padding: 2px 7px; border-radius: 6px; font-size: 11px; background: var(--surface-2); color: var(--text-2); }
.hx-lgtag.ok { background: var(--green-soft); color: var(--green); }
.hx-lgtag.err { background: var(--red-soft); color: var(--red); }
.hx-lgm { color: var(--muted); font-size: 11.5px; }
.hx-lgt { margin-left: auto; color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }

/* ============================================================
   ★ v0.4.0（R4-17）用户与权限
   ============================================================ */
/* 单元格里的第二行小字（列表里跟在主文案下面的说明） */
.sub2 { display: block; font-size: 11px; color: var(--muted); font-weight: 400; margin-top: 2px; }

/* 「说明」块：左窄右宽的条目式排版 */
.spec { font-size: 13px; }
.spec .row { display: flex; gap: 14px; padding: 9px 0; border-bottom: 1px dashed var(--border); }
.spec .row:last-child { border-bottom: none; }
.spec .k { flex: 0 0 100px; color: var(--muted); font-weight: 600; }
.spec .v { flex: 1; line-height: 1.75; min-width: 0; }

/* 角色选择条 */
.roleline { display: flex; flex-wrap: wrap; gap: 10px; }
.rhead {
  flex: 0 1 210px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 13px; cursor: pointer; background: var(--surface-2);
  transition: border-color .14s, background .14s;
}
.rhead:hover { border-color: var(--border-strong); }
.rhead.on { border-color: var(--primary); background: var(--primary-soft); }
.rhead .rn { font-size: 13.5px; font-weight: 650; display: flex; align-items: center; gap: 6px; }
.rhead .rd { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

/* 权限矩阵的勾选框 */
.tbl td input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; }
.tbl td input[type="checkbox"]:disabled { cursor: default; opacity: .5; }

/* 页签条不换行 */
#permTabs .btn { white-space: nowrap; }


/* ==========================================================================
   费用业务 · 费用结算台账（R4-18 第 3 轮）
   —— 主子两张表共用**同一套列网格**：前 N 列合计相同 + 操作列等宽
      → 操作列严格上下对齐（用户 09-15 23:05 明确要求，别改回 auto 宽度）
   ========================================================================== */
.fee-biz-tbl { table-layout: fixed; }
.fee-biz-tbl th, .fee-biz-tbl td { padding: 8px 7px; font-size: 12px; }
.fee-biz-tbl .btn.sm { padding: 4px 7px; }
.fee-ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fee-sub-wrap { background: #f7f9fc; }
.fee-sub-tbl { table-layout: fixed; width: 100%; }
.fee-sub-tbl th { padding: 8px 10px; font-size: 12px; box-sizing: border-box; }
.fee-sub-tbl td { padding: 10px; font-size: 12.5px; box-sizing: border-box; }
.fee-sub-tbl .btn.sm { padding: 4px 9px; font-size: 12px; }
.fee-sub-tip { padding: 8px 12px 10px; font-size: 12px; color: var(--muted); line-height: 1.8; }
.fee-amt-recv { color: #1a56db; font-weight: 650; }
.fee-amt-pay { color: #b45309; font-weight: 650; }
.fee-amt-back { color: #047857; font-weight: 650; }
.fee-mk { font-size: 10px; color: var(--muted); background: #eef1f6;
  border-radius: 6px; padding: 1px 5px; margin-left: 6px; vertical-align: 1px; }
.fee-cnt { margin-left: 3px; font-size: 11px; }
/* 「⋯ 更多」菜单：表格外层是 overflow 容器，必须 position:fixed + 由 JS 定位 */
.fee-menu { position: fixed; z-index: 60; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); padding: 4px; min-width: 140px; }
.fee-menu button { display: block; width: 100%; text-align: left; border: 0; background: none;
  padding: 7px 10px; font-size: 13px; border-radius: 6px; cursor: pointer;
  color: var(--text); font-family: inherit; }
.fee-menu button:hover { background: #f1f5f9; }
.fee-menu button.danger { color: var(--red); }
.fee-att-tag { font-size: 11px; border-radius: 6px; padding: 1px 6px; }
.fee-auto-box { background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px; }
.fee-auto-box .kv { padding: 4px 0; }

/* ===== 费用分析表（第 4 轮）· 三块看板 ===== */
.fee-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(182px, 1fr)); gap: 12px; }
.fee-kpi { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px;
  background: var(--surface-2); }
.fee-kpi .lb { font-size: 12px; color: var(--muted); }
.fee-kpi .vv { font-size: 20px; font-weight: 700; letter-spacing: -.3px; margin: 4px 0 2px; }
.fee-kpi .ft { font-size: 11px; color: var(--muted); line-height: 1.65; }
.fee-kpi.amber .vv { color: var(--amber); }
.fee-kpi.blue  .vv { color: var(--primary); }
.fee-kpi.green .vv { color: var(--green); }
/* 合作周期（两行：日期区间 + 天数） */
.fee-period { font-size: 11.5px; color: var(--text-2); line-height: 1.7; white-space: nowrap; }
.fee-warn { color: var(--amber); font-weight: 650; }
.fee-overdue { color: var(--red); font-weight: 650; }
/* 表格底部的合计行 */
.tbl tfoot td { background: var(--surface-2); border-top: 1px solid var(--border-strong);
  font-weight: 600; }

/* ★ R4-29 补发与待补发（保险垫付台账） */
.ins-pend { color: var(--amber); font-weight: 650; }
.ins-retry { font-size: 10.5px; color: #7a3d00; background: #fff3e0;
  border: 1px solid #ffd8a8; border-radius: 5px; padding: 0 5px; margin-right: 5px;
  vertical-align: 1px; white-space: nowrap; }

/* ★ R4-30 支付明细表「到账行」（随台账还款行自动生成 · 收/付两条线各自成行） */
table.tbl th.incol { background: #eaf7f0; color: #1c6b45; }
table.tbl tbody tr.inrow td { background: #f2faf5; }
table.tbl tbody tr.inrow:hover td { background: #e8f5ee; }
table.tbl tbody tr.inrow td.strong { color: var(--text); }
/* ⚠️「未补录」不等于 0：代收方没填时通道费是「未知」，一律显示成橙色提示 */
.pend { color: var(--amber); font-weight: 650; }
.ins-rate2 { font-size: 10.5px; color: var(--muted); margin-left: 4px; }
/* 列变多了（16 列）：操作列吸右，横向滚动时始终可见 —— 必须给背景色，否则透字 */
table.tbl th.stickr, table.tbl td.stickr { position: sticky; right: 0; z-index: 2; }
table.tbl th.stickr { background: var(--surface-2); }
table.tbl td.stickr { background: #fff; box-shadow: -6px 0 8px -6px rgba(20, 30, 60, .18); }
table.tbl tbody tr.payrow td.stickr { background: #fbe9c8; }
table.tbl tbody tr.inrow td.stickr { background: #f2faf5; }
/* 手工登记的支付行：整行米黄（原先只在预览稿里定义过，系统里缺这一段） */
table.tbl tbody tr.payrow td { background: #fdf4e3; }
table.tbl tbody tr.payrow:hover td { background: #f9edd8; }
/* 补录弹窗里的计算行 */
.calc-line { display: flex; justify-content: space-between; font-size: 12.5px; padding: 3px 0; }
.calc-line.total { border-top: 1px dashed var(--border); margin-top: 5px; padding-top: 7px; }

/* ---- R4-41 测试环境横幅（正式环境不显示）---- */
#envBanner { position: fixed; top: 0; left: 0; right: 0; z-index: 99999;
  background: linear-gradient(90deg, #d78a06, #e5a52c); color: #fff;
  text-align: center; font-size: 12.5px; padding: 5px 12px; letter-spacing: .2px;
  box-shadow: 0 1px 8px rgba(120, 80, 0, .28); }
#envBanner b { font-weight: 700; }
body.has-env-banner { padding-top: 28px; }
body.has-env-banner .sidebar { top: 28px; height: calc(100vh - 28px); }
body.has-env-banner .topbar { top: 28px; }
body.has-env-banner .hx-login, body.has-env-banner .hx-lock { padding-top: 28px; }

/* ============================================================
   总览 · 日常（R4-39 日常工作台 / R4-40 经营工作台整合）
   —— 待办 · 天气 · 系统动态 · 快捷入口 · 三模块卡
   ============================================================ */

/* ---- 我的待办 ---- */
.d-tabs { display: flex; gap: 4px; padding: 0 18px; border-bottom: 1px solid var(--border); }
.d-tab { padding: 8px 12px; font-size: 13px; color: var(--text-2); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; user-select: none; }
.d-tab b { color: var(--muted); font-weight: 600; margin-left: 3px; }
.d-tab:hover { color: var(--primary); }
.d-tab.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 650; }
.d-tab.on b { color: var(--primary); }

.d-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 9px;
  border-radius: var(--radius-sm); }
.d-item:hover { background: var(--surface-2); }
.d-item + .d-item { border-top: 1px dashed var(--border); }
.d-chk { flex: 0 0 auto; width: 21px; height: 21px; border: 1px solid var(--border-strong);
  background: #fff; border-radius: 6px; cursor: pointer; font-size: 13px; line-height: 1;
  color: var(--muted); margin-top: 1px; padding: 0; }
.d-item.d-done .d-chk { background: var(--green-soft); border-color: var(--green);
  color: var(--green); }
.d-main { flex: 1; min-width: 0; }
.d-title { font-size: 13.5px; font-weight: 600; line-height: 1.5; }
.d-item.d-done .d-title { color: var(--muted); text-decoration: line-through; font-weight: 500; }
.d-sub { font-size: 11.8px; color: var(--muted); margin-top: 3px; }
.d-sub .tag { margin-left: 4px; }
.d-over { color: var(--red); font-size: 11.5px; font-weight: 600; margin-left: 6px; }
.d-acts { flex: 0 0 auto; display: flex; gap: 6px; align-items: center; }

/* ---- 天气 ---- */
.w-now { display: flex; align-items: center; gap: 14px; }
.w-ico { font-size: 40px; line-height: 1; }
.w-temp { font-size: 32px; font-weight: 680; letter-spacing: -1px; line-height: 1.05; }
.w-desc { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.w-meta { margin-left: auto; font-size: 12px; color: var(--muted); text-align: right;
  line-height: 1.9; }
.w-meta b { color: var(--text); font-weight: 650; }
.w-days { display: flex; gap: 8px; margin-top: 14px; }
.w-day { flex: 1; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 9px 6px; text-align: center; }
.w-day .k { font-size: 11.5px; color: var(--muted); }
.w-day .i { font-size: 19px; margin: 4px 0 2px; }
.w-day .t { font-size: 12px; }
.w-day .t b { font-weight: 650; }
.w-day .p { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.w-foot { font-size: 11.2px; color: var(--muted); margin-top: 12px; }

/* ---- 系统动态 ---- */
.d-acts-list { padding: 4px 4px 8px; }
.d-act { display: flex; align-items: center; gap: 10px; padding: 8px;
  border-bottom: 1px dashed var(--border); font-size: 12.8px; }
.d-act:last-child { border-bottom: 0; }
.d-at { flex: 0 0 84px; color: var(--muted); font-size: 11.8px;
  font-variant-numeric: tabular-nums; }
.d-txt { flex: 1; min-width: 0; }

/* ---- 快捷入口 ---- */
.d-quicks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.d-quick { display: flex; flex-direction: column; gap: 2px; padding: 11px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); color: inherit; }
.d-quick:hover { border-color: var(--primary); background: var(--primary-soft); }
.d-quick .i { font-size: 17px; }
.d-quick .n { font-size: 13px; font-weight: 620; color: var(--text); }
.d-quick .d { font-size: 11px; color: var(--muted); }

/* ---- 经营工作台 · 三张模块卡 ---- */
.d-ov { padding: 14px 18px 6px; position: relative; overflow: hidden; }
.d-ov .bar { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.d-ov.blue .bar { background: var(--primary); }
.d-ov.teal .bar { background: var(--teal); }
.d-ov.purple .bar { background: var(--purple); }
.d-ovhead { display: flex; align-items: center; gap: 7px; padding-bottom: 9px;
  border-bottom: 1px solid var(--border); }
.d-ovhead .i { font-size: 15px; }
.d-ovhead b { font-size: 13.5px; }
.d-ovhead .sub { font-size: 11.5px; color: var(--muted); }
.d-ovrow { display: flex; align-items: baseline; gap: 8px; padding: 8px 0;
  border-bottom: 1px dashed var(--border); flex-wrap: wrap; }
.d-ovrow:last-child { border-bottom: 0; }
.d-ovrow .k { font-size: 12.5px; color: var(--text-2); }
.d-ovrow .v { margin-left: auto; font-size: 17px; font-weight: 680; white-space: nowrap;
  font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.d-ov.blue .d-ovrow .v { color: var(--primary); }
.d-ov.teal .d-ovrow .v { color: var(--teal); }
.d-ov.purple .d-ovrow .v { color: var(--purple); }
.d-ovrow .f { flex: 0 0 100%; font-size: 11px; color: var(--muted); margin-top: -2px; }

/* ---- 「已扣除」的单元格（不走支付登记，浅灰底以示区别）---- */
.d-ded { background: #f6f8fb; color: var(--text-2); }
.tbl.compact td.d-ded { background: #f6f8fb; }


/* ★ R4-51（2026-09-22 20:36 用户）：「去掉 8 个汇总对应的业务明细吧，太乱了」——
   R4-49/50 的「汇总卡可点 + 业务明细下钻」样式（.recon-kpi / #dtTbl / #dtTot）已随功能整块删除。
   汇总卡现在就是普通 .card.kpi（固定 4 列 × 2 行，不可点）。 */


/* --------------------------------------------------------------------------
   ★ R4-60 文件内容识别 · 「按人名查」（2026-10-08）
   -------------------------------------------------------------------------- */
.ps-bar {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  margin-top: 14px; padding: 10px 12px;
  border: 1px dashed var(--border); border-radius: 10px; background: var(--surface-2);
}
.ps-bar .input { width: 180px; }
.ps-bar input[type="date"].input { width: 138px; flex: 0 0 auto; }
.ps-thumb {
  padding: 0; border: 1px solid var(--border); border-radius: 6px; background: var(--surface);
  cursor: pointer; line-height: 0; overflow: hidden; vertical-align: middle;
}
.ps-thumb { min-width: 46px; min-height: 32px; }
.ps-thumb img { max-height: 34px; display: block; }
/* ★ R4-62：PDF 不能当图片渲染（旧版点开一片空白）→ 缩略图位显示 PDF 小标 */
.ps-thumb .ps-pdfico {
  display: flex; align-items: center; justify-content: center;
  padding: 9px 8px; font-size: 11px; font-weight: 500; line-height: 1;
  color: #a32d2d; background: #fcebeb; border-radius: 4px;
}
.ps-viewbtn {
  color: var(--primary); background: none; border: none; padding: 0; cursor: pointer;
  font: inherit; font-size: 11.5px; text-align: left; text-decoration: underline dotted;
  word-break: break-all;
}
/* 凭证预览弹窗：PDF 用浏览器原生查看器（可翻页/缩放） */
.ps-pvpdf { width: 100%; height: 66vh; border: 1px solid var(--border); border-radius: 8px; display: block; }
.ps-pvimg { max-width: 100%; display: block; margin: 0 auto; border-radius: 8px; }
.ps-mark { margin-top: 4px; }
.ps-mark .btn { margin-right: 4px; padding: 1px 7px; font-size: 11.5px; line-height: 1.5; }
/* ★ R4-69：一笔明细可能对应**多张**回单（分次转账，如 30,000 + 24,630）→ 逐张竖排 */
.ps-rec { margin-bottom: 8px; }
.ps-rec:last-child { margin-bottom: 0; }
.ps-link {
  color: var(--primary); background: none; border: none; padding: 0; cursor: pointer;
  font: inherit; text-align: left; text-decoration: underline dotted;
}

/* ============================================================
   ★ R4-67：文件库「重复文件清理」（用户 2026-10-08 拍板）
   ============================================================ */
.dup-group {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); margin-bottom: 10px; overflow: hidden;
}
.dup-head {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.dup-head .fn {
  font-weight: 500; max-width: 46%; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
/* ★ 组头文件名可点开预览（是个按钮，抹掉按钮默认样式） */
.dup-fnlink {
  background: none; border: 0; padding: 0; cursor: pointer; color: inherit;
  font-size: 13px; text-align: left; text-decoration: underline dotted;
}
.dup-fnlink:hover { color: var(--primary); }
.dup-items { padding: 8px 12px; display: flex; flex-direction: column; gap: 6px; }
.dup-item { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.dup-item.locked { opacity: .7; }
/* 文字区包成 label（点文字 = 勾选/取消）；「预览」按钮放在 label 外面，
   这样点预览**不会连带勾上 checkbox**（否则看的时候手一滑就改了勾选） */
.dup-text { display: flex; align-items: center; gap: 10px; cursor: pointer; min-width: 0; }
.dup-item .dup-own {
  color: var(--text-2); overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; max-width: 280px;
}
.dup-pv {
  margin-left: auto; flex: 0 0 auto; padding: 1px 9px; font-size: 12px;
  background: none; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); color: var(--primary); cursor: pointer;
}
.dup-pv:hover { background: var(--primary-soft); border-color: var(--primary); }
.dup-more {
  display: block; width: 100%; padding: 4px 12px 9px 30px; text-align: left;
  background: none; border: 0; color: var(--primary); cursor: pointer; font-size: 12px;
}
.dup-more:hover { text-decoration: underline; }
.dup-bar {
  display: flex; align-items: center; gap: 10px; margin-top: 4px; padding: 10px 12px;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   ★ R4-77 保险「回单管理」—— 逐日配对视图 / 未匹配 / 批量上传结果
   （这些类只在 static/receipt.js 里用；与既有 .fbox/.fname-ellip 保持一致）
   ========================================================================== */
.btnrow { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.divider { width: 1px; height: 18px; background: var(--border); display: inline-block;
  margin: 0 6px; }
.fno { flex: 0 0 auto; font-size: 11.5px; color: var(--muted); }
.rthumb { flex: 0 0 auto; width: 38px; height: 26px; object-fit: cover;
  border: 1px solid var(--border); border-radius: 4px; background: var(--surface-2); }
img.rthumb { cursor: zoom-in; }
.rthumb.ph { display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; }
.miss { color: var(--red); font-size: 12.5px; }
.tbl.fixed { table-layout: fixed; }
.tbl.fixed td { overflow: hidden; }
.tblwrap { border: 1px solid var(--border); border-radius: var(--radius-sm); }
tr.norow > td { background: var(--red-soft); }

/* 每天一节 */
.rxday { border: 1px solid var(--border); border-radius: var(--radius-sm);
  margin-bottom: 12px; overflow: hidden; }
.rxday-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.rxday-body .tbl { margin: 0; }
.rxday-body .tbl th { background: #fcfcfd; }
.dchip { font-size: 12px; color: var(--text-2); background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; padding: 1px 9px; }
.dchip.okc { color: var(--green); background: var(--green-soft); border-color: #bfe6d1; }
.dchip.nec { color: var(--amber); background: var(--amber-soft); border-color: #f3ddb0; }
/* ★ R4-92：明细被标成「错误数据」—— 整行淡化 + 名字划掉，一眼看出"这条不算" */
.dchip.voidc { color: var(--text-3, #8a8f98); background: #f2f3f5; border-color: #e2e4e8; }
tr.voidrow > td { background: #fafafb; color: var(--text-3, #8a8f98); }
tr.voidrow > td:nth-child(1) { text-decoration: line-through; }

/* 上传结果 */
.pvup { border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 13px; background: var(--surface-2); }
.pvup.ok { border-color: #bfe6d1; background: var(--green-soft); }
.pvup.warn { border-color: #f3ddb0; background: var(--amber-soft); }

/* ★ R4-82（2026-10-15）：已付金额**与成本项同格显示** ——
   主表里是格子内的小字（.paid-sub），登记弹窗里是横向小标签（.paid-tag）。 */
.paid-sub {
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--green);
  font-weight: 600;
  margin-top: 2px;
  white-space: nowrap;
}
.paid-tag {
  display: inline-block;
  background: #fff;
  border: 1px solid var(--green-soft);
  border-radius: 4px;
  padding: 0 6px;
  margin: 1px 4px 1px 0;
  font-size: 11.5px;
  color: var(--green);
  white-space: nowrap;
}

/* ★ R4-87（2026-10-17 用户定）：逐日配对明细 —— **行高固定单行**、
   操作按钮**并排**（原来操作列只有 112px，挤三个按钮会折行，把整行撑高）。 */
.rxday-body table.tbl th,
.rxday-body table.tbl td {
  white-space: nowrap;
}
.rxday-body table.tbl td {
  overflow: hidden;
  text-overflow: ellipsis;
}
.rxday-body table.tbl td .fbox,
.rxday-body table.tbl td .btnrow {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  min-width: 0;
}
.rxday-body table.tbl td .btnrow .btn {
  flex: 0 0 auto;
}
