/* ===== 璁捐 Token ===== */
:root {
  --background: #f3f6f9;
  --card: #ffffff;
  --foreground: #1f2937;
  --muted-foreground: #6b7a8f;
  --primary: #0e6bc4;
  --primary-foreground: #ffffff;
  --accent: #e8eef5;
  --border: #d9dfe7;
  --ring: #0e6bc4;
  --sidebar: #f3f6f9;
  --sidebar-foreground: #1f2937;
  --sidebar-accent: #e8eef5;
  --sidebar-primary: #0e6bc4;
  --sidebar-primary-foreground: #ffffff;
  --sidebar-border: #d9dfe7;
  --secondary: #e8eef5;
  --destructive: #e03131;
  --destructive-foreground: #ffffff;
  --muted: #e8eef5;

  --success: #22a06b;
  --success-bg: #e6f7ef;
  --success-border: #b8e6cf;
  --warning: #f59e0b;
  --warning-bg: #fff7e0;
  --warning-border: #f5d99a;
  --danger: #e03131;
  --danger-bg: #fdecec;
  --danger-border: #f5b5b5;
  --info: #0ea5e9;
  --info-bg: #e0f2fe;
  --info-border: #a5d8f0;
  --purple: #a855f7;
  --purple-bg: #faf5ff;
  --purple-border: #e9d5ff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--background);
  color: var(--foreground);
  font-size: 15px;
  line-height: 1.5;
}

.app { display: flex; min-height: 100vh; }

/* ===== 渚ц竟鏍?===== */
.sidebar {
  width: 190px;
  background: var(--sidebar);
  color: var(--sidebar-foreground);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  border-right: 1px solid var(--sidebar-border);
}
.sidebar-header {
  padding: 12px 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-header .brand-icon {
  width: 32px; height: 32px;
  background: var(--primary);
  color: var(--primary-foreground);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  flex-shrink: 0;
}
.sidebar-header .brand-text { display: flex; flex-direction: column; }
.sidebar-header .brand-title { font-size: 14px; font-weight: 600; color: var(--foreground); }
.sidebar-header .brand-sub { font-size: 12px; color: var(--muted-foreground); }

.sidebar-nav { flex: 1; padding: 8px; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 8px;
  height: 36px;
  padding: 0 10px;
  color: var(--sidebar-foreground);
  text-decoration: none;
  font-size: 14px;
  border-radius: 6px;
  transition: background 0.15s;
  margin-bottom: 2px;
}
.nav-item:hover { background: var(--sidebar-accent); }
.nav-item.active {
  background: var(--sidebar-primary);
  color: var(--sidebar-primary-foreground);
}
.nav-icon { font-size: 16px; width: 18px; text-align: center; flex-shrink: 0; }

.sidebar-footer {
  padding: 8px;
  border-top: 1px solid var(--sidebar-border);
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 20px;
}

/* ===== 涓诲唴瀹瑰尯鍖呰 ===== */
.main-wrapper {
  margin-left: 190px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== 椤堕儴瀵艰埅鏍?===== */
.top-navbar {
  height: 56px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.navbar-left {
  display: flex;
  align-items: center;
}
.navbar-page-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
}
.navbar-right {
  display: flex;
  align-items: center;
}

/* ===== 鐢ㄦ埛鑿滃崟 ===== */
.user-menu {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.user-menu:hover {
  background: var(--accent);
}
.user-menu.active {
  background: var(--accent);
}
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #0a5aa8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  flex-shrink: 0;
}
.user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
}
.user-role {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 2px;
}
.user-arrow {
  font-size: 10px;
  color: var(--muted-foreground);
  transition: transform 0.2s;
}
.user-menu.active .user-arrow {
  transform: rotate(180deg);
}

/* ===== 鐢ㄦ埛涓嬫媺鑿滃崟 ===== */
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 9999;
  overflow: hidden;
}
.user-menu.active .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-header {
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--primary), #0a5aa8);
}
.dropdown-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  flex-shrink: 0;
}
.dropdown-user-info {
  flex: 1;
  min-width: 0;
}
.dropdown-user-name {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dropdown-user-role {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  margin-top: 2px;
}
.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--foreground);
  text-decoration: none;
  transition: background 0.15s;
  cursor: pointer;
}
.dropdown-item:hover {
  background: var(--accent);
}
.dropdown-item.danger {
  color: var(--destructive);
}
.dropdown-item.danger:hover {
  background: var(--danger-bg);
}
.dropdown-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

/* ===== 涓诲唴瀹瑰尯 ===== */
.main-content {
  flex: 1;
  padding: 24px;
  min-height: calc(100vh - 56px);
}

