/* Existing dashboard component, preserved from the stable version. */
.dashboard {
  overflow: hidden;
  border: 1px solid rgba(125, 171, 225, .2);
  background: #07111d;
  box-shadow: 0 70px 160px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .015) inset;
  transform-origin: 50% 0;
}

.dashboard__top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 62px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: #081522;
}

.dashboard__brand,
.dashboard__health {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(202, 221, 244, .56);
  font-family: "IBM Plex Mono", monospace;
  font-size: 8px;
  letter-spacing: .13em;
}

.dashboard__brand img {
  width: 22px;
  height: 22px;
}

.dashboard__health {
  justify-content: flex-end;
  color: #83eebb;
}

.dashboard__health i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

.dashboard__tabs {
  display: flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  background: rgba(2, 7, 14, .45);
}

.dashboard__tabs button {
  min-height: 31px;
  padding: 0 17px;
  background: transparent;
  color: #6f829b;
  cursor: pointer;
  font-family: "IBM Plex Mono", monospace;
  font-size: 8px;
  letter-spacing: .08em;
}

.dashboard__tabs button.is-active {
  background: rgba(99, 180, 255, .12);
  color: #dcecff;
}

.dashboard__body {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 240px;
  min-height: 570px;
}

.fleet-list,
.event-stream {
  position: relative;
  z-index: 4;
  background: rgba(7, 17, 29, .94);
}

.fleet-list {
  border-right: 1px solid var(--line);
}

.fleet-list__title,
.event-stream__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  color: #7890ad;
  font-family: "IBM Plex Mono", monospace;
  font-size: 8px;
  letter-spacing: .1em;
}

.fleet-list__title b,
.event-stream__title b {
  color: var(--green);
  font-weight: 500;
}

.fleet-item {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 74px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(146, 181, 224, .08);
  background: transparent;
  color: #fff;
  cursor: pointer;
  text-align: left;
  transition: background .3s ease;
}

.fleet-item:hover,
.fleet-item.is-active {
  background: rgba(99, 180, 255, .07);
}

.fleet-item > i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 9px rgba(47, 224, 138, .7);
}

.fleet-item > i.warn {
  background: var(--warning);
  box-shadow: 0 0 9px rgba(255, 179, 92, .7);
}

.fleet-item span,
.fleet-item b,
.fleet-item small {
  display: block;
}

.fleet-item b {
  margin-bottom: 6px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .05em;
}

.fleet-item small {
  color: #71849d;
  font-size: 9px;
}

.fleet-item em {
  color: #78a5d5;
  font-family: "IBM Plex Mono", monospace;
  font-size: 8px;
  font-style: normal;
}

.fleet-list__more {
  padding: 20px 16px;
  color: #5c718b;
  font-family: "IBM Plex Mono", monospace;
  font-size: 8px;
  letter-spacing: .1em;
  text-align: center;
}

.dashboard-map {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background-color: #06101b;
  background-image: linear-gradient(rgba(99, 180, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(99, 180, 255, .035) 1px, transparent 1px);
  background-size: 34px 34px;
}

.dashboard-map::before {
  position: absolute;
  inset: 0;
  opacity: .5;
  background: radial-gradient(circle at 47% 43%, rgba(31, 123, 255, .15), transparent 47%);
  content: "";
}

.dashboard-map__roads {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.dashboard-map__roads .roads path {
  fill: none;
  stroke: rgba(117, 159, 209, .12);
  stroke-width: 22;
  vector-effect: non-scaling-stroke;
}

.dashboard-map__roads .roads path:nth-child(even) {
  stroke-width: 13;
}

.dashboard-map__roads .active-route {
  fill: none;
  stroke: var(--blue);
  stroke-dasharray: 7 10;
  stroke-linecap: round;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 5px rgba(99, 180, 255, .72));
  animation: routeDash 11s linear infinite;
}

.map-vehicle {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(99, 180, 255, .2);
  border-radius: 50%;
  background: rgba(6, 16, 27, .86);
  cursor: pointer;
  transition: transform .4s var(--ease-out), border-color .3s ease;
}

.map-vehicle i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--blue);
  box-shadow: 0 0 12px var(--blue);
}

