
* { box-sizing: border-box; }
body { margin:0; font-family: Arial, sans-serif; background:#f3f6fb; color:#172033; }
header {
  background: linear-gradient(90deg, #071d3a, #123f73);
  color: white; padding: 18px 26px; display:flex; justify-content:space-between; align-items:center;
}
h1 { margin:0; font-size:30px; }
header p { margin:4px 0 0; opacity:.9; }
#apiStatus { background: rgba(255,255,255,.15); padding:8px 12px; border-radius:20px; }

.consultaBox {
  display:grid; grid-template-columns:220px 1fr 160px; gap:12px; padding:16px 24px 0; align-items:end;
}
.consultaBox div { display:flex; flex-direction:column; gap:6px; }
.consultaBox label { font-weight:700; color:#17365d; }
.consultaBox select { padding:12px; border:1px solid #cad3df; border-radius:10px; background:white; }
.consultaBox button, .searchBox button {
  background:#0b5db3; color:white; border:none; padding:13px 18px; border-radius:10px; cursor:pointer; font-weight:700;
}
.kpis { display:grid; grid-template-columns:repeat(5,1fr); gap:12px; padding:16px 24px; }
.card { background:white; border-radius:14px; padding:16px; box-shadow:0 3px 12px rgba(0,0,0,.08); }
.card small { color:#607086; }
.card strong { display:block; font-size:25px; margin-top:8px; color:#0b376d; }
main { display:grid; grid-template-columns:1fr 360px; gap:16px; padding:0 24px 16px; }
.mapPanel, .sidePanel, .relatorio { background:white; border-radius:16px; box-shadow:0 3px 12px rgba(0,0,0,.08); }
.mapPanel { padding:10px; position:relative; }
#map { height:620px; width:100%; border-radius:14px; }
.legenda {
  position:absolute; bottom:22px; left:24px; background:white; padding:10px 12px; border-radius:12px;
  box-shadow:0 2px 8px rgba(0,0,0,.2); z-index:999; display:flex; gap:12px; flex-wrap:wrap; font-size:13px;
}
.legenda i { display:inline-block; width:11px; height:11px; border-radius:50%; margin-right:5px; }
.azul { background:blue; } .laranja { background:orange; } .vermelho { background:red; }
.sidePanel { padding:16px; max-height:640px; overflow:auto; }
.insight, .rankItem { padding:10px; border-left:4px solid #1d6fbd; background:#eef5ff; margin-bottom:9px; border-radius:8px; }
.relatorio { margin:0 24px 30px; padding:18px; }
.grid3 { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-bottom:18px; }
table { width:100%; border-collapse:collapse; font-size:14px; }
th, td { padding:9px 8px; border-bottom:1px solid #e7edf5; text-align:left; }
th { background:#f0f5fb; color:#102b4f; }
@media (max-width:1000px) {
  .kpis { grid-template-columns:repeat(2,1fr); }
  main, .consultaBox { grid-template-columns:1fr; }
}
#map {
    width: 100%;
    height: 600px;
    border-radius: 12px;
    margin-top: 20px;
}