/* ===== 轻色简洁主题（司机端重做） ===== */
:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --panel2: #f7f9fb;
  --text: #1f2933;
  --muted: #8a94a6;
  --primary: #2f7d4f;       /* 品牌绿 */
  --primary-d: #256b43;
  --primary-soft: #e8f3ec;
  --ok: #2f7d4f;
  --warn: #e0a800;
  --err: #e5484d;
  --line: #e6eaf0;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(20,30,50,.06), 0 6px 18px rgba(20,30,50,.05);
}
* { box-sizing: border-box; }
body.app-light {
  margin: 0; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); }
.hidden { display: none !important; }
button { cursor: pointer; font-family: inherit; border: none; }

/* 按钮 */
.btn-primary { background: var(--primary); color: #fff; border-radius: 12px; padding: 12px 16px; font-size: 14px; font-weight: 600; transition: .15s; }
.btn-primary:hover { background: var(--primary-d); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-outline { background: #fff; color: var(--primary); border: 1px solid var(--primary); border-radius: 12px; padding: 12px 16px; font-size: 14px; font-weight: 600; }
.btn-danger { background: var(--err); color: #fff; border-radius: 12px; padding: 12px 16px; font-size: 14px; font-weight: 600; transition: .15s; }
.btn-danger:hover { filter: brightness(.95); }
.btn-danger:disabled { opacity: .5; cursor: not-allowed; }
/* 全宽按钮（登录卡片 / 退出登录） */
.btn.block { display: block; width: 100%; border: none; cursor: pointer; box-sizing: border-box; }
.btn-ghost { background: transparent; color: var(--muted); font-size: 13px; padding: 4px 8px; border-radius: 8px; }
.btn-ghost:hover { background: var(--panel2); color: var(--text); }
.btn-ghost.sm { font-size: 12px; padding: 2px 8px; }
.btn.sm, .btn-outline.sm { padding: 6px 12px; font-size: 12px; }

/* 基础按钮：同时兼容 HTML 中常用的 .btn / .btn.primary 写法 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: #fff; color: var(--text); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 16px; font-size: 14px; font-weight: 600; transition: .15s;
}
.btn:hover { background: var(--panel2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn.primary:hover { background: var(--primary-d); border-color: var(--primary-d); }
/* 旧的 .btn-primary 写法保持兼容 */
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-d); border-color: var(--primary-d); }
.block { display: block; width: 100%; }
.row-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.row-actions .btn-primary, .row-actions .btn-outline { flex: 1; min-width: 130px; }

/* 顶栏 */
.appbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-d));
  color: #fff; border-bottom: none;
  position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 12px rgba(47,125,79,.28);
}
.appbar-title { font-size: 17px; font-weight: 800; letter-spacing: .5px; }
.appbar-right { display: flex; align-items: center; gap: 8px; }
.appbar .who { color: rgba(255,255,255,.85); font-size: 13px; }
.appbar .btn-ghost { color: rgba(255,255,255,.92); }
.appbar .btn-ghost:hover { background: rgba(255,255,255,.16); color: #fff; }

/* 主区 */
.main { max-width: 720px; margin: 0 auto; padding: 14px 14px 90px; }
section[hidden] { display: none; }

/* 卡片 */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.card-head { position: relative; padding-left: 12px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-weight: 700; font-size: 15px; }
.card-head::before { content: ''; position: absolute; left: 0; top: 1px; bottom: 1px; width: 4px; border-radius: 4px; background: var(--primary); }
.muted { color: var(--muted); }
.sm { font-size: 12px; }

label { display: block; margin: 12px 0 5px; color: var(--muted); font-size: 12px; }
input, select, textarea {
  width: 100%; padding: 10px 11px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--text); font-size: 15px; font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
textarea { min-height: 64px; resize: vertical; }
.row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 120px; }

/* 状态卡 */
.status-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-d));
  color: #fff; border-radius: var(--radius); padding: 16px; margin-bottom: 14px;
  box-shadow: var(--shadow); flex-wrap: wrap;
}
.status-left { display: flex; align-items: center; gap: 12px; }
.status-dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.5); box-shadow: 0 0 0 4px rgba(255,255,255,.18); }
.status-dot.on { background: #fff; animation: pulse 1.6s infinite; }
.status-dot.off { background: rgba(255,255,255,.55); }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(255,255,255,.5);} 70%{box-shadow:0 0 0 8px rgba(255,255,255,0);} 100%{box-shadow:0 0 0 0 rgba(255,255,255,0);} }
.status-label { font-size: 16px; font-weight: 700; }
.status-sub { font-size: 12px; opacity: .85; }
.status-actions { display: flex; gap: 8px; }
.status-actions .btn-primary, .status-actions .btn-danger { min-width: 88px; }

/* 地图 */
canvas.map { width: 100%; border-radius: 10px; background: #eef2f6; display: block; }
.map { width: 100%; height: 300px; border-radius: 10px; background: #eef2f6; overflow: hidden; position: relative; }

/* 照片入口 + 网格 */
.photo-pick { display: flex; gap: 8px; margin-top: 6px; }
.photo-pick .btn-primary, .photo-pick .btn-outline { flex: 1; }
.photo-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: flex-start; }
.photo-grid img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.photo-thumb { position: relative; display: inline-block; }
.photo-thumb img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; cursor: zoom-in; transition: transform .15s; }
.photo-thumb img:hover { transform: scale(1.05); border-color: var(--primary); }
.photo-thumb .photo-del {
  position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--err); color: #fff; border: none; font-size: 13px; line-height: 20px; padding: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}

