/* N.A.S.E. — identidade Wortic aplicada a uma sala de situação.
   Fundo profundo, vidro, azul Wortic como única cor de ação. Cor só aparece
   quando significa alguma coisa: tipo de entidade, risco, estado da hipótese. */

:root {
  --fundo: #05080F;
  --fundo2: #0A1120;
  --vidro: rgba(255, 255, 255, .045);
  --vidro-forte: rgba(255, 255, 255, .075);
  --linha: rgba(255, 255, 255, .09);
  --linha-forte: rgba(255, 255, 255, .16);
  --txt: #E9EFF8;
  --txt2: #93A3B8;
  --txt3: #5F7189;
  --azul: #38A9F5;
  --azul-claro: #7FD3F7;
  --azul-escuro: #1B6FB0;
  --ok: #34D399;
  --atencao: #F5A524;
  --risco: #F4436C;
  --roxo: #A78BFA;
  --ciano: #22D3EE;
  --r: 14px;
  --r-g: 20px;
  --sombra: 0 20px 60px rgba(0, 0, 0, .55);
  --fonte: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Inter, Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--fundo);
  color: var(--txt);
  font-family: var(--fonte);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(1100px 700px at 12% -10%, rgba(56, 169, 245, .16), transparent 60%),
    radial-gradient(900px 620px at 92% 8%, rgba(167, 139, 250, .10), transparent 62%),
    radial-gradient(800px 800px at 50% 115%, rgba(34, 211, 238, .07), transparent 60%);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.10); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.20); background-clip: padding-box; }

/* ---------------------------------------------------------- login */

