/* ============ 基础 ============ */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
:root {
  --primary: #155e94;
  --primary-dark: #0e4a75;
  --primary-light: #e8f2fa;
  --accent: #e8890c;
  --bg: #f2f5f8;
  --card: #ffffff;
  --text: #24313d;
  --muted: #7a8794;
  --line: #e3e9ef;
  --danger: #d64541;
  --ok: #1d9e6f;
  --radius: 12px;
  --shadow: 0 1px 4px rgba(20, 50, 80, .08);
}
html { font-size: 15px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
.hidden { display: none !important; }
input, select, textarea, button { font: inherit; color: inherit; }
input[type="text"], input[type="password"], input[type="date"], input[type="number"], select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  font-size: 16px;
  outline: none;
  transition: border .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); }
textarea { resize: vertical; }
label { display: block; font-size: 13px; color: var(--muted); }
label > input, label > select { margin-top: 4px; }

/* ============ 按钮 ============ */
.btn {
  display: inline-block; border: none; border-radius: 8px; cursor: pointer;
  padding: 10px 18px; font-size: 15px; background: #dde5ec; color: var(--text);
  transition: filter .15s; white-space: nowrap; user-select: none;
}
.btn:active { filter: brightness(.9); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-secondary { background: #eaf1f7; color: var(--primary-dark); }
.btn-danger { background: #fdecec; color: var(--danger); }
.btn-excel { background: #e6f4ea; color: #137a46; }
.btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5); }
.btn-sm { padding: 6px 12px; font-size: 13.5px; border-radius: 7px; }
.btn-lg { padding: 13px 26px; font-size: 17px; }
.btn-block { width: 100%; }
.btn-chip { padding: 7px 14px; font-size: 13.5px; border-radius: 999px; background: #fff; border: 1px solid var(--line); }
.btn-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ============ 登录 ============ */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, #0e4a75, #1a6fb5 55%, #3f97cf);
  padding: 20px;
}
.login-card {
  background: #fff; border-radius: 16px; padding: 34px 28px; width: 100%; max-width: 380px;
  box-shadow: 0 12px 40px rgba(0,0,0,.25); text-align: center;
}
.login-logo { font-size: 44px; }
.login-card h1 { font-size: 22px; margin: 8px 0 4px; }
.login-sub { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.login-card label { text-align: left; margin-bottom: 14px; }
.login-error {
  background: #fdecec; color: var(--danger); border-radius: 8px;
  padding: 8px 10px; font-size: 13.5px; margin-bottom: 12px; text-align: left;
}
.login-tip { margin-top: 16px; font-size: 12.5px; color: var(--muted); }

/* ============ 顶栏与导航 ============ */
.topbar {
  background: linear-gradient(120deg, var(--primary-dark), var(--primary));
  color: #fff; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 30;
}
.topbar-title { font-size: 17px; font-weight: 600; }
.topbar-sub { font-size: 12px; font-weight: 400; opacity: .8; }
.topbar-user { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.tabs {
  display: flex; gap: 4px; padding: 8px 10px 0; overflow-x: auto;
  background: var(--primary-dark); position: sticky; top: 49px; z-index: 29;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  border: none; background: rgba(255,255,255,.12); color: rgba(255,255,255,.85);
  padding: 9px 16px; border-radius: 9px 9px 0 0; cursor: pointer; font-size: 14.5px;
  white-space: nowrap;
}
.tab.active { background: var(--bg); color: var(--primary-dark); font-weight: 600; }

main { max-width: 1080px; margin: 0 auto; padding: 14px 12px 90px; }

/* ============ 卡片 ============ */
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px; margin-bottom: 14px;
}
.card-title { font-size: 15.5px; font-weight: 600; margin-bottom: 10px; color: var(--primary-dark); }
.card-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.card-title-row .card-title { margin-bottom: 0; }

.form-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }

/* ============ 录入明细行 ============ */
.spec-legend { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.item-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px;
  margin-bottom: 10px; background: #fbfdff; position: relative;
}
.item-head { display: flex; gap: 8px; margin-bottom: 8px; }
.item-head .grow { flex: 1; }
.item-del {
  border: none; background: #fdecec; color: var(--danger); border-radius: 8px;
  width: 40px; font-size: 17px; cursor: pointer; flex-shrink: 0;
}
.spec-row { display: flex; flex-wrap: wrap; gap: 8px; }
.spec-cell { flex: 1 1 72px; min-width: 70px; }
.spec-cell b { color: var(--accent); font-weight: 600; }
/* 「其他」重量：桶数 + 总重量 两格并排，紧凑显示不超出区域 */
.other-cell {
  flex: 0 1 auto; display: flex; gap: 4px; align-items: flex-end;
  padding: 2px 4px 2px; border-radius: 8px; background: #fff8ec;
  border: 1px dashed var(--accent); max-width: 150px;
}
.other-cell > label { min-width: 0; width: 50px; flex: 0 1 auto; font-size: 11px; }
.other-cell .other-kg { min-width: 0; width: 62px; flex: 0 1 auto; font-size: 11px; }
.other-cell input { font-size: 13px; padding: 6px 2px; min-width: 0; width: 100%; }
.other-cell b { color: var(--accent); font-size: 11px; }
.num-cell input { text-align: center; }
.weight-wrap { position: relative; }
.weight-manual-tag {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-size: 11px; color: var(--accent); background: #fdf3e4; padding: 1px 5px; border-radius: 5px;
  pointer-events: none;
}
.weight-auto-btn {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  border: none; background: #fdf3e4; color: var(--accent); font-size: 11px;
  padding: 2px 6px; border-radius: 5px; cursor: pointer;
}
.item-foot { display: flex; gap: 8px; margin-top: 8px; }
.item-foot .grow { flex: 1; }

/* ============ 合计条 / 提交 ============ */
.totals-bar {
  display: flex; background: var(--primary-dark); color: #fff; border-radius: var(--radius);
  padding: 12px 6px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.totals-bar > div { flex: 1; text-align: center; }
.totals-bar span { display: block; font-size: 18px; font-weight: 700; }
.totals-bar em { font-style: normal; font-size: 11.5px; opacity: .75; }
.submit-row { display: flex; gap: 10px; }
.submit-row .btn-primary { flex: 1; }
.editing-hint {
  margin-top: 10px; text-align: center; color: var(--accent);
  background: #fdf3e4; padding: 8px; border-radius: 8px; font-size: 13.5px;
}

/* 报销照片上传引导 */
.photo-tip {
  background: #f4f8ff; border: 1px solid #d6e4f7; border-radius: 8px;
  padding: 9px 11px; font-size: 12.5px; line-height: 1.7; color: #2b4a72;
}
.photo-tip b { color: #1c3f6e; }
.photo-tip-line { padding-left: 2px; }
.photo-tip-line b { color: #c0392b; }
.photo-tip-note {
  margin-top: 5px; padding-top: 5px; border-top: 1px dashed #cfdff2;
  font-size: 11.5px; color: #6b7f96;
}

/* ============ 筛选与列表 ============ */
.filter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-row input[type="date"] { width: auto; min-width: 130px; flex: 1; }
.filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.filter-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.record-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 12px 14px; margin-bottom: 10px;
}
.record-card .rc-head { display: flex; justify-content: space-between; align-items: baseline; }
.record-card .rc-date { font-weight: 700; color: var(--primary-dark); }
.record-card .rc-void { color: var(--danger); font-size: 12px; border: 1px solid var(--danger); border-radius: 5px; padding: 0 5px; }
.record-card .rc-return { color: #c2410c; font-size: 12px; border: 1px solid #f59e0b; background: #fff7ed; border-radius: 5px; padding: 0 5px; }
.record-card .rc-line { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.record-card .rc-nums { display: flex; gap: 14px; margin-top: 8px; font-size: 13.5px; }
.record-card .rc-nums b { font-size: 16px; color: var(--text); }
.record-card .rc-ops { display: flex; gap: 8px; margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 10px; }

/* ============ 表格 ============ */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
.data-table th, .data-table td {
  border: 1px solid var(--line); padding: 7px 8px; text-align: center; white-space: nowrap;
}
.data-table th { background: var(--primary-light); color: var(--primary-dark); position: sticky; top: 0; }
.data-table tfoot td { font-weight: 700; background: #f6f9fc; }
.data-table td.left { text-align: left; }
.row-void td { color: #b0b8c0; text-decoration: line-through; }
.row-void td:last-child { text-decoration: none; }
.op-cell { display: flex; gap: 6px; justify-content: center; }

/* ============ 统计 ============ */
.stat-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.stat-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 12px 8px; text-align: center;
}
.stat-card .v { font-size: 19px; font-weight: 700; color: var(--primary-dark); }
.stat-card .k { font-size: 12px; color: var(--muted); margin-top: 3px; }
.quick-range { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.chart-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.hbar-chart { display: flex; flex-direction: column; gap: 7px; }
.hbar { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.hbar .name { width: 84px; text-align: right; color: var(--muted); flex-shrink: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .track { flex: 1; background: #eef3f7; border-radius: 6px; height: 20px; overflow: hidden; }
.hbar .fill { height: 100%; background: linear-gradient(90deg, #2f88c4, #57a8dc); border-radius: 6px; min-width: 2px; }
.hbar .val { width: 84px; font-weight: 600; font-size: 12.5px; flex-shrink: 0; }
.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 190px; overflow-x: auto; padding-bottom: 4px; }
.bar-col { flex: 0 0 44px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bar-col .v { font-size: 11px; color: var(--muted); transform: scale(.9); }
.bar-col .bar { width: 26px; background: linear-gradient(180deg, #57a8dc, #2f88c4); border-radius: 5px 5px 0 0; min-height: 2px; }
.bar-col .d { font-size: 10.5px; color: var(--muted); margin-top: 5px; white-space: nowrap; }

/* ============ 管理 ============ */
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.inline-form input, .inline-form select { width: auto; flex: 1 1 120px; min-width: 110px; }
.inline-form .btn { flex: 0 0 auto; }
.hint { font-size: 12.5px; color: var(--muted); margin: 6px 0 10px; line-height: 1.6; }
.two-col { display: grid; grid-template-columns: 1fr; gap: 14px; }
.mini-title { font-size: 13.5px; font-weight: 600; color: var(--primary-dark); margin-bottom: 6px; }
.mini-title span { color: var(--accent); }
@media (min-width: 760px) { .two-col { grid-template-columns: 1fr 1fr; } }

/* ============ 智能补全下拉 ============ */
.suggest-box {
  position: fixed; z-index: 200; background: #fff;
  border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 6px 22px rgba(20, 50, 80, .16);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  font-size: 15px;
}
.suggest-item {
  padding: 10px 12px; cursor: pointer; border-bottom: 1px solid #f4f7fa;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.suggest-item:last-child { border-bottom: none; }
.suggest-item.on, .suggest-item:active { background: var(--primary-light); color: var(--primary-dark); }

/* ============ 弹窗 ============ */
#modal-mask {
  position: fixed; inset: 0; background: rgba(10, 30, 50, .45); z-index: 50;
  display: flex; align-items: flex-end; justify-content: center;
}
.modal {
  background: #fff; width: 100%; max-width: 720px; max-height: 86vh; overflow-y: auto;
  border-radius: 16px 16px 0 0; padding: 16px 14px 22px;
}
.modal h3 { margin-bottom: 12px; color: var(--primary-dark); }
.modal .modal-ops { display: flex; gap: 10px; margin-top: 16px; }
.modal .modal-ops .btn { flex: 1; }
@media (min-width: 640px) {
  #modal-mask { align-items: center; }
  .modal { border-radius: 16px; }
}

/* ============ Toast ============ */
#toast {
  position: fixed; left: 50%; bottom: 70px; transform: translateX(-50%);
  background: rgba(28, 40, 52, .92); color: #fff; padding: 11px 20px; border-radius: 10px;
  font-size: 14.5px; z-index: 99; max-width: 86vw; text-align: center;
  animation: toast-in .2s ease-out;
}
#toast.err { background: rgba(190, 48, 44, .95); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ============ 桌面端 ============ */
@media (min-width: 760px) {
  html { font-size: 15.5px; }
  .form-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .filter-grid { grid-template-columns: repeat(4, 1fr); }
  .stat-cards { grid-template-columns: repeat(4, 1fr); }
  .chart-grid { grid-template-columns: 1fr 1fr; }
  .chart-grid .chart-card:last-child { grid-column: 1 / -1; }
  .item-card { padding: 12px 14px; }
  main { padding-top: 18px; }
}

/* ============ 送货单照片 ============ */
.photo-pick-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.photo-pick-btn { cursor: pointer; }
.photo-preview { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.photo-preview:empty { margin-top: 0; }
.photo-thumb {
  position: relative; width: 92px; height: 92px; border-radius: 10px;
  overflow: hidden; border: 1px solid var(--line); background: #f6f8fa;
  cursor: pointer; flex-shrink: 0;
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-thumb .photo-del {
  position: absolute; top: 3px; right: 3px; width: 22px; height: 22px;
  border: none; border-radius: 50%; background: rgba(20, 30, 40, .62); color: #fff;
  font-size: 13px; line-height: 22px; text-align: center; cursor: pointer; padding: 0;
}
.photo-thumb .photo-del:hover { background: var(--danger); }
.photo-thumb .photo-size {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 5px;
  font-size: 10.5px; color: #fff; background: rgba(20, 30, 40, .5);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rc-photo {
  display: inline-block; margin-left: 8px; font-size: 12px; color: var(--accent);
  background: #fdf3e4; padding: 1px 7px; border-radius: 6px;
}

/* 图片放大层 */
.lightbox {
  position: fixed; inset: 0; z-index: 300; background: rgba(8, 14, 20, .92);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  cursor: zoom-out;
}
.lightbox img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  border-radius: 6px; box-shadow: 0 8px 40px rgba(0, 0, 0, .5);
}

/* ============ 报销审批 ============ */
.badge {
  display: inline-block; padding: 1px 8px; border-radius: 10px;
  font-size: 11.5px; color: #fff; vertical-align: middle;
}
.badge.draft { background: #94a3b8; }
.badge.first_ok { background: var(--accent); }
.badge.approved { background: #2563eb; }
.badge.paid { background: var(--ok); }
.badge.rejected { background: var(--danger); }

.reim-card .rc-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; color: var(--primary-dark); }
.reim-card .rc-plate {
  font-size: 12px; font-weight: 600; color: var(--primary-dark);
  background: var(--primary-light); border-radius: 6px; padding: 1px 7px;
}
.reim-card .rc-amount { font-size: 17px; font-weight: 700; color: var(--danger); }
.reim-card .rc-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; font-size: 13px; color: var(--muted); }
.reim-card .rc-reject { margin-top: 8px; font-size: 12.5px; color: var(--danger); background: #fdecec; border-radius: 6px; padding: 5px 9px; }

.reim-item {
  border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-bottom: 8px;
  background: #fafcfe;
}
.reim-item-row { display: grid; grid-template-columns: 96px 1fr 62px 84px 34px; gap: 6px; align-items: center; }
.reim-item select, .reim-item input {
  width: 100%; padding: 6px 7px; border: 1px solid var(--line); border-radius: 6px; font-size: 13.5px;
}
.reim-item .reim-remark { margin-top: 6px; }

/* 手机：费用行改为分行布局，项目说明独占一行够宽能看清字 */
@media (max-width: 759px) {
  .reim-item-row {
    grid-template-columns: 1fr 1fr 1fr 34px;
    grid-template-areas:
      "fee fee fee del"
      "name name name name"
      "qty qty amt amt";
    row-gap: 6px;
  }
  .reim-fee { grid-area: fee; }
  .reim-name { grid-area: name; }
  .reim-qty { grid-area: qty; }
  .reim-amt { grid-area: amt; }
  .reim-del { grid-area: del; }
  .reim-item select, .reim-item input { font-size: 15px; padding: 9px 10px; }
  /* 占位提示较长，缩小字号保证手机上完整显示 */
  .reim-name::placeholder { font-size: 12.5px; letter-spacing: 0; }
  /* 叉车费：桶数 + 单价 + 金额 同一行显示，先试窄字号排列，放不下再折行 */
  .reim-item-row.forklift {
    grid-template-columns: 1fr 1fr 1fr 34px;
    grid-template-areas:
      "fee fee fee del"
      "name name name name"
      "qty price amt amt";
    column-gap: 4px;
  }
  .reim-item-row.forklift .reim-qty,
  .reim-item-row.forklift .reim-price,
  .reim-item-row.forklift .reim-amt {
    font-size: 13px; padding: 8px 4px;
  }
  .reim-price { grid-area: price; }
  .reim-item-row.forklift .reim-amt { grid-area: amt; }
  /* 非叉车费：只填金额，金额独占一行 */
  .reim-item-row:not(.forklift) {
    grid-template-areas:
      "fee fee fee del"
      "name name name name"
      "amt amt amt amt";
  }
}

@media (min-width: 760px) {
  .reim-item-row { grid-template-columns: 120px 1fr 100px 40px; }
  .reim-item-row:not(.forklift) .reim-amt { grid-column: 3; }
  /* 叉车费：电脑端一行放下 桶数+单价+金额 */
  .reim-item-row.forklift { grid-template-columns: 120px 1fr 60px 80px 90px 40px; }
}

/* ==================== 报销查重 ==================== */
.dup-tag {
  display: inline-block; margin-left: 6px; padding: 1px 7px;
  font-size: 11.5px; font-weight: 700; border-radius: 6px;
  color: #b25e00; background: #fff3e0; border: 1px solid #ffd699;
  cursor: pointer; font-family: inherit;
}
.dup-tag:hover { background: #ffe8c2; border-color: #f0a020; }
.dup-tag.hi { color: #fff; background: #e5533d; border-color: #e5533d; }

.reim-card.dup-card { border-left: 4px solid #f0a020; }
.dup-line {
  margin-top: 6px; font-size: 12.5px; color: #b25e00;
  background: #fff8ec; border-radius: 6px; padding: 5px 9px;
}

/* 相似单据列表（弹窗 / 详情页共用） */
.dup-list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; max-height: 320px; overflow-y: auto; }
.dup-item { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fafcfe; }
.dup-item-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.dup-item-date { color: var(--muted); }
.dup-item-amt { margin-left: auto; font-weight: 700; color: var(--danger); }
.dup-item-meta { margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.dup-item-dims { margin-top: 3px; font-size: 12px; color: #b25e00; }
.dup-badge {
  padding: 1px 6px; border-radius: 6px; font-size: 11.5px; font-weight: 700;
  color: #b25e00; background: #fff3e0;
}
.dup-badge.hi { color: #fff; background: #e5533d; }

/* 提交前确认弹窗 */
#dup-confirm-box {
  position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .45);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
#dup-confirm-box.hidden { display: none; }
.dup-modal {
  background: #fff; border-radius: 12px; padding: 18px 20px; width: 100%;
  max-width: 560px; max-height: 86vh; overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .22);
}
.dup-modal h3 { margin: 0 0 8px; font-size: 17px; color: #b25e00; }
.dup-warn { margin: 0 0 6px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.dup-warn.hi { color: #d4380d; font-weight: 600; }
.dup-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.dup-actions .btn { min-width: 130px; }

.dup-mini-title { color: #b25e00; }

/* 专项查重报表 */
.dup-group {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  margin-bottom: 10px; background: #fff;
}
.dup-group.high { border-color: #ffb4a2; background: #fffafa; }
.dup-group-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 13.5px; padding-bottom: 6px; border-bottom: 1px dashed var(--line);
}
.dup-group-idx { font-weight: 700; color: var(--primary-dark); }
.dup-group-level { font-size: 12.5px; }
.dup-group-count { color: var(--muted); }
.dup-group-amt { margin-left: auto; font-weight: 700; color: var(--danger); }
.dup-group-dims { margin: 6px 0; font-size: 12.5px; color: #b25e00; }
.dup-group-items { display: flex; flex-direction: column; gap: 5px; }
.dup-grid-row {
  display: grid; grid-template-columns: 52px 92px 1fr 74px 84px 62px 58px;
  gap: 6px; align-items: center; font-size: 13px;
  padding: 5px 6px; border-radius: 6px; background: #f7fafd;
}
.dup-grid-row .dg-amt { text-align: right; font-weight: 600; color: var(--danger); }
.dup-grid-row .dg-status { font-size: 12px; color: var(--muted); }
.dup-grid-row .btn { padding: 2px 8px; font-size: 12px; }

@media (max-width: 640px) {
  .dup-grid-row {
    grid-template-columns: 46px 1fr 1fr 58px;
    grid-auto-rows: auto;
  }
  .dup-grid-row .dg-driver { display: none; }
  .dup-grid-row .dg-status { display: none; }
  .dup-actions { flex-direction: column-reverse; }
  .dup-actions .btn { width: 100%; }
}

/* ==================== 付款归属（本人付 / 未付款） ==================== */
.bearer-pick { display: inline-flex; gap: 0; border-radius: 7px; overflow: hidden; border: 1px solid var(--line); flex-shrink: 0; }
.bearer-btn {
  border: none; background: #fff; color: var(--muted); cursor: pointer;
  font-size: 12.5px; padding: 5px 11px; font-weight: 600; white-space: nowrap;
  position: relative; transition: background .15s, color .15s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
}
.bearer-btn + .bearer-btn { border-left: 1px solid var(--line); }
.bearer-btn:active { transform: scale(.97); }

/* 选中态：高饱和底色 + 白字 + 内阴影 + 前置对勾，一眼可辨 */
.bearer-btn.on { font-weight: 800; }
.bearer-btn.on::before { content: "✓"; margin-right: 4px; font-size: 12px; font-weight: 900; }
.bearer-btn.on.self {
  background: #f08c00; color: #fff;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .15);
}
.bearer-btn.on.company {
  background: #1a6fb8; color: #fff;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .15);
}
/* 未选中一侧在对方选中时弱化，形成对比 */
.bearer-pick:has(.on) .bearer-btn:not(.on) { background: #f7f8fa; color: #aab3bd; }

.reim-item-foot { display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.reim-item-foot .reim-remark { flex: 1; min-width: 130px; padding: 6px 7px; border: 1px solid var(--line); border-radius: 6px; font-size: 13.5px; }
.reim-item.bearer-missing { border-color: #ffb4a2; background: #fffafa; }
.bearer-hint { margin-top: 4px; font-size: 12px; color: #d4380d; }

/* 归属徽标 */
.bearer-badge { display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.bearer-badge.self { background: #fff3e0; color: #b25e00; border: 1px solid #ffd699; }
.bearer-badge.company { background: #e8f4ff; color: #165d9a; border: 1px solid #b3d8ff; }

/* 报销单卡片上的拆分标记 */
.rc-bearer { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.split-tag { font-size: 12px; padding: 2px 8px; border-radius: 6px; font-weight: 600; }
.split-tag.self { background: #fff3e0; color: #b25e00; }
.split-tag.company { background: #e8f4ff; color: #165d9a; }

/* 编辑页底部合计条的拆分 */
.reim-sum-bearer { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.reim-sum-bearer .sb-self, .reim-sum-bearer .sb-company {
  font-size: 12.5px; font-weight: 600; padding: 2px 9px; border-radius: 6px;
}
.reim-sum-bearer .sb-self { background: #fff3e0; color: #b25e00; }
.reim-sum-bearer .sb-company { background: #e8f4ff; color: #165d9a; }

/* 详情页归属汇总条 */
.bearer-sum { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0; }
.bearer-sum span {
  flex: 1; min-width: 150px; padding: 7px 11px; border-radius: 8px;
  font-size: 13px; display: flex; justify-content: space-between; align-items: center;
}
.bearer-sum .bs-self { background: #fff8ec; color: #8a4b00; border: 1px solid #ffd699; }
.bearer-sum .bs-company { background: #f0f8ff; color: #0f4d80; border: 1px solid #b3d8ff; }
.bearer-sum b { font-size: 15px; }

/* 审批统计卡配色 */
.stat-card.self .v { color: #b25e00; }
.stat-card.company .v { color: #165d9a; }

/* ================= 付款登记 + 防重复支付 ================= */
/* 已付款卡片：整体淡灰 + 左侧绿条，跟待办卡片一眼区分开 */
.reim-card.reim-paid {
  background: #f7f9f8;
  border-left: 4px solid #2f9e44;
}
.reim-card.reim-paid .rc-amount { color: #2f9e44; }

/* 「已付款·勿重复支付」印章式标识 */
.paid-stamp {
  display: inline-block; margin-left: 6px; padding: 2px 8px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .3px;
  color: #1e7d33; background: #e6f6ea;
  border: 1px solid #7fcf94; border-radius: 4px;
  -webkit-transform: rotate(-2deg); transform: rotate(-2deg);
}

/* 付款信息行 */
.pay-info {
  margin: 4px 0 2px; font-size: 12.5px; color: #3b5568;
  background: #eef6f1; border-radius: 6px; padding: 5px 9px;
}
.pay-info b { color: #165d3a; }

/* 待付款徽章 */
.badge.pending_pay { background: #fff2d6; color: #9a6200; border: 1px solid #f2c76b; }
.badge.paid { background: #e6f6ea; color: #1e7d33; border: 1px solid #7fcf94; }

/* 付款按钮（绿色，与审批按钮区分） */
.btn-pay {
  background: #2f9e44; color: #fff; border: 1px solid #2f9e44;
  font-weight: 700;
}
.btn-pay:hover { background: #268a3a; }
.btn-pay:disabled { opacity: .65; cursor: not-allowed; }

/* 付款弹窗 */
#pay-modal-box {
  position: fixed; inset: 0; z-index: 62; background: rgba(0, 0, 0, .45);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
#pay-modal-box.hidden { display: none; }
.pay-modal {
  background: #fff; border-radius: 12px; padding: 18px 20px; width: 100%;
  max-width: 460px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .22);
}
.pay-modal h3 { margin: 0 0 12px; font-size: 17px; color: #165d3a; }
.pay-modal label { display: block; margin-bottom: 10px; font-size: 13px; color: var(--muted); font-weight: 600; }
.pay-modal label select,
.pay-modal label input {
  width: 100%; margin-top: 4px; padding: 9px 10px; font-size: 14px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  color: var(--text); font-family: inherit;
}
.pay-modal label input:focus,
.pay-modal label select:focus { outline: none; border-color: #2f9e44; box-shadow: 0 0 0 3px rgba(47, 158, 68, .12); }

.pay-sum {
  display: flex; gap: 8px; margin-bottom: 12px;
  background: #f5f8f6; border-radius: 10px; padding: 10px 12px;
}
.pay-sum > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.pay-sum span { font-size: 11.5px; color: var(--muted); }
.pay-sum b { font-size: 14px; }
.pay-sum .pay-amount { font-size: 18px; color: #165d3a; }

.pay-warn {
  margin-bottom: 12px; padding: 9px 11px; border-radius: 8px;
  background: #fff7e6; border: 1px solid #f2c76b;
  font-size: 12.5px; color: #8a5300; line-height: 1.6;
}
.pay-warn-row { font-size: 12px; color: #7a4a00; margin-top: 3px; }

.pay-tip {
  font-size: 12px; color: #9a6200; background: #fff7e6;
  border-radius: 6px; padding: 7px 9px; margin: 4px 0 12px; line-height: 1.6;
}
.pay-modal .modal-ops { margin-top: 0; }

/* 详情页已付款横幅 */
.paid-banner {
  margin: 8px 0 10px; padding: 10px 13px; border-radius: 9px;
  background: #e6f6ea; border: 1px solid #7fcf94; color: #1e7d33;
  font-size: 13px; line-height: 1.7;
}
.paid-banner b { color: #145c28; }

/* ================= 工作流通知配置 ================= */
.notify-card { border-left: 3px solid #2f9e44; }
.switch-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: #2f6b45; cursor: pointer;
  background: #eef7f1; padding: 5px 11px; border-radius: 20px;
}
.switch-label input { width: 16px; height: 16px; accent-color: #2f9e44; cursor: pointer; margin: 0; }

.nt-steps {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  background: #f6faf7; border-radius: 8px; padding: 9px 11px; margin-bottom: 10px;
}
.nt-step {
  font-size: 12.5px; font-weight: 600; color: #23603c;
  background: #fff; border: 1px solid #cde8d6; border-radius: 5px; padding: 3px 9px;
}
.nt-steps i { color: #9db8a7; font-style: normal; }

.nt-help { margin-bottom: 10px; }
.nt-help summary {
  font-size: 12.5px; color: #165d9a; cursor: pointer; padding: 4px 0;
}
.nt-help-list {
  margin: 6px 0 0; padding-left: 20px;
  font-size: 12.5px; color: var(--muted); line-height: 1.9;
}
.nt-help-list b { color: #165d3a; }

#nt-wecom-url {
  width: 100%; margin-top: 4px; padding: 9px 10px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 8px; font-family: ui-monospace, monospace;
}
#nt-wecom-url:focus { outline: none; border-color: #2f9e44; box-shadow: 0 0 0 3px rgba(47,158,68,.12); }

.nt-events {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-bottom: 12px; font-size: 13px;
}
.nt-events-label { color: var(--muted); font-weight: 600; }
.nt-events label {
  display: inline-flex; align-items: center; gap: 4px; cursor: pointer;
  background: #f7f8fa; border-radius: 5px; padding: 4px 9px;
}
.nt-events input { accent-color: #2f9e44; cursor: pointer; margin: 0; }
.bt-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ================= 站内待办提醒 ================= */
.todo-bell {
  position: relative; background: rgba(255,255,255,.12); border: none;
  border-radius: 8px; padding: 5px 9px; font-size: 15px; cursor: pointer;
  color: #fff; margin-right: 8px; line-height: 1;
}
.todo-bell:hover { background: rgba(255,255,255,.22); }
.todo-badge {
  position: absolute; top: -5px; right: -6px; min-width: 17px; height: 17px;
  background: #ff4d4f; color: #fff; border-radius: 9px; font-size: 10.5px;
  font-weight: 800; line-height: 17px; text-align: center; padding: 0 4px;
  border: 2px solid #1a4c73; box-sizing: content-box;
}

/* 导航文字后的小红点 */
.tab { position: relative; }
.tab-dot {
  display: none; position: absolute; top: 6px; right: 6px;
  width: 7px; height: 7px; background: #ff4d4f; border-radius: 50%;
}
.tab-dot.show { display: block; }

/* 待办面板 */
#todo-panel {
  position: fixed; inset: 0; z-index: 65; background: rgba(0, 0, 0, .4);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 60px 16px 16px;
}
#todo-panel.hidden { display: none; }
.todo-card {
  background: #fff; border-radius: 14px; width: 100%; max-width: 520px;
  max-height: 82vh; overflow-y: auto; box-shadow: 0 14px 44px rgba(0,0,0,.24);
}
.todo-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 18px 11px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: #fff; z-index: 1;
}
.todo-head h3 { margin: 0; font-size: 16.5px; color: #165d3a; }
.todo-close {
  background: none; border: none; font-size: 17px; color: var(--muted);
  cursor: pointer; padding: 2px 7px; border-radius: 6px;
}
.todo-close:hover { background: #f2f4f7; }
.todo-empty { padding: 26px 18px; text-align: center; color: var(--muted); margin: 0; }

.todo-group { border-bottom: 1px solid #eef0f3; }
.todo-group:last-of-type { border-bottom: none; }
.todo-group-head {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 18px 6px;
}
.todo-group-title { font-size: 13.5px; font-weight: 800; color: #223; }
.todo-group-count {
  font-size: 11.5px; font-weight: 700; color: #fff; background: #ff7a45;
  border-radius: 10px; padding: 1px 8px;
}
.todo-group-amt { margin-left: auto; font-size: 12.5px; color: #165d9a; font-weight: 700; }

.todo-rows { padding: 0 10px 8px; }
.todo-row {
  display: flex; align-items: center; gap: 9px; padding: 8px 8px;
  border-radius: 7px; cursor: pointer; font-size: 13px;
}
.todo-row:hover { background: #f6f9fb; }
.tr-date { color: var(--muted); font-size: 12px; width: 78px; flex-shrink: 0; }
.tr-main { flex: 1; color: #223; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-amt { font-weight: 700; color: #b25e00; }
.tr-go { font-size: 12px; color: #165d9a; width: 52px; text-align: right; flex-shrink: 0; }
.todo-more {
  padding: 6px 18px 10px; font-size: 12.5px; color: #165d9a; cursor: pointer;
}
.todo-more:hover { text-decoration: underline; }
.todo-foot {
  padding: 12px 18px; border-top: 1px solid var(--line);
  display: flex; justify-content: flex-end; background: #fbfcfd;
  border-radius: 0 0 14px 14px;
}

/* ================= 第 N 次提交标记 ================= */
.resubmit-tag {
  display: inline-block; margin-left: 6px; padding: 2px 8px;
  font-size: 11.5px; font-weight: 800;
  color: #9333ea; background: #f5edfd;
  border: 1px solid #d8b4fe; border-radius: 4px;
}
.resubmit-banner {
  margin: 8px 0 10px; padding: 9px 13px; border-radius: 9px;
  background: #f5edfd; border: 1px solid #d8b4fe; color: #6b21a8;
  font-size: 13px; line-height: 1.7;
}
.resubmit-banner b { color: #581c87; }

/* 审批工作台 · 按申请人分组的汇总头 */
.reim-group-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 14px 0 8px; padding: 8px 12px;
  background: #eef4ff; border-left: 4px solid #3b6fd4; border-radius: 6px;
  font-size: 14px;
}
.reim-group-head b { font-size: 15px; }
.reim-group-head .rg-total { color: #c0392b; }
.reim-group-head .rg-total b { font-size: 16px; }

/* 待付款卡片内的报销明细折叠框 */
.pay-items-box { margin: 6px 0; }
.pay-items-box summary {
  cursor: pointer; font-size: 13px; font-weight: 600; color: #3b6fd4;
  padding: 2px 0; user-select: none;
}
.pay-items-box table { margin: 6px 0 2px; font-size: 13px; }

/* 疑似重复跳转清单 */
.dup-jump-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px; margin-bottom: 6px;
  background: #fafbfc; border: 1px solid #eceff3; border-radius: 6px;
}
.dup-jump-row .dj-main { font-size: 13.5px; }
.dup-jump-row .dj-who { color: #666; margin-left: 4px; }
.dup-jump-row .dj-ops { display: flex; align-items: center; gap: 10px; }
.dup-jump-row .dj-amt { color: #c0392b; font-size: 15px; }

/* 同车人员录入标记 */
.rc-by {
  font-size: 11.5px; color: #2b6cb0; background: #e8f1fd;
  border: 1px solid #bcd4f5; border-radius: 6px; padding: 1px 7px;
}

/* ============ 2026-11 审核 + 雅图/寄存 ============ */
/* 明细行内的下拉（雅图运费对象 / 寄存标记） */
.it-select {
  width: 100%; padding: 7px 8px; font-size: 14px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text);
}
/* 客户名规范提醒气泡（点击即替换成规范名） */
.cust-warn {
  display: inline-block; margin-left: 8px; font-size: 12px; color: #b25e00;
  background: #fff7e6; border: 1px solid #f5c66b; border-radius: 6px;
  padding: 2px 8px; cursor: pointer; white-space: nowrap;
}
.cust-warn:active { background: #ffeeba; }

/* ============ 2026-11-07 送货方式可见 + 必选 ============ */
/* 方式标签：自提 / 送货 / 寄存 / 正常 */
.tag-pick, .tag-deliv, .tag-store, .tag-normal {
  display: inline-block; padding: 1px 7px; border-radius: 10px;
  font-size: 12px; line-height: 18px; white-space: nowrap; font-weight: 600;
}
.tag-pick  { color: #0b6b7d; background: #e2f4f8; border: 1px solid #a8dbe6; }
.tag-deliv { color: #a15700; background: #fff3e0; border: 1px solid #f3cf9a; }
.tag-store { color: #6b21a8; background: #f4e9ff; border: 1px solid #d8bdf5; }
.tag-normal{ color: #5c6370; background: #f1f3f5; border: 1px solid #dcdfe4; }
/* 别选时下拉震一下眼睛 */
.it-select-warn { border-color: #e03131 !important; background: #fff5f5 !important; }
.must { font-size: 11px; color: #e03131; font-weight: 500; margin-left: 2px; }
/* 提交被拦时高亮出问题的那一行 */
@keyframes itemFlash {
  0%, 100% { box-shadow: none; }
  20%, 60% { box-shadow: 0 0 0 3px rgba(224, 49, 49, .45); }
}
.item-flash { animation: itemFlash 1.6s ease-in-out; }
/* 审核卡片：客户 + 方式 */
.rc-custs { line-height: 2; }
.cm-item { display: inline-block; margin-right: 10px; white-space: nowrap; }
.cm-item > span { margin-left: 4px; }
.nowrap { white-space: nowrap; }

/* ============ 页脚备案信息 ============ */
#app-view { display: flex; flex-direction: column; min-height: 100vh; }
#app-view > main { flex: 1 0 auto; width: 100%; }
.site-footer {
  margin-top: auto;
  padding: 0 12px 18px;
  text-align: center;
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
}
.site-footer .sep { margin: 0 6px; opacity: .55; }
.site-footer a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dotted transparent;
}
.site-footer a:hover { color: var(--primary); border-bottom-color: currentColor; }
/* 登录页：固定在底部，不挤压登录卡片 */
.login-wrap { position: relative; }
.login-footer {
  position: absolute; left: 0; right: 0; bottom: 16px;
  margin: 0; padding: 0 16px;
  color: rgba(255,255,255,.72);
  text-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.login-footer a { color: rgba(255,255,255,.8); }
.login-footer a:hover { color: #fff; }
@media (max-width: 480px) {
  .site-footer { font-size: 11.5px; }
}
