:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #14213d;
  --muted: #65758b;
  --line: #d7dee8;
  --paper: #f7f9fc;
  --panel: #ffffff;
  --green: #00a884;
  --red: #d92d20;
  --blue: #1976d2;
  --amber: #d97706;
  --teal-dark: #087f5b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
}

button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  min-height: 40px;
  padding: 0 14px;
}

button:hover {
  border-color: #9eb1c8;
}

.shell {
  display: grid;
  grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
  min-height: 100vh;
}

.panel {
  border-right: 1px solid var(--line);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  z-index: 500;
}

.top {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 3px;
  text-transform: uppercase;
}

h1 {
  font-size: 26px;
  line-height: 1.1;
  margin: 0;
}

.icon-button {
  min-width: 56px;
}

.status-row {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
}

.dot {
  border-radius: 999px;
  display: inline-block;
  height: 10px;
  width: 10px;
}

.online {
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(15, 159, 110, 0.12);
}

.offline {
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(217, 45, 32, 0.10);
}

.waiting {
  background: var(--amber);
  box-shadow: 0 0 0 5px rgba(217, 119, 6, 0.12);
}

.metric-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 70px;
  padding: 10px 12px;
}

.metric span,
.details span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 650;
  margin-bottom: 7px;
}

.metric strong {
  display: block;
  font-size: 18px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.compact .metric {
  min-height: 58px;
}

.controls {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.primary {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.details {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
}

.details strong {
  display: block;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

#map {
  min-height: 100vh;
}

.bike-leaflet-icon {
  background: transparent;
  border: 0;
}

.bike-shell {
  align-items: center;
  background: #ffffff;
  border: 3px solid var(--green);
  border-radius: 50%;
  display: flex;
  height: 54px;
  justify-content: center;
  position: relative;
  width: 54px;
  box-shadow: 0 10px 24px rgba(20, 33, 61, 0.22);
}

.bike-pulse {
  animation: pulse 1.2s ease-out infinite;
  border: 2px solid rgba(0, 168, 132, 0.40);
  border-radius: 50%;
  inset: -10px;
  position: absolute;
}

.bike-heading {
  align-items: center;
  display: flex;
  height: 42px;
  justify-content: center;
  transition: transform 180ms linear;
  width: 42px;
  will-change: transform;
}

.bike-heading svg {
  fill: none;
  height: 38px;
  stroke: var(--teal-dark);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.2;
  width: 38px;
}

@keyframes pulse {
  0% {
    opacity: 0.75;
    transform: scale(0.75);
  }

  100% {
    opacity: 0;
    transform: scale(1.45);
  }
}

@media (max-width: 820px) {
  .shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(420px, 1fr);
  }

  .panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  #map {
    min-height: 55vh;
  }
}

@media (max-width: 430px) {
  .panel {
    padding: 14px;
  }

  .metric-grid,
  .controls {
    grid-template-columns: 1fr;
  }
}
