html, body {
  margin: 0;
  height: 100%;
  font-family: system-ui, sans-serif;
  background: #1b1b1b;
  color: #eaeaea;
}

header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: #111;
}

button {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

button.type {
  background: #2b2b2b;
  color: #fff;
}

button.type.active {
  background: #555;
}

#apply {
  margin-left: auto;
  background: #2e7d32;
  color: #fff;
}

#update {
  background: #1565c0;
  color: #fff;
}

main {
  display: grid;
  grid-template-columns: 1fr 300px;
  height: calc(100vh - 48px);
}

#map {
  position: relative;
  background: #000;
}

aside {
  padding: 12px;
  background: #202020;
  overflow-y: auto;
}

aside h3 {
  margin-top: 0;
}

label {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  opacity: 0.85;
}

input, textarea, select {
  width: 100%;
  padding: 6px;
  margin-top: 4px;
  border-radius: 4px;
  border: 1px solid #444;
  background: #2a2a2a;
  color: #fff;
}

textarea {
  resize: vertical;
}

.coords {
  display: flex;
  gap: 6px;
}

/* ---- Legend ---- */
.legend {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: rgba(0,0,0,0.85);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  z-index: 1000;
}

.legend div {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0;
}

/* ---- Pins ---- */
.pin {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.pin.blue { background: #2196f3; }
.pin.red { background: #e53935; }
.pin.yellow { background: #fbc02d; }