/* ============================================================
   MyBus — Global Stylesheet
   Dark premium theme, mobile-first
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  --bg-dark:      #0a0e1a;
  --bg-card:      #111827;
  --bg-card2:     #1a2235;
  --accent:       #FF6B35;
  --accent2:      #4ECDC4;
  --accent3:      #A8E6CF;
  --text-primary: #F0F4FF;
  --text-muted:   #8896B3;
  --border:       rgba(255,255,255,0.08);
  --shadow:       0 8px 32px rgba(0,0,0,0.5);
  --radius:       16px;
  --radius-sm:    10px;
  --font:         'Inter', system-ui, sans-serif;
  --header-h:     60px;
  --ad-banner-h:  70px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ---------- Utility ---------- */
.hidden  { display: none !important; }
.flex    { display: flex; }
.col     { flex-direction: column; }
.center  { align-items: center; justify-content: center; }
.gap-sm  { gap: 8px; }
.gap-md  { gap: 16px; }
.bold    { font-weight: 700; }
.muted   { color: var(--text-muted); font-size: .85rem; }

/* ---------- Header ---------- */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(10,14,26,.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 1000;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), #ff9d6c);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.logo-text {
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.header-badge {
  background: rgba(255,107,53,.15);
  border: 1px solid rgba(255,107,53,.3);
  color: var(--accent);
  font-size: .7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: .5px;
}
.header-live {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  color: var(--accent2);
  font-weight: 500;
}
.pulse-dot {
  width: 8px; height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { opacity:1; transform: scale(1); }
  50%      { opacity:.5; transform: scale(1.4); }
}

