/* ============================================================
   倏小跑 · 后台管理系统 (Campus Hero Admin Console)
   标准企业级后台样式规范 (Clean & Professional Admin UI)
   ============================================================ */

:root {
  --primary: #ff5722;
  --primary-hover: #f4511e;
  --primary-light: #fff3ee;
  
  --bg-page: #f4f6f9;
  --bg-card: #ffffff;
  --bg-subtle: #f9fafb;
  
  --text-main: #111827;
  --text-regular: #374151;
  --text-secondary: #6b7280;
  --text-placeholder: #9ca3af;
  
  --border-color: #e5e7eb;
  --border-light: #f3f4f6;
  
  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 8px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.06);
}

/* 全局重置与排版 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  background-color: var(--bg-page);
  color: var(--text-regular);
  font-size: 13.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

a {
  color: var(--primary);
  text-decoration: none;
  cursor: pointer;
}
a:hover {
  text-decoration: underline;
  color: var(--primary-hover);
}

/* ============================================================
   登录页 (标准简洁)
   ============================================================ */
#login-mask {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 16px;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  text-align: left;
}

.login-brand {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}

.login-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.login-sub {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 22px;
}

.login-tip {
  margin-top: 18px;
  color: var(--text-placeholder);
  font-size: 12px;
  text-align: center;
}

/* ============================================================
   顶栏导航 (规范商务)
   ============================================================ */
#topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 20px;
  background: #1e293b;
  color: #ffffff;
  padding: 0 20px;
  height: 54px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.brand {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.brand-sub {
  font-weight: 400;
  font-size: 12px;
  opacity: 0.75;
  margin-left: 6px;
  background: rgba(255, 255, 255, 0.12);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

#nav {
  display: flex;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
}

#nav a {
  padding: 6px 14px;
  border-radius: var(--radius);
  color: #cbd5e1;
  font-size: 13.5px;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

#nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  text-decoration: none;
}

#nav a.on {
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.45);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  vertical-align: middle;
}

.dot-green {
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
}

.dot-red {
  background: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3);
}

#server-status {
  font-size: 12.5px;
  color: #e2e8f0;
}

/* ============================================================
   主布局与面板 (Panel & Grid)
   ============================================================ */
main {
  padding: 16px 20px 40px;
  max-width: 1440px;
  margin: 0 auto;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.panel {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  overflow: hidden;
}

.panel-title {
  padding: 12px 16px;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  flex-wrap: wrap;
  gap: 6px;
}

.panel-title .hint {
  font-weight: 400;
  color: var(--text-secondary);
  font-size: 12px;
}

.panel-body {
  padding: 16px;
}

/* ============================================================
   指标概览卡片 (Stat Cards)
   ============================================================ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.stat {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  border-top: 3px solid #9ca3af;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat .lbl {
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
}

.stat .num {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 6px;
  line-height: 1.2;
}

.stat.orange { border-top-color: var(--primary); }
.stat.blue { border-top-color: #3b82f6; }
.stat.green { border-top-color: #10b981; }
.stat.purple { border-top-color: #8b5cf6; }
.stat.gray { border-top-color: #9ca3af; }

/* ============================================================
   表格与单元格 (Standard Table)
   ============================================================ */
.tbl-wrap {
  width: 100%;
  overflow-x: auto;
}

.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.tbl th {
  padding: 10px 12px;
  background: var(--bg-subtle);
  color: var(--text-regular);
  font-weight: 600;
  font-size: 12.5px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.tbl td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-regular);
  vertical-align: middle;
}

.tbl tr:hover td {
  background-color: #f9fafb;
}

.cell-main {
  font-weight: 600;
  color: var(--text-main);
}

.cell-sub {
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 2px;
  line-height: 1.4;
}

