* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --bg: #f4f6fa;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --green: #059669;
  --red: #dc2626;
  --orange: #d97706;
  --radius: 10px;
}
body {
  font-family: -apple-system, "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}
.hidden { display: none !important; }

.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #eef2ff 0%, #f4f6fa 60%);
}
.login-card {
  width: 380px; background: var(--card); border-radius: 14px;
  box-shadow: 0 10px 40px rgba(31,41,55,.10); padding: 36px 32px;
}
.login-card h1 { font-size: 22px; margin-bottom: 6px; }
.login-card .sub { color: var(--muted); font-size: 13px; margin-bottom: 24px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
input, select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; font-family: inherit; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid #bfdbfe; border-color: var(--primary); }
textarea { resize: vertical; min-height: 70px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border: none; border-radius: 8px; cursor: pointer;
  font-size: 14px; font-family: inherit; background: var(--primary); color: #fff;
  text-decoration: none; transition: background .15s;
}
.btn:hover { background: var(--primary-dark); }
.btn.ghost { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover { background: #f9fafb; }
.btn.danger { background: var(--red); }
.btn.success { background: var(--green); }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

header.topbar {
  background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 24px; height: 56px;
  position: sticky; top: 0; z-index: 30;
}
.brand { font-weight: 700; font-size: 16px; margin-right: 32px; color: var(--primary); }
nav.tabs { display: flex; gap: 4px; flex: 1; }
nav.tabs button {
  background: none; border: none; padding: 8px 14px; cursor: pointer;
  font-size: 14px; color: var(--muted); border-radius: 8px; font-family: inherit;
}
nav.tabs button.active { background: #eff6ff; color: var(--primary); font-weight: 600; }
.userbox { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.userbox b { color: var(--text); }
main { max-width: 1180px; margin: 24px auto; padding: 0 24px 60px; }
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(31,41,55,.06); padding: 20px; margin-bottom: 18px;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 16px;
}
.card-head h2 { font-size: 17px; }
.card-head .desc { color: var(--muted); font-size: 13px; margin-top: 3px; }
/* 右侧按钮组不参与压缩，宁可让左侧说明换行，避免按钮被挤到第二行 */
.card-head .toolbar { flex: none; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: 12px; color: var(--muted); font-weight: 600; background: #fafbfc; }
tbody tr:hover { background: #fafcff; }
td.num { font-variant-numeric: tabular-nums; text-align: right; }
.empty { text-align: center; color: var(--muted); padding: 32px 0; }

.badge {
  display: inline-block; padding: 2px 9px; border-radius: 20px;
  font-size: 12px; line-height: 1.6; white-space: nowrap;
}
.badge.pending { background: #fef3c7; color: var(--orange); }
.badge.approved { background: #d1fae5; color: var(--green); }
.badge.rejected { background: #fee2e2; color: var(--red); }
.badge.archived { background: #e0e7ff; color: #4338ca; }
.badge.payment_requested { background: #fef3c7; color: var(--orange); }
.badge.paid { background: #d1fae5; color: var(--green); }
.badge.view-only { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; margin-left: 4px; }

.modal-mask {
  position: fixed; inset: 0; background: rgba(17,24,39,.45);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow-y: auto; z-index: 50;
}
.modal {
  background: #fff; border-radius: 14px; width: 100%; max-width: 720px;
  box-shadow: 0 20px 60px rgba(17,24,39,.25); padding: 24px;
}
.modal.wide { max-width: 840px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal-head h3 { font-size: 18px; }
.close-x { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--muted); line-height: 1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.span2 { grid-column: span 2; }

/* 生成凭证：固定贷方 + 借贷分录预览表 */
.v-fixed {
  border: 1px solid #bfdbfe; background: #eff6ff; border-left: 4px solid var(--primary);
  border-radius: 8px; padding: 10px 14px; margin-bottom: 14px;
}
.v-fixed-row { display: flex; align-items: baseline; gap: 10px; font-size: 14px; color: #1e3a8a; }
.v-fixed-k { font-size: 12px; color: #3b82f6; flex: none; }
.v-fixed .hint { margin-top: 4px; color: #3b6ea5; }
.v-summary { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.v-summary b { color: var(--text); font-weight: 600; }
.vtable { width: 100%; border-collapse: collapse; margin-bottom: 10px; font-size: 13px; }
.vtable th { background: #f8fafc; font-size: 12px; color: var(--muted); font-weight: 600; }
.vtable th, .vtable td { border-bottom: 1px solid var(--border); padding: 8px 10px; }
.vtable .num { text-align: right; font-variant-numeric: tabular-nums; font-family: ui-monospace, Consolas, monospace; }
.vtable .v-dir { text-align: center; color: var(--muted); font-size: 12px; width: 52px; }
.vtable th:first-child { text-align: center; }
.vtable .v-subj { color: var(--text); }
.vtable .v-memo { color: var(--muted); font-size: 12px; max-width: 260px; word-break: break-all; }
.vtable tr.v-credit td { background: #fbfdff; }
.vtable tr.v-credit .v-dir { color: var(--primary); font-weight: 700; }
.vtable tfoot td { border-top: 2px solid var(--border); border-bottom: none; background: #fafbfc; }
.v-check { font-size: 13px; color: #92400e; background: #fffbeb; border: 1px solid #fde68a;
  border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; }
.v-warn { font-size: 13px; color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca;
  border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; }
/* 凭证列表：一张凭证多行借方时的紧凑展示 */
.v-debit .v-line { font-size: 12.5px; line-height: 1.75; white-space: nowrap; }
/* 导出清单弹窗里的操作要点 */
.xml-tips { font-size: 13px; color: #374151; line-height: 1.9; background: #f8fafc;
  border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; }
.xml-tips b { color: var(--primary); }

/* 批量下载 XML 引导弹窗 */
.dlw-warn { font-size: 13px; color: #92400e; background: #fffbeb; border: 1px solid #fde68a;
  border-left: 4px solid var(--orange); border-radius: 8px; padding: 10px 14px;
  margin-bottom: 14px; line-height: 1.8; }
.dlw-warn b { color: #b45309; }
.dlw-steps { display: flex; flex-direction: column; gap: 12px; }
.dlw-step { display: flex; gap: 12px; border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; background: #fafbfc; }
.dlw-num { width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--primary);
  color: #fff; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; }
.dlw-body { flex: 1; min-width: 0; }
.dlw-title { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.dlw-title b { color: var(--primary); }
.dlw-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; line-height: 1.7; }
.dlw-sub code { background: #eef2ff; color: #1e40af; padding: 1px 6px;
  border-radius: 5px; font-size: 12px; word-break: break-all; }
.dlw-wrap { max-height: 264px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.dlw-table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 13px; }
.dlw-table th, .dlw-table td { padding: 7px 9px; border-bottom: 1px solid var(--border);
  text-align: left; vertical-align: middle; }
.dlw-table thead th { position: sticky; top: 0; z-index: 1; background: #f3f4f6;
  font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.dlw-table tbody tr:last-child td { border-bottom: none; }
.dlw-table tbody tr:hover { background: #f8fafc; }
.dlw-table tr.dlw-done .dlw-val { color: #9ca3af; text-decoration: line-through; }
.dlw-table td.num, .dlw-table th.num { text-align: right; white-space: nowrap; }
.dlw-table td.c, .dlw-table th.c { text-align: center; }
.dlw-nc { white-space: nowrap; }
.dlw-val { font-family: Consolas, "Courier New", monospace; font-size: 13px; letter-spacing: .2px; }
.dlw-copy { margin-left: 6px; border: 1px solid #bfdbfe; background: #eff6ff; color: var(--primary);
  font-size: 11.5px; padding: 0 6px; border-radius: 5px; cursor: pointer;
  line-height: 18px; font-family: inherit; }
.dlw-copy:hover { background: #dbeafe; }
.dlw-copy.ok { border-color: #a7f3d0; background: #ecfdf5; color: var(--green); }
.dlw-copy-row { border: 1px solid #c7d2fe; background: #eef2ff; color: #4338ca;
  font-size: 12px; padding: 3px 9px; border-radius: 6px; cursor: pointer;
  line-height: 18px; font-family: inherit; white-space: nowrap; }
.dlw-copy-row:hover { background: #e0e7ff; }
.dlw-copy-row.ok { border-color: #a7f3d0; background: #ecfdf5; color: var(--green); }
.dlw-progress { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.dlw-progress b { color: var(--primary); font-size: 14px; }
.dlw-foot { border-top: 1px solid var(--border); margin-top: 14px; padding-top: 14px; }
.dlw-foot .hint { margin-top: 8px; }

.steps { display: flex; flex-direction: column; gap: 10px; }
.step {
  display: flex; gap: 12px; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 9px; background: #fafbfc;
}
.step .dot {
  width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 12px; font-weight: 700; flex: none;
  background: #e5e7eb; color: var(--muted);
}
.step.approved .dot { background: #d1fae5; color: var(--green); }
.step.rejected .dot { background: #fee2e2; color: var(--red); }
.step.pending .dot { background: #fef3c7; color: var(--orange); }
.step .meta { font-size: 12px; color: var(--muted); }
.step .comment { font-size: 13px; margin-top: 3px; }

.file-list { display: flex; flex-direction: column; gap: 6px; }
.file-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 10px; border: 1px solid var(--border); border-radius: 7px; font-size: 13px;
}
.file-item a { color: var(--primary); text-decoration: none; }
.file-item a:hover { text-decoration: underline; }
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.hint.warn { color: var(--orange); }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stat-row { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.stat {
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 18px; min-width: 130px;
}
.stat .k { font-size: 12px; color: var(--muted); }
.stat .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  header.topbar { padding: 0 12px; }
  .brand { margin-right: 12px; font-size: 15px; }
  nav.tabs button { padding: 7px 9px; font-size: 13px; }
  main { padding: 0 12px 50px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .userbox span.uname { display: none; }
}

/* 明细行表格（新建报销单） */
.line-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.line-table { width: 100%; border-collapse: collapse; min-width: 1160px; }
.line-table th, .line-table td { padding: 6px 6px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.line-table th { font-size: 12px; color: var(--muted); background: #fafbfc; white-space: nowrap; }
.line-table input, .line-table select { padding: 6px 8px; font-size: 13px; }
.line-table .req { color: var(--red); margin-left: 2px; }
.line-table tfoot td { background: #f8fafc; font-size: 14px; }
.line-table tbody tr:hover { background: #fafcff; }
.detail-table { width: 100%; border-collapse: collapse; }
.detail-table th, .detail-table td { padding: 7px 8px; border-bottom: 1px solid var(--border); font-size: 13px; }
.detail-table th { font-size: 12px; color: var(--muted); background: #fafbfc; }

/* 发票卡片（新建报销单行内） */
.inv-chip {
  display: flex; gap: 4px; align-items: center; margin-bottom: 4px;
  background: #f8fafc; border: 1px solid var(--border); border-radius: 6px; padding: 3px 5px;
}
.inv-chip .inv-type { width: 62px; padding: 4px 4px; font-size: 12px; }
.inv-chip .inv-no { width: 118px; padding: 4px 6px; font-size: 12px; }
.inv-chip .inv-amt { width: 78px; padding: 4px 6px; font-size: 12px; text-align: right; }
.inv-chip .x {
  border: none; background: none; color: var(--muted); cursor: pointer;
  font-size: 16px; line-height: 1; padding: 0 2px;
}
.inv-chip .x:hover { color: var(--red); }

/* 多类型票据卡片 */
.inv-item { margin-bottom: 6px; }
.inv-item.foreign .inv-chip { background: #fffbeb; border-color: #fde68a; }
.inv-chip { flex-wrap: wrap; }
.inv-chip .inv-badge {
  font-size: 11px; padding: 1px 6px; border-radius: 20px;
  background: #eef2ff; color: #4338ca; white-space: nowrap;
}
.inv-item.foreign .inv-badge { background: #fef3c7; color: var(--orange); }
.inv-chip .inv-cur { width: 62px; padding: 4px 2px; font-size: 11px; }
.inv-chip .inv-rate { width: 66px; padding: 4px 4px; font-size: 11px; text-align: right; }
.inv-chip .inv-cny { font-size: 11px; color: var(--green); white-space: nowrap; }
.inv-sub { font-size: 11px; color: var(--muted); padding-left: 4px; }
.inv-warn {
  font-size: 11px; color: var(--orange); padding: 2px 4px 2px 8px;
  border-left: 2px solid #fde68a; margin: 2px 0 4px;
}

/* 境外票据合规材料区 */
.proof-box {
  border: 1px solid #fde68a; background: #fffbeb; border-radius: 10px;
  padding: 12px 14px; margin: 10px 0 4px;
}
.proof-head { margin-bottom: 8px; }
.proof-head b { font-size: 14px; }
.proof-head .hint { margin-top: 4px; line-height: 1.5; }
.proof-score { margin-left: 8px; }
.proof-list { display: flex; flex-direction: column; gap: 8px; }
.proof-row {
  display: flex; gap: 10px; align-items: flex-start;
  background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px;
}
.proof-row.need { border-color: #fecaca; background: #fff7f7; }
.proof-row.done { border-color: #a7f3d0; background: #f6fffb; }
.proof-k { width: 260px; flex: none; font-size: 13px; }
.proof-k .badge { margin-right: 4px; }
.proof-k .hint { margin-top: 2px; }
.proof-v { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.proof-v .file-item { font-size: 12px; padding: 4px 8px; }
.proof-v .x {
  border: none; background: none; color: var(--muted); cursor: pointer; font-size: 15px;
}
.proof-v .x:hover { color: var(--red); }

/* 明细主行右侧：上传票据 / 删除本行 */
.line-tools-cell { white-space: nowrap; }
.line-tools-cell .btn { margin-right: 4px; }
.file-btn { position: relative; overflow: hidden; cursor: pointer; }
.file-btn input[type="file"] { display: none; }

/* 附属于主行下面的票据行：一张票一行（票据文件 | 票据类别 | 操作） */
.line-table tr.inv-row td {
  background: #fbfcfe; border-bottom: 1px dashed var(--border); padding: 4px 6px;
}
.line-table tr.inv-row:nth-last-child(1) td { border-bottom: 1px solid var(--border); }
.line-table tbody tr.inv-row:hover td { background: #f5f9ff; }
.inv-main {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding-left: 10px; border-left: 2px solid #dbeafe;
}
tr.inv-row.foreign .inv-main { border-left-color: #fde68a; }
.inv-idx {
  font-size: 11px; padding: 1px 8px; border-radius: 20px;
  background: #eef2ff; color: #4338ca; white-space: nowrap;
}
.inv-main .inv-no { width: 196px; padding: 4px 6px; font-size: 12px; }
.inv-main .inv-amt { width: 94px; padding: 4px 6px; font-size: 12px; text-align: right; }
.inv-main .inv-cur { width: 66px; padding: 4px 2px; font-size: 11px; }
.inv-main .inv-rate { width: 72px; padding: 4px 4px; font-size: 11px; text-align: right; }
.inv-main .inv-cny { font-size: 11px; color: var(--green); white-space: nowrap; }
.inv-main .inv-tax { font-size: 11px; color: var(--muted); }

/* 号码/金额为空：左侧标红 + 空输入框浅红底 + 行内提示条（不静默放行） */
.inv-main.need-fill { border-left-color: #f87171; }
.inv-main.need-fill .inv-no:placeholder-shown,
.inv-main.need-fill .inv-amt:placeholder-shown {
  border-color: #fca5a5; background: #fff7f7;
}
.inv-hint { margin: 3px 0 0 12px; font-size: 11px; color: var(--muted); }
.inv-tip {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 5px 0 1px 12px; padding: 5px 10px;
  background: #fff7ed; border: 1px solid #fed7aa; border-left: 3px solid var(--orange);
  border-radius: 6px; font-size: 12px; line-height: 1.6; color: #9a3412;
}
.inv-tip .it-ico {
  flex: 0 0 auto; width: 16px; height: 16px; border-radius: 50%;
  background: var(--orange); color: #fff; font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.inv-tip .it-txt { flex: 1; min-width: 220px; }
.inv-tip .it-txt b { color: var(--red); }
.inv-tip .it-open {
  flex: 0 0 auto; font-size: 12px; font-weight: 600; color: #b45309;
  text-decoration: underline; text-underline-offset: 3px; white-space: nowrap;
}
.inv-tip .it-open:hover { color: var(--red); }
.inv-file { font-size: 12px; }
.inv-file.can-open { cursor: zoom-in; }
.inv-file.can-open:hover .inv-fname { color: var(--primary); }
a.inv-fname.fp-link {
  cursor: pointer; color: #1e293b; text-decoration: underline;
  text-decoration-style: dotted; text-decoration-color: #cbd5e1; text-underline-offset: 3px;
}
a.inv-fname.fp-link:hover { color: var(--primary); text-decoration-style: solid; text-decoration-color: var(--primary); }

/* 通用「点击预览」链接（发票台账等列表） */
a.fp-link {
  cursor: pointer; color: var(--primary); text-decoration: none;
  word-break: break-all;
}
a.fp-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.detail-table a.fp-link { font-size: 12px; }

/* 票据在线预览浮层 */
.file-preview-mask { align-items: center; z-index: 80; padding: 24px 16px; }
.file-preview {
  width: min(1080px, 94vw); height: min(86vh, 920px);
  background: #fff; border-radius: 12px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 70px rgba(15,23,42,.32);
}
.fp-head {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px;
  border-bottom: 1px solid var(--border); background: #f8fafc; flex: 0 0 auto;
}
.fp-name {
  flex: 1; min-width: 0; font-size: 13px; color: #1e293b;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fp-tools { display: flex; gap: 6px; flex: 0 0 auto; }
.fp-frame { flex: 1; width: 100%; border: 0; background: #525659; }
.fp-tip {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 24px; font-size: 13px; line-height: 1.9; color: var(--muted); text-align: center;
}
@media (max-width: 720px) {
  .file-preview { width: 96vw; height: 88vh; }
  .fp-head { flex-wrap: wrap; }
}
.inv-fname {
  display: block; max-width: 186px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; color: #334155;
}
.inv-flag { font-size: 11px; }
.inv-flag.ok { color: var(--green); }
.inv-flag.bad { color: var(--red); font-weight: 600; }
.inv-op { text-align: center; }
.inv-op .inv-del { padding: 3px 8px; font-size: 12px; }

/* 票据类别下拉（附属行） */
.line-table select.l-cat {
  width: 100%; padding: 4px 6px; font-size: 12px;
  border: 1px solid var(--border); border-radius: 6px; background: #fff;
}

/* ---------- 出差拜访报告：模板下载 / 缺填提醒 ---------- */
.tpl-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #f8fafc; border: 1px dashed var(--border); border-radius: 8px;
  padding: 8px 12px; margin-bottom: 8px;
}
.tpl-bar .tpl-title { font-size: 13px; color: var(--text); }
.tpl-bar .tpl-sub { font-size: 12px; color: var(--muted); }
.tpl-bar .btn { text-decoration: none; }
/* 首页独立提示条：比表单内的更宽松，作为页面级提示 */
.tpl-bar.page {
  margin-bottom: 14px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 10px;
}
.tpl-bar.page .tpl-title { font-size: 14px; font-weight: 600; }
.tpl-bar.page .tpl-sub { font-size: 13px; }

.req-list { margin: 6px 0 0; font-size: 12px; color: var(--red); line-height: 1.7; }

.badge.alert { background: #fee2e2; color: var(--red); border: 1px solid #fecaca; }

.report-alert {
  border: 1px solid #fecaca; background: #fef2f2; border-left: 4px solid var(--red);
  border-radius: 8px; padding: 12px 14px; margin: 0 0 16px;
}
.report-alert .ra-title {
  font-size: 14px; font-weight: 700; color: var(--red); margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
}
.report-alert ul { margin: 4px 0 0 18px; font-size: 13px; color: #7f1d1d; }
.report-alert li { margin: 2px 0; }
.report-alert .ra-sub { font-size: 12px; color: #991b1b; margin-top: 6px; }

/* 审批人已审完、单据流转到下一级的只读提示 */
.approve-tip {
  border: 1px solid #bfdbfe; background: #eff6ff; border-left: 4px solid var(--primary);
  border-radius: 8px; padding: 10px 14px; margin: 0 0 16px; font-size: 13px; color: #1e3a8a;
}

.check-box { max-height: 62vh; overflow: auto; }
.check-box .ck-block { margin-bottom: 14px; }
.check-box .ck-h {
  font-size: 13px; font-weight: 700; color: var(--red); margin-bottom: 6px;
}
.check-box .ck-items {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.check-box .ck-item {
  background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c;
  border-radius: 6px; padding: 3px 9px; font-size: 13px;
}
.check-box .ck-note { font-size: 13px; color: var(--muted); line-height: 1.7; }
.check-box .ck-ok { color: var(--green); font-size: 13px; }

/* 报告「填写不规范」明细表 */
.check-box .bad-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
  border: 1px solid #fecaca; border-radius: 6px; overflow: hidden;
}
.check-box .bad-table th {
  background: #fef2f2; color: #b91c1c; font-weight: 600;
  text-align: left; padding: 6px 9px; border-bottom: 1px solid #fecaca;
}
.check-box .bad-table td { padding: 6px 9px; border-bottom: 1px solid #fee2e2; vertical-align: top; }
.check-box .bad-table tr:last-child td { border-bottom: none; }
.check-box .bad-table .bad-lb { color: var(--text); font-weight: 600; white-space: nowrap; width: 26%; }
.check-box .bad-table .bad-val {
  color: var(--red); max-width: 150px; word-break: break-all;
  font-family: ui-monospace, Consolas, monospace; font-size: 12px;
}
.check-box .bad-table .bad-why { color: var(--muted); }
.report-alert .ra-body { font-size: 13px; color: #7f1d1d; line-height: 1.85; }
.report-alert .ra-body b { color: var(--red); }

/* ---------- 导出归档包：凭证号区间 ---------- */
.arc-preview {
  margin-top: 12px; padding: 10px 12px; font-size: 13px; line-height: 1.7;
  background: #f8fafc; border: 1px solid var(--border); border-radius: 8px;
}
.arc-preview b { color: var(--primary); }
.arc-preview .arc-bad { color: var(--red); font-weight: 600; }

/* ---------- 新建单：暂存 ---------------- */
.head-actions { display: flex; align-items: center; gap: 10px; }
.draft-tip {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #fffbeb; border: 1px solid #fde68a; border-left: 4px solid var(--orange);
  border-radius: 8px; padding: 8px 12px; margin: 0 0 12px;
  font-size: 13px; color: #92400e;
}
.draft-tip .btn { text-decoration: none; }

/* ---------- 新建单：出差报告多份追加 ---------- */
.report-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.report-pick .hint { margin-top: 0; }
#report-list { margin-top: 2px; }
#report-list .file-item { margin-bottom: 6px; }
#report-list .fi-size { font-size: 12px; color: var(--muted); margin-left: 8px; }
#report-list .fi-tag {
  font-size: 11px; color: var(--green); background: #ecfdf5;
  border: 1px solid #a7f3d0; border-radius: 10px; padding: 0 6px; margin-left: 8px;
}

/* ---------- 驳回单：修改入口与驳回提示 ---------- */
.reject-banner {
  background: #fef2f2; border: 1px solid #fecaca; border-left: 4px solid var(--red);
  border-radius: 8px; padding: 9px 13px; margin: 0 0 12px;
  font-size: 13px; color: #991b1b;
}
.reject-banner b { color: var(--red); }
.reject-banner .rb-meta { font-size: 12px; color: #7f1d1d; opacity: .85; margin-top: 3px; }
.reject-banner .rb-cmt { margin-top: 4px; }
.step.superseded { opacity: .6; }
.step.superseded .dot { background: #f1f5f9; color: #94a3b8; }
.step-round {
  font-size: 11px; color: #4338ca; background: #eef2ff; border-radius: 10px;
  padding: 1px 7px; margin-left: 8px; white-space: nowrap;
}
#report-list .x {
  border: none; background: none; color: var(--muted); cursor: pointer;
  font-size: 16px; line-height: 1;
}
#report-list .x:hover { color: var(--red); }

/* 附件：预览 / 下载 */
.fi-ops { display: flex; gap: 12px; align-items: center; }
.fi-ops a { color: var(--primary); text-decoration: none; }
.fi-ops a:hover { text-decoration: underline; }
