/* ===== i9 EXPEDIÇÃO — DESIGN SYSTEM ===== */
/* Premium Light Theme — Elegant & Clear */

:root {
  color-scheme: light;
  /* Brand */
  --brand-yellow: #F5A623;
  --brand-yellow-hover: #E8951A;
  --brand-yellow-soft: rgba(245, 166, 35, 0.10);
  --brand-yellow-glow: rgba(245, 166, 35, 0.20);
  --brand-dark: #1A1D23;
  --brand-charcoal: #2D3039;

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --fs-xs: 0.7rem; --fs-sm: 0.8rem; --fs-base: 0.9rem;
  --fs-md: 1rem; --fs-lg: 1.15rem; --fs-xl: 1.4rem;
  --fs-2xl: 1.8rem; --fs-3xl: 2.4rem;

  /* Spacing */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;

  /* Radius */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px; --r-full: 9999px;

  /* Transitions */
  --t-fast: 150ms ease; --t-base: 250ms ease;
  --t-slow: 400ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows — soft and elegant */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-glow: 0 0 24px var(--brand-yellow-glow);

  /* Sidebar */
  --sidebar-width: 250px;
  --sidebar-collapsed: 64px;

  /* Status Colors */
  --color-success: #16A34A;
  --color-success-soft: rgba(22,163,74,0.08);
  --color-warning: #D97706;
  --color-warning-soft: rgba(217,119,6,0.08);
  --color-danger: #DC2626;
  --color-danger-soft: rgba(220,38,38,0.08);
  --color-info: #2563EB;
  --color-info-soft: rgba(37,99,235,0.08);
  --color-purple: #7C3AED;
  --color-purple-soft: rgba(124,58,237,0.08);
  --color-orange: #EA580C;
  --color-orange-soft: rgba(234,88,12,0.08);
  --color-cyan: #0891B2;
  --color-cyan-soft: rgba(8,145,178,0.08);
  --color-muted: #9CA3AF;
  --color-muted-soft: rgba(156,163,175,0.08);
}

/* ===== FUTURISTIC LIGHT THEME ===== */
[data-theme="dark"] {
  --bg-primary: #EDEEF2;
  --bg-secondary: #E4E6EB;
  --bg-tertiary: #D8DBE2;
  --bg-card: #F0F1F5;
  --bg-card-hover: #E8EAF0;
  --bg-surface: #E6E8ED;
  --bg-input: #F2F3F7;
  --bg-sidebar: #E8EAF0;
  --bg-modal: #F0F1F5;
  --border-color: rgba(0,0,0,0.08);
  --border-light: rgba(0,0,0,0.05);
  --text-primary: #1A1D23;
  --text-secondary: #5A6070;
  --text-muted: #8890A0;
  --text-inverse: #FFFFFF;
  --scrollbar-thumb: #C0C5D0;
  --scrollbar-track: transparent;
  --glass-bg: rgba(240,241,245,0.92);
  --glass-border: rgba(0,0,0,0.07);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-yellow); text-decoration: none; }
a:hover { color: var(--brand-yellow-hover); }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: var(--r-full); }

/* ===== LAYOUT ===== */
.app-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: width var(--t-slow);
}

.sidebar-brand {
  padding: var(--sp-5) var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  border-bottom: 1px solid var(--border-color);
}

.sidebar-brand img {
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
}

.sidebar-brand h1 {
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--brand-yellow);
  white-space: nowrap;
}

.sidebar-brand span {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  display: block;
}

.sidebar-nav {
  flex: 1;
  padding: var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  color: var(--text-secondary);
  font-size: var(--fs-base);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--brand-yellow-soft);
  color: var(--brand-yellow);
}

.nav-item .material-icons-round {
  font-size: 20px;
  width: 24px;
  text-align: center;
}

.sidebar-footer {
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--border-color);
}

.user-info {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2);
}

.user-avatar {
  width: 32px; height: 32px;
  border-radius: var(--r-full);
  background: var(--brand-yellow-soft);
  color: var(--brand-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-sm);
  font-weight: 700;
}

