/* ===== 顺丰同城跑单系统 - 全局样式 ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #e8400c;
  --primary-dark: #c73008;
  --primary-light: #ff6b3d;
  --secondary: #1a1a2e;
  --accent: #f5a623;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --dark: #0f172a;
  --darker: #020617;
  --card-bg: #1e293b;
  --card-border: rgba(255,255,255,0.06);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --sidebar-width: 260px;
  --header-height: 64px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.4);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --gradient-primary: linear-gradient(135deg, #e8400c 0%, #ff6b3d 100%);
  --gradient-dark: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  --gradient-card: linear-gradient(145deg, #1e293b 0%, #162032 100%);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--darker);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }

/* ===== 布局 ===== */
.layout { display: flex; min-height: 100vh; }

/* ===== 侧边栏 ===== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--secondary);
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border-right: 1px solid rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: var(--transition);
  overflow: hidden;
}

.sidebar-logo {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  text-decoration: none;
}

.sidebar-logo .logo-icon {
  width: 40px; height: 40px;
  background: var(--gradient-primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(232, 64, 12, 0.4);
  flex-shrink: 0;
}

.sidebar-logo .logo-text {
  line-height: 1.2;
}

.sidebar-logo .logo-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.3px;
}

.sidebar-logo .logo-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }

.nav-section { margin-bottom: 24px; }

.nav-section-title {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 0 12px;
  margin-bottom: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 2px;
  position: relative;
}

.nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(232,64,12,0.2), rgba(255,107,61,0.1));
  color: var(--primary-light);
  border: 1px solid rgba(232,64,12,0.2);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 20px;
  background: var(--gradient-primary);
  border-radius: 0 3px 3px 0;
}

.nav-item .nav-icon {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.nav-badge {
  margin-left: auto;
  background: var(--primary);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04);
}

.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.user-role { font-size: 11px; color: var(--text-muted); }

/* ===== 主内容区 ===== */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== 顶部导航栏 ===== */
.topbar {
  height: var(--header-height);
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-left { display: flex; align-items: center; gap: 16px; }

.topbar-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary-light); }
.breadcrumb .sep { color: var(--text-muted); }

.topbar-right { display: flex; align-items: center; gap: 12px; }

.topbar-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  font-size: 16px;
}

.topbar-btn:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
}

.date-badge {
  background: rgba(232,64,12,0.15);
  border: 1px solid rgba(232,64,12,0.3);
  color: var(--primary-light);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===== 页面内容 ===== */
.page-content { padding: 28px; flex: 1; }

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}

.page-header-left {}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

/* ===== 统计卡片 ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--gradient-card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  border-radius: 50%;
  opacity: 0.06;
  transform: translate(20px, -20px);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(255,255,255,0.1);
}

.stat-card.orange::before  { background: #e8400c; }
.stat-card.green::before   { background: #10b981; }
.stat-card.blue::before    { background: #3b82f6; }
.stat-card.purple::before  { background: #8b5cf6; }
.stat-card.yellow::before  { background: #f59e0b; }

.stat-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 16px;
}

.stat-card.orange .stat-icon { background: rgba(232,64,12,0.15); }
.stat-card.green  .stat-icon { background: rgba(16,185,129,0.15); }
.stat-card.blue   .stat-icon { background: rgba(59,130,246,0.15); }
.stat-card.purple .stat-icon { background: rgba(139,92,246,0.15); }
.stat-card.yellow .stat-icon { background: rgba(245,158,11,0.15); }

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-change {
  position: absolute;
  top: 20px; right: 20px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
}

.stat-change.up { background: rgba(16,185,129,0.15); color: #10b981; }
.stat-change.down { background: rgba(239,68,68,0.15); color: #ef4444; }

/* ===== 卡片 ===== */
.card {
  background: var(--gradient-card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

.card-body { padding: 24px; }

/* ===== 表格 ===== */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  background: rgba(255,255,255,0.03);
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  white-space: nowrap;
  border-bottom: 1px solid var(--card-border);
}

tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: var(--transition);
}

