/* Sala de Monitoramento – LAMBDA · tema laranja */

:root {
  --bg: #170d06;
  --panel: #22140a;
  --panel2: #2c1a0d;
  --edge: #4a2b13;
  --text: #fbefe3;
  --muted: #c4a184;
  --laranja: #f28c28;
  --laranja2: #ffb04d;
  --laranja3: #c25a00;
  --topo1: #b34f00;
  --topo2: #f28c28;
  --sombra: 0 8px 24px rgba(0, 0, 0, .35);
  --ok: #3ccf6e;
  --alerta: #ef4444;
  color-scheme: dark;
}

:root[data-tema="claro"] {
  --bg: #fff6ec;
  --panel: #ffffff;
  --panel2: #fff0e0;
  --edge: #f1cfae;
  --text: #3a1d07;
  --muted: #8a6447;
  --laranja: #e0701a;
  --laranja2: #f29a3a;
  --laranja3: #b04e00;
  --topo1: #c75800;
  --topo2: #f59a3c;
  --sombra: 0 6px 18px rgba(176, 78, 0, .12);
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  font-size: 14px;
}

button {
  font: inherit;
  color: inherit;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s;
}

button:hover { background: rgba(255, 255, 255, .24); }

/* ---------------------------- topo ---------------------------- */

.topo {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 20px;
  background: linear-gradient(100deg, var(--topo1), var(--topo2));
  color: #fff;
  box-shadow: var(--sombra);
  position: sticky;
  top: 0;
  z-index: 1100; /* acima dos controles do Leaflet (1000) */
  flex-wrap: wrap;
}

