:root {
  --bg: #0f172a;
  --panel: #ffffff;
  --accent: #0284c7;
  --accent-dark: #0369a1;
  --text: #0f172a;
  --muted: #64748b;
  --warn-bg: #fef3c7;
  --warn-border: #f59e0b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: #f1f5f9;
}

header {
  background: var(--bg);
  color: #f8fafc;
  padding: 1.2rem 1.5rem;
}

header h1 { margin: 0 0 .25rem; font-size: 1.35rem; }
header p { margin: 0; color: #cbd5e1; font-size: .9rem; }

main {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 1rem;
  padding: 1rem;
  align-items: start;
}

@media (max-width: 900px) {
  main { grid-template-columns: 1fr; }
}

.panel {
  background: var(--panel);
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .12);
}

label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  margin: .75rem 0 .25rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .03em;
}

input[type="file"], select {
  width: 100%;
  padding: .5rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  font-size: .95rem;
}

button {
  margin-top: 1rem;
  width: 100%;
  padding: .7rem;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

button:hover:not(:disabled) { background: var(--accent-dark); }
button:disabled { background: #94a3b8; cursor: progress; }

.status { font-size: .9rem; color: var(--muted); min-height: 1.2em; }
.status.error { color: #b91c1c; font-weight: 600; }

h2 { font-size: 1.05rem; margin: 1rem 0 .5rem; }

.stats {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .3rem .75rem;
  margin: 0;
  font-size: .9rem;
}
.stats dt { color: var(--muted); }
.stats dd { margin: 0; font-weight: 600; text-align: right; }

.warning {
  background: var(--warn-bg);
  border-left: 4px solid var(--warn-border);
  padding: .6rem .75rem;
  border-radius: 4px;
  font-size: .88rem;
}

.download {
  display: block;
  margin-top: 1rem;
  padding: .7rem;
  text-align: center;
  background: #16a34a;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
}
.download:hover { background: #15803d; }

details { margin-top: 1rem; font-size: .88rem; }
details summary { cursor: pointer; color: var(--muted); font-weight: 600; }
#list { padding-left: 1.2rem; max-height: 260px; overflow-y: auto; }
#list li { margin-bottom: .35rem; }
#list small { color: var(--muted); display: block; }

.map-wrap {
  background: var(--panel);
  border-radius: 10px;
  padding: .5rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .12);
}

#map {
  height: calc(100vh - 8rem);
  min-height: 420px;
  border-radius: 8px;
}
