:root {
    --bg: #0f172a;
    --panel: #111827;
    --panel-2: #1f2937;
    --text: #e5e7eb;
    --muted: #94a3b8;
    --border: #334155;
    --accent: #38bdf8;
    --vignot: #16a34a;
    --fagaut: #dc2626;
    --neutral: #64748b;
}

* {
    box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

body {
  overflow: hidden;
}

.app {
  display: grid;
  grid-template-columns: 380px 1fr;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  background: rgba(17, 24, 39, 0.98);
  border-right: 1px solid var(--border);
  padding: 20px;
  overflow-y: auto;
  overflow-x: hidden !important;
  height: 100vh;
}

.main {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  height: 100vh;
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.main {
    display: grid;
    grid-template-rows: auto 1fr;
    min-width: 0;
}

.topbar {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
}


h1 {
    font-size: 1.4rem;
    margin: 0 0 8px;
}

h2 {
    font-size: 1rem;
    margin: 22px 0 10px;
}

p {
    margin: 0 0 10px;
    line-height: 1.45;
    color: var(--muted);
}

.cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.card {
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
}

.card .k {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.card .v {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 4px;
}

.legend {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin: 10px 0 4px;
    color: var(--muted);
    font-size: 0.92rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
    margin-right: 6px;
}

.dot.vignot {
    background: var(--vignot);
}

.dot.fagaut {
    background: var(--fagaut);
}

.dot.neutral {
    background: var(--neutral);
}

.controls {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

input,
select {
    width: 100%;
    background: #0b1220;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
}

.table-wrap {
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    margin-top: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 9px 10px;
    border-bottom: 1px solid rgba(148, 163, 184, .15);
    text-align: left;
    font-size: 0.92rem;
    vertical-align: top;
}

th {
    background: #0b1220;
    color: #cbd5e1;
    position: sticky;
    top: 0;
    z-index: 1;
}

tbody tr:hover {
    background: rgba(56, 189, 248, 0.06);
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    border: 1px solid var(--border);
}

.pill.vignot {
    color: #dcfce7;
    background: rgba(22, 163, 74, .14);
}

.pill.fagaut {
    color: #fee2e2;
    background: rgba(220, 38, 38, .14);
}

.muted {
    color: var(--muted);
}

.note {
    font-size: 0.88rem;
    background: rgba(56, 189, 248, .08);
    border: 1px solid rgba(56, 189, 248, .2);
    padding: 10px 12px;
    border-radius: 12px;
}

.topbar-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.status {
    color: var(--muted);
    font-size: .92rem;
}

.small {
    font-size: .84rem;
}

.pill.neutral {
    color: #e2e8f0;
    background: rgba(100, 116, 139, .18);
}



@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  .app {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    max-height: none;
    height: auto;
    overflow: visible;
  }

  .main {
    height: auto;
    overflow: visible;
  }

  #map {
    height: 68vh;
  }
}