* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }

.app-layout { display: flex; height: 100vh; overflow: hidden; }

#sidebar {
  width: 256px;
  background: #ffffff;
  color: #0f172a;
  display: flex;
  flex-direction: column;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  overflow: hidden;
  z-index: 10000;
  box-shadow: 2px 0 16px rgba(15, 23, 42, 0.04);
  border-right: 1px solid #e2e8f0;
  user-select: none;
}

#sidebar.collapsed { width: 72px; }

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 14px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  min-height: 64px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
}

.sidebar-brand-icon {
  width: 36px;
  height: 36px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.1);
  overflow: hidden;
}

.sidebar-brand-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.sidebar-brand-icon img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
}

.sidebar-title { 
  font-weight: 800; 
  font-size: 16px; 
  letter-spacing: -0.02em;
  color: #0f172a;
  white-space: nowrap; 
  display: inline-flex;
  align-items: center;
}

.sidebar-title .brand-sangca,
.mobile-brand-title .brand-sangca,
.brand-sangca {
  color: #0E4D88 !important;
}

.sidebar-title .brand-track,
.mobile-brand-title .brand-track,
.brand-track {
  color: #41B34C !important;
}

#sidebar.collapsed .sidebar-brand { display: none; }
#sidebar.collapsed .sidebar-header { justify-content: center; padding: 16px 8px; }
#sidebar.collapsed .notif-bell-btn { display: none; }
#sidebar.collapsed #sidebar-toggle { width: 36px; height: 36px; font-size: 16px; }

.sidebar-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

#sidebar-toggle {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 15px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 7px;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
#sidebar-toggle:hover { 
  background: #f1f5f9; 
  border-color: #cbd5e1; 
  color: #0f172a; 
}

.notif-bell-btn {
  position: relative;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 15px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 7px;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.notif-bell-btn:hover { 
  background: #f1f5f9; 
  border-color: #cbd5e1; 
  color: #0f172a;
}

#sidebar-toggle svg,
.notif-bell-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: white;
  font-size: 9.5px;
  font-weight: bold;
  padding: 1px 5px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
  border: 1.5px solid #ffffff;
}

.sidebar-nav { 
  flex: 1; 
  padding: 12px 0; 
  overflow-y: auto; 
  overflow-x: hidden;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 3px 10px;
  width: calc(100% - 20px);
  padding: 10px 14px;
  color: #475569;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  border-radius: 8px;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.sidebar-link:hover { 
  background: #f8fafc; 
  color: #0f172a; 
  transform: translateX(2px);
}

.sidebar-link.active { 
  background: #f8fafc; 
  color: #0f172a; 
  font-weight: 600; 
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3.5px;
  background: #2563eb;
  border-radius: 0 4px 4px 0;
}

.sidebar-icon { 
  flex-shrink: 0; 
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  background: transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  stroke: currentColor;
  stroke-width: 1.8px;
  transition: stroke 0.2s ease, transform 0.2s ease, stroke-width 0.2s ease;
}

.sidebar-link:hover .sidebar-icon {
  color: #334155;
  background: #f1f5f9;
  transform: scale(1.05);
}

.sidebar-link.active .sidebar-icon {
  color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.15);
}
.sidebar-link.active .sidebar-icon svg {
  stroke-width: 2.1px;
}

.sidebar-link.active[data-page="map"] {
  background: #f0f9ff;
  color: #0369a1;
}
.sidebar-link.active[data-page="map"]::before {
  background: #0284c7;
}
.sidebar-link.active[data-page="map"] .sidebar-icon {
  color: #0284c7 !important;
  background: #e0f2fe !important;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.2) !important;
}

.sidebar-link.active[data-page="dashboard"] {
  background: #eff6ff;
  color: #1d4ed8;
}
.sidebar-link.active[data-page="dashboard"]::before {
  background: #2563eb;
}
.sidebar-link.active[data-page="dashboard"] .sidebar-icon {
  color: #2563eb !important;
  background: #dbeafe !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2) !important;
}

