/* ─── Radar Extremo ─── */
:root {
  --fundo: #07090d;
  --fundo2: #0d1117;
  --cartao: #10151d;
  --cartao2: #161c26;
  --linha: #1f2733;
  --linha2: #2a3442;
  --texto: #e8edf3;
  --texto2: #9aa6b5;
  --texto3: #647182;
  --marca: #39e0b8;          /* verde-radar: cor da marca, nunca usada para risco */
  --n0: #18202b;             /* município sem alerta */
  --n0-borda: #0a0e13;
  --n1: #f7d417;             /* amarelo  – perigo potencial */
  --n2: #ff8a1f;             /* laranja  – perigo */
  --n3: #ff3b3b;             /* vermelho – grande perigo */
  --semdado: #11161e;
  --raio: 14px;
  --fonte: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --titulo: "Space Grotesk", var(--fonte);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--fundo); color: var(--texto); font: 14px/1.45 var(--fonte);
  display: flex; flex-direction: column; overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
svg { display: block; }
[hidden] { display: none !important; }
b { font-weight: 600; }

/* botão de alertas no topo */
.alerta-btn { display: flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--marca); color: var(--marca); font-weight: 600; font-size: 13px; white-space: nowrap; }
.alerta-btn svg, .local-alerta svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.alerta-btn:hover { background: rgba(57,224,184,.1); }

/* botões de cadastro só aparecem quando o cadastro está funcionando */
body.sem-cadastro .alerta-btn, body.sem-cadastro .local-alerta { display: none; }

/* conta: botão no canto superior direito */
.conta-btn { display: flex; align-items: center; gap: 8px; padding: 7px 16px; border-radius: 999px; background: var(--texto); color: var(--fundo); font-weight: 700; font-size: 13px; white-space: nowrap; }
.conta-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.conta-btn:hover { filter: brightness(.9); }
.conta-btn.logado { background: var(--cartao); color: var(--texto); border: 1px solid var(--linha2); padding: 4px 14px 4px 4px; }
body.sem-cadastro .conta-btn { display: none; }
.senha-caixa { position: relative; display: block; }
.campo-dica { margin: 4px 0 8px; color: var(--texto2); font-size: 13.5px; font-weight: 500; }
/* preenchimento automático do navegador: mantém o campo escuro */
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 60px var(--cartao2) inset !important; -webkit-text-fill-color: var(--texto) !important; caret-color: var(--texto); transition: background-color 9999s; }
.senha-caixa input { padding-right: 46px !important; }
.olho { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 8px; color: var(--texto3); display: grid; place-items: center; }
.olho svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.olho.vendo { color: var(--marca); }
.entrar-rodape { color: var(--texto3); font-size: 13px; text-align: center; margin: 14px 0 0; line-height: 1.8; }
.entrar-rodape .link, .form-erro .link { color: var(--marca); text-decoration: underline; font-size: inherit; padding: 0; }
.entrar-rodape a { color: var(--marca); }