tbody tr:hover { background: rgba(255,255,255,0.03); }
tbody tr:last-child { border-bottom: none; }

tbody td {
  padding: 13px 16px;
  color: var(--text-secondary);
  vertical-align: middle;
}

/* ===== 徽章 ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.badge-success { background: rgba(16,185,129,0.15); color: #10b981; border: 1px solid rgba(16,185,129,0.2); }
.badge-danger  { background: rgba(239,68,68,0.15);  color: #ef4444;  border: 1px solid rgba(239,68,68,0.2); }
.badge-warning { background: rgba(245,158,11,0.15); color: #f59e0b;  border: 1px solid rgba(245,158,11,0.2); }
.badge-info    { background: rgba(59,130,246,0.15); color: #60a5fa;  border: 1px solid rgba(59,130,246,0.2); }
.badge-primary { background: rgba(232,64,12,0.15);  color: #ff6b3d;  border: 1px solid rgba(232,64,12,0.2); }
.badge-muted   { background: rgba(100,116,139,0.15); color: #94a3b8; border: 1px solid rgba(100,116,139,0.2); }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  outline: none;
  user-select: none;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 12px rgba(232,64,12,0.35);
}
.btn-primary:hover { box-shadow: 0 6px 20px rgba(232,64,12,0.5); filter: brightness(1.1); }

.btn-secondary {
  background: rgba(255,255,255,0.07);
  color: var(--text-secondary);
  border-color: var(--card-border);
}
.btn-secondary:hover { background: rgba(255,255,255,0.12); color: var(--text-primary); }

.btn-success { background: linear-gradient(135deg, #059669, #10b981); color: white; box-shadow: 0 4px 12px rgba(16,185,129,0.3); }
.btn-success:hover { box-shadow: 0 6px 20px rgba(16,185,129,0.4); filter: brightness(1.1); }

.btn-danger  { background: linear-gradient(135deg, #dc2626, #ef4444); color: white; box-shadow: 0 4px 12px rgba(239,68,68,0.3); }
.btn-danger:hover { box-shadow: 0 6px 20px rgba(239,68,68,0.4); filter: brightness(1.1); }

.btn-warning { background: linear-gradient(135deg, #d97706, #f59e0b); color: white; box-shadow: 0 4px 12px rgba(245,158,11,0.3); }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 28px; font-size: 15px; }
.btn-icon { padding: 8px; width: 34px; height: 34px; border-radius: var(--radius-sm); justify-content: center; }

.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== 表单 ===== */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-label .req { color: var(--primary-light); margin-left: 2px; }

.form-control {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 13.5px;
  transition: var(--transition);
  outline: none;
  font-family: inherit;
}

.form-control:focus {
  border-color: var(--primary);
  background: rgba(232,64,12,0.05);
  box-shadow: 0 0 0 3px rgba(232,64,12,0.1);
}

.form-control::placeholder { color: var(--text-muted); }

select.form-control option {
  background: var(--card-bg);
  color: var(--text-primary);
}

textarea.form-control { resize: vertical; min-height: 90px; }

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 5px; }

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.form-check input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--primary);
}

/* ===== 搜索/过滤栏 ===== */
.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  align-items: flex-end;
}

.filter-bar .form-group { margin-bottom: 0; }

.search-box {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-box .search-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 15px;
}

.search-box input {
  padding-left: 38px;
}

/* ===== 分页 ===== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid var(--card-border);
  flex-wrap: wrap;
  gap: 12px;
}

.pagination-info { font-size: 12px; color: var(--text-muted); }

.pagination-links { display: flex; gap: 4px; }

.page-link {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid var(--card-border);
  background: transparent;
  transition: var(--transition);
  cursor: pointer;
}

.page-link:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
.page-link.active { background: var(--primary); color: white; border-color: var(--primary); }
.page-link.disabled { opacity: 0.4; pointer-events: none; }

/* ===== 模态框 ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-overlay.show { opacity: 1; }

.modal {
  background: #1e2a3a;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95) translateY(20px);
  transition: transform 0.25s ease;
}

.modal-overlay.show .modal { transform: scale(1) translateY(0); }

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title { font-size: 16px; font-weight: 600; color: var(--text-primary); }

.modal-close {
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: var(--transition);
}

.modal-close:hover { background: rgba(239,68,68,0.15); color: #ef4444; }

.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--card-border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ===== 提示Toast ===== */
.toast-container {
  position: fixed;
  top: 80px; right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  min-width: 260px;
  max-width: 380px;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toastIn 0.3s ease forwards;
  backdrop-filter: blur(10px);
}

