.vehicles-app {
  background: var(--bg);
}

.vehicles-app .main {
  display: flex;
  flex: 1;
  min-height: 0;
}

.vehicles-app .sidebar {
  width: 280px;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  background: var(--sidebar-bg);
}

.vehicles-app .sidebar-backdrop {
  position: absolute;
}

.vehicles-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: 28px 22px 30px;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(31, 42, 61, 0.02) 100%);
}

.vehicles-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  max-width: 1500px;
  width: 100%;
  margin: 0 auto 18px;
}

.vehicles-kicker {
  color: var(--purple);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.vehicles-header h1 {
  margin-top: 8px;
  color: var(--text);
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.vehicles-summary-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.vehicles-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  background: rgba(90, 90, 245, 0.12);
  color: var(--purple);
  padding: 0 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.vehicles-pill.is-soft {
  background: rgba(58, 123, 213, 0.08);
  color: var(--blue);
}

.vehicles-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 1500px;
  width: 100%;
  min-height: 0;
  margin: 0 auto;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.vehicles-map-wrap {
  position: relative;
  min-height: 650px;
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  overflow: hidden;
  background: #dfeaf3;
}

.vehicle-map {
  position: absolute;
  inset: 0;
}

.vehicles-timeline {
  display: grid;
  gap: 8px;
  padding: 10px 12px 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel-strong);
}

.timeline-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#vehicleTimeline {
  width: 100%;
  accent-color: var(--purple);
  cursor: pointer;
}

.vehicle-point-card {
  position: absolute;
  left: 22px;
  bottom: 92px;
  z-index: 10;
  display: grid;
  gap: 8px;
  min-width: 240px;
  padding: 16px 17px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 16px 34px rgba(17, 24, 39, 0.12);
  backdrop-filter: blur(16px);
}

.vehicle-point-card strong {
  color: var(--text);
  font-size: 17px;
}

.vehicle-point-card span {
  color: var(--text-muted);
  font-size: 12px;
}

.point-metrics {
  display: flex;
  gap: 16px;
  padding-top: 4px;
  color: var(--purple);
  font-size: 12px;
  font-weight: 800;
}

.vehicle-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 0 10px 10px;
  overflow: auto;
}

.vehicle-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 10px;
  color: var(--text-dim);
}

.vehicle-sidebar-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 11px;
}

.vehicle-card {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 12px 12px 11px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.vehicle-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.vehicle-card.is-selected {
  border-color: rgba(90, 90, 245, 0.55);
  background: rgba(90, 90, 245, 0.08);
}

.vehicle-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.vehicle-card-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 800;
}

.vehicle-card-name::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(24, 169, 87, 0.12);
}

.vehicle-card-name.is-offline::before {
  background: #a5b4c9;
  box-shadow: 0 0 0 4px rgba(165, 180, 201, 0.12);
}

.vehicle-card-status {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
}

.vehicle-card-status.is-offline {
  color: var(--text-muted);
}

.vehicle-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-muted);
  font-size: 11px;
}

.vehicle-card-meta strong {
  color: var(--text);
}

.stop-flag {
  position: relative;
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ff6b6b 0%, #ef4444 100%);
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 12px rgba(239, 68, 68, 0.28);
  transform: none;
  transform-origin: center center;
  pointer-events: auto;
}

.stop-flag::before,
.stop-flag::after {
  content: none;
}

.stop-popup {
  font-family: 'Manrope', sans-serif;
  color: var(--text);
}

.stop-popup strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.stop-popup span {
  color: var(--text-muted);
  font-size: 11px;
}

@media (max-width: 980px) {
  .vehicles-content { padding: 18px 14px 20px; }
  .vehicles-header { align-items: start; flex-direction: column; }
  .vehicles-summary-meta { justify-content: flex-start; }
  .vehicles-map-wrap { min-height: 540px; }
}

@media (max-width: 760px) {
  .vehicles-map-wrap { min-height: 430px; }
  .vehicle-point-card { left: 12px; bottom: 86px; min-width: 200px; }
  .vehicle-card-status, .vehicle-card-meta { font-size: 10px; }
}