.sidebar-link.active[data-page="analytics"] {
  background: #f5f3ff;
  color: #6d28d9;
}
.sidebar-link.active[data-page="analytics"]::before {
  background: #7c3aed;
}
.sidebar-link.active[data-page="analytics"] .sidebar-icon {
  color: #7c3aed !important;
  background: #ede9fe !important;
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.2) !important;
}

.sidebar-link.active[data-page="trips"] {
  background: #fff7ed;
  color: #c2410c;
}
.sidebar-link.active[data-page="trips"]::before {
  background: #ea580c;
}
.sidebar-link.active[data-page="trips"] .sidebar-icon {
  color: #ea580c !important;
  background: #ffedd5 !important;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.2) !important;
}

.sidebar-link.active[data-page="drivers"] {
  background: #f0fdfa;
  color: #0f766e;
}
.sidebar-link.active[data-page="drivers"]::before {
  background: #0d9488;
}
.sidebar-link.active[data-page="drivers"] .sidebar-icon {
  color: #0d9488 !important;
  background: #ccfbf1 !important;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.2) !important;
}

.sidebar-link.active[data-page="fleet"] {
  background: #eff6ff;
  color: #1d4ed8;
}
.sidebar-link.active[data-page="fleet"]::before {
  background: #2563eb;
}
.sidebar-link.active[data-page="fleet"] .sidebar-icon {
  color: #2563eb !important;
  background: #dbeafe !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2) !important;
}

.sidebar-link.active[data-page="history"] {
  background: #faf5ff;
  color: #7e22ce;
}
.sidebar-link.active[data-page="history"]::before {
  background: #9333ea;
}
.sidebar-link.active[data-page="history"] .sidebar-icon {
  color: #9333ea !important;
  background: #f3e8ff !important;
  box-shadow: 0 2px 6px rgba(147, 51, 234, 0.2) !important;
}

.sidebar-link.active[data-page="heatmap"] {
  background: #fff1f2;
  color: #be123c;
}
.sidebar-link.active[data-page="heatmap"]::before {
  background: #e11d48;
}
.sidebar-link.active[data-page="heatmap"] .sidebar-icon {
  color: #e11d48 !important;
  background: #ffe4e6 !important;
  box-shadow: 0 2px 6px rgba(225, 29, 72, 0.2) !important;
}

.sidebar-link.active[data-page="geofence"] {
  background: #f0fdf4;
  color: #15803d;
}
.sidebar-link.active[data-page="geofence"]::before {
  background: #16a34a;
}
.sidebar-link.active[data-page="geofence"] .sidebar-icon {
  color: #16a34a !important;
  background: #dcfce7 !important;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.2) !important;
}

.sidebar-link.active[data-page="billing"] {
  background: #f0fdf4;
  color: #15803d;
}
.sidebar-link.active[data-page="billing"]::before {
  background: #16a34a;
}
.sidebar-link.active[data-page="billing"] .sidebar-icon {
  color: #16a34a !important;
  background: #dcfce7 !important;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.2) !important;
}

.sidebar-link.active[data-page="settings"] {
  background: #f1f5f9;
  color: #1e293b;
}
.sidebar-link.active[data-page="settings"]::before {
  background: #475569;
}
.sidebar-link.active[data-page="settings"] .sidebar-icon {
  color: #475569 !important;
  background: #e2e8f0 !important;
  box-shadow: 0 2px 6px rgba(71, 85, 105, 0.2) !important;
}

.logout-link .sidebar-icon {
  color: #94a3b8;
}

.logout-link:hover .sidebar-icon {
  color: #dc2626 !important;
  background: #fee2e2 !important;
}

.sidebar-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#sidebar.collapsed .sidebar-link {
  margin: 4px 10px;
  width: calc(100% - 20px);
  padding: 10px 0;
  justify-content: center;
}

