/* ============ 新车交付流程 · 珠海闪电 ============
   视觉 v2：简约 · 高端 · 科技感（小字号 / 冷灰底 / 电光蓝点缀） */
:root {
  --red: #e0202d;
  --red-dark: #b51621;
  --ink: #0f1218;
  --ink-2: #343a46;
  --bg: #f4f5f8;
  --card: #ffffff;
  --line: #e8eaf0;
  --muted: #7d8595;
  --ok: #12935a;
  --ok-bg: #e9f7f0;
  --warn: #c2620a;
  --warn-bg: #fdf3e7;
  --danger: #d03030;
  --blue: #2f6bff;
  --accent: #2f6bff;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 20, 30, .04), 0 10px 30px rgba(16, 20, 30, .06);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #edefF3 0%, var(--bg) 240px);
  color: var(--ink);
  min-height: 100vh;
  letter-spacing: .1px;
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(180deg, #171b24 0%, #0f1218 100%);
  color: #fff;
  padding: 9px 16px; padding-top: calc(9px + env(safe-area-inset-top));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 4px 20px rgba(10, 14, 22, .35);
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: #fff; }
.logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  flex: 0 0 auto;
}
.logo img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 50%; }
.brand-txt { font-weight: 700; font-size: 14.5px; display: flex; flex-direction: column; line-height: 1.18; letter-spacing: .3px; }
.brand-txt small { font-weight: 400; font-size: 10px; color: rgba(255,255,255,.55); letter-spacing: .8px; }
.topnav { display: flex; gap: 4px; }
.topnav a {
  color: rgba(255,255,255,.72); text-decoration: none;
  padding: 6px 12px; border-radius: 8px; font-size: 13px;
  transition: background .15s, color .15s;
}
.topnav a.active, .topnav a:active { background: rgba(255,255,255,.13); color: #fff; }

/* ---------- 全局底部（不起眼入口） ---------- */
.appfoot {
  max-width: 780px; margin: 0 auto;
  padding: 2px 14px calc(16px + env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 11px; color: #9aa1b0; letter-spacing: .4px;
}
.foot-link {
  background: none; border: none; font: inherit; color: #8a93a6;
  cursor: pointer; padding: 4px 2px; letter-spacing: .4px;
}
.foot-link:active { color: var(--ink-2); }
.foot-dot { width: 2.5px; height: 2.5px; border-radius: 50%; background: #c8cdd8; }

/* ---------- 通用弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(12, 15, 22, .55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 22px; animation: fadein .16s;
}
.modal-box {
  background: #fff; border-radius: 14px; padding: 18px 16px;
  width: min(92vw, 380px);
  box-shadow: 0 24px 64px rgba(10, 14, 22, .32);
  animation: pop-mid .2s cubic-bezier(.2, .9, .3, 1.2);
}
.modal-box h3 { margin: 0 0 2px; font-size: 15.5px; letter-spacing: .3px; }
@keyframes pop-mid { from { transform: scale(.94); opacity: 0; } }

/* ---------- 布局 ---------- */
.container { max-width: 780px; margin: 0 auto; padding: 14px 14px 20px; }
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 15px 14px; margin-bottom: 12px;
  border: 1px solid rgba(232, 234, 240, .6);
  overflow: hidden;
}
.page-title { display: flex; align-items: center; justify-content: space-between; margin: 4px 2px 12px; }
.page-title h1 { font-size: 17px; margin: 0; letter-spacing: .4px; }
.hint { color: var(--muted); font-size: 12px; margin: 4px 2px 10px; line-height: 1.55; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 10px; cursor: pointer;
  font-size: 14px; font-weight: 600; font-family: inherit;
  min-height: 42px; padding: 8px 18px;
  transition: transform .06s ease, filter .15s, box-shadow .15s;
  user-select: none; text-decoration: none; letter-spacing: .2px;
}
.btn:active { transform: scale(.97); }
@media (hover:hover) { .btn-primary:hover, .btn-dark:hover { filter: brightness(1.06); } }
.btn-primary {
  background: linear-gradient(180deg, #ea2833 0%, #d01726 100%);
  color: #fff; box-shadow: 0 4px 14px rgba(224, 32, 45, .26);
}
.btn-primary:disabled { background: #dcdfe6; color: #fff; cursor: not-allowed; box-shadow: none; }
.btn-dark { background: linear-gradient(180deg, #1d222c 0%, #12151c 100%); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink-2); border: 1px solid var(--line); }
.btn-ghost:disabled { color: #b6bac3; cursor: not-allowed; }
.btn-danger { background: #fff; color: var(--danger); border: 1px solid #f3c6c6; }
.btn-sm { min-height: 34px; padding: 5px 12px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 8px; margin-top: 14px; }
.btn-row .btn { flex: 1; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 5px; color: var(--ink-2); letter-spacing: .2px; }
.field label .req { color: var(--red); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 12px; font-size: 16px; font-family: inherit;  /* 16px 防 iOS 聚焦缩放 */
  background: #fff; color: var(--ink); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, .12);
}
.textarea { min-height: 88px; resize: vertical; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- 流程单列表 ---------- */
.filter-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.filter-tabs button {
  flex: 1; border: 1px solid var(--line); background: #fff; border-radius: 9px;
  padding: 7px 0; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer;
  transition: all .15s;
}
.filter-tabs button.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.order-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 13px 14px; margin-bottom: 10px; cursor: pointer;
  display: flex; flex-direction: column; gap: 6px;
  border: 1px solid rgba(232, 234, 240, .6); border-left: 4px solid var(--line);
  transition: transform .06s, box-shadow .15s;
}
.order-card:active { transform: scale(.985); }
.order-card.inprogress { border-left-color: var(--red); }
.order-card.done { border-left-color: var(--ok); }
.order-card .row1 { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.order-no { font-size: 11.5px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .3px; }
.badge { font-size: 11px; font-weight: 700; padding: 2.5px 9px; border-radius: 999px; white-space: nowrap; }
.badge.progress { background: #fdecec; color: var(--red); }
.badge.done { background: var(--ok-bg); color: var(--ok); }
.order-title { font-size: 15px; font-weight: 700; }
.order-sub { font-size: 12.5px; color: var(--muted); }
.order-next { font-size: 12.5px; color: var(--red); font-weight: 600; }
.order-next.okc { color: var(--ok); }
.empty { text-align: center; color: var(--muted); padding: 44px 0; font-size: 13.5px; }
.empty .big { font-size: 38px; margin-bottom: 8px; }

/* ---------- 步骤向导 ---------- */
.order-info {
  background: linear-gradient(180deg, #171b24 0%, #0f1218 100%); color: #fff; border-radius: var(--radius);
  padding: 11px 14px; margin-bottom: 12px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), var(--shadow);
}
.order-info .oi-no { font-size: 11px; color: rgba(255,255,255,.5); font-family: ui-monospace, monospace; letter-spacing: .4px; }
.order-info .oi-main { font-size: 14.5px; font-weight: 700; }
.order-info .oi-sub { font-size: 11.5px; color: rgba(255,255,255,.7); }
.order-info .oi-side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.order-info .oi-advisor { font-size: 10.5px; color: rgba(255,255,255,.48); letter-spacing: .3px; }
.order-info .oi-edit { color: #ffd2d6; font-size: 13px; text-decoration: none; }
.stepbar { display: flex; gap: 5px; margin-bottom: 14px; }
.stepbar .seg {
  flex: 1; text-align: center; font-size: 11px; color: var(--muted);
  padding-top: 7px; border-top: 3px solid var(--line); cursor: pointer; line-height: 1.3;
  border-radius: 2px 2px 0 0; transition: border-color .15s;
}
.stepbar .seg.active { color: var(--red); border-top-color: var(--red); font-weight: 700; }
.stepbar .seg.finished { color: var(--ok); border-top-color: var(--ok); }
.stepbar .seg.locked { cursor: not-allowed; opacity: .5; }
.step-head { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.step-head .num {
  width: 28px; height: 28px; border-radius: 50%; background: var(--red); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex: none;
  box-shadow: 0 3px 10px rgba(224, 32, 45, .3);
}
.step-head h2 { margin: 0; font-size: 16px; letter-spacing: .3px; }
.step-head .sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ---------- SKU 车型区（步骤1） ---------- */
.sku-box { background: #f8f9fc; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; margin-bottom: 14px; }
.sku-model-line { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.sku-label { font-size: 11px; color: var(--muted); margin-bottom: 3px; letter-spacing: .5px; }
.sku-model { font-size: 16.5px; font-weight: 800; line-height: 1.35; word-break: break-all; }
.sku-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.sku-ok { background: var(--ok-bg); color: var(--ok); font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; flex: none; }
.sku-input-row { display: flex; gap: 7px; margin-top: 10px; }
.sku-input-row .input { flex: 1; font-family: ui-monospace, Menlo, monospace; }
.sku-hint { font-size: 11px; color: var(--muted); margin-top: 6px; }

/* ---------- 检查项紧凑网格（步骤1） ---------- */
.chk-grid-head { display: flex; justify-content: space-between; align-items: center; margin: 4px 2px 9px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.chk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.chk-cell {
  position: relative; border: 1px solid var(--line); border-radius: 10px; padding: 14px 6px 9px;
  background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; min-height: 66px; gap: 2px;
  cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  transition: border-color .12s, background .12s, transform .1s;
}
.chk-cell:active { transform: scale(.96); }
.chk-cell.is-pass { border-color: #8fd4ae; background: var(--ok-bg); box-shadow: 0 0 0 1px rgba(18,147,90,.12) inset; }
.chk-cell.is-fail { border-color: #f2b8bd; background: #fdf2f3; box-shadow: 0 0 0 1px rgba(219,58,64,.12) inset; }
.chk-cell-mark {
  position: absolute; top: 6px; right: 6px; width: 19px; height: 19px; border-radius: 50%;
  font-size: 11px; font-weight: 800; line-height: 17px; text-align: center;
  color: #c3c9d4; background: #f1f3f7; border: 1.5px solid #dfe3ea;
  transition: all .12s;
}
.chk-cell-mark.pass { background: var(--ok); border-color: var(--ok); color: #fff; }
.chk-cell-mark.fail { background: var(--danger); border-color: var(--danger); color: #fff; }
.chk-cell-name { font-size: 12.5px; font-weight: 700; line-height: 1.35; }
.chk-cell.is-pass .chk-cell-name { color: var(--ok); }
.chk-cell.is-fail .chk-cell-name { color: var(--danger); }
.chk-cell-spec { font-size: 10px; color: var(--muted); margin-top: 1px; line-height: 1.28; }
.fail-note-row { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }

/* step1 配件拍照格子（3 列网格内跨整行） */
.parts-cell { grid-column: 1 / -1; border-style: dashed; align-items: stretch; text-align: left; padding: 10px 12px; min-height: 0; }
.parts-cell.is-pass { border-style: solid; }
.parts-cell:active { transform: none; }
/* step1 车检视频格子（检查项网格内跨整行） */
.chk-cell.video-cell { grid-column: 1 / -1; border-style: dashed; }
.chk-cell.video-cell.is-pass { border-style: solid; }
.chk-cell.video-cell .video-icon { font-size: 26px; margin: 4px 0 0; }
.parts-img {
  width: 100%; max-height: 300px; object-fit: cover;
  border-radius: 9px; border: 1px solid var(--line); margin-top: 7px;
  background: #000;
}
.parts-ok { font-size: 11px; font-weight: 700; color: var(--ok); margin-top: 6px; }
.fail-note-name { font-size: 12.5px; color: var(--danger); font-weight: 700; flex: 0 0 38%; }
.fail-note-row .input { flex: 1; }

/* ---------- 车检视频（步骤1） ---------- */
.video-empty { text-align: center; padding: 14px 0 8px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.video-icon { font-size: 34px; opacity: .55; }

/* ---------- 摄像头扫码弹层 ---------- */
.scan-overlay {
  position: fixed; inset: 0; background: rgba(10, 12, 16, .92); z-index: 200;
  display: flex; align-items: center; justify-content: center;
}
.scan-box { width: min(92vw, 420px); display: flex; flex-direction: column; gap: 12px; align-items: center; }
.scan-box video { width: 100%; border-radius: 14px; background: #000; aspect-ratio: 3/4; object-fit: cover; }
.scan-tip { color: #fff; font-size: 13px; text-align: center; }

/* 验车清单 */
.chk-group-title {
  font-size: 13px; font-weight: 700; color: var(--ink-2);
  margin: 14px 2px 8px; display: flex; align-items: center; gap: 8px;
}
.chk-group-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.chk-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; margin-bottom: 8px; background: #fff; }
.chk-item.is-pass { border-color: #bfe6cf; background: #f5fbf8; }
.chk-item.is-fail { border-color: #f2c4c4; background: #fdf5f5; }
.chk-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.chk-name { font-size: 14px; font-weight: 600; line-height: 1.4; }
.chk-spec { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.chk-toggle { display: flex; gap: 7px; flex: none; }
.chk-toggle button {
  min-width: 52px; min-height: 36px; border-radius: 9px; font-size: 13px; font-weight: 700;
  border: 1px solid var(--line); background: #fff; color: var(--muted); cursor: pointer;
}
.chk-toggle .t-pass.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.chk-toggle .t-fail.on { background: var(--danger); border-color: var(--danger); color: #fff; }
.chk-note { margin-top: 8px; }

/* 9 件套（紧凑网格，3 项一横，点击整格切换） */
.ess-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ess-cell {
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 7px;
  background: #fff; cursor: pointer; text-align: center; font-family: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  transition: border-color .12s, background .12s; min-height: 52px; justify-content: center;
}
.ess-cell:active { transform: scale(.97); }
.ess-cell.on { border-color: #8fd4ae; background: var(--ok-bg); }
.ess-cell-name { font-size: 12.5px; font-weight: 700; line-height: 1.3; color: var(--ink); }
.ess-cell.on .ess-cell-name { color: var(--ok); }
.ess-cell-note { font-size: 10px; color: var(--muted); line-height: 1.25; }

/* 注意事项 */
.notes-list { margin: 0; padding: 0; list-style: none; }
.notes-list li {
  position: relative; padding: 6px 0 6px 26px; font-size: 12.5px; line-height: 1.5;
  border-bottom: 1px dashed var(--line); color: var(--ink-2);
}
.notes-list li:last-child { border-bottom: none; }
.notes-list li::before { content: "⚠️"; position: absolute; left: 2px; font-size: 12px; }

/* 后台 · 月度流程单审核 */
.audit-panel { padding: 14px 16px; }
.audit-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.audit-month { max-width: 150px; font-weight: 600; }
.audit-stats { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.as-item { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: #f6f7fa; color: var(--muted); }
.as-item b { color: var(--ink); font-size: 13px; }
.as-item.ok { background: var(--ok-bg); }
.as-item.ok b { color: var(--ok); }
.as-item.bad { background: #fdecec; }
.as-item.bad b { color: var(--danger); }
.as-item.doing { background: #eef2fd; }
.as-item.doing b { color: var(--blue); }
.as-item.stuck { background: var(--warn-bg); }
.as-item.stuck b { color: var(--warn); }

.audit-row { display: flex; justify-content: space-between; gap: 10px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; background: #fff; }
.audit-row:last-child { margin-bottom: 0; }
.audit-row.bad { border-color: #f2b3b3; background: #fffafa; }
.audit-main { min-width: 0; flex: 1; }
.audit-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.audit-no { font-size: 11px; color: var(--muted); font-family: ui-monospace, Menlo, monospace; letter-spacing: .3px; }
.audit-title { font-size: 13.5px; font-weight: 700; }
.audit-model { font-size: 12px; color: var(--ink-2); }
.audit-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.audit-badge.ok { background: var(--ok-bg); color: var(--ok); }
.audit-badge.bad { background: #fdecec; color: var(--danger); }
.audit-badge.doing { background: #eef2fd; color: var(--blue); }
.audit-stuck { font-size: 11px; font-weight: 600; color: var(--warn); background: var(--warn-bg); padding: 2px 8px; border-radius: 999px; }
.audit-meta { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

.audit-steps { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.ast { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); background: #f6f7fa; border-radius: 999px; padding: 3px 9px 3px 4px; }
.ast i { font-style: normal; width: 15px; height: 15px; border-radius: 50%; background: #e3e6ee; color: #8a92a3; font-size: 9.5px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.ast.on { background: var(--ok-bg); color: var(--ok); font-weight: 600; }
.ast.on i { background: var(--ok); color: #fff; }

.audit-probs { margin-top: 7px; font-size: 12px; line-height: 1.5; color: var(--danger); background: #fdecec; border-radius: 8px; padding: 5px 9px; display: inline-block; }
.audit-row.doing .audit-probs { color: var(--ink-2); background: #f6f7fa; }
.audit-warns { margin-top: 5px; font-size: 11.5px; color: var(--warn); }
.audit-side { display: flex; flex-direction: column; gap: 6px; align-items: stretch; flex-shrink: 0; justify-content: center; }
.audit-side .btn { white-space: nowrap; }

/* 后台 · 折叠设置区 */
.fold { margin-bottom: 14px; }
.fold summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 13px 16px; font-size: 14px; color: var(--ink-2); box-shadow: var(--shadow); user-select: none; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary::after { content: "▾"; margin-left: auto; color: var(--muted); font-size: 13px; }
.fold[open] summary::after { content: "▴"; }
.fold-sub { font-size: 11.5px; color: var(--muted); font-weight: 400; }
.fold-body { padding-top: 12px; }

/* 纸单参考图（全出血大图：突破卡片内边距，贴卡片圆角） */
.guide-card { padding-bottom: 10px; }
.guide-img {
  display: block; width: calc(100% + 28px); margin: 10px -14px 0;
  border-radius: 0; border: none; border-bottom: 1px solid var(--line);
  background: #fff; cursor: zoom-in; box-shadow: none;
}
.guide-zoom {
  text-align: center; margin-top: 8px; color: var(--muted); font-size: 11px;
  cursor: pointer; user-select: none;
}
.guide-zoom:hover { color: var(--ink-2); }
/* 步骤3 · 注册引导图（居中卡片式） */
.reg-img {
  display: block; width: min(100%, 340px); margin: 14px auto 0;
  border-radius: 14px; cursor: zoom-in;
  box-shadow: 0 2px 14px rgba(0,0,0,.08);
}
.reg-zoom-hint {
  text-align: center; margin-top: 6px; color: var(--muted); font-size: 11px;
  cursor: pointer; user-select: none;
}
.reg-zoom-hint:hover { color: var(--ink-2); }
.guide-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 16px; cursor: zoom-out; overflow: auto;
}
.guide-overlay img {
  max-width: 100%; max-height: calc(100vh - 60px);
  border-radius: 6px; box-shadow: 0 4px 24px rgba(0,0,0,.4);
  cursor: default;
}
.guide-close {
  margin-top: 14px; color: #fff; font-size: 14px; padding: 7px 20px;
  background: rgba(255,255,255,.14); border-radius: 20px; cursor: pointer;
}

/* 收款注册 */
.pay-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .pay-grid { grid-template-columns: 1fr 1fr; } }

/* 购车送好礼 · 金额自动核算 */
.gift-calc {
  margin-top: 16px; padding: 14px; border-radius: 12px;
  background: linear-gradient(135deg, #fdfaf2 0%, #faf4e4 100%);
  border: 1px solid #ece0c4;
}
.gift-calc-title {
  font-size: 13.5px; font-weight: 800; color: #7a5c16; letter-spacing: .5px;
}
.gift-calc-sub { font-size: 11px; color: #a08b55; margin-top: 3px; }
.gift-calc-input {
  display: flex; align-items: center; margin-top: 10px;
  background: #fff; border: 1.5px solid #e3d5b0; border-radius: 10px;
  padding: 0 12px; height: 44px;
  transition: border-color .15s, box-shadow .15s;
}
.gift-calc-input:focus-within {
  border-color: #c9a84c; box-shadow: 0 0 0 3px rgba(201, 168, 76, .12);
}
.gift-yen {
  font-size: 17px; font-weight: 800; color: #b08d34; margin-right: 8px;
}
.gift-calc-input input {
  flex: 1; border: none; outline: none; font-size: 16px; font-weight: 600;
  color: var(--ink); background: transparent; min-width: 0;
  font-variant-numeric: tabular-nums;
}
.gift-calc-input input::placeholder { color: #c4b586; font-weight: 400; font-size: 13.5px; }
/* 隐藏 number 输入的上下箭头 */
.gift-calc-input input::-webkit-outer-spin-button,
.gift-calc-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.gift-calc-input input[type=number] { -moz-appearance: textfield; appearance: textfield; }

.gift-empty {
  margin-top: 10px; text-align: center; font-size: 11.5px; color: #b3a06b;
  padding: 12px 0;
}
.gift-tier-0 {
  margin-top: 10px; text-align: center; font-size: 12.5px; color: #8a774a;
  font-weight: 600; padding: 12px 0; line-height: 1.7;
  border-top: 1px dashed #e3d5b0;
}
.gift-tier-0 span { font-size: 11px; color: #b3a06b; font-weight: 400; }
.gift-tier {
  margin-top: 10px; border-top: 1px dashed #e3d5b0; padding-top: 10px;
}
.gift-tier-head {
  font-size: 12.5px; font-weight: 800; color: #7a5c16; letter-spacing: .5px;
  margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
}
.gift-tier-head::before { content: ''; width: 14px; height: 2px; background: #c9a84c; border-radius: 2px; }
.gift-item {
  display: flex; align-items: baseline; gap: 8px; padding: 7px 10px;
  background: rgba(255,255,255,.72); border-radius: 8px; margin-bottom: 6px;
}
.gift-item-name { flex: 1; font-size: 13px; font-weight: 600; color: var(--ink); }
.gift-item-qty { font-size: 13.5px; font-weight: 800; color: #b08d34; font-variant-numeric: tabular-nums; }
.gift-item-val { font-size: 10.5px; color: #b3a06b; }
.gift-tier-foot {
  font-size: 10.5px; color: #a08b55; text-align: center; margin-top: 4px;
  letter-spacing: .3px;
}
.gift-tier-foot b {
  font-size: 13px; font-weight: 800; color: #b08d34;
  font-variant-numeric: tabular-nums;
}

/* ============ 顾问收尾任务页 ============ */
.post-card .step-head .num { background: linear-gradient(135deg, #2f6bff, #1a4fcc); }

/* 赠送信息摘要卡 */
.post-gift {
  margin: 12px 0 14px; padding: 12px 14px; border-radius: 10px;
  background: linear-gradient(135deg, #fdfaf2 0%, #faf4e4 100%);
  border: 1px solid #ece0c4;
}
.post-gift-head {
  font-size: 12.5px; font-weight: 800; color: #7a5c16; letter-spacing: .3px;
}
.post-gift-items {
  font-size: 12px; color: #8a774a; margin-top: 6px; line-height: 1.6;
}
.post-gift-total {
  font-size: 11px; color: #a08b55; margin-top: 5px; font-weight: 600;
}
.post-gift-empty {
  background: #fff7e6; border-color: #f0d9b8;
}
.post-gift-empty .post-gift-head { color: #c2620a; }
.post-gift-empty .post-gift-items { color: #b08d34; }

.post-progress { margin: 14px 0 10px; }
.post-bar {
  height: 8px; background: var(--line); border-radius: 4px; overflow: hidden;
}
.post-bar-fill {
  height: 100%; background: linear-gradient(90deg, #2f6bff, #12935a);
  border-radius: 4px; transition: width .35s ease;
}
.post-bar-text {
  font-size: 11.5px; color: var(--muted); margin-top: 5px; font-weight: 600;
}
.post-list { margin-top: 8px; }
.post-task {
  display: flex; align-items: center; gap: 12px; padding: 12px;
  border: 1.5px solid var(--line); border-radius: 10px; margin-bottom: 8px;
  cursor: pointer; transition: all .15s; background: #fff; user-select: none;
}
.post-task:active { transform: scale(.99); }
.post-task.done {
  border-color: #c4e3d0; background: #f0faf4;
}
.post-task-check {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid #c9cdd6;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; color: #fff; transition: all .2s;
}
.post-task-check.on {
  background: var(--ok); border-color: var(--ok);
  animation: pop .25s ease;
}
@keyframes pop {
  0% { transform: scale(.7); }
  60% { transform: scale(1.12); }
  100% { transform: scale(1); }
}
.post-task-body { flex: 1; min-width: 0; }
.post-task-title {
  font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.4;
}
.post-task.done .post-task-title { color: var(--ok); }
.post-task.done .post-task-title::after {
  content: ' ✓'; color: var(--ok); font-weight: 800;
}
/* 列表「收尾」态 */
.order-card.poststage {
  border-left: 3px solid #c9a84c;
}
.badge.post {
  background: #fdf3e7; color: #c2620a; border: 1px solid #f0d9b8;
}
.order-next.postc { color: #c2620a; font-weight: 600; }
.img-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; text-align: center; background: #fff; }
.img-card h3 { margin: 0 0 8px; font-size: 14.5px; }
.img-card img { max-width: 100%; max-height: 380px; border-radius: 8px; }
.img-placeholder {
  border: 1.5px dashed #c9cdd6; border-radius: 10px; color: var(--muted);
  padding: 40px 14px; font-size: 13px; line-height: 1.7; background: #f8f9fc;
}
.pay-checks { display: flex; flex-direction: column; gap: 9px; margin-top: 6px; }
.pay-checks label { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600; }
.pay-checks input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--red); }

/* 双确认 */
.summary-box { border: 1px solid var(--line); border-radius: 10px; padding: 10px 13px; background: #f8f9fc; }
.summary-box .line { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13.5px; }
.summary-box .line b { font-size: 13.5px; }
.summary-box .summary-one { justify-content: flex-start; padding: 3px 0; font-size: 13px; gap: 2px; }
.fail-list { margin: 7px 0 0; padding-left: 0; list-style: none; }
.fail-list li { color: var(--danger); font-size: 13px; padding: 2px 0; }
.confirm-item { display: flex; align-items: flex-start; gap: 11px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.confirm-item:last-child { border-bottom: none; }
.confirm-item input[type=checkbox] {
  appearance: none; -webkit-appearance: none;
  width: 24px; height: 24px; flex: none; margin-top: 1px;
  border: 2px solid #b7c6e8; border-radius: 6px; background: #fff;
  position: relative; cursor: pointer;
  transition: background .12s, border-color .12s, box-shadow .12s;
}
.confirm-item input[type=checkbox]:checked { background: var(--blue); border-color: var(--blue); box-shadow: 0 2px 8px rgba(47,107,255,.3); }
.confirm-item input[type=checkbox]:checked::after {
  content: '✓'; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; font-weight: 800; line-height: 1;
}
.confirm-item span { font-size: 13.5px; line-height: 1.6; padding-top: 2px; }

/* step4 客户确认欢迎语 */
.welcome-note {
  margin-top: 12px; padding: 11px 14px;
  background: linear-gradient(160deg, #f5f8ff, #f0f5ff);
  border-left: 3px solid var(--blue);
  border-radius: 0 9px 9px 0;
  font-size: 13.5px; line-height: 1.75; color: var(--ink-2);
  font-weight: 500;
}

/* step4 会员影像授权卡（签名下方） */
.consent-card {
  margin-top: 14px; padding: 13px 14px 9px;
  background: linear-gradient(160deg, #fffaef 0%, #fdf6e4 100%);
  border: 1px solid #ecd9a8; border-radius: 11px;
  position: relative; overflow: hidden;
}
.consent-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #d4af37, #f3d98b, #d4af37);
}
.consent-title { font-size: 14px; font-weight: 800; color: #8a6a1f; letter-spacing: .4px; }
.consent-text { font-size: 12.5px; line-height: 1.7; color: #7a6a45; margin: 6px 0 4px; }
.consent-check { padding: 7px 0 4px; border-bottom: none; }
.consent-check span { font-weight: 700; color: #6d5518; }
.consent-check input[type=checkbox] { border-color: #d9c078; }
.consent-check input[type=checkbox]:checked { background: #c9a227; border-color: #c9a227; box-shadow: 0 2px 8px rgba(201,162,39,.35); }

/* 完成页授权状态 */
.consent-flag { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.consent-flag.ok { color: #a3801d; }

/* step1 多视频列表 */
.vid-item { margin-bottom: 10px; }
.vid-item .vid-label { font-size: 11.5px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.vid-item .vid-del { margin-top: 5px; }

/* step4 验车视频轮播 */
.vid-carousel { margin-top: 10px; }
.vid-carousel-head {
  font-size: 13px; font-weight: 700; margin-bottom: 7px; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between;
}
.vc-speed {
  border: 1px solid var(--line); border-radius: 7px;
  background: var(--bg); color: var(--ink-2);
  font-size: 12px; font-weight: 700; padding: 2px 10px; cursor: pointer;
  transition: all .15s; line-height: 1.5;
}
.vc-speed.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.vc-speed:active { transform: scale(.92); }
.vid-carousel-body { position: relative; }
.vc-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 32px; height: 42px; border: none; border-radius: 9px;
  background: rgba(15, 18, 25, .55); color: #fff;
  font-size: 22px; line-height: 1; cursor: pointer; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  padding-bottom: 4px;
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.vc-arrow:active { background: rgba(15, 18, 25, .8); }
.vc-prev { left: 6px; }
.vc-next { right: 6px; }
.vc-indicators { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 8px; }
.vc-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #cdd3de; cursor: pointer; transition: all .15s;
}
.vc-dot.on { background: var(--blue); width: 18px; border-radius: 4px; }
.vc-count { font-size: 11px; color: var(--muted); margin-left: 8px; font-weight: 600; }

/* step4 订单摘要卡（VV 样式） */
.sum-card { border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; background: #fff; }
.sum-card .sum-row { display: flex; gap: 6px; padding: 3px 0; font-size: 13.5px; line-height: 1.55; }
.sum-card .sum-row .k { color: var(--muted); flex: none; width: 60px; }
.sum-card .sum-row b { font-weight: 600; word-break: break-all; }
.inspect-strip {
  margin-top: 9px; display: flex; align-items: center; gap: 8px;
  background: var(--ok-bg); color: var(--ok); border-radius: 8px;
  padding: 8px 11px; font-size: 13px; font-weight: 700;
}
.inspect-strip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; box-shadow: 0 0 0 3px rgba(18,147,90,.15); }
.inspect-strip.warn { background: var(--warn-bg); color: var(--warn); }
.inspect-strip.warn .dot { background: var(--warn); box-shadow: 0 0 0 3px rgba(194,98,10,.15); }

/* 签名撤销/清除按钮 */
.sig-actions { display: flex; gap: 8px; }

/* 动态禁用底部按钮 */
.btn-primary[disabled] { background: #d3d7de; border-color: #d3d7de; color: #fff; cursor: not-allowed; box-shadow: none; }

/* 签名板 */
.sig-block { margin-top: 12px; }
.sig-title { font-size: 13.5px; font-weight: 700; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; }
.sig-pad {
  width: 100%; height: 260px; background: #fff;
  border: 1.5px dashed #c9cdd6; border-radius: 14px;
  touch-action: none; display: block; position: relative;
}
/* 签名基线（纸质单据感，不挡笔迹） */
.sig-pad::after {
  content: ''; position: absolute; left: 9%; right: 9%; top: 72%;
  border-bottom: 1.5px dashed #e3e6ee; pointer-events: none;
}
.sig-hint { text-align: center; color: #b6bac3; font-size: 11.5px; margin-top: 5px; }

/* 完成页（喜庆版） */
.done-hero {
  text-align: center; padding: 26px 12px 20px; margin: 2px -4px 6px;
  background: linear-gradient(165deg, #fff7e0 0%, #fdeeee 50%, #ffffff 100%);
  border-radius: var(--radius);
}
.done-hero .tick {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(145deg, #ffd964 0%, #ff9d2e 100%);
  box-shadow: 0 8px 26px rgba(255, 157, 46, .45), inset 0 -4px 10px rgba(200, 90, 0, .18);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 42px; color: #fff; margin-bottom: 12px;
  animation: pop-in .65s cubic-bezier(.18, .89, .32, 1.35);
}
@keyframes pop-in { from { transform: scale(0) rotate(-30deg); opacity: 0; } }
.done-hero .confetti-emoji { font-size: 24px; line-height: 1; animation: sway 1.6s ease-in-out infinite alternate; display: inline-block; margin: 0 8px; }
@keyframes sway { from { transform: translateY(-4px) rotate(-8deg); } to { transform: translateY(4px) rotate(8deg); } }
.done-hero h2 {
  margin: 0 0 5px; font-size: 23px; font-weight: 800; letter-spacing: 1.5px;
  background: linear-gradient(92deg, #d4161f 10%, #ff7a45 50%, #d4161f 90%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.done-hero p { color: var(--ink-2); margin: 0; font-size: 14px; font-weight: 600; }
.done-hero .bless { color: var(--muted); margin: 6px 0 0; font-size: 12.5px; font-weight: 500; }
/* 交付祝福卡（衬线 · 优雅） */
.bless-card {
  margin: 14px 2px 2px; padding: 15px 10px 12px;
  background: linear-gradient(180deg, #fdfaf2 0%, #faf4e4 100%);
  border: 1px solid #eadfc4; border-radius: 12px;
  position: relative; text-align: center;
}
.bless-card::before, .bless-card::after {
  content: ""; position: absolute; left: 18px; right: 18px; height: 1px;
  background: linear-gradient(90deg, transparent, #d9c48e 18%, #d9c48e 82%, transparent);
}
.bless-card::before { top: 7px; }
.bless-card::after { bottom: 7px; }
.bless-line {
  font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  font-size: 15px; color: #6d5526; letter-spacing: 2.5px;
  line-height: 2; margin: 0; font-weight: 600;
}
.bless-sign {
  margin-top: 6px; font-size: 10.5px; color: #a58f5d; letter-spacing: 2px;
  font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
}
.feishu-tip { text-align: center; font-size: 12.5px; margin-top: 5px; }
.feishu-tip.ok { color: var(--ok); }
.feishu-tip.bad { color: var(--warn); }
.kv-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.kv-table td { padding: 7px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.kv-table td.k { color: var(--muted); width: 84px; white-space: nowrap; }

/* ---------- 设置页 ---------- */
.set-section h3 {
  margin: 0 0 10px; font-size: 14.5px; display: flex; align-items: center; gap: 8px; letter-spacing: .3px;
}
.set-section h3 .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px rgba(224,32,45,.14); }
.tpl-row { display: flex; gap: 7px; margin-bottom: 7px; }
.tpl-row input { flex: 1; min-width: 0; }
.tpl-row input:first-child { flex: 0 0 90px; }
.tpl-row .del { flex: none; }
.tpl-add { margin-top: 6px; }
.line-list textarea { min-height: 140px; }
.upload-box { display: flex; gap: 11px; align-items: center; border: 1.5px dashed #c9cdd6; border-radius: 10px; padding: 11px; }
.upload-box img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.upload-box .up-info { flex: 1; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.switch-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; }
.switch-row .lbl { font-size: 14px; font-weight: 600; }
.switch-row .sub { font-size: 11.5px; color: var(--muted); font-weight: 400; display: block; margin-top: 2px; }
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; background: #cdd2da; border-radius: 999px; transition: .18s; cursor: pointer;
}
.switch .slider::before {
  content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; top: 3px; left: 3px; transition: .18s; box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.switch input:checked + .slider { background: var(--ok); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* 反馈记录 */
.fb-item { padding: 7px 0; border-bottom: 1px dashed var(--line); }
.fb-item:last-child { border-bottom: none; }
.fb-content { font-size: 12.5px; line-height: 1.55; white-space: pre-wrap; word-break: break-all; }
.fb-meta { font-size: 10.5px; color: var(--muted); margin-top: 3px; letter-spacing: .3px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%);
  background: rgba(15, 18, 25, .94); color: #fff; padding: 10px 20px; border-radius: 10px;
  font-size: 13px; z-index: 99; max-width: 86vw; text-align: center;
  pointer-events: none; /* 纯提示不拦截点击/签名 */
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: 0 8px 28px rgba(0,0,0,.3); animation: fadein .18s;
}
.toast.err { background: rgba(208, 48, 48, .95); }
@keyframes fadein { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------- 打印交付单 ---------- */
.print-doc { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px 34px; }
.print-doc .doc-head { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 3px solid var(--ink); padding-bottom: 12px; }
.print-doc .doc-head h1 { margin: 0; font-size: 24px; letter-spacing: 2px; }
.print-doc .doc-head .store { font-size: 13px; color: var(--muted); text-align: right; line-height: 1.6; }
.print-doc h2 { font-size: 15px; margin: 20px 0 8px; padding-left: 9px; border-left: 4px solid var(--red); }
.print-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.print-table th, .print-table td { border: 1px solid #999; padding: 5.5px 8px; text-align: left; }
.print-table th { background: #f0f1f3; font-weight: 700; white-space: nowrap; }
.print-table .ok-t { color: var(--ok); font-weight: 700; }
.print-table .bad-t { color: var(--danger); font-weight: 700; }
.print-notes { font-size: 13px; line-height: 1.8; margin: 0; padding-left: 18px; }
.print-ess { font-size: 13.5px; line-height: 1.7; color: #222; }
.print-sig-row { display: flex; gap: 26px; margin-top: 18px; align-items: flex-end; }
.print-sig { flex: 1; border-top: 1.5px solid var(--ink); padding-top: 8px; font-size: 13px; text-align: center; }
.print-sig img { max-height: 64px; max-width: 190px; margin-bottom: 2px; }
.print-sig .ph { color: #bbb; min-height: 40px; display: flex; align-items: center; justify-content: center; }
.print-parts { margin-top: 10px; page-break-inside: avoid; }
.print-parts-title { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.print-parts img { width: 58%; max-width: 420px; border: 1px solid #ccc; border-radius: 6px; }
.print-actions { margin-top: 18px; display: flex; gap: 10px; }

@media print {
  body { background: #fff; padding: 0; }
  .topbar, .appfoot, .toast, .print-actions, .modal-mask,
  .container > :not(.print-wrap) { display: none !important; }
  .container { max-width: none; padding: 0; margin: 0; }
  .print-wrap { display: block !important; }
  .print-doc { box-shadow: none; border-radius: 0; padding: 0; }
  @page { size: A4; margin: 13mm 12mm; }
}

@media (max-width: 420px) {
  .grid-2 { grid-template-columns: 1fr; }
  .chk-top { flex-direction: column; }
  .chk-toggle { width: 100%; }
  .chk-toggle button { flex: 1; }
  .tpl-row input:first-child { flex: 0 0 76px; }
}

/* ===== 设置页 · 飞书成员 UID 同步 ===== */
.fs-sync-result { margin-top: 10px; }
.fs-sync-head { font-size: 13px; font-weight: 600; color: var(--ok, #16a34a); margin-bottom: 6px; }
.fs-sync-head.fail { color: var(--danger, #dc2626); }
.fs-sync-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 10px; background: var(--bg, #f6f7f9);
  font-size: 12.5px; margin-bottom: 4px;
}
.fs-sync-item.fail { background: #fef2f2; }
.fs-sync-name { font-weight: 600; flex: 0 0 64px; }
.fs-sync-mobile { color: var(--muted, #8a94a6); flex: 0 0 110px; font-variant-numeric: tabular-nums; }
.fs-sync-uid { color: var(--muted, #8a94a6); font-family: ui-monospace, Menlo, Consolas, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-sync-item.fail .fs-sync-uid { color: #dc2626; }