.marca { display: flex; align-items: center; gap: 12px; }
.marca img { height: 54px; background: #fff; border-radius: 10px; padding: 4px; }
.marca h1 { margin: 0; font-size: 21px; letter-spacing: .06em; font-weight: 800; }
.marca h1 span { font-weight: 600; opacity: .92; }
.marca p { margin: 2px 0 0; font-size: 12px; opacity: .9; }

.abas { display: flex; gap: 6px; margin-left: auto; }
.abas button { font-weight: 600; padding: 8px 16px; }
.abas button.ativa { background: #fff; color: var(--laranja3); border-color: #fff; }
.abas small { font-weight: 500; opacity: .75; font-size: 10px; text-transform: uppercase; }

.meta { display: flex; align-items: center; gap: 8px; }
.relogio { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; margin-right: 6px; }
.relogio b { font-size: 22px; font-variant-numeric: tabular-nums; }
.relogio span { font-size: 11px; opacity: .9; }
.atualizacao { display: flex; align-items: center; gap: 6px; font-size: 11.5px; margin-right: 6px; opacity: .95; }
.ponto { width: 10px; height: 10px; border-radius: 50%; background: #ffe2c2; box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); }
.ponto.ok { background: var(--ok); }
.ponto.erro { background: var(--alerta); }
#btn-rotacao.ligado { background: #fff; color: var(--laranja3); }

/* ---------------------------- layout ---------------------------- */

main { padding: 16px 20px 8px; }
.aba { display: none; flex-direction: column; gap: 14px; }
.aba.ativa { display: flex; }

.grade { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: 14px; }

.painel {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 14px;
  box-shadow: var(--sombra);
  padding: 14px 16px;
  min-width: 0;
}

.painel-cab { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.painel-cab h2 {
  margin: 0;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--laranja2);
  border-left: 4px solid var(--laranja);
  padding-left: 8px;
}
:root[data-tema="claro"] .painel-cab h2 { color: var(--laranja3); }
.sub { color: var(--muted); font-size: 12px; }

.mapa { height: 470px; border-radius: 10px; overflow: hidden; border: 1px solid var(--edge); }

.legenda { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12px; color: var(--muted); align-items: center; }
.legenda i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 5px; vertical-align: -2px; }

/* ---------------------------- KPIs ---------------------------- */

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: var(--sombra);
  position: relative;
  overflow: hidden;
}
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--kpi-cor, var(--laranja)); }
.kpi .k { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.kpi .v { font-size: 28px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .d { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------------------------- lista ---------------------------- */

.lista-painel { display: flex; flex-direction: column; }
.lista { overflow-y: auto; max-height: 520px; padding-right: 4px; display: flex; flex-direction: column; gap: 6px; }
.grupo { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 8px 2px 2px; font-weight: 700; }
.grupo:first-child { margin-top: 0; }

.cid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--panel2);
  border: 1px solid transparent;
  cursor: pointer;
}
.cid:hover { border-color: var(--laranja3); }
.cid.sel { border-color: var(--laranja); box-shadow: inset 0 0 0 1px var(--laranja); }
.cid.destaque .cid-nome { font-size: 15px; }
.cid-nome { font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cid-sub { color: var(--muted); font-size: 12px; grid-column: 1 / 2; }
.cid-valor {
  grid-row: 1 / 3;
  grid-column: 2;
  align-self: center;
  min-width: 64px;
  text-align: center;
  border-radius: 10px;
  padding: 5px 8px;
  font-weight: 800;
  font-size: 20px;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.cid-valor small { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }

.tag { font-size: 9.5px; font-weight: 800; letter-spacing: .06em; padding: 2px 6px; border-radius: 5px; text-transform: uppercase; }
.tag.sensor { background: var(--laranja); color: #fff; }
.tag.modelo { background: transparent; color: var(--muted); border: 1px solid var(--edge); }
.tag.extra { background: transparent; color: var(--laranja2); border: 1px dashed var(--laranja3); }
.estrela { color: var(--laranja2); }

/* ---------------------------- detalhe ---------------------------- */

.detalhe { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 18px; }
.det-resumo h3 { margin: 0 0 4px; font-size: 22px; }
.det-grande { display: flex; align-items: center; gap: 14px; margin: 10px 0; }
.det-grande .num { font-size: 56px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-weight: 700; font-size: 13px; }
.det-msg { font-size: 12.5px; color: var(--muted); border-left: 3px solid var(--laranja); padding-left: 10px; margin: 8px 0 12px; }
.det-tab { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.det-tab td { padding: 5px 0; border-bottom: 1px solid var(--edge); }
.det-tab td:last-child { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.graficos { display: grid; grid-template-rows: auto auto; gap: 10px; min-width: 0; }
.graf { position: relative; height: 200px; min-width: 0; }
.graf.alto { height: 280px; }
.graficos-lado, .pm-par { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; min-width: 0; }
.det-analise { font-size: 12.5px; line-height: 1.55; margin: 0 0 12px; }
.det-analise h4 { margin: 10px 0 3px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--laranja2); }
.det-analise p { margin: 0; }
.aviso-dado { font-size: 12px; color: var(--laranja2); border: 1px dashed var(--laranja3); border-radius: 8px; padding: 6px 9px; margin-bottom: 8px; }

/* quadro IQAr atual · média 24 h · mínimo · máximo */
.iq-cab { display: flex; justify-content: space-between; align-items: baseline; margin: -2px 0 10px; }
.iq-cab h2 { margin: 0; font-size: 20px; color: var(--laranja3); }
.iq-cards { display: grid; grid-template-columns: 1.1fr 1.2fr 1fr 1fr; border: 1px solid var(--edge); border-left: 5px solid var(--cor);
  border-radius: 14px; overflow: hidden; background: var(--panel); }
.iq-col { padding: 16px 20px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.iq-col + .iq-col { border-left: 1px solid var(--edge); }
.iq-media { align-items: center; text-align: center; }
.iq-k { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.iq-v { font-size: 40px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.iq-v.grande { font-size: 56px; }
.iq-media .iq-v { font-size: 26px; margin-top: -4px; }
.iq-d { font-size: 12px; color: var(--muted); line-height: 1.4; }
.iq-ponto { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.iq-ponto i { width: 10px; height: 10px; border-radius: 50%; }
.iq-medidor { width: 100%; max-width: 210px; height: auto; overflow: visible; }
.iq-medidor text { font-size: 9px; fill: var(--muted); }
.iq-msg { margin-top: 10px; padding: 10px 14px; border-left: 5px solid var(--cor); border-radius: 0 10px 10px 0; background: var(--panel2); font-size: 13.5px; }

/* ---------------------------- queimadas ---------------------------- */

.seletor { display: flex; gap: 6px; margin-left: auto; align-items: center; }
.seletor button { padding: 3px 10px; font-size: 12px; background: var(--panel2); border-color: var(--edge); }
.seletor button.ativo { background: var(--laranja); border-color: var(--laranja); color: #fff; }
.seletor .sep { width: 1px; height: 18px; background: var(--edge); margin: 0 4px; }
.analise { font-size: 14px; line-height: 1.6; margin-bottom: 14px; max-width: 1100px; }
.barra-focos { height: 6px; border-radius: 3px; background: var(--laranja); margin-top: 5px; grid-column: 1 / 3; }

/* ---------------------------- boletins ---------------------------- */

/* faixa de emissão: edição atual · contagem regressiva · ações */
.bol-topo { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 22px; align-items: center; position: relative; overflow: hidden; }
.bt-data { font-size: 30px; font-weight: 800; line-height: 1.1; margin: 2px 0 8px; font-variant-numeric: tabular-nums; }
.bt-data span { color: var(--laranja); }
.bt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--edge); color: var(--muted); }
.chip-st i { width: 8px; height: 8px; border-radius: 50%; background: #9a8a7c; }
.chip-st.ok i { background: var(--ok); }
.chip-st.erro { color: var(--alerta); border-color: var(--alerta); }
.chip-st.erro i { background: var(--alerta); }
.chip-st.rodando i { background: var(--laranja); animation: pulso 1s ease-in-out infinite; }
.bt-contagem { border-left: 1px solid var(--edge); padding-left: 22px; }
.bt-relogio { font-size: 38px; font-weight: 800; letter-spacing: .02em; font-variant-numeric: tabular-nums; color: var(--laranja3); line-height: 1.15; }
.bt-barra { height: 6px; border-radius: 3px; background: var(--panel2); overflow: hidden; margin-top: 6px; }
.bt-barra i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--laranja2), var(--laranja3)); transition: width 1s linear; }
.bt-acoes { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.bt-acoes > button { background: var(--laranja); border-color: var(--laranja); color: #fff; font-weight: 700; padding: 10px 22px; font-size: 15px; }
.bt-horas { display: flex; gap: 6px; }
.bt-horas button { flex: 1; background: var(--panel2); border-color: var(--edge); font-size: 12px; padding: 4px 8px; }
.bt-acoes button:disabled { opacity: .55; cursor: wait; }
.giro { display: inline-block; width: 12px; height: 12px; border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; border-radius: 50%; animation: gira .8s linear infinite; vertical-align: -1px; }
.bt-progresso { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; overflow: hidden; }
.bt-progresso i { position: absolute; height: 100%; width: 30%; background: var(--laranja); animation: corre 1.4s ease-in-out infinite; }
.bt-log { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); }
.bt-log summary { cursor: pointer; }
.bt-log pre { max-height: 180px; overflow: auto; background: var(--panel2); border: 1px solid var(--edge); border-radius: 8px;
  padding: 8px 10px; font: 11.5px/1.45 Consolas, monospace; white-space: pre-wrap; margin: 6px 0 0; }
@keyframes pulso { 50% { opacity: .3; } }
@keyframes gira { to { transform: rotate(360deg); } }
@keyframes corre { from { left: -30%; } to { left: 100%; } }

/* cartões das cidades */
.bol-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; align-items: start; }
.bol-cards:empty, #bol-kpis:empty { display: none; }
.bc { background: var(--panel); border: 1px solid var(--edge); border-radius: 16px; overflow: hidden; box-shadow: var(--sombra);
  animation: surge .35s ease both; transition: transform .15s, box-shadow .15s; }
.bc:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(176, 78, 0, .18); }
.bc:nth-child(2) { animation-delay: .05s; } .bc:nth-child(3) { animation-delay: .1s; } .bc:nth-child(4) { animation-delay: .15s; }
@keyframes surge { from { opacity: 0; transform: translateY(8px); } }
.bc-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; background: var(--cor); }
.bc-cab h3 { margin: 0; font-size: 18px; }
.bc-sub { font-size: 11.5px; opacity: .85; margin-top: 2px; }
.bc-num { font-size: 34px; font-weight: 800; line-height: 1; text-align: right; font-variant-numeric: tabular-nums; }
.bc-num small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; margin-top: 4px; }
.bc-corpo { padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.bc-spark { position: relative; height: 70px; }
.bc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; text-align: center; }
.bc-stats div { background: var(--panel2); border-radius: 10px; padding: 6px 4px; }
.bc-stats span { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.bc-stats b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.bc-stats small { font-size: 10.5px; color: var(--muted); }
.bc-pm { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.bc-pm b { color: var(--text); }
.bc-orient { border-left: 4px solid var(--cor); background: var(--panel2); border-radius: 0 10px 10px 0; padding: 8px 11px; }
.bc-orient h4 { margin: 0 0 3px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--laranja3); }
.bc-orient p { margin: 0; font-size: 12.5px; line-height: 1.5; }
.bc-acoes { display: flex; gap: 8px; }
.bc-acoes button { flex: 1; background: var(--laranja); border-color: var(--laranja); color: #fff; font-weight: 700; }
.bc-baixar { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--edge); color: var(--laranja3); font-weight: 700; text-decoration: none; }
.bc-baixar:hover { border-color: var(--laranja); background: var(--panel2); }

/* focos da edição */
.bf { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 24px; align-items: center; }
.bf-num b { display: block; font-size: 34px; font-weight: 800; color: var(--laranja3); line-height: 1; }
.bf-num span { font-size: 12px; color: var(--muted); }
.bf-lin { display: grid; grid-template-columns: 150px minmax(0, 1fr) 40px; gap: 10px; align-items: center; font-size: 13px; padding: 3px 0; }
.bf-lin div { height: 10px; background: var(--panel2); border-radius: 5px; overflow: hidden; }
.bf-lin i { display: block; height: 100%; background: linear-gradient(90deg, #ffb04d, #c25a00); border-radius: 5px; }
.bf-lin b { text-align: right; font-variant-numeric: tabular-nums; }

/* histórico */
.bh-tab { overflow-x: auto; }
.bh-tab table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bh-tab th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 6px 8px; border-bottom: 2px solid var(--edge); }
.bh-tab td { padding: 6px 8px; border-bottom: 1px solid var(--edge); white-space: nowrap; }
.bh-tab tr.atual td { background: var(--panel2); }
.bh-tab tbody tr:hover td { background: var(--panel2); }
.bh-h { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 6px; background: var(--laranja); color: #fff; font-size: 11px; font-weight: 700; }
.bh-cel { display: inline-flex; align-items: center; gap: 4px; }
.bh-val { min-width: 52px; padding: 3px 8px; font-weight: 800; font-size: 12.5px; background: var(--panel2); border-color: transparent; font-variant-numeric: tabular-nums; }
.bh-val:hover { filter: brightness(.92); }
.bh-dl { color: var(--muted); text-decoration: none; font-weight: 700; padding: 0 3px; }
.bh-dl:hover { color: var(--laranja3); }
.dlg-pdf a.baixar { background: var(--laranja); color: #fff; padding: 5px 10px; border-radius: 8px; text-decoration: none; font-weight: 700; }
/* ---------------------------- equipe ---------------------------- */

.equipe { display: grid; gap: 14px; }
.eq-inst { display: flex; align-items: center; gap: 18px; }
.eq-inst img { width: 84px; height: 84px; object-fit: contain; }
.eq-inst h2 { margin: 0 0 4px; font-size: 18px; color: var(--laranja3); }
.eq-contato { margin-top: 6px; font-size: 13px; }
.eq-contato a { color: var(--laranja3); font-weight: 700; }
.eq-grupos { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; align-items: start; }
.eq-grupos ul { margin: 0; padding: 0; list-style: none; }
.eq-grupos li { padding: 6px 0; border-bottom: 1px solid var(--edge); font-size: 14px; }
.eq-grupos li:last-child { border-bottom: 0; }

dialog.dlg-pdf { width: min(1000px, 96vw); }
.dlg-pdf iframe { width: 100%; height: min(80vh, 1100px); border: 0; border-radius: 8px; margin-top: 10px; background: #fff; }
.dlg-pdf a { color: var(--laranja2); margin-right: 10px; font-size: 13px; }
.graf-tit .un { text-transform: none; }
.graf-tit { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 11px; padding: 3px 7px; border-radius: 6px; font-weight: 700; white-space: nowrap; }

/* ---------------------------- tempo ---------------------------- */

.aviso-breve { background: var(--panel2); border: 1px dashed var(--laranja3); border-radius: 12px; padding: 10px 14px; color: var(--muted); }
.aviso-breve b { color: var(--laranja2); }
.cards-tempo { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.ct { background: var(--panel); border: 1px solid var(--edge); border-radius: 14px; padding: 12px 14px; box-shadow: var(--sombra); }
.ct.destaque { border-color: var(--laranja3); }
.ct-cab { display: flex; justify-content: space-between; align-items: baseline; }
.ct-cab b { font-size: 15px; }
.ct-agora { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.ct-agora img { width: 64px; height: 64px; }
.ct-agora .t { font-size: 34px; font-weight: 800; }
.ct-info { font-size: 12px; color: var(--muted); line-height: 1.5; }
.ct-dias { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 8px; text-align: center; font-size: 11px; }
.ct-dias img { width: 30px; height: 30px; }
.tmax { color: #ef4444; font-weight: 700; }
.tmin { color: #3b82f6; font-weight: 700; }

/* ---------------------------- rodapé e diálogo ---------------------------- */

.rodape {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 20px 14px;
  color: var(--muted);
  font-size: 11px;
}

dialog { border: 1px solid var(--edge); border-radius: 14px; background: var(--panel); color: var(--text); padding: 0; width: min(760px, 94vw); box-shadow: var(--sombra); }
dialog::backdrop { background: rgba(0, 0, 0, .55); }
.dlg { padding: 16px 18px; }
.dlg-cab { display: flex; justify-content: space-between; align-items: center; }
.dlg-cab h2 { margin: 0; color: var(--laranja2); font-size: 17px; }
.dlg-cab button, .dlg button { background: var(--panel2); border-color: var(--edge); }
.dlg table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
.dlg th, .dlg td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--edge); }
.dlg select { font: inherit; background: var(--panel2); color: var(--text); border: 1px solid var(--edge); border-radius: 6px; padding: 4px 6px; }

/* rótulos do mapa */
.rotulo-mapa {
  background: rgba(23, 13, 6, .82);
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 700;
  box-shadow: none;
}
.rotulo-mapa::before { display: none; }
.rotulo-mapa.destaque { font-size: 12.5px; }
:root[data-tema="claro"] .rotulo-mapa { background: rgba(255, 255, 255, .92); color: #3a1d07; }
.leaflet-container { background: var(--panel2); font: inherit; }

/* ---------------------------- telas menores ---------------------------- */

@media (max-width: 1100px) {
  .grade, .detalhe, .graficos-lado, .pm-par { grid-template-columns: 1fr; }
  .seletor { margin-left: 0; flex-wrap: wrap; }
  .bol-topo, .bf { grid-template-columns: 1fr; }
  .iq-cards { grid-template-columns: 1fr 1fr; }
  .iq-col:nth-child(3) { border-left: 0; }
  .iq-col:nth-child(n+3) { border-top: 1px solid var(--edge); }
  .bt-contagem { border-left: 0; padding-left: 0; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .abas { margin-left: 0; }
}
@media (max-width: 640px) {
  main { padding: 12px 10px; }
  .topo { padding: 10px 12px; }
  .marca h1 { font-size: 16px; }
  .kpis { grid-template-columns: 1fr; }
  .mapa { height: 360px; }
}
