*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: #0f1419;
  color: #e7ecf1;
}

body {
  display: flex;
  flex-direction: column;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding: 0.65rem 1rem;
  background: #1a2332;
  border-bottom: 1px solid #2d3a4d;
  z-index: 1000;
}

.toolbar-title h1 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: #8b9cb3;
}

.toolbar-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex: 1;
}

.chip {
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: #243044;
  border: 1px solid #3a4d66;
}

.chip.north { border-color: #5b9bd5; color: #a8d4ff; }
.chip.south { border-color: #e07b39; color: #ffc9a3; }
.chip.west  { border-color: #9b59b6; color: #ddb8f0; }
.chip.east  { border-color: #2ecc71; color: #a8f0c8; }

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn {
  padding: 0.35rem 0.75rem;
  border: 1px solid #4a6278;
  border-radius: 6px;
  background: #2a3a50;
  color: #e7ecf1;
  font-size: 0.82rem;
  cursor: pointer;
}

.btn:hover {
  background: #354a65;
}

.btn-accent {
  border-color: #ff6b6b;
  background: #3d2a2a;
}

.btn-accent:hover {
  background: #523636;
}

.btn-accent.active {
  background: #ff6b6b;
  color: #1a0f0f;
  border-color: #ff8585;
}

.btn-danger {
  border-color: #c0392b;
  color: #ffb3ab;
}

.btn-danger:hover {
  background: #4a2520;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  cursor: pointer;
  user-select: none;
}

#map {
  flex: 1;
  min-height: 0;
}

.footer {
  padding: 0.35rem 1rem;
  font-size: 0.72rem;
  color: #6b7d94;
  background: #141c28;
  border-top: 1px solid #2d3a4d;
}

.corner-label {
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  text-shadow: 0 0 3px #000, 0 0 6px #000;
}

.boundary-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-shadow: 0 0 4px #000;
  pointer-events: none;
}

.leaflet-container {
  background: #1a2332;
  font-family: inherit;
}