#sidebar.collapsed .sidebar-link:hover {
  transform: none;
}

#sidebar.collapsed .sidebar-label { display: none; }

.sidebar-footer {
  border-top: 1px solid #e2e8f0;
  padding: 8px 0;
  background: #ffffff;
}

.sidebar-user-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin: 2px 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  transition: all 0.15s ease;
}

.sidebar-user-footer:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-user-avatar.owner {
  background: linear-gradient(135deg, #0f172a, #334155);
}

.sidebar-user-avatar.sub-user {
  background: linear-gradient(135deg, #0284c7, #2563eb);
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  word-break: break-word;
  white-space: normal;
}

.sidebar-user-role {
  font-size: 10.5px;
  color: #64748b;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.sub-user-pill {
  display: inline-block;
  background: #eff6ff;
  color: #2563eb;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 9.5px;
}

.sidebar-footer-logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid #fee2e2;
  background: #fff5f5;
  color: #dc2626;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.sidebar-footer-logout-btn:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.sidebar-footer-logout-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}

.logout-btn-label {
  display: none !important;
}

#sidebar.collapsed .sidebar-user-footer {
  margin: 2px 6px;
  padding: 6px;
  flex-direction: column;
  gap: 8px;
  background: transparent;
  border-color: transparent;
}

#sidebar.collapsed .sidebar-user-info {
  display: none;
}

.logout-link {
  color: #64748b !important;
}

.logout-link:hover {
  background: #fef2f2 !important;
  color: #dc2626 !important;
}

.main-content {
  flex: 1;
  overflow-y: auto;
  background: #f8fafc;
  position: relative;
}

