:root {
  --ink: #0b1210;
  --panel: #14201c;
  --panel-2: #1b2b26;
  --moss: #7c9a72;
  --amber: #e0a45a;
  --paper: #e8e2d4;
  --muted: #8b9688;
  --danger: #c45c4a;
  --line: rgba(232, 226, 212, 0.08);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(224, 164, 90, 0.12), transparent 50%),
    radial-gradient(900px 400px at 100% 0%, rgba(124, 154, 114, 0.14), transparent 45%),
    var(--ink);
  color: var(--paper);
}

a { color: inherit; text-decoration: none; }
button, input {
  font: inherit;
}

.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.brand strong { letter-spacing: 0.04em; font-size: 1.15rem; }
.brand span { color: var(--muted); font-size: 0.85rem; }

nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
nav a, .ghost {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--paper);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
}
nav a.active, .ghost:hover { border-color: var(--moss); color: var(--moss); }

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

.kicker {
  color: var(--moss);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.card h2, .card h1 { margin: 0 0 12px; font-weight: 600; }
.metric { font-size: 1.7rem; font-family: "IBM Plex Mono", ui-monospace, monospace; }
.muted { color: var(--muted); }
.amber { color: var(--amber); }
.danger { color: var(--danger); }

#map {
  height: 68vh;
  min-height: 420px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.live-box {
  min-height: 180px;
  white-space: pre-wrap;
  font-size: 1.25rem;
  line-height: 1.5;
  font-family: "IBM Plex Serif", Georgia, serif;
}
.live-box .caret {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  background: var(--amber);
  margin-left: 2px;
  animation: blink 1s steps(2) infinite;
  vertical-align: text-bottom;
}
@keyframes blink { 50% { opacity: 0; } }

.list { display: flex; flex-direction: column; gap: 10px; }
.row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: 0; }

.auth {
  max-width: 420px;
  margin: 12vh auto;
}
input {
  width: 100%;
  margin: 8px 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0e1714;
  color: var(--paper);
}
.primary {
  width: 100%;
  background: var(--moss);
  color: var(--ink);
  border: 0;
  border-radius: 12px;
  padding: 12px;
  font-weight: 650;
  cursor: pointer;
}
.search {
  width: 100%;
  margin-bottom: 12px;
}

.leaflet-container { background: #101916; }

@media (max-width: 800px) {
  .span-4, .span-6, .span-8 { grid-column: span 12; }
  #map { height: 52vh; min-height: 280px; }
}