.user-name {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.user-email {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: var(--sp-6);
  min-height: 100vh;
}

/* ===== HEADER ===== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-6);
  flex-wrap: wrap;
  gap: var(--sp-4);
}

.page-header h2 {
  font-size: var(--fs-xl);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.page-header .material-icons-round {
  color: var(--brand-yellow);
}

.header-actions {
  display: flex;
  gap: var(--sp-3);
  align-items: center;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-md);
  font-family: var(--font);
  font-size: var(--fs-sm);
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
  text-decoration: none;
}

.btn .material-icons-round { font-size: 18px; }

.btn-primary {
  background: var(--brand-yellow);
  color: #FFFFFF;
  border-color: var(--brand-yellow);
  font-weight: 700;
}
.btn-primary:hover {
  background: var(--brand-yellow-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-color);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-muted);
}

.btn-danger {
  background: var(--color-danger-soft);
  color: var(--color-danger);
  border-color: rgba(239,68,68,0.3);
}
.btn-danger:hover { background: rgba(239,68,68,0.25); }

.btn-success {
  background: var(--color-success-soft);
  color: var(--color-success);
  border-color: rgba(34,197,94,0.3);
}
.btn-success:hover { background: rgba(34,197,94,0.25); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: var(--sp-2);
}
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-tertiary); }

.btn-lg {
  padding: var(--sp-3) var(--sp-6);
  font-size: var(--fs-base);
}

.btn-full { width: 100%; justify-content: center; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* ===== STATS ROW ===== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  transition: all var(--t-base);
}

.stat-card:hover {
  border-color: var(--brand-yellow-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.stat-icon.yellow { background: var(--brand-yellow-soft); color: var(--brand-yellow); }
.stat-icon.green { background: var(--color-success-soft); color: var(--color-success); }
.stat-icon.blue { background: var(--color-info-soft); color: var(--color-info); }
.stat-icon.orange { background: var(--color-orange-soft); color: var(--color-orange); }
.stat-icon.purple { background: var(--color-purple-soft); color: var(--color-purple); }
.stat-icon.cyan { background: var(--color-cyan-soft); color: var(--color-cyan); }

.stat-value {
  font-size: var(--fs-2xl);
  font-weight: 700;
  line-height: 1;
}

.stat-label {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: var(--sp-1);
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.badge-preparando { background: var(--color-muted-soft); color: var(--color-muted); }
.badge-conferindo { background: var(--color-info-soft); color: var(--color-info); }
.badge-pronto { background: var(--color-cyan-soft); color: var(--color-cyan); }
.badge-carregando { background: var(--color-orange-soft); color: var(--color-orange); }
.badge-em_transito { background: var(--color-purple-soft); color: var(--color-purple); }
.badge-entregue { background: var(--color-success-soft); color: var(--color-success); }
.badge-parcial { background: var(--color-warning-soft); color: var(--color-warning); }
.badge-cancelado { background: var(--color-danger-soft); color: var(--color-danger); }
.badge-pendente { background: var(--color-muted-soft); color: var(--color-muted); }
.badge-conferido { background: var(--color-success-soft); color: var(--color-success); }
.badge-carregado { background: var(--color-info-soft); color: var(--color-info); }
.badge-devolvido { background: var(--color-danger-soft); color: var(--color-danger); }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-base);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-modal);
  border: 1px solid var(--border-color);
  border-radius: var(--r-xl);
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95) translateY(10px);
  transition: transform var(--t-slow);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: var(--fs-lg);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.modal-body {
  padding: var(--sp-6);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--border-color);
}

/* ===== TABS / FILTERS ===== */
.filter-bar {
  display: flex;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
  flex-wrap: wrap;
  align-items: center;
}

.filter-btn {
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
  font-weight: 500;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-fast);
  font-family: var(--font);
}

.filter-btn:hover { border-color: var(--text-muted); color: var(--text-primary); }
.filter-btn.active {
  background: var(--brand-yellow);
  color: var(--text-inverse);
  border-color: var(--brand-yellow);
}

.search-input {
  flex: 1;
  min-width: 200px;
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-full);
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: var(--fs-sm);
  outline: none;
  transition: border-color var(--t-fast);
}

.search-input:focus { border-color: var(--brand-yellow); }
.search-input::placeholder { color: var(--text-muted); }

/* ===== LOGIN SCREEN ===== */
.login-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.login-container {
  width: 100%;
  max-width: 400px;
  padding: var(--sp-8);
}

.login-logo {
  text-align: center;
  margin-bottom: var(--sp-8);
}

.login-logo img {
  width: 64px; height: 64px;
  margin-bottom: var(--sp-4);
}

.login-logo h1 {
  font-size: var(--fs-xl);
  color: var(--brand-yellow);
  font-weight: 700;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  margin-top: var(--sp-1);
}

.login-error {
  background: var(--color-danger-soft);
  color: var(--color-danger);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  margin-top: var(--sp-4);
  text-align: center;
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
  position: fixed;
  top: var(--sp-6);
  right: var(--sp-6);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-5);
  min-width: 280px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
  animation: slideInRight 0.3s var(--t-slow);
  cursor: pointer;
}

.toast.success { border-left: 3px solid var(--color-success); }
.toast.error { border-left: 3px solid var(--color-danger); }
.toast.info { border-left: 3px solid var(--color-info); }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: var(--sp-10);
  color: var(--text-muted);
}

.empty-state .material-icons-round {
  font-size: 64px;
  opacity: 0.3;
  margin-bottom: var(--sp-4);
  display: block;
}

.empty-state h3 {
  font-size: var(--fs-lg);
  color: var(--text-secondary);
  margin-bottom: var(--sp-2);
}

.empty-state p {
  font-size: var(--fs-sm);
}

/* ===== LOADING ===== */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-10);
}

.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border-color);
  border-top-color: var(--brand-yellow);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== PROGRESS BAR ===== */
.progress-bar {
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: var(--r-full);
  overflow: hidden;
  margin-top: var(--sp-2);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-yellow), var(--color-success));
  border-radius: var(--r-full);
  transition: width var(--t-slow);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding: var(--sp-4); }
  .page-header { flex-direction: column; align-items: flex-start; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .mobile-menu-btn { display: flex !important; }
}