.login-tela {
  position: relative; z-index: 1; height: 100vh;
  display: grid; place-items: center; padding: 24px;
}
.login-cartao {
  width: 100%; max-width: 420px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.025));
  border: 1px solid var(--linha); border-radius: 24px;
  padding: 38px 34px 30px; backdrop-filter: blur(26px) saturate(140%);
  box-shadow: var(--sombra);
  animation: sobe .5s cubic-bezier(.16,1,.3,1);
}
@keyframes sobe { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

.login-logo { width: 62px; height: 62px; display: block; margin-bottom: 20px; filter: drop-shadow(0 6px 20px rgba(56,169,245,.35)); }
.login-sigla { font-size: 11px; letter-spacing: .34em; color: var(--azul); font-weight: 700; }
.login-titulo { font-size: 27px; font-weight: 700; letter-spacing: -.02em; margin: 10px 0 6px; }
.login-sub { font-size: 14px; color: var(--txt2); line-height: 1.55; margin-bottom: 26px; }

.campo { margin-bottom: 14px; }
.campo label { display: block; font-size: 12px; color: var(--txt2); margin-bottom: 7px; font-weight: 600; }
input, select, textarea {
  width: 100%; padding: 13px 15px; font-size: 15px; font-family: inherit;
  color: var(--txt); background: rgba(0,0,0,.28);
  border: 1px solid var(--linha); border-radius: 12px; outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
input::placeholder, textarea::placeholder { color: var(--txt3); }
input:focus, select:focus, textarea:focus {
  border-color: rgba(56,169,245,.65); background: rgba(0,0,0,.4);
  box-shadow: 0 0 0 4px rgba(56,169,245,.14);
}
input:-webkit-autofill { -webkit-text-fill-color: var(--txt); -webkit-box-shadow: 0 0 0 40px #0B1424 inset; }

#codigo {
  text-align: center; font-family: var(--mono); font-size: 30px;
  letter-spacing: .42em; padding: 16px 10px 16px 22px; font-weight: 600;
}

.btn {
  width: 100%; padding: 14px 18px; font-size: 15px; font-weight: 650; font-family: inherit;
  color: #04121F; background: linear-gradient(180deg, var(--azul-claro), var(--azul));
  border: none; border-radius: 12px; cursor: pointer;
  transition: transform .12s, filter .18s, opacity .18s;
  box-shadow: 0 8px 26px rgba(56,169,245,.28);
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: scale(.985); }
.btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn-vazio {
  background: var(--vidro); color: var(--txt); border: 1px solid var(--linha); box-shadow: none;
}
.btn-vazio:hover { background: var(--vidro-forte); }

.aviso {
  margin-top: 14px; padding: 11px 14px; border-radius: 11px; font-size: 13.5px; line-height: 1.5;
  display: none;
}
.aviso.erro { display: block; background: rgba(244,67,108,.12); border: 1px solid rgba(244,67,108,.32); color: #FFC2CF; }
.aviso.ok { display: block; background: rgba(52,211,153,.10); border: 1px solid rgba(52,211,153,.30); color: #A7F3D0; }

.login-rodape { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--linha);
  font-size: 11.5px; color: var(--txt3); display: flex; align-items: center; gap: 8px; }
.login-rodape img { width: 16px; height: 16px; opacity: .85; }
.passo { display: none; }
.passo.ativo { display: block; animation: sobe .32s cubic-bezier(.16,1,.3,1); }
.link { background: none; border: none; color: var(--azul); font-size: 13px; cursor: pointer;
  padding: 10px 0 0; font-family: inherit; }
.link:hover { text-decoration: underline; }

/* ---------------------------------------------------------- shell */

/* fixed em vez de height:100vh: gruda no viewport e impede que o documento
   cresça além da tela (com 100vh o canvas do grafo saía do enquadramento) */
.app { position: fixed; inset: 0; z-index: 1; display: grid; grid-template-columns: 78px 1fr; }

.rail {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 0 14px;
  background: rgba(6, 10, 18, .72); border-right: 1px solid var(--linha);
  backdrop-filter: blur(20px); z-index: 5;
}
.rail-logo { width: 34px; height: 34px; margin-bottom: 14px; filter: drop-shadow(0 4px 14px rgba(56,169,245,.4)); }
.rail-item {
  width: 52px; height: 48px; border-radius: 13px; display: grid; place-items: center; gap: 3px;
  color: var(--txt3); cursor: pointer; border: 1px solid transparent; position: relative;
  transition: background .16s, color .16s, border-color .16s;
}
.rail-item svg { width: 19px; height: 19px; }
.rail-item span { font-size: 8.5px; font-weight: 600; letter-spacing: .02em; }
.rail-item:hover { color: var(--txt); background: var(--vidro); }
.rail-item.ativo { color: var(--azul); background: rgba(56,169,245,.13); border-color: rgba(56,169,245,.28); }
.rail-item.ativo::before {
  content: ""; position: absolute; left: -13px; top: 12px; bottom: 12px; width: 3px;
  background: var(--azul); border-radius: 0 3px 3px 0;
}
.rail-fim { margin-top: auto; }

.principal { display: grid; grid-template-rows: 62px 1fr; min-width: 0; min-height: 0; }

.topo {
  display: flex; align-items: center; gap: 14px; padding: 0 20px;
  border-bottom: 1px solid var(--linha); background: rgba(6,10,18,.6); backdrop-filter: blur(18px);
}
.topo h1 { font-size: 16px; font-weight: 650; margin: 0; letter-spacing: -.01em; white-space: nowrap; }
.topo .sub { font-size: 11.5px; color: var(--txt3); }
.busca-caixa { position: relative; flex: 1; max-width: 460px; margin-left: auto; }
.busca-caixa input { padding: 9px 14px 9px 36px; font-size: 13.5px; border-radius: 11px; }
.busca-caixa svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--txt3); }
.busca-lista {
  position: absolute; top: 44px; left: 0; right: 0; z-index: 40; display: none;
  background: #0C1424; border: 1px solid var(--linha); border-radius: 13px; overflow: hidden;
  box-shadow: var(--sombra); max-height: 340px; overflow-y: auto;
}
.busca-lista.aberta { display: block; }
.busca-lista div { padding: 10px 14px; font-size: 13.5px; cursor: pointer; display: flex; gap: 9px; align-items: center; }
.busca-lista div:hover { background: var(--vidro-forte); }

.vista { overflow: auto; padding: 22px; display: none; min-height: 0; }
.vista.ativa { display: block; }
.vista.cheia { padding: 0; overflow: hidden; position: relative; }

/* ---------------------------------------------------------- cartões e KPIs */

.grade { display: grid; gap: 14px; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: 1.35fr 1fr; }
@media (max-width: 1180px) { .g4 { grid-template-columns: repeat(2, 1fr); } .g2, .g3 { grid-template-columns: 1fr; } }

.cartao {
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.022));
  border: 1px solid var(--linha); border-radius: var(--r-g); padding: 18px;
  backdrop-filter: blur(18px);
}
.cartao h3 { margin: 0 0 4px; font-size: 13px; font-weight: 650; letter-spacing: .01em; }
.cartao .desc { font-size: 11.5px; color: var(--txt3); margin-bottom: 14px; }

