/* ==========================================================================
   NetMap — sistema visual

   Um token por decisão, e as decisões concentradas aqui em cima. Cores em
   neutros levemente frios (cinza puro em tela grande fica sujo), escala
   tipográfica com razão fixa, e espaçamento em múltiplos de 4 pra tudo
   assentar na mesma grade sem eu ficar escolhendo número no olho.
   ========================================================================== */

:root {
  /* superfícies — três níveis de profundidade, não mais */
  --fundo:      #f4f6f8;
  --superficie: #ffffff;
  --elevado:    #ffffff;
  --afundado:   #eef1f4;

  --borda:      #e2e6eb;
  --borda-forte:#cbd2da;

  --texto:      #0f141a;
  --texto-2:    #4a5563;
  --texto-3:    #7c8794;

  --marca:      #2563eb;
  --marca-forte:#1d4ed8;
  --marca-fraca:#eaf1fe;
  --marca-borda:#bfd6fd;

  --ok:      #15803d;  --ok-fraco:      #e8f6ed;
  --aviso:   #b45309;  --aviso-fraco:   #fdf2e3;
  --perigo:  #be123c;  --perigo-fraco:  #fdecef;

  /* tela de desenho */
  --tela:  #fbfcfd;
  --grade: #c3ccd6;

  /* elevação: sombra curta + sombra longa, sempre juntas */
  --e1: 0 1px 2px rgba(15,20,26,.06);
  --e2: 0 1px 2px rgba(15,20,26,.06), 0 4px 12px rgba(15,20,26,.06);
  --e3: 0 2px 4px rgba(15,20,26,.06), 0 12px 32px rgba(15,20,26,.12);

  --r1: 6px;  --r2: 10px;  --r3: 14px;  --r-pill: 999px;

  --t: 140ms cubic-bezier(.4,0,.2,1);

  --fonte: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
           "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) {
    --fundo:      #0c0f13;
    --superficie: #141920;
    --elevado:    #1a2029;
    --afundado:   #0f141a;
    --borda:      #232b35;
    --borda-forte:#333d4a;
    --texto:      #e8ecf1;
    --texto-2:    #a4aeba;
    --texto-3:    #78838f;
    --marca:      #5b9bff;
    --marca-forte:#7db0ff;
    --marca-fraca:#152238;
    --marca-borda:#2a4570;
    --ok:      #4ade80;  --ok-fraco:      #10231a;
    --aviso:   #fbbf24;  --aviso-fraco:   #251c0c;
    --perigo:  #fb7185;  --perigo-fraco:  #2a1219;
    --tela:  #0a0d11;
    --grade: #1e2731;
    --e1: 0 1px 2px rgba(0,0,0,.4);
    --e2: 0 1px 2px rgba(0,0,0,.4), 0 4px 12px rgba(0,0,0,.35);
    --e3: 0 2px 4px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.55);
  }
}
:root[data-tema="escuro"] {
  --fundo: #0c0f13; --superficie: #141920; --elevado: #1a2029; --afundado: #0f141a;
  --borda: #232b35; --borda-forte: #333d4a;
  --texto: #e8ecf1; --texto-2: #a4aeba; --texto-3: #78838f;
  --marca: #5b9bff; --marca-forte: #7db0ff; --marca-fraca: #152238; --marca-borda: #2a4570;
  --ok: #4ade80; --ok-fraco: #10231a;
  --aviso: #fbbf24; --aviso-fraco: #251c0c;
  --perigo: #fb7185; --perigo-fraco: #2a1219;
  --tela: #0a0d11; --grade: #1e2731;
  --e1: 0 1px 2px rgba(0,0,0,.4);
  --e2: 0 1px 2px rgba(0,0,0,.4), 0 4px 12px rgba(0,0,0,.35);
  --e3: 0 2px 4px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.55);
}

