:root {
  --primary: #1f6bff;
  --primary-dark: #1558d6;
  --primary-light: #e8f0ff;
  --bg: #f0f4f8;
  --card: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --sidebar-w: 240px;
  --sidebar-w-collapsed: 72px;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei',
    sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

a {
  color: var(--primary);
  text-decoration: none;
}

/* —— 登录页 —— */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, #e8f0ff 0%, #f0f4f8 50%, #f8fafc 100%);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border-radius: 20px;
  padding: 40px 36px;
  box-shadow: 0 20px 60px rgba(31, 107, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.login-brand {
  text-align: center;
  margin-bottom: 32px;
}

.login-brand .logo {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary), #4d89ff);
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 12px;
}

.login-brand h1 {
  font-size: 22px;
  font-weight: 700;
}

.login-brand p {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 6px;
}

.role-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  background: var(--bg);
  padding: 4px;
  border-radius: 10px;
}

.role-tab {
  flex: 1;
  text-align: center;
  padding: 10px 8px;
  font-size: 13px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
  border: none;
  background: transparent;
}

.role-tab.active {
  background: var(--card);
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), #4d89ff);
  color: #fff;
  box-shadow: 0 6px 20px rgba(31, 107, 255, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(31, 107, 255, 0.4);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-ghost {
  background: var(--bg);
  color: var(--text-muted);
}

.btn-sm {
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.login-hint {
  margin-top: 20px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
}

.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 9999;
  display: none;
}

.toast.show {
  display: block;
  animation: fadeIn 0.25s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* —— 控制台布局 —— */
.console-layout {
  display: flex;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

.sidebar {
  position: relative;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #1a2b4a 0%, #0f172a 100%);
  color: #94a3b8;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  transition: width 0.25s ease;
  overflow: visible;
  height: 100%;
  max-height: 100vh;
}

.sidebar-brand {
  padding: 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
}

.sidebar-logo-img {
  flex-shrink: 0;
  height: 40px;
  width: auto;
  max-width: 52px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  padding: 4px;
}

.sidebar-brand-text {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.sidebar-brand h2 {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.sidebar-brand span {
  font-size: 12px;
  color: #64748b;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 4px;
  transition: background 0.2s, color 0.2s, padding 0.25s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-icon {
  flex-shrink: 0;
  width: 22px;
  text-align: center;
  font-size: 16px;
}

.nav-label {
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
}

.nav-item.active {
  background: rgba(31, 107, 255, 0.25);
  color: #fff;
}

.sidebar-user {
  padding: 16px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

.sidebar-user-text {
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.sidebar-logout-btn {
  margin-top: 12px !important;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #94a3b8 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

.sidebar-logout-btn:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

.logout-icon {
  font-size: 14px;
  line-height: 1;
}

/* —— 侧边栏收起 —— */
.console-layout.sidebar-collapsed .sidebar {
  width: var(--sidebar-w-collapsed);
}

.console-layout.sidebar-collapsed .sidebar-brand {
  justify-content: center;
  padding: 20px 10px;
}

.console-layout.sidebar-collapsed .sidebar-logo-img {
  max-width: 44px;
  height: 36px;
  padding: 3px;
}

.console-layout.sidebar-collapsed .sidebar-brand-text,
.console-layout.sidebar-collapsed .nav-label,
.console-layout.sidebar-collapsed .sidebar-user-text,
.console-layout.sidebar-collapsed .logout-text {
  opacity: 0;
  width: 0;
  overflow: hidden;
  pointer-events: none;
}

.console-layout.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 12px 8px;
}

.console-layout.sidebar-collapsed .sidebar-logout-btn {
  padding-left: 8px;
  padding-right: 8px;
}

.console-layout.sidebar-collapsed .sidebar-toggle-icon {
  transform: rotate(180deg);
}

.sidebar-toggle {
  position: absolute;
  top: 50%;
  right: -14px;
  transform: translateY(-50%);
  z-index: 20;
  width: 28px;
  height: 48px;
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 10px 10px 0;
  background: var(--card);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 2px 0 8px rgba(15, 23, 42, 0.06);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  padding: 0;
}

.sidebar-toggle:hover {
  background: var(--primary-light);
  border-color: #bfd4ff;
  color: var(--primary);
}

.sidebar-toggle-icon {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.25s ease;
}

.sidebar-user .name {
  color: #fff;
  font-weight: 600;
}

.sidebar-user .role {
  font-size: 12px;
  margin-top: 4px;
}

.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.topbar {
  height: 60px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  flex-shrink: 0;
  /* 高于订单详情 Leaflet 地图，避免铃铛下拉被地图遮住 */
  position: relative;
  z-index: 9000;
}

/* —— 顶部待处理订单滚动条 —— */
.pending-order-ticker {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 0 16px 0 12px;
  background: linear-gradient(90deg, #fff7ed 0%, #ffedd5 45%, #fff7ed 100%);
  border-bottom: 1px solid #fdba74;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 10020;
}

.pending-order-ticker.is-empty {
  background: linear-gradient(90deg, #f8fafc 0%, #f1f5f9 50%, #f8fafc 100%);
  border-bottom-color: var(--border);
}

.pending-order-ticker.has-pending {
  background: linear-gradient(90deg, #fff1f2 0%, #ffe4e6 40%, #fff7ed 100%);
  border-bottom-color: #fb7185;
}

.pending-order-ticker-tag {
  flex-shrink: 0;
  height: 22px;
  padding: 0 8px;
  border: none;
  border-radius: 999px;
  background: #ea580c;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.pending-order-ticker.has-pending .pending-order-ticker-tag {
  background: #e11d48;
  animation: pending-ticker-pulse 1.6s ease-in-out infinite;
}

.pending-order-ticker.is-empty .pending-order-ticker-tag {
  background: #94a3b8;
}

@keyframes pending-ticker-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.35);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(225, 29, 72, 0);
  }
}

.pending-order-ticker-viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent);
  cursor: pointer;
}

.pending-order-ticker-track {
  display: inline-flex;
  white-space: nowrap;
  will-change: transform;
  animation-name: pending-ticker-scroll;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.pending-order-ticker-viewport:hover .pending-order-ticker-track {
  animation-play-state: paused;
}

.pending-order-ticker-seg {
  display: inline-block;
  padding-right: 64px;
  font-size: 13px;
  font-weight: 600;
  color: #9a3412;
  line-height: 34px;
}

.pending-order-ticker.has-pending .pending-order-ticker-seg {
  color: #9f1239;
}

.pending-order-ticker.is-empty .pending-order-ticker-seg {
  color: #64748b;
  font-weight: 500;
}

.pending-order-ticker-dot {
  margin: 0 12px;
  color: #fb923c;
  font-weight: 400;
}

.pending-order-ticker.has-pending .pending-order-ticker-dot {
  color: #fb7185;
}

@keyframes pending-ticker-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.topbar h1 {
  font-size: 18px;
  font-weight: 700;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.notif-wrap {
  position: relative;
  z-index: 1;
}

.notif-bell-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.notif-bell-btn:hover {
  background: var(--bg-soft, #f5f7fb);
  border-color: var(--primary-light, #93c5fd);
}

.notif-bell-btn.notif-bell-flash {
  animation: notif-bell-pulse 0.45s ease-in-out 4;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.35);
}

@keyframes notif-bell-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.notif-bell-icon {
  font-size: 18px;
  line-height: 1;
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, calc(100vw - 32px));
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
  z-index: 9010;
  overflow: hidden;
}

.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fafbff 0%, var(--card) 100%);
}

.notif-panel-head strong {
  font-size: 14px;
}

.notif-panel-mark {
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}

.notif-panel-mark:hover {
  background: rgba(37, 99, 235, 0.08);
}

.notif-panel-body {
  max-height: 360px;
  overflow-y: auto;
}

.notif-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.notif-desktop-bar {
  padding: 12px 12px 10px;
  margin-bottom: 8px;
  background: linear-gradient(180deg, #f0f9ff 0%, #f8fbff 100%);
  border: 1px solid #d9eaf7;
  border-radius: 10px;
}

.notif-desktop-status {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  line-height: 1.4;
  margin-bottom: 6px;
}

.notif-desktop-granted {
  color: #15803d;
}

.notif-desktop-denied,
.notif-desktop-default,
.notif-desktop-unsupported {
  color: #b45309;
}

.notif-desktop-hint {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.5;
  color: #64748b;
}

.notif-desktop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.notif-desktop-actions .btn {
  flex: 1 1 140px;
}

.notif-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item:hover {
  background: var(--bg-soft, #f8fafc);
}

.notif-item.unread {
  background: rgba(37, 99, 235, 0.04);
}

.notif-item.is-auto-assigned.unread {
  background: rgba(5, 150, 105, 0.06);
}

.notif-item-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
}

.notif-item-tag.auto {
  background: #d1fae5;
  color: #047857;
}

.notif-item-tag.pending {
  background: #fef3c7;
  color: #b45309;
}

.notif-item.unread::before {
  content: '';
  position: absolute;
  left: 6px;
  margin-top: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.notif-item {
  position: relative;
  padding-left: 18px;
}

.notif-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
}

.notif-item-top strong {
  font-size: 13px;
  color: var(--text);
}

.notif-item-fee {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

.notif-item-meta,
.notif-item-route {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.notif-item-route {
  color: var(--text);
  opacity: 0.85;
}

.content {
  flex: 1;
  min-height: 0;
  padding: 24px 28px;
  overflow-y: auto;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.stat-card .label {
  font-size: 13px;
  color: var(--text-muted);
}

.stat-card .value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  margin-top: 8px;
}

.stat-card .value.primary {
  color: var(--primary);
}

.panel {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 24px;
}

.panel-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-header h3 {
  font-size: 16px;
  font-weight: 700;
}

.orders-panel-header {
  flex-wrap: wrap;
  gap: 12px;
}

.orders-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.orders-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.orders-toolbar .form-input.orders-search-input {
  width: 150px;
  min-width: 120px;
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
  flex: 0 0 auto;
}

.orders-toolbar .orders-search-btn {
  width: auto;
  min-width: 72px;
  height: 36px;
  padding: 0 16px;
  flex-shrink: 0;
  white-space: nowrap;
}

.orders-toolbar .btn-ghost.btn-sm {
  height: 36px;
  flex-shrink: 0;
}

.orders-toolbar .form-input.orders-search-input[type='date'] {
  min-width: 140px;
  max-width: 160px;
}

.orders-toolbar .orders-status-select {
  height: 36px;
  flex-shrink: 0;
}

.data-table .col-time {
  white-space: nowrap;
  font-size: 13px;
  color: var(--text-muted);
}

.zelos-config-panel {
  margin-bottom: 20px;
}

.zelos-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 14px 16px;
}

.zelos-config-span2 {
  grid-column: 1 / -1;
}

.zelos-config-panel .form-input.zelos-field {
  width: 100%;
  height: 40px;
  font-size: 14px;
}

.zelos-config-panel .zelos-mappings {
  width: 100%;
  min-height: 72px;
  padding: 10px 12px;
  font-size: 13px;
  resize: vertical;
}

.zelos-config-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.zelos-config-actions .btn-primary.zelos-save-btn {
  width: auto;
  min-width: 100px;
}

@media (max-width: 768px) {
  .zelos-config-grid {
    grid-template-columns: 1fr;
  }
}

.panel-body {
  padding: 20px 22px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.data-table tr:hover td {
  background: #f8fafc;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-blue {
  background: var(--primary-light);
  color: var(--primary);
}

.badge-green {
  background: #d1fae5;
  color: #059669;
}

.badge-gray {
  background: #f1f5f9;
  color: #64748b;
}

.badge-orange {
  background: #ffedd5;
  color: #ea580c;
}

.badge-red {
  background: #fee2e2;
  color: #b91c1c;
}

.perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.perm-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid var(--border);
  cursor: pointer;
}

.perm-item input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-mask.show {
  display: flex;
}

.modal-box {
  background: var(--card);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
}

.modal-box h3 {
  font-size: 18px;
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

.modal-actions .btn {
  width: auto;
  min-width: 88px;
  flex-shrink: 0;
  white-space: nowrap;
}

.modal-actions .btn-primary {
  width: auto;
  min-width: 96px;
}

#stopModal .modal-box {
  display: flex;
  flex-direction: column;
}

.stop-modal-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 0;
  padding-top: 8px;
}

.stop-modal-actions .stop-modal-btn {
  width: auto !important;
  min-width: 96px;
  max-width: none;
  flex: 0 0 auto;
  white-space: nowrap;
  writing-mode: horizontal-tb;
  letter-spacing: normal;
  line-height: 1.2;
  padding: 0 20px;
}

.stop-type-legend {
  margin: 0 0 14px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: grid;
  gap: 8px;
}

.stop-type-legend-item {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
}

.stop-type-legend-item strong {
  color: var(--text);
  margin-right: 8px;
}

.user-stop-station-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.user-stop-panel-header h3 {
  margin: 0;
}

.user-stop-subtitle {
  margin: 4px 0 0;
}

.user-stop-toolbar {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.user-stop-station-field {
  flex: 1;
  min-width: 240px;
  margin: 0;
}

.user-stop-hint {
  margin: 0 0 16px;
}

.user-stop-role-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.user-stop-role-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.user-stop-role-tab:hover {
  border-color: #93c5fd;
  color: var(--text);
}

.user-stop-role-tab.active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}

.user-stop-table-panel {
  margin: 0;
  border: 1px solid var(--border);
  box-shadow: none;
}

.user-stop-table-panel .panel-header {
  padding: 12px 16px;
}

.user-stop-empty {
  margin-top: 8px;
}

.user-stop-bind-modal-box {
  max-width: 860px;
  width: min(860px, calc(100vw - 48px));
  max-height: 88vh;
  padding: 22px 28px 24px;
  display: flex;
  flex-direction: column;
}

.user-stop-bind-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.user-stop-bind-modal-header h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.modal-close-x {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  margin: -4px -8px 0 0;
  padding: 0;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.modal-close-x:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.user-stop-bind-modal-hint {
  margin: 0 0 12px;
  flex-shrink: 0;
}

.user-stop-bind-modal-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  flex-shrink: 0;
}

.user-stop-bind-search.form-input {
  width: 100%;
  max-width: 360px;
  height: 38px;
  font-size: 14px;
}

.user-stop-bind-modal-table-wrap {
  flex: 1;
  min-height: 200px;
  max-height: min(52vh, 480px);
  overflow: auto;
  margin-bottom: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.user-stop-bind-modal-pager {
  flex-shrink: 0;
  margin-top: 12px;
}

.user-stop-bind-modal-pager .pager {
  flex-wrap: nowrap;
  justify-content: center;
  gap: 10px;
  padding: 0;
  margin: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.user-stop-bind-modal-pager .pager-summary {
  font-size: 13px;
  flex-shrink: 0;
}

.user-stop-bind-modal-pager .pager-jump {
  flex-shrink: 0;
  gap: 6px;
  padding: 4px 10px;
}

.user-stop-bind-modal-pager .pager-jump-input {
  width: 48px;
  height: 30px;
}

.user-stop-bind-modal-pager .pager-jump-btn,
.user-stop-bind-modal-pager .btn-sm {
  flex-shrink: 0;
  white-space: nowrap;
}

.user-stop-panel .panel-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-stop-user-meta {
  margin-bottom: 8px;
}

.stop-type-badge {
  cursor: help;
}

.admin-stale-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  padding: 12px 20px;
  background: #dc2626;
  color: #fff;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.admin-stale-banner code {
  background: rgba(255, 255, 255, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
}

.admin-version-strip {
  margin-bottom: 16px;
  padding: 10px 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  font-size: 13px;
  color: #1e40af;
}

.console-layout:has(.admin-stale-banner) .main-area {
  padding-top: 52px;
}

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

.hidden {
  display: none !important;
}

.select-input {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 16px;
  padding: 16px 0 8px;
  font-size: 14px;
  color: var(--text-muted);
}

.pager-summary {
  white-space: nowrap;
}

.pager-jump {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  padding: 6px 12px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.pager-jump-label,
.pager-jump-suffix {
  font-size: 13px;
  color: var(--text-muted);
}

.pager-jump-input {
  width: 56px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-align: center;
  font-size: 13px;
  color: var(--text);
  background: #fff;
}

.pager-jump-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.pager-jump-btn {
  min-width: 56px;
}

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

/* —— 价格管理页 —— */
.pricing-page {
  width: 100%;
}

.pricing-hero {
  margin-bottom: 16px;
}

.pricing-title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.pricing-desc {
  margin: 0;
  max-width: 720px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}

.pricing-alert {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 13px;
  line-height: 1.55;
}

.pricing-alert code {
  font-size: 12px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(154, 52, 18, 0.08);
}

.pricing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 16px;
  align-items: stretch;
}

.pricing-form-panel,
.pricing-preview-panel {
  margin: 0;
}

.pricing-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  max-width: 520px;
}

.pricing-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.pricing-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.pricing-input-wrap .form-input {
  height: 42px;
  padding-right: 72px;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.pricing-unit {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--text-muted);
  pointer-events: none;
  white-space: nowrap;
}

.pricing-field-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.pricing-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.pricing-save-btn.btn-primary {
  width: auto !important;
  min-width: 160px;
  max-width: max-content;
  height: 40px;
  padding: 0 18px;
  font-size: 14px;
}

.pricing-defaults {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.pricing-preview-panel {
  display: flex;
  flex-direction: column;
}

.pricing-preview-panel .panel-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.pricing-preview-card {
  padding: 18px 16px;
  border-radius: 14px;
  background: linear-gradient(145deg, #eff6ff 0%, #f8fbff 55%, #ffffff 100%);
  border: 1px solid #dbeafe;
}

.pricing-preview-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.pricing-preview-amount {
  margin-top: 8px;
  font-size: 36px;
  font-weight: 750;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.pricing-preview-formula {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
}

.pricing-rule-list {
  margin: 16px 0 0;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.7;
}

.pricing-rule-list li + li {
  margin-top: 2px;
}

@media (max-width: 900px) {
  .pricing-layout {
    grid-template-columns: 1fr;
  }

  .pricing-form {
    max-width: none;
  }
}

/* —— 运营监测：全屏地图 + 透明浮层 —— */
.content.content-ops-full {
  padding: 0;
  overflow: hidden;
  height: auto;
  flex: 1;
  min-height: 0;
}

.console-layout:has(.content-ops-full) .main-area {
  min-height: 0;
  height: 100%;
}

.ops-fullpage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 480px;
  overflow: hidden;
}

.ops-map-full {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #dce4ec;
}

.ops-map-full .leaflet-container {
  font-family: inherit;
  background: #dce4ec;
}

.ops-glass {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.1);
  padding: 14px 16px;
  pointer-events: auto;
}

.ops-glass-bar {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
  pointer-events: auto;
}

.ops-glass-compact {
  padding: 10px 14px;
}

.ops-glass-tall {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  max-height: 100%;
}

.ops-overlay-top {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  width: min(720px, calc(100% - 620px));
  min-width: 280px;
  border-radius: 14px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ops-overlay-top-left {
  min-width: 0;
}

.ops-board-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--text);
}

.ops-board-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.ops-board-head-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ops-updated {
  font-size: 12px;
  color: var(--text-muted);
}

.ops-kpi-float {
  position: absolute;
  top: 78px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
  max-width: calc(100% - 620px);
  min-width: 280px;
}

.ops-kpi {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 10px;
  padding: 8px 14px;
  min-width: 82px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.ops-kpi-val {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.ops-kpi-val.primary { color: var(--primary); }
.ops-kpi-val.success { color: var(--success); }
.ops-kpi-val.warning { color: var(--warning); }
.ops-kpi-val.danger { color: var(--danger); }

.ops-kpi-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.ops-kpi-filter {
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.ops-kpi-filter:hover {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.12);
}

.ops-kpi-filter.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}

.ops-float {
  position: absolute;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.ops-float-left {
  top: 14px;
  left: 14px;
  bottom: 52px;
  width: 248px;
  max-height: calc(100% - 66px);
  overflow-y: auto;
}

.ops-float-right {
  top: 14px;
  right: 14px;
  bottom: 52px;
  width: 288px;
  max-height: calc(100% - 66px);
}

.ops-overlay-bottom {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 30;
  border-radius: 999px;
  padding: 6px 18px;
  max-width: calc(100% - 40px);
  text-align: center;
}

.ops-panel-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}

.ops-dist-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.ops-donut {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  position: relative;
}

.ops-donut-hole {
  position: absolute;
  inset: 22px;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
}

.ops-donut-hole small {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
}

.ops-donut-empty {
  font-size: 13px;
  color: var(--text-muted);
  padding: 24px 0;
  text-align: center;
}

.ops-legend {
  width: 100%;
  font-size: 12px;
}

.ops-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.ops-legend-row b {
  margin-left: auto;
  color: var(--text);
}

.ops-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.ops-legend-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  padding: 4px 2px;
}

.ops-legend-bar span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ops-alerts-list {
  max-height: 160px;
  overflow-y: auto;
}

.ops-alert-item {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.ops-alert-item:hover { opacity: 0.85; }

.ops-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.ops-filter-btn {
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.45);
  color: var(--text-muted);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.ops-filter-btn.active {
  background: var(--primary-light);
  border-color: #bfd4ff;
  color: var(--primary);
  font-weight: 600;
}

.ops-vehicle-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.ops-vehicle-card {
  text-align: left;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  position: relative;
}

.ops-vehicle-card:hover,
.ops-vehicle-card.active {
  border-color: #bfd4ff;
  box-shadow: 0 2px 10px rgba(31, 107, 255, 0.12);
  background: rgba(255, 255, 255, 0.88);
}

.ops-vehicle-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.ops-vehicle-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ops-vehicle-plate {
  font-weight: 600;
  font-size: 13px;
}

.ops-vehicle-badge {
  margin-left: auto;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
}

.ops-badge-idle { background: #d1fae5; color: #047857; }
.ops-badge-working { background: #ffedd5; color: #c2410c; }
.ops-badge-faulty { background: #fee2e2; color: #b91c1c; }
.ops-badge-offline { background: #f1f5f9; color: #64748b; }

.ops-vehicle-card-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
}

.ops-vehicle-meta {
  color: var(--text-muted);
}

.ops-trip-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--primary-light);
  color: var(--primary);
}

.ops-list-empty {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  padding: 24px 8px;
}

.ops-foot-hint {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.ops-marker-icon {
  background: transparent !important;
  border: none !important;
}

.ops-marker {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
}

.ops-marker-core {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--mc);
  border: 2px solid #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
  z-index: 2;
}

.ops-marker-pulse {
  position: absolute;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--mc);
  opacity: 0.45;
  animation: ops-pulse 2s ease-out infinite;
}

.ops-marker.working .ops-marker-pulse {
  animation-duration: 1.2s;
}

.ops-marker-text {
  font-size: 10px;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.92);
  padding: 2px 5px;
  border-radius: 4px;
  border: 1px solid var(--border);
  white-space: nowrap;
}

@keyframes ops-pulse {
  0% { transform: scale(1); opacity: 0.5; }
  70% { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(2.2); opacity: 0; }
}

.alert-info { background: #e8f0ff; color: #1e40af; }
.alert-ok { background: #ecfdf5; color: #047857; }
.alert-warn { background: #fffbeb; color: #b45309; }
.alert-danger { background: #fef2f2; color: #b91c1c; }

@media (max-width: 1100px) {
  .ops-float-left,
  .ops-float-right {
    width: 220px;
  }
  .ops-overlay-top,
  .ops-kpi-float {
    width: calc(100% - 480px);
    min-width: 200px;
  }
}

@media (max-width: 860px) {
  .ops-float-left,
  .ops-float-right {
    position: static;
    width: 100%;
    max-height: none;
    overflow: visible;
  }
  .ops-fullpage {
    height: auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }
  .ops-map-full {
    position: relative;
    height: 50vh;
    min-height: 320px;
    order: -1;
  }
  .ops-overlay-top,
  .ops-kpi-float,
  .ops-overlay-bottom {
    position: relative;
    left: auto;
    transform: none;
    width: 100%;
    max-width: none;
  }
  .ops-kpi-float {
    top: auto;
    padding: 0 14px 8px;
  }
  .ops-float {
    padding: 0 14px;
  }
}

.row-clickable { cursor: pointer; }
.row-clickable:hover { background: #f8fafc; }
.row-clickable.row-active { background: #eff6ff; }
.row-clickable.row-active td { font-weight: 500; }

.stations-panel-header { flex-wrap: wrap; gap: 8px; }

.station-contact-panel {
  margin-top: 16px;
}

.station-contact-header {
  align-items: flex-start;
  gap: 12px;
}

.station-contact-header h3 {
  margin: 0;
}

.station-contact-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: #64748b;
  font-weight: 400;
  line-height: 1.4;
}

.station-contact-header .btn {
  flex-shrink: 0;
  margin-top: 2px;
}

.station-contact-body {
  padding-top: 16px;
  padding-bottom: 18px;
}

.station-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 220px));
  gap: 16px 40px;
}

.station-contact-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.station-contact-label {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.station-contact-value {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: 0.01em;
  word-break: break-all;
}

@media (max-width: 640px) {
  .station-contact-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

.panel-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.col-actions {
  white-space: nowrap;
}

.col-actions .btn {
  margin-right: 4px;
}

.btn-danger-text {
  color: #dc2626;
}

.btn-danger-text:hover {
  color: #b91c1c;
  background: #fef2f2;
}

.batch-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

/* 小程序用户页 */
.mini-users-panel .panel-header {
  align-items: flex-start;
}

.mini-users-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.mini-users-title-wrap h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

.mini-users-sub {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.mini-users-toolbar {
  margin-left: auto;
}

.mini-users-toolbar .mini-users-search-input {
  width: 220px;
  min-width: 180px;
}

.mini-users-batch-bar {
  padding: 10px 12px;
  margin-bottom: 14px;
  background: linear-gradient(180deg, #f8fbff 0%, #f3f7fc 100%);
  border: 1px solid #e4eef8;
  border-radius: 10px;
}

.mini-users-hint {
  margin: 0 !important;
  flex: 1;
  min-width: 200px;
  font-size: 12px;
  line-height: 1.55;
  color: #64748b;
}

.mini-users-panel .col-actions {
  white-space: nowrap;
  min-width: 132px;
}

.mini-users-panel .mini-user-edit-btn {
  color: #1f6bff;
  border-color: transparent;
  font-weight: 500;
}

.mini-users-panel .mini-user-edit-btn:hover:not(:disabled) {
  background: #eef4ff;
  color: #1554d4;
}

.mini-users-panel .mini-user-del-btn:disabled,
.mini-users-panel .mini-user-edit-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.mini-users-panel .mono-cell {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: #64748b;
}

.mini-users-panel .empty-cell {
  text-align: center;
  color: #94a3b8;
  padding: 36px 12px !important;
}

.mini-user-nick-modal {
  max-width: 420px;
}

.mini-user-nick-hint {
  margin: -4px 0 16px;
  font-size: 13px;
  line-height: 1.5;
  color: #64748b;
}

.mini-user-remark-input {
  min-height: 72px;
  resize: vertical;
  line-height: 1.5;
}

.mini-user-remark-cell {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #64748b;
  font-size: 13px;
}

.col-check {
  width: 36px;
  text-align: center;
  vertical-align: middle;
}

.col-check input[type='checkbox'] {
  width: 15px;
  height: 15px;
  cursor: pointer;
  vertical-align: middle;
}

.subpage-nav {
  margin-bottom: 14px;
}

.subpage-nav .btn {
  padding-left: 0;
  font-weight: 500;
}

.col-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px 20px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.detail-label {
  font-size: 12px;
  color: var(--text-muted);
}

.detail-value {
  font-size: 14px;
  color: var(--text);
  word-break: break-all;
}

/* 调度无人车弹窗 */
.dispatch-modal-box {
  display: flex;
  flex-direction: column;
  max-width: 640px;
  width: calc(100vw - 32px);
  max-height: min(90vh, 820px);
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
}

.dispatch-modal-box .dispatch-modal-head,
.dispatch-modal-box .dispatch-steps,
.dispatch-modal-box .dispatch-order-panel,
.dispatch-modal-box .dispatch-section,
.dispatch-modal-box .dispatch-modal-actions {
  padding-left: 22px;
  padding-right: 22px;
}

.dispatch-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

.dispatch-modal-body::-webkit-scrollbar {
  width: 8px;
}

.dispatch-modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.dispatch-modal-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.dispatch-modal-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
  background-clip: padding-box;
}

.dispatch-modal-body.is-scrollable {
  scrollbar-gutter: stable;
}

.dispatch-modal-body.is-scrollable::before {
  content: '';
  position: sticky;
  top: 0;
  display: block;
  height: 0;
  margin-bottom: 0;
  box-shadow: 0 6px 12px -8px rgba(15, 23, 42, 0.12);
  pointer-events: none;
  z-index: 2;
}

.dispatch-scroll-hint {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  padding: 10px 0 6px;
  margin-top: -36px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.92) 45%, #fff 100%);
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s, transform 0.25s;
}

.dispatch-scroll-hint span {
  font-size: 11px;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 4px 12px;
}

.dispatch-modal-body.is-scrollable:not(.scrolled-down) .dispatch-scroll-hint {
  opacity: 1;
  transform: translateY(0);
}

.dispatch-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding-top: 10px;
  padding-bottom: 12px;
  background: #fafbfc;
  border-bottom: 1px solid #f1f5f9;
}

.dispatch-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #94a3b8;
  font-weight: 600;
}

.dispatch-step i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-style: normal;
  font-size: 11px;
  background: #e2e8f0;
  color: #64748b;
}

.dispatch-step.active {
  color: #2563eb;
}

.dispatch-step.active i {
  background: linear-gradient(145deg, #3b82f6, #2563eb);
  color: #fff;
}

.dispatch-step-line {
  width: 28px;
  height: 2px;
  background: #e2e8f0;
  margin: 0 8px;
  border-radius: 1px;
}

.dispatch-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-top: 20px;
  padding-bottom: 16px;
  background: linear-gradient(135deg, #fff7ed 0%, #fff 55%, #f0fdf4 100%);
  border-bottom: 1px solid #f1f5f9;
}

.dispatch-head-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.dispatch-head-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  flex-shrink: 0;
}

.dispatch-modal-head h3 {
  margin: 0 0 2px;
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
}

.dispatch-modal-sub {
  margin: 0;
  font-size: 12px;
  color: #64748b;
}

.dispatch-modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 8px;
  font-size: 22px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  flex-shrink: 0;
}

.dispatch-modal-close:hover {
  background: #fff;
  color: #334155;
}

.dispatch-order-panel {
  padding-top: 16px;
  padding-bottom: 4px;
}

.dispatch-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px 12px;
  font-size: 13px;
  color: #94a3b8;
}

.dispatch-loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3b82f6;
  animation: dispatch-pulse 1s ease-in-out infinite;
}

@keyframes dispatch-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1); }
}

.dispatch-order-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.dispatch-sn-chip {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  background: #f1f5f9;
  padding: 4px 12px;
  border-radius: 8px;
  font-family: ui-monospace, monospace;
  letter-spacing: 0.02em;
}

.dispatch-mode-chip {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}

.dispatch-mode-chip.instant {
  background: #ffedd5;
  color: #c2410c;
}

.dispatch-mode-chip.scheduled {
  background: #dbeafe;
  color: #1d4ed8;
}

.dispatch-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

@media (max-width: 520px) {
  .dispatch-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.dispatch-stat {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.dispatch-stat-icon {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
}

.dispatch-stat-label {
  display: block;
  font-size: 10px;
  color: #94a3b8;
  margin-bottom: 2px;
}

.dispatch-stat-value {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
  word-break: break-all;
}

.dispatch-stat.accent-blue { border-color: #bfdbfe; background: #f8fbff; }
.dispatch-stat.accent-orange { border-color: #fed7aa; background: #fffbf5; }
.dispatch-stat.accent-green { border-color: #bbf7d0; background: #f7fef9; }
.dispatch-stat.accent-gray { border-color: #e2e8f0; background: #fafafa; }

.dispatch-route-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 14px 10px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.dispatch-route-card-title {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.dispatch-timeline {
  display: flex;
  flex-direction: column;
}

.dispatch-timeline-item {
  display: flex;
  gap: 12px;
  min-height: 56px;
}

.dispatch-timeline-item.last {
  min-height: auto;
}

.dispatch-timeline-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 28px;
  flex-shrink: 0;
}

.dispatch-timeline-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.dispatch-timeline-item.pickup .dispatch-timeline-badge { background: linear-gradient(145deg, #22c55e, #16a34a); }
.dispatch-timeline-item.waypoint .dispatch-timeline-badge { background: linear-gradient(145deg, #3b82f6, #2563eb); }
.dispatch-timeline-item.delivery .dispatch-timeline-badge { background: linear-gradient(145deg, #f97316, #ea580c); }

.dispatch-timeline-line {
  flex: 1;
  width: 2px;
  min-height: 20px;
  margin: 4px 0;
  background: linear-gradient(180deg, #cbd5e1 0%, #e2e8f0 100%);
  border-radius: 1px;
}

.dispatch-timeline-body {
  flex: 1;
  min-width: 0;
  padding-bottom: 14px;
}

.dispatch-timeline-item.last .dispatch-timeline-body {
  padding-bottom: 0;
}

.dispatch-timeline-kind {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
}

.dispatch-timeline-addr {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.45;
  margin-top: 2px;
}

.dispatch-timeline-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 6px;
}

.dispatch-contact-line {
  font-size: 12px;
  color: #64748b;
  background: #f8fafc;
  padding: 2px 8px;
  border-radius: 6px;
}

.dispatch-section {
  padding-top: 12px;
  padding-bottom: 16px;
}

.dispatch-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.dispatch-section-head-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.dispatch-section-icon {
  font-size: 16px;
}

.dispatch-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #334155;
}

.dispatch-vehicle-count {
  font-size: 11px;
  font-weight: 700;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 2px 8px;
  line-height: 1.4;
}

.dispatch-section-tip {
  margin: 0 0 10px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}

.dispatch-route-config-sub {
  margin: 14px 0 6px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

.dispatch-route-user-stops li strong {
  color: #334155;
}

.order-alert-banner {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  z-index: 10050;
  width: min(560px, calc(100vw - 32px));
  transition: transform 0.35s ease, opacity 0.35s ease;
  opacity: 0;
  pointer-events: none;
}

.order-alert-banner.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.order-alert-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #1d4ed8 100%);
  border: 1px solid #93c5fd;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(37, 99, 235, 0.45);
  color: #fff;
}

.order-alert-banner.is-auto-assigned .order-alert-inner {
  background: linear-gradient(135deg, #065f46 0%, #059669 55%, #047857 100%);
  border-color: #6ee7b7;
  box-shadow: 0 20px 50px rgba(5, 150, 105, 0.4);
}

.order-alert-banner.is-auto-pending .order-alert-inner {
  background: linear-gradient(135deg, #92400e 0%, #d97706 55%, #b45309 100%);
  border-color: #fcd34d;
  box-shadow: 0 20px 50px rgba(217, 119, 6, 0.4);
}

.order-alert-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.order-alert-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  line-height: 1.45;
}

.order-alert-copy strong {
  font-size: 15px;
}

.order-alert-route {
  opacity: 0.92;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-alert-go {
  flex-shrink: 0;
  border: none;
  background: #fff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
}

.order-alert-close {
  flex-shrink: 0;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.order-notif-modal h3 {
  margin-bottom: 12px;
}

.order-notif-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.order-notif-sn {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.02em;
}

.order-notif-meta {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

.order-notif-route {
  font-size: 13px;
  color: #334155;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

#orderDetailGoConfirmModal {
  z-index: 10100;
}

.order-detail-timeline-item.live .order-detail-timeline-text {
  color: #0d9488;
  font-weight: 600;
}

.order-detail-timeline-item.live .order-detail-timeline-dot {
  background: #0d9488;
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.2);
}

.order-detail-go-confirm-text {
  margin: 0 0 20px;
  line-height: 1.6;
  color: #334155;
  font-size: 14px;
}

.dispatch-route-config {
  margin-top: 14px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #f0fdfa 0%, #fff 100%);
  border: 1px solid #99f6e4;
  border-radius: 12px;
}

.dispatch-route-config-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f766e;
  margin-bottom: 6px;
}

.dispatch-route-config-hint {
  margin: 0 0 12px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.55;
}

.dispatch-route-config-hint.warn {
  color: #b45309;
}

.dispatch-route-config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 560px) {
  .dispatch-route-config-grid {
    grid-template-columns: 1fr;
  }
}

.dispatch-route-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dispatch-route-field-label {
  font-size: 11px;
  color: #64748b;
  line-height: 1.4;
}

.dispatch-route-select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  color: #1e293b;
  background: #fff;
}

.dispatch-stop-combo {
  width: 100%;
}

.dispatch-stop-combo-wrap {
  position: relative;
  width: 100%;
}

.dispatch-stop-combo-input {
  width: 100%;
  height: 38px;
  padding: 0 34px 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  color: #1e293b;
  background: #fff;
  box-sizing: border-box;
}

.dispatch-stop-combo-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.dispatch-stop-combo-caret {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  border-radius: 6px;
}

.dispatch-stop-combo-caret:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.dispatch-stop-combo-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 40;
  max-height: 260px;
  overflow: auto;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  padding: 4px;
}

.dispatch-stop-combo-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: #1e293b;
  font-size: 13px;
}

.dispatch-stop-combo-option:hover,
.dispatch-stop-combo-option.active {
  background: #eff6ff;
}

.dispatch-stop-combo-letter {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dispatch-stop-combo-option.active .dispatch-stop-combo-letter {
  background: #dbeafe;
  color: var(--primary);
}

.dispatch-stop-combo-option-label {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dispatch-stop-combo-empty {
  padding: 12px 10px;
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
}

.dispatch-route-waypoints {
  margin: 12px 0 0;
  padding: 10px 12px;
  list-style: none;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px dashed #e2e8f0;
}

.dispatch-route-waypoints li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  padding: 4px 0;
  color: #64748b;
}

.dispatch-route-waypoints li strong {
  color: #334155;
  font-weight: 600;
  text-align: right;
}

.dispatch-route-config-error {
  margin-top: 12px;
  padding: 12px;
  font-size: 12px;
  color: #b45309;
  background: #fffbeb;
  border-radius: 8px;
}

.dispatch-loading-wrap {
  margin-top: 12px;
}

.dispatch-refresh-btn {
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.dispatch-refresh-btn:hover {
  border-color: #93c5fd;
  color: #2563eb;
  background: #f8fbff;
}

.dispatch-refresh-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.dispatch-vehicle-list {
  padding-right: 2px;
}

.dispatch-ineligible-wrap {
  margin-top: 12px;
  border-top: 1px dashed #e2e8f0;
  padding-top: 10px;
}

.dispatch-ineligible-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: none;
  background: #f8fafc;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: background 0.15s;
}

.dispatch-ineligible-toggle:hover {
  background: #f1f5f9;
}

.dispatch-ineligible-toggle[aria-expanded='true'] .dispatch-ineligible-chevron {
  transform: rotate(180deg);
}

.dispatch-ineligible-chevron {
  font-size: 10px;
  transition: transform 0.2s;
}

.dispatch-ineligible-list {
  margin-top: 8px;
}

.dispatch-vehicle-card.is-disabled {
  opacity: 0.72;
  cursor: not-allowed;
  background: #f8fafc;
  border-style: dashed;
}

.dispatch-vehicle-card.is-disabled:hover {
  border-color: #e2e8f0;
  background: #f8fafc;
  box-shadow: none;
}

.dispatch-reject-reason {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 2px 8px;
}

.dispatch-route-details {
  border: none;
  margin: 0;
  padding: 0;
}

.dispatch-route-details > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.dispatch-route-details > summary::-webkit-details-marker {
  display: none;
}

.dispatch-route-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 10px;
}

.dispatch-route-summary-row .dispatch-route-chevron {
  font-size: 11px;
  color: #94a3b8;
  transition: transform 0.2s;
}

.dispatch-route-details[open] .dispatch-route-chevron {
  transform: rotate(180deg);
}

.dispatch-route-details:not(.collapsible) > summary {
  cursor: default;
  pointer-events: none;
}

.dispatch-route-details:not(.collapsible) .dispatch-route-chevron {
  display: none;
}

.dispatch-vehicle-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.dispatch-vehicle-card:hover {
  border-color: #93c5fd;
  background: #fafcff;
}

.dispatch-vehicle-card:has(.dispatch-vehicle-radio:checked) {
  border-color: #2563eb;
  background: linear-gradient(135deg, #eff6ff 0%, #fff 100%);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.dispatch-vehicle-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.dispatch-vehicle-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: none;
  align-items: center;
  justify-content: center;
}

.dispatch-vehicle-card:has(.dispatch-vehicle-radio:checked) .dispatch-vehicle-check {
  display: flex;
}

.dispatch-vehicle-emoji {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: #f1f5f9;
  border-radius: 10px;
  flex-shrink: 0;
}

.dispatch-vehicle-main {
  flex: 1;
  min-width: 0;
}

.dispatch-vehicle-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

.dispatch-vehicle-name {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
}

.dispatch-vehicle-plate {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 1px 8px;
  border-radius: 4px;
  font-family: ui-monospace, monospace;
}

.dispatch-vehicle-status {
  font-size: 11px;
  font-weight: 600;
  color: #16a34a;
  background: #dcfce7;
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-block;
}

.dispatch-battery {
  flex-shrink: 0;
  width: 52px;
  text-align: center;
}

.dispatch-battery-track {
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 4px;
}

.dispatch-battery-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.2s;
}

.dispatch-battery.ok .dispatch-battery-fill { background: linear-gradient(90deg, #22c55e, #16a34a); }
.dispatch-battery.warn .dispatch-battery-fill { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.dispatch-battery.low .dispatch-battery-fill { background: linear-gradient(90deg, #f87171, #ef4444); }

.dispatch-battery-text {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

.dispatch-empty-vehicles {
  text-align: center;
  padding: 24px 12px;
  color: #64748b;
}

.dispatch-empty-vehicles.compact {
  padding: 16px 8px;
}

.dispatch-empty-vehicles .dispatch-empty-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 8px;
}

.dispatch-empty-vehicles p {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: #475569;
}

.dispatch-empty-vehicles small {
  font-size: 12px;
  color: #94a3b8;
}

.dispatch-modal-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 12px;
  padding-bottom: 20px;
  border-top: 1px solid #f1f5f9;
  margin-top: 0;
  background: #fff;
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.04);
}

.dispatch-action-left {
  flex: 1;
  min-width: 140px;
}

.dispatch-pick-hint {
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}

.dispatch-pick-hint.has-pick {
  color: #2563eb;
  font-weight: 600;
}

.dispatch-action-btns {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
  margin-left: auto;
}

.dispatch-modal-actions .modal-actions,
.dispatch-modal-actions.modal-actions {
  margin-top: 0;
}

.dispatch-confirm-btn {
  min-width: 120px;
}

@media (max-width: 560px) {
  .dispatch-modal-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .dispatch-action-left {
    order: 2;
    text-align: center;
  }

  .dispatch-action-btns {
    order: 1;
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
  }

  .dispatch-steps {
    gap: 4px;
    flex-wrap: wrap;
  }

  .dispatch-step-line {
    width: 16px;
    margin: 0 4px;
  }
}

/* —— 派单进度弹窗（九识风格） —— */
.dispatch-progress-box {
  width: min(360px, calc(100vw - 48px));
  background: #fff;
  border-radius: 20px;
  padding: 32px 28px 28px;
  text-align: center;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
}

.dispatch-progress-art {
  position: relative;
  height: 120px;
  margin: 0 auto 20px;
  overflow: hidden;
}

.dispatch-progress-skyline {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 28px;
  height: 48px;
  background: linear-gradient(180deg, transparent, #e0f2fe 40%, #bae6fd);
  border-radius: 8px 8px 0 0;
  opacity: 0.7;
}

.dispatch-progress-path {
  position: absolute;
  left: 12%;
  right: 12%;
  top: 36px;
  height: 24px;
  border: 3px solid transparent;
  border-top: 3px solid #38bdf8;
  border-radius: 50%;
  transform: scaleX(1.2);
}

.dispatch-progress-truck {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  font-size: 42px;
  filter: drop-shadow(0 4px 8px rgba(14, 165, 233, 0.25));
}

.dispatch-progress-box.is-loading .dispatch-progress-truck {
  animation: dispatch-truck-float 2.2s ease-in-out infinite;
}

.dispatch-progress-box.is-planning .dispatch-progress-truck {
  animation: dispatch-truck-drive 1.4s ease-in-out infinite;
}

@keyframes dispatch-truck-drive {
  0%, 100% { transform: translateX(calc(-50% - 6px)) translateY(0); }
  50% { transform: translateX(calc(-50% + 6px)) translateY(-4px); }
}

.dispatch-progress-box.is-planning .dispatch-progress-path {
  border-top-color: #0ea5e9;
}

@keyframes dispatch-truck-float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-6px); }
}

.dispatch-progress-text {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: #1e293b;
}

.dispatch-progress-sub {
  margin: 8px 0 0;
  font-size: 13px;
  color: #64748b;
}

.dispatch-progress-detail-btn {
  margin-top: 22px;
  min-width: 140px;
  border-radius: 999px;
  padding: 10px 28px;
}

.dispatch-progress-box.is-loading .dispatch-progress-detail-btn,
.dispatch-progress-box.is-planning .dispatch-progress-detail-btn {
  display: none !important;
}

.dispatch-progress-box.is-success .dispatch-progress-detail-btn[hidden] {
  display: none !important;
}

.dispatch-progress-box.is-success .dispatch-progress-art::after {
  content: '✓';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -30%);
  width: 56px;
  height: 56px;
  line-height: 56px;
  border-radius: 50%;
  background: #ccfbf1;
  color: #0d9488;
  font-size: 28px;
  font-weight: 700;
}

.dispatch-progress-box.is-success .dispatch-progress-truck,
.dispatch-progress-box.is-success .dispatch-progress-path,
.dispatch-progress-box.is-success .dispatch-progress-skyline {
  opacity: 0;
}

#dispatchProgressModal.show {
  z-index: 1200;
}

/* —— 派单路线时间轴（起点/途经点/终点） —— */
.dispatch-route-jiushi {
  margin-top: 14px;
  padding: 14px 14px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}

.dispatch-route-jiushi-title {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 6px;
}

.dispatch-route-jiushi-hint {
  margin: 0 0 12px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}

.dispatch-route-api-hint {
  margin: 0 0 12px !important;
  font-size: 11px !important;
  color: #94a3b8 !important;
}

.dispatch-route-jiushi-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.dispatch-route-jiushi-node {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.dispatch-route-jiushi-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 18px;
  flex-shrink: 0;
}

.dispatch-route-jiushi-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 14px;
}

.dispatch-route-jiushi-dot.start { background: #14b8a6; }
.dispatch-route-jiushi-dot.waypoint { background: #94a3b8; }
.dispatch-route-jiushi-dot.end { background: #f97316; }
.dispatch-route-jiushi-dot.depot { background: #3b82f6; }

.dispatch-route-jiushi-line {
  flex: 1;
  width: 2px;
  min-height: 12px;
  background: repeating-linear-gradient(180deg, #cbd5e1 0, #cbd5e1 4px, transparent 4px, transparent 8px);
  margin: 4px 0;
}

.dispatch-route-jiushi-card {
  flex: 1;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.dispatch-route-jiushi-label {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.dispatch-route-jiushi-label-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dispatch-route-jiushi-sublabel {
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
}

.dispatch-route-jiushi-preview-title {
  margin: 14px 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.dispatch-route-jiushi-name.placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.dispatch-route-jiushi-name {
  margin-top: 4px;
  font-size: 14px;
  color: #0d9488;
  font-weight: 500;
}

.dispatch-route-jiushi-contact {
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
}

@media (max-width: 768px) {
  .console-layout {
    flex-direction: column;
    height: 100vh;
    max-height: 100vh;
  }
  .console-layout:not(.sidebar-collapsed) .sidebar {
    width: 100%;
    height: auto;
    max-height: none;
    flex-shrink: 0;
  }
  .console-layout.sidebar-collapsed .sidebar {
    width: 100%;
    height: auto;
    max-height: none;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .console-layout.sidebar-collapsed .sidebar-nav {
    display: flex;
    flex-wrap: wrap;
    flex: 1;
    padding: 8px;
  }
  .console-layout.sidebar-collapsed .nav-item {
    width: auto;
    flex: 0 0 auto;
  }
  .main-area {
    flex: 1;
    min-height: 0;
  }
}

/* —— 控制台 · 无人车操作记录 —— */
.dash-ops-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dash-topbar-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.dash-source-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.dash-source-tag.live {
  background: #ecfdf5;
  color: #047857;
}

.dash-source-tag.mock {
  background: #eff6ff;
  color: #1d4ed8;
}

.dash-updated {
  font-size: 12px;
  color: var(--text-muted);
}

.dash-stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dash-stat-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dash-stat-card {
  position: relative;
  overflow: hidden;
}

.dash-stat-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
}

.dash-stat-card.accent-blue::before { background: #2563eb; }
.dash-stat-card.accent-orange::before { background: #f59e0b; }
.dash-stat-card.accent-green::before { background: #10b981; }
.dash-stat-card.accent-purple::before { background: #7c3aed; }

.dash-stat-card .value small,
.dash-stat-card .value .slash {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-muted);
  margin-left: 2px;
}

.dash-stat-card .sub {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.dash-ops-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.85fr);
  gap: 20px;
  align-items: start;
}

.dash-ops-panel {
  margin-bottom: 0;
}

.dash-panel-header {
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.dash-panel-header h3 {
  margin: 0;
}

.dash-panel-desc {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.dash-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dash-date-input,
.dash-select {
  width: auto;
  min-width: 140px;
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.dash-ops-body {
  padding-top: 8px;
}

.dash-alert {
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 13px;
}

.dash-ops-table .dash-time-cell {
  white-space: nowrap;
  font-size: 12px;
  color: var(--text-muted);
}

.dash-vehicle-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-vehicle-cell span {
  font-size: 12px;
  color: var(--text-muted);
}

.dash-type-tag {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
}

.dash-status-pill {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.dash-msg-cell {
  color: var(--text);
  line-height: 1.5;
}

.dash-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.dash-charts-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dash-chart-panel {
  margin-bottom: 0;
}

.dash-chart-empty {
  padding: 36px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.dash-compare-panel .panel-body {
  padding-top: 4px;
}

.dash-compare-scroll {
  max-height: 360px;
  overflow: auto;
}

.dash-compare-table {
  font-size: 12px;
}

.dash-compare-table th,
.dash-compare-table td {
  padding: 8px 10px;
  white-space: nowrap;
}

.dash-compare-table td small {
  margin-left: 2px;
  color: var(--text-muted);
  font-size: 11px;
}

.dash-compare-km {
  min-width: 88px;
}

.dash-compare-km strong {
  font-size: 13px;
}

.dash-compare-bar {
  display: block;
  margin-top: 4px;
  height: 4px;
  border-radius: 999px;
  background: #f1f5f9;
  overflow: hidden;
}

.dash-compare-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #f59e0b;
}

.dash-donut-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.dash-donut {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  position: relative;
}

.dash-donut-hole {
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  background: var(--card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px var(--border);
}

.dash-donut-hole span {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.dash-donut-hole small {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.dash-legend {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-legend-row {
  display: grid;
  grid-template-columns: 12px 1fr auto auto;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}

.dash-legend-row b {
  color: var(--text);
  font-weight: 700;
}

.dash-legend-row small {
  color: var(--text-muted);
}

.dash-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dash-trend-head {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

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

.dash-dot.mileage { background: #f59e0b; }
.dash-dot.driving { background: #2563eb; }

.dash-trend-chart {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: 4px;
  align-items: end;
  height: 180px;
  padding-top: 8px;
}

.dash-trend-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  min-width: 0;
}

.dash-trend-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  width: 100%;
  height: 140px;
}

.dash-trend-bar {
  width: 45%;
  border-radius: 4px 4px 0 0;
  min-height: 4px;
}

.dash-trend-bar.mileage {
  background: linear-gradient(180deg, #fbbf24, #f59e0b);
}

.dash-trend-bar.driving {
  background: linear-gradient(180deg, #60a5fa, #2563eb);
}

.dash-trend-label {
  margin-top: 6px;
  font-size: 10px;
  color: var(--text-muted);
  height: 14px;
}

@media (max-width: 1200px) {
  .dash-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dash-ops-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .dash-stat-grid {
    grid-template-columns: 1fr;
  }
  .dash-toolbar {
    width: 100%;
  }
  .dash-date-input,
  .dash-select {
    flex: 1;
    min-width: 0;
  }
}

/* —— 控制台 · 运营大屏 —— */
.dash-ops-board .dash-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dash-source-tag.danger {
  background: #fef2f2;
  color: #b91c1c;
  animation: dashPulseSoft 1.2s ease-in-out infinite;
}

.dash-kpi-grid .dash-kpi-dist {
  margin-top: 8px;
}

.dash-stat-card.kpi-warn {
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.35);
}

.dash-run-legends {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.dash-run-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
}

.dash-board-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  grid-template-rows: auto auto;
  gap: 16px;
}

.dash-board-panel .panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dash-board-panel .panel-body {
  max-height: 420px;
  overflow: auto;
}

.dash-alert-panel {
  grid-row: span 1;
}

.dash-miss-panel {
  grid-column: 1 / -1;
}

.dash-alert-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-alert-empty {
  padding: 24px 8px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.dash-alert-card {
  border: 1px solid #e2e8f0;
  border-left-width: 4px;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}

.dash-alert-card.level-critical,
.dash-alert-card.level-danger {
  border-left-color: #ef4444;
  background: #fff7f7;
}

.dash-alert-card.level-warn {
  border-left-color: #f59e0b;
  background: #fffbeb;
}

.dash-alert-card.pulse {
  animation: dashPulseSoft 1.1s ease-in-out infinite;
}

@keyframes dashPulseSoft {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.18); }
  50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

.dash-alert-card-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.dash-alert-badge {
  font-size: 12px;
  font-weight: 700;
  color: #b91c1c;
}

.dash-alert-time {
  font-size: 11px;
  color: var(--text-muted);
}

.dash-alert-msg {
  font-size: 13px;
  line-height: 1.45;
  color: #334155;
}

.dash-progress-row + .dash-progress-row {
  margin-top: 12px;
}

.dash-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 4px;
}

.dash-progress-track {
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.dash-progress-track > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #2563eb;
}

.dash-progress-track.danger > span {
  background: #ef4444;
}

.dash-lowbat-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dash-lowbat-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 13px;
}

.dash-lowbat-power {
  color: #dc2626;
  font-weight: 700;
}

.dash-lowbat-msg {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

@media (max-width: 1100px) {
  .dash-board-grid {
    grid-template-columns: 1fr;
  }
  .dash-miss-panel {
    grid-column: auto;
  }
}

/* —— 控制台 · 车队日报（保留样式兼容） —— */
.dash-fleet-page {
  position: relative;
}

.dash-fleet-panel .dash-panel-desc {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.dash-keyword-input {
  min-width: 120px;
  max-width: 160px;
}

.dash-fleet-body {
  overflow: auto;
  max-height: calc(100vh - 320px);
}

.dash-fleet-table th,
.dash-fleet-table td {
  white-space: nowrap;
}

.dash-fleet-row {
  cursor: pointer;
}

.dash-fleet-row:hover {
  background: rgba(37, 99, 235, 0.04);
}

.dash-fleet-row.active {
  background: rgba(37, 99, 235, 0.08);
}

.dash-offline-tag {
  margin-left: 6px;
  font-size: 11px;
  color: #94a3b8;
}

.dash-odo-cell {
  font-size: 12px;
  color: var(--text-muted);
}

.dash-seg-bar {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #e2e8f0;
  margin-bottom: 10px;
}

.dash-seg {
  display: block;
  height: 100%;
  min-width: 2px;
}

.dash-legend-compact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 12px;
}

.dash-drawer-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 80;
}

.dash-drawer-mask.show {
  opacity: 1;
  pointer-events: auto;
}

.dash-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100vw);
  height: 100vh;
  background: #fff;
  box-shadow: -8px 0 28px rgba(15, 23, 42, 0.12);
  transform: translateX(100%);
  transition: transform 0.22s ease;
  z-index: 90;
  display: flex;
  flex-direction: column;
}

.dash-drawer.open {
  transform: translateX(0);
}

.dash-drawer-inner {
  padding: 18px 18px 28px;
  overflow: auto;
  height: 100%;
}

.dash-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.dash-drawer-title {
  font-size: 18px;
  font-weight: 700;
}

.dash-drawer-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.dash-drawer-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.dash-drawer-kpis > div {
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  padding: 10px 12px;
}

.dash-drawer-kpis span {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.dash-drawer-kpis b {
  font-size: 15px;
}

.dash-drawer-section {
  margin-top: 16px;
}

.dash-drawer-section h4 {
  margin: 0 0 10px;
  font-size: 14px;
}

.dash-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.dash-timeline-item {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 10px;
  position: relative;
  padding-bottom: 14px;
}

.dash-timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 12px;
  bottom: 0;
  width: 2px;
  background: #e2e8f0;
}

.dash-timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-top: 4px;
  z-index: 1;
}

.dash-timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 4px;
}

.dash-timeline-msg {
  font-size: 13px;
  color: var(--text, #334155);
  line-height: 1.45;
}

/* 充电数据页 */
.charging-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.charging-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 2px 0;
}

.charging-hero-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.18);
  flex-shrink: 0;
}

.charging-hero-title {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
}

.charging-hero-sub {
  margin: 0;
  font-size: 13px;
  color: #64748b;
}

.charging-panel {
  overflow: hidden;
}

.charging-toolbar-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
  overflow-x: auto;
}

.charging-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.charging-field-label {
  font-size: 13px;
  color: #64748b;
  white-space: nowrap;
  font-weight: 500;
}

.charging-field-input {
  width: 132px;
  min-width: 110px;
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.charging-field-input[type='date'] {
  width: 148px;
  min-width: 138px;
}

.charging-btn {
  width: auto;
  min-width: 0;
  height: 32px;
  padding: 0 12px;
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 13px;
}

.charging-toolbar-bar .btn-primary {
  width: auto;
  min-width: 0;
  box-shadow: 0 2px 8px rgba(31, 107, 255, 0.22);
}

.charging-toolbar-bar .btn-primary:hover {
  transform: none;
  box-shadow: 0 3px 10px rgba(31, 107, 255, 0.28);
}

.charging-toolbar-bar .btn-ghost {
  width: auto;
  min-width: 0;
}

.charging-btn-add {
  background: linear-gradient(135deg, #1f6bff 0%, #1557d6 100%);
  border: none;
}

.charging-btn-export {
  color: #059669;
  border-color: rgba(5, 150, 105, 0.25);
  background: #ecfdf5;
}

.charging-btn-export:hover {
  background: #d1fae5;
}

.charging-toolbar-divider {
  width: 1px;
  height: 28px;
  background: #e2e8f0;
  flex-shrink: 0;
  margin: 0 2px;
}

.charging-table-section {
  padding-top: 0;
}

.charging-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 0 12px;
}

.charging-summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
}

.charging-summary-chip strong {
  font-weight: 700;
}

.charging-summary-filter {
  font-size: 12px;
  color: #64748b;
}

.charging-table-scroll {
  overflow-x: auto;
}

.charging-data-table {
  min-width: 860px;
}

.charging-data-table thead th {
  background: #f8fafc;
  font-size: 13px;
  color: #475569;
  font-weight: 600;
}

.charging-data-table tbody tr:hover {
  background: #f8fbff;
}

.charging-data-table .col-seq {
  width: 56px;
  color: #94a3b8;
}

.charging-vehicle-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #334155;
  font-weight: 600;
  font-size: 13px;
}

.charging-time-text {
  font-size: 13px;
  color: #334155;
  font-variant-numeric: tabular-nums;
}

.charging-duration-chip,
.charging-kwh-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-weight: 600;
  color: #334155;
  font-variant-numeric: tabular-nums;
}

.charging-duration-chip small,
.charging-kwh-chip small {
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
}

.charging-kwh-chip {
  color: #059669;
}

.charging-amount-chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  background: #fff7ed;
  color: #ea580c;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.charging-remark-cell {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #64748b;
  font-size: 13px;
}

.charging-empty-cell {
  padding: 48px 16px !important;
}

.charging-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
}

.charging-empty-icon {
  font-size: 36px;
  opacity: 0.85;
}

.charging-empty p {
  margin: 0;
  font-size: 15px;
  color: #64748b;
}

.charging-empty-hint {
  font-size: 12px;
  color: #94a3b8;
}

.charging-pager-wrap {
  padding-top: 0;
  border-top: 1px solid var(--border);
}

/* 充电弹窗 */
.charging-modal-box {
  max-width: 520px;
  padding: 0;
  overflow: hidden;
}

.charging-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 16px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 55%, #fff 100%);
  border-bottom: 1px solid #fde68a;
}

.charging-modal-head-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.charging-modal-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
  flex-shrink: 0;
}

.charging-modal-head h3 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
}

.charging-modal-sub {
  margin: 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}

.charging-modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  font-size: 22px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  flex-shrink: 0;
}

.charging-modal-close:hover {
  background: #fff;
  color: #334155;
}

.charging-modal-form {
  padding: 20px 22px 8px;
}

.charging-modal-form .req {
  color: #ef4444;
}

.charging-modal-form .field-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: #94a3b8;
}

.charging-modal-form select.form-input {
  cursor: pointer;
  appearance: auto;
}

.charging-modal-actions {
  padding: 12px 22px 20px;
  margin-top: 0;
}

@media (max-width: 1100px) {
  .charging-toolbar-bar {
    flex-wrap: wrap;
  }
}

/* —— 任务记录 —— */
.task-records-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.task-records-hero {
  padding: 4px 2px 0;
}

.task-records-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.task-records-sub {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

.task-records-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.task-records-toolbar .form-input {
  width: auto;
  min-width: 120px;
  flex: 1 1 140px;
  max-width: 200px;
}

.task-records-toolbar .btn {
  width: auto !important;
  flex: 0 0 auto;
  height: 36px;
  padding: 0 16px;
  white-space: nowrap;
}

.task-records-toolbar .btn-primary {
  width: 72px !important;
  min-width: 72px;
  box-shadow: 0 2px 8px rgba(31, 107, 255, 0.2);
}

.task-records-toolbar .btn-primary:hover {
  transform: none;
}

.task-records-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.task-records-summary strong {
  color: var(--text);
}

.task-records-today-wrap {
  margin-bottom: 2px;
}

.task-records-today-grid {
  margin-bottom: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.task-records-today-grid .stat-card {
  padding: 18px 20px;
}

.task-records-today-grid .value {
  font-size: 24px;
}

@media (max-width: 1100px) {
  .task-records-today-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .task-records-today-grid {
    grid-template-columns: 1fr;
  }
}

.task-records-table-scroll {
  overflow-x: auto;
}

.task-records-table {
  min-width: 1280px;
  font-size: 12px;
}

.task-records-table th,
.task-records-table td {
  white-space: nowrap;
}

.task-record-del-btn {
  color: #b91c1c !important;
}

.task-route-cell {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-fee {
  font-weight: 700;
  color: #047857;
}

/* —— 订单详情（任务回顾 / 进行中） —— */
.content.content-order-detail {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 16px 28px 20px;
}

.order-detail-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.order-detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.order-detail-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.order-detail-updated {
  font-size: 12px;
  color: var(--text-muted);
}

.order-detail-layout {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}

.content.content-order-detail .order-detail-layout {
  min-height: 0;
  height: 100%;
}

.order-detail-side {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.order-detail-side.is-refreshing {
  opacity: 0.7;
  pointer-events: none;
}

.order-detail-side-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.order-detail-side-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 14px 8px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.od-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}

.od-head-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.od-head-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

.od-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  flex-shrink: 0;
}

.od-metric {
  padding: 10px 8px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  text-align: center;
}

.od-metric span {
  display: block;
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 4px;
}

.od-metric strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #0f766e;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  word-break: break-all;
}

.od-now {
  padding: 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, #f0fdfa 0%, #ecfeff 100%);
  border: 1px solid #99f6e4;
  flex-shrink: 0;
}

.od-now-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #0d9488;
  text-transform: uppercase;
}

.od-now-name {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 700;
  color: #134e4a;
  line-height: 1.35;
}

.od-now-status {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #0f766e;
  line-height: 1.4;
}

.od-now-hint,
.od-notice,
.order-detail-return-hint,
.order-detail-return-warn {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
  color: #64748b;
}

.od-notice,
.order-detail-return-warn {
  margin-top: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  flex-shrink: 0;
}

.od-now-code {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
  color: #64748b;
}

.od-now-code strong {
  font-size: 18px;
  letter-spacing: 0.08em;
  color: #0f172a;
}

.od-block {
  flex-shrink: 0;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #e8eef5;
  background: #fff;
}

.od-block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.od-block-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

.od-block-meta {
  font-size: 11px;
  color: #94a3b8;
  text-align: right;
  line-height: 1.35;
}

.od-route-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.od-route-item {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 10px;
  min-height: 44px;
}

.od-route-rail {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.od-route-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #94a3b8;
  margin-top: 4px;
  flex-shrink: 0;
  z-index: 1;
}

.od-route-start .od-route-dot {
  background: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

.od-route-waypoint .od-route-dot,
.od-route-mid .od-route-dot {
  background: #64748b;
}

.od-route-end .od-route-dot,
.od-route-depot .od-route-dot {
  background: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.od-route-line {
  flex: 1;
  width: 2px;
  margin: 4px 0 0;
  background: #e2e8f0;
  border-radius: 1px;
  min-height: 18px;
}

.od-route-main {
  min-width: 0;
  padding-bottom: 12px;
}

.od-route-item:last-child .od-route-main {
  padding-bottom: 0;
}

.od-route-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.od-route-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

.od-route-sub {
  font-size: 10px;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 1px 6px;
}

.od-route-name {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.4;
  word-break: break-word;
}

.od-route-contact {
  margin-top: 2px;
  font-size: 12px;
  color: #94a3b8;
}

.od-block-timeline .order-detail-timeline {
  margin-top: 2px;
}

.order-detail-side-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.order-detail-side-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.order-detail-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.order-detail-metrics.order-detail-metrics-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 1100px) {
  .od-metrics,
  .order-detail-metrics.order-detail-metrics-3 {
    grid-template-columns: 1fr;
  }
}

.order-detail-metric {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.order-detail-metric span {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.order-detail-metric strong {
  font-size: 18px;
  color: #0d9488;
  font-weight: 700;
}

.order-detail-current-stop {
  padding: 12px;
  border-radius: 10px;
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
}

.order-detail-current-label {
  font-size: 12px;
  color: #0d9488;
  font-weight: 600;
  margin-bottom: 4px;
}

.order-detail-current-name {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
}

.order-detail-pickup-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.order-detail-pickup-row strong {
  font-size: 16px;
  letter-spacing: 0.06em;
  color: #0f172a;
}

.order-detail-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 8px;
}

.order-detail-route-preview {
  margin: 0;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #f8fbff;
}

.order-detail-timeline-wrap {
  flex: 0 0 auto;
}

.order-detail-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.order-detail-timeline-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  padding: 8px 0;
}

.order-detail-timeline-rail {
  position: relative;
  display: flex;
  justify-content: center;
}

.order-detail-timeline-rail::after {
  content: '';
  position: absolute;
  top: 18px;
  bottom: -8px;
  width: 2px;
  background: #e2e8f0;
}

.order-detail-timeline-item:last-child .order-detail-timeline-rail::after {
  display: none;
}

.order-detail-timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #94a3b8;
  margin-top: 5px;
  position: relative;
  z-index: 1;
}

.order-detail-timeline-dot.start {
  background: #14b8a6;
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.15);
}

.order-detail-timeline-dot.end {
  background: #f97316;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.15);
}

.order-detail-timeline-body {
  min-width: 0;
}

.order-detail-timeline-text {
  font-size: 13px;
  color: #0f172a;
  line-height: 1.45;
}

.order-detail-timeline-time {
  margin-top: 2px;
  font-size: 12px;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}

.order-detail-timeline-item.interpolated .order-detail-timeline-time {
  color: #cbd5e1;
}

.order-detail-timeline-empty {
  font-size: 13px;
  color: var(--text-muted);
  padding: 8px 0;
}

.order-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
  margin-top: 0;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--border);
  background: #fff;
  position: relative;
  z-index: 2;
}

.order-detail-actions .btn,
.order-detail-actions .btn-primary {
  width: auto;
  min-width: 0;
}

.order-detail-map-panel {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.order-detail-map-shell {
  position: relative;
  flex: 1;
  min-height: 0;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.order-detail-map {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.order-detail-map-shell .leaflet-control-attribution {
  display: none !important;
}

.order-detail-map-float {
  position: absolute;
  z-index: 500;
  padding: 8px 12px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.1);
  line-height: 1.2;
}

.order-detail-map-float span {
  display: block;
  font-size: 15px;
  font-weight: 700;
}

.order-detail-map-float small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  opacity: 0.85;
}

.order-detail-map-float.duration {
  top: 14px;
  left: 14px;
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.order-detail-map-float.segment {
  top: 14px;
  left: 118px;
  background: #f0fdfa;
  color: #0f766e;
  border: 1px solid #99f6e4;
}

.order-detail-map-float.distance {
  top: 14px;
  left: 222px;
  background: #fff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
}

.order-detail-map-hint {
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 500;
  max-width: calc(100% - 28px);
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  color: var(--text-muted);
}

.btn-secondary {
  background: #fff;
  color: #0d9488;
  border: 1px solid #99f6e4;
}

.btn-secondary:hover:not(:disabled) {
  background: #f0fdfa;
  border-color: #5eead4;
}

.btn-secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.order-detail-vehicle-icon-wrap {
  background: transparent !important;
  border: none !important;
}

.order-detail-vehicle-icon {
  position: relative;
  width: 56px;
  height: 34px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  filter: drop-shadow(0 1px 3px rgba(15, 23, 42, 0.3));
}

.order-detail-vehicle-img {
  width: 54px;
  height: 30px;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.order-detail-vehicle-icon svg {
  width: 32px;
  height: 32px;
}

.order-detail-vehicle-batt {
  position: absolute;
  bottom: -2px;
  right: -4px;
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
}

@media (max-width: 960px) {
  .content.content-order-detail {
    overflow: auto;
  }

  .order-detail-page {
    overflow: visible;
  }

  .order-detail-layout {
    grid-template-columns: 1fr;
    min-height: auto;
    height: auto;
  }

  .order-detail-map-panel,
  .order-detail-map-shell,
  .order-detail-map {
    min-height: 360px;
    height: 360px;
  }

  .order-detail-side-scroll {
    max-height: none;
  }
}

/* —— 车辆告警弹窗（居中模态，类似小程序下单确认） —— */
body.vehicle-alert-open {
  overflow: hidden;
}

.vehicle-alert-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
}

.vehicle-alert-modal-mask.show {
  display: flex !important;
}

.vehicle-alert-modal-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.22);
  animation: vehicleAlertPop 0.28s ease-out;
}

@keyframes vehicleAlertPop {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.vehicle-alert-modal-accent {
  height: 5px;
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.vehicle-alert-modal-accent.level-warn {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.vehicle-alert-modal-body {
  padding: 24px 24px 8px;
  text-align: center;
}

.vehicle-alert-modal-icon-wrap {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fee2e2, #fecaca);
}

.vehicle-alert-modal-card.level-warn .vehicle-alert-modal-icon-wrap {
  background: linear-gradient(135deg, #ffedd5, #fed7aa);
}

.vehicle-alert-modal-icon {
  font-size: 32px;
  line-height: 1;
}

.vehicle-alert-modal-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--text);
}

.vehicle-alert-modal-card.level-danger .vehicle-alert-modal-title {
  color: #dc2626;
}

.vehicle-alert-modal-card.level-warn .vehicle-alert-modal-title {
  color: #d97706;
}

.vehicle-alert-modal-message {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0 0 10px;
}

.vehicle-alert-modal-meta {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 4px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #f8fafc;
}

.vehicle-alert-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: stretch;
  padding: 16px 20px 20px;
  border-top: 1px solid var(--border);
  background: #fafbfc;
}

.vehicle-alert-modal-actions .btn {
  flex: 1;
  min-height: 42px;
  font-size: 14px;
  font-weight: 600;
}

.vehicle-alert-modal-actions .btn-primary {
  box-shadow: 0 4px 14px rgba(31, 107, 255, 0.25);
}

/* —— 告警信息页 —— */
.alerts-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.alerts-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 2px 0;
}

.alerts-hero-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.2);
  flex-shrink: 0;
}

.alerts-hero-title {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
}

.alerts-hero-sub {
  margin: 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}

.alerts-stat-grid-wrap {
  margin: 0;
}

.alerts-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.alerts-stat-card {
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.alerts-stat-card:hover {
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.alerts-stat-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 6px;
}

.alerts-stat-value {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  margin-bottom: 4px;
}

.alerts-stat-value small {
  font-size: 16px;
  font-weight: 700;
  margin-left: 2px;
}

.alerts-stat-hint {
  font-size: 12px;
  color: #94a3b8;
}

.alerts-stat-total .alerts-stat-value {
  color: #1e293b;
}

.alerts-stat-unread {
  background: linear-gradient(180deg, #fff 0%, #fff7ed 100%);
  border-color: rgba(249, 115, 22, 0.2);
}

.alerts-stat-unread .alerts-stat-value {
  color: #ea580c;
}

.alerts-stat-active {
  background: linear-gradient(180deg, #fff 0%, #fef2f2 100%);
  border-color: rgba(239, 68, 68, 0.18);
}

.alerts-stat-active .alerts-stat-value {
  color: #dc2626;
}

.alerts-stat-threshold {
  background: linear-gradient(180deg, #fff 0%, #eff6ff 100%);
  border-color: rgba(59, 130, 246, 0.18);
}

.alerts-stat-threshold .alerts-stat-value {
  color: #2563eb;
}

.alerts-panel {
  overflow: hidden;
}

.alerts-toolbar-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
  overflow-x: auto;
}

.alerts-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.alerts-field-label {
  font-size: 13px;
  color: #64748b;
  white-space: nowrap;
  font-weight: 500;
}

.alerts-field-input {
  width: 132px;
  min-width: 110px;
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.alerts-field-input[type='date'] {
  width: 148px;
  min-width: 138px;
}

.alerts-btn {
  width: auto;
  min-width: 0;
  height: 32px;
  padding: 0 12px;
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 13px;
}

.alerts-toolbar-bar .btn-primary {
  box-shadow: 0 2px 8px rgba(31, 107, 255, 0.22);
}

.alerts-toolbar-divider {
  width: 1px;
  height: 28px;
  background: #e2e8f0;
  flex-shrink: 0;
  margin: 0 2px;
}

.alerts-btn-refresh {
  color: #475569;
}

.alerts-btn-mark {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #334155;
}

.alerts-btn-mark:hover {
  background: #f1f5f9;
}

.alerts-table-section {
  padding: 0 20px 16px;
}

.alerts-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 0 12px;
}

.alerts-summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 13px;
}

.alerts-summary-chip strong {
  font-weight: 700;
}

.alerts-summary-filter {
  font-size: 12px;
  color: #64748b;
}

.alerts-table-scroll {
  overflow-x: auto;
}

.alerts-data-table {
  min-width: 960px;
}

.alerts-data-table thead th {
  background: #f8fafc;
  font-size: 13px;
  color: #475569;
  font-weight: 600;
  white-space: nowrap;
}

.alerts-data-table tbody tr {
  transition: background 0.15s ease;
}

.alerts-data-table tbody tr:hover {
  background: #fafbff;
}

.alerts-data-table .col-seq {
  width: 56px;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}

.alerts-row-unread {
  background: linear-gradient(90deg, rgba(254, 242, 242, 0.65) 0%, rgba(255, 255, 255, 0) 100%);
}

.alerts-row-unread:hover {
  background: #fff5f5 !important;
}

.alerts-row-resolved {
  opacity: 0.88;
}

.alerts-time-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.alerts-time-text {
  font-size: 13px;
  color: #334155;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.alerts-unread-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
  flex-shrink: 0;
}

.alerts-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.alerts-type-icon {
  font-size: 13px;
  line-height: 1;
}

.alerts-type-badge.fault {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.15);
}

.alerts-type-badge.low_battery {
  background: #ffedd5;
  color: #c2410c;
  border: 1px solid rgba(249, 115, 22, 0.15);
}

.alerts-vehicle-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #334155;
  font-weight: 600;
  font-size: 13px;
}

.alerts-message-cell {
  max-width: 320px;
  font-size: 13px;
  color: #475569;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alerts-battery-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.alerts-battery-chip small {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.85;
}

.alerts-battery-chip.ok {
  background: #ecfdf5;
  color: #059669;
}

.alerts-battery-chip.mid {
  background: #fef9c3;
  color: #ca8a04;
}

.alerts-battery-chip.low {
  background: #ffedd5;
  color: #ea580c;
}

.alerts-battery-chip.fault {
  background: #fee2e2;
  color: #dc2626;
}

.alerts-empty-cell {
  color: #94a3b8;
}

.alerts-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.alerts-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.alerts-status-pill.active {
  background: #fef2f2;
  color: #dc2626;
}

.alerts-status-pill.active .alerts-status-dot {
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.alerts-status-pill.resolved {
  background: #ecfdf5;
  color: #059669;
}

.alerts-status-pill.resolved .alerts-status-dot {
  background: #10b981;
}

.alerts-read-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.alerts-read-badge.read {
  background: #f1f5f9;
  color: #64748b;
}

.alerts-read-badge.unread {
  background: #fff7ed;
  color: #ea580c;
  border: 1px solid rgba(249, 115, 22, 0.2);
}

.alerts-pager-wrap {
  border-top: 1px solid var(--border);
  padding: 12px 20px 16px;
}

.alerts-empty-state {
  padding: 48px 24px;
  text-align: center;
}

.alerts-empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  color: #059669;
  font-size: 26px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.alerts-empty-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: #334155;
}

.alerts-empty-sub {
  margin: 0;
  font-size: 13px;
  color: #94a3b8;
}

@media (max-width: 1100px) {
  .alerts-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .alerts-stat-grid {
    grid-template-columns: 1fr;
  }

  .alerts-toolbar-bar {
    flex-wrap: wrap;
  }
}

/* ========== 计费管理 ========== */
.badge-purple {
  background: #ede9fe;
  color: #6d28d9;
}

.billing-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.billing-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.billing-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
}

.billing-sub {
  margin: 6px 0 0;
  font-size: 13px;
  color: #94a3b8;
}

.billing-stat-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.billing-tabs {
  display: flex;
  gap: 8px;
  padding: 4px;
  background: #f1f5f9;
  border-radius: 12px;
  width: fit-content;
  max-width: 100%;
  flex-wrap: wrap;
}

.billing-tab {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
}

.billing-tab.active {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.billing-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.billing-toolbar .billing-search,
.billing-toolbar .form-input {
  width: 220px;
  min-width: 180px;
  max-width: 260px;
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
  flex: 0 0 auto;
}

.billing-toolbar .select-input {
  width: auto;
  min-width: 140px;
  max-width: 180px;
  height: 36px;
  flex: 0 0 auto;
  font-size: 13px;
}

.billing-toolbar .btn,
.billing-toolbar .btn-primary,
.billing-toolbar .btn-ghost {
  width: auto !important;
  min-width: 72px;
  height: 36px;
  padding: 0 14px;
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 13px;
  box-shadow: none;
}

.billing-toolbar .btn-primary {
  box-shadow: 0 2px 8px rgba(31, 107, 255, 0.2);
}

.billing-toolbar .btn-primary:hover {
  transform: none;
}

.billing-table-scroll {
  overflow-x: auto;
}

.billing-name {
  font-weight: 600;
  color: #0f172a;
}

.billing-phone {
  font-size: 12px;
  margin-top: 2px;
}

.billing-contract-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.billing-ops {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* 高于顶部铃铛 / 待处理滚动条 (z-index 10020) */
.billing-modal-mask {
  z-index: 11000 !important;
  align-items: flex-start;
  justify-content: center;
  padding: 72px 16px 32px;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.48);
}

.billing-config-modal,
.billing-logs-modal {
  max-width: 560px;
  width: min(560px, 94vw);
  max-height: calc(100vh - 104px);
  margin: 0 auto;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden !important;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
}

.billing-logs-modal {
  max-width: 720px;
}

.billing-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #eef2f7;
  background: #fff;
  flex-shrink: 0;
}

.billing-modal-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.billing-modal-desc {
  margin: 4px 0 0;
  font-size: 12px;
  color: #94a3b8;
}

.billing-modal-close {
  border: none;
  background: #f1f5f9;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
  flex-shrink: 0;
}

.billing-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.billing-modal-body {
  padding: 8px 20px 4px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  background: #f8fafc;
}

.billing-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid #eef2f7;
  background: #fff;
  flex-shrink: 0;
}

.billing-modal-foot .btn {
  width: auto !important;
  min-width: 96px;
}

.billing-section {
  background: #fff;
  border: 1px solid #e8eef6;
  border-radius: 12px;
  padding: 14px 14px 6px;
  margin-bottom: 12px;
}

.billing-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.billing-form-group {
  margin-bottom: 14px;
}

.billing-form-group > label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
}

.billing-phone-search-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.billing-phone-search-row .form-input {
  flex: 1;
  min-width: 0;
}

.billing-phone-search-row .btn {
  width: auto !important;
  flex-shrink: 0;
  height: 40px;
  padding: 0 16px;
}

.billing-user-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  max-height: 140px;
  overflow-y: auto;
}

.billing-user-empty {
  margin-top: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 13px;
  line-height: 1.45;
}

.billing-user-pick {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.billing-user-pick-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.billing-user-pick.is-disabled {
  cursor: not-allowed;
  background: #f8fafc;
  border-color: #e2e8f0;
  opacity: 0.88;
}

.billing-user-tag-exists {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}

.billing-user-pick:hover,
.billing-user-pick.active {
  border-color: #93c5fd;
  background: #eff6ff;
}

.billing-user-pick.is-disabled:hover {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.billing-selected-user {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.billing-selected-user.is-selected {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.billing-selected-tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: #10b981;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.billing-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
}

.billing-seg-item {
  position: relative;
  cursor: pointer;
  margin: 0;
}

.billing-seg-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.billing-seg-item span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.billing-seg-item input:checked + span {
  background: #fff;
  color: #1d4ed8;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

/* 经典胶囊标签 */
.billing-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.billing-pill {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.billing-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.billing-pill span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 32px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.billing-pill:hover span {
  border-color: #bfdbfe;
  color: #2563eb;
}

.billing-pill input:checked + span {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.billing-input-sm {
  width: 120px !important;
  max-width: 120px !important;
}

.billing-input-md {
  width: 220px !important;
  max-width: 220px !important;
}

.billing-input-lg {
  width: 100%;
  max-width: 360px !important;
}

.billing-input-date {
  width: 168px !important;
  max-width: 168px !important;
  flex-shrink: 0;
}

.billing-phone-search-row {
  justify-content: flex-start;
}

.billing-phone-search-row .billing-input-md {
  flex: 0 0 220px;
}

.billing-period-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.billing-period-tags {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.billing-tag {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.billing-tag-muted {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #94a3b8;
  font-weight: 600;
}

.billing-tag-sep {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
}

.billing-risk-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}

.billing-input-suffix {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.billing-input-suffix .form-input {
  min-width: 0;
}

.billing-input-suffix > span {
  flex-shrink: 0;
  color: #64748b;
  font-size: 13px;
  white-space: nowrap;
}

.billing-time-pair {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.billing-time-capsule {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
}

.billing-time-caption {
  display: block;
  font-size: 12px;
  color: #94a3b8;
}

.billing-time-pills {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.billing-time-pill-select {
  appearance: none;
  -webkit-appearance: none;
  height: 30px;
  min-width: 52px;
  padding: 0 10px;
  border: none;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.billing-time-pill-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.billing-time-colon {
  color: #94a3b8;
  font-weight: 700;
  flex-shrink: 0;
  padding: 0 2px;
}

.billing-time-to {
  flex-shrink: 0;
  color: #94a3b8;
  font-size: 13px;
  padding-bottom: 8px;
}

.billing-free-windows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.billing-free-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.billing-free-row-remove {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  margin-bottom: 1px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff1f2;
  color: #e11d48;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.billing-free-row-remove:hover {
  background: #ffe4e6;
}

.billing-free-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-top: 10px;
  border: 1px dashed #93c5fd;
  border-radius: 10px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.billing-free-add-btn:hover {
  background: #dbeafe;
}

.billing-vehicle-bind {
  margin-top: 4px;
}

.billing-vehicle-checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.billing-vehicle-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #334155;
  cursor: pointer;
}

.billing-vehicle-check-item input {
  flex-shrink: 0;
}

.billing-inherit-box {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 13px;
  line-height: 1.55;
}

.billing-expand-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-right: 4px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font-size: 11px;
  cursor: pointer;
}

.billing-expand-btn:hover {
  background: #f1f5f9;
}

.billing-boss-row {
  cursor: pointer;
}

.billing-boss-row:hover {
  background: #f8fafc;
}

.billing-expand-cell {
  white-space: nowrap;
  vertical-align: middle;
}

.billing-expand-indicator {
  display: inline-block;
  width: 1em;
  margin-right: 4px;
  color: #64748b;
  font-size: 11px;
  user-select: none;
}

.billing-staff-count {
  display: inline-block;
  min-width: 18px;
  font-size: 12px;
  color: #64748b;
}

.billing-boss-row.is-expanded {
  background: #f8fafc;
}

.billing-staff-row td {
  background: #f1f5f9;
  border-top: none;
}

.billing-staff-indent {
  padding-left: 18px;
  border-left: 3px solid #93c5fd;
}

.billing-staff-empty {
  padding: 12px 16px 12px 48px !important;
  color: #94a3b8;
  background: #f8fafc;
}

.billing-ops {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}

.billing-ops .btn,
.billing-ops .billing-action-btn {
  width: auto !important;
  min-width: 72px;
  height: 30px;
  padding: 0 10px;
  margin: 0;
  font-size: 12px;
  line-height: 28px;
  border-radius: 8px;
  box-shadow: none;
  white-space: nowrap;
  background: #fff !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
}

.billing-ops .btn:hover,
.billing-ops .billing-action-btn:hover {
  background: #f8fafc !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
  transform: none;
}

.billing-vehicle-col {
  width: 110px;
  max-width: 120px;
  vertical-align: top;
}

.billing-vehicle-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.billing-vehicle-stack-item {
  display: block;
  max-width: 108px;
  padding: 2px 0;
  font-size: 12px;
  line-height: 1.35;
  color: #334155;
  word-break: break-all;
  font-variant-numeric: tabular-nums;
}

.billing-check-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 0 14px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  cursor: pointer;
}

.billing-check-card input {
  margin-top: 3px;
  flex-shrink: 0;
}

.billing-check-card span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.billing-check-card strong {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.billing-check-card em {
  font-style: normal;
  font-size: 12px;
  color: #94a3b8;
}

.billing-textarea {
  min-height: 76px;
  resize: vertical;
}

.billing-field-hint {
  margin: 6px 0 0;
  font-size: 12px;
}

.billing-logs-body {
  max-height: 60vh;
  overflow: auto;
  padding: 16px 20px;
}

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

.billing-radio,
.billing-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #334155;
  cursor: pointer;
}

.required-star {
  color: #ef4444;
}

@media (max-width: 900px) {
  .billing-stat-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .billing-time-to {
    width: 100%;
    text-align: center;
    padding: 0;
  }

  .billing-input-md,
  .billing-phone-search-row .billing-input-md {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 auto;
  }

  .billing-input-lg {
    max-width: 100% !important;
  }
}

.invoices-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.invoices-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.invoices-toolbar .form-input,
.invoices-toolbar .select-input {
  width: 180px;
  min-width: 140px;
  max-width: 220px;
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
  flex: 0 0 auto;
}

.invoices-toolbar .invoices-search-input {
  width: 240px;
  max-width: 280px;
}

.invoices-toolbar .btn,
.invoices-toolbar .btn-primary {
  width: auto !important;
  min-width: 72px;
  height: 36px;
  padding: 0 16px;
  flex: 0 0 auto;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(31, 107, 255, 0.2);
}

.invoices-toolbar .btn-primary:hover {
  transform: none;
}

.invoices-stats {
  font-size: 13px;
  color: var(--text-muted);
}

.invoices-table-scroll {
  overflow-x: auto;
}

.invoices-table-scroll .data-table {
  min-width: 1080px;
}

.invoices-table-scroll .col-actions {
  white-space: normal;
  min-width: 168px;
}

.invoices-table-scroll .col-actions .btn,
.invoices-table-scroll .col-actions .btn-primary {
  width: auto !important;
  min-width: 72px;
  height: 32px;
  padding: 0 12px;
  margin: 0 4px 4px 0;
  box-shadow: none;
}

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

.invoice-cell-sub {
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
}

.invoice-modal-box {
  max-width: 720px;
}

.invoice-detail-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  margin-bottom: 16px;
}

.invoice-kv {
  min-width: 0;
}

.invoice-kv .k {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.invoice-kv .v {
  font-size: 14px;
  color: var(--text);
  word-break: break-all;
  line-height: 1.45;
}

.invoice-kv.span-2 {
  grid-column: 1 / -1;
}

.invoice-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}

.invoice-file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.invoice-file-row input[type='file'] {
  max-width: 260px;
  font-size: 13px;
}

.invoice-file-name {
  font-size: 13px;
  color: var(--text-muted);
}

.invoice-reject-input {
  height: auto;
  min-height: 88px;
  padding: 10px 14px;
  resize: vertical;
}

.invoice-modal-box .modal-actions .btn-ghost,
.invoice-modal-box .modal-actions .btn-primary {
  width: auto !important;
}

@media (max-width: 720px) {
  .invoice-detail-body,
  .invoice-form-grid {
    grid-template-columns: 1fr;
  }
}
