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

/* ---------- 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; }
.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; }
.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; }
.m-brand-txt strong { font-family: var(--font-display); font-size: 15px; letter-spacing: .02em; color: var(--ink-900); }
.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(3, 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, 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: 12px; padding: 12px 13px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  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: 42px; height: 42px; border-radius: 10px; flex: none;
  background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; font-family: var(--font-display); font-size: 17px; font-weight: 700;
}
.gate-opt .gate-info { flex: 1; min-width: 0; }
.gate-opt .gate-info b { display: block; font-size: 13.5px; color: var(--ink-900); }
.gate-opt .gate-info span { font-size: 11px; color: var(--ink-400); display: block; margin-top: 1px; }
.gate-opt .gate-side { text-align: right; flex: none; }
.gate-opt .gate-side b { font-family: var(--font-mono); font-size: 13px; color: var(--ink-700); display: block; }
.gate-opt .gate-side span { font-size: 10px; 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-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; }

/* 号票页：刷新按钮 + 本门队列 */
.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; }
.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; }
.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-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); }
.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; }
.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; }

/* ============================================================
   大屏（叫号屏）
   ============================================================ */
.scr {
  min-height: 100vh; background: #0c1215; color: #e8eff0;
  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(120, 180, 190, .05) 1px, transparent 1px), linear-gradient(to bottom, rgba(120, 180, 190, .05) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
}
.scr-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 32px; border-bottom: 1px solid rgba(255, 255, 255, .08); position: relative; z-index: 1; }
.scr-brand { display: flex; align-items: center; gap: 12px; }
.scr-brand .sb-logo { width: 38px; height: 38px; border-radius: 10px; background: var(--accent); color: #fff; display: grid; place-items: center; }
.scr-brand .sb-logo svg { width: 21px; height: 21px; }
.scr-brand strong { font-family: var(--font-display); font-size: 20px; letter-spacing: .06em; }
.scr-brand span { display: block; font-size: 11px; color: rgba(232, 239, 240, .45); letter-spacing: .16em; }
.scr-meta { display: flex; align-items: center; gap: 24px; }
.scr-meta .clock-lg { font-family: var(--font-mono); font-size: 26px; letter-spacing: .06em; color: #fff; }
.scr-meta .date-sm { font-size: 11px; color: rgba(232, 239, 240, .45); text-align: right; letter-spacing: .08em; }
.scr-live { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; letter-spacing: .12em; color: #7fd2a8; border: 1px solid rgba(127, 210, 168, .3); background: rgba(127, 210, 168, .08); padding: 5px 10px; border-radius: 999px; }
.scr-live i { width: 6px; height: 6px; border-radius: 50%; background: #7fd2a8; animation: pulse-dot 2s infinite; }
.scr-main { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 20px 32px; position: relative; z-index: 1; }
.scr-gate {
  background: linear-gradient(160deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .015));
  border: 1px solid rgba(255, 255, 255, .09); border-radius: 18px; padding: 20px;
  display: flex; flex-direction: column; gap: 16px; position: relative; overflow: hidden;
}
.scr-gate::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--accent); opacity: .85; }
.scr-gate.is-paused::after { background: #6b7a80; }
.scr-gate-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.scr-gate-head b { font-family: var(--font-display); font-size: 26px; letter-spacing: .04em; }
.scr-gate-head span { display: block; font-size: 11px; color: rgba(232, 239, 240, .42); letter-spacing: .08em; }
.scr-gate-head .scr-state { font-size: 10px; letter-spacing: .1em; padding: 4px 8px; border-radius: 4px; border: 1px solid rgba(127, 210, 168, .35); color: #7fd2a8; background: rgba(127, 210, 168, .07); }
.scr-gate.is-paused .scr-state { border-color: rgba(232, 239, 240, .2); color: rgba(232, 239, 240, .5); background: transparent; }
.scr-call { text-align: center; padding: 6px 0 10px; }
.scr-call .sc-label { font-size: 10px; letter-spacing: .3em; color: rgba(232, 239, 240, .38); }
.scr-call .sc-no { font-family: var(--font-display); font-size: clamp(58px, 6.2vw, 96px); line-height: .98; letter-spacing: .03em; color: #fff; margin: 6px 0 4px; text-shadow: 0 0 34px rgba(224, 101, 12, .35); }
.scr-call .sc-no.is-idle { color: rgba(232, 239, 240, .22); }
.scr-call .sc-berth { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #f0b45c; border: 1px solid rgba(240, 180, 92, .3); background: rgba(240, 180, 92, .08); padding: 4px 10px; border-radius: 5px; letter-spacing: .06em; }
.scr-queue { flex: 1; border-top: 1px dashed rgba(255, 255, 255, .1); padding-top: 12px; display: flex; flex-direction: column; gap: 7px; min-height: 0; }
.scr-queue .sq-head { display: flex; justify-content: space-between; font-size: 10px; letter-spacing: .14em; color: rgba(232, 239, 240, .35); margin-bottom: 2px; }
.scr-qrow { display: flex; align-items: center; gap: 9px; font-size: 12.5px; padding: 6px 8px; border-radius: 6px; background: rgba(255, 255, 255, .035); }
.scr-qrow .sq-no { font-family: var(--font-mono); font-size: 13px; color: #fff; width: 52px; }
.scr-qrow .sq-plate { font-family: var(--font-mono); font-size: 11px; color: rgba(232, 239, 240, .55); }
.scr-qrow .sq-type { margin-left: auto; font-size: 9px; letter-spacing: .08em; padding: 1px 5px; border-radius: 3px; border: 1px solid rgba(255, 255, 255, .14); color: rgba(232, 239, 240, .5); }
.scr-qrow .sq-type.is-walkin { border-color: rgba(240, 180, 92, .35); color: #f0b45c; }
.scr-qrow.next { background: rgba(224, 101, 12, .14); border: 1px solid rgba(224, 101, 12, .32); }
.scr-gate-foot { display: flex; justify-content: space-between; font-size: 10.5px; color: rgba(232, 239, 240, .42); border-top: 1px solid rgba(255, 255, 255, .07); padding-top: 10px; letter-spacing: .04em; }
.scr-foot { display: flex; align-items: center; gap: 18px; padding: 12px 32px; border-top: 1px solid rgba(255, 255, 255, .08); background: rgba(0, 0, 0, .25); position: relative; z-index: 1; }
.scr-ticker { flex: 1; overflow: hidden; font-size: 12px; color: rgba(232, 239, 240, .62); display: flex; align-items: center; gap: 10px; }
.scr-ticker .tk-label { font-size: 9px; letter-spacing: .16em; color: var(--accent); border: 1px solid rgba(224, 101, 12, .4); padding: 2px 6px; border-radius: 3px; 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: 7px; font-size: 11.5px; padding: 7px 12px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .05); color: rgba(232, 239, 240, .8); cursor: pointer; transition: all .15s var(--ease); }
.scr-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.scr-btn svg { width: 14px; height: 14px; }
.scr-btn.is-on { border-color: rgba(224, 101, 12, .5); color: #f0b45c; background: rgba(224, 101, 12, .1); }

.scr-body { background: #0c1215; }
.scr-body::before { display: none; }
.scr-call .sc-no.pop { animation: call-pop .6s var(--ease); }
@keyframes call-pop {
  0% { transform: scale(.86); color: #f0b45c; text-shadow: 0 0 60px rgba(224, 101, 12, .9); }
  100% { transform: scale(1); color: #fff; }
}
.scr-queue .sq-empty { font-size: 12px; color: rgba(232, 239, 240, .28); padding: 10px 0; letter-spacing: .04em; }
.scr-gate-foot b { color: #fff; font-family: var(--font-mono); font-weight: 600; }
.scr-stat { display: flex; gap: 22px; font-size: 11.5px; color: rgba(232, 239, 240, .45); letter-spacing: .06em; flex: none; }
.scr-stat b { color: #fff; font-family: var(--font-mono); font-weight: 600; margin-left: 4px; }
@media (max-width: 900px) {
  .scr-stat { display: none; }
  .scr-main { padding: 14px; }
}

/* ============================================================
   入口页 / 角色选择
   ============================================================ */
.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);
}
.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%; }

/* ---------- 客户端实时门况（各门装车 / 排队） ---------- */
.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; }
  .scr-main { gap: 12px; padding: 16px 20px; }
  .scr-call .sc-no { font-size: clamp(48px, 7vw, 76px); }
}
@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; }
  .scr-main { grid-template-columns: 1fr; }
  .scr { min-height: auto; }
  .scr-top { flex-wrap: wrap; }
}
@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) {
  .m-app { margin-top: 18px; margin-bottom: 18px; border-radius: 22px; overflow: hidden; min-height: calc(100dvh - 36px); }
  .m-tabs { bottom: 18px; border-radius: 0 0 22px 22px; }
  .sticky-cta { bottom: calc(82px + env(safe-area-inset-bottom)); }
}