/* conta (logado) */
.alerta-btn.logado { border-color: var(--linha2); color: var(--texto); padding: 4px 14px 4px 4px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--marca); color: #04110d; font: 700 12px var(--titulo); display: inline-flex; align-items: center; justify-content: center; text-align: center; flex: none; letter-spacing: .02em; }
.avatar.grande { width: 56px; height: 56px; font-size: 20px; }
.local-conta { margin-left: auto; display: flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--marca); color: var(--texto2); font-size: 13px; }
.local-conta b { color: var(--texto); }
.local-conta .ok { width: 18px; height: 18px; border-radius: 50%; background: var(--marca); color: #04110d; display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.conta-topo { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.conta-topo h2 { margin: 0 0 2px !important; }
.conta-cidade { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--cartao2); margin-bottom: 14px; }
.conta-cidade small { display: block; color: var(--texto3); font-size: 12px; }
.conta-cidade b { font: 600 17px var(--titulo); }
.conta-dados { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0 0 16px; }
.conta-dados dt { color: var(--texto3); font-size: 13px; }
.conta-dados dd { margin: 0; }
.aviso-breve { background: rgba(57,224,184,.08); border: 1px solid rgba(57,224,184,.35); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: var(--texto2) !important; }
.conta-acoes { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.conta-acoes .link, .cid-escolhida + .link { color: var(--texto2); font-size: 13px; text-decoration: underline; text-underline-offset: 2px; }
.conta-acoes .perigo { color: #ff8f8f; }
.duas-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.cid-escolhida .sub { margin-left: auto; font-size: 11.5px; }
.form-caixa .btn-sec { margin-top: 10px; }

/* faixa "Você está em…" */
.local { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin: 10px 20px 0; padding: 8px 10px 8px 16px; background: var(--cartao); border: 1px solid var(--linha); border-radius: 12px; min-height: 48px; }
.local:empty { display: none; }
.local .txt { color: var(--texto2); }
.local .txt b { color: var(--texto); font-weight: 600; }
.local-cidade { color: var(--texto); font-weight: 700; text-decoration: underline; text-decoration-color: var(--marca); text-decoration-thickness: 2px; text-underline-offset: 4px; padding: 0; }
.local-cidade:hover { color: var(--marca); }
.pilula { cursor: pointer; }
.local .link { color: var(--marca); font-size: 13px; text-decoration: underline; text-underline-offset: 2px; }
.pilula { padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--cartao2); color: var(--texto2); border: 1px solid var(--linha2); }
.pilula.k1 { background: var(--n1); color: #111; border: 0; } .pilula.k2 { background: var(--n2); color: #111; border: 0; } .pilula.k3 { background: var(--n3); color: #fff; border: 0; }
.local-alerta { margin-left: auto; display: flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px; background: var(--marca); color: #04110d; font-weight: 700; font-size: 13px; white-space: nowrap; }
.sels { display: flex; gap: 8px; flex-wrap: wrap; }
.sels select { font: 500 14px var(--fonte); color: var(--texto); background: var(--cartao2); border: 1px solid var(--linha2); border-radius: 9px; padding: 7px 10px; max-width: 220px; }
.sels select:disabled { opacity: .5; }

/* formulário de cadastro */
.form-caixa { max-width: 520px; width: 100%; }
.form-caixa h2 { margin: 0 0 6px; font: 600 22px var(--titulo); }
.form-caixa .intro { margin: 0 0 16px; color: var(--texto2); }
.campo { display: grid; gap: 6px; margin: 0 0 14px; color: var(--texto2); font-size: 13.5px; font-weight: 500; border: 0; padding: 0; min-width: 0; }
.campo legend { padding: 0; margin-bottom: 8px; }
.campo legend small { color: var(--texto3); font-weight: 400; }
.campo input, .form-caixa .outro { font: 500 16px var(--fonte); color: var(--texto); background: var(--cartao2); border: 1px solid var(--linha2); border-radius: 10px; padding: 11px 12px; width: 100%; }
.campo select { font: 500 16px var(--fonte); color: var(--texto); background: var(--cartao2); border: 1px solid var(--linha2); border-radius: 10px; padding: 11px 12px; width: 100%; }
.campo input[type=date] { color-scheme: dark; min-height: 46px; }
.campo select:focus, .campo input:focus, .sels select:focus, .form-caixa .outro:focus { outline: 2px solid var(--marca); outline-offset: 1px; }
.form-caixa .sels select { font-size: 16px; padding: 10px; flex: 1; max-width: none; min-width: 0; }
.cid-escolhida { display: flex; gap: 12px; align-items: center; background: var(--cartao2); border: 1px solid var(--linha2); border-radius: 10px; padding: 10px 12px; color: var(--texto); }
.cid-escolhida .link { color: var(--marca); font-size: 13px; text-decoration: underline; margin-left: auto; }
.motivos { display: grid; gap: 6px; }
.chk { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 10px; background: var(--cartao2); border: 1px solid transparent; cursor: pointer; color: var(--texto); font-weight: 400; }
.chk:has(input:checked) { border-color: var(--marca); }
.chk input, .aceite input { accent-color: var(--marca); width: 18px; height: 18px; margin: 0; flex: none; }
.form-caixa .outro { margin-top: 8px; }
.aceite { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 10px; border: 1px solid var(--linha2); cursor: pointer; color: var(--texto); font-weight: 500; }
.aceite input { margin-top: 2px; }
.lgpd { color: var(--texto3); font-size: 12.5px; margin: 12px 0; }
.lgpd a { color: var(--marca); }
.isca { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-erro { background: rgba(255,59,59,.12); border: 1px solid var(--n3); color: #ffb3b3; border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; }
.enviar { width: 100%; padding: 14px; border-radius: 12px; background: var(--marca); color: #04110d; font-weight: 700; font-size: 16px; }
.enviar:disabled { opacity: .6; }
.cad-ok { text-align: center; padding: 10px 0 0; }
.cad-ok .icone { width: 56px; height: 56px; border-radius: 50%; background: var(--marca); color: #04110d; font-size: 30px; font-weight: 700; display: grid; place-items: center; margin: 0 auto 12px; }
.cad-ok p { color: var(--texto2); }
.cad-ok .sub2 { font-size: 13px; color: var(--texto3); }
.cad-ok a { color: var(--marca); }

/* faixa superior */
.faixa { background: #000; color: var(--texto2); font-size: 12px; text-align: center; padding: 6px 12px; border-bottom: 1px solid var(--linha); }
.faixa b { color: var(--texto); }
.faixa a { color: var(--texto); font-weight: 600; }

/* topo */
.topo { display: flex; align-items: center; gap: 20px; padding: 12px 20px; }
.marca { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 19px/1 var(--titulo); letter-spacing: .04em; white-space: nowrap; }
.marca b { color: var(--marca); font-weight: 700; }
.radar { width: 30px; height: 30px; }
.r-aro { fill: none; stroke: var(--marca); stroke-width: 2; }
.r-aro2 { fill: none; stroke: var(--marca); stroke-width: 1; opacity: .35; }
.r-feixe { fill: var(--marca); opacity: .45; }
.r-giro { transform-origin: 20px 20px; animation: giro 4s linear infinite; }
.r-ponto { fill: var(--n3); animation: pisca 2s ease-in-out infinite; }
@keyframes giro { to { transform: rotate(360deg); } }
@keyframes pisca { 50% { opacity: .25; } }

.abas { display: flex; gap: 2px; background: var(--cartao); border: 1px solid var(--linha); border-radius: 999px; padding: 3px; }
.aba { padding: 7px 16px; border-radius: 999px; color: var(--texto2); font-weight: 500; white-space: nowrap; }
.aba:hover { color: var(--texto); }
.aba.ativa { background: var(--texto); color: var(--fundo); font-weight: 600; }

.patrocinio { margin-left: auto; display: flex; gap: 8px; align-items: center; padding: 7px 16px; border: 1px dashed var(--linha2); border-radius: 999px; text-decoration: none; font-size: 12.5px; white-space: nowrap; }
.patrocinio span { color: var(--texto3); }
.patrocinio:hover { border-color: var(--texto3); }

.acoes { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.busca-btn { display: flex; align-items: center; gap: 8px; padding: 7px 10px 7px 12px; background: var(--cartao); border: 1px solid var(--linha); border-radius: 999px; color: var(--texto2); }
.busca-btn svg, .ico svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.busca-btn kbd { font: 11px var(--fonte); background: var(--cartao2); border: 1px solid var(--linha2); border-radius: 6px; padding: 1px 6px; }
.ico { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--linha); border-radius: 50%; background: var(--cartao); color: var(--texto2); }
.ico:hover, .busca-btn:hover { color: var(--texto); border-color: var(--linha2); }

/* manchete */
.manchete { display: flex; align-items: center; gap: 20px; margin: 0 20px; padding: 14px 22px; background: var(--cartao); border: 1px solid var(--linha); border-radius: var(--raio); position: relative; overflow: hidden; }
.manchete::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--cor-manchete, var(--marca)); }
.manchete-txt { flex: 1; min-width: 0; }
.manchete h1 { margin: 0; font: 600 clamp(20px, 2.1vw, 30px)/1.15 var(--titulo); letter-spacing: -.01em; }
.manchete h1 .n1 { color: var(--n1); } .manchete h1 .n2 { color: var(--n2); } .manchete h1 .n3 { color: var(--n3); }
.manchete p { margin: 4px 0 0; color: var(--texto2); font-size: 14px; }
.manchete p b { color: var(--texto); }
.onde-estou { display: flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 999px; background: var(--marca); color: #04110d; font-weight: 700; white-space: nowrap; }
.onde-estou svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.onde-estou:hover { filter: brightness(1.1); }

/* palco: painel | mapa | painel */
.palco { flex: 1; min-height: 0; display: grid; grid-template-columns: 300px 1fr 320px; gap: 14px; padding: 14px 20px 16px; position: relative; }
.painel { background: var(--cartao); border: 1px solid var(--linha); border-radius: var(--raio); padding: 16px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--linha2) transparent; min-height: 0; }
.painel h3 { margin: 0 0 10px; font: 600 15px var(--titulo); }
.painel h4 { margin: 18px 0 8px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--texto3); font-weight: 600; }
.painel .sub { color: var(--texto3); font-size: 12px; }

/* contadores por nível */
.niveis { display: grid; gap: 8px; }
.nivel { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; }
.nivel i { width: 12px; height: 12px; border-radius: 3px; }
.nivel .nome { color: var(--texto2); }
.nivel .val { font: 600 18px var(--titulo); font-variant-numeric: tabular-nums; }
.nivel .barra { grid-column: 2 / 4; height: 4px; background: var(--cartao2); border-radius: 2px; overflow: hidden; margin-top: -4px; }
.nivel .barra span { display: block; height: 100%; }
.n1bg { background: var(--n1); } .n2bg { background: var(--n2); } .n3bg { background: var(--n3); } .n0bg { background: var(--linha2); }

.grande { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.grande div { background: var(--cartao2); border-radius: 10px; padding: 10px 12px; }
.grande small { display: block; color: var(--texto3); font-size: 11.5px; }
.grande strong { font: 600 21px var(--titulo); font-variant-numeric: tabular-nums; }

/* filtros */
.filtros { display: grid; gap: 6px; }
.check { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; background: var(--cartao2); cursor: pointer; user-select: none; }
.check input { accent-color: var(--marca); width: 15px; height: 15px; margin: 0; }
.check .qtd { margin-left: auto; color: var(--texto3); font-size: 12px; font-variant-numeric: tabular-nums; }
.seg { display: flex; background: var(--cartao2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { flex: 1; padding: 6px 4px; border-radius: 8px; color: var(--texto2); font-size: 12.5px; font-weight: 500; }
.seg button.ativo { background: var(--linha2); color: var(--texto); }
.lista-top { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.lista-top li { display: flex; gap: 10px; align-items: baseline; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.lista-top li:hover { background: var(--cartao2); }
.lista-top .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lista-top .nm small { color: var(--texto3); }
.lista-top .v { flex: none; white-space: nowrap; font: 600 14px var(--titulo); font-variant-numeric: tabular-nums; }
.bolinha { width: 9px; height: 9px; border-radius: 50%; flex: none; transform: translateY(-1px); }

.fontes { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--linha); font-size: 12px; color: var(--texto3); display: grid; gap: 5px; }
.fontes .f { display: flex; gap: 8px; align-items: center; }
.fontes .f i { width: 7px; height: 7px; border-radius: 50%; background: var(--marca); }
.fontes .f.erro i { background: var(--n2); }
.fontes .f b { color: var(--texto2); font-weight: 600; }
.fontes button { color: var(--marca); text-align: left; padding: 0; margin-top: 4px; font-size: 12px; text-decoration: underline; text-underline-offset: 2px; }

/* mapa */
.mapa-area { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: radial-gradient(ellipse at 50% 45%, #0e141c 0%, var(--fundo) 70%); border: 1px solid var(--linha); border-radius: var(--raio); overflow: hidden; }
.mapa-ferr { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px 14px 0; position: relative; z-index: 2; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 5px 12px; border-radius: 999px; background: var(--cartao); border: 1px solid var(--linha); color: var(--texto2); font-size: 12.5px; font-weight: 500; }
.chip.ativo { background: var(--cartao2); border-color: var(--texto3); color: var(--texto); }
.legenda { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; font-size: 12px; color: var(--texto2); background: rgba(7,9,13,.6); padding: 5px 10px; border-radius: 999px; }
.legenda span { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.legenda i { width: 10px; height: 10px; border-radius: 2px; }

.mapa { flex: 1; min-height: 0; position: relative; }
.mapa svg { width: 100%; height: 100%; cursor: grab; touch-action: none; }
.mapa svg:active { cursor: grabbing; }
.mun { stroke-width: .4; vector-effect: non-scaling-stroke; transition: fill .5s ease-out, stroke .5s ease-out; }
/* dentro do estado (ou com zoom) as divisas dos municípios voltam */
#svg:not(.modo-uf) .mun { stroke: var(--n0-borda) !important; stroke-width: .35; }
#svg:not(.modo-uf) .mun:hover { stroke: #fff !important; stroke-width: 1.2; }
.mun.sel { stroke: #fff; stroke-width: 2.2; }
/* tela do Brasil: só o estado acende, nunca o município */
.modo-uf .mun:hover { stroke-width: .5; }
.modo-uf { cursor: pointer !important; }
.uf-borda { fill: none; stroke: rgba(5,7,10,.85); stroke-width: 1.5; vector-effect: non-scaling-stroke; pointer-events: none; }
.pais-borda { fill: none; stroke: #6b7889; stroke-width: 1.4; vector-effect: non-scaling-stroke; pointer-events: none; }
.uf-rot { pointer-events: none; font: 700 17px var(--titulo); fill: #fff; paint-order: stroke; stroke: rgba(0,0,0,.75); stroke-width: 4px; stroke-linejoin: round; }
.uf-rot .q { font: 600 13px var(--fonte); fill: #cfd6df; }
.mun.fora { opacity: .1; }
/* dentro do estado: o contorno detalhado do estado substitui as divisas simplificadas */
#svg.dentro-uf .uf-borda, #svg.dentro-uf .pais-borda { display: none; }
.uf-sel, .uf-hover { fill: none; stroke: #fff; vector-effect: non-scaling-stroke; pointer-events: none; }
.uf-sel { stroke-width: 2; }
.uf-hover { stroke-width: 2.5; filter: drop-shadow(0 0 4px rgba(255,255,255,.5)); }
.uf-rot.caixa rect { fill: #1c2430; stroke: #3a4553; stroke-width: .6; }
.uf-rot.caixa text { stroke: none; }
.uf-rot.caixa[data-k="1"] rect { fill: var(--n1); stroke: none; }
.uf-rot.caixa[data-k="2"] rect { fill: var(--n2); stroke: none; }
.uf-rot.caixa[data-k="3"] rect { fill: var(--n3); stroke: none; }
.uf-rot.caixa[data-k="1"] text, .uf-rot.caixa[data-k="2"] text { fill: #111; }
.uf-rot.caixa .q { font: 700 13px var(--titulo); }
.voce { pointer-events: none; }
.voce-ponto { fill: var(--marca); stroke: #04110d; stroke-width: 2.5; }
.voce-onda { fill: none; stroke: var(--marca); stroke-width: 2.5; animation: pulso 2s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.voce text { font: 700 15px var(--fonte); fill: var(--marca); paint-order: stroke; stroke: rgba(0,0,0,.85); stroke-width: 4px; }
.cidade { pointer-events: none; }
.cidade circle { fill: #fff; stroke: #000; stroke-width: 1.5; }
.cidade text { font: 600 16px var(--fonte); fill: #fff; paint-order: stroke; stroke: rgba(0,0,0,.8); stroke-width: 3px; }
.grande-dica { font: 700 22px var(--titulo); margin: 2px 0 6px; }
.grande-dica small { font: 500 12px var(--fonte); color: var(--texto2); }
.dica-rod { margin-top: 7px; padding-top: 6px; border-top: 1px solid var(--linha2); color: var(--marca); font-size: 11.5px; font-weight: 600; }
.trilha { display: flex; align-items: center; gap: 8px; padding: 5px 14px; border-radius: 999px; background: var(--cartao); border: 1px solid var(--linha); font-size: 13px; }
.trilha button { color: var(--texto2); }
.trilha button:hover { color: var(--texto); }
.trilha span { color: var(--texto3); }
.cartao-uf .cab { display: flex; gap: 12px; align-items: center; }
.cartao-uf .cab h3 { margin: 0; font-size: 20px; }
.cartao-uf .sigla { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--cartao2); border: 1px solid var(--linha2); font: 700 14px var(--titulo); flex: none; }
.cartao-uf .nav { margin-left: auto; display: flex; gap: 2px; }
.cartao-uf .nav button { width: 28px; height: 28px; border-radius: 8px; color: var(--texto2); font-size: 18px; line-height: 1; }
.cartao-uf .nav button:hover { background: var(--cartao2); color: var(--texto); }
.pct-uf { display: flex; gap: 12px; align-items: center; margin: 18px 0 8px; }
.pct-uf strong { font: 700 34px var(--titulo); }
.pct-uf > span { color: var(--texto2); font-size: 12.5px; line-height: 1.35; }
.cartao-uf .barras { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--cartao2); }
.al-mini { display: flex; gap: 10px; align-items: baseline; padding: 8px; border-radius: 8px; cursor: pointer; }
.al-mini:hover { background: var(--cartao2); }
.al-mini small { color: var(--texto3); }
.rio-pt { stroke: #000; stroke-width: .8; vector-effect: non-scaling-stroke; cursor: pointer; }
.rio-pt.k0 { fill: #3d7bd9; opacity: .75; }
.pulso { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; pointer-events: none; animation: pulso 2.2s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pulso { from { opacity: .9; transform: scale(.4); } to { opacity: 0; transform: scale(2.4); } }

.zoom { position: absolute; right: 12px; bottom: 12px; display: grid; gap: 6px; }
.zoom button { width: 32px; height: 32px; border-radius: 9px; background: var(--cartao); border: 1px solid var(--linha); font-size: 17px; color: var(--texto2); }
.zoom button:hover { color: var(--texto); }

.dica { position: absolute; pointer-events: none; background: rgba(13,17,23,.96); border: 1px solid var(--linha2); border-radius: 10px; padding: 9px 12px; font-size: 12.5px; max-width: 260px; box-shadow: 0 8px 24px rgba(0,0,0,.5); z-index: 5; }
.dica strong { display: block; font: 600 14px var(--titulo); margin-bottom: 3px; }
.dica .l { display: flex; gap: 7px; align-items: center; color: var(--texto2); }

/* linha do tempo */
.tempo { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--linha); background: rgba(13,17,23,.7); }
.play { width: 34px; height: 34px; border-radius: 50%; background: var(--texto); color: var(--fundo); display: grid; place-items: center; flex: none; }
.play svg { width: 15px; height: 15px; fill: currentColor; }
.tempo-hora { font: 600 15px var(--titulo); font-variant-numeric: tabular-nums; min-width: 92px; }
.tempo input[type=range] { flex: 1; accent-color: var(--texto); min-width: 60px; }
.tempo-ini { color: var(--texto3); font-size: 12px; white-space: nowrap; }
.ao-vivo { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13px; color: var(--texto3); white-space: nowrap; }
.ao-vivo i { width: 8px; height: 8px; border-radius: 50%; background: var(--texto3); }
.ao-vivo.on { color: var(--texto); cursor: default; }
.ao-vivo.on i { background: var(--n3); box-shadow: 0 0 0 0 rgba(255,59,59,.6); animation: vivo 1.6s infinite; }
.ao-vivo:not(.on) { cursor: pointer; }
@keyframes vivo { 70% { box-shadow: 0 0 0 8px rgba(255,59,59,0); } 100% { box-shadow: 0 0 0 0 rgba(255,59,59,0); } }

/* painel direito */
.regiao { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 9px 8px; border-radius: 9px; cursor: pointer; border-bottom: 1px solid var(--linha); }
.regiao:hover { background: var(--cartao2); }
.regiao .nm { font-weight: 600; }
.regiao .pc { font: 600 15px var(--titulo); font-variant-numeric: tabular-nums; text-align: right; }
.regiao .sub { grid-column: 1; }
.regiao .barras { grid-column: 1 / 3; display: flex; height: 5px; border-radius: 3px; overflow: hidden; background: var(--cartao2); margin-top: 4px; }
.feed-bloco { margin-top: 20px; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 42px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--linha); }
.feed li[data-m] { cursor: pointer; }
.feed .h { color: var(--texto3); font-size: 12px; font-variant-numeric: tabular-nums; padding-top: 1px; }
.feed .t { font-weight: 600; display: flex; gap: 7px; align-items: baseline; }
.feed .s { color: var(--texto2); font-size: 12.5px; margin-top: 2px; }
.feed .vazio { display: block; color: var(--texto3); }

/* detalhe do município */
.detalhe { position: absolute; top: 14px; right: 20px; bottom: 16px; width: 380px; background: var(--fundo2); border: 1px solid var(--linha2); border-radius: var(--raio); box-shadow: -12px 0 40px rgba(0,0,0,.5); overflow-y: auto; z-index: 10; padding: 20px; scrollbar-width: thin; }
.detalhe .fechar { position: absolute; top: 12px; right: 12px; }
.detalhe h2 { margin: 0 34px 2px 0; font: 600 24px/1.15 var(--titulo); }
.detalhe .uf { color: var(--texto2); }
.status { margin: 16px 0; padding: 14px 16px; border-radius: 12px; background: var(--cartao2); border-left: 4px solid var(--linha2); }
.status strong { display: block; font: 600 18px var(--titulo); }
.status span { color: var(--texto2); font-size: 13px; }
.status.k1 { border-color: var(--n1); } .status.k2 { border-color: var(--n2); } .status.k3 { border-color: var(--n3); }
.bloco { margin-top: 18px; }
.bloco h4 { margin: 0 0 8px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--texto3); display: flex; justify-content: space-between; }
.bloco h4 a { text-transform: none; letter-spacing: 0; color: var(--marca); font-weight: 500; }
.al { background: var(--cartao); border: 1px solid var(--linha); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.al .cab { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.al .tag { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px; color: #111; white-space: nowrap; }
.al .tipo { font-weight: 600; font-size: 15px; }
.al .quando { color: var(--texto2); font-size: 12.5px; margin: 4px 0 8px; }
.al p { margin: 0 0 8px; color: var(--texto2); font-size: 13px; }
.al ul { margin: 0; padding-left: 18px; color: var(--texto2); font-size: 12.5px; }
.al .fonte { display: block; margin-top: 8px; font-size: 12px; color: var(--texto3); }
.medidas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.medidas div { background: var(--cartao); border: 1px solid var(--linha); border-radius: 10px; padding: 10px; text-align: center; }
.medidas small { display: block; color: var(--texto3); font-size: 11.5px; }
.medidas strong { font: 600 20px var(--titulo); font-variant-numeric: tabular-nums; }
.medidas strong em { font-style: normal; font-size: 12px; color: var(--texto3); font-weight: 500; }
.nota { color: var(--texto3); font-size: 12px; margin-top: 6px; }
.rio-item { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--linha); border-radius: 10px; margin-bottom: 6px; background: var(--cartao); }
.rio-item small { color: var(--texto3); display: block; }
.rio-item .d { font: 600 16px var(--titulo); text-align: right; white-space: nowrap; }
.emerg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 20px; }
.emerg a { text-decoration: none; background: var(--cartao); border: 1px solid var(--linha); border-radius: 10px; padding: 10px; text-align: center; }
.emerg strong { display: block; font: 700 22px var(--titulo); }
.emerg small { color: var(--texto2); }
.btn-sec { width: 100%; margin-top: 12px; padding: 10px; border: 1px solid var(--linha2); border-radius: 10px; color: var(--texto); font-weight: 600; }
.btn-sec:hover { background: var(--cartao2); }

/* busca */
.busca-modal, .modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(3px); z-index: 50; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.busca-caixa { width: 100%; max-width: 520px; background: var(--fundo2); border: 1px solid var(--linha2); border-radius: 14px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.6); }
.busca-caixa input { width: 100%; padding: 16px 18px; font: 500 17px var(--fonte); background: transparent; border: 0; border-bottom: 1px solid var(--linha); color: var(--texto); outline: none; }
.busca-caixa ol { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow-y: auto; }
.busca-caixa li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; cursor: pointer; }
.busca-caixa li small { color: var(--texto3); }
.busca-caixa li.foco, .busca-caixa li:hover { background: var(--cartao2); }
.busca-caixa li .st { margin-left: auto; font-size: 12px; color: var(--texto2); }
.modal-caixa { position: relative; max-width: 620px; max-height: 76vh; overflow-y: auto; background: var(--fundo2); border: 1px solid var(--linha2); border-radius: 14px; padding: 24px 26px; }
.modal-caixa h2 { margin: 0 0 10px; font: 600 22px var(--titulo); }
.modal-caixa p, .modal-caixa li { color: var(--texto2); }
.modal-caixa li { margin-bottom: 8px; }
.modal-caixa .mini { font-size: 12.5px; }
.fechar { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%; background: var(--cartao2); font-size: 20px; line-height: 1; color: var(--texto2); }

.aviso-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--texto); color: var(--fundo); padding: 10px 18px; border-radius: 999px; font-weight: 600; z-index: 60; box-shadow: 0 8px 24px rgba(0,0,0,.4); }

/* tela cheia (para transmissão): some o que não é mapa/manchete */
body.tv .local, body.tv .alerta-btn, body.tv .conta-btn, body.tv .faixa, body.tv .acoes .busca-btn, body.tv #compartilhar { display: none; }
body.tv .palco { grid-template-columns: 280px 1fr 300px; }

/* telas médias */
@media (max-width: 1280px) {
  .palco { grid-template-columns: 260px 1fr 280px; }
  .patrocinio span, .busca-btn span, .busca-btn kbd { display: none; }
}
@media (max-width: 1080px) {
  .topo { flex-wrap: wrap; gap: 10px 14px; }
  .abas { order: 3; width: 100%; overflow-x: auto; }
  .aba { flex: 1; }
  .patrocinio { margin-left: 0; }
}

/* celular: a página rola, mapa primeiro */
@media (max-width: 900px) {
  body { overflow: auto; display: block; }
  .faixa { font-size: 11px; }
  .topo { padding: 10px 16px; }
  .marca { font-size: 16px; }
  .patrocinio { order: 4; width: 100%; justify-content: center; }
  .acoes { margin-left: auto; }
  .manchete { margin: 0 16px; flex-direction: column; align-items: stretch; gap: 12px; padding: 14px 16px; }
  .onde-estou { justify-content: center; }
  .local { margin: 10px 16px 0; padding: 12px 14px; }
  .local-alerta { margin-left: 0; width: 100%; justify-content: center; padding: 11px; }
  .sels { width: 100%; } .sels select { flex: 1; max-width: none; font-size: 16px; }
  .alerta-btn span:not(.avatar), .conta-btn span:not(.avatar) { display: none; } .conta-btn { padding: 8px; } .conta-btn.logado { padding: 3px; }
  .alerta-btn span:not(.avatar) { display: none; } .alerta-btn { padding: 8px; } .alerta-btn.logado { padding: 3px; }
  .duas-col { grid-template-columns: 1fr; }
  .local-conta { margin-left: 0; width: 100%; justify-content: center; }
  #cadastro { padding: 0; align-items: flex-end; }
  .form-caixa { max-height: 92vh; border-radius: 18px 18px 0 0; padding: 22px 18px 28px; }
  .palco { display: flex; flex-direction: column; padding: 12px 16px 24px; }
  .mapa-area { order: 1; height: 72vh; min-height: 420px; }
  .painel.esq { order: 2; }
  .painel.dir { order: 3; }
  .painel { overflow: visible; }
  .legenda { display: none; }
  .tempo-ini { display: none; }
  .detalhe { position: fixed; inset: auto 0 0 0; width: auto; max-height: 82vh; border-radius: 18px 18px 0 0; top: auto; }
}


/* vento: aeroportos */
.particulas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.setas-est { z-index: 1; }
.vt .alvo { fill: transparent; }
.vt .seta-w { fill: #fff; stroke: rgba(0,0,0,.75); stroke-width: 1; paint-order: stroke; }
.vt[data-k="1"] .seta-w { fill: var(--n1); } .vt[data-k="2"] .seta-w { fill: var(--n2); } .vt[data-k="3"] .seta-w { fill: var(--n3); }
.vt text.kmh { font: 700 11px var(--titulo); text-anchor: middle; fill: #fff; paint-order: stroke; stroke: rgba(0,0,0,.85); stroke-width: 3px; pointer-events: none; }
.vt { cursor: pointer; }
.vt .ponto { stroke: #04110d; stroke-width: 1.5; }
.vt .onda { fill: none; stroke-width: 2; animation: pulso 2s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.vt .haste { stroke: #cfefff; stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 4 3; animation: sopra var(--vel, 1s) linear infinite; }
.vt .ponta { fill: #cfefff; }
.vt[data-k="1"] .haste, .vt[data-k="1"] .ponta { stroke: var(--n1); fill: var(--n1); }
.vt[data-k="2"] .haste, .vt[data-k="2"] .ponta { stroke: var(--n2); fill: var(--n2); }
.vt[data-k="3"] .haste, .vt[data-k="3"] .ponta { stroke: var(--n3); fill: var(--n3); }
.vt .ponta { stroke: none !important; }
.vt .kmh { font: 700 12px var(--titulo); fill: #fff; paint-order: stroke; stroke: rgba(0,0,0,.85); stroke-width: 3.5px; pointer-events: none; }
@keyframes sopra { to { stroke-dashoffset: -14; } }
.grande strong em { font-style: normal; font-size: 13px; color: var(--texto3); font-weight: 500; }

/* ═══════════════ ANIMAÇÕES ═══════════════ */
/* radar: anéis ao fundo e feixe girando sobre o mapa */
.mapa { background: repeating-radial-gradient(circle at 50% 52%, transparent 0 139px, rgba(57,224,184,.045) 140px 141px); overflow: hidden; }
.mapa::before { content: ""; position: absolute; left: 50%; top: 52%; width: 220vmax; height: 220vmax; margin: -110vmax 0 0 -110vmax; pointer-events: none; z-index: 1;
  background: conic-gradient(from 0deg, rgba(57,224,184,0) 0deg, rgba(57,224,184,0) 320deg, rgba(57,224,184,.025) 352deg, rgba(57,224,184,.05) 359deg, rgba(57,224,184,0) 360deg);
  animation: giro 10s linear infinite; mix-blend-mode: screen; }
.mapa .zoom, .mapa .dica { z-index: 3; }

/* municípios em vermelho "respiram" */
.mun.k3 { animation: respira 1.8s ease-in-out infinite; }
@keyframes respira { 50% { opacity: .55; } }

/* manchete: texto entra e a linha de baixo tem um brilho correndo */
.manchete h1.troca { animation: entraTexto .55s cubic-bezier(.2,.8,.2,1); }
@keyframes entraTexto { from { opacity: 0; transform: translateY(8px); } }
.manchete::after { background: linear-gradient(90deg, var(--cor-manchete, var(--marca)) 0 42%, rgba(255,255,255,.85) 50%, var(--cor-manchete, var(--marca)) 58% 100%); background-size: 260% 100%; animation: brilho 3.2s linear infinite; }
@keyframes brilho { from { background-position: 100% 0; } to { background-position: -160% 0; } }

/* barras crescem */
.nivel .barra span, .regiao .barras span, .cartao-uf .barras span { transform-origin: left; animation: cresce .9s cubic-bezier(.2,.8,.2,1) both; }
.regiao .barras span + span, .cartao-uf .barras span + span { animation-delay: .1s; }
@keyframes cresce { from { transform: scaleX(0); } }

/* painéis surgem em sequência ao abrir */
.manchete, .local, .painel, .mapa-area { animation: surge .7s cubic-bezier(.2,.8,.2,1) both; }
.local { animation-delay: .08s; } .painel.esq { animation-delay: .15s; } .mapa-area { animation-delay: .22s; } .painel.dir { animation-delay: .3s; }
@keyframes surge { from { opacity: 0; transform: translateY(14px); } }

/* ficha da cidade desliza; dica aparece suave */
.detalhe:not([hidden]) { animation: entraDir .35s cubic-bezier(.2,.8,.2,1); }
@keyframes entraDir { from { opacity: 0; transform: translateX(24px); } }
.dica:not([hidden]) { animation: aparece .15s ease-out; }
@keyframes aparece { from { opacity: 0; transform: scale(.96); } }
.modal-caixa { animation: entraModal .3s cubic-bezier(.2,.8,.2,1); }
@keyframes entraModal { from { opacity: 0; transform: translateY(16px) scale(.98); } }

/* novidades no feed */
.feed li.novo { animation: novidade 2.4s ease-out; }
@keyframes novidade { 0% { opacity: 0; transform: translateX(16px); background: rgba(57,224,184,.18); } 15% { opacity: 1; transform: none; } 100% { background: transparent; } }

/* selo de risco na faixa "Você está em" pulsa quando é laranja/vermelho */
.pilula.k2, .pilula.k3 { animation: alertaPilula 2s ease-in-out infinite; }
@keyframes alertaPilula { 50% { box-shadow: 0 0 0 6px rgba(255,138,31,0); } 0%, 100% { box-shadow: 0 0 0 0 rgba(255,138,31,.55); } }
.pilula.k3 { --c: 255,59,59; }

/* botão "E onde eu estou?" com leve chamada */
.onde-estou { animation: chama 3s ease-in-out infinite; }
@keyframes chama { 0%, 100% { box-shadow: 0 0 0 0 rgba(57,224,184,.45); } 50% { box-shadow: 0 0 0 10px rgba(57,224,184,0); } }

/* durante o play da linha do tempo, nada de animações pesadas */
body.tocando .nivel .barra span, body.tocando .regiao .barras span, body.tocando .cartao-uf .barras span { animation: none; }

/* acessibilidade: quem pediu menos movimento no aparelho não vê animações */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .mapa::before { display: none; }
}

/* credibilidade: oficial x medição */
.tag-med, .tag-conf { display: inline-block; font: 600 10.5px var(--fonte); letter-spacing: .02em; padding: 1px 6px; border-radius: 5px; margin-left: 6px; vertical-align: 2px; white-space: nowrap; }
.tag-med { background: rgba(143,211,255,.12); color: #8fd3ff; border: 1px solid rgba(143,211,255,.35); }
.tag-conf { background: rgba(255,255,255,.06); color: var(--texto2); border: 1px dashed var(--texto3); }
.manchete h1 .tag-med { font-size: 13px; vertical-align: 6px; }
.manchete-info { font: 500 .55em var(--fonte); color: var(--texto2); }
.status small { display: block; text-transform: uppercase; letter-spacing: .08em; font-size: 10.5px; color: var(--texto3); font-weight: 600; margin-bottom: 2px; }
.status.oficial { margin-bottom: 8px; }
.status + .status { margin-top: 0; margin-bottom: 8px; }
.status a { color: var(--marca); }
.status.conferir { border-left-color: var(--texto3); border-left-style: dashed; }
.fonte-med { color: var(--texto3); font-size: 12px; }
.pilula.med { background: transparent !important; border: 1.5px dashed currentColor !important; animation: none !important; }
.pilula.med.k1 { color: var(--n1); } .pilula.med.k2 { color: var(--n2); } .pilula.med.k3 { color: var(--n3); }
/* nomes de cidade inteiros (quebra a linha em vez de cortar) */
.lista-top .nm { white-space: normal; overflow: visible; text-overflow: clip; }

/* rodapé */
.rodape { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; padding: 0 20px 10px; margin-top: -6px; font-size: 12px; color: var(--texto3); }
.rodape a { color: var(--texto2); text-decoration: none; }
.rodape a:hover { color: var(--marca); text-decoration: underline; }
.fontes .link-calc { color: var(--marca); font-size: 12px; margin-top: 4px; }
body.tv .rodape { display: none; }
@media (max-width: 900px) { .rodape { margin: 0; padding: 4px 16px 24px; } }

/* aba Vento: sem caixinhas dos estados pequenos e sem as linhas (menos poluição) */
body[data-aba="vento"] .uf-rot.caixa, body[data-aba="vento"] .uf-rot line { display: none; }
body[data-aba="vento"] .uf-rot .q { display: none; }

.lista-estados { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px 12px; margin-top: 12px; }
.lista-estados a { color: var(--texto); text-decoration: none; padding: 6px 8px; border-radius: 8px; }
.lista-estados a:hover { background: var(--cartao2); color: var(--marca); }
