.track-hero {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 60%, #0F172A 100%);
  position: relative;
}

.track-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.track-card {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.track-progress-bar {
  height: 10px;
  background: #E5E7EB;
  border-radius: 999px;
  overflow: hidden;
}

.track-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #059669, #34D399);
  border-radius: 999px;
  transition: width 1s ease;
  position: relative;
}

.track-progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.status-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Milestones */
.track-milestones {
  justify-content: space-between;
  position: relative;
}

.track-milestones::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 5%;
  right: 5%;
  height: 2px;
  background: #E5E7EB;
  z-index: 0;
}

.track-milestone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
  flex: 1;
}

.track-milestone-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #F3F4F6;
  color: #9CA3AF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border: 2px solid #E5E7EB;
  transition: all 0.3s ease;
}

.track-milestone.done .track-milestone-icon {
  background: #0F172A;
  color: #fff;
  border-color: #0F172A;
}

.track-milestone.active .track-milestone-icon {
  background: #059669;
  color: #fff;
  border-color: #059669;
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.25);
}

.track-milestone-label {
  font-size: 10px;
  font-weight: 600;
  color: #9CA3AF;
  text-align: center;
  max-width: 72px;
  line-height: 1.2;
}

.track-milestone.done .track-milestone-label,
.track-milestone.active .track-milestone-label {
  color: #0F172A;
}

/* Timeline */
.track-timeline {
  position: relative;
  padding-left: 28px;
}

.track-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, #059669, #E5E7EB);
}

.track-event {
  position: relative;
  padding-bottom: 28px;
}

.track-event:last-child {
  padding-bottom: 0;
}

.track-event-dot {
  position: absolute;
  left: -28px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #D1D5DB;
}

.track-event.latest .track-event-dot {
  border-color: #059669;
  background: #059669;
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.2);
}

.track-event-content {
  background: #F9FAFB;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #F3F4F6;
}

.track-event.latest .track-event-content {
  background: #ECFDF5;
  border-color: #A7F3D0;
}

/* Route visual */
.track-route-point {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.track-route-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-top: 4px;
  shrink: 0;
}

.track-route-dot.origin {
  background: #0F172A;
}

.track-route-dot.destination {
  background: #059669;
}

.track-route-line {
  width: 2px;
  height: 24px;
  background: linear-gradient(to bottom, #0F172A, #059669);
  margin-left: 5px;
  margin-top: 4px;
  margin-bottom: 4px;
}

/* Live map */
.track-live-map {
  width: 100%;
  height: 420px;
  background: #E2E8F0;
}

@media (min-width: 768px) {
  .track-live-map {
    height: 480px;
  }
}

.track-map-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #64748B;
  gap: 12px;
  padding: 24px;
  text-align: center;
}

.track-map-empty i {
  font-size: 2.5rem;
  opacity: 0.4;
}

.track-map-info {
  font-size: 13px;
  line-height: 1.5;
  color: #0F172A;
  max-width: 220px;
}

.track-map-legend {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.track-map-legend-current {
  background: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.25);
}

.track-map-legend-origin {
  background: #0F172A;
}

.track-map-legend-dest {
  background: #047857;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  border-radius: 0;
}

.track-map-legend-route {
  width: 20px;
  height: 4px;
  border-radius: 2px;
  background: #059669;
}

.track-map-legend-remaining {
  width: 20px;
  height: 0;
  border-top: 3px dashed #94A3B8;
  border-radius: 0;
}

.track-leaflet-current {
  background: transparent;
  border: none;
}

.track-leaflet-pulse {
  display: block;
  width: 18px;
  height: 18px;
  background: #059669;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(5, 150, 105, 0.35);
  animation: mapPulse 2s infinite;
}

@keyframes mapPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.35); }
  50% { box-shadow: 0 0 0 10px rgba(5, 150, 105, 0.15); }
}
