:root {
  --bg: #0b1020;
  --panel: #121a31;
  --card: #17213e;
  --line: #29375f;
  --text: #ebf1ff;
  --muted: #b2c0e2;
  --accent: #6ea8ff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background: linear-gradient(180deg, #09101d, #0c1426 25%, #11192d 100%);
  color: var(--text);
}
header, footer {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 20px 10px;
}
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 20px 40px;
}
.panel {
  background: rgba(18, 26, 49, 0.92);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.2);
}
.grid.two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 0.95rem;
}
input, select, button {
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  background: var(--card);
  color: var(--text);
}
input[type="file"] {
  padding: 9px 10px;
}
button {
  cursor: pointer;
  font-weight: 600;
}
.actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.boundary-actions {
  margin-top: 12px;
}
.boundary-actions button.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(110, 168, 255, 0.35);
}
.status-text {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.5;
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}
.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
.kpi .label { color: var(--muted); font-size: 0.9rem; }
.kpi .value { font-size: 1.4rem; font-weight: 700; margin-top: 6px; }
.plot { min-height: 420px; margin-bottom: 16px; }
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: 14px;
  overflow: hidden;
}
th, td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  font-size: 0.95rem;
}
th { color: var(--muted); }

@media (max-width: 720px) {
  .plot {
    min-height: 340px;
  }
}
