/* AI 汽修接车助手 · 移动端优先样式（§39 少表格、多大按钮、少输入） */
:root {
  --brand: #1677ff;
  --brand-dk: #0958d9;
  --brand-bg: #e8f2ff;
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #1f2329;
  --text2: #646a73;
  --text3: #8f959e;
  --line: #e5e6eb;
  --line2: #f0f1f3;
  --ok: #00a854;
  --ok-bg: #e8f8ef;
  --warn: #e8730c;
  --warn-bg: #fff5e6;
  --danger: #e34d59;
  --danger-bg: #fdecee;
  --ai: #7d3cf8;
  --ai-bg: #f4edff;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(20, 30, 50, .06), 0 6px 18px rgba(20, 30, 50, .05);
  --safe-b: env(safe-area-inset-bottom, 0px);
  /* 底部 tabbar 的高度（内容区，不含安全区）。定死它，是因为
     「底部操作条 + tabbar 同页」要把操作条抬到 tabbar 之上 —— 见 .actionbar.above-tab。
     不写死就得靠猜高度，换个字号就会露出 1~2px 的缝或者压住半个按钮。 */
  --tabh: 56px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
        "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body { max-width: 520px; margin: 0 auto; min-height: 100vh; position: relative; }

/* ---------------------------------------------------------------- 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 12px;
  background: var(--brand); color: #fff;
  box-shadow: 0 2px 8px rgba(22, 119, 255, .22);
}
.topbar .tb-back {
  width: 32px; height: 32px; border: 0; border-radius: 8px;
  background: rgba(255, 255, 255, .18); color: #fff;
  font-size: 18px; line-height: 1; cursor: pointer; flex: 0 0 auto;
}
.topbar .tb-title { font-size: 16.5px; font-weight: 600; flex: 1 1 auto; }
.topbar .tb-right {
  font-size: 12.5px; padding: 5px 10px; border-radius: 20px;
  background: rgba(255, 255, 255, .18); cursor: pointer; border: 0; color: #fff;
}

/* ---------------------------------------------------------------- 布局 */
.page { padding: 12px 12px calc(78px + var(--safe-b)); }
.page.flush { padding: 0 0 calc(78px + var(--safe-b)); }

.card {
  background: var(--card); border-radius: var(--radius);
  padding: 14px; margin-bottom: 10px; box-shadow: var(--shadow);
}
.card.tight { padding: 10px 12px; }
/* 一行放两个输入框（联系人 / 电话、试用期 / 席位这类） */
.row2 { display: flex; gap: 10px; }
.row2 > * { flex: 1 1 0; min-width: 0; }
.card-h {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin: -2px 0 10px;
}
.card-h h3 {
  margin: 0; font-size: 14.5px; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}
.card-h .sub { font-size: 12px; color: var(--text3); font-weight: 400; }
/* 卡片头里的次级动作（口径说明之类的文字链接）。
   视觉上是行内链接、不撑高卡片头；但**点击区域撑到 44px** ——
   上半/下半各 12px 用负外边距抵消掉，布局高度仍然只有 20px。
   手机的触控目标要求 ≥44px，靠"字号调大"去满足会把卡片头撑丑，
   靠"缩到 26px"又违背验收项，只有这个办法两头都占。 */
.card-h .g-link {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 12px 8px; margin: -12px 0; flex: 0 0 auto;
}

.sec-title {
  margin: 16px 2px 8px; font-size: 12.5px; font-weight: 600;
  color: var(--text2); letter-spacing: .3px;
}

.muted { color: var(--text2); }
.tiny { font-size: 12px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.grow { flex: 1 1 auto; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt4 { margin-top: 4px; }
.hide { display: none !important; }

/* ---------------------------------------------------------------- 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 16px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--text); font-size: 15px; font-weight: 500;
  cursor: pointer; font-family: inherit; transition: opacity .15s, background .15s;
}
.btn:active { opacity: .72; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:active { background: var(--brand-dk); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ghost { background: var(--brand-bg); border-color: transparent; color: var(--brand-dk); }
.btn-danger { background: #fff; border-color: #f6c6cb; color: var(--danger); }
.btn-block { display: flex; width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 15px 18px; font-size: 16.5px; border-radius: 12px; font-weight: 600; }
/* 按钮里直接嵌的 SVG 图标必须给死尺寸。
   不给的话：SVG 带 viewBox 但没有 width/height → 浏览器按「宽度铺满容器」算，
   `.btn-block`（整行宽）里就变成 380×380 的巨幅黑色星星 / 巨幅二维码，
   一整张卡片被顶爆（2026-09-26 「看 AI 怎么说」和「查看一店一码」两个按钮上实测到）。
   用 `>` 只约束**直接子元素**，不碰 `.ai-ico svg` / `.lr-i svg` 这类带包裹层的既有写法；
   `.wash-acts .btn svg` 优先级更高，洗车页的 16px 不受影响。 */
.btn > svg, .btn-sm > svg, .btn-lg > svg {
  width: 17px; height: 17px; flex: 0 0 auto;
}
.btn-sm > svg { width: 15px; height: 15px; }

/* 首页最大入口（§四 M1：首页必须有一个最大的入口） */
.hero-btn {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 20px 18px; border: 0; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #1677ff, #3b96ff);
  color: #fff; cursor: pointer; text-align: left; font-family: inherit;
  box-shadow: 0 6px 20px rgba(22, 119, 255, .32);
}
.hero-btn:active { opacity: .88; }
.hero-btn .hb-ico { font-size: 34px; flex: 0 0 auto; }
.hero-btn .hb-t { font-size: 20px; font-weight: 700; letter-spacing: .5px; }
.hero-btn .hb-s { font-size: 12.5px; opacity: .9; margin-top: 3px; }
.hero-btn .hb-arrow { font-size: 22px; opacity: .85; }

/* ---------------------------------------------------------------- 表单 */
label.fld { display: block; margin-bottom: 11px; }
label.fld > .lb { display: block; font-size: 13px; color: var(--text2); margin-bottom: 5px; }
label.fld > .lb .req { color: var(--danger); margin-left: 2px; }
input[type=text], input[type=number], input[type=password], input[type=tel],
input[type=date], input[type=search], select, textarea {
  width: 100%; padding: 11px 12px; font-size: 15px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  color: var(--text); outline: none; transition: border-color .15s;
}

/* ------------------------------------------------- 日期输入（可手输） ----
   文本框手输 + 日历按钮（内嵌透明原生 date 控件）+ 快捷日。
   不再直接用 input[type=date]：它只认 YYYY-MM-DD，别的写法会**静默变空**。
   详见 app.js 的 dateField() 注释。 */
.dwrap { display: flex; gap: 8px; align-items: stretch; }
.dwrap .dinput { flex: 1 1 0; min-width: 0; width: auto; }
.dwrap .dcal {
  position: relative; flex: 0 0 auto; width: 46px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--text2);
  display: flex; align-items: center; justify-content: center;
}
.dwrap .dcal svg { width: 20px; height: 20px; pointer-events: none; }
/* 透明铺满：点这个按钮等于点系统日历，不依赖 showPicker()（老 WebView 没有） */
.dwrap .dcal .dnative {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; border: 0; padding: 0; margin: 0; background: transparent; cursor: pointer;
}
.dquick { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.dchip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 4px 12px; font-size: 12px; color: var(--text2);
  font-family: inherit; cursor: pointer; line-height: 1.5;
}
.dchip:active { background: var(--brand-bg); border-color: var(--brand); color: var(--brand); }
/* 认不出的日期写法标红，让门店当场看见，而不是保存后才发现丢了 */
.dinput.bad { border-color: var(--danger); background: var(--danger-bg); }
input:focus, select:focus, textarea:focus { border-color: var(--brand); }
textarea { resize: vertical; min-height: 78px; line-height: 1.5; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.grid2 > * { min-width: 0; }

.switch { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.switch button {
  padding: 7px 13px; font-size: 13px; border: 0; background: #fff;
  color: var(--text2); cursor: pointer; font-family: inherit;
}
.switch button.on { background: var(--brand); color: #fff; }

/* 三态点选（检查项结果） */
.seg { display: flex; gap: 5px; flex-wrap: wrap; }
.seg button {
  padding: 6px 11px; font-size: 12.5px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--text2);
  font-family: inherit; transition: all .12s;
}
.seg button.on { border-color: transparent; font-weight: 600; }
.seg button.on[data-v=normal] { background: var(--ok-bg); color: var(--ok); }
.seg button.on[data-v=attention] { background: var(--warn-bg); color: var(--warn); }
.seg button.on[data-v=need_repair] { background: var(--danger-bg); color: var(--danger); }
.seg button.on[data-v=skipped] { background: #f2f3f5; color: var(--text2); }

/* ---------------------------------------------------------------- 标签 */
.tag {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 7px; border-radius: 5px; font-size: 11.5px;
  background: #f2f3f5; color: var(--text2); white-space: nowrap;
}
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.danger { background: var(--danger-bg); color: var(--danger); }
.tag.brand { background: var(--brand-bg); color: var(--brand-dk); }
.tag.ai { background: var(--ai-bg); color: var(--ai); }
.tag.gray { background: #f2f3f5; color: var(--text3); }

/* ---------------------------------------------------------------- AI 区块 */
.ai-box {
  border: 1px solid #e2d5ff; background: var(--ai-bg);
  border-radius: var(--radius); padding: 13px; margin-bottom: 10px;
}
.ai-box .ai-h {
  display: flex; align-items: center; gap: 6px; margin-bottom: 8px;
  font-size: 13.5px; font-weight: 600; color: var(--ai);
}
.ai-box .ai-body { font-size: 14.5px; line-height: 1.7; color: #3b2a5c; white-space: pre-wrap; }
.ai-box .ai-foot {
  margin-top: 9px; padding-top: 8px; border-top: 1px dashed #ddccff;
  font-size: 11.5px; color: #7c6a9e;
}
.ai-hint {
  display: flex; gap: 6px; align-items: flex-start;
  background: #fffaf0; border: 1px solid #ffe4b8; border-radius: 9px;
  padding: 9px 11px; font-size: 12.5px; color: #946000; line-height: 1.5;
}
/* 假数据警告：Mock 识别结果、"这不是真的"这类必须比普通提示更扎眼 */
.ai-hint.warn {
  background: #fff1f0; border: 1px solid #ffccc7; color: #a8071a;
}
.ai-hint.warn b { color: #a8071a; }
/* 「已填入表单」这类**成功**提示。原来靠 ✅ 那个 Emoji 表达"这是好事"，
   换成 currentColor 的描边图标后颜色由容器决定 —— 不带 .ok 的话会跟警告一样是琥珀色，
   门店分不清"填进去了"和"只是提醒"。 */
.ai-hint.ok {
  background: var(--ok-bg); border: 1px solid #b7ebd0; color: #0A6B3D;
}
.ai-hint.ok b { color: #0A6B3D; }
/* 提示框/卡片里的图标尺寸。带 viewBox 的 SVG 不给宽高会按容器宽度铺开，
   弹窗、整行按钮里就成了巨幅图形（见 .btn > svg 那条注释）。 */
.ai-hint > span { flex: 0 0 auto; }
.ai-hint > span svg { width: 17px; height: 17px; display: block; }
.ai-box .ai-h svg { width: 18px; height: 18px; display: block; }
.add-photo .ap-ico svg { width: 17px; height: 17px; display: block; }
.sheet-h .sh-x svg { width: 15px; height: 15px; display: block; }
.hero-mini .hm-a svg { width: 18px; height: 18px; display: block; }
/* 卡片里那个「大图形」占位（原来是 40px 的 Emoji） */
.big-ico svg { width: 40px; height: 40px; opacity: .5; display: block; margin: 0 auto; }
/* 接车卡头部那个 22px 的扳手（原来是内联 font-size:22px 的 Emoji） */
.big-ico-sm svg { width: 22px; height: 22px; display: block; }
/* 首页 hero / 行动卡里的行内图标 */
.hero-mini svg { width: 18px; height: 18px; display: block; flex: 0 0 auto; }
.action-card span svg { width: 16px; height: 16px; display: block; }
.action-card span { display: inline-flex; align-items: center; gap: 4px; }

/* ---------------------------------------------------------------- 列表项 */
.item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 0; border-bottom: 1px solid var(--line2);
}
.item:last-child { border-bottom: 0; }
.item .it-main { flex: 1 1 auto; min-width: 0; }
.item .it-t { font-size: 14.5px; font-weight: 500; }
.item .it-s { font-size: 12.5px; color: var(--text2); margin-top: 2px; }
.item .it-r { flex: 0 0 auto; text-align: right; font-size: 14.5px; font-weight: 600; }

.list-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line2);
  cursor: pointer; background: none; border-left: 0; border-right: 0; border-top: 0;
  width: 100%; font-family: inherit; font-size: 15px; color: var(--text); text-align: left;
}
.list-row:last-child { border-bottom: 0; }
.list-row .lr-l { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; }
.list-row .lr-i { font-size: 18px; width: 22px; text-align: center; flex: 0 0 auto; }
.list-row .lr-arrow { color: var(--text3); font-size: 16px; flex: 0 0 auto; }

/* 统计卡 */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat {
  background: var(--card); border-radius: var(--radius); padding: 12px 8px;
  text-align: center; box-shadow: var(--shadow);
}
.stat .st-v { font-size: 21px; font-weight: 700; line-height: 1.15; color: var(--brand); }
.stat .st-v.money { font-size: 17px; }
.stat .st-v.warn { color: var(--warn); }
.stat .st-v.red { color: var(--danger); }
.stat .st-l { font-size: 11.5px; color: var(--text2); margin-top: 3px; }

/* 可点的统计卡：老板看到「待收款 3」第一反应是"哪 3 单"，必须点得进去 */
.stat-link {
  display: block; width: 100%; border: 0; font: inherit; cursor: pointer;
  color: inherit; text-align: center;
  background: var(--card); border-radius: var(--radius); padding: 12px 8px;
  box-shadow: var(--shadow);
}
.stat-link:active { background: #f2f5fa; }
.stat-link .st-l { color: var(--brand); }

/* 收款方式选择（纯 CSS，靠 :checked 高亮，不依赖 JS 绑定） */
.pm-row { display: flex; gap: 6px; flex-wrap: wrap; }
.pm { flex: 1 1 0; min-width: 58px; }
.pm input { position: absolute; opacity: 0; pointer-events: none; }
.pm span {
  display: block; text-align: center; padding: 9px 4px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--text);
}
.pm input:checked + span {
  background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600;
}

/* 车辆头部卡 */
.veh-head {
  background: linear-gradient(135deg, #1f2a44, #33415e);
  color: #fff; border-radius: var(--radius-lg); padding: 16px;
  margin-bottom: 10px; box-shadow: 0 6px 18px rgba(31, 42, 68, .25);
}
.veh-plate {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; color: #14304d; border-radius: 7px;
  padding: 6px 13px; font-size: 22px; font-weight: 800; letter-spacing: 2px;
}
.veh-meta { margin-top: 11px; display: grid; grid-template-columns: 1fr 1fr; gap: 7px 12px; }
.veh-meta .vm-l { font-size: 11.5px; opacity: .68; }
.veh-meta .vm-v { font-size: 14px; font-weight: 600; margin-top: 1px; }

/* 时间轴（历史维修） */
.tl { position: relative; padding-left: 22px; }
.tl::before {
  content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px;
  width: 2px; background: var(--line);
}
.tl-item { position: relative; padding: 0 0 16px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -21px; top: 5px;
  width: 9px; height: 9px; border-radius: 50%;
  background: #fff; border: 2px solid var(--brand);
}
.tl-item.old::before { border-color: #c9cdd4; }
.tl-date { font-size: 12.5px; color: var(--text2); }
.tl-title { font-size: 14.5px; font-weight: 600; margin: 2px 0 3px; }
.tl-body { font-size: 13px; color: var(--text2); line-height: 1.6; }

/* 时间轴（¥ 金额明细） */
.money-line {
  display: flex; justify-content: space-between; padding: 6px 0;
  font-size: 14px; border-bottom: 1px dashed var(--line2);
}
.money-line:last-child { border-bottom: 0; }
.money-line.total {
  border-top: 2px solid var(--line); border-bottom: 0;
  margin-top: 5px; padding-top: 10px; font-size: 17px; font-weight: 700;
}
.money-line.total .ml-v { color: var(--danger); }

/* 缩略图 */
.thumbs { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 8px; }
.thumb {
  position: relative; width: 68px; height: 68px; border-radius: 9px;
  overflow: hidden; background: #eef0f3; border: 1px solid var(--line);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .th-del {
  position: absolute; top: 2px; right: 2px; width: 18px; height: 18px;
  border-radius: 50%; border: 0; background: rgba(0, 0, 0, .58); color: #fff;
  font-size: 12px; line-height: 17px; text-align: center; cursor: pointer; padding: 0;
}
.add-photo {
  width: 68px; height: 68px; border-radius: 9px; border: 1px dashed #c9cdd4;
  background: #fafbfc; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px;
  font-size: 11px; color: var(--text3); cursor: pointer;
}
.add-photo .ap-ico { font-size: 19px; }

/* 拍照占位 */
.shot-area {
  border: 1.5px dashed #b8c4d4; border-radius: var(--radius);
  background: #fafbfd; padding: 26px 16px; text-align: center; margin-bottom: 10px;
}
.shot-area .sa-ico { font-size: 44px; }
.shot-area .sa-t { font-size: 15px; font-weight: 600; margin-top: 8px; }
.shot-area .sa-s { font-size: 12.5px; color: var(--text2); margin-top: 4px; }

/* 底部固定操作条 */
.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  max-width: 520px; margin: 0 auto;
  display: flex; gap: 9px; padding: 10px 12px calc(10px + var(--safe-b));
  background: rgba(255, 255, 255, .96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.actionbar .btn { flex: 1 1 auto; }
.actionbar .btn.fixed { flex: 0 0 auto; }
/* 同页还有 tabbar 时把操作条抬到 tabbar 之上。
   不这么做的话两者都是 fixed/bottom:0，tabbar 在 DOM 里靠后 → 操作条被整条盖住，
   门店看到的现象是「按钮不见了 / 点了没反应」（工单详情、线索详情、预约详情都踩过）。 */
.actionbar.above-tab {
  bottom: calc(var(--tabh) + var(--safe-b));
  padding-bottom: 10px;
  box-shadow: 0 -2px 10px rgba(20, 30, 50, .05);
}
.page.above-tab { padding-bottom: calc(134px + var(--safe-b)); }

/* 底部 tabbar（V2：5 项一行均分，SVG 图标替代 Emoji） */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  max-width: 520px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabh) + var(--safe-b));
  background: rgba(255, 255, 255, .97);
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b);
  backdrop-filter: blur(8px);
}
.tabbar button {
  border: 0; background: none; padding: 7px 0 8px; cursor: pointer;
  font-family: inherit; font-size: 10.5px; color: var(--text3);
  display: flex; flex-direction: column; align-items: center; gap: 1px;
}
.tabbar button .tb-i { line-height: 1; filter: none; opacity: 1; }
.tabbar button .tb-i svg { width: 22px; height: 22px; display: block; }
.tabbar button.on { color: var(--brand); font-weight: 600; }
/* 选中态图标上方极轻蓝色高亮条 */
.tabbar button.on { position: relative; }
.tabbar button.on::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 26px; height: 3px; border-radius: 0 0 4px 4px; background: var(--brand);
}

/* 提示条 */
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  z-index: 200; max-width: 88vw;
  background: rgba(28, 34, 44, .93); color: #fff;
  padding: 11px 17px; border-radius: 10px; font-size: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  animation: toastIn .18s ease-out;
}
.toast.err { background: rgba(190, 45, 56, .95); }
.toast.ok { background: rgba(0, 140, 72, .95); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } }

/* 空状态 / 加载 */
.empty { text-align: center; padding: 36px 16px; color: var(--text3); }
.empty .em-ico { font-size: 38px; opacity: .5; }
.empty .em-t { font-size: 14px; margin-top: 9px; }
.empty .em-s { font-size: 12.5px; margin-top: 4px; line-height: 1.6; }

.loading { text-align: center; padding: 30px; color: var(--text2); font-size: 13.5px; }
.spin {
  display: inline-block; width: 17px; height: 17px; vertical-align: -3px;
  margin-right: 7px; border: 2px solid var(--brand);
  border-right-color: transparent; border-radius: 50%;
  animation: sp .7s linear infinite;
}
@keyframes sp { to { transform: rotate(360deg); } }

.skeleton {
  height: 15px; border-radius: 5px; margin: 8px 0;
  background: linear-gradient(90deg, #f0f2f5 25%, #e8eaee 50%, #f0f2f5 75%);
  background-size: 200% 100%; animation: sk 1.3s infinite;
}
@keyframes sk { to { background-position: -200% 0; } }

/* 遮罩层（选客户诉求/选项目） */
.sheet-mask {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(0, 0, 0, .42); display: flex; align-items: flex-end;
  justify-content: center; animation: fadeIn .16s;
}
@keyframes fadeIn { from { opacity: 0; } }
.sheet {
  width: 100%; max-width: 520px; max-height: 82vh; overflow-y: auto;
  background: #fff; border-radius: 16px 16px 0 0;
  padding: 14px 14px calc(16px + var(--safe-b));
  animation: sheetUp .2s ease-out;
}
@keyframes sheetUp { from { transform: translateY(30px); } }
.sheet-h {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 11px; padding-bottom: 9px; border-bottom: 1px solid var(--line2);
}
.sheet-h h3 { margin: 0; font-size: 16px; }
.sheet-h .sh-x {
  border: 0; background: #f2f3f5; width: 28px; height: 28px;
  border-radius: 50%; font-size: 15px; cursor: pointer; color: var(--text2);
}

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; z-index: 160; background: rgba(0, 0, 0, .42);
  display: flex; align-items: center; justify-content: center; padding: 22px;
  animation: fadeIn .16s;
}
.modal {
  width: 100%; max-width: 420px; background: #fff; border-radius: 14px;
  padding: 18px; animation: modalIn .18s ease-out;
  /* 弹窗必须能滚 —— 权限清单有十几项，比手机屏还高。
     以前没有 max-height/overflow：内容顶出屏幕，「保存」按钮根本够不到，
     老板连权限都存不下来（E2E 真机验收时点不到勾选框才发现）。 */
  max-height: calc(100vh - 44px);
  display: flex; flex-direction: column;
}
@keyframes modalIn { from { transform: scale(.94); opacity: 0; } }
.modal h3 { margin: 0 0 9px; font-size: 16.5px; flex: 0 0 auto; }
.modal .m-body {
  font-size: 14.5px; color: var(--text2); line-height: 1.6;
  flex: 1 1 auto; min-height: 0;            /* min-height:0 是让 flex 子项真能滚的关键 */
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.modal .m-btns { display: flex; gap: 9px; margin-top: 16px; flex: 0 0 auto; }
.modal .m-btns .btn { flex: 1 1 auto; }

/* 二维码 */
.qr-wrap { text-align: center; padding: 14px; }
.qr-wrap img { width: 190px; height: 190px; image-rendering: pixelated; }
.qr-link {
  font-size: 11.5px; color: var(--text3); word-break: break-all;
  background: #f7f8fa; border-radius: 8px; padding: 8px; margin-top: 8px;
}

/* 顶部步骤条 */
.steps {
  display: flex; align-items: center; gap: 3px;
  padding: 9px 12px; background: #fff; border-bottom: 1px solid var(--line);
  overflow-x: auto; position: sticky; top: 52px; z-index: 55;
}
.steps .st {
  display: flex; align-items: center; gap: 4px; flex: 0 0 auto;
  font-size: 11.5px; color: var(--text3); padding: 3px 8px; border-radius: 20px;
}
.steps .st.on { background: var(--brand-bg); color: var(--brand-dk); font-weight: 600; }
.steps .st.done { color: var(--ok); }
.steps .st-arrow { color: #d0d3d9; font-size: 10px; }

/* 打印：客户确认单 */
@media print {
  .topbar, .actionbar, .tabbar, .no-print { display: none !important; }
  body { max-width: none; background: #fff; }
  .page { padding: 0; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}

/* ================================================================
   装到手机 · 提示条（安装引导 + HTTP 环境提醒）
   由 index.html 内联脚本注入，独立于 app.js
   ================================================================ */
#pwa-tip {
  position: fixed; left: 10px; right: 10px; z-index: 9998;
  bottom: calc(14px + var(--safe-b));
  max-width: 500px; margin: 0 auto;
  animation: pwaIn .32s cubic-bezier(.22,.8,.3,1) both;
}
.pwa-tip-box {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--brand);
  border-radius: var(--radius-lg); padding: 11px 12px;
  box-shadow: 0 6px 24px rgba(22, 119, 255, .22);
}
.pwa-tip-ico { font-size: 22px; line-height: 1; flex: 0 0 auto; }
.pwa-tip-txt { flex: 1 1 auto; font-size: 12.5px; color: var(--text2); line-height: 1.5; }
.pwa-tip-txt b { color: var(--text); }
.pwa-tip-x {
  flex: 0 0 auto; width: 26px; height: 26px; border: 0; border-radius: 50%;
  background: var(--line2); color: var(--text3);
  font-size: 17px; line-height: 1; cursor: pointer;
}
.pwa-tip-x:active { background: var(--line); }

@keyframes pwaIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* list-row 里的金额：首页「今日车辆」与「维修工单」共用。
   原来 .it-r 只在 .item 容器里生效，放到 list-row 里会丢样式。 */
.list-row .it-r { flex: 0 0 auto; text-align: right; font-size: 14.5px; font-weight: 600; }
.list-row .it-r.warn { color: var(--warn); }

/* 一行提示 + 一个动作（如工单页顶部的「还有 N 单没收到钱 → 去收款」） */
.action-card {
  display: flex; align-items: center; gap: 10px;
  background: var(--warn-bg); border: 1px solid #f7d7a8; color: #8a4b06;
  border-radius: var(--radius); padding: 10px 12px; font-size: 13px;
}
.action-card b { color: #6b3a00; }
.action-card .btn { flex: 0 0 auto; margin-left: auto; }

/* ================================================================
   角色与权限 · 经营报表（2026-09-20）
   ================================================================ */

/* ---- 权限勾选清单（弹层里） ---- */
.perm-grp { margin-top: 12px; }
.perm-grp .pg-t {
  font-size: 12px; font-weight: 600; color: var(--text3);
  letter-spacing: .5px; margin-bottom: 6px;
}
.perm-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 10px; margin-bottom: 6px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fff; cursor: pointer;
}
.perm-item.on { border-color: var(--brand); background: var(--brand-bg); }
.perm-item input { flex: 0 0 auto; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--brand); }
.perm-item .pi-l { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.perm-item .pi-l b { font-size: 14px; font-weight: 500; }
.perm-item.on .pi-l b { color: var(--brand-dk); }

/* ---- 月份切换 ---- */
.month-nav {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.month-nav .mn-btn {
  flex: 0 0 auto; width: 34px; height: 34px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--text2);
  font-size: 16px; line-height: 1; cursor: pointer;
}
.month-nav .mn-btn:active { background: var(--line2); }
.month-nav .mn-label {
  flex: 1 1 auto; text-align: center; font-size: 16px; font-weight: 600;
}
.month-nav .mn-today {
  flex: 0 0 auto; padding: 0 10px; height: 34px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--brand);
  font-size: 13px; cursor: pointer;
}

/* ---- 三列 KPI ---- */
.kpi3 { display: flex; gap: 8px; margin-bottom: 8px; }
.kpi3 .k3 {
  flex: 1 1 0; min-width: 0; background: #fff; border-radius: var(--radius);
  padding: 10px 8px; text-align: center; box-shadow: var(--shadow);
}
.kpi3 .k3 .k-v {
  font-size: 16px; font-weight: 700; letter-spacing: -.2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kpi3 .k3 .k-v.money { color: var(--brand-dk); }
.kpi3 .k3 .k-v.ok { color: var(--ok); }
.kpi3 .k3 .k-v.warn { color: var(--warn); }
.kpi3 .k3 .k-l { font-size: 11.5px; color: var(--text3); margin-top: 2px; }

/* ---- 柱状图（纯 CSS，不引图表库） ---- */
.bars {
  display: flex; align-items: flex-end; gap: 3px;
  height: 110px; padding: 6px 2px 0;
}
.bars .bar-col {
  flex: 1 1 0; min-width: 0; height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
}
.bars .bar {
  width: 100%; max-width: 22px; min-height: 2px;
  background: linear-gradient(180deg, #6aa9ff, var(--brand));
  border-radius: 4px 4px 2px 2px;
}
.bars .bar-l {
  font-size: 9.5px; color: var(--text3); margin-top: 3px;
  white-space: nowrap; overflow: hidden;
}
.bars .bar-col.zero .bar { background: var(--line); }

/* ---- 项目排行 ---- */
.rank-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 0;
  border-bottom: 1px solid var(--line2);
}
.rank-row:last-child { border-bottom: 0; }
.rank-row .rk-no {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 6px;
  background: var(--line2); color: var(--text2);
  font-size: 11.5px; font-weight: 600; line-height: 20px; text-align: center;
}
.rank-row:nth-child(1) .rk-no { background: var(--brand); color: #fff; }
.rank-row .rk-n { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row .rk-v { flex: 0 0 auto; font-weight: 600; font-size: 14px; }

/* 报表页「比上月多/少 N%」里的强调色（与涨跌无关，只表示好/差） */
.ok-t { color: var(--ok); }

/* ================================================================
   首页 V2 ·「AI 汽车智能工作台」（2026-09-20）
   只改 UI/布局，不碰业务逻辑、接口、金额算法、权限
   ================================================================ */

/* 通用 SVG 图标尺寸（线条粗细统一靠 stroke-width） */
.lr-i svg, .em-ico svg, .logo svg, .ai-ico svg, .rc-ico svg,
.scan-ico svg, .go svg, .rc-cta svg, .ai-card-btns svg, .ai-badge svg, .upd svg {
  display: block;
}
.lr-i svg { width: 18px; height: 18px; }
.em-ico svg { width: 40px; height: 40px; opacity: .5; }
.logo svg, .ai-ico svg { width: 22px; height: 22px; }
.rc-ico svg { width: 18px; height: 18px; }
.go svg { width: 18px; height: 18px; }
.rc-cta svg { width: 14px; height: 14px; }
.ai-card-btns svg { width: 14px; height: 14px; }

/* —— 顶部深色渐变 hero（替代默认顶栏） —— */
.home-hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, #0A1633 0%, #0B5CFF 100%);
  padding: calc(14px + env(safe-area-inset-top, 0px)) 18px 60px;
}
.home-hero .hh-grid {
  position: absolute; inset: 0; opacity: .06;
  background-image:
    linear-gradient(rgba(255,255,255,.6) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.6) 1px, transparent 1px);
  background-size: 28px 28px;
}
.home-hero .hh-top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 2; }
.home-hero .brand { display: flex; align-items: center; gap: 10px; }
.home-hero .logo {
  width: 38px; height: 38px; border-radius: 11px; flex: 0 0 auto;
  background: linear-gradient(135deg, #18C8FF, #0B5CFF);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(24, 200, 255, .35);
}
.home-hero .h1 { font-size: 19px; font-weight: 700; letter-spacing: .5px; }
.home-hero .sub { font-size: 11px; color: rgba(255,255,255,.65); margin-top: 2px; letter-spacing: 1px; }
.home-hero .ava {
  width: 36px; height: 36px; border-radius: 50%; flex: 0 0 auto;
  background: rgba(255,255,255,.16); border: 1.5px solid rgba(255,255,255,.4);
  display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600;
}

/* —— AI 拍车接车能力卡 —— */
.scan-card {
  display: flex; align-items: center; gap: 14px; width: calc(100% - 32px); margin: -46px 16px 0;
  position: relative; z-index: 3; border: 0; border-radius: 20px; overflow: hidden;
  padding: 18px 16px; cursor: pointer; text-align: left; font-family: inherit; color: #fff;
  background: linear-gradient(120deg, #0A1633 0%, #0B5CFF 60%, #1677FF 100%);
  box-shadow: 0 12px 32px rgba(11, 92, 255, .30);
}
.scan-card::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(24,200,255,.9), transparent);
  animation: scanmove 2.6s linear infinite;
}
@keyframes scanmove { 0% { transform: translateY(0); } 50% { transform: translateY(96px); } 100% { transform: translateY(0); } }
.scan-ico {
  position: relative; width: 54px; height: 54px; flex: 0 0 auto; border-radius: 15px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center;
}
.scan-ico::before, .scan-ico::after, .scan-ico i::before, .scan-ico i::after {
  content: ""; position: absolute; width: 12px; height: 12px; border: 2.5px solid #18C8FF;
}
.scan-ico::before { left: 5px; top: 5px; border-right: none; border-bottom: none; border-radius: 4px 0 0 0; }
.scan-ico::after { right: 5px; top: 5px; border-left: none; border-bottom: none; border-radius: 0 4px 0 0; }
.scan-ico i::before { left: 5px; bottom: 5px; border-right: none; border-top: none; border-radius: 0 0 0 4px; }
.scan-ico i::after { right: 5px; bottom: 5px; border-left: none; border-top: none; border-radius: 0 0 4px 0; }
.scan-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.scan-txt .ai-badge {
  display: inline-flex; align-items: center; gap: 5px; align-self: flex-start;
  font-size: 10px; font-weight: 600; color: #B9F1FF;
  background: rgba(24,200,255,.16); border: 1px solid rgba(24,200,255,.4);
  border-radius: 999px; padding: 2px 8px; margin-bottom: 6px;
}
.scan-txt .tt { font-size: 21px; font-weight: 800; letter-spacing: 1px; }
.scan-txt .ss { font-size: 12px; color: rgba(255,255,255,.8); margin-top: 5px; line-height: 1.4; }
.scan-card .go {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; color: #fff;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35);
  display: flex; align-items: center; justify-content: center; margin-left: 8px;
}
.scan-card .dot, .ai-card .dot, .upd .dot {
  width: 6px; height: 6px; border-radius: 50%; background: #4ADE80;
  box-shadow: 0 0 6px #4ADE80; animation: pulse 1.8s infinite;
}
@keyframes pulse { 50% { opacity: .4; } }

/* 洗车收银：复用 .scan-card 布局，只换配色（青色，区别于 AI 接车的蓝色） */
.wash-card {
  margin: 12px 16px 0;
  background: linear-gradient(120deg, #06323A 0%, #0E8C8C 55%, #16B5B5 100%);
  box-shadow: 0 12px 32px rgba(14, 140, 140, .28);
}
.wash-profile .card-h { display: flex; align-items: center; justify-content: space-between; }

/* 拍照 / 相册两个入口并排（§8.1：只给拍照，代客洗车时就用不了） */
.wash-acts { display: flex; gap: 8px; margin-top: 8px; }
.wash-acts .btn { flex: 1; }
.wash-acts .btn svg { width: 16px; height: 16px; vertical-align: -2px; margin-right: 4px; }

/* 「上次什么时候洗的」—— 门店最先看的一行，给足视觉权重 */
.wash-last {
  font-size: 13px;
  color: #0F766E;
  background: #F0FDFA;
  border: 1px solid #CCFBF1;
  border-radius: 8px;
  padding: 8px 10px;
}
.wash-last b { font-size: 14px; }

/* 洗车流水一行：时间在左（最要紧），相对天数在右 */
.wash-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid #F1F5F9;
}
.wash-row .wr-t { font-size: 13.5px; font-weight: 600; color: #0F172A; }
.wash-row .wr-r { white-space: nowrap; }

/* —— 区块标题（V2） —— */
.sec-t { margin: 22px 18px 9px; font-size: 13px; font-weight: 700; color: #1F2937; letter-spacing: .3px; }

/* —— 三张核心 KPI —— */
.kpi-row { display: flex; gap: 10px; margin: 0 16px; }
.kpi {
  flex: 1 1 0; min-width: 0; background: #fff; border: 0; border-radius: 16px;
  box-shadow: var(--shadow); padding: 14px 12px; text-align: left;
  cursor: pointer; font-family: inherit; display: flex; flex-direction: column; justify-content: center;
}
.kpi .num {
  font-size: 25px; font-weight: 700; line-height: 1.1; letter-spacing: -.5px;
  font-family: "SF Pro Display", -apple-system, "DIN Alternate", sans-serif;
}
.kpi .lbl { font-size: 11.5px; color: #64748B; margin-top: 5px; }
.kpi.hl { background: linear-gradient(160deg, #0B5CFF, #1677FF); box-shadow: 0 8px 24px rgba(11,92,255,.28); }
.kpi.hl .num { color: #fff; }
.kpi.hl .lbl { color: rgba(255,255,255,.78); }
.kpi.hl:active { background: linear-gradient(160deg, #0A4FD8, #1466E0); }

/* —— 业务状态小卡 —— */
.pip-row { display: flex; gap: 10px; margin: 10px 16px 0; }
.pip {
  flex: 1 1 0; min-width: 0; background: #fff; border: 0; border-radius: 12px;
  box-shadow: var(--shadow); padding: 9px 10px; display: flex; align-items: center; gap: 7px;
  cursor: pointer; font-family: inherit;
}
.pip b { font-size: 17px; font-weight: 700; font-family: "SF Pro Display", -apple-system, sans-serif; }
.pip span { font-size: 11px; color: #64748B; }
.pip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.pip.warn::before { background: #F59E0B; }
.pip.work::before { background: #6366F1; }
.pip.risk::before { background: #EF4444; }

/* —— AI 客户召回卡 —— */
.recall-card {
  display: block; width: calc(100% - 32px); margin: 20px 16px 0;
  border: 1px solid transparent; border-radius: 20px; box-shadow: var(--shadow);
  padding: 16px; cursor: pointer; font-family: inherit; text-align: left; background: #fff;
  background-image: linear-gradient(#fff, #fff), linear-gradient(120deg, rgba(245,158,11,.6), rgba(11,92,255,.35));
  background-origin: border-box; background-clip: padding-box, border-box;
}
.rc-head { display: flex; align-items: center; gap: 8px; }
.rc-ico { width: 28px; height: 28px; border-radius: 9px; background: #FFF4E5; color: #F59E0B;
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.rc-t { font-size: 15px; font-weight: 700; }
.rc-tag { margin-left: auto; font-size: 10px; font-weight: 700; color: #EF4444;
  background: #FEF2F2; border-radius: 999px; padding: 2px 8px; }
.rc-big { font-size: 32px; font-weight: 800; letter-spacing: -1px; margin: 10px 0 3px;
  font-family: "SF Pro Display", -apple-system, sans-serif; }
.rc-big span { font-size: 14px; font-weight: 600; color: #64748B; margin-left: 6px; }
.rc-s { font-size: 12px; color: #64748B; line-height: 1.7; }
.rc-cta { margin-top: 12px; display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #0B5CFF; }

/* —— AI 经营助手卡（统一 AI Card 组件） —— */
.ai-card {
  width: calc(100% - 32px); margin: 14px 16px 0; border: 1px solid transparent;
  border-radius: 20px; padding: 15px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #F3F7FF, #FDFBFF); box-shadow: var(--shadow);
  background-image: linear-gradient(135deg, #F3F7FF, #FDFBFF), linear-gradient(120deg, rgba(24,200,255,.45), rgba(139,92,246,.30));
  background-origin: border-box; background-clip: padding-box, border-box;
}
.ai-card-h { display: flex; align-items: center; gap: 8px; }
.ai-ico { width: 28px; height: 28px; border-radius: 9px; background: linear-gradient(135deg, #18C8FF, #0B5CFF);
  color: #fff; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.ai-card-t { font-size: 15px; font-weight: 700; }
.ai-card .upd { margin-left: auto; font-size: 10px; color: #16A34A; display: flex; align-items: center; gap: 4px; }
.ai-card-b { font-size: 13.5px; color: #334155; line-height: 1.8; margin: 10px 2px 12px; white-space: pre-wrap; }
.ai-card-btns { display: flex; gap: 10px; }
.ai-card-btns .b1, .ai-card-btns .b2 {
  flex: 1; height: 38px; border-radius: 12px; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit; display: flex; align-items: center; justify-content: center; gap: 5px;
}
.ai-card-btns .b1 { background: #0B5CFF; border: 0; color: #fff; }
.ai-card-btns .b2 { background: #fff; color: #0B5CFF; border: 1px solid #DBE6FF; }
.ai-foot { font-size: 10px; color: #94A3B8; margin-top: 10px; }

/* =====================================================================
   工单档案（2026-09-22 新增）
   列表卡片 / 详情头 / 编辑项卡 / 筛选芯片 —— 全部移动端优先，不做 PC 表格。
   ===================================================================== */

/* ---- 列表卡片：车牌、状态、金额、时间四个最要紧的先看（§2/§19） ---- */
.wo-card {
  display: block; width: 100%; text-align: left; cursor: pointer;
  border: 1px solid var(--line); background: #fff; border-radius: var(--radius);
  padding: 12px; margin-bottom: 8px; font-family: inherit; color: var(--text);
}
.wo-card:active { background: #f7f9fc; }
.wo-card:last-child { margin-bottom: 0; }
/* 已作废压暗，但**不隐藏** —— 单据必须留在列表里可查（§16） */
.wo-cancel { opacity: .62; }
.wc-r1 { display: flex; align-items: center; gap: 8px; }
.wc-plate { flex: 1 1 auto; min-width: 0; font-size: 16.5px; font-weight: 700;
  letter-spacing: .5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wc-tags { display: flex; gap: 5px; flex: 0 0 auto; }
.wc-r2 { display: flex; align-items: baseline; gap: 8px; margin-top: 5px; }
.wc-amt { flex: 1 1 auto; font-size: 18px; font-weight: 700; }
.wc-when { flex: 0 0 auto; font-size: 12.5px; color: var(--text3); }
.wc-r3 { font-size: 12.5px; color: var(--text2); margin-top: 4px; }
.wc-r4 { font-size: 12.5px; color: var(--text2); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wc-r5 { font-size: 12.5px; margin-top: 5px; }
.wc-r5.warn { color: var(--warn); }
.wc-r5.danger { color: var(--danger); }

/* ---- 详情头（深色渐变，金额最大） ---- */
.wo-head {
  background: linear-gradient(135deg, #1677ff, #0958d9); color: #fff;
  border-radius: var(--radius-lg); padding: 15px; margin-top: 8px;
  box-shadow: 0 6px 20px rgba(22, 119, 255, .28);
}
.wh-plate { font-size: 24px; font-weight: 800; letter-spacing: 1px; }
.wh-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
/* 标签保留自己的语义色（浅底深字），只加一圈白色描边和蓝底分开。
   如果统一改成"白字半透明底"，已收款/未收款/已作废就长得一模一样了。 */
.wh-tags .tag { box-shadow: 0 0 0 1px rgba(255, 255, 255, .55); }
.wh-amt { font-size: 30px; font-weight: 800; letter-spacing: -.5px; margin-top: 9px;
  font-family: "SF Pro Display", -apple-system, sans-serif; }
.wh-sub { font-size: 12px; opacity: .92; margin-top: 3px; }

/* ---- 搜索 + 三组筛选 ---- */
.ws-row { display: flex; gap: 8px; align-items: stretch; }
.ws-row input { flex: 1 1 auto; min-width: 0; }
.ws-row .btn { flex: 0 0 auto; padding: 0 16px; }
.ws-foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.ws-foot > span { flex: 1 1 auto; min-width: 0; }
.wseg { margin-top: 6px; }
.chip {
  padding: 6px 12px; font-size: 12.5px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--text2);
  font-family: inherit; transition: all .12s;
}
.chip.on { background: var(--brand-bg); border-color: var(--brand); color: var(--brand-dk); font-weight: 600; }

/* ---- 施工照片 ---- */
.wo-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.wo-photo { width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: 8px; background: var(--line2); }

/* ---- 底部动作 / 链接按钮 ---- */
.wo-acts, .wo-links { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- 编辑页：逐项卡 ---- */
.weit { border: 1px solid var(--line); border-radius: var(--radius);
  padding: 11px; margin-bottom: 10px; background: #fff; }
.weit:last-child { margin-bottom: 0; }
.weit-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.weit-h > b { flex: 1 1 auto; min-width: 0; font-size: 14.5px; }
.weit-del { flex: 0 0 auto; font-size: 12.5px; color: var(--danger);
  display: inline-flex; align-items: center; gap: 4px; }
.weit .fld { margin-bottom: 8px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 8px; }
.grid3 > * { min-width: 0; }
.grid3 input { padding: 9px 10px; font-size: 14px; }

/* ---- 看板/今日页上的小入口条 ---- */
.hero-mini {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  border: 1px solid var(--line); background: #fff; border-radius: var(--radius);
  padding: 12px; cursor: pointer; font-family: inherit; color: var(--text);
}
.hero-mini .hm-t { flex: 1 1 auto; min-width: 0; font-size: 14px; font-weight: 600; }
.hero-mini .hm-t em { display: block; font-style: normal; font-size: 12px;
  font-weight: 400; color: var(--text3); margin-top: 2px; }
.hero-mini .hm-a { flex: 0 0 auto; color: var(--text3); font-size: 18px; }

/* 车主名字可点 → 客户档案 */
.vm-link { background: none; border: 0; padding: 0; font: inherit;
  color: var(--brand); cursor: pointer; }

/* =====================================================================
   AI 客户召回经营闭环（2026-09-24 新增）
   首页「AI 经营成果」卡 · 召回页 KPI / 漏斗 · 召回客户卡 · 回店提示横幅
   颜色一律复用上面的 token，不新造色；本模块不涉及涨跌色。
   ===================================================================== */

/* ---- AI 经营成果（老板首页 & 召回页）：三个数字 + 召回漏斗 ---- */
.ai-result {
  border: 1px solid transparent;
  background-image: linear-gradient(135deg, #f3f7ff, #fdfbff),
                    linear-gradient(120deg, rgba(125, 60, 248, .40), rgba(11, 92, 255, .28));
  background-origin: border-box; background-clip: padding-box, border-box;
}
.ar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ar {
  min-width: 0; padding: 9px 8px; text-align: center; border-radius: 10px;
  background: rgba(255, 255, 255, .74);
}
.ar b {
  display: block; font-size: 18px; font-weight: 700; letter-spacing: -.3px;
  font-family: "SF Pro Display", -apple-system, sans-serif; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ar span { display: block; font-size: 11px; color: var(--text2); margin-top: 3px; }
/* 「召回实收」是最该被看见的那个数 */
.ar.hl { background: linear-gradient(160deg, var(--brand), #3b96ff); }
.ar.hl b { color: #fff; }
.ar.hl span { color: rgba(255, 255, 255, .82); }

/* ---- 召回漏斗（横条，按最大值等比） ---- */
.fn-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.fn-l { flex: 0 0 76px; font-size: 12px; color: var(--text2); }
.fn-bar {
  flex: 1 1 auto; min-width: 0; height: 8px; border-radius: 999px;
  background: var(--line2); overflow: hidden;
}
.fn-bar i { display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #7d3cf8, #1677ff); }
.fn-v { flex: 0 0 auto; min-width: 24px; text-align: right;
  font-size: 12.5px; font-weight: 600; color: var(--text); }

/* ---- 召回页顶部 5 个数字（今日建议 / 已联系 / 待联系 / 有意向 / 已预约） ---- */
.recall-kpis { display: flex; gap: 6px; }
.rk {
  flex: 1 1 0; min-width: 0; padding: 9px 4px; text-align: center;
  background: #fff; border-radius: 10px; box-shadow: var(--shadow);
}
.rk b { display: block; font-size: 18px; font-weight: 700;
  font-family: "SF Pro Display", -apple-system, sans-serif; }
.rk span { display: block; font-size: 10.5px; color: var(--text2); margin-top: 2px;
  white-space: nowrap; }

/* ---- 一张召回客户卡：左侧品牌色竖条，一眼分得清是「待联系」还是别的卡 ---- */
.recall-item { border-left: 3px solid var(--brand); }

/* ---- AI 建议话术（后端下发，员工一键复制后自己发微信） ---- */
.recall-script {
  padding: 10px 11px; border: 1px solid #e2d5ff; border-radius: 10px;
  background: var(--ai-bg); color: #4a2c85;
  font-size: 13.5px; line-height: 1.7;
  white-space: pre-wrap; word-break: break-word;
}

/* ---- 接车工作台上的「该客户当前存在召回记录」提示（§十） ---- */
.recall-banner {
  border: 1px solid #ffd591; border-left: 3px solid var(--warn);
  background: var(--warn-bg);
}
.rb-head { display: flex; align-items: center; gap: 8px; }

/* ---- 召回明细弹窗里的每一笔成交 ---- */
.conv-row { padding: 9px 0; border-bottom: 1px solid var(--line2); font-size: 13.5px; }
.conv-row:last-child { padding-bottom: 0; border-bottom: 0; }
.conv-row b { font-size: 14px; }

/* ---- 分段按钮：召回页的「今日建议 / 待跟进 / 已预约」不带 data-v，
       需要一条默认选中底色（检查项那套 data-v=normal 之类仍然优先，见上文） ---- */
.seg button.on { background: var(--brand-bg); color: var(--brand-dk); }

/* =================================================================
 * 增长中心（2026-09-26）
 * 只新增 .g-* 类，不改任何既有类的既有行为；
 * 「点击目标 ≥44px」单独放在最后一条 @media (pointer: coarse) 里 ——
 * 手机（触摸屏）上生效，桌面浏览器预览不受影响，避免连带改坏既有页面布局。
 * ================================================================= */

/* 四个小指标（今日新线索 / 今日预约 / 待跟进 / 14天未到店） */
.g-kpi4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 16px 0; }
.card .g-kpi4 { margin-left: 0; margin-right: 0; margin-top: 8px; }
.g-k {
  min-width: 0; padding: 9px 4px; border-radius: 10px; text-align: center;
  background: #F6F8FC; border: 0; font-family: inherit; color: var(--text);
}
button.g-k { cursor: pointer; }
.g-k:active { opacity: .75; }
.g-k b {
  display: block; font-size: 15.5px; font-weight: 700; letter-spacing: -.2px;
  font-family: "SF Pro Display", -apple-system, sans-serif;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.g-k span { display: block; font-size: 10.5px; color: var(--text3); margin-top: 2px; }

/* 六个指标：3 列 × 2 行。首页要一眼看到「今日到店 / 今日成交」（任务书口径），
   同时保留过程指标（新线索／预约／待跟进／14 天未到店）。手机上 3 列刚好不挤。 */
.g-kpi6 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 16px 0; }
.card .g-kpi6 { margin-left: 0; margin-right: 0; margin-top: 8px; }

/* 三个中等指标（成交单 / 归因实收 / 平均客单） */
.g-kpi3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }.g-kpi3 > div { min-width: 0; text-align: center; }
.g-kpi3 b {
  display: block; font-size: 16px; font-weight: 700;
  font-family: "SF Pro Display", -apple-system, sans-serif;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.g-kpi3 span { display: block; font-size: 10.5px; color: var(--text3); margin-top: 2px; }

/* 「关键信息」那种标签-值两列的窄行 */
.g-fact { padding: 5px 0; border-bottom: 1px solid var(--line2); }
.g-fact:last-child { border-bottom: 0; }
.g-fact > span:last-child { text-align: right; max-width: 64%; word-break: break-all; }

/* 渠道效果的一行 */
.g-chan { padding: 10px 0; border-bottom: 1px solid var(--line2); }
.g-chan:last-child { border-bottom: 0; padding-bottom: 0; }
.g-chan > div + div { margin-top: 3px; }

/* 接车时的「这台车有预约」提示条：用暖色，和红色告警区分开 ——
   它不是错误，是"有人等着你"的好消息。 */
.g-banner { border: 1px solid #F7D7A8; background: #FFFCF5; }
.g-match { padding: 10px 0; border-top: 1px solid var(--line2); }
.g-match .btn { flex: 0 0 auto; }

/* 行内文字按钮（清除筛选） */
.g-link {
  background: none; border: 0; padding: 0 4px; cursor: pointer;
  color: var(--brand); font: inherit; font-size: inherit; text-decoration: underline;
}

/* 活动价 */
.g-price { font-size: 22px; font-weight: 700; color: var(--brand-dk); }

/* AI 结论每条 */
.g-find {
  padding: 9px 11px; border-radius: 9px; background: #F6F8FC;
  font-size: 13.5px; line-height: 1.65; margin-bottom: 8px;
}
.g-find:last-child { margin-bottom: 0; }
.g-find.warn { background: var(--warn-bg); color: #8A4B06; }
.g-find.ok { background: var(--ok-bg); color: #0A6B3D; }
.g-ai-head { font-size: 15.5px; font-weight: 600; line-height: 1.65; }

/* 线索/预约列表行的第二三行（列表行本身复用 .list-row） */
.g-lead-row { align-items: flex-start; }
.g-lead-row .lr-l { align-items: flex-start; padding-top: 1px; }

.mb8 { margin-bottom: 8px; }

/* 二维码（SVG 由后端生成，宽度固定免得老 WebView 撑破卡片） */
.qr-wrap svg { width: 190px; height: 190px; display: block; margin: 0 auto; }

/* ----------------------------------------------------------------
 * 手机端触控目标 ≥44px（P0 验收项）
 * 只对**粗指针设备**（手机/平板触摸屏）生效 —— 桌面鼠标预览不变形。
 * 覆盖的是真正会被点的元素：按钮、分段/筛选片、列表行、底部导航。
 * ---------------------------------------------------------------- */
@media (pointer: coarse) {
  .btn, .btn-sm, .seg button, .chip, .tabbar button, .list-row, .g-k { min-height: 44px; }
  .btn-sm { padding: 11px 14px; font-size: 13.5px; }
  .seg button { padding: 11px 14px; }
  .chip { padding: 12px 14px; }
  .list-row { padding-top: 12px; padding-bottom: 12px; }
  .g-k { display: flex; flex-direction: column; align-items: center; justify-content: center; }
  .g-link { min-height: 0; padding: 6px 8px; }
}

/* ================================================================
 * AI 视频获客中心（2026-09-27）
 * 全部用 .v-/.vo-/.vs-/.vt-/.vh-/.vw- 前缀，**不与既有类冲突**。
 * 移动优先：所有可点元素在手机上都够大（配合上面的 pointer:coarse 规则）。
 * ================================================================ */

/* ---- 中心首页的说明卡 ---- */
.v-hero {
  background: linear-gradient(135deg, #1677ff 0%, #6a4df6 100%);
  color: #fff;
}
.v-hero .vh-t { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.v-hero .vh-t svg { width: 20px; height: 20px; }
.v-hero .vh-s { font-size: 12.5px; line-height: 1.6; opacity: .92; margin-top: 6px; }
.v-hero .vh-k { display: flex; gap: 8px; margin-top: 12px; }
.v-hero .vh-k > div {
  flex: 1 1 0; text-align: center; background: rgba(255, 255, 255, .16);
  border-radius: 10px; padding: 8px 4px;
}
.v-hero .vh-k b { display: block; font-size: 19px; line-height: 1.2; }
.v-hero .vh-k span { font-size: 11.5px; opacity: .9; }

/* ---- 生成进度（§52：要明确进度，不是转圈） ---- */
.vprog .vprog-h {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; font-size: 13.5px; font-weight: 600;
}
.vprog .vprog-h .tiny { display: inline-flex; align-items: center; gap: 4px; }
.vprog-bar { height: 10px; border-radius: 999px; background: var(--line2); margin-top: 10px; overflow: hidden; }
.vprog-bar i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--brand) 0%, #6a4df6 100%);
  border-radius: 999px; transition: width .5s ease;
}

/* ---- 今日可拍的机会卡 ---- */
.v-op { padding: 12px 0; border-bottom: 1px solid var(--line2); }
.v-op:last-child { border-bottom: 0; padding-bottom: 0; }
.v-op .vo-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.v-op .vo-h b { font-size: 15px; }
.v-op .vo-star { margin-left: auto; color: #f5a623; font-size: 13px; letter-spacing: 1px; }
.v-op .vo-star.hot { color: #e34d59; }

/* ---- 拍摄助手的工单事实卡 ---- */
.v-wo { background: #f7f9fc; border: 1px solid var(--line); }
.v-wo .vw-plate { font-size: 20px; font-weight: 700; letter-spacing: 1px; }

/* ---- 拍摄清单的每一项 ---- */
.v-shot { padding: 12px 0; border-bottom: 1px solid var(--line2); }
.v-shot:last-child { border-bottom: 0; padding-bottom: 0; }
.v-shot.done { opacity: .92; }
.v-shot .vs-h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.v-shot .vs-h b { font-size: 14.5px; }
.v-shot .v-sub, .v-shot input.v-sub {
  flex: 1 1 auto; min-width: 0; border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 10px; font-size: 14px; background: #fff; color: var(--text);
}

/* ---- 素材缩略图网格 ---- */
.v-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.v-thumb {
  position: relative; background: var(--card); border-radius: 10px; overflow: hidden;
  box-shadow: var(--shadow); padding-bottom: 34px;
}
.v-thumb img { width: 100%; height: 84px; object-fit: cover; display: block; background: #eef1f5; }
.v-thumb .vt-box {
  height: 84px; display: flex; align-items: center; justify-content: center;
  background: #eef1f5; color: var(--text3);
}
.v-thumb .vt-box svg { width: 30px; height: 30px; }
.v-thumb .vt-meta { font-size: 12px; font-weight: 600; padding: 5px 6px 0; }
.v-thumb .vt-sub {
  font-size: 10.5px; color: var(--text3); padding: 0 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.v-thumb .vt-del {
  position: absolute; top: 4px; right: 4px; width: 24px; height: 24px;
  border: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff;
  font-size: 15px; line-height: 1; cursor: pointer;
}

/* ---- 播放器（成片预览） ---- */
.v-player { margin-bottom: 10px; }
.v-player video {
  width: 100%; max-height: 62vh; border-radius: var(--radius);
  background: #000; display: block; box-shadow: var(--shadow);
}
.v-no-video {
  padding: 40px 12px; text-align: center; color: var(--text3); font-size: 13.5px;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
}

/* ---- 隐私检查卡（这块必须显眼：门店敢于发出去的依据） ---- */
.v-private { border-left: 4px solid var(--ok); }
.v-private .v-pv { display: flex; gap: 8px; margin-top: 10px; }
.v-private .v-pv > div {
  flex: 1 1 0; text-align: center; background: var(--ok-bg);
  border-radius: 10px; padding: 8px 4px;
}
.v-private .v-pv b { display: block; font-size: 18px; color: var(--ok); }
.v-private .v-pv span { font-size: 11.5px; color: var(--text2); }

/* ---- 单选/多选行（模板、钩子） ---- */
.v-opt {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--line2); cursor: pointer;
}
.v-opt:last-child { border-bottom: 0; padding-bottom: 0; }
.v-opt input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 auto; }
.v-opt .vo-t { flex: 1 1 auto; min-width: 0; }
.v-opt .vo-t b { font-size: 14.5px; font-weight: 600; display: block; }
.v-opt .vo-t em { font-style: normal; font-size: 11.5px; color: var(--text3); display: block; margin-top: 2px; }

/* ---- 小选择片（时长 / 画幅） ---- */
.v-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 12px; margin: 0 8px 8px 0; font-size: 13.5px; cursor: pointer;
}
.v-chip input { width: 16px; height: 16px; }

/* ---- 可点复制的标题候选 ---- */
.v-copy {
  display: flex; align-items: center; gap: 8px; padding: 10px 0;
  border-bottom: 1px solid var(--line2); cursor: pointer;
}
.v-copy:last-child { border-bottom: 0; padding-bottom: 0; }
.v-copy .vc-t { flex: 1 1 auto; font-size: 14px; }
.v-copy svg { width: 16px; height: 16px; color: var(--text3); flex: 0 0 auto; }

/* ---- 人工框选遮挡区的画布 ---- */
.vmask-wrap {
  position: relative; margin-top: 10px; border-radius: 10px;
  overflow: hidden; background: #000; line-height: 0;
}
.vmask-wrap img { width: 100%; display: block; }
.vmask-layer { position: absolute; inset: 0; cursor: crosshair; touch-action: none; }

/* ---- 效果数据的 2 列输入 ---- */
.v-pv2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; margin-top: 4px; }
@media (max-width: 330px) { .v-pv2 { grid-template-columns: 1fr; } }
