/* Modern Vehicle Tracking System Styles */

/* CSS Variables for consistent theming */
:root {
  --primary-color: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #dbeafe;
  --secondary-color: #64748b;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --background-color: #f5f5dc;
  --surface-color: #ffffff;
  --surface-hover: #f1f5f9;
  --border-color: #e2e8f0;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --sidebar-width: 320px;
  --topbar-height: 64px;
  --mobile-nav-height: 60px;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--background-color);
  overflow-x: hidden;
}

/* App Container */
.app-container {
  display: flex;
  height: 100vh;
  width: 100%;
  position: relative;
}

/* Sidebar Styles */
.sidebar {
  width: var(--sidebar-width);
  background: var(--surface-color);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  z-index: 1000;
  transform: translateX(0);
  transition: transform 0.3s ease-in-out;
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.logo i {
  font-size: 1.5rem;
  color: white;
}

.logo h1 {
  font-size: 1.25rem;
  font-weight: 600;
  color: white;
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.9);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.status-dot.online {
  background-color: var(--success-color);
}

.status-dot.offline {
  background-color: var(--error-color);
}

.status-dot.connecting {
  background-color: var(--warning-color);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.sidebar-content {
  flex: 1;
  padding: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* Section Styles */
.vehicle-info-section,
.controls-section {
  margin: 1.75rem 0;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 1rem;
  padding: 0 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.section-title i {
  font-size: 0.8125rem;
}

/* Vehicle Info Styles */
.vehicle-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0 1.5rem;
}

.vehicle-controls {
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Info Items */
.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  gap: 0.75rem;
}

.info-item:not(:last-child) {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
}

.info-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  flex: 1;
  min-width: 0;
}

.info-label i {
  color: var(--primary-color);
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.info-label span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.info-value {
  font-size: 0.8rem;
  color: var(--text-primary);
  font-weight: 600;
  text-align: right;
  flex: 1.2;
  word-break: break-word;
  min-width: 0;
  background: var(--surface-hover);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.25rem;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  width: 100%;
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border: 1px solid var(--primary-dark);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), #1d4ed8);
  border-color: #1d4ed8;
}

.btn-secondary {
  background: var(--surface-color);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  background: var(--surface-hover);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-lg);
  background: var(--surface-color);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: var(--primary-light);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
  background: var(--surface-hover) !important;
  color: var(--text-muted) !important;
  border-color: var(--border-color) !important;
}

/* Stats */
.stats-card .card-body {
  display: flex;
  gap: 1rem;
}

.stat-item {
  flex: 1;
  text-align: center;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  font-weight: 500;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* Top Bar */
.top-bar {
  height: var(--topbar-height);
  background: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  z-index: 100;
}

.logo-display {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: transparent;
}

.company-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.page-title {
  flex: 1;
}

.page-title h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.page-title h2 i {
  color: var(--primary-color);
  font-size: 1.1rem;
}

.page-title p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

.top-bar-actions {
  display: flex;
  gap: 0.75rem;
}

/* Map Wrapper */
.map-wrapper {
  flex: 1;
  position: relative;
  background: var(--surface-color);
}

.map-container {
  width: 100%;
  height: 100%;
  border: none;
  position: relative;
}

#map {
  width: 100%;
  height: 100%;
  min-height: 400px;
}

/* Map Controls */
.map-controls {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 1000;
}

.map-control-btn {
  width: 44px;
  height: 44px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  font-size: 1rem;
}

.map-control-btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

/* Loading Overlay */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(248, 250, 252, 0.9);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.loading-overlay.show {
  opacity: 1;
  visibility: visible;
}

.loading-spinner {
  text-align: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-spinner p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
}

/* Expiration Overlay */
.expired-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  animation: fadeIn 0.3s ease;
}

.expired-overlay .overlay-content {
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  position: relative;
}

.tracking-ended-icon {
  margin: 0 auto 1.5rem;
  opacity: 0;
  animation: iconFadeIn 0.6s ease 0.3s forwards;
}

.tracking-ended-icon svg {
  filter: drop-shadow(0 4px 8px rgba(239, 68, 68, 0.2));
}

.expired-overlay h3 {
  color: var(--text-primary);
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: textSlideUp 0.5s ease 0.4s forwards;
}

.tracking-ended-subtitle {
  color: var(--text-secondary);
  font-size: 0.975rem;
  font-weight: 500;
  margin: 0;
  opacity: 0;
  animation: textSlideUp 0.5s ease 0.5s forwards;
}

/* Expired overlay action buttons */
.expired-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  opacity: 0;
  animation: textSlideUp 0.5s ease 0.8s forwards;
}

