/* AI报销审核平台 · 设计系统
   浅色企业级视觉：浅蓝灰侧栏 + 明亮页面 + 低饱和蓝主操作。
   不使用黑色或大面积深色导航。 */

:root {
  /* 中性色 —— 暖灰偏蓝 */
  --bg-page: #f6f7f9;
  --bg-sidebar: #eef1f6;
  --bg-card: #ffffff;
  --bg-subtle: #f3f5f8;
  --border: #e2e6ed;
  --border-strong: #cfd6e0;

  /* 文字 */
  --text: #1e2633;
  --text-muted: #6b7688;
  --text-side: #3b4557;

  /* 主色 —— 低饱和靛蓝 */
  --primary: #34589b;
  --primary-hover: #2a4880;
  --primary-soft: #e7edf7;

  /* 状态色 —— 全部低饱和 */
  --pending: #9a6510;
  --pending-bg: #fbf3e4;
  --approved: #2c6b4f;
  --approved-bg: #e8f2ec;
  --returned: #a4402f;
  --returned-bg: #f9edea;
  --neutral: #5a6474;
  --neutral-bg: #f0f2f5;

  --radius: 8px;
  --radius-lg: 10px;
  --shadow: 0 1px 2px rgba(30, 38, 51, 0.06);
  --sidebar-w: 232px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans CJK SC",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- 布局 ---------- */

.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
}

.sidebar__brand { padding: 0 10px 18px; }
.sidebar__brand strong { display: block; font-size: 15px; color: var(--text); letter-spacing: .01em; }
.sidebar__brand span { display: block; margin-top: 3px; font-size: 11px; color: var(--text-muted); }

.sidebar__group { margin-top: 18px; }
.sidebar__title {
  padding: 0 10px 6px;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: .08em;
}

.sidebar__link {
  display: block;
  position: relative;
  padding: 9px 10px 9px 13px;
  margin-bottom: 2px;
  border-radius: var(--radius);
  color: var(--text-side);
  font-size: 13.5px;
}
.sidebar__link:hover { background: #e6eaf2; text-decoration: none; }
.sidebar__link.is-active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}
.sidebar__link.is-active::before {
  content: "";
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--primary);
}

.sidebar__foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--border); }
.sidebar__env { font-size: 11px; color: var(--text-muted); }

.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 58px;
  flex: 0 0 58px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
}
.topbar__title { font-size: 15px; font-weight: 600; }
.topbar__spacer { flex: 1; }

.hamburger {
  display: none;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  border-radius: var(--radius);
  width: 34px; height: 34px;
  cursor: pointer;
  color: var(--text-side);
}

.userchip { display: flex; align-items: center; gap: 9px; }
.userchip__avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid; place-items: center;
  font-weight: 600; font-size: 13px;
}
.userchip__meta { font-size: 12.5px; line-height: 1.35; }
.userchip__meta span { display: block; color: var(--text-muted); font-size: 11px; }

.content { padding: 22px 24px 48px; max-width: 1180px; width: 100%; }

/* ---------- 页头 ---------- */

.pagehead { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.pagehead h1 { margin: 0; font-size: 20px; font-weight: 650; }
.pagehead p { margin: 4px 0 0; color: var(--text-muted); font-size: 13px; }
.pagehead__actions { margin-left: auto; display: flex; gap: 8px; flex-shrink: 0; }

/* ---------- 卡片 ---------- */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.card__head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.card__head h2 { margin: 0; font-size: 15px; font-weight: 620; }
.card__head .spacer { flex: 1; }
.card__body { padding: 18px; }
.card__body--tight { padding: 0; }

.grid { display: grid; gap: 14px; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
/* 双栏布局。

   右栏必须给一个稳定宽度，不能用 fr。
   原来写的是 1.35fr .65fr——看起来右栏能拿到 32.5%，实际拿不到：
   fr 的下限是 auto，也就是「不得小于内容的 min-content 宽度」。
   左栏里那张八列历史表的 min-content 很宽，于是左栏越过自己的份额，
   右栏被挤到 186px，而审核操作区需要 266px——按钮和文字就溢出了卡片。

   改成固定 280~300px：右栏先拿够，剩下的全给左栏。
   1440 → 左 816；1280 → 左 684；1025 → 左 429，都够用。

   minmax(0, 1fr) 里的那个 0 是关键：它把左栏的收缩下限从 min-content
   放开到 0，表格因此才可能触发自己的横向滚动，而不是把整页撑宽。 */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 300px);
  gap: 16px;
  align-items: start;
}
.stack { display: grid; gap: 16px; }