/* ===== 椤甸潰鏍囬鍖?===== */
.page-header {
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.page-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--foreground);
}
.page-header .page-desc {
  font-size: 14px;
  color: var(--muted-foreground);
  margin-top: 4px;
}

/* ===== 鎸夐挳 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  font-family: inherit;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { background: #0c5aa8; }
.btn-secondary { background: var(--secondary); color: var(--foreground); border-color: var(--border); }
.btn-secondary:hover { background: #dde5ed; }
.btn-outline { background: transparent; color: var(--foreground); border-color: var(--border); }
.btn-outline:hover { background: var(--accent); }
.btn-destructive { background: var(--destructive); color: var(--destructive-foreground); }
.btn-destructive:hover { background: #c02626; }
.btn-ghost { background: transparent; color: var(--foreground); border: none; }
.btn-ghost:hover { background: var(--accent); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12px; }
.btn-icon { width: 40px; height: 40px; padding: 0; }
.btn-block { width: 100%; }
.btn-link {
  background: none; border: none; color: var(--primary);
  cursor: pointer; padding: 4px 8px; font-size: 13px;
  font-family: inherit;
}
.btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: var(--destructive); }
.btn-link.btn-danger { color: var(--destructive); }

/* ===== 鍗＄墖 ===== */
.card {
  background: var(--card);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  margin-bottom: 24px;
  border: 1px solid var(--border);
  transition: box-shadow 0.2s;
}
.card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.card-title {
  font-size: 16px; font-weight: 600; margin-bottom: 16px;
  display: flex; justify-content: space-between; align-items: center;
  color: var(--foreground);
}
.card-title .card-subtitle {
  font-size: 13px; font-weight: 400; color: var(--muted-foreground);
}

/* ===== 琛ㄦ牸 ===== */
.table-wrap { overflow-x: auto; }
table {
  width: 100%; border-collapse: collapse; font-size: 15px;
}
th, td {
  padding: 0 16px;
  text-align: left;
  border-bottom: 1px solid rgba(217,223,231,0.5);
  height: 48px;
  vertical-align: middle;
}
th {
  background: transparent;
  font-weight: 500;
  color: var(--muted-foreground);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
tr:hover { background: rgba(232,238,245,0.5); }
tr.row-overdue { background: rgba(224,49,49,0.05); }
tr.row-overdue:hover { background: rgba(224,49,49,0.1); }
tr.row-today { background: rgba(245,158,11,0.05); }
tr.row-today:hover { background: rgba(245,158,11,0.1); }
tr.row-completed { opacity: 0.6; }
tr.row-completed td { text-decoration: line-through; }

/* ===== Badge (outline 椋庢牸) ===== */
.badge {
  display: inline-flex; align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid;
  white-space: nowrap;
}
.badge-green { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.badge-red { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.badge-urgent { background: #fff2e8; color: #ff4d00; border-color: #ffbb96; }
.badge-orange { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.badge-blue { background: var(--info-bg); color: var(--info); border-color: var(--info-border); }
.badge-gray { background: transparent; color: var(--muted-foreground); border-color: rgba(107,122,143,0.3); }
.badge-yellow { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.badge-purple { background: var(--purple-bg); color: var(--purple); border-color: var(--purple-border); }

/* ===== 琛ㄥ崟 ===== */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; margin-bottom: 6px; font-size: 14px; color: var(--foreground); font-weight: 500;
}
.form-group label .required { color: var(--destructive); }
.field-error { color: var(--destructive); font-size: 12px; margin-top: 4px; display: none; }
.field-error.show { display: block; }
.form-control.error { border-color: var(--destructive); }
.form-control {
  width: 100%; height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  background: var(--card);
  color: var(--foreground);
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}
.form-control:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 2px rgba(14,107,196,0.15);
}
textarea.form-control { min-height: 80px; padding: 8px 12px; resize: vertical; height: auto; }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }

/* ===== 筛选栏 ===== */
.filter-bar {
  display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; align-items: center;
  position: relative;
  z-index: 100;
}
.filter-bar .form-control { width: auto; min-width: 160px; }
.filter-bar .search-input { flex: 0.75; min-width: 150px; max-width: 600px; }

/* ===== 寮圭獥 ===== */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45); z-index: 9999;
  display: flex; align-items: center; justify-content: center;
}
.modal {
  background: var(--card);
  border-radius: 12px;
  width: 1050px; max-width: 92vw;
  max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}
.modal-header {
  padding: 20px 24px 16px;
  display: flex; justify-content: space-between; align-items: flex-start;
}
.modal-header h3 { font-size: 18px; font-weight: 600; }
.modal-header .modal-desc { font-size: 14px; color: var(--muted-foreground); margin-top: 4px; }
.modal-close {
  background: none; border: none; font-size: 24px; cursor: pointer; color: var(--muted-foreground);
  line-height: 1; width: 32px; height: 32px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--accent); color: var(--foreground); }
