/* 机动车检测站验车 CRM 系统 */
:root {
  --blue: #1668dc; --blue-d: #0d4fb3; --green: #16a34a; --red: #dc2626;
  --bg: #f3f5f9; --panel: #fff; --line: #e3e8ef; --txt: #1f2733; --muted: #7a869a;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font: 14px/1.6 "Microsoft YaHei", "PingFang SC", sans-serif; background: var(--bg); color: var(--txt); }
.hidden { display: none !important; }

/* ---------- 登录 ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1668dc 0%, #0b3d91 60%, #072a63 100%); }
.login-box { width: 380px; background: #fff; border-radius: 14px; padding: 34px 30px; box-shadow: 0 18px 50px rgba(0,0,0,.3); }
.login-box h1 { font-size: 22px; text-align: center; margin-bottom: 24px; color: var(--blue-d); }
.login-box h1 span { font-size: 26px; letter-spacing: 2px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.field input, .filter input, .filter select, .btn-row input, .btn-row select,
.grid2 input, .grid2 select { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; background:#fff; }
.grid2 select { background: #fff; }
.field input:focus, .grid2 input:focus, .grid2 select:focus { outline: 2px solid #bcd4fb; border-color: var(--blue); }
.role-tip { font-size: 12px; color: var(--muted); background: #f5f8fe; padding: 8px 10px; border-radius: 8px; }
.err { color: var(--red); font-size: 13px; margin-top: 8px; min-height: 18px; }
.muted { color: var(--muted); font-size: 12px; }

/* ---------- 按钮 ---------- */
.btn { display: inline-block; padding: 8px 16px; border: 1px solid var(--line); background: #fff; color: var(--txt);
  border-radius: 8px; cursor: pointer; font-size: 14px; }
.btn:hover { border-color: var(--blue); color: var(--blue); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-d); color: #fff; }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.tiny { padding: 4px 10px; font-size: 12px; }
.btn.block { width: 100%; margin-top: 8px; }
.btn.big { width: 100%; margin-top: 10px; font-size: 16px; padding: 12px; }
.btn.link { border: none; background: none; color: var(--blue); padding: 2px 6px; font-size: 13px; }
.btn-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 10px 0; }