/* 网格项默认 min-width:auto，也就是「不得窄于内容」。

   这条默认值是上面那个问题的真正来源，而且它会一层层往上传：
   .table-wrap 虽然写了 overflow-x:auto，但它的父级 .card 是网格项、
   .card 的父级 .stack 也是网格项，两者都拒绝收缩，于是容器一路变宽、
   永远没有「溢出」发生，overflow-x 就永远不触发。
   390px 下整个 document 被撑到 712px 正是这么来的。

   把这条链上的每一层都放开到 0，表格才会老老实实在自己的 wrapper 里滚。
   注意这不是用 overflow:hidden 去盖住问题——内容一个像素都没被裁掉，
   只是滚动条回到了它该在的那个盒子里。 */
.split > *,
.stack > * { min-width: 0; }

/* ---------- 统计卡 ---------- */

.stat { padding: 15px 16px; }
.stat__label { font-size: 12px; color: var(--text-muted); }
.stat__value { font-size: 26px; font-weight: 680; margin-top: 2px; letter-spacing: -.01em; }

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text-side);
  border-radius: var(--radius);
  padding: 8px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s ease, border-color .12s ease;
}
.btn:hover { background: var(--bg-subtle); text-decoration: none; }
.btn--primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn--danger { background: var(--bg-card); border-color: #d9b3ab; color: var(--returned); }
.btn--danger:hover { background: var(--returned-bg); }
.btn--sm { padding: 5px 10px; font-size: 12.5px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- 徽章 ---------- */

.badge {
  display: inline-flex; align-items: center;
  border-radius: 20px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge--pending  { background: var(--pending-bg);  color: var(--pending); }
.badge--approved { background: var(--approved-bg); color: var(--approved); }
.badge--returned { background: var(--returned-bg); color: var(--returned); }
.badge--neutral  { background: var(--neutral-bg);  color: var(--neutral); }
.badge--info     { background: var(--primary-soft); color: var(--primary); }

/* ---------- 表格 ---------- */

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbfd; }
.table__no { font-weight: 600; }
.table__sub { color: var(--text-muted); font-size: 12px; }
.table__actions { text-align: right; white-space: nowrap; }

.empty { padding: 44px 20px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* ---------- 标签页 ---------- */

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); padding: 0 18px; }
.tab {
  padding: 11px 12px;
  font-size: 13px;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text); text-decoration: none; }
.tab.is-active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* ---------- 筛选栏 ---------- */

/* 桌面端单行紧凑排列：搜索框吃掉剩余宽度，select 按内容宽度并排、可压缩，
   按钮不参与压缩。窄屏自动换行，最窄时每项占满一行。

   每一项都显式写 width，不依赖"哪条规则排在后面"——正是那种隐式依赖
   让这个筛选栏一度被撑成五行（见下方表单控件那条规则的注释）。

   宽度是按真实可用空间算的：1440px 视口下内容列 1180px，减去 .content
   与 .card__head 的左右内边距，筛选栏可用约 1096px；
   搜索 220 + 4×select 150 + 两个按钮 + 6 个 8px 间距 ≈ 1050px，一行放得下。
   1280px 下可用约 964px，select 会各压缩十几像素后仍能排成一行；
   再窄则自然换行成两行。 */
.filterbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filterbar .field-input {
  width: auto;
  flex: 1 1 220px;
  min-width: 190px;
}
.filterbar select {
  width: auto;
  flex: 0 1 150px;
  /* 压缩下限保证最长的选项文字（「全部财务状态」「内部审核通过」）不被截断。 */
  min-width: 132px;
}
.filterbar .btn { flex: 0 0 auto; }

/* ---------- 表单 ---------- */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field .req { color: var(--returned); margin-left: 2px; }