.toast.success { background: rgba(16,185,129,0.95); color: white; }
.toast.error   { background: rgba(239,68,68,0.95); color: white; }
.toast.warning { background: rgba(245,158,11,0.95); color: white; }
.toast.info    { background: rgba(59,130,246,0.95); color: white; }

.toast.removing { animation: toastOut 0.3s ease forwards; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(100%); }
}

/* ===== 数据详情 ===== */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.detail-item {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.detail-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 5px;
  font-weight: 600;
}

.detail-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.detail-value.big {
  font-size: 22px;
  font-weight: 800;
}

.detail-value.income { color: var(--success); }
.detail-value.distance { color: var(--info); }

/* ===== 图表区域 ===== */
.chart-container { position: relative; height: 280px; }

/* ===== 空状态 ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.4; }
.empty-title { font-size: 16px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.empty-desc { font-size: 13px; color: var(--text-muted); }

/* ===== 加载 ===== */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2,6,23,0.8);
  backdrop-filter: blur(4px);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}

.spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(232,64,12,0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 费用明细 ===== */
.fee-breakdown {
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.fee-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  font-size: 13px;
}

.fee-row:last-child { border-bottom: none; }
.fee-row.total { font-weight: 700; font-size: 14px; color: var(--success); }
.fee-name { color: var(--text-secondary); }
.fee-val { color: var(--text-primary); font-weight: 500; }
.fee-row.total .fee-val { color: var(--success); font-size: 16px; }

/* ===== 时间线 ===== */
.timeline { padding: 8px 0; }

.timeline-item {
  display: flex;
  gap: 14px;
  padding-bottom: 20px;
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 28px;
  bottom: 0;
  width: 2px;
  background: rgba(255,255,255,0.06);
}

.timeline-item:last-child::before { display: none; }

.timeline-dot {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
}

.timeline-dot.green { background: rgba(16,185,129,0.2); color: #10b981; }
.timeline-dot.blue  { background: rgba(59,130,246,0.2);  color: #60a5fa; }
.timeline-dot.orange{ background: rgba(232,64,12,0.2);   color: #ff6b3d; }

.timeline-content { flex: 1; padding-top: 4px; }
.timeline-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.timeline-desc  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  :root { --sidebar-width: 220px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .page-content { padding: 16px; }
  .topbar { padding: 0 16px; }
  .form-row { grid-template-columns: 1fr; }
}

/* ===== 特殊样式 ===== */
.income-highlight {
  font-size: 24px;
  font-weight: 800;
  color: transparent;
  background: linear-gradient(135deg, #10b981, #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.glow-text {
  text-shadow: 0 0 20px rgba(232,64,12,0.5);
}

.divider {
  height: 1px;
  background: var(--card-border);
  margin: 20px 0;
}

.text-success { color: var(--success) !important; }
.text-danger  { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-info    { color: var(--info) !important; }
.text-muted   { color: var(--text-muted) !important; }
.text-primary-c { color: var(--primary-light) !important; }

.fw-bold { font-weight: 700; }
.fw-600  { font-weight: 600; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }

.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

.w-full { width: 100%; }

/* ===== 仪表盘首页 ===== */
.welcome-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(232,64,12,0.12) 0%, rgba(15,23,42,0) 60%);
  border: 1px solid rgba(232,64,12,0.15);
  border-radius: var(--radius-lg);
  padding: 20px 28px;
  margin-bottom: 28px;
  gap: 16px;
}

.welcome-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.welcome-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(232,64,12,0.4);
}

.welcome-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.welcome-sub {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.level-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}

.level-badge.level-普通骑手, .level-badge.level-普通 {
  background: rgba(100,116,139,0.2);
  color: #94a3b8;
  border: 1px solid rgba(100,116,139,0.3);
}
.level-badge.level-银牌骑手, .level-badge.level-银牌 {
  background: rgba(148,163,184,0.2);
  color: #cbd5e1;
  border: 1px solid rgba(148,163,184,0.4);
}
.level-badge.level-金牌骑手, .level-badge.level-金牌 {
  background: rgba(245,158,11,0.15);
  color: #f59e0b;
  border: 1px solid rgba(245,158,11,0.3);
}
.level-badge.level-铂金骑手, .level-badge.level-铂金 {
  background: rgba(139,92,246,0.15);
  color: #a78bfa;
  border: 1px solid rgba(139,92,246,0.3);
}

.section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 14px;
  padding-left: 2px;
}

.stats-grid-4 {
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 14px;
}

.stat-card .stat-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* 图表区域双列 */
.charts-row {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  margin-bottom: 20px;
}

/* 底部双列 */
.bottom-row {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
}

.side-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 订单路线 */
.route-cell { max-width: 200px; }
.route-from, .route-to {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.route-from { color: var(--text-secondary); margin-bottom: 2px; }

.order-no {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  color: var(--text-muted);
}

/* 骑手卡片 */
.rider-card .card-body { padding: 20px; }

.rider-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.rider-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}

.rider-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.rider-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 12px;
  text-align: center;
}

.rider-stat-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.rider-stat-key {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rider-join {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  padding-top: 8px;
  border-top: 1px solid var(--card-border);
}

/* 快捷操作 */
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.quick-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}

.quick-btn:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.1);
  transform: translateY(-1px);
}

