:root { --fundo: #f6f7fb; --card: #fff; --linha: #e5e7eb; --texto: #111827; --suave: #6b7280; --verm: #b91c1c; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--fundo); color: var(--texto); font: 14px/1.45 Inter, system-ui, sans-serif; display: flex; flex-direction: column; }
a { color: var(--verm); }
.topo { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 18px; background: #fff; border-bottom: 1px solid var(--linha); }
.marca { display: flex; gap: 10px; align-items: center; color: var(--texto); text-decoration: none; }
.selo { background: var(--verm); color: #fff; font-weight: 800; border-radius: 8px; padding: 6px 8px; font-size: 13px; }
.marca b { display: block; font-size: 16px; } .marca small { color: var(--suave); font-size: 12px; }
.seg { display: flex; background: #f3f4f6; border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 8px; font: inherit; font-weight: 600; color: var(--suave); cursor: pointer; }
.seg button.ativo { background: #fff; color: var(--verm); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.layout { flex: 1; display: grid; grid-template-columns: 1fr 380px; min-height: 0; }
.mapa-wrap { position: relative; min-height: 420px; }
#mapa { position: absolute; inset: 0; background: #eef1f6; }
.legenda { position: absolute; left: 12px; bottom: 22px; z-index: 500; background: rgba(255, 255, 255, .95); border: 1px solid var(--linha); border-radius: 10px; padding: 8px 10px; font-size: 12px; box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.legenda .escala { display: flex; margin-top: 5px; }
.legenda .escala span { display: flex; flex-direction: column; align-items: center; font-size: 10px; color: var(--suave); }
.legenda .escala i { width: 34px; height: 12px; display: block; }
.painel { overflow-y: auto; padding: 12px; border-left: 1px solid var(--linha); background: var(--fundo); }
.card { background: var(--card); border: 1px solid var(--linha); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.busca { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--suave); font-weight: 600; }
input { border: 1px solid var(--linha); border-radius: 8px; padding: 9px 10px; font: inherit; font-size: 14px; }
.lista button { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--linha); background: none; padding: 8px 4px; font: inherit; cursor: pointer; }
.lista button:hover { background: #fef2f2; }
.lista small { display: block; color: var(--suave); font-size: 12px; }
.eleito { color: #15803d; font-weight: 700; font-size: 11px; margin-left: 6px; }
.sel { display: flex; justify-content: space-between; gap: 8px; align-items: center; background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px; padding: 10px; margin-top: 8px; }
.sel b { color: var(--verm); font-size: 15px; } .sel small { display: block; color: var(--suave); }
.sel button { border: 0; background: none; font-size: 20px; color: var(--suave); cursor: pointer; }
h2 { font-size: 15px; margin: 0 0 8px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kpi { background: #f9fafb; border-radius: 8px; padding: 8px; } .kpi span { font-size: 11px; color: var(--suave); display: block; } .kpi b { font-size: 17px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
td, th { padding: 6px 4px; border-bottom: 1px solid var(--linha); text-align: right; }
td:first-child, th:first-child { text-align: left; } th { color: var(--suave); font-weight: 600; font-size: 12px; }
tr.clic { cursor: pointer; } tr.clic:hover td { background: #fef2f2; }
.pt { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.btn { border: 1px solid var(--linha); background: #fff; border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 12px; cursor: pointer; margin-top: 8px; }
.nota { color: var(--suave); font-size: 12px; margin: 6px 0 0; }
.vazio { color: var(--suave); text-align: center; padding: 18px 6px; }
.rodape { padding: 8px 18px; color: var(--suave); font-size: 11px; background: #fff; border-top: 1px solid var(--linha); }
@media (max-width: 900px) {
  body { display: block; }
  .layout { display: block; }
  .mapa-wrap { height: 62vh; }
  .painel { border-left: 0; }
}
.leaflet-tile-pane { filter: grayscale(1) contrast(.85) brightness(1.08); opacity: .55; }
select { border: 1px solid var(--linha); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 14px; background: #fff; }
.legenda .escala i { width: 58px; }
.legenda .escala span { font-size: 10px; white-space: nowrap; }
.legenda .escala { gap: 4px; } .legenda .escala i { width: 66px; }
.visao { margin-bottom: 10px; } .visao button { flex: 1; }
[hidden] { display: none !important; }
.rot { pointer-events: none; }
.rot div { transform: translate(-50%, -50%); white-space: nowrap; text-align: center; font-size: 11px; line-height: 1.15; color: #111827;
  text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff, 0 0 5px #fff; }
.rot b { display: block; font-weight: 700; }
.rot span { display: inline-block; margin-top: 1px; background: rgba(17, 24, 39, .82); color: #fff; text-shadow: none; border-radius: 4px; padding: 0 5px; font-weight: 700; font-size: 11px; }
.leaflet-zoom-anim .rot, .rot div { font-size: 10px; } .rot span { font-size: 10px; }
.tipos thead th { background: #b91c1c; color: #fff; }
.tipos tr.grande td { background: #fbbf24; }
.tipos tfoot td { background: #b91c1c; color: #fff; border: 0; }
.tipos small { color: inherit; opacity: .7; font-size: 11px; }
.tipos td:first-child small { display: block; }
/* rótulos do mapa: 2× e depois −20% = 16 px (pedidos do Elvis, 16/10) */
.rot div, .leaflet-zoom-anim .rot { font-size: 16px !important; } .rot span { font-size: 16px !important; padding: 1px 7px; border-radius: 5px; }
