/* Jarvis v2 — linguagem de contexto/DESIGN_V2.md. Cor só comunica estado; o resto é tom sobre tom.
 * Os pares de contraste foram medidos no documento: não trocar um token sem medir de novo. */
:root {
  --fundo: #05080D;
  --superficie: #0B1119;
  --superficie-2: #121A25;
  --linha: rgba(133, 162, 200, .16);
  --texto: #EAF1F8;
  --texto-2: #9BA9BD;
  --texto-3: #8E9CB2;
  --acento: #5CCBFF;
  --sobre-acento: #04121C;
  --acento-2: #8F7BFF;
  --ok: #34D399;
  --atencao: #FBBF4A;
  --falha: #FB7185;
  --vidro: rgba(5, 8, 13, .72);
  --sombra: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 8px 24px rgba(0, 0, 0, .25);
  --gradiente: linear-gradient(135deg, var(--acento), var(--acento-2));
  --curva: cubic-bezier(.2, .8, .2, 1);
  --r-cartao: 16px;
  --r-controle: 12px;
  --nav-w: 232px;
  --fonte: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --fundo: #F3F6FA;
    --superficie: #FFFFFF;
    --superficie-2: #EAF0F6;
    --linha: rgba(15, 23, 42, .10);
    --texto: #0A1220;
    --texto-2: #475467;
    --texto-3: #5D6878;
    --acento: #0B6FB0;
    --sobre-acento: #FFFFFF;
    --acento-2: #6D4EE0;
    --ok: #0B7A4B;
    --atencao: #8A5700;
    --falha: #C2334A;
    --vidro: rgba(243, 246, 250, .78);
    --sombra: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px rgba(15, 23, 42, .05);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--fundo);
  background-image: radial-gradient(900px 420px at 0% -10%, color-mix(in srgb, var(--acento) 9%, transparent), transparent 70%),
    radial-gradient(700px 360px at 100% -10%, color-mix(in srgb, var(--acento-2) 6%, transparent), transparent 70%);
  background-attachment: fixed;
  color: var(--texto);
  font: 15px/1.5 var(--fonte);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--acento); }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--superficie); padding: 8px 12px; z-index: 50; border-radius: var(--r-controle); }
.skip:focus { left: 8px; }
.muted { color: var(--texto-2); font-weight: 400; }
.fraco { color: var(--texto-3); font-size: 13px; }
.mono { font-family: var(--mono); font-size: 13px; }
.n, .num, .tab { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
svg.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- casca ---------- */
.shell { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); min-height: 100vh; }
.nav {
  position: sticky; top: 0; height: 100vh; z-index: 20;
  display: flex; flex-direction: column; padding: 20px 12px;
  background: var(--vidro); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid var(--linha);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 22px; }
.brand-name { font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: 13px; }
.orb { width: 22px; height: 22px; border-radius: 50%; flex: none; background: var(--gradiente);
  box-shadow: 0 0 18px color-mix(in srgb, var(--acento-2) 45%, transparent); animation: respira 4s ease-in-out infinite; }
@keyframes respira { 50% { box-shadow: 0 0 6px color-mix(in srgb, var(--acento-2) 25%, transparent); } }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.nav-list a, .nav-list button {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 12px;
  border: 0; border-radius: var(--r-controle); background: none; color: var(--texto-2); text-decoration: none; cursor: pointer;
  transition: background-color .18s var(--curva), color .18s var(--curva), transform .16s var(--curva);
}
.nav-list a:hover, .nav-list button:hover { background: var(--superficie-2); color: var(--texto); }
.nav-list a[aria-current="page"], .nav-list button[aria-current="page"] { background: var(--superficie-2); color: var(--texto); }
.nav-list a[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--gradiente); }
.nav-list a[aria-current="page"] .ic { color: var(--acento); }
.badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; border: 1px solid var(--atencao); color: var(--atencao);
  font-size: 12px; font-weight: 600; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.nav-foot { margin-top: auto; padding: 0 12px; font-size: 13px; }