/* 今日任务卡片 */
.item-list { display: flex; flex-direction: column; gap: 12px; }
.stop-card { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.stop-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.stop-head strong { font-size: 14px; }
.stop-card .photo-grid { margin-top: 8px; }

/* 状态徽标 */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; }
.badge.pending { background: rgba(224,168,0,.16); color: #b07d00; }
.badge.completed { background: var(--primary-soft); color: var(--primary); }
.badge.working { background: rgba(26,115,232,.14); color: #1a73e8; }
.badge.pattern { background: #ecfeff; color: #0e7490; border: 1px solid #a5f3fc; padding: 2px 8px; font-size: 11px; font-weight: 600; }
.badge.off_work { background: #eef1f5; color: var(--muted); }
.badge.err { background: rgba(229,72,77,.16); color: var(--err); }
.pill { display:inline-block; background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; margin: 2px 4px 2px 0; font-size: 12px; }

/* ===== 个人中心 ===== */
.profile-head { display: flex; align-items: center; gap: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.avatar-wrap { position: relative; flex-shrink: 0; }
.avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--primary-soft); border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.avatar-edit { position: absolute; right: -4px; bottom: -4px; background: var(--primary); color: #fff; border: none; border-radius: 999px; font-size: 11px; padding: 3px 8px; }
.profile-meta { flex: 1; min-width: 0; }
.profile-name { font-size: 18px; font-weight: 700; }
.profile-phone { color: var(--muted); font-size: 13px; margin: 2px 0 6px; }
.profile-plate { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.plate-text { font-weight: 600; color: var(--text); }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.metric { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 8px; text-align: center; box-shadow: var(--shadow); }
.metric-val { font-size: 20px; font-weight: 800; color: var(--primary); }
.metric-label { font-size: 11px; color: var(--muted); margin-top: 4px; }

.overtime-list { display: flex; flex-direction: column; gap: 2px; }
.ot-row { display: grid; grid-template-columns: 56px 1fr auto auto; gap: 10px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--line); font-size: 13px; }
.ot-row:last-child { border-bottom: none; }
.ot-date { font-weight: 700; }
.ot-time { color: var(--muted); }
.ot-work { font-weight: 600; }
.ot-badge { font-size: 11px; color: var(--muted); padding: 2px 8px; border-radius: 999px; background: #eef1f5; }
.ot-badge.on { color: #b07d00; background: rgba(224,168,0,.16); font-weight: 600; }

/* ===== 底部 Tab 导航 ===== */
.tabbar {
  display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--panel); border-top: 1px solid var(--line);
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
  max-width: 720px; margin: 0 auto;
}
.tab { flex: 1; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); font-size: 11px; padding: 4px 0; }
.tab .tab-ico { font-size: 20px; }
.tab.active { color: var(--primary); font-weight: 700; }

/* 大屏轻微收窄 */
@media (min-width: 760px) {
  .main { padding-top: 20px; }
}

/* 登录 */
.login-body {
  display: flex; align-items: center; justify-content: center; min-height: 100vh;
  background: linear-gradient(160deg, #e8f3ec 0%, #f4f6f8 55%, #eef2f7 100%);
  padding: 16px;
}
.login-card {
  width: 380px; max-width: 100%; background: var(--panel); border: 1px solid var(--line);
  border-radius: 20px; padding: 30px 26px 24px; text-align: center;
  box-shadow: 0 10px 40px rgba(20,40,30,.12);
}
.login-card h1 { font-size: 21px; margin: 0 0 6px; letter-spacing: .3px; }
.login-card .sub { color: var(--muted); margin: 0 0 18px; font-size: 13px; }
.login-card .tabs { display: flex; gap: 6px; margin-bottom: 18px; background: var(--panel2); padding: 4px; border-radius: 12px; border: 1px solid var(--line); }
.login-card .tab { flex: 1; padding: 10px 4px; border: none; background: transparent; color: var(--muted); border-radius: 9px; font-size: 14px; font-weight: 600; transition: .15s; }
.login-card .tab.active { background: #fff; color: var(--primary); box-shadow: var(--shadow); }
.login-form { text-align: left; }
.login-form label { margin-top: 14px; }
.login-form input { padding: 12px 13px; font-size: 15px; }
.login-form .btn { width: 100%; margin-top: 22px; }
.login-form .btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-d));
  border: none; box-shadow: 0 8px 18px rgba(47,125,79,.28);
  font-size: 15px; padding: 14px; letter-spacing: .5px;
}
.login-form .btn.primary:hover { filter: brightness(1.04); transform: translateY(-1px); }
.login-form .btn.primary:active { transform: translateY(1px); box-shadow: 0 4px 10px rgba(47,125,79,.28); }
.msg { min-height: 18px; font-size: 13px; margin: 12px 0 0; }
.msg.err { color: var(--err); }
.msg.ok { color: var(--ok); }
.hint { color: var(--muted); font-size: 12px; margin-top: 16px; line-height: 1.6; }

canvas.map { width: 100%; border-radius: 10px; background: #eef2f6; display: block; }
.map { width: 100%; height: 300px; border-radius: 10px; background: #eef2f6; overflow: hidden; position: relative; }
.notice { padding: 10px 12px; border-radius: 8px; background: var(--panel2); margin-bottom: 8px; }
.notice.unread { border-left: 3px solid var(--primary); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }
.call-btn { display: inline-flex; align-items: center; gap: 6px; }

/* ===== 打卡弹窗（里程表拍照 + 里程输入） ===== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(20,30,50,.5); z-index: 50;
  display: flex; align-items: flex-end; justify-content: center; padding: 0;
}
.modal-mask[hidden] { display: none !important; }
@media (min-width: 560px) { .modal-mask { align-items: center; } }
.modal {
  width: 100%; max-width: 480px; background: #fff;
  border-radius: 18px 18px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 24px rgba(0,0,0,.2); animation: slideUp .22s ease;
}
@media (min-width: 560px) { .modal { border-radius: 18px; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.modal-x { background: transparent; border: none; font-size: 26px; line-height: 1; color: var(--muted); padding: 0 4px; }
.modal-tip { color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.modal-foot { display: flex; gap: 10px; margin-top: 16px; }
.modal-foot .btn { flex: 1; }

/* 个人中心：加班明细带里程 */
.ot-item { padding: 10px 4px; border-bottom: 1px solid var(--line); }
.ot-item:last-child { border-bottom: none; }
.ot-mileage { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ===== 司机端中央 FAB（上班 / 下班） ===== */
.fab {
  position: fixed;
  left: 50%; bottom: 96px;
  transform: translateX(-50%);
  width: 76px; height: 76px;
  border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  font-weight: 800;
  color: #fff;
  border: 4px solid #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.18), 0 0 0 6px rgba(47,125,79,.10);
  z-index: 25;
  cursor: pointer;
  transition: transform .15s;
}
.fab:active { transform: translateX(-50%) scale(.96); }
.fab.primary { background: linear-gradient(135deg, #4E8C6B, #2E6CA4); }   /* 上班 / 配送中：山系绿→都市蓝 */
.fab.warn    { background: linear-gradient(135deg, #E89B3C, #C16A1F); }   /* 备用暖橙（v24 起配送中改为绿色） */
.fab.danger  { background: linear-gradient(135deg, #C44545, #7E2222); }   /* 下班：深红 */
.fab .fab-ico { font-size: 22px; line-height: 1; }
.fab .fab-text { font-size: 13px; font-weight: 700; letter-spacing: .5px; }
@media (min-width: 720px) {
  /* 桌面端：FAB 放在左下角 */
  .fab { left: auto; right: 28px; bottom: 28px; transform: none; }
  .fab:active { transform: scale(.96); }
}
@media (max-height: 580px) {
  .fab { bottom: 88px; }
}

/* 状态卡：圆形 FAB 模式下不需要右上的 actions 区，给个 meta chip 行 */
.status-card { gap: 12px; flex-wrap: wrap; }
.status-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.meta-chip { display: inline-flex; align-items: center; gap: 3px; padding: 4px 9px; border-radius: 999px; background: rgba(255,255,255,.18); color: #fff; font-size: 12px; font-weight: 700; }

/* ===== 本次配送的门店及预估送达时间列表 ===== */
.stores-list { display: flex; flex-direction: column; gap: 10px; }
.store-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--panel2); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px;
  transition: background .15s;
}
.store-row.completed { background: var(--primary-soft); border-color: #c5e5d2; opacity: .88; }
.sr-num {
  flex-shrink: 0;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px;
}
.store-row.completed .sr-num { background: var(--primary-d); }
.sr-info { flex: 1; min-width: 0; }
.sr-name { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.sr-addr { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.sr-eta { text-align: right; flex-shrink: 0; min-width: 78px; }
.sr-eta-label { font-size: 11px; color: var(--muted); }
.sr-eta-time { font-weight: 800; color: var(--primary-d); font-size: 17px; margin-top: 2px; }
.sr-eta.pending .sr-eta-time { color: var(--warn); }
.sr-eta.overdue .sr-eta-time { color: var(--err); }
.sr-eta.completed .sr-eta-time { color: var(--primary-d); font-size: 14px; }

/* ===== 当前配送任务：可拖拽 ===== */
.reorder-list { display: flex; flex-direction: column; gap: 10px; }
.reorder-item {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px; position: relative;
  transition: transform .15s, box-shadow .15s, opacity .15s;
}
.reorder-item.is-done { opacity: .6; background: var(--primary-soft); border-color: #c5e5d2; }
.reorder-item.dragging {
  opacity: .55; transform: scale(.99);
  box-shadow: 0 8px 24px rgba(20,30,50,.18);
}
.reorder-item.touch-drag { z-index: 10; }
.drag-over {
  border: 2px dashed var(--primary);
  background: var(--primary-soft);
}
.drag-handle {
  flex-shrink: 0;
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: var(--panel); border: 1px solid var(--line);
  font-size: 18px; color: var(--muted); cursor: grab;
  -webkit-user-select: none; user-select: none;
  touch-action: none;
}
.drag-handle:active { cursor: grabbing; background: var(--primary-soft); color: var(--primary-d); }
.ri-seq {
  flex-shrink: 0;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px;
}
.reorder-item.is-done .ri-seq { background: var(--primary-d); }
.ri-body { flex: 1; min-width: 0; }
.ri-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ri-addr { font-size: 12px; margin-top: 4px; line-height: 1.5; }
.ri-time { font-size: 12px; margin: 4px 0 6px; }
.reorder-item .photo-grid { margin-top: 6px; }
.reorder-item .photo-thumb img { width: 64px; height: 64px; }

/* 合并拍照 + 自动识别提示 */
.photo-pick-single { margin-top: 6px; }
.ocr-hint { font-size: 12px; margin-top: 10px; line-height: 1.6; }
.ocr-hint .ok { color: var(--primary); font-weight: 600; }
.ocr-hint .warn { color: var(--warn); font-weight: 600; }
.ocr-hint .err { color: var(--err); font-weight: 600; }

/* 打卡弹窗内显示定位状态 */
.punch-meta { background: var(--panel2); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.punch-meta-item { font-size: 13px; }
#punchLocStatus { font-weight: 600; color: var(--primary-d); }


/* 司机端：每条 stop 的距离/时间/导航按钮 */
.store-brand { display: flex; align-items: center; gap: 10px; }
.store-logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(255,255,255,.18);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.store-title { font-size: 17px; font-weight: 800; letter-spacing: .5px; margin: 0; color: #fff; line-height: 1.1; }
.store-right { display: flex; align-items: center; gap: 8px; }
.topbar.topbar-store .btn.sm { background: rgba(255,255,255,.18); color: #fff; border: none; }
.topbar.topbar-store .btn.sm:hover { background: rgba(255,255,255,.28); }

/* 主区稍宽 */
.store-main { max-width: 760px; padding: 14px 14px 96px; }

/* ====== 顶部：时间+天气（仿图 1 的 .qq-banner-side） ====== */
.store-banner { margin-bottom: 14px; }
.store-banner-pill {
  display: flex; gap: 10px; align-items: stretch;
}
.store-time {
  flex: 1; background: linear-gradient(135deg, #FBF7F0 0%, #ffffff 100%);
  border: 1px solid #ece2d4; border-radius: 16px; padding: 12px 16px;
  display: flex; flex-direction: column; justify-content: center;
  box-shadow: 0 6px 18px rgba(78,140,107,.10);
}
.store-time-hm { font-size: 28px; font-weight: 800; color: #2E6CA4; line-height: 1; font-variant-numeric: tabular-nums; }
.store-time-date { color: #8a94a6; margin-top: 4px; font-size: 13px; }
.store-wx {
  width: 130px; flex-shrink: 0;
  background: linear-gradient(135deg, #FBF7F0 0%, #ffffff 100%);
  border: 1px solid #ece2d4; border-radius: 16px; padding: 12px 14px;
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  box-shadow: 0 6px 18px rgba(78,140,107,.10);
}
.store-wx:hover { border-color: #d8c8b2; }
.store-wx-ico { font-size: 24px; line-height: 1; }
.store-wx-temp { font-size: 16px; font-weight: 800; color: #4E8C6B; line-height: 1; }
.store-wx-desc { color: #8a94a6; font-size: 12px; margin-top: 2px; max-width: 78px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 440px) {
  .store-banner-pill { flex-direction: row; }
  .store-wx { width: auto; flex: 1; min-width: 110px; }
}

/* ====== 底部 3 tab 导航（门店端） ====== */
.tabbar.store-tabbar {
  display: grid; grid-template-columns: repeat(3, 1fr);
  align-items: center;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: #fff; border-top: 1px solid var(--line);
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
  max-width: 760px; margin: 0 auto;
}
.tabbar.store-tabbar .tab {
  background: transparent; display: flex; flex-direction: column;
  align-items: center; gap: 2px; color: var(--muted); font-size: 11px;
  padding: 6px 0; border: none; cursor: pointer;
}
.tabbar.store-tabbar .tab.active { color: var(--primary); font-weight: 700; }
/* v28：emoji → 线性 SVG 图标（未选中灰、选中主色，currentColor 跟随） */
.tabbar.store-tabbar .tab-ico {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; color: #9aa7b4;
  transition: color .18s ease, transform .18s ease;
}
.tabbar.store-tabbar .tab.active .tab-ico { color: var(--primary); transform: translateY(-1px); }
.tabbar.store-tabbar .tab:active .tab-ico { transform: scale(.9); }

/* ====== 我的中心：头像 + 密码 + 统计 ====== */
.me-head { display: flex; align-items: center; gap: 16px; }
.me-head .avatar-wrap { flex-shrink: 0; }
.me-meta { flex: 1; min-width: 0; line-height: 1.5; }
.me-name { font-size: 17px; font-weight: 800; color: #0f172a; }
.me-phone, .me-addr { margin-top: 4px; }

.me-stat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
@media (max-width: 540px) { .me-stat-grid { grid-template-columns: repeat(2, 1fr); } }
.me-stat {
  background: linear-gradient(180deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #bbf7d0; border-radius: 12px;
  padding: 14px 10px; text-align: center;
}
.me-stat-val { font-size: 22px; font-weight: 800; color: #065f46; line-height: 1.1; }
.me-stat-label { font-size: 11px; color: #6b7280; margin-top: 4px; }

/* ====== 产品清单：5 渠道子 tab ====== */
.ch-tabs {
  display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 6px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.ch-tabs::-webkit-scrollbar { display: none; }
.ch-tab {
  flex: 0 0 auto; padding: 8px 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
  color: var(--muted); font-size: 13px; font-weight: 700;
  cursor: pointer; transition: .15s; white-space: nowrap;
}
.ch-tab:hover { background: var(--panel2); color: var(--text); }
.ch-tab.active {
  background: linear-gradient(135deg, #4E8C6B 0%, #2E6CA4 100%);
  color: #fff; border-color: transparent;
  box-shadow: 0 4px 12px rgba(46,108,164,.22);
}

/* 渠道表格状态徽标 */
.ch-table .badge.ok   { background: rgba(34,197,94,.16); color: #1f9e54; }
.ch-table .badge.wait { background: rgba(228,165,16,.16); color: #c97f1e; }

/* ====== 退出按钮 =========== */
body.store-body .btn.danger { background: var(--err); border-color: var(--err); color: #fff; }
body.store-body .btn.danger:hover { filter: brightness(.95); }

/* body 主题（不与品牌全站冲突；门店端以奶白为底） */
body.store-body {
  background: linear-gradient(180deg, #f5f7fa 0%, #eef2f7 100%);
  min-height: 100vh;
}

.stop-route b { color: var(--primary); }
.nav-btn { display: inline-flex; align-items: center; gap: 4px; }

/* 司机端：地图下方图例 */
#routeLegend { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* 导航选择底部弹层 */
.nav-overlay {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5);
  z-index: 200; display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn .2s ease;
}
.nav-sheet {
  background: var(--panel); width: 100%; max-width: 480px;
  border-top-left-radius: 18px; border-top-right-radius: 18px;
  padding: 16px 14px 24px; box-shadow: 0 -8px 24px rgba(0,0,0,.15);
  animation: slideUp .25s ease;
}
.nav-title { font-size: 15px; font-weight: 700; padding: 4px 6px 12px; text-align: center; }
.nav-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 8px; border-radius: 12px; text-decoration: none; color: inherit;
  transition: background .15s;
}
.nav-row:hover { background: var(--panel2); }
.nav-ico {
  width: 40px; height: 40px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff;
}
.nav-name { font-size: 14px; font-weight: 600; }
.nav-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.nav-cancel {
  width: 100%; margin-top: 8px; padding: 12px;
  background: var(--panel2); color: var(--fg); border: none; border-radius: 12px;
  font-size: 14px; font-weight: 600;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(40%); } to { transform: translateY(0); } }

/* 美团门店档案只读列表（取代手动新增） */
.mt-list { display: flex; flex-direction: column; gap: 8px; }
.mt-row {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  background: #fafbfc; display: flex; flex-direction: column; gap: 4px;
}
.mt-name { font-weight: 600; font-size: 14px; color: var(--text); }
.mt-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.mt-addr { font-size: 12px; line-height: 1.5; }
.mt-coord { font-size: 11px; font-family: ui-monospace, monospace; }

/* ===== 地图容器 ===== */
.map-box { height: 380px; width: 100%; border-radius: 12px; overflow: hidden; background: #eef2f7; }
.map-box.sm { height: 240px; border-radius: 10px; }
.map-box.md { height: 320px; border-radius: 12px; }

/* 全屏图片预览 */
.lightbox-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.85);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; padding: 24px; box-sizing: border-box;
  cursor: zoom-out;
}
.lightbox-mask.hidden { display: none; }
.lightbox-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.5); }
.lightbox-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.18); color: #fff; border: none;
  font-size: 22px; line-height: 36px; text-align: center; cursor: pointer;
}
.lightbox-close:hover { background: rgba(255,255,255,.32); }

/* 复用管理端已有的 .adm-table / .table-wrap 样式（见下），门店端无需重复声明 */

/* 全屏图片预览 */
.lightbox-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.85);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; padding: 24px; box-sizing: border-box;
  cursor: zoom-out;
}
.lightbox-mask.hidden { display: none; }
.lightbox-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.5); }
.lightbox-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.18); color: #fff; border: none;
  font-size: 22px; line-height: 36px; text-align: center; cursor: pointer;
}
.lightbox-close:hover { background: rgba(255,255,255,.32); }
.leaflet-container { height: 100%; width: 100%; }

/* ===== 每日配送工作报告卡片 ===== */
.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-top: 12px; }
.report-card { background: var(--primary-soft); border: 1px solid #d8eadf; border-radius: 12px; padding: 14px; text-align: center; }
.rc-val { font-size: 24px; font-weight: 800; color: var(--primary-d); }
.rc-val small { font-size: 13px; font-weight: 600; margin-left: 2px; }
.rc-label { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ===== 产品汇总 ===== */
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-block; background: var(--primary-soft); color: var(--primary-d); border-radius: 999px; padding: 4px 10px; font-size: 13px; }
.pill.big { font-size: 14px; padding: 7px 14px; font-weight: 600; }

/* ===== 管理端：第一部分统计卡 + 在岗司机 + 配送表 ===== */
.card-sub {
  font-size: 13px; font-weight: 700; color: var(--text);
  margin: 14px 0 8px; display: flex; align-items: center; gap: 6px;
}
.card-sub::before { content: ''; display: inline-block; width: 3px; height: 14px; background: var(--primary); border-radius: 2px; }
.text-right { text-align: right; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.driver-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.drv-row {
  background: var(--panel2); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.drv-name { font-weight: 700; font-size: 14px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; margin-top: 4px; }
.adm-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.adm-table th, .adm-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
.adm-table thead th { background: var(--panel2); color: var(--muted); font-weight: 600; font-size: 12px; position: sticky; top: 0; }
.adm-table tbody tr:last-child td { border-bottom: none; }
.adm-table tbody tr:hover { background: var(--panel2); }
.adm-table td.small { font-size: 12px; color: var(--text); }

/* ===== 第二部分：路线卡片 ===== */
.route-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.route-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px;
  display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow);
}
.rc-driver { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rc-name { font-weight: 700; font-size: 15px; }
.rc-phone { font-size: 12px; }
.rc-stop { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.rc-arrow { color: var(--muted); font-size: 18px; }
.rc-store { flex: 1; min-width: 0; }
.rc-store-name { font-weight: 600; font-size: 14px; }
.rc-store-addr { font-size: 12px; margin-top: 2px; }
.rc-store-prod { font-size: 12px; margin-top: 4px; color: var(--primary-d); }
.rc-eta { text-align: right; white-space: nowrap; }
.rc-km { font-weight: 700; font-size: 16px; color: var(--primary-d); }
.rc-km small { font-size: 11px; margin-left: 2px; }
.rc-min { font-size: 12px; color: var(--warn); margin-top: 2px; font-weight: 600; }
.rc-arr { font-size: 12px; margin-top: 2px; }

/* ===== 管理端 · 桌面端布局 ===== */
body.admin {
  font-size: 14px;
  background: #f1f5f9;
}
body.admin .main,
.admin-main {
  max-width: 1400px;
  padding: 18px 22px 60px;
}
body.admin .appbar {
  position: sticky; top: 0; z-index: 50;
  padding: 14px 24px;
  background: linear-gradient(135deg, #16a34a 0%, #15803d 60%, #166534 100%);
  box-shadow: 0 2px 18px rgba(22,101,52,.28);
}
body.admin .appbar-title { font-size: 18px; letter-spacing: .5px; }
body.admin .who { color: rgba(255,255,255,.92); font-size: 13px; }
body.admin .btn-ghost { color: rgba(255,255,255,.92); }
body.admin .btn-ghost:hover { background: rgba(255,255,255,.16); color: #fff; }

.admin-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}
@media (max-width: 1100px) {
  .admin-cols { grid-template-columns: 1fr; }
}

.card-admin {
  margin-bottom: 0;
  padding: 18px 20px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(20,30,50,.06), 0 8px 24px rgba(20,30,50,.05);
}
body.admin .card-head {
  font-size: 16px;
  padding-left: 14px;
  margin-bottom: 16px;
}
body.admin .card-head::before { width: 5px; }
.head-right {
  font-size: 13px; font-weight: 400;
  display: inline-flex; align-items: center; gap: 8px;
}
.inline-label { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--muted); }
.inline-input { display: inline-block; width: auto; padding: 5px 8px; font-size: 13px; }

.dot-pulse {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e; margin-right: 4px;
  box-shadow: 0 0 0 0 rgba(34,197,94,.7);
  animation: pulse-admin 1.6s infinite;
}
@keyframes pulse-admin {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,.7); }
  70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

.map-legend {
  display: flex; flex-wrap: wrap; gap: 16px;
  font-size: 12px; color: var(--muted);
  margin: 8px 0 4px;
}
.map-legend i {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 50%; margin-right: 5px; vertical-align: middle;
}

.map-box-lg { height: 480px; border-radius: 12px; }
@media (max-width: 1100px) {
  .map-box-lg { height: 360px; }
}

.empty-tip { text-align: center; padding: 18px; color: var(--muted); }

/* 统计卡：桌面端 6 列布局 */
body.admin .report-grid {
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
@media (max-width: 900px) {
  body.admin .report-grid { grid-template-columns: repeat(3, 1fr); }
}
body.admin .report-card { padding: 18px 12px; border-radius: 12px; background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%); border-color: #bbf7d0; }
body.admin .rc-val { font-size: 28px; }
body.admin .rc-label { font-size: 12px; }

/* 在岗司机：横向卡片网格 */
.driver-list-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 4px;
}
.drv-row { padding: 12px 14px; }
.drv-phone { font-size: 12px; }
.drv-coord { font-size: 11px; margin-top: 4px; }

/* 路线卡片：当前门店 + 待配送门店 */
.route-card {
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 12px;
}
body.admin .rc-driver { font-size: 14px; }
body.admin .rc-name { font-size: 16px; }
body.admin .rc-phone { font-size: 13px; color: var(--muted); }
.rc-total { font-size: 12px; margin-left: auto; }

.rc-current {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%);
  border: 1px solid #fed7aa;
  border-radius: 10px;
}
.rc-pin { font-size: 20px; }
.rc-store { flex: 1; min-width: 0; }
.rc-store-name { font-weight: 600; font-size: 14px; }
.rc-store-addr { font-size: 12px; margin-top: 2px; }
.rc-eta { text-align: right; white-space: nowrap; min-width: 100px; }
body.admin .rc-km { font-size: 18px; }
body.admin .rc-min { font-size: 13px; }
body.admin .rc-arr { font-size: 12px; }
body.admin .rc-arr b { color: var(--primary); font-size: 14px; }

.rc-pending {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px 12px;
}
.rc-pending-head {
  font-size: 13px; font-weight: 700; color: var(--text);
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.rc-pending-list {
  margin: 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px 12px;
}
.rc-pending-list li {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px;
  padding: 6px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.rc-pending-seq {
  flex-shrink: 0;
  background: var(--primary-soft);
  color: var(--primary-d);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}
.rc-pending-name {
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rc-all-done {
  padding: 10px 12px;
  background: var(--primary-soft);
  border-radius: 10px;
  color: var(--primary-d);
  font-weight: 600;
}

/* 个人中心 Modal 在桌面端居中且更宽 */
body.admin .modal { max-width: 720px; }
body.admin .modal-mask { align-items: center; padding: 24px; }
body.admin .modal { border-radius: 18px; max-height: 86vh; overflow-y: auto; }

/* ============================================================
   管理驾驶舱 · 高级界面样式（v17）
   ============================================================ */
body.admin {
  background: #eef2f6;
}
body.admin .appbar.dash-appbar {
  background: linear-gradient(120deg, #0f766e 0%, #115e59 55%, #134e4a 100%);
  box-shadow: 0 2px 22px rgba(15, 118, 110, .35);
  padding: 12px 22px;
  flex-wrap: wrap;
  gap: 10px;
}
.dash-brand { display: flex; align-items: center; gap: 12px; }
.dash-logo {
  width: 42px; height: 42px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.18); font-size: 22px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
}
.dash-title { font-size: 18px; font-weight: 800; letter-spacing: .5px; color: #fff; }
.dash-sub { font-size: 12px; color: rgba(255,255,255,.7); margin-top: 2px; }
.dash-top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* 日期切换器 */
.dash-date {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,.16); border-radius: 10px; padding: 3px;
}
.dash-date-btn {
  width: 28px; height: 30px; border: none; border-radius: 8px;
  background: transparent; color: #fff; font-size: 18px; font-weight: 700; line-height: 1;
}
.dash-date-btn:hover { background: rgba(255,255,255,.2); }
.dash-date-input {
  width: auto; border: none; background: rgba(255,255,255,.95); color: #134e4a;
  border-radius: 8px; padding: 5px 8px; font-size: 13px; font-weight: 600;
}
.dash-date-input::-webkit-calendar-picker-indicator { cursor: pointer; }
.dash-today {
  background: rgba(255,255,255,.95); color: #134e4a; border: none;
  padding: 6px 12px; font-size: 13px; font-weight: 700; border-radius: 8px;
}
.dash-today:hover { background: #fff; }
body.admin .btn.dash-shortage {
  background: #f59e0b; color: #fff; border: none; font-weight: 700;
  padding: 8px 14px; border-radius: 10px; font-size: 13px;
  box-shadow: 0 4px 12px rgba(245,158,11,.35);
}
body.admin .btn.dash-shortage:hover { background: #ea8c0a; }
body.admin .who.mono { font-family: ui-monospace, Consolas, monospace; }

/* 主区域 */
.dash-main { max-width: 1320px; padding: 20px 22px 60px; }

/* 卡片 */
.dash-card {
  background: #fff; border: 1px solid #e6ecf2; border-radius: 16px;
  padding: 20px 22px; margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(20,30,50,.05), 0 10px 30px rgba(20,30,50,.05);
}
.dash-card-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 16px; font-weight: 800; color: #0f172a; margin-bottom: 16px;
  padding-left: 14px; position: relative;
}
.dash-card-head::before {
  content: ''; position: absolute; left: 0; top: 2px; bottom: 2px;
  width: 5px; border-radius: 4px;
  background: linear-gradient(180deg, #0f766e, #16a34a);
}
.dash-sub { font-size: 13px; font-weight: 700; color: #475569; margin: 4px 0 10px; display: flex; align-items: center; gap: 6px; }

/* KPI 卡 */
.dash-kpis {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px;
}
@media (max-width: 1100px) { .dash-kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .dash-kpis { grid-template-columns: repeat(2, 1fr); } }
.dash-kpi {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid #eef2f6; border-left: 4px solid var(--accent, #0f766e);
  border-radius: 12px; padding: 14px 14px;
  box-shadow: 0 1px 2px rgba(20,30,50,.04);
  transition: transform .15s, box-shadow .15s;
}
.dash-kpi:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(20,30,50,.10); }
.dash-kpi-ico {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 20px;
  background: color-mix(in srgb, var(--accent, #0f766e) 14%, #fff);
}
.dash-kpi-body { min-width: 0; }
.dash-kpi-val { font-size: 24px; font-weight: 800; color: #0f172a; line-height: 1.1; }
.dash-kpi-val small { font-size: 13px; font-weight: 700; margin-left: 2px; color: var(--accent, #0f766e); }
.dash-kpi-label { font-size: 12px; color: #94a3b8; margin-top: 2px; }

/* 分析看板下半部分：司机概况 + 完成率 */
.dash-split { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; margin-top: 18px; align-items: start; }
@media (max-width: 900px) { .dash-split { grid-template-columns: 1fr; } }
.dash-panel { background: #f8fafc; border: 1px solid #eef2f6; border-radius: 12px; padding: 14px 16px; }
.dash-bars { display: flex; flex-direction: column; gap: 12px; }
.dash-bar-row { display: grid; grid-template-columns: 84px 1fr auto; align-items: center; gap: 10px; }
.dash-bar-name { font-size: 13px; font-weight: 700; color: #334155; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-bar-track { height: 10px; border-radius: 999px; background: #e6ecf2; overflow: hidden; }
.dash-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #0f766e, #16a34a); transition: width .4s; }
.dash-bar-meta { font-size: 12px; color: #94a3b8; white-space: nowrap; }

.dash-panel-ring { display: flex; flex-direction: column; align-items: center; }
.dash-ring-wrap { display: flex; justify-content: center; padding: 6px 0; }
.dash-ring {
  width: 150px; height: 150px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.dash-ring-inner {
  width: 112px; height: 112px; border-radius: 50%; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(20,30,50,.08);
}
.dash-ring-val { font-size: 30px; font-weight: 800; color: #0f766e; }
.dash-ring-lbl { font-size: 12px; color: #94a3b8; margin-top: 2px; }

/* 地图 */
.dash-map { height: 460px; width: 100%; border-radius: 12px; overflow: hidden; background: #eef2f7; }
@media (max-width: 1100px) { .dash-map { height: 360px; } }

.dash-table th:first-child, .dash-table td:first-child { text-align: center; }
.dash-table tbody tr td { vertical-align: middle; }

/* 缺货明细 */
.dash-shortage-list { display: flex; flex-direction: column; gap: 12px; }
.dash-shortage-item { border: 1px solid #fde68a; background: #fffbeb; border-radius: 12px; padding: 12px 14px; }
.dash-shortage-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dash-shortage-actions { display: flex; align-items: center; gap: 8px; }
.dash-shortage-prod { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  background: #fef3c7; color: #92400e; border: 1px solid #fcd34d;
  border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600;
}
body.admin .btn-ghost.btn-ghost { color: #b45309; }
body.admin .btn-ghost[data-del] { padding: 3px 10px; border: 1px solid #fcd34d; border-radius: 8px; color: #b45309; background: #fff; }
body.admin .btn-ghost[data-del]:hover { background: #fef3c7; }

/* 缺货上报弹窗内的产品行：三列 */
#shRows .row { align-items: flex-end; }
#shRows .row > div:first-child { flex: 2; }
#shRows .row > div:nth-child(2) { flex: 0 0 90px; }
#shRows .row > div:last-child { flex: 2; }


/* ============================================================
   司机端 · 高级界面（v18）
   ============================================================ */
body.dri-body {
  background: linear-gradient(180deg, #f5f7fa 0%, #eef2f7 100%);
  --primary: #0f766e;
  --primary-d: #115e59;
  --primary-soft: #ccfbf1;
  --radius-lg: 18px;
}

/* 顶栏：渐变品牌色 */
.dri-appbar {
  background: linear-gradient(120deg, #0f766e 0%, #115e59 55%, #134e4a 100%);
  box-shadow: 0 4px 18px rgba(15,118,110,.32);
  padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
/* 司机端 v24 起：顶栏空置（退出按钮移至「我的」页面），收起为 0 高度避免占位 */
.dri-appbar[aria-hidden="true"] { padding: 0; height: 0; min-height: 0; overflow: hidden; box-shadow: none; }
.dri-brand { display: flex; align-items: center; gap: 10px; }
.dri-logo {
  width: 40px; height: 40px; border-radius: 12px;
  background: rgba(255,255,255,.18);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
}
.dri-title { font-size: 17px; font-weight: 800; letter-spacing: .3px; color: #fff; line-height: 1.1; }
.dri-sub { font-size: 12px; color: rgba(255,255,255,.78); margin-top: 3px; }
.dri-topbar-right { display: flex; align-items: center; gap: 10px; }
/* 顶部状态条已移除（原 .dri-status-chip 弃用） *//* 主区稍宽 */
.dri-main { max-width: 760px; padding: 16px 16px 100px; }

/* 司机端「我的」页面退出登录卡片 */
.logout-card { margin-top: 16px; }
.logout-card .btn { margin-top: 6px; padding: 14px 18px; font-size: 15px; }

/* 日期范围 */
.dri-daterow { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.daterange { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.daterange .chip {
  border: none; background: transparent;
  padding: 6px 14px; border-radius: 8px;
  color: var(--muted); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: .15s;
}
.daterange .chip:hover { background: var(--panel2); color: var(--text); }
.daterange .chip.active { background: linear-gradient(135deg, #0f766e, #115e59); color: #fff; box-shadow: 0 4px 10px rgba(15,118,110,.28); }
.daterange-inputs { display: inline-flex; align-items: center; gap: 6px; }
.daterange-inputs input { width: 130px; padding: 6px 8px; font-size: 13px; border-radius: 8px; }
.range-text { font-size: 12px; color: var(--muted); }
.range-label { display: inline-block; margin-left: 8px; padding: 4px 10px; font-size: 12px; font-weight: 600; color: #4E8C6B; background: rgba(78,140,107,.10); border-radius: 999px; }

/* 6 KPI 卡 */
.dri-kpis {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-bottom: 14px;
}
@media (max-width: 540px) { .dri-kpis { grid-template-columns: repeat(2, 1fr); } }
.dri-kpi {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid #eef2f7;
  border-left: 4px solid var(--accent, #0f766e);
  border-radius: 14px; padding: 12px 14px;
  box-shadow: 0 1px 2px rgba(20,30,50,.04), 0 6px 18px rgba(20,30,50,.05);
  transition: transform .15s, box-shadow .15s;
}
.dri-kpi:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(20,30,50,.10); }
.dri-kpi .ico {
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px;
  background: color-mix(in srgb, var(--accent) 16%, #fff);
}
.dri-kpi .body { min-width: 0; line-height: 1.1; }
.dri-kpi .val { font-size: 22px; font-weight: 800; color: #0f172a; }
.dri-kpi .val small { font-size: 12px; font-weight: 700; margin-left: 2px; color: var(--accent, #0f766e); }
.dri-kpi .lbl { font-size: 12px; color: #94a3b8; margin-top: 4px; }

/* 上班/下班 状态卡（紧凑风格） */
.dri-shift {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: linear-gradient(135deg, #0f766e 0%, #115e59 100%);
  color: #fff; border-radius: 16px;
  padding: 14px 16px; margin-bottom: 14px;
  box-shadow: 0 6px 22px rgba(15,118,110,.28);
}
.dri-shift-left { display: flex; align-items: center; gap: 10px; }
.dri-shift-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.4); box-shadow: 0 0 0 4px rgba(255,255,255,.16); }
.dri-shift-dot.on { background: #fff; animation: pulse 1.6s infinite; }
.dri-shift-dot.off { background: rgba(255,255,255,.45); }
.dri-shift-label { font-size: 15px; font-weight: 800; }
.dri-shift-sub { font-size: 12px; opacity: .85; margin-top: 2px; }
.dri-shift-meta { display: flex; gap: 6px; flex-wrap: wrap; }

/* 司机端卡片（高级） */
.card-dri {
  background: #fff;
  border: 1px solid #e6ecf2;
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(20,30,50,.04), 0 8px 24px rgba(20,30,50,.05);
}
.card-dri-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 15px; font-weight: 800; color: #0f172a;
  margin: 0 0 12px;
  padding-left: 12px; position: relative;
}
.card-dri-head::before {
  content: ''; position: absolute; left: 0; top: 1px; bottom: 1px;
  width: 4px; border-radius: 4px;
  background: linear-gradient(180deg, #0f766e, #22c55e);
}

/* 地图模式 */
.dri-map { height: 320px; width: 100%; border-radius: 14px; overflow: hidden; background: #eef2f7; border: 1px solid var(--line); }
@media (max-width: 540px) { .dri-map { height: 260px; } }
.route-legend { display: flex; flex-wrap: wrap; gap: 12px 16px; font-size: 12px; color: var(--muted); margin: 8px 0 4px; }
.route-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.06); }

/* 路线紧凑列表 */
.route-list-compact { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.route-mini {
  display: flex; align-items: center; gap: 10px;
  background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
}
.route-mini-num {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #f59e0b; color: #fff; font-weight: 800; font-size: 13px;
  box-shadow: 0 0 0 2px #fff;
}
.route-mini-info { flex: 1; min-width: 0; }
.route-mini-info strong { font-size: 14px; }
.route-mini-eta { font-weight: 800; color: var(--primary-d); font-size: 16px; flex-shrink: 0; min-width: 56px; text-align: right; }

/* 缺货明细（司机端） */
.shortage-row {
  border: 1px solid #fde68a; background: #fffbeb;
  border-radius: 12px; padding: 10px 12px; margin-bottom: 8px;
}
.shortage-row-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.shortage-prod { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* 简化停车费表单 */
.park-row { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.park-row select, .park-row input { flex: 1; min-width: 130px; }
.park-row button { flex: 0 0 auto; min-width: 110px; }

/* 底部 3 列 nav + 凸出圆形 FAB */
.dri-tabbar {
  display: grid; grid-template-columns: 1fr 96px 1fr;
  align-items: center;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: #fff; border-top: 1px solid var(--line);
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
  max-width: 760px; margin: 0 auto;
}
.dri-tabbar .tab { background: transparent; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); font-size: 11px; padding: 8px 0; border: none; cursor: pointer; }
.dri-tabbar .tab.active { color: var(--primary); font-weight: 700; }
.tab-fab-slot { display: flex; justify-content: center; align-items: flex-end; pointer-events: none; }
.tab-fab-slot .fab {
  position: relative; pointer-events: auto;
  left: auto; bottom: auto; transform: none;
  width: 64px; height: 64px;
  margin-top: -22px;
  box-shadow: 0 8px 22px rgba(15,118,110,.35), 0 0 0 6px #fff;
}
.tab-fab-slot .fab .fab-ico { font-size: 22px; }
.tab-fab-slot .fab .fab-text { font-size: 11px; }
@media (min-width: 760px) {
  .tab-fab-slot .fab { margin-top: -22px; }
}
/* 原来的 .fab 通用规则也保留，让它在小屏默认使用 bottom:96px；此处我们用 .dri-tabbar 内置定位 */

/* 状态卡 meta chip（沿用 v15） */
.meta-chip {
  display: inline-flex; align-items: center; gap: 3px; padding: 4px 9px;
  border-radius: 999px; background: rgba(255,255,255,.18); color: #fff;
  font-size: 12px; font-weight: 700;
}

/* ============================================================
   v19：克制配色 + 通知分组
   ============================================================ */

/* 移除 v17 中饱和的橙色仪表盘 header 渐变：回归清爽的中性 + teal */
body.admin { background: #f4f6f9; }
body.admin .appbar.dash-appbar {
  background: linear-gradient(120deg, #0f766e 0%, #115e59 100%);
  box-shadow: 0 4px 18px rgba(15,118,110,.25);
}

/* dash-shortage 类名已不再使用，下面这段是把残留样式降级为「已读清空」 */
.dash-shortage, .dash-shortage-list, .dash-shortage-item,
.dash-shortage-head, .dash-shortage-actions, .dash-shortage-prod { display: none !important; }

/* 通用 pill（不再用饱和橙色） */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  background: #eef2f6; color: #334155; border: 1px solid #e6ecf2;
  border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 500;
}

/* 门店端：通知置顶 + 分组样式 */
.section-notif { display: flex; align-items: center; justify-content: space-between; }
.notif-card { padding: 14px 14px; }
.notif-group { display: flex; flex-direction: column; gap: 8px; }
.notif-divider {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; color: var(--muted); margin: 12px 0 4px;
  font-weight: 700; letter-spacing: .3px;
}
.notif-divider::before, .notif-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}

.notif-item {
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
  background: var(--panel); transition: border-color .15s, background .15s;
}
.notif-item-pending {
  background: linear-gradient(180deg, #ecfdf5 0%, #f0fdfa 100%);
  border-color: #99f6e4;
  border-left: 4px solid #0d9488;
}
.notif-item-completed { opacity: .85; }
.notif-item.unread { box-shadow: inset 0 0 0 1px rgba(15,118,110,.18); }

.notif-row1 {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12px; color: var(--muted);
}
.notif-type { font-weight: 700; color: #334155; }
.notif-status {
  display: inline-flex; align-items: center; padding: 2px 8px;
  border-radius: 999px; font-size: 11px; font-weight: 700;
}
.notif-status.pending { background: rgba(13,148,136,.12); color: #0d9488; }
.notif-status.completed { background: var(--panel2); color: var(--muted); }
.notif-time { margin-left: auto; }

.notif-row2 { margin-top: 6px; font-size: 13px; line-height: 1.6; }
.notif-row2 strong { color: #0f172a; font-weight: 700; }
.notif-body { color: #475569; margin-top: 2px; white-space: pre-wrap; }

.notif-row3 { margin-top: 8px; display: flex; gap: 6px; }
.notif-read-btn { padding: 4px 10px; font-size: 12px; }

/* 门店端顶栏：teal 渐变，与管理端保持品牌一致 */
.topbar.topbar-store {
  background: linear-gradient(120deg, #0f766e 0%, #115e59 100%);
  color: #fff;
  box-shadow: 0 4px 18px rgba(15,118,110,.25);
}
.topbar.topbar-store h2 { color: #fff; }
.topbar.topbar-store .who { color: rgba(255,255,255,.85); }
.topbar.topbar-store #logout { background: rgba(255,255,255,.18); color: #fff; }

/* 状态徽标：从「刺目饱和」调到「柔和语义」 */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.pending   { background: #fef3c7; color: #92400e; }
.badge.completed { background: #d1fae5; color: #065f46; }
.badge.working   { background: #dbeafe; color: #1e40af; }
.badge.pattern   { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.badge.err       { background: #fee2e2; color: #b91c1c; }

/* 整体弱化原 v15 的「荧光绿」按钮主色，但仍用同一主色系避免品牌破坏 */
.btn.primary { background: #0f766e; border-color: #0f766e; }
.btn.primary:hover { background: #115e59; border-color: #115e59; }
.appbar .btn-primary, .btn.btn-primary { /* 若顶栏上用到，继承了浅色管理端预览风格 */ }


/* ============================================================
   v20 · 轻丘品牌视觉规范（司机/门店：奶白底 · 山系绿/都市蓝）
   ============================================================ */

/* 状态徽标：确认 / 待确认（门店、司机、管理端共用） */
.badge.ok { background: rgba(34,197,94,.16); color: #1f9e54; }
.badge.wait { background: rgba(232,155,60,.16); color: #c97f1e; }

/* ===== 司机端首页：品牌 Banner（轻丘产品海报轮播）===== */
.qq-banner-wrap {
  display: flex; gap: 12px; align-items: stretch; margin-bottom: 14px;
}
.qq-banner {
  position: relative; flex: 1; min-height: 134px; border-radius: 18px; overflow: hidden;
  background: linear-gradient(135deg, #4E8C6B 0%, #2E6CA4 100%);
  box-shadow: 0 10px 30px rgba(46,108,164,.18);
}
.qq-banner-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; }
.qq-banner-slide.active { opacity: 1; }
.qq-poster {
  position: absolute; inset: 0; padding: 18px 20px;
  display: flex; flex-direction: column; justify-content: center;
  border-radius: 18px; overflow: hidden;
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
/* 三张海报：内联 background-image 为主，下面三行仅作图片加载失败时的纯色底备用 */
.qq-poster-1 { background-color: #4E8C6B; }
.qq-poster-2 { background-color: #2E6CA4; }
.qq-poster-3 { background-color: #5BAE86; }
.qq-poster-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.18) 55%, rgba(0,0,0,0) 100%);
  z-index: 1;
}
.qq-poster-content { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 4px; }
.qq-poster-tag {
  align-self: flex-start; background: rgba(255,255,255,.22); color: #fff;
  font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  backdrop-filter: blur(4px);
}
.qq-poster-title { color: #fff; font-size: 24px; font-weight: 800; margin-top: 6px; letter-spacing: 1px; text-shadow: 0 2px 10px rgba(0,0,0,.45); }
.qq-poster-sub { color: rgba(255,255,255,.92); font-size: 13px; margin-top: 4px; text-shadow: 0 1px 4px rgba(0,0,0,.4); }
/* .qq-poster-deco 旧版装饰圆，真实图背景后已不再使用 */
.qq-banner-dots { position: absolute; bottom: 10px; left: 18px; display: flex; gap: 6px; z-index: 3; }
.qq-banner-dots .dot { width: 7px; height: 7px; border-radius: 999px; background: rgba(255,255,255,.45); transition: .3s; }
.qq-banner-dots .dot.active { background: #fff; width: 18px; }

.qq-banner-side { width: 116px; flex-shrink: 0; display: flex; flex-direction: column; gap: 10px; }
.qq-time {
  flex: 1; background: linear-gradient(135deg, #FBF7F0 0%, #ffffff 100%);
  border: 1px solid #ece2d4; border-radius: 16px; padding: 12px 14px;
  display: flex; flex-direction: column; justify-content: center;
  box-shadow: 0 6px 18px rgba(78,140,107,.10);
}
.qq-time-hm { font-size: 30px; font-weight: 800; color: #2E6CA4; line-height: 1; }
.qq-time-date { color: #8a94a6; margin-top: 4px; }
.qq-weather {
  background: linear-gradient(135deg, #FBF7F0 0%, #ffffff 100%);
  border: 1px solid #ece2d4; border-radius: 16px; padding: 12px 14px;
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  box-shadow: 0 6px 18px rgba(78,140,107,.10);
}
.qq-weather-ico { font-size: 26px; line-height: 1; }
.qq-weather-temp { font-size: 18px; font-weight: 800; color: #4E8C6B; }
.qq-weather-desc { color: #8a94a6; }
@media (max-width: 440px) {
  .qq-banner-wrap { flex-direction: column; }
  .qq-banner-side { width: auto; flex-direction: row; }
  .qq-time, .qq-weather { flex: 1; }
}

/* ===== 司机端：门店损坏待确认列表 ===== */
.damage-list { display: flex; flex-direction: column; gap: 10px; }
.dmg-row { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--panel2); }
.dmg-row.is-confirmed { opacity: .85; border-color: #cfe9d8; background: #f1faf4; }
.dmg-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dmg-head strong { font-size: 14px; }
.dmg-amt { margin-left: auto; font-weight: 800; color: #4E8C6B; }
.dmg-items { font-size: 13px; margin-top: 6px; color: var(--text); }
.dmg-note { margin-top: 4px; }
.dmg-footer { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.dmg-flag { font-size: 12px; padding: 2px 9px; border-radius: 999px; font-weight: 700; }
.dmg-flag.ok { background: rgba(34,197,94,.16); color: #1f9e54; }
.dmg-flag.wait { background: rgba(232,155,60,.16); color: #c97f1e; }
.dmg-status { margin-left: auto; }

/* ===== 门店端：损坏提报表单 + 确认记录 ===== */
.dmg-row-edit { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.dmg-row-edit .dmg-name { flex: 2; min-width: 0; }
.dmg-row-edit .dmg-qty { flex: 0 0 80px; }
.dmg-row-edit .dmg-price { flex: 0 0 92px; }
.dmg-del {
  flex: 0 0 auto; width: 34px; height: 38px; border-radius: 10px;
  background: #fee2e2; color: #b91c1c; border: none; font-size: 18px; line-height: 1;
}
.dmg-del:hover { background: #fecaca; }
.dmg-record { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; background: var(--panel2); }
.dmg-record-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dmg-amount { font-size: 18px; font-weight: 800; color: #4E8C6B; }
.dmg-record-items { font-size: 13px; margin-top: 6px; }
.dmg-record-note { font-size: 12px; margin-top: 4px; color: var(--muted); }
.dmg-confirm-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }

/* 通用小工具 */
.req { color: #f87171; }
.row-end { display: flex; justify-content: flex-end; margin-top: 10px; }
.field { margin-top: 10px; }
.field label { display: block; margin: 0 0 5px; color: var(--muted); font-size: 12px; }
.photo-pick-row { display: flex; gap: 10px; margin-top: 6px; }
.photo-pick-row .btn { flex: 1; }


/* ============================================================
   v20 · 管理驾驶舱深色科技风
   深墨绿蓝 #16242B · 山系绿 #4E8C6B · 都市蓝 #3E84C4 · 玻璃拟态
   ============================================================ */
body.admin-dark {
  background: #0e181e;
  --panel: #16242B;
  --panel2: #1b2c34;
  --text: #e6edf2;
  --muted: #9aa7b4;
  --primary: #4E8C6B;
  --primary-d: #3E84C4;
  --primary-soft: rgba(78,140,107,.16);
  --ok: #22c55e;
  --warn: #E89B3C;
  --err: #f87171;
  --line: rgba(255,255,255,.08);
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,.4);
}
body.admin-dark .appbar.dash-appbar {
  background: linear-gradient(120deg, #10202a 0%, #16242B 55%, #0f1c24 100%);
  border-bottom: 1px solid rgba(78,140,107,.25);
  box-shadow: 0 4px 22px rgba(0,0,0,.5), inset 0 0 0 1px rgba(78,140,107,.08);
}
body.admin-dark .dash-logo {
  background: rgba(78,140,107,.18);
  color: #4E8C6B;
  box-shadow: inset 0 0 0 1px rgba(78,140,107,.4), 0 0 14px rgba(78,140,107,.35);
}
body.admin-dark .dash-title { color: #eaf2ef; }
body.admin-dark .dash-sub { color: rgba(178,210,196,.75); }

/* 卡片：玻璃拟态 */
body.admin-dark .dash-card {
  background: linear-gradient(180deg, rgba(36,52,59,.78), rgba(22,36,43,.82));
  border: 1px solid rgba(120,170,150,.14);
  box-shadow: 0 10px 34px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.04);
  backdrop-filter: blur(8px);
}
body.admin-dark .dash-card-head { color: #eaf2ef; }
body.admin-dark .dash-card-head::before {
  background: linear-gradient(180deg, #4E8C6B, #3E84C4);
  box-shadow: 0 0 10px rgba(78,140,107,.5);
}
body.admin-dark .dash-sub { color: #a9bcc9; }
body.admin-dark .muted { color: #9aa7b4; }
body.admin-dark .empty-tip { color: #9aa7b4; }

/* KPI 卡 */
body.admin-dark .dash-kpi {
  background: linear-gradient(180deg, rgba(30,44,52,.9), rgba(22,34,40,.9));
  border: 1px solid rgba(255,255,255,.07);
  border-left: 4px solid var(--accent, #4E8C6B);
  box-shadow: 0 6px 18px rgba(0,0,0,.3);
}
body.admin-dark .dash-kpi-ico {
  background: color-mix(in srgb, var(--accent, #4E8C6B) 22%, rgba(0,0,0,.2));
  color: var(--accent, #4E8C6B);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent, #4E8C6B) 35%, transparent);
}
body.admin-dark .dash-kpi-val { color: #eaf2ef; }
body.admin-dark .dash-kpi-val small { color: var(--accent, #4E8C6B); }
body.admin-dark .dash-kpi-label { color: #9aa7b4; }

/* 分析看板下半部分 */
body.admin-dark .dash-panel { background: rgba(15,24,30,.6); border: 1px solid rgba(255,255,255,.06); }
body.admin-dark .dash-bar-name { color: #cdd9e1; }
body.admin-dark .dash-bar-track { background: rgba(255,255,255,.08); }
body.admin-dark .dash-bar-fill {
  background: linear-gradient(90deg, #4E8C6B, #3E84C4);
  box-shadow: 0 0 10px rgba(62,132,196,.4);
}
body.admin-dark .dash-bar-meta { color: #8a99a6; }
body.admin-dark .dash-ring-inner {
  background: #16242B;
  box-shadow: 0 2px 10px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.06);
}
body.admin-dark .dash-ring-val { color: #4E8C6B; }
body.admin-dark .dash-ring-lbl { color: #8a99a6; }

/* 地图 */
body.admin-dark .dash-map {
  background: #0e181e;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: inset 0 0 0 1px rgba(78,140,107,.1);
}
body.admin-dark .map-legend { color: #9aa7b4; }

/* 表格 */
body.admin-dark .table-wrap { background: rgba(15,24,30,.5); border-color: rgba(255,255,255,.08); }
body.admin-dark .adm-table th,
body.admin-dark .adm-table td { border-bottom: 1px solid rgba(255,255,255,.07); color: #dbe5ea; }
body.admin-dark .adm-table thead th { background: rgba(255,255,255,.04); color: #9aa7b4; }
body.admin-dark .adm-table tbody tr:hover { background: rgba(255,255,255,.04); }

/* 路线卡片 */
body.admin-dark .route-card { background: rgba(22,36,43,.7); border: 1px solid rgba(255,255,255,.08); box-shadow: none; }
body.admin-dark .rc-name { color: #eaf2ef; }
body.admin-dark .rc-phone { color: #9aa7b4; }
body.admin-dark .badge.working { background: rgba(62,132,196,.18); color: #7fb2e6; }
body.admin-dark .rc-current {
  background: linear-gradient(135deg, rgba(232,155,60,.14), rgba(232,155,60,.06));
  border-color: rgba(232,155,60,.35);
}
body.admin-dark .rc-km { color: #E89B3C; }
body.admin-dark .rc-min { color: #f0b35e; }
body.admin-dark .rc-arr b { color: #4E8C6B; }
body.admin-dark .rc-pending { background: rgba(15,24,30,.5); border-color: rgba(255,255,255,.08); }
body.admin-dark .rc-pending-head { color: #cdd9e1; }
body.admin-dark .rc-pending-list li { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.08); }
body.admin-dark .rc-pending-seq { background: rgba(78,140,107,.2); color: #9fe0c0; }
body.admin-dark .rc-all-done { background: rgba(78,140,107,.14); color: #9fe0c0; }

/* 设置 Modal + 通用卡片（深色） */
body.admin-dark .modal { background: #16242B; color: #e6edf2; border: 1px solid rgba(255,255,255,.08); }
body.admin-dark .modal-head { color: #eaf2ef; }
body.admin-dark .modal-x { color: #9aa7b4; }
body.admin-dark .modal-tip { color: #9aa7b4; }
body.admin-dark .card { background: rgba(22,36,43,.6); border-color: rgba(255,255,255,.08); }
body.admin-dark .card-sub { color: #cdd9e1; }
body.admin-dark .card-sub::before { background: #4E8C6B; }
body.admin-dark .mt-row { background: rgba(15,24,30,.5); border-color: rgba(255,255,255,.08); }
body.admin-dark .mt-name { color: #e6edf2; }
body.admin-dark .mt-addr, body.admin-dark .mt-meta, body.admin-dark .mt-coord { color: #9aa7b4; }

body.admin-dark input, body.admin-dark select, body.admin-dark textarea {
  background: rgba(15,24,30,.7); color: #e6edf2; border-color: rgba(255,255,255,.12);
}
body.admin-dark input:focus, body.admin-dark select:focus, body.admin-dark textarea:focus {
  border-color: #4E8C6B; box-shadow: 0 0 0 3px rgba(78,140,107,.25);
}

/* 按钮（深色驾驶舱） */
body.admin-dark .btn { background: rgba(255,255,255,.06); color: #e6edf2; border-color: rgba(255,255,255,.12); }
body.admin-dark .btn:hover { background: rgba(255,255,255,.12); }
body.admin-dark .btn.primary,
body.admin-dark .btn-primary {
  background: #4E8C6B; border-color: #4E8C6B; color: #fff;
  box-shadow: 0 6px 18px rgba(78,140,107,.35);
}
body.admin-dark .btn.primary:hover,
body.admin-dark .btn-primary:hover { background: #57a07d; border-color: #57a07d; }
body.admin-dark .btn.sm.primary { background: #4E8C6B; border-color: #4E8C6B; }

/* 日期切换器 */
body.admin-dark .dash-date { background: rgba(255,255,255,.08); }
body.admin-dark .dash-date-input { background: rgba(15,24,30,.7); color: #e6edf2; }
body.admin-dark .dash-today { background: rgba(78,140,107,.9); color: #fff; }
body.admin-dark .dash-date-btn { color: #e6edf2; }
body.admin-dark .dash-date-btn:hover { background: rgba(255,255,255,.14); }

/* 顶栏文字 */
body.admin-dark .who { color: rgba(255,255,255,.85); }
body.admin-dark .btn-ghost { color: rgba(255,255,255,.85); }
body.admin-dark .btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ============================================================
   v27 · 管理中心（center.html）
   ============================================================ */

/* Tab 切换条 */
.ctr-tabs {
  display: flex; gap: 6px; margin: 18px 0 14px;
  padding: 6px; border-radius: 14px;
  background: rgba(22,36,43,.7); border: 1px solid rgba(255,255,255,.07);
  width: fit-content;
}
.ctr-tab {
  padding: 9px 22px; border-radius: 10px; border: none; cursor: pointer;
  font-size: 14px; font-weight: 600; color: #9aa7b4; background: transparent;
  transition: .16s;
}
.ctr-tab:hover { color: #e6edf2; background: rgba(255,255,255,.06); }
.ctr-tab.active {
  color: #fff;
  background: linear-gradient(120deg, #4E8C6B, #3E84C4);
  box-shadow: 0 6px 18px rgba(78,140,107,.35);
}
.ctr-pane { margin-top: 4px; }
.ctr-divider { height: 1px; background: rgba(255,255,255,.08); margin: 20px 0 16px; }

/* 密码单元格 */
.pwd-cell { display: inline-flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.pwd-txt {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px; letter-spacing: 1px; color: #cbd5e1;
  background: rgba(255,255,255,.05); padding: 3px 8px; border-radius: 6px;
  border: 1px solid rgba(255,255,255,.08);
}
.pwd-cell .btn-ghost.sm { font-size: 11px; padding: 2px 6px; white-space: nowrap; }

/* 系统信息栅格 */
.ctr-sys-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px 18px;
}
.ctr-sys-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  background: rgba(15,24,30,.5); border: 1px solid rgba(255,255,255,.06);
}
.ctr-sys-k { font-size: 12px; color: #9aa7b4; }
.ctr-sys-v { font-size: 13px; font-weight: 600; color: #e6edf2; text-align: right; }

/* 统计副标题（门店端履约率分母说明） */
.me-stat-sub { font-size: 11px; color: #9aa7b4; margin-top: 3px; }

/* 管理中心按钮：删除用危险色 */
.btn.sm.danger, body.admin-dark .btn.sm.danger {
  background: rgba(248,113,113,.16); color: #f87171; border-color: rgba(248,113,113,.35);
}
.btn.sm.danger:hover, body.admin-dark .btn.sm.danger:hover {
  background: rgba(248,113,113,.28); border-color: rgba(248,113,113,.5);
}

@media (max-width: 700px) {
  .ctr-tabs { width: 100%; }
  .ctr-tab { flex: 1; padding: 9px 8px; font-size: 13px; }
}


/* ============================================================
   v28 门店端：顶部 Banner（实物图 + 励志话术 + 时间 + 天气）
   ============================================================ */
.sb-banner {
  position: relative; overflow: hidden;
  height: 178px; border-radius: 16px; margin-bottom: 14px;
  background: linear-gradient(135deg, #4E8C6B 0%, #2E6CA4 100%);
  box-shadow: 0 6px 18px rgba(15, 118, 110, .14);
  isolation: isolate;
}
.sb-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  filter: blur(14px) saturate(1.12); transform: scale(1.08);
  transition: opacity .45s ease;
}
.sb-img {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: cover; display: block;
  opacity: 0; transition: opacity .45s ease;
}
.sb-img.is-loaded { opacity: 1; }
.sb-scrim {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, rgba(9,26,22,.44) 0%, rgba(9,26,22,.10) 36%, rgba(9,26,22,.66) 100%);
}
.sb-top {
  position: relative; z-index: 3;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  padding: 12px 14px;
}
.sb-time { text-align: right; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.45); }
.sb-time-hm { font-size: 30px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.sb-time-date { font-size: 12px; opacity: .92; margin-top: 5px; }
.sb-wx {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.24);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border-radius: 999px; padding: 6px 12px 6px 10px;
  color: #fff; cursor: pointer; text-shadow: 0 1px 6px rgba(0,0,0,.35);
  -webkit-tap-highlight-color: transparent;
  transition: background .18s ease;
}
.sb-wx:active { background: rgba(255,255,255,.28); }
.sb-wx-ico { font-size: 20px; line-height: 1; }
.sb-wx-temp { font-size: 15px; font-weight: 800; line-height: 1.1; }
.sb-wx-desc {
  font-size: 11px; opacity: .9; margin-top: 2px;
  max-width: 94px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sb-quote {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  padding: 0 16px 16px; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.55);
}
.sb-quote-txt { font-size: 19px; font-weight: 800; letter-spacing: .3px; line-height: 1.36; }
.sb-quote-sub { font-size: 12px; opacity: .9; margin-top: 5px; }

/* ============================================================
   v28 司机状态卡（有配送 / 无配送两种形态）
   ============================================================ */
.sb-drv { display: flex; align-items: center; gap: 12px; }
.sb-drv-av {
  width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%;
  background: linear-gradient(135deg, #4E8C6B, #2E6CA4);
  color: #fff; font-size: 18px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.sb-drv-info { flex: 1; min-width: 0; }
.sb-drv-name {
  font-size: 15px; font-weight: 700; color: #0f172a;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.sb-drv-eta { font-size: 13px; color: #475569; margin-top: 3px; }
.sb-drv-eta b { color: #0f766e; font-size: 15px; }
.sb-drv-call { flex-shrink: 0; }
.sb-idle { background: #f8fafc; border: 1px solid #e2e8f0; }

/* ============================================================
   v28 配送分析图表（近 30 天）
   ============================================================ */
.chart-legend { display: flex; gap: 14px; font-size: 11px; color: #6b7280; margin-bottom: 8px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.chart-legend i { display: inline-block; width: 12px; height: 8px; border-radius: 2px; }
.chart-legend .lg-bar { background: linear-gradient(90deg, #4E8C6B, #2E6CA4); }
.chart-legend .lg-line { background: #cbd5e1; height: 3px; border-radius: 2px; }
.sb-chart { width: 100%; }
.sb-chart svg { display: block; width: 100%; height: auto; }

/* TOP 产品横条 */
.tp-row {
  display: grid; grid-template-columns: 1fr 92px 38px;
  align-items: center; gap: 10px; padding: 6px 0;
}
.tp-name { font-size: 13px; color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-bar { height: 8px; background: #eef2f5; border-radius: 999px; overflow: hidden; }
.tp-bar i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #4E8C6B, #2E6CA4);
}
.tp-qty { font-size: 13px; font-weight: 700; color: #065f46; text-align: right; }

@media (max-width: 400px) {
  .sb-banner { height: 158px; }
  .sb-quote-txt { font-size: 17px; }
  .sb-time-hm { font-size: 26px; }
}