.kpi .n { font-size: 34px; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; }
.kpi .r { font-size: 11.5px; color: var(--txt2); margin-top: 3px; }
.kpi .t { font-size: 10.5px; letter-spacing: .16em; color: var(--txt3); font-weight: 700; text-transform: uppercase; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600; border: 1px solid var(--linha); background: var(--vidro);
  color: var(--txt2); white-space: nowrap;
}
.chip.azul { color: var(--azul); border-color: rgba(56,169,245,.3); background: rgba(56,169,245,.10); }
.chip.ok { color: var(--ok); border-color: rgba(52,211,153,.3); background: rgba(52,211,153,.10); }
.chip.atencao { color: var(--atencao); border-color: rgba(245,165,36,.3); background: rgba(245,165,36,.10); }
.chip.risco { color: var(--risco); border-color: rgba(244,67,108,.32); background: rgba(244,67,108,.10); }
.chip.roxo { color: var(--roxo); border-color: rgba(167,139,250,.3); background: rgba(167,139,250,.10); }
.ponto { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.lista-linha {
  display: flex; align-items: center; gap: 11px; padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.055); cursor: pointer;
}
.lista-linha:last-child { border-bottom: none; }
.lista-linha:hover { background: rgba(255,255,255,.03); }
.lista-linha .nome { font-size: 13.5px; font-weight: 600; }
.lista-linha .meta { font-size: 11.5px; color: var(--txt3); }
.lista-linha .dir { margin-left: auto; text-align: right; }

.avatar {
  width: 34px; height: 34px; border-radius: 10px; object-fit: cover; flex-shrink: 0;
  border: 1px solid var(--linha-forte); background: #0B1424;
  display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--txt3);
}
.avatar.g { width: 62px; height: 62px; border-radius: 16px; font-size: 24px; }

.barra { height: 5px; border-radius: 3px; background: rgba(255,255,255,.09); overflow: hidden; width: 96px; }
.barra i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--azul), var(--risco)); }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--txt3); font-weight: 700; padding: 0 12px 10px; border-bottom: 1px solid var(--linha); }
td { padding: 11px 12px; border-bottom: 1px solid rgba(255,255,255,.05); vertical-align: middle; }
tbody tr:hover { background: rgba(255,255,255,.03); cursor: pointer; }

/* ---------------------------------------------------------- grafo */

#cy { position: absolute; inset: 0; }
.grafo-ferramentas {
  position: absolute; top: 16px; left: 16px; z-index: 10; display: flex; gap: 8px; align-items: center;
  background: rgba(8,13,24,.82); border: 1px solid var(--linha); border-radius: 14px;
  padding: 8px 10px; backdrop-filter: blur(20px); box-shadow: var(--sombra); flex-wrap: wrap; max-width: calc(100% - 380px);
}
.grafo-ferramentas select, .grafo-ferramentas input { width: auto; padding: 7px 10px; font-size: 12.5px; border-radius: 9px; }
.mini {
  padding: 7px 12px; font-size: 12.5px; font-weight: 600; border-radius: 9px; cursor: pointer;
  background: var(--vidro); color: var(--txt); border: 1px solid var(--linha); font-family: inherit;
  transition: background .16s, border-color .16s;
}
.mini:hover { background: var(--vidro-forte); border-color: var(--linha-forte); }
.mini.ativa { background: rgba(56,169,245,.16); border-color: rgba(56,169,245,.4); color: var(--azul-claro); }
.mini.sim { color: var(--ok); border-color: rgba(52,211,153,.32); }
.mini.sim:hover { background: rgba(52,211,153,.14); }
.mini.nao { color: var(--risco); border-color: rgba(244,67,108,.32); }
.mini.nao:hover { background: rgba(244,67,108,.14); }

.legenda {
  position: absolute; bottom: 16px; left: 16px; z-index: 10;
  background: rgba(8,13,24,.82); border: 1px solid var(--linha); border-radius: 14px;
  padding: 12px 14px; backdrop-filter: blur(20px); font-size: 11.5px; color: var(--txt2);
  display: flex; gap: 16px; flex-wrap: wrap; max-width: 620px;
}
.legenda b { color: var(--txt); font-weight: 600; }
.legenda i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 5px; }
.legenda .traco { width: 20px; height: 0; border-top: 2px dashed var(--txt3); display: inline-block; margin-right: 5px; vertical-align: middle; }
.legenda .traco.cheio { border-top: 2px solid var(--ok); }

/* ---------------------------------------------------------- grafo: navegabilidade
   Controles montados em JS (não há como tocar no index.html) dentro dos
   mesmos containers .grafo-ferramentas / #v-grafo que já existiam — por isso
   herdam .mini e as variáveis de sempre, sem paleta nova. */

