/* ===== 轮胎管理系统 · 移动优先样式 ===== */
:root {
  --brand: #0e2f56;
  --brand-2: #17558f;
  --accent: #ff8a1f;
  --bg: #f2f5f9;
  --card: #fff;
  --text: #1d2733;
  --muted: #6b7a8c;
  --line: #e3e9f1;
  --ok: #12855a;
  --err: #d64545;
  --radius: 14px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  padding-bottom: 104px;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-2); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-top, 0px));
  background: linear-gradient(135deg, #0b2440, var(--brand-2));
  color: #fff;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.brand-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.14); }
.brand b { display: block; font-size: 16px; letter-spacing: .5px; }
.brand small { display: block; font-size: 11px; opacity: .75; letter-spacing: 1px; }
.topbar-right { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.role-tag { padding: 2px 8px; border-radius: 20px; background: rgba(255,255,255,.18); }
.role-tag.is-admin { background: var(--accent); color: #3a1c00; font-weight: 600; }
.me { opacity: .9; max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 容器 ---------- */
.wrap { padding: 14px 14px 8px; max-width: 760px; margin: 0 auto; }

.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(16, 42, 74, .06);
  padding: 16px; margin-bottom: 12px;
}
.card-pad-0 { padding: 0; overflow: hidden; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.card-title .more { font-weight: 400; font-size: 13px; }

/* ---------- 数字总览 ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
.stat {
  background: var(--card); border-radius: var(--radius); padding: 14px;
  box-shadow: 0 2px 10px rgba(16, 42, 74, .06);
}
.stat .k { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .v { font-size: 24px; font-weight: 700; margin-top: 2px; letter-spacing: -.5px; }
.stat .v.money { color: var(--accent); }
.stat .hint { font-size: 11px; color: var(--muted); margin-top: 2px; }
/* 工作台四宫格：一行显示，压缩占位 */
.stats-grid.tight { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.stats-grid.tight .stat { padding: 10px 9px; border-radius: 10px; }
.stats-grid.tight .stat .k { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats-grid.tight .stat .v { font-size: 19px; margin-top: 1px; }
.stats-grid.tight .stat .v span { font-size: 11px !important; }
.stats-grid.tight .stat .hint { font-size: 10px; line-height: 1.3; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- 首页统计卡：手机 2×2，数字靠右 ---------- */
.hstats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.hstat { background: var(--card); border-radius: var(--radius); padding: 12px 14px; box-shadow: 0 2px 10px rgba(16, 42, 74, .06); display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 62px; }
.hs-l { min-width: 0; display: flex; flex-direction: column; }
.hs-k { font-size: 13.5px; font-weight: 600; color: var(--text); white-space: nowrap; }
.hs-v { font-size: 25px; font-weight: 700; letter-spacing: -.6px; line-height: 1; flex-shrink: 0; }
.hs-v em { font-style: normal; font-size: 11px; font-weight: 400; color: var(--muted); margin-left: 2px; }
.hs-h { font-size: 11.5px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-h a { color: var(--muted); }
.hstat-link { text-decoration: none; color: inherit; -webkit-tap-highlight-color: transparent; }
.hstat-link:active { transform: scale(.985); box-shadow: 0 1px 6px rgba(16, 42, 74, .05); }
/* 业务记录：按日期筛选提示条 */
.daytip { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #fff8ec; border: 1px solid #f3d9ae; border-radius: 10px;
  padding: 9px 12px; margin: 0 0 10px; font-size: 12.5px; color: #8a5a12; }
.daytip b { font-weight: 700; }
.daytip-x { flex-shrink: 0; color: #b26a10; font-size: 12.5px; text-decoration: none; white-space: nowrap; }
@media (min-width: 640px) { .hstats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* 开单：车号一行（输入框 + 客户列表链接） */
.plate-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.plate-row .field { flex: 1; margin: 0; min-width: 0; }
.plate-row .more { flex-shrink: 0; white-space: nowrap; font-size: 12.5px; }

/* ---------- 快捷入口 ---------- */
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.quick {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: #fff; border-radius: 12px; padding: 14px 6px; text-align: center;
  box-shadow: 0 2px 8px rgba(16,42,74,.05);
  font-size: 12px; color: var(--text);
}
.quick .ico {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; font-size: 19px;
  background: #eaf2fb; color: var(--brand-2);
}
.quick.primary .ico { background: linear-gradient(135deg, #ff9d3d, var(--accent)); color: #fff; }

/* ---------- 列表行 ---------- */
.row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .t { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .s { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .r { text-align: right; flex-shrink: 0; }
.row .r .amt { font-weight: 700; color: var(--accent); }
.avatar {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 700; font-size: 15px;
  background: linear-gradient(135deg, #dcebfa, #cfe3f7); color: var(--brand);
}
/* ---------- 账号列表（手机端一行操作） ---------- */
.u-item { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.u-item:last-child { border-bottom: 0; }
.u-head { display: flex; align-items: center; gap: 10px; }
.u-head .grow { flex: 1; min-width: 0; }
.u-head .t { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-head .s { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.u-acts { display: flex; align-items: center; gap: 0; flex-shrink: 0; }
.u-acts form { margin: 0; }
.u-acts .btn-mini { border: 0; background: transparent; padding: 6px 6px; font-size: 12.5px; color: var(--brand); }
.u-acts .btn-mini:last-child { padding-right: 0; }
.u-acts .btn-mini.btn-danger { color: #b3574f; background: transparent; }
.btn-mini { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; line-height: 1.1; flex-shrink: 0; }

.thumbs { display: flex; gap: 8px; margin-top: 6px; }
.thumbs img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
/* 详情页：两张照片左右平分一排 */
.thumbs2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 0; }
.thumbs2 a { display: block; }
.thumbs2 img { width: 100%; height: 112px; border-radius: 10px; }
.thumbs-lg { margin: 10px 0 2px; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.thumbs-lg img { height: 168px; border-radius: 12px; }

/* ---------- 业务标签 ---------- */
.badge { display: inline-block; padding: 1px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.biz-sale { background: #e6f4ff; color: #0b63b6; }
.biz-season { background: #fff1e3; color: #c76a00; }
.biz-store_in { background: #e8f8ef; color: #0f7a4d; }
.biz-store_out { background: #f0ecff; color: #5a3dc9; }

/* ---------- 表单 ---------- */
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fbfcfe; outline: none; transition: border-color .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand-2); background: #fff; }
.field textarea { min-height: 72px; resize: vertical; }
.field-row { display: flex; gap: 10px; }
.field-row > .field { flex: 1; }
/* 无标签表单：直接放在 field-row / 卡片里的输入框 */
.field-row > input, .field-row > select,
.card form > input:not([type=hidden]),
.modal-box form > input:not([type=hidden]) {
  flex: 1; width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fbfcfe; outline: none; font: inherit; font-size: 14px; color: inherit;
}
.field-row > input:focus, .field-row > select:focus,
.card form > input:not([type=hidden]):focus,
.modal-box form > input:not([type=hidden]):focus { border-color: var(--brand-2); background: #fff; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 18px; border-radius: 11px; border: 0; cursor: pointer;
  font-weight: 600; font-size: 15px; background: #eef3f9; color: var(--brand);
}
.btn:active { transform: scale(.985); }
.btn-primary { background: linear-gradient(135deg, #1a5e9e, var(--brand)); color: #fff; }
.btn-accent { background: linear-gradient(135deg, #ffa447, var(--accent)); color: #2a1400; }
.btn-ghost { background: transparent; color: var(--brand-2); }
.btn-danger { background: #fdeeee; color: var(--err); }
.btn-block { display: flex; width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 9px; }

/* ---------- 搜索 ---------- */
.searchbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.searchbar input {
  flex: 1; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff;
  box-shadow: 0 2px 8px rgba(16,42,74,.05);
}
.searchbar button { flex-shrink: 0; min-width: 70px; white-space: nowrap; }
.searchbar input:focus { outline: none; border-color: var(--brand-2); }
/* 首页大搜索条：2px 橙色边框、字更大、更抢眼 */
.search-hero { border: 1px solid #ffd9b0; box-shadow: 0 6px 18px rgba(255, 138, 31, .14); }
.searchbar-lg { gap: 10px; flex-wrap: nowrap; }
.search-hero .searchbar-lg input {
  border: 2px solid var(--accent) !important; border-radius: 14px; padding: 15px 30px 15px 16px;
  font-size: 18px !important; font-weight: 600; color: var(--text);
  box-shadow: none; width: 100%;
}
.search-hero .searchbar-lg input::placeholder { font-size: 17px; font-weight: 500; color: #7d8b9c; }
.search-hero .searchbar-lg input:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 3px rgba(255, 138, 31, .18); }
.searchbar-lg button { min-width: 88px; font-size: 17px; font-weight: 700; border-radius: 14px; }
/* 输入框内的 × 快速清空 */
.sb-wrap { position: relative; flex: 1 1 0; display: flex; min-width: 0; }
.sb-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 30px; min-width: 0; max-width: 15px; padding: 0; border: 0; background: transparent;
  color: #97a4b3; font-size: 19px; line-height: 1; border-radius: 0;
  display: none; align-items: center; justify-content: center; }
.searchbar-lg .sb-clear { min-width: 0 !important; max-width: 15px !important; width: 15px !important; font-size: 19px !important; border-radius: 0 !important; }
.sb-clear.on { display: flex; }
.sb-clear:active { color: #5d6b7c; }
.searchbar select {
  flex: 1; padding: 12px 10px; border-radius: 12px; border: 1px solid var(--line); background: #fff;
  font-size: 14px;
}
.sb-range { display: flex; align-items: center; gap: 4px; flex: 1 1 100%; }
.sb-range input { flex: 1; padding: 9px 8px; font-size: 13px; }
.sb-range span { color: var(--muted); }

/* ---------- 操作日志 ---------- */
.lg-item { padding: 10px 16px 11px; border-top: 1px solid var(--line); }
.lg-item:first-of-type { border-top: 0; }
.lg-top { display: flex; align-items: center; gap: 8px; }
.lg-user { font-size: 14px; }
.lg-time { margin-left: auto; font-size: 12px; color: var(--muted); }
.lg-detail { font-size: 13.5px; margin-top: 4px; line-height: 1.45; word-break: break-all; color: var(--text); }
.lg-tgt { color: var(--muted); font-size: 12.5px; }
.lg-ip { color: var(--muted); font-size: 11.5px; margin-left: 6px; }
.lg-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; display: none; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 0 12px; }
/* ---------- 我的：用户信息 ---------- */
.me-card { padding: 14px 16px 13px; }
.me-top { display: flex; align-items: center; gap: 8px; }
.me-name { font-size: 17px; }
.me-sub { margin-top: 5px; font-size: 12.5px; color: var(--muted); }
.pager-n { font-size: 13px; color: var(--muted); }

/* ---------- 照片 ---------- */
.photo-box { position: relative; border: 1px dashed #c8d6e5; border-radius: 12px;
  background: #fbfdff; min-height: 120px; display: grid; place-items: center; overflow: hidden; cursor: pointer; }
.photo-box img { width: 100%; max-height: 220px; object-fit: contain; }
.photo-box .ph { color: var(--muted); font-size: 13px; text-align: center; padding: 22px 10px; }
.photo-box input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
/* 车号拍照：压扁的小号版本 */
.photo-box-sm { min-height: 74px; border-radius: 10px; }
.photo-box-sm .ph { padding: 10px 8px; font-size: 12px; line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photo-box-sm .ph small { display: block; font-size: 11px; }
.photo-box-sm img { max-height: 130px; }
/* 必拍但还没拍：红虚线提示，拍好立刻变回正常 */
.photo-box[data-ready="0"] { border-color: #f0b0b0; background: #fffafa; }
.photo-box[data-ready="0"] .ph { color: #c0392b; }
.req-mark { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 8px;
  background: #ffe9e9; color: #c0392b; font-size: 11px; font-weight: 600; vertical-align: 2px; }

/* 已拍照片：右下角「重拍」 */
.photo-box.has-img { cursor: zoom-in; }
.ph-retake {
  position: absolute; right: 8px; bottom: 8px; z-index: 3;
  padding: 5px 12px; border-radius: 14px; border: 0;
  background: rgba(14, 47, 86, .82); color: #fff; font-size: 12px; line-height: 1.2;
}

/* 图片大图预览 */
.imgview {
  position: fixed; inset: 0; z-index: 999; display: none;
  background: rgba(8, 14, 22, .93);
  align-items: center; justify-content: center;
  padding: 16px 12px;
  cursor: zoom-out;
}
.imgview.show { display: flex; }
.iv-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.iv-x {
  position: absolute; top: calc(10px + env(safe-area-inset-top, 0px)); right: 12px;
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .16); color: #fff; font-size: 20px; line-height: 1;
}
body.iv-open { overflow: hidden; }
.iv-count {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  padding: 4px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, .16); color: #fff; font-size: 12.5px; letter-spacing: .5px;
}

/* ---------- 标签页 ---------- */
.seg { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px; background: #fff;
  border-radius: 12px; margin-bottom: 12px; box-shadow: 0 2px 8px rgba(16,42,74,.05); }
.seg a { flex: 1 1 calc(50% - 6px); text-align: center; padding: 9px 10px; border-radius: 9px; font-size: 13px; color: var(--muted); }
@media (min-width: 560px) { .seg a { flex: 1 1 0; } }
.seg-3 a { flex: 1 1 calc(33.33% - 6px); font-size: 15px; padding: 11px 6px; }
.seg a.on { background: var(--brand); color: #fff; font-weight: 600; }
/* 开单三颗业务按钮：各用柔和底色（不刺眼） */
#typeSeg a[data-type="store_in"].on { background: #dff1e6; color: #2f7d55; box-shadow: inset 0 0 0 1px #b7dfc7; }
#typeSeg a[data-type="season"].on   { background: #fbe4e3; color: #b3574f; box-shadow: inset 0 0 0 1px #f0c4c1; }
#typeSeg a[data-type="store_out"].on{ background: #e4f0fa; color: #2f6f9e; box-shadow: inset 0 0 0 1px #c3dcf0; }
#typeSeg a[data-type="store_in"]:not(.on) { color: #6f9182; }
#typeSeg a[data-type="season"]:not(.on)   { color: #a98884; }
#typeSeg a[data-type="store_out"]:not(.on){ color: #7996ad; }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -2px 12px rgba(16,42,74,.07);
}
.tab { flex: 1; text-align: center; padding: 24px 0 22px; font-size: 19px; font-weight: 600; color: var(--muted); letter-spacing: .5px; line-height: 1.1; }
.tab.on { color: var(--brand); font-weight: 700; }
/* 「登记」常驻红色，作为主操作入口最醒目 */
.tab.tab-hot { color: #d92b2b; font-weight: 800; }
.tab.tab-hot.on { color: #b31717; font-weight: 800; }

.no-tabs { padding-bottom: 118px; }

/* ---------- 库位位数设定 ---------- */
.zc-row {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 0; border-top: 1px solid var(--line);
}
.zc-row:first-of-type { border-top: 0; }
.zc-name { width: 52px; font-weight: 600; font-size: 15px; }
.zf-wrap { flex: 1 1 auto; min-width: 0; }
.zf-input {
  width: auto; max-width: 150px; padding: 3px 8px; font-size: 17px; font-weight: 700;
  color: var(--brand); background: #f7fafd; border: 1px solid transparent; border-bottom: 1px dashed #b8cbdd;
  border-radius: 8px; outline: none;
}
.zf-input:focus { background: #fff; border: 1px solid var(--brand-2); }
.zc-zn {
  width: 62px; padding: 6px 4px; text-align: center; font-size: 15px; font-weight: 700; color: var(--brand);
  border: 1px solid #e0e9f2; background: #fff; border-radius: 9px; outline: none;
}
.zc-zn:focus { border-color: var(--brand-2); }
.zc-del {
  flex: 0 0 auto; width: 30px; height: 30px; padding: 0; border-radius: 9px;
  border: 1px solid #edd6d6; background: #fdf3f3; color: var(--err);
  font-size: 14px; line-height: 1; display: grid; place-items: center; cursor: pointer;
}
.zc-del:active { background: #fbe6e6; }
.zc-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.zc-add input, .zc-add select {
  flex: 1 1 96px; min-width: 0; padding: 10px 11px; border: 1px solid var(--line);
  border-radius: 10px; background: #fbfcfe; font: inherit; font-size: 14px; outline: none;
}
.zc-add input:focus, .zc-add select:focus { border-color: var(--brand-2); background: #fff; }
.zc-step { display: flex; align-items: center; gap: 6px; }
.zc-btn {
  width: 36px; height: 36px; border-radius: 8px; border: 1px solid #d7e0ea;
  background: #f6f9fc; color: var(--brand); font-size: 18px; font-weight: 600; line-height: 1;
  display: grid; place-items: center; padding: 0;
}
.zc-btn:active { background: #e8f0f8; }
.zc-num {
  width: 58px; height: 36px; text-align: center; border-radius: 8px;
  border: 1px solid #d7e0ea; background: #fff; font-weight: 700; font-size: 16px;
  -moz-appearance: textfield;
}
.zc-num::-webkit-outer-spin-button, .zc-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.zc-unit { font-size: 13px; color: var(--muted); }
.zc-use { margin-left: auto; font-size: 11px; color: var(--muted); white-space: nowrap; }


/* ---------- 备份到邮箱 ---------- */
.bk-scope { margin-top: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfe; }
.bk-scope-t { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.bk-chk { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; line-height: 1.5; padding: 5px 0; }
.bk-chk input { flex: 0 0 auto; width: 16px; height: 16px; margin: 2px 0 0; }
.bk-last { padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.55; margin: 0; }
.bk-last.ok { background: #eefaf2; color: #1c7a46; }
.bk-last.err { background: #fdf0f0; color: #b3261e; }
.bk-acts { display: flex; flex-direction: column; gap: 10px; }
.bk-acts .btn { margin: 0; }
.bk-cron { background: #0f1b2b; color: #9fe3b8; padding: 10px 12px; border-radius: 10px;
  font-size: 13px; line-height: 1.5; white-space: pre-wrap; word-break: break-all; margin: 0; }

/* 摘要 + 折叠设置项 */
.bk-badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 9px;
  font-size: 11.5px; font-weight: 600; vertical-align: 2px; font-style: normal; }
.bk-badge.on { background: #e7f7ed; color: #1c7a46; }
.bk-badge.off { background: #f1f3f5; color: #77828d; }
.bk-hint { font-size: 12.5px; color: var(--muted); margin: 0 0 12px; line-height: 1.65; }
.bk-sum { border: 1px solid var(--line); border-radius: 12px; background: #fbfcfe; padding: 8px 14px; margin: 0 0 12px; }
.bk-sum > div { display: flex; gap: 8px; padding: 5px 0; font-size: 13px; line-height: 1.5; }
.bk-sum > div + div { border-top: 1px dashed var(--line); }
.bk-sum span { flex: 0 0 72px; color: var(--muted); }
.bk-sum b { font-weight: 600; color: var(--brand); word-break: break-all; }
.bk-fold { border: 1px solid var(--line); border-radius: 12px; background: #fff; margin: 0 0 10px; overflow: hidden; }
.bk-fold > summary { list-style: none; cursor: pointer; padding: 12px 14px; display: flex; align-items: center;
  gap: 6px; font-size: 14px; font-weight: 600; color: var(--brand); }
.bk-fold > summary::-webkit-details-marker { display: none; }
.bk-fold > summary em { font-style: normal; font-weight: 400; font-size: 12px; color: var(--muted); margin-left: auto; }
.bk-fold > summary::after { content: '▾'; font-size: 12px; color: var(--muted); flex: 0 0 auto; transition: transform .15s; }
.bk-fold[open] > summary::after { transform: rotate(180deg); }
.bk-fold[open] > summary { border-bottom: 1px dashed var(--line); }
.bk-fold-body { padding: 12px 14px 6px; }
.bk-sched { border: 1px solid #ffd9b8; border-radius: 12px; background: #fffaf5; padding: 12px 14px 4px; margin: 0 0 12px; }
.bk-sched .bk-scope-t { color: #b25700; font-weight: 600; }

/* ---------- 逐位容量（每个库号单独设条数/台车） ---------- */
.zs-wrap { margin: 0 0 10px; }
.zs-sum {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border: 1px dashed #cfddeb; border-radius: 10px;
  background: #f8fbfe; font-size: 13.5px; font-weight: 600; color: var(--brand);
}
.zs-sum::-webkit-details-marker { display: none; }
.zs-sum::before { content: '▸'; font-size: 12px; color: var(--muted); }
.zs-wrap[open] .zs-sum::before { content: '▾'; }
.zs-def { font-weight: 400; color: var(--muted); font-size: 12px; }
.zs-chg { margin-left: auto; color: #b26a00; font-size: 12px; font-weight: 700; }
.zs-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 8px;
  padding: 10px 2px 4px;
}
.zs-chip {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 7px 4px; border-radius: 10px; border: 1px solid #dbe6f1; background: #fff;
  cursor: pointer; font: inherit;
}
.zs-chip b { font-size: 15px; font-weight: 800; color: var(--brand); line-height: 1.1; }
.zs-chip small { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.zs-chip.on { border-color: var(--accent); background: #fff7ee; box-shadow: 0 0 0 1px rgba(255, 138, 31, .18); }
.zs-chip.on small { color: #b26a00; font-weight: 600; }
.zs-chip.sel {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 5px 12px rgba(255, 138, 31, .32);
}
.zs-chip.sel b, .zs-chip.sel small { color: #fff; }
.zs-chip.sel small { opacity: .95; }
.zs-chip:active { transform: scale(.97); }
.zs-bar { display: flex; align-items: center; gap: 8px; padding: 10px 2px 0; flex-wrap: wrap; }
.zs-pick { margin-right: auto; font-size: 12.5px; font-weight: 700; color: var(--brand); }
.zs-bar .btn { margin: 0; }
.zs-tip { font-size: 12px; color: var(--muted); margin: 6px 2px 2px; }
.zs-fab {
  position: fixed; left: 12px; right: 12px; z-index: 45;
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  max-width: 736px; margin: 0 auto;
}
.zs-fab .btn { margin: 0; box-shadow: 0 10px 24px rgba(255, 138, 31, .34); }
body.slm-open .zs-fab { display: none; }
.slm-sub { font-size: 13px; color: var(--muted); margin: -6px 0 10px; }
.slm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; max-height: 96px; overflow: auto; }
.slm-tag {
  font-size: 12px; padding: 4px 8px; border-radius: 8px; line-height: 1.3;
  background: #fff3e9; color: #b25700; border: 1px solid #ffd6b5; white-space: nowrap;
}
.slm-tag.more { background: #eef4fb; color: var(--brand); border-color: #cddff2; }

.slm { position: fixed; inset: 0; z-index: 90; }
.slm-bg { position: absolute; inset: 0; background: rgba(12, 26, 44, .42); }
.slm-sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: #fff; border-radius: 18px 18px 0 0; padding: 18px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 30px rgba(10, 30, 55, .18);
  max-width: 760px; margin: 0 auto;
}
.slm-title { font-size: 17px; font-weight: 800; color: var(--brand); margin-bottom: 12px; }
.slm-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; }
.slm-row label { flex: 1 1 auto; font-size: 15px; font-weight: 600; }
.slm-row input {
  width: 92px; padding: 10px 8px; text-align: center; font-size: 19px; font-weight: 800;
  border: 1.5px solid #d7e0ea; border-radius: 10px; background: #fbfcfe; outline: none;
  -moz-appearance: textfield;
}
.slm-row input:focus { border-color: var(--accent); background: #fff; }
.slm-note { font-size: 12.5px; color: var(--muted); margin: 8px 0 14px; }
.slm-sheet .btn-block { width: 100%; margin: 0 0 9px; }
.btn-text { background: none; border: 0; box-shadow: none; color: var(--muted); font-size: 14px; }
body.slm-open { overflow: hidden; }

.save-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: rgba(242, 245, 249, .96);
  backdrop-filter: blur(6px);
  box-shadow: 0 -4px 16px rgba(16, 42, 74, .08);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
}
.save-bar-in { max-width: 760px; margin: 0 auto; }
.save-bar .btn-block { width: 100%; margin: 0; }
.save-tip { font-size: 12px; color: var(--muted); text-align: center; margin: 0 0 6px; min-height: 0; }
.save-tip:not(:empty) { color: #b26a00; }
.save-row { display: flex; gap: 10px; align-items: stretch; }
.save-row .btn { margin: 0; min-height: 54px; font-size: 17px; border-radius: 12px; }
.save-home { flex: 0 0 100px; justify-content: center; font-weight: 600; background: #fff; border: 1px solid #cfdbe8; color: var(--brand); box-shadow: none; }
.save-row button[type=submit] { flex: 1 1 auto; }
.btn.is-off, .btn[disabled] { opacity: .55; filter: saturate(.6); }

/* ---------- 提交中的遮罩（上传慢时给明确反馈） ---------- */
.saving-mask {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(10, 26, 46, .55);
  display: grid; place-items: center;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.saving-box {
  width: 76%; max-width: 300px; padding: 26px 20px 22px;
  background: #fff; border-radius: 16px; text-align: center;
  box-shadow: 0 12px 34px rgba(10, 26, 46, .28);
}
.saving-spin {
  width: 34px; height: 34px; margin: 0 auto 14px; border-radius: 50%;
  border: 3px solid #dbe6f2; border-top-color: #17558f;
  animation: lt-spin .8s linear infinite;
}
@keyframes lt-spin { to { transform: rotate(360deg); } }
.saving-t1 { font-size: 17px; font-weight: 700; color: #12253c; }
.saving-t2 { font-size: 13px; color: #6b7f96; margin-top: 6px; line-height: 1.5; }

/* ---------- 登录页 ---------- */
.auth-body { padding-bottom: 0; background: linear-gradient(180deg, #0b2440 0%, #17558f 34%, #f2f5f9 34%); min-height: 100vh; }
.auth-hero { color: #fff; text-align: center; padding: 44px 20px 26px; }
.auth-logo { width: 66px; height: 66px; margin: 0 auto 12px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255,255,255,.14); color: #fff; }
.auth-hero h1 { margin: 0; font-size: 24px; letter-spacing: 2px; }
.auth-hero p { margin: 6px 0 0; font-size: 12px; letter-spacing: 3px; opacity: .7; }
.auth-card { background: #fff; border-radius: 18px; margin: 0 20px; padding: 22px 20px 18px;
  box-shadow: 0 10px 30px rgba(9, 30, 55, .14); max-width: 420px; }
@media (min-width: 640px) { .auth-card { margin: 0 auto; } }
.auth-tip { text-align: center; font-size: 12px; color: var(--muted); margin: 14px 0 0; }

/* 手机键盘弹起：头部收窄、表单整体上移到顶部可视区 */
.auth-body.kb-on { min-height: 0; padding-bottom: 40vh; background: linear-gradient(180deg, #0b2440 0%, #17558f 96px, #f2f5f9 96px); }
.auth-body.kb-on .auth-hero { padding: 10px 20px 8px; }
.auth-body.kb-on .auth-logo { width: 40px; height: 40px; margin-bottom: 6px; }
.auth-body.kb-on .auth-logo svg { width: 22px; height: 22px; }
.auth-body.kb-on .auth-hero h1 { font-size: 17px; letter-spacing: 1px; }
.auth-body.kb-on .auth-hero p { display: none; }
.auth-body.kb-on .auth-card { border-radius: 0 0 16px 16px; padding-top: 14px; padding-bottom: 14px; margin-top: 0; }
.auth-body.kb-on .auth-card .field { margin-bottom: 8px; }
.auth-body.kb-on .auth-tip { display: none; }

.install-title { margin: 0 0 12px; font-size: 20px; }
.install-list { margin: 0 0 16px; padding-left: 18px; font-size: 14px; }
.install-list li { margin-bottom: 6px; }
.install-tip { font-size: 12px; color: var(--muted); }

/* 客户档案：无标签表单（全 placeholder） */
.cust-form input:not([type=file]):not([type=hidden]),
.cust-form textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fbfcfe; outline: none; font: inherit; font-size: 14px; color: inherit;
}
.cust-form input:not([type=file]):not([type=hidden]):focus,
.cust-form textarea:focus { border-color: var(--brand-2); background: #fff; }
.cust-form .plate-big { font-size: 18px; font-weight: 600; letter-spacing: 1px; text-align: center; padding: 13px 12px; }
.cust-form .photo-box { margin-top: 10px; }
.cust-form .field-row { display: flex; gap: 10px; margin-top: 10px; }
.cust-form .field-row > input { flex: 1 1 0; min-width: 0; }
.cust-form textarea { display: block; margin-top: 10px; min-height: 84px; resize: vertical; }

/* 文件选择框 / 导入模板链接 */
.file-pick { display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border: 1px dashed var(--line); border-radius: 10px; background: #fbfcfe; }
.file-pick input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.file-btn { flex: 0 0 auto; padding: 7px 14px; border-radius: 8px; background: #1b3a5c; color: #fff;
  font-size: 13px; cursor: pointer; }
.file-btn:hover { background: #24507d; }
.file-name { flex: 1 1 auto; min-width: 0; font-size: 12.5px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-name.has { color: var(--text); }
.imp-tpl { display: inline-block; margin: 2px 0 12px; font-size: 12.5px; color: var(--brand-2); text-decoration: none; }

/* ---------- 提示 ---------- */
/* 提示统一做成浮层弹窗：悬浮底部居中，按类型自动消失 */
.flash {
  position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(10px);
  z-index: 90; margin: 0 !important; padding: 11px 16px; border-radius: 12px; font-size: 13.5px;
  max-width: min(88vw, 420px); width: max-content; line-height: 1.45; text-align: center;
  box-shadow: 0 10px 28px rgba(10, 28, 48, .18), 0 2px 6px rgba(10, 28, 48, .08);
  opacity: 0; pointer-events: auto; cursor: pointer;
  transition: opacity .26s ease, transform .26s ease;
}
.flash.in { opacity: 1; transform: translateX(-50%) translateY(0); }
.flash.out { opacity: 0; transform: translateX(-50%) translateY(8px); }
.flash-ok { background: #e7f7ee; color: #0d7443; border: 1px solid #cbeada; }
.flash-err { background: #fdecec; color: #b22f2f; border: 1px solid #f6d3d3; }

.empty { text-align: center; color: var(--muted); padding: 34px 10px; font-size: 13px; }
.empty .big { font-size: 36px; display: block; margin-bottom: 6px; opacity: .5; }

/* ---------- 详情 ---------- */
.kv { display: grid; grid-template-columns: 84px 1fr; gap: 8px 10px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

/* ---------- 统计表 ---------- */
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th, table.tbl td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
table.tbl th { color: var(--muted); font-weight: 500; font-size: 12px; }
table.tbl td.num, table.tbl th.num { text-align: right; }

/* ---------- 僵尸胎提醒 ---------- */
.stale-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; text-decoration: none; color: var(--text); border-left: 4px solid #f0a02a; }
.stale-bar .sb-ico { font-size: 20px; flex-shrink: 0; }
.stale-bar .sb-txt { flex: 1; min-width: 0; line-height: 1.35; }
.stale-bar .sb-txt b { font-size: 14px; color: #b46000; }
.stale-bar .sb-txt small { display: block; font-size: 11px; color: var(--muted); }
.stale-bar .sb-go { flex-shrink: 0; font-size: 12px; color: #b46000; font-weight: 600; }
.stale-head { margin: 0 0 12px; }
.stale-title { font-size: 18px; font-weight: 700; color: var(--brand); }
.stale-sub { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.stale-tag { display: inline-block; padding: 1px 7px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.stale-tag.st1 { background: #fff4e0; color: #a96a00; }
.stale-tag.st2 { background: #ffe8cd; color: #a35400; }
.stale-tag.st3 { background: #ffe0de; color: #b1352b; }
.stale-tag.st4 { background: #f8d7d5; color: #8e1f18; }
.stale-days { font-weight: 700; font-size: 12px; }
.stale-days.st1 { color: #a96a00; }
.stale-days.st2 { color: #a35400; }
.stale-days.st3 { color: #b1352b; }
.stale-days.st4 { color: #8e1f18; }
/* 僵尸胎提醒：时长设置 */
.stale-set { margin-bottom: 12px; }
.stale-set .badge { background: #fff4e0; color: #a96a00; }
.stale-note { margin-left: 6px; padding: 1px 7px; border-radius: 20px; background: #fff4e0; color: #a96a00; font-size: 11px; font-weight: 500; vertical-align: 1px; }
.stale-chips { display: flex; gap: 6px; margin-bottom: 10px; }
.stale-chip { flex: 1 1 0; min-width: 0; height: 40px; padding: 0; border-radius: 10px; border: 1px solid #dfe6ee; background: #fff; color: var(--text); font-size: 13.5px; font-weight: 600; -webkit-tap-highlight-color: transparent; }
.stale-chip.on { background: #fff4e0; border-color: #f0a02a; color: #a96000; }
.stale-chip-off.on { background: #eef2f7; border-color: #b9c6d4; color: #4a5a6c; }
.stale-daysrow { display: flex; align-items: center; gap: 8px; }
.stale-daysrow input { flex: 1 1 auto; min-width: 0; width: auto; height: 40px; padding: 0 12px; border: 1px solid #dfe6ee; border-radius: 10px; font-size: 17px; font-weight: 600; background: #fff; color: var(--text); }
.stale-unit { flex: 0 0 auto; font-size: 13px; color: var(--muted); }
.stale-hint { margin-top: 8px; font-size: 11px; color: var(--muted); line-height: 1.5; }.kind-tag { background: #eef2f7; color: #4a5a6c; }
/* 僵尸胎列表副标题允许折行，避免库位/日期被截断 */
.st-sub { white-space: normal !important; overflow: visible !important; line-height: 1.45; }

/* 统计页筛选行：日期 + 按钮同一行（手机窄屏也保持一行，压缩间距与字号） */
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filter-row .field { flex: 1 1 140px; margin: 0; min-width: 0; }
.filter-row .btn { flex: 0 0 auto; min-width: 132px; padding-left: 18px; padding-right: 18px; }
@media (max-width: 639px) {
  .filter-row { flex-wrap: nowrap; gap: 6px; }
  .filter-row .field { flex: 1 1 0; min-width: 0; }
  .filter-row .field > span { font-size: 11px; margin-bottom: 3px; white-space: nowrap; }
  .filter-row .field input { font-size: 12px; padding: 8px 6px; min-width: 0; }
  .filter-row .btn { flex: 0 0 auto; min-width: 0; padding: 0 10px; font-size: 13px; height: 38px; white-space: nowrap; }
  /* 手机端统计四格：提示文字压成一行，超出省略 */
  .stats-grid.tight .stat .hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; -webkit-line-clamp: unset; }
}

@media (min-width: 640px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  /* 电脑端恢复大字号卡片，紧凑样式只用于手机一行四格 */
  .stats-grid.tight .stat { padding: 14px; border-radius: var(--radius); }
  .stats-grid.tight .stat .k { font-size: 12px; }
  .stats-grid.tight .stat .v { font-size: 24px; margin-top: 2px; }
  .stats-grid.tight .stat .hint { font-size: 11px; -webkit-line-clamp: unset; display: block; }
  .quick-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- 通用弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 40; display: none;
  background: rgba(8, 20, 35, .55);
  padding: 18px; overflow-y: auto;
}
.modal-mask.show { display: flex; align-items: center; justify-content: center; }
.modal-box {
  background: #fff; border-radius: 14px; width: 100%; max-width: 420px;
  padding: 16px 16px 14px; box-shadow: 0 18px 40px rgba(0, 0, 0, .2);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.modal-head span { font-size: 17px; font-weight: 700; }
.modal-x { border: 0; background: #f0f3f7; color: #5b6b7d; width: 30px; height: 30px; border-radius: 50%; font-size: 14px; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.pwd-tip { font-size: 12px; min-height: 16px; margin: 2px 0 0; color: var(--muted); }
.pwd-tip.bad { color: #c0392b; font-weight: 600; }
.pwd-tip.ok { color: #14804a; font-weight: 600; }
/* 修改密码弹窗 */
.pwd-pad { position: fixed; inset: 0; z-index: 62; display: none; }
.pwd-pad.on { display: block; }
.pwd-mask { position: absolute; inset: 0; background: rgba(8, 18, 32, .5); }
.pwd-sheet { position: absolute; left: 0; right: 0; bottom: 0; background: #fff;
  border-radius: 18px 18px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 28px rgba(8, 18, 32, .18); animation: pwdUp .22s ease-out; }
@keyframes pwdUp { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.pwd-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.pwd-head b { font-size: 17px; }
.pwd-who { font-size: 12.5px; color: var(--muted); }
/* 下拉菜单 */
.dd { position: relative; }
.dd-btn { display: inline-flex; align-items: center; gap: 4px; }
.dd-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 128px; z-index: 30;
  background: #fff; border-radius: 12px; box-shadow: 0 8px 24px rgba(8, 18, 32, .16);
  border: 1px solid var(--line); padding: 4px; display: none; }
.dd-menu.on { display: block; }
.dd-item { display: block; padding: 10px 12px; border-radius: 9px; font-size: 14.5px;
  font-weight: 600; color: #14202e; white-space: nowrap; }
.dd-item:active { background: #f2f6fa; }
.dd-item + .dd-item { border-top: 1px solid var(--line); border-radius: 0 0 9px 9px; }

/* ---------- 车牌专用键盘 ---------- */
body.pad-open { overflow: hidden; }
.plate-pad { position: fixed; inset: 0; z-index: 60; display: none; }
.plate-mask { position: absolute; inset: 0; background: rgba(8, 18, 32, .5); }
.plate-sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: #16202f; color: #fff; border-radius: 16px 16px 0 0;
  padding: 10px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -10px 30px rgba(0,0,0,.3);
  animation: padUp .22s ease-out;
}
@keyframes padUp { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.plate-head { display: flex; align-items: center; gap: 6px; }
.plate-preview {
  flex: 1; height: 38px; display: flex; align-items: center; justify-content: center;
  background: #0b1524; border: 1px solid #2c3c53; border-radius: 9px;
  padding: 0 10px; font-size: 17px; letter-spacing: 2px;
  color: #8ad8ff; font-weight: 600; overflow: hidden;
}
.plate-preview .empty { color: #5f748c; font-size: 13px; letter-spacing: 1px; font-weight: 400; }
.plate-preview .pv-text { white-space: nowrap; line-height: 1; display: block; }
.plate-kb {
  border: 1px solid #31425a; background: transparent; color: #9db4cc;
  border-radius: 8px; padding: 6px 8px; font-size: 11px; white-space: nowrap;
}
.plate-close { border: 0; background: transparent; color: #8ba1b8; font-size: 16px; padding: 2px 4px; }
.plate-hint { display: none; }
.plate-keys { display: grid; gap: 5px; margin-top: 8px; }
.plate-keys.prov { grid-template-columns: repeat(8, 1fr); }
.plate-keys.chars { display: block; }
.pk-row { display: grid; gap: 5px; margin-top: 5px; }
.pk-row.r1 { grid-template-columns: repeat(10, 1fr); }
.pk-row.r2 { grid-template-columns: repeat(9, 1fr); padding: 0 5%; }
.pk-row.r3 { grid-template-columns: repeat(7, 1fr); padding: 0 15%; }
.pk-row.r4 { grid-template-columns: repeat(10, 1fr); margin-top: 9px; }
.pk {
  padding: 10px 0; border: 0; border-radius: 8px; background: #26354a; color: #fff;
  font-size: 16px; line-height: 1.1; transition: background .12s, opacity .12s;
}
.pk:active { background: #3b5271; }
.pk.dim { opacity: .42; }
.plate-keys.prov .pk { padding: 7px 0; font-size: 15px; border-radius: 7px; }
/* 选好省份后：省份盘收起，字母数字盘加大 */
.plate-provbar { display: none; margin-top: 8px; }
.plate-reprov {
  border: 1px solid #31425a; background: transparent; color: #9db4cc;
  border-radius: 8px; padding: 5px 10px; font-size: 12px;
}
.plate-pad.prov-off .pk-row { margin-top: 7px; }
.plate-pad.prov-off .pk-row .pk { padding: 12px 0; font-size: 17px; font-weight: 600; }

/* 数字九宫格（大字、好点） */
.num-pad { display: flex; gap: 6px; margin-top: 10px; align-items: stretch; }
.num-keys { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.num-keys .pk-num {
  padding: 12px 0; border-radius: 10px; background: #24344a;
  font-size: 26px; font-weight: 700; letter-spacing: 0;
}
.num-keys .pk-num:active { background: #3b5271; }
.num-fn {
  border: 0; border-radius: 10px; background: #26354a; color: #dbe7f3;
  font-size: 15px; font-weight: 600; padding: 12px 0;
}
.num-fn:active { background: #3b5271; }
.num-fn.del { color: #ffb3b3; }
.num-ok {
  flex: 0 0 84px; width: 84px; border: 0; border-radius: 12px;
  background: linear-gradient(135deg, #ffb04a, #ff8a1f); color: #2a1400;
  font-size: 19px; font-weight: 800; letter-spacing: 1px;
}
.num-ok:active { background: linear-gradient(135deg, #ffc06a, #ef7f13); }
/* 本地常用：蒙 放首位并高亮 */
.pk.pk-hot {
  background: linear-gradient(135deg, #ffb45c, #ff8a1f); color: #2a1400; font-weight: 800;
  box-shadow: 0 0 0 2px rgba(255, 138, 31, .5), 0 3px 10px rgba(255, 138, 31, .3);
}
.pk.pk-hot:active { background: linear-gradient(135deg, #ffc274, #f07f14); }
.pk.pk-num { background: #1e2b3c; color: #cfe0f1; }
.plate-actions { display: flex; gap: 6px; margin-top: 8px; }
.plate-btn {
  flex: 1; padding: 9px 0; border: 0; border-radius: 9px;
  background: #26354a; color: #dbe7f3; font-size: 14px; font-weight: 600;
}
.plate-btn.ok { flex: 2; background: linear-gradient(135deg, #ffa447, #ff8a1f); color: #2a1400; }
.plate-btn.del { color: #ffb4b4; }

/* ---------- 禁止页面缩放（手机端） ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { touch-action: pan-x pan-y; }
button, .pk, .tab, a { touch-action: manipulation; }
@media (max-width: 640px) {
  body { font-size: 16px; }
  /* iOS 聚焦输入框时字号 <16px 会强制放大页面 */
  input, textarea, select,
  .field input, .field textarea, .field select { font-size: 16px; }
}

/* ---------- 客户选择弹层 ---------- */
.pick { position: fixed; inset: 0; z-index: 62; display: none; }
.pick-mask { position: absolute; inset: 0; background: rgba(8, 18, 32, .5); }
.pick-sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column;
  max-height: 78vh; background: #fff; color: var(--text);
  border-radius: 16px 16px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,.25);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  animation: padUp .22s ease-out;
}
.pick-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 10px; }
.pick-search {
  flex: 1; min-width: 0; padding: 11px 14px; border: 1px solid var(--line);
  border-radius: 10px; background: #f4f7fb; font-size: 16px; outline: none;
}
.pick-search:focus { border-color: var(--brand-2); background: #fff; }
.pick-close { border: 0; background: transparent; color: var(--muted); font-size: 18px; padding: 4px 8px; }
.pick-list { overflow-y: auto; padding: 0 10px 12px; }
.pick-empty { text-align: center; color: var(--muted); font-size: 13px; padding: 26px 0; }
.pi {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 12px 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent;
  border-radius: 10px;
}
.pi:active { background: #f2f6fb; }
.pi b { font-size: 16px; font-weight: 700; letter-spacing: 1px; color: var(--brand); flex-shrink: 0; }
.pi span { flex: 1; min-width: 0; font-size: 13px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pi em { flex-shrink: 0; display: inline-block; max-width: 52%; font-style: normal; font-size: 11px; color: #0f7a4d;
  background: #e8f8ef; padding: 2px 8px; border-radius: 20px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 开单：分区块 / 库存提示 ---------- */
.sub-h {
  display: flex; align-items: center; gap: 8px;
  margin: 14px 0 10px; font-size: 13px; font-weight: 700; color: var(--brand-2);
}
.sub-h::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.stock-hint {
  display: none; margin-top: 6px; padding: 9px 11px; border-radius: 9px;
  background: #e8f8ef; color: #0f7a4d; font-size: 12.5px; line-height: 1.5;
}
.stock-hint.show { display: block; }
.stock-hint.none { background: #eff3f8; color: #5b6b7d; }
.form-note { font-size: 12px; color: var(--muted); margin: 8px 0 0; }

/* ---------- 库位选择弹层 ---------- */
.slot-pad { position: fixed; inset: 0; z-index: 61; display: none; }
.slot-mask { position: absolute; inset: 0; background: rgba(8, 18, 32, .5); }
.slot-sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: #16202f; color: #fff; border-radius: 16px 16px 0 0;
  padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -10px 30px rgba(0,0,0,.3);
  max-height: 88vh; overflow-y: auto;
  animation: padUp .22s ease-out;
}
.slot-head { display: flex; align-items: center; gap: 8px; }
.slot-preview {
  flex: 1; min-height: 0; height: 46px; display: flex; align-items: center;
  background: #0b1524; border: 1px solid #2c3c53; border-radius: 10px;
  padding: 0 12px; font-size: 17px; color: #8ad8ff; font-weight: 600;
  overflow: hidden;
}
.slot-preview .sv { display: block; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-preview .sv.empty { color: #5f748c; font-size: 14px; font-weight: 400; }
.slot-close { border: 0; background: transparent; color: #8ba1b8; font-size: 18px; padding: 4px 8px; }
.slot-hint { font-size: 11px; color: #7d93ab; margin: 8px 2px 10px; }
.slot-tabs { display: grid; gap: 6px; }
.slot-tabs.sf-box { grid-template-columns: repeat(3, 1fr); }
.slot-tabs.sz-box { grid-template-columns: repeat(4, 1fr); margin-top: 6px; }
.sf, .sz {
  padding: 10px 0; border: 1px solid #2c3c53; border-radius: 9px;
  background: #1d2938; color: #cfe0f1; font-size: 14px;
}
.sf.on, .sz.on { background: #2f7cf6; border-color: #2f7cf6; color: #fff; font-weight: 600; }
.slot-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 10px; }
.sn {
  padding: 11px 0; border: 0; border-radius: 8px;
  background: #26354a; color: #fff; font-size: 16px;
}
.sn.on { background: linear-gradient(135deg, #ffa447, #ff8a1f); color: #2a1400; font-weight: 700; }
/* 库位选择器占用：绿=1台车，红=2台车 */
.sn { position: relative; }
.sn.one { background: #1f7a4d; color: #fff; }
.sn.two { background: #b03a2e; color: #fff; }
.sn.over { background: #7a1f18; color: #fff; }
.sn em {
  position: absolute; top: 1px; right: 3px; font-style: normal; font-size: 9px;
  line-height: 1; color: #fff; opacity: .9;
}
.slot-picktip { margin: 8px 0 0; font-size: 12px; line-height: 1.5; color: #c8d2de; min-height: 18px; }
.slot-picktip.free { color: #7ee2ab; }
.slot-picktip.busy { color: #ffd27a; }
.slot-picktip.full { color: #ff9d8f; font-weight: 700; }
.slot-actions { display: flex; gap: 8px; margin-top: 12px; position: sticky; bottom: 0; background: #16202f; padding-top: 8px; }
.slot-btn {
  flex: 1; padding: 12px 0; border: 0; border-radius: 10px;
  background: #26354a; color: #dbe7f3; font-size: 15px; font-weight: 600;
}
.slot-btn.ok { flex: 2; background: linear-gradient(135deg, #ffa447, #ff8a1f); color: #2a1400; }


/* ---------- 本店寄存轮胎 ---------- */
.stock-card { margin: 0 0 8px; padding: 0; border: 0; background: none; }
.sc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.sc-title { font-size: 13px; font-weight: 700; color: var(--brand-2); letter-spacing: .5px; }
.sc-total { font-size: 12px; color: var(--muted); }
.sc-total b { font-size: 16px; color: var(--brand); }
.sc-empty { text-align: center; padding: 8px 4px 2px; }
.sc-empty-t { font-size: 16px; font-weight: 700; color: var(--err); }
.sc-empty-t::before { content: '✕ '; }
.sc-empty-s { display: none; }

.sc-kind { border-radius: 10px; background: #fff; border: 1px solid var(--line); padding: 9px 11px; margin-top: 8px; }
.sc-kind.w { border-color: #cfe3f7; background: #f6fbff; }
.sc-kind.s { border-color: #ffe0bf; background: #fffaf2; }
.sc-kind.o { border-color: #e4e7ee; }
.sc-kind-h { display: flex; align-items: center; justify-content: space-between; }
.sc-name { font-size: 15px; font-weight: 700; color: var(--text); }
.sc-qty { font-size: 22px; font-weight: 800; color: var(--brand); line-height: 1; }
.sc-qty small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.sc-kind.w .sc-qty { color: #0b63b6; }
.sc-kind.s .sc-qty { color: #c76a00; }
.sc-err { margin-top: 5px; font-size: 12px; color: var(--err); }
.sc-lots { margin-top: 7px; border-top: 1px dashed var(--line); padding-top: 7px; }
.sc-lot { padding: 5px 0; }
.sc-lot + .sc-lot { border-top: 1px dotted #eef2f7; }
.sc-lot-l { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.sc-pin { font-size: 12px; }
.sc-lot-l b { color: var(--brand); letter-spacing: .3px; }
.sc-lqty { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--ok); }
.sc-move {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  padding: 5px 10px; border-radius: 9px; border: 1px solid #ffd3a8;
  background: #fff7ee; color: #e06f0a; font-size: 12.5px; font-weight: 700;
  text-decoration: none; white-space: nowrap; line-height: 1.2;
  box-shadow: 0 1px 0 rgba(255, 138, 31, .12);
}
.sc-move:active { background: #ffeedd; }
.sc-lot-m { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11px; color: var(--muted); margin-top: 1px; padding-left: 18px; }
.sc-note { font-size: 12px; color: #7a5b16; background: #fffbe8; border-radius: 6px; padding: 3px 8px; margin-top: 4px; }
.sc-acts { display: flex; gap: 6px; margin-top: 9px; }
.sc-acts.solo { justify-content: center; }
.sc-act {
  flex: 1 1 0; min-width: 0;
  display: inline-flex; align-items: center; justify-content: center;
  margin: 0; padding: 9px 4px; border-radius: 9px; white-space: nowrap;
  background: var(--brand); color: #fff; font-size: 12.5px; font-weight: 600;
}
.sc-act.ghost { background: #eef3f9; color: var(--brand); }

/* ---------- 库房库位页 ---------- */
.slot-tbl { border-collapse: collapse; }
.slot-tbl th, .slot-tbl td { padding: 5px 4px; font-size: 12px; white-space: nowrap; }
.slot-tbl th { font-weight: 600; }
.slot-cell {
  display: inline-block; min-width: 24px; padding: 3px 2px; border-radius: 6px;
  background: #f0f3f7; color: #a7b3c2; font-size: 12px; text-align: center;
}
.slot-cell.on { background: #e2f5e9; color: #14804a; font-weight: 700; }
.slot-cell.neg { background: #fdeaea; color: #c0392b; font-weight: 700; }
/* 库位占用：绿=1台车，红=2台车（满 8 条） */
.slot-cell.one { background: #d9f2e3; color: #0f7b45; font-weight: 700; }
.slot-cell.two { background: #fde0dc; color: #b03a2e; font-weight: 700; }
.slot-cell.over { background: #c0392b; color: #fff; font-weight: 700; }
.slot-cell.off { background: transparent; color: #e2e7ee; }
.slot-cell small { display: block; font-size: 9px; line-height: 1.1; font-weight: 400; opacity: .85; }

/* ---------- 统计查询页 ---------- */
.qchips { display: flex; gap: 8px; margin-bottom: 10px; }
.qchip {
  flex: 1; text-align: center; padding: 9px 4px; border-radius: 10px;
  background: #fff; border: 1px solid var(--line); font-size: 13px; color: var(--muted);
}
.qchip.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.range-note { font-size: 12px; color: var(--muted); margin: 9px 0 0; text-align: center; }
.muted-sm { font-size: 12px; font-weight: 400; color: var(--muted); }
.barrow { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.barrow .badge { flex: 0 0 62px; text-align: center; }
.barwrap { flex: 1 1 auto; height: 8px; border-radius: 6px; background: #eef3f9; overflow: hidden; }
.barfill { height: 100%; border-radius: 6px; }
.bar-store_in { background: #2fb572; }
.bar-season { background: #f0a02a; }
.bar-store_out { background: #7c66e0; }
.barnum { flex: 0 0 auto; font-size: 12.5px; color: var(--text); min-width: 78px; text-align: right; }
.barnum em { display: block; font-style: normal; font-size: 11px; color: var(--muted); }
.trend-bars { display: flex; align-items: flex-end; gap: 6px; padding: 6px 0 0; }
.tb-col { flex: 1 1 0; text-align: center; }
.tb-val { font-size: 11px; color: var(--muted); height: 14px; line-height: 14px; }
.tb-bar { border-radius: 5px 5px 0 0; background: linear-gradient(180deg, #4f8fd0, #1a5e9e); }
.tb-bar.zero { background: #e6ecf3; }
.tb-day { font-size: 11px; color: var(--muted); margin-top: 5px; }
.rk {
  display: inline-block; width: 18px; height: 18px; line-height: 18px; text-align: center;
  border-radius: 50%; font-size: 11px; background: #eef3f9; color: var(--muted); margin-right: 6px;
}
.rk.top1 { background: #ffe8cf; color: #b96500; font-weight: 700; }
.rk.top2, .rk.top3 { background: #eaf2fb; color: var(--brand-2); font-weight: 700; }
.st-plate { font-size: 15px; font-weight: 700; letter-spacing: .5px; }
.st-cust { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.st-cust span { margin-left: 5px; }
.st-lots { font-size: 12px; line-height: 1.45; color: var(--text); }
.tbl-wrap { padding: 2px 14px 0; }
table.tbl.tbl-roomy { width: 100%; }
table.tbl.tbl-roomy th, table.tbl.tbl-roomy td { padding: 10px 0; }
table.tbl.tbl-roomy th { padding-top: 6px; padding-bottom: 6px; }
table.tbl.tbl-roomy tr:last-child td { border-bottom: 0; }
/* 客户档案列表：长姓名不再挤掉库位信息 */
.c-line1 { display: flex; align-items: center; gap: 4px; min-width: 0; white-space: nowrap; overflow: hidden; }
.c-plate { flex: 0 0 auto; font-weight: 600; }
.c-sep { flex: 0 0 auto; color: var(--muted); }
.c-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.c-st {
  display: inline-block; margin-top: 4px; padding: 2px 9px;
  font-size: 11.5px; line-height: 1.45; word-break: break-all;
  color: #0f7a4d; background: #f2fbf7; border: 1px solid #a7ddc4; border-radius: 8px;
}
/* 搜索栏强制单行，避免「＋」按钮被挤到下一行 */
.sb-nw { flex-wrap: nowrap; }
.sb-nw input { min-width: 0; }
.sb-nw .btn { flex: 0 0 auto; }
.sb-nw .btn-plus { padding: 0 14px; font-size: 18px; }
.sc-act.season { background: #c8443f; color: #fff; }

/* ---------- 照片预览浮层 ---------- */
.lb {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0, 0, 0, .94);
  display: flex; align-items: center;
  opacity: 0; transition: opacity .16s; touch-action: none;
}
.lb.on { opacity: 1; }
.lb-track { display: flex; height: 100%; width: 100%; will-change: transform; }
.lb-slide {
  flex: 0 0 100%; height: 100%; display: flex;
  align-items: center; justify-content: center; overflow: hidden;
}
.lb-slide img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  user-select: none; -webkit-user-drag: none; will-change: transform;
}
.lb-x {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .16); color: #fff;
  font-size: 17px; line-height: 1; padding: 0;
}
.lb-dots {
  position: absolute; bottom: 18px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 6px; pointer-events: none;
}
.lb-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .35); }
.lb-dots i.on { background: #fff; }
body.no-scroll { overflow: hidden; }

/* ---------- 系统设置 · 门店形象 ---------- */
.brand-icon.has-img { background: #fff; border-radius: 9px; overflow: hidden; }
.brand-icon.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.auth-logo.has-img { background: #fff; border-radius: 16px; overflow: hidden; padding: 0; }
.auth-logo.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.set-cell { min-width: 0; }
.set-box { display: block; position: relative; width: 100%; aspect-ratio: 1 / 1;
  border-radius: 14px; overflow: hidden; background: #f2f6fa;
  border: 1px dashed #b9c6d4; cursor: pointer; }
.set-box:active { border-color: var(--brand-2); }
.set-thumb { position: absolute; inset: 0; }
.set-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.set-ph { position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
  color: #8fa3b8; font-size: 12px; text-align: center; padding: 10px; pointer-events: none; }
.set-ph b { font-size: 28px; font-weight: 400; color: #9db1c6; line-height: 1; }
.set-ph[hidden] { display: none; }
.set-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.set-cap { display: flex; align-items: center; justify-content: space-between; gap: 6px;
  margin-top: 8px; font-size: 12px; color: var(--muted); }
.set-cap b { font-size: 13px; font-weight: 700; color: #14202e; }
.set-del { display: flex; align-items: center; gap: 5px; margin-top: 6px;
  font-size: 12px; color: var(--muted); }
.set-del input { width: auto; margin: 0; }
/* LOGO 上传行（小预览） */
.logo-row { display: flex; align-items: center; gap: 14px; }
.set-box-sm { width: 88px; height: 88px; flex: 0 0 auto; aspect-ratio: auto; border-radius: 10px; }
.set-box-sm .set-ph { gap: 2px; padding: 4px; }
.set-box-sm .set-ph b { font-size: 18px; }
.set-box-sm .set-ph span { font-size: 11px; }
.logo-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.logo-meta b { font-size: 14px; color: #14202e; }
.logo-note { font-size: 12px; color: var(--muted); line-height: 1.55; }