.notif-panel {
  position: fixed;
  top: 64px;
  left: 264px;
  width: 360px;
  max-height: 520px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.14), 0 0 1px rgba(0,0,0,0.1);
  display: none;
  flex-direction: column;
  z-index: 2147483647 !important;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  animation: notifFadeIn 0.2s ease-out;
}
#sidebar.collapsed .notif-panel {
  left: 80px;
}
@keyframes notifFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.notif-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #ffffff;
  color: #0f172a;
  font-size: 13.5px;
  font-weight: 700;
  border-bottom: 1px solid #f1f5f9;
}
.notif-read-all-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s;
}
.notif-read-all-btn:hover { 
  background: #e2e8f0; 
  color: #0f172a;
}
.notif-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
  max-height: 420px;
}
.notif-list::-webkit-scrollbar { width: 4px; }
.notif-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: background 0.15s;
  cursor: pointer;
}
.notif-item:hover { background: #f8fafc; }
.notif-item.unread { 
  background: #f0f9ff; 
  border-left: 3px solid #0284c7;
}
.notif-item.unread:hover { background: #e0f2fe; }
.notif-icon { font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.notif-content { flex: 1; font-size: 13px; }
.notif-title { font-weight: 600; color: #0f172a; margin-bottom: 2px; }
.notif-message { color: #475569; line-height: 1.4; margin-bottom: 4px; }
.notif-meta { font-size: 11px; color: #94a3b8; display: flex; justify-content: space-between; }
.notif-empty { text-align: center; padding: 32px 16px; color: #94a3b8; font-size: 13px; }

.notif-toggle-unread-btn {
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 12px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  opacity: 0.75;
  flex-shrink: 0;
  align-self: center;
}
.notif-toggle-unread-btn:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
  opacity: 1;
  transform: scale(1.08);
}
.notif-item.unread .notif-toggle-unread-btn {
  color: #0284c7;
}

.sidebar-tier-badge {
  font-size: 8.5px;
  font-weight: 800;
  padding: 2.5px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin-top: 3px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap !important;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
}
.sidebar-tier-badge.starter {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}
.sidebar-tier-badge.tier1 {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.sidebar-tier-badge.tier2 {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.sidebar-tier-badge.tier3 {
  background: #fefce8;
  color: #a16207;
  border: 1px solid #fef08a;
}
#sidebar.collapsed .sidebar-tier-badge,
#sidebar.collapsed .sidebar-account-id {
  display: none;
}

.mobile-app-header { display: none !important; }
.mobile-bottom-nav { display: none !important; }
.sidebar-mobile-backdrop { display: none !important; }
.mobile-drawer-close-btn { display: none !important; }

@media (max-width: 768px) {
  .app-layout {
    flex-direction: column !important;
    height: 100vh !important;
    overflow: hidden !important;
    position: relative !important;
  }

  .mobile-app-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 14px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    box-shadow: 0 1px 6px rgba(15, 23, 42, 0.05);
    user-select: none;
  }

  .mobile-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }

  .mobile-hamburger-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #334155;
    transition: all 0.15s ease;
    flex-shrink: 0;
    padding: 0;
  }

  .mobile-hamburger-btn:active {
    background: #e2e8f0;
    transform: scale(0.95);
  }

  .mobile-brand-group {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    cursor: pointer;
  }

  .mobile-brand-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-brand-icon img,
  .mobile-brand-icon svg {
    width: 24px;
    height: 24px;
    object-fit: contain;
  }

  .mobile-brand-title {
    font-size: 15.5px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
  }

  .mobile-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }

  .mobile-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-transform: uppercase;
  }

  .mobile-user-avatar.owner {
    background: linear-gradient(135deg, #0f172a, #334155);
  }

  .mobile-user-avatar.sub-user {
    background: linear-gradient(135deg, #0284c7, #2563eb);
  }

  .main-content {
    padding-top: 56px !important;
    padding-bottom: 60px !important;
    height: 100vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  #sidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 290px !important;
    max-width: 86vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    box-shadow: 6px 0 28px rgba(15, 23, 42, 0.3) !important;
    transform: translateX(-100%) !important;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    z-index: 100000 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  #sidebar.mobile-open {
    transform: translateX(0) !important;
  }

  #sidebar .sidebar-nav {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    padding-bottom: 8px !important;
  }

  #sidebar .sidebar-footer {
    flex-shrink: 0 !important;
    background: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
    padding: 4px 10px max(4px, env(safe-area-inset-bottom, 0px)) !important;
    box-shadow: 0 -4px 14px rgba(15, 23, 42, 0.05) !important;
    position: relative !important;
    z-index: 10 !important;
  }

  .sidebar-user-footer {
    margin: 0 !important;
    padding: 9px 12px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
  }

  .sidebar-footer-logout-btn {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    border-radius: 10px !important;
    border: 1.5px solid #fecaca !important;
    background: #fef2f2 !important;
    color: #dc2626 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 1px 4px rgba(220, 38, 38, 0.1) !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    transition: all 0.15s ease !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  .sidebar-footer-logout-btn:active {
    background: #fee2e2 !important;
    border-color: #f87171 !important;
    transform: scale(0.92) !important;
  }

  .sidebar-footer-logout-btn svg {
    width: 20px !important;
    height: 20px !important;
    stroke: #dc2626 !important;
    stroke-width: 2.2 !important;
    display: block !important;
  }

  
  .mobile-drawer-close-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    transition: all 0.15s ease;
  }

  .mobile-drawer-close-btn:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
  }

  #sidebar-toggle {
    display: none !important; 
  }

  .sidebar-mobile-backdrop {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(2px) !important;
    -webkit-backdrop-filter: blur(2px) !important;
    z-index: 99999 !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s !important;
  }

  .sidebar-mobile-backdrop.visible {
    opacity: 1 !important;
    visibility: visible !important;
  }

  .mobile-bottom-nav {
    display: flex !important;
    align-items: center;
    justify-content: space-around;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    z-index: 9998;
    box-shadow: 0 -3px 14px rgba(15, 23, 42, 0.07);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .mobile-bottom-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    text-decoration: none;
    color: #64748b;
    font-size: 10.5px;
    font-weight: 600;
    gap: 3px;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    padding: 4px 0;
    transition: color 0.15s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-bottom-tab svg {
    width: 20px;
    height: 20px;
    display: block;
    stroke: currentColor;
    transition: transform 0.15s ease, stroke 0.15s ease;
  }

  .mobile-bottom-tab.active {
    color: #2563eb;
    font-weight: 700;
  }

  .mobile-bottom-tab.active svg {
    transform: scale(1.12);
    stroke: #2563eb;
  }

  .mobile-bottom-tab.active::after {
    content: '';
    position: absolute;
    top: 4px;
    width: 20px;
    height: 3px;
    background: #2563eb;
    border-radius: 3px;
  }

  .notif-panel {
    position: fixed !important;
    top: 60px !important;
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    max-width: 440px !important;
    margin-left: auto !important;
    max-height: 75vh !important;
    z-index: 2147483647 !important;
    border-radius: 14px !important;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.25) !important;
  }

  .mobile-notif-bell {
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    position: relative !important;
    cursor: pointer !important;
  }
  .mobile-notif-bell svg {
    width: 18px !important;
    height: 18px !important;
  }
  .mobile-notif-bell:active {
    background: #e2e8f0 !important;
    transform: scale(0.95);
  }
  
  .billing-container,
  .settings-container,
  .team-container,
  .analytics-container,
  .drivers-container,
  .audit-container,
  .geofence-container {
    padding: 14px 12px !important;
  }

  .table-responsive,
  .fleet-table-card,
  .history-table-wrapper,
  .trips-table-wrapper,
  .audit-table-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
}