.quick-btn-primary {
  background: rgba(232,64,12,0.12);
  border-color: rgba(232,64,12,0.25);
  color: var(--primary-light);
  grid-column: span 2;
  justify-content: center;
}

.quick-btn-primary:hover {
  background: rgba(232,64,12,0.2);
  color: var(--primary-light);
}

.quick-icon { font-size: 16px; }

/* 类型图例 */
.type-legend {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.type-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.type-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.type-name { flex: 1; color: var(--text-secondary); }
.type-pct  { font-weight: 700; color: var(--text-primary); }

/* 响应式仪表盘 */
@media (max-width: 1280px) {
  .stats-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .charts-row   { grid-template-columns: 1fr; }
  .bottom-row   { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .welcome-bar { flex-direction: column; align-items: flex-start; }
  .stats-grid-4 { grid-template-columns: 1fr 1fr; }
  .quick-actions { grid-template-columns: 1fr 1fr; }
  .quick-btn-primary { grid-column: span 2; }
}

/* ===== 新增订单布局 ===== */
.add-order-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: flex-start;
}

.order-form-wrap {}

.order-preview {}

.sticky-preview {
  position: sticky;
  top: 80px;
}

.mb-20 { margin-bottom: 20px; }

.total-income-box {
  background: linear-gradient(135deg, rgba(16,185,129,0.08), rgba(16,185,129,0.03));
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  margin-top: 8px;
}

.total-income-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.total-income-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.total-prefix {
  font-size: 24px;
  font-weight: 800;
  color: var(--success);
}

.total-income-input {
  background: transparent;
  border: none;
  outline: none;
  font-size: 32px;
  font-weight: 900;
  color: var(--success);
  width: 160px;
  text-align: center;
  font-family: inherit;
}

.total-income-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* 提示列表 */
.tip-list { display: flex; flex-direction: column; gap: 10px; }

.tip-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.tip-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; }