.mobile-menu-btn {
  display: none;
  position: fixed;
  bottom: var(--sp-5);
  right: var(--sp-5);
  width: 48px; height: 48px;
  border-radius: var(--r-full);
  background: var(--brand-yellow);
  color: var(--text-inverse);
  border: none;
  cursor: pointer;
  z-index: 200;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
}

.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}
.mobile-overlay.active { display: block; }

/* ===== PAGE SECTIONS ===== */
.page-section { display: none; }
.page-section.active { display: block; }

/* ===== NAV BADGE ===== */
.nav-badge {
  background: var(--color-danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: var(--r-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  margin-left: auto;
}

/* ===== EXPEDITION QUEUE ===== */
.queue-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: 12px;
  overflow: hidden;
  transition: var(--t-fast);
}
.queue-group:hover {
  border-color: var(--brand-yellow-soft);
}

.queue-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
  background: var(--bg-surface);
  user-select: none;
  transition: var(--t-fast);
}
.queue-group-header:hover {
  background: rgba(255, 229, 0, 0.05);
}
.queue-group-header > div {
  display: flex;
  align-items: center;
  gap: 10px;
}
.queue-count {
  background: var(--bg-elevated);
  color: var(--text-sec);
  padding: 2px 10px;
  border-radius: var(--r-full);
  font-size: 0.75rem;
  font-weight: 600;
}
.queue-chevron {
  transition: transform var(--t-fast);
  color: var(--text-muted);
}

.queue-group-items {
  transition: var(--t-base);
}
.queue-group-items.collapsed {
  display: none;
}

.queue-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  cursor: pointer;
  transition: var(--t-fast);
}
.queue-item:hover {
  background: rgba(255, 229, 0, 0.03);
}
.queue-item.selected {
  background: rgba(255, 229, 0, 0.08);
  border-left: 3px solid var(--brand-yellow);
}
.queue-item.late {
  border-left: 3px solid var(--color-danger);
}
.queue-item.selected.late {
  border-left: 3px solid var(--color-danger);
}

.queue-item-info {
  flex: 1;
  min-width: 0;
}
.queue-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.queue-os {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--brand-yellow);
}
.queue-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.queue-date.late {
  color: var(--color-danger);
  font-weight: 600;
}
.queue-item-product {
  font-size: 0.8rem;
  color: var(--text-sec);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.queue-item-meta {
  display: flex;
  gap: 16px;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.queue-item-meta span {
  display: flex;
  align-items: center;
  gap: 3px;
}

/* Queue Action Bar */
.queue-action-bar {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border-top: 1px solid var(--brand-yellow);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 50;
  backdrop-filter: blur(12px);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
  border-radius: var(--r-md) var(--r-md) 0 0;
  margin-top: 16px;
}
.queue-action-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-yellow);
  font-size: 0.9rem;
}

/* ═══ DRIVER TRACKING ═══ */

#section-rastreio { position: relative; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
  gap: 12px;
}
.section-header h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tracking-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: var(--bg-card);
  padding: 6px 14px;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.pulse-dot.green {
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  animation: pulse-green 2s infinite;
}
@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.tracking-sidebar {
  width: 260px;
  max-height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.tracking-driver-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(12px);
}
.tracking-driver-card:hover {
  border-color: var(--brand-yellow);
  transform: translateY(-1px);
}
.tracking-driver-card.online {
  border-left: 3px solid #22c55e;
}
.tracking-driver-card.offline {
  border-left: 3px solid #666;
  opacity: 0.6;
}

.driver-avatar {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.driver-avatar .material-icons-round { font-size: 18px; }
.driver-avatar .status-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--bg-card);
}
.status-dot.green { background: #22c55e; }
.status-dot.gray { background: #666; }

.driver-info {
  flex: 1;
  min-width: 0;
}
.driver-info strong {
  display: block;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.driver-meta {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}
.driver-meta .speed { color: var(--brand-yellow); }

.empty-drivers {
  padding: 24px;
  text-align: center;
  color: var(--text-tertiary);
}
.empty-drivers .material-icons-round { font-size: 36px; margin-bottom: 8px; }

/* Leaflet custom markers */
.driver-map-marker {
  text-align: center;
  background: none !important;
  border: none !important;
}
.marker-pin {
  width: 36px;
  height: 36px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.marker-pin .material-icons-round {
  transform: rotate(45deg);
  font-size: 18px;
  color: #000;
}
.marker-pin.online {
  background: var(--brand-yellow);
}
.marker-pin.offline {
  background: #666;
}
.marker-pin.online .material-icons-round { color: #000; }
.marker-pin.offline .material-icons-round { color: #ccc; }

.marker-label {
  font-size: 10px;
  font-weight: 700;
  color: #374151;
  text-shadow: 0 1px 2px rgba(255,255,255,0.8);
  margin-top: 2px;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .tracking-sidebar {
    position: static;
    width: 100%;
    max-height: 200px;
    margin-top: 12px;
  }
}