.map-vehicle span {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  padding: 4px 6px;
  background: rgba(3, 9, 17, .78);
  color: rgba(221, 236, 253, .7);
  font-family: "IBM Plex Mono", monospace;
  font-size: 7px;
  letter-spacing: .06em;
  translate: -50% 0;
  white-space: nowrap;
}

.map-vehicle:hover,
.map-vehicle.is-selected {
  z-index: 5;
  border-color: var(--green);
  transform: scale(1.18);
}

.map-vehicle.is-selected i {
  background: var(--green);
  box-shadow: 0 0 15px var(--green);
}

.map-vehicle.is-warning i {
  background: var(--warning);
  box-shadow: 0 0 15px var(--warning);
}

.map-vehicle--1 { top: 47%; left: 44%; }
.map-vehicle--2 { top: 24%; left: 72%; }
.map-vehicle--3 { top: 68%; left: 21%; }
.map-vehicle--4 { top: 61%; left: 77%; }
.map-vehicle--5 { top: 17%; left: 31%; }

.map-geofence {
  position: absolute;
  z-index: 1;
  top: 21%;
  left: 58%;
  width: 190px;
  aspect-ratio: 1;
  border: 1px dashed rgba(47, 224, 138, .3);
  border-radius: 50%;
  background: rgba(47, 224, 138, .025);
}

.map-geofence span {
  position: absolute;
  bottom: -22px;
  left: 50%;
  color: rgba(90, 219, 154, .48);
  font-family: "IBM Plex Mono", monospace;
  font-size: 6px;
  letter-spacing: .09em;
  translate: -50% 0;
  white-space: nowrap;
}

.map-card {
  position: absolute;
  z-index: 4;
  bottom: 24px;
  left: 24px;
  width: min(320px, calc(100% - 48px));
  padding: 17px;
  border: 1px solid rgba(99, 180, 255, .24);
  background: rgba(5, 14, 25, .88);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .3);
  backdrop-filter: blur(10px);
}

.map-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}

.map-card > div span {
  color: #fff;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: .08em;
}

.map-card dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0;
}

.map-card dl div {
  min-width: 0;
}

.map-card dt,
.map-card dd {
  margin: 0;
}

.map-card dt {
  margin-bottom: 6px;
  color: #617690;
  font-family: "IBM Plex Mono", monospace;
  font-size: 6px;
  letter-spacing: .08em;
}

.map-card dd {
  color: #dcecff;
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
}

.event-stream {
  border-left: 1px solid var(--line);
}

.event-stream article {
  display: grid;
  grid-template-columns: 34px 1fr 6px;
  gap: 10px;
  align-items: start;
  padding: 18px 14px;
  border-bottom: 1px solid rgba(146, 181, 224, .08);
}

.event-stream time {
  color: #58718e;
  font-family: "IBM Plex Mono", monospace;
  font-size: 8px;
}

.event-stream article div b,
.event-stream article div span {
  display: block;
}

.event-stream article div b {
  margin-bottom: 6px;
  color: #cbd9ea;
  font-size: 10px;
  font-weight: 600;
}

.event-stream article div span {
  color: #657992;
  font-size: 8px;
}

.event-stream article > i {
  width: 5px;
  height: 5px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--green);
}

.event-stream article.is-alert > i {
  background: var(--warning);
  box-shadow: 0 0 9px var(--warning);
}

.dashboard__metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  background: #081522;
}

.dashboard__metrics > div {
  position: relative;
  display: grid;
  gap: 9px;
  min-height: 108px;
  padding: 20px;
  overflow: hidden;
  border-right: 1px solid var(--line);
}

.dashboard__metrics span {
  color: #647991;
  font-family: "IBM Plex Mono", monospace;
  font-size: 7px;
  letter-spacing: .09em;
}

.dashboard__metrics strong {
  color: #edf5ff;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -.04em;
}

.dashboard__metrics small {
  margin-left: 4px;
  color: #7187a2;
  font-size: 10px;
}

.dashboard__metrics i {
  position: absolute;
  right: 20px;
  bottom: 14px;
  left: 20px;
  height: 2px;
  background: rgba(99, 180, 255, .1);
}

.dashboard__metrics i::after {
  display: block;
  width: var(--value);
  height: 100%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(47, 224, 138, .5);
  content: "";
}