.refresh-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.refresh-btn:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.refresh-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.close-btn {
  background: var(--surface-color);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.close-btn:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

/* Spinning animation for refresh button */
.animate-spin {
  animation: spin 1s linear infinite;
}

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

@keyframes iconFadeIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes textSlideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Mobile Navigation */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--mobile-nav-height);
  background: var(--surface-color);
  border-top: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  z-index: 1000;
  box-shadow: 0 -4px 6px -1px rgb(0 0 0 / 0.1);
}

.mobile-nav {
  display: none;
  justify-content: space-around;
  align-items: center;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  border: none;
  background: var(--surface-color);
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-lg);
  transition: all 0.2s ease;
  min-width: 72px;
  min-height: 56px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.nav-item:hover,
.nav-item.active {
  color: var(--primary-color);
  background: var(--primary-light);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.nav-item i {
  font-size: 1.375rem;
  margin-bottom: 0.125rem;
}

.nav-item span {
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
}

/* Responsive Design */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 280px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .logo-display {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-nav {
    display: flex;
  }

  .main-content {
    padding-bottom: var(--mobile-nav-height);
  }

  .page-title h2 {
    font-size: 1.125rem;
  }

  .page-title p {
    display: none;
  }

  .top-bar {
    padding: 0 1rem;
  }

  .map-controls {
    top: 0.75rem;
    right: 0.75rem;
  }

  .map-control-btn {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 480px) {
  :root {
    --sidebar-width: 100vw;
  }

  .sidebar-content {
    padding: 1rem;
  }

  .card-body {
    padding: 1rem;
  }

  .info-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .info-value {
    text-align: left;
  }

  .top-bar {
    padding: 0 0.75rem;
  }

  .map-controls {
    top: 0.5rem;
    right: 0.5rem;
  }

  .stats-card .card-body {
    flex-direction: column;
    gap: 1.5rem;
  }
}

/* Force dark theme - always applied */
:root {
  --background-color: #f5f5dc;
  --surface-color: #1e293b;
  --surface-hover: #334155;
  --border-color: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
}

.loading-overlay {
  background: rgba(15, 23, 42, 0.9);
}

/* Google Maps style popup */
.leaflet-popup-content-wrapper {
  border-radius: 2px !important;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.3) !important;
  background: white !important;
  border: 1px solid #e0e0e0 !important;
  font-family: Roboto, Arial, sans-serif !important;
}

.leaflet-popup-content {
  font-size: 13px !important;
  color: #333 !important;
  line-height: 1.4 !important;
}

.leaflet-popup-tip {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
  background: white !important;
  border: 1px solid #e0e0e0 !important;
}

.leaflet-popup-close-button {
  color: #666 !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  font-family: Roboto, Arial, sans-serif !important;
}

.leaflet-popup-close-button:hover {
  color: #333 !important;
}

/* Pixel Art Map Pin Marker */
.pixel-pin-marker {
  background: transparent !important;
  border: none !important;
}

.pixel-pin-container {
  position: relative;
  width: 24px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pixel-pin-icon {
  position: relative;
  width: 24px;
  height: 32px;
  z-index: 2;
  transition: transform 0.3s ease;
  transform-origin: center bottom;
}

.pin-head {
  width: 20px;
  height: 20px;
  background: #ff6b35;
  border: 2px solid #e55a2b;
  border-radius: 50%;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  box-shadow:
    inset -2px -2px 0 rgba(255, 255, 255, 0.3),
    inset 2px 2px 0 rgba(0, 0, 0, 0.2),
    0 2px 4px rgba(0, 0, 0, 0.3);
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.pin-shaft {
  width: 4px;
  height: 16px;
  background: #8b9dc3;
  border: 1px solid #6b7a9a;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  box-shadow:
    inset 1px 0 0 rgba(255, 255, 255, 0.2),
    inset -1px 0 0 rgba(0, 0, 0, 0.2);
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.pixel-pin-shadow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  transform: translate(-50%, 12px);
  z-index: 1;
  filter: blur(1px);
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

/* Legacy Google Maps style Vehicle marker for backward compatibility */
.google-vehicle-marker {
  background: transparent !important;
  border: none !important;
}

.google-vehicle-container {
  position: relative;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.google-vehicle-icon {
  width: 24px;
  height: 24px;
  background: #4285f4;
  border: 2px solid white;
  border-radius: 50% 50% 50% 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  z-index: 2;
  position: relative;
  transition: transform 0.3s ease;
  transform-origin: center bottom;
}

.google-vehicle-icon svg {
  transform: translateY(-1px);
}

.google-vehicle-shadow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 50%;
  transform: translate(-50%, 8px);
  z-index: 1;
  filter: blur(2px);
}

/* Bus marker styles */
.bus-marker {
  background: transparent !important;
  border: none !important;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.bus-marker div {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
  transform-origin: center bottom;
}

/* Legacy vehicle marker styles for backward compatibility */
.vehicle-marker {
  background: transparent !important;
  border: none !important;
}

.vehicle-icon-container {
  position: relative;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vehicle-icon {
  width: 24px;
  height: 24px;
  background: var(--primary-color);
  border: 2px solid white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 2;
  position: relative;
  transition: transform 0.3s ease;
}

.vehicle-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  background: var(--primary-color);
  border-radius: 50%;
  opacity: 0.3;
  transform: translate(-50%, -50%);
  animation: vehicle-pulse 2s infinite;
  z-index: 1;
}

@keyframes vehicle-pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0.7;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.3;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}

/* Google Maps style layer control */
.leaflet-control-layers {
  background: white !important;
  border: 1px solid #e0e0e0 !important;
  border-radius: 2px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
  font-family: Roboto, Arial, sans-serif !important;
}

.leaflet-control-layers-expanded {
  padding: 8px !important;
  min-width: 120px !important;
}

.leaflet-control-layers-list label {
  font-size: 13px !important;
  color: #333 !important;
  font-weight: 400 !important;
  margin: 2px 0 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.leaflet-control-layers-list label:hover {
  background-color: #f5f5f5 !important;
  border-radius: 2px !important;
  padding: 2px 4px !important;
  margin: 0 -4px !important;
}

.leaflet-control-layers-list input[type="radio"] {
  margin: 0 !important;
  accent-color: #4285f4 !important;
}

/* Geofence styles */
.leaflet-interactive {
  cursor: pointer;
}

/* Google Maps style attribution */
.leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(4px) !important;
  border-radius: 2px !important;
  font-size: 11px !important;
  font-family: Roboto, Arial, sans-serif !important;
  color: #666 !important;
  padding: 2px 6px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

/* Google Maps style zoom control */
.leaflet-control-zoom {
  border: none !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
  border-radius: 2px !important;
  overflow: hidden !important;
}

.leaflet-control-zoom a {
  background: white !important;
  border: none !important;
  color: #333 !important;
  width: 40px !important;
  height: 40px !important;
  line-height: 40px !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  font-family: Roboto, Arial, sans-serif !important;
  text-align: center !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background-color 0.2s ease !important;
}

.leaflet-control-zoom a:hover {
  background: #f5f5f5 !important;
  color: #333 !important;
}

.leaflet-control-zoom a:active {
  background: #e0e0e0 !important;
}

.leaflet-control-zoom-in {
  border-bottom: 1px solid #e0e0e0 !important;
}

.leaflet-control-zoom-out {
  border-top: none !important;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for keyboard navigation */
.btn:focus,
.map-control-btn:focus,
.nav-item:focus,
.sidebar-toggle:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Expired Overlay Styles */
.expired-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(20, 20, 20, 0.95) 100%);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.5s ease-out;
  backdrop-filter: blur(10px);
}

.expired-overlay .overlay-content {
  background: linear-gradient(145deg, #1f2937 0%, #111827 100%);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  text-align: center;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
  max-width: 400px;
  width: 90%;
  animation: slideUp 0.6s ease-out;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.expired-overlay .tracking-ended-icon {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.expired-overlay .tracking-ended-icon .icon-symbol {
  font-size: 120px !important;
  color: #ef4444 !important;
  filter: drop-shadow(0 0 30px rgba(239, 68, 68, 0.5)) !important;
  display: block !important;
  line-height: 1 !important;
  text-shadow: 0 0 20px rgba(239, 68, 68, 0.8) !important;
  font-weight: bold !important;
  opacity: 1 !important;
  visibility: visible !important;
  position: relative !important;
  z-index: 1 !important;
  background: transparent !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
}


.expired-overlay .tracking-ended-title {
  color: #f9fafb;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.025em;
}

.expired-overlay .tracking-ended-subtitle {
  color: #9ca3af;
  font-size: 1rem;
  margin: 0;
  line-height: 1.5;
}

/* Expired Overlay Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Mobile responsive for expired overlay */
@media (max-width: 480px) {
  .expired-overlay .overlay-content {
    padding: 2rem 1.5rem;
    margin: 1rem;
  }
}

/* Print styles */
@media print {
  .sidebar,
  .mobile-nav,
  .map-controls,
  .top-bar-actions {
    display: none !important;
  }

  .main-content {
    margin-left: 0 !important;
  }
}
