/* 机动车检测站验车 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: 12px; line-height: 1; 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: 14px; line-height: 1; 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; }

/* 二级项本身是页面、同时又挂着三级目录（服务通知 → 微信服务 → 服务模板）：
   左侧名字点击进页，右侧箭头只负责展开/收起三级目录，两者互不影响 */
.nav .nav-sub-split { display: flex; align-items: center; width: 100%; padding: 0; }
.nav .nav-sub-split .nav-sub-link,
.nav .nav-sub-split .nav-sub-label { flex: 1; min-width: 0; text-align: left; background: none; border: none;
  cursor: pointer; padding: 8px 0 8px 41px; font-size: 13px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav .nav-sub-split .nav-sub-label { cursor: default; }
.nav .nav-sub-split .nav-sub-link:hover,
.nav .nav-sub-split .nav-sub-link.active { color: var(--blue); }
.nav .nav-sub-split .nav-sub-link.active { font-weight: 600; }
.nav .nav-sub-split .nav-sub-toggle { flex: none; display: flex; align-items: center; justify-content: center;
  width: 34px; height: 32px; margin-right: 4px; padding: 0; background: #f3f6fc; border: none; border-radius: 8px;
  cursor: pointer; color: #6b7a90; }
.nav .nav-sub-split .nav-sub-toggle:hover { color: var(--blue); background: #e6eefc; }
.nav .nav-subgrp.open .nav-sub-split .nav-sub-toggle { color: var(--blue); background: #eaf1fe; }
.nav .nav-sub-split .nav-sub-toggle .nav-arrow { margin-left: 0; font-size: 16px; line-height: 1; }

/* ---------- 权限勾选树：嵌套子目录缩进 ---------- */
.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); }

/* ---------- 收费报表：数据卡 + 点开明细 ---------- */
/* 卡片上直接给数字，点卡片在下方展开明细面板；卡片用 button 保证键盘可达 */
.cgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(214px, 1fr)); gap: 14px; margin-bottom: 16px; }
.ccard {
  position: relative; text-align: left; font: inherit; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 15px 18px 13px;
  transition: box-shadow .15s ease, transform .12s ease, border-color .15s ease;
}
.ccard:hover { border-color: #b9cdf0; box-shadow: 0 6px 20px rgba(22,104,220,.10); transform: translateY(-1px); }
.ccard:active { transform: translateY(0); }
.ccard.on { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22,104,220,.12); }
.ccard-h { display: flex; align-items: center; justify-content: space-between; }
.ccard-t { font-size: 13px; color: var(--muted); }
.ccard-go { color: #c2ccdd; font-size: 19px; line-height: 1; transition: color .15s; }
.ccard:hover .ccard-go, .ccard.on .ccard-go { color: var(--blue); }
.ccard-v { font-size: 25px; font-weight: 800; letter-spacing: -.5px; margin: 7px 0 3px; color: var(--txt); }
.ccard-s { font-size: 12px; color: var(--muted); }
.ccard-sub { font-size: 11px; color: #a9b4c6; margin-top: 9px; padding-top: 8px; border-top: 1px dashed var(--line); }
/* 只读指标卡（会员报表里不可点开的那几张）：与可点开的卡同排同高，但不给悬浮/按下反馈 */
.ccard.static { cursor: default; }
.ccard.static:hover { transform: none; box-shadow: none; border-color: var(--line); }
.ccard.static .ccard-v { font-size: 21px; }

.cpanel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 16px; overflow: hidden; }
.cpanel-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 13px 18px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #f8faff, #fff); }
.cpanel-tt h3 { font-size: 16px; margin: 0 0 3px; }
.cpanel-tt p { margin: 0; line-height: 1.55; }
.cpanel-x { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 5px 12px;
  cursor: pointer; color: var(--muted); font-size: 13px; white-space: nowrap; }
.cpanel-x:hover { border-color: var(--blue); color: var(--blue); }
.cpanel-b { padding: 16px 18px 6px; }
.cpanel-loading { padding: 46px; text-align: center; color: var(--muted); }
.cpanel-b td.money { text-align: right; font-variant-numeric: tabular-nums; }
.cpanel-b td.money.danger { color: #d03050; font-weight: 700; }
.cpanel-b tr.tfoot td { background: #f7f9fc; font-weight: 700; }
.cpanel-b tr.voided td { color: #9aa5b8; }
.iv-tip { padding: 6px 4px; font-size: 13px; color: #48566d; line-height: 2; }

/* 面板内的小指标条：比首屏卡片紧凑，一屏能多放几项 */
.mini-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(152px, 1fr)); gap: 10px; margin-bottom: 16px; }
.mc { border: 1px solid var(--line); border-radius: 10px; padding: 10px 13px; background: #fbfcfe; }
.mc.main { background: linear-gradient(135deg, #eef4ff, #f8fbff); border-color: #cfe0ff; }
.mc-k { font-size: 12px; color: var(--muted); }
.mc-v { font-size: 19px; font-weight: 800; margin-top: 3px; }
.mc.main .mc-v { color: var(--blue-d); font-size: 22px; }

/* ---------- 图表（chart.js 手写 SVG） ---------- */
.chart-box { position: relative; min-height: 200px; padding-top: 4px; }
.mch-svg { display: block; width: 100%; overflow: visible; }
.mch-empty { padding: 58px 0; text-align: center; color: var(--muted); font-size: 13px; }
.mch-tip { position: absolute; pointer-events: none; opacity: 0; transition: opacity .1s;
  background: rgba(22, 40, 70, .93); color: #fff; padding: 6px 10px; border-radius: 8px;
  font-size: 12px; line-height: 1.5; white-space: nowrap; z-index: 5; }
.mch-tip b { display: block; font-weight: 600; opacity: .82; }
.mch-donut { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.mch-lg { flex: 1; min-width: 150px; display: flex; flex-direction: column; gap: 6px; }
.mch-lg-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.mch-lg-row i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.mch-lg-n { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mch-lg-row b { font-weight: 600; font-variant-numeric: tabular-nums; }
.mch-lg-row em { color: var(--muted); font-style: normal; width: 46px; text-align: right; }

/* ---------- 表格 ---------- */
.tbl-wrap { overflow-x: auto; scrollbar-width: none; }   /* Firefox 隐藏原生横向滚动条 */
.tbl-wrap::-webkit-scrollbar { height: 0; }                /* WebKit 隐藏原生横向滚动条（改用下方常驻滑块） */
/* 原先这里带 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; }
/* 全站内容允许选中复制：业务上大量需要把单号、车牌、金额抄到别处。
   默认值本就是 text，这里显式声明并带 -webkit 前缀，作为「不得禁选中」的约定点。 */
body, td, th, li, p, span, h1, h2, h3, h4, .card, .panel {
  -webkit-user-select: text; user-select: text; }
/* 历史订单·备注列：表格单元格默认 nowrap，备注可能是一整句话，
   不限宽会把列撑爆、把后面的计账/状态/操作挤出可视区。
   这里定宽并允许换行，超长折叠成 3 行，完整内容靠悬浮 title 看。 */
.q-remark { white-space: normal; max-width: 220px; min-width: 90px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  word-break: break-all; }
.q-remark:hover { -webkit-line-clamp: unset; overflow: visible; }

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; }
.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 { display: flex; align-items: center; justify-content: center; gap: 2mm; 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; }
/* 附加费章图标：只有带附加费的单才盖（由 receiptHtml 决定是否输出 .r-stamp）。
   章内联在抬头文字（验车消费凭证）右侧，与文字同行且不重叠，因此可以全不透明（默认 100%）；
   大小/不透明度/偏移在 系统管理→小票样式 面板里调（--rc-stamp-* 由 applyReceiptStyle 写入）。
   transform 平移不参与布局：怎么偏移都不会把抬头文字挤变形。 */
.receipt .r-stamp {
  flex: 0 0 auto; display: inline-block;
  width: var(--rc-stamp-size, 18mm);
  transform: translate(var(--rc-stamp-dx, 0mm), var(--rc-stamp-dy, 0mm)) rotate(-9deg);
  opacity: var(--rc-stamp-opacity, 1);
  pointer-events: none; user-select: none;
}
.receipt .r-stamp img { display: block; width: 100%; height: auto; }

/* ---------- 小票样式调整面板（系统管理，带实时预览） ---------- */
.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;
  /* 微信/阿里云/OCR 的报错是长英文，不限宽会撑到屏幕外，看起来就像「红框里没有字」 */
  max-width: min(78vw, 720px); line-height: 1.5; text-align: center; white-space: pre-wrap; word-break: break-word; }
.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; }

/* ---------- 页内子页签（服务模板：通知模板 / 自动回复 / 小应用） ---------- */
.subtabs { display: flex; gap: 4px; margin: 0 0 12px; border-bottom: 1px solid var(--line); }
.subtab { background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer;
  padding: 8px 14px; font-size: 14px; color: var(--muted); }
.subtab:hover { color: var(--blue); }
.subtab.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }

/* ---------- 打印：只输出小票 ---------- */
@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; }


/* ============ 设备档案：冻结列 ============
   .tbl-wrap 是横向滚动容器（overflow-x:auto），冻结列靠 position:sticky + left 偏移实现。
   必须自带不透明背景：否则右侧滚动的内容会从格子底下透出来。
   表头单元格 z 值更高，保证横向+纵向同时滚动时表头压住数据格。 */
table.fz { border-collapse: separate; border-spacing: 0; }
table.fz td, table.fz th { background: #fff; }
table.fz th { background: #f7f9fc; }
/* 冻结列必须【定宽】：th/td 是 white-space:nowrap，长单位名/设备名会把列撑得比 min-width 宽，
   而后面几列的 left 是按固定像素累加的（34 → 164 → 314），实际列宽一变偏移就对不上，
   横向滚动时冻结列之间会重叠或露缝。故 width / min-width / max-width 三者取同值，
   超出部分用省略号收掉，完整内容由 title 悬浮显示（见 app.js 的 tdTitle）。 */
.fz0 { position: sticky; left: 0; width: 34px; min-width: 34px; max-width: 34px; }
.fz1 { position: sticky; left: 34px; width: 130px; min-width: 130px; max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
.fz2 { position: sticky; left: 164px; width: 150px; min-width: 150px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
/* fz3 是最后一个左冻结列，后面没有依赖它宽度的偏移，故只给下限、留一点余量给标签 */
.fz3 { position: sticky; left: 314px; width: 112px; min-width: 112px; }
/* 冻结列右边界：不画边框的话滚动时看不出哪里是固定区 */
.fz3, .fzr { box-shadow: 3px 0 5px -3px rgba(15, 34, 67, .22); }
.fzr { position: sticky; right: 0; min-width: 190px; }
table.fz th.fz0, table.fz th.fz1, table.fz th.fz2, table.fz th.fz3, table.fz th.fzr { z-index: 4; }
table.fz td.fz0, table.fz td.fz1, table.fz td.fz2, table.fz td.fz3, table.fz td.fzr { z-index: 2; }
/* 行底色：超期红、临近橙。冻结列自带白底会盖住行色，故按状态单独补背景 */
.dv-row.dv-over td { background: #fdf3f3; }
.dv-row.dv-soon td { background: #fff8ec; }
.dv-row:hover td { background: #f2f7ff; }
.sortable { cursor: pointer; }   /* 可排序表头也允许选中复制列名；点一下即排序，拖选不受影响 */
.sortable:hover { color: var(--blue); }

/* ============ 设备档案：表单控件 ============ */
.dev-grp { grid-column: 1 / -1; margin: 14px 0 6px; padding-bottom: 4px; border-bottom: 1px solid var(--line); font-weight: 700; color: var(--txt); font-size: 13px; }
.dev-grp:first-child { margin-top: 0; }
.grid2.dev-grp-body { margin-bottom: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chips .chip { border: 1px solid #cfdcf3; background: #f2f6fd; color: #24467c; border-radius: 12px; padding: 2px 10px; font-size: 12px; cursor: pointer; }
.chips .chip.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.rad { display: inline-flex; align-items: center; gap: 4px; margin-right: 14px; font-size: 13px; color: var(--txt); font-weight: 400; }
.supwrap { display: block; }
.suptools { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.suptools .muted { font-size: 12px; }
.dev-files { margin: 8px 0; padding-left: 20px; }
.dev-files li { margin-bottom: 6px; }
.dev-files a { color: var(--blue); }

/* ================= 首页看板改版 ================= */
/* 顶部四卡片：图标色带 + 单位小字 */
.dash-top { grid-template-columns: repeat(4, 1fr); }
.dash-k { position: relative; overflow: hidden; }
.dash-k::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--blue); }
.dash-k .v { display: flex; align-items: baseline; gap: 4px; }
.dash-k .v i { font-style: normal; font-size: 13px; color: var(--muted); font-weight: 400; }
.dash-k .v.warn { color: var(--red); }
@media (max-width: 900px) { .dash-top { grid-template-columns: repeat(2, 1fr); } }

/* 中部左右分栏：左趋势(2份) + 右侧(1份) */
.dash-mid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1080px) { .dash-mid { grid-template-columns: 1fr; } }
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.dash-head h3 { margin: 0; }
.dash-side { display: flex; flex-direction: column; gap: 16px; }
.dash-todo, .dash-policy { margin-bottom: 0; }
.dash-chart { overflow-x: auto; scrollbar-width: thin; }
.dash-legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin: 2px 0 6px; }
.lg { display: inline-flex; align-items: center; gap: 5px; }
.lg::before { content: ""; width: 14px; height: 3px; border-radius: 2px; }
.lg-order::before { background: var(--blue); }
.lg-amount::before { background: var(--green); }

/* 折线图 SVG */
.dash-svg { display: block; width: 100%; height: auto; min-width: 560px; }
.dash-svg .grid { stroke: var(--line); stroke-width: 1; }
.dash-svg .axl { fill: var(--muted); font-size: 11px; }
.dash-svg .axr { fill: var(--green); font-size: 11px; }
.dash-svg .xl { fill: var(--muted); font-size: 11px; }
.dash-svg .vl { fill: var(--blue); font-size: 11px; font-weight: 700; }
.dash-svg .area { fill: rgba(22, 104, 220, .08); }
.dash-svg .ln-order { fill: none; stroke: var(--blue); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.dash-svg .ln-amount { fill: none; stroke: var(--green); stroke-width: 2; stroke-dasharray: 5 4; stroke-linejoin: round; }
.dash-svg .dot-o { fill: #fff; stroke: var(--blue); stroke-width: 2; }
.dash-svg .dot-a { fill: #fff; stroke: var(--green); stroke-width: 2; }
.dash-svg .pt:hover circle { r: 5; }
.dash-svg .empty { fill: var(--muted); font-size: 14px; }

/* 车辆状态三方块：立体、圆角、按状态着色 */
.vstat { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 14px; align-items: stretch; margin-bottom: 16px; }
@media (max-width: 900px) { .vstat { grid-template-columns: 1fr 1fr; } }
.vs { border-radius: 16px; padding: 16px 18px; color: #fff; position: relative;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .14), inset 0 1px 0 rgba(255, 255, 255, .35); }
.vs::after { content: ""; position: absolute; inset: 0; border-radius: 16px; background: linear-gradient(180deg, rgba(255, 255, 255, .22), transparent 55%); pointer-events: none; }
.vs-overdue { background: linear-gradient(135deg, #f43f5e, #dc2626); }
.vs-soon { background: linear-gradient(135deg, #fb923c, #ea580c); }
.vs-normal { background: linear-gradient(135deg, #22c55e, #16a34a); }
.vs-n { font-size: 34px; font-weight: 800; line-height: 1.1; }
.vs-l { font-size: 15px; font-weight: 700; margin-top: 2px; }
.vs-t { font-size: 12px; opacity: .9; margin-top: 2px; }
.vs-note { align-self: center; font-size: 12px; color: var(--muted); max-width: 140px; }

/* 三个环形占比 */
.pie-wrap { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.pie-chart { width: 160px; height: 160px; flex: none; }
.pie-svg { width: 100%; height: 100%; }
.pie-sum { fill: var(--txt); font-size: 18px; font-weight: 800; }
.pie-unit { fill: var(--muted); font-size: 11px; }
.pie-empty { display: flex; align-items: center; justify-content: center; width: 160px; height: 160px; color: var(--muted); background: var(--bg); border-radius: 50%; }
.pie-legend { flex: 1; min-width: 220px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
@media (max-width: 700px) { .pie-legend { grid-template-columns: 1fr; } }
.pl-item { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.pl-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.pl-nm { flex: 1; color: var(--txt); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-v { color: var(--muted); font-variant-numeric: tabular-nums; }
.pl-p { color: var(--txt); font-weight: 700; width: 52px; text-align: right; font-variant-numeric: tabular-nums; }

/* 其它指标（旧卡片） */
.dash-cards { margin-bottom: 16px; }

/* 待办 + 我的备忘 */
.memo-block { border-bottom: 1px dashed var(--line); padding-bottom: 8px; margin-bottom: 8px; }
.memo-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.todo-list, .memo-list { display: flex; flex-direction: column; gap: 4px; }
.tm { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; text-decoration: none; color: var(--txt); }
a.tm:hover { background: var(--bg); }
.tm-b { width: 18px; height: 18px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 800; background: var(--red); }
.tm-b.orange { background: #ea580c; }
.tm-b.mem { background: var(--blue); }
.tm-t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-n { color: var(--red); font-weight: 800; font-variant-numeric: tabular-nums; }
.tm-none { font-size: 12px; color: var(--muted); padding: 4px 8px; }
/* 备忘内容：红字、放大、加粗 */
.tm-memo .tm-t { color: #dc2626; font-weight: 700; font-size: 15px; }

/* 政策更新 */
.policy-list { display: flex; flex-direction: column; gap: 10px; }
.po { border-left: 3px solid var(--blue); padding-left: 10px; }
.po-t { font-weight: 700; font-size: 14px; }
.po-b { font-size: 13px; color: var(--txt); margin-top: 2px; }
.po-m { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* 我的备忘（员工服务整页） */
.memo-page { display: flex; flex-direction: column; gap: 8px; }
.mp { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.mp.done { opacity: .6; }
.mp.done .mp-tx { text-decoration: line-through; color: var(--muted); }
/* 备忘正文红字放大加粗 */
.mp-tx { flex: 1; color: #dc2626; font-weight: 700; font-size: 16px; word-break: break-word; }
.mp-chk { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 14px; flex: none; }
.mp-m { font-size: 12px; color: var(--muted); flex: none; }
/* ============ 附加品（订单录入选择区 / 管理页）============ */
.addon-pick { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
/* 原因输入框 + 附加品下拉 + 添加按钮 同一行，三者共享这一栏宽度 */
.addon-pick .addon-reason { flex: 1; min-width: 0; }
.addon-pick select { flex: 0 0 148px; min-width: 0; height: 34px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 14px; }
.addon-pick .btn.tiny { flex: none; height: 34px; }
.addon-list { display: flex; flex-wrap: wrap; gap: 6px; }
/* 每选一项一个可点删的标签：× 删除即把该笔金额从附加费里减回去 */
.ad-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px;
  background: #eef4ff; border: 1px solid #cfe0ff; border-radius: 14px; font-size: 13px; }
.ad-chip b { color: var(--blue); font-weight: 700; }
.ad-x { width: 18px; height: 18px; line-height: 16px; padding: 0; border: none; border-radius: 50%;
  background: #d6e4ff; color: #33507a; cursor: pointer; font-size: 13px; }
.ad-x:hover { background: var(--red); color: #fff; }

/* ============ 异常车辆汇总（员工反馈信息流，类论坛） ============ */
/* 首页第 4 张卡片可点击进入：整卡手型 + 悬停描边，明细里再加一行本月报备数 */
.dash-k.dash-link { cursor: pointer; transition: box-shadow .15s, border-color .15s; }
.dash-k.dash-link:hover { border-color: var(--blue); box-shadow: 0 4px 14px rgba(22,104,220,.14); }
.dash-k .dash-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.issue-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.issue-item { border: 1px solid var(--line); border-left: 4px solid #e8590c; border-radius: 10px; padding: 12px 14px; background: #fff; }
.issue-item.done { border-left-color: #adb5bd; background: #fbfcfd; }
.issue-hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.issue-plate { font-size: 15px; letter-spacing: .5px; }
.issue-hd .rt { margin-left: auto; }
.issue-body { margin: 8px 0 0; font-size: 14px; line-height: 1.75; word-break: break-word; }
.issue-imgs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.issue-imgs img { width: 108px; height: 108px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); cursor: zoom-in; }
.issue-ft { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.issue-ft .rt { margin-left: auto; display: flex; gap: 6px; }
/* 新增报备弹窗里的待提交缩略图（带移除按钮） */
.issue-thumb { position: relative; display: inline-block; }
.issue-thumb img { width: 88px; height: 88px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.issue-thumb button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; line-height: 18px;
  border: none; border-radius: 50%; background: rgba(0,0,0,.62); color: #fff; cursor: pointer; font-size: 12px; padding: 0; }
.issue-thumb button:hover { background: var(--red); }
.issue-owner { margin-top: 8px; font-size: 13px; color: #2c3850; background: #f6f8fb; border-radius: 6px; padding: 6px 10px; }

/* ============ 服务接口 · 内网穿透（svcApi 页） ============ */
.tun-log { max-height: 320px; overflow: auto; background: #f7f7f5; border: 1px solid #e5e5e0; border-radius: 6px; padding: 10px 12px; font-size: 12px; line-height: 1.55; white-space: pre-wrap; word-break: break-all; margin: 0; }
.tun-log .lg-err { color: #c0392b; }
.tun-log .lg-sys { color: #2e7d32; }
.tun-log .lg-t { color: #999; }
.tun-help ol { padding-left: 20px; margin: 6px 0; }
.tun-help li { margin: 8px 0; line-height: 1.65; }
.tun-help pre { background: #f7f7f5; border: 1px solid #e5e5e0; border-radius: 6px; padding: 10px 12px; font-size: 12px; overflow: auto; white-space: pre; margin: 6px 0; }
.tun-help code { background: #f2f2ef; padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.tun-cmd { user-select: all; }
.tun-ok { color: #2e7d32; }
.tun-bad { color: #c0392b; }