.nav-foot a { color: var(--texto-2); }
.so-movel { display: none !important; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; padding: 14px 28px;
  background: var(--vidro); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--linha);
}
.top h1 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.top h1:focus { outline: none; } /* foco programático: só para o leitor de tela anunciar a seção */
.acesso { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--texto-2);
  padding: 4px 12px; border: 1px solid var(--linha); border-radius: 999px; white-space: nowrap; }
main { padding: 24px 28px 48px; max-width: 1180px; width: 100%; }
.h2 { display: flex; align-items: baseline; gap: 12px; font-size: 15px; font-weight: 600; margin: 28px 0 12px; }
.h2:first-child { margin-top: 0; }
.h2-link { margin-left: auto; font-size: 13px; font-weight: 500; text-decoration: none; }
.h2-link:hover { text-decoration: underline; }

/* ---------- blocos ---------- */
.grid { display: grid; gap: 16px; }
.cards { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.tiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.inicio { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.redes { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; gap: 24px; }
.card, .tile { background: var(--superficie); border: 1px solid var(--linha); border-radius: var(--r-cartao); padding: 18px; min-width: 0; box-shadow: var(--sombra); }
.card h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.card-cab { display: flex; align-items: center; gap: 10px; }
.card-cab h3 { margin: 0; }
.card-cab .fim { margin-left: auto; }
.rot { font-size: 13px; color: var(--texto-3); }
.tile .val, .grande { font-size: 24px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; line-height: 1.2; }
.tile .val small, .grande small { font-size: 13px; color: var(--texto-2); font-weight: 400; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; margin: 12px 0 0; font-size: 14px; }
.kv dt { color: var(--texto-3); }
.kv dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.aviso { display: flex; gap: 10px; align-items: flex-start; border: 1px solid color-mix(in srgb, var(--atencao) 45%, transparent); border-radius: var(--r-controle);
  padding: 10px 14px; margin: 0 0 16px; font-size: 14px; color: var(--texto-2); }
.aviso .dot { margin-top: 6px; }
.card .aviso { margin: 12px 0 0; }
.erro-card { border: 1px solid color-mix(in srgb, var(--falha) 50%, transparent); border-radius: var(--r-cartao); padding: 14px 16px; margin: 0 0 12px; font-size: 14px; color: var(--texto-2); }
.erro-card strong { color: var(--falha); font-weight: 600; }
.vazio { color: var(--texto-2); padding: 20px 16px; border: 1px dashed var(--linha); border-radius: var(--r-cartao); text-align: center; margin: 0; }
.calmo { max-width: 560px; }
.calmo p { margin: 6px 0 0; }
.calmo .fraco { margin-top: 10px; }
.calmo code, .fora code { font-family: var(--mono); font-size: 13px; padding: 1px 6px; border-radius: 6px; background: var(--superficie-2); }

.dot { position: relative; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--texto-3); flex: none; }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--atencao); } .dot.bad { background: var(--falha); }
.dot.vivo::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: pulso 2s var(--curva) infinite; }
@keyframes pulso { 0% { transform: scale(1); opacity: .7; } 70%, 100% { transform: scale(3); opacity: 0; } }
.st { font-weight: 600; } .st.ok { color: var(--ok); } .st.warn { color: var(--atencao); } .st.bad { color: var(--falha); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--linha); color: var(--texto-2); white-space: nowrap; }
.pill.ok { color: var(--ok); border-color: currentColor; } .pill.warn { color: var(--atencao); border-color: currentColor; } .pill.bad { color: var(--falha); border-color: currentColor; }
.pill.vivo { color: var(--texto); border-color: transparent; background: linear-gradient(var(--superficie), var(--superficie)) padding-box, var(--gradiente) border-box; border: 1px solid transparent; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border-radius: var(--r-controle); border: 1px solid var(--linha); background: var(--superficie-2); cursor: pointer; white-space: nowrap;
  text-decoration: none; color: var(--texto); font-weight: 500;
  transition: border-color .18s var(--curva), background-color .18s var(--curva), transform .16s var(--curva), box-shadow .18s var(--curva);
}
.btn:hover:not(:disabled) { border-color: color-mix(in srgb, var(--acento) 60%, transparent); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--acento); border-color: var(--acento); color: var(--sobre-acento); font-weight: 600; }
.btn.primary:hover:not(:disabled) { box-shadow: 0 0 0 4px color-mix(in srgb, var(--acento) 20%, transparent); }
.btn.ghost { background: transparent; }
.btn.perigo { color: var(--falha); }
.btn.largo { width: 100%; }
.btn .ic { width: 18px; height: 18px; }
.btn:active:not(:disabled), .chip:active, .nav-list a:active, .nav-list button:active, .item-link:active { transform: scale(.98); }
.acoes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* esqueleto: reserva o espaço para nada pular quando os dados chegam */
.sk { border-radius: var(--r-cartao); background: linear-gradient(100deg, var(--superficie) 30%, var(--superficie-2) 50%, var(--superficie) 70%);
  background-size: 220% 100%; animation: brilho 1.4s linear infinite; margin-bottom: 12px; border: 1px solid var(--linha); }