.modal-body { padding: 0 24px 20px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 8px;
}

/* ===== 棣栭〉鎸囨爣鍗?===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--card);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.stat-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.stat-card .stat-icon { font-size: 20px; margin-bottom: 8px; }
.stat-card .stat-value {
  font-size: 24px; font-weight: 700; color: var(--foreground);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.stat-card .stat-label {
  font-size: 12px; color: var(--muted-foreground); margin-top: 4px;
  display: flex; align-items: center; gap: 4px;
}
.stat-card.primary .stat-icon { color: var(--primary); }
.stat-card.success .stat-icon { color: var(--success); }
.stat-card.warning .stat-icon { color: var(--warning); }
.stat-card.danger .stat-icon { color: var(--danger); }
.stat-card.info .stat-icon { color: var(--info); }

/* ===== 鐘舵€佸垎甯冩潯 ===== */
.status-bar {
  display: flex; height: 24px; border-radius: 999px; overflow: hidden;
  background: rgba(232,238,245,0.5); margin: 12px 0;
}
.status-bar-segment {
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #fff; font-weight: 500;
  transition: width 0.6s ease-out;
}
.status-legend {
  display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px;
}
.status-legend-item {
  display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted-foreground);
}
.status-legend-dot {
  width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
}

/* ===== 绌虹姸鎬?===== */
.empty-state {
  text-align: center; padding: 48px 20px; color: var(--muted-foreground);
}
.empty-state .empty-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.5; }

/* ===== Toast ===== */
.toast {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%);
  background: var(--foreground); color: #fff;
  padding: 10px 20px; border-radius: 6px;
  z-index: 2000; font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ===== 澶囧繕 ===== */
.memo-list { list-style: none; max-height: 360px; overflow-y: auto; }
.memo-item {
  position: relative;
  padding: 12px;
  border-radius: 8px;
  background: rgba(232,238,245,0.3);
  border: 1px solid rgba(217,223,231,0.3);
  margin-bottom: 8px;
}
.memo-item .memo-text {
  font-size: 14px; color: var(--foreground);
  white-space: pre-wrap; word-break: break-word;
  padding-right: 24px;
}
.memo-item .memo-date { font-size: 12px; color: var(--muted-foreground); margin-top: 4px; }
.memo-item .memo-delete {
  position: absolute; right: 8px; top: 8px;
  width: 24px; height: 24px; border-radius: 50%;
  background: none; border: none; cursor: pointer;
  color: var(--muted-foreground); font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.memo-item .memo-delete:hover { background: var(--accent); color: var(--destructive); }
.memo-input-row { display: flex; gap: 8px; margin-bottom: 16px; }
.memo-input-row .form-control { flex: 1; }
.memo-add-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--secondary); border: 1px solid var(--border);
  cursor: pointer; font-size: 18px; color: var(--foreground);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.memo-add-btn:hover { background: var(--accent); }

/* ===== 甯哥敤澶囧繕褰曞崱鐗囩綉鏍?===== */
.memo-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.memo-card {
  background: #fffbe6;
  border: 1px solid #ffe58f;
  border-radius: 12px;
  padding: 16px;
  position: relative;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}
.memo-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.memo-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.memo-card-date {
  font-size: 12px;
  color: var(--muted-foreground);
}
.memo-card-actions {
  display: flex;
  gap: 4px;
}
.memo-card-btn {
  width: 26px; height: 26px;
  border-radius: 6px;
  border: none;
  background: rgba(0,0,0,0.04);
  cursor: pointer;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted-foreground);
  transition: background 0.15s;
}
.memo-card-btn:hover { background: rgba(0,0,0,0.1); color: var(--foreground); }
.memo-card-del:hover { background: var(--danger-bg); color: var(--danger); }
.memo-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 8px;
  word-break: break-word;
  line-height: 1.5;
}
.memo-card-content {
  font-size: 13px;
  color: var(--muted-foreground);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
  flex: 1;
}

/* ===== 杞﹁締鐘舵€佸崱鐗囩綉鏍?===== */
.status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.status-card {
  background: var(--card);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  position: relative;
}
.status-card .sc-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;
}
.status-card .sc-plate { font-size: 16px; font-weight: 600; }
.status-card .sc-model { font-size: 13px; color: var(--muted-foreground); margin-bottom: 4px; }
.status-card .sc-driver { font-size: 14px; color: var(--foreground); margin-bottom: 16px; }
.status-card .sc-actions { display: flex; gap: 8px; }

