* { box-sizing: border-box; }
:root {
  --blue: #2a5298;
  --blue-d: #1e3c72;
  --bg: #f5f7fa;
  --panel: #fff;
  --line: #e3e8ef;
  --text: #222;
  --muted: #8a94a6;
  --red: #c0392b;
  --orange: #e67e22;
  --green: #27ae60;
  --shadow: 0 1px 4px rgba(0,0,0,.08);
}
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5;
}

/* 顶栏 */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, var(--blue-d), var(--blue));
  color: #fff; padding: 12px 18px; position: sticky; top: 0; z-index: 50;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo {
  /* 公司 LOGO 是透明底 + 深蓝字，直接放深蓝顶栏会糊掉 → 衬一块白色圆角贴片 */
  height: 40px; padding: 0 9px; border-radius: 10px; background: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.16);
}
.brand .logo img { height: 29px; width: auto; display: block; }
.brand .t1 { font-size: 16px; font-weight: 700; }
.brand .t2 { font-size: 12px; opacity: .8; }
.actions { display: flex; gap: 8px; }

.btn {
  border: none; border-radius: 8px; background: var(--blue); color: #fff;
  padding: 9px 16px; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s;
}
.btn:hover { background: var(--blue-d); }
.btn.ghost { background: rgba(255,255,255,.16); }
.btn.ghost:hover { background: rgba(255,255,255,.28); }
.btn.small { padding: 8px 12px; }
.btn.block { width: 100%; margin-top: 6px; }
/* 查询核对主按钮：醒目的强调色，与「处理」按钮区分 */
.btn.primary { background: #2f6fed; box-shadow: 0 1px 3px rgba(47,111,237,.35); }
.btn.primary:hover { background: #2457c5; }
.btn.primary.checked { background: #1e8449; box-shadow: none; }
/* 未查询核对前，处理按钮置灰禁用 */
.btn:disabled, .btn.disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn:disabled:hover, .btn.disabled:hover { background: inherit; filter: none; }
.btn.danger:disabled:hover, .btn.danger.disabled:hover { background: var(--red); }
.btn.ok:disabled:hover, .btn.ok.disabled:hover { background: var(--green); }

/* 容器 */
.wrap { max-width: 1180px; margin: 16px auto; padding: 0 14px; }

/* 卡片 */
.cards { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.card {
  background: var(--panel); border-radius: 10px; padding: 14px 16px; flex: 1 1 150px;
  box-shadow: var(--shadow); min-width: 140px;
}
.card .k { font-size: 12px; color: var(--muted); }
.card .v { font-size: 22px; font-weight: 700; margin-top: 4px; }
.card .v.hl { color: var(--red); }

/* 面板 */
.panel {
  background: var(--panel); border-radius: 10px; padding: 16px; margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.panel h2 { font-size: 16px; margin: 0 0 12px; border-left: 4px solid var(--blue); padding-left: 8px; }
.muted { color: var(--muted); font-size: 12px; font-weight: 400; }

/* 图表 */
.charts { display: flex; flex-wrap: wrap; gap: 16px; }
.chart-box { flex: 1 1 320px; min-width: 280px; height: 280px; }

/* 出差卡片 */
.trips { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.trip {
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff;
}
.trip .th {
  background: #eef3fb; padding: 10px 12px; cursor: pointer; display: flex;
  justify-content: space-between; align-items: center; gap: 8px;
}
.trip .th .tt { font-weight: 600; color: var(--blue-d); font-size: 13px; }
.trip .th .badge { background: var(--blue); color: #fff; border-radius: 12px; padding: 1px 9px; font-size: 12px; white-space: nowrap; }
.trip .th .arr { transition: transform .2s; color: var(--muted); }
.trip.open .th .arr { transform: rotate(90deg); }
.trip .meta { font-size: 12px; color: var(--muted); padding: 8px 12px 0; line-height: 1.7; }
.trip .body { padding: 8px 12px 12px; display: none; }
.trip.open .body { display: block; }
.trip .sub { display: flex; justify-content: space-between; font-size: 12px; color: #555; margin: 6px 0; padding-top: 6px; border-top: 1px dashed var(--line); }
.trip .sub b { color: var(--blue-d); }
.tag-supp { background: var(--orange); color: #fff; border-radius: 4px; padding: 1px 6px; font-size: 11px; margin-left: 6px; }

/* 表格 */
.table-scroll { overflow-x: auto; }
table.data { border-collapse: collapse; width: 100%; font-size: 13px; min-width: 640px; }
table.data th, table.data td { border: 1px solid var(--line); padding: 7px 9px; text-align: left; }
table.data th { background: #eef3fb; position: sticky; top: 0; }
table.data tbody tr:nth-child(even) { background: #fafcff; }
table.data td.num, table.data th.num { text-align: right; }
.st { font-size: 11px; padding: 1px 7px; border-radius: 10px; white-space: nowrap; }
.st.kept { background: #e8f5ee; color: var(--green); }
.st.fail { background: #fdecea; color: var(--red); }
.st.duplicate { background: #eef0f3; color: #6b7280; }
.st.warn { background: #fef3e2; color: var(--orange); }
.st.void { background: #eef0f3; color: #6b7280; }

/* 过滤器 */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.filters input, .filters select {
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; outline: none;
}
.filters input[type=text] { flex: 1 1 220px; }
.filters input:focus, .filters select:focus { border-color: var(--blue); }
.result-bar { display: flex; justify-content: space-between; margin-bottom: 8px; }

/* 弹窗 */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 16px; }
.modal[hidden] { display: none; }
.modal-box { background: #fff; border-radius: 12px; padding: 22px; width: 380px; max-width: 94vw; box-shadow: 0 12px 40px rgba(0,0,0,.3); }
.modal-box h3 { margin: 0 0 6px; }
.modal-box label { display: block; font-size: 13px; color: #555; margin: 12px 0 5px; }
.modal-box input { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; outline: none; }
.modal-box.wide { width: 640px; max-width: 96vw; }
.modal-box.wider { width: 960px; max-width: 97vw; }
.modal-box.wide input, .modal-box.wide textarea { font-size: 13px; }

/* —— 原发票预览 + 并排核对 —— */
.inv-modal-wrap { display: flex; gap: 14px; align-items: stretch; margin-bottom: 10px; }
.inv-orig { flex: 1 1 52%; min-width: 0; display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fafbfc; }
.inv-orig.empty { flex: 1 1 52%; padding: 18px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.inv-orig.empty code { background: #eef1f6; padding: 1px 6px; border-radius: 4px; color: #444; }
.inv-orig-bar { display: flex; align-items: center; gap: 6px; padding: 7px 9px;
  background: #eef2f8; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.inv-orig-title { font-size: 12.5px; font-weight: 600; color: #34507e; margin-right: auto; }
.inv-orig-bar .btn.small { padding: 4px 9px; font-size: 12px; }
.inv-orig-scroll { flex: 1 1 auto; overflow: auto; background: #525659; min-height: 360px; max-height: 60vh; }
.inv-orig-canvas { transform-origin: 0 0; }
.orig-frame { width: 100%; height: 60vh; min-height: 360px; border: 0; display: block; background: #fff; }
.orig-img { width: 100%; display: block; }
.orig-pdf-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 360px; height: 60vh; padding: 32px 16px; background: #525659; color: #f4f6f8;
  text-align: center; gap: 8px; }
.orig-pdf-placeholder .orig-pdf-icon { font-size: 56px; line-height: 1; opacity: .85; }
.orig-pdf-placeholder .orig-pdf-title { font-size: 14px; font-weight: 600; color: #fff; }
.orig-pdf-placeholder .orig-pdf-hint { font-size: 12px; color: #c8cfd8; max-width: 360px; line-height: 1.6; }
.orig-pdf-placeholder .btn { margin-top: 4px; }
.orig-pdf-placeholder .btn + .btn { margin-top: 0; margin-left: 6px; }
.orig-pdf-placeholder .btn { margin-top: 8px; }
.orig-pdf-placeholder[hidden] { display: none; }
.inv-orig-hint { font-size: 11.5px; color: var(--muted); padding: 6px 9px; border-top: 1px solid var(--line); }
.inv-cmp { flex: 1 1 48%; min-width: 0; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; background: #fff; align-self: flex-start; }
.inv-cmp-head { font-size: 13px; font-weight: 700; color: #34507e; margin-bottom: 8px; }
.cmp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cmp-row td { padding: 7px 6px; border-bottom: 1px solid #f0f2f6; vertical-align: top; }
.cmp-row .cmp-k { color: #555; white-space: nowrap; width: 38%; }
.cmp-row .cmp-v { font-weight: 600; word-break: break-all; }
.cmp-row .cmp-s { text-align: right; width: 64px; }
.cmp-row.ok .cmp-v { color: #1f7a44; }
.cmp-row.warn { background: #fff8ec; }
.cmp-row.warn .cmp-v { color: #9a5b00; }
.cmp-row.bad { background: #fdecea; }
.cmp-row.bad .cmp-v { color: var(--red); }
.cmp-ext td { border-bottom: 1px solid #f0f2f6; }
.cmp-hint { font-size: 12px; color: #9a5b00; }
.badge { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 10px; white-space: nowrap; }
.badge.ok { background: #e6f6ec; color: #1f7a44; }
.badge.warn { background: #fdeccd; color: #9a5b00; }
.badge.bad { background: #fbd9d3; color: var(--red); }
.inv-cmp-note { font-size: 11.5px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
@media (max-width: 760px) {
  .inv-modal-wrap { flex-direction: column; }
  .inv-orig, .inv-cmp { flex: 1 1 auto; }
}
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.modal-box hr { border: none; border-top: 1px solid var(--line); margin: 16px 0; }
.msg { font-size: 12px; min-height: 16px; }
.msg.err { color: var(--red); }

/* 一句话补录（统计行程）：解析后回填表单，并给出补贴预估 */
.nl-box {
  border: 1px solid #eadfc4; background: #fdfbf5;
  border-radius: 10px; padding: 10px 12px; margin: 10px 0 2px;
}
.nl-box .nl-label { display: block; font-size: 13px; color: #7a6428; margin: 0 0 6px; }
.nl-row { display: flex; gap: 8px; align-items: center; }
.nl-row input { flex: 1 1 auto; width: auto; min-width: 0; }
.nl-row .btn { flex: 0 0 auto; background: var(--blue); color: #fff; }
.nl-row .btn:hover { background: var(--blue-d); }
.nl-hint { font-size: 12px; color: var(--muted); margin-top: 6px; min-height: 15px; line-height: 1.5; }
.nl-hint.err { color: var(--red); }
.subsidy-preview {
  margin-top: 8px; padding: 8px 10px; border-radius: 8px;
  background: #fffdf4; border-left: 3px solid #c9a961;
  font-size: 13px; color: #4a4234; line-height: 1.6;
}
.subsidy-preview b { color: #8a6d1f; font-size: 15px; }
.msg.ok { color: var(--green); }

/* 备份列表 */
.bklist { max-height: 190px; overflow-y: auto; margin-top: 4px; }
.bklist .bkrow { display: flex; align-items: center; gap: 8px; padding: 7px 8px;
  border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; font-size: 12px; }
.bklist .bkrow .bkt { flex: 1; min-width: 0; }
.bklist .bkrow .bkt .n { font-weight: 600; }
.bklist .bkrow .bkt .m { color: #888; font-size: 11px; margin-top: 2px; }
.bklist .bkrow button { padding: 4px 9px; font-size: 12px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--text); }
.bklist .bkrow button:hover { background: #f5f7fa; }
.bklist .empty { color: #999; font-size: 12px; padding: 6px 2px; }
.small { font-size: 11px; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #333; color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 13px; z-index: 250;
  box-shadow: 0 6px 20px rgba(0,0,0,.3);
}
.toast[hidden] { display: none; }

/* 移动端 */
@media (max-width: 720px) {
  .wrap { padding: 0 10px; }
  .card { flex: 1 1 45%; }
  .card .v { font-size: 19px; }
  .charts { flex-direction: column; }
  .chart-box { height: 240px; }
  .trips { grid-template-columns: 1fr; }
  .topbar { padding: 10px 12px; }
  .brand .t1 { font-size: 14px; }
  .btn { padding: 8px 12px; }
  table.data { font-size: 12px; }
  .tabs { overflow-x: auto; }
  .tab { padding: 9px 12px; font-size: 13px; }
  .sync-controls { flex-direction: column; align-items: stretch; }
  .sync-controls .btn { width: 100%; }
}

/* ============ Tab 导航 ============ */
.tabs {
  display: flex; gap: 4px; background: #fff; border-bottom: 1px solid var(--line);
  padding: 0 14px; position: sticky; top: 64px; z-index: 40; overflow-x: auto;
}
.tab {
  border: none; background: transparent; padding: 12px 18px; font-size: 14px;
  color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent;
  white-space: nowrap; font-family: inherit;
}
.tab:hover { color: var(--blue); }
.tab.active { color: var(--blue-d); font-weight: 700; border-bottom-color: var(--blue); }
.tabpane[hidden] { display: none; }

/* ============ 同步面板 ============ */
.sync-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 14px; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #555; }
.card-soft { background: #fbfcfe; border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.sync-row { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; margin-bottom: 8px; font-size: 13px; }
.sync-row .k { color: var(--muted); }
.sync-row .v { font-weight: 600; color: var(--blue-d); }
.progress { height: 10px; background: #eef1f6; border-radius: 6px; overflow: hidden; margin: 6px 0; }
.progress .bar { height: 100%; background: linear-gradient(90deg, var(--blue), var(--orange)); transition: width .4s; }
.sync-msg { font-size: 13px; color: #333; margin-top: 8px; }
.sync-err { font-size: 13px; color: var(--red); margin-top: 4px; white-space: pre-wrap; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.dot.idle { background: #9aa3b2; }
.dot.running { background: var(--orange); animation: pulse 1s infinite; }
.dot.success { background: var(--green); }
.dot.failed { background: var(--red); }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }

.adapters { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 10px; }
.adapter { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fff; }
.adapter .name { font-weight: 600; color: var(--blue-d); font-size: 13px; }
.adapter .prov { font-size: 12px; color: #555; margin-top: 4px; }
.adapter .free { display: inline-block; margin-top: 6px; font-size: 11px; padding: 1px 7px; border-radius: 10px; background: #e8f5ee; color: var(--green); }
.adapter .free.no { background: #fef3e2; color: var(--orange); }

/* ============ 人工处理 ============ */
.manual-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px,1fr)); gap: 12px; }
.mcard { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fff; }
.mcard .mhead { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.mcard .mtype { font-weight: 700; color: var(--blue-d); }
.mcard .mamount { font-weight: 700; }
.sev { font-size: 11px; padding: 1px 8px; border-radius: 10px; white-space: nowrap; }
.sev.high { background: #fdecea; color: var(--red); }
.sev.medium { background: #fef3e2; color: var(--orange); }
.sev.low { background: #eef1f6; color: #6b7280; }
.mcard .minfo { font-size: 12px; color: #555; margin: 8px 0; line-height: 1.7; }
.mcard .reasons { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.tag { font-size: 11px; padding: 1px 8px; border-radius: 10px; background: #eef3fb; color: var(--blue); }
.tag.bad { background: #fdecea; color: var(--red); }
.mcard .mactions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mcard .mactions .btn { padding: 6px 10px; font-size: 12px; }

/* 人工处理：验真结论 / 字段问题 / 操作 */
.btn.danger { background: var(--red); color: #fff; font-weight: 600; }
.btn.danger:hover { background: #a93226; }
.btn.ok { background: var(--green); color: #fff; font-weight: 600; }
.btn.ok:hover { background: #1e8449; }

.vbox { border-radius: 8px; padding: 8px 10px; margin: 8px 0; font-size: 12.5px; line-height: 1.6; }
.vbox.v-sus { background: #fdecea; border: 1px solid #f3b6ad; }
.vbox.v-real { background: #e8f5ee; border: 1px solid #b6e2c6; }
.vbox.v-unavailable { background: #fef3e2; border: 1px solid #f6d9a8; }
.vbox.v-unchecked { background: #eef1f6; border: 1px solid #d6dce6; }
.v-title { font-weight: 700; }
.vbox.v-sus .v-title { color: var(--red); }
.v-reasons { margin: 4px 0 0 16px; padding: 0; }
.v-reasons li { color: var(--red); }
.v-desc { color: #555; margin-top: 4px; }
.v-raw { margin-top: 6px; font-size: 12px; color: var(--muted); }
.v-raw summary { cursor: pointer; }
.v-raw div { margin-top: 4px; white-space: pre-wrap; word-break: break-all; }

.fps { background: #fbfcfe; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; margin: 6px 0; }
.fps-head { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.fps ul { margin: 0; padding-left: 16px; }
.fps li { font-size: 12.5px; line-height: 1.6; }
.fps li.fp-error b { color: var(--red); }
.fps li.fp-warn b { color: var(--orange); }

.minfo .miss { color: var(--orange); font-weight: 600; }

.mcard.suspicious { border-color: #f3b6ad; }
.mcard.voided { border-color: #d6dce6; background: #fafbfc; }
.mcard.voided .mhead .mtype { color: #555; }
.mcard.learned { border-color: #b6e2c6; background: #f4fbf7; }

/* 修正记忆徽标 + 列表 */
.badge-learn { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 10px;
  background: #e8f5ee; color: var(--green); border: 1px solid #b6e2c6; font-weight: 600; white-space: nowrap; }
.corr-list { display: flex; flex-direction: column; gap: 10px; }

/* 票据实际内容面板（人工处理区直接展示） */
.inv-content { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  margin: 8px 0; background: #fbfcfe; }
.inv-content .ic-head { font-weight: 600; font-size: 13px; color: #33415c; margin-bottom: 6px; }
.inv-content .ic-grid { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; }
.inv-content .ic-k { color: #6b7280; white-space: nowrap; }
.inv-content .ic-v { color: #1f2937; word-break: break-all; }
.inv-content .ic-raw { margin-top: 8px; font-size: 12px; color: #6b7280; }
.inv-content .ic-raw pre { background: #f3f4f6; padding: 8px; border-radius: 6px;
  overflow: auto; max-height: 160px; white-space: pre-wrap; word-break: break-all; margin: 4px 0 0; }

/* 人工处理卡片：核对信息直接可见 + 醒目确认按钮 */
.mcard .mtags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.mcard .morig { margin: 10px 0 2px; display: flex; align-items: center; }
.mcard .morig-note { color: var(--muted); }
.mcard .mactions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.mcard .mactions .msec { display: flex; flex-wrap: wrap; gap: 6px; }
.mcard .mactions .msec .btn { padding: 6px 10px; font-size: 12px; }
/* 确认按钮：全宽、醒目，置于卡片底部作为提交入口，避免找不到操作入口 */
.btn.ok.confirm {
  width: 100%; padding: 11px; font-size: 14px; font-weight: 700;
  background: var(--green); color: #fff; border-radius: 8px;
  box-shadow: 0 2px 6px rgba(39,174,96,.35); cursor: pointer; border: none;
}
.btn.ok.confirm:hover { background: #1e8449; }
.corr-list .mcard.learned .v-desc { font-size: 12.5px; color: #2c3e50; margin: 4px 0; }

/* 幽灵危险按钮（遗忘/恢复类次级危险操作） */
.btn.ghost.danger { color: var(--red); border-color: #f3b6ad; background: transparent; }
.btn.ghost.danger:hover { background: #fdecea; }

/* ============ 计划行程 ============ */
.planned-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px,1fr)); gap: 12px; }
.pcard { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fff; display: flex; flex-direction: column; }
.pcard .phead { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pcard .pcity { font-weight: 700; color: var(--blue-d); font-size: 15px; }
.pcard .pdate { font-size: 12px; color: var(--muted); margin-top: 2px; }
.pcard .pbody { font-size: 12px; color: #555; line-height: 1.7; margin: 8px 0; }
.pcard .pbody b { color: var(--blue-d); }
.pcard .pblock { border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 8px; }
.pcard .pblock h4 { margin: 0 0 4px; font-size: 12px; color: var(--blue); }
.pcard .pblock ul { margin: 0; padding-left: 16px; }
.pcard .pblock li { font-size: 12px; margin: 2px 0; }
.pcard .pactions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pcard .pactions .btn { padding: 6px 10px; font-size: 12px; }
.pwarn { font-size: 12px; color: var(--orange); }
.warn-banner { background: #fef3e2; color: #9a5b00; border: 1px solid #f6d9a8; border-radius: 8px; padding: 10px 12px; font-size: 13px; margin-bottom: 12px; }
.recycle-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 10px; }
.rcard { border: 1px dashed #d0d6e0; border-radius: 10px; padding: 10px 12px; background: #fafcff; font-size: 13px; }
.rcard .rhead { font-weight: 600; color: var(--blue-d); }
.rcard .rmeta { font-size: 12px; color: var(--muted); margin: 4px 0; }
.badge-pill { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 10px; background: #eef3fb; color: var(--blue); margin-left: 6px; }

/* 多段行程：城市段输入行 */
.seg-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.seg-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.seg-row input { flex: 1 1 90px; min-width: 0; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.seg-row .seg-city { flex: 1 1 110px; }
.seg-row .seg-del { flex: 0 0 auto; padding: 6px 10px; }

/* 行程链 / 逐城市富化 */
.pchain { font-size: 12.5px; color: var(--blue-d); background: #f3f7fd; border: 1px dashed #c5d6ee;
  border-radius: 8px; padding: 6px 10px; margin: 6px 0; }
.pcity-block { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; }
.pcity-block:first-of-type { border-top: none; margin-top: 4px; padding-top: 0; }
.pcity-block h4 { margin: 0 0 4px; font-size: 13px; color: var(--blue); }
.pcity-block .pblock { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 6px; }
.pcity-block .pblock b { color: var(--blue-d); display: block; font-size: 12px; margin-bottom: 2px; }
.adv { color: #b5651d; font-size: 12px; }

/* —— 新增行程：宾馆推荐 —— */
.reco-block { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fafbfe; }
.reco-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #34507e; margin-bottom: 8px; }
.reco-head .btn.small { margin-left: auto; }
.hotel-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.hcard { border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; background: #fff; font-size: 12.5px; line-height: 1.55; display: flex; flex-direction: column; gap: 3px; }
.hcard.sel { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(42,82,152,.18); background: #f3f7ff; }
.hcard-top { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.hdim { font-size: 11px; background: #eef3fb; color: var(--blue); border-radius: 10px; padding: 1px 8px; white-space: nowrap; }
.hname { font-weight: 700; font-size: 13px; }
.hprice { font-size: 13px; font-weight: 600; color: #1f7a44; }
.hprice .hfit { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 10px; margin-left: 4px; }
.hfit.ok { background: #e6f6ec; color: #1f7a44; }
.hfit.warn { background: #fdeccd; color: #9a5b00; }
.hfit.bad { background: #fbd9d3; color: var(--red); }
.hrow { color: #444; }
.hrow b { color: #34507e; margin-right: 4px; }
.hwhy { color: #2a5298; }
.hwho { color: var(--muted); }
.hpick { margin-top: 4px; align-self: flex-start; }
.hcard.sel .hpick { background: var(--blue); }

/* 计划卡片：已选宾馆 */
.chosen-hotel { border: 1px solid #cfe0f5; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; background: #f3f8ff; }
.ch-head { font-weight: 700; font-size: 13px; color: #1e3c72; margin-bottom: 4px; }
.ch-row { font-size: 12.5px; line-height: 1.6; }
.ch-row b { color: #34507e; margin-right: 4px; }
.ch-note { font-size: 11px; margin-top: 4px; }

/* ============ 全屏发票核验视图（原件 + 错误描述 + 操作按钮 同页） ============ */
.fullview { position: fixed; inset: 0; z-index: 150; background: var(--bg); display: flex; flex-direction: column; }
.fullview[hidden] { display: none; }
.fv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: linear-gradient(135deg, var(--blue-d), var(--blue)); color: #fff; padding: 10px 16px; flex: 0 0 auto; }
.fv-title { font-weight: 700; font-size: 15px; }
.fv-body { flex: 1 1 auto; display: flex; gap: 14px; padding: 14px; min-height: 0; }
.fv-orig { flex: 1 1 56%; min-width: 0; min-height: 0; display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fafbfc; }
/* 关键修复：补上 min-height:0 让 flex 链高度可收敛，PDF 原件 iframe 才能撑满整栏高度，
   避免只显示顶部一截而被迫在 iframe 内下拉。*/
.fv-orig .inv-orig-scroll { max-height: none; min-height: 0; overflow: auto; }
.fv-orig .inv-orig-canvas { height: 100%; }
.fv-orig .orig-frame { width: 100%; height: 100%; min-height: 0; border: 0; display: block; background: #fff; }
.fv-orig .orig-pdf-placeholder { height: 100%; min-height: 0; }
.fv-orig .inv-orig.empty { flex: 1 1 auto; }
.fv-desc { flex: 1 1 44%; min-width: 0; overflow-y: auto; padding-right: 4px; }
.fv-actions { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 12px 14px; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -2px 10px rgba(0,0,0,.06); }
.fv-actions .btn.confirm { flex: 1 1 260px; }

/* —— 三步向导：步骤指示器 + 面板 + 导航 —— */
.wizard-steps { display: flex; gap: 10px; padding: 10px 16px; background: #eef3fb; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.wstep { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.wstep .wdot { width: 22px; height: 22px; border-radius: 50%; background: #d6dce6; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.wstep.on { color: var(--blue-d); font-weight: 700; }
.wstep.on .wdot { background: var(--blue); }
.wstep.done { color: #1e8449; }
.wstep.done .wdot { background: var(--green); }

.fv-pane { display: flex; flex: 1 1 auto; gap: 14px; min-height: 0; }
.fv-pane[hidden], .fv-pane.step2[hidden], .fv-pane.step3[hidden] { display: none; }
.fv-pane.step2, .fv-pane.step3 { display: block; overflow-y: auto; }

/* 第二步：确认卡片 */
.step2-card { max-width: 560px; margin: 0 auto; text-align: center; padding: 28px 16px; }
.step2-q { font-size: 16px; font-weight: 600; color: var(--blue-d); margin-bottom: 18px; line-height: 1.6; }
.step2-actions { display: flex; flex-direction: column; gap: 12px; }
.step2-actions .btn { width: 100%; padding: 14px; font-size: 15px; }
.step2-hint { margin-top: 16px; font-size: 12px; color: var(--muted); line-height: 1.6; }

/* 第三步：执行操作 */
.step3-head { font-size: 14px; font-weight: 600; color: var(--blue-d); margin-bottom: 12px; line-height: 1.6; }
.step3-actions { display: flex; flex-direction: column; gap: 10px; max-width: 560px; }
.step3-actions .btn.big { width: 100%; padding: 14px; font-size: 15px; }
.step3-actions .msec { display: flex; gap: 8px; flex-wrap: wrap; }
.step3-actions .msec .btn { flex: 1 1 auto; }

/* 大号按钮 */
.btn.big { padding: 14px 18px; font-size: 15px; font-weight: 700; }

/* 卡片内联原票预览（PDF 内嵌 iframe / 图片缩略图，点击进入全屏核验） */
.mcard .mthumb { margin: 8px 0 2px; position: relative; }
.mcard .mthumb-img { width: 100%; max-height: 200px; border: 1px solid var(--line); border-radius: 8px;
  cursor: pointer; object-fit: contain; background: #fafbfc; display: block; }
.mcard .mthumb-img:hover { border-color: var(--blue); }
.mcard .mthumb-pdf { position: relative; cursor: pointer; border: 1px solid var(--line);
  border-radius: 8px; overflow: hidden; background: #f4f6f8; display: flex;
  align-items: center; justify-content: center; min-height: 120px; }
.mcard .mthumb-pdf:hover { border-color: var(--blue); }
.mcard .mthumb-pdf-placeholder { font-size: 40px; line-height: 1; opacity: .45; pointer-events: none;
  user-select: none; }
.mcard .mthumb-overlay { position: absolute; inset: 0; cursor: pointer;
  background: linear-gradient(180deg, transparent 62%, rgba(0,0,0,.66)); }
.mcard .mthumb-overlay::after { content: "📄 点击查看完整票面"; position: absolute; left: 0; right: 0; bottom: 0;
  text-align: center; color: #fff; font-size: 12px; padding: 22px 8px 8px; }
.mcard .mthumb-none { font-size: 12px; color: var(--muted); border: 1px dashed var(--line);
  border-radius: 8px; padding: 10px; background: #fafbfc; }
.mcard .mthumb-none code { background: #eef1f6; padding: 1px 6px; border-radius: 4px; color: #444; }

/* 重复发票提示（业务键：同酒店入离店同金额 / 同路段同航班 / 同销售方同金额） */
.mcard.dup { border-color: #f0a35c; box-shadow: 0 0 0 1px #f0a35c inset; }
.badge-dup { background: #fff3e3; color: #b35b00; border: 1px solid #f0a35c; padding: 2px 8px;
  border-radius: 999px; font-size: 11.5px; font-weight: 600; display: inline-block; }
.dup-block { background: #fff7ec; border: 1px solid #f0a35c; border-radius: 8px;
  padding: 8px 10px; margin: 6px 0; font-size: 12.5px; color: #6b3e00; line-height: 1.5; }
.dup-hint { color: #8a4f00; }
.dup-block-full { background: #fff7ec; border: 1px solid #f0a35c; border-radius: 10px;
  padding: 12px 14px; margin: 10px 0; font-size: 13px; line-height: 1.6; color: #6b3e00; }
.dup-block-title { font-weight: 700; color: #b35b00; margin-bottom: 4px; }
.dup-block-body { color: #6b3e00; }

/* 向导底部导航条 */
.fv-footer { flex: 0 0 auto; display: flex; gap: 10px; align-items: center; justify-content: flex-end;
  padding: 12px 14px; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -2px 10px rgba(0,0,0,.06); }
.fv-footer .btn.primary { margin-left: auto; }
@media (max-width: 860px) {
  .fv-body { flex-direction: column; overflow-y: auto; }
  .fv-orig, .fv-desc { flex: 1 1 auto; }
  .fv-orig { min-height: 400px; }
}