.zoom-grupo { display: flex; gap: 4px; }
.zoom-grupo .mini { min-width: 34px; text-align: center; padding: 7px 11px; }
.foco-chip { white-space: nowrap; }

/* dropdown "Tipos": ficou de fora da barra em linha porque são até 12
   entradas — em chip solto brigaria por espaço com o resto da ferramenta */
.grafo-dropdown { position: relative; }
.grafo-dropdown-lista {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; display: none;
  background: #0C1424; border: 1px solid var(--linha); border-radius: 12px; padding: 7px;
  box-shadow: var(--sombra); min-width: 210px; max-height: 320px; overflow-y: auto;
}
.grafo-dropdown-lista.aberta { display: block; }
.grafo-dropdown-item {
  display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px;
  cursor: pointer; font-size: 12.5px; transition: opacity .15s;
}
.grafo-dropdown-item:hover { background: var(--vidro); }
.grafo-dropdown-item i { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.grafo-dropdown-item .n { margin-left: auto; color: var(--txt3); font-family: var(--mono); font-size: 11px; }
/* tipo desligado no filtro: mesma linguagem visual do nó apagado no grafo (opaco, não some) */
.grafo-dropdown-item.desligado { opacity: .4; }

/* bússola: canvas puro, sem lib nova. Fica no canto oposto à legenda pra não
   competir por espaço, e desliza pra esquerda quando o dossiê abre — senão o
   painel de 400px cobre ela por baixo (mesmo z-index das outras ferramentas). */
.bussola {
  position: absolute; bottom: 16px; right: 16px; z-index: 10;
  background: rgba(8,13,24,.82); border: 1px solid var(--linha); border-radius: 14px;
  padding: 9px; backdrop-filter: blur(20px); box-shadow: var(--sombra);
  transition: right .3s cubic-bezier(.16,1,.3,1);
}
.dossie.aberto ~ .bussola { right: 416px; }
.bussola-titulo {
  font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--txt3);
  margin-bottom: 6px; font-weight: 700;
}
.bussola canvas { display: block; border-radius: 8px; background: rgba(0,0,0,.35); cursor: crosshair; }

/* ---------------------------------------------------------- dossiê */

.dossie {
  position: absolute; top: 0; right: 0; bottom: 0; width: 400px; z-index: 20;
  background: rgba(7, 11, 20, .93); border-left: 1px solid var(--linha);
  backdrop-filter: blur(28px); overflow-y: auto; transform: translateX(100%);
  transition: transform .3s cubic-bezier(.16,1,.3,1); box-shadow: -20px 0 60px rgba(0,0,0,.5);
}
.dossie.aberto { transform: none; }
.dossie-topo { padding: 18px 18px 16px; border-bottom: 1px solid var(--linha); position: sticky; top: 0;
  background: rgba(7,11,20,.96); backdrop-filter: blur(20px); z-index: 2; }
.dossie-corpo { padding: 16px 18px 40px; }
.dossie h4 { font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--txt3);
  margin: 22px 0 10px; font-weight: 700; }
.dossie h4:first-child { margin-top: 0; }
.fechar { position: absolute; top: 14px; right: 14px; width: 28px; height: 28px; border-radius: 8px;
  background: var(--vidro); border: 1px solid var(--linha); color: var(--txt2); cursor: pointer;
  display: grid; place-items: center; font-size: 15px; }
.fechar:hover { background: var(--vidro-forte); color: var(--txt); }

.evidencia {
  border: 1px solid var(--linha); border-radius: 13px; padding: 12px; margin-bottom: 10px;
  background: rgba(255,255,255,.028); transition: border-color .16s;
}
.evidencia:hover { border-color: var(--linha-forte); }
.evidencia .cab { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
.evidencia .tit { font-size: 13px; font-weight: 600; line-height: 1.4; }
.evidencia .tre { font-size: 12px; color: var(--txt2); line-height: 1.55; margin-top: 6px;
  border-left: 2px solid rgba(56,169,245,.35); padding-left: 9px; }
.evidencia a { color: var(--azul); text-decoration: none; font-size: 11.5px; }
.evidencia a:hover { text-decoration: underline; }

.decisao-caixa {
  border: 1px solid rgba(56,169,245,.28); background: rgba(56,169,245,.07);
  border-radius: 13px; padding: 13px; margin-top: 12px;
}
.decisao-caixa p { margin: 0 0 10px; font-size: 12.5px; color: var(--txt2); line-height: 1.5; }
.decisao-botoes { display: flex; gap: 8px; }
.decisao-botoes .mini { flex: 1; }

.sinal-linha { display: flex; justify-content: space-between; gap: 14px; font-size: 12px; padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,.05); }
.sinal-linha span:first-child { color: var(--txt3); flex-shrink: 0; }
.sinal-linha span:last-child { font-family: var(--mono); color: var(--azul-claro);
  text-align: right; word-break: break-word; }

