/* ============================================================
   车险比价核算工作台 · v3
   设计语言：近白底 / 卡片式 / 粉色佣金强调
   ============================================================ */

:root {
  --bg: #F7F7F5;
  --card: #FFFFFF;
  --line: #E8E8E4;
  --line-soft: #F0F0EC;
  --line-strong: #E0E0DB;
  --ink: #1A1A1A;
  --ink-2: #4A4A45;
  --ink-3: #8A8A85;
  --ink-4: #A8A8A3;
  --ink-5: #C0C0BB;
  --accent: #E8547C;
  --accent-deep: #C4607F;
  --accent-bg: #FDF0F4;
  --accent-line: #F0D3DC;
  --green: #2FA36B;
  --green-bg: #EDF7F1;
  --amber: #D8912F;
  --amber-bg: #FFF7EA;
  --th-bg: #F5F5F2;
  --sub-bg: #FAF9F7;
  --r-sm: 7px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* iOS 在横竖屏切换 / 部分机型上会自行放大文字（Text Autosizing），
     会把控件撑破、把输入框里的字挤出去。锁死，字号只由我们决定。
     ⚠️ 与 `input {font-size:16px}` 那两条移动端硬指标是同一类问题。 */
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

input, button, select { font-family: inherit; font-size: inherit; color: inherit; }
input:focus, button:focus { outline: none; }
button { cursor: pointer; border: none; background: none; }

/* 作者样式里的 display 会盖过浏览器对 [hidden] 的默认处理，
   统一兜住 —— 否则 .card / #panel-xxx 这类设了 display 的元素 hidden 后依然可见 */
[hidden] { display: none !important; }

/* ============================================================
   顶栏
   ============================================================ */
.topbar {
  height: 72px;
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.tb-left { display: flex; align-items: center; gap: 36px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: 0.2px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav-item {
  padding: 7px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 400; color: var(--ink-3);
  transition: all .15s;
}
.nav-item:hover { background: var(--bg); color: var(--ink-2); }
.nav-item.active { background: var(--accent-bg); color: var(--accent); font-weight: 500; }

.tb-right { display: flex; align-items: center; gap: 10px; }
.dot-online {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(47, 163, 107, .14);
}
.tb-date { font-size: 13px; color: var(--ink-3); }
.tb-line { height: 1px; background: var(--line); }

/* 账号区：显示当前登录邮箱，点开只有退出 */
.user-chip { position: relative; margin-left: 4px; }
.uc-btn {
  display: flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 10px 0 5px;
  border-radius: 17px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
  transition: border-color .15s, background .15s;
}
.uc-btn:hover { border-color: var(--accent-line); background: var(--accent-bg); color: var(--accent); }
.uc-avatar {
  width: 24px; height: 24px; flex: 0 0 24px; border-radius: 50%;
  background: var(--accent); color: #FFF;
  font-size: 12px; font-weight: 600; line-height: 24px; text-align: center;
}
.uc-mail {
  max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 12.5px;
}
.uc-menu {
  position: absolute; right: 0; top: 42px; z-index: 60;
  min-width: 208px; padding: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: 0 8px 26px rgba(26, 26, 26, .10);
}
.uc-menu-head {
  padding: 8px 10px 9px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 5px;
  display: flex; align-items: center; gap: 8px;
}
.uc-menu-mail {
  flex: 1; min-width: 0; font-size: 12.5px; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.uc-role {
  flex: 0 0 auto; font-style: normal; font-size: 11px;
  padding: 2px 7px; border-radius: 20px;
  background: var(--accent-bg); color: var(--accent);
}
.uc-item {
  display: block; width: 100%; text-align: left;
  padding: 8px 10px; border-radius: var(--r-sm);
  font-size: 13px; color: var(--ink-2);
}
.uc-item:hover { background: var(--bg); color: var(--ink); }
.uc-item .uc-code {
  float: right; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; color: var(--accent); letter-spacing: .4px;
}

@media (max-width: 720px) {
  .uc-mail { display: none; }
  .uc-btn { padding: 0 4px; }
}

/* ============================================================
   主内容
   ============================================================ */
.main {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 32px;
  max-width: 1440px;
  margin: 0 auto;
}
.col-left { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.col-right { flex: 0 0 340px; display: flex; flex-direction: column; gap: 20px; }
.col-full { flex: 1 1 100%; }

/* ============================================================
   识别上传条
   ============================================================ */
.upload-bar {
  display: flex; align-items: center; gap: 18px;
  padding: 26px 28px;
  min-height: 108px;
  box-sizing: border-box;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.upload-bar:hover { border-color: var(--accent); box-shadow: 0 2px 14px rgba(232,84,124,.08); }
.upload-bar.drag { border-color: var(--accent); background: var(--accent-bg); }
.ub-icon {
  width: 56px; height: 56px; flex: 0 0 56px; border-radius: 14px;
  background: var(--accent-bg);
  display: flex; align-items: center; justify-content: center;
}
.ub-icon svg { width: 28px; height: 28px; }
.ub-text { flex: 1; min-width: 0; }
.ub-title { font-size: 16px; font-weight: 500; color: var(--ink); }
.ub-sub { font-size: 13px; color: var(--ink-3); margin-top: 5px; }

.ub-status {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: 9px;
  font-size: 13px; font-weight: 500;
  background: var(--bg); color: var(--ink-3);
  position: relative;
  transition: background .18s, color .18s, box-shadow .18s;
}
.ubs-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-5); flex: 0 0 auto; }
.ub-status[data-state="done"] { background: var(--green-bg); color: var(--green); }
.ub-status[data-state="done"] .ubs-dot { background: var(--green); }
.ub-status[data-state="loading"] { background: var(--amber-bg); color: var(--amber); }
.ub-status[data-state="loading"] .ubs-dot { background: var(--amber); animation: pulse 1s infinite; }
.ub-status[data-state="error"] { background: #FDEDED; color: #C0392B; }
.ub-status[data-state="error"] .ubs-dot { background: #C0392B; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .3 } }

/* ------------------------------------------------------------------
   识别进度：把「一直在转」变成看得见的百分比
   2026-09-15 加 —— 原先服务端一个请求要跑 8~30s 且不会中途回报，
   用户只看到转圈，分不清是卡死还是在干活。
   现在进度条 + 阶段文案 + 已用时，真实反映走到哪一步。
   ------------------------------------------------------------------ */
.ub-status.has-progress {
  padding-bottom: 13px;
  min-width: 190px;
}
.ub-status[data-state="loading"] { box-shadow: 0 0 0 1px rgba(0,0,0,.03); }

/* 进度条：贴在做状态块底边 */
.ub-bar {
  position: absolute; left: 10px; right: 10px; bottom: 6px;
  height: 3px; border-radius: 3px;
  background: rgba(0,0,0,.07);
  overflow: hidden;
  opacity: 0; transition: opacity .2s;
}
.ub-status.has-progress .ub-bar { opacity: 1; }
.ub-bar-fill {
  height: 100%; width: 0%;
  border-radius: 3px;
  background: currentColor;
  transition: width .35s cubic-bezier(.4,0,.2,1);
  position: relative;
}
/* 行进中的流光，暗示"确实在动" */
.ub-status[data-state="loading"] .ub-bar-fill::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent);
  animation: ub-shimmer 1.3s linear infinite;
}
@keyframes ub-shimmer { from { transform: translateX(-100%) } to { transform: translateX(100%) } }

/* 百分比与用时 */
.ubs-pct {
  font-variant-numeric: tabular-nums;
  font-weight: 600; font-size: 12px;
  min-width: 34px; text-align: right;
  flex: 0 0 auto;
}
.ubs-time {
  font-variant-numeric: tabular-nums;
  font-size: 11px; opacity: .72;
  flex: 0 0 auto;
}
.ub-status[data-state="idle"] .ubs-pct,
.ub-status[data-state="idle"] .ubs-time { display: none; }
.ub-status[data-state="done"] .ubs-pct,
.ub-status[data-state="error"] .ubs-pct { display: none; }

/* 慢速提示：超过 8 秒时把气氛从「等待」转成「说明」 */
.ub-status.slow { background: #FFF4E5; }
.ub-hint {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px);
  font-size: 12px; line-height: 1.5; color: var(--ink-3);
  background: var(--card); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 11px;
  box-shadow: 0 4px 14px rgba(0,0,0,.06);
  display: none; z-index: 5;
}
.ub-status.slow .ub-hint { display: block; }

/* 缩略图 */
.thumbs { display: flex; gap: 14px; flex-wrap: wrap; }
.thumb {
  position: relative; width: 240px; height: 240px;
  border-radius: var(--r-md); overflow: hidden;
  border: 1px solid var(--line); background: var(--card);
  cursor: zoom-in;
  transition: transform .15s, box-shadow .15s;
}
.thumb:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.09); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-tag {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 6px 10px; font-size: 12px;
  background: linear-gradient(transparent, rgba(0,0,0,.72));
  color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 缩略图右上角的删除按钮 */
.thumb-del {
  position: absolute; top: 8px; right: 8px;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.55); color: #fff;
  border: none; cursor: pointer; padding: 0;
  opacity: 0; transform: scale(.85);
  transition: opacity .15s, transform .15s, background .15s;
  backdrop-filter: blur(4px);
}
.thumb:hover .thumb-del { opacity: 1; transform: scale(1); }
.thumb-del:hover { background: #DC2626; }
.thumb-del:active { transform: scale(.92); }
.thumb-del svg { width: 16px; height: 16px; pointer-events: none; }

/* ============================================================
   报价单
   ============================================================ */
.sheet {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 32px;
  display: flex; flex-direction: column; gap: 24px;
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sh-left { display: flex; align-items: center; gap: 12px; }
.co-logo {
  width: 52px; height: 52px; flex: 0 0 52px; border-radius: 12px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
}

/* 保司标识徽章：官方品牌色 + 名称缩写（不用别家商标图） */
.co-badge {
  flex: 0 0 auto; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; letter-spacing: .5px;
  line-height: 1; user-select: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .13);
}
.co-badge-slot { flex: 0 0 auto; display: flex; }
.co-badge span { transform: translateY(-.5px); }
.sh-texts { display: flex; flex-direction: column; gap: 5px; }
.sh-title { font-size: 19px; font-weight: 700; display: flex; align-items: center; gap: 2px; }
.sh-co {
  font-size: 19px; font-weight: 700;
  /* 宽度跟随内容走，避免「中国人民保险」被 96px 切掉为「中国人民保」 */
  width: auto; min-width: 0; max-width: 280px;
  border: none; background: transparent; padding: 0;
  border-bottom: 1px dashed transparent; transition: border-color .15s;
  /* field-sizing: content 在 Chrome 123+ 真正按内容撑宽 input；老浏览器降级到 size 属性 */
  field-sizing: content;
}
.sh-co:hover, .sh-co:focus { border-bottom-color: var(--line-strong); }
.sh-meta { font-size: 12.5px; color: var(--ink-3); }
.sh-right { display: flex; flex-direction: column; gap: 5px; align-items: flex-end; }
.sh-time-label { font-size: 12px; color: var(--ink-4); }
.sh-time-val { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.sheet-div { height: 1px; background: var(--line-soft); }

/* 标的元信息 */
.meta-row {
  display: flex; gap: 14px; flex-wrap: wrap;
  padding: 14px 16px;
  background: var(--sub-bg); border-radius: var(--r-md);
}
.meta-row label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 11.5px; color: var(--ink-3); flex: 1 1 130px; min-width: 0;
}
/* 车型要占更宽 —— 厂牌型号常有「鑫源JKC6462B6X2多用途乘用车」这种长串 */
.meta-row label.lg { flex: 1.6 1 220px; }
.meta-row input, .meta-row textarea {
  border: none; background: transparent; padding: 0 0 2px;
  font-size: 13.5px; font-weight: 500; color: var(--ink);
  border-bottom: 1px solid transparent; transition: border-color .15s;
  width: 100%;
  font-family: inherit;   /* textarea 默认等宽字体，要继承 */
}
.meta-row input:hover, .meta-row input:focus,
.meta-row textarea:hover, .meta-row textarea:focus { border-bottom-color: var(--line-strong); }

/* 车型输入框：随内容自动增高，写不下就换行，不截断 */
.meta-row textarea {
  resize: none; overflow: hidden;
  line-height: 1.4;
  word-break: break-all;
}

/* 区块 */
.sec { display: flex; flex-direction: column; gap: 10px; }
.sec-title { font-size: 14.5px; font-weight: 700; }

/* 区块标题行：标题 + 添加险种 */
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sec-add {
  display: flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 500; color: var(--ink-3);
  background: transparent; border: 1px dashed var(--line-strong);
  transition: all .14s;
}
.sec-add:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-bg); }

/* 明细行 */
.item-list { display: flex; flex-direction: column; }
.item-row {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; min-height: 46px;
  border-bottom: 1px solid var(--line-soft);
}
.item-row .it-name,
.item-row .it-cov,
.item-row .it-num {
  border: none; background: transparent; padding: 2px 0;
  font-size: 13.5px; border-bottom: 1px dashed transparent;
  transition: border-color .15s;
}
.item-row .it-name { flex: 1; min-width: 0; color: var(--ink); }
.item-row .it-cov {
  flex: 0 0 180px; text-align: right; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.item-row .it-num {
  flex: 0 0 160px; text-align: right; font-weight: 500;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.item-row .it-name:hover, .item-row .it-name:focus,
.item-row .it-cov:hover, .item-row .it-cov:focus,
.item-row .it-num:hover, .item-row .it-num:focus { border-bottom-color: var(--line-strong); }
.item-del {
  flex: 0 0 18px; width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-5); border-radius: 5px;
  opacity: 0; transition: all .14s;
}
.item-row:hover .item-del { opacity: 1; }
.item-del:hover { color: #C0392B; background: #FDEDED; }

/* 明细为空时的提示 */
.item-empty {
  padding: 12px 14px; font-size: 12.5px; color: var(--ink-4);
  border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: center; gap: 10px;
}
/* 空态里的「一键铺开常用险种」 */
.item-quick {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 4px 11px; font-size: 12px; color: var(--accent); cursor: pointer;
  transition: background .15s, border-color .15s;
}
.item-quick:hover { background: var(--accent-bg); border-color: var(--accent); }

/* 表格 */
.tbl { display: flex; flex-direction: column; }
/* gap 与尾部占位对齐明细行：明细行末尾有 18px 删除按钮 + 8px gap，
   而表头/合计行没有。补上同宽占位后，各列才能严格右对齐。 */
.tr { display: flex; align-items: center; padding: 12px 14px; min-height: 46px; gap: 8px; }
.tr.th::after, .tr.sub::after { content: ''; flex: 0 0 18px; }
.tr.th {
  background: var(--th-bg); border-radius: var(--r-sm);
  padding-top: 9px; padding-bottom: 9px; min-height: 0;
}
.tr.th span { font-size: 12.5px; font-weight: 500; color: var(--ink-3); }
.tr:not(.th):not(:last-child) { border-bottom: 1px solid var(--line-soft); }
.tr.sub { background: var(--sub-bg); border-radius: var(--r-sm); border-bottom: none; }
.tr.sub .td-name { font-weight: 700; }
.tr.sub .td-num { font-weight: 700; }

.td-name { flex: 1; min-width: 0; font-size: 13.5px; color: var(--ink); }
.td-cov { flex: 0 0 180px; text-align: right; font-size: 13.5px; color: var(--ink-2); }
.td-num { flex: 0 0 160px; text-align: right; font-size: 13.5px; font-weight: 500; font-variant-numeric: tabular-nums; }

.cell {
  width: 100%; border: none; background: transparent;
  text-align: right; font-size: 13.5px; padding: 2px 0;
  border-bottom: 1px dashed transparent; transition: border-color .15s;
  font-variant-numeric: tabular-nums;
}
.cell:hover, .cell:focus { border-bottom-color: var(--line-strong); }
.cell.num { font-weight: 500; }

/* 合计带 —— 品牌粉渐变（原为纯黑 #1A1A1A，观感过重） */
.sum-band {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 28px;
  background: linear-gradient(135deg, #E8547C 0%, #C9557E 100%);
  border-radius: var(--r-lg);
  margin-top: 4px;
  box-shadow: 0 6px 18px rgba(232, 84, 124, .22);
}
.sb-label { font-size: 14px; color: rgba(255, 255, 255, .82); }
.sb-value { font-size: 34px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }

/* ============================================================
   右栏卡片
   ============================================================ */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex; flex-direction: column; gap: 16px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-title { font-size: 14.5px; font-weight: 700; }
.card-hint { font-size: 11.5px; color: var(--ink-4); }
.ch-icon {
  width: 28px; height: 28px; flex: 0 0 28px; border-radius: 8px;
  background: var(--amber-bg);
  display: flex; align-items: center; justify-content: center;
}
.card-head:has(.ch-icon) { justify-content: flex-start; }
.card-div { height: 1px; background: var(--line-soft); }

/* 佣金行 */
.comm-row { display: flex; flex-direction: column; gap: 12px; }
.cr-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cr-label { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cr-name { font-size: 13.5px; font-weight: 500; }
.cr-base { font-size: 11.5px; color: var(--ink-4); font-variant-numeric: tabular-nums; }

/* 比例调节器 —— 设计稿规格 */
/* ⚠️ 2026-09-19 欢哥**第三次**反馈「加减号还是有遮挡」，这次从截图逐列量清楚了：
   **没有元素重叠** —— 粉框右缘与按钮左缘之间有 6px 干净间隙（逐列扫描全白）。
   真正的问题是「**视觉拥挤**」：粉框紧贴按钮、框里的数字又贴死框的右边缘，
   两者叠加就读成"数字被按钮顶住"。欢哥的建议是「把粉框放中间或靠左一点」——
   方向正确，照做：
     ① gap 6 → 12px：粉框整体**往左挪** 6px，与按钮拉开呼吸
     ② 宽度 88 → 92px：给数字更多余量
     ③ 数字**在框内居中**（不再贴右边缘），视觉上远离按钮
   ⚠️ 别再靠"加大间隙"无限加码 —— 6px 间隙本身是够的，问题是数字贴边叠加放大了观感。 */
.stepper { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.st-field {
  display: flex; align-items: center; justify-content: center; gap: 3px;
  width: 92px; height: 40px; padding: 0 10px;
  border-radius: 9px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-line);
  transition: border-color .15s, box-shadow .15s;
}
.st-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232,84,124,.13); }
/* ⚠️⚠️ 这里是「加减号遮挡」真正的病根（2026-09-19 定，别改回去）：
   `<input>` 有 HTML 默认内在宽度（`size=20` ≈ 230px）。用 `width: 100%` 时
   flex-basis 取 auto → 解析成 100%，内在宽度照样参与 min-content 计算，
   一路上传到 `.st-field` → `.stepper`，使 `.stepper` 的 min-content 达到 **333px**。
   窄屏上卡片可用的只有 325px ⇒ **卡片被撑破、页面横向溢出**（360px 实测 371px）。
   同一个病根也解释了「按钮压住输入框」：争宽时输入框被压窄、按钮固定不缩。

   ⇒ 必须 `width: 0` + `flex: 1 1 0`：把 flex-basis 归零、由剩余空间分配，
     min-content 贡献变成 0。**`min-width: 0` 治不了这个**（已实测无效），
     因为问题出在 flex-basis 而非 min-width。 */
.st-field input {
  width: 0; flex: 1 1 0; min-width: 0;
  border: none; background: transparent;
  /* text-align: right —— 数字贴**框内右侧**，与紧跟其后的「%」连成一个整体（如「16 %」）。
     ⚠️ 别改成 center：手机上输入框会吃满整行（实测 221px），
        center 会把「16」丢到行中间、把「%」留在最右，数字和百分号被拆散。
     （桌面端与右侧按钮的呼吸靠 `.stepper` 的 gap 12px 解决，不靠这里。） */
  text-align: right; font-size: 19px; font-weight: 700;
  color: var(--accent); font-variant-numeric: tabular-nums;
}
.st-pct { font-size: 13px; font-weight: 500; color: var(--accent-deep); }

.st-arrows { display: flex; flex-direction: column; gap: 3px; width: 38px; height: 40px; }
.st-btn {
  flex: 1; display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm); background: var(--card);
  border: 1px solid var(--line-strong);
  transition: all .12s;
}
.st-btn:hover { border-color: var(--accent); background: var(--accent-bg); }
.st-btn:hover svg path { stroke: var(--accent); }
.st-btn:active { transform: scale(.94); }

/* 常用比例预设 */
.cr-presets { display: flex; gap: 6px; }
.preset {
  flex: 1; padding: 5px 0; border-radius: 6px;
  font-size: 11.5px; font-weight: 500; color: var(--ink-3);
  background: var(--bg); border: 1px solid transparent;
  transition: all .12s;
}
.preset:hover { border-color: var(--accent-line); color: var(--accent); background: var(--accent-bg); }
.preset.active { background: var(--accent-bg); border-color: var(--accent-line); color: var(--accent); font-weight: 700; }

/* 佣金结果条 */
.cr-result {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: 9px; background: var(--sub-bg);
}
.crr-label { font-size: 12px; color: var(--ink-3); }
.crr-value { font-size: 17px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }

/* 交强险备注 */
.jq-note { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-4); }

/* 佣金合计 */
.comm-total {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 16px; border-radius: 11px;
  background: var(--accent-bg);
}
.ct-label { font-size: 13px; font-weight: 500; color: var(--accent-deep); }
.ct-value { font-size: 24px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }

/* 续保提醒 */
.remind-value { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.remind-note { font-size: 12px; color: var(--ink-3); margin-top: -8px; }

/* ============================================================
   按钮
   ============================================================ */
.actions { display: flex; flex-direction: column; gap: 10px; }
/* ⚠️ .btn 默认不设 width:100%！
   100% 只属于「侧边栏竖排按钮组」(.actions 的子按钮)。
   全局写 100% 会让弹窗底部 .modal-f（横排 flex）里的两个按钮互相挤压：
   前一个被压成空白小方块、后一个横向溢出 —— 这是穿帮的根因。 */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: auto; padding: 13px 16px; border-radius: var(--r-md);
  font-size: 14px; font-weight: 500;
  transition: all .15s;
}
.actions > .btn { width: 100%; }
/* 主操作按钮 —— 品牌粉渐变（原为纯黑，与合计带一起改） */
.btn-dark {
  background: linear-gradient(135deg, #E8547C 0%, #C9557E 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(232, 84, 124, .26);
}
.btn-dark:hover {
  background: linear-gradient(135deg, #E4597F 0%, #B94B72 100%);
  box-shadow: 0 7px 20px rgba(232, 84, 124, .34);
  transform: translateY(-1px);
}
.btn-dark:active { transform: translateY(0); box-shadow: 0 3px 10px rgba(232, 84, 124, .24); }
.btn-light { background: var(--card); color: var(--ink-2); border: 1px solid var(--line-strong); }
.btn-light:hover { border-color: var(--ink-5); background: var(--bg); }
.btn-light.muted { color: var(--ink-3); }
/* 带边框的 .btn-light 会比无边框的 .btn-dark / .btn-danger 高 2px ——
   并排时（弹窗底部、台账工具条）上下边缘差一截。给主按钮补一层透明边框统一高度。 */
.btn-dark, .btn-danger { border: 1px solid transparent; }
.btn.sm { width: auto; padding: 8px 14px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ============================================================
   台账表格
   ============================================================ */

/* 切换标签页时，非当前面板必须真正消失。
   .col-left/.col-right 带 display:flex，会盖掉 hidden 属性本身，
   导致切到「报价台账」后录入栏还留在左侧（2026-09-15 修复） */
[hidden] { display: none !important; }

.hist-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hist-tools input {
  border: 1px solid var(--line-strong); border-radius: 8px;
  padding: 7px 12px; font-size: 13px; background: var(--card);
}
.hist-tools input:focus { border-color: var(--accent); }
.hist-tools input[type="text"] { min-width: 220px; }

/* 筛选 chip 行 */
.hist-filters {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  margin: 14px 0 16px;
}

/* 结果计数 */
.hist-foot {
  font-size: 12.5px; color: var(--ink-4);
  padding: 12px 2px 0;
}
.hist-foot b { color: var(--ink-2); font-weight: 500; }

/* 快捷筛选 chips */
.chip {
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 6px 14px; font-size: 12.5px; color: var(--ink-3);
  background: var(--card); cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active {
  background: var(--accent-soft, #FDF0F4); border-color: var(--accent);
  color: var(--accent); font-weight: 500;
}

.table-wrap { overflow-x: auto; margin: 0 -20px -20px; padding: 0 20px 20px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  text-align: left; padding: 9px 12px; background: var(--th-bg);
  font-size: 12.5px; font-weight: 500; color: var(--ink-3);
  white-space: nowrap;
}
.data-table th:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.data-table th:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.data-table td { padding: 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table td.nowrap { white-space: nowrap; }
.data-table tr:last-child td { border-bottom: none; }
.data-table .empty { text-align: center; color: var(--ink-4); padding: 40px 0; }

/* 保司 / 车牌 不折行（截图里「阳光车险」被竖排拆开过） */
.data-table td.co { white-space: nowrap; }

/* 下次报价：按紧迫度三档着色 */
.remind-pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 500; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.remind-pill.urgent { background: #FCEBEB; color: #A32D2D; }
.remind-pill.soon   { background: #FAEEDA; color: #854F0B; }
.remind-pill.far    { background: #F1EFE8; color: #5F5E5A; }
.remind-pill.none   { background: transparent; color: var(--ink-4); font-weight: 400; }

/* 搜索命中高亮：粉底 + 加深字色，白底上要能一眼看出 */
.hit { background: #FBD8E4; border-radius: 3px; padding: 0 2px; color: #A32D5C; font-weight: 500; }

.link-del { color: var(--ink-4); font-size: 12.5px; }
.link-del:hover { color: #C0392B; }
.coin { color: var(--accent); font-weight: 500; }

/* 台账里被选用的方案 */
.row-chosen {
  display: inline-block; margin-left: 6px; vertical-align: 1px;
  font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 100px;
  background: var(--green-bg); color: var(--green);
}
tr.is-selected { background: #FAFDFB; }

/* 比价空状态 */
.cmp-empty { text-align: center; padding: 48px 0; }
.cmp-empty-title { font-size: 15px; font-weight: 500; color: var(--ink-2); }
.cmp-empty-sub { font-size: 12.5px; color: var(--ink-4); margin-top: 6px; }

/* ============================================================
   多司比价
   ------------------------------------------------------------
   列宽用 minmax(0,1fr) + auto-fit：宽屏 3 列、中屏 2 列、窄屏 1 列，
   方案多时自动换行向下排列，不需要额外媒体查询。
   ============================================================ */
#panel-compare { display: flex; flex-direction: column; gap: 18px; }
.cmp-bar-card { padding: 16px 20px; }
.cmp-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cmp-bar-left { display: flex; flex-direction: column; gap: 4px; }
.cmp-bar-title { font-size: 15px; font-weight: 700; }
.cmp-bar-sub { font-size: 12px; color: var(--ink-4); }
.cmp-plates { display: flex; gap: 8px; flex-wrap: wrap; }
.cmp-plate-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 100px; font-size: 12.5px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink-2);
  transition: border-color .15s, background .15s, color .15s;
}
.cmp-plate-chip em { font-style: normal; font-size: 11px; color: var(--ink-4); }
.cmp-plate-chip:hover { border-color: var(--accent); color: var(--accent); }
.cmp-plate-chip.active { background: var(--accent-bg); border-color: var(--accent-line); color: var(--accent-deep); font-weight: 600; }
.cmp-loading { text-align: center; padding: 40px 0; color: var(--ink-4); font-size: 13px; }

.cmp-group { display: flex; flex-direction: column; gap: 12px; }
.cg-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 12px; padding: 0 4px; flex-wrap: wrap;
}
.cg-plate { font-size: 17px; font-weight: 700; letter-spacing: .3px; }
.cg-meta { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.cg-head-right { display: flex; align-items: center; gap: 10px; }
.cg-saving {
  font-size: 12px; font-weight: 600; color: var(--accent-deep);
  background: var(--accent-bg); border: 1px solid var(--accent-line);
  padding: 4px 10px; border-radius: 100px;
}
.cg-count { font-size: 12.5px; color: var(--ink-4); }

.cg-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: start;
}

/* 单个方案列 */
.qc {
  background: var(--card); border: 1.5px solid var(--line);
  border-radius: var(--r-lg); padding: 18px;
  display: flex; flex-direction: column; gap: 14px;
  transition: border-color .16s, box-shadow .16s, transform .16s;
  cursor: pointer;
}
.qc:hover { border-color: var(--line-strong); box-shadow: 0 4px 18px rgba(0,0,0,.05); }
.qc.picked { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.qc.chosen { border-color: var(--green); }

.qc-top { display: flex; align-items: center; gap: 11px; }
.qc-badge { flex: 0 0 auto; display: flex; }
.qc-co { flex: 1 1 auto; min-width: 0; }
.qc-co-name { font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qc-co-time { font-size: 11.5px; color: var(--ink-4); margin-top: 3px; }

/* 「使用该方案」：hover 才显形，避免一屏全是按钮 */
.qc-use {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px;
  background: var(--ink); color: #fff;
  padding: 7px 12px; border-radius: 100px; font-size: 12px; font-weight: 600;
  opacity: 0; transform: translateX(4px); pointer-events: none;
  transition: opacity .16s, transform .16s, background .16s;
  white-space: nowrap;
}
.qc:hover .qc-use, .qc.picked .qc-use { opacity: 1; transform: none; pointer-events: auto; }
.qc-use:hover { background: var(--accent); }
.qc-use:disabled { opacity: .55; cursor: default; }
/* 已选用的方案按钮常显，否则用户看不出还能再改 */
.qc.chosen .qc-use { opacity: 1; transform: none; pointer-events: auto; background: var(--green); }

.qc-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: -4px; }
.qc-tag { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 100px; }
.qc-tag.cheap { background: var(--accent-bg); color: var(--accent-deep); }
.qc-tag.chosen { background: var(--green-bg); color: var(--green); }

.qc-sec { display: flex; flex-direction: column; gap: 8px; }
.qc-sec-head { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; }
.qc-sec-head i { width: 3px; height: 14px; border-radius: 2px; display: block; }

.qc-tbl { display: flex; flex-direction: column; }
.qc-row { display: flex; align-items: center; padding: 9px 8px; }
.qc-row.qc-th { background: var(--th-bg); border-radius: 6px; padding: 7px 8px; }
.qc-row.qc-th span { font-size: 11.5px; font-weight: 500; color: var(--ink-3); }
.qc-row:not(.qc-th):not(:last-child) { border-bottom: 1px solid var(--line-soft); }
.qc-row.qc-sub { background: var(--sub-bg); border-radius: 6px; border-bottom: none; }
.qc-row.qc-sub .qc-name, .qc-row.qc-sub .qc-num { font-weight: 700; }

.qc-name { flex: 1 1 auto; min-width: 0; font-size: 12.5px; }
/* 保额列：报价单里常出现「道路家安组合保险」那种整段条款说明，
   不限高会把整行撑成十几行 —— 夹到 2 行，完整文本走 title 悬浮提示 */
.qc-cov {
  flex: 0 1 auto; text-align: right; font-size: 12px; color: var(--ink-2);
  padding-left: 8px; max-width: 44%;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-all;
}
.qc-num { flex: 0 0 auto; text-align: right; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; padding-left: 10px; min-width: 62px; }

.qc-total {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-radius: var(--r-md); padding: 13px 15px;
}
.qc-total-label { font-size: 12.5px; color: rgba(255,255,255,.86); }
.qc-total-note { font-size: 10px; color: rgba(255,255,255,.62); margin-top: 3px; white-space: nowrap; }
.qc-total-value { font-size: 22px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }

.qc-comm {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12.5px; color: var(--ink-3);
  border-top: 1px dashed var(--line-strong); padding-top: 12px;
}
.qc-comm b { color: var(--accent); font-size: 14px; font-variant-numeric: tabular-nums; }

/* 窄屏：按钮常显（触屏无 hover） */
@media (max-width: 720px) {
  .qc-use { opacity: 1; transform: none; pointer-events: auto; }
  .cg-grid { grid-template-columns: 1fr; }
  .qc-cov { max-width: 34%; }
}

/* ============================================================
   客户版报价单（导出用，屏幕外渲染）
   ============================================================ */
.export-stage {
  position: fixed; left: -10000px; top: 0;
  width: 920px; background: #fff;
  font-family: "Noto Sans SC", -apple-system, "PingFang SC", sans-serif;
}
.cust-sheet { width: 920px; padding: 48px; background: #fff; }

.cs-head { display: flex; align-items: center; justify-content: space-between; }
.cs-head-left { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1 1 auto; }
/* 客户版报价单头部：保司标识徽章（导出 PNG 用，需独立于屏幕样式） */
.cs-head-badge { flex: 0 0 auto; display: flex; }
.cs-head-badge .co-badge { border-radius: 13px; }
.cs-head-texts { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1 1 auto; }
.cs-title { font-size: 23px; font-weight: 700; color: #1A1A1A; white-space: nowrap; padding-right: 4px; }
.cs-meta { font-size: 13px; color: #8A8A85; }
.cs-time { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex: 0 0 auto; }
.cs-head-div { height: 2px; background: #1A1A1A; margin-top: 24px; }

.cs-sec { margin-top: 28px; display: flex; flex-direction: column; gap: 12px; }
.cs-sec-head { display: flex; align-items: center; gap: 9px; }
/* 小竖条颜色由 JS 按保司品牌色注入，此处仅兜底 */
.cs-bar { width: 3px; height: 16px; border-radius: 2px; background: #E8547C; }
.cs-sec-title { font-size: 15.5px; font-weight: 700; color: #1A1A1A; }

.cs-tbl { display: flex; flex-direction: column; }
.cs-tr { display: flex; align-items: center; padding: 14px 16px; }
.cs-tr.cs-th { background: #F5F5F2; border-radius: 7px; padding-top: 11px; padding-bottom: 11px; }
.cs-tr.cs-th span { font-size: 13px; font-weight: 500; color: #8A8A85; }
.cs-tr:not(.cs-th):not(:last-child) { border-bottom: 1px solid #EDEDE9; }
.cs-tr.cs-sub { background: #FAF9F7; border-radius: 7px; border-bottom: none; }
.cs-tr.cs-sub .cs-name,
.cs-tr.cs-sub .cs-num { font-weight: 700; }

.cs-name { flex: 1; min-width: 0; font-size: 14px; color: #1A1A1A; }
.cs-cov { flex: 0 0 170px; text-align: right; font-size: 14px; color: #4A4A45; }
.cs-num { flex: 0 0 150px; text-align: right; font-size: 14px; font-weight: 600; color: #1A1A1A; font-variant-numeric: tabular-nums; }

.cs-total-band {
  margin-top: 36px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px 28px; border-radius: 14px;
  /* 背景色由 JS 按保司品牌色注入（见 buildCustomerSheet），此处仅兜底 */
  background: #1A1A1A;
}
.cs-tb-left { display: flex; flex-direction: column; gap: 6px; }
.cs-tb-label { font-size: 14px; color: rgba(255, 255, 255, .84); }
.cs-tb-note { font-size: 11.5px; color: rgba(255, 255, 255, .62); }
.cs-tb-value { font-size: 36px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }

.cs-foot {
  margin-top: 28px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11.5px; color: #A8A8A3;
}

/* ============================================================
   Lightbox / Toast
   ============================================================ */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(16,16,16,.9);
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
}
.lightbox[hidden] { display: none; }
.lightbox-img { max-width: 100%; max-height: 88vh; border-radius: var(--r-md); }
.lightbox-close {
  position: absolute; top: 24px; right: 28px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.14); color: #fff; font-size: 24px; line-height: 1;
}
.lightbox-close:hover { background: rgba(255,255,255,.26); }
.lightbox-caption {
  position: absolute; bottom: 28px; left: 0; right: 0;
  text-align: center; color: rgba(255,255,255,.72); font-size: 13px;
}

.toast {
  position: fixed; left: 50%; bottom: 36px; transform: translate(-50%, 20px);
  background: var(--ink); color: #fff;
  padding: 12px 22px; border-radius: var(--r-md);
  font-size: 13.5px; opacity: 0; pointer-events: none;
  transition: opacity .22s, transform .22s;
  z-index: 300; max-width: 82vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.success { background: var(--green); }
.toast.error { background: #C0392B; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1100px) {
  .main { flex-direction: column; padding: 20px; }
  .col-left, .col-right { flex: 1 1 auto; width: 100%; }
  .col-right { flex-direction: row; flex-wrap: wrap; }
  .col-right > * { flex: 1 1 300px; }
}
@media (max-width: 900px) {
  /* 缩略图随视口缩，避免 240px 撑破窄屏 */
  .thumb { width: 180px; height: 180px; }
}
@media (max-width: 720px) {
  .topbar { padding: 0 16px; height: 64px; }
  .tb-left { gap: 16px; }
  .brand-name { display: none; }
  .nav-item { padding: 6px 10px; font-size: 12.5px; }
  .sheet { padding: 20px; }
  .td-cov { flex: 0 0 90px; }
  .td-num { flex: 0 0 100px; }
  .meta-row label { flex: 1 1 45%; }
  .col-right { flex-direction: column; }
  .thumb { width: 46vw; height: 46vw; }
  /* 触屏没有 hover，删除按钮常显，且加大点击区 */
  .thumb-del { opacity: 1; transform: scale(1); width: 36px; height: 36px; }
  .thumb-del svg { width: 18px; height: 18px; }
  /* 上传条收紧内距，图标略缩（此宽度仍够横排，不必竖排） */
  .upload-bar { padding: 20px; gap: 14px; min-height: 92px; }
  .ub-icon { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 12px; }
  .ub-icon svg { width: 24px; height: 24px; }
  .ub-title { font-size: 15px; }
}
/* 窄到放不下「图标 + 文案 + 状态」时，才改成上下排布 */
@media (max-width: 480px) {
  .upload-bar { flex-direction: column; align-items: flex-start; gap: 14px; min-height: 0; padding: 20px; }
  .ub-status { align-self: flex-start; }
}

/* ============================================================
   积分与充值（2026-09-16 加）
   ============================================================ */

/* ---------- 顶栏积分胶囊 ---------- */
.credits-pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--line-soft, #F0F0EC); border: 1px solid var(--line, #E8E8E4);
  border-radius: 999px; padding: 5px 12px 5px 9px;
  font-size: 13px; transition: .15s; flex-shrink: 0;
}
.credits-pill:hover { border-color: var(--accent-line, #F0D3DC); background: var(--accent-bg, #FDF0F4); }
.cp-coin {
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--accent, #E8547C); color: #FFF;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.credits-pill b { font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.2px; }
.cp-unit { color: var(--ink-3, #8A8A85); font-size: 12px; }
.cp-diamond { color: var(--accent, #E8547C); font-size: 12px; line-height: 1; }
.credits-pill.low b { color: var(--amber, #D8912F); }
.credits-pill.zero b { color: var(--accent, #E8547C); }

/* ---------- 免责声明条 ---------- */
.disclaimer {
  background: #FFFDF7;
  border-bottom: 1px solid #F2E6CE;
}
.dc-inner {
  max-width: 1560px; margin: 0 auto; padding: 10px 28px;
  display: flex; align-items: flex-start; gap: 10px;
}
.dc-tag {
  flex-shrink: 0; font-size: 11.5px; font-weight: 600;
  color: var(--amber, #D8912F); background: var(--amber-bg, #FFF7EA);
  border: 1px solid #F2E0C0; border-radius: 999px; padding: 2px 9px;
  margin-top: 1px; white-space: nowrap;
}
.dc-text {
  flex: 1; font-size: 12px; line-height: 1.65; color: #7A6A50;
  margin: 0;
}
.dc-text b { color: #6A5636; font-weight: 600; }
.dc-close {
  flex-shrink: 0; font-size: 12px; color: #A89478;
  padding: 2px 8px; border-radius: 6px; transition: .15s; margin-top: 1px;
}
.dc-close:hover { background: #F7EFDE; color: #7A6A50; }
.disclaimer.collapsed .dc-text { display: none; }
.disclaimer.collapsed .dc-inner { align-items: center; }

/* ---------- 通用弹窗 ---------- */
.modal {
  position: fixed; inset: 0; background: rgba(20,20,20,.34);
  display: flex; align-items: center; justify-content: center;
  z-index: 120; padding: 20px; backdrop-filter: blur(2px);
}
.modal-card {
  background: var(--card, #FFF); border-radius: var(--r-lg, 14px);
  width: 100%; max-width: 520px; max-height: 88vh;
  display: flex; flex-direction: column;
  box-shadow: 0 22px 60px rgba(0,0,0,.2); overflow: hidden;
  animation: mpop .16s ease-out;
}
@keyframes mpop { from { transform: translateY(8px) scale(.985); opacity: 0; } }
.modal-head {
  padding: 16px 20px; border-bottom: 1px solid var(--line, #E8E8E4);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.mh-title { font-size: 15px; font-weight: 700; }
.mh-sub { font-size: 12px; color: var(--ink-3, #8A8A85); margin-top: 2px; }
.mh-close {
  font-size: 22px; line-height: 1; color: var(--ink-4, #A8A8A3);
  padding: 0 4px; transition: .15s;
  /* 「×」是文字字形，左右各带 ~5px 字身留白，看着会比下方按钮的右边缘往里缩。
     用负外边距把它顶回内容右边缘（并顺带把点击热区做大一点），视觉上才对齐。
     margin-top -2px 是让「×」的视觉中心与标题首行对齐。 */
  margin: -2px -6px 0 0;
}
.mh-close:hover { color: var(--ink, #1A1A1A); }
.modal-f {
  padding: 13px 20px; border-top: 1px solid var(--line, #E8E8E4);
  background: #FAF9F7; display: flex; justify-content: flex-end; gap: 9px;
}
.modal-f.center { justify-content: center; }
.fl { display: block; font-size: 12px; color: var(--ink-3, #8A8A85); margin-bottom: 5px; }

/* ---------- 积分卡 ---------- */
.cr-card { max-width: 560px; }
.cr-balance {
  margin: 16px 20px 0; padding: 15px 18px;
  background: linear-gradient(135deg, var(--accent-bg, #FDF0F4) 0%, #FFF 100%);
  border: 1px solid var(--accent-line, #F0D3DC); border-radius: var(--r-md, 10px);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.crb-label { font-size: 12px; color: var(--ink-3, #8A8A85); display: block; margin-bottom: 1px; }
.crb-val {
  font-size: 28px; font-weight: 700; letter-spacing: -.8px;
  color: var(--accent, #E8547C); font-variant-numeric: tabular-nums;
}
.crb-val em { font-size: 13px; font-weight: 500; font-style: normal; margin-left: 3px; color: var(--ink-3, #8A8A85); }
.crb-right { text-align: right; font-size: 12px; color: var(--ink-3, #8A8A85); line-height: 1.9; }
.crb-right b { color: var(--ink-2, #4A4A45); font-variant-numeric: tabular-nums; }
.crb-right span { display: block; }

.cr-price {
  margin: 10px 20px 0; padding: 9px 13px;
  background: #EEF3FB; border-radius: var(--r-sm, 7px);
  font-size: 12px; color: #3A72C4; line-height: 1.65;
}

.modal-tabs {
  display: flex; gap: 3px; padding: 14px 20px 0;
  border-bottom: 1px solid var(--line, #E8E8E4);
}
.mtab {
  padding: 8px 13px; font-size: 13px; color: var(--ink-3, #8A8A85);
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: .15s;
}
.mtab:hover { color: var(--ink-2, #4A4A45); }
.mtab.active { color: var(--accent, #E8547C); border-bottom-color: var(--accent, #E8547C); font-weight: 600; }

.cr-pane { padding: 18px 20px 20px; overflow-y: auto; }
.tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tier {
  border: 1px solid var(--line-strong, #E0E0DB); border-radius: var(--r-md, 10px);
  padding: 14px 15px; cursor: pointer; transition: .15s; position: relative;
  background: var(--card, #FFF); text-align: left;
}
.tier:hover { border-color: var(--accent, #E8547C); background: var(--accent-bg, #FDF0F4); transform: translateY(-1px); }
.tier-yuan { font-size: 20px; font-weight: 700; letter-spacing: -.5px; }
.tier-yuan em { font-size: 13px; font-weight: 500; font-style: normal; }
.tier-cred { font-size: 13px; color: var(--ink-2, #4A4A45); margin-top: 4px; }
.tier-cred b { color: var(--accent, #E8547C); font-size: 15px; }
.tier-per { font-size: 11.5px; color: var(--ink-4, #A8A8A3); margin-top: 5px; }
.tier-tag {
  position: absolute; top: -1px; right: -1px;
  font-size: 10.5px; font-weight: 600; color: #FFF;
  background: var(--accent, #E8547C);
  border-radius: 0 var(--r-md, 10px) 0 var(--r-md, 10px);
  padding: 2px 8px;
}
.tier-tag.best { background: linear-gradient(135deg, #E8547C, #D8912F); }
.cr-pay-hint {
  margin-top: 14px; font-size: 12px; color: var(--ink-3, #8A8A85);
  text-align: center; line-height: 1.7;
}

.cr-list { display: flex; flex-direction: column; gap: 1px; }
.cr-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 2px; border-bottom: 1px solid var(--line-soft, #F0F0EC);
  font-size: 12.5px;
}
.cr-row:last-child { border-bottom: none; }
.crl-main { min-width: 0; }
.crl-title { color: var(--ink-2, #4A4A45); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crl-time { font-size: 11.5px; color: var(--ink-4, #A8A8A3); margin-top: 1px; }
.crl-delta { font-weight: 700; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.crl-delta.plus { color: var(--green, #2FA36B); }
.crl-delta.minus { color: var(--accent, #E8547C); }
.cr-empty { text-align: center; padding: 34px 12px; color: var(--ink-4, #A8A8A3); font-size: 13px; }
.cr-status {
  font-size: 11px; padding: 1px 8px; border-radius: 999px; flex-shrink: 0;
  line-height: 17px; font-weight: 500;
}
.cr-status.pending { background: var(--amber-bg, #FFF7EA); color: var(--amber, #D8912F); }
.cr-status.paid { background: var(--green-bg, #EDF7F1); color: var(--green, #2FA36B); }
.cr-status.cancelled, .cr-status.expired { background: var(--line-soft, #F0F0EC); color: var(--ink-4, #A8A8A3); }

/* ---------- 付款指引 ---------- */
.pay-card { max-width: 430px; }
.pm-body { padding: 18px 20px; overflow-y: auto; }
.pm-code {
  text-align: center; padding: 13px;
  background: var(--line-soft, #F0F0EC); border-radius: var(--r-md, 10px);
  margin-bottom: 15px;
}
.pm-code-label { display: block; font-size: 11.5px; color: var(--ink-3, #8A8A85); margin-bottom: 4px; }
.pm-code b {
  font-size: 21px; letter-spacing: 2.5px; font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--accent, #E8547C);
}
.pm-qrs { display: flex; gap: 12px; justify-content: center; margin-bottom: 14px; }
.pm-qr {
  flex: 1; max-width: 168px; text-align: center;
  border: 1px solid var(--line, #E8E8E4); border-radius: var(--r-md, 10px);
  padding: 11px; background: #FFF;
}
.pm-qr img { width: 100%; border-radius: var(--r-sm, 7px); display: block; }
.pm-qr-ph {
  width: 100%; aspect-ratio: 1; border-radius: var(--r-sm, 7px);
  background: var(--line-soft, #F0F0EC); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px;
  color: var(--ink-4, #A8A8A3); font-size: 11.5px;
}
.pm-qr-label { font-size: 12px; color: var(--ink-2, #4A4A45); margin-top: 7px; font-weight: 500; }
.pm-note {
  font-size: 12px; color: var(--ink-3, #8A8A85); text-align: center;
  line-height: 1.7; margin-bottom: 15px;
}
.pm-body .inp {
  width: 100%; height: 34px; padding: 0 11px;
  border: 1px solid var(--line-strong, #E0E0DB); border-radius: var(--r-sm, 7px);
  background: #FFF; font-size: 12.5px; transition: .15s;
}
.pm-body .inp:focus { border-color: var(--accent, #E8547C); }

/* ---------- 余额不足 ---------- */
.ncr-card { max-width: 370px; text-align: center; padding: 26px 22px 0; }
.ncr-icon {
  width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 13px;
  background: var(--accent-bg, #FDF0F4); color: var(--accent, #E8547C);
  display: flex; align-items: center; justify-content: center;
  font-size: 21px; font-weight: 700;
  border: 1px solid var(--accent-line, #F0D3DC);
}
.ncr-title { font-size: 16px; font-weight: 700; margin-bottom: 7px; }
.ncr-text { font-size: 12.5px; color: var(--ink-3, #8A8A85); line-height: 1.7; }
.ncr-card .modal-f { margin: 20px -22px 0; }

@media (max-width: 640px) {
  .tiers { grid-template-columns: 1fr; }
  .dc-inner { padding: 9px 14px; flex-wrap: wrap; }
  .dc-text { font-size: 11.5px; }
  .crb-val { font-size: 24px; }
}

/* 付款码单张时居中放大（2026-09-16 只留支付宝） */
.pm-qrs .pm-qr.solo { max-width: 232px; flex: 0 1 232px; }
.pm-qrs .pm-qr.solo img { border-radius: var(--r-sm, 7px); }

/* ============================================================
   邀请好友（2026-09-16 加）
   ============================================================ */

/* ---------- 顶栏邀请按钮 ---------- */
.invite-pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: linear-gradient(135deg, #FDF0F4 0%, #FFF7EA 100%);
  border: 1px solid var(--accent-line, #F0D3DC);
  border-radius: 999px; padding: 5px 11px 5px 9px;
  font-size: 13px; color: var(--accent, #E8547C);
  transition: .15s; flex-shrink: 0;
}
.invite-pill:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(232,84,124,.16); }
.invite-pill span { font-weight: 600; }
.invite-pill b {
  min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--accent, #E8547C); color: #FFF;
  border-radius: 999px; font-size: 10.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ---------- 邀请弹窗 ---------- */
.inv-card { max-width: 540px; }
.inv-body { padding: 16px 20px 4px; overflow-y: auto; }
.inv-block { margin-bottom: 17px; }
.inv-block-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 7px;
}
.inv-block-head .fl { margin-bottom: 0; }
.inv-link-more {
  font-size: 12px; color: var(--accent, #E8547C);
  padding: 2px 4px; border-radius: 5px; transition: .15s;
}
.inv-link-more:hover { background: var(--accent-bg, #FDF0F4); }

.inv-copy { display: flex; gap: 8px; }
.inv-url {
  flex: 1; min-width: 0; height: 36px; padding: 0 12px;
  border: 1px solid var(--line-strong, #E0E0DB); border-radius: var(--r-sm, 7px);
  background: #FAF9F7; font-size: 12.5px; color: var(--ink-2, #4A4A45);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  text-overflow: ellipsis;
}
.inv-copy-btn { flex-shrink: 0; height: 36px; padding: 0 15px; font-size: 13px; }

.inv-code-line {
  display: flex; align-items: center; gap: 8px;
  margin-top: 9px; font-size: 12.5px; color: var(--ink-3, #8A8A85);
}
.inv-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px; font-weight: 700; letter-spacing: 1.4px;
  color: var(--accent, #E8547C);
  background: var(--accent-bg, #FDF0F4);
  border: 1px dashed var(--accent-line, #F0D3DC);
  border-radius: 6px; padding: 2px 9px;
}
.inv-mini {
  font-size: 12px; color: var(--ink-3, #8A8A85);
  border: 1px solid var(--line, #E8E8E4); border-radius: 6px;
  padding: 3px 9px; transition: .15s; background: #FFF;
}
.inv-mini:hover { color: var(--accent, #E8547C); border-color: var(--accent-line, #F0D3DC); }

.inv-say {
  font-size: 12.5px; line-height: 1.85; color: var(--ink-2, #4A4A45);
  background: #FAF9F7; border: 1px solid var(--line, #E8E8E4);
  border-radius: var(--r-md, 10px); padding: 12px 14px;
  white-space: pre-wrap; word-break: break-word;
}

.inv-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 11px; }
.ikpi {
  background: linear-gradient(135deg, var(--accent-bg, #FDF0F4) 0%, #FFF 100%);
  border: 1px solid var(--accent-line, #F0D3DC);
  border-radius: var(--r-md, 10px); padding: 12px 14px; text-align: center;
}
.ikpi b {
  display: block; font-size: 24px; font-weight: 700; letter-spacing: -.6px;
  color: var(--accent, #E8547C); font-variant-numeric: tabular-nums;
}
.ikpi span { font-size: 11.5px; color: var(--ink-3, #8A8A85); }

.inv-list { max-height: 168px; overflow-y: auto; }
.inv-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 2px; border-bottom: 1px solid var(--line-soft, #F0F0EC);
  font-size: 12.5px;
}
.inv-row:last-child { border-bottom: none; }
.inv-row .irl-mail { color: var(--ink-2, #4A4A45); }
.inv-row .irl-time { font-size: 11.5px; color: var(--ink-4, #A8A8A3); margin-top: 1px; }
.inv-row .irl-plus { color: var(--green, #2FA36B); font-weight: 700; flex-shrink: 0; }

/* ---------- 邀请说明 ---------- */
.inv-how-card { max-width: 480px; }
.inv-how-body { padding: 18px 20px 4px; overflow-y: auto; }
.inv-steps { margin: 0 0 16px; padding-left: 20px; }
.inv-steps li {
  font-size: 12.5px; line-height: 1.85; color: var(--ink-2, #4A4A45);
  margin-bottom: 7px;
}
.inv-steps b { color: var(--accent, #E8547C); }
.inv-rules {
  background: #FFFDF7; border: 1px solid #F2E6CE;
  border-radius: var(--r-md, 10px); padding: 12px 15px;
  font-size: 12px; line-height: 1.8; color: #7A6A50;
}
.inv-rules > b { display: block; color: #6A5636; margin-bottom: 4px; }
.inv-rules ul { margin: 0; padding-left: 17px; }
.inv-rules li { margin-bottom: 2px; }

@media (max-width: 640px) {
  .inv-copy { flex-direction: column; }
  .inv-copy-btn { width: 100%; }
  .inv-kpis { grid-template-columns: 1fr; }
  .invite-pill span { display: none; }
}

/* ============================================================
   删除全部台账（2026-09-16 加）
   ============================================================ */

/* ---------- 危险按钮 ----------
   ⚠️ 这里只负责「危险配色」，**尺寸一律交给 .btn / .btn.sm**。

   历史坑（2026-09-18 修）：原来写死了 height:30px / padding:0 12px /
   border-radius:7px / 字号 12.5px —— 那是「列表里的小内联按钮」的尺寸，
   可它同时被弹窗主按钮复用（ask-modal 的「删除」、clearall-modal 的
   「我已知晓，确认删除」）。结果同一个 .modal-f 里「取消」48px、「删除」30px，
   圆角、字号、底色全不一样，看上去就是仨按钮没对齐。
   现在：在弹窗里跟 .btn 等高，在列表里跟 .btn.sm 等高，两处都齐。 */
.btn-danger {
  background: linear-gradient(135deg, #E8547C 0%, #C9557E 100%);
  color: #FFF; font-weight: 600; flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(232, 84, 124, .22);
}
.btn-danger:hover {
  background: linear-gradient(135deg, #D9426B 0%, #B44A70 100%);
  box-shadow: 0 7px 20px rgba(232, 84, 124, .32);
}
.btn-danger:active { transform: translateY(0); box-shadow: 0 3px 10px rgba(232, 84, 124, .2); }
.btn-danger:disabled { opacity: .55; cursor: not-allowed; }
.btn-danger.armed { background: #B32D52; animation: cl-pulse 1s ease-in-out infinite; }
@keyframes cl-pulse { 50% { box-shadow: 0 0 0 4px rgba(232,84,124,.25); } }

/* ---------- 清空确认弹窗 ---------- */
.cl-card { max-width: 420px; }
.cl-body { padding: 20px 22px 8px; text-align: center; }
.cl-icon {
  width: 52px; height: 52px; margin: 0 auto 13px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--accent-bg, #FDF0F4); color: var(--accent, #E8547C);
  border: 1px solid var(--accent-line, #F0D3DC);
}
.cl-title { font-size: 16px; font-weight: 700; margin: 0 0 14px; }
.cl-title b { color: var(--accent, #E8547C); font-variant-numeric: tabular-nums; }
.cl-privacy {
  text-align: left; margin-bottom: 14px;
  background: #FFFDF7; border: 1px solid #F2E6CE;
  border-radius: var(--r-md, 10px); padding: 12px 15px;
}
.cl-privacy b { display: block; font-size: 12px; font-weight: 600; color: #6A5636; margin-bottom: 5px; }
.cl-privacy p { margin: 0; font-size: 12px; line-height: 1.75; color: #7A6A50; }
.cl-privacy em { font-style: normal; font-weight: 600; color: #B35B2D; }
.cl-card .modal-f { padding: 13px 22px; }
.cl-warn {
  font-size: 11.5px; color: var(--accent, #E8547C);
  margin: 0 0 2px; text-align: center;
}

/* ---------- 比价时间分档（2026-09-16 加） ---------- */
.cmp-tier { margin-bottom: 22px; }
.cmp-tier-head {
  display: flex; align-items: baseline; gap: 10px;
  margin: 0 2px 10px;
}
.cmp-tier-title {
  font-size: 15px; font-weight: 700; color: var(--ink, #1A1A1A);
  letter-spacing: -.2px;
}
.cmp-tier-title::before {
  content: ''; display: inline-block; width: 4px; height: 14px;
  background: var(--accent, #E8547C); border-radius: 2px;
  margin-right: 7px; vertical-align: -1px;
}
.cmp-tier-sub { font-size: 12px; color: var(--ink-3, #8A8A85); }
.cmp-tier-empty {
  border: 1px dashed var(--line-strong, #E0E0DB);
  border-radius: var(--r-md, 10px);
  padding: 18px; text-align: center;
  font-size: 12.5px; color: var(--ink-4, #A8A8A3);
  background: #FAF9F7;
}

/* ---------- 通用二次确认弹窗 ---------- */
#ask-modal .modal-card { max-width: 400px; }
.ask-body { padding: 16px 20px; }
.ask-msg {
  margin: 0; font-size: 14px; line-height: 1.75; color: var(--ink, #26262B);
  font-weight: 500;
}
.ask-warn {
  margin-top: 12px; padding: 10px 12px;
  background: var(--amber-bg, #FDF6E3); border-radius: 8px;
  font-size: 11.5px; line-height: 1.7; color: #8A6415;
}

/* ============================================================
   账目核对：提示条与漏读可疑字段（2026-09-17）
   ------------------------------------------------------------
   报价单自身是闭合等式：交强 + 商业险合计 + 非车险合计 + 车船税
   == 保费合计（含车船税）。后端零成本勾稽，不平则标黄「为 0 的分项」
   （漏读最可能出在那儿），提示人工核对原图 —— 不替用户下结论。
   用琥珀色（--amber）而非红色：这是「需核对」而不是「已出错」。
   ============================================================ */

.toast.warn { background: var(--amber); }

.cross-note {
  margin: 0 0 14px;
  padding: 11px 14px;
  border-radius: var(--r-md);
  font-size: 12.5px;
  line-height: 1.65;
  border: 1px solid transparent;
}
.cross-note .cn-head { font-weight: 600; }
.cross-note ul { margin: 7px 0 0; padding-left: 0; list-style: none; display: grid; gap: 5px; }
.cross-note li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cross-note li b { min-width: 64px; }
.cross-note li em { font-style: normal; color: var(--ink-3); font-size: 11.5px; }
.cross-note .cn-main,
.cross-note .cn-second {
  padding: 1px 7px; border-radius: 5px;
  font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, .75);
}
.cross-note .cn-main { border: 1px dashed var(--amber); }
.cross-note .cn-second { border: 1px dashed var(--line-strong); }

.cross-warn { background: var(--amber-bg); border-color: #F0DDB8; color: #8A5B12; }
.cross-ok   { background: var(--green-bg); border-color: #CDE7DA; color: #22654A; }
.cross-info { background: var(--sub-bg);   border-color: var(--line);  color: var(--ink-2); }

/* 存疑字段：琥珀描边 + 淡底，与「已正常填入」的观感明确区分。
   ⚠️ 不用 border 实现：表格里的 .cell 是 border:none 的极简款，且自带
   `border-bottom: 1px dashed transparent` —— 改 border 既要跟简写覆盖打架，
   加粗边框又会挤压表格排版。用 box-shadow 外扩一圈最稳，什么都不影响。 */
.field-suspect {
  background: var(--amber-bg) !important;
  box-shadow: 0 0 0 1.5px var(--amber), 0 0 0 4px rgba(216, 145, 47, .14) !important;
  border-radius: 3px;
}

/* ============================================================
   移动端适配（2026-09-19 加）
   ------------------------------------------------------------
   策略：**同一页面响应式** —— PC 观感一行不动，只在窄屏生效。
   不做独立手机站的原因：海报二维码已印出去指向同一地址；而且这个工具的
   操作本身是线性的（传图 → 核对数字 → 导出），不需要为手机重做流程。

   实测问题（iPhone 14，390×844）：
     ① 整页横向溢出：文档宽 458px > 视口 390px（.tb-right 被挤出屏幕）
     ② 导航被压成 33px 宽 × 80px 高的竖条，文字竖排、几乎点不中
     ③ 40 个可点元素里 32 个高度 < 32px
     ④ 关键输入框仅 19~21px 高、字号 13.5px
     ⑤ 15 个输入框里 12 个字号 < 16px
        → iOS Safari 聚焦输入框时**自动放大整页**（"点一下就跳"的元凶）

   ⚠️ 本段两条硬指标，改这里时别破坏：
      ★ 输入框 font-size ≥ 16px —— 低于 16px 必触发 iOS 自动缩放
      ★ 可点目标 min-height ≥ 44px —— 手指的舒适点击区
   ============================================================ */

/* ---------- 手机端底部固定操作条（桌面隐藏，窄屏由媒体查询打开） ---------- */
.mbar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  gap: 10px;
  padding: 8px 14px calc(8px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
}
.mbar-btn {
  flex: 1 1 0; min-width: 0;
  min-height: 46px;                 /* ★ 触控目标 */
  padding: 0 10px;
  border-radius: var(--r-md);
  font-size: 15px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.mbar-ghost {
  background: var(--card); color: var(--ink-2);
  border: 1px solid var(--line-strong);
}
.mbar-ghost:active { background: var(--bg); }
.mbar-main {
  background: linear-gradient(135deg, #E8547C 0%, #C9557E 100%);
  color: #FFF; border: 1px solid transparent;
  box-shadow: 0 4px 14px rgba(232, 84, 124, .26);
}
.mbar-main:active { transform: translateY(1px); }

@media (max-width: 720px) {

  /* ---------- ① 顶栏改两行：品牌 + 账号 ／ 三个导航等宽 ---------- */
  .topbar {
    height: auto;
    padding: 8px 14px;
    align-items: flex-start;
    gap: 8px;
    /* ⚠️ 必须 wrap：配合下面的 display:contents，让「品牌+胶囊」占第一行、
       「导航」独占第二行。少了它三者会被挤在同一行（导航压成 36x80 竖条）。 */
    flex-wrap: wrap;
  }
  /* 把「品牌」和「导航」提升到顶栏这一层，导航才能真正占满整行宽度。
     ⚠️ 若不这样做，导航只能占 .tb-left 的宽度，而 .tb-left 与右侧胶囊并排
        —— 320px 老机型下导航被挤成 35x80 的竖条（实测）。用 display:contents
        把 .tb-left 这个**无语义 div** 的盒子去掉即可（不影响可访问性）。 */
  .tb-left { display: contents; }
  .brand { order: 1; }
  .tb-right { order: 2; }
  .nav { order: 3; width: 100%; }
  /* 覆盖旧断点里「手机上隐藏品牌名」的规则：品牌名是身份，不能省 */
  .brand-name {
    display: block; font-size: 16px;
    /* 实测：品牌名需 135px、实际只有 123.5px → 被折成两行，顶栏白高 15px。
       禁止折行 + 允许省略，顶栏高度才稳定。 */
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .brand { min-width: 0; }
  /* 省掉积分胶囊尾部的「◆」装饰，给品牌名腾出宽度（390px 下正好够） */
  .cp-diamond { display: none; }
  .credits-pill { padding: 0 9px; }
  .brand-logo { width: 30px; height: 30px; border-radius: 8px; }
  .brand-logo svg { width: 17px; height: 17px; }
  .nav { width: 100%; gap: 2px; }
  .nav-item {
    flex: 1 1 0; min-width: 0;
    min-height: 44px;              /* ★ 触控目标 */
    padding: 0 6px;
    font-size: 15px; font-weight: 500;
    display: flex; align-items: center; justify-content: center;
  }

  /* 顶栏右侧只留「积分」和「头像」；日期 / 在线点 / 邀请胶囊让位。
     邀请仍能从头像菜单进，功能不丢。 */
  .tb-right { flex: 0 0 auto; align-self: flex-start; gap: 6px; }
  .dot-online, .tb-date, .invite-pill { display: none; }
  .credits-pill { height: 32px; padding: 0 8px; font-size: 12.5px; }
  .uc-btn { height: 32px; padding: 0 5px 0 4px; }
  .uc-mail { display: none; }      /* 省掉邮箱文本，完整地址在账号菜单里 */
  .uc-avatar { width: 24px; height: 24px; flex: 0 0 24px; line-height: 24px; font-size: 11px; }
  .uc-menu { top: 38px; }

  /* ---------- ② 主区留白收紧，宽度让给内容 ---------- */
  .main { padding: 14px; gap: 14px; }
  .col-left, .col-right { gap: 14px; }
  .col-right { flex-direction: column; }   /* 覆盖 1100px 断点的横排 */
  .col-right > * { flex: 1 1 auto; }
  .sheet { padding: 16px; gap: 18px; }
  .card { padding: 16px; gap: 14px; }
  .meta-row { padding: 12px; gap: 10px; }
  .meta-row label, .meta-row label.lg { flex: 1 1 100%; }   /* 元信息字段整行排 */

  /* ---------- ③ 输入框：灭掉 iOS 自动放大 + 手指点得中 ---------- */
  input, select, textarea { font-size: 16px !important; }
  .meta-row input, .meta-row textarea, #co { min-height: 44px; padding: 0 10px; }
  .meta-row textarea { padding: 10px; line-height: 1.5; }

  /* ---------- ④ 报价单表格：横向滑动 + 首列「险种」冻结 ---------- */
  .tbl { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tr { min-width: 520px; padding: 10px 12px; gap: 10px; }
  .tr .td-cov { flex: 0 0 108px; }
  .tr .td-num { flex: 0 0 120px; }
  .td-name {
    position: sticky; left: 0; z-index: 2;
    background: var(--card);
    box-shadow: 1px 0 0 var(--line-soft);
    font-size: 14px;
  }
  .tr.th .td-name { background: var(--th-bg); }
  .tr.sub .td-name { background: var(--sub-bg); }
  .cell { height: 40px; padding: 0 8px; }
  .sec-title { font-size: 15px; }
  .sec-add { min-height: 40px; }

  /* ---------- ⑤ 明细行：同样横向滑动 + 首列「险种名」冻结 ---------- */
  #list-commercial_items, #list-non_auto_items {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
  }
  .item-row { min-width: 470px; }
  .item-row .it-name {
    position: sticky; left: 0; z-index: 2;
    background: var(--card);
    box-shadow: 1px 0 0 var(--line-soft);
  }
  .item-row .it-cov { flex: 0 0 92px; }
  .item-row .it-num { flex: 0 0 88px; }
  .item-row input { height: 40px; }
  .item-del { width: 38px; height: 38px; opacity: 1; }   /* 触屏没有 hover，常显 */

  /* ---------- ⑥ 台账表：加宽后横向滑动 + 首列「报价时间」冻结 ---------- */
  .data-table { min-width: 780px; }
  .data-table th:first-child, .data-table td:first-child {
    position: sticky; left: 0; z-index: 3;
    background: var(--card);
    box-shadow: 1px 0 0 var(--line);
  }
  .data-table th:first-child { background: var(--th-bg); z-index: 4; }
  .hist-tools { flex-wrap: wrap; }
  .hist-tools input { flex: 1 1 100%; min-height: 44px; }
  .hist-tools .btn { min-height: 40px; }

  /* ---------- ⑦ 底部固定操作条 ---------- */
  .mbar { display: flex; }
  /* 给操作条留位置，别遮住最后一行内容 */
  body.mbar-on { padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px)); }
  /* 提示条上移，别被操作条压住 */
  .toast { bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
}

/* 更窄（≤ 380px，如 iPhone SE / 12 mini）：积分胶囊只留「¥ 数字」，
   把「积分」二字省掉 —— 否则品牌名 + 胶囊放不下，顶栏会折成三行（实测 375px）。
   胶囊仍可点开看明细，语义不丢。 */
@media (max-width: 380px) {
  .cp-unit { display: none; }
}

/* 极小屏（≤ 340px，接近淘汰机型）：品牌名降一档字号，仍保持两行顶栏。 */
@media (max-width: 340px) {
  .brand-name { font-size: 14px; }
}

/* 小屏（≤ 420px）再收一档 */
@media (max-width: 420px) {
  .nav-item { font-size: 14px; padding: 0 4px; }
  .brand-name { font-size: 15px; }
  .main { padding: 10px; }
  .sheet, .card { padding: 13px; }
  .mbar { padding-left: 10px; padding-right: 10px; gap: 8px; }
  .mbar-btn { font-size: 14px; }
}
/* ---------- 移动端补充：佣金步进器 / 预设比例 / 次要按钮的触控尺寸 ----------
   实测这几处原本都不够手指点：
     · .st-arrows 上下两个小箭头各 ~18px（38×40 里塞两个）→ 改横排两个 44×44
     · .preset 比例预设 24px 高、字号 11.5px
     · .item-quick「一键铺开」27px 高
     · .dc-close 免责声明「收起」21px 高
   ⚠️ 佣金比例是高频操作，手机上必须好点。 */
@media (max-width: 720px) {
  .item-quick { min-height: 40px; padding: 6px 14px; font-size: 13.5px; }

  /* ---------- 佣金比例行：「名称」一行 +「调节器」一行（手机专属） ----------
     ⚠️⚠️ 2026-09-19 欢哥**两次**反馈「加减号有遮挡」，根因就在这里，别再改回去：

     原布局是「名称」和「调节器」挤在同一行，靠 flex 分配宽度。手机上行宽不够时，
     粉底输入框（`width:92px` 但 flex-shrink 默认为 1）会被压窄 ——
     而两个按钮是 `flex: 0 0 44px` **固定不缩**，于是**按钮直接压到输入框上面**，
     把框里的数字和 % 盖住了。截图实测：粉底框只剩 ~50px（本应 92px），
     「19 %」被「−」按钮完全盖住 —— 这不是配色问题，是**元素重叠**。

     ⇒ 手机上一律分两行：名称独占一行，调节器独占一行、输入框吃满剩余宽度。
        两者永不争宽，按钮也就不可能盖住输入框（数学上不可能：186px 的需求 < 342px 的行宽）。
     （桌面/平板行宽充裕，仍是一行、输入框 92px，观感不变。） */
  .cr-top { flex-wrap: wrap; row-gap: 10px; }
  .cr-label {
    flex: 1 1 100%;              /* 整行独占 */
    flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 3px 10px;
  }
  /* 调节器整行独占，内部**两端分开**：比例框靠左、加减按钮靠右。
     ⚠️⚠️ 2026-09-19 欢哥**第四次**反馈「手机上还是有重叠」，直接给了方案：
        「加减靠右，显示比例的靠左，这样就不会重叠了」—— 采纳，因为这是
        **结构上**消除重叠（两者被 pin 到行的两端），而不是靠调数值躲开重叠。
     旧写法是 `.st-field { flex: 1 1 auto; max-width: 168px }`：输入框涨到上限
       就停住，右侧白留 68px 空档，而框里的数字又全部靠右 —— 视觉上就是
       「数字挤在中间、紧贴右边按钮」。改成 space-between 后：
         · 比例框贴左、吃掉全部剩余宽度
         · 按钮组贴右、位置固定
         · 中间必然留出 ≥ 12px 的空白（gap），**数学上不可能重叠**
     顺序上仍是「比例在左、加减在右」，与欢哥的预期一致。 */
  .stepper {
    flex: 1 1 100%;              /* 整行独占 */
    justify-content: space-between;
    gap: 12px;                   /* 中间至少留 12px，防两端贴死 */
  }

  .st-field {
    /* ⚠️ 宽度**定死**、且不伸缩：由 space-between 把它钉在行的**左端**，
       按钮组钉在**右端**。
       为什么定死而不是 `flex: 1 1 auto`：后者会让框吃掉全部剩余宽度（实测 236px），
       而框里数字是靠右的 ⇒ 数字又跑到最右边、紧挨按钮，绕回原来那个观感。
       定宽 132px 后：数字右缘 ≈ x144，按钮左缘 ≈ x272，**中间隔 128px 空白**。
       旧版设 `max-width: 168px` 同样是坑：框涨到上限就停住，右侧白留 68px 空档，
       框里数字却贴死在框右缘 —— 看起来就是"数字挤在中间、贴住右边按钮"。 */
    flex: 0 1 auto;
    width: 132px; min-width: 110px;
    height: 44px; padding: 0 12px;
  }
  /* 输入框撑满整个控件高度 —— 否则只有中间那条细线能点中（视觉上是一整个控件） */
  /* ⚠️ 必须 `width: 0; flex: 1 1 0`，**不能**写 `width: auto` / `width: 100%`：
     `<input>` 的 HTML 默认内在宽度（size=20 ≈ 230px）会经 flex-basis 一路上传，
     把 `.stepper` 的 min-content 顶到 333px ⇒ 卡片被撑破、页面横向溢出（360px 实测 371px）。
     详见基础样式里 `.st-field input` 上的长注释（同一条根因）。 */
  .st-field input { flex: 1 1 0; width: 0; min-width: 0; align-self: stretch; height: 100%; }
  /* 输入框自己可不缩，按钮盒也固定不缩 —— 双保险，防上面那类重叠再发生 */
  .st-arrows { flex: 0 0 auto; }
  /* 手机上原本是「上下两个小箭头」（各 ~18px，点不准），改成横排两个 44×44。
     ⚠️⚠️ 图标必须与朝向配套（2026-09-19 欢哥反馈「加减号有问题」就是这个）：
        · 竖排（桌面）时图标曾是 ∧∨ —— 读作「上下调节」，成立
        · 横排（手机）后 ∧∨ 并排会读成「排序」，谁也看不出是加减
        → 已统一改成真正的 **＋ / －**，两种朝向都成立。
     顺序：DOM 是 [＋, －]，这里用 row-reverse 让视觉变成「－ ＋」，
        符合数量调节器的惯例（读作「16% 减 加」）。
     ⚠️ 改这两个按钮时，index.html 的 svg 和这里的朝向必须一起想。 */
  .st-arrows { flex-direction: row-reverse; width: auto; height: 44px; gap: 6px; }
  .st-arrows .st-btn { flex: 0 0 44px; height: 44px; }
  .st-arrows .st-btn svg { width: 18px; height: 18px; }
  .preset { min-height: 40px; font-size: 13px; }
  .dc-close { min-height: 36px; padding: 6px 12px; font-size: 13px; }
  /* 顶栏两个胶囊再宽一点，手指好点（不至于把顶栏撑高多少） */
  .credits-pill { height: 34px; }
  .uc-btn { height: 34px; }
}
/* ============================================================
   移动端适配 · 补充两段（2026-09-19）
   ------------------------------------------------------------
   上面那段只管手机（≤720px）。实测还有两个盲区：

   ① 721~1100px（iPad 竖屏 768 / 窄笔记本）：
      顶栏塞不下 → 导航被挤成 41px 宽 × 86px 高的竖条（768px 实测）。
      根因是顶栏右侧太宽（日期 + 邀请胶囊 + 积分 + 带邮箱的头像 ≈283px）。
      这一段只做一件事：把顶栏的**次要信息让位**，其余保持桌面观感不动。

   ② 触屏设备（手机 + 平板）：输入框字号必须 ≥ 16px，否则 iOS Safari
      聚焦时自动放大整页。**这条不能用宽度判断** —— iPad 很宽但照样放大，
      所以用 `pointer: coarse` 判断触屏，比看屏幕宽度准。
   ============================================================ */

@media (min-width: 721px) and (max-width: 1100px) {
  /* 顶栏：让掉「在线点 / 日期 / 邀请胶囊」三个次要元素，导航就放得下了。
     邀请仍可从头像菜单进，功能不丢。 */
  .topbar { padding: 0 20px; }
  .tb-left { gap: 20px; }
  .dot-online, .tb-date, .invite-pill { display: none; }
  .uc-mail { max-width: 110px; }
}

/* 小尺寸平板（721~860px，如 iPad 竖屏 768）再让一步：
   邮箱文本也收掉只留头像 —— 实测 768px 时导航仍会被挤到换行（71x50）。 */
@media (min-width: 721px) and (max-width: 860px) {
  .uc-mail { display: none; }
  .uc-btn { padding: 0 6px 0 4px; }
}

/* 触屏设备：输入框 ≥16px（灭掉 iOS 聚焦自动放大）。
   与屏幕宽度无关 —— iPad 很宽也会放大，所以用 pointer 判断。 */
@media (hover: none) and (pointer: coarse) {
  input, select, textarea { font-size: 16px !important; }
}