.sk-card { height: 156px; } .sk-tile { height: 88px; margin: 0; } .sk-row { height: 60px; } .sk-tall { height: 320px; }
.grid > .sk { margin: 0; }
@keyframes brilho { from { background-position: 120% 0; } to { background-position: -120% 0; } }

/* ---------- movimento ---------- */
.sec.entrando { animation: sec-entra .24s var(--curva) both; }
@keyframes sec-entra { from { opacity: 0; transform: translateY(12px); } }
.anima { animation: entra .22s var(--curva) both; animation-delay: calc(var(--i, 0) * 30ms); }
@keyframes entra { from { opacity: 0; transform: translateY(6px); } }
@keyframes esmaece { from { opacity: 0; } }

/* ---------- anéis ---------- */
.ring { width: 56px; height: 56px; flex: none; }
.ring.g { width: 84px; height: 84px; }
.ring circle { fill: none; stroke-width: 5; }
.ring .trilho { stroke: var(--linha); }
.ring .arco { stroke-linecap: round; }
.anima .ring .arco, .ring.anima .arco { animation: desenha .4s var(--curva) both; animation-delay: calc(var(--i, 0) * 30ms + 60ms); }
@keyframes desenha { from { stroke-dashoffset: var(--c); } }
.ring .arco.ok { stroke: var(--ok); } .ring .arco.warn { stroke: var(--atencao); } .ring .arco.bad { stroke: var(--falha); } .ring .arco.na { stroke: var(--texto-3); }
.ring text { fill: var(--texto); font-size: 14px; font-weight: 600; text-anchor: middle; dominant-baseline: central; font-variant-numeric: tabular-nums; }

/* ---------- início ---------- */
.estado { display: flex; gap: 14px; align-items: center; margin-top: 12px; }
.estado .grande { margin-top: 2px; }
.linha-mini { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 12px; font-size: 13px; color: var(--texto-2); }
.linha-mini b { color: var(--texto); font-weight: 600; font-variant-numeric: tabular-nums; }
.card a.mais { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; font-size: 13px; text-decoration: none; }
.card a.mais .ic { width: 16px; height: 16px; }

