/* ============================================================
   工厂预约提货系统 · 共享样式层
   风格：工业调度台 / 混凝土纸面 + 蓝图网格 + 安全橙
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --ink-900: #101619;
  --ink-800: #1a2327;
  --ink-700: #2b373c;
  --ink-500: #5c6a70;
  --ink-400: #7d8a90;
  --ink-300: #a7b1b5;
  --ink-200: #d5d9d6;

  --bg: #efede7;
  --bg-2: #e6e3da;
  --surface: #ffffff;
  --surface-2: #f7f5f0;
  --surface-3: #f2efe8;

  --line: #dcd8cf;
  --line-strong: #c7c1b4;

  --primary: #16323c;
  --primary-hover: #204755;
  --primary-soft: #e3ecef;

  --accent: #e0650c;
  --accent-hover: #c5560a;
  --accent-soft: #fbeadf;

  --success: #2c7a58;
  --success-soft: #e2f0ea;
  --warning: #a86a00;
  --warning-soft: #fbf0d9;
  --danger: #b03a2a;
  --danger-soft: #fbe6e2;

  --font-display: "Bahnschrift", "DIN Alternate", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  --font-body: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --font-mono: "Cascadia Mono", "Consolas", "SFMono-Regular", "Menlo", monospace;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 22px;

  --sh-sm: 0 1px 2px rgba(16, 22, 25, .06), 0 1px 1px rgba(16, 22, 25, .04);
  --sh-md: 0 6px 18px -8px rgba(16, 22, 25, .22), 0 2px 6px rgba(16, 22, 25, .05);
  --sh-lg: 0 24px 48px -24px rgba(16, 22, 25, .35);

  --sidebar-w: 236px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-800);
  background: radial-gradient(1100px 560px at 88% -12%, #faf7ef 0%, rgba(250, 247, 239, 0) 62%), linear-gradient(180deg, #f1efe9 0%, #e8e5dc 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(22, 50, 60, .045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(22, 50, 60, .045) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .9), rgba(0, 0, 0, .35));
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
svg { display: block; }
[hidden] { display: none !important; }
::selection { background: var(--accent-soft); color: var(--ink-900); }

/* 行内图标容器：默认不参与排版尺寸，尺寸由各自父级规则控制 */
[data-icon] { display: inline-flex; align-items: center; justify-content: center; }
[data-icon] svg { width: 1em; height: 1em; }

