:root {
  --bg: #f4f6fb;
  --bg-grad-1: #eef2ff;
  --bg-grad-2: #fdf2f8;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --border: rgba(15, 23, 42, 0.08);
  --text: #0f172a;
  --text-soft: #475569;
  --text-faint: #94a3b8;
  --primary: #f97316;
  --primary-2: #fb7185;
  --primary-soft: rgba(249, 115, 22, 0.12);
  --accent: #6366f1;
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.12);
  --ok: #10b981;
  --shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
  --radius: 18px;
  /* 历史别名：27 处组件引用了这些变量但 :root 从未定义，浏览器丢弃声明导致样式回退。
     统一映射到既有变量，一次定义全局生效（系统为浅色单主题，无 dark 变量覆盖）。 */
  --muted: var(--text-soft);
  --text-muted: var(--text-soft);
  --card: var(--surface-solid);
  --surface-soft: var(--surface);
  --shadow-sm: 0 4px 16px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Microsoft YaHei', '微软雅黑', 'PingFang SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, var(--bg-grad-1), transparent 60%),
    radial-gradient(1000px 500px at 110% 10%, var(--bg-grad-2), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.glass {
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- 登录页：独立作用域，不影响管理/骑手/打包端 ---------- */
.login-page {
  --login-bg: #f8f4ef;
  --login-panel: transparent;
  --login-panel-edge: rgba(17, 17, 17, .22);
  --login-text: #101010;
  --login-muted: rgba(16, 16, 16, .66);
  --login-field-edge: rgba(16, 16, 16, .46);
  min-height: 100dvh;
  color: var(--login-text);
  background: var(--login-bg);
  overflow-x: hidden;
}
.login-shell {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 440px);
  align-items: center;
  gap: clamp(36px, 6vw, 110px);
  padding: clamp(24px, 4vw, 58px) clamp(28px, 7vw, 110px);
  overflow: hidden;
}
.login-media {
  position: absolute;
  z-index: -4;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: #f8f4ef;
}
.login-video, .login-video-fallback, .login-video-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.login-video {
  z-index: 2;
  object-fit: cover;
  object-position: 68% center;
  opacity: 0;
  filter: saturate(.98) contrast(1.08) brightness(.96);
  transform: scale(1.015);
  /* 淡出侧带 .6s 延迟：等接棒的那条完全盖住后才降透明度，中途不会露出底层 poster */
  transition: opacity .6s cubic-bezier(.16, 1, .3, 1) .6s;
}
/* 当前在播的那条：立即淡入并置于上层，实现 fc↔fc3 无缝交叉过渡 */
.login-media.is-ready .login-video.is-current {
  opacity: 1;
  z-index: 3;
  transition-delay: 0s;
}
.login-media.is-static .login-video.is-current { opacity: .92; }
.login-media.has-error .login-video { display: none; }
.login-video-fallback {
  background:
    url('../assets/videos/fc-20260731-poster.jpg') 68% center / cover no-repeat,
    linear-gradient(135deg, #f8f4ef 0%, #f1ded7 48%, #f8f4ef 100%);
  z-index: 1;
  filter: saturate(.98) contrast(1.08) brightness(.96);
}
.login-video-shade {
  z-index: 3;
  background:
    linear-gradient(90deg, rgba(248, 244, 239, .03) 0%, rgba(248, 244, 239, .06) 42%, rgba(248, 244, 239, .58) 70%, rgba(248, 244, 239, .88) 100%),
    linear-gradient(180deg, rgba(255, 250, 245, .03), rgba(74, 36, 27, .16));
}
.login-card {
  position: relative;
  grid-column: 2;
  width: min(100%, 440px);
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid rgba(17, 17, 17, .20);
  border-radius: 22px;
  background: transparent;
  box-shadow:
    0 30px 72px rgba(35, 22, 18, .14),
    0 8px 24px rgba(35, 22, 18, .08);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  animation: login-card-in .7s cubic-bezier(.16, 1, .3, 1) both;
}
.login-brand { margin-bottom: 24px; }
.login-brand h1 {
  margin: 0;
  display: grid;
  width: 100%;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: center;
  color: var(--login-text);
  font-size: clamp(30px, calc(4vw + 6px), 36px);
  line-height: 1.1;
  font-weight: 800;
  cursor: default;
  outline: none;
}
.login-brand h1 span {
  display: block;
  min-width: 0;
  text-align: center;
  -webkit-text-stroke: 0 transparent;
  paint-order: stroke fill;
  transition: color .22s ease, -webkit-text-stroke-color .22s ease;
}
.login-brand h1:is(:hover, :focus-visible) span {
  color: #f05a24;
  -webkit-text-stroke: 2px #b72c08;
  animation: login-flame-stroke .72s steps(2, end) infinite alternate;
}
.login-brand h1:focus-visible { outline: 2px solid #e64a19; outline-offset: 7px; border-radius: 2px; }
.login-form { display: grid; gap: 14px; grid-auto-rows: min-content; align-content: start; }
.login-field { min-height: 0; align-self: start; }
.login-field label { margin: 0 0 20px; color: var(--login-text); font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.login-input-wrap {
  height: 48px;
  align-self: start;
  border-radius: 6px;
}
.login-input-wrap input {
  position: relative;
  z-index: 1;
  height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(61, 48, 43, .62);
  border-radius: 6px;
  background: transparent !important;
  color: #000 !important;
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  font-size: 15px;
  font-weight: 400;
  -webkit-text-fill-color: #000;
  box-shadow: none;
  transition: border-color .2s ease, box-shadow .3s cubic-bezier(.16, 1, .3, 1);
}
.login-input-wrap input::placeholder {
  color: rgba(0, 0, 0, .46);
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  font-weight: 400;
  -webkit-text-fill-color: rgba(0, 0, 0, .46);
}
.login-input-wrap input:hover { border-color: rgba(61, 48, 43, .62); background: transparent !important; }
.login-input-wrap input:focus {
  border-color: rgba(61, 48, 43, .82);
  outline: none;
  background: transparent !important;
  color: #000 !important;
  -webkit-text-fill-color: #000;
  -webkit-text-stroke: 0 transparent;
  text-shadow: none;
  box-shadow: none;
  transform: none;
}
.login-input-wrap input:focus::placeholder {
  color: rgba(0, 0, 0, .46);
  -webkit-text-fill-color: rgba(0, 0, 0, .46);
  -webkit-text-stroke: 0 transparent;
  text-shadow: none;
}
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.login-captcha { display: grid; gap: 10px; padding: 12px; border: 1px solid rgba(61, 48, 43, .34); border-radius: 8px; background: rgba(255, 255, 255, .34); }
.login-captcha[hidden] { display: none; }
.login-captcha-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.login-captcha-head h2 { margin: 0; color: #21130f; font-size: 14px; line-height: 1.35; }
.login-captcha-head p { margin: 3px 0 0; color: rgba(33, 19, 15, .7); font-size: 11px; line-height: 1.4; }
.login-captcha-refresh { flex: 0 0 auto; min-width: 48px; min-height: 36px; padding: 0 9px; border: 1px solid rgba(61, 48, 43, .5); border-radius: 6px; color: #21130f; background: transparent; cursor: pointer; font-size: 12px; font-weight: 700; }
.login-captcha-refresh:is(:hover, :focus-visible):not(:disabled) { border-color: #a92a0a; color: #a92a0a; }
.login-captcha-refresh:disabled { cursor: wait; opacity: .55; }
.login-captcha-stage { display: grid; grid-template-columns: minmax(160px, 1.25fr) minmax(130px, 1fr); gap: 10px; align-items: stretch; }
.login-captcha-image { min-height: 56px; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid rgba(61, 48, 43, .34); border-radius: 7px; color: #8c1e08; background: #f6efe8; font-size: 14px; font-weight: 800; }
.login-captcha-image svg { display: block; width: 100%; height: 56px; }
.login-captcha-stage input { min-width: 0; height: 56px; padding: 0 11px; border: 1px solid rgba(61, 48, 43, .62); border-radius: 7px; color: #000; background: rgba(255, 255, 255, .24); font: 700 15px "Microsoft YaHei", sans-serif; letter-spacing: 0; text-align: center; }
.login-captcha-stage input:focus { outline: 2px solid rgba(169, 42, 10, .42); outline-offset: 1px; }
.login-captcha-status { min-height: 16px; margin: 0; color: rgba(33, 19, 15, .72); font-size: 11px; line-height: 1.45; }
.login-captcha.is-banned { border-color: rgba(185, 28, 28, .44); background: rgba(254, 226, 226, .48); }
.login-captcha.is-banned .login-captcha-stage input, .login-captcha.is-banned .login-captcha-refresh { display: none; }
.login-captcha.is-banned .login-captcha-stage { grid-template-columns: 1fr; }
.login-error { min-height: 0; margin: -6px 0 -6px; color: #b42318; font-size: 12px; font-weight: 700; line-height: 1.5; }
.login-error:empty { display: none; }
.login-form.has-error { animation: login-shake .34s ease; }
.login-submit {
  position: relative; height: 48px; margin-top: 2px; padding: 0 20px; border: 1px solid rgba(17, 17, 17, .56); border-radius: 3px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  color: #111; background: transparent; box-shadow: none;
  font-size: 13px; font-weight: 800; letter-spacing: .28em; text-indent: .28em;
  transition: color .2s, background .2s, border-color .2s, box-shadow .2s, transform .2s cubic-bezier(.16,1,.3,1);
}
.login-submit::before { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(0, 0, 0, .18); opacity: 0; transition: opacity .2s ease; pointer-events: none; }
.login-submit-video { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .2s ease; pointer-events: none; }
.login-submit > span { position: relative; z-index: 2; }
.login-submit-label { display: inline-block; min-width: 3em; font-size: 26px; font-weight: 900; letter-spacing: .32em; text-indent: .32em; line-height: 1; white-space: nowrap; }
.login-submit:hover:not(:disabled), .login-submit:focus-visible:not(:disabled) { color: #fff; border-color: rgba(17, 17, 17, .82); box-shadow: 0 10px 24px rgba(17, 17, 17, .22); transform: translateY(-1px); }
.login-submit:hover:not(:disabled)::before, .login-submit:focus-visible:not(:disabled)::before { opacity: 1; }
.login-submit.is-video-active:not(:disabled) { color: #fff; border-color: rgba(17, 17, 17, .82); box-shadow: 0 10px 24px rgba(17, 17, 17, .22); transform: translateY(-1px); }
.login-submit.is-video-active:not(:disabled)::before { opacity: 1; }
.login-submit.is-video-active:not(:disabled) .login-submit-video { opacity: 1; }
.login-submit:active:not(:disabled) { color: #fff; border-color: #111; transform: translateY(0) scale(.99); }
.login-submit:focus-visible { outline: 2px solid #111; outline-offset: 3px; }
.login-submit:disabled { cursor: wait; }
.login-submit-loading { display: none; align-items: center; gap: 9px; }
.login-submit-loading i { width: 17px; height: 17px; border: 2px solid rgba(255,255,255,.38); border-top-color: #fff; border-radius: 50%; animation: login-spin .7s linear infinite; }
.login-submit.is-loading .login-submit-label { display: none; }
.login-submit.is-loading .login-submit-loading { display: inline-flex; }
.login-submit.is-success { background: #c83710; border-color: #a92a0a; }
@keyframes login-card-in { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes login-spin { to { transform: rotate(360deg); } }
@keyframes login-shake { 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
@keyframes login-flame-stroke {
  0% { -webkit-text-stroke-color: #9f2207; text-shadow: 0 -1px 2px rgba(255, 210, 72, .86), 0 -4px 7px rgba(255, 93, 20, .58), 0 3px 8px rgba(146, 27, 4, .32); }
  45% { -webkit-text-stroke-color: #e13a0b; text-shadow: 0 -2px 3px rgba(255, 229, 122, .92), 1px -6px 9px rgba(255, 87, 12, .68), -1px 3px 9px rgba(160, 31, 5, .34); }
  100% { -webkit-text-stroke-color: #b72c08; text-shadow: 0 -1px 2px rgba(255, 199, 58, .88), -1px -5px 8px rgba(255, 119, 18, .62), 1px 3px 8px rgba(139, 24, 3, .3); }
}
@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; justify-items: end; padding-inline: clamp(22px, 6vw, 54px); }
  .login-card { grid-column: 1; width: min(100%, 480px); }
  .login-video { object-position: 72% center; }
  .login-video-fallback { background-position: 72% center, center; }
  .login-video-shade {
    background:
      linear-gradient(90deg, rgba(248, 244, 239, .02) 0%, rgba(248, 244, 239, .12) 32%, rgba(248, 244, 239, .74) 76%, rgba(248, 244, 239, .9) 100%),
      linear-gradient(180deg, rgba(255, 250, 245, .04), rgba(74, 36, 27, .18));
  }
}
@media (max-width: 560px) {
  .login-shell { align-items: center; justify-items: center; padding: 18px 14px 40px; }
  .login-captcha-stage { grid-template-columns: 1fr; }
  .login-captcha-stage input { height: 48px; }
  .login-captcha-image, .login-captcha-image svg { min-height: 54px; height: 54px; }
  .login-card { padding: 22px 20px 20px; border-radius: 16px; background: var(--login-panel); }
  .login-brand { margin-bottom: 20px; }
  .login-brand h1 { font-size: 31px; }
  .login-input-wrap, .login-input-wrap input { height: 46px; }
  .login-submit { height: 46px; }
  .login-video { object-position: 50% center; }
  .login-video-fallback { background-position: 50% center, center; }
  .login-video-shade {
    background:
      linear-gradient(180deg, rgba(248, 244, 239, .08) 0%, rgba(248, 244, 239, .3) 28%, rgba(248, 244, 239, .66) 58%, rgba(248, 244, 239, .82) 100%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .login-card, .login-submit-loading i, .login-form.has-error, .login-brand h1 span { animation: none !important; }
  .login-video, .login-submit-video, .login-submit, .login-input-wrap input, .login-submit::before, .login-brand h1 span { transition: none; }
  .login-video { transform: none; }
}

label { display: block; font-size: 13px; color: var(--text-soft); margin: 16px 0 6px; }
button, input, select, textarea {
  font-family: inherit;
}
input, select, textarea {
  width: 100%; padding: 12px 14px; font-size: 14px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface-solid); color: var(--text); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
/* 高德 Key 锁定状态（disabled）：灰底 + 锁标识，明确不可编辑 */
input.amap-key-input:disabled {
  background: var(--surface-solid);
  color: var(--text-faint);
  border-style: dashed;
  cursor: not-allowed;
  opacity: .75;
  letter-spacing: .5px;
}
input.amap-key-input:disabled:focus {
  border-color: var(--border);
  box-shadow: none;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: 12px; border: none; cursor: pointer;
  font-size: 14px; font-weight: 600; color: #fff; text-decoration: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  transition: transform 0.2s cubic-bezier(0.16,1,0.3,1), box-shadow 0.2s;
  box-shadow: 0 8px 20px rgba(249,115,22,0.3);
}
.btn:hover { transform: translateY(-2px) scale(1.02); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn.block { width: 100%; margin-top: 22px; }
.btn.ghost { background: transparent; color: var(--text-soft); border: 1px solid var(--border); box-shadow: none; }
.btn.sm { padding: 7px 12px; font-size: 12px; border-radius: 10px; }
.btn.disabled { opacity: .55; cursor: not-allowed; pointer-events: none; filter: grayscale(0.4); }
.btn.xs { padding:3px 8px; font-size:11px; border-radius:6px; }
.btn.danger { background: linear-gradient(135deg, #ef4444, #f97316); box-shadow: 0 8px 20px rgba(239,68,68,0.3); }
/* ★ 骑手端「一键导航全部商家」醒目全局按钮（宽度随内容，按钮本身水平居中） */
.btn.nav-all {
  display: flex;
  width: fit-content;
  max-width: calc(100% - 32px);
  min-width: 240px;
  margin: 12px auto 0;
  padding: 16px 28px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 10px 26px rgba(239, 68, 68, 0.35);
  text-align: center;
}
.btn.nav-all:hover { transform: translateY(-3px) scale(1.01); box-shadow: 0 16px 36px rgba(239, 68, 68, 0.45); }
.btn.nav-all:active { transform: translateY(0) scale(0.99); }
.btn.nav-all .nav-main { font-size: 18px; font-weight: 900; letter-spacing: .8px; line-height: 1.2; }
.btn.nav-all .nav-sub { font-size: 12px; font-weight: 700; letter-spacing: 0; opacity: .9; line-height: 1.3; }
.btn.nav-all .nav-warn { color: #fff3cd; opacity: 1; font-weight: 800; }
.btn.nav-all.nav-disabled { background: linear-gradient(135deg, #94a3b8, #64748b); box-shadow: none; cursor: not-allowed; }
/* ---------- 布局 ---------- */
.app { max-width: 1180px; margin: 0 auto; padding: 20px 20px 80px; }
.topbar {
  position: sticky; top: 0; z-index: 40; margin: 0 0 18px; padding: 14px 20px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--surface); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border);
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.topbar-logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  display: grid;
  place-items: center;
  font-size: 20px;
  flex: none;
}
.topbar-brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  min-width: 0;
}
.topbar-meta {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: center;
}
.topbar .title { font-size: 17px; font-weight: 700; line-height: 1.3; }
.topbar .sub {
  font-size: 12px;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 2px;
  line-height: 1.5;
  width: 100%;
}
/* 日期原子：年/月/日各为不可拆散整体，均匀分布，不随容器宽度折断 */
.topbar .sub .d-part { display: inline-flex; align-items: center; white-space: nowrap; flex: 0 0 auto; letter-spacing: 0.5px; }
.topbar .sub .d-day { gap: 3px; }
.topbar .sub .date-circle {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e11d48, #be123c);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 2px 7px rgba(225, 29, 72, 0.28);
  vertical-align: middle;
}
.topbar-time {
  font-size: 16px;
  color: #000;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  text-align: center;
  letter-spacing: 0.5px;
}
.topbar-center { flex: 1; min-width: 0; display: flex; align-items: center; margin: 0 8px; }
.topbar .who { font-size: 13px; color: var(--text-soft); }
.role-pill { font-size: 11px; padding: 3px 9px; border-radius: 999px; font-weight: 600;
  background: var(--primary-soft); color: var(--primary); }

/* ---------- 页面级选项卡（管理端 / 骑手端 / 打包端 共用） ---------- */
.admin-tabs,
.app-tabs {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 18px;
  padding: 6px;
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.admin-tabs .btn.ghost {
  margin-left: auto;
  flex: none;
  background: transparent;
  border-radius: 12px;
}
.admin-tab,
.app-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  background: transparent;
  border: 1px solid transparent;
  user-select: none;
  position: relative;
  text-align: center;
  white-space: nowrap;
}
.admin-tab:hover,
.app-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.55);
  border-color: var(--border);
  transform: translateY(-1px);
}
.admin-tab:focus-visible,
.app-tab:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.admin-tab.active,
.app-tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-color: transparent;
  box-shadow: 0 8px 22px rgba(249, 115, 22, 0.32);
}
.admin-tab-content { display: none; }
.admin-tab-content.active {
  display: block;
  animation: fadeInTab 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes fadeInTab {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 900px) {
  .admin-tabs,
  .app-tabs { max-width: 100%; padding: 5px; gap: 4px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
  .admin-tab,
  .app-tab { flex: 0 0 auto; padding: 8px 12px; font-size: 13px; }
  .admin-tabs .btn.ghost { margin-left: auto; }
}
@media (max-width: 420px) {
  .admin-tab,
  .app-tab { padding: 7px 9px; font-size: 12px; }
  .admin-tabs .btn.ghost { padding: 5px 8px; font-size: 11px; }
}

.icon-btn { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--border);
  background: var(--surface-solid); color: var(--text); cursor: pointer; font-size: 16px;
  display: grid; place-items: center; transition: transform 0.2s; }
.icon-btn:hover { transform: scale(1.08); }

/* ---------- 管理员专属恶劣天气工资辅助 ---------- */
.weather-pay-advisory {
  position: relative; margin: 14px 0 6px; padding: 9px 14px;
  max-height: 52px; overflow: hidden; box-sizing: border-box;
  border: 1px solid color-mix(in srgb, #d97706 34%, var(--border)); border-radius: 8px;
  background: color-mix(in srgb, #fff7db 58%, var(--surface-solid)); color: var(--text);
  box-shadow: 0 5px 16px rgba(120, 53, 15, .05);
  cursor: default; outline: none;
  transition: max-height .34s cubic-bezier(.16,1,.3,1), padding .28s ease, box-shadow .28s ease, border-color .28s ease;
}
/* 悬停满 1.2 秒才展开：transition-delay 1.2s 期间鼠标移开则动画取消，避免划过误触；收起时基础态 delay=0 立即回收。
   悬停期间底部 ::after 读秒横条以 1.2s 线性从 0 铺满，直观提示"再等一下就展开"（与商家拓展三源卡片同一套模式）。
   键盘/点击聚焦（含移动端点按触发 focus）立即展开且横条瞬时铺满：聚焦是明确意图，用 transition: none 瞬时呈现。
   仅调 delay/duration 不够：hover 阶段已排队的延迟过渡目标值不变，浏览器不重新计时，点击会白等剩余秒数；
   transition: none 直接取消全部运行中的过渡并立即应用当前目标值（CDP 实测证实）。
   折叠态不再渲染文案提示：标题居左、状态徽标居中，视觉干净。 */
.weather-pay-advisory:hover { transition-delay: 1.2s; }
.weather-pay-advisory:focus, .weather-pay-advisory:focus-within { transition: none; }
.weather-pay-advisory:hover, .weather-pay-advisory:focus, .weather-pay-advisory:focus-within { max-height: 540px; padding: 18px 20px; border-color: color-mix(in srgb, #d97706 52%, var(--border)); box-shadow: 0 14px 34px rgba(120, 53, 15, .11); }
.weather-pay-advisory::after { content: ''; position: absolute; left: 0; bottom: 0; width: 0; height: 3px; background: #d97706; opacity: .8; border-radius: 0 999px 999px 0; }
.weather-pay-advisory:hover::after { width: 100%; transition: width 1.2s linear; }
.weather-pay-advisory:focus::after, .weather-pay-advisory:focus-within::after { width: 100%; transition: none; }
.weather-pay-advisory:focus-visible { outline: 2px solid color-mix(in srgb, #d97706 65%, transparent); outline-offset: 2px; }
.weather-pay-advisory-loading, .weather-pay-advisory-error { color: var(--muted); font-size: 14px; line-height: 1.65; }
.weather-pay-advisory-head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 32px; }
.weather-pay-advisory:not(:hover):not(:focus):not(:focus-within) .weather-pay-advisory-head { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.weather-pay-advisory-heading { display: grid; gap: 5px; min-width: 0; }
.weather-pay-advisory-heading strong { font-size: 15px; line-height: 1.25; }
.weather-pay-advisory:not(:hover):not(:focus):not(:focus-within) .weather-pay-advisory-heading { grid-column: 1; justify-self: start; }
.weather-pay-advisory:not(:hover):not(:focus):not(:focus-within) .weather-pay-advisory-head em { grid-column: 2; justify-self: center; align-self: center; }
.weather-pay-advisory-heading span { max-height: 0; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.5; opacity: 0; transition: max-height .22s ease, opacity .18s ease; }
.weather-pay-advisory:hover .weather-pay-advisory-heading span, .weather-pay-advisory:focus .weather-pay-advisory-heading span, .weather-pay-advisory:focus-within .weather-pay-advisory-heading span { max-height: 24px; opacity: 1; }
/* 副标题与容器同步：悬停路径延迟 0.6 秒，聚焦路径瞬时（理由同容器规则） */
.weather-pay-advisory:hover .weather-pay-advisory-heading span { transition-delay: 1.2s; }
.weather-pay-advisory:focus .weather-pay-advisory-heading span, .weather-pay-advisory:focus-within .weather-pay-advisory-heading span { transition: none; }
.weather-pay-advisory-head em { flex: 0 0 auto; min-width: 190px; max-width: 44%; padding: 7px 11px; border-radius: 7px; font-size: 14px; line-height: 1.25; text-align: center; font-style: normal; font-weight: 900; }
.weather-pay-advisory-head em.is-triggered { background: #b91c1c; color: #fff; }
.weather-pay-advisory-head em.is-review { background: #b45309; color: #fff; }
.weather-pay-advisory-head em.is-clear { background: rgba(22,163,74,.13); color: #15803d; border: 1px solid rgba(22,163,74,.18); }
.weather-pay-advisory-body { display: grid; gap: 12px; margin-top: 15px; }
.weather-pay-advisory:not(:hover):not(:focus):not(:focus-within) .weather-pay-advisory-body { visibility: hidden; opacity: 0; }
.weather-pay-advisory-body { opacity: 1; transition: opacity .2s ease; }
.weather-pay-advisory-rule { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 12px; border-top: 1px solid color-mix(in srgb, #d97706 20%, var(--border)); }
.weather-pay-advisory-rule > div { display: grid; gap: 3px; min-width: 0; }
.weather-pay-advisory-rule small { color: var(--muted); font-size: 11px; font-weight: 700; }
.weather-pay-advisory-rule b { font-size: 14px; line-height: 1.45; }
.weather-pay-advisory-rule > span { max-width: 48%; color: var(--muted); font-size: 12px; line-height: 1.55; text-align: right; }
.weather-pay-advisory-providers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.weather-pay-advisory-providers li { position: relative; display: grid; align-content: start; gap: 6px; min-width: 0; min-height: 86px; padding: 12px 13px 11px; border: 1px solid var(--border); border-radius: 8px; background: color-mix(in srgb, var(--surface-solid) 94%, transparent); transition: transform .22s cubic-bezier(.16,1,.3,1), border-color .22s ease, box-shadow .22s ease, background-color .22s ease; }
.weather-pay-advisory-providers li::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; border-radius: 8px 0 0 8px; background: #16a34a; transition: width .22s ease; }
.weather-pay-advisory-providers li:focus-within { border-color: color-mix(in srgb, var(--primary) 58%, var(--border)); box-shadow: 0 8px 20px rgba(37,99,235,.12); }
.weather-pay-advisory-providers li:hover::before { width: 5px; }
.weather-pay-provider-result { display: grid; place-items: center; min-height: 38px; color: var(--text); font-size: 15px; font-weight: 800; letter-spacing: .01em; text-align: center; }
.weather-pay-advisory-providers li.is-risk::before { background: #d97706; }
.weather-pay-advisory-providers li.is-hit::before { background: #b91c1c; }
.weather-pay-provider-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.weather-pay-provider-head b { min-width: 0; font-size: 13px; line-height: 1.4; }
.weather-pay-provider-head small { flex: 0 0 auto; color: #15803d; font-size: 10px; font-weight: 800; }
.is-risk .weather-pay-provider-head small { color: #b45309; }
.is-hit .weather-pay-provider-head small { color: #b91c1c; }
.weather-pay-advisory-providers span, .weather-pay-advisory-evidence, .weather-pay-advisory-note { color: var(--muted); font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.weather-pay-advisory-providers .weather-pay-provider-result { color: var(--text); font-size: 15px; font-weight: 800; letter-spacing: .01em; }
.weather-pay-provider-risk { color: #b45309 !important; font-weight: 700; }
.weather-pay-advisory-evidence { display: grid; gap: 5px; padding: 10px 12px; border-left: 3px solid #b91c1c; background: rgba(185,28,28,.05); }
.weather-pay-advisory-evidence b { color: var(--text); font-size: 12px; }
.weather-pay-advisory-note { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 10px 22px; padding-top: 12px; border-top: 1px solid var(--border); }
.weather-pay-advisory-note b { color: var(--text); }
@media (max-width: 760px) {
  .weather-pay-advisory { padding: 9px 10px; }
  .weather-pay-advisory:hover, .weather-pay-advisory:focus, .weather-pay-advisory:focus-within { padding: 15px 14px; }
  .weather-pay-advisory-head { align-items: center; flex-direction: row; gap: 8px; }
  .weather-pay-advisory:hover .weather-pay-advisory-head, .weather-pay-advisory:focus .weather-pay-advisory-head, .weather-pay-advisory:focus-within .weather-pay-advisory-head { align-items: stretch; flex-direction: column; }
  .weather-pay-advisory-rule { align-items: stretch; flex-direction: column; }
  .weather-pay-advisory-head em { min-width: 0; max-width: 48%; padding: 5px 7px; font-size: 11px; }
  .weather-pay-advisory:hover .weather-pay-advisory-head em, .weather-pay-advisory:focus .weather-pay-advisory-head em, .weather-pay-advisory:focus-within .weather-pay-advisory-head em { max-width: none; }
  .weather-pay-advisory-rule > span { max-width: none; text-align: left; }
  .weather-pay-advisory-providers, .weather-pay-advisory-note { grid-template-columns: 1fr; }
  .weather-pay-advisory-providers li { min-height: 0; }
}

/* ---------- 双源天气：等宽铺满 + 卡片顶部摘要 + 单时段高度内滚动 ---------- */
.weather-system {
  width: 100%; max-width: 100%; min-width: 0; overflow: hidden;
  margin: 12px 0 14px; padding: 10px;
  border: 1px solid rgba(148,163,184,.24); border-radius: 12px;
  background: color-mix(in srgb, var(--surface-solid) 90%, transparent); color: var(--text); box-sizing: border-box;
}
.weather-system-app { margin: 12px auto 0; max-width: 1400px; }
.weather-forecast { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; min-width: 0; }
.weather-provider {
  min-width: 0; overflow: hidden; padding: 11px;
  border: 1px solid var(--border); border-radius: 11px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--surface-solid) 96%, transparent), color-mix(in srgb, var(--primary-soft) 22%, var(--surface-solid)));
  box-shadow: 0 8px 24px rgba(15,23,42,.05);
  transition: transform .24s cubic-bezier(.16,1,.3,1), border-color .24s ease, box-shadow .24s ease;
}
.weather-provider header { display: grid; place-items: center; min-height: 30px; min-width: 0; padding-inline: 8px; font-size: 12px; }
.weather-provider header strong { min-width: 0; font-size: 17px; font-weight: 900; line-height: 1.3; text-align: center; white-space: nowrap; }
.weather-provider[class*="is-error"], .weather-provider[class*="is-permission_missing"] { border-color: rgba(220,38,38,.28); }
.weather-provider-summary { display: grid; place-items: center; margin-top: 9px; padding: 10px 9px; border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--border)); border-radius: 10px; background: color-mix(in srgb, var(--primary-soft) 34%, var(--surface-solid)); transition: transform .2s cubic-bezier(.16,1,.3,1), border-color .2s ease, box-shadow .2s ease, background-color .2s ease; }
.weather-compact-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; width: 100%; min-width: 0; }
.weather-compact-metrics > span, .weather-window li > span { display: grid; gap: 3px; min-width: 0; }
.weather-compact-metrics > span { place-items: center; align-content: center; min-height: 48px; padding: 3px 7px; text-align: center; }
.weather-compact-metrics > span + span { border-left: 1px solid color-mix(in srgb, var(--border) 72%, transparent); }
.weather-compact-metrics small, .weather-window li span small { color: var(--muted); font-size: 10px; line-height: 1.2; }
.weather-compact-metrics strong { max-width: 100%; overflow: hidden; color: var(--text); font-size: 15px; line-height: 1.2; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.weather-compact-metrics .is-rain strong, .weather-window li .is-rain strong { color: #dc2626; }
.weather-api-metric strong { color: var(--muted); }
.weather-provider[class*="is-ok"] .weather-api-metric strong { color: #15803d; }
.weather-provider[class*="is-error"] .weather-api-metric strong, .weather-provider[class*="is-permission_missing"] .weather-api-metric strong { color: #b91c1c; }
.weather-provider-error { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
.weather-provider-scroll { height: 188px; margin-top: 8px; overflow-y: auto; overflow-x: clip; overscroll-behavior: contain; scroll-snap-type: y mandatory; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--primary) 62%, var(--border)) color-mix(in srgb, var(--border) 42%, transparent); scrollbar-gutter: stable; border-radius: 8px; }
.weather-provider-scroll::-webkit-scrollbar { width: 8px; }
.weather-provider-scroll::-webkit-scrollbar-track { margin-block: 5px; background: color-mix(in srgb, var(--border) 42%, transparent); border-radius: 999px; }
.weather-provider-scroll::-webkit-scrollbar-thumb { min-height: 42px; background: color-mix(in srgb, var(--primary) 62%, #f59e0b); border: 2px solid transparent; border-radius: 999px; background-clip: padding-box; }
.weather-provider-scroll::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--primary) 78%, #f59e0b); background-clip: padding-box; }
.weather-provider-scroll:focus-visible { outline: 2px solid color-mix(in srgb, var(--primary) 65%, transparent); outline-offset: 2px; }
.weather-window { min-width: 0; height: 188px; padding: 7px 7px 9px; scroll-snap-align: start; box-sizing: border-box; background: color-mix(in srgb, var(--surface-solid) 78%, transparent); }
.weather-window + .weather-window { border-top: 1px solid var(--border); }
.weather-window-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; }
.weather-window-head > b { color: var(--text); font-size: 11px; font-weight: 850; white-space: nowrap; }
.weather-window-actions { display: flex; align-items: center; gap: 7px; }
.weather-scroll-btn { display: grid; place-items: center; width: 30px; height: 30px; padding: 0 0 2px; border: 1px solid color-mix(in srgb, var(--primary) 38%, var(--border)); border-radius: 50%; background: linear-gradient(145deg, color-mix(in srgb, var(--surface-solid) 96%, transparent), color-mix(in srgb, var(--primary-soft) 66%, var(--surface-solid))); color: var(--primary); font: 900 21px/1 system-ui, sans-serif; cursor: pointer; box-shadow: 0 4px 11px rgba(15,23,42,.1), inset 0 1px 0 rgba(255,255,255,.72); transition: transform .18s cubic-bezier(.16,1,.3,1), border-color .18s ease, background-color .18s ease, box-shadow .18s ease, opacity .18s ease; }
.weather-scroll-btn:active:not(:disabled) { transform: translateY(0) scale(.91); }
.weather-scroll-btn:focus-visible { outline: 2px solid color-mix(in srgb, var(--primary) 72%, transparent); outline-offset: 2px; }
.weather-scroll-btn:disabled { opacity: .3; cursor: default; box-shadow: none; }
.weather-window ul { display: flex; gap: 7px; width: 100%; max-width: 100%; overflow-x: auto; overflow-y: hidden; overscroll-behavior-inline: contain; scroll-behavior: smooth; scroll-snap-type: x proximity; scrollbar-width: none; list-style: none; margin: 2px 0 0; padding: 0 2px 4px; box-sizing: border-box; touch-action: pan-x; cursor: grab; }
.weather-window ul:active { cursor: grabbing; }
.weather-window ul::-webkit-scrollbar { display: none; width: 0; height: 0; }
.weather-window ul::after { content: ''; flex: 0 0 22px; }
.weather-window li { scroll-snap-align: start; }
.weather-window li { display: grid; grid-template-rows: auto repeat(5, auto); align-content: start; gap: 4px; flex: 0 0 116px; min-width: 116px; padding: 7px; border: 1px solid transparent; border-radius: 8px; background: color-mix(in srgb, var(--surface-solid) 94%, transparent); font-size: 10px; box-sizing: border-box; transition: transform .2s cubic-bezier(.16,1,.3,1), border-color .2s ease, box-shadow .2s ease, background-color .2s ease; }
.weather-window li time { display: flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 700; }
.weather-window li time em { padding: 1px 4px; border-radius: 4px; background: var(--primary); color: #fff; font-size: 8px; font-style: normal; font-weight: 800; }
.weather-window li span { grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 4px; white-space: nowrap; }
.weather-window li span strong { overflow: hidden; color: var(--text); font-size: 10px; text-align: right; text-overflow: ellipsis; }
.weather-window li.is-current { border-color: var(--primary); background: color-mix(in srgb, var(--primary-soft) 68%, var(--surface-solid)); box-shadow: 0 5px 14px rgba(37,99,235,.13); }
@media (hover: hover) and (pointer: fine) {
  .weather-pay-advisory-providers li:hover { transform: translateY(-3px); border-color: color-mix(in srgb, #16a34a 48%, var(--border)); background: color-mix(in srgb, #dcfce7 28%, var(--surface-solid)); box-shadow: 0 12px 26px rgba(15,23,42,.12); }
  .weather-pay-advisory-providers li.is-risk:hover { border-color: color-mix(in srgb, #d97706 55%, var(--border)); background: color-mix(in srgb, #fef3c7 30%, var(--surface-solid)); }
  .weather-pay-advisory-providers li.is-hit:hover { border-color: color-mix(in srgb, #b91c1c 55%, var(--border)); background: color-mix(in srgb, #fee2e2 28%, var(--surface-solid)); }
  .weather-provider:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--primary) 48%, var(--border)); box-shadow: 0 16px 34px rgba(15,23,42,.14); }
  .weather-provider-summary:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--primary) 52%, var(--border)); background: color-mix(in srgb, var(--primary-soft) 54%, var(--surface-solid)); box-shadow: 0 8px 18px rgba(37,99,235,.11); }
  .weather-scroll-btn:hover:not(:disabled) { transform: translateY(-2px); border-color: color-mix(in srgb, var(--primary) 72%, var(--border)); background: color-mix(in srgb, var(--primary-soft) 88%, var(--surface-solid)); box-shadow: 0 8px 18px rgba(37,99,235,.18), inset 0 1px 0 rgba(255,255,255,.86); }
  .weather-window li:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--primary) 48%, var(--border)); background: color-mix(in srgb, var(--primary-soft) 44%, var(--surface-solid)); box-shadow: 0 9px 20px rgba(37,99,235,.13); }
  .weather-window li.is-current:hover { transform: translateY(-4px) scale(1.015); border-color: var(--primary); box-shadow: 0 12px 24px rgba(37,99,235,.2); }
}
.weather-window small { display: block; color: var(--muted); font-size: 10px; margin-top: 7px; }
.weather-system-skeleton { color: var(--muted); font-size: 13px; }
@media (max-width: 760px) {
  .weather-system-app { width: auto; margin-inline: 12px; }
  .weather-forecast { grid-template-columns: 1fr; }
  .weather-provider { padding: 10px; }
  .weather-provider header { min-height: 34px; }
  .weather-provider header strong { font-size: 18px; }
  .weather-window-head { min-height: 40px; }
  .weather-scroll-btn { width: 34px; height: 34px; font-size: 23px; }
  .weather-compact-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .weather-compact-metrics > span { min-height: 54px; padding-block: 6px; }
  .weather-compact-metrics > span:nth-child(3) { border-left: 0; border-top: 1px solid color-mix(in srgb, var(--border) 72%, transparent); }
  .weather-compact-metrics > span:nth-child(4) { border-top: 1px solid color-mix(in srgb, var(--border) 72%, transparent); }
  .weather-provider-scroll, .weather-window { height: 188px; }
  .weather-window li { flex-basis: 112px; min-width: 112px; }
}
@media (prefers-reduced-motion: reduce) {
  .weather-system *, .weather-system *::before, .weather-system *::after,
  .weather-pay-advisory *, .weather-pay-advisory *::before, .weather-pay-advisory *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* ---------- 系统设置：三源天气安全配置 ---------- */
.weather-config-card {
  margin-top: 14px; padding: 14px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface-solid); display: grid; gap: 12px;
}
.weather-config-card.is-configured { border-color: rgba(22,163,74,.32); }
.weather-config-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.weather-config-head > div { min-width: 0; display: grid; gap: 4px; }
.weather-config-kicker { color: var(--primary); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.weather-config-head strong { font-size: 15px; }
.weather-config-head p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.weather-config-status {
  flex: none; padding: 5px 8px; border-radius: 6px; background: var(--primary-soft);
  color: var(--primary); font-size: 11px; font-weight: 800;
}
.weather-config-card.is-configured .weather-config-status { background: rgba(22,163,74,.1); color: #15803d; }
.weather-config-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.weather-config-facts > div { min-width: 0; padding: 9px 10px; display: grid; gap: 3px; border-right: 1px solid var(--border); }
.weather-config-facts > div:last-child { border-right: 0; }
.weather-config-facts span { color: var(--muted); font-size: 10px; }
.weather-config-facts b { font-size: 12px; overflow-wrap: anywhere; }
.weather-config-facts small { color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.weather-config-editor { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; }
.weather-config-editor > div { min-width: 0; display: grid; gap: 5px; }
.weather-config-editor small { color: var(--muted); font-size: 10px; line-height: 1.5; }
@media (max-width: 640px) {
  .weather-config-head, .weather-config-editor { grid-template-columns: 1fr; display: grid; }
  .weather-config-facts { grid-template-columns: 1fr; }
  .weather-config-facts > div { border-right: 0; border-bottom: 1px solid var(--border); }
  .weather-config-facts > div:last-child { border-bottom: 0; }
  .weather-config-editor .btn { width: 100%; }
}

/* ---------- 强提醒 置顶 ---------- */
.reminder-bar {
  position: sticky; top: 64px; z-index: 39; margin-bottom: 16px;
  display: none; align-items: center; gap: 12px; padding: 14px 18px;
  border-radius: 18px; color: #fff; font-weight: 700; font-size: 14px; letter-spacing:.2px;
  background: linear-gradient(135deg, #f97316, #fb923c);
  box-shadow: 0 10px 28px rgba(249,115,22,0.42), inset 0 1px 0 rgba(255,255,255,.32);
  border: 1px solid rgba(255,255,255,.28);
  backdrop-filter: blur(4px);
  animation: shake 0.5s ease, breathe 2.6s ease-in-out 0.6s infinite;
}
.reminder-bar.show { display: flex; }
.reminder-bar .dot { width: 10px; height: 10px; border-radius: 50%; background: #fff;
  animation: pulse 1.1s infinite; flex: none; box-shadow: 0 0 0 4px rgba(255,255,255,.18); }
.reminder-bar .txt { flex: 1; line-height: 1.45; }
.reminder-bar .meta { font-size: 11px; opacity: 0.92; font-weight: 500; margin-top: 3px; }
.reminder-bar .x { cursor: pointer; background: rgba(255,255,255,0.22); border: none; color: #fff;
  width: 28px; height: 28px; border-radius: 9px; font-size: 16px; line-height: 1;
  transition: transform .15s, background .15s; }
.reminder-bar .x:hover { background: rgba(255,255,255,0.35); transform: scale(1.08); }
/* 顶部强提醒条是红橙渐变底，直接玫红会看不清；
   故给商家名加白色圆角 chip 背景，文字仍用玫红，既醒目又与其他端统一。 */
.reminder-bar .rem-merchant {
  color: #be123c; font-weight: 900; font-size: 15px;
  background: #fff;
  padding: 2px 8px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
  text-shadow: none;
}
/* fallback 整段高亮仍用亮黄，保证在红橙渐变底上可读 */
.reminder-bar .rem-changed {
  color: #ffe600; font-weight: 900; font-size: 15px;
  text-shadow: 0 1px 4px rgba(0,0,0,.45);
}
.reminder-bar .rem-sep { color: #fff; opacity: .9; }
@keyframes pulse { 0%,100%{transform:scale(1);opacity:1} 50%{transform:scale(1.6);opacity:0.5} }
@keyframes shake { 0%{transform:translateY(-8px);opacity:0} 100%{transform:translateY(0);opacity:1} }
@keyframes breathe { 0%,100%{box-shadow:0 12px 34px rgba(239,68,68,.5),inset 0 1px 0 rgba(255,255,255,.28)} 50%{box-shadow:0 12px 40px rgba(249,115,22,.65),inset 0 1px 0 rgba(255,255,255,.28)} }
/* 不规则且不重复的手绘晃动：
   拆成「形变 / 旋转 / 缩放」三个独立 keyframes，各配互质周期（4.7s / 6.1s / 5.3s）。
   因周期互质，三者组合的最小公倍数约 152 秒才回到同一相位——肉眼感知不到重复，像笔一直在随意抖。
   每个 keyframes 内部也用不等间隔、无规律的关键帧，进一步强化不规则。 */
@keyframes hc-morph {
  0%    { border-radius:40% 60% 58% 42% / 45% 55% 45% 55%; }
  17%   { border-radius:56% 44% 43% 57% / 62% 38% 58% 42%; }
  39%   { border-radius:45% 55% 61% 39% / 40% 60% 44% 56%; }
  58%   { border-radius:62% 38% 46% 54% / 55% 45% 61% 39%; }
  81%   { border-radius:42% 58% 52% 48% / 48% 52% 37% 63%; }
  100%  { border-radius:40% 60% 58% 42% / 45% 55% 45% 55%; }
}
@keyframes hc-rotate {
  0%    { transform: rotate(-7deg); }
  23%   { transform: rotate(5deg); }
  44%   { transform: rotate(-3deg); }
  71%   { transform: rotate(8deg); }
  90%   { transform: rotate(-1deg); }
  100%  { transform: rotate(-7deg); }
}
@keyframes hc-scale {
  0%    { scale: 0.98; }
  29%   { scale: 1.03; }
  53%   { scale: 0.97; }
  77%   { scale: 1.04; }
  100%  { scale: 0.98; }
}
/* 边框颜色缓慢渐变：31s 超长周期沿完整色相环流动（红→橙→黄→绿→青→蓝→紫→红），
   不限制在某个色系，色彩缓慢平滑过渡不刺眼 */
@keyframes hc-hue {
  0%    { border-color: hsl(8,   88%, 56%); }
  17%   { border-color: hsl(36,  92%, 52%); }
  33%   { border-color: hsl(55,  88%, 48%); }
  50%   { border-color: hsl(204, 84%, 50%); }
  67%   { border-color: hsl(238, 68%, 60%); }
  83%   { border-color: hsl(292, 64%, 56%); }
  100%  { border-color: hsl(8,   88%, 56%); }
}

/* ---------- 锁定发布徽标 ---------- */
.lock-badge { font-size:11px; padding:3px 10px; border-radius:999px; font-weight:700; margin-left:6px; border:1px solid transparent; white-space:nowrap; }
.lock-badge.locked { background:#dbeafe; color:#1d4ed8; border-color:#93c5fd; }
.lock-badge.unpublished { background:#f1f5f9; color:#64748b; border-color:#cbd5e1; }
/* 阶段㉜：已发布但未锁定 = 管理员正在修改、尚未再次锁定发布（骑手/打包仍看上次冻结快照）。
   琥珀色直观提示「有未发布修改」，与蓝(锁定)/绿(完成)/灰(未发布) 四态和谐统一。 */
.lock-badge.pending { background:#fef3c7; color:#b45309; border-color:#fcd34d; }

/* 货物变动强提醒：商家名玫红色（加大加粗）、商品名天蓝色 chip、变动数量玫红色 chip；
   玫红 = 商家定位/警示，天蓝 = 商品信息层，整体和谐统一。 */
.rem-merchant {
  color: #be123c;            /* 玫红（头部【商家名】用） */
  font-weight: 900;
  font-size: 18px;
  letter-spacing: .3px;
  padding: 0 1px;
}
.rem-changed {
  /* fallback：无法解析的整段货物变动项，沿用天蓝色保证可读性 */
  color: #0284c7;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: .3px;
  padding: 0 1px;
}
/* 顶部强提醒条（.reminder-bar）已单独覆盖为亮黄；以下是普通浅色背景里的商家名，统一玫红 */
.tbr-text .rem-merchant {
  color: #be123c;
  font-size: 16px;
}
.ppb-text .rem-merchant,
.ppb-detail-text .rem-merchant {
  color: #be123c;
  font-size: 15px;
}
.rem-goods-name {
  /* 天蓝色 sky 主色 + 浅蓝 chip 背景 + 玫红细描边 ——「信息层」色彩，与"警示"层（玫红）区分 */
  color: #0369a1;
  font-weight: 900;
  font-size: 19px;             /* 加大：17 → 19，比商家名 / 单位都大，更醒目 */
  letter-spacing: .4px;
  padding: 2px 10px;           /* 内边距微调，让 chip 感更强 */
  margin: 0 2px;
  background: linear-gradient(180deg, #e0f2fe, #bae6fd);
  border: 1.5px solid #7dd3fc;
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(125, 211, 252, .35), inset 0 1px 0 #fff;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .55);
}
.rem-qty-before {
  /* 变动前的数量：玫红删除线，与 after 同色系但弱化，表示旧值已失效 */
  color: #be123c;
  font-weight: 800;
  font-size: 16px;
  text-decoration: line-through;
  text-decoration-color: rgba(190, 18, 60, .45);
  padding: 0 2px;
  opacity: .75;
}
.rem-qty-after {
  /* 变动后的数量：玫红 chip，最醒目 —— 加大字号 + 加重粗细 */
  color: #fff;
  font-weight: 900;
  font-size: 21px;             /* 加大：18 → 21，比商品名字更大，数字永远是最关键的 */
  letter-spacing: .4px;
  padding: 2px 11px;
  margin: 0 2px;
  background: linear-gradient(135deg, #e11d48, #be123c);
  border: 1.5px solid #be123c;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(225, 29, 72, .32), inset 0 1px 0 rgba(255, 255, 255, .22);
  text-shadow: 0 1px 1px rgba(0, 0, 0, .12);
}
.rem-unit {
  color: #be123c;
  font-weight: 800;
  font-size: 15px;
  padding: 0 1px;
}
.rem-arrow {
  color: #e11d48;
  font-weight: 900;
  font-size: 16px;
  padding: 0 3px;
  display: inline-block;
  transform: translateY(-1px);
}
.rem-goods-rest {
  color: #be185d;
  font-weight: 700;
  font-size: 13px;
}
.rem-sep { font-weight: 500; opacity: .85; }

/* ---------- 卡片 / 网格 ---------- */
.section { margin-bottom: 26px; }
.section h2 { font-size: 15px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.section h2 .bar { width: 4px; height: 16px; border-radius: 4px; background: linear-gradient(var(--primary), var(--primary-2)); }

/* ── 管理端：骑手趟次调度 + 强提醒信息 同一栏 ── */
.dispatch-reminder-section { margin-bottom: 26px; }
.dispatch-unified-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
/* 调度卡片顶部：仅标题/操作 */
.du-header {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.du-title-section {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}
.du-title-section h2 {
  margin: 0;
  padding: 0;
  border: none;
  font-size: 15px;
  white-space: nowrap;
}

/* ── 管理端：骑手趟次调度（ efficiency 已上提为横长条） ── */
.dashboard-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: start;
  margin-bottom: 26px;
}
.dashboard-row .section { margin-bottom: 0; }
.dashboard-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.dashboard-col-left .dispatch-unified-card {
  flex: 1;
  min-height: 0;
}

/* ================= 双端运维：统一板块头与布局 ================= */
.ops-panel .section { margin-bottom: 30px; }
.ops-panel .section:last-child { margin-bottom: 0; }
.ops-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 18px;
  margin-bottom: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: var(--shadow);
}
.ops-section-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}
.ops-section-title h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.2px;
  color: var(--text);
}
.ops-section-subtitle {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
  min-width: 0;
}
.ops-section-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}
@media (max-width: 640px) {
  .ops-section-header { flex-direction: column; align-items: stretch; gap: 12px; padding: 12px 14px; }
  .ops-section-title { flex-direction: column; align-items: flex-start; gap: 4px; }
  .ops-section-tools { margin-left: 0; width: 100%; }
  .ops-section-tools .btn { width: 100%; }
}

/* 开疆拓商：section 去玻璃背景（头部已是玻璃卡片，避免卡片套卡片），内容铺满 */
.ops-panel[data-tab-content="expansion"] section {
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-radius: 0;
  padding: 0;
  margin: 0 0 30px;
}
/* 区域工作台 / 身份排查 / 扫描目标：整块为一张大卡（头部+内容合一） */
.ops-panel[data-tab-content="expansion"] .expansion-workspace,
.ops-panel[data-tab-content="expansion"] .merchant-identity-review-section,
.ops-panel[data-tab-content="expansion"] .merchant-expansion-controls {
  padding: 18px;
  margin: 0 0 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: var(--shadow);
}
.ops-panel[data-tab-content="expansion"] .expansion-workspace:last-child,
.ops-panel[data-tab-content="expansion"] .merchant-identity-review-section:last-child,
.ops-panel[data-tab-content="expansion"] .merchant-expansion-controls:last-child { margin-bottom: 0; }
/* 大卡内部：header 去自身卡片壳，改为标题行 */
.ops-panel[data-tab-content="expansion"] .expansion-workspace > .ops-section-header,
.ops-panel[data-tab-content="expansion"] .merchant-identity-review-section > .ops-section-header,
.ops-panel[data-tab-content="expansion"] .merchant-expansion-controls > .ops-section-header {
  padding: 0;
  margin-bottom: 16px;
  border: none;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  border-radius: 0;
}
.ops-panel[data-tab-content="expansion"] section:last-child { margin-bottom: 0; }
.ops-panel[data-tab-content="expansion"] .ops-section-header { margin-bottom: 14px; }
/* 扫描目标：header 在 grid 容器中占满整行 */
.ops-panel[data-tab-content="expansion"] .merchant-expansion-controls .ops-section-header { grid-column: 1 / -1; }
.ops-panel[data-tab-content="expansion"] .merchant-expansion-controls .expansion-status-slot { grid-column: 1 / -1; }
/* 板块主体内容区恢复玻璃卡片 */
.ops-panel[data-tab-content="expansion"] .merchant-expansion-actions,
.ops-panel[data-tab-content="expansion"] .baidu-temporary-import,
.ops-panel[data-tab-content="expansion"] .baidu-temporary-status,
.ops-panel[data-tab-content="expansion"] .expansion-review-panel,
.ops-panel[data-tab-content="expansion"] #assignedGroupsContent,
.ops-panel[data-tab-content="expansion"] #prospectCorrectionsContent,
.ops-panel[data-tab-content="expansion"] #closedProspectsContent,
.ops-panel[data-tab-content="expansion"] #salesOverviewContent {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
/* 卡片合并：区域工作台内部区域、身份排查摘要、扫描目标运行状态不再各自成卡 */
.ops-panel[data-tab-content="expansion"] .expansion-workspace-global { margin: 4px 0 16px; }
.ops-panel[data-tab-content="expansion"] .merchant-identity-review-summary { margin-top: 4px; }
.ops-panel[data-tab-content="expansion"] .expansion-status { margin-top: 14px; background: var(--surface-solid); border: 1px solid var(--border); }
/* 效率评估：左侧正方形总览 + 右侧双排行榜 */
.efficiency-top {
  display: flex;
  align-items: stretch;
  gap: 18px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: var(--shadow);
}
.eff-square-card {
  flex: none;
  width: clamp(170px, 26vw, 260px);
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(251,146,60,.12) 0%, rgba(245,158,11,.08) 100%);
  cursor: pointer;
  transition: transform .2s cubic-bezier(.16,1,.3,1), box-shadow .2s;
  user-select: none;
}
.eff-square-card:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 18px 48px rgba(15,23,42,.14);
}
.eff-square-content { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; gap: 8px; text-align: center; }
.eff-square-badge {
  align-self: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(251,146,60,.3);
}
.eff-square-main {
  font-size: clamp(42px, 6vw, 68px);
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.eff-square-sub { font-size: 13px; color: var(--text-soft); font-weight: 600; }
.eff-square-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 10px;
  font-size: 11px;
  color: var(--text-faint);
}
.eff-square-meta span { background: var(--bg); padding: 3px 8px; border-radius: 999px; border: 1px solid var(--border); }
.eff-square-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 8px;
}
.eff-rankings {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 14px;
  min-width: 0;
}
.eff-rank-card {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--bg) 0%, var(--surface) 100%);
  box-shadow: var(--shadow);
  transition: transform .2s cubic-bezier(.16,1,.3,1), box-shadow .2s;
}
.eff-rank-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.eff-rank-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.eff-rank-title small {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-faint);
}
.eff-rank-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  flex: 1;
}
.eff-rank-empty { font-size: 12px; color: var(--text-faint); text-align: center; padding: 14px 0; }
.eff-rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
}
.eff-rank-idx {
  flex: none;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 800;
}
.eff-rank-row:nth-child(1) .eff-rank-idx { background: #fee2e2; color: #dc2626; }
.eff-rank-row:nth-child(2) .eff-rank-idx { background: #ffedd5; color: #ea580c; }
.eff-rank-row:nth-child(3) .eff-rank-idx { background: #fef3c7; color: #d97706; }
.eff-rank-name { flex: none; width: 72px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eff-rank-bar-wrap {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: var(--surface);
  overflow: hidden;
}
.eff-rank-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  transition: width .4s cubic-bezier(.16,1,.3,1);
}
.eff-rank-bar.low { background: linear-gradient(90deg, #f87171, #fb923c); }
.eff-rank-value { flex: none; width: 72px; text-align: right; font-weight: 800; color: var(--text-soft); }

/* 效率评估详情弹窗 */
.eff-detail-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 4px;
}
.eff-detail-person {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  overflow: hidden;
}
.eff-detail-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: background .15s;
}
.eff-detail-summary:hover { background: var(--surface); }
.eff-detail-icon { font-size: 18px; }
.eff-detail-info { flex: 1; min-width: 0; }
.eff-detail-name { font-size: 14px; font-weight: 800; color: var(--text); }
.eff-detail-mini { font-size: 11px; color: var(--text-faint); margin-top: 2px; }
.eff-detail-arrow { font-size: 12px; color: var(--text-faint); transition: transform .2s; }
.eff-detail-body { padding: 0 14px 14px; }
.eff-person-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.eff-person-totals > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.eff-person-totals > div span { font-size: 11px; color: var(--text-faint); }
.eff-person-totals > div b { font-size: 14px; color: var(--text); }
.eff-person-header-stat {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-soft);
  font-weight: 600;
}
.eff-person-header-stat b { color: var(--primary); }
.eff-trip-manifest { margin-left: 8px; display: inline-flex; gap: 5px; flex-wrap: wrap; }
.eff-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}
@media (max-width: 980px) {
  .efficiency-top { flex-direction: column; align-items: center; }
  .eff-square-card { width: min(100%, 280px); }
  .eff-rankings { width: 100%; }
}
@media (max-width: 760px) {
  .eff-rankings { flex-direction: column; }
  .eff-rank-card { flex: 1 1 auto; width: 100%; }
}
@media (max-width: 560px) {
  .efficiency-top { padding: 12px; gap: 12px; }
  .eff-rank-card { padding: 12px 14px; }
  .eff-rank-title { font-size: 13px; margin-bottom: 10px; }
  .eff-rank-name { width: 58px; }
  .eff-rank-value { width: 60px; font-size: 11px; }
}

/* ── 管理端强提醒（嵌入 topbar 中间空白区，横向滑动） ── */
.tbr-widget {
  width: 100%;
  height: 92px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.82));
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow:
    0 4px 12px rgba(15, 23, 42, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.tbr-header {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 18px;
  border-right: 1px solid rgba(15, 23, 42, 0.08);
}
.tbr-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-soft);
  letter-spacing: .3px;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}
.tbr-title::before {
  content: "🔔";
  margin-right: 6px;
  font-size: 17px;
}
.tbr-count {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ef4444, var(--primary));
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.28);
  letter-spacing: .3px;
}

/* 滑动容器：滚动列表 + 箭头 + 边缘遮罩 + 分页圆点
   必须用 row 方向，让左右箭头真正位于两侧；column 方向会让箭头垂直堆叠，
   在 78~92px 高度内把内容区挤到 0（管理端强提醒文本因此不可见）。 */
.tbr-scroll-wrap {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: center;
  position: relative;
}
.tbr-scroll {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 12px;
}
.tbr-scroll::-webkit-scrollbar { display: none; }
.tbr-item {
  flex: 0 0 auto;
  width: 360px;
  max-width: 58vw;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.85);
  border: 1px solid rgba(15, 23, 42, 0.07);
  scroll-snap-align: start;
  transition: border-color .2s, background .2s, transform .2s, box-shadow .2s;
}
.tbr-item:hover {
  border-color: rgba(249, 115, 22, 0.45);
  background: rgba(255, 247, 237, 0.92);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.12);
}
.tbr-dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444, #f97316);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, .10);
  animation: tbr-dot-pulse 2.2s ease-in-out infinite;
}
@keyframes tbr-dot-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(239, 68, 68, .10); }
  50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, .18); }
}
.tbr-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.tbr-text {
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tbr-meta {
  font-size: 12px;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}
.tbr-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
  color: var(--text-faint);
  font-size: 15px;
  font-weight: 500;
}
.tbr-empty-icon {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 2px 6px rgba(34, 197, 94, 0.28);
}

/* 左右滑动箭头 */
.tbr-arrow {
  flex: none;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  z-index: 3;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}
.tbr-arrow:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(249, 115, 22, .28);
  transform: scale(1.08);
}
.tbr-arrow:disabled {
  opacity: 0;
  pointer-events: none;
  cursor: default;
}
.tbr-arrow-left { margin-right: 10px; }
.tbr-arrow-right { margin-left: 10px; }

/* 边缘渐变遮罩：提示后方还有内容，颜色随 surface-solid 自适应 */
.tbr-fade-left,
.tbr-fade-right {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 24px;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity .2s;
}
.tbr-fade-left { left: 40px; box-shadow: inset 18px 0 16px -8px rgba(255, 255, 255, 0.95); }
.tbr-fade-right { right: 40px; box-shadow: inset -18px 0 16px -8px rgba(255, 255, 255, 0.95); }

/* 底部分页圆点（绝对定位，避免占用横向空间） */
.tbr-scroll-dots {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  height: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  z-index: 4;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
}
.tbr-dot-nav {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.18);
  cursor: pointer;
  transition: all .2s;
}
.tbr-dot-nav:hover { background: rgba(249, 115, 22, 0.5); }
.tbr-dot-nav.active {
  width: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; }
  .topbar-center { order: 3; flex: 0 0 100%; margin: 10px 0 0; }
  .tbr-widget { height: 86px; padding: 10px 12px; gap: 10px; }
  .tbr-header { padding-right: 10px; gap: 8px; }
  .tbr-title { font-size: 14px; }
  .tbr-title::before { font-size: 15px; margin-right: 4px; }
  .tbr-count { min-width: 22px; height: 22px; font-size: 11px; padding: 0 6px; }
  .tbr-arrow { width: 24px; height: 24px; font-size: 16px; }
  .tbr-arrow-left { margin-right: 6px; }
  .tbr-arrow-right { margin-left: 6px; }
  .tbr-fade-left { left: 30px; }
  .tbr-fade-right { right: 30px; }
  .tbr-item { width: 300px; max-width: 78vw; padding: 0 12px; gap: 10px; }
  .tbr-dot { width: 9px; height: 9px; }
  .tbr-text { font-size: 14px; }
  .tbr-meta { font-size: 11px; }
  .tbr-scroll-dots { gap: 4px; }
  .tbr-dot-nav { width: 4px; height: 4px; }
  .tbr-dot-nav.active { width: 12px; }
}

/* ── 打包端 / 骑手端：管理员修改商品信息置顶横条（共用） ── */
.product-bar {
  position: sticky;
  top: 64px;
  z-index: 39;
  margin: -18px -20px 16px;
  padding: 12px 20px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.08), rgba(251, 113, 133, 0.06));
  border-bottom: 1px solid rgba(249, 115, 22, 0.15);
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.1);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
}
.ppb-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.ppb-icon { font-size: 16px; }
.ppb-title { font-size: 14px; font-weight: 900; color: var(--primary); letter-spacing: .3px; }
.ppb-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}
.ppb-unread-count {
  font-size: 12px;
  color: var(--primary);
  font-weight: 700;
  background: var(--primary-soft);
  padding: 2px 8px;
  border-radius: 999px;
}
.ppb-list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
  /* 在横向滑动容器内作为可伸缩中列，允许内部固定宽卡片溢出滚动 */
  flex: 1 1 auto;
  min-width: 0;
}
.ppb-list::-webkit-scrollbar { display: none; }

/* ── 横向滑动增强：箭头 / 边缘渐变 / 分页圆点 ── */
.ppb-scroll-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.ppb-arrow {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 1px solid rgba(249, 115, 22, 0.25);
  border-radius: 999px;
  background: var(--surface);
  color: var(--primary);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.12);
  transition: transform .15s ease, box-shadow .15s ease, opacity .2s ease, background .15s ease, border-color .15s ease;
  z-index: 3;
}
.ppb-arrow:hover:not(:disabled) {
  transform: scale(1.08);
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.28);
}
.ppb-arrow:active:not(:disabled) { transform: scale(0.94); }
.ppb-arrow:disabled {
  opacity: 0;
  pointer-events: none;
}
.ppb-arrow-left { margin-right: 8px; }
.ppb-arrow-right { margin-left: 8px; }

/* 边缘渐变遮罩：列表可继续滑动时显现，提示还有更多内容 */
.ppb-fade-left,
.ppb-fade-right {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 34px;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity .25s ease;
}
.ppb-fade-left {
  left: 38px;
  background: linear-gradient(to right, rgba(255, 247, 237, 0.95), rgba(255, 247, 237, 0));
}
.ppb-fade-right {
  right: 38px;
  background: linear-gradient(to left, rgba(255, 241, 230, 0.95), rgba(255, 241, 230, 0));
}

/* 底部分页圆点 */
.ppb-scroll-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}
.ppb-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.25);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: width .25s ease, background .25s ease;
}
.ppb-dot:hover { background: rgba(249, 115, 22, 0.45); }
.ppb-dot.active {
  width: 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}
@media (max-width: 900px) {
  .ppb-arrow { width: 28px; height: 28px; font-size: 16px; }
  .ppb-fade-left { left: 36px; }
  .ppb-fade-right { right: 36px; }
}
.ppb-item {
  flex: 0 0 auto;
  width: 320px;
  max-width: 72vw;
  min-height: 64px;
  max-height: 78px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid rgba(249, 115, 22, 0.18);
  border-radius: 12px;
  scroll-snap-align: start;
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.08);
  cursor: pointer;
  transition: max-height .25s ease, box-shadow .15s, border-color .15s, background .15s;
  overflow: hidden;
  position: relative;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.ppb-item:hover {
  border-color: rgba(249, 115, 22, 0.45);
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.12);
}
.ppb-item.ppb-expanded {
  /* 商品变动较多时，卡片高度不再无限撑开；明细在卡片内部纵向滚动。 */
  max-height: min(420px, 55dvh);
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.16);
  border-color: rgba(249, 115, 22, 0.55);
  background: rgba(255, 247, 237, 0.85);
}
.ppb-preview .ppb-text {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ppb-preview .ppb-meta {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 4px;
}
.ppb-detail {
  display: none;
}
.ppb-item.ppb-expanded .ppb-preview { display: none; }
.ppb-item.ppb-expanded .ppb-detail {
  display: flex;
  flex-direction: column;
  max-height: calc(min(420px, 55dvh) - 20px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(249, 115, 22, .55) rgba(249, 115, 22, .08);
  padding-right: 8px;
  touch-action: pan-y;
}
.ppb-item.ppb-expanded .ppb-detail::-webkit-scrollbar { width: 6px; }
.ppb-item.ppb-expanded .ppb-detail::-webkit-scrollbar-track {
  background: rgba(249, 115, 22, .08);
  border-radius: 999px;
}
.ppb-item.ppb-expanded .ppb-detail::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
  border-radius: 999px;
}
.ppb-detail-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  font-weight: 600;
}
.ppb-detail-meta {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 8px;
}
.ppb-unread-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(249, 115, 22, 0.25);
}
/* 未读项：限次晃动 3 次后自动停止（~4.5s）。
   之后保留橙边/未读徽标/浅橙底，但卡片静止，方便骑手随时点击。
   避免 transform 动画与 .ppb-expanded 的 max-height 过渡抢同一元素导致过渡被打断。 */
@keyframes ppb-shake {
  0%, 60%, 100% { transform: translateX(0); }
  10%, 30%, 50% { transform: translateX(-3px); }
  20%, 40% { transform: translateX(3px); }
}
.ppb-item.ppb-unread {
  /* 1.5s × 3 次 = 4.5s 后停止；transition 在动画结束后让 transform 平滑归位 */
  animation: ppb-shake 1.5s ease-in-out 3;
  border-color: var(--primary);
  background: rgba(255, 247, 237, 0.92);
  transition: max-height .25s ease, box-shadow .15s, border-color .15s, background .15s, transform .25s ease;
}
@media (max-width: 900px) {
  .product-bar { top: 116px; }
  .ppb-item { width: 280px; }
  .ppb-item.ppb-expanded { max-height: min(360px, 52dvh); }
  .ppb-item.ppb-expanded .ppb-detail { max-height: calc(min(360px, 52dvh) - 20px); }
}

@media (max-height: 620px) {
  .ppb-item.ppb-expanded { max-height: 46dvh; }
  .ppb-item.ppb-expanded .ppb-detail { max-height: calc(46dvh - 20px); }
}

.card { padding: 18px; }
.card .k { font-size: 12px; color: var(--text-faint); }
.card .v { font-size: 26px; font-weight: 800; margin-top: 4px; }
.card .v small { font-size: 13px; color: var(--text-soft); font-weight: 500; }

/* ── 配送日期卡片（视觉统一：玻璃/橙玫主色）── */
.date-card {
  display: flex; flex-direction: column; justify-content: space-evenly; align-items: stretch;
  padding: 20px 22px; min-height: 200px; box-sizing: border-box; text-align: center; gap: 0;
}
.date-main {
  width: 100%; min-width: 0; font-weight: 900; line-height: 1.1; letter-spacing: 0; color: var(--text);
  white-space: nowrap; display: flex; justify-content: space-between; align-items: center; gap: 6px;
}
.date-main .dm-grp { flex: 1 1 0; min-width: 0; white-space: nowrap; display: inline-flex; align-items: center; justify-content: space-between; gap: 3px; }
.date-main .dm-day-grp { align-items: center; gap: 5px; }
.date-main .dm-year { flex: 1 1 auto; text-align: center; font-size: 32px; color: #dc2626; }
.date-main .dm-month { flex: 1 1 auto; text-align: center; font-size: 32px; color: #dc2626; }
.date-main .dm-unit { flex: 0 0 auto; font-size: 22px; color: var(--text-soft); font-weight: 700; }
.date-main .dm-day-wrap { flex: 1 1 auto; text-align: center; position: relative; display: inline-flex; align-items: center; justify-content: center; margin: 0 2px; vertical-align: baseline; }
.date-main .dm-day { font-size: 36px; color: #dc2626; position: relative; z-index: 1; line-height: 1; padding: 9px 16px; }
.date-main .dm-day-wrap::after {
  content: ''; position: absolute; inset: 0px 2px; z-index: 0;
  border: 5px solid #f59e0b; border-radius: 48% 52% 50% 50% / 52% 48% 52% 48%;
  opacity: .9; rotate: -5deg; pointer-events: none;
  box-shadow: none;
  animation: hc-morph 4.7s ease-in-out infinite, hc-rotate 6.1s ease-in-out infinite, hc-scale 5.3s ease-in-out infinite, hc-hue 31s ease-in-out infinite;
  transition: border-color .2s ease;
}
.date-main .dm-day-wrap:hover::after { rotate: 5deg; scale: 1.04; border-color: #e8580e; }
@media (max-width: 560px) {
  .date-main .dm-year, .date-main .dm-month { font-size: 24px; }
  .date-main .dm-unit { font-size: 17px; }
  .date-main .dm-day { font-size: 27px; padding: 5px 9px; }
}
.date-sub { display: flex; flex-direction: column; justify-content: center; align-items: stretch; gap: 10px; }
.date-row {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px;
  width: 100%;
}
.date-row > span {
  flex: 0 1 auto; min-width: 110px; max-width: 100%; font-size: 14px; font-weight: 700;
  padding: 7px 12px; border-radius: 10px; text-align: center; transition: transform .2s ease, box-shadow .2s ease;
}
/* 同一行恰好两个标签时水平均分，实现「均匀按两行/三行排」 */
.date-row > span:first-child:nth-last-child(2),
.date-row > span:first-child:nth-last-child(2) ~ span {
  flex: 1 1 0;
}
.date-row > span:hover { transform: translateY(-1px); box-shadow: 0 4px 10px -4px rgba(15, 23, 42, .08); }
.date-lunar { color: var(--primary-2); background: linear-gradient(135deg, rgba(251, 113, 133, .12), rgba(225, 29, 72, .08)); border: 1px solid rgba(225, 29, 72, .1); }
.date-week { color: var(--primary); background: var(--primary-soft); border: 1px solid rgba(249, 115, 22, .12); }
.date-holiday { color: var(--danger); background: var(--danger-soft); border: 1px solid rgba(239, 68, 68, .12); }

/* ── 日子倒计时卡片（与营业日期卡统一玻璃/橙玫风格，容器为 flex 等宽，无失效死属性）── */
.countdown-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 24px 22px;
  min-height: 200px;
  box-sizing: border-box;
  font-family: 'Microsoft YaHei', '微软雅黑', sans-serif !important;
}
/* 倒计时卡内所有文本元素统一微软雅黑（含图标/天数/今天/标签），防止系统缺字回退衬线 */
.countdown-card, .countdown-card * { font-family: 'Microsoft YaHei', '微软雅黑', sans-serif !important; }

/* 每行：标签靠左、天数靠右 */
.cd-list { display: flex; flex-direction: column; gap: 8px; flex: 1; justify-content: center; }
.cd-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.6);
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px -6px rgba(249,115,22,0.18);
  transition: transform .18s cubic-bezier(.16,1,.3,1), box-shadow .18s ease, border-color .18s ease;
}
.cd-row:hover {
  transform: translateY(-1px);
  border-color: rgba(249,115,22,0.4);
  box-shadow: 0 8px 18px -10px rgba(249,115,22,0.34);
}
.cd-row-clickable { cursor: pointer; }
.cd-row-left { display: flex; align-items: center; gap: 10px; }
.cd-row-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 9px;
  font-size: 15px;
  background: var(--primary-soft);
}
.cd-row[data-kind="chuyi"] .cd-row-ic { background: linear-gradient(135deg, rgba(124,58,237,.16), rgba(167,139,250,.2)); }
.cd-row[data-kind="shiwu"] .cd-row-ic { background: linear-gradient(135deg, rgba(217,119,6,.16), rgba(251,191,36,.2)); }
.cd-row[data-kind="holiday"] .cd-row-ic { background: linear-gradient(135deg, rgba(225,29,72,.14), rgba(248,113,113,.2)); }
.cd-row-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: .2px;
  font-family: 'Microsoft YaHei', '微软雅黑', sans-serif !important;
}
.cd-row-right { display: flex; align-items: center; gap: 8px; }
.cd-row-days {
  font-size: 14px;
  font-weight: 700;
  color: #111;
  font-variant-numeric: tabular-nums;
  letter-spacing: .2px;
  font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
}
.cd-row-days b { font-size: 18px; font-weight: 900; color: #e11d48; letter-spacing: 0; margin-right: 4px; }
.cd-row-today {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  letter-spacing: .8px;
  padding: 3px 10px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 3px 9px -3px rgba(249,115,22,0.45);
}
/* 临近提醒高亮（农历初一/十五 ≤3 天） */
.cd-row-remind {
  border-color: rgba(251,113,133,0.5);
  background: linear-gradient(135deg, rgba(255,241,245,0.85), rgba(255,228,236,0.5));
  box-shadow: 0 4px 14px -8px rgba(251,113,133,0.5);
}

/* ── 当日商品汇总：与日期/倒计时同层级，按当日趟次中的商家去重聚合 ── */
.daily-goods-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 18px 16px;
  min-height: 200px;
  box-sizing: border-box;
  overflow: hidden;
}
.daily-goods-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.daily-goods-title { font-size: 17px; font-weight: 900; color: var(--text); letter-spacing: .2px; }
.daily-goods-sub { margin-top: 3px; font-size: 11px; font-weight: 700; color: var(--text-faint); }
.daily-goods-total {
  display: inline-grid; place-items: center; flex: none;
  min-width: 38px; height: 38px; padding: 0 9px; border-radius: 13px;
  color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 8px 18px -10px rgba(225, 29, 72, .75);
  font-size: 16px; font-weight: 900; font-variant-numeric: tabular-nums;
}
.daily-goods-list {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px;
  min-height: 0; max-height: 132px; overflow-y: auto; padding-right: 3px;
  scrollbar-width: thin; scrollbar-color: rgba(249, 115, 22, .38) transparent;
}
.daily-goods-list::-webkit-scrollbar { width: 5px; }
.daily-goods-list::-webkit-scrollbar-thumb { background: rgba(249, 115, 22, .38); border-radius: 999px; }
.daily-goods-item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 6px;
  min-width: 0; padding: 7px 10px; border: 1px solid var(--border); border-radius: 12px;
  background: rgba(255, 255, 255, .58);
  transition: transform .18s cubic-bezier(.16,1,.3,1), border-color .18s ease, background .18s ease;
}
.daily-goods-item:hover { transform: translateY(-1px); border-color: rgba(249, 115, 22, .38); background: var(--primary-soft); }
.daily-goods-item.reserved { border-color: rgba(225, 29, 72, .2); background: rgba(251, 113, 133, .08); }
.daily-goods-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-soft); font-size: 12px; font-weight: 800; }
.daily-goods-value { display: contents; color: var(--primary-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.daily-goods-value b { grid-column: 2; justify-self: center; align-self: baseline; font-size: 22px; font-weight: 900; line-height: 1; color: #e11d48; }
.daily-goods-value span { grid-column: 3; justify-self: end; align-self: baseline; font-size: 11px; font-weight: 800; color: var(--text-faint); }
.daily-goods-empty { grid-column: 1 / -1; display: grid; place-items: center; min-height: 94px; padding: 12px; border: 1px dashed var(--border); border-radius: 14px; color: var(--text-faint); font-size: 12px; text-align: center; }
@media (max-width: 1120px) {
  .daily-goods-list { grid-template-columns: 1fr; }
}
@media (max-width: 880px) {
  .daily-goods-list { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 150px; }
}
@media (max-width: 560px) {
  .daily-goods-card { min-height: 0; }
  .daily-goods-list { grid-template-columns: 1fr; max-height: 220px; }
}
@media (prefers-reduced-motion: reduce) {
  .daily-goods-item { transition: none; }
  .daily-goods-item:hover { transform: none; }
}

/* 倒计时确认弹窗（与全站弹窗/按钮体系统一） */
.cd-modal { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 6px 4px 4px; text-align: center; }
.cd-modal-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 16px; font-size: 24px;
  background: var(--primary-soft);
  box-shadow: 0 8px 20px -8px rgba(249,115,22,0.4);
}
.cd-modal-icon[data-kind="chuyi"] { background: linear-gradient(135deg, rgba(124,58,237,.18), rgba(167,139,250,.24)); }
.cd-modal-icon[data-kind="shiwu"] { background: linear-gradient(135deg, rgba(217,119,6,.18), rgba(251,191,36,.24)); }
.cd-modal-head { font-size: 15px; font-weight: 800; color: var(--text); margin: 0; letter-spacing: .3px; line-height: 1.45; }
.cd-modal-sub { font-size: 12px; color: var(--text-soft); margin: 0; }
.cd-modal-actions { display: flex; gap: 10px; margin-top: 4px; }

/* 状态徽章：文字强制单行，避免窄容器下中文被竖排折断 */
.badge { font-size: 11px; padding: 3px 9px; border-radius: 999px; font-weight: 600; white-space: nowrap; }
.badge.wait { background: var(--primary-soft); color: var(--primary); }
.badge.doing { background: rgba(99,102,241,0.15); color: var(--accent); }
.badge.done { background: rgba(16,185,129,0.15); color: var(--ok); }
.badge.pack { background: rgba(16,185,129,0.15); color: var(--ok); }
.badge.unpack { background: var(--danger-soft); color: var(--danger); }

/* ── 配送人员选择器：默认单行，悬停整个横条板块 0.6 秒后打开全屏管理面板 ── */
.rider-picker { position: relative; display: grid; gap: 0; margin-bottom: 16px; background: var(--surface-solid); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06); }
.rp-compact-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: stretch; gap: 8px; min-width: 0; overflow: hidden; }
.rp-compact-row .rider-chip { width: 100%; min-width: 0; padding-inline: 8px; }
.rp-compact-row .rp-rider-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
body.rider-picker-panel-open { overflow: hidden; }
.rp-panel-backdrop { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 24px; background: rgba(15, 23, 42, .28); backdrop-filter: blur(8px); }

/* ---------- 六店组整组分配弹窗 ---------- */
.sales-group-assign-mask { position: fixed; inset: 0; z-index: 1250; display: grid; place-items: center; padding: 24px; background: rgba(15, 23, 42, .32); backdrop-filter: blur(8px); animation: sga-fade .18s ease; }
@keyframes sga-fade { from { opacity: 0; } to { opacity: 1; } }
.sales-group-assign-dialog { width: min(520px, 100%); max-height: 86vh; overflow: auto; padding: 22px; border-radius: 20px; background: var(--panel, #fff); box-shadow: 0 24px 60px rgba(15, 23, 42, .25); animation: sga-pop .2s cubic-bezier(.16,1,.3,1); }
@keyframes sga-pop { from { transform: translateY(10px) scale(.97); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
.sales-group-assign-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.sales-group-assign-head strong { font-size: 18px; }
.sales-group-assign-close { border: 0; background: transparent; font-size: 26px; line-height: 1; cursor: pointer; color: var(--text-soft); padding: 0 4px; }
.sales-group-assign-close:hover { color: var(--text); }
.sales-group-assign-sub { margin: 0 0 12px; color: var(--text-soft); font-size: 13px; }
.sales-group-assign-sub b { color: var(--text); }
.sales-group-assign-list { margin: 0 0 14px; padding: 12px 12px 12px 30px; background: var(--bg-soft, #f8fafc); border-radius: 12px; font-size: 13px; display: grid; gap: 5px; max-height: 180px; overflow: auto; }
.sales-group-assign-field { display: grid; gap: 6px; margin-bottom: 12px; font-size: 13px; font-weight: 600; }
.sales-group-assign-field select, .sales-group-assign-field input { padding: 10px 12px; border: 1px solid var(--line, #e2e8f0); border-radius: 10px; font-size: 14px; font-family: inherit; background: #fff; }
.sales-group-assign-field select:focus, .sales-group-assign-field input:focus { outline: 2px solid rgba(249, 115, 22, .35); border-color: var(--primary); }
.sales-group-assign-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.sales-assign-hint { padding: 12px 16px; border-radius: 12px; font-size: 13px; color: var(--text-soft); margin-bottom: 14px; border-left: 3px solid var(--primary); }
.sales-assign-hint strong { color: var(--text); }
@media (max-width: 560px) { .sales-group-assign-dialog { padding: 16px; } .sales-group-assign-actions { flex-direction: column-reverse; } .sales-group-assign-actions .btn { width: 100%; } }
.rp-panel { width: min(1180px, 100%); height: min(820px, calc(100dvh - 48px)); display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 16px; padding: 24px; border: 1px solid rgba(148, 163, 184, .42); border-radius: 28px; background: var(--surface-solid); box-shadow: 0 30px 80px rgba(15, 23, 42, .2); }
.rp-panel-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.rp-panel-header h2 { margin: 0; font-size: clamp(24px, 3vw, 36px); color: var(--text); }
.rp-panel-header p { margin: 5px 0 0; color: var(--text-soft); font-size: 13px; }
.rp-panel-close { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 30px; line-height: 1; cursor: pointer; }
.rp-panel-close:hover, .rp-panel-close:focus-visible { border-color: var(--primary); color: var(--primary); outline: 2px solid var(--primary); outline-offset: 2px; }
.rp-panel-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rp-search { position: relative; flex: 1; min-width: 220px; max-width: 480px; }
.rp-search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--text-faint); pointer-events: none; }
.rp-search input { width: 100%; height: 46px; padding: 0 16px 0 42px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); font-size: 15px; color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s; }
.rp-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.rp-filter-btn { display: inline-flex; align-items: center; height: 42px; padding: 0 16px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text-soft); font-size: 13px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.rp-filter-btn:hover, .rp-filter-btn.on { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.rp-total { margin-left: auto; color: var(--text-soft); font-size: 13px; white-space: nowrap; }
.rp-panel-list { min-height: 0; overflow-y: auto; overflow-x: hidden; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-content: start; gap: 12px; padding: 4px 8px 12px 2px; scrollbar-width: thin; scrollbar-color: var(--primary-soft) transparent; }
.rp-panel-list::-webkit-scrollbar { width: 8px; }
.rp-panel-list::-webkit-scrollbar-thumb { background: var(--primary-soft); border-radius: 999px; }
.rp-panel-chip { width: 100%; min-width: 0; min-height: 82px; }
.rp-panel-empty { grid-column: 1 / -1; display: grid; place-items: center; min-height: 240px; color: var(--text-soft); font-weight: 700; }
/* chips 本体：管理端专用两行计划卡，第一行姓名+趟次/人数，第二行烧鸭+公里数 */
.rider-chip { position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 64px; padding: 7px 12px; border-radius: 16px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font-size: 15px; font-weight: 800; text-align: center; cursor: pointer; transition: all .2s cubic-bezier(0.16, 1, 0.3, 1); white-space: nowrap; overflow: hidden; }
.rider-chip::after { content: ''; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--primary); border-radius: 999px; transform: scaleX(0); transform-origin: left; transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1); }
.rider-chip:hover::after, .rider-chip:focus-visible::after { transform: scaleX(1); }
.rider-chip.active::after { display: none; }
.rider-chip.rider-chip-all { min-height: 64px; border-radius: 16px; }
.rider-chip:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); box-shadow: 0 6px 20px -6px var(--primary), 0 0 0 3px var(--primary-soft); }
.rider-chip.active { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); box-shadow: 0 2px 8px -4px var(--primary); }
.rider-chip.active:hover { box-shadow: 0 4px 12px -4px var(--primary), 0 0 0 3px var(--primary); }
.rp-chip-primary, .rp-chip-secondary { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; min-width: 0; }
.rider-chip .rp-rider-name { display: inline-flex; align-items: center; gap: 5px; min-width: 0; font-size: 15.5px; font-weight: 900; line-height: 1.2; }
.rider-chip-packer { border-color: rgba(190, 24, 93, .28); background: linear-gradient(145deg, var(--surface), rgba(251, 113, 133, .07)); }
.rider-chip-packer:hover, .rider-chip-packer.active { border-color: var(--primary-2); color: var(--primary-2); box-shadow: 0 4px 12px -6px var(--primary-2); }
.rp-role-badge { display: inline-flex; align-items: center; min-height: 20px; padding: 0 7px; border-radius: 999px; border: 1px solid rgba(190, 24, 93, .24); background: rgba(251, 113, 133, .12); color: #be185d; font-size: 10px; font-weight: 900; line-height: 1; }
.rider-chip .rp-count { display: inline-grid; place-items: center; min-width: 28px; height: 24px; padding: 0 8px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 13px; font-weight: 900; line-height: 1; }
.rider-chip.active .rp-count { background: #fff; color: var(--primary); }
.rider-chip .rp-count.zero { opacity: .55; background: var(--primary-soft); color: var(--primary); }
.rider-chip .rp-plan { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-solid); color: var(--text-soft); font-size: 13px; font-weight: 900; line-height: 1; }
.rider-chip .rp-ducks { color: #be123c; background: rgba(251, 113, 133, .1); border-color: rgba(251, 113, 133, .24); }
.rider-chip .rp-distance { color: #166534; background: rgba(16, 185, 129, .1); border-color: rgba(16, 185, 129, .22); font-variant-numeric: tabular-nums; }
.rider-chip .rp-distance.estimated { color: #92400e; background: rgba(245, 158, 11, .1); border-color: rgba(245, 158, 11, .24); }
@media (max-width: 900px) {
  .rp-compact-row { grid-template-columns: repeat(3, minmax(180px, 1fr)); overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 4px; }
  .rp-compact-row .rider-chip { scroll-snap-align: start; }
  .rp-panel-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .rider-picker { padding: 10px; }
  .rp-compact-row { grid-template-columns: repeat(5, minmax(190px, 82vw)); }
  .rider-chip { max-width: 100%; white-space: normal; }
  .rp-chip-primary, .rp-chip-secondary { flex-wrap: wrap; justify-content: center; }
  .rp-panel-backdrop { padding: 0; place-items: stretch; }
  .rp-panel { width: 100%; height: 100dvh; border-radius: 0; border: 0; padding: 16px 12px; gap: 12px; }
  .rp-panel-header h2 { font-size: 24px; }
  .rp-panel-toolbar { align-items: stretch; }
  .rp-search { flex-basis: 100%; max-width: none; }
  .rp-total { margin-left: 0; align-self: center; }
  .rp-panel-list { grid-template-columns: 1fr; gap: 10px; }
}

/* ── 趟次卡片（可折叠）── */
.trip { padding: 0; margin-bottom: 14px; overflow: hidden; }
.trip .head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 16px; cursor: pointer; user-select: none; transition: background .15s; margin-bottom: 0; }
.trip .head:hover { background: var(--surface-solid); }
.trip-meta { flex: 1; display: flex; align-items: center; justify-content: space-evenly; gap: 0; min-width: 0; }
.trip-meta .lock-badge { margin-left: 0; }
.trip .rider { font-size: 16px; font-weight: 700; color: var(--text-soft); background: var(--surface-solid); padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); white-space: nowrap; }
.trip-count { font-size: 15px; font-weight: 700; color: var(--text-soft); background: var(--surface-solid); padding: 4px 11px; border-radius: 999px; border: 1px solid var(--border); white-space: nowrap; }
.trip .trip-collapse-icon { font-size: 15px; color: var(--text-soft); transition: transform .2s; flex: none; width: 18px; text-align: center; }
.trip.collapsed .trip-collapse-icon { transform: rotate(-90deg); }
.trip .tno { font-weight: 900; font-size: 18px; background: linear-gradient(135deg,var(--primary),var(--primary-2)); color:#fff; padding: 5px 14px; border-radius: 10px; }
.trip .badge { font-size: 14px; font-weight: 700; padding: 4px 11px; }
.trip .lock-badge { font-size: 14px; padding: 4px 11px; }
/* 骑手端趟次头部四个标签统一加大加粗 */
.rider-trip-head { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; }
.rider-trip-head .rider-trip-meta {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.rider-trip-head .tno { font-size: 20px; padding: 6px 16px; border-radius: 12px; }
.rider-trip-head .badge { font-size: 15px; font-weight: 800; padding: 6px 13px; }
.rider-trip-head .trip-count { font-size: 15px; font-weight: 800; color: var(--text-soft); background: var(--surface-solid); padding: 5px 13px; border-radius: 999px; border: 1px solid var(--border); white-space: nowrap; }
.rider-trip-head .trip-updated { font-size: 13px; font-weight: 700; color: var(--text-faint); background: var(--surface-solid); padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); white-space: nowrap; }
@media (max-width: 640px) {
  .rider-trip-head { align-items: flex-start; }
  .rider-trip-head .rider-trip-meta { flex-wrap: wrap; justify-content: flex-start; }
}
.trip .trip-body { padding: 0 16px 16px; }
.trip.collapsed .trip-body { display: none; }

/* ── 趟次内嵌商家块：固定可视区最多 3 个商家，其余上下滑动 ── */
.trip-merchants,
.rider-trip-merchants {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* 约 3 个商家卡片高度（180px × 3 + 2 gaps），超出可平滑滚动；内容少时由内容撑高，不会留空白 */
  max-height: 560px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  /* 玻璃拟态细滚动条，与全局主题统一 */
  scrollbar-width: thin;
  scrollbar-color: var(--primary-soft) transparent;
}
.trip-merchants::-webkit-scrollbar,
.rider-trip-merchants::-webkit-scrollbar { width: 6px; }
.trip-merchants::-webkit-scrollbar-track,
.rider-trip-merchants::-webkit-scrollbar-track { background: transparent; }
.trip-merchants::-webkit-scrollbar-thumb,
.rider-trip-merchants::-webkit-scrollbar-thumb { background: var(--primary-soft); border-radius: 10px; border: 1px solid transparent; background-clip: padding-box; }
.trip-merchants::-webkit-scrollbar-thumb:hover,
.rider-trip-merchants::-webkit-scrollbar-thumb:hover { background: var(--primary); }

.trip-merchant { padding: 0; border: none; background: transparent; }
.trip-merchant .merchant-card { margin-bottom: 0; }

/* 打包端「我的配送」商家条目（自包含渲染，与骑手端卡片观感统一） */
#tab-deliver .trip-merchant { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-solid); }

/* 打包任务主体固定为内部滚动，刷新时保留 scrollTop；移动端回退到页面滚动，避免双层触摸冲突。 */
#packList {
  max-height: min(680px, calc(100dvh - 250px));
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  padding-right: 8px;
}

/* ── 打包端装车顺序列表（后送先装）：反转配送顺序，每行显示序号/店名/烧鸭/烧鹅数量 ── */
.packing-seq-hint { font-size: 17px; font-weight: 800; color: var(--primary); margin: 12px 0 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; letter-spacing: .2px; }
.psi-filter-note { font-weight: 700; color: var(--text-soft); font-size: 15px; padding: 4px 12px; border-radius: 999px; background: var(--primary-soft); }
.packing-seq-list { display: flex; flex-direction: column; gap: 10px; }
.packing-seq-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(15,23,42,0.05);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background .15s ease;
}
.packing-seq-item:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(15,23,42,0.09); border-color: var(--primary-soft); }
.packing-seq-item:first-child { background: linear-gradient(135deg, rgba(249,115,22,0.12) 0%, var(--surface) 100%); border-color: rgba(249,115,22,0.28); }
.packing-seq-item .psi-seq {
  flex: none; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 14px; font-weight: 900; color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  box-shadow: 0 3px 8px rgba(249,115,22,0.28);
}
.packing-seq-item .psi-name { flex: 1; font-size: 16px; font-weight: 800; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.packing-seq-item .psi-name:hover { color: var(--primary); }
.packing-seq-item .psi-goods { flex: none; display: flex; align-items: center; gap: 8px; }
.packing-seq-item .psi-badge {
  display: inline-flex; align-items: baseline; gap: 4px;
  font-size: 20px; font-weight: 900; padding: 7px 14px; border-radius: 999px; border: 1.5px solid transparent; letter-spacing: .3px;
  white-space: nowrap; /* 商品名+数量必须水平排列，禁止竖排折断 */
}
.packing-seq-item .psi-badge.duck { background: rgba(249,115,22,0.14); color: #9a3412; border-color: rgba(249,115,22,0.28); }
.packing-seq-item .psi-badge.goose { background: rgba(251,113,133,0.13); color: #be123c; border-color: rgba(251,113,133,0.28); }
.packing-seq-item .psi-empty-row { font-size: 19px; color: var(--text-muted); font-weight: 700; padding: 14px 0; text-align: center; }
@media (max-width: 640px) {
  .packing-seq-item .psi-badge { font-size: 18px; padding: 6px 12px; }
  .packing-seq-item .psi-name { font-size: 15px; }
  .packing-seq-item .psi-empty-row { font-size: 17px; }
}

/* ── 打包端商家中间：照片缩略图框 + 打包信息备注 ── */
.packing-seq-item .psi-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 0;
  overflow: hidden;
}
.packing-seq-item .psi-photo-box {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
/* 打包端照片同样是 1:1 正方形（52×52），与管理端/骑手端商家照片比例口径一致 */
.packing-seq-item .psi-photo-thumb {
  position: relative;
  flex: none;
  width: 52px;
  height: 52px;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  box-shadow: 0 2px 6px rgba(15,23,42,0.06);
  cursor: zoom-in;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.packing-seq-item .psi-photo-thumb:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(15,23,42,0.1); border-color: var(--primary-soft); }
.packing-seq-item .psi-photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.packing-seq-item .psi-photo-del {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(220,38,38,0.85);
  color: #fff;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity .12s ease, transform .12s ease;
}
.packing-seq-item .psi-photo-thumb:hover .psi-photo-del { opacity: 1; }
.packing-seq-item .psi-photo-del:hover { transform: scale(1.1); background: #dc2626; }
.packing-seq-item .psi-photo-more {
  flex: none;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}
.packing-seq-item .psi-photo-add {
  flex: none;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 2px dashed var(--primary-soft);
  background: rgba(249,115,22,0.06);
  color: var(--primary);
  font-size: 26px;
  font-weight: 300;
  cursor: pointer;
  transition: all .15s ease;
}
.packing-seq-item .psi-photo-add:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  transform: translateY(-2px);
}
.packing-seq-item .psi-photo-input { display: none; }
.packing-seq-item .psi-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 300px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(251,113,133,0.08);
  border: 1px solid rgba(251,113,133,0.18);
  font-size: 17px;
  min-width: 0;
}
.packing-seq-item .psi-note.empty { opacity: .55; }
.packing-seq-item .psi-note-label {
  flex: none;
  font-weight: 800;
  color: var(--primary-2);
  white-space: nowrap;
}
.packing-seq-item .psi-note-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-weight: 600;
}
@media (max-width: 768px) {
  .packing-seq-item .psi-center { flex-wrap: wrap; justify-content: flex-start; gap: 8px; }
  .packing-seq-item .psi-photo-thumb,
  .packing-seq-item .psi-photo-add,
  .packing-seq-item .psi-photo-more { width: 44px; height: 44px; }
  .packing-seq-item .psi-note { max-width: 100%; flex: 1 1 100%; }
}

.rider-note-item .rni-index { font-weight: 800; color: var(--primary); flex: none; }
.rider-note-item .rni-text { flex: 1; word-break: break-word; }

/* 系统设置 · 配速校准卡片（与全站视觉统一：柔和背景、圆角、聚焦高亮） */
.speed-calibration-card { margin-top: 14px; padding: 14px 16px; border-radius: var(--radius); background: linear-gradient(135deg, rgba(249,115,22,0.08) 0%, rgba(255,255,255,0.65) 100%); border: 1px solid var(--border); box-shadow: 0 2px 12px rgba(15,23,42,0.05); }
.scc-title { font-size: 14px; font-weight: 800; color: var(--text); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.scc-desc { font-size: 12px; color: var(--text-soft); line-height: 1.6; margin-bottom: 12px; }
.scc-body { display: flex; flex-direction: column; gap: 12px; }
.scc-inputs { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 10px; align-items: end; }
.scc-inputs label { display: block; font-size: 11px; color: var(--text-soft); margin-bottom: 5px; font-weight: 700; }
.scc-inputs input { width: 100%; height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-solid); color: var(--text); font-size: 14px; font-weight: 700; outline: none; transition: border-color .15s, box-shadow .15s; }
.scc-inputs input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.scc-sep { padding-bottom: 9px; font-size: 18px; font-weight: 800; color: var(--text-faint); }
.scc-result { text-align: center; }
.scc-speed { height: 38px; display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 18px; font-weight: 900; color: var(--primary); background: var(--surface-solid); border-radius: 10px; border: 1px solid var(--border); }
.scc-speed span { font-size: 11px; font-weight: 700; color: var(--text-soft); }
.scc-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.scc-hint { font-size: 11px; color: var(--text-soft); line-height: 1.5; }
@media (max-width: 560px) {
  .scc-inputs { grid-template-columns: 1fr auto 1fr; }
  .scc-sep:nth-of-type(2) { display: none; }
  .scc-result { grid-column: 1 / -1; }
  .scc-actions { flex-direction: column; align-items: flex-start; }
}

/* 骑手端商家卡片：复用管理端结构，只读模式（滚动容器与 .trip-merchants 统一） */
.rider-merchant-card .goods-cell.rider-readonly { cursor: default; }
.rider-merchant-card .goods-cell.rider-readonly:hover { border-color: var(--border); box-shadow: none; transform: none; }
.rider-merchant-card .mc-actions.rider-actions { justify-content: center; }
.rider-merchant-card .mc-actions.rider-actions .nav-point { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 52px; }
.rider-merchant-card .quick-note-input[readonly],
.rider-merchant-card .note-textarea[readonly] { cursor: default; background: var(--surface); opacity: .95; }
.rider-merchant-card .photo-thumb.empty { cursor: default; }
.rider-merchant-card .photo-thumb.empty .photo-add { opacity: .5; }
/* 骑手端商家卡片：3 个备注框横向一行三等分，与下方三张图片栏（.photo-thumb 同轨）严格对齐（备注1 / 备注2 / 打包信息） */
.rider-merchant-card .mc-media { gap: 8px; }
.rider-merchant-card .mc-notes { flex-direction: row; align-items: stretch; gap: 4px; }
/* 备注不再设高度上限：由 .mc-notes 吸收卡片剩余高度，随商家卡整体一起变高 */
.rider-merchant-card .mc-notes .note-textarea { flex: 0 0 calc(33.333% - 3px); min-width: 0; min-height: 42px; max-height: none; }
/* 商家照片：与备注同轨三等分，按栏宽锁定 1:1 正方形，不再占用备注的纵向空间 */
.rider-merchant-card .mc-photos { min-height: 0; }
.rider-merchant-card .photos-scroll { min-height: 0; }
.rider-merchant-card .photo-thumb { flex: 0 0 calc(33.333% - 3px); width: auto; height: auto; aspect-ratio: 1 / 1; }

/* 需要拍照称重的骑手卡：给称重操作足够宽度，备注与三张商家照片使用同轨自适应网格。 */
.rider-merchant-card.has-weigh-goods .mc-center-block {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(240px, 1fr);
  align-items: stretch;
}
.rider-merchant-card.has-weigh-goods .mc-goods { width: 100%; align-items: stretch; }
.rider-merchant-card.has-weigh-goods .goods-grid {
  width: 100%;
  max-width: none;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  grid-auto-rows: auto;
  align-content: start;
}
.rider-merchant-card.has-weigh-goods .mc-media { min-width: 0; }
.rider-merchant-card.has-weigh-goods .mc-notes,
.rider-merchant-card.has-weigh-goods .photos-scroll {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  overflow: visible;
}
.rider-merchant-card.has-weigh-goods .mc-notes .note-textarea {
  width: 100%;
  min-height: 54px;
  max-height: none;
  padding: 7px 8px;
}
.rider-merchant-card.has-weigh-goods .mc-photos,
.rider-merchant-card.has-weigh-goods .photos-scroll { min-height: 0; }
/* 称重卡同样使用 1:1 商家照片，保持三端照片比例口径一致 */
.rider-merchant-card.has-weigh-goods .photo-thumb {
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: 1 / 1;
}

/* 中窄网页和平板：媒体区移到称重商品下方，避免左右两列互相挤压。 */
@media (max-width: 1180px) and (min-width: 769px) {
  .rider-merchant-card.has-weigh-goods .mc-main-row { flex-wrap: wrap; }
  .rider-merchant-card.has-weigh-goods .mc-info { flex: 1 1 220px; }
  .rider-merchant-card.has-weigh-goods .mc-center-block {
    flex: 1 1 calc(100% - 390px);
    grid-template-columns: 1fr;
  }
  .rider-merchant-card.has-weigh-goods .mc-media { width: 100%; }
  .rider-merchant-card.has-weigh-goods .mc-actions { width: 104px; }
}

.manifest { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; align-items: center; font-size: 16px; }
.manifest .chip { font-size: 15px; padding: 7px 13px; border-radius: 999px; background: var(--surface-solid); border: 1px solid var(--border); font-weight: 700; }
.chip { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--surface-solid); border: 1px solid var(--border); white-space: nowrap; }
.chip b { color: var(--primary); }
/* 骑手端趟次内标签（货物/状态/备注）统一加大加粗 */
.trip-section-label { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 800; color: var(--text-soft); white-space: nowrap; }
.rider-manifest { margin-top: 14px; gap: 10px; font-size: 16px; }
.rider-manifest .trip-section-label { font-size: 17px; }
.rider-manifest .chip { font-size: 16px; padding: 7px 14px; font-weight: 700; }
.rider-status-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
/* 骑手端状态操作按钮：按业务流单向推进 */
.status-action { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 999px; border: none; font-size: 14px; font-weight: 800; cursor: pointer; transition: transform 0.2s cubic-bezier(0.16,1,0.3,1), box-shadow 0.2s; }
.status-action.start { color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2)); box-shadow: 0 8px 20px rgba(249,115,22,0.3); }
.status-action.start:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(249,115,22,0.38); }
.status-action.finish { color: #fff; background: linear-gradient(135deg, #16a34a, #15803d); box-shadow: 0 8px 20px rgba(22,163,74,0.28); }
.status-action.finish:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(22,163,74,0.36); }
.status-badge { display: inline-flex; align-items: center; gap: 5px; padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 800; background: var(--surface-solid); border: 1.5px solid var(--border); color: var(--text-soft); }
.status-badge.done { background: rgba(22,163,74,0.1); border-color: rgba(22,163,74,0.35); color: #16a34a; }
.status-hint { font-size: 12px; color: var(--text-faint); }
.status-hint.pack-wait { color: var(--primary); font-weight: 700; }
.rider-note-row { margin-top: 14px; }
.rider-note-row .trip-section-label { display: block; margin-bottom: 8px; }
.rider-note-history { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.rider-note-item { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--surface-solid); border: 1px solid var(--border); }
.rni-index { flex: none; width: 28px; height: 20px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 800; }
.rni-text { font-size: 13px; line-height: 1.5; color: var(--text); word-break: break-word; }
.rider-note-input-wrap { display: flex; flex-direction: column; gap: 8px; }
.rider-note-input-wrap textarea { width: 100%; resize: vertical; min-height: 58px; }
.btn.save-note { align-self: flex-start; padding: 9px 18px; border-radius: 999px; font-size: 13px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2)); box-shadow: 0 6px 16px rgba(249,115,22,0.28); }
.btn.save-note:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(249,115,22,0.36); }
.btn.save-note:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

/* 打包端整趟确认 */
.pack-action-row { margin-top: 12px; display: flex; align-items: center; gap: 10px; }
.pack-done-hint { font-size: 13px; font-weight: 700; color: #16a34a; }
.pack-finish:disabled { opacity: 0.55; cursor: not-allowed; }
.packing-manifest { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.packing-manifest .btn.sm { font-size: 17px; padding: 9px 16px; }

.route-map { position: relative; width: 100%; height: 500px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin-top: 8px; overflow: hidden; display:flex; flex-direction:row; box-shadow: var(--shadow); }
/* 路线地图 5:5 左右分布：左 50% 地图 / 右 50% 信息面板（全程·预估·回厂 + 过滤条 + 刷新按钮） */
.route-map-main { flex: 1 1 auto; min-width: 0; min-height: 460px; overflow: hidden; }
.route-side { flex: 0 0 220px; min-width: 0; display: flex; flex-direction: column; border-left: 1px solid var(--border); background: var(--bg); }
.route-side .route-info { flex: 1; justify-content: space-evenly; align-items: center; gap: 8px; padding: 16px 12px; }
.route-side .route-info .ri-row { flex-wrap: wrap; justify-content: center; row-gap: 2px; }
.route-side .route-filter-bar, .route-side .route-nav-btn, .route-side .route-refresh-btn { margin-top: 0; max-width: 100%; }
.route-map .amap-logo, .route-map .amap-copyright { opacity: 0.6; }
.route-loading { display: grid; place-items: center; color: var(--text-soft); font-size: 13px; min-height: 460px; width: 100%; }
.route-info { text-align:center; padding: 10px 14px; display:flex; flex-direction:column; align-items:center; gap: 5px; }
.route-info .ri-row { display:inline-flex;align-items:center;gap:6px;background:linear-gradient(135deg,#fff7ed,#ffedd5);padding:5px 12px;border-radius:14px;border:1px solid #fdba74;font-size:13px;line-height:1.4;box-shadow:0 2px 8px rgba(249,115,22,0.08); }
.route-info .ri-row-back { background:linear-gradient(135deg,#fdf2f8,#fce7f3); border-color: rgba(233,30,99,.3); }
.route-info .ri-label { color:#9a3412;font-size:12px;font-weight:600; }
.route-info .ri-val { color:var(--primary);font-weight:800;font-size:14px;min-width:58px;text-align:center; }
.route-info .ri-back { color:#e91e63;background:transparent;padding:0;min-width:auto;font-size:15px;font-weight:900;letter-spacing:1px;text-shadow:none; }

/* 路线商家标记的浮动标签：默认隐藏，hover/active 才显示，透明玻璃风格 + 橙玫主题 */
/* 关键：覆盖高德 SDK 给 .amap-marker-label 外层容器默认加的白底 + 蓝边框，
   否则未选中和选中时都会露出一个白色方框。 */
.amap-marker-label {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  cursor: default;
}
.route-map-label {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  width: max-content;
  max-width: min(360px, calc(100vw - 32px));
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  color: #7c2d12;
  background: rgba(255, 255, 255, 0.52);
  backdrop-filter: blur(16px) saturate(200%);
  -webkit-backdrop-filter: blur(16px) saturate(200%);
  border: 1px solid rgba(249, 115, 22, 0.35);
  box-shadow: 0 5px 18px rgba(249, 115, 22, 0.15);
  text-align: center;
  pointer-events: none;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.route-map-label .rml-title {
  font-size: 15px;
  font-weight: 800;
  color: #7c2d12;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.route-map-label .rml-goods {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}
.route-map-label .rml-g {
  display: inline-flex;
  align-items: baseline;
  flex: 0 0 auto;
  gap: 3px;
  white-space: nowrap;
  word-break: keep-all;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.22);
  font-size: 13px;
  font-weight: 700;
  color: #9a3412;
  line-height: 1.2;
}
.route-map-label .rml-g b {
  font-size: 14px;
  font-weight: 900;
  color: #c2410c;
  white-space: nowrap;
}
@media (max-width:480px) {
  .route-map-label { max-width: calc(100vw - 24px); padding: 7px 9px; }
  .route-map-label .rml-goods { flex-wrap: wrap; }
  .route-map-label .rml-g { padding: 3px 7px; font-size: 12px; }
  .route-map-label .rml-g b { font-size: 13px; }
}

/* 地图空白区 callout：通过虚线引线把标签甩到聚类外，避免压住其他商家；
   JS 控制显隐，默认始终可见（存在于 DOM 即显示），且不接受鼠标事件避免闪烁 */
.route-map-callout {
  background: rgba(255, 255, 255, 0.58);
  border-color: rgba(249, 115, 22, 0.38);
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.18);
}
.route-map-callout::after { display: none; }

/* 地图面板内「一键导航」入口：与骑手端卡片 .btn.nav-all 是同一业务动作（同源 buildRouteUri），
   面板空间窄，这里用紧凑高对比胶囊样式；被称重拦截或条件不足时灰化，但保留可点击以给出明确原因。 */
.route-nav-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  margin-top: 8px; padding: 8px 16px;
  border: none; border-radius: 999px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  color: #fff;
  font-size: 13px; font-weight: 800; letter-spacing: .3px;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  box-shadow: 0 6px 16px rgba(239, 68, 68, .3);
  transition: transform .12s ease, box-shadow .12s ease;
}
.route-nav-btn:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 10px 22px rgba(239, 68, 68, .42); }
.route-nav-btn:active { transform: translateY(0); }
.route-nav-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.route-nav-btn.nav-blocked { background: linear-gradient(135deg, #94a3b8, #64748b); box-shadow: none; cursor: not-allowed; }
.route-nav-btn.nav-blocked:hover { transform: none; box-shadow: none; }

/* 刷新路线按钮：信息栏内居右，与统计信息和谐 */
.route-refresh-btn {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 8px; padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text-soft);
  font-size: 12px; font-weight: 700;
  cursor: pointer;
  transition: all .12s ease;
}
.route-refresh-btn:hover:not(:disabled) {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
}
.route-refresh-btn:disabled {
  opacity: .6; cursor: not-allowed;
}

/* 路线过滤提示：无货商家已被默认过滤 */
.route-filter-bar { display:inline-flex; align-items:center; gap:6px; margin-top:8px; padding:4px 10px; border-radius:999px; background:linear-gradient(135deg,#fff7ed,#ffedd5); border:1px solid #fdba74; color:#9a3412; font-size:12px; font-weight:700; }

/* 路线为空状态：全部无货或全部缺定位 */
.route-empty { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; min-height:460px; width:100%; text-align:center; color:var(--text-soft); }
.route-empty-icon { font-size:42px; line-height:1; opacity:.85; }
.route-empty-title { font-size:16px; font-weight:800; color:var(--text); }
.route-empty-sub { font-size:13px; color:var(--text-faint); max-width:260px; line-height:1.5; }
.route-unavailable {
  min-height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  background: var(--surface-solid);
  color: var(--text-soft);
}
.route-unavailable-icon { font-size: 38px; line-height: 1; }
.route-unavailable-title { color: var(--text); font-size: 16px; font-weight: 800; }
.route-unavailable-message { max-width: 520px; font-size: 13px; line-height: 1.65; color: var(--text-soft); }
.route-unavailable-meta { font-size: 12px; color: var(--text-faint); }
.route-unavailable-code { padding: 4px 8px; border-radius: 6px; background: var(--bg); border: 1px solid var(--border); color: var(--danger); font-size: 11px; }

/* 移动端：路线地图太高会撑爆小屏，适度回落 */
@media (max-width: 640px) {
  .route-map { height: 360px; }
  .route-map-main { min-height: 320px; }
  .route-loading { min-height: 320px; }
  .route-empty { min-height: 320px; }
  .route-side { flex-basis: 120px; }
  .route-side .route-info { padding: 8px 6px; gap: 6px; align-items: center; justify-content: space-evenly; }
  /* 窄屏面板只有 120px，导航按钮收紧内边距并允许缩到面板宽度，避免溢出被裁切 */
  .route-side .route-nav-btn { padding: 7px 10px; font-size: 12px; }
  .route-info .ri-row { padding: 5px 10px; font-size: 12px; }
  .route-info .ri-back { font-size: 14px; padding: 2px 8px; }
}

/* 骑手/打包员摘要统计标签 */

/* 角色小标签（弹窗表格内） */

/* 健康度状态标签 */

/* ===================== 商家货物管理卡片（横长条布局） ===================== */
.merchant-card { display:flex; flex-direction:column; gap:8px; padding:10px 12px; border:1px solid var(--border); border-radius:14px; background:var(--surface-solid); margin-bottom:8px; transition:box-shadow .2s, border-color .2s, transform .2s, background .2s; }
.merchant-card:hover { box-shadow:0 4px 14px rgba(0,0,0,.08); }
.merchant-card.merchant-flash { animation: merchantFlash 0.9s ease-in-out; }
@keyframes merchantFlash {
  0% { box-shadow:0 0 0 0 rgba(249,115,22,0); border-color:var(--border); }
  25% { box-shadow:0 0 0 4px rgba(249,115,22,.25); border-color:var(--primary); transform:translateY(-1px); }
  50% { box-shadow:0 0 0 8px rgba(249,115,22,.12); border-color:var(--primary); }
  100% { box-shadow:0 0 0 0 rgba(249,115,22,0); border-color:var(--border); }
}

/* 无货商家：整卡「极浅灰」ghost 化——名字/序号/按钮/货物价签/快捷备注/称重徽章统一压成极浅灰，
   弱化视觉重点但仍可读可用；hover 不再恢复彩色 */
.merchant-card.no-goods {
  background: #fafbfc;
  border-color: #eef1f4;
  box-shadow: none;
  /* 整卡去色：去掉 emoji/图标固有色（🔓📍🗑🔒⬆⬇），配合下方极浅灰覆盖实现整体 ghost */
  filter: grayscale(1);
}
.merchant-card.no-goods:hover {
  box-shadow: none;
  transform: none;
}
/* 媒体与备注区：低保明度 + 去色，呈 ghost 感（整卡已 grayscale，无需再对 mc-photos 单独去色） */
.merchant-card.no-goods .mc-quick-notes,
.merchant-card.no-goods .mc-notes,
.merchant-card.no-goods .mc-photos,
.merchant-card.no-goods .rider-note-history {
  opacity: .55;
}
/* 商家名红 pill → 极浅灰 */
.merchant-card.no-goods .mc-name .name-label,
.merchant-card.no-goods .mc-name:hover .name-label {
  background: #f1f3f5 !important; color: #b9bfc7 !important;
  border-color: #e8ebef !important; box-shadow: none !important; text-shadow: none !important;
}
/* 序号橙点 → 极浅灰 */
.merchant-card.no-goods .mc-main-row .mc-seq {
  background: #eef0f3 !important; color: #b6bcc4 !important; box-shadow: none !important;
}
/* 操作区全部按钮（锁定/解锁/导航/拦截导航/上移下移/删除）→ 极浅灰 */
.merchant-card.no-goods .mc-actions .merchant-lock-toggle,
.merchant-card.no-goods .mc-actions .merchant-lock-toggle.locked,
.merchant-card.no-goods .mc-actions .merchant-lock-toggle.unlocked,
.merchant-card.no-goods .mc-actions .merchant-lock-toggle:hover,
.merchant-card.no-goods .mc-actions .merchant-quantity-lock-toggle,
.merchant-card.no-goods .mc-actions .merchant-quantity-lock-toggle.locked,
.merchant-card.no-goods .mc-actions .merchant-quantity-lock-toggle.unlocked,
.merchant-card.no-goods .mc-actions .merchant-quantity-lock-toggle:hover,
.merchant-card.no-goods .mc-actions .merchant-alternate-delivery-toggle,
.merchant-card.no-goods .mc-actions .merchant-alternate-delivery-toggle.active,
.merchant-card.no-goods .mc-actions .merchant-alternate-delivery-toggle:hover,
.merchant-card.no-goods .mc-actions .nav-point,
.merchant-card.no-goods .mc-actions .nav-point.nav-blocked,
.merchant-card.no-goods .mc-actions .nav-point:hover,
.merchant-card.no-goods .mc-actions .mc-move,
.merchant-card.no-goods .mc-actions .mc-move:hover,
.merchant-card.no-goods .mc-actions .mc-del,
.merchant-card.no-goods .mc-actions .mc-del:hover {
  background: #f1f3f5 !important; color: #b6bcc4 !important;
  border-color: #e8ebef !important; box-shadow: none !important; text-shadow: none !important; transform: none !important;
}
/* 货物格价签（含有计划量/锁定态）→ 极浅灰 */
.merchant-card.no-goods .goods-cell .gc-price,
.merchant-card.no-goods .goods-cell.has-qty .gc-price,
.merchant-card.no-goods .goods-cell.locked .gc-price {
  background: #f1f3f5 !important; color: #b6bcc4 !important;
  border-color: #e8ebef !important; box-shadow: none !important; text-shadow: none !important;
}
/* 锁定小徽章（🔒 红底）+ 货物格「切换货物」橙按钮 → 极浅灰 */
.merchant-card.no-goods .lock-icon,
.merchant-card.no-goods .lock-icon.notes-lock,
.merchant-card.no-goods .goods-cell .gc-switch,
.merchant-card.no-goods .goods-cell:not(.has-qty) .gc-switch,
.merchant-card.no-goods .goods-cell .gc-switch:hover {
  background: #f1f3f5 !important; color: #b6bcc4 !important;
  border-color: #e8ebef !important; box-shadow: none !important; text-shadow: none !important;
}
/* 黄色快捷备注框 → 极浅灰（输入文字仍可读） */
.merchant-card.no-goods .quick-note-input,
.merchant-card.no-goods .quick-note-input.is-empty,
.merchant-card.no-goods .quick-note-input.locked,
.merchant-card.no-goods .quick-note-input:focus {
  background: #f1f3f5 !important; color: #aab1ba !important;
  border-color: #e8ebef !important; box-shadow: none !important;
}
/* 称重状态徽章 → 极浅灰 */
.merchant-card.no-goods .weigh-status-badge.done,
.merchant-card.no-goods .weigh-status-badge.pending {
  background: #f1f3f5 !important; color: #b6bcc4 !important; border-color: #e8ebef !important;
}
/* 通用行 */
.mc-row { display:flex; gap:12px; width:100%; }

/* ── 主行：序号 + 商家信息 + 货物 + 操作（左右整体上下等高对齐） ── */
.mc-main-row { align-items:stretch; }
.mc-main-row .mc-seq { flex:none; width:30px; height:30px; border-radius:50%; display:grid; place-items:center; align-self:center; background:linear-gradient(135deg,#f59e0b,#fbbf24); color:#fff; font-size:13px; font-weight:900; line-height:1; box-shadow:0 2px 6px rgba(245,158,11,.4); }
/* 商家信息区：左侧红色商家名与右侧 2×2 格子 + 备注 + 照片整体等高，
   黄色快捷备注条压缩为自然高度细条，红色商家名 flex:1 自动吸收剩余空间扩大 */
.mc-info { flex:0 0 200px; min-width:0; display:flex; flex-direction:column; gap:4px; align-self:stretch; }
.mc-name { flex:1; min-height:0; font-size:17px; font-weight:900; color:var(--text); cursor:pointer; line-height:1.2; display:flex; align-items:center; justify-content:center; text-align:center; min-width:0; }
.mc-name .name-label { display:flex; align-items:center; justify-content:center; flex:1; align-self:stretch; background:#ff4d6d; color:#fff; padding:5px 10px; border-radius:10px; border:1px solid rgba(255,51,85,0.5); box-shadow:0 2px 5px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.1); transition:background .15s, box-shadow .15s, border-color .15s; max-width:100%; word-wrap:break-word; }
.mc-name:hover .name-label { background:#ff3355; border-color:rgba(255,26,68,0.7); box-shadow:0 3px 8px rgba(0,0,0,0.16), inset 0 1px 0 rgba(255,255,255,0.05); }

/* 货物 + 媒体 容器：2×2 格子与备注/照片列自动上下等高 */
.mc-center-block { flex:1; min-width:0; display:flex; align-items:stretch; gap:10px; }
.mc-goods { flex:0 0 auto; min-width:0; display:flex; align-items:center; justify-content:center; }
/* 每个商品格至少容纳「商品名 + 数量 + 单位」一整行；普通卡仍保持 2×2 商品结构。 */
.merchant-card .goods-grid { width:240px; max-width:240px; grid-template-columns:repeat(2, minmax(116px, 1fr)); grid-auto-rows:1fr; }

/* 快捷备注提醒栏 —— 黄色备注框固定 200×28px（跟随左栏定宽）：有字/无字/任意商家大小完全一致，方便点按编辑；
   上方 .mc-name flex:1 自动吸收剩余空间，保证左侧整体与右侧等高 */
.mc-quick-notes { flex:0 0 auto; width:100%; display:flex; flex-direction:column; gap:2px; min-width:0; align-items:stretch; }
.quick-note-input { flex:none; width:100%; box-sizing:border-box; font-size:12px; font-weight:700; color:#92400e; background:linear-gradient(135deg,#fef3c7,#fde68a); padding:0 10px; border-radius:8px; text-align:center; line-height:normal; height:28px; overflow:hidden; border:1px solid #f59e0b; outline:none; transition:all .12s; }
.quick-note-input.is-empty { background:linear-gradient(135deg,#fffbeb,#fef3c7); border-color:#fcd34d; color:#a16207; }
.quick-note-input::placeholder { color:#a16207; opacity:.5; font-weight:400; font-size:10px; }
.quick-note-input:focus { border-color:#d97706; box-shadow:0 0 0 2px rgba(245,158,11,.2); background:#fff; }

/* 操作区：四行（改定位 / 导航到商家 / 上移下移 / 删除）上下均匀分布，撑满卡片主行高度 */
.mc-actions { flex:none; width:120px; display:flex; flex-direction:column; gap:6px; align-items:stretch; align-self:stretch; justify-content:space-between; }
.mc-actions > .btn,
.mc-actions > .nav-point,
.mc-actions > .mc-sort,
.mc-actions > .mc-del,
.mc-actions > .merchant-lock-toggle,
.mc-actions > .merchant-quantity-lock-toggle,
.mc-actions > .merchant-alternate-delivery-toggle,
.mc-actions > .merchant-complaint-btn { width:100%; box-sizing:border-box; text-align:center; justify-content:center; }

/* 商家资料锁、固定数量锁、隔日配送：独立业务状态，隔日配送与固定数量锁互斥。 */
.merchant-lock-toggle,
.merchant-quantity-lock-toggle,
.merchant-alternate-delivery-toggle { display:inline-flex; align-items:center; justify-content:center; gap:4px; padding:6px 8px; border-radius:8px; border:1px solid var(--border); background:var(--surface); color:var(--text); font-size:11px; font-weight:800; cursor:pointer; transition:background .15s, border-color .15s, color .15s, transform .15s; }
.merchant-lock-toggle.locked { background:#fee2e2; color:#991b1b; border-color:#f87171; }
.merchant-lock-toggle.locked:hover { background:#fecaca; transform:translateY(-1px); }
.merchant-lock-toggle.unlocked { background:#dcfce7; color:#166534; border-color:#4ade80; }
.merchant-lock-toggle.unlocked:hover { background:#bbf7d0; transform:translateY(-1px); }
.merchant-quantity-lock-toggle.locked { background:#fce7f3; color:#9d174d; border-color:#f472b6; }
.merchant-quantity-lock-toggle.locked:hover { background:#fbcfe8; transform:translateY(-1px); }
.merchant-quantity-lock-toggle.unlocked { background:var(--surface); color:var(--text-soft); border-color:var(--border); }
.merchant-quantity-lock-toggle.unlocked:hover { color:var(--primary); border-color:var(--primary); background:var(--primary-soft); transform:translateY(-1px); }
.merchant-quantity-lock-toggle:disabled { opacity:.45; cursor:not-allowed; transform:none; }
.merchant-alternate-delivery-toggle.active { background:#e0f2fe; color:#075985; border-color:#38bdf8; }
.merchant-alternate-delivery-toggle.active:hover { background:#bae6fd; transform:translateY(-1px); }
.merchant-alternate-delivery-toggle.inactive:hover { color:#0369a1; border-color:#38bdf8; background:#f0f9ff; transform:translateY(-1px); }
.merchant-alternate-delivery-toggle:disabled { opacity:.55; cursor:wait; transform:none; }
.quantity-policy-note { margin-top:4px; color:#0369a1; font-size:10px; line-height:1.25; text-align:center; }
/* 导航到商家按钮：跟随操作区均匀分布。 */
.mc-actions > .nav-point { flex:none; }
.mc-sort { display:flex; gap:6px; align-items:center; width:100%; }
.mc-sort .mc-move { flex:1; padding:5px 0; border-radius:8px; border:1px solid var(--border); background:var(--surface); color:var(--text); font-size:12px; font-weight:700; cursor:pointer; transition:all .12s; white-space:nowrap; text-align:center; }
.mc-move:hover:not(:disabled) { border-color:var(--primary); color:var(--primary); background:var(--primary-soft); transform:translateY(-1px); }
.mc-move:disabled { opacity:.3; cursor:not-allowed; }
.mc-del { color:var(--danger); border-color:var(--danger); opacity:.85; }
.mc-del:hover { opacity:1; background:rgba(239,68,68,.08); }

/* 货物卡片（可切换货物） */
.goods-grid { display:grid; grid-template-columns:repeat(2, minmax(116px, 1fr)); gap:4px; width:240px; }
.goods-cell { border:2px solid var(--border); border-radius:10px; padding:6px 4px; text-align:center; cursor:pointer; transition:all .15s; background:var(--bg); position:relative; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:2px; min-height:48px; opacity:.25; }
.goods-cell:hover { border-color:var(--primary); box-shadow:0 2px 6px rgba(249,115,22,.2); transform:translateY(-1px); }
/* 无数量 / 无称重 精简格子（2026-07-28）：常规 goods-cell 是有数量 + 称重一体化卡片，未占用的 slot 不再撑到 48px，
 * 改为瘦长 chip，减少「肉卷 0 只」「叉烧 0 只」之类的空白格子霸占视觉。 */
.goods-cell.is-slim { padding:4px 6px; gap:0; min-height:24px; opacity:.45; cursor:default; border-style:dashed; background:transparent; }
.goods-cell.is-slim:hover { transform:none; box-shadow:none; border-color:var(--border); }
.goods-cell.is-slim .gc-top { gap:2px; }
.goods-cell.is-slim .gc-name { font-size:11.5px; font-weight:700; color:var(--text-soft); }
.goods-cell.is-slim .gc-qty-group { background:transparent; padding:0; border:none; box-shadow:none; color:var(--text-faint); }
.goods-cell.is-slim .gc-qty { font-size:11px; color:var(--text-faint); }
.goods-cell.is-slim .gc-unit { font-size:10px; color:var(--text-faint); }
.goods-cell.is-slim .gc-spec-prices { display:none; }
.goods-cell.is-slim .gc-switch { display:none; }
.goods-cell.has-qty { border-color:var(--primary); background:linear-gradient(135deg,#fdba74,#fb923c); box-shadow:0 4px 14px rgba(249,115,22,.28), inset 0 1px 1px rgba(255,255,255,.35); opacity:1; }
.goods-cell.has-qty .gc-name { color:#7c2d12; text-shadow:0 1px 0 rgba(255,255,255,.35); }
.goods-cell.has-qty .gc-qty-group { display:inline-flex; align-items:baseline; gap:1px; background:linear-gradient(135deg,#f97316,#ea580c); color:#fff7ed; padding:2px 8px; border-radius:8px; box-shadow:0 2px 6px rgba(124,45,18,.3), inset 0 1px 1px rgba(255,255,255,.28); line-height:1; border:1px solid rgba(154,52,18,.35); }
.goods-cell.has-qty .gc-qty { color:#fff7ed; font-size:19px; font-weight:900; letter-spacing:0; -webkit-text-stroke:0; text-shadow:0 1px 2px rgba(124,45,18,.45); padding:0; line-height:1; }
.goods-cell.has-qty .gc-unit { color:#ffedd5; font-size:11px; font-weight:800; }
.goods-cell.has-qty .gc-price { color:#fffbeb; background:linear-gradient(135deg,#f59e0b,#d97706); border-color:rgba(120,53,15,.25); text-shadow:0 1px 2px rgba(0,0,0,.25); box-shadow:0 2px 5px rgba(180,83,9,.25); transform:scale(1.03); }
.goods-cell.reserved:not(.has-qty) { opacity:.38; border-style:dashed; }
.goods-cell.reserved.has-qty { opacity:1; border-style:solid; }
.gc-top {
  display:inline-flex;
  align-items:baseline;
  justify-content:center;
  gap:5px;
  flex-wrap:nowrap;
  max-width:100%;
  white-space:nowrap;
  word-break:keep-all;
  line-height:1.15;
}
/* 商品名、规格标记、数量和单位是一个不可拆分的水平信息行，禁止中文逐字竖排。 */
.gc-name { display:inline-flex; align-items:center; flex:none; min-width:0; white-space:nowrap; word-break:keep-all; font-size:13px; font-weight:800; color:var(--text); }
.gc-qty-group { display:inline-flex; align-items:baseline; gap:1px; flex:none; white-space:nowrap; word-break:keep-all; }
.gc-qty { font-size:19px; font-weight:900; color:var(--primary); }
.gc-unit { font-size:11px; color:var(--text-soft); white-space:nowrap; }
.gc-price { display:inline-flex; align-items:center; gap:2px; font-size:14px; font-weight:900; color:#92400e; background:linear-gradient(135deg,#fef3c7,#fde68a); padding:2px 8px; border-radius:999px; line-height:1.2; white-space:nowrap; box-shadow:0 1px 3px rgba(0,0,0,.12); border:1px solid rgba(217,119,6,.15); text-shadow:none; transition:all .15s; }
/* 有数量的格子：隐藏切换按钮（已确定货物，不需要换） */
.goods-cell.has-qty .gc-switch { display:none; }
/* 无数量的格子：切换按钮 —— 底部横条，高度为格子一半，左右铺满到边框 */
.goods-cell:not(.has-qty) .gc-switch { position:absolute; bottom:-2px; left:-2px; right:-2px; width:calc(100% + 4px); height:50%; font-size:12px; font-weight:900; color:var(--primary); background:linear-gradient(135deg,#fff7ed,#ffedd5); border:none; border-top:1px solid #fed7aa; border-radius:0 0 10px 10px; cursor:pointer; transition:all .15s; line-height:1.2; opacity:.9; display:flex; align-items:center; justify-content:center; box-sizing:border-box; }
.goods-cell:not(.has-qty) .gc-switch:hover { background:linear-gradient(135deg,#ffedd5,#fed7aa); color:#c2410c; opacity:1; }
.bw-tag { display:inline-block; font-size:8px; background:#fef3c7; color:#92400e; padding:0 3px; border-radius:3px; margin-left:2px; font-weight:600; }
/* 斩件标记：琥珀橙底，与称重(bw-tag)区分；独占一行、上下留白便于识别 */
.chop-tag { display:inline-flex; align-items:center; justify-content:center; font-size:11px; line-height:1; background:#ffedd5; color:#c2410c; padding:4px 8px; border-radius:6px; font-weight:800; border:1px solid #fdba74; letter-spacing:.5px; }
.gc-chop-row { display:flex; justify-content:center; margin-top:3px; }
.trip-chop { display:inline-flex; align-items:center; gap:4px; font-size:11px; background:#fff7ed; color:#c2410c; border:1px solid #fed7aa; padding:2px 8px; border-radius:999px; font-weight:600; }
.trip-chop b { color:#9a3412; }
.rp-chip-chop { display:block; font-size:10px; color:#c2410c; font-weight:600; margin-top:2px; }
.rp-chip-chop b { color:#9a3412; }
.chip-chop { font-style:normal; font-size:9px; background:#ffedd5; color:#c2410c; padding:0 4px; border-radius:3px; margin-left:3px; font-weight:700; }

/* 锁定小图标与锁定状态 */
.lock-icon { display:inline-flex; align-items:center; justify-content:center; font-size:11px; margin-right:3px; opacity:.9; }
.quantity-lock-icon { display:inline-flex; align-items:center; justify-content:center; margin-right:3px; font-size:10px; color:#9d174d; }
.alternate-delivery-icon { display:inline-flex; align-items:center; justify-content:center; margin-right:4px; padding:0 4px; border-radius:999px; background:#e0f2fe; color:#075985; border:1px solid #7dd3fc; font-size:9px; line-height:1.4; font-weight:900; }
.goods-cell.quantity-locked { border-color:#f472b6; box-shadow:inset 0 0 0 1px rgba(244,114,182,.16); }
.goods-cell.quantity-locked:hover { border-color:#db2777; box-shadow:0 2px 6px rgba(219,39,119,.18); }
.goods-cell.alternate-delivery { border-color:#38bdf8; box-shadow:inset 0 0 0 1px rgba(56,189,248,.18); }
.goods-cell.alternate-delivery:hover { border-color:#0284c7; box-shadow:0 2px 6px rgba(2,132,199,.18); }
.quantity-locked-input:disabled { opacity:1; cursor:not-allowed; color:#075985; background:#f0f9ff; border-color:#7dd3fc; font-weight:800; }
.lock-icon.notes-lock { position:absolute; top:-6px; right:-6px; z-index:2; width:18px; height:18px; background:#fee2e2; border:1px solid #f87171; border-radius:50%; }
.goods-cell.locked .gc-price { color:#fff; background:linear-gradient(135deg,#f87171,#ef4444); border-color:rgba(153,27,27,.25); text-shadow:0 1px 2px rgba(0,0,0,.2); box-shadow:0 1px 3px rgba(220,38,38,.2); }
.goods-cell.locked:hover { border-color:#f87171; box-shadow:0 2px 6px rgba(248,113,113,.2); }
.quick-note-input.locked { background:linear-gradient(135deg,#e5e7eb,#d1d5db) !important; border-color:#9ca3af !important; color:#4b5563 !important; cursor:not-allowed; }
.note-textarea.locked { background:var(--surface) !important; color:var(--text-soft) !important; cursor:not-allowed; opacity:.85; }
.photo-thumb.locked { opacity:.85; cursor:not-allowed; background:var(--surface); }
.photo-thumb.locked .photo-add { color:#9ca3af; }
.mc-notes { position:relative; }

/* ===================== 趟次弹窗：配送商家排序列表 ===================== */
.trip-section-header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:14px 0 8px; }
.trip-section-title { font-size:13px; color:var(--text-soft); font-weight:700; }
.trip-section-header .btn { white-space:nowrap; }

.trip-seq-container { border:1px solid var(--border); border-radius:14px; padding:10px; min-height:64px; background:var(--bg); }
.trip-seq-empty { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; padding:18px 10px; color:var(--text-soft); text-align:center; }
.trip-seq-empty-icon { font-size:28px; line-height:1; opacity:.7; }
.trip-seq-empty-title { font-size:14px; font-weight:700; }
.trip-seq-empty-sub { font-size:12px; opacity:.75; }

.trip-seq-item { display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:12px; margin-bottom:8px; transition:transform .15s, box-shadow .15s, border-color .15s; }
.trip-seq-item:last-child { margin-bottom:0; }
.trip-seq-item:hover { transform:translateY(-1px); box-shadow:0 4px 14px rgba(0,0,0,.08); border-color:var(--primary); }
.trip-seq-item .trip-seq-no { flex:none; width:28px; height:28px; border-radius:50%; display:grid; place-items:center; background:linear-gradient(135deg,var(--primary),var(--primary-2)); color:#fff; font-size:12px; font-weight:900; box-shadow:0 2px 6px rgba(249,115,22,.35); }
.trip-seq-info { flex:1; min-width:0; display:flex; flex-direction:column; gap:3px; }
.trip-seq-name { font-size:14px; font-weight:800; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; cursor:pointer; }
.trip-seq-name:hover { color:var(--primary); }
.trip-seq-meta { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.trip-seq-region { font-size:11px; color:var(--text-soft); background:var(--surface); padding:1px 6px; border-radius:999px; border:1px solid var(--border); }
.trip-seq-badge { font-size:10px; color:var(--text-soft); background:var(--surface); padding:1px 5px; border-radius:6px; border:1px solid var(--border); }
.trip-seq-badge.ok { color:#15803d; background:#dcfce7; border-color:#86efac; }
.trip-seq-badge.warn { color:#991b1b; background:#fee2e2; border-color:#fca5a5; }
.trip-seq-actions { flex:none; display:flex; align-items:center; gap:5px; }
.trip-seq-actions .btn { width:32px; height:32px; padding:0; }

/* ghost 危险按钮：用于弹窗内「从本趟移除」等轻量删除操作 */
.btn.ghost.danger { color:var(--danger); border-color:rgba(239,68,68,.35); background:transparent; }
.btn.ghost.danger:hover { background:rgba(239,68,68,.08); border-color:rgba(239,68,68,.55); color:#dc2626; }

/* merchant-combo 计数标签状态 */
.merchant-combo-count { display:inline-flex; align-items:center; font-size:11px; font-weight:700; padding:2px 8px; border-radius:999px; background:var(--surface); color:var(--text-soft); border:1px solid var(--border); flex-shrink:0; }
.merchant-combo-count.all-assigned { color:#15803d; background:#dcfce7; border-color:#86efac; }
.merchant-combo-count.has-available { color:var(--primary); background:#fff7ed; border-color:#fed7aa; }

/* 货物选择器弹窗 */
.goods-picker { display:grid; grid-template-columns:repeat(3, 1fr); gap:8px; margin:16px 0; }
.goods-option { position:relative; border:2px solid var(--border); border-radius:8px; padding:10px 8px; min-height:68px; text-align:center; cursor:pointer; transition:transform .16s cubic-bezier(.16,1,.3,1), border-color .16s, background-color .16s; background:var(--bg); }
.goods-option:hover { transform:translateY(-1px); border-color:var(--primary); background:color-mix(in srgb, var(--primary) 7%, var(--bg)); }
.goods-option.selected { border-color:var(--primary); background:color-mix(in srgb, var(--primary) 12%, var(--bg)); }
.go-name { display:block; font-size:13px; font-weight:800; color:var(--text); }
.go-unit { display:block; font-size:10px; color:var(--text-soft); margin-top:2px; }
.goods-option-edit { position:absolute; top:5px; right:5px; min-width:34px; min-height:26px; padding:3px 7px; border:1px solid color-mix(in srgb, var(--primary) 35%, var(--border)); border-radius:999px; background:var(--surface); color:var(--primary); font:700 11px/1 inherit; cursor:pointer; }
.goods-option-edit:hover { background:var(--primary); color:#fff; }
.goods-option-edit:focus-visible { outline:2px solid var(--primary); outline-offset:2px; }

/* ── 媒体区：2×2 格子右侧，上方备注框铺满剩余高度 + 下方商家照片严格 1:1 ──
 * 高度分配契约（2026-07-31）：商家照片按栏宽锁定正方形并退出高度竞争（flex:0 0 auto），
 * 卡片主行多出来的纵向空间全部由备注栏吸收，避免照片被拉成竖长条、备注被压成细线。 */
.mc-media { flex:1; min-width:0; min-height:0; display:flex; flex-direction:column; gap:8px; }
.mc-notes { flex:1 1 auto; display:flex; flex-direction:row; gap:6px; align-items:stretch; min-width:0; min-height:0; }
.note-textarea { flex:1 1 0; min-width:0; min-height:44px; max-height:none; padding:8px 10px; border:1px solid var(--border); border-radius:10px; font-size:14px; font-weight:500; background:var(--bg); color:var(--text); outline:none; transition:border-color .12s, box-shadow .12s; line-height:1.45; resize:none; text-align:left; word-wrap:break-word; font-family:inherit; overflow:auto; }
.note-textarea::placeholder { color:var(--text-faint); opacity:.6; font-size:14px; }
.note-textarea:focus { border-color:var(--primary); box-shadow:0 0 0 3px rgba(249,115,22,.15); }

/* 管理端备注：备注1 / 备注2 / 打包信息 横向一行三等分，与下方三张图片栏（.photo-thumb: calc(33.333% - 3px)、gap 4px）严格同轨对齐，文字水平居中（仅管理端趟次弹窗） */
.mc-notes.admin-notes { flex-direction:row; align-items:stretch; gap:4px; }
.mc-notes.admin-notes .note-textarea { flex:0 0 calc(33.333% - 3px); min-width:0; text-align:center; }

/* 照片区 —— 三张一排、每张严格 1:1（宽度决定高度），不再抢占备注栏的纵向空间 */
.mc-photos { flex:0 0 auto; min-width:0; min-height:0; display:flex; }
.photos-scroll { flex:1; display:flex; gap:4px; overflow-x:auto; scroll-snap-type:x mandatory; -webkit-overflow-scrolling:touch; scrollbar-width:none; padding-bottom:2px; min-height:0; align-items:flex-start; }
.photos-scroll::-webkit-scrollbar { display:none; }
.photo-thumb { flex:0 0 calc(33.333% - 3px); height:auto; min-height:0; max-height:none; aspect-ratio:1 / 1; border-radius:8px; overflow:hidden; cursor:pointer; position:relative; border:1px solid var(--border); background:var(--bg); display:flex; align-items:center; justify-content:center; transition:all .12s; scroll-snap-align:start; }
.photo-thumb:hover { border-color:var(--primary); }
.photo-thumb img { width:100%; height:100%; object-fit:cover; }
.photo-thumb .photo-add { font-size:18px; line-height:1; color:#d1d5db; font-weight:300; }
.photo-thumb .photo-del { position:absolute; top:4px; right:4px; width:18px; height:18px; border-radius:50%; background:rgba(0,0,0,.5); color:#fff; border:none; font-size:10px; cursor:pointer; display:none; align-items:center; justify-content:center; line-height:1; padding:0; }
.photo-thumb:hover .photo-del { display:flex; }

/* 导航点（操作区按钮组内） */
.nav-point { display:inline-flex; align-items:center; gap:4px; padding:4px 10px; border-radius:14px; background:linear-gradient(135deg,var(--primary),var(--primary-2)); color:#fff; text-decoration:none; font-size:11px; font-weight:600; transition:all .12s; box-shadow:0 1px 4px rgba(249,115,22,.2); }
.nav-point:hover { transform:translateY(-1px); box-shadow:0 2px 6px rgba(249,115,22,.3); }
.nav-point.disabled { background:#e5e7eb; color:#9ca3af; cursor:not-allowed; box-shadow:none; }
.nav-point.nav-blocked { background:linear-gradient(135deg,#ef4444,#dc2626); color:#fff; cursor:pointer; box-shadow:0 1px 4px rgba(220,38,38,.25); }
.nav-point.nav-blocked:hover { transform:translateY(-1px); box-shadow:0 2px 6px rgba(220,38,38,.35); }
.nav-point .nav-icon { font-size:12px; }

/* 响应式：窄屏自动折行，等高对齐语义失效，恢复自然高度 */
@media (max-width:768px) {
  .mc-main-row { flex-wrap:wrap; align-items:flex-start; }
  .mc-info { flex:1 1 100%; align-self:auto; }
  .mc-name { flex:none; }
  .mc-quick-notes { flex:0 0 auto; }
  .quick-note-input { flex:0 0 auto; min-height:36px; }
  .mc-center-block { flex:1 1 100%; order:3; flex-direction:column; }
  .mc-center-block .mc-goods { flex:0 0 auto; width:100%; }
  .mc-center-block .mc-media { flex:0 0 auto; width:100%; }
  .mc-actions { flex:none; width:100%; order:4; flex-direction:row; flex-wrap:wrap; justify-content:flex-end; align-self:auto; }
  .mc-actions > .btn,
  .mc-actions > .nav-point,
  .mc-actions > .mc-sort,
  .mc-actions > .mc-del,
  .mc-actions > .merchant-lock-toggle,
  .mc-actions > .merchant-quantity-lock-toggle,
  .mc-actions > .merchant-alternate-delivery-toggle,
  .mc-actions > .merchant-complaint-btn { width:auto; }
  .mc-actions > .nav-point { flex:none; }
  .mc-sort { width:auto; }
  .merchant-card .goods-grid { width:100%; max-width:none; height:auto; grid-template-columns:repeat(2, minmax(116px, 1fr)); }
  .goods-cell { min-height:44px; }
  .gc-top { gap:4px; }
  .gc-name { font-size:12.5px; }
  .gc-qty { font-size:17px; }
  .goods-cell.has-qty .gc-qty-group { padding:1px 5px; border-radius:6px; }
  .goods-cell.has-qty .gc-qty { font-size:17px; }

  .rider-merchant-card.has-weigh-goods .mc-center-block {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .rider-merchant-card.has-weigh-goods .goods-grid {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rider-merchant-card.has-weigh-goods .mc-notes,
  .rider-merchant-card.has-weigh-goods .photos-scroll {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .rider-merchant-card.has-weigh-goods .mc-notes .note-textarea {
    min-height: 58px;
    font-size: 13px;
  }
}

@media (max-width:480px) {
  .merchant-card .goods-grid { grid-template-columns: 1fr; }
  .rider-merchant-card.has-weigh-goods .goods-grid { grid-template-columns: 1fr; }
  .rider-merchant-card.has-weigh-goods .mc-notes,
  .rider-merchant-card.has-weigh-goods .photos-scroll { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 备注可跨列拉通换行，但照片必须保持 1:1，最后一张不跨列以免被拉成宽扁图 */
  .rider-merchant-card.has-weigh-goods .mc-notes .note-textarea:last-child { grid-column: 1 / -1; }
}

/* 筛选条 */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.filters .f { display: flex; flex-direction: column; gap: 4px; }
.filters label { margin: 0; }

/* 50米商家身份人工复核 */
.merchant-identity-review-section { margin-top: 18px; padding: 18px; border: 1px solid var(--border); }
.merchant-identity-review-section .expansion-band-head { align-items: center; }
.merchant-identity-review-summary { display: grid; gap: 10px; margin-top: 14px; }
.merchant-identity-review-summary > p { margin: 0; color: var(--text-soft); font-size: 13px; }
.merchant-identity-head-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.merchant-identity-counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.merchant-identity-auto-list { display: grid; gap: 8px; max-height: min(62vh, 680px); overflow: auto; }
.merchant-identity-auto-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-solid); }
.merchant-identity-auto-row > div { display: grid; gap: 5px; }
.merchant-identity-auto-row > div:last-child { grid-auto-flow: column; align-items: center; }
.merchant-identity-auto-row span { color: var(--text-soft); font-size: 12px; }
.merchant-identity-filter { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); color: var(--text); cursor: pointer; transition: transform .2s cubic-bezier(.16,1,.3,1), border-color .2s ease; }
.merchant-identity-filter:hover { transform: translateY(-2px); border-color: var(--primary); }
.merchant-identity-filter.active { border-color: var(--primary); background: var(--primary-soft); }
.merchant-identity-filter strong { font-size: 24px; }
.merchant-identity-filter span { font-size: 12px; color: var(--text-soft); }
.merchant-identity-stats { padding: 8px 12px; border: 1px dashed var(--border); border-radius: 10px; background: var(--card); color: var(--text-soft); font-size: 12px; line-height: 1.6; word-break: break-all; }
.merchant-identity-queue { display: grid; gap: 14px; }
.merchant-identity-queue > p { margin: 0; color: var(--text-soft); }
.merchant-identity-queue-list { display: grid; gap: 8px; max-height: 52vh; overflow: auto; padding-right: 4px; }
.merchant-identity-row { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); color: var(--text); text-align: left; cursor: pointer; transition: transform .18s cubic-bezier(.16,1,.3,1), border-color .18s ease; }
.merchant-identity-row:hover { transform: translateY(-2px); border-color: var(--primary); }
.merchant-identity-row > span { display: flex; align-items: center; gap: 8px; min-width: 0; }
.merchant-identity-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.merchant-identity-row em { color: var(--primary); font-style: normal; }
.merchant-identity-row small { white-space: nowrap; color: var(--text-soft); display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/* 结论去向徽章：让「两家均已保留 / 已剔除潜客」在行上一眼可见，避免误读为只剩一个 */
.mir-outcome { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--bg); color: var(--text-soft); border: 1px solid var(--border); }
.mir-outcome-different { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.mir-outcome-same { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.merchant-identity-dialog { display: grid; gap: 14px; }
/* 流水线进度条：粘顶常驻，证据页再长也能随时看到已判/剩余与「结束排查」 */
.merchant-identity-pipeline-meta { position: sticky; top: 0; z-index: 6; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); color: var(--text-soft); font-size: 12px; box-shadow: 0 6px 18px rgba(15, 23, 42, .06); }
.merchant-identity-pipeline-meta strong { color: var(--text); font-size: 14px; }
.merchant-identity-pipeline-meta .btn { margin-left: auto; }
.mip-inflight { color: var(--primary); font-weight: 700; }
.mip-failed { color: #b91c1c; font-weight: 700; }
/* 队列面板的流水线入口：按钮 + 说明文字同行，窄屏自动换行 */
.merchant-identity-pipeline-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px 14px; border: 1px solid var(--primary); border-radius: 12px; background: var(--primary-soft); }
.merchant-identity-pipeline-bar small { color: var(--text-soft); font-size: 12px; }
.merchant-identity-pipeline-bar .btn[disabled] { opacity: .5; cursor: not-allowed; }
.merchant-identity-dialog-intro, .merchant-identity-evidence { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--bg); color: var(--text-soft); }
.merchant-identity-evidence { font-size: 13px; }
.merchant-identity-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.merchant-identity-entity { min-width: 0; padding: 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); }
.merchant-identity-entity-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.merchant-identity-entity-head strong { font-size: 16px; }
.merchant-identity-entity-head span { flex: 0 0 auto; padding: 4px 8px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 11px; font-weight: 800; }
.merchant-identity-entity p { margin: 8px 0 0; line-height: 1.5; word-break: break-word; }
.merchant-identity-entity small { display: block; margin-top: 8px; color: var(--text-soft); word-break: break-word; }
.merchant-identity-town { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 4px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 800; }
.merchant-identity-sources { display: grid; gap: 7px; margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--border); }
.merchant-identity-sources-title { font-size: 12px; font-weight: 800; color: var(--text-soft); letter-spacing: .3px; }
.merchant-identity-source-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: start; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.mis-platform { flex: 0 0 auto; margin-top: 1px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; background: #eef2f7; color: #475569; }
.mis-detail { display: grid; gap: 2px; min-width: 0; font-size: 12px; line-height: 1.45; }
.mis-detail strong { font-size: 13px; word-break: break-word; }
.mis-detail small { margin-top: 0; color: var(--text-soft); word-break: break-word; }
.mis-tel { display: inline-block; margin-top: 2px; font-family: ui-monospace, monospace; color: var(--primary); font-weight: 700; }
.mis-tel-none { color: var(--text-soft); font-weight: 400; }
.merchant-identity-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.merchant-identity-photo { min-height: 90px; padding: 0; overflow: hidden; border: 0; border-radius: 10px; background: var(--bg); cursor: zoom-in; }
.merchant-identity-photo img { display: block; width: 100%; height: 100%; min-height: 90px; object-fit: cover; }
.merchant-identity-no-photo { display: grid; place-items: center; min-height: 90px; margin-top: 12px; border: 1px dashed var(--border); border-radius: 10px; color: var(--text-soft); font-size: 12px; }
/* 50米排查：两家定位点同图比对（全屏弹窗内） */
.merchant-identity-map-wrap { position: relative; display: grid; gap: 8px; }
.merchant-identity-map { width: 100%; height: 46vh; min-height: 320px; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--bg); }
.merchant-identity-map-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 12px; color: var(--text-soft); }
.mir-dot { display: inline-block; width: 11px; height: 11px; margin-right: 5px; border-radius: 50%; vertical-align: -1px; }
.mir-dot-left { background: #2563eb; }
.mir-dot-right { background: #e11d48; }
/* 无坐标提示层：绝对定位覆盖在地图容器上（dock 结构恒定，切家只切显隐） */
.merchant-identity-map-empty { position: absolute; top: 0; left: 0; right: 0; height: 46vh; min-height: 320px; display: grid; place-items: center; padding: 16px; border: 1px dashed var(--border); border-radius: 14px; color: var(--text-soft); font-size: 13px; text-align: center; background: var(--bg); z-index: 2; }
.mir-marker { display: flex; flex-direction: column; align-items: center; transform: translateY(-2px); }
.mir-marker-pin { width: 22px; height: 22px; border: 3px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.mir-marker-left .mir-marker-pin { background: #2563eb; }
.mir-marker-right .mir-marker-pin { background: #e11d48; }
.mir-marker-name { margin-top: 4px; max-width: 140px; padding: 3px 8px; border-radius: 8px; background: rgba(255,255,255,.95); color: #111; font-size: 11px; font-weight: 700; line-height: 1.3; text-align: center; box-shadow: 0 1px 5px rgba(0,0,0,.22); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.merchant-identity-note { display: grid; gap: 7px; font-weight: 800; }
.merchant-identity-note textarea { width: 100%; resize: vertical; padding: 11px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); color: var(--text); }
.merchant-identity-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.merchant-identity-history { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.merchant-identity-history > div { display: grid; grid-template-columns: auto auto; gap: 5px 10px; padding: 10px; border-radius: 10px; background: var(--bg); }
.merchant-identity-history span { font-weight: 800; color: var(--primary); }
.merchant-identity-history time { justify-self: end; color: var(--text-soft); font-size: 12px; }
.merchant-identity-history p { grid-column: 1 / -1; margin: 0; color: var(--text-soft); }
@media (max-width: 720px) {
  .merchant-identity-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .merchant-identity-compare { grid-template-columns: 1fr; }
  .merchant-identity-row { grid-template-columns: 1fr; }
  .merchant-identity-row small { white-space: normal; }
  .merchant-identity-actions { display: grid; grid-template-columns: 1fr; }
}

/* 模态 */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: none; place-items: center; z-index: 60; padding: 20px; opacity: 0; transition: opacity .2s ease; }
.modal-mask.show { display: grid; opacity: 1; }
.modal { width: 100%; max-width: 520px; max-height: 86vh; overflow: auto; padding: 24px; transform: scale(0.96) translateY(8px); opacity: 0; transition: transform .25s cubic-bezier(0.16,1,0.3,1), opacity .2s ease; }
.modal-mask.show .modal { transform: scale(1) translateY(0); opacity: 1; }
.modal.modal-wide { max-width: 760px; }
/* 全屏弹窗：用于地图类模态，让可视区域最大化 */
.modal.modal-fullscreen { max-width: none; max-height: none; width: 100%; height: 100%; display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.modal.modal-fullscreen .modal-header { flex-shrink: 0; margin: 0; padding: 16px 20px; }
.modal.modal-fullscreen .modal-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 20px 20px; }
.modal h3 { margin: 0 0 14px; }
.modal .row { display: flex; gap: 10px; flex-wrap: wrap; }
.modal .row > * { flex: 1; min-width: 140px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 80;
  background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 12px; font-size: 13px;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }

/* 商家投诉：三端共享按钮、全屏历史与图片预览 */
.merchant-complaint-btn {
  min-height: 38px; padding: 8px 10px; border: 1px solid rgba(190,24,93,.22); border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: none;
  background: rgba(253,242,248,.96); color: #be185d; font-weight: 800; cursor: pointer;
  box-shadow: 0 3px 10px rgba(190,24,93,.08); transition: transform .2s, box-shadow .2s, background .2s;
}
.merchant-complaint-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(190,24,93,.16); }
.merchant-complaint-btn b { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; display: inline-grid; place-items: center; background: #be185d; color: #fff; font-size: 11px; }
.merchant-complaint-btn.recent { border-color: #dc2626; background: #dc2626; color: #fff; box-shadow: 0 7px 18px rgba(220,38,38,.3); animation: complaint-alert-sway 2.8s ease-in-out infinite; transform-origin: 50% 100%; }
.merchant-complaint-btn.recent b { background: #fff; color: #dc2626; }
@keyframes complaint-alert-sway { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-2.2deg); } 75% { transform: rotate(2.2deg); } }

.complaint-shell { height: 100%; min-height: 0; display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 18px; }
.complaint-create-form { min-height: 0; overflow-y: auto; padding: 4px 12px 18px 2px; border-right: 1px solid var(--border); }
.complaint-create-form label { margin-top: 12px; font-weight: 700; }
.complaint-create-form label:first-child { margin-top: 0; }
.complaint-create-form label > span { display: block; margin-bottom: 7px; }
.complaint-create-form textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.complaint-create-form small { display: block; margin-top: 7px; color: var(--text-faint); line-height: 1.5; }
.complaint-submit { width: 100%; margin-top: 18px; }
.complaint-history { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.complaint-history:only-child { grid-column: 1 / -1; }
.complaint-history-head { flex: none; padding: 2px 4px 12px; border-bottom: 1px solid var(--border); }
.complaint-history-head > div { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.complaint-history-head b { font-size: 19px; color: #be185d; }
.complaint-history-head span { color: var(--text-soft); font-size: 13px; }
.complaint-list { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 8px 20px 2px; overscroll-behavior: contain; scrollbar-gutter: stable; }
.complaint-record { padding: 16px; margin-bottom: 12px; border: 1px solid var(--border); border-left: 4px solid #be185d; border-radius: 8px; background: var(--surface-solid); box-shadow: 0 4px 14px rgba(15,23,42,.06); }
.complaint-record-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.complaint-record-head time { color: #be185d; font-size: 16px; font-weight: 900; }
.complaint-record-head span { color: var(--text-faint); font-size: 11px; }
.complaint-record p { margin: 12px 0; color: var(--text); line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.complaint-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.complaint-photo { aspect-ratio: 4 / 3; min-width: 0; padding: 0; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; background: var(--bg); cursor: zoom-in; }
.complaint-photo img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .25s; }
.complaint-photo:hover img { transform: scale(1.04); }
.complaint-no-photo, .complaint-empty, .complaint-loading { padding: 24px; text-align: center; color: var(--text-faint); }
.complaint-no-photo { padding: 6px 0 0; text-align: left; font-size: 12px; }
.complaint-load-more { width: 100%; flex: none; }
.complaint-photo-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: rgba(3,7,18,.88); }
.complaint-photo-overlay img { max-width: 96vw; max-height: 92vh; object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.45); }
.complaint-photo-close { position: fixed; top: max(16px, env(safe-area-inset-top)); right: 18px; z-index: 1; width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(255,255,255,.95); color: #111827; font-size: 28px; cursor: pointer; }
.packing-seq-item > .merchant-complaint-btn { min-height: 34px; padding: 6px 9px; }

@media (max-width: 720px) {
  .modal-mask:has(.modal-fullscreen) { padding: 0; }
  .complaint-shell { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); gap: 10px; }
  .complaint-create-form { max-height: 38vh; padding: 0 4px 12px; border-right: 0; border-bottom: 1px solid var(--border); }
  .complaint-history-head b { font-size: 17px; }
  .complaint-record { padding: 13px; }
  .complaint-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .packing-seq-item { flex-wrap: wrap; }
  .packing-seq-item > .merchant-complaint-btn { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .merchant-complaint-btn.recent { animation: none; }
}

/* ── 弹窗美化 ── */
.modal-header { display:flex; align-items:center; gap:12px; margin-bottom:16px; padding-bottom:14px; border-bottom:1px solid var(--border); }
.modal-title-icon { width:40px; height:40px; border-radius:10px; background:linear-gradient(135deg,#eff6ff,#dbeafe); display:flex; align-items:center; justify-content:center; font-size:20px; flex-shrink:0; }
.modal-title { margin:0; font-size:17px; font-weight:800; color:var(--text); }
.modal-subtitle { margin:2px 0 0; font-size:12px; color:var(--text-soft); }
.modal-close { margin-left:auto; width:28px; height:28px; border-radius:8px; border:none; background:var(--bg); color:var(--text-soft); font-size:14px; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:all .15s; flex-shrink:0; }
.modal-close:hover { background:#fee2e2; color:#dc2626; }

.modal-search { flex:1; min-width:160px; position:relative; display:flex; align-items:center; }
.modal-search-icon { position:absolute; left:10px; font-size:13px; pointer-events:none; }
.modal-search input { width:100%; padding:8px 10px 8px 32px; border:1px solid var(--border); border-radius:8px; font-size:13px; background:var(--bg); color:var(--text); outline:none; transition:border-color .15s; }
.modal-search input:focus { border-color:var(--primary); }

.modal-body { min-height:80px; }
.modal-footer { display:flex; justify-content:flex-end; gap:8px; margin-top:16px; padding-top:14px; border-top:1px solid var(--border); }

/* ── 骑手管理弹窗 ── */
.rider-item { display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:10px; background:var(--bg); margin-bottom:6px; transition:all .15s; }
.rider-item:hover { background:var(--surface-solid); box-shadow:0 1px 4px rgba(0,0,0,.06); }
.rider-avatar { width:36px; height:36px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:16px; flex-shrink:0; }
.rider-avatar.admin { background:var(--primary-soft); color:var(--primary); }
.rider-avatar.rider { background:#dbeafe; color:#1e40af; }
.rider-avatar.packing { background:#fef3c7; color:#92400e; }
.rider-info { flex:1; min-width:0; }
.rider-name { font-size:14px; font-weight:700; color:var(--text); }
.rider-username { font-size:11px; color:var(--text-soft); font-family:monospace; margin-top:1px; }
.rider-role-tag { font-size:10px; font-weight:700; padding:3px 8px; border-radius:6px; }

/* ── 骑手自助新增商家 ── */
.rider-add-merchant-btn { display: block; width: 100%; margin: 10px 0 4px; border-style: dashed; font-weight: 700; }
.ram-form { display: flex; flex-direction: column; gap: 12px; }
.ram-tip { margin: 0; font-size: 13px; color: var(--text-soft); line-height: 1.6; }
.ram-pos { font-size: 13px; font-weight: 700; color: var(--text); padding: 10px 12px; background: var(--primary-soft); border: 1px solid rgba(249,115,22,.2); border-radius: 10px; }
.ram-field { display: grid; gap: 6px; font-size: 12px; font-weight: 700; color: var(--text-soft); }
.ram-field input { width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font: inherit; font-size: 14px; color: var(--text); background: var(--surface-solid); box-sizing: border-box; }
.ram-photo-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.ram-photo { position: relative; width: 92px; height: 92px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.ram-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ram-photo-del { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border: none; border-radius: 50%; background: rgba(15,23,42,.6); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
.ram-photo-add { display: grid; place-items: center; width: 92px; height: 92px; border: 2px dashed var(--border); border-radius: 12px; font-size: 13px; font-weight: 700; color: var(--text-soft); cursor: pointer; text-align: center; padding: 6px; box-sizing: border-box; }
.ram-photo-add:active { background: var(--primary-soft); }
.ram-actions { display: flex; justify-content: flex-end; margin-top: 4px; }
.ram-paste-row { display: flex; gap: 8px; align-items: center; }
.ram-paste-row input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font: inherit; font-size: 13px; color: var(--text); background: var(--surface-solid); box-sizing: border-box; }
.ram-paste-row .btn { flex: 0 0 auto; }
.ram-or { text-align: center; font-size: 12px; color: var(--text-soft); position: relative; margin: 2px 0; }
.ram-or::before, .ram-or::after { content: ''; position: absolute; top: 50%; width: 40%; height: 1px; background: var(--border); }
.ram-or::before { left: 0; } .ram-or::after { right: 0; }
.ram-loc-row { display: flex; gap: 10px; }
.ram-loc-row .btn { flex: 1; min-width: 0; }
.rider-role-tag.admin { background:var(--primary-soft); color:var(--primary); }
.rider-role-tag.rider { background:#dbeafe; color:#1e40af; }
.rider-role-tag.packing { background:#fef3c7; color:#92400e; }
.rider-item-actions { display:flex; align-items:center; gap:4px; flex-shrink:0; }
.rider-edit-btn,
.rider-del-btn { min-width:42px; height:30px; padding:0 9px; border-radius:6px; border:none; background:transparent; color:var(--text-soft); font:inherit; font-size:12px; font-weight:700; cursor:pointer; opacity:0; transition:all .15s; display:inline-flex; align-items:center; justify-content:center; }
.rider-item:hover .rider-edit-btn,
.rider-item:hover .rider-del-btn { opacity:1; }
.rider-edit-btn:hover { background:#dbeafe; }
.rider-del-btn:hover { background:#fee2e2; }
@media (hover:none) {
  .rider-edit-btn,
  .rider-del-btn { opacity:0.75; }
}

/* ── 新增账号表单 ── */
.modal-form { display:flex; flex-direction:column; gap:14px; }
.form-group { display:flex; flex-direction:column; gap:5px; }
.form-row { display:flex; gap:10px; }
.form-row .form-group { flex:1; }
.form-row .region-field-district,
.form-row .region-field-town { transition: opacity .15s ease, flex .15s ease; }
.form-row .region-field-district[style*="none"],
.form-row .region-field-town[style*="none"] { opacity: 0; flex: 0 0 0 !important; min-width: 0; overflow: hidden; }
.form-row .region-field-town:only-child .form-label { color: #b45309; font-weight: 800; }
.form-row .region-field-town:only-child .region-combo-trigger { border-color: #f59e0b; }
.form-label { font-size:12px; font-weight:700; color:var(--text-soft); }
.form-input { padding:8px 12px; border:1px solid var(--border); border-radius:8px; font-size:14px; background:var(--bg); color:var(--text); outline:none; transition:border-color .15s; }
.form-input:focus { border-color:var(--primary); box-shadow:0 0 0 3px rgba(249,115,22,.1); }
.form-hint { font-size:12px; color:var(--text-soft); background:var(--surface-solid); padding:10px 12px; border-radius:8px; line-height:1.6; }
.form-radio-group { display:flex; gap:8px; }
.form-radio { display:flex; align-items:center; gap:6px; padding:8px 14px; border:2px solid var(--border); border-radius:8px; cursor:pointer; transition:all .15s; }
.form-radio:has(input:checked) { border-color:var(--primary); background:#eff6ff; }
.form-radio.disabled { opacity:.6; cursor:not-allowed; background:var(--surface); border-color:var(--border); }
.form-radio input { display:none; }
.form-radio-label { font-size:13px; font-weight:600; color:var(--text); }

/* ── 数据健康度弹窗 ── */
.health-stats-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-bottom:16px; }
.health-stat-card { background:var(--bg); border-radius:10px; padding:12px; text-align:center; }
.health-stat-value { font-size:20px; font-weight:900; color:var(--text); }
.health-stat-label { font-size:11px; color:var(--text-soft); margin-top:2px; }
.health-section { background:var(--bg); border-radius:10px; padding:12px; margin-bottom:10px; }
.health-section.warn { background:#fef2f2; border:1px solid #fecaca; }
.health-section.ok { background:#f0fdf4; border:1px solid #bbf7d0; }
.health-section-header { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.health-section-title { font-size:13px; font-weight:800; color:var(--text); }
.health-section-badge { margin-left:auto; font-size:10px; font-weight:700; padding:2px 8px; border-radius:6px; }
.health-section-badge.ok { background:#dcfce7; color:#166534; }
.health-section-badge.warn { background:#fee2e2; color:#dc2626; }
.health-section-desc { font-size:12px; color:var(--text-soft); margin:0; line-height:1.6; }
.health-dead-list { max-height:120px; overflow-y:auto; background:var(--bg); padding:8px; border-radius:6px; margin-top:8px; font-size:12px; line-height:1.8; }
.health-dead-item { color:var(--text-soft); }
.health-actions { display:flex; gap:8px; margin-top:8px; }
.health-tip { background:#fffbeb; border:1px solid #fde68a; border-radius:10px; padding:10px 12px; font-size:12px; color:#92400e; line-height:1.7; margin-top:12px; }

/* ── 今日数据总览：核心汇总卡片统一平铺 ── */
.summary-row { display:flex; gap:12px; align-items:stretch; }
.summary-row > #summaryGrid { flex:1 1 100%; min-width:0; }
.summary-row #summaryGrid { display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap:12px; }
.summary-row #summaryGrid .card { min-width:0; }
@media (max-width: 880px) {
  .summary-row #summaryGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .summary-row #summaryGrid { grid-template-columns: 1fr; }
}

/* ── 数据备份板块 ── */
.backup-management-section { padding:0 0 40px; }
.backup-management-header { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:18px; }
.backup-management-header h2 { margin:0; }
.backup-management-subtitle { display:block; margin-top:5px; color:var(--text-soft); font-size:13px; }
.backup-loading { min-height:180px; display:grid; place-items:center; color:var(--text-faint); }
.backup-error { color:var(--danger); }
.backup-management-section .health-stats-grid { margin-bottom:16px; }
.backup-management-section .health-stat-card { border:1px solid var(--border); box-shadow:var(--shadow-sm); }
.backup-management-section .health-map-status { font-size:16px; }
.backup-management-section .health-section { box-shadow:var(--shadow-sm); }
.backup-management-section .health-section + .health-section { margin-top:12px; }
.backup-management-section .health-actions { margin-top:12px; }
@media (max-width:720px) {
  .backup-management-header { align-items:stretch; flex-direction:column; }
  .backup-management-header .btn { width:100%; }
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }

.empty:not(input):not(textarea):not(.photo-thumb):not(.psi-note) { text-align: center; color: var(--text-faint); padding: 40px; font-size: 14px; }
.muted { color: var(--text-faint); font-size: 12px; }

/* ===================== 效率评估面板 ===================== */

/* 个人卡片（玻璃质感，与全局 .glass 保持一致） */
.eff-card {
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  transition: transform .2s cubic-bezier(.16,1,.3,1), box-shadow .2s, border-color .2s;
}
.eff-card:hover { transform: translateY(-2px); box-shadow: 0 16px 44px rgba(15,23,42,.16); }
.eff-card-head {
  display: flex; align-items: center; gap: 9px;
  font-size: 16px; font-weight: 900; color: var(--text);
  margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.eff-card-head::before {
  content: ''; flex: none; width: 10px; height: 10px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 0 0 4px var(--primary-soft);
}

/* 通用 标签 / 数值 行 */
.eff-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 13px; }
.eff-row + .eff-row { border-top: 1px dashed var(--border); }
.eff-row > span { color: var(--text-soft); font-weight: 600; }
.eff-row > b { color: var(--text); font-weight: 800; font-variant-numeric: tabular-nums; }

/* 趟次内层块 */
.eff-trip { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-solid); border: 1px solid var(--border); }
.eff-trip + .eff-trip { margin-top: 10px; }
.eff-trip-head {
  font-size: 13.5px; font-weight: 900; color: var(--primary);
  margin-bottom: 8px; padding-left: 10px; border-left: 3px solid var(--primary); line-height: 1.3;
}
.eff-sub {
  font-size: 11.5px; font-weight: 800; color: var(--text-faint);
  text-transform: uppercase; letter-spacing: .5px; margin: 10px 0 6px;
}
.eff-muted { font-size: 12.5px; color: var(--text-faint); padding: 8px 0; }

/* 商家送达记录 */
.eff-arr { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; }
.eff-arr + .eff-arr { border-top: 1px solid var(--border); }
.eff-seq {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff; font-size: 12px; font-weight: 900;
}
.eff-arr-body { flex: 1; min-width: 0; }
.eff-arr-name { font-size: 13px; font-weight: 700; color: var(--text); }
.eff-arr-addr { font-size: 11.5px; color: var(--text-soft); margin-top: 2px; line-height: 1.4; word-break: break-word; }
.eff-arr-time { font-size: 11.5px; color: var(--ok); font-weight: 700; margin-top: 3px; }

/* 段导航用时 / 匀速 */
.eff-seg {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 6px 10px; margin-top: 6px; border-radius: 10px;
  background: var(--bg); font-size: 12px; color: var(--text-soft);
}
.eff-seg-meta { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* 配送匀速 / 打包速率 高亮条 */
.eff-avg {
  margin-top: 10px; padding: 8px 12px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-soft), rgba(244,114,182,.12));
  border: 1px solid var(--border);
  font-size: 12.5px; font-weight: 700; color: var(--text-soft); text-align: center;
}
.eff-avg b { font-size: 15px; color: var(--primary); font-weight: 900; }

/* ================= 骑手端：定位状态提示（授权、监听、上报分别可诊断） ================= */
.rider-loc-card { margin: 12px 0 4px; padding: 0; border-radius: 16px; display: none; }
.rider-loc-card:not(.hidden) { display: block; }
.rlc-prompt { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: none; background: transparent; color: var(--text); text-align: left; font: inherit; border-radius: 16px; }
.rlc-prompt-icon { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--primary-2); box-shadow: 0 0 0 5px rgba(236,72,153,.12); }
.rlc-prompt-text { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 3px; }
.rlc-prompt-title { font-size: 14.5px; font-weight: 800; color: var(--primary); }
.rlc-prompt-sub { font-size: 12px; color: var(--text-faint); line-height: 1.45; }
.rlc-action { flex: none; border: 1px solid var(--primary); border-radius: 8px; padding: 7px 11px; background: var(--primary); color: #fff; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; transition: filter .2s, transform .2s cubic-bezier(.16,1,.3,1); }
.rlc-action:hover { filter: brightness(1.04); transform: translateY(-1px); }
.rlc-action:disabled { opacity: .65; cursor: wait; transform: none; }
.rlc-prompt [class*="rlc-state-"] .rlc-prompt-title { color: var(--danger); }
@media (max-width: 640px) { .rlc-prompt { align-items: flex-start; padding: 12px; } .rlc-action { margin-top: 1px; } }

/* ================= 管理端：骑手定位记录 ================= */
.rider-loc-section h2 {
  flex-wrap: wrap;
  row-gap: 10px;
  padding-bottom: 4px;
}
.rider-loc-meta {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-faint);
}
.rider-loc-filter {
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.rider-loc-filter:hover, .rider-loc-filter:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); background: var(--bg); }
.rider-loc-date {
  margin-left: 8px;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.rider-loc-date:hover, .rider-loc-date:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); background: var(--bg); }
.admin-loc-log {
  margin-top: 10px;
  padding: 0;
  border-radius: 16px;
  max-height: min(58vh, 560px);
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}
.loc-head, .loc-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.6fr 1.3fr 1.5fr;
  gap: 10px;
  align-items: center;
  padding: 9px 14px;
}
.loc-head {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-faint);
  border-bottom: 1px solid var(--border);
  letter-spacing: .3px;
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.loc-row { border-bottom: 1px solid rgba(148,163,184,.14); transition: background .15s; }
.loc-row:last-child { border-bottom: none; }
.loc-row:hover { background: var(--primary-soft); }
.loc-time { display: flex; flex-direction: column; gap: 1px; align-items: flex-start; }
.loc-date { font-size: 11px; color: var(--text-faint); font-weight: 600; }
.loc-clock {
  font-size: 15.5px;
  font-weight: 900;
  color: #e11d48;
  letter-spacing: .3px;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}
.loc-rider { font-size: 14px; font-weight: 800; color: var(--text); }
.loc-coord { font-size: 12.5px; color: var(--text-soft); font-variant-numeric: tabular-nums; }
.loc-acc { color: var(--text-faint); margin-left: 4px; font-size: 11.5px; }
.loc-merchant { font-size: 14px; font-weight: 700; color: var(--primary); }
.loc-dist { display: flex; flex-wrap: wrap; gap: 6px; }
.loc-chip {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary);
  font-size: 12px; font-weight: 700;
}
.loc-chip.drive { background: rgba(34,197,94,.12); color: #15803d; }
.loc-muted { color: var(--text-faint); }
.loc-empty {
  padding: 28px 12px; text-align: center;
  color: var(--text-faint); font-size: 14px;
}

/* ================= 管理端：打包照片回顾（39 天留存） ================= */
.packing-photo-review-section h2 { flex-wrap: wrap; row-gap: 10px; padding-bottom: 4px; }
.packing-photo-review-section h2 small {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-faint);
}
.packing-photo-filters {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 14px;
  border-radius: 16px;
}
.ppf-field { display: flex; flex-direction: column; gap: 5px; min-width: 120px; }
.ppf-field label { font-size: 11px; font-weight: 800; color: var(--text-soft); }
.ppf-field input,
.ppf-field select {
  padding: 7px 11px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.ppf-field input:hover, .ppf-field input:focus,
.ppf-field select:hover, .ppf-field select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); background: var(--bg); }
.ppf-check { flex-direction: row; align-items: center; gap: 6px; padding-bottom: 7px; }
.ppf-check label { display: flex; align-items: center; gap: 5px; cursor: pointer; font-size: 12px; }
.ppf-check input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.packing-photo-grid {
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  max-height: min(640px, calc(100dvh - 250px));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}
.pp-review-empty {
  grid-column: 1 / -1;
  padding: 36px 12px;
  text-align: center;
  color: var(--text-faint);
  font-size: 14px;
  font-weight: 600;
}
.pp-review-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(15,23,42,0.05);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.pp-review-card:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(15,23,42,0.09); border-color: var(--primary-soft); }
.pp-review-card.expired { opacity: .6; }
.pp-review-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-solid);
  cursor: zoom-in;
}
.pp-review-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pp-review-ttl,
.pp-review-expired-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}
.pp-review-ttl { background: var(--primary-soft); color: var(--primary); }
.pp-review-expired-badge { background: rgba(100,116,139,.85); color: #fff; }
.pp-review-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pp-review-merchant { font-size: 14px; font-weight: 800; color: var(--text); }
.pp-review-watermark {
  font-size: 11px;
  color: var(--text-soft);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pp-review-sub { font-size: 11px; color: var(--text-faint); font-weight: 600; }
.pp-review-del {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(220,38,38,.85);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  opacity: 0;
  transition: opacity .12s ease, transform .12s ease;
}
.pp-review-card:hover .pp-review-del { opacity: 1; }
.pp-review-del:hover { transform: scale(1.08); background: #dc2626; }
@media (max-width: 640px) {
  .packing-photo-filters { flex-direction: column; align-items: stretch; }
  .ppf-field { min-width: 0; }
  .packing-photo-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pp-review-del { opacity: 1; }
}

/* ================= 管理端：骑手导航路线弹窗（高德地图） ================= */
.rider-loc-route-btn {
  margin-left: 10px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(225,29,72,.42);
  background: rgba(225,29,72,.12);
  color: #e11d48;
  font-size: 12.5px; font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .18s, transform .18s, box-shadow .18s;
}
.rider-loc-route-btn:hover { background: rgba(225,29,72,.22); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(225,29,72,.25); }
.rider-loc-route-btn:active { transform: translateY(0); }

/* ---------- 管理端：骑手导航路线弹窗（地图左 / 信息右） ---------- */
.rroute { display: flex; flex-direction: column; gap: 14px; height: 100%; }
.rroute-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; flex-shrink: 0; padding: 2px 2px 4px;
}
.rroute-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rroute-lab { font-size: 13px; font-weight: 700; color: var(--text-soft); white-space: nowrap; }
.rroute-sel {
  padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface-solid); color: var(--text); font-size: 13.5px; font-weight: 600;
  min-width: 120px; max-width: 220px;
}
.rroute-bar .route-refresh-btn { margin: 0; padding: 7px 14px; font-size: 12.5px; }

.rroute-body {
  display: flex; gap: 18px; flex: 1; min-height: 0; overflow: hidden;
}
.rroute-left {
  flex: 1.7; display: flex; flex-direction: column; min-width: 0; overflow: hidden;
}
.rroute-right {
  flex: 1; min-width: 340px; max-width: 420px; display: flex; flex-direction: column; gap: 12px;
  overflow-y: auto; overflow-x: hidden; padding-right: 4px;
}
.rroute-map {
  width: 100%; flex: 1; min-height: 280px; height: auto;
  border-radius: 16px; overflow: hidden; background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow);
}

/* 统一信息卡片：玻璃拟态 */
.rroute-card {
  background: var(--surface); backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--border); border-radius: 16px; padding: 14px;
  box-shadow: var(--shadow); flex-shrink: 0;
}
.rroute-card-title {
  font-size: 12.5px; font-weight: 800; color: var(--text-soft);
  margin-bottom: 10px; display: flex; align-items: center; gap: 6px; letter-spacing: .2px;
}

/* 路线概览 */
.rroute-info { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rroute-info .route-info { padding: 0; gap: 8px; }
.rroute-info .ri-row {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, var(--primary-soft), rgba(255,237,213,.85));
  padding: 8px 16px; border-radius: 14px; border: 1px solid rgba(249,115,22,.2);
  font-size: 13px; box-shadow: 0 2px 8px rgba(249,115,22,.08);
}
.rroute-info .ri-row-back { background: linear-gradient(135deg,#fdf2f8,#fce7f3); border-color: rgba(233,30,99,.3); }
.rroute-info .ri-label { color: #9a3412; font-size: 12px; font-weight: 700; }
.rroute-info .ri-val { color: var(--primary); font-weight: 800; font-size: 14px; min-width: 58px; text-align: center; }
.rroute-info .ri-back {
  color: #e91e63; background: transparent; border-radius: 0; padding: 0; min-width: auto;
  font-size: 17px; font-weight: 900; letter-spacing: 1px;
}
.rroute-meta { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.rroute-meta .route-filter-bar { margin: 0; }
.rroute-meta .route-nav-btn { margin: 0; align-self: flex-start; }
.rroute-meta .route-refresh-btn { margin: 0; align-self: flex-start; }

/* 图例 */
.rroute-legend { display: flex; flex-direction: column; gap: 7px; font-size: 12px; font-weight: 700; color: var(--text-soft); }
.rroute-legend .lg { display: inline-flex; align-items: center; gap: 8px; }
.rroute-legend .lg-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 2px rgba(255,255,255,.5); }
.rroute-legend .lg-star { color: var(--primary); font-size: 14px; line-height: 1; }

/* 空状态 */
.rroute-empty {
  height: 100%; min-height: 320px; display: flex; align-items: center; justify-content: center;
  color: var(--text-faint); font-size: 14px; text-align: center; padding: 20px;
}

/* 送货商家：玫红色标记 + 店名（浮于点位上方） */
.rm-pin { position: relative; width: 0; height: 0; }
.rm-dot {
  position: absolute; left: -14px; top: -14px;
  width: 28px; height: 28px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #fb7185, #e11d48);
  color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 13px;
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(225,29,72,.55);
}

/* 骑手定位点：天蓝色标记 + 记录时间（浮于点位上方） */
.sk-pin { position: relative; width: 0; height: 0; }
.sk-dot {
  position: absolute; left: -7px; top: -7px;
  width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #7dd3fc, #0ea5e9);
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(14,165,233,.55);
}
.sk-label {
  position: absolute; left: 50%; top: -7px;
  transform: translate(-50%, -100%); margin-top: -5px;
  background: rgba(14,165,233,.94); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 1.1;
  padding: 2px 5px; border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 2px 7px rgba(14,165,233,.45);
  font-variant-numeric: tabular-nums;
}

/* ================= 管理端：骑手配送效率统计（本趟 + 当日） ================= */
.rroute-stats { display: flex; flex-direction: column; gap: 12px; flex-shrink: 0; }
.rstat-card, .rday {
  background: var(--surface); border: 1px solid rgba(244,114,182,.18);
  border-radius: 14px; padding: 12px 14px;
  box-shadow: 0 2px 10px rgba(190,24,93,.06);
}
.rstat-head, .rday-head {
  font-size: 13px; font-weight: 800; color: var(--rose-deep, #be185d);
  margin-bottom: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.rstat-tag {
  font-size: 10.5px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #fb7185, #e11d48);
  padding: 3px 9px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08); line-height: 1.35; cursor: help;
}
.rstat-tag.warn { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #78350f; }
.rstat-tag.info { background: linear-gradient(135deg, #38bdf8, #0ea5e9); }
.rstat-grid, .rday-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 12px;
}
.rstat-item {
  display: flex; flex-direction: column; gap: 3px;
  background: rgba(244,114,182,.06); border-radius: 10px; padding: 8px 10px;
}
.rstat-item.big { background: linear-gradient(135deg, rgba(244,114,182,.16), rgba(225,29,72,.10)); }
.rstat-label { font-size: 11px; color: var(--text-faint); font-weight: 600; }
.rstat-value { font-size: 14px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.rstat-value.spd { font-size: 20px; color: var(--rose-deep, #be185d); }
.rday { background: rgba(225,29,72,.05); }
.rday-head { color: var(--text-soft); }
.rspd-title { font-size: 11.5px; font-weight: 700; color: var(--text-faint); margin: 12px 0 6px; }
.rspd-list { display: flex; flex-direction: column; gap: 6px; }
.rspd-row { display: grid; grid-template-columns: 54px 1fr 48px; align-items: center; gap: 8px; }
.rspd-name { font-size: 11.5px; font-weight: 700; color: var(--text-soft); }
.rspd-track { height: 10px; background: rgba(244,114,182,.14); border-radius: 999px; overflow: hidden; }
.rspd-bar { display: block; height: 100%; border-radius: 999px; transition: width .6s cubic-bezier(.16,1,.3,1); }
.rspd-bar.high { background: linear-gradient(90deg, #34d399, #16a34a); }
.rspd-bar.mid { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.rspd-bar.low { background: linear-gradient(90deg, #fb7185, #e11d48); }
.rspd-val { font-size: 11.5px; font-weight: 800; text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }

/* ================= 管理端：骑手月度 / 年度效率记录 ================= */
.rroute-eff { display: flex; flex-direction: column; gap: 12px; }
.reff-month, .reff-year {
  background: var(--surface); border: 1px solid rgba(244,114,182,.18);
  border-radius: 14px; padding: 12px 14px;
  box-shadow: 0 2px 10px rgba(190,24,93,.06);
}
.reff-head {
  font-size: 16px; font-weight: 800; color: var(--rose-deep, #be185d);
  margin-bottom: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.reff-sub {
  font-size: 13.5px; font-weight: 700; color: var(--text-faint);
  margin-left: auto;
}
.reff-empty {
  padding: 18px 4px; text-align: center;
  color: var(--text-faint); font-size: 16px;
}
.reff-table { display: flex; flex-direction: column; gap: 5px; }
.reff-row {
  display: grid; grid-template-columns: 64px 56px 76px 76px 64px;
  gap: 6px; align-items: center;
  padding: 7px 8px; border-radius: 8px;
  font-size: 15px; font-weight: 700; color: var(--text);
}
.reff-row:nth-child(even) { background: rgba(244,114,182,.06); }
.reff-row.head {
  font-size: 14px; font-weight: 800; color: var(--text-faint);
  background: transparent; border-bottom: 1px solid var(--border);
  border-radius: 0; padding-bottom: 5px;
}
.reff-spd { color: var(--rose-deep, #be185d); font-variant-numeric: tabular-nums; text-align: right; }
/* 移动端降级：固定 5 列 ~350px 在 ≤480px 屏溢出，改为等比收缩 */
@media (max-width: 480px) {
  .reff-row { grid-template-columns: repeat(5, minmax(0, 1fr)); font-size: 13px; gap: 4px; padding: 6px 4px; }
  .reff-row.head { font-size: 12px; }
}
.reff-bars { display: flex; flex-direction: column; gap: 7px; }
.reff-bar-row { display: grid; grid-template-columns: 44px 1fr 60px; align-items: center; gap: 8px; }
.reff-bar-name { font-size: 14.5px; font-weight: 700; color: var(--text-soft); }
.reff-bar-track { height: 10px; background: rgba(244,114,182,.14); border-radius: 999px; overflow: hidden; }
.reff-bar { display: block; height: 100%; border-radius: 999px; transition: width .6s cubic-bezier(.16,1,.3,1); }
.reff-bar.high { background: linear-gradient(90deg, #34d399, #16a34a); }
.reff-bar.mid { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.reff-bar.low { background: linear-gradient(90deg, #fb7185, #e11d48); }
.reff-bar-val { font-size: 14.5px; font-weight: 800; text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }
.reff-year-sum {
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; gap: 8px;
  font-size: 15px; font-weight: 800; color: var(--text-soft);
}
.reff-year-sum .reff-spd { font-size: 17px; }

@media (max-width: 760px) {
  .rlc-prompt { padding: 10px 12px; }
  .loc-head { display: none; }
  .loc-row {
    grid-template-columns: 1fr 1fr;
    gap: 4px 10px;
    padding: 10px 12px;
  }
  .loc-time { grid-column: 1 / -1; }
  .loc-dist { grid-column: 1 / -1; }
  .rroute-body { flex-direction: column; overflow: visible; gap: 14px; }
  .rroute-left { flex: none; height: 48vh; min-height: 260px; min-width: 0; }
  .rroute-right { max-width: none; min-width: 0; overflow: visible; }
  .rroute-controls { width: 100%; }
  .rroute-bar .route-refresh-btn { margin-left: auto; }
}

/* ===== 骑手端 / 打包端：我的效率 tab 导航（公共样式见「页面级选项卡」，此处仅保留容器宽度覆盖） ===== */
.app-tabs { width: fit-content; }
.hidden { display: none !important; }

/* 单栏容器下效率卡片间距微调（与管理端弹窗内一致观感） */
#tab-mine .rstat-card, #tab-mine .rday { margin-bottom: 12px; }
#tab-mine .reff-month, #tab-mine .reff-year { margin-top: 14px; }
#tab-mine .reff-head { margin-bottom: 8px; }

/* ================= 营业额 / 成本 / 纯利 / 称重 ================= */
.revenue-section { margin-top: 0; }
.rev-date { padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; background: var(--surface); color: var(--text); }
.rev-merchant-filter {
  width: min(220px, 28vw);
  min-width: 150px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}
.rev-merchant-filter:focus { outline: 2px solid rgba(249, 115, 22, .28); outline-offset: 1px; border-color: rgba(249, 115, 22, .55); }
@media (max-width: 640px) {
  .revenue-section .rev-merchant-filter { width: 100%; min-width: 0; }
}

/* 按镇经营分析 */
.town-revenue {
  position: relative;
  margin: 0 0 18px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .3);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(248,250,252,.92));
  box-shadow: 0 12px 28px rgba(15, 23, 42, .055), inset 0 1px 0 rgba(255,255,255,.95);
}
.town-revenue::before {
  content: '';
  position: absolute;
  top: -68px;
  right: -34px;
  width: 210px;
  height: 210px;
  border: 28px solid rgba(249, 115, 22, .055);
  border-radius: 50%;
  pointer-events: none;
}
.town-revenue::after {
  content: '';
  position: absolute;
  top: 0;
  left: 20px;
  width: 86px;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, #f97316, #f59e0b);
}
.town-revenue-head { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 19px; }
.town-revenue-title { min-width: 0; }
.town-revenue-eyebrow { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; color: #c2410c; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.town-revenue-live-dot { width: 7px; height: 7px; border-radius: 50%; background: #f97316; box-shadow: 0 0 0 4px rgba(249,115,22,.13); }
.town-revenue-head h3 { margin: 0; color: var(--text); font-size: 20px; line-height: 1.2; letter-spacing: 0; }
.town-revenue-head p { max-width: 620px; margin: 7px 0 0; color: var(--text-soft); font-size: 12px; line-height: 1.65; }
.town-revenue-select-label { display: grid; gap: 7px; min-width: 216px; color: var(--text-soft); font-size: 11px; font-weight: 800; letter-spacing: .06em; }
.town-revenue-select-caption { padding-left: 2px; }
.town-revenue-select-wrap { position: relative; display: block; }
.town-revenue-select-icon { position: absolute; z-index: 1; top: 50%; left: 12px; color: #ea580c; font-size: 17px; line-height: 1; transform: translateY(-52%); pointer-events: none; }
.town-revenue-select-label select {
  width: 100%;
  min-height: 42px;
  padding: 0 34px 0 37px;
  border: 1px solid rgba(249, 115, 22, .28);
  border-radius: 10px;
  outline: none;
  background: rgba(255,255,255,.86);
  box-shadow: 0 5px 14px rgba(249,115,22,.06), inset 0 1px 0 rgba(255,255,255,.9);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s cubic-bezier(.16,1,.3,1);
}
.town-revenue-select-label select:hover { border-color: rgba(249,115,22,.54); transform: translateY(-1px); }
.town-revenue-select-label select:focus { border-color: #f97316; box-shadow: 0 0 0 3px rgba(249,115,22,.16), 0 7px 16px rgba(249,115,22,.09); }
.town-revenue-summary { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.town-metric {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 104px;
  padding: 14px 14px 12px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 12px;
  background: rgba(255,255,255,.78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.92);
  transition: transform .22s cubic-bezier(.16,1,.3,1), border-color .22s ease, box-shadow .22s ease;
}
.town-metric > span:first-child { flex: none; }
.town-metric strong { flex: 1; }
.town-metric::before { content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%; background: rgba(148,163,184,.42); }
.town-metric span, .town-metric small { display: block; color: var(--text-soft); font-size: 12.5px; }
.town-metric > span:first-child { font-size: 13px; }
.town-metric span { font-weight: 750; }
.town-metric strong { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: 0 0 5px; color: var(--text); font-size: clamp(13px, calc(1vw + 8px), 19px); font-weight: 800; line-height: 1.05; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.town-metric .tm-num { flex: 1; min-width: 0; overflow: hidden; color: #0f172a; font-size: inherit; font-weight: 800; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.town-metric .tm-unit { flex: none; align-self: center; color: #0f172a; font-size: inherit; font-weight: 800; }
.town-metric.is-negative .tm-num, .town-metric.is-negative .tm-unit { color: #dc2626; }
.town-metric small { overflow: hidden; line-height: 1.35; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.town-metric:nth-child(3n + 1)::before { background: #f97316; }
.town-metric:nth-child(3n + 2)::before { background: #0f766e; }
.town-metric:nth-child(3n)::before { background: #64748b; }
.town-metric.is-negative strong, .town-revenue-row.is-negative span:nth-last-child(2), .town-revenue-row.is-negative span:last-child { color: #dc2626; }
.town-metric.is-negative::before { background: #dc2626; }
.town-revenue-rows { position: relative; z-index: 1; margin-top: 16px; overflow-x: auto; border: 1px solid rgba(148,163,184,.2); border-radius: 12px; background: rgba(255,255,255,.58); }
.town-revenue-row { display: grid; grid-template-columns: minmax(140px, 1.5fr) repeat(5, minmax(90px, 1fr)); gap: 10px; align-items: center; min-width: 730px; padding: 12px 14px; border-top: 1px solid rgba(148,163,184,.16); font-size: 12px; transition: background-color .18s ease; }
.town-revenue-row:not(.town-revenue-row-head):hover { background: rgba(249,115,22,.045); }
.town-revenue-row-head { position: sticky; top: 0; z-index: 1; border-top: 0; background: rgba(248,250,252,.94); color: var(--text-soft); font-size: 11px; font-weight: 800; letter-spacing: .045em; }
.town-revenue-row strong { color: var(--text); font-size: 13px; }
@media (hover: hover) and (pointer: fine) { .town-metric:hover { transform: translateY(-3px); border-color: rgba(249,115,22,.32); box-shadow: 0 12px 22px rgba(15,23,42,.08), inset 0 1px 0 rgba(255,255,255,.98); } }
@media (prefers-reduced-motion: reduce) { .town-revenue-select-label select, .town-metric, .town-revenue-row { transition: none; } .town-revenue-select-label select:hover, .town-metric:hover { transform: none; } }
@media (max-width: 900px) { .town-revenue-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .town-revenue { padding: 18px 14px 14px; border-radius: 14px; } .town-revenue::after { left: 14px; } .town-revenue-head { align-items: stretch; flex-direction: column; gap: 15px; } .town-revenue-head h3 { font-size: 18px; } .town-revenue-select-label { width: 100%; } .town-revenue-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .town-metric { min-height: 108px; padding: 12px; } }

/* ===== 备案页脚（工信部 ICP 备案号，合规要求展示于页面底部） =====
   设计取向：不做独立色块，融入所在页面的底色/画面，靠低对比度存在而非分区存在。 */
.beian-footer { padding: 26px 12px 18px; text-align: center; background: transparent; }
.beian-footer a {
  color: var(--text-soft, #64748b);
  font-size: 11.5px;
  letter-spacing: .04em;
  line-height: 1.6;
  text-decoration: none;
  opacity: .42;
  transition: opacity .25s ease, color .25s ease;
}
.beian-footer a:hover { color: var(--accent, #e0a458); opacity: .95; }

/* ---- 登录页：备案号叠进视频画面，与背景同层呼吸 ----
   页脚已移入 .login-shell 内部；.login-media 为 z-index:-4，故此处绝对定位即可浮于视频之上。 */
.login-page .beian-footer {
  position: absolute;
  z-index: 1;
  left: clamp(28px, 7vw, 110px);
  bottom: clamp(16px, 2.4vw, 30px);
  padding: 0;
  text-align: left;
  pointer-events: auto;
}
.login-page .beian-footer a {
  color: rgba(255, 252, 249, .58);
  font-size: 11.5px;
  letter-spacing: .06em;
  opacity: 1;
  /* 极淡投影：只为在浅色画面帧上保住可读性，不形成描边感 */
  text-shadow: 0 1px 3px rgba(48, 24, 16, .38), 0 0 12px rgba(48, 24, 16, .22);
  transition: color .28s ease, text-shadow .28s ease;
}
.login-page .beian-footer a:hover {
  color: rgba(255, 255, 255, .92);
  text-shadow: 0 1px 3px rgba(48, 24, 16, .46), 0 0 14px rgba(48, 24, 16, .3);
}
/* 断点覆盖必须写在基础规则之后：同选择器同权重时靠源码顺序取胜，
   写进上方 900/560px 媒体查询块（约 265 行处）会被这里的基础规则反压。 */
@media (max-width: 900px) {
  /* 与该断点的 padding-inline 对齐 */
  .login-page .beian-footer { left: clamp(22px, 6vw, 54px); }
}
@media (max-width: 560px) {
  /* 窄屏遮罩改为浅色纵向渐变，底部被提亮到 .82 —— 备案号需换深色才读得出 */
  .login-page .beian-footer { left: 0; right: 0; bottom: 14px; text-align: center; }
  .login-page .beian-footer a { color: rgba(16, 16, 16, .44); text-shadow: none; }
  .login-page .beian-footer a:hover { color: rgba(16, 16, 16, .8); text-shadow: none; }
}

/* 成本页专属提醒框（独立于顶部强提醒） */
.cost-reminder { display: none; margin: 0 0 14px; padding: 12px 14px; border: 1px solid #fca5a5; background: linear-gradient(180deg, rgba(254,226,226,.7), rgba(254,242,242,.5)); border-radius: 14px; }
.cost-reminder .cr-head { font-size: 13px; font-weight: 800; color: #b91c1c; margin-bottom: 8px; }
.cost-reminder .cr-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px dashed rgba(185,28,28,.25); }
.cost-reminder .cr-item:first-of-type { border-top: none; }
.cost-reminder .cr-dot { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; margin-top: 6px; flex: none; box-shadow: 0 0 0 3px rgba(239,68,68,.18); }
.cost-reminder .cr-body { flex: 1; }
.cost-reminder .cr-text { font-size: 13px; line-height: 1.5; color: var(--text); }
.cost-reminder .cr-text b { color: #b91c1c; }
.cost-reminder .cr-meta { font-size: 11px; color: var(--text-faint); margin-top: 2px; }

/* 营业额汇总卡 */
.rev-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.rev-sum-card {
  position: relative;
  display: grid;
  grid-template-rows: 18px minmax(38px, 1fr) 30px;
  align-items: center;
  min-width: 0;
  min-height: 118px;
  padding: 13px 16px 12px;
  overflow: hidden;
  text-align: left;
  background: linear-gradient(180deg, rgba(255,255,255,.97), rgba(255,255,255,.86));
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15,23,42,.05), inset 0 1px 0 rgba(255,255,255,.78);
  transition: transform .24s cubic-bezier(.16,1,.3,1), border-color .24s ease, box-shadow .24s ease, filter .24s ease;
}
.rev-sum-card::before {
  content: '';
  position: absolute;
  inset: 0 18px auto;
  height: 2px;
  border-radius: 0 0 999px 999px;
  background: rgba(148,163,184,.28);
  transition: inset .24s cubic-bezier(.16,1,.3,1), height .24s ease, background-color .24s ease, box-shadow .24s ease;
}
.rev-sum-card::after {
  content: '';
  position: absolute;
  width: 72px;
  height: 72px;
  right: -38px;
  bottom: -44px;
  border-radius: 50%;
  background: rgba(148,163,184,.055);
  pointer-events: none;
}
.rev-sum-card .rev-sum-k {
  align-self: start;
  justify-self: start;
  text-align: left;
  font-size: 12px;
  line-height: 18px;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--text-soft);
}
.rev-sum-card .rev-sum-v {
  align-self: center;
  justify-self: center;
  position: relative;
  max-width: 100%;
  min-width: 0;
  padding: 5px 0 3px;
  overflow: hidden;
  font-size: clamp(23px, 2.15vw, 29px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -.035em;
  color: var(--text);
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: center;
  font-variant-numeric: tabular-nums lining-nums;
  transition: transform .24s cubic-bezier(.16,1,.3,1), color .24s ease;
}
/* ¥ 固定贴最左，数字在剩余空间独立居中：符号绝对定位脱离流，不再参与整串居中 */
.rev-sum-card .rev-money { display: block; width: 100%; padding-left: 1.35ch; }
.rev-sum-card .rev-money .rev-cur {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: calc(.72em + 5px);
  font-weight: 800;
  letter-spacing: 0;
  opacity: .82;
}
.rev-sum-card .rev-money .rev-num { display: block; text-align: center; }
.rev-sum-card .rev-sum-hint {
  align-self: end;
  width: 100%;
  min-width: 0;
  min-height: 15px;
  margin: 0;
  overflow: hidden;
  font-size: clamp(9px, .82vw, 11px);
  line-height: 15px;
  font-weight: 600;
  color: var(--text-faint);
  white-space: nowrap;
  text-align: center;
  text-overflow: ellipsis;
}
.rev-sum-card.net { background: linear-gradient(180deg, rgba(16,185,129,.13), rgba(16,185,129,.045)); border-color: rgba(16,185,129,.38); }
.rev-sum-card.net::before { background: rgba(5,150,105,.45); }
.rev-sum-card.net::after { background: rgba(5,150,105,.055); }
.rev-sum-card.net .rev-sum-v { color: #059669; }
.rev-sum-card.is-negative { background: linear-gradient(180deg, rgba(244,63,94,.11), rgba(244,63,94,.035)); border-color: rgba(244,63,94,.34); }
.rev-sum-card.is-negative::before { background: rgba(225,29,72,.42); }
.rev-sum-card.is-negative::after { background: rgba(225,29,72,.05); }
.rev-sum-card.is-negative .rev-sum-v { color: #be123c; }
@media (hover: hover) and (pointer: fine) {
  .rev-sum-card:hover {
    transform: translateY(-4px);
    border-color: rgba(249,115,22,.42);
    box-shadow: 0 16px 34px rgba(15,23,42,.11), 0 5px 14px rgba(249,115,22,.08), inset 0 1px 0 rgba(255,255,255,.92);
    filter: saturate(1.03);
  }
  .rev-sum-card:hover::before {
    inset-inline: 10px;
    height: 3px;
    background: rgba(249,115,22,.62);
    box-shadow: 0 2px 10px rgba(249,115,22,.2);
  }
  .rev-sum-card:hover .rev-sum-v { transform: scale(1.035); }
  .rev-sum-card.net:hover { border-color: rgba(5,150,105,.5); box-shadow: 0 16px 34px rgba(15,23,42,.1), 0 5px 16px rgba(5,150,105,.12), inset 0 1px 0 rgba(255,255,255,.9); }
  .rev-sum-card.net:hover::before { background: rgba(5,150,105,.7); box-shadow: 0 2px 10px rgba(5,150,105,.2); }
  .rev-sum-card.is-negative:hover { border-color: rgba(225,29,72,.48); box-shadow: 0 16px 34px rgba(15,23,42,.1), 0 5px 16px rgba(225,29,72,.12), inset 0 1px 0 rgba(255,255,255,.9); }
  .rev-sum-card.is-negative:hover::before { background: rgba(225,29,72,.68); box-shadow: 0 2px 10px rgba(225,29,72,.2); }
}
@media (prefers-reduced-motion: reduce) {
  .rev-sum-card, .rev-sum-card::before, .rev-sum-card .rev-sum-v { transition: none; }
  .rev-sum-card:hover, .rev-sum-card:hover .rev-sum-v { transform: none; }
}
@media (max-width: 820px) { .rev-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .rev-summary { grid-template-columns: 1fr; } .rev-sum-card { min-height: 104px; } }

/* 表格（营业额 / 成本 / 称重 共用栅格） */
.rev-table-wrap, .cost-card, .weigh-stats { padding: 14px; margin-bottom: 14px; }
.rev-table-head, .rev-row { display: grid; align-items: center; gap: 8px; padding: 9px 8px; }
.rev-table-head { font-size: 12px; color: var(--text-soft); font-weight: 700; border-bottom: 1px solid var(--border); }
#revRows, #costRows, #weighStatsRows {
  max-height: min(520px, calc(100dvh - 320px));
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}
#revRows {
  height: 162px;
  max-height: 162px;
  scrollbar-width: thin;
  scrollbar-color: rgba(249, 115, 22, .38) transparent;
}
#costRows {
  height: 108px;
  max-height: 108px;
  scrollbar-width: thin;
  scrollbar-color: rgba(249, 115, 22, .38) transparent;
}
.rev-table-head .rtc-merchant { text-align: center; }
.rev-row { font-size: 13px; border-bottom: 1px dashed var(--border); }
.rev-row:last-child { border-bottom: none; }
.rtc { overflow: hidden; }
.rev-empty { padding: 18px; text-align: center; color: var(--text-faint); font-size: 13px; }
.rev-table-wrap .rev-table-head, .rev-table-wrap .rev-row { grid-template-columns: 1.4fr 1.2fr 0.8fr 1.7fr 1fr 0.9fr; }
.cost-card .rev-table-head, .cost-card .rev-row { grid-template-columns: 1.4fr 0.9fr 1.7fr 1fr 0.9fr; }
.weigh-stats .rev-table-head, .weigh-stats .rev-row { grid-template-columns: 1.4fr 1.2fr 0.8fr 1.8fr 0.9fr; }

.rtc-merchant { display: flex; flex-direction: column; gap: 3px; align-items: center; text-align: center; }
.rev-merchant-name { font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.rev-merchant-code {
  display: inline-flex; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 800; color: #92400e;
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 1px solid #fdba74;
  padding: 1px 7px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(146, 64, 14, 0.08);
}

/* 成本卡头 */
.cost-card-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 800; margin-bottom: 10px; }
.cost-card-head .cost-net { color: #059669; }
.weigh-stats-head { font-size: 13px; font-weight: 800; margin-bottom: 10px; }

/* chips 变体 */
.chip.sm { font-size: 11px; padding: 2px 8px; border-radius: 999px; }
.chip.warn { background: #fef3c7; border-color: #fcd34d; color: #92400e; }

/* 骑手端称重输入 + 拍照一体化（阶段 39，2026-07-28 视觉精简版 + 大照片框版）
 * ────────────────────────────────────────────────────────────────
 * 旧版每个称重格子有 5 行信息（商品名 / 价格 / "按公斤称重"+价格 / 实际斤+拍秤盘 / 提交按钮），
 * 「拍秤盘」3 字塞进 28×28 方框还会逐字竖排折断。精简 + 改版后：
 *   - 移除冗余的 weigh-spec-title 行（bw-tag + gc-spec-prices 已说清公斤价与称重方式）
 *   - 拍秤盘按钮已删除；照片框（64×64）单独成行，自己触发拍照 / 查看大图
 *   - 空数量格子改为更紧凑的 is-slim 状态，不再与有货格子争抢视觉
 */
.weigh-spec-panel {
  display: flex; flex-direction: column; gap: 6px;
  width: 100%;
  margin-top: 4px;
  padding: 6px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(254,243,199,.55), rgba(254,226,226,.5));
  border: 1px solid rgba(217,119,6,.22);
}
/* 64×64 大照片框单独成行：空状态虚线 + 📷 + 「点击拍照」；已上传填满图 + 右上角 🔍 放大镜 */
.weigh-photo-wrap { display: flex; align-items: center; gap: 8px; width: 100%; }
.weigh-photo-thumb {
  width: 64px; height: 64px;
  border: 2px dashed rgba(249, 115, 22, .45);
  border-radius: 10px;
  background: rgba(249, 115, 22, .04);
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  flex: none;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: all .15s;
  color: var(--primary);
}
.weigh-photo-thumb .wpt-icon { font-size: 22px; opacity: .55; line-height: 1; }
.weigh-photo-thumb .wpt-hint {
  font-size: 9px; color: var(--primary);
  font-weight: 800; letter-spacing: .3px;
  margin-top: 2px;
  opacity: .7;
}
.weigh-photo-thumb:hover { background: rgba(249, 115, 22, .12); border-color: var(--primary); border-style: solid; transform: translateY(-1px); }
.weigh-photo-thumb.has-photo {
  border-style: solid;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 2px 8px rgba(249, 115, 22, .22);
}
.weigh-photo-thumb.has-photo .wpt-icon,
.weigh-photo-thumb.has-photo .wpt-hint { display: none; }
.weigh-photo-thumb.has-photo::after {
  content: '🔍'; position: absolute;
  top: 3px; right: 3px;
  width: 18px; height: 18px;
  background: rgba(255,255,255,.92);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; line-height: 1;
  box-shadow: 0 1px 3px rgba(0,0,0,.16);
}
.weigh-photo-thumb.has-photo:hover::after { background: rgba(255,255,255,1); }
.weigh-photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.weigh-photo-input { display: none; }

.weigh-input-row {
  display: flex; align-items: center; gap: 4px;
  flex-wrap: wrap; /* 必要时换行兜底，但不期望真的触发 */
  width: 100%;
}
.weigh-input { width: 60px; padding: 4px 6px; border: 1px solid var(--border); border-radius: 7px; font-size: 12px; background: var(--surface-solid); color: var(--text); flex: none; }
.weigh-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); outline: none; }
.weigh-price-preview { font-size: 12px; font-weight: 800; color: var(--primary); min-width: 48px; text-align: center; flex: none; }
/* 提交按钮占满下方一行，避免与拍照按钮挤压冲突 */
.weigh-save {
  width: 100%;
  padding: 5px 10px; font-size: 12px; border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
}
.weigh-status { display:block; width:100%; font-size: 11px; color: #059669; font-weight: 800; line-height: 1.4; }
.weigh-status-badge { display:inline-flex; align-items:center; gap:3px; font-size:11px; font-weight:700; padding:2px 8px; border-radius:999px; margin-left:8px; vertical-align:middle; }
.weigh-status-badge.done { background:#d1fae5; color:#065f46; border:1px solid #6ee7b7; }
.weigh-status-badge.pending { background:#fee2e2; color:#991b1b; border:1px solid #fca5a5; }
.status-action.start.weigh-blocked { background:linear-gradient(135deg,#94a3b8,#64748b); box-shadow:none; cursor:pointer; }

/* 健壮称重核实弹窗（背景/滑动/返回键均不关闭，仅按钮可关） */
.weigh-verify-mask { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; background: rgba(15,23,42,.55); backdrop-filter: blur(2px); padding: 20px; }
.weigh-verify-box { width: 100%; max-width: 380px; border-radius: 18px; padding: 20px; }
.weigh-verify-box .wv-title { font-size: 15px; font-weight: 900; color: #b91c1c; margin-bottom: 10px; }
.weigh-verify-box .wv-body { font-size: 13px; line-height: 1.7; color: var(--text); margin-bottom: 16px; }
.weigh-verify-box .wv-body b { color: #b91c1c; }
.weigh-verify-box .wv-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }

/* 营收汇总：利润率卡 */
.rev-sum-card.margin { background: linear-gradient(180deg, rgba(59,130,246,.11), rgba(59,130,246,.035)); border-color: rgba(59,130,246,.34); }
.rev-sum-card.margin::before { background: rgba(37,99,235,.4); }
.rev-sum-card.margin::after { background: rgba(37,99,235,.05); }
.rev-sum-card.margin .rev-sum-v { color: #2563eb; }
.rev-sum-card.margin.is-negative { background: linear-gradient(180deg, rgba(244,63,94,.11), rgba(244,63,94,.035)); border-color: rgba(244,63,94,.34); }
.rev-sum-card.margin.is-negative::before { background: rgba(225,29,72,.42); }
.rev-sum-card.margin.is-negative::after { background: rgba(225,29,72,.05); }
.rev-sum-card.margin.is-negative .rev-sum-v { color: #be123c; }
.chip.success { background: #d1fae5; border-color: #6ee7b7; color: #065f46; }
.qty-hint { display: inline-block; margin-left: 4px; font-size: 10px; padding: 1px 5px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.spec-chip { display: inline-flex; width: fit-content; margin-top: 3px; padding: 2px 7px; border-radius: 999px; border: 1px solid rgba(244,63,94,.25); background: rgba(244,63,94,.08); color: #be123c; font-size: 10px; font-weight: 800; white-space: nowrap; }
.rev-row.has-audit { row-gap: 6px; }
.rev-weigh-audits { grid-column: 1 / -1; display: grid; gap: 5px; padding: 8px 10px; border-radius: 10px; background: linear-gradient(135deg, rgba(255,247,237,.96), rgba(255,241,242,.9)); border: 1px solid rgba(251,146,60,.28); }
.rev-weigh-audit { color: var(--text-soft); font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; }
.rev-weigh-audit b { color: var(--text); }
.rev-weigh-photo { color: #be123c; font-weight: 800; text-decoration: none; }
.rev-weigh-photo:hover { text-decoration: underline; }
.psi-kg-hint { display: block; width: 100%; margin-top: 4px; padding: 3px 7px; border-radius: 8px; background: rgba(244,63,94,.08); border: 1px solid rgba(244,63,94,.22); color: #be123c; font-size: 10px; font-weight: 800; line-height: 1.35; }

/* 成本提醒照片链接 */
.cr-photo-link { margin-left: 6px; font-size: 12px; color: #2563eb; text-decoration: none; }
.cr-photo-link:hover { text-decoration: underline; }

/* ================= 可搜索商家下拉框（管理端添加商家到路线） ================= */
.merchant-combo { position: relative; width: 100%; font-size: 14px; }
.merchant-combo-input-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: text;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s, transform 0.15s;
}
.merchant-combo-input-wrap:hover { background: var(--surface-solid); }
.merchant-combo-input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
  background: #fff;
  transform: translateY(-1px);
}
.merchant-combo-icon { font-size: 14px; color: var(--primary); flex-shrink: 0; }
.merchant-combo-input {
  flex: 1; border: none; background: transparent; padding: 0; font-size: 14px; color: var(--text); outline: none; min-width: 0;
}
.merchant-combo-input::placeholder { color: var(--text-faint); }
.merchant-combo-chevron {
  font-size: 12px; color: var(--text-faint); transition: transform 0.2s; flex-shrink: 0;
}
.merchant-combo.open .merchant-combo-chevron { transform: rotate(180deg); }
.merchant-combo-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 50;
  max-height: 0; overflow: hidden;
  border-radius: 16px;
  background: var(--surface);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid transparent;
  box-shadow: 0 20px 50px rgba(15,23,42,.14);
  opacity: 0; transform: translateY(-8px);
  transition: max-height 0.25s ease, opacity 0.2s ease, transform 0.2s ease, border-color 0.2s;
  pointer-events: none;
}
.merchant-combo-dropdown.open {
  max-height: 300px; overflow: hidden;
  border-color: var(--border);
  opacity: 1; transform: translateY(0);
  pointer-events: auto;
}
.merchant-combo-list {
  max-height: 252px; overflow-y: auto; padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(15,23,42,.12) transparent;
}
.merchant-combo-list::-webkit-scrollbar { width: 6px; }
.merchant-combo-list::-webkit-scrollbar-thumb { background: rgba(15,23,42,.12); border-radius: 3px; }
.merchant-combo-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 12px;
  font-size: 14px; color: var(--text); cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.12s, box-shadow 0.15s;
}
.merchant-combo-item:hover, .merchant-combo-item.active {
  background: linear-gradient(135deg, var(--primary-soft), rgba(251, 113, 133, 0.08));
  color: var(--primary);
  box-shadow: 0 2px 10px rgba(249, 115, 22, 0.10);
}
.merchant-combo-item:active { transform: scale(0.99); }
.merchant-combo-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--text-faint); flex-shrink: 0;
  transition: background 0.15s, transform 0.15s;
}
.merchant-combo-item:hover .merchant-combo-dot,
.merchant-combo-item.active .merchant-combo-dot { background: var(--primary); transform: scale(1.2); }
.merchant-combo-name {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
}
.merchant-combo-add-hint {
  font-size: 12px; font-weight: 700; color: var(--primary);
  background: rgba(255, 255, 255, 0.7);
  padding: 3px 10px; border-radius: 999px;
  border: 1px solid rgba(249, 115, 22, 0.25);
  opacity: 0; transform: translateX(6px);
  transition: opacity 0.18s, transform 0.18s, background 0.15s;
  flex-shrink: 0;
}
.merchant-combo-item:hover .merchant-combo-add-hint,
.merchant-combo-item.active .merchant-combo-add-hint {
  opacity: 1; transform: translateX(0);
}
.merchant-combo-hint {
  padding: 8px 12px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--text-soft); text-align: center;
  background: rgba(15,23,42,.02);
  border-radius: 0 0 16px 16px;
}
.merchant-combo-empty {
  padding: 28px 16px; text-align: center; color: var(--text-soft);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.merchant-combo-empty-icon { font-size: 28px; line-height: 1; }
.merchant-combo-empty-sub { font-size: 12px; color: var(--text-faint); }
@media (max-width: 560px) {
  .merchant-combo-input-wrap { padding: 9px 12px; }
  .merchant-combo-item { padding: 8px 10px; font-size: 13px; }
  .merchant-combo-dropdown.open { max-height: 260px; }
  .merchant-combo-list { max-height: 214px; }
}

/* ===================== 区域选择器（省/市/镇下拉） ===================== */
.region-combo { position: relative; width: 100%; font-size: 14px; }
.region-combo-trigger {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text);
  cursor: text;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.region-combo-trigger:hover { background: var(--surface); }
.region-combo-trigger:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(249,115,22,.1);
  background: #fff;
}
.region-combo-icon { font-size: 13px; color: var(--primary); flex-shrink: 0; }
.region-combo-input {
  flex: 1; border: none; background: transparent; padding: 0; font-size: 14px; color: var(--text); outline: none; min-width: 0;
}
.region-combo-input::placeholder { color: var(--text-faint); }
.region-combo-clear {
  display: none; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  border: none; background: transparent; color: var(--text-faint);
  font-size: 11px; cursor: pointer; flex-shrink: 0;
  transition: background .15s, color .15s;
}
.region-combo-clear:hover { background: var(--primary-soft); color: var(--primary); }
.region-combo-chevron {
  font-size: 12px; color: var(--text-faint); transition: transform .2s; flex-shrink: 0;
}
.region-combo.open .region-combo-chevron { transform: rotate(180deg); }
.region-combo-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 50;
  max-height: 0; overflow: hidden;
  border-radius: 12px;
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid transparent;
  box-shadow: 0 16px 40px rgba(15,23,42,.12);
  opacity: 0; transform: translateY(-6px);
  transition: max-height .22s ease, opacity .18s ease, transform .18s ease, border-color .18s;
  pointer-events: none;
}
.region-combo-dropdown.open {
  max-height: 220px; overflow: hidden;
  border-color: var(--border);
  opacity: 1; transform: translateY(0);
  pointer-events: auto;
}
.region-combo-list {
  max-height: 172px; overflow-y: auto; padding: 5px;
  scrollbar-width: thin;
  scrollbar-color: rgba(15,23,42,.12) transparent;
}
.region-combo-list::-webkit-scrollbar { width: 5px; }
.region-combo-list::-webkit-scrollbar-thumb { background: rgba(15,23,42,.12); border-radius: 3px; }
.region-combo-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 10px;
  font-size: 14px; color: var(--text); cursor: pointer;
  transition: background .12s, color .12s;
}
.region-combo-item:hover, .region-combo-item.active {
  background: linear-gradient(135deg, var(--primary-soft), rgba(251, 113, 133, 0.08));
  color: var(--primary);
}
.region-combo-item.dimmed {
  color: var(--text-faint);
  cursor: default;
  pointer-events: none;
}
.region-combo-item.dimmed .region-combo-dot { background: var(--border); }
.region-combo-item.disabled {
  opacity: .5;
  cursor: not-allowed;
  pointer-events: none;
}
.region-combo-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-faint); flex-shrink: 0;
  transition: background .12s, transform .12s;
}
.region-combo-item:hover .region-combo-dot,
.region-combo-item.active .region-combo-dot { background: var(--primary); transform: scale(1.2); }
.region-combo-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.region-combo-name .rc-match {
  background: rgba(249, 115, 22, 0.22);
  color: var(--primary);
  border-radius: 3px;
  font-weight: 800;
  padding: 0 1px;
}
.region-combo-del {
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 6px;
  border: none; background: transparent; color: var(--text-faint);
  font-size: 12px; cursor: pointer; opacity: 0;
  transition: opacity .15s, background .15s, color .15s;
}
.region-combo-item:hover .region-combo-del { opacity: 1; }
.region-combo-del:hover { background: #fee2e2; color: #dc2626; }
.region-combo-empty {
  padding: 20px 12px; text-align: center; color: var(--text-soft); font-size: 13px;
}
.region-combo-footer { border-top: 1px solid var(--border); padding: 6px; }
.region-combo-add {
  width: 100%; padding: 8px 10px; border-radius: 10px;
  border: 1px dashed var(--primary); background: var(--primary-soft);
  color: var(--primary); font-size: 13px; font-weight: 700;
  cursor: pointer; text-align: left;
  transition: background .15s, transform .12s;
}
.region-combo-add:hover { background: rgba(251, 113, 133, 0.18); }
.region-combo-add:active { transform: scale(0.99); }
@media (max-width: 560px) {
  .region-combo-trigger { padding: 7px 10px; }
  .region-combo-item { padding: 7px 9px; font-size: 13px; }
  .region-combo-dropdown.open { max-height: 190px; }
  .region-combo-list { max-height: 148px; }
}

/* 视图状态恢复：回访时当前 tab 柔和脉冲，明确「已回到上次位置」 */
.tab-restored { animation: tabRestoredPulse .7s ease; }
@keyframes tabRestoredPulse {
  0% { box-shadow: 0 0 0 0 rgba(249,115,22,.55); }
  70% { box-shadow: 0 0 0 9px rgba(249,115,22,0); }
  100% { box-shadow: 0 0 0 0 rgba(249,115,22,0); }
}

/* ===================== 商家服务页签（商家库管理） ===================== */
.merchant-service-section {
  padding: 0 0 40px;
}

/* 头部：标题 + 工具条（搜索 / 新增），左右呼应整体风格 */
.merchant-service-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.merchant-service-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.merchant-service-title h2 {
  margin: 0;
}
.merchant-service-subtitle {
  display: block;
  margin-top: 5px;
  color: var(--text-soft);
  font-size: 13px;
}
.merchant-service-count {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-soft);
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid var(--border);
  padding: 2px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.merchant-service-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 320px;
  justify-content: flex-end;
  min-width: 0;
}

/* 搜索框：玻璃胶囊 + 内嵌图标 */
.merchant-service-search {
  position: relative;
  flex: 1 1 220px;
  max-width: 360px;
  display: flex;
  align-items: center;
}
.merchant-service-search-icon {
  position: absolute;
  left: 14px;
  font-size: 14px;
  opacity: .6;
  pointer-events: none;
}
.merchant-service-search input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px 10px 38px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.merchant-service-search input::placeholder { color: var(--text-faint); }
.merchant-service-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
  background: var(--surface-solid);
}

/* 商家服务页签：省/市/区/镇 级联筛选器 */
.merchant-service-summary {
  margin-bottom: 14px;
  min-height: 0;
}
.merchant-service-cascader {
  display: flex; align-items: flex-end; flex-wrap: wrap; gap: 14px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(248,250,252,0.95));
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(15,23,42,0.05);
}
.merchant-service-cascader-group {
  display: flex; flex-direction: column; gap: 6px; min-width: 140px; flex: 1 1 160px;
}
.merchant-service-cascader-label {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 800; color: var(--text-soft); letter-spacing: 0.3px;
}
.merchant-service-cascader-label::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary);
  opacity: 0.6;
}
.merchant-service-cascader .region-combo.has-value .region-combo-trigger {
  border-color: rgba(249, 115, 22, 0.45);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.08);
}
.merchant-service-cascader .btn.ghost {
  height: 40px; flex-shrink: 0;
  font-weight: 700;
}

/* 卡片列表：固定高度可滚动框，商家多时顶部筛选/搜索区不会被顶出视口 */
/* ── 骑手提交的新商家审核区 ── */
.merchant-submission-review { margin: 6px 0 18px; padding: 16px; border: 1px solid rgba(249,115,22,.25); border-radius: 16px; background: linear-gradient(135deg, rgba(249,115,22,.05), rgba(225,29,72,.04)); }
.msr-head h3 { margin: 0; font-size: 16px; font-weight: 900; color: var(--text); display: flex; align-items: center; gap: 8px; }
.msr-badge { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 900; }
.msr-sub { margin: 6px 0 0; font-size: 12px; color: var(--text-soft); line-height: 1.6; }
.msr-list { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.msr-card { padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-solid); }
.msr-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.msr-card-head strong { font-size: 16px; font-weight: 900; color: var(--text); }
.msr-rider { font-size: 12px; color: var(--text-soft); }
.msr-meta { margin-top: 6px; font-size: 12px; color: var(--text-soft); }
.msr-addr { margin-top: 4px; font-size: 13px; color: var(--text); }
.msr-note { margin-top: 4px; font-size: 12px; color: var(--text-soft); }
.msr-photos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.msr-photo { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); cursor: zoom-in; }
.msr-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
@media (max-width: 560px) {
  .msr-actions .btn { flex: 1 1 100%; }
}

.merchant-service-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 357px;
  min-height: 200px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px;
  background: rgba(15, 23, 42, 0.02);
  border: 1px solid var(--border);
  border-radius: 16px;
  scroll-behavior: smooth;
}
.merchant-service-list::-webkit-scrollbar { width: 8px; }
.merchant-service-list::-webkit-scrollbar-track { background: transparent; }
.merchant-service-list::-webkit-scrollbar-thumb { background: rgba(15,23,42,0.15); border-radius: 999px; }
.merchant-service-list::-webkit-scrollbar-thumb:hover { background: rgba(15,23,42,0.25); }
.merchant-service-card.glass {
  display: flex;
  align-items: stretch;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 16px;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.merchant-service-card.glass:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
  border-color: rgba(249, 115, 22, 0.28);
}
.ms-card-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ms-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ms-card-name {
  font-size: 17px;
  font-weight: 900;
  color: var(--text);
}
.ms-phone {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.ms-code {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 800;
  color: #92400e;
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 1px solid #fdba74;
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(146, 64, 14, 0.08);
}
.ms-card-region {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.ms-region-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #0f766e;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.ms-card-coords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.ms-card-coord {
  font-size: 11px;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: var(--text-faint);
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.ms-card-coord.ok {
  color: var(--ok);
  background: #ecfdf5;
  border-color: #a7f3d0;
}
.ms-card-coord.warn {
  color: var(--danger);
  background: #fef2f2;
  border-color: #fecaca;
}

/* 操作区：编辑 / 改定位 / 删除，横向紧凑排列压低卡片高度 */
.ms-card-actions {
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  justify-content: center;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}
.ms-card-actions .btn {
  width: 34px; height: 34px;
  min-width: 0;
  padding: 0;
  justify-content: center;
  align-items: center;
  font-size: 15px;
  border-radius: 10px;
}
.ms-card-actions .btn:hover { transform: translateY(-1px); }
.ms-action-edit:hover { color: var(--primary); background: var(--primary-soft); border-color: transparent; }
.ms-action-loc:hover { color: #0d9488; background: #f0fdfa; border-color: transparent; }
.ms-action-del:hover {
  color: #fff !important;
  background: linear-gradient(135deg, #ef4444, #f97316) !important;
  border-color: transparent !important;
}

/* 空状态 */
.merchant-service-empty {
  text-align: center;
  padding: 48px 20px;
  border: 1px dashed var(--border);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.02);
}
.merchant-service-empty-icon { font-size: 44px; margin-bottom: 8px; }
.merchant-service-empty-title { font-size: 16px; font-weight: 800; color: var(--text); }
.merchant-service-empty-sub { font-size: 13px; color: var(--text-faint); margin-top: 4px; }

@media (max-width: 640px) {
  .merchant-service-header { gap: 10px; }
  .merchant-service-toolbar { flex: 1 1 100%; justify-content: stretch; }
  .merchant-service-search { max-width: none; }
  .merchant-service-cascader { gap: 10px; padding: 10px; }
  .merchant-service-cascader-group { min-width: 0; flex: 1 1 100%; }
  .merchant-service-cascader .btn.ghost { width: 100%; }
  .merchant-service-card.glass { flex-direction: column; gap: 12px; }
  .ms-card-actions {
    border-left: none;
    border-top: 1px solid var(--border);
    padding-left: 0;
    padding-top: 10px;
    justify-content: flex-start;
  }
  .ms-card-actions .btn { flex: 0 0 auto; }
}

/* ===================== 商家拓展页签 ===================== */
.merchant-expansion-section { max-width: 1180px; margin: 0 auto; padding: 4px 2px 40px; }
.merchant-expansion-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.merchant-expansion-header h2 { margin: 0; }
.merchant-expansion-subtitle { display: block; margin-top: 5px; color: var(--text-soft); font-size: 13px; }
.merchant-expansion-provider { display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-solid); font-size: 12px; font-weight: 800; }
.merchant-expansion-provider span { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 4px rgba(22,163,74,.12); }
.expansion-workspace { margin-bottom: 18px; padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: color-mix(in srgb, var(--surface-solid) 92%, var(--primary-soft)); }
.expansion-workspace-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.expansion-workspace-head h3 { margin: 4px 0 7px; font-size: 18px; letter-spacing: 0; }
.expansion-workspace-head p { max-width: 720px; margin: 0; color: var(--text-soft); font-size: 12px; line-height: 1.7; }
.expansion-workspace-kicker { color: var(--primary); font-size: 11px; font-weight: 900; letter-spacing: .04em; }
.expansion-workspace-current { flex: none; display: grid; gap: 5px; min-width: 190px; padding: 11px 14px; border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border)); border-left: 3px solid var(--primary); border-radius: 9px; background: var(--surface-solid); }
.expansion-workspace-current span { color: var(--text-soft); font-size: 10px; font-weight: 800; }
.expansion-workspace-current strong { font-size: 13px; overflow-wrap: anywhere; }
.expansion-workspace-global { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.expansion-workspace-tab, .expansion-town-tab { min-height: 40px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-solid); color: var(--text); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease; }
.expansion-workspace-tab:hover, .expansion-town-tab:hover { border-color: var(--primary); transform: translateY(-1px); }
.expansion-workspace-tab.active, .expansion-town-tab.active { border-color: var(--primary); background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(249,115,22,.16); }
.expansion-workspace-tab b, .expansion-town-tab b { display: inline-grid; place-items: center; min-width: 22px; height: 21px; margin-left: 7px; padding: 0 6px; border-radius: 6px; background: var(--primary-soft); color: var(--primary); font-size: 10px; }
.expansion-workspace-tab.active b, .expansion-town-tab.active b { background: rgba(255,255,255,.2); color: #fff; }
.expansion-workspace-browser { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 18px; align-items: stretch; }
.expansion-workspace-browser label, .expansion-workspace-town-browser { display: grid; gap: 7px; min-width: 0; }
.expansion-workspace-browser label span, .expansion-workspace-town-head span { color: var(--text-soft); font-size: 11px; font-weight: 800; }
.expansion-workspace-browser select { width: 100%; min-height: 42px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-solid); color: var(--text); font: inherit; }
.expansion-workspace-town-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.expansion-workspace-town-head small { color: var(--text-soft); font-size: 10px; }
.expansion-workspace-towns { display: flex; gap: 9px; min-width: 0; min-height: 42px; overflow-x: auto; padding: 1px 2px 6px; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--text-soft) 55%, transparent) transparent; }
.expansion-town-tab { flex: 0 0 auto; white-space: nowrap; }
.expansion-workspace-empty { align-self: center; color: var(--text-soft); font-size: 12px; }
.merchant-expansion-controls { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 14px; align-items: end; padding: 18px; margin-bottom: 16px; border: 1px solid color-mix(in srgb, var(--primary) 14%, var(--border)); border-radius: 12px; background: color-mix(in srgb, var(--surface-solid) 94%, var(--primary-soft)); }
.expansion-target-head { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 0 14px; border-bottom: 1px solid var(--border); }
.expansion-target-head > div:first-child { display: grid; gap: 3px; }
.expansion-target-head strong { font-size: 15px; }
.expansion-target-head small { color: var(--text-soft); font-size: 11px; }
.expansion-target-kicker { color: var(--primary); font-size: 10px; font-weight: 900; letter-spacing: .06em; }
.expansion-target-lock { display: flex; align-items: center; gap: 7px; min-width: 190px; padding: 8px 11px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-solid); }
.expansion-target-lock > span { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; }
.expansion-target-lock strong { font-size: 11px; }
.expansion-target-lock em { overflow: hidden; color: var(--text-soft); font-size: 10px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.expansion-target-lock.active { border-color: color-mix(in srgb, #16a34a 42%, var(--border)); background: color-mix(in srgb, #16a34a 7%, var(--surface-solid)); }
.expansion-target-lock.active > span { background: #16a34a; box-shadow: 0 0 0 4px rgba(22,163,74,.12); }
.merchant-expansion-controls label { display: grid; gap: 7px; min-width: 0; }
.merchant-expansion-controls label > span { color: var(--text-soft); font-size: 12px; font-weight: 800; }
.merchant-expansion-controls select { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-solid); color: var(--text); font: inherit; }
.expansion-provider-fieldset { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; min-width: 0; margin: 0; padding: 14px; border: 1px solid var(--border); border-radius: 12px; }
.expansion-provider-fieldset legend { padding: 0 6px; color: var(--text-soft); font-size: 12px; font-weight: 800; }
/* 美化：品牌徽标圆点 + 状态徽章 + 选中态 + 浮起动效，纯 CSS 实现，不动 HTML/JS */
.expansion-provider-card { --provider-accent: #16a34a; --provider-brand: #16a34a; position: relative; min-width: 0; max-height: 48px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--provider-accent) 26%, var(--border)); border-radius: 12px; background: var(--surface-solid); box-shadow: 0 4px 14px rgba(15,23,42,.04); transition: max-height .32s cubic-bezier(.2,.8,.2,1), border-color .2s ease, box-shadow .2s ease, transform .2s ease; transition-delay: 0s; }
.expansion-provider-card.tencent { --provider-accent: #0891b2; --provider-brand: #0891b2; }
.expansion-provider-card.huawei { --provider-accent: #d97706; --provider-brand: #f59e0b; }
.expansion-provider-card:hover, .expansion-provider-card:focus-within, .expansion-provider-card.is-expanded { max-height: 112px; border-color: color-mix(in srgb, var(--provider-accent) 68%, var(--border)); box-shadow: 0 14px 28px color-mix(in srgb, var(--provider-accent) 16%, transparent); transform: translateY(-1px); transition-delay: 1.2s, 1.2s, 1.2s, 1.2s; }
.expansion-provider-card:focus-within, .expansion-provider-card.is-expanded { transition: none; }
.expansion-provider-card::after { content: ""; position: absolute; left: 0; top: 46px; width: 0; height: 2px; background: linear-gradient(90deg, var(--provider-accent), color-mix(in srgb, var(--provider-accent) 40%, transparent)); opacity: .85; }
.expansion-provider-card:hover::after { width: 100%; transition: width 1.2s linear; }
.expansion-provider-card:focus-within::after, .expansion-provider-card.is-expanded::after { width: 100%; transition: none; }
.expansion-provider-summary { display: flex; align-items: center; min-width: 0; height: 46px; outline: none; }
.expansion-provider-summary:focus-visible { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--provider-accent) 55%, transparent); }
.merchant-expansion-controls .expansion-provider-option { display: flex; align-items: center; gap: 9px; min-width: 0; width: calc(100% - 38px); height: 46px; padding: 0 0 0 11px; border: 0; border-radius: 0; background: transparent; cursor: pointer; }
.expansion-provider-option input { width: 17px; height: 17px; flex: none; accent-color: var(--provider-accent, var(--primary)); }
/* 品牌徽标：checkbox 前的品牌色圆点，用品牌字「高/腾/花」增强识别 */
.expansion-provider-card.amap .expansion-provider-option::before,
.expansion-provider-card.tencent .expansion-provider-option::before,
.expansion-provider-card.huawei .expansion-provider-option::before { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: color-mix(in srgb, var(--provider-brand) 14%, transparent); color: var(--provider-brand); font-size: 11px; font-weight: 900; line-height: 1; letter-spacing: 0; }
.expansion-provider-card.amap .expansion-provider-option::before { content: "高"; }
.expansion-provider-card.tencent .expansion-provider-option::before { content: "腾"; }
.expansion-provider-card.huawei .expansion-provider-option::before { content: "花"; }
.expansion-provider-option span { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; width: 100%; font-size: 13px; font-weight: 800; letter-spacing: .01em; }
/* 状态徽章化：圆角胶囊 + 状态点前导，替代裸文字 */
.expansion-provider-option em { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 7px; border-radius: 999px; background: color-mix(in srgb, #15803d 10%, transparent); color: #15803d; font-size: 10.5px; font-weight: 800; font-style: normal; letter-spacing: .02em; white-space: nowrap; }
.expansion-provider-option em::before { content: ""; flex: none; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .9; }
/* 核验倒计时徽章：等宽数字读秒，时钟点前导，与状态徽章同风格但更弱 */
.expansion-provider-countdown { display: inline-flex; align-items: center; gap: 5px; margin-left: 5px; padding: 3px 9px 3px 7px; border-radius: 999px; background: color-mix(in srgb, var(--provider-accent, #15803d) 8%, transparent); color: color-mix(in srgb, var(--provider-accent, #15803d) 78%, var(--text-soft)); font: 800 10.5px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-style: normal; letter-spacing: .04em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.expansion-provider-countdown::before { content: ""; flex: none; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .55; }
/* 免费额度徽标 */
.expansion-provider-quota { display: inline-flex; align-items: center; gap: 4px; margin-left: 5px; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--provider-accent, #15803d) 10%, transparent); color: color-mix(in srgb, var(--provider-accent, #15803d) 72%, var(--text-soft)); font: 800 10.5px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-style: normal; letter-spacing: .03em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.expansion-provider-quota.tripped { background: #fee2e2; color: #b91c1c; }
/* 自动化状态提示横幅 */
.expansion-auto-note { margin-top: 8px; padding: 8px 12px; border-radius: 8px; background: #eff6ff; color: #1d4ed8; font-size: 12.5px; border-left: 3px solid #3b82f6; }
.expansion-auto-note.throttle { background: #fff7ed; color: #c2410c; border-left-color: #f59e0b; }
.expansion-provider-toggle { position: relative; width: 38px; height: 46px; flex: none; }
.expansion-provider-toggle::before, .expansion-provider-toggle::after { content: ""; position: absolute; top: 22px; width: 7px; height: 1.5px; border-radius: 2px; background: var(--text-soft); transition: transform .22s ease; }
.expansion-provider-toggle::before { left: 12px; transform: rotate(45deg); }
.expansion-provider-toggle::after { left: 17px; transform: rotate(-45deg); }
.expansion-provider-card:hover .expansion-provider-toggle::before, .expansion-provider-card:focus-within .expansion-provider-toggle::before, .expansion-provider-card.is-expanded .expansion-provider-toggle::before { transform: rotate(-45deg); }
.expansion-provider-card:hover .expansion-provider-toggle::after, .expansion-provider-card:focus-within .expansion-provider-toggle::after, .expansion-provider-card.is-expanded .expansion-provider-toggle::after { transform: rotate(45deg); }
.expansion-provider-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding: 9px 10px 10px; border-top: 1px solid color-mix(in srgb, var(--provider-accent) 16%, var(--border)); background: color-mix(in srgb, var(--provider-accent) 4%, transparent); }
.expansion-provider-actions .btn { min-width: 0; min-height: 36px; padding: 7px 9px; border-radius: 8px; font-size: 12px; font-weight: 700; }
.expansion-provider-verify { color: var(--text); }
.expansion-provider-import { border-color: color-mix(in srgb, var(--provider-accent) 55%, var(--border)); background: color-mix(in srgb, var(--provider-accent) 9%, transparent); color: var(--provider-accent); font-weight: 800; }
/* 勾选选中态：卡片整体品牌色提亮，用户能一眼看出哪几个已选 */
.expansion-provider-card:has(input:checked) { border-color: color-mix(in srgb, var(--provider-accent) 62%, var(--border)); background: linear-gradient(150deg, color-mix(in srgb, var(--provider-accent) 7%, var(--surface-solid)), var(--surface-solid) 62%); box-shadow: 0 8px 22px color-mix(in srgb, var(--provider-accent) 13%, transparent); }
.expansion-provider-card:has(input:checked):hover, .expansion-provider-card:has(input:checked):focus-within, .expansion-provider-card:has(input:checked).is-expanded { box-shadow: 0 16px 32px color-mix(in srgb, var(--provider-accent) 18%, transparent); }
.baidu-temporary-card { position: relative; margin: 14px 0; padding: 18px; overflow: hidden; border: 1px solid color-mix(in srgb, #2563eb 28%, var(--border)); border-radius: 12px; background: linear-gradient(135deg, color-mix(in srgb, #eff6ff 84%, var(--surface-solid)), var(--surface-solid) 58%); box-shadow: 0 12px 34px rgba(37,99,235,.09); }
.baidu-temporary-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: linear-gradient(180deg, #2563eb, #06b6d4); }
.baidu-temporary-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.baidu-temporary-head h3 { margin: 4px 0 5px; font-size: 19px; }
.baidu-temporary-head p { margin: 0; color: var(--text-soft); font-size: 12px; line-height: 1.6; }
.baidu-temporary-kicker { display: inline-flex; padding: 3px 7px; border-radius: 999px; background: #dbeafe; color: #1d4ed8; font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.baidu-temporary-clock { display: grid; min-width: 170px; padding: 11px 14px; border: 1px solid rgba(37,99,235,.2); border-radius: 10px; background: rgba(255,255,255,.78); text-align: right; }
.baidu-temporary-clock span, .baidu-temporary-clock small { color: var(--text-soft); font-size: 10px; }
.baidu-temporary-clock strong { margin: 3px 0; color: #1d4ed8; font: 900 24px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .03em; }
.baidu-temporary-import { display: grid; grid-template-columns: minmax(230px, 2fr) repeat(2, minmax(120px, .8fr)) auto; gap: 10px; align-items: end; margin-top: 15px; }
.baidu-temporary-import label { display: grid; gap: 6px; min-width: 0; }
.baidu-temporary-import label span { color: var(--text-soft); font-size: 11px; font-weight: 800; }
.baidu-temporary-import input { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-solid); color: var(--text); font: inherit; }
.baidu-temporary-import .btn { min-height: 40px; white-space: nowrap; }
.baidu-temporary-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.baidu-temporary-status { display: grid; gap: 10px; margin-top: 14px; }
.baidu-temporary-overview { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(240px, 1.2fr); gap: 10px; }
.baidu-temporary-state, .baidu-temporary-current { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 11px 12px; border: 1px solid var(--border); border-radius: 9px; background: rgba(255,255,255,.72); }
.baidu-temporary-state > span { width: 11px; height: 11px; flex: none; border-radius: 50%; background: #94a3b8; }
.baidu-temporary-state.running > span { background: #16a34a; box-shadow: 0 0 0 5px rgba(22,163,74,.12); }
.baidu-temporary-state.paused > span, .baidu-temporary-state.error > span { background: #f59e0b; }
.baidu-temporary-state.quota_exhausted > span, .baidu-temporary-state.expired > span, .baidu-temporary-state.deleted > span { background: #dc2626; }
.baidu-temporary-state div, .baidu-temporary-current { display: grid; gap: 3px; }
.baidu-temporary-state strong, .baidu-temporary-current strong { font-size: 14px; }
.baidu-temporary-state small, .baidu-temporary-current small, .baidu-temporary-current > span { min-width: 0; overflow: hidden; color: var(--text-soft); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.baidu-temporary-quota-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.baidu-temporary-quota-grid article { display: grid; gap: 7px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-solid); }
.baidu-temporary-quota-grid article > div:first-child { display: flex; justify-content: space-between; gap: 10px; color: var(--text-soft); font-size: 11px; }
.baidu-temporary-quota-grid b { color: var(--text); }
.baidu-temporary-quota-grid small { color: var(--text-faint); font-size: 10px; }
.baidu-temporary-progress { height: 7px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.baidu-temporary-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #06b6d4); }
.baidu-temporary-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.baidu-temporary-metrics span { display: grid; gap: 3px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; background: rgba(255,255,255,.72); color: var(--text-soft); font-size: 10px; }
.baidu-temporary-metrics b { color: var(--text); font-size: 17px; }
.baidu-temporary-error { padding: 9px 11px; border-left: 3px solid #dc2626; background: #fef2f2; color: #991b1b; font-size: 11px; overflow-wrap: anywhere; }
.expansion-daily-section { margin: 14px 0; padding: 14px; border: 1px solid var(--border); border-radius: 7px; }
.expansion-daily-section .expansion-band-head { margin-bottom: 10px; }
/* 工具条：来源筛选 + 搜索 */
.expansion-daily-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.expansion-daily-filters { display: flex; flex-wrap: wrap; gap: 7px; }
.daily-filter-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-solid); color: var(--text-soft); font-size: 12px; font-weight: 500; cursor: pointer; transition: all .2s cubic-bezier(.16,1,.3,1); }
.daily-filter-chip em { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--border); color: var(--text); }
.daily-filter-chip:hover { border-color: var(--accent); color: var(--text); transform: translateY(-1px); }
.daily-filter-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(99,102,241,.28); }
.daily-filter-chip.active em { background: rgba(255,255,255,.25); color: #fff; }
.expansion-daily-search { flex: 0 1 240px; min-width: 180px; padding: 7px 13px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-solid); color: var(--text); font-size: 12px; outline: none; transition: border-color .2s, box-shadow .2s; }
.expansion-daily-search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,.12); }
/* 卡片网格列表 */
.expansion-daily-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; max-height: 460px; overflow-y: auto; padding-right: 4px; }
.expansion-daily-list .daily-empty { grid-column: 1 / -1; }
.daily-card { display: flex; gap: 11px; align-items: stretch; min-width: 0; padding: 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-solid); transition: border-color .2s, box-shadow .2s, transform .2s cubic-bezier(.16,1,.3,1); }
.daily-card:hover { border-color: var(--accent); box-shadow: 0 4px 16px rgba(15,23,42,.08); transform: translateY(-2px); }
.daily-card .expansion-storefront { width: 64px; height: 100%; min-height: 72px; align-self: center; }
.daily-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.daily-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.daily-card-name { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.daily-provider { flex: 0 0 auto; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 600; }
.daily-provider[class*="provider-amap"] { background: #e6f4ea; color: #1e8e3e; }
.daily-provider[class*="provider-tencent"] { background: #e8f0fe; color: #1a73e8; }
.daily-provider[class*="provider-huawei"] { background: #fdecea; color: #d93025; }
.daily-provider[class*="provider-baidu"] { background: #e0f2fe; color: #0369a1; }
.daily-provider[class*="provider-unknown"] { background: var(--border); color: var(--text-soft); }
.daily-card-addr { font-size: 12px; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.daily-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 12px; margin-top: auto; padding-top: 4px; border-top: 1px dashed var(--border); }
.daily-card-time { font-size: 11.5px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.daily-card-town { font-size: 11px; color: var(--text-soft); }
.expansion-daily-photo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 9px; max-height: 224px; margin-bottom: 10px; overflow-y: auto; }
.expansion-daily-photo-list article { display: grid; grid-template-columns: 72px minmax(0, 1fr); grid-template-rows: auto auto; gap: 3px 9px; min-width: 0; padding: 8px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-solid); }
.expansion-daily-photo-list article > div { grid-row: 1 / 3; }
.expansion-daily-photo-list strong, .expansion-daily-photo-list small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.expansion-daily-photo-list small { color: var(--text-soft); font-size: 11px; }
.expansion-storefront { position: relative; display: grid; place-items: center; flex: 0 0 auto; width: 72px; height: 64px; padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 6px; background: #f8fafc; color: var(--text-soft); cursor: zoom-in; }
.expansion-storefront img { width: 100%; height: 100%; object-fit: cover; }
.expansion-storefront span { position: absolute; right: 3px; bottom: 3px; max-width: calc(100% - 6px); padding: 2px 4px; overflow: hidden; border-radius: 3px; background: rgba(15,23,42,.78); color: #fff; font-size: 9px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.expansion-storefront.empty { cursor: default; }
.expansion-storefront.empty span { position: static; padding: 4px; background: transparent; color: var(--text-faint); font-size: 10px; line-height: 1.3; text-align: center; white-space: normal; }
.expansion-storefront.compact { width: 44px; height: 42px; }
.expansion-storefront.compact span { font-size: 8px; }
.expansion-provider-option em.unconfigured { background: color-mix(in srgb, #be123c 10%, transparent); color: #be123c; }
.expansion-provider-option em.unavailable, .expansion-provider-option em.stale { background: color-mix(in srgb, #c2410c 10%, transparent); color: #c2410c; }
.expansion-provider-option em.checking { background: color-mix(in srgb, #0369a1 10%, transparent); color: #0369a1; }
.expansion-provider-option em.checking::before { animation: expansionStatusPulse 1.4s ease-in-out infinite; }
.expansion-provider-option em.failed { background: color-mix(in srgb, #b91c1c 10%, transparent); color: #b91c1c; }
.expansion-provider-option em.available { background: color-mix(in srgb, #15803d 10%, transparent); color: #15803d; }
/* 暗色模式：徽章底色与文字提亮，卡片阴影弱化 */
.expansion-provider-option:has(input:disabled) { cursor: not-allowed; opacity: .72; }
@media (hover: none), (pointer: coarse) {
  .expansion-provider-card:hover { max-height: 48px; border-color: color-mix(in srgb, var(--provider-accent) 30%, var(--border)); box-shadow: 0 5px 16px rgba(15,23,42,.05); transition-delay: 0s; }
  .expansion-provider-card:hover::after { width: 0; transition: none; }
  .expansion-provider-card.is-expanded, .expansion-provider-card:focus-within { max-height: 112px; border-color: color-mix(in srgb, var(--provider-accent) 68%, var(--border)); box-shadow: 0 10px 24px rgba(15,23,42,.1); }
  .expansion-provider-card.is-expanded::after, .expansion-provider-card:focus-within::after { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .expansion-provider-card, .expansion-provider-card::after, .expansion-provider-toggle::before, .expansion-provider-toggle::after { transition: none !important; }
}
.merchant-expansion-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.merchant-expansion-actions .btn { min-width: 76px; }
.expansion-status { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 15px 16px; border-radius: 8px; }
.expansion-status-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.expansion-status-main strong { display: block; font-size: 16px; }
.expansion-status-main p { margin: 3px 0 0; color: var(--text-soft); font-size: 12px; overflow-wrap: anywhere; }
.expansion-status-dot { width: 12px; height: 12px; border-radius: 50%; background: #94a3b8; flex: none; }
.expansion-status-dot.running { background: #16a34a; animation: expansionStatusPulse 1.6s ease-in-out infinite; }
.expansion-status-dot.paused, .expansion-status-dot.error { background: #f97316; }
.expansion-status-dot.completed { background: #0f766e; }
.expansion-status-dot.stopped { background: #dc2626; }
@keyframes expansionStatusPulse { 50% { transform: scale(1.35); opacity: .55; } }
.expansion-status-metrics { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.expansion-status-metrics span { padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-solid); color: var(--text-soft); font-size: 11px; }
.expansion-status-metrics b { color: var(--text); }
.expansion-error { grid-column: 1 / -1; padding: 9px 11px; border-left: 3px solid #dc2626; background: #fef2f2; color: #991b1b; font-size: 12px; }
.expansion-summary-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.expansion-summary { display: grid; gap: 4px; padding: 13px 14px; border-top: 3px solid #64748b; background: var(--surface-solid); box-shadow: var(--shadow); }
.expansion-summary.accent { border-top-color: var(--primary); }
.expansion-summary span { color: var(--text-soft); font-size: 12px; font-weight: 700; }
.expansion-summary strong { font-size: 25px; line-height: 1; }
.expansion-keyword-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; padding: 12px 14px; border-radius: 8px; }
.expansion-keyword-summary strong { color: var(--primary-2); }
.expansion-keyword-summary span { color: var(--text-soft); font-size: 12px; overflow-wrap: anywhere; }
.expansion-band { margin-top: 20px; }
.expansion-band-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.expansion-band-head h3 { margin: 0; font-size: 16px; }
.expansion-band-head span { color: var(--text-soft); font-size: 12px; }
.expansion-village-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 126px; gap: 10px;
  height: 262px; margin-top: 10px; padding-right: 5px; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: rgba(249, 115, 22, .38) transparent;
}
.expansion-village-grid::-webkit-scrollbar { width: 6px; }
.expansion-village-grid::-webkit-scrollbar-thumb { background: rgba(249, 115, 22, .38); border-radius: 999px; }
.expansion-village, .expansion-route, .expansion-lead { padding: 13px 14px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-solid); }
.expansion-village { min-height: 0; overflow: hidden; border-left: 4px solid #16a34a; }
.expansion-village.uncovered { border-left-color: var(--primary); }
.expansion-village > div, .expansion-route > div, .expansion-lead-main > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.expansion-village span, .expansion-route span, .expansion-lead-main span, .expansion-lead-main em { padding: 2px 7px; border-radius: 5px; background: var(--primary-soft); color: var(--primary); font-size: 11px; font-style: normal; font-weight: 800; }
.expansion-village p, .expansion-route p, .expansion-lead p { margin: 7px 0; color: var(--text-soft); font-size: 12px; overflow-wrap: anywhere; }
.expansion-village p { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.expansion-village small { display: block; margin-bottom: 9px; overflow: hidden; color: var(--text-faint); text-overflow: ellipsis; white-space: nowrap; }
.expansion-route-list, .expansion-lead-list { display: grid; gap: 8px; margin-top: 10px; }
.expansion-route-list {
  grid-auto-rows: 69px;
  height: 146px;
  padding-right: 5px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-snap-type: y mandatory;
  scrollbar-width: thin;
  scrollbar-color: rgba(249, 115, 22, .38) transparent;
}
.expansion-route-list::-webkit-scrollbar { width: 6px; }
.expansion-route-list::-webkit-scrollbar-thumb { background: rgba(249, 115, 22, .38); border-radius: 999px; }
.expansion-route { min-height: 0; overflow: hidden; scroll-snap-align: start; }
.expansion-lead-list {
  display: grid; grid-auto-rows: 90px; gap: 8px; height: 286px; margin-top: 10px; padding-right: 5px;
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(249, 115, 22, .38) transparent;
}
.expansion-lead-list::-webkit-scrollbar { width: 6px; }
.expansion-lead-list::-webkit-scrollbar-thumb { background: rgba(249, 115, 22, .38); border-radius: 999px; }
.expansion-lead { min-height: 0; overflow: hidden; display: grid; grid-template-columns: 36px 72px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.expansion-lead-order { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--primary-2); color: #fff; font-weight: 900; }
.expansion-lead-main { min-width: 0; }
.expansion-lead-main p { margin-bottom: 5px; }
.expansion-distance { background: #fff7ed !important; color: #c2410c !important; }
.expansion-lead-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 12px; color: var(--text-soft); font-size: 11px; }
.expansion-provider-badges { display: inline-flex; flex-wrap: wrap; gap: 5px; }
.expansion-provider-badges b { padding: 2px 6px; border: 1px solid var(--border); border-radius: 5px; background: #f8fafc; color: var(--text-soft); font-size: 10px; }
.expansion-provider-badges [class*="provider-amap"] { border-color: #86efac; background: #f0fdf4; color: #15803d; }
.expansion-provider-badges [class*="provider-huawei"] { border-color: #f59e0b; background: #fffbeb; color: #92400e; }
.expansion-provider-badges [class*="provider-tencent"] { border-color: #67e8f9; background: #ecfeff; color: #0e7490; }
.expansion-lead-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; flex: none; }
.expansion-task-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 208px;
  gap: 10px;
  height: 428px;
  margin-top: 10px;
  padding-right: 5px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-snap-type: y mandatory;
  scrollbar-width: thin;
  scrollbar-color: rgba(249, 115, 22, .38) transparent;
}
.expansion-task-groups::-webkit-scrollbar { width: 6px; }
.expansion-task-groups::-webkit-scrollbar-thumb { background: rgba(249, 115, 22, .38); border-radius: 999px; }
.expansion-task-group { min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: 13px 14px; border: 1px solid var(--border); border-left: 4px solid var(--primary-2); border-radius: 10px; background: var(--surface-solid); scroll-snap-align: start; transition: border-color .2s, box-shadow .2s, transform .2s cubic-bezier(.16,1,.3,1); }
.expansion-task-group:hover { border-color: var(--primary-2); box-shadow: 0 4px 16px rgba(15,23,42,.08); transform: translateY(-2px); }
.expansion-task-group-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding-bottom: 8px; border-bottom: 1px dashed var(--border); }
.expansion-task-group-head > div { display: grid; gap: 3px; min-width: 0; }
.expansion-task-group-head span { color: var(--text-soft); font-size: 11px; }
/* 组头部镇概览 */
.etg-towns { display: inline-flex; align-items: center; max-width: 100%; padding: 2px 8px; border-radius: 999px; background: rgba(249,115,22,.1); color: #c2410c; font-size: 10.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.etg-towns::before { content: '📍'; margin-right: 3px; font-size: 10px; }
.etg-towns.cross { background: rgba(99,102,241,.12); color: var(--accent); }
/* 店名 + 镇村标签 */
.expansion-task-group ol { margin: 8px 0 0; padding-left: 0; list-style: none; counter-reset: etg; color: var(--text-soft); font-size: 12px; line-height: 1.6; overflow-y: auto; }
.expansion-task-group li { counter-increment: etg; display: flex; align-items: center; gap: 6px; padding: 2px 0 2px 3px; overflow-wrap: anywhere; }
.expansion-task-group li::before { content: counter(etg); flex: 0 0 auto; display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--border); color: var(--text); font-size: 10px; font-weight: 700; }
.etg-name { flex: 1; min-width: 0; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.etg-place { flex: 0 0 auto; display: inline-flex; gap: 4px; max-width: 46%; overflow: hidden; }
.etg-tag { padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.etg-town { background: rgba(99,102,241,.1); color: var(--accent); }
.etg-village { background: rgba(15,23,42,.06); color: var(--text-soft); }
.etg-empty { background: transparent; color: var(--text-soft); opacity: .6; font-weight: 400; }
.merchant-expansion-empty, .merchant-expansion-loading { padding: 28px 16px; border: 1px dashed var(--border); border-radius: 8px; color: var(--text-soft); text-align: center; }
.merchant-expansion-empty.error { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.expansion-review-section { min-width: 0; margin-top: 22px; }
.expansion-review-panel { min-width: 0; margin-top: 10px; }
.expansion-review-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.expansion-review-summary span { display: grid; gap: 3px; min-width: 0; padding: 11px 12px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-solid); color: var(--text-soft); font-size: 11px; overflow-wrap: anywhere; }
.expansion-review-summary b { color: var(--text); font-size: 15px; }
.expansion-review-list {
  display: grid; grid-auto-rows: 64px; gap: 7px; height: 206px; padding-right: 5px;
  overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: rgba(249, 115, 22, .38) transparent;
}
.expansion-review-list::-webkit-scrollbar { width: 6px; }
.expansion-review-list::-webkit-scrollbar-thumb { background: rgba(249, 115, 22, .38); border-radius: 999px; }
.expansion-review-row { min-height: 0; overflow: hidden; display: grid; grid-template-columns: 44px minmax(180px, 1.2fr) repeat(3, minmax(130px, 1fr)); gap: 8px; padding: 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-solid); }
.expansion-review-name, .expansion-review-state { display: grid; align-content: center; gap: 3px; min-width: 0; }
.expansion-review-name strong, .expansion-review-name span, .expansion-review-state { overflow-wrap: anywhere; }
.expansion-review-name span { color: var(--text-soft); font-size: 11px; }
.expansion-review-state { padding: 7px 8px; border-left: 3px solid #94a3b8; background: #f8fafc; color: var(--text-soft); font-size: 11px; }
.expansion-review-state b { color: var(--text); font-size: 11px; }
.expansion-review-state.ok { border-left-color: #16a34a; background: #f0fdf4; }
.expansion-review-state.warning { border-left-color: #f97316; background: #fff7ed; }
.expansion-review-note { margin: 8px 0 0; color: var(--text-soft); font-size: 11px; }
@media (max-width: 820px) {
  .merchant-expansion-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .baidu-temporary-import { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .baidu-temporary-import label:first-child { grid-column: 1 / -1; }
  .baidu-temporary-import .btn { grid-column: 1 / -1; }
  .baidu-temporary-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .expansion-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .expansion-village-grid, .expansion-task-groups { grid-template-columns: 1fr; }
  .expansion-task-groups { height: 428px; grid-auto-rows: 208px; }
  .expansion-lead-list { grid-auto-rows: 116px; height: 364px; }
  .expansion-lead { grid-template-columns: 32px 64px minmax(0, 1fr); align-items: flex-start; }
  .expansion-lead .expansion-storefront { width: 64px; height: 58px; }
  .expansion-lead-actions { grid-column: 3; justify-content: flex-start; }
  .expansion-review-list { grid-auto-rows: 82px; height: 260px; }
  .expansion-review-row { grid-template-columns: 44px repeat(3, minmax(0, 1fr)); }
  .expansion-review-name { grid-column: 2 / -1; }
}
@media (max-width: 760px) {
  .expansion-workspace-head { flex-direction: column; }
  .expansion-workspace-current { width: 100%; min-width: 0; }
  .expansion-workspace-browser { grid-template-columns: 1fr; gap: 14px; }
  .expansion-workspace-town-head { justify-content: flex-start; }
}
@media (max-width: 520px) {
  .merchant-expansion-header { align-items: flex-start; flex-direction: column; }
  .expansion-workspace { padding: 16px 14px; }
  .expansion-workspace-global { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-block: 16px 14px; padding-bottom: 14px; }
  .expansion-workspace-tab { min-width: 0; padding-inline: 9px; }
  .expansion-workspace-town-head { display: grid; gap: 3px; }
  .expansion-workspace-towns { margin-inline: -2px; padding-bottom: 8px; }
  .expansion-town-tab { min-height: 42px; padding-inline: 13px; }
  .baidu-temporary-card { padding: 14px 12px 14px 16px; }
  .baidu-temporary-head { flex-direction: column; }
  .baidu-temporary-clock { width: 100%; text-align: left; }
  .baidu-temporary-import, .baidu-temporary-overview, .baidu-temporary-quota-grid, .baidu-temporary-metrics { grid-template-columns: 1fr; }
  .baidu-temporary-import label:first-child, .baidu-temporary-import .btn { grid-column: auto; }
  .baidu-temporary-actions .btn { flex: 1 1 40%; min-width: 0; }
  .merchant-expansion-controls { grid-template-columns: 1fr; padding: 14px; }
  .expansion-target-head { align-items: flex-start; flex-direction: column; gap: 11px; }
  .expansion-target-lock { width: 100%; min-width: 0; }
  .expansion-provider-fieldset { grid-template-columns: 1fr; }
  .expansion-provider-card { max-height: 48px; }
  .expansion-provider-card:hover, .expansion-provider-card:focus-within, .expansion-provider-card.is-expanded { max-height: 112px; }
  .expansion-status { grid-template-columns: 1fr; }
  .expansion-status-metrics { justify-content: flex-start; }
  .expansion-summary-grid, .expansion-review-summary { grid-template-columns: 1fr; }
  .expansion-review-row { grid-template-columns: 44px minmax(0, 1fr); }
  .expansion-review-name { grid-column: 2; }
  .expansion-review-state { grid-column: 1 / -1; }
  .expansion-review-list { grid-auto-rows: 184px; height: 566px; overflow-x: hidden; }
  .expansion-keyword-summary, .expansion-task-group-head { align-items: stretch; flex-direction: column; }
  .expansion-task-group-head .btn { width: 100%; }
  .merchant-expansion-actions .btn { flex: 1 1 42%; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { .expansion-status-dot.running { animation: none; } }

/* ===================== 员工管理页签 ===================== */
.staff-management-section {
  padding: 0 0 40px;
}
.staff-management-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.staff-management-title h2 { margin: 0; }
.staff-management-subtitle {
  display: block;
  margin-top: 5px;
  color: var(--text-soft);
  font-size: 13px;
}
.staff-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.staff-summary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.staff-summary-item span { color: var(--text-soft); font-weight: 700; }
.staff-summary-item b { color: var(--primary); font-size: 28px; line-height: 1; }
.staff-summary-item.admin b { color: var(--primary-2); }
.staff-summary-item.rider b { color: #2563eb; }
.staff-summary-item.packing b { color: #b45309; }
.staff-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 12px;
}
.staff-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 320px;
  min-width: 0;
}
.staff-search > span { position: absolute; left: 12px; pointer-events: none; }
.staff-search input {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px 9px 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  outline: none;
}
.staff-search input:focus { border-color: var(--primary); outline: 2px solid var(--primary-soft); }
.staff-role-tabs { display: inline-flex; gap: 4px; flex: 0 0 auto; }
.staff-role-tab {
  min-height: 40px;
  padding: 8px 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text-soft);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .18s, background .18s, color .18s, transform .18s;
}
.staff-role-tab:hover { border-color: var(--primary); color: var(--primary); }
.staff-role-tab:active { transform: scale(.98); }
.staff-role-tab.active { border-color: var(--primary); background: var(--primary); color: #fff; }
.staff-list {
  /* 只显示约 2 条员工，超出上下滚动（item ~72px + 间距 8px + 内边距 10px*2） */
  height: 172px;
  max-height: 172px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  padding: 10px;
}
.staff-list-item { min-height: 64px; margin-bottom: 8px; padding: 12px 14px; border: 1px solid transparent; }
.staff-list-item:last-child { margin-bottom: 0; }
.staff-list-item:hover { border-color: var(--border); }
.staff-list-item .rider-avatar { width: 42px; height: 42px; }
.staff-list-item .rider-name { display:flex; align-items:center; gap:8px; font-size: 15px; }
.current-account-badge { padding:2px 6px; border-radius:5px; background:var(--primary-soft); color:var(--primary); font-size:10px; line-height:1.4; }
.staff-list-item.is-current-account { border-color:color-mix(in srgb, var(--primary) 35%, var(--border)); }
.staff-list-item .rider-username { margin-top: 3px; font-size: 12px; }
.staff-list-item .rider-edit-btn,
.staff-list-item .rider-del-btn { height: 36px; opacity: .72; }
.staff-list-item:hover .rider-edit-btn,
.staff-list-item:hover .rider-del-btn,
.staff-list-item .rider-edit-btn:focus-visible,
.staff-list-item .rider-del-btn:focus-visible { opacity: 1; }
.staff-empty { display: grid; place-items: center; min-height: 150px; padding: 30px; color: var(--text-faint); text-align: center; }
.staff-error { color: #dc2626; }
@media (max-width: 720px) {
  .staff-management-header { align-items: stretch; flex-direction: column; }
  .staff-management-header .btn { width: 100%; }
  .staff-summary-grid { grid-template-columns: 1fr; gap: 8px; }
  .staff-summary-item { min-height: 58px; padding: 12px 16px; }
  .staff-summary-item b { font-size: 23px; }
  .staff-toolbar { align-items: stretch; flex-direction: column; }
  .staff-search { flex-basis: auto; width: 100%; }
  .staff-role-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; }
  .staff-role-tab { padding-inline: 8px; }
  .staff-list { max-height: 172px; scrollbar-gutter: auto; padding: 8px; }
  .packing-photo-grid { max-height: none; overflow: visible; scrollbar-gutter: auto; }
  .staff-list-item { align-items: flex-start; flex-wrap: wrap; }
  .staff-list-item .rider-info { flex: 1 1 calc(100% - 56px); }
  .staff-list-item .rider-role-tag { margin-left: 52px; }
  .staff-list-item .rider-item-actions { margin-left: auto; }
}

/* ===================== 成本稽查页签 ===================== */
.cost-audit-section {
  max-width: none;
  margin: 0;
  padding: 0 0 40px;
}
.cost-audit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.cost-audit-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.cost-audit-title h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cost-audit-subtitle {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-soft);
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid var(--border);
  padding: 2px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.cost-audit-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 320px;
  justify-content: flex-end;
  min-width: 0;
}
.cost-audit-date {
  width: auto;
  min-width: 150px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.cost-audit-date:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
  background: var(--surface-solid);
}

/* 汇总区：总成本卡片 + 分类网格 */
.cost-audit-summary {
  margin-bottom: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cost-audit-total-card {
  background: linear-gradient(135deg, rgba(249,115,22,0.12), rgba(251,113,133,0.08));
  border: 1px solid rgba(249,115,22,0.22);
  border-radius: 16px;
  padding: 18px 22px;
  box-shadow: 0 6px 20px rgba(249,115,22,0.10);
}
.cost-audit-total-label {
  font-size: 13px;
  font-weight: 800;
  color: #9a3412;
  letter-spacing: 0.3px;
}
.cost-audit-total-value {
  font-size: 32px;
  font-weight: 900;
  color: var(--primary);
  margin: 6px 0 4px;
  letter-spacing: .5px;
}
.cost-audit-total-hint {
  font-size: 12px;
  color: var(--text-soft);
  font-weight: 600;
}
.cost-audit-cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.cost-audit-cat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, border-color .15s, background .15s;
}
.cost-audit-cat:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15,23,42,0.10);
  border-color: rgba(249,115,22,0.35);
}
.cost-audit-cat.active {
  background: linear-gradient(135deg, rgba(249,115,22,0.12), rgba(251,113,133,0.08));
  border-color: rgba(249,115,22,0.45);
  box-shadow: 0 0 0 3px rgba(249,115,22,0.10);
}
.cost-audit-cat.fixed {
  cursor: default;
  background: rgba(15,23,42,0.03);
}
.cost-audit-cat.fixed:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border);
}
.cost-audit-cat-icon {
  font-size: 22px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: rgba(249,115,22,0.10);
  border-radius: 10px;
  flex-shrink: 0;
}
.cost-audit-cat-info { min-width: 0; }
.cost-audit-cat-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-soft);
}
.cost-audit-cat-amount {
  font-size: 16px;
  font-weight: 900;
  color: var(--text);
  margin-top: 2px;
}

/* 明细列表 */
.cost-audit-list {
  max-height: min(620px, calc(100dvh - 300px));
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}
.cost-audit-list-head,
.cost-audit-row {
  display: grid;
  grid-template-columns: 140px 100px 1fr 120px 120px;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
}
.cost-audit-list-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-solid);
  font-size: 12px;
  font-weight: 800;
  color: var(--text-soft);
  border-bottom: 1px solid var(--border);
}
.cost-audit-row {
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.cost-audit-row:last-child { border-bottom: none; }
.cost-audit-row:hover { background: rgba(249,115,22,0.04); }
.cal-col { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-amount { font-weight: 900; color: var(--primary); }
.cal-note { color: var(--text-soft); }
.cal-time { font-size: 12px; color: var(--text-faint); }
.cal-act { display: flex; gap: 6px; justify-content: flex-end; }
.cal-act .btn { padding: 5px 10px; font-size: 12px; }
.cost-audit-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
  color: #92400e;
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 1px solid #fdba74;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.cost-audit-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-faint);
  font-size: 14px;
}

@media (max-width: 720px) {
  #revRows, #costRows, #weighStatsRows, .cost-audit-list { max-height: none; overflow: visible; scrollbar-gutter: auto; }
  .rev-table-wrap .rev-table-head, .cost-card .rev-table-head, .weigh-stats .rev-table-head { display: none; }
  .rev-table-wrap .rev-row, .cost-card .rev-row, .weigh-stats .rev-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    margin-bottom: 9px;
    padding: 11px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-solid);
  }
  .rev-row .rtc { display: grid; gap: 2px; min-width: 0; overflow: visible; }
  .rev-row .rtc::before { color: var(--text-faint); font-size: 10px; font-weight: 800; }
  .rev-table-wrap .rtc-merchant, .weigh-stats .rtc-merchant { grid-column: 1 / -1; align-items: flex-start; text-align: left; }
  .rev-table-wrap .rtc-product::before, .cost-card .rtc-product::before, .weigh-stats .rtc-product::before { content: "商品"; }
  .rev-row .rtc-qty::before { content: "数量"; }
  .rev-row .rtc-price::before { content: "单价 / 区间"; }
  .rev-row .rtc-sub::before { content: "小计"; }
  .rev-row .rtc-act::before { content: "操作 / 最近记录"; }
  .rev-row .rev-weigh-audits { grid-column: 1 / -1; }
  .sales-contact-unavailable { color: var(--text-faint); cursor: default; }
  .cost-audit-list-head { position: static; }
  .cost-audit-header { gap: 10px; }
  .cost-audit-toolbar { flex: 1 1 100%; justify-content: stretch; }
  .cost-audit-date { flex: 1; }
  .cost-audit-cats { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .cost-audit-list-head,
  .cost-audit-row {
    grid-template-columns: 110px 80px 1fr 80px;
  }
  .cost-audit-list-head .cal-time,
  .cost-audit-row .cal-time { display: none; }
}
@media (max-width: 480px) {
  .cost-audit-cats { grid-template-columns: repeat(2, 1fr); }
  .cost-audit-list-head,
  .cost-audit-row {
    grid-template-columns: 1fr 80px 80px;
    padding: 10px 12px;
  }
  .cost-audit-list-head .cal-note,
  .cost-audit-row .cal-note { display: none; }
}

/* ===================== 商家服务弹窗表单微调 ===================== */
.merchant-service-form { margin-top: 4px; }
.merchant-service-form .form-hint {
  margin-top: -4px;
  background: rgba(249, 115, 22, 0.06);
  border: 1px solid rgba(249, 115, 22, 0.16);
}

/* ===================== 销售业务闭环 ===================== */
.sales-admin-section { margin-top: 28px; min-width: 0; }
.sales-admin-head, .sales-panel-head, .sales-data-head, .sales-route-head, .sales-task-title, .sales-history-item > div:first-child, .sales-diary-row > div:first-child {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.sales-admin-head h2, .sales-panel-head h1 { margin: 0; }
.sales-admin-head p, .sales-panel-head p { margin: 5px 0 0; color: var(--text-soft); font-size: 13px; }
.sales-diary-heading input, .sales-diary-form input, .sales-diary-form select, .sales-diary-form textarea, .sales-visit-form input, .sales-visit-form select, .sales-visit-form textarea { width: 100%; min-width: 0; padding: 10px 11px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-solid); color: var(--text); font: inherit; }
.sales-summary-grid { display: grid; grid-template-columns: repeat(6, minmax(105px, 1fr)); gap: 10px; margin-bottom: 12px; }
.sales-operation-grid { display: grid; grid-template-columns: repeat(6, minmax(105px, 1fr)); gap: 10px; margin-bottom: 18px; }
.sales-operation-item { padding: 11px 13px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-solid); }
.sales-operation-item span { display: block; color: var(--text-soft); font-size: 11px; }
.sales-operation-item b { display: block; margin-top: 2px; font-size: 20px; }
.sales-operation-item.overdue { border-color: #fca5a5; } .sales-operation-item.dueToday { border-color: #fcd34d; } .sales-operation-item.highIntent, .sales-operation-item.conversionReady { border-color: #86efac; }
.sales-summary-item { padding: 13px; border-left: 4px solid #f97316; background: #fff; box-shadow: 0 5px 18px rgba(15,23,42,.06); border-radius: 6px; }
.sales-summary-item span { display: block; color: var(--text-soft); font-size: 12px; }
.sales-summary-item b { display: block; margin-top: 3px; font-size: 22px; }
.sales-summary-item.converted { border-color: #10b981; } .sales-summary-item.closed, .sales-summary-item.archived { border-color: #64748b; } .sales-summary-item.visited { border-color: #e11d48; }
.sales-admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.sales-data-band { min-width: 0; padding-top: 12px; border-top: 3px solid rgba(249,115,22,.55); }
.sales-data-band h3 { margin: 0; font-size: 16px; }
.sales-data-head span { color: var(--text-soft); font-size: 12px; }
.sales-audit-band { grid-column: 1 / -1; }
.sales-prospect-list, .sales-task-list, .sales-history-list, .sales-contact-list, .sales-diary-list, .sales-audit-list, .sales-review-list {
  display: grid;
  gap: 8px;
  min-width: 0;
  max-height: min(520px, calc(100dvh - 260px));
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  margin-top: 10px;
  padding-right: 6px;
}
.sales-prospect-list, .sales-task-list {
  height: 356px;
  max-height: 356px;
  align-content: start;
  scrollbar-width: thin;
  scrollbar-color: rgba(249, 115, 22, .38) transparent;
}
.sales-task-list { grid-auto-rows: minmax(91px, auto); }
.sales-prospect-list { grid-auto-rows: max-content; }
.sales-prospect-list::-webkit-scrollbar, .sales-task-list::-webkit-scrollbar { width: 6px; }
.sales-prospect-list::-webkit-scrollbar-thumb, .sales-task-list::-webkit-scrollbar-thumb { background: rgba(249, 115, 22, .38); border-radius: 999px; }
.sales-prospect-list > *, .sales-task-list > * { min-height: 0; scroll-snap-align: start; }
.sales-audit-list { max-height: 320px; }
.sales-pagination { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 10px; }
.sales-pagination span { min-width: 92px; color: var(--text-soft); font-size: 12px; font-weight: 700; text-align: center; }
.sales-review-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #fdba74; border-radius: 7px; background: rgba(255,247,237,.82); }
.sales-review-row.removal { border-color: #fca5a5; background: rgba(254,242,242,.82); }
.sales-review-row > div:first-child { min-width: 0; display: grid; gap: 4px; }
.sales-review-row small { color: var(--text-soft); overflow-wrap: anywhere; }
.sales-visit-media { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.sales-visit-video { width: min(100%, 360px); aspect-ratio: 4 / 3; object-fit: contain; border-radius: 7px; background: #111827; }
.sales-media-audit-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); color: var(--text-soft); font-size: 12px; }
.sales-prospect-row, .sales-task-row, .sales-history-item, .sales-diary-row { min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: 7px; background: rgba(255,255,255,.78); }
.sales-prospect-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 132px;
  padding: 14px;
  background: var(--surface-solid);
  box-shadow: 0 4px 14px rgba(15,23,42,.045);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s cubic-bezier(.16,1,.3,1);
}
.sales-prospect-row:hover { border-color: rgba(249,115,22,.4); box-shadow: 0 10px 24px rgba(15,23,42,.08); transform: translateY(-1px); }
.sales-prospect-row .expansion-storefront { width: 88px; height: 88px; border-radius: 7px; background: var(--surface-soft); }
.sales-prospect-row .expansion-storefront.empty span { max-width: 64px; padding: 0; font-size: 11px; line-height: 1.45; word-break: keep-all; }
.sales-prospect-main { display: grid; gap: 7px; min-width: 0; }
.sales-prospect-title { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-width: 0; }
.sales-prospect-title strong { min-width: 0; color: var(--text); font-size: 16px; line-height: 1.35; overflow-wrap: anywhere; }
.sales-prospect-address { margin: 0; color: var(--text); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.sales-prospect-details, .sales-prospect-health { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 12px; min-width: 0; }
.sales-prospect-details span { position: relative; color: var(--text-soft); font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.sales-prospect-details span:not(:last-child)::after { position: absolute; right: -7px; color: var(--border); content: "·"; }
.sales-prospect-code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.sales-prospect-health { gap: 6px; }
.sales-prospect-health span { padding: 3px 7px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface-soft); color: var(--text-soft); font-size: 10px; line-height: 1.35; }
.sales-prospect-health b { color: var(--text); font-size: 11px; }
.sales-prospect-health .ready { border-color: #86efac; background: #ecfdf5; color: #047857; font-weight: 700; }
.sales-prospect-row .sales-row-actions { display: grid; grid-template-columns: repeat(2, max-content); justify-content: end; gap: 7px; min-width: 126px; }
.sales-prospect-row .sales-row-actions .primary { grid-column: 1 / -1; }
.sales-prospect-row .sales-row-actions .btn { min-height: 38px; padding-inline: 14px; }
.sales-prospect-main p, .sales-history-item p, .sales-diary-row pre { margin: 6px 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.sales-prospect-main small, .sales-history-item small, .sales-diary-row small { color: var(--text-soft); overflow-wrap: anywhere; }
.sales-row-actions, .sales-task-actions { display: flex; flex-wrap: wrap; gap: 8px; flex: 0 0 auto; }
.sales-soft-delete-note { color: var(--text-soft); font-size: 12px; }
.sales-status { display: inline-flex; align-items: center; width: max-content; max-width: 100%; padding: 3px 8px; border-radius: 999px; background: #fff7ed; border: 1px solid #fdba74; color: #9a3412; font-size: 11px; font-weight: 800; }
.sales-status.converted { color: #047857; background: #ecfdf5; border-color: #6ee7b7; } .sales-status.closed, .sales-status.lost, .sales-status.archived { color: #475569; background: #f1f5f9; border-color: #cbd5e1; } .sales-status.visited, .sales-status.follow_up { color: #be123c; background: #fff1f2; border-color: #fda4af; } .sales-status.interested, .sales-status.quoted, .sales-status.trial { color: #075985; background: #f0f9ff; border-color: #7dd3fc; } .sales-status.paused { color: #854d0e; background: #fefce8; border-color: #fde047; }
.sales-task-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 10px; }
.sales-task-row > div > b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #f97316; color: #fff; }
.sales-task-row > div > span { min-width: 0; display: grid; gap: 2px; }
.sales-task-row small { color: var(--text-soft); overflow-wrap: anywhere; }
.sales-photo-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.sales-photo { width: 74px; height: 74px; padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 6px; background: #fff; cursor: pointer; }
.sales-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sales-photo-file { max-width: 150px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.sales-audit-row {
  display: grid;
  grid-template-columns: minmax(150px, .9fr) minmax(100px, .65fr) minmax(180px, 1fr) minmax(220px, 1.45fr);
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 13px 12px;
  border-bottom: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
  transition: background .18s ease, transform .18s cubic-bezier(.16,1,.3,1);
}
.sales-audit-row:hover { background: rgba(249,115,22,.055); transform: translateX(2px); }
.sales-audit-row time, .sales-audit-row > span, .sales-audit-row strong, .sales-audit-row em { min-width: 0; overflow-wrap: anywhere; }
.sales-audit-row time { color: var(--text-soft); font-variant-numeric: tabular-nums; }
.sales-audit-row strong { color: var(--text); font-weight: 800; }
.sales-audit-row em { color: var(--text); font-style: normal; font-weight: 650; }
.sales-audit-row i, .sales-audit-row time > span { display: block; margin-bottom: 3px; color: var(--text-soft); font-size: 10px; font-style: normal; font-weight: 700; letter-spacing: .04em; }
.sales-audit-actor { color: var(--text); font-weight: 700; }
.sales-state { padding: 24px 16px; text-align: center; color: var(--text-soft); overflow-wrap: anywhere; }
.sales-state.error { color: #b91c1c; border-color: rgba(239,68,68,.35); background: #fff1f2; }
.staff-summary-item.sales { border-color: #e11d48; }
.rider-avatar.sales, .rider-role-tag.sales { background: #fff1f2; color: #be123c; border-color: #fda4af; }
.staff-sales-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.staff-sales-meta span { padding: 2px 6px; border-radius: 4px; background: #fff1f2; color: #be123c; font-size: 10px; font-weight: 800; }

/* 销售移动工作台 */
.sales-page { overflow-x: hidden; }
.sales-app { width: min(100%, 1120px); margin: 0 auto; padding: 16px; min-width: 0; }
.sales-tabs { position: sticky; top: 70px; z-index: 20; display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 4px; padding: 5px; background: rgba(255,255,255,.94); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 25px rgba(15,23,42,.08); }
.sales-tab { min-width: 0; min-height: 40px; border: 0; border-radius: 5px; background: transparent; color: var(--text-soft); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.sales-tab.active { color: #fff; background: linear-gradient(90deg, #f97316, #e11d48); }
.sales-panel { display: none; min-width: 0; padding: 18px 0 30px; }
.sales-panel.active { display: block; }
#salesAllTasks, #salesContactHistory, #salesVisitHistory {
  max-height: min(680px, calc(100dvh - 190px));
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  padding-right: 8px;
}
.sales-panel-head { margin-bottom: 14px; }
.sales-panel-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.sales-task-search-clear { margin-top: 12px; text-align: center; }
.sales-merchant-search { margin-bottom: 12px; }
.sales-panel-head h1 { font-size: 21px; letter-spacing: 0; }
.sales-route-group { min-width: 0; margin-bottom: 18px; border-top: 3px solid #f97316; }
.sales-route-head { padding: 10px 4px; }
.sales-route-head > div { min-width: 0; display: grid; gap: 2px; }
.sales-route-head strong { overflow-wrap: anywhere; }
.sales-route-head span, .sales-route-head small { color: var(--text-soft); font-size: 12px; }
.sales-route-actions { display: flex !important; align-items: center; justify-content: flex-end; gap: 8px; }
.sales-route-nav { white-space: nowrap; }
.sales-route-ext { white-space: nowrap; }
.sales-route-nav-disabled { color: var(--text-faint); font-size: 11px; white-space: nowrap; }
/* 闭环拜访内嵌路线地图：复用通用 .route-map（蓝色 #1e40af 线条），销售端适配间距 */
.sales-route-map { margin: 10px 0 12px; }
.sales-route-map[hidden] { display: none; }
.sales-route-tasks { display: grid; gap: 10px; }
.sales-task-card { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 10px; min-width: 0; padding: 13px; border: 1px solid var(--border); border-radius: 8px; background: rgba(255,255,255,.82); box-shadow: 0 6px 20px rgba(15,23,42,.06); }
.sales-task-order { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #e11d48; color: #fff; font-weight: 900; }
.sales-task-content { min-width: 0; }
.sales-task-title > div { min-width: 0; display: grid; gap: 3px; }
.sales-task-title strong { font-size: 17px; overflow-wrap: anywhere; }
.sales-task-title > div span { color: var(--text-soft); font-size: 12px; }
.sales-task-address, .sales-task-note { margin: 8px 0; line-height: 1.55; overflow-wrap: anywhere; }
.sales-task-note { padding: 8px; background: #fff7ed; border-left: 3px solid #f97316; }
.sales-task-contact { display: flex; flex-wrap: wrap; gap: 7px 14px; color: var(--text-soft); font-size: 12px; }
.sales-task-contact a { color: #be123c; font-weight: 800; }
.sales-task-contact [aria-disabled="true"] { pointer-events: none; color: var(--text-soft); }
.sales-metric-line { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; color: var(--text-soft); font-size: 11px; }
.sales-metric-line span { padding: 3px 7px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface-soft); }
.sales-metric-line .ready { color: #047857; border-color: #6ee7b7; background: #ecfdf5; font-weight: 800; }
.sales-task-actions { margin-top: 11px; }
.sales-task-actions .btn { flex: 1 1 130px; text-align: center; }
.sales-task-result { display: grid; gap: 8px; margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--border); }
.sales-timeline-title { color: var(--text-soft); font-size: 12px; }
.sales-task-intel { display: grid; grid-template-columns: 92px minmax(0,1fr); gap: 10px; align-items: center; margin-bottom: 10px; padding: 9px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-soft); }
.sales-task-intel > div { display: grid; gap: 4px; }
.sales-task-intel span, .sales-followup-line { color: var(--text-soft); font-size: 12px; }
.sales-storefront-photo { width: 92px; height: 70px; padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-solid); cursor: pointer; }
.sales-storefront-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sales-storefront-photo.empty { display: grid; place-items: center; padding: 8px; color: var(--text-soft); font-size: 11px; text-align: center; cursor: default; }
#salesFollowUps { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.sales-followup-card { display: grid; gap: 7px; padding: 13px; border: 1px solid var(--border); border-left: 4px solid #0ea5e9; border-radius: 8px; background: rgba(255,255,255,.82); }
.sales-followup-card.overdue { border-left-color: #dc2626; background: #fff7f7; }
.sales-followup-card.due-today { border-left-color: #f59e0b; background: #fffbeb; }
.sales-followup-card > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sales-followup-card p { margin: 0; overflow-wrap: anywhere; }
.sales-followup-card small { color: var(--text-soft); }
.sales-followup-card .btn { width: max-content; }
.sales-history-item.compact { padding: 9px; box-shadow: none; }
.sales-diary-heading input { width: 155px; }
.sales-diary-form { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; padding: 16px; border-radius: 8px; }
.sales-diary-form[hidden] { display: none; }
.sales-diary-form label, .sales-visit-form label { display: grid; gap: 6px; min-width: 0; color: var(--text-soft); font-size: 12px; font-weight: 800; }
.sales-diary-form textarea, .sales-visit-form textarea { resize: vertical; }
.sales-related-visits, .sales-diary-form > .btn { grid-column: 1 / -1; }
.sales-related-visits h2 { margin: 0 0 8px; font-size: 15px; }
.sales-visit-form { display: grid; gap: 13px; padding-top: 12px; }
.sales-form-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.sales-visit-concerns { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 11px; border: 1px solid var(--border); border-radius: 6px; }
.sales-visit-concerns legend { padding: 0 5px; color: var(--text-soft); font-size: 12px; font-weight: 800; }
.sales-visit-concerns label { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 600; }
.sales-visit-concerns input { width: 17px; height: 17px; }
.sales-video-capture { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-soft); }
.sales-video-capture > div { display: grid; gap: 4px; }
.sales-video-capture small { color: var(--text-soft); overflow-wrap: anywhere; }
.sales-video-capture video { grid-column: 1 / -1; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: #111; }
.sales-visit-assessment { font-weight: 700; color: var(--text); }

button:disabled, .btn:disabled, input:disabled, select:disabled, textarea:disabled { opacity: .48; cursor: not-allowed; }

@media (max-width: 900px) {
  .sales-summary-grid, .sales-operation-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .sales-admin-grid { grid-template-columns: 1fr; }
  .sales-audit-band { grid-column: auto; }
}
@media (max-width: 560px) {
  .sales-app { padding: 10px; }
  #salesAllTasks, #salesContactHistory, #salesVisitHistory { max-height: none; overflow: visible; padding-right: 0; scrollbar-gutter: auto; }
  .sales-tabs { top: 62px; grid-template-columns: repeat(6, minmax(72px,1fr)); overflow-x: auto; }
  .sales-tab { min-height: 42px; padding: 4px; font-size: 12px; }
  #salesFollowUps { grid-template-columns: 1fr; }
  .sales-task-intel { grid-template-columns: 76px minmax(0,1fr); }
  .sales-storefront-photo { width: 76px; height: 64px; }
  .sales-panel { padding-top: 14px; }
  .sales-panel-head, .sales-route-head { align-items: flex-start; flex-direction: column; }
  .sales-route-actions { justify-content: flex-start; flex-wrap: wrap; }
  .sales-panel-head h1 { font-size: 19px; }
  .sales-task-card { grid-template-columns: 30px minmax(0,1fr); padding: 11px 9px; gap: 7px; }
  .sales-task-order { width: 28px; height: 28px; }
  .sales-task-title { align-items: flex-start; }
  .sales-task-title strong { font-size: 16px; }
  .sales-diary-heading { flex-wrap: wrap; }
  .sales-diary-heading input { width: 100%; }
  .sales-diary-form, .sales-form-row { grid-template-columns: 1fr; }
  .sales-diary-form > * { grid-column: auto; }
  .sales-summary-grid, .sales-operation-grid { grid-template-columns: 1fr 1fr; }
  .sales-prospect-list, .sales-task-list, .sales-history-list, .sales-contact-list, .sales-diary-list, .sales-audit-list, .sales-review-list { height: auto; max-height: none; overflow: visible; padding-right: 0; scrollbar-gutter: auto; }
  .sales-prospect-row { grid-template-columns: 64px minmax(0, 1fr); align-items: start; gap: 10px; min-height: 0; padding: 11px; }
  .sales-prospect-row .expansion-storefront { width: 64px; height: 64px; }
  .sales-prospect-row .expansion-storefront.empty span { max-width: 52px; font-size: 10px; }
  .sales-prospect-title strong { font-size: 15px; }
  .sales-prospect-row .sales-row-actions { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; width: 100%; min-width: 0; }
  .sales-prospect-row .sales-row-actions .btn { width: 100%; }
  .sales-row-actions { width: 100%; }
  .sales-row-actions .btn { flex: 1; }
  .sales-task-row { grid-template-columns: minmax(0,1fr) auto; }
  .sales-task-row > .btn { grid-column: 1 / -1; }
  .sales-review-row { grid-template-columns: 1fr; align-items: stretch; }
  .sales-visit-video { width: 100%; }
  .sales-audit-row { grid-template-columns: 1fr; gap: 9px; padding: 13px 11px; border: 1px solid var(--border); }
  .sales-audit-row time, .sales-audit-row > span, .sales-audit-row strong, .sales-audit-row em { display: grid; grid-template-columns: 58px minmax(0,1fr); align-items: start; gap: 8px; }
  .sales-audit-row i, .sales-audit-row time > span { margin: 0; }
  .sales-photo { width: 66px; height: 66px; }
}
.sales-review-list {
  grid-auto-rows: 75px;
  height: 241px;
  max-height: 241px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(249, 115, 22, .38) transparent;
}
.sales-review-list::-webkit-scrollbar { width: 6px; }
.sales-review-list::-webkit-scrollbar-thumb { background: rgba(249, 115, 22, .38); border-radius: 999px; }
.sales-review-list > * { min-height: 0; scroll-snap-align: start; }

@media (max-width: 820px) {
  .sales-review-list { grid-auto-rows: 116px; height: 364px; max-height: 364px; overflow-y: auto; padding-right: 6px; scrollbar-gutter: stable; }
}
@media (prefers-reduced-motion: reduce) {
  .sales-page *, .sales-admin-section * { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* 三端每日首次进入与骑手每趟发车：不可跳过的安全确认 */
.modal.modal-safety { max-width: 610px; border: 1px solid rgba(249,115,22,.25); box-shadow: 0 24px 70px rgba(15,23,42,.22), inset 0 1px 0 rgba(255,255,255,.72); }
.modal-safety .modal-header { border-bottom-color: rgba(249,115,22,.2); }
.modal-safety .modal-title-icon { background: linear-gradient(135deg,#fff7ed,#ffedd5); color: #ea580c; font-weight: 950; }
.safety-dialog { display: grid; gap: 16px; }
.safety-lead { margin: 0; padding: 12px 14px; border-left: 4px solid #f97316; border-radius: 8px; background: var(--primary-soft); color: var(--text); font-weight: 800; line-height: 1.65; }
.safety-points { margin: 0; padding: 0; list-style: none; counter-reset: safety; display: grid; gap: 10px; }
.safety-points li { counter-increment: safety; position: relative; min-height: 38px; padding: 9px 12px 9px 46px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-solid); color: var(--text); line-height: 1.65; }
.safety-points li::before { content: counter(safety); position: absolute; left: 11px; top: 9px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg,var(--primary),var(--primary-2)); color: #fff; font-size: 12px; font-weight: 900; }
.safety-promise { margin: 0; padding: 13px 14px; display: flex; align-items: flex-start; gap: 10px; border: 1px solid rgba(249,115,22,.28); border-radius: 9px; background: rgba(255,247,237,.82); color: var(--text); font-weight: 800; line-height: 1.55; cursor: pointer; }
.safety-promise input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--primary); }
.safety-error { min-height: 18px; margin: -6px 0 0; color: #dc2626; font-size: 12px; font-weight: 700; }
.safety-confirm { width: 100%; min-height: 46px; font-size: 15px; }
.safety-confirm:disabled { cursor: not-allowed; opacity: .48; transform: none; }
@media (max-width: 520px) {
  .modal-mask { padding: 12px; }
  .modal.modal-safety { max-height: calc(100dvh - 24px); padding: 18px 15px; }
  .modal-safety .modal-header { align-items: flex-start; margin-bottom: 12px; padding-bottom: 12px; }
  .safety-dialog { gap: 12px; }
  .safety-lead, .safety-promise { padding: 10px 11px; }
  .safety-points { gap: 8px; }
  .safety-points li { padding: 8px 9px 8px 42px; font-size: 13px; }
  .safety-points li::before { left: 9px; top: 8px; }
}


/* ── 商家搜索下拉组件（骑手/打包/销售三端共用，.msc） ── */
.msc { position: relative; margin: 0 0 10px; }
.msc-trigger {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text);
  cursor: text;
  transition: border-color .15s, box-shadow .15s;
}
.msc-trigger:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(249,115,22,.12); }
.msc-icon { font-size: 14px; color: var(--primary); flex-shrink: 0; }
.msc-input { flex: 1; border: none; background: transparent; padding: 0; font-size: 14px; color: var(--text); outline: none; min-width: 0; }
.msc-input::placeholder { color: var(--text-faint); }
.msc-clear {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  border: none; background: transparent; color: var(--text-faint);
  font-size: 12px; cursor: pointer; flex-shrink: 0;
  transition: background .15s, color .15s;
}
.msc-clear:hover { background: var(--primary-soft); color: var(--primary); }
.msc-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
  max-height: 280px; overflow-y: auto;
  border-radius: 12px;
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border);
  box-shadow: 0 16px 40px rgba(15,23,42,.14);
  padding: 4px;
}
.msc-empty { padding: 14px; text-align: center; color: var(--text-faint); font-size: 13px; }
.msc-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
  transition: background .12s;
}
.msc-item:hover, .msc-item.active { background: var(--primary-soft); }
.msc-seq {
  flex-shrink: 0; min-width: 22px; height: 22px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; padding: 0 5px;
}
.msc-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.msc-name { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msc-sub { font-size: 12px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msc-match { background: rgba(249,115,22,.25); color: var(--primary); border-radius: 2px; padding: 0 1px; font-weight: 700; }

/* 命中卡片高亮闪烁（骑手/打包滚动定位用） */
@keyframes msc-flash-ring {
  0%, 100% { box-shadow: 0 0 0 0 rgba(249,115,22,0); }
  25%, 60% { box-shadow: 0 0 0 4px rgba(249,115,22,.55), 0 0 24px rgba(249,115,22,.35); }
}
.msc-flash { animation: msc-flash-ring 1.6s ease-in-out 2; border-radius: 12px; }



/* ── 已分配六店商家组（商家拓展） ── */
.assigned-groups-section { margin-top: 18px; }
.ag-card { padding: 14px 16px; margin-bottom: 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.ag-card.released { border-color: rgba(5,150,105,.4); background: linear-gradient(180deg, rgba(16,185,129,.06), rgba(16,185,129,.02)); }
.ag-head { margin-bottom: 10px; }
.ag-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 15px; }
.ag-title b { color: var(--text); }
.ag-badge { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.ag-badge.locked { background: rgba(217,119,6,.14); color: #b45309; border: 1px solid rgba(217,119,6,.3); }
.ag-badge.released { background: rgba(5,150,105,.12); color: #047857; border: 1px solid rgba(5,150,105,.3); }
.ag-meta { margin-top: 5px; font-size: 12.5px; color: var(--text-faint); }
.ag-meta b { color: var(--text-soft); }
.ag-members { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.ag-member { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 9px; background: var(--bg); border: 1px solid var(--border); }
.ag-seq { flex-shrink: 0; min-width: 22px; height: 22px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; padding: 0 5px; }
.ag-member-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ag-member-main b { font-size: 13.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-member-main small { font-size: 11.5px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-code { flex-shrink: 0; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; color: var(--text-faint); background: var(--bg); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; margin-left: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.ag-release-btn { flex-shrink: 0; align-self: center; }


/* ── 潜客校正审核 + 倒闭商家列表 ── */
.pc-card { padding: 13px 15px; margin-bottom: 11px; border-radius: 13px; border: 1px solid var(--border); background: var(--surface); }
.pc-card.pc-closed { border-color: rgba(190,18,60,.35); background: linear-gradient(180deg, rgba(244,63,94,.05), rgba(244,63,94,.02)); }
.pc-card.closed-item { border-color: rgba(100,116,139,.35); background: var(--surface); opacity: .92; }
.pc-head { margin-bottom: 8px; }
.pc-title { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-size: 14.5px; }
.pc-title b { color: var(--text); }
.pc-type { font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.pc-type.photo { background: rgba(37,99,235,.12); color: #1d4ed8; border: 1px solid rgba(37,99,235,.3); }
.pc-type.name { background: rgba(217,119,6,.13); color: #b45309; border: 1px solid rgba(217,119,6,.3); }
.pc-type.closed { background: rgba(190,18,60,.12); color: #be123c; border: 1px solid rgba(190,18,60,.3); }
.pc-badge { font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.pc-badge.pending { background: rgba(217,119,6,.14); color: #b45309; border: 1px solid rgba(217,119,6,.3); }
.pc-badge.approved { background: rgba(5,150,105,.12); color: #047857; border: 1px solid rgba(5,150,105,.3); }
.pc-badge.rejected { background: rgba(100,116,139,.14); color: #64748b; border: 1px solid rgba(100,116,139,.3); }
.pc-meta { margin-top: 4px; font-size: 12.5px; color: var(--text-faint); }
.pc-meta b { color: var(--text-soft); }
.pc-detail { margin-top: 8px; font-size: 13px; color: var(--text-soft); }
.pc-detail b { color: var(--text); }
.pc-closed-note { padding: 8px 10px; border-radius: 8px; background: rgba(190,18,60,.06); border-left: 3px solid #be123c; }
.pc-photos { display: flex; flex-wrap: wrap; gap: 7px; }
.pc-photo { padding: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; cursor: zoom-in; background: var(--bg); width: 76px; height: 76px; }
.pc-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-actions { display: flex; gap: 8px; margin-top: 10px; }
.pc-reject-reason { margin-top: 8px; font-size: 12.5px; color: #be123c; }
.btn-mini.danger { background: rgba(190,18,60,.12); color: #be123c; border: 1px solid rgba(190,18,60,.3); }
.sales-photo-preview { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 6px; }
.sales-photo-file { font-size: 12px; color: var(--text-soft); background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 3px 8px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sales-form-hint { margin-top: 10px; font-size: 12.5px; color: var(--text-faint); line-height: 1.5; }