.ellipsis {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   状态徽章 (Badges)
   ============================================================ */
.badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

.b-waiting { background: #fef3c7; color: #92400e; }
.b-accepted { background: #dbeafe; color: #1e40af; }
.b-in_transit { background: #e0e7ff; color: #3730a3; }
.b-delivered { background: #ccfbf1; color: #115e59; }
.b-completed { background: #dcfce7; color: #166534; }
.b-cancelled { background: #f3f4f6; color: #4b5563; }
.b-in_dispute, .b-arbitration { background: #fee2e2; color: #991b1b; }
.b-purple { background: #f3e8ff; color: #6b21a8; }

.b-rs0 { background: #f3f4f6; color: #4b5563; }
.b-rs1 { background: #fef3c7; color: #92400e; }
.b-rs2 { background: #dcfce7; color: #166534; }
.b-rs3 { background: #fee2e2; color: #991b1b; }
.b-rs4 { background: #f3e8ff; color: #6b21a8; }

/* ============================================================
   按钮系统 (Buttons)
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 6px 13px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}
.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-ghost {
  background: #ffffff;
  border-color: var(--border-color);
  color: var(--text-regular);
}
.btn-ghost:hover {
  background: var(--bg-subtle);
  border-color: #cbd5e1;
}

#topbar .btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}
#topbar .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
}

.btn-ok {
  background: #10b981;
  color: #ffffff;
}
.btn-ok:hover {
  background: #059669;
}

.btn-off {
  background: #ef4444;
  color: #ffffff;
}
.btn-off:hover {
  background: #dc2626;
}

.btn-sm {
  padding: 3px 8px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
  margin-top: 14px;
  padding: 10px;
  font-size: 14px;
}

.btn-row {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

/* ============================================================
   表单输入与控件 (Inputs, Filters, Switches)
   ============================================================ */
.ipt {
  border: 1px solid #d1d5db;
  border-radius: var(--radius);
  padding: 7px 11px;
  font-size: 13.5px;
  font-family: inherit;
  width: 100%;
  color: var(--text-main);
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ipt:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(255, 87, 34, 0.15);
}

.ipt-lg {
  font-size: 14.5px;
  padding: 10px 13px;
}

textarea.ipt {
  min-height: 84px;
  resize: vertical;
}

/* 过滤胶囊 */
.filter-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.chip {
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--text-regular);
  cursor: pointer;
  font-size: 12.5px;
  border: 1px solid var(--border-color);
  transition: all 0.15s ease;
}

.chip:hover {
  background: #e5e7eb;
}

.chip.on {
  background: #1e293b;
  color: #ffffff;
  border-color: #1e293b;
  font-weight: 500;
}

/* 表单行 */
.form-row {
  display: grid;
  grid-template-columns: 190px 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.form-row > label {
  color: var(--text-main);
  font-weight: 500;
}

.form-row .hint {
  grid-column: 2;
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 3px;
}

.radio-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.radio-pill {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: var(--text-regular);
  cursor: pointer;
  font-size: 12.5px;
  user-select: none;
}

.radio-pill:hover {
  border-color: #9ca3af;
}

.radio-pill.on {
  background: #1e293b;
  color: #ffffff;
  border-color: #1e293b;
}

/* 现代化标准开关 */
.switch {
  position: relative;
  width: 44px;
  height: 24px;
  display: inline-block;
}

.switch input {
  display: none;
}

.switch span {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  transition: 0.2s ease;
  cursor: pointer;
}

.switch span::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  background: #ffffff;
  border-radius: 50%;
  transition: 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.switch input:checked + span {
  background: #10b981;
}

.switch input:checked + span::after {
  transform: translateX(20px);
}

/* ============================================================
   申诉与通用卡片 (Dispute Cards)
   ============================================================ */
.d-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 10px;
  background: #ffffff;
}

.d-card:hover {
  border-color: #cbd5e1;
}

.d-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.d-head b {
  font-size: 13.5px;
  color: var(--text-main);
}

.d-meta {
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 5px;
  line-height: 1.4;
}

.d-desc {
  margin: 8px 0;
  color: var(--text-regular);
  font-size: 13px;
  background: var(--bg-subtle);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
}

/* ============================================================
   地图监控 (Campus Map)
   ============================================================ */
.map-wrap {
  position: relative;
  height: 560px;
  background: #eef2f7;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  overflow: hidden;
  margin: 12px 16px 16px;
}

#campus-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.map-legend {
  position: absolute;
  left: 12px;
  bottom: 12px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 6px 12px;
  display: flex;
  gap: 12px;
  font-size: 12px;
  box-shadow: var(--shadow-sm);
}

/* 地图缩放按钮（静态底图 canvas 用） */
.map-zoom {
  position: absolute;
  right: 12px;
  top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 6;
}
.mz-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  color: #334155;
  box-shadow: var(--shadow-sm);
}
.mz-btn:hover { background: #fff; color: var(--primary); }
.mz-btn:active { transform: scale(0.96); }

.lg {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-regular);
}

.lg::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.lg-orange::before { background: var(--primary); }
.lg-blue::before { background: #2563eb; }
.lg-green::before { background: #10b981; }
.lg-gray::before { background: #9ca3af; }

.map-order-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.mo-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: #ffffff;
  cursor: pointer;
}

.mo-card:hover {
  border-color: var(--primary);
}

/* ============================================================
   通用弹窗 (Modal)
   ============================================================ */
#modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 16px;
}

.modal {
  width: min(560px, 94vw);
  max-height: 84vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.15);
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.modal-body {
  color: var(--text-regular);
  font-size: 13.5px;
  line-height: 1.6;
}

.modal-body .kv {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 6px;
  margin-bottom: 8px;
}

.modal-body .kv b {
  color: var(--text-secondary);
  font-weight: 500;
}

.modal-foot {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.list-empty {
  color: var(--text-placeholder);
  text-align: center;
  padding: 28px 0;
  font-size: 13px;
}

/* 响应式适配 */
@media (max-width: 900px) {
  #topbar {
    padding: 0 12px;
    gap: 10px;
  }
  .brand-sub {
    display: none;
  }
  #nav a {
    padding: 5px 8px;
    font-size: 12px;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .form-row .hint {
    grid-column: 1;
  }
}

/* 品牌 logo（替换原 🏠 占位） */
.brand-logo { width: 1.6em; height: 1.6em; border-radius: 50%; border: 2px solid #15151a; vertical-align: middle; margin-right: 6px; object-fit: cover; }

/* ============================================================
   一站式扩展：真机预览 / 双栏工作区 / 功能开关矩阵 / 预设卡片
   ============================================================ */
.work-2 { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.work-2 > .sticky { position: sticky; top: 72px; }
@media (max-width: 1180px) { .work-2 { grid-template-columns: 1fr; } .work-2 > .sticky { position: static; } }

/* —— 手机外框（按小程序 750rpx 设计稿 1:2 缩放，宽 375 = 真机逻辑宽度） —— */
.phone { width: 340px; margin: 0 auto; border-radius: 44px; padding: 12px; background: #111827; box-shadow: 0 18px 40px -12px rgba(15, 23, 42, .45), inset 0 0 0 2px #374151; }
.phone-screen { position: relative; height: 640px; border-radius: 34px; overflow: hidden; background: #f9f9f9; display: flex; flex-direction: column; }
.phone-status { height: 30px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; font-size: 11px; font-weight: 700; color: #111; }
.phone-nav { height: 40px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; position: relative; font-size: 14px; font-weight: 700; color: #111; background: #f9f9f9; }
.phone-capsule { position: absolute; right: 10px; top: 8px; width: 74px; height: 26px; border-radius: 13px; border: 1px solid #e5e7eb; background: rgba(255, 255, 255, .7); }
.phone-body { flex: 1; overflow-y: auto; padding: 10px 12px 14px; scrollbar-width: none; }
.phone-body::-webkit-scrollbar { display: none; }
.phone-tabbar { height: 50px; flex-shrink: 0; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid #e5e7eb; background: #f9f9f9; font-size: 10px; color: #5b4137; text-align: center; padding-top: 6px; }
.phone-tabbar .on { color: #ff5c00; font-weight: 700; }
.phone-tabbar i { display: block; width: 18px; height: 18px; margin: 0 auto 2px; border-radius: 5px; background: currentColor; opacity: .22; }
.phone-tabbar .on i { opacity: .9; }
.phone-cap { text-align: center; color: var(--text-secondary); font-size: 12px; margin-top: 10px; }

/* —— 预览内容：与小程序首页同款孟菲斯风（黑描边 + 硬阴影） —— */
.pv-campus { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 800; color: #1b1b1b; margin-bottom: 8px; }
.pv-notice { display: flex; gap: 6px; align-items: flex-start; padding: 8px 10px; margin-bottom: 10px; border: 1.5px solid #1b1b1b; border-radius: 9px; background: #dde1ff; box-shadow: 2px 2px 0 #1b1b1b; font-size: 12px; font-weight: 700; color: #1b1b1b; line-height: 1.45; }
.pv-notice.warn { background: #ffe8a3; } .pv-notice.success { background: #c9f2d8; }
.pv-ad { position: relative; overflow: hidden; border: 1.5px solid #1b1b1b; border-radius: 12px; padding: 12px 12px 10px; margin-bottom: 12px; box-shadow: 3px 3px 0 #1b1b1b; min-height: 112px; }
.pv-ad-tag { display: inline-block; font-size: 10px; font-weight: 800; padding: 2px 7px; border: 1.5px solid #1b1b1b; border-radius: 999px; background: #fff; }
.pv-ad-page { position: absolute; right: 10px; top: 10px; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: rgba(0, 0, 0, .75); color: #fff; }
.pv-ad-title { font-size: 17px; font-weight: 900; color: #1b1b1b; margin-top: 8px; }
.pv-ad-sub { font-size: 11.5px; color: #1b1b1b; opacity: .72; margin-top: 3px; }
.pv-ad-row { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.pv-ad-cta { font-size: 11px; font-weight: 800; color: #fff; padding: 5px 11px; border-radius: 999px; border: 1.5px solid #1b1b1b; }
.pv-ad-dots { display: flex; gap: 4px; } .pv-ad-dots b { width: 6px; height: 6px; border-radius: 3px; background: rgba(0, 0, 0, .25); cursor: pointer; } .pv-ad-dots b.on { width: 16px; background: #1b1b1b; }
.pv-sec { display: flex; align-items: center; gap: 6px; margin: 4px 0 8px; } .pv-sec span { font-size: 11px; font-weight: 800; color: #fff; background: #1b1b1b; padding: 2px 8px; border-radius: 6px; } .pv-sec em { font-style: normal; font-size: 11px; color: #6b7280; }
.pv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.pv-card { border: 1.5px solid #1b1b1b; border-radius: 10px; padding: 9px; box-shadow: 2px 2px 0 #1b1b1b; background: #ffdbce; }
.pv-card.alt { background: #efdbff; } .pv-card.wide { grid-column: span 2; background: #dde1ff; } .pv-card.dark { background: #2e5bff; color: #fff; }
.pv-card b { display: block; font-size: 13px; } .pv-card small { font-size: 10.5px; opacity: .72; }
.pv-off { position: relative; opacity: .38; filter: grayscale(1); }
.pv-off::after { content: '本校区关闭'; position: absolute; right: 6px; top: 6px; font-size: 9.5px; font-weight: 800; color: #fff; background: #dc2626; padding: 1px 5px; border-radius: 4px; }
.pv-empty { text-align: center; color: #9ca3af; font-size: 12px; padding: 18px 0; border: 1.5px dashed #d1d5db; border-radius: 10px; margin-bottom: 10px; }
.pv-mode { display: inline-flex; border: 1px solid var(--border-color); border-radius: 999px; padding: 2px; background: #fff; }
.pv-mode button { border: 0; background: transparent; padding: 4px 12px; border-radius: 999px; font-size: 12px; cursor: pointer; color: var(--text-secondary); }
.pv-mode button.on { background: var(--text-main); color: #fff; }
.pv-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }

/* 骑手教程预览（底部弹层） */
.pv-guide-mask { position: absolute; inset: 0; background: rgba(15, 23, 42, .62); display: flex; align-items: flex-end; }
.pv-guide { width: 100%; background: #fff; border-radius: 18px 18px 0 0; padding: 14px 18px 18px; }
.pv-guide-top { display: flex; justify-content: space-between; font-size: 11px; color: #64748b; font-weight: 700; }
.pv-guide-ico { width: 72px; height: 72px; margin: 14px auto 0; border-radius: 20px; background: #eef2ff; display: flex; align-items: center; justify-content: center; font-size: 30px; position: relative; }
.pv-guide-ico em { position: absolute; right: -5px; top: -5px; width: 22px; height: 22px; line-height: 22px; border-radius: 11px; background: #18233c; color: #fff; font-style: normal; font-size: 11px; font-weight: 800; text-align: center; }
.pv-guide h4 { text-align: center; font-size: 17px; color: #18233c; margin-top: 14px; }
.pv-guide p { text-align: center; font-size: 12.5px; color: #334155; line-height: 1.7; margin-top: 8px; min-height: 64px; }
.pv-guide .tip { background: #fef9c3; color: #854d0e; font-size: 11px; border-radius: 9px; padding: 7px 10px; margin-top: 8px; }
.pv-guide .dots { display: flex; justify-content: center; gap: 5px; margin: 12px 0; } .pv-guide .dots b { width: 6px; height: 6px; border-radius: 3px; background: #cbd5e1; } .pv-guide .dots b.on { width: 18px; background: #18233c; }
.pv-guide .btns { display: flex; gap: 8px; } .pv-guide .btns div { flex: 1; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; cursor: pointer; }
.pv-guide .g { border: 1px solid #cbd5e1; color: #18233c; } .pv-guide .m { flex: 1.6 !important; background: #18233c; color: #fff; }

/* —— 功能开关矩阵 —— */
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.feat-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border: 1px solid var(--border-color); border-radius: var(--radius-lg); background: #fff; cursor: pointer; user-select: none; transition: border-color .15s, background .15s; }
.feat-item:hover { border-color: #cbd5e1; }
.feat-item.on { border-color: #86efac; background: #f0fdf4; }
.feat-item span { font-size: 13px; color: var(--text-main); font-weight: 600; }
.feat-item i { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: #f3f4f6; color: #9ca3af; }
.feat-item.on i { background: #22c55e; color: #fff; }

/* —— 预设卡片 —— */
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.preset { border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 12px 14px; background: #fff; display: flex; flex-direction: column; gap: 6px; transition: box-shadow .15s, border-color .15s; }
.preset:hover { border-color: var(--primary); box-shadow: 0 4px 14px -6px rgba(255, 87, 34, .35); }
.preset.cur { border-color: var(--primary); background: var(--primary-light); }
.preset b { font-size: 14px; color: var(--text-main); }
.preset p { font-size: 12px; color: var(--text-secondary); line-height: 1.55; flex: 1; }
.preset .kv { font-size: 11.5px; color: var(--text-regular); background: var(--bg-subtle); border-radius: var(--radius); padding: 5px 8px; font-family: ui-monospace, Consolas, monospace; word-break: break-all; }
.preset .btn { align-self: flex-start; }

/* —— 体检条目 / 小型 KPI —— */
.check-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: var(--radius-lg); border: 1px solid var(--border-color); background: #fff; }
.check .ic { width: 22px; height: 22px; border-radius: 11px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 900; color: #fff; background: #22c55e; }
.check.bad .ic { background: #ef4444; } .check.warn .ic { background: #f59e0b; }
.check b { font-size: 13px; color: var(--text-main); display: block; } .check small { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { background: #fff; border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 12px 14px; }
.kpi small { color: var(--text-secondary); font-size: 12px; } .kpi b { display: block; font-size: 20px; color: var(--text-main); margin-top: 2px; }
.seg-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.seg-tabs a { padding: 7px 16px; border-radius: 999px; border: 1.5px solid var(--border-color); background: #fff; color: var(--text-regular); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.seg-tabs a.on { background: var(--text-main); border-color: var(--text-main); color: #fff; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18); }
.toast { position: fixed; left: 50%; top: 72px; transform: translateX(-50%); z-index: 3000; background: #111827; color: #fff; padding: 9px 16px; border-radius: 999px; font-size: 13px; box-shadow: var(--shadow); opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; } .toast.err { background: #dc2626; }
#nav { flex-wrap: wrap; }

/* —— 分组导航：顶栏 6 组 + 二级标签条（16 个页面一行放不下） —— */
#topbar { height: 64px; }
#nav { flex-wrap: nowrap !important; align-items: center; min-width: 0; scrollbar-width: none; }
#nav::-webkit-scrollbar { display: none; }
#nav a.nav-group { padding: 10px 20px; font-size: 15.5px; font-weight: 600; border-radius: 10px; }
.topbar-right { flex-shrink: 0; }
#server-status { white-space: nowrap; }
#subnav { position: sticky; top: 64px; z-index: 40; background: #fff; border-bottom: 1px solid var(--border-color); padding: 0 24px; box-shadow: var(--shadow-sm); }
.subnav-row { display: none; gap: 2px; height: 52px; align-items: stretch; }
.subnav-row.on { display: flex; }
.subnav-row a { display: flex; align-items: center; padding: 0 18px; font-size: 15px; font-weight: 500; color: var(--text-secondary); border-bottom: 3px solid transparent; text-decoration: none; }
.subnav-row a:hover { color: var(--text-main); text-decoration: none; }
.subnav-row a.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; background: rgba(2, 132, 199, 0.06); }
.work-2 > .sticky { top: 126px; }
.form-row > label { align-self: flex-start; padding-top: 7px; }
.preset .kv { font-family: inherit; }
.phone-capsule::before { content: '•••'; position: absolute; left: 10px; top: 4px; font-size: 11px; letter-spacing: 1px; color: #111; }
.phone-capsule::after { content: ''; position: absolute; right: 10px; top: 7px; width: 10px; height: 10px; border: 1.5px solid #111; border-radius: 50%; }
.phone-capsule { border-color: #d1d5db; }
.phone-capsule > i { display: none; }
.phone-body { padding-bottom: 22px; }
.pv-off::after { top: auto; bottom: 6px; }

/* —— 顶栏右侧不重叠（nav 可收缩 + 右侧固定 + 状态省略号） —— */
#topbar { gap: 14px; }
#nav { flex: 1 1 auto; min-width: 0; }
.topbar-right { flex: 0 0 auto; margin-left: auto; }
#server-status { white-space: nowrap; flex: 0 0 auto; }
.topbar-right #school-filter { flex: 0 0 auto; }
/* 手机预览的空态更饱满 */
.pv-empty { padding: 24px 12px; }

/* —— 顶栏稳定版：三栏栅格，中间导航可滚动，右侧永不被挤压（彻底解决「服务正常/刷新」重叠） —— */
#topbar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 0 18px; }
#topbar .brand { flex-shrink: 0; }
#nav { min-width: 0; overflow-x: auto; justify-content: flex-start; }
.topbar-right { justify-self: end; min-width: 0; gap: 10px; }
#server-status { max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
#topbar #btn-refresh { flex: 0 0 auto; }
.tbl .cell-sub { white-space: normal; }
@media (max-width: 1320px) { #nav a.nav-group { padding: 9px 16px; font-size: 15px; } #server-status { max-width: 96px; } }

/* —— 广告图片样式（手机外框预览内）+ 弹窗定位 —— */
.pv-ad-imgs { padding: 0 !important; }
.pv-ad-img { width: 100%; display: block; }
.pv-ad-cta-abs { position: absolute; right: 8px; bottom: 20px; }
.pv-ad-page-abs { top: 8px; right: 8px; }
.pv-ad-dotbar { display: flex; justify-content: center; margin: -6px 0 10px; }

/* ---------- 地图 v2：图层面板 / 点选小卡片 ---------- */
.map-layers {
  position: absolute; left: 12px; top: 12px; z-index: 6;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border-color); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 8px 10px; min-width: 168px;
}
.ml-title { font-size: 12px; font-weight: 600; color: #334155; margin-bottom: 5px; }
.ml-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--text-regular);
  padding: 3px 0; cursor: pointer; user-select: none; white-space: nowrap;
}
.ml-row input { accent-color: var(--primary); margin: 0; }
.ml-ico { font-size: 13px; }
.ml-tip {
  margin-top: 6px; padding-top: 6px;
  border-top: 1px dashed var(--border-color);
  font-size: 11px; color: #94a3b8; line-height: 1.6; max-width: 172px;
}
.spot-pop {
  position: absolute; z-index: 9; width: 292px; box-sizing: border-box;
  background: #fff; border: 1px solid var(--border-color); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18); padding: 12px;
}
.sp-title { font-size: 14px; font-weight: 700; color: #0f172a; margin-bottom: 8px; display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.sp-off { font-size: 11px; font-weight: 500; color: #b45309; background: #fef3c7; border-radius: 6px; padding: 1px 6px; flex-shrink: 0; }
.sp-row { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.sp-row label { width: 34px; font-size: 12px; color: #64748b; flex-shrink: 0; }
.sp-row .ipt { height: 30px; font-size: 13px; padding: 0 8px; flex: 1; }
.sp-coord { font-size: 12.5px; color: #334155; font-weight: 600; }
.sp-tip { font-size: 11.5px; color: #94a3b8; margin: 2px 0 9px; line-height: 1.5; }
.sp-btns { display: flex; gap: 6px; }
.sp-btns .btn { height: 30px; padding: 0 10px; font-size: 12.5px; flex: 1; }
.sp-btns .sp-del { color: #dc2626; border-color: #fecaca; flex: 0 0 auto; }

/* ---- 地图监控：骑手实时定位条 + 点位详情卡（2026-10-13） ---- */
.map-live-head { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 13.5px; color: #1f2a44; margin: 4px 0 10px; }
.map-live-head .hint { font-weight: 400; }
.riders-live { display: flex; flex-wrap: wrap; gap: 10px; }
.riders-live .list-empty { width: 100%; }
.rider-chip { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #dbe5f3; border-left: 4px solid #1e5fdc; border-radius: 10px; padding: 8px 12px; min-width: 260px; cursor: pointer; transition: box-shadow .15s; }
.rider-chip:hover { box-shadow: 0 4px 12px rgba(30, 95, 220, .15); }
.rider-chip.rc-stale { border-left-color: #94a3b8; background: #f6f8fb; color: #64748b; }
.rc-ico { font-size: 20px; }
.rc-main { min-width: 0; }
.rc-main b { font-size: 13px; }
.rc-sub { font-size: 11.5px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px; }
.rc-right { margin-left: auto; text-align: right; }
.rc-age { display: block; font-size: 11.5px; font-weight: 700; color: #1e5fdc; }
.rc-stale .rc-age { color: #b91c1c; }
.rc-xy { display: block; font-size: 11px; color: #94a3b8; }
.spot-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.spot-cards .list-empty { grid-column: 1 / -1; }
.spot-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 5px; }
.sc-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.spot-card.sc-off { background: #f8fafc; opacity: .72; }
.sc-top { display: flex; align-items: center; gap: 7px; }
.sc-ico { font-size: 16px; }
.sc-name { font-size: 13px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-meta { font-size: 11.5px; color: #64748b; }
.sc-xy { font-size: 11px; color: #94a3b8; font-variant-numeric: tabular-nums; }
.sc-ops { display: flex; gap: 6px; margin-top: 2px; }
.sc-ops .btn { flex: 1; height: 28px; font-size: 12.5px; padding: 0 8px; }
