:root {
  --bg: #f6f7f9;
  --surface: #fff;
  --elevated: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --accent: #1e40af;
  --ok: #15803d;
  --warn: #b45309;
  --error: #b91c1c;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

/* ---------- 顶栏 ---------- */
.top {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 22px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 8px; }
.brand strong { font-size: 15px; letter-spacing: .3px; }
.brand .sub { font-size: 12px; color: var(--muted); padding-left: 8px; border-left: 1px solid var(--border); }
.dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(30,64,175,.12);
}
.top .right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

/* ---------- 布局 ---------- */
/* 全宽：账单明细列多，限制宽度会把表格挤成横向滚动 */
main { max-width: none; width: 100%; margin: 0; padding: 22px 18px 60px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.card-head h2 { margin: 0; font-size: 14.5px; font-weight: 600; }
.card-head .hint { margin-left: auto; font-size: 12px; color: var(--muted); }
.card-body { padding: 16px 18px; }
.card-body.tight { padding: 0; }

/* ---------- 四个数字 ---------- */
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.metric {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.metric .k { font-size: 12.5px; color: var(--muted); }
.metric .v { font-size: 24px; font-weight: 600; margin-top: 4px; letter-spacing: -.3px; }
.metric .s { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.metric.ok .v { color: var(--ok); }
.metric.warn .v { color: var(--warn); }
.metric.error .v { color: var(--error); }

/* 结论横幅 */
.verdict {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-radius: var(--radius);
  margin-bottom: 18px; font-size: 14px;
  border: 1px solid;
}
.verdict.ok { background: #f0fdf4; border-color: #bbf7d0; color: #14532d; }
.verdict.warn { background: #fffbeb; border-color: #fde68a; color: #78350f; }
.verdict .big { font-size: 15.5px; font-weight: 600; }

/* ---------- 表格 ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  position: sticky; top: 0;
  background: var(--elevated);
  text-align: left; font-weight: 600; font-size: 12px; color: var(--muted);
  padding: 9px 12px; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td { padding: 9px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fafbfc; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-family: ui-monospace, Consolas, monospace; }
.muted { color: var(--muted); }
.scroll { overflow: auto; max-height: 520px; }

/* 备注：银行摘要后面的补充说明，是判断交易内容的关键，颜色要比摘要深一点 */
.remark { color: var(--text); opacity: .78; margin-top: 2px; }

/* 垫付里勾选发票：一行一张，勾中就是这笔垫付包含的票 */
.inv-pick {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--elevated);
  max-height: 210px;
  overflow: auto;
}
.inv-list { display: block; }
.inv-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  cursor: pointer;
}
.inv-row:last-child { border-bottom: 0; }
.inv-row:hover { background: var(--surface); }
.inv-row input { flex: none; margin: 0; }

/* 清单里的分组标题（企业建行 / 企业支付宝） */
.pick-group {
  padding: 6px 10px; font-size: 11px; font-weight: 600;
  color: var(--muted); background: var(--elevated);
  position: sticky; top: 0; z-index: 1;
  border-bottom: 1px solid var(--border);
}
.inv-code { flex: none; width: 44px; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.inv-date { flex: none; width: 82px; color: var(--muted); }
.inv-seller { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-amt { flex: none; width: 80px; text-align: right; font-weight: 600; }

/* 已勾选的流水后面显示还剩多少：绿=还有余额，红=被占超了，灰=正好用完 */
.inv-left {
  flex: none; min-width: 88px; text-align: right;
  font-size: 11px; font-family: var(--font-mono); color: var(--ok);
}
.inv-left.zero { color: var(--muted); }
.inv-left.over { color: var(--error); }

/* 已被别的发票占满的流水：整行置灰、点不动 */
.inv-row.used-up {
  opacity: .45;
  background: var(--elevated);
  cursor: not-allowed;
}
.inv-row.used-up:hover { background: var(--elevated); }
.inv-row.used-up input,
.inv-row.used-up span { cursor: not-allowed; }

/* 发票付款构成：一行塞下，明细进 title 悬停看，不撑高行 */
.pay-parts { font-size: 11.5px; }
.pay-row {
  display: flex; align-items: baseline; gap: 6px;
  white-space: nowrap; line-height: 1.5;
}
.pay-amt { font-family: var(--font-mono); font-weight: 600; }
.pay-who { color: var(--muted); font-size: 11px; }
.pay-gap { color: var(--error); font-size: 11px; }
.pay-ok { color: var(--ok); font-size: 11px; }

/* 发票编辑里的实时核对条 */
.inv-pay-sum {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: baseline;
  margin-top: 10px; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--elevated); font-size: 12px;
}

/* 发票表：固定布局 + 铺满容器，配合表头写死的列宽，
   剩下的空间只会给没写宽度的付款构成那一列。 */
.inv-table { table-layout: fixed; width: 100%; }
/* 销售方要能看全名字，所以让它换行，不截断 */
td.seller-cell { white-space: normal; line-height: 1.35; word-break: break-word; }
td.nos-cell {
  max-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 已分页的明细表不再限高：一页 50 条直接铺开，不用在框里再滚一遍 */
.scroll.full { max-height: none; }

/* ---------- 标签 ---------- */
.chip {
  display: inline-block; padding: 1px 7px; border-radius: 5px;
  font-size: 11.5px; line-height: 1.7; white-space: nowrap;
}
.chip.ok { background: #dcfce7; color: #14532d; }
.chip.warn { background: #fef3c7; color: #78350f; }
.chip.error { background: #fee2e2; color: #7f1d1d; }
.chip.gray { background: #f1f5f9; color: #475569; }
.chip.info { background: #dbeafe; color: #1e3a8a; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 13px; border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text);
  font: inherit; font-size: 13px; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--elevated); }
.btn-xs { padding: 3px 8px; font-size: 12px; border-radius: 6px; }
.btn-sm { padding: 5px 10px; font-size: 12.5px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #1e3a8a; }
.btn-block { width: 100%; justify-content: center; padding: 10px; font-size: 14px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-danger { color: var(--error); border-color: #fecaca; }
.btn-danger:hover { background: #fef2f2; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: #475569; margin-bottom: 5px; }
input[type=text], input[type=password], input[type=date], input[type=month], select {
  width: 100%; padding: 8px 11px;
  border: 1px solid var(--border-strong); border-radius: 8px;
  font: inherit; font-size: 13px; outline: none;
  background: var(--surface); color: var(--text);
}
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(30,64,175,.1); }
select { cursor: pointer; }
#periodSel { width: auto; min-width: 170px; padding: 6px 10px; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .big { font-size: 32px; opacity: .35; margin-bottom: 10px; }
.empty p { margin: 6px 0; }
.spin {
  width: 22px; height: 22px; margin: 0 auto 12px;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 提示条 ---------- */
.notice {
  padding: 12px 16px; border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--elevated);
  font-size: 13px; margin-bottom: 16px;
}
.notice.warn { background: #fffbeb; border-color: #fde68a; }
.notice.ok { background: #f0fdf4; border-color: #bbf7d0; }
.notice strong { font-weight: 600; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 32px;
  transform: translateX(-50%) translateY(20px);
  background: #1e293b; color: #fff;
  padding: 10px 18px; border-radius: 8px;
  font-size: 13px; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 9000; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: #991b1b; }
.toast.ok { background: #14532d; }

/* ---------- 登录页 ---------- */
.login-body {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; margin: 0;
  background: linear-gradient(160deg, #f6f7f9 0%, #e8edf5 100%);
}
.login-card {
  width: min(400px, 92vw);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 34px 30px;
  box-shadow: 0 12px 40px rgba(15,23,42,.08);
}
.login-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.login-brand strong { font-size: 17px; }
.login-brand .sub { font-size: 12px; color: var(--muted); padding-left: 8px; border-left: 1px solid var(--border); }
.login-tip { font-size: 12.5px; margin: 0 0 24px; }
.err { color: var(--error); font-size: 12.5px; margin-top: 10px; min-height: 18px; }

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  .top { padding: 10px 14px; flex-wrap: wrap; }
  .top .right { width: 100%; margin-left: 0; }
  #periodSel { flex: 1; }
  main { padding: 14px 12px 50px; }
  .metrics { grid-template-columns: 1fr 1fr; gap: 8px; }
  .metric .v { font-size: 19px; }
  .card-body { padding: 12px; }
  table { font-size: 12px; }
  thead th, tbody td { padding: 7px 8px; }
}

/* ---------- 月份卡片 ---------- */
.month-list { display: grid; grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); gap: 12px; }
.month-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px; cursor: pointer;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.month-card:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(15,23,42,.07); }
.month-card .m { font-size: 17px; font-weight: 600; letter-spacing: -.2px; }
.month-card .tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 9px 0 11px; }
.month-card .line { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); padding: 2px 0; }
.month-card .line b { color: var(--text); font-variant-numeric: tabular-nums; }
.month-card .line b.warn { color: var(--warn); }
.month-card .line b.ok { color: var(--ok); }

/* ---------- 月份步骤条 ---------- */
.steps { display: flex; gap: 0; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.step { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); padding: 5px 14px 5px 0; }
.step .num {
  width: 19px; height: 19px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; background: var(--elevated); border: 1px solid var(--border-strong); color: var(--muted);
}
.step.done { color: var(--ok); }
.step.done .num { background: var(--ok); border-color: var(--ok); color: #fff; }
.step .arrow { color: var(--border-strong); margin-right: 14px; }

/* ---------- 月份头 ---------- */
.month-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.month-head h1 { margin: 0; font-size: 21px; letter-spacing: -.3px; }
.month-head .sp { flex: 1; }

/* ---------- 弹窗 ---------- */
.mask {
  position: fixed; inset: 0; background: rgba(15,23,42,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 5000; padding: 20px; backdrop-filter: blur(2px);
}
.modal {
  background: var(--surface); border-radius: 13px;
  width: min(760px,96vw); max-height: 88vh; display: flex; flex-direction: column;
  box-shadow: 0 24px 60px rgba(15,23,42,.28);
}
.modal-head { padding: 15px 20px; border-bottom: 1px solid var(--border); font-weight: 600; display: flex; align-items: center; }
.modal-head .x { margin-left: auto; cursor: pointer; color: var(--muted); font-size: 21px; line-height: 1; }
.modal-body { padding: 18px 20px; overflow: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

.kv { display: grid; grid-template-columns: repeat(auto-fit,minmax(130px,1fr)); gap: 10px; margin-bottom: 14px; }
.kv div { background: var(--elevated); border-radius: 8px; padding: 9px 12px; }
.kv .k { font-size: 11.5px; color: var(--muted); }
.kv .v { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
  .month-list { grid-template-columns: 1fr; }
  .month-head h1 { font-size: 18px; }
}

/* ---------- 公户平台卡片 ---------- */
.plat-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 10px; }
.plat {
  border: 1px solid var(--border); border-radius: 9px;
  padding: 12px 14px; background: var(--elevated);
}
.plat-name { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.plat-stat { font-size: 12px; color: var(--muted); margin-bottom: 9px; }
.plat-act { display: flex; gap: 6px; }
.group-name {
  display: inline-block; font-size: 11px; color: var(--accent);
  background: #eef2ff; border-radius: 4px; padding: 0 6px; margin-bottom: 7px;
}

/* ---------- 账户分类框 ---------- */
/* 公户 / 收款通道并排放，别上下堆叠占满整屏 */
.group-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  align-items: start;
}

.group-box {
  border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 16px; background: var(--surface);
}
.group-title {
  display: flex; align-items: baseline; gap: 9px;
  margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 1px dashed var(--border);
}
.group-title strong { font-size: 15px; letter-spacing: .3px; }
.group-title span { font-size: 12px; }

/* ---------- 业务分类卡片 ---------- */
.plat-click { cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; }
.plat-click:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(15,23,42,.07); }
.plat-money { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.plat-money span { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.plat-money i { font-style: normal; font-size: 11.5px; }
.plat-money i.warn { color: var(--warn); }

/* ---------- 业务分类编辑 ---------- */
.group-tools { margin-left: auto; display: flex; gap: 5px; }
.plat-edit {
  float: right; font-size: 11px; font-weight: 400; color: var(--accent);
  padding: 0 5px; border-radius: 3px; cursor: pointer;
  opacity: .55; transition: opacity .15s, background .15s;
}
.plat-edit:hover { opacity: 1; background: #eef2ff; }

/* ---------- 阿里云表格 ---------- */
.row-click { cursor: pointer; }
.row-click:hover td { background: #fafbfc; }
.bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; min-width: 60px; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }

/* ---------- 平台账户 ---------- */
.plat-line { display: flex; justify-content: space-between; font-size:12.5px; color:var(--muted); padding:2px 0; }
.plat-line b { color: var(--text); }

/* ---------- 余额条 ---------- */
.bal-strip { display:flex; align-items:center; gap:12px; padding:11px 16px; margin-bottom:14px; background:var(--elevated); border:1px solid var(--border); border-radius:var(--radius); font-size:13px; }
.bal-k { color:var(--muted); font-size:12.5px; }
.bal-v { color:var(--muted); font-size:12.5px; }
.bal-v b { color:var(--text); font-size:15px; font-variant-numeric:tabular-nums; margin-left:4px; }
.bal-v b.ok { color:var(--ok); }
.bal-ar { color:var(--border-strong); }

.plat-kind { font-size:10.5px; font-weight:400; color:var(--muted); margin-left:6px; }

/* ---------- 口径说明条 ---------- */
.note-strip { padding:10px 16px; margin-bottom:14px; background:#fffbeb; border:1px solid #fde68a; border-radius:var(--radius); font-size:12.5px; color:#78350f; line-height:1.6; }
.note-strip b { color:#92400e; }

/* ---------- 发票上传区 ---------- */
.drop-zone { border:2px dashed var(--border-strong); border-radius:var(--radius); padding:32px 20px; text-align:center; cursor:pointer; transition:all .15s; background:var(--elevated); }
.drop-zone:hover { border-color:var(--accent); background:var(--card); }
.drop-zone.drag { border-color:var(--accent); border-style:solid; background:var(--accent-fill); }
.dz-icon { font-size:26px; color:var(--muted); line-height:1; margin-bottom:10px; }
.drop-zone.drag .dz-icon { color:var(--accent); }
.dz-title { font-size:14px; font-weight:600; color:var(--text); margin-bottom:6px; }
.dz-sub { font-size:12px; color:var(--muted); line-height:1.6; }

.up-progress { margin-top:14px; border-top:1px solid var(--border); padding-top:12px; }
.up-row { display:flex; justify-content:space-between; gap:12px; padding:6px 0; font-size:12.5px; border-bottom:1px solid var(--border); }
.up-row:last-child { border-bottom:0; }
.up-name { color:var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.up-st { flex:0 0 auto; color:var(--muted); font-size:12px; }
.up-st.run { color:var(--accent); }
.up-st.ok { color:var(--ok); }
.up-st.warn { color:var(--warn); }
.up-st.err { color:var(--danger); }

/* ---------- 重复发票 ---------- */
.dup-item { border:1px solid var(--border); border-radius:var(--radius); padding:12px; margin-bottom:12px; background:var(--elevated); }
.dup-item:last-child { margin-bottom:0; }
.dup-head { display:flex; justify-content:space-between; gap:10px; align-items:baseline; margin-bottom:10px; padding-bottom:8px; border-bottom:1px dashed var(--border); }
.dup-file { font-size:12.5px; font-weight:600; color:var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dup-why { flex:0 0 auto; font-size:11.5px; color:var(--warn); }
.dup-cmp { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.dup-col { font-size:12px; }
.dup-tag { font-size:11px; font-weight:600; color:var(--muted); margin-bottom:6px; }
.dup-tag.new { color:var(--accent); }
.dup-row { display:flex; justify-content:space-between; gap:8px; padding:3px 0; }
.dup-row span { color:var(--muted); flex:0 0 auto; }
.dup-row b { color:var(--text); font-weight:500; text-align:right; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dup-acts { margin-top:10px; display:flex; gap:8px; justify-content:flex-end; }
.up-st.dup { color:var(--warn); font-weight:600; }

/* ---------- 购销方异常 ---------- */
.party-issue { display:flex; gap:8px; align-items:flex-start; padding:7px 10px; margin-bottom:6px; background:var(--elevated); border-left:3px solid var(--warn); border-radius:4px; font-size:12.5px; }
.party-issue:last-child { margin-bottom:0; }
.party-code { flex:0 0 auto; font-weight:600; color:var(--warn); white-space:nowrap; }
.party-msg { flex:1; color:var(--muted); line-height:1.5; }

/* ---------- 待改标记 ---------- */
.rv-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 10.5px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--warn);
  background: color-mix(in srgb, var(--warn) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent);
  border-radius: 3px;
  cursor: help;
  vertical-align: middle;
}

/* ---------- 账单文件清单 ---------- */
.file-sum {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--muted);
  padding: 0 0 12px;
}
.file-sum b { color: var(--text); font-weight: 600; }
.file-sum .ok b { color: var(--ok); }
.file-sum .warn b { color: var(--warn); }

.file-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-bottom: 12px;
}

.file-table-wrap { overflow-x: auto; }
.file-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.file-table th {
  text-align: left;
  font-weight: 600;
  font-size: 11.5px;
  color: var(--muted);
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.file-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.file-table tbody tr:hover { background: var(--elevated); }
.file-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.file-table td.mono {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  white-space: nowrap;
}
/* 文件名可能很长，截断但保留完整内容在 title 里 */
.file-table td.fname {
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 操作列：打开 + 换 / 补传，两个按钮要留缝 */
.file-table td.ops {
  display: flex;
  gap: 6px;
  align-items: center;
}
/* 列窄时按钮会被挤成竖排（「打」「开」上下两行），
   按钮一律不许换行，也不许被压缩，宁可让表格横向滚动 */
.file-table td.ops .btn {
  white-space: nowrap;
  flex-shrink: 0;
}
@media (max-width: 720px) {
  .file-table td.fname { max-width: 160px; }
}