/* ---------------------------------------------------------- mapa */

#mapa { position: absolute; inset: 0; background: #050810; }
.leaflet-container { background: #050810; font-family: var(--fonte); }
.leaflet-control-attribution { background: rgba(6,10,18,.7) !important; color: var(--txt3) !important; font-size: 10px !important; }
.leaflet-control-attribution a { color: var(--txt2) !important; }
.leaflet-popup-content-wrapper { background: #0C1424; color: var(--txt); border: 1px solid var(--linha);
  border-radius: 13px; box-shadow: var(--sombra); }
.leaflet-popup-tip { background: #0C1424; border: 1px solid var(--linha); }
.leaflet-popup-content { margin: 13px 15px; font-size: 13px; line-height: 1.5; }
.leaflet-popup-content b { color: var(--azul-claro); }
.leaflet-bar a { background: #0C1424 !important; color: var(--txt) !important; border-color: var(--linha) !important; }

.ponto-mapa { border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 4px rgba(56,169,245,.18), 0 4px 14px rgba(0,0,0,.6); }
.pulso { animation: pulsa 2.4s ease-out infinite; }
@keyframes pulsa { 0% { box-shadow: 0 0 0 0 rgba(244,67,108,.55); } 70% { box-shadow: 0 0 0 18px rgba(244,67,108,0); } 100% { box-shadow: 0 0 0 0 rgba(244,67,108,0); } }

/* ---------------------------------------------------------- formulários de coleta */

.fonte-cartao { display: flex; flex-direction: column; gap: 10px; }
.fonte-cartao .linha { display: flex; gap: 8px; }
.fonte-cartao .linha input { flex: 1; }
.fonte-cartao .linha .mini { white-space: nowrap; }
.resultado { font-size: 12.5px; color: var(--txt2); line-height: 1.55; padding: 10px 12px;
  border-radius: 11px; background: rgba(0,0,0,.25); border: 1px solid var(--linha); display: none; }
.resultado.mostra { display: block; }
.resultado.bom { border-color: rgba(52,211,153,.3); }
.resultado.ruim { border-color: rgba(244,67,108,.3); color: #FFC2CF; }

.vazio { text-align: center; padding: 46px 20px; color: var(--txt3); font-size: 13.5px; line-height: 1.6; }
.vazio svg { width: 34px; height: 34px; margin-bottom: 12px; opacity: .5; }

.carregando { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.2);
  border-top-color: var(--azul); border-radius: 50%; animation: gira .7s linear infinite; vertical-align: -2px; }
@keyframes gira { to { transform: rotate(360deg); } }

.recado {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); z-index: 200;
  background: #0C1424; border: 1px solid var(--linha-forte); border-radius: 13px; padding: 12px 18px;
  font-size: 13.5px; box-shadow: var(--sombra); opacity: 0; transition: all .28s cubic-bezier(.16,1,.3,1);
  pointer-events: none; max-width: 560px;
}
.recado.mostra { opacity: 1; transform: translateX(-50%); }
.recado.ok { border-color: rgba(52,211,153,.4); }
.recado.erro { border-color: rgba(244,67,108,.4); }

/* filtro de tipos: ações no rodapé do dropdown e legenda recolhível — a legenda
   ocupava um terço da tela e escondia justamente a parte densa do grafo */
.grafo-dropdown-acoes {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px 4px;
  border-top: 1px solid var(--linha); margin-top: 6px;
}
.grafo-dropdown-acoes span { font-size: 10.5px; color: var(--txt3); line-height: 1.4; }

.legenda { transition: max-height .24s ease, padding .24s ease, opacity .2s; overflow: hidden; }
.legenda.recolhida { max-height: 34px; padding-top: 8px; padding-bottom: 8px; }
.legenda.recolhida > :not(.legenda-alternar) { display: none; }
.legenda-alternar {
  position: absolute; top: 6px; right: 8px; background: none; border: none;
  color: var(--txt3); cursor: pointer; font-size: 11px; font-family: inherit; padding: 4px 6px;
}
.legenda-alternar:hover { color: var(--txt); }
.legenda { position: absolute; padding-right: 74px; }