.sidebar-item-group {
  display: flex;
  flex-direction: column;
}

.sidebar-sub-menu {
  display: flex;
  flex-direction: column;
  padding-left: 28px;
  margin-top: 2px;
  margin-bottom: 4px;
  gap: 2px;
  position: relative;
}

.sidebar-sub-menu::before {
  content: '';
  position: absolute;
  left: 21px;
  top: -2px;
  bottom: 10px;
  width: 1.5px;
  background: #cbd5e1;
  border-radius: 1px;
}

.sidebar-sub-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
  transition: all 0.15s ease;
  position: relative;
}

.sidebar-sub-link .sidebar-sub-branch {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 700;
  line-height: 1;
}

.sidebar-sub-link .sidebar-sub-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.sidebar-sub-link .sidebar-sub-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-sub-link:hover {
  color: #0E4D88;
  background: #f1f5f9;
}

.sidebar-sub-link:hover .sidebar-sub-branch,
.sidebar-sub-link:hover .sidebar-sub-icon {
  color: #0E4D88;
}

.sidebar-sub-link.active {
  color: #0E4D88;
  background: #e0f2fe;
  font-weight: 700;
}

.sidebar-sub-link.active .sidebar-sub-branch,
.sidebar-sub-link.active .sidebar-sub-icon {
  color: #0E4D88;
}

#sidebar.collapsed .sidebar-sub-menu {
  display: none !important;
}

.sidebar-section-header {
  padding: 16px 14px 4px 14px;
  display: flex;
  align-items: center;
  user-select: none;
}

.sidebar-section-header:first-of-type {
  padding-top: 4px;
}

.sidebar-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  white-space: nowrap;
}

.sidebar-section-divider {
  display: none;
}

#sidebar.collapsed .sidebar-section-header {
  padding: 8px 12px;
  justify-content: center;
}

#sidebar.collapsed .sidebar-section-header:first-of-type {
  display: none;
}

#sidebar.collapsed .sidebar-section-title {
  display: none;
}

#sidebar.collapsed .sidebar-section-divider {
  display: block;
  width: 100%;
  height: 1px;
  background: #e2e8f0;
}