/* ---------- listas e linha do tempo ---------- */
.lista { list-style: none; margin: 0; padding: 0; border: 1px solid var(--linha); border-radius: var(--r-cartao); background: var(--superficie); overflow: hidden; }
.lista > li { padding: 12px 16px; border-top: 1px solid var(--linha); display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; min-width: 0; }
.lista > li:first-child { border-top: 0; }
.lista .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.fez { list-style: none; margin: 0; padding: 0; position: relative; }
.fez > li { position: relative; padding: 0 0 18px 26px; min-width: 0; }
.fez > li::before { content: ""; position: absolute; left: 7px; top: 14px; bottom: 0; width: 1px; background: var(--linha); }
.fez > li:last-child::before { display: none; }
.fez .marco { position: absolute; left: 3px; top: 6px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--texto-3); background: var(--fundo); }
.fez .marco.ok { border-color: var(--ok); } .fez .marco.warn { border-color: var(--atencao); } .fez .marco.bad { border-color: var(--falha); } .fez .marco.acento { border-color: var(--acento); }
.fez .t { font-weight: 600; overflow-wrap: anywhere; }
.fez .por { color: var(--texto-2); font-size: 14px; margin-top: 2px; overflow-wrap: anywhere; }
.fez .meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 6px; font-size: 12px; color: var(--texto-3); }
.trace { border: 1px solid var(--linha); border-radius: var(--r-cartao); background: var(--superficie); margin-bottom: 8px; }
.trace summary { list-style: none; cursor: pointer; padding: 14px 16px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline; min-height: 44px; border-radius: var(--r-cartao); }
.trace summary:hover { background: color-mix(in srgb, var(--superficie-2) 60%, transparent); }
.trace summary::-webkit-details-marker { display: none; }
.trace summary .dot { align-self: center; }
.trace summary .t { font-weight: 600; overflow-wrap: anywhere; }
.trace summary .quando { font-size: 12px; color: var(--texto-3); white-space: nowrap; }
.trace summary .por { grid-column: 2 / 4; color: var(--texto-2); font-size: 14px; overflow-wrap: anywhere; }
.trace summary .tags { grid-column: 2 / 4; display: flex; gap: 6px; flex-wrap: wrap; }
.trace .corpo { padding: 0 16px 14px 36px; font-size: 14px; }
.trace .corpo .kv { margin-top: 0; }
.trace[open] summary .t { color: var(--acento); }
.conf { height: 6px; border-radius: 3px; background: var(--linha); overflow: hidden; max-width: 240px; margin-top: 6px; }
.conf > span { display: block; height: 100%; background: var(--gradiente); }

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--linha); background: var(--superficie);
  cursor: pointer; font-size: 13px; color: var(--texto-2); transition: border-color .18s var(--curva), color .18s var(--curva), transform .16s var(--curva); }
.chip:hover { color: var(--texto); }
.chip[aria-pressed="true"] { color: var(--texto); border-color: transparent; background: linear-gradient(var(--superficie-2), var(--superficie-2)) padding-box, var(--gradiente) border-box; border: 1px solid transparent; }
.chip .n { color: var(--texto-3); }

/* ---------- agentes ---------- */
.ag-topo { display: flex; gap: 14px; align-items: center; }
.ag-nome { min-width: 0; }
.ag-nome .sub { font-size: 13px; color: var(--texto-2); overflow-wrap: anywhere; }
.ag-nome .sub.linha { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 2px; }
.ag-acao { margin-top: 12px; font-size: 13px; color: var(--texto-2); overflow-wrap: anywhere; }