/* ---------- Search Panel ---------- */
.search-panel {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  background: rgba(17,24,39,.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.input-group {
  display: flex;
  align-items: center;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  gap: 10px;
  transition: border-color .2s;
}
.input-group:focus-within {
  border-color: var(--accent);
}
.input-group .icon {
  font-size: 1rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.input-group input,
.input-group select {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: .9rem;
  padding: 12px 0;
}
.input-group select option {
  background: var(--bg-card);
  color: var(--text-primary);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 600;
  font-size: .9rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #ff9d6c);
  color: #fff;
  padding: 12px 20px;
}
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 10px 16px;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-full { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: .8rem; }
.btn-driver {
  background: linear-gradient(135deg, var(--accent2), #2fb8af);
  color: #0a0e1a;
  font-weight: 700;
}

/* ---------- Map Container ---------- */
#map {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 0;
}
.map-overlay-top {
  /* pushes content below header + search */
  padding-top: calc(var(--header-h) + 130px);
}

/* ---------- Info Cards (vehicle list) ---------- */
.vehicles-panel {
  position: fixed;
  bottom: calc(var(--ad-banner-h) + 10px);
  left: 0; right: 0;
  padding: 0 12px;
  z-index: 800;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 38vh;
  overflow-y: auto;
  pointer-events: none;
}
.vehicle-card {
  background: rgba(17,24,39,.92);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: all;
  animation: slideUp .3s ease;
}
@keyframes slideUp {
  from { opacity:0; transform:translateY(20px); }
  to   { opacity:1; transform:translateY(0); }
}
.vehicle-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.vehicle-icon.bus     { background: rgba(255,107,53,.2); }
.vehicle-icon.carrito { background: rgba(78,205,196,.2); }
.vehicle-info { flex: 1; }
.vehicle-name { font-weight: 600; font-size: .9rem; }
.vehicle-eta  { color: var(--accent2); font-size: .78rem; font-weight: 500; margin-top: 2px; }
.vehicle-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.eta-badge {
  background: rgba(34,197,94,.15);
  border: 1px solid rgba(34,197,94,.3);
  color: #22c55e;
  font-size: .7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}
.speed-badge {
  color: var(--text-muted);
  font-size: .7rem;
}

/* ---------- Ad Banner ---------- */
.ad-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--ad-banner-h);
  background: rgba(17,24,39,.97);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  cursor: pointer;
  overflow: hidden;
}
.ad-banner::before {
  content: 'PUBLICIDAD';
  position: absolute;
  top: 4px; right: 8px;
  font-size: .55rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}
.ad-banner-img {
  width: 50px; height: 50px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-card2);
}
.ad-banner-img-placeholder {
  width: 50px; height: 50px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #ff9d6c);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.ad-banner-content { flex: 1; overflow: hidden; }
.ad-banner-title {
  font-weight: 700;
  font-size: .88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ad-banner-desc {
  font-size: .75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ad-banner-cta {
  background: linear-gradient(135deg, var(--accent), #ff9d6c);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
/* Banner rotation animation */
.ad-slide-out { animation: adOut .4s ease forwards; }
.ad-slide-in  { animation: adIn  .4s ease forwards; }
@keyframes adOut { to { opacity:0; transform:translateX(-30px); } }
@keyframes adIn  { from { opacity:0; transform:translateX(30px); } to { opacity:1; transform:translateX(0); } }

/* ---------- Ad Popup ---------- */
.ad-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn .3s ease;
}
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
.ad-popup {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 100%;
  max-width: 340px;
  overflow: hidden;
  animation: popIn .3s ease;
}
@keyframes popIn { from { opacity:0; transform:scale(.9); } to { opacity:1; transform:scale(1); } }
.ad-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.ad-popup-label {
  font-size: .65rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}
.ad-popup-close {
  background: rgba(255,255,255,.08);
  border: none;
  color: var(--text-muted);
  width: 28px; height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
}
.ad-popup-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: var(--bg-card2);
}
.ad-popup-img-placeholder {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem;
}
.ad-popup-body { padding: 18px 16px; }
.ad-popup-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.ad-popup-desc  { font-size: .85rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 16px; }
.ad-popup-cta {
  display: block;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent), #ff9d6c);
  color: #fff;
  text-align: center;
  font-weight: 700;
  font-size: .95rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
}

/* ---------- Toast Notification ---------- */
.toast-container {
  position: fixed;
  top: calc(var(--header-h) + 10px);
  right: 12px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: .85rem;
  max-width: 260px;
  animation: slideInRight .3s ease;
  box-shadow: var(--shadow);
}
.toast.success { border-left: 3px solid #22c55e; }
.toast.error   { border-left: 3px solid #ef4444; }
.toast.info    { border-left: 3px solid var(--accent2); }
@keyframes slideInRight { from { opacity:0; transform:translateX(40px); } to { opacity:1; transform:translateX(0); } }

/* ---------- Driver Page ---------- */
.driver-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  padding-top: calc(var(--header-h) + 20px);
  background: radial-gradient(ellipse at top, #1a2235 0%, var(--bg-dark) 70%);
}
.driver-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 30px 24px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow);
}
.driver-card h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 6px;
}
.driver-card .subtitle {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}
.form-field {
  margin-bottom: 16px;
}
.form-field label {
  display: block;
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
  letter-spacing: .3px;
}
.form-field input,
.form-field select {
  width: 100%;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: .9rem;
  outline: none;
  transition: border-color .2s;
}
.form-field input:focus,
.form-field select:focus { border-color: var(--accent); }
.form-field select option { background: var(--bg-card); }

/* Driver status panel */
.driver-status-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 380px;
}
.status-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
}
.status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.status-title { font-weight: 700; font-size: 1rem; }
.online-badge {
  background: rgba(34,197,94,.15);
  border: 1px solid rgba(34,197,94,.3);
  color: #22c55e;
  font-size: .72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  display: flex; align-items: center; gap: 5px;
}
.offline-badge {
  background: rgba(239,68,68,.12);
  border: 1px solid rgba(239,68,68,.3);
  color: #ef4444;
  font-size: .72px;
  font-size: .72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
}
.stat-row {
  display: flex;
  justify-content: space-between;
  font-size: .82rem;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.stat-row:last-child { border-bottom: none; }
.stat-label { color: var(--text-muted); }
.stat-value { font-weight: 600; }
.gps-map-mini {
  height: 160px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card2);
}
.toggle-btn {
  width: 100%;
  padding: 16px;
  border-radius: 14px;
  border: none;
  font-family: var(--font);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all .2s;
}
.toggle-btn.active {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
}
.toggle-btn.inactive {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
}
.toggle-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }

/* ---------- Admin Login ---------- */
.admin-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(ellipse at center, #1a2235 0%, var(--bg-dark) 80%);
}
.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 36px 28px;
  width: 100%;
  max-width: 360px;
  box-shadow: var(--shadow);
  text-align: center;
}
.login-logo-big {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--accent), #ff9d6c);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  margin: 0 auto 20px;
}
.login-card h1 { font-size: 1.5rem; font-weight: 800; margin-bottom: 6px; }
.login-card p  { color: var(--text-muted); font-size: .85rem; margin-bottom: 28px; }
.error-msg {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.3);
  color: #ef4444;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  margin-bottom: 16px;
  text-align: left;
}