/* ===== 鏃堕棿杞?===== */
.timeline { list-style: none; padding-left: 16px; }
.timeline li {
  position: relative; padding-bottom: 20px; padding-left: 16px;
  border-left: 2px solid var(--border);
}
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: ''; position: absolute; left: -7px; top: 2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--primary); border: 2px solid var(--card);
}
.timeline .tl-time { font-size: 12px; color: var(--muted-foreground); }
.timeline .tl-content { font-size: 14px; margin-top: 4px; }

/* ===== 缁熻灏忓崱 ===== */
.stats-summary {
  display: flex; gap: 16px; margin-bottom: 24px; flex-wrap: wrap;
}
.stats-summary .ss-item {
  background: var(--card);
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  min-width: 140px;
}
.stats-summary .ss-value {
  font-size: 24px; font-weight: 700; color: var(--foreground);
  font-variant-numeric: tabular-nums;
}
.stats-summary .ss-label { font-size: 12px; color: var(--muted-foreground); margin-top: 4px; }

/* ===== 璇︽儏鍖?===== */
.detail-section { margin-bottom: 20px; }
.detail-section h4 {
  font-size: 14px; color: var(--muted-foreground); margin-bottom: 10px;
  font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; font-size: 12px;
}
.detail-row { display: flex; padding: 6px 0; font-size: 13px; }
.detail-row .dr-label { width: 130px; color: var(--muted-foreground); flex-shrink: 0; }
.detail-row .dr-value { flex: 1; color: var(--foreground); }

/* ===== 寰呭姙鍗＄墖寮忓垪琛紙棣栭〉鐢級 ===== */
.task-list { list-style: none; }
.task-list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(217,223,231,0.5);
}
.task-list-item:last-child { border-bottom: none; }
.task-list-item.task-overdue { background: rgba(224,49,49,0.03); margin: 0 -20px; padding: 12px 20px; }
.task-list-item .task-checkbox { width: 18px; height: 18px; flex-shrink: 0; cursor: pointer; }
.task-list-item .task-info { flex: 1; min-width: 0; }
.task-list-item .task-title { font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.task-list-item .task-sub { font-size: 12px; color: var(--muted-foreground); margin-top: 2px; }
.task-list-item .task-date {
  text-align: right; font-size: 12px; color: var(--muted-foreground);
  font-variant-numeric: tabular-nums; flex-shrink: 0;
}
.task-list-item .task-date.overdue { color: var(--danger); font-weight: 600; }

/* ===== 涓ゆ爮甯冨眬 ===== */
.two-col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

/* ===== 鍝嶅簲寮?===== */
@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .status-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .status-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; gap: 0; }
}


/* ===== 鏉冮檺鍔犺浇鐘舵€侊細閬垮厤椤甸潰闂儊 ===== */
body.permission-loading [data-action='edit'],
body.permission-loading [data-action='delete'],
body.permission-loading [data-action='assign'],
body.permission-loading [data-action='change-vehicle'],
body.permission-loading [id^='btn-add-'],
body.permission-loading [id^='btn-settings'],
body.permission-loading #btn-export,
body.permission-loading #btn-import,
body.permission-loading #btn-excel-export,
body.permission-loading [id^='btn-vehicle-'],
body.permission-loading [id^='btn-driver-'] {
  display: none !important;
}



/* ===== 椤甸潰鍔犺浇鐘舵€侊細鍏堥殣钘忎富鍐呭锛屾潈闄愭鏌ュ畬鎴愬悗鍐嶆樉绀?===== */
body.app-loading .main-wrapper {
  visibility: hidden;
}



/* ===== 导航栏权限控制：默认隐藏除首页外的所有导航项 ===== */
.sidebar-nav .nav-item[data-route]:not([data-route=dashboard]) {
  display: none;
}

/* ===== 多选下拉 ===== */
.multi-select {
  position: relative;
  display: inline-block;
}
.multi-select-trigger {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  cursor: pointer;
  font-size: 14px;
  min-width: 120px;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.multi-select-trigger:hover {
  border-color: var(--primary);
}
.multi-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 9999;
  max-height: 300px;
  overflow-y: auto;
  min-width: 180px;
  width: max-content;
}
.multi-select-option {
  padding: 6px 12px;
}
.multi-select-option:hover {
  background: var(--bg-hover);
}
.multi-select-option label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
}
.multi-select-option input[type=checkbox] {
  cursor: pointer;
}



/* 照片预览缩略图样式 - 强制铺满 */
.driver-photo-preview,
.vehicle-photo-preview {
  position: relative !important;
  overflow: hidden !important;
}
.driver-photo-preview img,
.vehicle-photo-preview img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block !important;
}