/* 控件外观：只管长相，不管宽度。

   宽度必须分开写。这一条规则原本还带着 width:100%，并且同时匹配
   .filterbar select / .filterbar input——它排在 .filterbar 布局规则之后、
   特异度又完全相同，于是把上面那句 .filterbar select{width:auto} 直接覆盖掉。
   flex 项目的 flex-basis:auto 会回落到 width，结果每个 select 都索要
   一整行宽度，筛选栏被撑成五行。布局看起来"flex 没生效"，实际是宽度写死了。 */
.field-input, .field select, .field input[type="text"], .field input[type="date"],
.field input[type="number"], .field textarea, .filterbar select, .filterbar input {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 8px 11px;
  background: var(--bg-card);
  outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}

/* 独占一列的只有表单里的控件。
   .field-input 只用在筛选栏的搜索框上，因此刻意不在这一行里。 */
.field select, .field input[type="text"], .field input[type="date"],
.field input[type="number"], .field textarea {
  width: 100%;
}
.field select:focus, .field input:focus, .field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.field textarea { min-height: 84px; resize: vertical; }
.field input[readonly] { background: var(--bg-subtle); color: var(--text-muted); cursor: not-allowed; }
.field .hint { font-size: 11.5px; color: var(--text-muted); margin-top: 5px; }
.field .error { font-size: 12px; color: var(--returned); margin-top: 5px; }
.field.has-error .field-input,
.field.has-error select,
.field.has-error input,
.field.has-error textarea { border-color: #c98b7e; }

.form-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  padding-top: 18px; margin-top: 4px;
  border-top: 1px solid var(--border);
}

/* ---------- 上传区域 ---------- */