/* ---------- Admin Dashboard ---------- */
.admin-layout {
  display: flex;
  min-height: 100vh;
}
.admin-sidebar {
  width: 240px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 20px 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
}
.sidebar-logo {
  padding: 16px 20px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.sidebar-admin { font-size: .72rem; color: var(--text-muted); }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all .2s;
  cursor: pointer;
  background: none;
  border-top: none;
  border-right: none;
  border-bottom: none;
  width: 100%;
  text-align: left;
  font-family: var(--font);
}
.nav-item:hover { color: var(--text-primary); background: rgba(255,255,255,.04); }
.nav-item.active { color: var(--accent); border-left-color: var(--accent); background: rgba(255,107,53,.06); }
.nav-icon { font-size: 1rem; width: 20px; text-align: center; }
.sidebar-footer {
  margin-top: auto;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}
.admin-main {
  margin-left: 240px;
  flex: 1;
  padding: 24px;
  min-height: 100vh;
}
.page-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 6px;
}
.page-subtitle { color: var(--text-muted); font-size: .85rem; margin-bottom: 24px; }

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  top: -20px; right: -20px;
  width: 80px; height: 80px;
  border-radius: 50%;
  opacity: .07;
}
.stat-card.orange::after { background: var(--accent); }
.stat-card.teal::after   { background: var(--accent2); }
.stat-card.green::after  { background: #22c55e; }
.stat-card.purple::after { background: #a855f7; }
.stat-icon { font-size: 1.5rem; margin-bottom: 12px; }
.stat-num  { font-size: 1.8rem; font-weight: 800; }
.stat-label-card { color: var(--text-muted); font-size: .8rem; margin-top: 2px; }

/* Data Table */
.data-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}
.data-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.data-section-title { font-weight: 700; font-size: .95rem; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  padding: 12px 16px;
  font-size: .75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-align: left;
  background: rgba(255,255,255,.02);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.data-table td {
  padding: 12px 16px;
  font-size: .85rem;
  border-top: 1px solid var(--border);
}
.data-table tr:hover td { background: rgba(255,255,255,.02); }
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 700;
}
.badge-active  { background: rgba(34,197,94,.12); color: #22c55e; border: 1px solid rgba(34,197,94,.25); }
.badge-pending { background: rgba(234,179,8,.12);  color: #eab308; border: 1px solid rgba(234,179,8,.25); }
.badge-expired { background: rgba(239,68,68,.12);  color: #ef4444; border: 1px solid rgba(239,68,68,.25); }
.badge-offline { background: rgba(139,92,246,.12); color: #a855f7; border: 1px solid rgba(139,92,246,.25); }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-weight: 700; font-size: 1rem; }
.modal-close {
  background: rgba(255,255,255,.06);
  border: none;
  color: var(--text-muted);
  width: 30px; height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.modal-close:hover { background: rgba(255,255,255,.12); }
.modal-body { padding: 24px; }
.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-card2);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 20px;
  overflow-x: auto;
}
.tab-btn {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: .82rem;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
}
.tab-btn.active {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

/* Section panels */
.admin-section { display: none; }
.admin-section.active { display: block; }

/* Mobile sidebar toggle */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 14px; left: 12px;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 200;
  color: #fff;
  font-size: 1.1rem;
}

/* ---------- Leaflet customization ---------- */
.leaflet-container { background: #1a2235 !important; }
.leaflet-tile { filter: brightness(.8) saturate(.9); }

/* Custom bus marker */
.bus-marker-icon {
  background: transparent !important;
  border: none !important;
}
.bus-dot {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 3px solid #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,.5);
  transition: transform .3s ease;
}
.bus-dot.bus     { background: var(--accent); }
.bus-dot.carrito { background: var(--accent2); }

/* user location dot */
.user-dot {
  width: 18px; height: 18px;
  background: #3b82f6;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(59,130,246,.25);
}

/* ---------- Loading Spinner ---------- */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- No Results ---------- */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-icon { font-size: 2.5rem; margin-bottom: 12px; }
.empty-title { font-weight: 600; font-size: .95rem; margin-bottom: 6px; color: var(--text-primary); }
.empty-desc  { font-size: .82rem; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .admin-sidebar { transform: translateX(-100%); transition: transform .3s ease; }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; padding: 16px; }
  .sidebar-toggle { display: flex; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .modal { margin: 0 10px; }
  
  .admin-main { padding-top: 60px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .data-table th:nth-child(n+4),
  .data-table td:nth-child(n+4) { display: none; }
}
