:root {
  --blue: #0b6fcb;
  --ink: #17202a;
  --muted: #637083;
  --line: #d8dee8;
  --panel: #ffffff;
  --bg: #eef2f6;
  --green: #16836b;
  --orange: #d97706;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  background: #164b7a;
  color: #fff;
  border-bottom: 1px solid #0f3354;
}

.eyebrow {
  color: #c7d8e8;
  font-size: 12px;
  line-height: 16px;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: 24px;
  line-height: 30px;
}

h2 {
  font-size: 15px;
  line-height: 20px;
}

.filters {
  display: flex;
  align-items: end;
  gap: 10px;
}

label {
  display: grid;
  gap: 5px;
  color: #dce8f2;
  font-size: 12px;
}

input,
button {
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 6px;
  font: inherit;
}

input {
  min-width: 142px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
}

button {
  padding: 0 14px;
  background: #0f8f72;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

main {
  padding: 18px;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.kpi,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(20, 30, 45, .06);
}

.kpi {
  padding: 13px 14px;
}

.kpi span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.kpi strong {
  display: block;
  margin-top: 5px;
  font-size: 22px;
  line-height: 28px;
}

.split {
  display: grid;
  grid-template-columns: minmax(420px, 1.15fr) minmax(360px, .85fr);
  gap: 14px;
  margin-bottom: 14px;
}

.lower {
  grid-template-columns: minmax(360px, .8fr) minmax(480px, 1.2fr);
}

.panel {
  min-width: 0;
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}

.panel-head span {
  color: var(--muted);
  font-size: 12px;
}

#map {
  height: 430px;
}

canvas {
  display: block;
  width: 100%;
  height: 430px;
  padding: 14px;
}

.table-wrap {
  max-height: 420px;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid #edf0f4;
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #4b5a6c;
  font-size: 12px;
}

td.num,
th.num {
  text-align: right;
}

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

@media (max-width: 1050px) {
  .kpis {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }

  .split,
  .lower {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar,
  .filters {
    align-items: stretch;
    flex-direction: column;
  }

  .kpis {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  #map,
  canvas {
    height: 360px;
  }
}