/* ---------- 布局：顶栏 + 左侧主/子目录导航 + 面包屑 ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; background: #0d4fb3; color: #fff;
  padding: 0 20px; height: 54px; position: sticky; top: 0; z-index: 50; }
.brand { font-weight: 700; font-size: 17px; white-space: nowrap; letter-spacing: 1px; }
.brand span { font-weight: 400; font-size: 12px; opacity: .8; margin-left: 8px; }
.userbox { display: flex; align-items: center; gap: 10px; font-size: 13px; white-space: nowrap; }
.userbox .avatar { width: 30px; height: 30px; border-radius: 50%; background: #fff; position: relative; flex: 0 0 auto; }
.userbox .avatar::after { content: ''; position: absolute; left: 50%; top: 6px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--blue); transform: translateX(-50%); box-shadow: 0 9px 0 -1px var(--blue); }
.userbox .btn.tiny { background: rgba(255,255,255,.15); color: #fff; border-color: transparent; }

.layout { display: flex; min-height: calc(100vh - 54px); }
.sidebar { width: 208px; flex: 0 0 208px; background: #fff; border-right: 1px solid var(--line);
  position: sticky; top: 54px; align-self: flex-start; height: calc(100vh - 54px); overflow-y: auto; }
.nav { display: block; padding: 6px 0; }
.nav .nav-group { margin: 0; }
.nav .nav-top { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; background: none; border: none;
  padding: 11px 16px; font-size: 14px; color: var(--txt); cursor: pointer; }
.nav .nav-top:hover { background: #f5f8fe; color: var(--blue); }
.nav .nav-top.active { color: var(--blue); font-weight: 600; }
.nav .nav-ico { flex: 0 0 16px; width: 16px; height: 16px; display: inline-block; opacity: .75; }
.nav .nav-top.active .nav-ico { opacity: 1; }
.nav .nav-arrow { margin-left: auto; font-size: 11px; color: var(--muted); transition: transform .15s; }
.nav .nav-group.open .nav-arrow { transform: rotate(180deg); }
.nav .nav-subs { display: none; }
.nav .nav-group.open .nav-subs { display: block; }
.nav .nav-sub { display: block; width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 8px 16px 8px 41px; font-size: 13px; color: var(--muted); }
.nav .nav-sub:hover { color: var(--blue); background: #f5f8fe; }
.nav .nav-sub.active { color: var(--blue); font-weight: 600; background: #eef4ff; }

/* ---------- 三级目录（系统设置 → 基础设置 → 权限/价格/字典/代理/小票/接口） ---------- */
.nav .nav-subgrp { margin: 0; }
.nav .nav-sub-toggle { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.nav .nav-subgrp .nav-arrow { margin-left: auto; font-size: 11px; color: var(--muted); transition: transform .15s; }
.nav .nav-subgrp.open .nav-arrow { transform: rotate(180deg); }
.nav .nav-subs2 { display: none; }
.nav .nav-subgrp.open .nav-subs2 { display: block; }
.nav .nav-sub2 { display: block; width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 7px 16px 7px 58px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.nav .nav-sub2:hover { color: var(--blue); background: #f5f8fe; }
.nav .nav-sub2.active { color: var(--blue); font-weight: 600; background: #eef4ff; }

/* ---------- 权限勾选树：嵌套子目录缩进 ---------- */
.pg-grp-nested > .pg-grp-top { padding-left: 10px; }
.pg-grp-nested > .pg-subs { margin-left: 14px; padding-left: 8px; border-left: 1px dashed #e6ebf3; }

.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.crumb { display: flex; align-items: center; gap: 6px; background: #fff; border-bottom: 1px solid var(--line);
  padding: 9px 18px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.crumb b { color: var(--txt); font-weight: 600; }
.crumb .sep { color: #c3ccd8; }
main { padding: 18px; max-width: 1400px; width: 100%; }
.page h2 { font-size: 18px; margin: 8px 0 12px; }
.page h3 { font-size: 15px; margin-bottom: 10px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 980px) { .two-col { grid-template-columns: 1fr; } }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-bottom: 10px; }
.grid2 .full { grid-column: 1 / -1; }
.grid2 label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 3px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.card .k { font-size: 12px; color: var(--muted); }
.card .v { font-size: 24px; font-weight: 700; margin-top: 4px; }
.card .v.money { color: var(--blue); }
.card .s { font-size: 12px; color: var(--muted); }

/* ---------- 表格 ---------- */
.tbl-wrap { overflow-x: auto; scrollbar-width: none; }   /* Firefox 隐藏原生横向滚动条 */
.tbl-wrap::-webkit-scrollbar { height: 0; }                /* WebKit 隐藏原生横向滚动条（改用下方常驻滑块） */
.tbl-wrap.dragging { cursor: grabbing; user-select: none; }
/* 表格横向滚动优化：原生横向滚动条被压在表格底部，长页面下够不着；
   改为在表格下方挂一个 sticky(常驻可视区底部) 的横向滑块，无需滚到表格底部即可左右滑动 */
.hscroll-wrap { position: sticky; bottom: 8px; z-index: 6; display: flex; align-items: center; gap: 8px;
  margin-top: 2px; padding: 4px 10px; background: rgba(247,249,252,.94); border: 1px solid var(--line);
  border-radius: 8px; box-shadow: 0 2px 8px rgba(15,25,45,.08); }
.hscroll-wrap[hidden] { display: none; }
.hscroll-label { font-size: 11px; color: var(--muted); white-space: nowrap; }
.hscroll { flex: 1; height: 6px; appearance: none; -webkit-appearance: none; background: #d7dee8;
  border-radius: 3px; outline: none; cursor: pointer; }
.hscroll::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: var(--blue); cursor: grab; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.hscroll::-webkit-slider-thumb:active { cursor: grabbing; }
.hscroll::-moz-range-thumb { width: 16px; height: 16px; border: none; border-radius: 50%; background: var(--blue); cursor: grab; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { background: #f7f9fc; color: var(--muted); font-weight: 600; position: sticky; top: 0; }
tbody tr:hover { background: #f5f8fe; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; }
.tag.green { background: #e7f6ec; color: var(--green); }
.tag.blue { background: #e8f0fd; color: var(--blue); }
.tag.gray { background: #eef1f5; color: var(--muted); }
.tag.red { background: #fdeaea; color: var(--red); }
.tag.orange { background: #fff3e0; color: #c26a00; }
.tag.teal { background: #e0f5f3; color: #0a7b6e; }
.pager { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.filter { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
input[type=date], input[type=checkbox] { width: auto; }

/* ---------- 价格区 ---------- */
.price-box { background: #f7f9fc; border: 1px dashed var(--line); border-radius: 10px; padding: 12px 14px; margin: 6px 0 10px; }
.price-line { display: flex; justify-content: space-between; padding: 3px 0; font-size: 14px; }
.price-line.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; font-size: 17px; }
.price-line.total b { color: var(--red); font-size: 22px; }
/* 手动定价（价格规则未匹配）输入行 */
#manualPriceWrap { align-items: center; }
#manualPriceWrap input { width: 110px; padding: 4px 8px; border: 1px solid #e0a33a; border-radius: 6px; font-size: 14px; font-weight: 700; }
#manualPriceWrap .muted { font-size: 12px; }
/* 必填项红色标注：未填的输入框红框高亮 */
.input-required-miss { border: 2px solid var(--red) !important; box-shadow: 0 0 0 2px rgba(255, 77, 79, .18); animation: req-flash 1.2s ease-in-out infinite; }
@keyframes req-flash { 0%, 100% { box-shadow: 0 0 0 2px rgba(255, 77, 79, .18); } 50% { box-shadow: 0 0 0 4px rgba(255, 77, 79, .34); } }
.ocr-row { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.file-btn { cursor: pointer; }
/* OCR 提示条：摄像头限制、引擎不可用、识别失败等就地显示，避免"点了没反应" */
.ocr-hint { margin: -4px 0 12px; padding: 9px 12px; border-radius: 8px; font-size: 13px; line-height: 1.7;
  background: #f5f8fe; border: 1px solid #cfe0ff; color: var(--txt); }
.ocr-hint.bad { background: #fff5f5; border-color: #f6c9c9; color: #a11; }
.ocr-hint b { font-weight: 700; }
.ocr-hint ul { margin: 4px 0 0 18px; padding: 0; }

/* 特殊车辆提醒条：录单命中折扣/平台车辆时醒目提示并带出设定价（琥珀色，区别于蓝色识别提示） */
.sv-alert { margin: -4px 0 12px; padding: 11px 14px; border-radius: 8px; font-size: 13px; line-height: 1.75;
  background: #fffaf0; border: 1px solid #ffd591; border-left: 4px solid #fa8c16; color: #613400; }
.sv-alert b { font-weight: 700; }
.sv-alert .sv-price { font-size: 18px; font-weight: 800; color: #d4380d; }
.sv-alert .sv-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.sv-alert ul { margin: 6px 0 0 18px; padding: 0; }
.sv-alert .sv-cat { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 700; }
.sv-alert .sv-cat.discount { background: #e6f4ff; color: #0958d9; }
.sv-alert .sv-cat.platform { background: #fff1f0; color: #cf1322; }
.sv-alert .sv-note { color: #874d00; }

/* ---------- 权限管理：可访问目录勾选树（按一级目录分组） ---------- */
.pg-tree-head { display: flex; align-items: center; gap: 8px; margin: 14px 0 8px; flex-wrap: wrap; }
.pg-tree-head .spacer { flex: 1; }
.pg-tree { border: 1px solid var(--line, #e3e8f0); border-radius: 10px; padding: 6px 10px; max-height: 380px; overflow: auto; background: #fbfcfe; }
.pg-grp { border-bottom: 1px dashed #e6ebf3; padding: 7px 0; }
.pg-grp:last-child { border-bottom: none; }
.pg-grp-top { display: flex; align-items: center; gap: 8px; }
.pg-grp-top > b { font-size: 13px; color: var(--txt, #1f2937); }
.pg-grp-top .pg-cnt { font-size: 12px; color: #7a869a; }
.pg-subs { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 6px 0 0 24px; }
.pg-subs label, .pg-grp-top label { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; cursor: pointer; user-select: none; }
.pg-subs input[type=checkbox], .pg-grp-top input[type=checkbox] { cursor: pointer; }
.pg-subs label.off { color: #9aa5b5; }
.pg-locked { font-size: 12px; color: #874d00; background: #fffaf0; border-radius: 6px; padding: 1px 7px; }

/* ---------- 弹窗 ---------- */
.modal { position: fixed; inset: 0; background: rgba(10,20,40,.5); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal-box { background: #fff; border-radius: 14px; padding: 22px 24px; width: 520px; max-width: 94vw; max-height: 90vh; overflow: auto; }
.modal-box h3 { margin-bottom: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.modal-box video { width: 100%; border-radius: 10px; background: #000; }
/* 弹窗内的输入（审批备注等） */
.modal-box textarea.input { width: 100%; box-sizing: border-box; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; background: #fff; resize: vertical; font-family: inherit; }
/* 行内“查看/链接”样式的按钮 */
button.link-btn { background: none; border: none; color: var(--blue); cursor: pointer; padding: 0; font-size: inherit; text-decoration: underline; }
button.link-btn:hover { color: var(--blue-d); }
/* 凭证预览灯箱图片 */
.voucher-preview { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; border-radius: 8px; }
.voucher-frame { width: 100%; height: 72vh; border: 0; border-radius: 8px; }
.confirm-info { background: #f7f9fc; border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; }
.confirm-info .row { display: flex; justify-content: space-between; padding: 3px 0; }
.confirm-info .row b.hl { color: var(--red); }

/* ---------- 小票（热敏纸无灰度层次：强制纯黑 + 粗笔画黑体 + 大字号字重，避免发灰看不清） ---------- */
#printArea { position: fixed; left: -9999px; top: 0; }
.receipt {
  width: var(--rc-width, 58mm);
  /* 纸宽含内边距：58mm 纸打出的小票整体不超过 58mm，避免右侧被裁 */
  box-sizing: border-box;
  background: #fff;
  color: #000;
  font-family: var(--rc-font, "SimHei", "Heiti SC", "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif);
  font-size: var(--rc-size, 14px);
  font-weight: var(--rc-weight, 700);
  line-height: var(--rc-line, 1.75);
  padding: 4mm 3mm;
  letter-spacing: .02em;
  /* 关键三项：禁止浏览器打印时淡化颜色、禁止自动缩小字号、保持字形精度 */
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
  -webkit-text-size-adjust: none;
  text-rendering: geometricPrecision;
}
.receipt * { color: #000 !important; }
.receipt .r-title { text-align: center; font-size: var(--rc-title, 21px); font-weight: 900; letter-spacing: .08em; line-height: 1.35; }
.receipt .r-sub { text-align: center; font-size: var(--rc-sub, 14px); font-weight: 700; letter-spacing: .14em; }
.receipt .r-contact { text-align: center; font-size: 13px; font-weight: 700; }
/* 补打标注：提示这是事后补打的凭证 */
.receipt .r-reprint { text-align: center; font-size: 13px; font-weight: 900; letter-spacing: .3em;
  border: 1px solid #000; padding: 1px 0; margin: 4px auto 0; width: 62%; }
/* 退款作废标注：最醒目，防止已退款凭证被当作有效收款凭据 */
.receipt .r-void { text-align: center; font-size: var(--rc-total, 20px); font-weight: 900; letter-spacing: .1em;
  border: 3px solid #000; padding: 4px 2px; margin: 5px 0; }
.receipt .r-line { border-top: 2px solid #000; margin: 7px 0; }
.receipt .r-line.thin { border-top-width: 1px; }
.receipt .r-row { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; }
.receipt .r-row > span:first-child { flex: 0 0 auto; font-weight: 700; }
.receipt .r-row > span:last-child { text-align: right; word-break: break-all; font-weight: 700; }
.receipt .r-row.b > span:last-child { font-weight: 900; }
/* 打印时间：定长单行，避免在数字中间断行 */
.receipt .r-row.r-time > span:last-child { font-size: 12px; white-space: nowrap; letter-spacing: 0; }
.receipt .r-total { font-size: var(--rc-total, 20px); font-weight: 900; padding: 5px 0; margin: 3px 0;
  border-top: 2px solid #000; border-bottom: 2px solid #000; }
.receipt .r-note { text-align: center; font-size: 13px; font-weight: 700; }
.receipt .r-foot { text-align: center; font-size: 13px; font-weight: 700; margin-top: 9px; letter-spacing: .04em; }

/* ---------- 小票样式调整面板（系统管理，带实时预览） ---------- */
.rc-wrap { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.rc-preview { flex: 0 0 auto; background: #eef1f6; padding: 10px; border: 1px solid var(--line); border-radius: 6px; }
.rc-preview .receipt { box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.rc-fields { flex: 1 1 280px; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.rc-fields label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.rc-fields input, .rc-fields select { width: 100%; box-sizing: border-box; }

/* ---------- Toast ---------- */
.toast { position: fixed; top: 62px; left: 50%; transform: translateX(-50%); background: #17325c; color: #fff;
  padding: 10px 22px; border-radius: 8px; z-index: 200; box-shadow: 0 6px 20px rgba(0,0,0,.25); font-size: 14px; }
.toast.ok { background: var(--green); }
.toast.bad { background: var(--red); }

/* ---------- 本地识别引擎状态 ---------- */
.ocr-local-status { margin: 10px 0 0; padding: 10px 12px; background: #f7f9fc; border: 1px solid var(--line);
  border-radius: 8px; font-size: 13px; color: var(--txt); }
.ocr-local-status ul { line-height: 1.7; }
.ocr-local-status .ok { color: var(--green); font-weight: 600; }
.ocr-local-status .bad { color: var(--red); font-weight: 600; }
.ocr-local-status .muted { color: var(--muted); }
.ocr-local-status .small { font-size: 12px; }

/* ---------- 打印：只输出小票 ---------- */
@media print {
  body > *:not(#printArea) { display: none !important; }
  #printArea { position: static !important; left: 0 !important; }
  /* 外框 = 一张纸：宽度等于纸宽，padding 等于页边距（mm，由 JS 写入） */
  #printArea .rc-outer { box-sizing: border-box; overflow: hidden; }
  /* 小票铺满可打印区（宽度由 JS 按“纸宽-左-右”写成 mm，负边距时可超宽，超出部分被纸边裁掉） */
  #printArea .receipt { display: block !important;
    background: #fff !important; color: #000 !important;
    font-weight: var(--rc-weight, 700) !important;
    print-color-adjust: exact !important; -webkit-print-color-adjust: exact !important; }
  #printArea .receipt * { color: #000 !important; text-shadow: none !important; }
  /* 热敏打印加一点伪加粗，笔画更实 */
  #printArea .receipt .r-title, #printArea .receipt .r-total {
    font-weight: 900 !important; -webkit-text-stroke: .2px #000; }
  /* @page 的 size 由 JS 按实测内容高度注入（宽×实际纸长），这里只兜底清零边距 */
  @page { margin: 0; }
}

/* ---------- 打印预览弹窗（屏幕内预览 + 边距调节 + 选打印机） ---------- */
.rcpv-overlay { position: fixed; inset: 0; background: rgba(15,25,45,.55); display: flex; align-items: center; justify-content: center;
  z-index: 300; padding: 20px; }
.rcpv-overlay.hidden { display: none; }
.rcpv-box { background: #fff; border-radius: 12px; width: min(820px, 96vw); max-height: 92vh; display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.35); overflow: hidden; }
.rcpv-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px;
  border-bottom: 1px solid var(--line); font-weight: 700; font-size: 16px; }
.rcpv-head .x { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--muted); line-height: 1; }
.rcpv-body { display: flex; gap: 18px; padding: 18px; overflow: auto; flex-wrap: wrap; align-items: stretch; }
/* 纸张区：灰色台面，里面按 1:1 物理尺寸放白纸（宽=纸宽，padding=页边距） */
.rcpv-paper { flex: 1 1 300px; background: #dfe4ec; border-radius: 8px; padding: 18px; min-height: 240px; max-height: 62vh;
  overflow: auto; display: flex; justify-content: center; align-items: flex-start; }
.rcpv-stage { position: relative; flex: 0 0 auto; }
/* 白纸本体：真实 mm 宽，内边距就是打印页边距；内部 .receipt 占满可打印区，与真实打印同一套样式。
   overflow:hidden：负边距让内容超出纸边时按纸裁掉，预览与打印表现一致 */
.rcpv-sheet { position: absolute; top: 0; left: 0; box-sizing: border-box; background: #fff; overflow: hidden;
  box-shadow: 0 3px 14px rgba(0,0,0,.22); transform-origin: top left; transition: padding .06s linear; }
.rcpv-sheet .receipt { width: 100%; box-shadow: none; }
.rcpv-controls { flex: 0 1 300px; min-width: 260px; display: flex; flex-direction: column; gap: 14px; }
.rcpv-row { display: flex; gap: 10px; flex-wrap: wrap; }
.rcpv-row label { flex: 1 1 120px; font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.rcpv-row input, .rcpv-row select { width: 100%; box-sizing: border-box; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; }
.rcpv-dim { font-size: 12px; color: var(--txt); background: #f4f7fb; border: 1px solid var(--line);
  border-radius: 6px; padding: 8px 10px; line-height: 1.5; }
.rcpv-hint { font-size: 12px; color: var(--muted); line-height: 1.6; }
.rcpv-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: auto; }
.rcpv-actions .btn { padding: 9px 18px; border-radius: 8px; border: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.rcpv-actions .ghost { background: #fff; }
.rcpv-actions .primary { background: #17325c; color: #fff; border-color: transparent; }

/* ===== 会员详情独立页（资料编辑 / 分成规则 / 账单）共用页头与标签页 ===== */
.mem-head { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px 0; margin-bottom: 14px; }
.mem-head-main { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 10px; }
.mem-head-main .spacer { flex: 1; }
.mem-title { font-size: 17px; font-weight: 700; display: flex; align-items: baseline; gap: 8px; }
.mem-title .muted { font-weight: 400; }
.mem-tabs { display: flex; gap: 4px; border-top: 1px solid var(--line); margin: 0 -16px; padding: 0 16px; }
.mem-tab { border: none; background: none; padding: 10px 16px; font-size: 14px; color: var(--muted); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.mem-tab:hover { color: var(--blue); }
.mem-tab.active { color: var(--blue); font-weight: 600; border-bottom-color: var(--blue); }
.mem-bills-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.mem-bills-sum .card { background: #f7f9fc; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.mem-bills-sum .card .k { font-size: 12px; color: var(--muted); }
.mem-bills-sum .card .v { font-size: 17px; font-weight: 700; margin-top: 2px; }

/* 会员账单页：筛选栏与筛选结果总计 */
.mem-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; margin-bottom: 12px;
  padding: 10px 12px; background: #f7f9fc; border: 1px solid var(--line); border-radius: 10px; }
.mem-filter label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.mem-filter input, .mem-filter select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px;
  font-size: 13px; background: #fff; min-width: 142px; color: var(--txt); }
.mem-filter input:focus, .mem-filter select:focus { outline: 2px solid #bcd4fb; border-color: var(--blue); }
.mem-total { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; background: #f7f9fc; padding: 10px 12px; }
.mem-total-main { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 13px; }
.mem-total-main b { font-size: 14px; }
.mem-total-types { margin-top: 6px; font-size: 12px; color: var(--muted); line-height: 1.8; border-top: 1px dashed var(--line); padding-top: 6px; }

/* ===== 车辆分类（客车/货车/摩托车）与价格分档 ===== */
.cat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 10px 0; }
.cat-chip { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #f7f9fc; }
.cat-chip-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 14px; }
.cat-chip-top b { font-size: 15px; }
.cat-chip-rule { font-size: 12px; margin-top: 4px; line-height: 1.5; }
.rule-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; font-size: 13px; }
.rule-bar label { color: var(--muted); font-size: 13px; }
.rule-bar input, .rule-bar select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; background: #fff; color: var(--txt); }
.cat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.cat-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fff; }
.cat-card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.cat-card-top b { font-size: 15px; }
.cat-rule { font-size: 12px; color: var(--muted); margin: 6px 0 8px; line-height: 1.6; }
.cat-types { display: flex; flex-wrap: wrap; gap: 6px; min-height: 26px; }
.cat-types .chip { border: 1px solid #cfdcf3; background: #f2f6fd; color: #24467c; border-radius: 12px;
  padding: 2px 10px; font-size: 12px; cursor: pointer; }
.cat-types .chip:hover { background: #e3ecfd; border-color: var(--blue); }
.cat-ops { display: flex; gap: 8px; margin-top: 10px; }
.cat-hint { font-size: 12px; color: var(--muted); background: #f7f9fc; border: 1px dashed var(--line);
  border-radius: 8px; padding: 6px 10px; line-height: 1.7; }
.cat-hint .tag { margin: 0 2px; }

/* ---------- 价目总表（按大类分类汇总，只读） ---------- */
.price-sum-head { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.price-sum-head .ps-card { flex: 1 1 150px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #f7f9fc; display: flex; flex-direction: column; gap: 2px; }
.price-sum-head .ps-card b { font-size: 12px; color: var(--muted); font-weight: 600; }
.price-sum-head .ps-card i { font-style: normal; font-size: 18px; font-weight: 800; }
.price-sum-cat { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; overflow: hidden; }
.ps-cat-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 10px 12px; background: #f7f9fc; border-bottom: 1px solid var(--line); }
.ps-cat-title b { font-size: 15px; }
.ps-cat-prices { font-size: 12px; color: var(--muted); }
.ps-table { width: 100%; border-collapse: collapse; }
.ps-table th, .ps-table td { padding: 6px 10px; border-bottom: 1px solid #eef1f6; text-align: left; font-size: 13px; }
.ps-table thead th { background: #fbfcfe; color: var(--muted); font-weight: 600; }
.ps-table tfoot td { background: #f7f9fc; font-weight: 700; border-top: 2px solid var(--line); border-bottom: none; }

/* ---------- 录单预警框（左下角醒目，点确认后才能继续） ---------- */
.oa-shade { position: fixed; inset: 0; background: rgba(20, 15, 5, .45); z-index: 2000; }
.oa-box { position: fixed; left: 20px; bottom: 24px; width: 420px; max-width: calc(100vw - 40px);
  background: #fff; border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.35), 0 0 0 3px #ff7a00;
  z-index: 2001; overflow: hidden; animation: oa-pop .28s ease-out; }
@keyframes oa-pop { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.oa-title { background: linear-gradient(90deg, #ff7a00, #ff9a3c); color: #fff; font-size: 16px; font-weight: 900;
  padding: 10px 16px; letter-spacing: 1px; }
.oa-msg { padding: 16px; font-size: 15px; line-height: 1.9; color: #3a2a10; white-space: pre-wrap;
  background: #fffdf5; max-height: 46vh; overflow: auto; }
.oa-foot { display: flex; justify-content: flex-end; padding: 12px 16px; background: #fbf7ef; }
.oa-foot .btn { min-width: 150px; }
/* 老旧车型预警：红边 + 红底强调，比固定文案更醒目 */
.oa-box.oa-danger { box-shadow: 0 12px 40px rgba(0,0,0,.35), 0 0 0 3px #e02020; }
.oa-box.oa-danger .oa-title { background: linear-gradient(90deg, #d4380d, #ff6a3c); }
.oa-msg.oa-old { color: #a8200a; font-weight: 600; background: #fff6f4; }
/* 通用错误/警示文本（此前仅在局部作用域定义，补为全局） */
.bad { color: var(--red); font-weight: 600; }

/* ===== 上门取车 · 地图选点：附近地点联想列表（按离设备由近及远） ===== */
.pm-search-row { gap: 6px; }
.pm-chips { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin: 6px 0 2px; }
.pm-chip { border: 1px solid #d5dbe6; background: #f6f8fc; color: #445; border-radius: 999px;
  padding: 2px 11px; font-size: 12px; cursor: pointer; line-height: 20px; }
.pm-chip:hover { border-color: #2f6bff; color: #2f6bff; }
.pm-chip.on { background: #2f6bff; border-color: #2f6bff; color: #fff; font-weight: 600; }
.pm-chip-info { font-size: 12px; color: #8a94a6; margin-left: 4px; }
.pm-list { max-height: 196px; overflow-y: auto; border: 1px solid #e3e8f0; border-radius: 8px;
  margin: 6px 0 8px; background: #fff; }
.pm-empty { padding: 14px; text-align: center; color: #8a94a6; font-size: 13px; }
.pm-empty .pm-st { font-size: 11px; color: #b3892f; }
.pm-item { display: flex; align-items: baseline; gap: 8px; padding: 7px 12px; cursor: pointer;
  border-bottom: 1px solid #f0f3f8; font-size: 13px; }
.pm-item:last-child { border-bottom: none; }
.pm-item:hover { background: #f3f7ff; }
.pm-item.on { background: #e8f0ff; box-shadow: inset 3px 0 0 #2f6bff; }
.pm-item .no { flex: none; width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 50%;
  background: #e6ebf5; color: #5a6a85; font-size: 11px; font-weight: 700; align-self: center; }
.pm-item.on .no { background: #2f6bff; color: #fff; }
.pm-item .nm { font-weight: 600; color: #233; flex: 0 1 auto; max-width: 44%; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.pm-item .ad { color: #8a94a6; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-item .dist { color: #2f6bff; font-size: 12px; flex: none; min-width: 44px; text-align: right; }
/* 地图上的搜索结果编号点：与列表序号一一对应，选中项高亮 */
.pm-pin { width: 22px; height: 22px; line-height: 22px; border-radius: 50%; text-align: center;
  background: #fff; color: #2f6bff; border: 2px solid #2f6bff; font-size: 12px; font-weight: 700;
  box-shadow: 0 1px 4px rgba(0,0,0,.3); cursor: pointer; }
.pm-pin.on { background: #2f6bff; color: #fff; border-color: #fff; }