/* ---------- eficiência ---------- */
.tabela-wrap { overflow-x: auto; border: 1px solid var(--linha); border-radius: var(--r-cartao); background: var(--superficie); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px; border-top: 1px solid var(--linha); vertical-align: top; }
thead th { border-top: 0; font-size: 12px; color: var(--texto-3); font-weight: 500; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.barra { height: 6px; min-width: 60px; border-radius: 3px; background: var(--linha); overflow: hidden; margin-top: 6px; }
.barra > span { display: block; height: 100%; transform-origin: left; }
.anima .barra > span { animation: cresce-x .4s var(--curva) both; }
@keyframes cresce-x { from { transform: scaleX(0); } }
.barra .ok { background: var(--ok); } .barra .warn { background: var(--atencao); } .barra .bad { background: var(--falha); }
.resumo { margin: 0 0 14px; font-size: 14px; color: var(--texto-2); }

/* ---------- olho ---------- */
.olho { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.olho-video { position: relative; background: #000; border-radius: var(--r-cartao); overflow: hidden; aspect-ratio: 4 / 3; border: 1px solid var(--linha); }
.olho-video::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acento-2) 25%, transparent); opacity: 0; transition: opacity .26s var(--curva); }
.olho-video.vivo::after { opacity: 1; }
.olho-video img { width: 100%; height: 100%; object-fit: contain; display: block; transition: filter .26s var(--curva); }
.olho-video .sem { position: absolute; inset: 0; display: grid; place-items: center; color: #A9B4C4; font-size: 14px; text-align: center; padding: 16px; }
.olho-video .selo { position: absolute; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 999px;
  background: rgba(7, 9, 13, .62); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); color: #E7ECF3; font-size: 12px; font-variant-numeric: tabular-nums; }
.olho-video.velho img { filter: grayscale(1) brightness(.55); }
.olho-lado { display: grid; gap: 16px; min-width: 0; }
.campo { display: grid; gap: 6px; margin-top: 14px; }
.campo label { font-size: 13px; color: var(--texto-2); display: flex; justify-content: space-between; gap: 8px; }
.campo output { color: var(--texto); font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; min-height: 44px; accent-color: var(--acento); margin: 0; }
select, input[type=password], input[type=text] { width: 100%; min-height: 44px; padding: 0 12px; border-radius: var(--r-controle); border: 1px solid var(--linha); background: var(--superficie-2); }
.cmd-res { margin-top: 12px; min-height: 22px; font-size: 14px; color: var(--texto-2); overflow-wrap: anywhere; }
p.cmd-res:empty { display: none; } /* aviso solto no topo de uma seção: só ocupa espaço quando há texto */
.foto-prev:not(:empty) { margin-top: 12px; }
.foto-prev img { max-width: 100%; border-radius: var(--r-controle); display: block; }
.eventos { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.evento { background: var(--superficie); border: 1px solid var(--linha); border-radius: var(--r-cartao); overflow: hidden; min-width: 0; }
.evento .thumb { aspect-ratio: 4 / 3; background: var(--superficie-2); display: grid; place-items: center; color: var(--texto-3); font-size: 12px; }
.evento .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; animation: esmaece .26s var(--curva) both; }
.evento .info { padding: 10px 12px 12px; font-size: 13px; }
.evento .info .cab { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.evento .info p { margin: 6px 0 0; overflow-wrap: anywhere; }
.evento.alerta { border-color: color-mix(in srgb, var(--atencao) 55%, transparent); }

/* ---------- redes ---------- */
.rede-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; }
.rede-item .nome { font-weight: 600; overflow-wrap: anywhere; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rede-item .det { grid-column: 2 / 4; font-size: 13px; color: var(--texto-3); font-variant-numeric: tabular-nums; }
.rede-item .ic { width: 16px; height: 16px; color: var(--texto-3); }
.lista > li.atual { background: color-mix(in srgb, var(--acento) 7%, transparent); box-shadow: inset 3px 0 0 var(--acento); }
.lista > li.escolhivel { padding: 0; }
.item-link { display: block; width: 100%; padding: 12px 16px; border: 0; background: none; text-align: left; cursor: pointer; border-radius: 0; transition: background-color .18s var(--curva), transform .16s var(--curva); }
.item-link:hover { background: color-mix(in srgb, var(--superficie-2) 70%, transparent); }
.item-link[aria-pressed="true"] { background: color-mix(in srgb, var(--acento) 10%, transparent); }
.sinal { display: inline-flex; align-items: flex-end; gap: 2px; height: 16px; width: 22px; flex: none; }
.sinal i { display: block; width: 4px; border-radius: 1px; background: var(--linha); transform-origin: bottom; }
.sinal i:nth-child(1) { height: 25%; } .sinal i:nth-child(2) { height: 50%; } .sinal i:nth-child(3) { height: 75%; } .sinal i:nth-child(4) { height: 100%; }
.sinal.n4 i, .sinal.n3 i:nth-child(-n+3) { background: var(--ok); }
.sinal.n2 i:nth-child(-n+2) { background: var(--atencao); }
.sinal.n1 i:nth-child(1) { background: var(--falha); }
.anima .sinal i { animation: cresce-y .26s var(--curva) both; }
.anima .sinal i:nth-child(2) { animation-delay: 40ms; } .anima .sinal i:nth-child(3) { animation-delay: 80ms; } .anima .sinal i:nth-child(4) { animation-delay: 120ms; }
@keyframes cresce-y { from { transform: scaleY(0); } }
.ble-estado { display: flex; gap: 10px; align-items: center; margin-top: 12px; font-size: 14px; }
.ble-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--linha); }
.ble-form .campo { margin-top: 0; }
.barra-viva { height: 2px; border-radius: 2px; margin-top: 12px; background: var(--linha); overflow: hidden; }
.barra-viva > span { display: block; height: 100%; width: 40%; background: var(--gradiente); animation: corre 1.2s var(--curva) infinite; }
@keyframes corre { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* ---------- diálogos ---------- */
dialog { border: 1px solid var(--linha); border-radius: var(--r-cartao); background: var(--superficie); color: var(--texto); padding: 20px; width: min(440px, calc(100vw - 32px)); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
dialog[open] { animation: entra .22s var(--curva) both; }
dialog::backdrop { background: rgba(3, 5, 8, .55); backdrop-filter: blur(4px); }
dialog h2 { margin: 0 0 8px; font-size: 18px; }
.dlg-acoes { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.folha { margin: auto auto 0; width: 100%; max-width: 520px; border-radius: 20px 20px 0 0; border-bottom: 0; padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); background: var(--superficie); }
.folha[open] { animation: folha-sobe .26s var(--curva) both; }
@keyframes folha-sobe { from { transform: translateY(24px); opacity: 0; } }
.mais-lista { list-style: none; margin: 0 0 8px; padding: 0; }
.mais-lista a { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 0 14px; border-radius: var(--r-controle); color: var(--texto); text-decoration: none; }
.mais-lista a:hover, .mais-lista a[aria-current="page"] { background: var(--superficie-2); }
.mais-lista .ic { color: var(--texto-2); }

/* ---------- telefone ---------- */
@media (max-width: 960px) {
  .olho, .redes { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .so-movel { display: revert !important; }
  .top .orb.so-movel { display: block !important; width: 18px; height: 18px; }
  .nav { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; padding: 0 4px env(safe-area-inset-bottom); border-right: 0; border-top: 1px solid var(--linha); }
  .brand, .nav-foot, .nav-list .sec2 { display: none; }
  .nav-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; }
  .nav-list a, .nav-list button { flex-direction: column; justify-content: center; gap: 3px; min-height: 60px; padding: 6px 0; border-radius: var(--r-controle); font-size: 11px; }
  .nav-list a:hover, .nav-list button:hover, .nav-list a[aria-current="page"], .nav-list button[aria-current="page"] { background: none; }
  .nav-list a[aria-current="page"], .nav-list button[aria-current="page"] { color: var(--texto); }
  .nav-list a[aria-current="page"]::before { left: 30%; right: 30%; top: 0; bottom: auto; width: auto; height: 2px; }
  .nav-list button[aria-current="page"] .ic { color: var(--acento); }
  .nav-list .badge { position: absolute; top: 6px; left: calc(50% + 6px); margin: 0; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; background: var(--superficie); }
  .top { padding: 12px 16px; }
  .top h1 { font-size: 18px; }
  main { padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards, .inicio { grid-template-columns: minmax(0, 1fr); }
  .eventos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .opc { display: none; }
  th, td { padding: 10px 8px; }
  .barra { min-width: 40px; }
  .trace .corpo { padding-left: 16px; }
  .kv { grid-template-columns: minmax(0, auto) minmax(0, 1fr); }
}
@media (max-width: 380px) {
  .acesso { padding: 4px 10px; }
  .acesso .rot-longo { display: none; }
  .eventos { grid-template-columns: minmax(0, 1fr); }
}

/* Remover animações (sistema): nada se desloca, só esmaece; nada pulsa nem brilha em laço. */
@media (prefers-reduced-motion: reduce) {
  .sec.entrando, .anima, dialog[open], .folha[open] { animation: esmaece .2s linear both; animation-delay: 0s; }
  .anima .ring .arco, .ring.anima .arco, .anima .sinal i, .anima .barra > span { animation: none; }
  .sk, .orb, .dot.vivo::after, .barra-viva > span { animation: none; }
  .dot.vivo::after { display: none; }
  .barra-viva > span { width: 100%; opacity: .6; }
  .btn:active:not(:disabled), .chip:active, .nav-list a:active, .nav-list button:active, .item-link:active { transform: none; }
  * { transition-property: opacity, color, background-color, border-color !important; }
}
