:root {
  --panel-bg: rgba(10, 18, 28, 0.9);
  --panel-border: rgba(255, 255, 255, 0.2);
  --text-strong: #f8fbff;
  --text-dim: #c4d2de;
  --accent-link: #8bd1ff;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  font-family: "Avenir Next", "Segoe UI", "Trebuchet MS", sans-serif;
  background: #0a1118;
}
#google-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.vehicle-overlay-layer .vehicle-marker {
  cursor: pointer;
  pointer-events: auto;
  contain: layout style paint;
  transform-origin: center center;
}
.vehicle-marker svg {
  display: block;
  width: 100%;
  height: 100%;
}
#back-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 21;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--panel-border);
  background: var(--panel-bg);
  color: var(--text-strong);
  text-decoration: none;
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.2px;
  backdrop-filter: blur(4px);
}
#back-link:hover {
  color: var(--accent-link);
}
#control-panel {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 20;
  width: min(92vw, 360px);
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: var(--panel-bg);
  color: var(--text-dim);
  backdrop-filter: blur(4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  font-size: 13px;
  line-height: 1.42;
}
#control-panel h3 {
  margin: 0 0 8px 0;
  font-size: 15px;
  color: var(--text-strong);
}
.panel-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.panel-tab {
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-dim);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
}
.panel-tab.active {
  color: var(--text-strong);
  background: rgba(139, 209, 255, 0.2);
  border-color: rgba(139, 209, 255, 0.45);
}
.hidden {
  display: none;
}
.layer-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  align-items: center;
  margin: 6px 0;
}
.mode-row {
  margin: 8px 0 2px 0;
  padding-left: 26px;
  font-size: 12px;
}
.mode-options {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  flex-wrap: wrap;
}
#vehicle-mode-row.mode-disabled {
  opacity: 0.55;
  pointer-events: none;
}
#status {
  margin-top: 10px;
  padding: 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
  white-space: pre-line;
}
#metrics {
  margin-top: 8px;
  font-size: 12px;
}
.legend {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 12px;
}
.legend-title {
  color: var(--text-strong);
  font-weight: 600;
  margin: 0 0 6px 0;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 4px 0;
}
.swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  display: inline-block;
}
#api-key-note {
  margin-top: 8px;
  font-size: 11px;
  opacity: 0.86;
}
#diagnostics-status {
  margin-top: 8px;
  font-size: 12px;
}
#diagnostics-summary, #diagnostics-lines, #diagnostics-missing {
  margin-top: 8px;
  padding: 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
  white-space: pre-line;
}
.perf-actions button {
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-strong);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12px;
  cursor: pointer;
}