.uploads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.upload { display: flex; flex-direction: column; }
.upload__label { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.upload__drop {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  background: #fbfcfe;
  padding: 18px 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
}
.upload__drop:hover, .upload__drop.is-over { border-color: var(--primary); background: var(--primary-soft); }
.upload__drop strong { display: block; color: var(--text-side); font-size: 13px; margin-bottom: 4px; }
.upload__drop input[type="file"] { display: none; }
.upload.has-error .upload__drop { border-color: #c98b7e; }
.upload__files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.upload__file {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11.5px;
  color: var(--text-side);
  max-width: 100%;
}
.upload__file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload__file em { color: var(--text-muted); font-style: normal; }

/* ---------- 提示条 ---------- */

.notice {
  border-radius: var(--radius);
  padding: 11px 14px;
  font-size: 13px;
  border: 1px solid;
  margin-bottom: 16px;
}
.notice strong { font-weight: 650; }
.notice--warn    { background: var(--pending-bg);  color: #7a4f0c; border-color: #ecd9b4; border-left: 3px solid var(--pending); }
.notice--error   { background: var(--returned-bg); color: #8a3626; border-color: #e6c6be; border-left: 3px solid var(--returned); }
.notice--success { background: var(--approved-bg); color: #245842; border-color: #bcd9cb; border-left: 3px solid var(--approved); }
.notice--info    { background: var(--primary-soft); color: #2b4a80; border-color: #c9d6ec; border-left: 3px solid var(--primary); }

/* ---------- 详情描述列表 ---------- */

.dl { display: grid; grid-template-columns: 128px 1fr; gap: 10px 16px; font-size: 13px; margin: 0; }
.dl dt { color: var(--text-muted); }
.dl dd { margin: 0; font-weight: 550; word-break: break-word; }

/* ---------- 凭证预览 ---------- */

.proofs { display: grid; gap: 16px; }
.proof__title { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.proof__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.proof__item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 8px;
  display: flex; flex-direction: column; gap: 4px;
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: left;
  width: 100%;
}
.proof__item--image { cursor: zoom-in; font: inherit; font-size: 11.5px; }
.proof__item--image:hover { border-color: var(--primary); }

/* 缩略图保持比例，不拉伸 */
.proof__thumb {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  background: var(--bg-subtle);
  overflow: hidden;
}
.proof__thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }

.proof__pdf {
  display: grid; place-items: center;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  background: var(--returned-bg);
  color: var(--returned);
  font-weight: 700; font-size: 15px; letter-spacing: .06em;
}
.proof__name { color: var(--text-side); font-weight: 600; word-break: break-all; line-height: 1.4; }
.proof__meta { color: var(--text-muted); }
.proof__open { align-self: flex-start; margin-top: 2px; }

/* 图片预览弹窗 */
.modal__panel--wide { max-width: 720px; }
.preview__head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.preview__head b { font-size: 14px; word-break: break-all; }
.preview__head .btn { margin-left: auto; flex: 0 0 auto; }
.preview__body {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  display: grid; place-items: center;
}
.preview__body img { max-width: 100%; max-height: 68vh; height: auto; display: block; }

/* 历史相关申请 */
.related { list-style: none; margin: 0; padding: 0; }
.related__item { padding: 14px 18px; border-bottom: 1px solid var(--border); }
.related__item:last-child { border-bottom: 0; }
.related__head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.related__head b { font-size: 13px; }
.related__head .badge { margin-left: auto; }
.related__meta {
  display: grid; grid-template-columns: 68px 1fr;
  gap: 4px 12px; margin: 0 0 10px; font-size: 12px;
}
.related__meta dt { color: var(--text-muted); }
.related__meta dd { margin: 0; color: var(--text); }

/* ---------- 时间线 ---------- */

.timeline { border-left: 2px solid var(--border); margin-left: 6px; padding-left: 0; }
.timeline__item { position: relative; padding: 0 0 16px 16px; font-size: 12px; color: var(--text-muted); }
.timeline__item::before {
  content: ""; position: absolute; left: -6px; top: 5px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--border-strong);
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item b { display: block; color: var(--text); font-size: 13px; margin-bottom: 2px; }

/* ---------- 弹窗 ---------- */

.modal[hidden] { display: none; }
.modal {
  position: fixed; inset: 0;
  background: rgba(30, 38, 51, .34);
  display: grid; place-items: center;
  padding: 20px;
  z-index: 50;
}
.modal__panel {
  width: 100%; max-width: 460px;
  background: var(--bg-card);
  border-radius: 12px;
  box-shadow: 0 16px 44px rgba(30, 38, 51, .18);
  padding: 22px;
}
.modal__icon {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 20px; margin-bottom: 12px;
}
.modal__icon--success { background: var(--approved-bg); color: var(--approved); }
.modal__icon--error   { background: var(--returned-bg); color: var(--returned); }
.modal__icon--info    { background: var(--primary-soft); color: var(--primary); }
.modal__panel h2 { margin: 0 0 8px; font-size: 17px; }
.modal__panel p { margin: 0 0 6px; color: var(--text-muted); font-size: 13px; }
.modal__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* ---------- 登录页 ---------- */

.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg-page); }
.auth__box { width: 100%; max-width: 440px; }
.auth__brand { text-align: center; margin-bottom: 18px; }
.auth__brand strong { display: block; font-size: 19px; }
.auth__brand span { color: var(--text-muted); font-size: 12.5px; }
.auth__list { display: grid; gap: 8px; }
.auth__account {
  display: flex; align-items: center; gap: 11px;
  width: 100%; text-align: left;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 11px 13px;
  cursor: pointer;
}
.auth__account:hover { border-color: var(--primary); background: var(--primary-soft); }
.auth__account b { font-size: 13.5px; }
.auth__account small { display: block; color: var(--text-muted); font-size: 11.5px; }
.auth__account .badge { margin-left: auto; }

/* ---------- 工具类 ---------- */

.muted { color: var(--text-muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- 响应式 ---------- */

@media (max-width: 1024px) {
  /* 单列同样要写 minmax(0,1fr)：裸 1fr 的下限仍是 min-content，
     那正是 390px 下历史表把整页撑宽的原因。 */
  .split { grid-template-columns: minmax(0, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .proof__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 860px) {
  .hamburger { display: grid; place-items: center; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 40;
    transform: translateX(-100%);
    transition: transform .2s ease;
    box-shadow: 0 0 0 100vmax rgba(30, 38, 51, 0);
  }
  body.nav-open .sidebar { transform: translateX(0); box-shadow: 0 10px 40px rgba(30, 38, 51, .18); }
  body.nav-open .nav-scrim { display: block; }
  .nav-scrim {
    display: none; position: fixed; inset: 0;
    background: rgba(30, 38, 51, .3); z-index: 35;
  }
  .content { padding: 16px 14px 40px; }
  .topbar { padding: 0 14px; }
  .form-grid, .uploads, .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .dl { grid-template-columns: 100px 1fr; }
  .proof__grid { grid-template-columns: repeat(2, 1fr); }
  .pagehead { flex-wrap: wrap; }
  .pagehead__actions { margin-left: 0; width: 100%; }
}

@media (max-width: 520px) {
  .grid--4 { grid-template-columns: 1fr; }
}

/* ---------- 修改重提：已有凭证 / 本次新增 ---------- */

.revise-group {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 14px;
}
.revise-group:last-of-type { margin-bottom: 0; }
.revise-group.has-error { border-color: #c98b7e; }
.revise-group__head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.revise-group__head b { font-size: 13.5px; }
.revise-group__body { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
.revise-col__title { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.proof__item--keep .proof__thumb--btn {
  border: 0; padding: 0; cursor: zoom-in; width: 100%;
}
.proof__pdf--link { text-decoration: none; }
.proof__pdf--link:hover { text-decoration: none; opacity: .85; }
.keep {
  display: flex; align-items: center; gap: 6px;
  margin-top: 6px; font-size: 12px; color: var(--text-side);
  cursor: pointer;
}
.keep input { accent-color: var(--primary); }
.proof__item--keep:has(input[data-keep]:not(:checked)) { opacity: .5; }

@media (max-width: 860px) {
  .revise-group__body { grid-template-columns: 1fr; }
}

/* ---------- 历史版本列表 ---------- */

.versions { list-style: none; margin: 0; padding: 0; }
.versions__item { padding: 14px 18px; border-bottom: 1px solid var(--border); }
.versions__item:last-child { border-bottom: 0; }
.versions__head { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.versions__head b { font-size: 13px; }
.versions__meta { font-size: 12px; color: var(--text-muted); margin-bottom: 9px; }

/* ---- 工作台密度优化（第一批 UI）----
   目标只有一个：让申请列表更早进入第一屏。
   不改配色、不改圆角、不改字体，只压缩间距与卡片高度。 */

.grid--5 { grid-template-columns: repeat(5, 1fr); }
.mb-12 { margin-bottom: 12px; }
.mt-8 { margin-top: 8px; }

/* 统计卡压扁：原来一张卡 15px 上下内边距，五张排开占掉半屏。 */
.grid--5 .stat { padding: 11px 13px; }
.grid--5 .stat__value { font-size: 21px; line-height: 1.2; }

/* 可点的统计卡：整块可点，指针与悬停反馈跟按钮一致。 */
.stat--link { display: block; text-decoration: none; color: inherit; transition: border-color .12s, box-shadow .12s; }
.stat--link:hover { border-color: var(--border-strong); box-shadow: 0 1px 3px rgba(16,24,40,.08); }

/* 系统状态条：一行放下 Drive 与 Gmail，正常时不占第二行。 */
.card--slim .card__body { padding: 9px 13px; }
.statusbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.statusbar__title { font-size: 12.5px; font-weight: 620; color: var(--text-muted); }
.statusbar__item { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.statusbar__link { font-size: 12.5px; }
.statusbar__spacer { flex: 1 1 auto; }

/* 状态圆点：绿=正常，黄=未配置，红=已配置但断开。 */
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot--ok { background: var(--approved); }
.dot--warn { background: var(--pending); }
.dot--bad { background: var(--returned); }

/* 内联折叠菜单：用原生 details，不引入任何前端框架。 */
.inlinemenu { position: relative; }
.inlinemenu > summary { list-style: none; cursor: pointer; display: inline-flex; }
.inlinemenu > summary::-webkit-details-marker { display: none; }
.inlinemenu__panel {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20;
  min-width: 232px; padding: 12px;
  background: var(--bg-card); border: 1px solid var(--border-strong);
  border-radius: var(--radius); box-shadow: 0 6px 20px rgba(16,24,40,.12);
}

/* 页面级折叠区：花名册的新增/导入默认收起，让列表直接进入第一屏。 */
.foldbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.fold { flex: 0 0 auto; }
.fold > summary { list-style: none; cursor: pointer; display: inline-flex; }
.fold > summary::-webkit-details-marker { display: none; }
.fold[open] > summary { border-color: var(--border-strong); }
.foldpanel { margin-bottom: 12px; }

/* 分页条 */
.pager { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 13px; }
.pager__info { font-size: 12.5px; color: var(--text-muted); }
.pager__spacer { flex: 1 1 auto; }
.pager .btn.is-current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* 上传区的就地示例：紧跟在分类标题下，一行小字，不占版面。 */
.proofhint { font-size: 12px; color: var(--text-muted); margin: 2px 0 8px; }

@media (max-width: 1200px) {
  .grid--5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .grid--5 { grid-template-columns: repeat(2, 1fr); }
  .inlinemenu__panel { right: auto; left: 0; }
}

/* 手机端筛选栏纵向排列。
   明确写出来，而不是指望 min-width 撞出换行——那种"碰巧对了"的布局
   会在加一个筛选项之后突然变成别的样子。 */
@media (max-width: 640px) {
  .filterbar .field-input,
  .filterbar select { flex: 1 1 100%; width: 100%; min-width: 0; }
  .filterbar .btn { flex: 1 1 auto; }
}

/* 财务提交的两步说明。只是两行小字，不做流程组件。 */
.steps { margin: 0 0 12px; padding-left: 18px; font-size: 13px; color: var(--text); }
.steps li { margin: 2px 0; }

/* ---- 员工端：报销规则与凭证提醒 ----
   规则要看得见，但这一页的主体仍是填写区。因此核心规则压到最小高度，
   完整制度收进折叠，红色只留给「必须」与「退回风险」。 */

.rules { padding: 12px 14px; }
.rules__list { margin: 8px 0 0; padding-left: 20px; font-size: 12.5px; line-height: 1.7; }
.rules__list li { margin: 1px 0; }

/* 折叠触发器做成一行文字链，不是按钮——它不是操作，只是「想看更多」。 */
.rules__more { margin-top: 8px; }
.rules__more > summary {
  cursor: pointer; font-size: 12.5px; font-weight: 600;
  display: inline-block; text-decoration: underline; text-underline-offset: 2px;
}
.rules__more > summary::-webkit-details-marker { display: none; }
.rules__more[open] > summary { margin-bottom: 6px; }
.rules__detail { font-size: 12.5px; line-height: 1.75; }
.rules__detail h4 { margin: 10px 0 3px; font-size: 12.5px; font-weight: 650; }
.rules__detail p { margin: 3px 0; }
.rules__detail ul { margin: 3px 0; padding-left: 20px; }

.proofnotice { padding: 12px 14px; margin-bottom: 14px; }
.proofnotice p { margin: 6px 0 0; font-size: 12.5px; line-height: 1.7; }
.proofnotice ul { margin: 4px 0 0; padding-left: 20px; font-size: 12.5px; line-height: 1.7; }
/* 最后一行是整块里唯一需要被记住的：加粗、单独成行。 */
.proofnotice__warn { margin-top: 8px; font-weight: 600; }

.renewalnotice { padding: 11px 14px; margin: 0 0 4px; }
.renewalnotice p { margin: 5px 0 0; font-size: 12.5px; line-height: 1.7; }

/* 续费重点：跟在「其他辅助凭证」的举例下面，用告警色区分。 */
.proofhint--renewal { color: var(--returned); font-weight: 600; }

/* 侧栏待办角标。小、红、白字，不闪不动——它只需要被看见一眼。 */
.sidebar__link { display: flex; align-items: center; gap: 8px; }
.sidebar__badge {
  margin-left: auto;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px;
  background: var(--returned); color: #fff;
  font-size: 11px; font-weight: 650; line-height: 18px;
  text-align: center;
}

/* ---- 审核详情页（第二批 UI）----
   只为这一页加必要的小范围 class，card / badge / btn / table / split
   全部沿用既有的那一套。 */

/* 编号、状态、版本同处一行。 */
.reviewhead { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; }
.reviewhead__no { word-break: break-all; }
/* 徽章成组换行：窄屏下宁可「编号」一行、「状态 + 版本」一行，
   也不要「编号 + 状态」一行、「版本」孤零零第二行。 */
.reviewhead__tags { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.reviewhead .badge { font-size: 11.5px; }

/* 核心信息条：多列并排。原来 dl 一行一个字段，九个字段就是九行。
   auto-fit 让它在 1440 排六列、1280 排四到五列、手机自然单列。 */
.factbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px 18px;
  padding: 13px 18px;
}
.fact { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fact > span { font-size: 11.5px; color: var(--text-muted); }
.fact > b { font-size: 13.5px; font-weight: 600; word-break: break-word; }
/* 金额稍重一点——审核时最先看的数字，但不做成巨大标题。 */
.fact--amount > b { font-size: 16px; font-weight: 680; }

/* 续费成果描述与备注是长文本，单独一行，不挤进上面的网格。 */
.factnotes { border-top: 1px solid var(--border); padding: 11px 18px; display: grid; gap: 8px; }
.factnotes > div > span { font-size: 11.5px; color: var(--text-muted); }
.factnotes p { margin: 2px 0 0; font-size: 13px; line-height: 1.65; word-break: break-word; }

/* 凭证分类下的核对要点：一行小字，不是制度全文。 */
.proof__hint { font-size: 11.5px; color: var(--text-muted); margin: 2px 0 8px; }
.proof__title .badge { margin-left: 6px; font-size: 11px; }

/* 后续处理：三行紧凑状态，不是三张卡片。 */
.follow { display: grid; gap: 9px; }
.follow__row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.follow__label { font-size: 12.5px; color: var(--text-muted); flex: 0 0 66px; }
.follow__state { flex: 1 1 auto; min-width: 0; }
.follow__act { flex: 0 0 auto; display: flex; gap: 6px; align-items: center; }
.follow__act form { display: inline; }
.follow__note { margin: -3px 0 2px 76px; font-size: 11.5px; color: var(--text-muted); }

/* 审核操作栏跟随滚动。
   看凭证要往下翻很远，而「通过 / 退回」是这一页唯一的产出，
   它不该在翻到第三屏时就消失。

   top 取 16px：页面整体滚动，顶栏不是 fixed，所以贴到视口顶部即可。
   max-height + overflow 是防御性的：万一右栏内容长过一屏，
   它自己滚，而不是把页面顶出横向滚动条或盖住底部。 */
@media (min-width: 1025px) {
  .reviewside {
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
  }
}

/* 1024 及以下 .split 已经是单列，sticky 在那里没有意义——
   粘住的元素会跟着单列一起走，反而可能盖住正文。
   此时这一栏退化成页面底部的普通操作区。 */
@media (max-width: 1024px) {
  .reviewside { position: static; max-height: none; overflow: visible; }
}

@media (max-width: 520px) {
  .factbar { grid-template-columns: 1fr 1fr; }
  .follow__note { margin-left: 0; }
}

/* 财务页三个计数。沿用统计卡那一套，只是三列。 */
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--3 .stat { padding: 11px 13px; }
.grid--3 .stat__value { font-size: 21px; line-height: 1.2; }

@media (max-width: 720px) {
  .grid--3 { grid-template-columns: 1fr; }
}

/* ---- 报销记录管理 ---- */

/* 批量操作栏。只在选中至少一条时出现——常驻一条「已选择 0 条」
   既没信息量，又会把表头往下推。 */
.bulkbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2, #f7f8fa);
  font-size: 13px;
}
.bulkbar[hidden] { display: none; }

/* 勾选列尽量窄：它是操作入口，不该占走数据的宽度。 */
.table__pick { width: 34px; text-align: center; }
.table__pick input { cursor: pointer; }

/* 删除按钮用描边而不是实心红。
   实心红会和「审核」抢第一视觉，而审核才是每天要点的那个；
   删除只需要在被找的时候找得到、并且看起来危险。 */
.btn--danger-quiet {
  border-color: var(--danger, #d93025);
  color: var(--danger, #d93025);
  background: transparent;
}
.btn--danger-quiet:hover {
  background: color-mix(in srgb, var(--danger, #d93025) 8%, transparent);
}

/* 确认弹窗里的编号清单：等宽、可滚动、不撑破弹窗。
   管理员必须在按下去之前看清自己选了什么，所以宁可给它一块独立的滚动区，
   也不要截断成「等 N 条」。 */
.modal__list {
  max-height: 180px;
  overflow: auto;
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2, #f7f8fa);
  font-size: 12.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-all;
}