/* 订单号样式 */
.order-no-wrap { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.order-no-text { font-family: 'Courier New', monospace; font-size: 11px; color: var(--text-muted); }

/* ===== 统计页专属 ===== */
.period-tabs {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 4px;
}

.period-tab {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}

.period-tab:hover { color: var(--text-secondary); background: rgba(255,255,255,0.04); }
.period-tab.active { background: var(--gradient-primary); color: white; box-shadow: 0 2px 8px rgba(232,64,12,0.3); }

/* 高峰对比 */
.peak-compare {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.peak-item {
  flex: 1;
  text-align: center;
  padding: 16px;
  border-radius: var(--radius-sm);
}

.peak-hot { background: rgba(232,64,12,0.08); border: 1px solid rgba(232,64,12,0.15); }
.peak-off { background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.15); }

.peak-icon { font-size: 22px; margin-bottom: 6px; }

.peak-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.peak-lbl { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.peak-cnt { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.peak-divider {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 8px;
}

/* 接单方式条形图 */
.mode-bar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 12.5px;
}

.mode-name { min-width: 70px; color: var(--text-secondary); }

.mode-bar-wrap {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
}

.mode-bar {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 4px;
  transition: width 0.6s ease;
  min-width: 4px;
}

.mode-pct { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

/* 排名徽章 */
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  color: white;
}

.rank-1 { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 2px 8px rgba(245,158,11,0.4); }
.rank-2 { background: linear-gradient(135deg, #94a3b8, #64748b); }
.rank-3 { background: linear-gradient(135deg, #e8400c, #c73008); }
.rank-4, .rank-5 { background: rgba(100,116,139,0.3); color: var(--text-muted); }

/* ===== 每日记录 ===== */
.month-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.month-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  padding: 0 8px;
}

/* 日历热力图 */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal-head {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cal-cell {
  border-radius: 8px;
  padding: 8px 6px;
  min-height: 64px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  transition: var(--transition);
  cursor: default;
}

.cal-cell.has-data {
  cursor: pointer;
}

.cal-cell.has-data:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: rgba(255,255,255,0.08);
}

.cal-cell.cal-empty { background: transparent; border-color: transparent; }

.cal-cell.today {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 1px rgba(232,64,12,0.3);
}

.heat-0 { background: rgba(255,255,255,0.02); }
.heat-1 { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.15) !important; }
.heat-2 { background: rgba(16,185,129,0.22); border-color: rgba(16,185,129,0.25) !important; }
.heat-3 { background: rgba(16,185,129,0.35); border-color: rgba(16,185,129,0.4) !important; }
.heat-4 { background: rgba(16,185,129,0.5); border-color: rgba(16,185,129,0.55) !important; }

.cal-day {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.cal-income {
  font-size: 10px;
  font-weight: 700;
  color: var(--success);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-orders {
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 1px;
}

.cal-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--card-border);
  font-size: 11px;
  color: var(--text-muted);
}

.cal-legend-label { margin-right: 2px; }

.today-row td { background: rgba(232,64,12,0.04) !important; }

/* ===== 系统设置布局 ===== */
.admin-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: flex-start;
}

.admin-main {}
.admin-side { position: sticky; top: 80px; }

.settings-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--card-border);
}

.sysinfo-list { display: flex; flex-direction: column; gap: 12px; }

.sysinfo-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  font-size: 13px;
}

.sysinfo-item:last-child { border-bottom: none; }
.sysinfo-key { color: var(--text-muted); font-weight: 500; }
.sysinfo-val { color: var(--text-primary); font-weight: 600; }

.rule-preview { display: flex; flex-direction: column; gap: 12px; }

.rule-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
}

.rule-icon { font-size: 20px; flex-shrink: 0; }
.rule-title { font-size: 11px; color: var(--text-muted); margin-bottom: 2px; font-weight: 600; }
.rule-val { font-size: 14px; font-weight: 700; color: var(--text-primary); }

.maintenance-grid { display: flex; flex-direction: column; gap: 12px; }

.maintenance-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
}

.maintenance-icon { font-size: 24px; flex-shrink: 0; }
.maintenance-info { flex: 1; }
.maintenance-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.maintenance-desc { font-size: 12px; color: var(--text-muted); }

/* 响应式 */
@media (max-width: 1024px) {
  .add-order-layout { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-side { position: static; }
  .sticky-preview { position: static; }
}