/* --------------------------------------------------------------- base --- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fundo);
  color: var(--texto);
  font: 400 14px/1.55 var(--fonte);
  letter-spacing: -.006em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--marca); text-decoration: none; }
a:hover { color: var(--marca-forte); }

h1 { font-size: 1.6rem;  font-weight: 680; letter-spacing: -.022em; margin: 0 0 .35rem; }
h2 { font-size: 1.12rem; font-weight: 650; letter-spacing: -.016em; margin: 0 0 .5rem; }
h3 { font-size: .95rem;  font-weight: 650; letter-spacing: -.012em; margin: 0; }
p  { margin: 0 0 .6rem; }

code, .mono, .tabela td code { font-family: var(--mono); font-size: .855em;
  font-variant-numeric: tabular-nums; letter-spacing: 0; }

::selection { background: var(--marca-fraca); color: var(--marca-forte); }

:focus-visible {
  outline: 2px solid var(--marca);
  outline-offset: 2px;
  border-radius: var(--r1);
}

/* Título de seção pequeno e caixa-alta, o rótulo que organiza os painéis. */
.rot, .paleta h4, .props h4, .tabela th, .resumo span {
  font-size: .68rem; font-weight: 660; text-transform: uppercase;
  letter-spacing: .06em; color: var(--texto-3);
}

/* ------------------------------------------------------------- casca --- */
.topo {
  display: flex; align-items: center; gap: .5rem;
  height: 52px; padding: 0 .9rem;
  background: var(--superficie);
  border-bottom: 1px solid var(--borda);
  position: sticky; top: 0; z-index: 30;
}
.marca {
  font-size: 1.02rem; font-weight: 720; letter-spacing: -.028em;
  color: var(--texto); padding-right: .3rem;
}
.marca span { color: var(--marca); }
.topo .espaco { flex: 1; }
.topo .divisor { width: 1px; height: 22px; background: var(--borda); margin: 0 .3rem; }

.menu { display: flex; gap: .15rem; }
.menu a {
  padding: .35rem .65rem; border-radius: var(--r1);
  font-size: .875rem; font-weight: 550; color: var(--texto-2);
  transition: background var(--t), color var(--t);
}
.menu a:hover { background: var(--afundado); color: var(--texto); }
.menu a.ativo { background: var(--marca-fraca); color: var(--marca-forte); font-weight: 620; }

.usuario { display: flex; align-items: center; gap: .45rem; font-size: .82rem;
  color: var(--texto-3); }
.usuario b { color: var(--texto-2); font-weight: 600; }

.conteudo { padding: 1.6rem 1.4rem 3rem; max-width: 1180px; margin: 0 auto; }
.conteudo.largo { max-width: 1560px; }
.cabecalho-pagina { margin-bottom: 1.3rem; }
.cabecalho-pagina p { color: var(--texto-2); max-width: 62ch; margin: 0; }

/* ---------------------------------------------------------- controles --- */
.btn {
  font: 550 .855rem/1 var(--fonte); letter-spacing: -.004em;
  cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .5rem .8rem; height: 34px;
  border: 1px solid var(--borda-forte); border-radius: var(--r1);
  background: var(--superficie); color: var(--texto);
  box-shadow: var(--e1);
  transition: background var(--t), border-color var(--t), color var(--t),
              box-shadow var(--t), transform var(--t);
}
.btn:hover { background: var(--afundado); border-color: var(--texto-3); }
.btn:active { transform: translateY(.5px); box-shadow: none; }
.btn svg { width: 15px; height: 15px; flex: none; }