/* ---------- 基础排印 ---------- */
.mono, .num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}
.display { font-family: var(--font-display); letter-spacing: .015em; }
.muted { color: var(--ink-500); }
.dim { color: var(--ink-400); }
.ink-700 { color: var(--ink-700); }
.accent { color: var(--accent); }
.tiny { font-size: 11px; }
.small { font-size: 12px; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.right { text-align: right; }

/* ---------- 动效 ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(224, 101, 12, .45); }
  60% { box-shadow: 0 0 0 7px rgba(224, 101, 12, 0); }
}
@keyframes sweep {
  from { background-position: -220px 0; }
  to { background-position: 220px 0; }
}
.reveal { animation: rise .5s var(--ease) both; animation-delay: calc(var(--d, 0) * 70ms); }
@media (prefers-reduced-motion: reduce) {
  .reveal, .modal-panel, .toast { animation: none !important; }
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink-800);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease), transform .1s var(--ease), box-shadow .15s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .42; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 6px 14px -8px rgba(224, 101, 12, .8); }
.btn-accent:hover { background: var(--accent-hover); }
.btn-outline { border-color: var(--line-strong); background: transparent; }
.btn-outline:hover { border-color: var(--ink-400); background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--ink-700); }
.btn-ghost:hover { background: rgba(22, 50, 60, .06); }
.btn-danger-ghost { background: transparent; color: var(--danger); }
.btn-danger-ghost:hover { background: var(--danger-soft); }
.btn-sm { padding: 7px 11px; font-size: 12px; border-radius: var(--r-sm); }
.btn-sm svg { width: 14px; height: 14px; }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 22px; font-size: 16px; border-radius: var(--r-md); }

/* ---------- 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12px; font-weight: 700; color: var(--ink-700); letter-spacing: .02em; }
.field .hint { font-size: 11px; color: var(--ink-400); }
.input, .select, textarea.input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink-900);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.input::placeholder { color: var(--ink-300); }
.input:focus, .select:focus, textarea.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 50, 60, .1);
}
.input:disabled { background: var(--surface-3); color: var(--ink-400); }
.input.is-error { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(176, 58, 42, .1); }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-500) 50%), linear-gradient(135deg, var(--ink-500) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
textarea.input { min-height: 84px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rule-divider { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--ink-400); }
.rule-divider::before, .rule-divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.checkline { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--ink-500); }
.checkline input { margin-top: 3px; accent-color: var(--accent); }

.switch { position: relative; display: inline-flex; width: 38px; height: 22px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--ink-200); transition: background .18s var(--ease); }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--sh-sm); transition: transform .18s var(--ease); }
.switch input:checked + span { background: var(--success); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.segmented { display: inline-flex; padding: 3px; background: var(--surface-3); border: 1px solid var(--line); border-radius: var(--r-md); }
.segmented button {
  border: 0; background: transparent; padding: 6px 12px; border-radius: 7px;
  font-size: 12px; font-weight: 600; color: var(--ink-500); cursor: pointer; transition: all .15s var(--ease);
}
.segmented button:hover { color: var(--ink-800); }
.segmented button.is-active { background: var(--surface); color: var(--ink-900); box-shadow: var(--sh-sm); }

/* ---------- 卡片 / 容器 ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head h3 { font-size: 14px; font-weight: 700; letter-spacing: .02em; }
.card-head p { font-size: 11px; color: var(--ink-400); margin-top: 2px; }
.card-body { padding: 16px 20px 20px; }
.panel { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; }
.stack { display: flex; flex-direction: column; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; }
.row { display: flex; align-items: center; gap: 8px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 999px;
  background: var(--surface-3); color: var(--ink-600, var(--ink-500));
  font-size: 11px; font-weight: 600; line-height: 1.5; white-space: nowrap;
}
.tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .8; }
.tag.no-dot::before { display: none; }
.tag-success { background: var(--success-soft); color: var(--success); }
.tag-warning { background: var(--warning-soft); color: var(--warning); }
.tag-danger { background: var(--danger-soft); color: var(--danger); }
.tag-accent { background: var(--accent-soft); color: var(--accent-hover); }
.tag-primary { background: var(--primary-soft); color: var(--primary); }
.tag-plain { background: transparent; border: 1px solid var(--line-strong); color: var(--ink-500); }

/* ---------- 表格 ---------- */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .06em;
  color: var(--ink-400); text-transform: uppercase;
  padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr { transition: background .14s var(--ease); }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .cell-main { font-weight: 700; color: var(--ink-900); }
.tbl .cell-sub { font-size: 11px; color: var(--ink-400); }
.tbl td.right, .tbl th.right { text-align: right; }

/* ---------- KPI ---------- */
.kpi { padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; right: -22px; top: -22px; width: 76px; height: 76px; border-radius: 50%; background: var(--accent-soft); opacity: .55; }
.kpi .kpi-label { font-size: 11px; letter-spacing: .06em; color: var(--ink-400); font-weight: 700; }
.kpi .kpi-value { font-family: var(--font-display); font-size: 32px; line-height: 1.1; margin-top: 8px; letter-spacing: .01em; }
.kpi .kpi-value small { font-family: var(--font-body); font-size: 12px; color: var(--ink-400); font-weight: 600; margin-left: 4px; }
.kpi .kpi-foot { margin-top: 8px; font-size: 11px; color: var(--ink-500); }

/* ---------- 进度条 ---------- */
.bar { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: var(--primary); transition: width .5s var(--ease); }
.bar.is-accent > i { background: var(--accent); }
.bar.is-warning > i { background: var(--warning); }
.bar.is-success > i { background: var(--success); }

/* ---------- 空态 / 骨架 ---------- */
.empty { padding: 40px 20px; text-align: center; color: var(--ink-400); }
.empty .empty-ico { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-400); }
.empty h4 { font-size: 14px; color: var(--ink-700); margin-bottom: 4px; }
.empty p { font-size: 12px; }
.skeleton { background: linear-gradient(90deg, var(--surface-3) 25%, #faf8f3 50%, var(--surface-3) 75%); background-size: 440px 100%; animation: sweep 1.2s linear infinite; border-radius: var(--r-sm); }

/* ---------- 弹层 ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(16, 22, 25, .5); animation: fade .18s var(--ease); }
.modal[hidden] { display: none; }
.modal-panel { width: 100%; max-width: 440px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-lg); overflow: hidden; animation: rise .22s var(--ease); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 15px; }
.modal-body { padding: 18px; max-height: 68vh; overflow-y: auto; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 18px; border-top: 1px solid var(--line); background: var(--surface-2); }
.icon-btn { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid transparent; border-radius: var(--r-sm); background: transparent; color: var(--ink-500); cursor: pointer; transition: all .15s var(--ease); }
.icon-btn:hover { background: var(--surface-3); color: var(--ink-900); }
.icon-btn svg { width: 18px; height: 18px; }

.toast-wrap { position: fixed; z-index: 120; left: 50%; bottom: 28px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: 92vw; }
.toast {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 16px; border-radius: 999px;
  background: rgba(16, 22, 25, .93); color: #fff;
  font-size: 13px; box-shadow: var(--sh-md); animation: rise .24s var(--ease) both;
}

/* ---------- 底部滑出面板 ---------- */
.sheet { position: fixed; inset: 0; z-index: 85; display: flex; align-items: flex-end; background: rgba(16, 22, 25, .5); animation: fade .18s var(--ease); }
.sheet[hidden] { display: none; }
.sheet-panel {
  width: 100%; max-width: 460px; margin: 0 auto;
  background: var(--surface); border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: var(--sh-lg); max-height: 86vh; display: flex; flex-direction: column;
  animation: sheet-up .24s var(--ease);
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet-grabber { width: 38px; height: 4px; border-radius: 999px; background: var(--line-strong); margin: 10px auto 0; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px 10px; }
.sheet-head h3 { font-size: 15px; }
.sheet-body { padding: 4px 18px 16px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 14px; }
.sheet-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface-2); }
.toast svg { width: 16px; height: 16px; color: #7fd2a8; }
.toast.is-warning svg { color: #f0b45c; }
.toast.is-danger svg { color: #f19a8e; }
.toast.is-hide { animation: fade .2s var(--ease) reverse both; }

/* ============================================================
   移动端 H5 Shell（司机端）
   ============================================================ */
.m-body { background: #e4e1d8; }
.m-body::before { background-size: 22px 22px; }
.m-app {
  position: relative;
  width: 100%;
  max-width: 460px;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  box-shadow: 0 0 0 1px rgba(16, 22, 25, .06), 0 30px 70px -40px rgba(16, 22, 25, .45);
  display: flex;
  flex-direction: column;
  z-index: 1;
}
.m-top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  background: rgba(239, 237, 231, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(199, 193, 180, .55);
}
.m-brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.m-logo { width: 34px; height: 34px; border-radius: 9px; background: var(--primary); color: #fff; display: grid; place-items: center; flex: none; }
.m-logo svg { width: 19px; height: 19px; }
.m-brand-txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; flex: 1; }
.m-brand-txt strong { font-family: var(--font-display); font-size: 15px; letter-spacing: .02em; color: var(--ink-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-brand-txt span { font-size: 10.5px; color: var(--ink-400); letter-spacing: .02em; }
.m-help { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; color: var(--ink-500); display: grid; place-items: center; cursor: pointer; }
.m-help svg { width: 17px; height: 17px; }
.m-main { flex: 1; padding: 16px 16px calc(94px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
.m-tabs {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 460px; z-index: 40;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.m-tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 5px 0 3px; border-radius: 10px;
  color: var(--ink-400); font-size: 10.5px; font-weight: 600;
  transition: color .15s var(--ease), background .15s var(--ease);
}
.m-tab em { font-style: normal; letter-spacing: .06em; }
.m-tab svg { width: 21px; height: 21px; stroke-width: 1.7; }
.m-tab:hover { color: var(--ink-700); }
.m-tab.is-active { color: var(--primary); }
.m-tab.is-active svg { color: var(--accent); }
.m-tab.is-active em { color: var(--ink-900); }

.m-page-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.m-page-title h1 { font-family: var(--font-display); font-size: 22px; line-height: 1.2; letter-spacing: .02em; color: var(--ink-900); }
.m-page-title p { font-size: 11.5px; color: var(--ink-400); margin-top: 4px; }
.m-sec { display: flex; flex-direction: column; gap: 9px; }
.m-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.m-sec-head h2 { font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--ink-700); }
.m-sec-head h2 span { font-family: var(--font-mono); font-size: 11px; color: var(--ink-300); margin-left: 6px; font-weight: 400; }
.m-sec-head a, .m-sec-head button { font-size: 11.5px; color: var(--ink-500); background: none; border: 0; cursor: pointer; padding: 0; display: inline-flex; align-items: center; gap: 3px; }
.m-sec-head a:hover, .m-sec-head button:hover { color: var(--accent); }
.m-sec-head svg { width: 13px; height: 13px; }

.m-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); padding: 16px; }
.m-card.tight { padding: 13px; }

.sticky-cta {
  position: fixed; bottom: calc(64px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 460px; z-index: 35;
  padding: 10px 16px 12px;
  background: linear-gradient(to top, var(--bg) 62%, rgba(239, 237, 231, 0));
}
.sticky-cta .cta-note { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--ink-400); margin-bottom: 7px; }

/* 日期条 */
.date-strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.date-strip::-webkit-scrollbar { display: none; }
.date-chip {
  flex: none; width: 62px; padding: 9px 0 8px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  cursor: pointer; transition: all .16s var(--ease);
}
.date-chip b { font-family: var(--font-display); font-size: 16px; color: var(--ink-800); font-weight: 600; }
.date-chip span { font-size: 10px; color: var(--ink-400); }
.date-chip em { font-style: normal; font-size: 9px; color: var(--ink-300); }
.date-chip:hover { border-color: var(--line-strong); }
.date-chip.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.date-chip.is-active b, .date-chip.is-active span, .date-chip.is-active em { color: #fff; }
.date-chip.is-active span { opacity: .7; }

/* 时段格 */
.slot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.slot {
  position: relative; padding: 11px 12px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface);
  text-align: left; cursor: pointer; transition: all .15s var(--ease);
  display: flex; flex-direction: column; gap: 3px;
}
.slot b { font-family: var(--font-mono); font-size: 14px; color: var(--ink-900); letter-spacing: .02em; }
.slot span { font-size: 10.5px; color: var(--ink-400); }
.slot span strong { color: var(--success); font-weight: 700; }
.slot:hover { border-color: var(--line-strong); background: var(--surface-2); }
.slot.is-active { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.slot.is-active b { color: var(--accent-hover); }
.slot.is-full { background: var(--surface-3); cursor: not-allowed; opacity: .62; }
.slot.is-full span { color: var(--ink-300); }
.slot.is-full b { color: var(--ink-300); text-decoration: line-through; text-decoration-thickness: 1px; }
.slot.is-full::after { content: "约满"; position: absolute; top: 8px; right: 9px; font-size: 9px; color: var(--ink-300); border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 4px; }

/* 门号选择 */
.gate-pick { display: flex; flex-direction: column; gap: 8px; }
.gate-opt {
  display: flex; align-items: center; gap: 13px; padding: 14px;
  border: 2px solid var(--line); border-radius: 14px;
  background: var(--surface); cursor: pointer; transition: all .15s var(--ease); text-align: left;
}
.gate-opt:hover { border-color: var(--line-strong); background: var(--surface-2); }
.gate-opt .gate-no {
  width: 54px; height: 54px; border-radius: 13px; flex: none;
  background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; font-family: var(--font-display); font-size: 24px; font-weight: 700;
  white-space: nowrap; overflow: hidden;
}
.gate-opt .gate-info { flex: 1; min-width: 0; }
.gate-opt .gate-info b { display: block; font-size: 18px; color: var(--ink-900); }
.gate-opt .gate-info span { font-size: 14px; color: var(--ink-400); display: block; margin-top: 3px; }
.gate-opt .gate-side { text-align: right; flex: none; }
.gate-opt .gate-side b { font-family: var(--font-mono); font-size: 24px; color: var(--ink-700); display: block; }
.gate-opt .gate-side span { font-size: 13px; color: var(--ink-400); }
.gate-opt.is-active { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; background: var(--primary-soft); }
.gate-opt.is-active .gate-no { background: var(--primary); color: #fff; }
.gate-opt.is-active .gate-info b,
.gate-opt.is-active .gate-side b { color: var(--primary); }
.gate-opt.is-paused { opacity: .55; cursor: not-allowed; }

/* GPS 地图卡 */
.geo-card { padding: 0; overflow: hidden; }
.geo-map {
  position: relative; height: 186px;
  background:
    radial-gradient(circle at 50% 52%, rgba(224, 101, 12, .1) 0%, rgba(224, 101, 12, 0) 58%),
    linear-gradient(140deg, #e7ede9 0%, #dde5e4 100%);
  border-bottom: 1px solid var(--line);
}
.geo-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.geo-legend {
  position: absolute; left: 12px; bottom: 10px;
  display: flex; gap: 10px; align-items: center;
  padding: 5px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, .82); backdrop-filter: blur(6px);
  font-size: 9.5px; color: var(--ink-500); border: 1px solid rgba(255, 255, 255, .9);
}
.geo-legend i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 4px; }
.geo-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.geo-status { display: flex; align-items: center; gap: 10px; }
.geo-status .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--success); animation: pulse-dot 2.2s infinite; flex: none; }
.geo-status.is-out .dot { background: var(--warning); animation: none; }
.geo-status.is-out { color: var(--warning); }
.geo-status.is-locating .dot { background: var(--ink-300); animation: none; }
.geo-status b { font-size: 14px; }
.geo-status .mono { font-size: 12px; color: var(--ink-500); }
.geo-range { display: flex; align-items: center; gap: 10px; }
.geo-range input[type="range"] { flex: 1; accent-color: var(--accent); height: 4px; }
.geo-range .val { font-family: var(--font-mono); font-size: 12px; color: var(--ink-700); width: 54px; text-align: right; }
.geo-map .pin-halo { animation: pulse-halo 2.4s var(--ease) infinite; }
@keyframes pulse-halo { 0%, 100% { opacity: .9; } 60% { opacity: .25; } }
.geo-map text { paint-order: stroke; }

/* 步骤轨 */
.step-rail { display: flex; align-items: flex-start; gap: 0; }
.step-rail .step { flex: 1; position: relative; text-align: center; font-size: 9px; line-height: 1.25; color: var(--ink-400); padding: 0 1px; }
.step-rail .step .bub {
  width: 22px; height: 22px; border-radius: 50%; margin: 0 auto 5px;
  display: grid; place-items: center; background: var(--surface-3); color: var(--ink-300);
  font-size: 10px; font-weight: 700; border: 1px solid var(--line); position: relative; z-index: 1;
}
.step-rail .step .bub svg { width: 12px; height: 12px; }
.step-rail .step::before {
  content: ""; position: absolute; top: 11px; left: -50%; width: 100%; height: 1px;
  background: var(--line); z-index: 0;
}
.step-rail .step:first-child::before { display: none; }
.step-rail .step.is-done .bub { background: var(--success); border-color: var(--success); color: #fff; }
.step-rail .step.is-done::before { background: var(--success); }
.step-rail .step.is-now .bub { background: var(--accent); border-color: var(--accent); color: #fff; animation: pulse-dot 2s infinite; }
.step-rail .step.is-now { color: var(--accent-hover); font-weight: 700; }
.step-rail .step.is-now::before { background: var(--success); }

/* 号票卡 */
.ticket-card { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-md); }
.ticket-stub { padding: 16px 18px; background: var(--primary); color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ticket-stub .t-label { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.ticket-stub .t-no { font-family: var(--font-display); font-size: 54px; line-height: 1; letter-spacing: .02em; margin-top: 3px; }
.ticket-stub .t-gate { text-align: right; }
.ticket-stub .t-gate b { font-family: var(--font-mono); font-size: 20px; display: block; }
.ticket-stub .t-gate span { font-size: 10px; color: rgba(255, 255, 255, .6); }
.ticket-notch { position: relative; height: 0; }
.ticket-notch::before, .ticket-notch::after {
  content: ""; position: absolute; top: -9px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line); z-index: 2;
}
.ticket-notch::before { left: -10px; }
.ticket-notch::after { right: -10px; }
.ticket-perf { border-top: 1px dashed var(--line-strong); margin: 0 18px; position: relative; top: -1px; }
.ticket-body { padding: 16px 18px 18px; }
.ticket-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ticket-metrics .tm { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 10px; }
.ticket-metrics .tm span { font-size: 9.5px; color: var(--ink-400); display: block; letter-spacing: .04em; }
.ticket-metrics .tm b { font-family: var(--font-display); font-size: 21px; color: var(--ink-900); line-height: 1.2; }
.ticket-metrics .tm b small { font-size: 10px; font-family: var(--font-body); color: var(--ink-400); font-weight: 500; margin-left: 2px; }
.callout { display: flex; gap: 10px; padding: 12px 13px; border-radius: var(--r-md); font-size: 12px; line-height: 1.55; }
.callout svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.callout-warning { background: var(--warning-soft); color: #7d4f00; border: 1px solid #efd9a8; }
.callout-danger { background: var(--danger-soft); color: #7f2a1e; border: 1px solid #f0c4bb; }
.callout-success { background: var(--success-soft); color: #1e5b42; border: 1px solid #c2e0d3; }
.callout-info { background: var(--primary-soft); color: #244c58; border: 1px solid #c7dbe0; }
.callout b { font-weight: 700; }

/* 遇问题找约车人：显眼但不喧哗，放在首屏关键位置 */
.help-callout { align-items: flex-start; }
.help-callout b { display: block; font-size: 16px; line-height: 1.4; }
.help-callout p { margin: 4px 0 0; font-size: 14px; line-height: 1.5; opacity: .9; }

/* 提货须知弹层：看完才能勾选同意，未同意不能预约 */
.notice-panel { max-width: 480px; display: flex; flex-direction: column; max-height: 86vh; }
.notice-body { flex: 1; }
.nt-list { margin: 0; padding-left: 20px; display: grid; gap: 12px; font-size: 15px; line-height: 1.65; color: var(--ink-700); }
.nt-list li b { color: var(--ink-900); }
.notice-foot { flex-direction: column; align-items: stretch; gap: 10px; }
.notice-check { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--ink-700); cursor: pointer; }
.notice-check input { width: 20px; height: 20px; accent-color: var(--accent); }

/* 号票页：刷新按钮 + 本门队列 */
.refresh-btn {
  width: 34px; height: 34px; flex: none; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-500);
  display: grid; place-items: center; cursor: pointer; transition: all .18s var(--ease);
}
.refresh-btn svg { width: 15px; height: 15px; }
.refresh-btn:hover { color: var(--accent); border-color: var(--accent); }
.refresh-btn:active svg { animation: spin .5s linear; }
@keyframes spin { to { transform: rotate(360deg); } }

.q-row {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 12px; border-bottom: 1px dashed var(--line);
  font-size: 12px;
}
.q-row:last-child { border-bottom: 0; }
.q-row .q-no {
  font-family: var(--font-mono); font-weight: 700; font-size: 13px;
  color: var(--ink-900); min-width: 46px;
}
.q-row .q-plate { color: var(--ink-500); font-size: 11.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-row .q-state { font-size: 10.5px; color: var(--ink-400); white-space: nowrap; }
.q-row .q-state b { color: var(--accent-hover); font-weight: 700; }
.q-row.is-serving { background: var(--accent-soft); }
.q-row.is-serving .q-no { color: var(--accent-hover); }
.q-row.is-serving .q-state { color: var(--accent-hover); font-weight: 600; }
.q-row.next { background: var(--surface-2); }
.q-row.next .q-state { color: var(--primary); font-weight: 600; }
.q-row.is-me { box-shadow: inset 3px 0 0 var(--accent); }

/* 二维码 */
.qr-box { display: flex; gap: 16px; align-items: center; }
.qr-canvas { width: 118px; height: 118px; border-radius: 8px; border: 1px solid var(--line); background: #fff; padding: 6px; flex: none; box-sizing: border-box; }
.qr-meta { min-width: 0; }
.qr-meta .code { font-family: var(--font-mono); font-size: 19px; letter-spacing: .12em; color: var(--ink-900); }
.qr-meta .hint { font-size: 11px; color: var(--ink-400); margin-top: 5px; line-height: 1.5; }

/* 规则列表 */
.rule-list { display: flex; flex-direction: column; gap: 12px; }
.rule-item { display: flex; gap: 10px; }
.rule-item .ri { width: 26px; height: 26px; border-radius: 8px; background: var(--surface-3); color: var(--ink-500); display: grid; place-items: center; flex: none; }
.rule-item .ri svg { width: 14px; height: 14px; }
.rule-item b { display: block; font-size: 12.5px; }
.rule-item p { font-size: 11.5px; color: var(--ink-500); line-height: 1.55; }

/* 弹层内键值行 */
.sheet-rows { display: flex; flex-direction: column; }
.sheet-rows > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.sheet-rows > div:last-child { border-bottom: 0; }
.sheet-rows span { color: var(--ink-400); flex: none; }
.sheet-rows b { text-align: right; color: var(--ink-800); }

/* 顶栏「我的预约」红点 */
.m-help.has-dot { position: relative; color: var(--accent); border-color: rgba(224, 101, 12, .38); background: rgba(224, 101, 12, .07); }
.m-help.has-dot::after { content: ''; position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface-1); }

/* 顶栏「联系厂区」电话：司机不清楚情况时一点就拨 */
.m-top-acts { display: flex; align-items: center; gap: 8px; }
.m-call {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--success) 38%, transparent);
  background: color-mix(in srgb, var(--success) 9%, transparent);
  color: var(--success); font-size: 13px; font-weight: 700;
  font-variant-numeric: tabular-nums; text-decoration: none; white-space: nowrap;
}
.m-call svg { width: 16px; height: 16px; }
.m-call:active { transform: scale(.97); }
.m-call[hidden] { display: none; }
body[data-page="driver"] .m-call,
body[data-page="checkin"] .m-call, body[data-page="walkin"] .m-call,
body[data-page="ticket"] .m-call { height: 42px; padding: 0 15px; font-size: 15px; }
body[data-page="driver"] .m-call svg,
body[data-page="checkin"] .m-call svg, body[data-page="walkin"] .m-call svg,
body[data-page="ticket"] .m-call svg { width: 19px; height: 19px; }

/* ---------- 司机端补充组件 ---------- */
.m-notice {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 10px 12px; border-radius: var(--r-md);
  background: var(--warning-soft); border: 1px solid #efd9a8; color: #7d4f00;
  font-size: 11.5px; line-height: 1.55;
}
.m-notice svg { width: 15px; height: 15px; flex: none; margin-top: 1px; }

.summary-card { display: flex; flex-direction: column; gap: 10px; }
.summary-card .sm-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12.5px; }
.summary-card .sm-row span { color: var(--ink-400); }
.summary-card .sm-row b { font-weight: 600; }
.summary-card .sm-row b.mono { font-family: var(--font-mono); }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; border-top: 1px dashed var(--line-strong); }
.summary-total span { font-size: 11px; color: var(--ink-400); }
.summary-total b { font-family: var(--font-display); font-size: 22px; color: var(--accent-hover); }

.fee-note { font-size: 10.5px; color: var(--ink-400); line-height: 1.5; }

.driver-id {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px; border-radius: var(--r-md);
  background: var(--primary-soft); border: 1px solid #c7dbe0;
}
.driver-id .av { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.driver-id .di-txt { flex: 1; min-width: 0; }
.driver-id .di-txt b { display: block; font-size: 13px; color: var(--ink-900); }
.driver-id .di-txt span { font-size: 10.5px; color: var(--ink-500); }
/* 顶部车牌：可点击绑定 / 修改 */
.plate-btn {
  display: inline-flex; align-items: center; gap: 4px;
  margin: 2px 0 0; padding: 1px 7px;
  font-size: 10.5px; color: var(--ink-500);
  background: #fff; border: 1px dashed #b9cfd5; border-radius: 999px;
  cursor: pointer; text-align: left; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.plate-btn:active { background: var(--primary-soft); }
.plate-btn.is-bound { color: var(--ink-900); border-style: solid; }
.driver-id .di-badge { font-size: 10px; color: var(--success); display: inline-flex; align-items: center; gap: 3px; }
.driver-id .di-badge svg { width: 13px; height: 13px; }

.success-hero { text-align: center; padding: 8px 0 4px; }
.success-hero .ok-ring {
  width: 62px; height: 62px; border-radius: 50%; margin: 0 auto 12px;
  display: grid; place-items: center; background: var(--success-soft); color: var(--success);
  animation: pop-in .45s var(--ease) both;
}
.success-hero .ok-ring svg { width: 30px; height: 30px; stroke-width: 2.2; }
.success-hero h2 { font-family: var(--font-display); font-size: 20px; letter-spacing: .02em; }
.success-hero p { font-size: 11.5px; color: var(--ink-400); margin-top: 4px; }
@keyframes pop-in { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ============================================================
   PC 后台 Shell
   ============================================================ */
.app-nav {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 50;
  background: var(--primary); color: #dbe6e8;
  display: flex; flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, .07);
}
.app-nav::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(to right, rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(to bottom, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .9), transparent 85%);
}
.nav-brand { display: flex; align-items: center; gap: 10px; padding: 20px 18px 18px; position: relative; z-index: 1; }
.nav-brand .nb-logo { width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.nav-brand .nb-logo svg { width: 19px; height: 19px; }
.nav-brand strong { font-family: var(--font-display); font-size: 14.5px; color: #fff; letter-spacing: .03em; display: block; line-height: 1.2; }
.nav-brand span { font-size: 10px; color: rgba(219, 230, 232, .5); letter-spacing: .06em; }
.nav-group { padding: 6px 12px; position: relative; z-index: 1; }
.nav-group > p { font-size: 9.5px; letter-spacing: .16em; color: rgba(219, 230, 232, .38); padding: 8px 8px 6px; text-transform: uppercase; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; margin-bottom: 2px; border-radius: 8px;
  font-size: 13px; color: rgba(219, 230, 232, .78);
  transition: background .15s var(--ease), color .15s var(--ease);
  position: relative;
}
.nav-item svg { width: 17px; height: 17px; stroke-width: 1.7; flex: none; opacity: .85; }
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item.is-active { background: rgba(255, 255, 255, .12); color: #fff; font-weight: 600; }
.nav-item.is-active::before { content: ""; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav-item.is-active svg { color: #f3a35c; opacity: 1; }
.nav-foot { margin-top: auto; padding: 14px 16px 18px; position: relative; z-index: 1; border-top: 1px solid rgba(255, 255, 255, .08); }
.nav-foot .nf-row { display: flex; align-items: center; gap: 8px; font-size: 11px; color: rgba(219, 230, 232, .6); }
.nav-foot .nf-row i { width: 6px; height: 6px; border-radius: 50%; background: #66c295; }
.nav-foot .nf-row b { color: #fff; font-weight: 600; }

.app-content { margin-left: var(--sidebar-w); min-height: 100vh; position: relative; z-index: 1; }
.app-top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 13px 28px;
  background: rgba(239, 237, 231, .9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.app-top .at-left { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.app-top h1 { font-family: var(--font-display); font-size: 19px; letter-spacing: .02em; }
.app-top .at-sub { font-size: 11px; color: var(--ink-400); }
.app-top .at-right { display: flex; align-items: center; gap: 12px; }
.clock { font-family: var(--font-mono); font-size: 12px; color: var(--ink-500); letter-spacing: .04em; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; letter-spacing: .04em; }

.app-main { padding: 22px 28px 48px; max-width: 1420px; }
.view { display: none; flex-direction: column; gap: 16px; }
.view.is-active { display: flex; animation: rise .35s var(--ease) both; }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.view-head h2 { font-family: var(--font-display); font-size: 22px; letter-spacing: .02em; }
.view-head p { font-size: 11.5px; color: var(--ink-400); margin-top: 3px; }
.view-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-23 { display: grid; grid-template-columns: 1.55fr 1fr; gap: 16px; }
.grid-32 { display: grid; grid-template-columns: 1fr 1.55fr; gap: 16px; }

.chart-box { position: relative; }
.chart-box svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; color: var(--ink-500); }
.chart-legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }

.gate-load { display: flex; flex-direction: column; gap: 14px; }
.gate-load-row { display: flex; flex-direction: column; gap: 6px; }
.gate-load-row .gl-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; }
.gate-load-row .gl-top b { font-family: var(--font-mono); font-size: 12px; }
.busy-rate { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 9px; }

.alert-row { display: flex; align-items: flex-start; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.alert-row:last-child { border-bottom: 0; }
.alert-row .ai { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.alert-row .ai svg { width: 15px; height: 15px; }
.alert-row b { display: block; font-size: 12.5px; }
.alert-row p { font-size: 11.5px; color: var(--ink-500); margin-top: 1px; }
.ai-warning { background: var(--warning-soft); color: var(--warning); }
.ai-danger { background: var(--danger-soft); color: var(--danger); }
.ai-info { background: var(--primary-soft); color: var(--primary); }

.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filters .input, .filters .select { width: auto; min-width: 132px; padding: 8px 11px; font-size: 12.5px; }
.filters .search-wrap { position: relative; }
.filters .search-wrap svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--ink-400); }
.filters .search-wrap .input { padding-left: 30px; min-width: 210px; }

.slot-table .slot-time { font-family: var(--font-mono); font-size: 12.5px; }
.mini-bars { display: flex; gap: 2px; }
.mini-bars i { width: 7px; height: 16px; border-radius: 2px; background: var(--surface-3); }
.mini-bars i.on { background: var(--primary); }
.mini-bars i.warn { background: var(--accent); }

.drawer { position: fixed; inset: 0; z-index: 90; display: flex; justify-content: flex-end; background: rgba(16, 22, 25, .42); animation: fade .18s var(--ease); }
.drawer[hidden] { display: none; }
.drawer-panel { width: 100%; max-width: 430px; height: 100%; background: var(--surface); box-shadow: var(--sh-lg); display: flex; flex-direction: column; animation: slide-in .24s var(--ease); }
@keyframes slide-in { from { transform: translateX(28px); opacity: .6; } to { transform: translateX(0); opacity: 1; } }
.drawer-head { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 16px; }
.drawer-foot { padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); display: flex; gap: 8px; }
.kv { display: flex; justify-content: space-between; gap: 16px; font-size: 12.5px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--ink-400); }
.kv b { font-weight: 600; text-align: right; }

.rule-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.rule-form .full { grid-column: 1 / -1; }
.rule-form .row > .input { flex: 1; min-width: 0; text-align: center; }
.gate-config { display: flex; flex-direction: column; gap: 10px; }
.gate-config-row { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.gate-config-row .gc-no { width: 38px; height: 38px; border-radius: 9px; background: var(--primary); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-size: 16px; flex: none; }
.gate-config-row .gc-main { flex: 1; min-width: 0; }
.gate-config-row .gc-main b { font-size: 12.5px; display: block; }
.gate-config-row .gc-main span { font-size: 10.5px; color: var(--ink-400); }
.gate-config-row .gc-fields { display: flex; gap: 8px; align-items: center; flex: none; }
.gate-config-row .input { width: 74px; padding: 6px 8px; font-size: 12px; text-align: center; }
.gate-config-row .gc-note { width: 100%; margin-top: 5px; text-align: left; font-size: 11.5px; }
/* 门位经纬度：留空表示沿用厂区围栏中心 */
.gate-config-row .gc-geo { display: flex; gap: 8px; align-items: flex-end; margin-top: 6px; }
.gate-config-row .gc-geo label { display: flex; flex-direction: column; gap: 3px; font-size: 10.5px; }
.gate-config-row .gc-geo .input { width: 112px; text-align: left; font-size: 11.5px; }

/* 时段表格里可直接改开始/结束时间 */
.slot-edit { display: flex; align-items: center; gap: 6px; }
.slot-edit .input { width: 92px; padding: 5px 6px; font-size: 12px; }

/* ============================================================
   大屏（叫号屏）—— 蓝色系
   ============================================================ */
/* 固定 1920×1080 设计舞台：JS 按实际屏幕等比缩放到铺满，电视上即为 1:1 */
.scr-stage {
  position: fixed; left: 50%; top: 50%;
  width: 1920px; height: 1080px;
  transform-origin: 50% 50%;
  overflow: hidden;
}
.scr {
  --scr-deep: #061326;
  --scr-ink: #eaf2ff;
  --scr-blue: #3b82f6;
  --scr-sky: #7cc4ff;
  --scr-mute: rgba(234, 242, 255, .58);
  --scr-line: rgba(124, 196, 255, .16);
  /* 字号基准按设计稿 1080 高度固定：21.6px，保证 75 寸电视 3 米外可读 */
  --scr-u: 21.6px;
  width: 100%; height: 100%;
  background:
    radial-gradient(1200px 620px at 50% -12%, rgba(59, 130, 246, .30), transparent 62%),
    radial-gradient(900px 500px at 100% 100%, rgba(56, 189, 248, .14), transparent 60%),
    linear-gradient(180deg, #071a33 0%, var(--scr-deep) 60%, #040d1b 100%);
  color: var(--scr-ink);
  display: flex; flex-direction: column; position: relative; overflow: hidden;
}
.scr::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(to right, rgba(124, 196, 255, .06) 1px, transparent 1px), linear-gradient(to bottom, rgba(124, 196, 255, .06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 26%, #000 0%, transparent 80%);
}
.scr-top { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 18px 40px; border-bottom: 1px solid var(--scr-line); position: relative; z-index: 1; flex: none; }
.scr-brand { display: flex; align-items: center; gap: 18px; min-width: 0; }
.scr-brand .sb-logo { width: 62px; height: 62px; border-radius: 14px; background: linear-gradient(150deg, #4f9dff, #2563eb); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 22px rgba(37, 99, 235, .38); flex: none; }
.scr-brand .sb-logo svg { width: 58%; height: 58%; }
.scr-brand strong { font-family: var(--font-display); font-size: calc(var(--scr-u) * 2.1); letter-spacing: .05em; color: #fff; line-height: 1.1; display: block; }
.scr-brand span { display: block; font-size: calc(var(--scr-u) * .82); color: var(--scr-mute); letter-spacing: .14em; }
.scr-meta { display: flex; align-items: center; gap: 26px; flex: none; }
.scr-clock { text-align: right; }
.scr-meta .clock-lg { font-family: var(--font-mono); font-size: calc(var(--scr-u) * 2.9); line-height: 1; letter-spacing: .04em; color: #fff; }
.scr-meta .date-sm { font-size: calc(var(--scr-u) * .85); color: var(--scr-mute); letter-spacing: .08em; margin-top: 6px; }
.scr-live { display: inline-flex; align-items: center; gap: 8px; font-size: calc(var(--scr-u) * .82); letter-spacing: .1em; color: var(--scr-sky); border: 1px solid rgba(124, 196, 255, .32); background: rgba(124, 196, 255, .09); padding: 8px 16px; border-radius: 999px; white-space: nowrap; }
.scr-live i { width: 9px; height: 9px; border-radius: 50%; background: var(--scr-sky); animation: pulse-dot 2s infinite; }
.scr-stats { display: flex; gap: 22px; font-size: calc(var(--scr-u) * 1); color: var(--scr-mute); letter-spacing: .04em; }
.scr-stats b { color: #fff; font-family: var(--font-mono); font-weight: 600; margin-left: .3em; font-size: 1.15em; }

/* 多门平铺：门位数由 JS 写入 --gate-cols，每列等宽铺满整屏 */
.scr-main {
  flex: 1; min-height: 0;
  display: grid;
  grid-auto-flow: row;
  grid-template-columns: repeat(var(--gate-cols, 1), minmax(0, 1fr));
  grid-template-rows: repeat(var(--gate-rows, 1), minmax(0, 1fr));
  gap: 20px;
  padding: 16px 40px;
  position: relative; z-index: 1;
}
.scr-main > .scr-gate { min-width: 0; min-height: 0; }
.scr-gate {
  background: linear-gradient(165deg, rgba(70, 132, 226, .16), rgba(10, 30, 58, .55));
  border: 1px solid var(--scr-line); border-radius: 20px; padding: 14px 20px;
  display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 18px 40px rgba(2, 10, 24, .45);
}
.scr-gate::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: linear-gradient(90deg, #4f9dff, #38bdf8, #4f9dff); opacity: .95; }
.scr-gate.is-paused::after { background: #4a5f7d; }
/* 门号：居中、超大字号，75 寸电视远距离一眼可辨 */
.scr-gate-head { position: relative; display: flex; align-items: center; justify-content: center; gap: 16px; flex: none; padding: 2px 0 6px; }
.scr-gate-head > div { min-width: 0; text-align: center; }
.scr-gate-head b { display: block; font-family: var(--font-display); font-size: calc(var(--scr-u) * 3.6); line-height: 1.05; letter-spacing: .08em; color: #fff; text-shadow: 0 0 24px rgba(96, 176, 255, .55); white-space: nowrap; }
.scr-gate-head span { display: block; font-size: calc(var(--scr-u) * 1); color: var(--scr-mute); letter-spacing: .06em; margin-top: 6px; }
.scr-gate-head .scr-state { position: absolute; right: 0; top: 6px; font-size: calc(var(--scr-u) * .95); letter-spacing: .08em; padding: 6px 12px; border-radius: 7px; border: 1px solid rgba(124, 196, 255, .34); color: var(--scr-sky); background: rgba(124, 196, 255, .08); flex: none; }
.scr-gate.is-paused .scr-state { border-color: rgba(234, 242, 255, .18); color: rgba(234, 242, 255, .45); background: transparent; }

/* 当前装车：全屏最醒目的车牌，远看也能认出 */
.scr-call {
  text-align: center; padding: 12px 16px 14px; flex: none;
  background: linear-gradient(180deg, rgba(59, 130, 246, .26), rgba(59, 130, 246, .06));
  border-radius: 18px; border: 1px solid rgba(99, 160, 255, .34);
  box-shadow: inset 0 0 60px rgba(59, 130, 246, .18);
}
.scr-call .sc-label { font-size: calc(var(--scr-u) * 1.1); font-weight: 700; letter-spacing: .3em; color: var(--scr-sky); }
.scr-call .sc-no {
  font-family: var(--font-display); font-weight: 800;
  font-size: min(calc(var(--scr-u) * 7), 22vh);
  line-height: 1; letter-spacing: .01em; color: #fff; margin: 8px 0 12px;
  text-shadow: 0 0 60px rgba(79, 157, 255, .75);
  white-space: nowrap;
}
.scr-call .sc-no.is-idle { color: rgba(234, 242, 255, .22); text-shadow: none; font-size: min(calc(var(--scr-u) * 3.4), 11vh); }
/* 叫号内容是车牌（6~8 字符），按长度缩字号，保证永不断行 */
.scr-call .sc-no[data-len="8"] { font-size: min(calc(var(--scr-u) * 4.6), 14vh); }
.scr-call .sc-no[data-len="7"] { font-size: min(calc(var(--scr-u) * 5.4), 17vh); }
.scr-call .sc-no[data-len="6"] { font-size: min(calc(var(--scr-u) * 6.2), 19vh); }
.scr-call .sc-no[data-len="5"] { font-size: min(calc(var(--scr-u) * 7), 22vh); }
.scr-sub { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; }
.scr-call .sc-berth { display: inline-flex; align-items: center; gap: 8px; font-size: calc(var(--scr-u) * 1.2); font-weight: 600; color: #bfe0ff; border: 1px solid rgba(140, 200, 255, .34); background: rgba(140, 200, 255, .1); padding: 8px 14px; border-radius: 8px; letter-spacing: .04em; }
.scr-call .sc-berth svg { width: calc(var(--scr-u) * 1.2); height: calc(var(--scr-u) * 1.2); }
/* 当前车司机电话：值班人员直接照着打 */
.scr-call .sc-phone { font-family: var(--font-mono); font-size: calc(var(--scr-u) * 1.5); letter-spacing: .05em; color: #fff; }
.scr-call .sc-phone.is-empty { display: none; }

/* 等候车辆列表：占满剩余高度，行高随空间拉伸 */
.scr-queue { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; border-top: 1px dashed rgba(124, 196, 255, .22); padding-top: 12px; overflow: hidden; }
/* 可视窗口：只露出 n 行的高度，超出的部分由滚动动画带上来 */
.scr-queue .sq-view { flex: 1; min-height: 0; overflow: hidden; }
.scr-queue .sq-list { display: flex; flex-direction: column; gap: 8px; }
.scr-queue .sq-list > .scr-qrow { flex: none; height: 88px; }
/* 只有 1 辆车：占满整个可视区 */
.scr-queue[data-n="1"] .sq-list > .scr-qrow { height: 100%; }
/* 车辆很少时行高略放大，避免大片空白；车辆多时保持固定行高，超出的靠轮播 */
.scr-queue[data-n="2"] .sq-list > .scr-qrow { height: calc((100% - 8px) / 2); }
.scr-queue[data-n="3"] .sq-list > .scr-qrow { height: calc((100% - 16px) / 3); }
/* 轮播：车辆多于一屏时整列上滚，滚到末尾停一下再回到开头 */
.scr-queue.is-rolling .sq-list { animation: sq-roll var(--sq-secs, 20s) linear infinite; }
@keyframes sq-roll {
  from { transform: translateY(0); }
  to { transform: translateY(var(--sq-shift, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
  .scr-queue.is-rolling .sq-list { animation: none; }
}
/* 舞台固定 1920×1080：媒体查询不再参与布局，删去小视口回退规则 */
.scr-queue .sq-head { display: flex; justify-content: space-between; align-items: center; font-size: calc(var(--scr-u) * 1.05); font-weight: 700; letter-spacing: .12em; color: rgba(234, 242, 255, .68); flex: none; }
.scr-qrow {
  display: flex; align-items: center; gap: 12px; padding: 6px 14px; border-radius: 12px;
  background: rgba(124, 196, 255, .07); border: 1px solid transparent;
  flex: none; min-height: 0; overflow: hidden;
}
.scr-qrow .sq-idx { font-family: var(--font-mono); font-weight: 700; color: rgba(191, 224, 255, .7); min-width: 1.8em; font-size: calc(var(--scr-u) * 1.6); flex: none; }
.scr-qrow .sq-main { display: flex; align-items: baseline; gap: 14px; min-width: 0; flex: 1; overflow: hidden; }
.scr-qrow .sq-plate { font-family: var(--font-mono); font-weight: 700; color: #fff; letter-spacing: .02em; line-height: 1.1; white-space: nowrap; flex: none; }
.scr-qrow .sq-phone { font-family: var(--font-mono); color: rgba(191, 224, 255, .82); letter-spacing: .04em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; min-width: 0; }
/* 单列满宽：车牌字号按行高放大，75 寸电视 3 米外也能看清 */
/* 上限一律用舞台高度折算（1080px 的百分比），不能用 vh —— vh 按真实视口算，会被浏览器工具栏压小 */
.scr-queue .sq-plate { font-size: min(calc(var(--scr-u) * 2.4), 64.8px); }
.scr-queue .sq-phone { font-size: min(calc(var(--scr-u) * 1.7), 43.2px); }
/* 车辆少时行更高，车牌进一步放大 */
.scr-queue[data-n="1"] .sq-plate { font-size: min(calc(var(--scr-u) * 3.2), 140.4px); }
.scr-queue[data-n="2"] .sq-plate { font-size: min(calc(var(--scr-u) * 3), 108px); }
.scr-queue[data-n="2"] .sq-phone { font-size: min(calc(var(--scr-u) * 2), 58.3px); }
.scr-queue[data-n="3"] .sq-plate { font-size: min(calc(var(--scr-u) * 2.8), 90.7px); }
.scr-queue[data-n="3"] .sq-phone { font-size: min(calc(var(--scr-u) * 1.8), 49.7px); }
.scr-queue[data-n="4"] .sq-plate { font-size: min(calc(var(--scr-u) * 2.6), 75.6px); }
.scr-queue[data-n="4"] .sq-phone { font-size: min(calc(var(--scr-u) * 1.7), 43.2px); }
.scr-qrow .sq-type { margin-left: auto; font-size: calc(var(--scr-u) * .95); letter-spacing: .04em; padding: 4px 10px; border-radius: 6px; border: 1px solid rgba(124, 196, 255, .28); color: rgba(191, 224, 255, .8); flex: none; }
.scr-qrow .sq-type.is-walkin { border-color: rgba(250, 204, 21, .45); color: #fbd46a; }
.scr-qrow.next { background: linear-gradient(90deg, rgba(59, 130, 246, .42), rgba(59, 130, 246, .12)); border-color: rgba(124, 196, 255, .55); }
.scr-qrow.next .sq-idx { color: #fbd46a; }
.scr-qrow.next .sq-idx::before { content: "▶"; margin-right: .3em; font-size: .8em; }
.scr-queue .sq-empty { flex: 1; display: grid; place-items: center; font-size: calc(var(--scr-u) * 1.15); color: rgba(234, 242, 255, .3); letter-spacing: .06em; }
.scr-queue .sq-more { flex: none; text-align: center; font-size: calc(var(--scr-u) * .88); color: rgba(191, 224, 255, .6); letter-spacing: .06em; padding-top: 6px; }
.scr-gate-foot { display: flex; justify-content: space-between; font-size: calc(var(--scr-u) * 1); color: var(--scr-mute); border-top: 1px solid rgba(124, 196, 255, .12); padding-top: 10px; letter-spacing: .04em; flex: none; }
.scr-gate-foot b { color: #fff; font-family: var(--font-mono); font-weight: 700; font-size: 1.2em; }

.scr-foot { display: flex; align-items: center; gap: 18px; padding: 14px 40px; border-top: 1px solid var(--scr-line); background: rgba(4, 14, 28, .6); position: relative; z-index: 1; flex: none; }
.scr-ticker { flex: 1; overflow: hidden; font-size: calc(var(--scr-u) * 1.15); color: rgba(234, 242, 255, .82); display: flex; align-items: center; gap: 14px; }
.scr-ticker .tk-label { font-size: calc(var(--scr-u) * .85); letter-spacing: .14em; color: var(--scr-sky); border: 1px solid rgba(124, 196, 255, .4); padding: 4px 10px; border-radius: 5px; flex: none; }
.scr-ticker .tk-text { white-space: nowrap; animation: ticker 26s linear infinite; }
@keyframes ticker { from { transform: translateX(100%); } to { transform: translateX(-100%); } }
.scr-btn { display: inline-flex; align-items: center; gap: 8px; font-size: calc(var(--scr-u) * .95); padding: 10px 14px; border-radius: 8px; border: 1px solid rgba(124, 196, 255, .2); background: rgba(124, 196, 255, .07); color: rgba(234, 242, 255, .82); cursor: pointer; transition: all .15s var(--ease); text-decoration: none; white-space: nowrap; }
.scr-btn:hover { background: rgba(124, 196, 255, .14); color: #fff; }
.scr-btn svg { width: calc(var(--scr-u) * 1.15); height: calc(var(--scr-u) * 1.15); }
.scr-btn.is-on { border-color: rgba(124, 196, 255, .5); color: var(--scr-sky); background: rgba(59, 130, 246, .16); }

.scr-body { margin: 0; overflow: hidden; background: #040d1b; }
.scr-body::before { display: none; }
.scr-call .sc-no.pop { animation: call-pop .6s var(--ease); }
@keyframes call-pop {
  0% { transform: scale(.86); color: #a8d4ff; text-shadow: 0 0 80px rgba(79, 157, 255, .95); }
  100% { transform: scale(1); color: #fff; }
}

/* 舞台模式下不再按视口切换档位：整体等比缩放，内部始终保持 1920×1080 布局 */

/* ============================================================
   入口页 / 角色选择
   ============================================================ */
.home-body { background: var(--bg); }
.home {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 28px 48px;
}
.home-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.home-brand { display: flex; align-items: center; gap: 11px; }
.hb-logo {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--primary);
  color: #f2f6f6;
  display: grid;
  place-items: center;
  font-size: 19px;
  box-shadow: var(--sh-sm);
}
.home-brand > div { display: flex; flex-direction: column; gap: 2px; }
.home-brand strong { font-size: 15.5px; font-weight: 700; letter-spacing: .01em; color: var(--ink-900); }
.home-brand span { font-size: 11px; color: var(--ink-400); letter-spacing: .05em; }
.home-top-right { display: flex; align-items: center; gap: 14px; }
.home-clock { font-size: 12.5px; color: var(--ink-700); letter-spacing: .04em; }
.home-env {
  font-size: 10.5px;
  letter-spacing: .06em;
  color: var(--ink-500);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--surface);
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) 300px;
  gap: 40px;
  align-items: start;
  padding: 44px 0 40px;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--accent);
  border-left: 2px solid var(--accent);
  padding-left: 9px;
  margin-bottom: 16px;
}
.hero-copy h1 {
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--primary);
  margin-bottom: 16px;
}
.hero-copy > p {
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--ink-500);
  max-width: 620px;
}
.hero-goals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}
.goal {
  display: flex;
  gap: 10px;
  padding: 14px 14px 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-sm);
}
.goal > b {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  line-height: 1.5;
  flex: none;
}
.goal > div { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.goal strong { font-size: 12.5px; color: var(--ink-900); line-height: 1.4; }
.goal span { font-size: 11.5px; line-height: 1.65; color: var(--ink-400); }

.hero-panel { position: sticky; top: 20px; }
.qr-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--sh-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.qr-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-800);
  align-self: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
  width: 100%;
}
.qr-head [data-icon] { color: var(--primary); font-size: 15px; }
.home-qr {
  width: 168px; height: 168px;
  border-radius: var(--r-sm);
  background: #fff;
  border: 1px solid var(--line);
  padding: 6px;
  box-sizing: border-box;
}
.home-qr img, .qr-img { width: 100%; height: 100%; display: block; }
/* 入口卡片右上角二维码 */
.ec-qr {
  width: 46px; height: 46px; flex: none;
  background: #fff; border: 1px solid var(--line);
  border-radius: 6px; padding: 2px; box-sizing: border-box;
}
.ec-qr img { width: 100%; height: 100%; display: block; }
.qr-code-text {
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--ink-700);
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface-2);
}
.qr-tip { font-size: 11px; line-height: 1.7; color: var(--ink-400); text-align: center; }

.home-entries {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 8px 0 40px;
  border-top: 1px solid var(--line);
  padding-top: 32px;
}
.entry-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 20px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  text-decoration: none;
  color: inherit;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.entry-card::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: var(--line-strong);
  transition: background .2s var(--ease);
}
.entry-card:hover { transform: translateY(-3px); box-shadow: var(--sh-lg); border-color: var(--line-strong); }
.entry-card.is-mobile::after { background: var(--accent); }
.entry-card.is-screen::after { background: var(--primary); }
.entry-card.is-admin::after { background: var(--warning); }
.ec-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ec-ico {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 17px;
  background: var(--surface-2);
  color: var(--ink-700);
  border: 1px solid var(--line);
}
.entry-card.is-mobile .ec-ico { background: var(--accent-soft); color: var(--accent-hover); border-color: transparent; }
.entry-card.is-screen .ec-ico { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.entry-card.is-admin .ec-ico { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.ec-tag { font-size: 10.5px; letter-spacing: .06em; color: var(--ink-400); white-space: nowrap; }
.entry-card h3 { font-size: 16px; font-weight: 700; color: var(--ink-900); letter-spacing: .01em; }
.entry-card > p { font-size: 12px; line-height: 1.75; color: var(--ink-500); }
.ec-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 2px 0 4px;
  padding-top: 11px;
  border-top: 1px dashed var(--line);
}
.ec-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--ink-700);
}
.ec-list li [data-icon] { color: var(--ink-400); font-size: 13px; flex: none; }
.ec-go {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  padding-top: 4px;
}
.ec-go [data-icon] { font-size: 13px; transition: transform .2s var(--ease); }
.entry-card:hover .ec-go { color: var(--accent-hover); }
.entry-card:hover .ec-go [data-icon] { transform: translateX(3px); }

.home-flow {
  padding: 30px 0 34px;
  border-top: 1px solid var(--line);
}
.flow-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.flow-head h2 { font-size: 17px; font-weight: 700; color: var(--ink-900); letter-spacing: .01em; }
.flow-head p { font-size: 12px; color: var(--ink-400); }
.flow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface);
}
.fstep {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 17px;
  border-right: 1px solid var(--line);
}
.fstep:last-child { border-right: 0; }
.fstep > b {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #fff;
  background: var(--primary);
  width: 19px; height: 19px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 2px;
}
.fstep strong { font-size: 12.5px; color: var(--ink-900); }
.fstep span { font-size: 11.5px; line-height: 1.65; color: var(--ink-400); }
.fstep::before {
  content: "";
  position: absolute;
  right: -5px; top: 24px;
  width: 9px; height: 9px;
  border-top: 1px solid var(--line-strong);
  border-right: 1px solid var(--line-strong);
  transform: rotate(45deg);
  background: var(--surface);
  z-index: 1;
}
.fstep:last-child::before { display: none; }

/* 入口页演示路径 */
.home-demo { padding-top: 26px; }
.home-demo .card { max-width: 100%; }
.demo-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; }
.demo-steps li { display: flex; align-items: flex-start; gap: 11px; list-style: none; }
.demo-steps b {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--accent);
  border: 1px solid rgba(224, 101, 12, .3); background: var(--accent-soft);
  border-radius: 6px; padding: 2px 5px; flex: none; margin-top: 1px;
}
.demo-steps strong { display: block; font-size: 12.5px; color: var(--ink-900); letter-spacing: .02em; }
.demo-steps span { display: block; margin-top: 3px; font-size: 11.5px; line-height: 1.7; color: var(--ink-400); }
.demo-steps a { color: var(--ink-700); text-decoration: underline; text-decoration-color: rgba(224, 101, 12, .45); text-underline-offset: 2px; }
.demo-steps a:hover { color: var(--accent); }

.home-foot {
  margin-top: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.hf-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--ink-400);
  max-width: 660px;
}
.hf-note [data-icon] { color: var(--ink-300); font-size: 14px; margin-top: 1px; flex: none; }
.hf-actions { display: flex; align-items: center; gap: 10px; }

@media (max-width: 900px) {
  .home { padding: 18px 18px 34px; }
  .home-hero { grid-template-columns: 1fr; gap: 24px; padding: 28px 0 26px; }
  .hero-panel { position: static; }
  .qr-card { max-width: 320px; }
  .hero-goals { grid-template-columns: 1fr; }
  .home-entries { grid-template-columns: 1fr; padding-top: 24px; }
  .flow-steps { grid-template-columns: 1fr 1fr; }
  .fstep:nth-child(2) { border-right: 0; }
  .fstep:nth-child(1), .fstep:nth-child(2) { border-bottom: 1px solid var(--line); }
  .fstep:nth-child(2)::before { display: none; }
}
@media (max-width: 560px) {
  .home-top-right { width: 100%; justify-content: space-between; }
  .flow-steps { grid-template-columns: 1fr; }
  .fstep { border-right: 0; border-bottom: 1px solid var(--line); }
  .fstep::before { display: none; }
  .home-foot { flex-direction: column; align-items: flex-start; }
  .demo-steps { grid-template-columns: 1fr; }
}

/* ---------- 成功页：厂区地址导航卡 ---------- */
.address-card { padding: 14px 15px 13px; }
.ac-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-800);
  letter-spacing: .01em;
}
.ac-head [data-icon] { color: var(--accent); font-size: 15px; flex: none; }
.ac-addr {
  margin: 7px 0 11px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-500);
}
.ac-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ac-actions .btn { gap: 5px; }
.ac-actions [data-icon] { font-size: 13px; opacity: .8; }
.ac-tip {
  margin: 11px 0 0;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 11px;
  line-height: 1.6;
  color: var(--ink-300);
}

/* ---------- 现场调度员手持端 ---------- */
.staff-stat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 14px; }
.staff-cell { display: flex; flex-direction: column; align-items: center; }
.staff-cell b { font-size: 22px; line-height: 1.1; color: var(--ink-900); font-weight: 700; }
.staff-cell span { font-size: 10.5px; color: var(--ink-400); margin-top: 3px; }
.staff-list { display: flex; flex-direction: column; gap: 10px; }
.staff-gate { padding: 12px 13px; display: flex; flex-direction: column; gap: 9px; }
.staff-gate.is-paused { opacity: .68; }
.sg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.sg-head > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sg-name { font-family: var(--font-display); font-size: 15px; color: var(--ink-900); font-weight: 700; }
.sg-now { display: flex; align-items: center; gap: 12px; padding: 8px 10px; background: var(--ink-50, #f6f5f1); border-radius: var(--r-md); }
.sg-call { display: flex; flex-direction: column; gap: 1px; flex: none; }
.sg-call b { font-size: 22px; line-height: 1.1; color: var(--accent); font-weight: 700; }
.sg-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; flex: 1; }
.sg-meta > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sg-meta b { font-size: 12px; color: var(--ink-700); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-queue { display: flex; flex-direction: column; gap: 2px; min-height: 30px; }
.sg-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.sg-actions .btn { width: 100%; }
/* 调度端：排队车辆换门 */
.q-row .sg-move { flex: none; min-height: 30px; padding: 4px 10px; font-size: 12px; }
.sg-move-now { width: 100%; }
/* 调度端：每辆车可点击拨号的司机电话 */
.staff-q { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 4px; }
.sq-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.sq-call {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--success); text-decoration: none; white-space: nowrap;
  padding: 4px 9px; border-radius: var(--r-sm);
  border: 1px solid color-mix(in srgb, var(--success) 32%, transparent);
  background: color-mix(in srgb, var(--success) 8%, transparent);
}
.sq-call svg { width: 15px; height: 15px; }
.sq-call:active { transform: scale(.97); }
.sq-call.is-empty { font-size: 12px; font-weight: 400; color: var(--ink-400); border-color: var(--line); background: none; }
.sg-call .sq-call { margin-top: 4px; }
.move-plate { font-size: 26px; font-weight: 700; color: var(--accent); text-align: center; letter-spacing: .04em; }
.move-gates { display: flex; flex-direction: column; gap: 8px; }
.move-gate-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; min-height: 54px; padding: 10px 14px; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink-900); text-align: left;
  transition: all .16s var(--ease);
}
.move-gate-btn b { font-size: 17px; }
.move-gate-btn span { font-size: 12px; color: var(--ink-400); }
.move-gate-btn:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.move-gate-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- 客户端实时门况（各门装车 / 排队） ---------- */
.live-list { display: flex; flex-direction: column; gap: 8px; }
.live-gate {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink-300);
  border-radius: var(--r-md);
  padding: 10px 12px 9px;
  box-shadow: var(--sh-sm);
}
.live-gate.is-working { border-left-color: var(--accent); }
.live-gate.is-paused { opacity: .62; border-left-color: var(--ink-200); }
.lg-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lg-no { font-family: var(--font-display); font-size: 13px; font-weight: 700; color: var(--ink-900); letter-spacing: .02em; }
.lg-main { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0 7px; }
.lg-cell { display: flex; flex-direction: column; align-items: flex-start; }
.lg-cell b { font-size: 16px; line-height: 1.15; color: var(--ink-900); font-weight: 700; }
.lg-cell b small { font-size: 9px; font-weight: 500; color: var(--ink-400); margin-left: 1px; }
.lg-cell span { font-size: 10px; color: var(--ink-400); margin-top: 1px; }
.lg-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding-top: 7px; border-top: 1px dashed var(--line);
  font-size: 10.5px; color: var(--ink-400);
}
.lg-foot b { color: var(--ink-700); }
.live-meta { display: flex; align-items: center; justify-content: space-between; font-size: 10.5px; color: var(--ink-300); margin-top: 8px; }
.live-meta .dot-live { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--success); margin-right: 5px; animation: pulseDot 1.8s infinite; }
@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* ---------- 提货须知 / 公司信息 ---------- */
.notice-list { display: flex; flex-direction: column; gap: 9px; }
.notice-item { display: flex; gap: 9px; font-size: 12px; line-height: 1.62; color: var(--ink-700); }
.notice-item i {
  flex: none; width: 17px; height: 17px; margin-top: 2px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  font-family: var(--font-mono); font-size: 10px; font-style: normal; font-weight: 700;
  display: grid; place-items: center;
}
.company-card { display: flex; flex-direction: column; gap: 7px; }
.company-row { display: flex; gap: 9px; align-items: flex-start; font-size: 12px; color: var(--ink-500); line-height: 1.6; }
.company-row [data-icon] { color: var(--accent); flex: none; margin-top: 1px; }
.company-row b { color: var(--ink-800); font-weight: 600; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-23, .grid-32, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  .app-nav { display: none; }
  .app-content { margin-left: 0; }
  .app-main { padding: 16px 16px 40px; }
  .app-top { padding: 12px 16px; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .form-row, .rule-form { grid-template-columns: 1fr; }
  .drawer-panel { max-width: 100%; }
  .app-top .clock { display: none; }
}
@media (min-width: 521px) {
  /* clip 而非 hidden：hidden 会让 .m-top 的 sticky 失效 */
  .m-app { margin-top: 18px; margin-bottom: 18px; border-radius: 22px; overflow: clip; min-height: calc(100dvh - 36px); }
  .m-tabs { bottom: 18px; border-radius: 0 0 22px 22px; }
  .sticky-cta { bottom: calc(88px + env(safe-area-inset-bottom)); }
}

/* ============================================================
   司机端大字模式（司机多为中老年，字小看不清）
   —— 只在 body[data-page="driver"] 生效，不影响 PC 后台
   ============================================================ */
/* 底部导航与操作条在真实层叠里先后重叠，占位按实际高度算 */
body[data-page="driver"] .m-tabs { padding: 6px 10px calc(6px + env(safe-area-inset-bottom)); }
body[data-page="driver"] .m-tab { font-size: 14px; font-weight: 700; gap: 4px; padding: 6px 0 4px; }
body[data-page="driver"] .m-tab svg { width: 26px; height: 26px; stroke-width: 1.9; }
body[data-page="driver"] .m-main { gap: 16px; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
/* 底部固定操作条 + 导航栏的真实占位，避免挡住最后一块内容 */
body[data-page="driver"] .cta-space { height: 212px; flex: none; }
body[data-page="driver"] .sticky-cta { bottom: calc(76px + env(safe-area-inset-bottom)); padding: 12px 16px 14px; }
/* 刚选齐时的「就差按这里」提示 */
body[data-page="driver"] .cta-done {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin-bottom: 8px;
  background: var(--success-soft, #e8f3ea); border: 1px solid rgba(31, 122, 68, .35); border-radius: 12px;
  color: #14532d;
}
body[data-page="driver"] .cta-done[hidden] { display: none; }
body[data-page="driver"] .cta-done svg { width: 26px; height: 26px; flex: none; color: var(--success, #1f7a44); }
body[data-page="driver"] .cta-done-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
body[data-page="driver"] .cta-done-txt b { font-size: 16px; line-height: 1.3; }
body[data-page="driver"] .cta-done-txt em { font-style: normal; font-size: 14px; color: #2f6b45; }
body[data-page="driver"] .cta-done-x { flex: none; width: 30px; height: 30px; border: 0; border-radius: 8px; background: rgba(0, 0, 0, .06); color: #14532d; font-size: 20px; line-height: 1; cursor: pointer; }
body[data-page="driver"] .cta-note { font-size: 14px; color: var(--ink-500); margin-bottom: 8px; }

body[data-page="driver"] .m-brand-txt strong { font-size: 17px; }
body[data-page="driver"] .m-brand-txt span { font-size: 13px; }
body[data-page="driver"] .m-logo { width: 40px; height: 40px; border-radius: 11px; }
body[data-page="driver"] .m-logo svg { width: 23px; height: 23px; }
body[data-page="driver"] .m-help { width: 42px; height: 42px; }
body[data-page="driver"] .m-help svg { width: 21px; height: 21px; }

body[data-page="driver"] .m-page-title h1 { font-size: 27px; }
body[data-page="driver"] .m-page-title p { font-size: 15px; color: var(--ink-500); margin-top: 6px; }

body[data-page="driver"] .m-sec { gap: 11px; }
body[data-page="driver"] .m-sec-head h2 { display: flex; align-items: center; gap: 9px; font-size: 20px; letter-spacing: .01em; color: var(--ink-900); }
body[data-page="driver"] .m-sec-head h2 span { font-size: 14px; }
body[data-page="driver"] .m-sec-head a, body[data-page="driver"] .m-sec-head button { font-size: 14px; }
body[data-page="driver"] .m-sec-head svg { width: 15px; height: 15px; }
body[data-page="driver"] .step-no {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-family: var(--font-mono); font-size: 16px; font-weight: 700; font-style: normal;
  display: inline-grid; place-items: center;
}

body[data-page="driver"] .m-card { padding: 18px; }

/* 日期 */
body[data-page="driver"] .date-strip { gap: 10px; }
body[data-page="driver"] .date-chip { width: 82px; padding: 12px 0 10px; gap: 3px; border-radius: 14px; }
body[data-page="driver"] .date-chip b { font-size: 22px; }
body[data-page="driver"] .date-chip span { font-size: 14px; }
body[data-page="driver"] .date-chip em { font-size: 13px; }

/* 时段：完整显示 08:00-10:00，一行不跨行，字号按卡片宽度自适应缩小 */
body[data-page="driver"] .slot-grid { gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
body[data-page="driver"] .slot {
  padding: 10px 8px; gap: 4px; border-radius: 12px; border-width: 2px;
  flex-direction: column; align-items: center; justify-content: center;
}
body[data-page="driver"] .slot b { font-size: 16px; white-space: nowrap; letter-spacing: 0; }
body[data-page="driver"] .slot span { font-size: 12px; white-space: nowrap; }
body[data-page="driver"] .slot.is-active { background: var(--primary); border-color: var(--primary); box-shadow: none; }
body[data-page="driver"] .slot.is-active b { color: #fff; }
body[data-page="driver"] .slot.is-active span { color: rgba(255, 255, 255, .88); }
body[data-page="driver"] .slot.is-active span strong { color: #fff; }
/* 状态文字已经并到 span 同一行，不再用右上角伪标签，也不再留底部空白 */
body[data-page="driver"] .slot.is-full { padding-bottom: 10px; padding-right: 12px; }
body[data-page="driver"] .slot.is-full::after { content: none; }
body[data-page="driver"] .slot.is-full span { color: var(--ink-500); font-weight: 600; }

/* 门号（样式已在基础段 .gate-opt 统一放大） */

/* 三个关键字段（哪天提货 / 几点提货 / 走哪个门）：整块装进卡片，标题与已选结果放大 */
body[data-page="driver"] .key-sec {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px; gap: 12px;
}
body[data-page="driver"] .key-sec .m-sec-head { align-items: center; }
body[data-page="driver"] .key-sec .m-sec-head h2 { font-size: 23px; gap: 10px; }
body[data-page="driver"] .key-sec .step-no {
  width: 34px; height: 34px; background: var(--accent); font-size: 18px;
  box-shadow: 0 2px 8px rgba(224, 101, 12, .28);
}
body[data-page="driver"] .key-sec .m-sec-head .tiny { font-size: 14px; color: var(--ink-500); }
/* 已选结果：跟着标题走，司机不用回看上方内容 */
body[data-page="driver"] .key-picked {
  font-family: var(--font-display); font-size: 22px; font-weight: 700; line-height: 1.25;
  color: var(--ink-900); letter-spacing: .01em;
}
body[data-page="driver"] .key-picked.is-empty { font-family: inherit; font-size: 16px; font-weight: 500; color: var(--ink-400); }
body[data-page="driver"] .key-picked.is-empty::before { content: "请选 "; }
body[data-page="driver"] .key-sec .date-chip { width: 88px; padding: 14px 0 12px; }
body[data-page="driver"] .key-sec .date-chip b { font-size: 24px; }
body[data-page="driver"] .key-sec .slot { padding: 13px 8px; }
body[data-page="driver"] .key-sec .slot b { font-size: 17px; }

/* 底部确认条是浮层，正文多留空间，避免输入框被压住 */
body[data-page="driver"] .m-main { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }

/* 表单 */
body[data-page="driver"] .field { gap: 8px; }
body[data-page="driver"] .field > label { font-size: 18px; color: var(--ink-900); }
body[data-page="driver"] .field .hint { font-size: 14px; color: var(--ink-500); line-height: 1.5; }
body[data-page="driver"] .input, body[data-page="driver"] .select, body[data-page="driver"] textarea.input {
  font-size: 19px; padding: 15px 14px; border-radius: 12px; border-color: #b3ada0;
}
body[data-page="driver"] .form-row { grid-template-columns: 1fr; gap: 14px; }

/* 按钮 */
body[data-page="driver"] .btn { font-size: 18px; padding: 14px 18px; }
body[data-page="driver"] .btn svg { width: 21px; height: 21px; }
body[data-page="driver"] .btn-lg { font-size: 21px; padding: 18px 22px; }
body[data-page="driver"] .plate-btn { font-size: 14px; padding: 3px 10px; }

/* 汇总卡 */
body[data-page="driver"] .summary-card { gap: 12px; }
body[data-page="driver"] .summary-card .sm-row { font-size: 17px; }
body[data-page="driver"] .summary-total span { font-size: 15px; }
body[data-page="driver"] .summary-total b { font-size: 26px; }

/* 司机身份卡 */
body[data-page="driver"] .driver-id { padding: 13px 14px; }
body[data-page="driver"] .driver-id .av { width: 42px; height: 42px; font-size: 16px; }
body[data-page="driver"] .driver-id .di-txt b { font-size: 18px; }
body[data-page="driver"] .driver-id .di-txt span { font-size: 14px; }
body[data-page="driver"] .driver-id .di-badge { font-size: 13px; }
body[data-page="driver"] .driver-id .di-badge svg { width: 16px; height: 16px; }

/* 公告 / 提示 */
body[data-page="driver"] .m-notice { font-size: 15px; padding: 13px 14px; gap: 10px; }
body[data-page="driver"] .m-notice svg { width: 19px; height: 19px; }
body[data-page="driver"] .callout { font-size: 15px; padding: 14px; line-height: 1.6; }
body[data-page="driver"] .callout svg { width: 19px; height: 19px; }

/* 底部 CTA */
body[data-page="driver"] .sticky-cta .cta-note { font-size: 15px; margin-bottom: 9px; }

/* 成功页 */
body[data-page="driver"] .success-hero h2 { font-size: 27px; }
body[data-page="driver"] .success-hero p { font-size: 15px; }
body[data-page="driver"] .success-hero .ok-ring { width: 74px; height: 74px; }
body[data-page="driver"] .success-hero .ok-ring svg { width: 36px; height: 36px; }
body[data-page="driver"] .qr-meta .code { font-size: 24px; }
body[data-page="driver"] .qr-meta .hint { font-size: 14px; }
body[data-page="driver"] .sheet-rows > div { font-size: 17px; padding: 12px 0; }
body[data-page="driver"] .empty h4 { font-size: 19px; }
body[data-page="driver"] .empty p { font-size: 15px; }
body[data-page="driver"] .address-card .ac-head { font-size: 19px; }
body[data-page="driver"] .address-card .ac-head [data-icon] { font-size: 20px; }
body[data-page="driver"] .address-card .ac-addr { font-size: 17px; }
body[data-page="driver"] .address-card .ac-tip { font-size: 14px; color: var(--ink-400); }
body[data-page="driver"] .address-card .btn-block + .btn-block { margin-top: 10px; }

/* 提货抱怨入口 */
body[data-page="driver"] .complain-entry {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: var(--warning-soft); border-color: #efd9a8;
}
body[data-page="driver"] .complain-entry b { display: block; font-size: 19px; color: #7d4f00; }
body[data-page="driver"] .complain-entry p { font-size: 15px; color: #8a5c10; line-height: 1.55; margin-top: 4px; }
body[data-page="driver"] .complain-entry .btn { flex: none; }
body[data-page="driver"] .kind-chips { display: flex; flex-wrap: wrap; gap: 9px; }
body[data-page="driver"] .kind-chip {
  padding: 11px 15px; border-radius: 11px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink-700); font-size: 17px; font-weight: 600; cursor: pointer;
}
body[data-page="driver"] .kind-chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* 弹层 */
body[data-page="driver"] .sheet-head h3 { font-size: 21px; }

@media (min-width: 521px) {
  body[data-page="driver"] .sticky-cta { bottom: calc(94px + env(safe-area-inset-bottom)); }
}

/* ============================================================
   司机端大字模式：签到页 / 号票页
   —— 司机多为中老年，看一眼就要读懂：号码、门号、当前叫号必须最大
   ============================================================ */
body[data-page="checkin"] .m-tabs, body[data-page="walkin"] .m-tabs,
body[data-page="ticket"] .m-tabs { padding: 6px 10px calc(6px + env(safe-area-inset-bottom)); }
body[data-page="checkin"] .m-tab, body[data-page="walkin"] .m-tab,
body[data-page="ticket"] .m-tab { font-size: 14px; font-weight: 700; gap: 4px; padding: 6px 0 4px; }
body[data-page="checkin"] .m-tab svg, body[data-page="walkin"] .m-tab svg,
body[data-page="ticket"] .m-tab svg { width: 26px; height: 26px; stroke-width: 1.9; }
body[data-page="checkin"] .m-main, body[data-page="walkin"] .m-main,
body[data-page="ticket"] .m-main { gap: 16px; }

body[data-page="checkin"] .m-brand-txt strong, body[data-page="walkin"] .m-brand-txt strong,
body[data-page="ticket"] .m-brand-txt strong { font-size: 17px; }
body[data-page="checkin"] .m-brand-txt span, body[data-page="walkin"] .m-brand-txt span,
body[data-page="ticket"] .m-brand-txt span { font-size: 13px; }
body[data-page="checkin"] .m-logo, body[data-page="walkin"] .m-logo,
body[data-page="ticket"] .m-logo { width: 40px; height: 40px; border-radius: 11px; }
body[data-page="checkin"] .m-logo svg, body[data-page="walkin"] .m-logo svg,
body[data-page="ticket"] .m-logo svg { width: 23px; height: 23px; }
body[data-page="checkin"] .m-help, body[data-page="walkin"] .m-help,
body[data-page="ticket"] .m-help { width: 42px; height: 42px; }
body[data-page="checkin"] .m-help svg, body[data-page="walkin"] .m-help svg,
body[data-page="ticket"] .m-help svg { width: 21px; height: 21px; }

body[data-page="checkin"] .m-page-title h1, body[data-page="walkin"] .m-page-title h1,
body[data-page="ticket"] .m-page-title h1 { font-size: 27px; }
body[data-page="checkin"] .m-page-title p, body[data-page="walkin"] .m-page-title p,
body[data-page="ticket"] .m-page-title p { font-size: 15px; color: var(--ink-500); margin-top: 6px; }
body[data-page="checkin"] .tag, body[data-page="walkin"] .tag,
body[data-page="ticket"] .tag { font-size: 14px; padding: 5px 11px; }

body[data-page="checkin"] .m-sec, body[data-page="walkin"] .m-sec,
body[data-page="ticket"] .m-sec { gap: 11px; }
body[data-page="checkin"] .m-sec-head h2, body[data-page="walkin"] .m-sec-head h2,
body[data-page="ticket"] .m-sec-head h2 { font-size: 20px; color: var(--ink-900); }
body[data-page="checkin"] .m-sec-head a, body[data-page="walkin"] .m-sec-head a,
body[data-page="ticket"] .m-sec-head a { font-size: 15px; }
body[data-page="checkin"] .m-sec-head svg, body[data-page="walkin"] .m-sec-head svg,
body[data-page="ticket"] .m-sec-head svg { width: 16px; height: 16px; }
body[data-page="checkin"] .tiny, body[data-page="walkin"] .tiny,
body[data-page="ticket"] .tiny { font-size: 14px; }
body[data-page="checkin"] .dim, body[data-page="walkin"] .dim,
body[data-page="ticket"] .dim { color: var(--ink-400); }

body[data-page="checkin"] .m-card, body[data-page="walkin"] .m-card,
body[data-page="ticket"] .m-card { padding: 16px; }
body[data-page="checkin"] .btn, body[data-page="walkin"] .btn,
body[data-page="ticket"] .btn { font-size: 18px; padding: 14px 18px; }
body[data-page="checkin"] .btn svg, body[data-page="walkin"] .btn svg,
body[data-page="ticket"] .btn svg { width: 21px; height: 21px; }
body[data-page="checkin"] .btn-sm, body[data-page="walkin"] .btn-sm,
body[data-page="ticket"] .btn-sm { font-size: 16px; padding: 11px 14px; }
body[data-page="checkin"] .btn-sm svg, body[data-page="walkin"] .btn-sm svg,
body[data-page="ticket"] .btn-sm svg { width: 18px; height: 18px; }
body[data-page="checkin"] .callout, body[data-page="walkin"] .callout,
body[data-page="ticket"] .callout { font-size: 16px; padding: 14px; line-height: 1.6; }
body[data-page="checkin"] .callout svg, body[data-page="walkin"] .callout svg,
body[data-page="ticket"] .callout svg { width: 20px; height: 20px; }
/* 已有预约：挡住取号，给下一步入口 */
body[data-page="walkin"] .wk-has-bk { display: flex; align-items: flex-start; gap: 12px; }
body[data-page="walkin"] .wk-has-bk b { display: block; font-size: 19px; line-height: 1.4; }
body[data-page="walkin"] .wk-has-bk > div { flex: 1; min-width: 0; }
body[data-page="walkin"] .wk-has-bk div > div { margin-top: 4px; font-size: 16px; color: #6b4a00; }
body[data-page="walkin"] .wk-has-bk-btn { margin-top: 12px; }
/* 现场号备注：无纸化，手机即凭证 */
body[data-page="walkin"] .wk-note {
  display: block; text-align: center; font-size: 14px; line-height: 1.5;
  color: var(--ink-500); padding: 0 4px;
}

body[data-page="checkin"] .field > label, body[data-page="walkin"] .field > label,
body[data-page="ticket"] .field > label { font-size: 18px; color: var(--ink-900); }
body[data-page="checkin"] .field .hint, body[data-page="walkin"] .field .hint,
body[data-page="ticket"] .field .hint { font-size: 14px; }
body[data-page="checkin"] .input, body[data-page="walkin"] .input,
body[data-page="ticket"] .input { font-size: 21px; padding: 15px 14px; border-radius: 12px; border: 2px solid #b3ada0; }
body[data-page="checkin"] .empty h4, body[data-page="walkin"] .empty h4,
body[data-page="ticket"] .empty h4 { font-size: 19px; }
body[data-page="checkin"] .empty p, body[data-page="walkin"] .empty p,
body[data-page="ticket"] .empty p { font-size: 15px; }

/* 叫号页：第一焦点「前面还有几辆」，其次「去哪里提 · 排第几」 */
body[data-page="ticket"] .ticket-stub { padding: 14px 18px 16px; align-items: stretch; }
body[data-page="ticket"] .tk-hero { display: flex; flex-direction: column; align-items: center; text-align: center; width: 100%; }
body[data-page="ticket"] .tk-hero .t-label { font-size: 17px; letter-spacing: .1em; opacity: .82; text-transform: none; color: rgba(255, 255, 255, .82); }
body[data-page="ticket"] .tk-hero b { font-family: var(--font-display); font-size: 96px; line-height: 1; margin-top: 2px; color: var(--accent); text-shadow: 0 2px 14px rgba(224, 101, 12, .38); }
body[data-page="ticket"] .tk-hero em { font-style: normal; font-size: 22px; opacity: .9; margin-top: 6px; letter-spacing: .06em; }
body[data-page="ticket"] .tk-hero .t-hint { font-size: 17px; margin-top: 8px; color: rgba(255, 255, 255, .88); }
/* 叫到号：把提示放大成醒目的进场徽标 */
body[data-page="ticket"] .tk-hero.is-called .t-hint {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 22px;
  border-radius: 999px;
  background: #17b26a;
  color: #fff;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1.25;
  box-shadow: 0 8px 24px -6px rgba(23, 178, 106, .8);
  animation: call-flash 1.1s ease-in-out infinite;
}
@keyframes call-flash {
  0%, 100% { transform: scale(1); box-shadow: 0 8px 24px -6px rgba(23, 178, 106, .8); }
  50% { transform: scale(1.06); box-shadow: 0 10px 32px -4px rgba(23, 178, 106, 1); }
}
@media (prefers-reduced-motion: reduce) {
  body[data-page="ticket"] .tk-hero.is-called .t-hint { animation: none; }
}
body[data-page="ticket"] .ticket-body { padding: 14px 18px 18px; }

.tk-split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; }
.tk-split > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 14px; }
.tk-split span { display: block; font-size: 14px; color: var(--ink-500); }
.tk-split em { font-style: normal; font-size: 15px; color: var(--ink-500); margin-left: 3px; }

/* 去哪提：门号仍是第二视觉重心的最大字 */
.tk-where b { display: block; font-family: var(--font-display); font-size: 54px; line-height: 1.1; color: var(--primary); margin-top: 2px; }
.tk-where .t-berth { display: block; font-style: normal; font-size: 16px; color: var(--ink-700); margin-top: 4px; }

/* 排第几 */
.tk-rank b { font-family: var(--font-display); font-size: 46px; line-height: 1.15; color: var(--ink-900); }

.tk-calling { padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); margin-top: 10px; }
.tk-calling span { display: block; font-size: 14px; color: var(--ink-500); letter-spacing: .04em; }
.tk-calling b { display: block; font-size: 38px; line-height: 1.15; margin-top: 2px; color: var(--ink-900); letter-spacing: .02em; word-break: break-all; }

.tk-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 17px; }
.tk-foot b { color: var(--ink-900); font-size: 21px; }
.tk-foot i { font-style: normal; margin-left: 6px; }

body[data-page="ticket"] .refresh-btn { width: 44px; height: 44px; }
body[data-page="ticket"] .refresh-btn svg { width: 20px; height: 20px; }

/* 进度轨放大 */
body[data-page="ticket"] .step-rail .step { font-size: 12.5px; }
body[data-page="ticket"] .step-rail .step .bub { width: 32px; height: 32px; font-size: 14px; margin-bottom: 7px; }
body[data-page="ticket"] .step-rail .step .bub svg { width: 17px; height: 17px; }
body[data-page="ticket"] .step-rail .step::before { top: 16px; }
/* 顶部三档进度轨（已取号 / 排队中 / 叫号进场） */
#railCard { padding: 14px 12px 10px; }
.step-rail-3 .step { font-size: 13px; }

/* 已叫号：前面剩 0 辆，用强调色让「请进场」一眼可见 */
#tkAhead.is-called { color: var(--accent); }

/* 顶部进度轨：进页面就能看到，不做延迟入场动画 */
#railCard.reveal { animation: none; opacity: 1; }
body[data-page="ticket"] #railCard .step-rail-3 .step { font-size: 14px; }
body[data-page="ticket"] #railCard .step-rail-3 .step .bub { width: 38px; height: 38px; font-size: 16px; margin-bottom: 9px; }
body[data-page="ticket"] #railCard .step-rail-3 .step::before { top: 19px; }

/* 本门队列放大 */
body[data-page="ticket"] .q-row { padding: 13px 14px; gap: 10px; }
body[data-page="ticket"] .q-row .q-no { font-size: 24px; min-width: 74px; }
body[data-page="ticket"] .q-row .q-plate { font-size: 20px; color: var(--ink-800); }
body[data-page="ticket"] .q-row .q-state { font-size: 15px; }

/* 签到：一张卡看全「门 + 时间 + 车牌」，签到按钮占满 */
.bk-card { display: flex; flex-direction: column; gap: 12px; }
.bk-gate { display: flex; align-items: center; gap: 12px; }
.bk-card .bk-no {
  width: 62px; height: 62px; border-radius: 14px; flex: none;
  background: var(--primary); color: #fff; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 28px; font-weight: 700;
}
.bk-card .bk-txt { min-width: 0; flex: 1; }
.bk-card .bk-txt b { display: block; font-size: 26px; line-height: 1.2; color: var(--ink-900); }
.bk-card .bk-txt span { display: block; font-size: 16px; color: var(--primary); margin-top: 2px; }
.bk-card .bk-rows { display: flex; flex-direction: column; gap: 7px; padding-top: 4px; border-top: 1px dashed var(--line-strong); }
.bk-card .bk-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.bk-card .bk-row > span { font-size: 16px; color: var(--ink-400); flex: none; }
.bk-card .bk-row > b { font-size: 19px; color: var(--ink-900); text-align: right; }
.bk-card .bk-rows .mono { font-family: var(--font-mono); }
.bk-card > .btn { width: 100%; }

/* 不可签到：说明原因，不给可点的按钮 */
.bk-card .bk-blocked {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 12px 14px; border-radius: var(--r-md);
  background: var(--warning-soft); color: #7d4f00;
  font-size: 16px; line-height: 1.5;
}
.bk-card .bk-blocked svg { flex: none; margin-top: 2px; }

/* 现场取号：门号点选样式统一在基础段（.gate-opt）已放大 */

/* 定位状态条：一行看懂「能不能签到」 */
.geo-line {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface-2);
  font-size: 16px; color: var(--ink-700);
}
.geo-line .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--warning); flex: none; }
.geo-line.is-in { background: var(--success-soft); border-color: #c2e0d3; color: #1e5b42; }
.geo-line.is-in .dot { background: var(--success); animation: pulse-dot 2.2s infinite; }
.geo-line.is-fail { background: var(--danger-soft); border-color: #f0c4bb; color: #7f2a1e; }
.geo-line.is-fail .dot { background: var(--danger); }
.geo-line .geo-txt { flex: 1; min-width: 0; }
.geo-line b { font-size: 18px; }
.geo-line .geo-sub { font-size: 14px; opacity: .78; margin-top: 1px; }
.geo-line .btn { flex: none; }

/* 折叠起来的说明（不占首屏） */
.fold { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.fold > summary {
  list-style: none; cursor: pointer; padding: 14px 16px;
  font-size: 17px; font-weight: 700; color: var(--ink-700);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: "▾"; font-size: 16px; color: var(--ink-400); }
.fold[open] > summary::after { content: "▴"; }
.fold .fold-body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 12px; }
/* 厂区示意图（后台可上传，含门号位置） */
.plant-map { display: block; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: var(--surface-2); }
.plant-map img { display: block; width: 100%; height: auto; }
/* 后台：厂区示意图预览 */
.plant-map-admin img { display: block; max-width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm); }
body[data-page="checkin"] .notice-item,
body[data-page="walkin"] .notice-item { font-size: 15px; }
body[data-page="checkin"] .notice-item i,
body[data-page="walkin"] .notice-item i { width: 22px; height: 22px; font-size: 13px; }
body[data-page="checkin"] .company-row,
body[data-page="walkin"] .company-row,
body[data-page="checkin"] .rule-item p,
body[data-page="walkin"] .rule-item p { font-size: 15px; line-height: 1.6; }
body[data-page="checkin"] .rule-item b,
body[data-page="walkin"] .rule-item b { font-size: 17px; }
body[data-page="checkin"] .rule-item .ri,
body[data-page="walkin"] .rule-item .ri { width: 32px; height: 32px; border-radius: 9px; }
body[data-page="checkin"] .rule-item .ri svg,
body[data-page="walkin"] .rule-item .ri svg { width: 17px; height: 17px; }

/* 签到页：去现场取号入口 */
.wk-entry { justify-content: center; }
.wk-entry svg:last-child { margin-left: 2px; opacity: .7; }

/* 现场取号页：两步走完 */
body[data-page="walkin"] .m-brand { align-items: center; gap: 7px; }
.wk-step {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%; margin-right: 8px;
  background: var(--primary); color: #fff;
  font-family: var(--font-display); font-size: 16px; vertical-align: middle;
}
body[data-page="walkin"] .gate-opt { padding: 16px 14px; }

/* 取号成功：只剩号码 + 门位 + 前面几辆 */
.wk-done .wk-no {
  font-family: var(--font-display); font-size: 78px; line-height: 1.05;
  text-align: center; color: var(--accent); letter-spacing: .04em;
}
.wk-done .wk-gate { text-align: center; }
.wk-done .wk-gate b { display: block; font-size: 24px; color: var(--ink-900); }
.wk-done .wk-gate span { display: block; font-size: 18px; color: var(--ink-500); margin-top: 6px; }

/* 取号结果里的排队位置：前面几辆放大成第二视觉焦点 */
.wk-pos {
  background: var(--surface-2); border-radius: 14px;
  padding: 14px 12px; text-align: center;
}
.wk-pos-main { display: flex; align-items: baseline; justify-content: center; gap: 6px; }
.wk-pos-main span { font-size: 15px; color: var(--ink-500); }
.wk-pos-main b {
  font-family: var(--font-display); font-size: 52px; line-height: 1;
  color: var(--accent);
}
.wk-pos-main em { font-size: 16px; font-style: normal; color: var(--ink-500); }
.wk-pos-sub { margin-top: 6px; font-size: 14px; color: var(--ink-500); }

/* 窄屏时收一点，保证不换行 */
@media (max-width: 400px) {
  body[data-page="ticket"] .tk-hero b { font-size: 82px; }
  .tk-where b { font-size: 46px; }
  .tk-rank b { font-size: 40px; }
  .tk-calling b { font-size: 32px; }
}
