:root {
  color-scheme: light;
  --bg: #f2efe8;
  --panel: rgba(255, 251, 245, 0.95);
  --panel-border: rgba(89, 73, 47, 0.15);
  --text: #1d1b18;
  --muted: #665f55;
  --accent: #1d6b57;
  --accent-strong: #145041;
  --danger: #9b2c2c;
  --danger-strong: #7c2020;
  --surface: #ffffff;
  --shadow: 0 20px 60px rgba(32, 27, 18, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(29, 107, 87, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(211, 152, 54, 0.18), transparent 24%),
    var(--bg);
}

body {
  min-height: 100vh;
}

.app-shell {
  display: grid;
  grid-template-columns: 360px 1fr;
  min-height: 100vh;
}

.sidebar {
  padding: 24px;
  background: var(--panel);
  backdrop-filter: blur(14px);
  border-right: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
  overflow-y: auto;
}

.map-area {
  position: relative;
}

#map {
  height: 100vh;
  width: 100%;
}

.sidebar-section + .sidebar-section {
  margin-top: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 700;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: 2.2rem;
  line-height: 1;
}

h2 {
  margin-bottom: 12px;
  font-size: 1rem;
}

.lead,
.muted,
.feature-meta {
  color: var(--muted);
  line-height: 1.5;
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.button-row.stack {
  flex-direction: column;
  align-items: stretch;
}

button,
.file-input-label {
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, opacity 160ms ease;
}

button:hover,
.file-input-label:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.primary-button {
  background: var(--accent);
  color: white;
}

.primary-button:hover {
  background: var(--accent-strong);
}

.secondary-button,
.file-input-label,
.ghost-button {
  background: rgba(29, 107, 87, 0.08);
  color: var(--accent-strong);
}

.danger-button {
  background: var(--danger);
  color: white;
}

.danger-button:hover {
  background: var(--danger-strong);
}

.stat {
  margin-bottom: 0;
  font-size: 1.8rem;
  font-weight: 700;
}

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

.badge {
  display: inline-flex;
  min-width: 36px;
  min-height: 36px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  background: rgba(29, 107, 87, 0.12);
  color: var(--accent-strong);
  font-weight: 700;
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(23, 20, 16, 0.08);
}

.feature-title {
  margin-bottom: 4px;
  font-weight: 700;
}

.feature-meta {
  margin-bottom: 0;
  font-size: 0.88rem;
}

#importInput {
  display: none;
}

.leaflet-popup-content-wrapper {
  border-radius: 14px;
}

.popup-content h3 {
  margin-bottom: 8px;
}

.popup-content p {
  margin-bottom: 0;
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--panel-border);
    box-shadow: none;
  }

  #map {
    height: 70vh;
  }
}