.btn-primario {
  background: var(--marca); border-color: var(--marca); color: #fff;
  box-shadow: var(--e1);
}
.btn-primario:hover { background: var(--marca-forte); border-color: var(--marca-forte); color: #fff; }
.btn-perigo { background: var(--perigo); border-color: var(--perigo); color: #fff; }
.btn-perigo:hover { filter: brightness(1.1); color: #fff; }
.btn-fantasma { background: transparent; border-color: transparent; box-shadow: none; }
.btn-fantasma:hover { background: var(--afundado); border-color: transparent; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-mini { height: 27px; padding: 0 .55rem; font-size: .78rem; }

.grupo-btn { display: inline-flex; }
.grupo-btn .btn { border-radius: 0; margin-left: -1px; box-shadow: none; }
.grupo-btn .btn:first-child { border-radius: var(--r1) 0 0 var(--r1); margin-left: 0; }
.grupo-btn .btn:last-child  { border-radius: 0 var(--r1) var(--r1) 0; }

.campo, select.campo, textarea.campo {
  width: 100%; font: 400 .875rem/1.4 var(--fonte); color: var(--texto);
  padding: .45rem .6rem; height: 34px;
  border: 1px solid var(--borda-forte); border-radius: var(--r1);
  background: var(--superficie);
  transition: border-color var(--t), box-shadow var(--t);
}
textarea.campo { height: auto; }
.campo::placeholder { color: var(--texto-3); }
.campo:focus {
  outline: none; border-color: var(--marca);
  box-shadow: 0 0 0 3px var(--marca-fraca);
}
.campo:disabled { background: var(--afundado); color: var(--texto-3); cursor: default; }
select.campo {
  appearance: none; padding-right: 1.8rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%237c8794' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M4 6.5 8 10.5l4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .5rem center;
  background-size: 15px;
}
label.rot { display: block; margin: .85rem 0 .3rem; }

.campo-busca { position: relative; }
.campo-busca .campo { padding-left: 2rem; }
.campo-busca svg {
  position: absolute; left: .58rem; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--texto-3); pointer-events: none;
}

/* -------------------------------------------------------------- lista --- */
.grade-cards {
  display: grid; gap: .9rem;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}
.card {
  background: var(--superficie); border: 1px solid var(--borda);
  border-radius: var(--r2); box-shadow: var(--e1);
  display: flex; flex-direction: column; overflow: hidden;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
}
.card:hover { border-color: var(--borda-forte); box-shadow: var(--e2);
  transform: translateY(-1px); }

/* A miniatura é o que faz a lista parar de ser lista e virar galeria: dá
   pra reconhecer o mapa pelo formato antes de ler o nome. */
.card-thumb {
  aspect-ratio: 16 / 9; background: var(--afundado);
  border-bottom: 1px solid var(--borda);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.card-thumb img, .card-thumb svg { width: 100%; height: 100%; object-fit: contain; }
.card-corpo { padding: .8rem .9rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.card h3 a { color: var(--texto); }
.card h3 a:hover { color: var(--marca); }
.card .meta { color: var(--texto-3); font-size: .78rem; }
.card .acoes {
  display: flex; gap: .3rem; align-items: center;
  padding: .55rem .9rem; border-top: 1px solid var(--borda);
  background: var(--afundado);
}

.pilulas { display: flex; gap: .3rem; flex-wrap: wrap; }
.pilula {
  font-size: .72rem; font-weight: 600; padding: .1rem .45rem;
  border-radius: var(--r-pill); background: var(--afundado);
  color: var(--texto-2); border: 1px solid var(--borda);
  font-variant-numeric: tabular-nums;
}

.vazio {
  text-align: center; padding: 4rem 1.5rem;
  border: 1px dashed var(--borda-forte); border-radius: var(--r3);
  background: var(--superficie);
}
.vazio svg { width: 44px; height: 44px; color: var(--texto-3); margin-bottom: .8rem; }
.vazio p { color: var(--texto-2); max-width: 40ch; margin: 0 auto 1.2rem; }

/* -------------------------------------------------------------- toast --- */
.toast-area {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 100;
  display: flex; flex-direction: column; gap: .45rem;
}
.toast {
  display: flex; align-items: flex-start; gap: .55rem;
  background: var(--elevado); border: 1px solid var(--borda);
  border-left: 3px solid var(--texto-3); border-radius: var(--r2);
  padding: .6rem .85rem; box-shadow: var(--e3); cursor: pointer;
  font-size: .865rem; max-width: 380px;
  opacity: 0; transform: translateY(10px) scale(.98);
  transition: opacity var(--t), transform var(--t);
}
.toast.on { opacity: 1; transform: none; }
.toast-ok    { border-left-color: var(--ok); }
.toast-erro  { border-left-color: var(--perigo); }
.toast-aviso { border-left-color: var(--aviso); }
.toast-info  { border-left-color: var(--marca); }

/* -------------------------------------------------------------- modal --- */
.modal-fundo {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(9,12,16,.5); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  opacity: 0; transition: opacity var(--t);
}
.modal-fundo.on { opacity: 1; }
.modal {
  background: var(--elevado); border: 1px solid var(--borda);
  border-radius: var(--r3); box-shadow: var(--e3);
  width: min(520px, 100%); max-height: min(86dvh, 86vh);
  display: flex; flex-direction: column;
  transform: scale(.97); transition: transform var(--t);
}
.modal-fundo.on .modal { transform: none; }
.modal-cab { padding: 1rem 1.15rem .7rem; }
.modal-corpo { padding: 0 1.15rem 1.15rem; overflow: auto; flex: 1; }
.modal-corpo p { color: var(--texto-2); }
.modal-rod {
  padding: .8rem 1.15rem; border-top: 1px solid var(--borda);
  display: flex; justify-content: flex-end; gap: .45rem;
  background: var(--afundado); border-radius: 0 0 var(--r3) var(--r3);
}

/* ------------------------------------------------------------- editor --- */
.editor {
  display: grid; grid-template-columns: 196px 1fr 300px;
  height: calc(100dvh - 52px);
}
.paleta, .props {
  background: var(--superficie); overflow-y: auto;
  padding: .85rem .7rem;
}
.paleta { border-right: 1px solid var(--borda); }
.props  { border-left: 1px solid var(--borda); padding: .85rem .9rem; }
.paleta h4, .props h4 { margin: 1.1rem 0 .4rem .3rem; }
.paleta h4:first-child, .props h4:first-child { margin-top: 0; }

.ferramenta {
  display: flex; align-items: center; gap: .55rem; width: 100%;
  padding: .38rem .45rem; margin-bottom: .1rem;
  cursor: pointer; border: 1px solid transparent; border-radius: var(--r1);
  background: transparent; color: var(--texto-2);
  font: 550 .84rem/1 var(--fonte); text-align: left;
  transition: background var(--t), color var(--t);
}
.ferramenta:hover { background: var(--afundado); color: var(--texto); }
.ferramenta.on {
  background: var(--marca-fraca); border-color: var(--marca-borda);
  color: var(--marca-forte); font-weight: 620;
}
/* Miniatura do próprio ícone que vai pro mapa — a paleta mostra o que você
   vai desenhar, não um quadradinho de cor que exige decorar a legenda. */
.ferramenta .glifo {
  width: 22px; height: 22px; border-radius: 5px; flex: none;
  display: flex; align-items: center; justify-content: center;
}
.ferramenta .glifo svg { width: 22px; height: 22px; display: block; }
.ferramenta .traco {
  width: 22px; height: 22px; flex: none; display: flex;
  align-items: center; justify-content: center; color: var(--texto-3);
}

.atalhos { padding: .3rem; color: var(--texto-3); font-size: .755rem; line-height: 1.85; }
.atalhos kbd {
  font: 600 .72rem var(--mono); color: var(--texto-2);
  background: var(--afundado); border: 1px solid var(--borda);
  border-bottom-width: 2px; border-radius: 4px; padding: .05rem .3rem;
}

.tela-wrap { position: relative; overflow: hidden; background: var(--tela); }
#tela { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
#tela.pegando { cursor: grabbing; }
#tela.ligando { cursor: crosshair; }

.dica-modo {
  position: absolute; left: 50%; top: .8rem; transform: translateX(-50%);
  background: var(--texto); color: var(--fundo);
  padding: .35rem .8rem; border-radius: var(--r-pill);
  font-size: .8rem; font-weight: 550; pointer-events: none;
  box-shadow: var(--e2); z-index: 5;
}

.flutuante {
  position: absolute; z-index: 4;
  background: var(--superficie); border: 1px solid var(--borda);
  border-radius: var(--r2); box-shadow: var(--e2);
}
.zoom-ctl {
  right: .8rem; bottom: .8rem; display: flex; align-items: center; padding: .2rem;
}
.zoom-ctl .btn { box-shadow: none; border-color: transparent; background: transparent; }
.zoom-ctl .btn:hover { background: var(--afundado); }
#nivel-zoom {
  min-width: 46px; text-align: center; font: 600 .78rem var(--mono);
  color: var(--texto-2); font-variant-numeric: tabular-nums;
}

.legenda {
  left: .8rem; bottom: .8rem; padding: .55rem .7rem;
  display: grid; grid-template-columns: repeat(2, auto); gap: .18rem .9rem;
  font-size: .745rem; color: var(--texto-2);
}
.legenda span { display: flex; align-items: center; gap: .35rem; white-space: nowrap; }
.legenda i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.legenda hr { grid-column: 1 / -1; border: 0; border-top: 1px solid var(--borda); margin: .25rem 0; }

/* Faixa de rascunho: fica no topo da tela de desenho enquanto o mapa veio de
   inventário e ainda não tem nenhuma ligação. */
.faixa-rascunho {
  position: absolute; left: .8rem; right: .8rem; top: .8rem; z-index: 6;
  display: flex; align-items: flex-start; gap: .6rem;
  background: var(--aviso-fraco); border: 1px solid var(--aviso);
  border-radius: var(--r2); padding: .65rem .8rem;
  font-size: .84rem; line-height: 1.5; color: var(--texto);
  box-shadow: var(--e2);
}
.faixa-rascunho > svg { color: var(--aviso); flex: none; margin-top: .1rem; }
.faixa-rascunho > div { flex: 1; }
.faixa-rascunho b { font-weight: 640; }
.pilula-aviso {
  background: var(--aviso-fraco); color: var(--aviso);
  border-color: var(--aviso); font-weight: 700;
}

.status-salvo {
  font-size: .78rem; color: var(--texto-3);
  display: inline-flex; align-items: center; gap: .35rem;
}
.status-salvo::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok); flex: none;
}
.status-salvo.sujo { color: var(--aviso); font-weight: 600; }
.status-salvo.sujo::before { background: var(--aviso); }

/* elementos do desenho */
.no-cx, .grupo-cx { cursor: move; }
.no-forma { stroke: rgba(0,0,0,.16); stroke-width: 1; transition: none; }
.no-cx.sel .no-anel { stroke: var(--marca); stroke-width: 2.5; fill: none; }
.no-rot {
  font: 600 9.5px var(--fonte); text-anchor: middle; fill: var(--texto);
  pointer-events: none; user-select: none; paint-order: stroke;
  stroke: var(--tela); stroke-width: 3px; stroke-linejoin: round;
}
.no-ip {
  font: 500 8.5px var(--mono); text-anchor: middle; fill: var(--texto-3);
  pointer-events: none; user-select: none; paint-order: stroke;
  stroke: var(--tela); stroke-width: 3px; stroke-linejoin: round;
}
.grupo-forma {
  fill: var(--marca); fill-opacity: .028;
  stroke: var(--borda-forte); stroke-width: 1.5;
}
.grupo-cx.sel .grupo-forma { stroke: var(--marca); stroke-width: 2.5; fill-opacity: .06; }
.grupo-rot {
  font: 680 13px var(--fonte); text-anchor: middle; fill: var(--texto-2);
  letter-spacing: .01em; pointer-events: none; user-select: none;
}
.link-linha { stroke: var(--borda-forte); stroke-width: 1.6; fill: none;
  stroke-linecap: round; }
.link-cx:hover .link-linha { stroke: var(--texto-3); }
.link-cx.sel .link-linha { stroke: var(--marca); stroke-width: 3; }
.link-alvo { stroke: transparent; stroke-width: 14; fill: none; cursor: pointer; }
.link-rot {
  font: 600 8.5px var(--fonte); text-anchor: middle; fill: var(--texto-2);
  pointer-events: none; user-select: none; paint-order: stroke;
  stroke: var(--tela); stroke-width: 3.5px; stroke-linejoin: round;
}
.alca { fill: var(--marca); stroke: var(--superficie); stroke-width: 1.5;
  cursor: nwse-resize; }
.nota-txt { font: 500 11px var(--fonte); fill: var(--texto-2); cursor: move;
  user-select: none; }
.grade-pontos { fill: var(--grade); }

/* painel de propriedades */
.props-cab {
  display: flex; align-items: center; gap: .5rem;
  padding-bottom: .7rem; margin-bottom: .2rem;
  border-bottom: 1px solid var(--borda);
}
.props-cab .glifo { width: 26px; height: 26px; border-radius: 6px; flex: none; }
.props-cab .glifo svg { width: 26px; height: 26px; }
.props-cab b { font-size: .9rem; font-weight: 620; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.props-vazio { color: var(--texto-3); font-size: .85rem; padding: .6rem .3rem;
  line-height: 1.65; }
.par-campos { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }

/* -------------------------------------------------------------- login --- */
.tela-login {
  display: flex; align-items: center; justify-content: center;
  min-height: 100dvh; padding: 1rem;
  background:
    radial-gradient(1100px 520px at 50% -10%, var(--marca-fraca), transparent 70%),
    var(--fundo);
}
.caixa-login {
  background: var(--superficie); border: 1px solid var(--borda);
  border-radius: var(--r3); box-shadow: var(--e3);
  padding: 2rem 1.9rem; width: min(390px, 100%);
}
.marca-login { font-size: 1.55rem; font-weight: 720; letter-spacing: -.032em; }
.marca-login span { color: var(--marca); }
.caixa-login .sub { color: var(--texto-3); font-size: .85rem; margin: .15rem 0 1.7rem; }
.erro-login {
  display: flex; gap: .5rem; align-items: center;
  background: var(--perigo-fraco); border: 1px solid var(--perigo);
  color: var(--perigo); border-radius: var(--r1);
  padding: .5rem .7rem; font-size: .85rem; margin-bottom: 1rem;
}

/* ------------------------------------------------------ tabelas/dados --- */
.painel {
  background: var(--superficie); border: 1px solid var(--borda);
  border-radius: var(--r2); overflow: hidden; box-shadow: var(--e1);
}
.painel-cab {
  display: flex; align-items: center; gap: .6rem;
  padding: .7rem .9rem; border-bottom: 1px solid var(--borda);
}
.painel-cab .espaco { flex: 1; }

.tabela { width: 100%; border-collapse: collapse; font-size: .855rem; }
.tabela th {
  text-align: left; padding: .5rem .8rem; background: var(--afundado);
  border-bottom: 1px solid var(--borda); position: sticky; top: 0; z-index: 1;
  white-space: nowrap;
}
.tabela td { padding: .5rem .8rem; border-bottom: 1px solid var(--borda); }
.tabela tbody tr:last-child td { border-bottom: 0; }
.tabela tbody tr { transition: background var(--t); }
.tabela tbody tr:hover { background: var(--afundado); }
.tabela .num { font-variant-numeric: tabular-nums; text-align: right; }
.rolagem { overflow: auto; max-height: 460px; }

.resumo {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 1px; background: var(--borda);
  border: 1px solid var(--borda); border-radius: var(--r2);
  overflow: hidden; margin: 1.1rem 0 1.4rem;
}
.resumo div { background: var(--superficie); padding: .8rem .9rem; }
.resumo b {
  display: block; font-size: 1.55rem; font-weight: 660; line-height: 1.15;
  letter-spacing: -.028em; font-variant-numeric: tabular-nums;
}
.resumo span { display: block; margin-top: .1rem; }

.filtros { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.filtros .espaco { flex: 1; }

/* achados de conferência */
.achado {
  background: var(--superficie); border: 1px solid var(--borda);
  border-left: 3px solid var(--texto-3);
  border-radius: var(--r2); padding: .7rem .9rem; margin-bottom: .5rem;
  box-shadow: var(--e1);
}
.achado.sev-erro   { border-left-color: var(--perigo); }
.achado.sev-alerta { border-left-color: var(--aviso); }
.achado.sev-info   { border-left-color: var(--marca); }
.achado-cab { display: flex; gap: .55rem; align-items: baseline; line-height: 1.5; }
.achado .sev {
  font-size: .64rem; font-weight: 720; text-transform: uppercase;
  letter-spacing: .07em; flex: none; padding-top: .12rem;
}
.sev-erro   .sev { color: var(--perigo); }
.sev-alerta .sev { color: var(--aviso); }
.sev-info   .sev { color: var(--marca); }
.chips { display: flex; flex-wrap: wrap; gap: .28rem; margin-top: .55rem; }
.chip {
  font-size: .755rem; padding: .1rem .45rem; border-radius: var(--r1);
  background: var(--afundado); border: 1px solid var(--borda);
  color: var(--texto-2); transition: border-color var(--t), color var(--t);
}
.chip:hover { border-color: var(--marca); color: var(--marca); }
.chip code { color: inherit; }

.tag {
  font-size: .72rem; font-weight: 600; padding: .1rem .45rem;
  border-radius: var(--r1); white-space: nowrap;
  border: 1px solid transparent;
}
.tag-ok     { background: var(--ok-fraco);     color: var(--ok); }
.tag-alerta { background: var(--aviso-fraco);  color: var(--aviso); }
.tag-erro   { background: var(--perigo-fraco); color: var(--perigo); }
.tag-info   { background: var(--afundado); color: var(--texto-3); border-color: var(--borda); }

/* selo de tipo de equipamento — ponto de cor + nome, não caixa colorida
   gritante: numa tabela de 39 linhas isso vira um mural de neon. */
.tipo { display: inline-flex; align-items: center; gap: .35rem;
  font-size: .8rem; color: var(--texto-2); white-space: nowrap; }
.tipo::before { content: ""; width: 7px; height: 7px; border-radius: 2px; flex: none; }
.tipo-olt::before      { background: #0e7490; }
.tipo-switch::before   { background: #1d4ed8; }
.tipo-router::before   { background: #6d28d9; }
.tipo-radio::before    { background: #ea580c; }
.tipo-servidor::before { background: #475569; }
.tipo-cgnat::before    { background: #be123c; }
.tipo-bras::before     { background: #15803d; }
.tipo-generico::before { background: #94a3b8; }

.nulo { color: var(--texto-3); }

/* ------------------------------------------------------------ importar -- */
.solta {
  border: 1.5px dashed var(--borda-forte); border-radius: var(--r3);
  padding: 2.6rem 1.5rem; text-align: center;
  background: var(--superficie); cursor: pointer;
  transition: border-color var(--t), background var(--t);
}
.solta:hover { border-color: var(--texto-3); }
.solta.sobre { border-color: var(--marca); background: var(--marca-fraca); }
.solta svg { width: 34px; height: 34px; color: var(--texto-3); margin-bottom: .6rem; }
.solta.sobre svg { color: var(--marca); }
.solta b { display: block; font-size: 1rem; font-weight: 600; }
.solta small { color: var(--texto-3); }

.barra { height: 5px; border-radius: 3px; background: var(--borda);
  overflow: hidden; min-width: 54px; }
.barra i { display: block; height: 100%; border-radius: 3px; }
.s-alta  i { background: var(--ok); }
.s-media i { background: var(--aviso); }
.s-baixa i { background: var(--perigo); }

/* ------------------------------------------------------------ responsivo */
@media (max-width: 980px) {
  .editor { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; }
  .paleta, .props { max-height: 30dvh; border: 0; border-top: 1px solid var(--borda); }
  .paleta { display: flex; gap: .3rem; overflow-x: auto; padding: .5rem; }
  .paleta h4, .atalhos { display: none; }
  .ferramenta { width: auto; }
  .legenda { display: none; }
  .menu a { padding: .3rem .45rem; font-size: .82rem; }
  .conteudo { padding: 1.1rem .9rem 2.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
