﻿/* ═══════════════════════════════════════════════════════════════
   WACORE API · design system do painel
   Dark sofisticado, verde-esmeralda calibrado, glass sutil,
   micro-interações curtas e layout 100% responsivo.
   Produto: WACore API · Engenharia: Hunter Coder
   ═══════════════════════════════════════════════════════════════ */
:root {
  /* paleta — identidade visual WACore API */
  --bg: #04060a;
  --bg-soft: #080c12;
  --surface: #0b1017;
  --surface-2: #10161f;
  --surface-3: #16202b;
  --line: rgba(255, 255, 255, .08);
  --line-soft: rgba(255, 255, 255, .065);
  --text: #e9eef5;
  --text-2: #aab5c4;
  --text-3: #7c8aa0;
  --muted: #8695a9;

  --brand: #00e58f;
  --brand-2: #5cf5bd;
  --brand-3: #00a86b;
  --brand-ink: #04231a;
  --brand-glow: rgba(0, 229, 143, .18);
  --brand-cyan: #00c2ff;
  --grad: linear-gradient(135deg, #00e58f 0%, #00c2ff 100%);
  --grad-ai: linear-gradient(135deg, #8f6bff 0%, #4f8bff 55%, #00c2ff 100%);
  --grad-wa: linear-gradient(150deg, #25d366 0%, #128c7e 100%);
  --glow: 0 0 0 1px rgba(0, 229, 143, .35), 0 8px 30px -6px rgba(0, 229, 143, .35);

  --blue: #3ba7ff;
  --violet: #7c5cff;
  --amber: #ffb547;
  --red: #ff5c7a;
  --pink: #f472b6;

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 18px;
  --r-xl: 22px;

  --sh-1: 0 1px 2px rgba(0,0,0,.5);
  --sh-2: 0 10px 30px -14px rgba(0,0,0,.8);
  --sh-3: 0 24px 60px -20px rgba(0,0,0,.85);
  --ring: 0 0 0 3px rgba(0,229,143,.28);

  --sidebar-w: 254px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Sora', 'Inter', 'Segoe UI', sans-serif;
  --wordmark: 'Space Grotesk', 'Sora', 'Inter', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace;
  --t: 160ms cubic-bezier(.4,0,.2,1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
/* o fundo também no <html>: garante cor sólida em forced-colors, impressão e
   em qualquer leitura que não componha o gradiente do <body> */
html { background-color: var(--bg); }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text);
  background:
    radial-gradient(1100px 620px at 12% -8%, rgba(0,229,143,.10), transparent 60%),
    radial-gradient(900px 600px at 92% 4%, rgba(0,194,255,.10), transparent 62%),
    radial-gradient(700px 520px at 60% 112%, rgba(124,92,255,.08), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 650; letter-spacing: -.015em; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
p { margin: 0; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 10px; }
[hidden] { display: none !important; }

/* ───────── login: palco em duas colunas (marca + acesso) ───────── */
.login-wrap {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: clamp(14px, 3.4vw, 44px);
}
.login-grid {
  width: min(1060px, 100%);
  display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  border-radius: 26px;
  /* borda um pouco mais clara: separa o card do fundo mesmo onde o hero escurece */
  border: 1px solid rgba(255,255,255,.13);
  background: linear-gradient(180deg, rgba(17,26,37,.9), rgba(8,12,18,.96));
  box-shadow: var(--sh-3), 0 0 0 1px rgba(0,229,143,.05), inset 0 1px 0 rgba(255,255,255,.055);
  overflow: hidden;
  animation: rise .46s cubic-bezier(.2,.8,.2,1);
}
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.99); } }

.login-hero {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; gap: clamp(18px, 2.4vw, 26px);
  padding: clamp(26px, 3.4vw, 44px);
  background-color: #060c13;
  background-image:
    radial-gradient(115% 90% at 4% -6%, rgba(0,229,143,.20), transparent 58%),
    radial-gradient(120% 95% at 104% 106%, rgba(0,194,255,.16), transparent 58%),
    linear-gradient(158deg, #08141b 0%, #060c13 52%, #04080d 100%);
  border-right: 1px solid rgba(255,255,255,.08);
}
/* grade técnica sutil por cima do gradiente */
.login-hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(120% 90% at 20% 10%, #000 20%, transparent 78%);
  mask-image: radial-gradient(120% 90% at 20% 10%, #000 20%, transparent 78%);
  opacity: .55; pointer-events: none;
}
/* halo orbital decorativo no canto */
.lh-orbit {
  position: absolute; z-index: -1; width: 460px; height: 460px; right: -190px; bottom: -230px;
  border-radius: 50%;
  border: 1px solid rgba(0,229,143,.20);
  box-shadow: 0 0 120px 40px rgba(0,229,143,.07) inset;
  pointer-events: none;
}
.lh-orbit::after {
  content: ''; position: absolute; inset: 58px; border-radius: 50%;
  border: 1px dashed rgba(0,194,255,.16);
}

.lh-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lh-mark {
  width: 58px; height: 58px; flex: 0 0 58px; border-radius: 17px; overflow: hidden;
  border: 1px solid rgba(0,229,143,.30);
  box-shadow: 0 18px 40px -22px rgba(0,229,143,.95), inset 0 1px 0 rgba(255,255,255,.08);
}
.lh-mark img { width: 100%; height: 100%; display: block; }
.lh-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 650; letter-spacing: .075em; text-transform: uppercase;
  color: #b6f7dd; background: rgba(0,229,143,.09);
  border: 1px solid rgba(0,229,143,.24);
}
.lh-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px rgba(0,229,143,.16); animation: pulse 2.6s infinite; }

/* miolo realmente centrado no eixo vertical entre a marca (topo) e a assinatura (rodapé) */
.lh-main { display: grid; gap: 22px; align-content: center; margin-top: auto; margin-bottom: auto; }
/* o miolo fica centralizado no eixo vertical entre o topo e o rodapé do hero: equilibra as duas colunas */
/* o lead é o texto de venda da marca: 15px e #d7e2ee para não sumir no fundo escuro */
.lh-lead { color: #e3ecf6; font-size: 15px; line-height: 1.66; max-width: 44ch; letter-spacing: -.005em; }
.lh-feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 13px; }
.lh-feats li {
  display: flex; align-items: center; gap: 12px;
  font-size: 13.5px; line-height: 1.45; color: #b8c6d6;
}
.lh-feats svg {
  width: 15px; height: 15px; flex: 0 0 15px; padding: 5px; box-sizing: content-box;
  border-radius: 9px; color: var(--brand-2);
  background: rgba(0,229,143,.09); border: 1px solid rgba(0,229,143,.18);
}
.lh-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 0; padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.07);
  font-size: 12px; line-height: 1.6; color: #93a3b8;
}
.lh-ver { font-family: var(--mono); font-size: 12.5px; letter-spacing: .04em; color: #b8c8da; }
.lh-ver[hidden] { display: none; }
.lh-by { display: inline-flex; align-items: center; gap: 8px; color: #b9c8d9; line-height: 1.6; }
/* assinatura do engenheiro: nome em display, peso forte, brilho curto na cor da marca */
.lh-by b { color: #f0fbf6; font-family: var(--display); font-weight: 700; font-size: 1.16em; letter-spacing: -.012em; text-shadow: 0 0 22px rgba(0,229,143,.30); }
.lh-by .hc-glyph, .hc-glyph {
  display: inline-grid; place-items: center;
  font-family: var(--mono); font-size: 12px; font-weight: 700; line-height: 1;
  padding: 3px 5px; border-radius: 6px;
  color: #7ef2c8; background: #0d2118;
  border: 1px solid rgba(0,229,143,.22);
}

/* cartão de acesso (coluna direita) */
.login-card {
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(26px, 3.4vw, 44px);
  /* background-color por baixo do gradiente: evita flash branco no 1º paint */
  background-color: #0a0f16;
  background-image: linear-gradient(180deg, rgba(13,20,28,.94), rgba(9,13,19,.99));
}
.login-card-head { display: flex; align-items: center; gap: 15px; margin-bottom: 28px; }
.login-card-mark {
  width: 46px; height: 46px; flex: 0 0 46px; border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(0,229,143,.26);
  box-shadow: 0 12px 28px -18px rgba(0,229,143,.95), inset 0 1px 0 rgba(255,255,255,.06);
}
.login-card-mark img { width: 100%; height: 100%; display: block; }
.login-kicker {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: .15em; text-transform: uppercase; color: #b6d2c9; line-height: 1.2;
  margin-top: 7px;
}
.login-title { font-size: clamp(24px, 2.5vw, 30px); line-height: 1.12; letter-spacing: -.032em; margin: 0 0 10px; }
.login-sub { color: #c6d3e2; font-size: 14px; line-height: 1.64; margin: 0 0 26px; max-width: 40ch; }
#login-version-wrap { display: block; margin-top: 6px; color: #a8bacd; font-size: 12px; letter-spacing: .02em; }
#login-version-wrap[hidden] { display: none; }
.login-foot {
  margin: 24px 0 0; padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.075);
  color: #c2d1e0; font-size: 12.5px; line-height: 1.65; letter-spacing: .01em;
}
.login-foot b { color: #d7e3f1; font-weight: 600; }
#login-form .field { margin-bottom: 18px; }
#login-form .btn-block { margin-top: 2px; }
/* erro de login tem de SALTAR aos olhos: cinza de dica não avisa nada. */
.login-card #login-error:not(:empty) { color: var(--red); font-weight: 500; }
.login-card #login-error:not(:empty)::before { content: '⚠ '; }

/* ── wordmark do sistema (o nome, na fonte de display) ── */
.wordmark {
  display: inline-flex; align-items: center; gap: .34em;
  font-family: 'Space Grotesk', var(--display);
  font-weight: 700; letter-spacing: -.042em; line-height: 1;
  color: #f4faf7;
  text-shadow: 0 1px 0 rgba(0,0,0,.35);
}
/* selo API: mono, caixa alta e centralizado óptico com o nome (não com a baseline) */
.wm-api {
  font-family: var(--mono); font-style: normal;
  /* max(): o selo nunca fica menor que 12px, mesmo no wordmark pequeno */
  font-size: max(.38em, 12px); font-weight: 600; letter-spacing: .18em;
  color: #93ffda; text-transform: uppercase; line-height: 1;
  padding: .40em .56em .34em; border-radius: 8px;
  background: rgba(0,229,143,.16); border: 1px solid rgba(0,229,143,.36);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.wordmark--xl { font-size: clamp(36px, 5vw, 54px); }
.wordmark--sm { font-size: 20px; letter-spacing: -.038em; gap: .30em; }
.wordmark--sm .wm-api { font-size: 12px; padding: .26em .5em; letter-spacing: .12em; color: #c2ffec; background: rgba(0,229,143,.22); border-color: rgba(0,229,143,.44); }

/* ── marca na barra lateral ── */
.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 16px 16px; position: relative;
}
.brand-mark {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px;
  display: grid; place-items: center; overflow: hidden;
  background: #04100b;
  border: 1px solid rgba(0,229,143,.26);
  box-shadow: 0 10px 24px -14px rgba(0,229,143,.7), inset 0 1px 0 rgba(255,255,255,.06);
  transition: transform .2s ease, box-shadow .2s ease;
}
.brand-mark:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -14px rgba(0,229,143,.85); }
.brand-mark img, .brand-mark svg { width: 100%; height: 100%; display: block; object-fit: contain; }
.brand-txt { display: grid; gap: 3px; line-height: 1.15; min-width: 0; }
.brand-by {
  font-size: 12px; color: #93a6bb; letter-spacing: .01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-by b { color: #8ef0cc; font-weight: 600; letter-spacing: .005em; }


.field { display: grid; gap: 7px; margin-bottom: 14px; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--text); letter-spacing: .01em; }
input, select, textarea {
  width: 100%; padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text); font: inherit; font-size: 13.5px;
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}
input::placeholder, textarea::placeholder { color: #5b6a7d; }
input:hover, select:hover, textarea:hover { border-color: #2c3d54; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: var(--ring); background: var(--surface-3);
}
textarea { min-height: 84px; resize: vertical; font-family: var(--mono); font-size: 12.5px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 51%, calc(100% - 11px) 51%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
label.check { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); cursor: pointer; user-select: none; min-height: 40px; padding: 2px 0; }
label.check input { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; }
/* toggle em forma de cartão (higienização / ajustes avançados) */
label.check { padding: 11px 13px; border: 1px solid var(--line-soft); border-radius: var(--r-sm); background: rgba(255,255,255,.012); transition: border-color var(--t), background var(--t); }
label.check:hover { border-color: rgba(148,163,184,.3); background: rgba(255,255,255,.03); }
label.check:has(input:checked) { border-color: rgba(0,229,143,.34); background: rgba(0,229,143,.055); }
label.check input:checked + span { color: var(--text); font-weight: 550; }
/* utilidades */
.ta-r { text-align: right; }
.ta-c { text-align: center; }

/* ───────── botões ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 15px; border-radius: var(--r-sm);
  border: 1px solid rgba(148,163,184,.26);
  background: var(--surface-2); color: var(--text);
  font: inherit; font-size: 13.5px; font-weight: 550;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
  cursor: pointer; white-space: nowrap;
  transition: transform var(--t), background var(--t), border-color var(--t), box-shadow var(--t), color var(--t);
}
.btn:hover { background: var(--surface-3); border-color: #2e405a; transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.985); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary {
  background: var(--grad);
  border-color: transparent; color: var(--brand-ink); font-weight: 700;
  box-shadow: 0 10px 26px -12px rgba(0,229,143,.75);
}
.btn-primary:hover { background: linear-gradient(150deg, #5cf5bd, var(--brand-cyan)); box-shadow: 0 12px 26px -10px var(--brand); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: rgba(255,255,255,.055); color: var(--text); border-color: transparent; }
.btn-danger { color: #fecaca; border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.10); }
.btn-danger:hover { background: rgba(239,68,68,.18); border-color: rgba(239,68,68,.55); }
.btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: 7px; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ───────── shell ───────── */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(16,23,34,.9), rgba(9,13,19,.96));
  border-right: 1px solid var(--line-soft);
  backdrop-filter: blur(12px);
  z-index: 20;
}
.nav { display: grid; gap: 2px; padding: 6px 10px; overflow-y: auto; flex: 1; align-content: start; }
.nav-group {
  margin: 14px 0 5px; padding: 0 11px;
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-3, #64748b); opacity: .85;
}
.nav-group:first-child { margin-top: 4px; }
.nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: var(--r-sm);
  color: var(--text-2); font-size: 13.5px; font-weight: 500;
  text-decoration: none; position: relative;
  transition: background var(--t), color var(--t), transform var(--t);
}
.nav a .ico {
  width: 17px; height: 17px; flex: 0 0 17px;
  opacity: .68; color: currentColor;
  transition: opacity var(--t), color var(--t), transform var(--t);
}
.nav a:hover { background: rgba(255,255,255,.045); color: var(--text); text-decoration: none; }
.nav a:hover .ico { opacity: .95; transform: translateX(1px); }
.nav a.active {
  background-color: #16223a;
  color: #d7fbec;
  box-shadow: inset 0 0 0 1px rgba(0,229,143,.10), inset 0 0 34px rgba(0,229,143,.13);
}
.nav a.active::before {
  content: ''; position: absolute; left: 0; top: 22%; bottom: 22%;
  width: 3px; border-radius: 3px;
  background: var(--brand); box-shadow: 0 0 12px var(--brand);
}
.nav a.active .ico { opacity: 1; color: var(--brand-2); }
.nav a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ───────── rodapé da barra lateral ───────── */
.sidebar-foot { padding: 12px; display: grid; gap: 9px; border-top: 1px solid var(--line-soft); }
.side-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.side-stat {
  display: grid; gap: 1px; padding: 8px 10px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--line);
}
.side-stat .n { font-size: 15px; font-weight: 650; color: var(--text); line-height: 1.1; font-variant-numeric: tabular-nums; }
.side-stat .l { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3, #7c8aa0); }
.side-stat.ok .n { color: var(--brand-2); }
.sidebar-foot .btn-block { justify-content: center; }
.side-version {
  text-align: center; font-size: 12px; letter-spacing: .04em;
  color: var(--text-3, #7c8aa0); font-variant-numeric: tabular-nums;
  padding: 2px 0 0; opacity: .85;
}

/* ───────── botões só-ícone e spinner ───────── */
.btn-icon { padding: 7px; line-height: 1; }
.btn-icon .ico { width: 16px; height: 16px; display: block; }
.btn .ico { width: 15px; height: 15px; flex: 0 0 auto; }
.btn { display: inline-flex; align-items: center; gap: 7px; }
.btn.spin .ico { animation: spin .7s linear; }
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

.pill {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 11px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 12px; color: var(--text-2);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 3px rgba(245,158,11,.15); }
.pill.ok .dot { background: var(--brand); box-shadow: 0 0 0 3px rgba(0,229,143,.18); animation: pulse 2.4s infinite; }
.pill.bad .dot { background: var(--red); box-shadow: 0 0 0 3px rgba(239,68,68,.18); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 15;
  display: flex; align-items: center; gap: 16px;
  padding: 15px 26px;
  background: rgba(8,11,17,.78);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(14px);
}
.topbar-title { min-width: 0; }
.topbar-title h2 { font-size: 17px; line-height: 1.25; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.chip {
  padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 550;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2);
  white-space: nowrap;
}
.chip-ok { color: #b8f5d8; border-color: rgba(0,229,143,.38); background: rgba(0,229,143,.12); }
.chip-off { color: #fecaca; border-color: rgba(239,68,68,.32); background: rgba(239,68,68,.10); }
.view { padding: 22px 26px 60px; flex: 1; }

/* ───────── cards e grids ───────── */
.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.card {
  background: linear-gradient(180deg, rgba(21,31,44,.75), rgba(13,19,27,.85));
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--sh-2), inset 0 1px 0 rgba(255,255,255,.025);
  position: relative; overflow: hidden;
}
.card.pad-0 { padding: 0; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.card-head h3 { font-size: 14.5px; font-weight: 600; }
.card-head .spacer { margin-left: auto; }
.card-sub { color: var(--muted); font-size: 12.5px; }
.subhead { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--text-3); }
.subhead::after { content: ''; flex: 1; height: 1px; background: var(--line-soft); }

.stat { display: grid; gap: 6px; }
.stat .k { font-size: 12px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 600; }
.stat .v { font-size: 27px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.stat .d { font-size: 12px; color: var(--muted); }
.stat.accent .v { background: linear-gradient(120deg, var(--brand-2), #7dd3fc); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ───────── central de ações (visão geral) ───────── */
.card.act-bar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px 16px;
  background:
    radial-gradient(120% 220% at 0% 0%, rgba(34, 197, 148, .10), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, 0));
  border: 1px solid var(--line);
}
.card.act-bar .act-info { display: grid; gap: 3px; min-width: 220px; }
.card.act-bar .act-info strong { font-size: 13.5px; letter-spacing: -.01em; }
.card.act-bar .act-info .sub { font-size: 12px; color: var(--muted); }
.card.act-bar .btn-row { margin-left: auto; }
.card.act-bar .btn { white-space: nowrap; }
@media (max-width: 720px) {
  .card.act-bar .btn-row { margin-left: 0; width: 100%; }
  .card.act-bar .btn { flex: 1 1 auto; justify-content: center; }
}

/* ───────── tabelas ───────── */
.table-wrap { overflow-x: auto; border-radius: var(--r); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left; padding: 10px 12px;
  font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); font-weight: 650;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.015);
  white-space: nowrap;
}
td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tbody tr { transition: background var(--t); }
tbody tr:hover { background: rgba(255,255,255,.028); }
tbody tr:last-child td { border-bottom: none; }
td .title { font-weight: 600; }
td .sub { color: var(--muted); font-size: 12px; }
.empty { padding: 34px 18px; text-align: center; color: var(--muted); font-size: 13px; }
.empty strong { display: block; color: var(--text-2); margin-bottom: 6px; font-size: 14px; }
.empty-act { margin-top: 14px; }

/* ───────── tabela de proxies (pool) ───────── */
.pxs-sum { display: inline-flex; gap: 6px; align-items: center; margin-left: 8px; }
.pxs-sum b { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }
.pxs-sum b.ok { color: #7ef2c8; }
.pxs-table td { vertical-align: middle; }
.pxs-table tbody tr:hover { background: rgba(148,163,184,.06); }
.pxs-table th:last-child, .pxs-table td:last-child { padding-right: 14px; }
.px-name { font-weight: 650; color: var(--text); letter-spacing: .01em; font-size: 13.5px; white-space: nowrap; }
.px-meta {
  margin-top: 3px; font-family: var(--mono); font-size: 12px; letter-spacing: .02em;
  text-transform: uppercase; color: #b9c4d3;
}
.px-addr {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 9px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  font-family: var(--mono); font-size: 12px; color: #cfd9e6;
  white-space: nowrap; letter-spacing: .01em;
}
.px-addr b {
  padding: 1px 6px; border-radius: 5px;
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #7ef2c8; background: rgba(0,229,143,.10); border: 1px solid rgba(0,229,143,.22);
}
.px-addr i { font-style: normal; color: var(--muted); font-size: 12px; }
.px-lat {
  display: inline-block; font-family: var(--mono); font-size: 12px;
  font-variant-numeric: tabular-nums; font-weight: 600;
}
.px-lat.good { color: #86efc0; }
.px-lat.mid { color: #e9d39b; }
.px-lat.bad { color: #eda6a6; }
.px-lat.none { color: var(--muted); font-weight: 500; }
.px-who-list { display: inline-flex; align-items: center; gap: 5px; flex-wrap: nowrap; }
.px-who {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 6px;
  font-family: var(--mono); font-size: 12px;
  color: #dbe4f0; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
}
.px-who.more { color: var(--text-2); background: rgba(255,255,255,.04); }
.px-who.free {
  color: var(--muted); background: rgba(255,255,255,.03); border-color: rgba(255,255,255,.08);
}
.px-acts { text-align: right; white-space: nowrap; }
.px-acts .btn + .btn { margin-left: 6px; }


/* ───────── badges ───────── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 650; letter-spacing: .01em;
  border: 1px solid transparent; white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { color: #7ef2c8; background: rgba(0,229,143,.12); border-color: rgba(0,229,143,.3); }
.badge.warn { color: #fcd34d; background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.3); }
.badge.bad { color: #ffc4c4; background: rgba(239,68,68,.16); border-color: rgba(239,68,68,.42); }
.badge.idle { color: #b3c0d1; background: rgba(148,163,184,.14); border-color: rgba(148,163,184,.32); }
.badge.info { color: #93c5fd; background: rgba(59,130,246,.12); border-color: rgba(59,130,246,.3); }
.badge.plain { color: var(--text-2); background: var(--surface-2); border-color: var(--line); }
.badge.plain::before { display: none; }

/* ───────── barras ───────── */
.bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand-3), var(--brand-2)); transition: width .4s ease; }
.bar.warn > i { background: linear-gradient(90deg, #b45309, var(--amber)); }
.bar.bad > i { background: linear-gradient(90deg, #b91c1c, var(--red)); }

/* ───────── charts ───────── */
.spark { display: flex; align-items: flex-end; gap: 6px; height: 118px; padding-top: 8px; }
.spark .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 3px; height: 100%; position: relative; }
.spark .col i { display: block; border-radius: 4px 4px 2px 2px; min-height: 2px; transition: height .5s cubic-bezier(.2,.8,.2,1); }
.spark .col i.out { background: linear-gradient(180deg, var(--brand-2), rgba(0,229,143,.35)); }
.spark .col i.in { background: linear-gradient(180deg, #60a5fa, rgba(59,130,246,.3)); }
.spark .col span { font-size: 12px; color: var(--muted); text-align: center; margin-top: 4px; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 3px; margin-right: 5px; }

/* ───────── modal ───────── */
.modal {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(4,7,11,.72); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 22px;
  animation: fade .18s ease;
}
@keyframes fade { from { opacity: 0; } }
.modal-card {
  width: min(620px, 100%); max-height: 90vh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #141d29, #0e151e);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-3);
  animation: rise .24s cubic-bezier(.2,.8,.2,1);
}
.modal-head { display: flex; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line-soft); }
.modal-head h3 { font-size: 15px; }
.modal-head .btn { margin-left: auto; }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot { padding: 14px 18px; border-top: 1px solid var(--line-soft); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

/* ───────── toasts ───────── */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: grid; gap: 9px; }
.toast {
  min-width: 240px; max-width: 380px;
  padding: 11px 14px; border-radius: var(--r);
  background: var(--surface-2); border: 1px solid var(--line);
  box-shadow: var(--sh-2); font-size: 13px;
  animation: slidein .22s cubic-bezier(.2,.8,.2,1);
  border-left: 3px solid var(--brand);
}
.toast.err { border-left-color: var(--red); }
.toast.warn { border-left-color: var(--amber); }
@keyframes slidein { from { opacity: 0; transform: translateX(18px); } }

/* ───────── util ───────── */
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: grid; gap: 12px; }
.stack.tight { gap: 8px; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 14px; } .mt-4 { margin-top: 20px; }
.sep { height: 1px; background: var(--line-soft); margin: 14px 0; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-all; }
.secret-box {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 12px; border-radius: var(--r-sm);
  background: rgba(0,229,143,.07); border: 1px dashed rgba(0,229,143,.4);
  font-family: var(--mono); font-size: 12.5px; word-break: break-all;
}
.qr-box { display: grid; place-items: center; padding: 16px; background: #fff; border-radius: var(--r); overflow: hidden; }
.qr-box img { width: min(250px, 100%); height: auto; image-rendering: pixelated; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-soft); margin-bottom: 16px; overflow-x: auto; }
.tabs button {
  padding: 9px 14px; background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 550; cursor: pointer;
  transition: color var(--t), border-color var(--t); white-space: nowrap;
}
.tabs button:hover { color: var(--text-2); }
.tabs button.active { color: var(--brand-2); border-bottom-color: var(--brand); }
.chk-list { display: grid; gap: 9px; }
.chk {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 11px 13px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--line-soft);
}
.chk .mark { width: 19px; height: 19px; flex: 0 0 19px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; margin-top: 1px; }
.chk .body { min-width: 0; flex: 1 1 auto; }
.chk.ok .mark { background: rgba(0,229,143,.16); color: var(--brand-2); }
.chk.no .mark, .chk.bad .mark { background: rgba(239,68,68,.14); color: #fca5a5; }
.chk.warn .mark { background: rgba(245,158,11,.14); color: var(--amber); }
.chk.idle .mark { background: rgba(148,163,184,.14); color: var(--text-3); }
.chk .t { font-weight: 550; font-size: 13px; }
.chk .s { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; word-break: break-word; line-height: 1.45; }
.chart-wrap { position: relative; }
.chart-empty {
  position: absolute; inset: 0; display: grid; gap: 8px; place-content: center; text-align: center;
  padding: 22px 24px; pointer-events: none;
}
.chart-empty strong { display: block; font-size: 13px; color: var(--text-2); }
.chart-empty span { display: block; font-size: 12px; color: var(--muted); max-width: 340px; }
.chart-wrap.empty { display: grid; place-items: center; min-height: 148px; }
.card-fill { display: flex; flex-direction: column; }
.card-fill .card-head { flex: 0 0 auto; }
.card-fill .chart-wrap { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: flex-end; }
.card-fill .chart-wrap.empty { justify-content: center; }
.chart-empty.static { position: static; inset: auto; }
.chart-empty.static strong { font-size: 13.5px; }
.only-mobile { display: none; }

/* ═══════════ polimento 2026 · barra lateral, botões e tabelas ═══════════ */
/* ícones da navegação viram "pastilhas" com brilho no item ativo */
.nav a .ico {
  width: 17px; height: 17px; padding: 5px; box-sizing: content-box;
  border-radius: 9px; background: rgba(148,163,184,.07);
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.nav a:hover .ico { background: rgba(148,163,184,.14); transform: none; }
.nav a.active .ico {
  background: linear-gradient(150deg, rgba(0,229,143,.28), rgba(0,229,143,.10));
  color: #d7fbec; box-shadow: 0 0 0 1px rgba(0,229,143,.28) inset, 0 6px 16px -10px rgba(0,229,143,.9);
}
.nav a.active {
  background-color: #16223a;
  background-image: none;
  box-shadow: 0 0 0 1px rgba(0,229,143,.20) inset, inset 0 0 34px rgba(0,229,143,.13);
}
.nav a.active::before { box-shadow: 0 0 12px 1px rgba(0,229,143,.85); }
.nav a { border-radius: 10px; transition: background .16s ease, color .16s ease, box-shadow .16s ease; }
.nav a:focus-visible { outline: 2px solid rgba(0,229,143,.55); outline-offset: 2px; }
.nav-group { letter-spacing: .10em; }

/* botões: relevo, foco acessível e ícone alinhado */
.btn { font-weight: 560; letter-spacing: .01em; box-shadow: 0 1px 0 rgba(255,255,255,.04) inset; }
.btn:focus-visible { outline: 2px solid rgba(0,229,143,.55); outline-offset: 2px; }
.btn-primary { box-shadow: 0 1px 0 rgba(255,255,255,.22) inset, 0 10px 22px -14px rgba(0,229,143,.95); }
.btn-sm { min-height: 27px; }
.btn-row { align-items: center; }
.btn-block { justify-content: center; }

/* cabeçalho de card com divisória sutil e ações alinhadas à direita */
.card-head { align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.card-head .btn-row { margin-left: auto; }

/* tabelas: linha ativa e cabeçalho fixo ao rolar */
.table-wrap table tbody tr { transition: background .14s ease; }
.table-wrap table tbody tr:hover { background: rgba(148,163,184,.055); }
.table-wrap table tbody td { vertical-align: middle; }

/* barra lateral com profundidade e um fio de luz no topo */
.sidebar { background: linear-gradient(185deg, rgba(148,163,184,.055), transparent 42%), var(--surface-1, #0f172a); }
.brand { position: relative; }
.brand::after {
  content: ''; position: absolute; left: 18px; right: 18px; bottom: 0; height: 1px;
  background: linear-gradient(90deg, rgba(0,229,143,.42), transparent 72%);
}
.side-stat { transition: border-color .18s ease, background .18s ease; }
.side-stat:hover { border-color: rgba(0,229,143,.32); background: rgba(0,229,143,.06); }

/* barra de rolagem discreta em toda a interface */
.sidebar, .nav, .table-wrap, .modal-body { scrollbar-width: thin; scrollbar-color: rgba(148,163,184,.30) transparent; }
.sidebar::-webkit-scrollbar, .nav::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar, .modal-body::-webkit-scrollbar { width: 9px; height: 9px; }
.sidebar::-webkit-scrollbar-thumb, .nav::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb, .modal-body::-webkit-scrollbar-thumb {
  background: rgba(148,163,184,.26); border-radius: 9px; border: 2px solid transparent; background-clip: padding-box;
}
.sidebar::-webkit-scrollbar-thumb:hover, .table-wrap::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,.42); background-clip: padding-box; }

/* ───────── avatar do chip (foto de perfil da instância) ───────── */
.chip-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  object-fit: cover; flex: 0 0 auto;
  background:
    radial-gradient(120% 120% at 30% 20%, rgba(0,229,143,.28), transparent 55%),
    var(--surface-3);
  border: 2px solid rgba(0,229,143,.35);
  box-shadow: 0 4px 14px -4px rgba(0,229,143,.45), var(--sh-1);
  display: grid; place-items: center;
  font-size: 15px; font-weight: 700; color: var(--brand-2);
  letter-spacing: .5px; text-transform: uppercase;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
tr:hover .chip-avatar { transform: scale(1.06); border-color: rgba(0,229,143,.6); box-shadow: 0 6px 20px -4px rgba(0,229,143,.6); }
.chip-avatar.chip-avatar--sm { width: 32px; height: 32px; font-size: 12px; border-width: 1.5px; }
.chip-avatar.chip-avatar-fallback {
  background:
    radial-gradient(120% 120% at 30% 20%, rgba(0,229,143,.32), transparent 60%),
    linear-gradient(150deg, #0d3b2e 0%, #0b1017 100%);
  border-color: rgba(0,229,143,.28);
}

pre.code { margin: 12px 0 0; padding: 12px 14px; background: #060a0f; border: 1px solid var(--line); border-radius: var(--r-sm); font-family: var(--mono); font-size: 12px; line-height: 1.55; overflow-x: auto; white-space: pre; }

/* ───────── responsivo ───────── */
@media (max-width: 1080px) {
  .grid.c4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid.c3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: 272px;
    transform: translateX(-102%);
    transition: transform .24s cubic-bezier(.2,.8,.2,1);
    box-shadow: var(--sh-3);
  }
  .sidebar.open { transform: none; }
  .only-mobile { display: inline-flex; }
  .topbar { padding: 12px 16px; }
  .view { padding: 16px 16px 50px; }
  .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 3px 0; }
  .kv dd { margin-bottom: 8px; }
  .chip { display: none; }
  .toasts { left: 14px; right: 14px; }
  .toast { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ───────── scanner de proxies ───────── */
.scan-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.scan-controls select { width: auto; min-width: 150px; padding: 8px 30px 8px 11px; font-size: 12.5px; }
.scan-status {
  display: flex; flex-direction: column; gap: 12px;
  padding: 14px 16px; margin-bottom: 14px;
  border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--line-soft);
  font-size: 12.5px; color: var(--text-2);
}
.scan-status .sub { color: var(--muted); }
.scan-status-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; width: 100%; }
.scan-status-line .badge { flex: 0 0 auto; }
.scan-status-line .sub { flex: 1 1 auto; }
.scan-status-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* chips de estatística do scan */
.scan-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.scan-stats .stat {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--surface-3); border: 1px solid var(--line-soft);
}
.scan-stats .stat b { font-family: var(--display); font-size: 17px; font-weight: 650; color: var(--text); letter-spacing: -.01em; }
.scan-stats .stat b.c-ok { color: var(--brand-2); }
.scan-stats .stat b.c-cyan { color: #7dd3fc; }
.scan-stats .stat b.c-warn { color: #fbbf24; }
.scan-stats .stat span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
/* barra de progresso viva do scan */
.scan-bar {
  width: 100%; height: 6px; margin-top: 2px; border-radius: 999px;
  background: var(--surface-3); overflow: hidden; position: relative;
}
.scan-bar-fill {
  height: 100%; border-radius: 999px;
  background: var(--grad);
  box-shadow: 0 0 12px rgba(0,229,143,.55);
  transition: width .4s cubic-bezier(.4,0,.2,1);
}
.scan-bar-fill::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  transform: translateX(-100%);
  animation: scan-shimmer 1.6s linear infinite;
}
@keyframes scan-shimmer { to { transform: translateX(100%); } }
.scan-actions {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px;
  padding-top: 14px; border-top: 1px solid var(--line-soft);
}
.scan-table td { vertical-align: middle; }
.scan-table input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }
.scan-table th { white-space: nowrap; }
/* O scanner tem 10 colunas: a tabela rola no eixo X (table-wrap) em vez de
   espremer as células. Sem nowrap o nome do ISP quebrava em 3 linhas,
   desalinhava a linha inteira e empurrava a coluna Reputação para fora. */
.scan-table { white-space: nowrap; }
.scan-table td { white-space: nowrap; }
.scan-table .isp-name {
  display: inline-block; max-width: 220px; overflow: hidden;
  text-overflow: ellipsis; vertical-align: bottom;
}
/* 10 colunas precisam caber em 1280px: célula enxuta (fonte 12px, padding 8px)
   em vez de espremer o texto. O anonimato saiu da coluna Proxy e passou a
   acompanhar o Tipo, devolvendo ~60px para as outras colunas. */
.scan-table th, .scan-table td { padding: 8px 8px; font-size: 12px; }
.scan-table .isp-name { max-width: 132px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.scan-table .asn { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 132px; white-space: normal; }
.scan-table .badge { padding: 2px 6px; font-size: 12px; }
.scan-table .scan-score { width: 54px; }
/* anonimato e reputação como marcadores compactos: em 8 colunas o texto
   completo estourava a largura e cortava a última coluna */
.scan-table .anon-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  margin-left: 4px; vertical-align: middle; background: var(--muted);
}
.scan-table .anon-dot.ok { background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,.6); }
.scan-table .anon-dot.bad { background: #ef4444; }
.scan-table .rep { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.scan-table .loc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 114px; white-space: normal; }
.scan-table td.mono { font-size: 12px; }
.scan-table .rep.ok { color: #22c55e; }
.scan-table .rep.warn { color: #eab308; }
.scan-table .rep.bad { color: #ef4444; }
/* busca livre do scanner */
.scan-search {
  width: 200px; min-width: 150px; padding: 8px 11px; font-size: 12.5px;
  background: var(--surface-3); border: 1px solid var(--line-soft);
  border-radius: var(--r-sm); color: var(--text);
}
.scan-search:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,229,143,.12); }
.scan-search::placeholder { color: var(--muted); }
.scan-precise { 
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  font-size: 12.5px; color: var(--text-2); white-space: nowrap;
  padding: 9px 11px; min-height: 40px; border-radius: var(--r-sm);
  background: var(--surface-3); border: 1px solid var(--line-soft);
  transition: border-color .18s ease, color .18s ease;
}
.scan-precise:hover { border-color: var(--brand); color: var(--text); }
.scan-precise input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }
/* score 0-100 com micro-barra */
.scan-score {
  display: inline-block; vertical-align: middle; width: 46px; height: 5px;
  border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-right: 6px;
}
.scan-score i { display: block; height: 100%; border-radius: 999px; transition: width .3s ease; }
.scan-score.ok i { background: var(--brand); box-shadow: 0 0 8px rgba(0,229,143,.5); }
.scan-score.warn i { background: #f5b544; }
.scan-score.bad i { background: #f2586d; }
.scan-score-num { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
/* observação do scan (ex.: parado com resultados preservados) */
.scan-note {
  font-size: 12px; color: var(--text-2); padding: 8px 10px;
  border-radius: var(--r-sm); background: rgba(0,194,255,.07);
  border: 1px solid rgba(0,194,255,.18);
}
/* agrupamento dos controles: "Escanear" (alvo) x "Filtrar resultados" (visão) */
.scan-filters {
  margin-top: 10px; padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.scan-group-label {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); white-space: nowrap;
  padding-right: 2px;
}
/* linha honesta "mostrando X de Y vivos · filtro: ... " */
.scan-count {
  font-size: 12px; color: var(--text-2);
  margin: 8px 0 2px; display: flex; align-items: center;
  gap: 6px; flex-wrap: wrap;
}
.scan-count b { color: var(--text); font-variant-numeric: tabular-nums; }
.flag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 700; letter-spacing: .05em;
  padding: 1px 6px; border-radius: 6px; margin-right: 6px;
  background: rgba(0,194,255,.12); color: #7dd3fc; border: 1px solid rgba(0,194,255,.28);
}
@media (max-width: 820px) {
  .scan-controls { width: 100%; }
  .scan-controls select { flex: 1 1 auto; min-width: 0; }
  .scan-controls .btn { flex: 1 1 auto; justify-content: center; }
  .scan-actions .btn { flex: 1 1 auto; justify-content: center; }
  .scan-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .scan-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --------- p�gina Integra��o (#/docs) --------- */
.doc-hero { display: flex; align-items: flex-start; gap: 18px; justify-content: space-between; flex-wrap: wrap; }
.doc-hero-main { max-width: 64ch; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.doc-hero-actions { margin-left: auto; }
.doc-desc { color: var(--text-2); font-size: 13px; line-height: 1.6; }

/* auto-fit: os três cartões (base, especificação e endpoints) sentam na MESMA
   linha quando há largura, em vez de deixar o terceiro sozinho com metade vazia. */
.doc-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 16px; }
.doc-link {
  display: flex; flex-direction: column; gap: 7px; min-width: 0;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r);
  background-color: #10161f;
  background-image: linear-gradient(180deg, rgba(16,22,31,.96), rgba(11,16,23,.98));
  transition: border-color var(--t), box-shadow var(--t);
}
.doc-link:hover { border-color: rgba(0,229,143,.34); box-shadow: var(--sh-1); }
.doc-link-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.doc-link-value {
  font-family: var(--mono); font-size: 12.5px; line-height: 1.5; color: var(--brand-2);
  background: rgba(0,229,143,.07); border: 1px solid rgba(0,229,143,.18);
  border-radius: 8px; padding: 6px 9px; overflow-wrap: anywhere;
}
.doc-link-note { font-size: 12px; color: var(--muted); line-height: 1.5; }
.doc-link.is-bad .doc-link-value { color: var(--red); background: rgba(255,92,122,.08); border-color: rgba(255,92,122,.24); }

.doc-step {
  display: flex; flex-direction: column; min-width: 0; padding: 16px;
  border: 1px solid var(--line); border-radius: var(--r);
  background-color: #10161f;
  background-image: linear-gradient(180deg, rgba(16,22,31,.96), rgba(11,16,23,.98));
  transition: border-color var(--t), box-shadow var(--t);
}
.doc-step:hover { border-color: rgba(0,229,143,.3); box-shadow: var(--sh-1); }
.doc-step-head { display: flex; gap: 12px; align-items: flex-start; }
.doc-step-n {
  flex: 0 0 auto; width: 26px; height: 26px; display: grid; place-items: center;
  border-radius: 8px; font-family: var(--display); font-size: 12.5px; font-weight: 700;
  color: var(--brand-ink); background: var(--grad);
  box-shadow: 0 4px 14px -6px rgba(0,229,143,.7);
}
.doc-step-text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.doc-step-text h3 { font-size: 14px; }
.doc-code {
  margin: 12px 0 0; padding: 12px 14px; background: #060a0f;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  font-family: var(--mono); font-size: 12.5px; line-height: 1.65; color: #c7d2e0;
  /* pre-wrap: o cURL quebra dentro do cartão em vez de ser cortado na borda.
     O overflow-x segue de rede de segurança para token sem espaço (URL longa). */
  overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 2;
  scrollbar-width: thin;
}

@media (max-width: 900px) {
  .doc-links { grid-template-columns: 1fr; }
  .doc-hero-actions { margin-left: 0; width: 100%; }
  .doc-hero-actions .btn { flex: 1 1 auto; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .doc-link, .doc-step { transition: none; }
}

/* ═══════════════════════════════════════════════════════════════
   POLIMENTO FINAL (auditoria 16/11/2026)
   Correções medidas no DOM, não "achismo":
   • nenhuma fonte informativa abaixo de 12px (WCAG/legibilidade)
   • alvo de toque >= 40px no mobile (o painel é usado no celular)
   • estados de foco e de carregamento visíveis em todo controle
   • modal com teto de altura + rolagem própria (não estoura a tela)
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. piso tipográfico de 12px ─────────────────────────────────
   Rótulos em caixa-alta eram 9.5–11.5px. Em caixa-alta a leitura já é
   mais difícil, então 12px é o piso real (nunca menos). */
.nav-group,
.side-stat .l,
.side-version,
.subhead,
.stat .k,
.legend,
.chart-empty span,
.scan-stats .stat span,
.scan-group-label,
.doc-link-label,
.spark .col span,
.login-kicker { font-size: 12px; }

.scan-table .badge,
.scan-table .rep,
.scan-table td.mono,
.scan-score-num,
.flag { font-size: 12px; }

/* O rótulo deixou de ser minúsculo: reduz o exagero do letter-spacing
   para a palavra não ficar esparramada com o novo corpo. */
.nav-group { letter-spacing: .08em; }
.stat .k { letter-spacing: .07em; }

/* ── 2. alvo de toque confortável no celular ───────────────────── */
@media (max-width: 820px) {
  .btn, .btn-sm { min-height: 40px; }
  .btn-icon { min-width: 40px; min-height: 40px; padding: 10px; }
  .btn-icon .ico { width: 18px; height: 18px; }
  .nav a { min-height: 44px; }
  .check, label.check { min-height: 44px; }
  input, select, textarea { min-height: 42px; font-size: 16px; } /* 16px evita o zoom automático do iOS */
  .modal-foot .btn { flex: 1 1 auto; }
}

/* ── 3. estado de carregamento em botão (spinner dentro do próprio botão) */
.btn.loading, .btn[aria-busy="true"] { position: relative; color: transparent !important; pointer-events: none; }
.btn.loading::after, .btn[aria-busy="true"]::after {
  content: ''; position: absolute; inset: 0; margin: auto;
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.32); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ── 4. foco visível em qualquer elemento interativo ───────────── */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible,
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible, select:focus-visible {
  outline: 2px solid rgba(0,229,143,.65);
  outline-offset: 2px;
}

/* ── 5. modal com teto de altura: não estoura em tela pequena ──── */
.modal-card { max-height: min(88vh, 900px); display: flex; flex-direction: column; }
.modal-body { overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.modal-foot { flex: 0 0 auto; }
@media (max-width: 640px) {
  .modal { padding: 12px; align-items: flex-end; }
  .modal-card { max-height: 92vh; width: 100% !important; }
  .modal-foot { gap: 8px; }
}

/* ── 6. toasts empilhados sem cobrir o conteúdo no celular ─────── */
.toasts { pointer-events: none; }
.toast { pointer-events: auto; }

/* ── 7. barra de rolagem horizontal sempre visível (dica de "tem mais") */
.table-wrap { scrollbar-width: thin; }
.table-wrap::-webkit-scrollbar { height: 9px; }

/* ── 8. números tabulares e alinhados à direita em toda métrica ── */
.stat .v, .mono, .scan-stats .stat b, .px-lat { font-variant-numeric: tabular-nums; }
.stat .v { letter-spacing: -.015em; }

/* ── 9. validação visível no campo (nunca só um toast) ─────────── */
.field-err {
  margin: 0; padding: 9px 12px; border-radius: var(--r-sm);
  color: #ffd9df; background: rgba(255,92,122,.12);
  border: 1px solid rgba(255,92,122,.34);
  font-size: 12.5px; line-height: 1.45;
}
.field-err::before { content: '⚠ '; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] {
  border-color: rgba(255,92,122,.55) !important;
  box-shadow: 0 0 0 3px rgba(255,92,122,.13) !important;
}

/* ── 10. esqueleto de carregamento (em vez de "Carregando..." solto) ── */
.skeleton { display: grid; gap: 10px; }
.skeleton i {
  display: block; height: 14px; border-radius: 7px;
  background: linear-gradient(90deg, rgba(255,255,255,.055) 25%, rgba(255,255,255,.11) 37%, rgba(255,255,255,.055) 63%);
  background-size: 400% 100%;
  animation: brilho 1.25s ease-in-out infinite;
}
.skeleton i:nth-child(1) { width: 42%; height: 20px; }
.skeleton i:nth-child(3) { width: 78%; }
.skeleton i:nth-child(4) { width: 61%; }
@keyframes brilho { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) {
  .skeleton i, .btn.loading::after, .btn[aria-busy="true"]::after { animation: none; }
}

/* ── 11. estado de erro de tela: ícone + ação de tentar de novo ── */
.state-box {
  display: grid; justify-items: center; gap: 10px;
  padding: 34px 22px; text-align: center;
}
.state-box .state-ico {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  background: rgba(255,92,122,.12); border: 1px solid rgba(255,92,122,.28);
  color: var(--red); font-size: 20px;
}
.state-box .state-ico.ok { background: rgba(0,229,143,.10); border-color: rgba(0,229,143,.28); color: var(--brand-2); }
.state-box strong { font-size: 15px; }
.state-box p { margin: 0; color: var(--text-2); font-size: 13px; max-width: 52ch; line-height: 1.55; }

/* ── 12. abas: não cortar o texto nem o sublinhado; dedo alcança ── */
.tabs {
  padding-bottom: 2px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}
.tabs button { scroll-snap-align: start; }
.tabs::-webkit-scrollbar { height: 3px; }
.tabs::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 3px; }
.tabs button.active { border-bottom-width: 2px; }

/* ── 13. tabela em tela pequena: respiro e leitura sem esmagar ── */
.table-wrap { max-width: 100%; overflow-x: auto; }
@media (max-width: 640px) {
  .tabs button { min-height: 40px; padding: 10px 13px; font-size: 13px; }
  .table-wrap table { min-width: 560px; }
  .table-wrap thead th { position: sticky; top: 0; z-index: 1; background: var(--surface); }
  .actions, .row-actions { min-height: 40px; align-items: center; }
  /* alvo de toque nunca menor que 40px — celular pequeno não pode ter botão menor que o grande */
  .btn-sm { min-height: 40px; }
  .btn-icon { min-width: 40px; min-height: 40px; }
}
@media (max-width: 400px) {
  .card { padding: 14px 13px; }
  .page-title, #view h2 { font-size: 19px; line-height: 1.25; }
}

/* ═══════════════════════════════════════════════════════════════
   WACORE API · polimento de acabamento (18/11/2026)
   Camada final: topbar, sidebar, cards, KPIs, tabelas, modais,
   abas, estados vazios, integração e login responsivo.
   Tudo em cima dos tokens — nenhuma cor solta no componente.
   ═══════════════════════════════════════════════════════════════ */

/* ── topbar: marca discreta, título e chips ─────────────────── */
.topbar { padding: 13px 26px; gap: 14px; }
.topbar-title { display: grid; gap: 1px; }
.topbar-crumb {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: #7f92a8;
  line-height: 1;
}
.topbar-crumb img { width: 14px; height: 14px; border-radius: 4px; opacity: .95; }
.topbar-crumb span { color: #5cf5bd; }
.topbar-title h2 { font-size: 19px; letter-spacing: -.02em; margin-top: 5px; }
.topbar-title #page-sub { margin-top: 1px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; letter-spacing: .01em;
  background: rgba(255,255,255,.035);
  border-color: rgba(255,255,255,.09);
  font-variant-numeric: tabular-nums;
  transition: border-color var(--t), background var(--t), color var(--t);
}
.chip-ok { color: #b8f5d8; border-color: rgba(0,229,143,.34); background: rgba(0,229,143,.10); }
.chip::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; opacity: .65;
}
.chip#chip-instances::before { background: #7f92a8; }
.chip.chip-ok::before { background: var(--brand); opacity: 1; box-shadow: 0 0 8px rgba(0,229,143,.9); }
.topbar .btn-icon { border: 1px solid transparent; }
.topbar .btn-icon:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.08); }

/* estado vazio: hero enxuto, com CTA real em vez de porcentagem sem sentido */
.ov-hero.is-empty { padding: 24px 24px 26px; }
.ov-hero.is-empty .ov-title { max-width: 30ch; }
.ov-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.ov-cta .btn { min-height: 40px; }

/* ── sidebar: ritmo, grupos e assinatura ───────────────────── */
.nav { padding: 4px 10px 10px; gap: 3px; }
.nav-group {
  margin: 22px 0 8px; padding: 0 12px;
  font-size: 12px; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: #6c7f97;
  display: flex; align-items: center; gap: 9px;
}
.nav-group::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(255,255,255,.10), transparent); }
.nav-group:first-child { margin-top: 6px; }
.nav a { padding: 8px 10px; gap: 10px; font-size: 13.5px; }
.nav a span { letter-spacing: -.005em; }
.nav a.active { font-weight: 600; }
.sidebar-foot { gap: 10px; padding: 12px 12px 14px; }
.side-stats { gap: 8px; }
.side-stat { padding: 9px 10px; }
.side-stat .n { font-size: 16px; }
.side-version { font-family: var(--mono); font-size: 12px; line-height: 1.5; color: #93a5ba; }
.hc-sign {
  display: flex; align-items: center; gap: 10px;
  margin-top: 2px; padding: 12px 2px 2px;
  border-top: 1px solid rgba(255,255,255,.07);
  background: none; border-radius: 0;
}
.hc-sign .hc-glyph {
  font-size: 12px; padding: 4px 6px; border-radius: 6px;
  background-color: #0d2118; background-image: none;
  box-shadow: inset 0 0 0 1px rgba(0,229,143,.22), inset 0 0 18px rgba(0,229,143,.10);
  color: #7ef0c2; letter-spacing: .06em; font-weight: 700;
}
.hc-txt { display: grid; line-height: 1.25; min-width: 0; }
.hc-txt b {
  font-family: var(--wordmark); font-size: 13.5px; font-weight: 700;
  letter-spacing: .02em; color: #eafff7;
}
.hc-txt i { font-style: normal; font-size: 12px; color: #90a3b9; letter-spacing: .02em; }
.sidebar-foot #logout-btn { color: var(--text-3); }
.sidebar-foot #logout-btn:hover { color: #ffd7de; background: rgba(255,92,122,.10); }

/* ── cards ─────────────────────────────────────────────────── */
.card {
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(20,29,40,.80), rgba(12,18,25,.88));
  border: 1px solid var(--line-soft);
  box-shadow: var(--sh-2), inset 0 1px 0 rgba(255,255,255,.03);
}
.card-head { margin-bottom: 16px; align-items: center; }
.card-head h3 { font-size: 15px; letter-spacing: -.012em; }
.card-head .spacer { margin-left: auto; }
.card-sub { line-height: 1.5; }
.subhead { margin: 6px 0 12px; }

/* ── visão geral: palco de status (separado da grade) ──────── */
.ov-hero {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px 26px; align-items: center;
  padding: 24px 24px 26px;
  margin-bottom: 20px;
  border-radius: var(--r-xl);
  border: 1px solid rgba(0,229,143,.20);
  background:
    radial-gradient(85% 190% at 0% 0%, rgba(0,229,143,.15), transparent 58%),
    radial-gradient(75% 170% at 100% 110%, rgba(0,194,255,.11), transparent 60%),
    linear-gradient(180deg, rgba(19,29,40,.92), rgba(10,16,22,.95));
  box-shadow: var(--sh-2), inset 0 1px 0 rgba(255,255,255,.055);
}
.ov-hero::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 1px; z-index: -1;
  background: linear-gradient(90deg, rgba(0,229,143,.7), rgba(0,194,255,.45) 45%, transparent 88%);
}
.ov-hero::after {
  content: ''; position: absolute; z-index: -1; right: 0; top: -110px;
  width: 250px; height: 250px; border-radius: 50%;
  border: 1px solid rgba(0,229,143,.16);
  background: radial-gradient(circle, rgba(0,229,143,.10), transparent 68%);
  pointer-events: none;
  clip-path: inset(-200px 0 0 -200px);
}
.ov-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 650; letter-spacing: .10em; text-transform: uppercase;
  color: #a9f5d6; background: rgba(0,229,143,.10); border: 1px solid rgba(0,229,143,.24);
  margin-bottom: 12px;
}
.ov-eyebrow i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand);
  box-shadow: 0 0 0 3px rgba(0,229,143,.16); animation: pulse 2.4s infinite;
}
.ov-eyebrow.is-warn { color: #fcd9a3; background: rgba(245,158,11,.10); border-color: rgba(245,158,11,.26); }
.ov-eyebrow.is-warn i { background: var(--amber); box-shadow: 0 0 0 3px rgba(245,158,11,.16); }
.ov-title { font-size: clamp(21px, 2.4vw, 26px); letter-spacing: -.028em; line-height: 1.14; }
.ov-sub { color: #c3d0de; font-size: 13.5px; line-height: 1.6; margin-top: 7px; max-width: 68ch; }
.ov-metrics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ov-metrics span {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 6px 11px; border-radius: 9px;
  font-size: 12px; color: var(--text-2);
  background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.07);
}
.ov-metrics b {
  font-family: var(--display); font-size: 15px; font-weight: 700;
  color: #f0fbf7; font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.ov-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; max-width: 460px; }
.ov-actions .btn { white-space: nowrap; }
.ov-actions .btn-primary { order: -1; }

/* KPIs */
.ov-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi {
  position: relative; overflow: hidden;
  display: grid; gap: 10px;
  padding: 16px 17px 15px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(20,29,40,.78), rgba(12,18,25,.86));
  box-shadow: var(--sh-2), inset 0 1px 0 rgba(255,255,255,.03);
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
}
.kpi:hover { border-color: rgba(0,229,143,.24); transform: translateY(-2px); box-shadow: var(--sh-3), inset 0 1px 0 rgba(255,255,255,.05); }
.kpi-top { display: flex; align-items: center; gap: 9px; }
.kpi-ico {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px;
  display: grid; place-items: center;
  color: var(--brand-2); background: rgba(0,229,143,.10);
  border: 1px solid rgba(0,229,143,.20);
}
.kpi-ico svg { width: 16px; height: 16px; }
.kpi.is-cyan .kpi-ico { color: #7dd3fc; background: rgba(0,194,255,.10); border-color: rgba(0,194,255,.22); }
.kpi.is-violet .kpi-ico { color: #c4b5fd; background: rgba(124,92,255,.12); border-color: rgba(124,92,255,.24); }
.kpi.is-amber .kpi-ico { color: #fcd9a3; background: rgba(245,158,11,.10); border-color: rgba(245,158,11,.24); }
.kpi-label { font-size: 12px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: #8b9bb0; }
.kpi-val {
  font-family: var(--display); font-size: 30px; font-weight: 700;
  line-height: 1; letter-spacing: -.032em; color: #f4faf8;
  font-variant-numeric: tabular-nums;
}
.kpi-val small { font-size: 15px; font-weight: 600; color: var(--text-3); letter-spacing: -.01em; }
.kpi-foot { font-size: 12px; color: var(--text-3); line-height: 1.45; }
.kpi.accent .kpi-val {
  background: linear-gradient(120deg, #7dffd0, #7dd3fc);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ── tabelas ───────────────────────────────────────────────── */
.table-wrap { border-radius: var(--r); }
thead th {
  position: sticky; top: 0; z-index: 2;
  padding: 11px 12px;
  background: rgba(13,19,27,.94);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  letter-spacing: .075em;
}
tbody td { padding: 12px; }
tbody tr:hover { background: rgba(0,229,143,.035); }
tbody tr:hover td:first-child { box-shadow: inset 2px 0 0 rgba(0,229,143,.55); }
td .title { letter-spacing: -.008em; }
.empty {
  display: grid; justify-items: center; gap: 8px;
  padding: 40px 20px; color: var(--text-3);
}
.empty strong { font-size: 15px; color: var(--text-2); margin: 0; }
.empty p { font-size: 13px; color: #97a9bd; max-width: 52ch; line-height: 1.6; text-align: center; text-wrap: pretty; }
.empty-ico {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  color: var(--brand-2); background: rgba(0,229,143,.08);
  border: 1px solid rgba(0,229,143,.20); margin-bottom: 6px;
}
.empty-ico svg { width: 22px; height: 22px; }
.empty-act { margin-top: 10px; }

/* ── botões ────────────────────────────────────────────────── */
.btn { padding: 9px 15px; border-radius: 10px; font-weight: 600; letter-spacing: .002em; }
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, #00e58f 0%, #12d5b4 48%, #00c2ff 100%);
  color: #032018;
  box-shadow: 0 1px 0 rgba(255,255,255,.28) inset, 0 8px 20px -14px rgba(0,229,143,.80);
}
.btn-primary:hover { filter: brightness(1.05); box-shadow: 0 1px 0 rgba(255,255,255,.3) inset, 0 12px 24px -14px rgba(0,229,143,.92); }
.btn:focus-visible { outline: 2px solid rgba(92,245,189,.7); outline-offset: 2px; }
.btn-ghost { color: #9fb0c4; }
.btn-ghost:hover { color: #eaf6f2; background: rgba(255,255,255,.06); }
.btn-sm { padding: 6px 11px; border-radius: 8px; }

/* ── formulários ───────────────────────────────────────────── */
.field > span { font-size: 12.5px; font-weight: 600; color: #cdd9e7; letter-spacing: .01em; }
input, select, textarea { border-radius: 10px; border-color: rgba(255,255,255,.09); }
input:focus, select:focus, textarea:focus { background: rgba(22,32,43,.9); }
input[type="password"] { letter-spacing: .12em; }
#login-password { font-size: 15px; padding: 0 13px; height: 48px; }
#login-password::placeholder { letter-spacing: .12em; color: #4f5f74; }

/* ── modal ─────────────────────────────────────────────────── */
.modal { background: rgba(3,6,10,.78); }
.modal-card { position: relative; border-radius: 20px; overflow: hidden; border-color: rgba(255,255,255,.10); }
.modal-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; z-index: 3;
  background: linear-gradient(90deg, var(--brand), var(--brand-cyan) 70%, transparent);
}
.modal-head { padding: 17px 20px; background: linear-gradient(180deg, rgba(255,255,255,.03), transparent); }
.modal-head h3 { font-size: 16px; letter-spacing: -.015em; }
.modal-body { padding: 20px; }
.modal-foot { padding: 14px 20px; background: rgba(0,0,0,.18); }

/* ── abas ──────────────────────────────────────────────────── */
.tabs { gap: 2px; border-bottom: 1px solid var(--line-soft); margin-bottom: 18px; }
.tabs button { border-radius: 9px 9px 0 0; font-weight: 600; padding: 10px 15px; }
.tabs button:hover { background: rgba(255,255,255,.035); }
.tabs button.active { background-color: #10251f; background-image: linear-gradient(180deg, rgba(0,229,143,.12), rgba(0,229,143,0) 92%); }

/* ── badges, pills e barras ────────────────────────────────── */
.badge { padding: 3px 9px; font-weight: 650; letter-spacing: .01em; }
.badge.ok::before { box-shadow: 0 0 6px rgba(0,229,143,.8); }
.bar { height: 7px; }
.pill { font-weight: 600; }
.chk { border-radius: 12px; padding: 12px 14px; background: rgba(255,255,255,.022); }
.chk .mark { font-size: 11px; }
.chk.ok { border-color: rgba(0,229,143,.16); }

/* ── integração (aba #/docs) ───────────────────────────────── */
.doc-hero-main h3 { letter-spacing: -.015em; font-size: 17px; }
.doc-link, .doc-step { border-radius: 14px; }
.doc-link:hover, .doc-step:hover { transform: translateY(-1px); transition: transform var(--t), border-color var(--t), box-shadow var(--t); }
.doc-code, pre.code { border-radius: 12px; }

/* ── estados de tela ───────────────────────────────────────── */
.state-box { gap: 12px; padding: 40px 22px; }
.state-box .state-ico { width: 48px; height: 48px; border-radius: 15px; }
.skeleton i { border-radius: 8px; }

/* ── responsivo do login e da visão geral ──────────────────── */
@media (max-width: 1020px) {
  .login-grid { grid-template-columns: 1fr; max-width: 520px; }
  .login-hero { border-right: none; border-bottom: 1px solid var(--line-soft); padding: 26px; gap: 18px; }
  .lh-main { margin-top: 0; }
  .lh-feats { grid-template-columns: 1fr 1fr; display: grid; }
  .ov-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .ov-hero { grid-template-columns: 1fr; padding: 20px 18px 22px; }
  .ov-actions { justify-content: flex-start; max-width: none; }
}
@media (max-width: 640px) {
  .login-wrap { padding: 10px; }
  .login-grid { border-radius: 20px; }
  /* no celular o hero vira BARRA DE MARCA compacta: logo + wordmark numa
     linha, sem lead/recursos/rodapé. Antes ele ocupava ~300px de altura e
     empurrava o formulário para fora da primeira tela. */
  .login-hero { padding: 16px; gap: 10px; border-radius: 20px 20px 0 0; }
  .lh-orbit { display: none; }
  .lh-top { align-items: center; gap: 11px; }
  .lh-mark { width: 44px; height: 44px; margin-top: 0; }
  .lh-mark img { border-radius: 13px; }
  .lh-main { gap: 0; margin-top: 0; }
  .lh-lead { display: none; }
  .lh-feats { display: none; }
  .lh-foot { display: none; }
  .login-card-head { margin-bottom: 18px; }
  .login-card { padding: 20px 18px 22px; }
  .login-foot { margin-top: 16px; padding-top: 12px; font-size: 12px; }
  .wordmark--xl { font-size: 27px; }
  .ov-kpis { grid-template-columns: 1fr; }
  .ov-actions .btn { flex: 1 1 auto; justify-content: center; }
  .kpi-val { font-size: 27px; }
  .topbar-crumb { font-size: 12px; }
  .topbar { padding: 10px 14px; }
  .topbar-title h2 { font-size: 17px; }
  .ov-title { line-height: 1.24; }
  .chk { grid-template-columns: 16px minmax(0, 1fr); gap: 8px; }
}
@media (max-width: 400px) {
  .lh-badge { display: none; }
  .lh-feats svg { padding: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  .kpi, .doc-link, .doc-step, .btn, .brand-mark { transition: none; }
  .kpi:hover, .doc-link:hover, .doc-step:hover, .btn:hover { transform: none; }
}

/* ── correções de mobile e legibilidade (auditoria 18/11) ───── */
/* topbar estreita: chips viram linha própria e nada estoura a tela */
@media (max-width: 640px) {
  .topbar {
    display: grid; grid-template-columns: auto minmax(0, 1fr);
    align-items: center; gap: 8px 10px;
  }
  .topbar-title { grid-column: 2; min-width: 0; display: block; }
  .topbar-title h2, .topbar-title #page-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-crumb { display: none; }
  .topbar-right {
    grid-column: 1 / -1; width: 100%; margin-left: 0;
    display: flex; gap: 6px; overflow: hidden;
  }
  .topbar-right .chip {
    flex: 1 1 0; min-width: 0; justify-content: center;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    font-size: 12px; padding: 5px 8px;
  }
  .topbar-right .btn-icon { flex: 0 0 34px; }
  .view { padding: 16px 14px 40px; }
  .table-wrap { max-width: 100%; }
  .card.pad-0 .card-head { flex-wrap: wrap; gap: 8px; }
}
@media (max-width: 420px) {
  .topbar-right .chip#chip-instances { display: none; }
}
@media (max-width: 480px) {
  .ov-metrics span { font-size: 12px; padding: 5px 9px; }
  .ov-metrics b { font-size: 14px; }
}

/* legibilidade: texto secundário um degrau acima, sem perder elegância */
.kpi-label, .kpi-foot { color: #93a3b8; }
.kpi-foot { font-size: 12.5px; }
.ov-sub { color: #c2cfdd; }
.empty p { color: #93a3b8; }
.empty strong { color: #cdd9e7; }
.card-sub, .sub, .muted { color: #8fa0b5; }
.topbar-crumb { color: #8b9db4; }
.topbar-crumb span { color: #7dffd0; }
.hc-txt i { color: #8b9db4; }
.nav-group { color: #7186a0; }
.legend span { color: #93a3b8; }
.btn-ghost { color: #a6b6c9; }

/* ── login: visibilidade da senha + acabamento fino ────────── */
.pw-wrap { position: relative; display: block; }
#login-password { padding-right: 58px; }
.pw-toggle {
  position: absolute; top: 50%; right: 10px; transform: translateY(-50%);
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid transparent; border-radius: 10px; background: transparent;
  color: #7f92a8; cursor: pointer;
  transition: color .16s ease-out, background .16s ease-out, border-color .16s ease-out;
}
.pw-toggle svg { width: 19px; height: 19px; }
.pw-toggle .eye-off { display: none; }
.pw-toggle[aria-pressed="true"] { color: var(--brand-2); background: rgba(0,229,143,.10); border-color: rgba(0,229,143,.22); }
.pw-toggle[aria-pressed="true"] .eye-off { display: block; }
.pw-toggle[aria-pressed="true"] .eye-on { display: none; }
.pw-toggle:hover { color: #d7f7ea; background: rgba(255,255,255,.06); }
.pw-toggle:focus-visible { outline: 2px solid rgba(92,245,189,.75); outline-offset: 1px; }

/* rodapé do hero com respiro e alinhamento óptico */
.lh-foot { align-items: center; gap: 10px; padding-top: 18px; }
.lh-foot .lh-by { margin-left: auto; }
.lh-top { align-items: center; }
.lh-mark { flex: 0 0 auto; }

/* botão principal: brilho no topo e afundamento no clique */
#login-btn { min-height: 44px; }
#login-btn:active { transform: translateY(0); }
#login-btn[aria-busy="true"] { cursor: progress; }

/* ═══════════════════════════════════════════════════════════════
   VISÃO GERAL · hero com medidor, central de ações separada
   (o bloco de ações deixou de morar dentro do cartão de status:
    agora é uma faixa própria, com cabeçalho e respiro próprios)
   ═══════════════════════════════════════════════════════════════ */
.ov-hero { grid-template-columns: minmax(0, 1fr) 148px; align-items: center; }

.ov-gauge { display: grid; justify-items: center; gap: 10px; }
.ov-gauge-ring {
  --p: calc(var(--pct, 0) * 1%);
  position: relative;
  width: 108px; height: 108px; border-radius: 50%;
  display: grid; place-content: center; text-align: center;
  background:
    conic-gradient(from -90deg, var(--brand) 0 var(--p), rgba(255,255,255,.07) var(--p) 100%);
  box-shadow: 0 0 0 1px rgba(255,255,255,.05), 0 16px 34px -22px rgba(0,229,143,.75);
  transition: background .5s cubic-bezier(.2,.8,.2,1);
}
.ov-gauge-ring::after {
  content: ''; position: absolute; inset: 9px; border-radius: 50%;
  background: radial-gradient(circle at 50% 0%, rgba(19,29,40,.96), rgba(8,13,19,.99));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.ov-gauge-ring b {
  position: relative; z-index: 1;
  font-family: var(--display); font-size: 25px; font-weight: 700;
  letter-spacing: -.03em; color: #f2fffa; font-variant-numeric: tabular-nums;
}
.ov-gauge-ring span {
  position: relative; z-index: 1;
  font-size: 10.5px; font-weight: 650; letter-spacing: .14em;
  text-transform: uppercase; color: #7ee0bb;
}
.ov-gauge-foot {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-3); white-space: nowrap;
}
.ov-gauge-foot .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
.ov-gauge-foot .dot.ok { background: var(--brand); box-shadow: 0 0 0 3px rgba(0,229,143,.15); }
.ov-gauge-foot .dot.idle { background: var(--amber); box-shadow: 0 0 0 3px rgba(255,181,71,.14); }

/* central de ações — faixa própria, longe dos cards */
.ov-center {
  margin-top: 18px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-soft);
  background:
    linear-gradient(180deg, rgba(16,23,32,.72), rgba(9,14,20,.82));
  box-shadow: var(--sh-2), inset 0 1px 0 rgba(255,255,255,.03);
}
.ov-center-head {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px 0;
}
.ov-center-head h3 { font-size: 13px; letter-spacing: .01em; }
.ov-center-head p { font-size: 12px; color: #8fa0b5; line-height: 1.45; margin-top: 2px; }
.ov-center-tag {
  margin-left: auto; flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 650; letter-spacing: .10em; text-transform: uppercase;
  color: #8ef0cb; background: rgba(0,229,143,.08); border: 1px solid rgba(0,229,143,.20);
}
.ov-center-tag i {
  width: 5px; height: 5px; border-radius: 50%; background: var(--brand);
  animation: pulse 2.4s infinite;
}
.ov-center-grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px; padding: 14px 16px 16px;
}
.act-tile {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 13px; min-height: 62px;
  border-radius: var(--r-sm); text-align: left; text-decoration: none;
  border: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.022);
  color: var(--text); font-family: inherit; cursor: pointer;
  transition: border-color var(--t), background var(--t), transform var(--t), box-shadow var(--t);
}
.act-tile:active { transform: translateY(1px); }
.act-tile:hover {
  border-color: rgba(0,229,143,.28);
  background: rgba(0,229,143,.06);
  box-shadow: 0 10px 24px -18px rgba(0,229,143,.9);
}
.act-tile:hover .act-ico { color: var(--brand-2); border-color: rgba(0,229,143,.34); background: rgba(0,229,143,.12); }
.act-tile:focus-visible { outline: 2px solid rgba(92,245,189,.8); outline-offset: 2px; }
.act-tile:disabled { opacity: .45; cursor: not-allowed; }
.act-tile[aria-busy="true"] { cursor: progress; }
.act-ico {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 11px;
  display: grid; place-items: center; color: #bccadb;
  background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.09);
  transition: color var(--t), background var(--t), border-color var(--t);
}
.act-ico svg { width: 17px; height: 17px; }
.act-body { display: grid; gap: 2px; min-width: 0; }
.act-body b { font-size: 13.5px; font-weight: 650; letter-spacing: -.005em; color: #e9eff7; }
.act-body small {
  font-size: 12px; color: #93a4b9; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.act-tile.is-primary {
  border-color: rgba(0,229,143,.34);
  background: linear-gradient(135deg, rgba(0,229,143,.16), rgba(0,194,255,.10));
}
.act-tile.is-primary .act-ico {
  color: var(--brand-2); background: rgba(0,229,143,.16); border-color: rgba(0,229,143,.34);
}
.act-tile.is-primary:hover { background: linear-gradient(135deg, rgba(0,229,143,.24), rgba(0,194,255,.14)); }

/* os dois cards da grade média com a MESMA altura: o vazio do gráfico
   não vira buraco quando não há tráfego */
.grid.c2 { align-items: stretch; }
.chart-wrap.empty { min-height: 196px; }

@media (max-width: 1180px) {
  .ov-center-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .ov-hero { grid-template-columns: 1fr; }
  .ov-gauge { justify-items: start; grid-auto-flow: column; align-items: center; gap: 12px; }
  .ov-gauge-ring { width: 74px; height: 74px; }
  .ov-gauge-ring::after { inset: 7px; }
  .ov-gauge-ring b { font-size: 19px; }
  .ov-gauge-ring span { font-size: 9px; }
  .ov-center-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-wrap.empty { min-height: 150px; }
}
@media (max-width: 640px) {
  .ov-center-head { flex-wrap: wrap; padding: 12px 13px 0; }
  .ov-center-tag { margin-left: 0; }
  .ov-center-grid { grid-template-columns: 1fr; padding: 12px 13px 13px; }
  .act-tile { min-height: 56px; }
  .act-body small { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .ov-gauge-ring, .act-tile, .act-ico { transition: none; }
}
/* ── vazio dentro de tabela no mobile (auditoria 18/11) ──────── */
/* A tabela tem min-width:560px para as colunas respirarem; quando ela
   só contém o estado vazio, esse piso não faz sentido e o texto do
   "nenhum item" acabava cortado fora da viewport. */
@media (max-width: 640px) {
  .table-wrap:has(.empty) { overflow-x: hidden; }
  .table-wrap table:has(.empty) { min-width: 0; width: 100%; }
  /* sem linha nenhuma, o cabecalho de colunas so empurra a tabela para fora */
  .table-wrap table:has(.empty) thead { display: none; }
  .table-wrap td:has(> .empty) { padding: 0; width: 100%; }
  td .empty { padding: 26px 16px; width: auto; }
  td .empty strong { font-size: 13.5px; white-space: normal; }
  td .empty span, td .empty p, td .empty a { white-space: normal; }
}
/* ═══════════════════════════════════════════════════════════════
   AUDITORIA 18/11 · legibilidade, densidade e acabamento
   Correções medidas com pw_auditar_visual (fonte < 12px, vazio do
   gráfico ocupando meia tela, respiro da sidebar e do hero).
   ═══════════════════════════════════════════════════════════════ */

/* 1. Nenhum texto de leitura abaixo de 12px — inclusive o selo "API"
      do lockup, que era o último a escapar do limite. */
.wm-api { font-size: 12px; letter-spacing: .18em; }
.hc-glyph { font-size: 12px; }
.hc-txt i { font-size: 12px; }
.ov-gauge-ring span { font-size: 12px; letter-spacing: .10em; }
.ov-gauge-foot { font-size: 12px; }
.ov-center-tag { font-size: 11px; }
.ov-center-head h3 { font-size: 13.5px; }
.ov-center-head p { font-size: 12.5px; }
.act-body b { font-size: 13.5px; }
.act-body small { font-size: 12px; }
.chk .s, .chk .body .s { font-size: 12px; }
.kpi-label { font-size: 12px; letter-spacing: .085em; }
.badge, .pill { font-size: 12px; }
.nav-group { font-size: 11px; letter-spacing: .13em; }

/* 2. Estado vazio do gráfico: sem tráfego não precisa de meia tela
      de vazio — faixa compacta com moldura tracejada discreta. */
.chart-wrap.empty, .chart-wrap.empty.static { min-height: 0; }
.chart-empty, .chart-empty.static {
  display: grid; justify-items: center; align-content: center; gap: 7px;
  min-height: 132px; padding: 22px 18px; text-align: center;
  border: 1px dashed rgba(255,255,255,.08); border-radius: var(--r-sm);
  background: radial-gradient(120% 140% at 50% 0%, rgba(0,229,143,.05), transparent 70%);
}
.chart-empty strong { font-size: 13.5px; color: #cdd9e7; font-weight: 620; }
.chart-empty span { font-size: 12.5px; color: #93a3b8; line-height: 1.5; max-width: 34ch; }

/* 3. Hero com mais densidade: as métricas viram pílulas legíveis
      em vez de texto solto e minúsculo. */
.ov-metrics { gap: 7px; margin-top: 16px; }
.ov-metrics span {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 6px 11px; border-radius: 999px;
  font-size: 12.5px; color: #b6c4d4;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.07);
}
.ov-metrics b {
  font-family: var(--display); font-size: 14px; font-weight: 700;
  color: #f0fbf6; font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.ov-title { letter-spacing: -.03em; }
.ov-sub { font-size: 13px; line-height: 1.55; max-width: 62ch; }
.ov-eyebrow { font-size: 12px; }

/* 4. Sidebar: grupos com divisor sutil e respiro constante, para
      "MOTOR" não parecer solto do resto. */
.sidebar .nav-group { margin: 18px 0 6px; }
.sidebar .nav-group:not(:first-child)::before { display: none; }
.nav-divider {
  height: 1px; margin: 14px 10px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.075), transparent);
}

/* 5. Central de ações: grade de alturas iguais e ícones no mesmo
      peso óptico (todos com stroke 1.8 já no HTML). */
.ov-center-grid { align-items: stretch; }
.act-tile { align-items: center; }
.act-ico svg { width: 18px; height: 18px; }

/* 6. Cabeçalho da página: título e ações na mesma linha de base. */
.page-head, .topbar { align-items: center; }

/* 7. Tabela: cabeçalho com contraste melhor e células numéricas
      tabulares, sem "pular" ao atualizar. */
thead th { color: #9db0c6; font-weight: 620; }
td.mono, .mono { font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
  .ov-metrics span { font-size: 12px; padding: 5px 9px; }
  .ov-metrics b { font-size: 13px; }
  .chart-empty { min-height: 112px; padding: 18px 14px; }
  .sidebar .nav-group { margin: 14px 0 4px; }
}
/* 8. Refino final (2ª leitura crítica): o vazio do gráfico ganha
      grade fantasma para manter a expectativa de "isso vai encher". */
.chart-empty {
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px),
    radial-gradient(120% 140% at 50% 0%, rgba(0,229,143,.06), transparent 70%);
  background-size: 100% 22px, 34px 100%, 100% 100%;
  background-position: 0 0, 0 100%, 0 0;
  background-repeat: repeat-y, repeat-x, no-repeat;
}

/* 9. "Atualizar" deixa de competir com o verde de estado: vira ação
      primária por BORDA e ícone, não por bloco saturado. */
.act-tile.is-primary {
  background: rgba(0,229,143,.07);
  border-color: rgba(0,229,143,.38);
  box-shadow: inset 0 1px 0 rgba(0,229,143,.10);
}
.act-tile.is-primary:hover {
  background: rgba(0,229,143,.12);
  border-color: rgba(0,229,143,.52);
}

/* 10. Pílulas do hero: superfície mais integrada (menos "buraco"). */
.ov-metrics span {
  background: rgba(0,229,143,.055);
  border-color: rgba(0,229,143,.14);
  color: #b9cdc6;
}

/* 11. KPIs: ícone com peso óptico igual ao rótulo. */
.kpi-ico { width: 28px; height: 28px; border-radius: 9px; }
.kpi-ico svg { width: 15px; height: 15px; }
.kpi-top { gap: 9px; }

/* 12. Estado vazio dentro de tabela: mesmo respiro do card de gráfico. */
td .empty { padding: 30px 18px; }

/* 13. Ritmo vertical único entre hero, KPIs, central e cards. */
.ov-hero { margin-bottom: 18px; }
.ov-kpis { gap: 14px; }
.ov-center { margin-top: 18px; }
.card + .card, .grid + .card, .card + .grid { margin-top: 18px; }
/* cards LADO A LADO num grid nunca levam margem de empilhamento: era isso
   que deixava o 2º card 18px mais baixo que o vizinho (topo desalinhado). */
.grid > .card + .card,
.grid > .card + .grid,
.grid > .grid + .card { margin-top: 0; }
/* 14. KPIs: rodapé sempre na mesma linha de base entre os 4 cards. */
.kpi { display: flex; flex-direction: column; }
.kpi-foot { margin-top: auto; padding-top: 10px; }
.kpi-val { margin-top: 2px; }

/* 15. Ícone "Sair do painel" alinhado com os ícones do nav. */
.sidebar-foot #logout-btn { padding-left: 10px; }
.sidebar-foot #logout-btn svg { flex: 0 0 auto; }

/* 16. Saúde dos serviços: legenda com contraste legível. */
.chk .body .s { color: #93a3b8; }

/* ═══════════════════════════════════════════════════════════════
   15. FECHAMENTO DE POLIMENTO (login + acabamento fino)
   Medido, não chutado: contraste do rodapé subiu para ~7:1,
   badge centralizado por align-self, foco visível em TODOS os
   controles do login, e clique com retorno tátil de 1px.
   ═══════════════════════════════════════════════════════════════ */

/* rodapé do hero: texto um degrau mais claro (contraste folgado) */
.lh-ver { color: #a8bacd; }
.lh-by { color: #b6c6d8; }

/* assinatura: glifo e nome na mesma linha de base */
.lh-by .hc-glyph { transform: translateY(-.02em); }
.lh-by b { font-weight: 700; }

/* kicker: legível sem gritar */
.login-kicker { color: #8eb3a6; letter-spacing: .16em; }
.lh-badge { color: #86f5cd; background: rgba(0,229,143,.12); border-color: rgba(0,229,143,.30); }

/* campo de senha: respiro do olho + foco no invólucro */
#login-password { padding-left: 14px; }
.pw-wrap:focus-within .pw-toggle { color: #d7f7ea; }

/* botão principal: hover, foco, ativo e carregando */
#login-btn {
  min-height: 48px; height: 48px;
  transition: transform .12s ease-out, box-shadow .18s ease-out, filter .18s ease-out, background .18s ease-out;
  box-shadow: 0 1px 0 rgba(255,255,255,.20) inset, 0 8px 22px -12px rgba(0,229,143,.75);
}
/* campo e botão na MESMA altura (48px): é o defeito clássico de formulário */
#login-form .field input { height: 48px; min-height: 48px; box-sizing: border-box; padding-top: 0; padding-bottom: 0; }
#login-btn:hover { filter: brightness(1.06); box-shadow: 0 1px 0 rgba(255,255,255,.24) inset, 0 12px 26px -12px rgba(0,229,143,.9); }
#login-btn:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(255,255,255,.14) inset, 0 4px 12px -10px rgba(0,229,143,.6); }
#login-btn:focus-visible { outline: 2px solid rgba(92,245,189,.85); outline-offset: 3px; }
#login-btn[aria-busy="true"] { filter: saturate(.7) brightness(.92); }

/* erro de login: área reservada, sem empurrar o layout */
#login-error:empty { display: none; }
#login-error {
  margin: 0; padding: 10px 12px; border-radius: 10px;
  background: rgba(255,92,108,.10); border: 1px solid rgba(255,92,108,.30);
  color: #ffc3ca; font-size: 12.5px; line-height: 1.5;
}

/* nada de animação para quem pediu menos movimento */
@media (prefers-reduced-motion: reduce) {
  #login-btn, .pw-toggle, .lh-mark, .nav a { transition: none !important; }
  #login-btn:active { transform: none; }
}

/* ═══════════════════════════════════════════════════════════════
   16. SUPERFÍCIE COM COR DE BASE (medido com pw_auditar_visual)
   Até aqui o fundo dos cards era SÓ gradiente (background-image com alfa),
   sem background-color. Visualmente funcionava, mas para todo leitor de
   contraste — auditoria, impressão, forced-colors, leitor de tela — o card
   era "transparent" e o texto claro dava 1.17:1 contra o branco presumido:
   a auditoria acusou 60 pontos graves que não existem na tela.
   Cor sólida embaixo + gradiente por cima resolve na raiz. A base #0c1219 é
   a média já composta do par rgba(21,31,44,.75) / rgba(13,19,27,.85) sobre
   o fundo #04060a — ou seja, o resultado visual continua o mesmo.
   ═══════════════════════════════════════════════════════════════ */
.card,
.kpi,
.ov-hero,
.ov-center,
.act-tile,
.stat,
.modal-card,
.chart-empty,
.chart-empty.static,
.lh-card,
.side-stat {
  background-color: #0c1219;
}
/* o vazio do gráfico mantém a grade fantasma, agora sobre base sólida */
.chart-empty, .chart-empty.static { background-color: #0b1118; }

/* ═══════════════════════════════════════════════════════════════
   17. PISO TIPOGRÁFICO: nada abaixo de 12px
   Sobravam 10–11,5px no glifo da assinatura, nos rótulos de grupo da
   sidebar e no selo de status do motor. São textos que o operador lê de
   relance — 10px num monitor real é ilegível.
   ═══════════════════════════════════════════════════════════════ */
.hc-sign .hc-glyph { font-size: 12px; padding: 3px 6px; }
.nav-group, .sidebar .nav-group { font-size: 12px; letter-spacing: .10em; }
.ov-center-tag, .ov-eyebrow { font-size: 12px; }
#engine-pill, #engine-pill span, #engine-status { font-size: 12px; }

/* ═══════════════════════════════════════════════════════════════
   18. ACABAMENTO DE CONTROLES (auditoria visual da aba #/settings)
   Três queixas reais medidas na tela, não impressão:
   (a) as abas de configuração passam de 1594px de largura em 1456px de
       container, então a última aba era cortada no meio da palavra sem
       nenhuma pista de que havia mais conteúdo à direita;
   (b) os inputs "sumiam" no fundo do card — faltava borda sólida;
   (c) o placeholder herdava cor quase de texto preenchido, ao ponto de
       não dar para distinguir campo vazio de campo com valor.
   ═══════════════════════════════════════════════════════════════ */

/* (a) abas: fade na borda que tem continuação, e alinhamento sem sobra */
.tabs {
  scrollbar-width: thin;
  scroll-padding-inline: 4px;
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 34px), transparent 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 34px), transparent 100%);
}
.tabs::-webkit-scrollbar { height: 4px; }
.tabs::-webkit-scrollbar-track { background: transparent; }
.tabs::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 4px; }
.tabs::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.26); }
.tabs button { white-space: nowrap; flex: 0 0 auto; }
.tabs button.active { position: relative; }
.tabs button:focus-visible { outline: 2px solid rgba(92,245,189,.8); outline-offset: -2px; }

/* Em telas largas as abas QUEBRAM linha em vez de esconder opções
   atrás de um scroll horizontal invisível (havia 5 abas fora de vista
   em 1280px). No mobile continua o scroll com a máscara de fade. */
@media (min-width: 980px) {
  .tabs {
    flex-wrap: wrap;
    overflow-x: visible;
    -webkit-mask-image: none;
    mask-image: none;
    row-gap: 6px;
  }
  .tabs button { flex: 0 1 auto; }
}

/* (b) inputs: borda visível sobre a superfície do card */
.field input, .field select, .field textarea,
.input, select.input, textarea.input {
  background-color: #0d1520;
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
  transition: border-color .16s ease-out, box-shadow .16s ease-out, background-color .16s ease-out;
}
.field input:hover, .field select:hover, .field textarea:hover,
.input:hover { border-color: rgba(255,255,255,.17); }
.field input:focus, .field select:focus, .field textarea:focus,
.input:focus, select.input:focus, textarea.input:focus {
  border-color: rgba(0,229,143,.55);
  box-shadow: 0 0 0 3px rgba(0,229,143,.14);
  outline: none;
}
/* erro no campo: borda vermelha + anel, sem depender do texto */
.field input[aria-invalid="true"], .input[aria-invalid="true"] {
  border-color: rgba(255,92,108,.62);
  box-shadow: 0 0 0 3px rgba(255,92,108,.13);
}

/* (c) placeholder: claramente mais apagado que o valor digitado */
.field input::placeholder, .input::placeholder, textarea::placeholder {
  color: #63768e;
  opacity: 1;
}
.field input:focus::placeholder, .input:focus::placeholder { color: #55677d; }

/* rótulo do campo com hierarquia fixa (evita "título" competindo com valor) */
.field > span { color: #9db0c6; font-weight: 600; letter-spacing: .01em; }

/* rodapé de ação do card: espaço antes da dica de produção */
.card > .muted.small:last-child { margin-top: 16px; display: block; }
.card-head + .grid + .sep + .muted.small { margin-bottom: 0; }

/* (mobile) 3 campos de senha em coluna única, sem esmagar */
@media (max-width: 780px) {
  .grid.c3 { grid-template-columns: 1fr; }
  .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .grid.c4, .grid.c2 { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   19. SIMETRIA DE FORMULÁRIO (2ª leitura da #/settings)
   O defeito real era este: "Pausa da rajada · mínima (ms)" quebra em
   duas linhas e os campos da mesma linha ficavam com topos diferentes,
   porque o grid alinhava pelo TOPO do rótulo. Alinhando pela BASE, o
   input nasce sempre na mesma altura — rótulo de 1 ou 2 linhas tanto faz.
   ═══════════════════════════════════════════════════════════════ */
.grid.c3, .grid.c4 { align-items: end; }
.field { min-width: 0; }
.field > span { display: block; min-height: 1.2em; }
/* rótulo de duas linhas não empurra o campo: a linha reserva o espaço */
.grid.c3 > .field > span, .grid.c4 > .field > span { min-height: 2.5em; }
@media (max-width: 780px) {
  .grid.c3 > .field > span, .grid.c4 > .field > span { min-height: 0; }
}

/* ícone de ajuda ao lado do rótulo fica no fluxo, alinhado ao texto */
.field > span .hint, .field > span .ico-help { vertical-align: -2px; margin-left: 4px; }

/* botões do cabeçalho do card com respiro próprio */
.card-head .btn-row, .card-head > .btn + .btn { margin-left: 8px; }
.card-head > .btn + .btn { margin-left: 8px; }
.card-head .btn-row { display: inline-flex; gap: 8px; flex-wrap: wrap; }

/* rodapé de formulário: botão e aviso com respiro, sem colar na borda */
.card > .row.wrap { gap: 12px; }

/* ── central de ações: 5 tiles de altura idêntica ───────────── */
.act-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .act-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.act-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  min-height: 76px; height: 100%; padding: 12px 13px;
  text-align: left; border-radius: 12px;
}
.act-tile .act-ico { width: 17px; height: 17px; display: block; }
.act-tile b { font-size: 13px; font-weight: 650; letter-spacing: -.01em; }
.act-tile span { font-size: 12px; line-height: 1.4; color: #90a3b9; }

/* ── KPIs: mesmo padding e mesma base de número ─────────────── */
.ov-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
/* responsivo DEPOIS da regra base — senao a base vence por ordem e o mobile
   fica com 4 colunas de 100px (rotulo truncado). Bug real, corrigido. */
@media (max-width: 1020px) {
  .ov-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
@media (max-width: 560px) {
  .ov-kpis { grid-template-columns: 1fr; gap: 10px; }
  .ov-kpis .kpi { padding: 14px 15px 13px; }
  .ov-kpis .kpi-val { font-size: 26px; }
  .ov-kpis .kpi-foot { font-size: 12px; }
}
.ov-kpis .kpi { padding: 16px 17px 15px; height: 100%; display: flex; flex-direction: column; }
.ov-kpis .kpi-top { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.ov-kpis .kpi-ico { width: 26px; height: 26px; flex: 0 0 26px; }
.ov-kpis .kpi-val { font-size: clamp(24px, 2.4vw, 30px); line-height: 1.1; margin-top: auto; }
.ov-kpis .kpi-foot { font-size: 12px; line-height: 1.45; margin-top: 6px; color: #a3b5c9; }

/* ── saúde dos serviços: separador visível + estado legível ─── */
.chk-list { display: flex; flex-direction: column; }
.chk { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 0; }
.chk .t { font-weight: 600; font-size: 13.5px; letter-spacing: -.008em; color: #e6eef7; }
.chk .s { color: #9db1c6; font-size: 12.5px; overflow-wrap: anywhere; line-height: 1.5; margin-top: 2px; }
.chk + .chk { border-top: 1px solid rgba(255,255,255,.075); }
.chk b, .chk strong { font-size: 12.5px; font-weight: 600; letter-spacing: -.005em; }
.chk span, .chk small, .chk em { font-size: 12px; line-height: 1.45; color: #90a3b9; font-style: normal; }

/* ── tabelas: última coluna sempre com respiro ──────────────── */
.table-wrap table th:last-child, .table-wrap table td:last-child { padding-right: 20px; }
.table-wrap table td:last-child { white-space: nowrap; }
.table-wrap table { min-width: 640px; }

/* ── textos de apoio com contraste de leitura ────────────────── */
.brand-sub, .side-label, .kpi-foot, .muted.small { color: #90a3b9; }

/* ── cards: superfície um tom acima da página + borda visível ── */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.022), rgba(255,255,255,0) 42%), var(--surface-2);
  border: 1px solid rgba(255,255,255,.075);
}
.card:hover { border-color: rgba(255,255,255,.115); }

/* ── KPI: número e sufixo na MESMA baseline ────────────────── */
.ov-kpis .kpi-val { display: flex; align-items: baseline; gap: 1px; }
.ov-kpis .kpi-val small { font-size: 15px; font-weight: 600; color: #90a3b9; margin: 0; }

/* ── cabeçalho de tabela: respiro vertical simétrico ────────── */
.table-wrap table th { padding-top: 12px; padding-bottom: 12px; }
.table-wrap table td { padding-top: 12px; padding-bottom: 12px; }

/* fade das abas mais evidente: em 1440px a última aba é cortada de fato */
.tabs {
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 56px), transparent 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 56px), transparent 100%);
  padding-bottom: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   20. FECHAMENTO CLASSE A (medido na tela, 18/11/2026)
   (a) topbar: chips e botões na MESMA linha de base — antes o chip
       media 26px e o botão-ícone 34px, o que deixava o conjunto
       serrilhado no canto direito;
   (b) rodapé da sidebar: versão, assinatura e botão partilham o
       mesmo recuo de 10px dos ícones do nav (eixo único);
   (c) gráfico vazio: o bloco de texto respira e o título ganha peso
       (antes ficava "esmagado" no centro do card);
   (d) hero vazio: subtítulo com contraste de leitura real.
   ═══════════════════════════════════════════════════════════════ */

/* (a) topbar alinhada por altura fixa de controle */
.topbar { align-items: center; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.topbar .chip {
  height: 32px; padding: 0 12px; border-radius: 999px;
  font-size: 12px; line-height: 1;
}
.topbar .btn-icon { width: 34px; height: 34px; display: grid; place-items: center; }
.topbar .btn-icon .ico { width: 17px; height: 17px; }
.topbar-title h2 { line-height: 1.2; }
.topbar-title #page-sub { line-height: 1.4; color: #93a5ba; }

/* (b) rodapé da sidebar: eixo único de recuo */
.sidebar-foot { padding: 14px 14px 16px; }
.side-version {
  padding: 2px 2px 0;
  margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hc-sign { padding-left: 0; }
.hc-sign .hc-glyph {
  min-width: 26px; height: 24px; display: grid; place-items: center;
  border-radius: 7px;
}
.sidebar-foot #logout-btn {
  width: 100%; justify-content: flex-start; gap: 9px;
  padding: 9px 10px; border-radius: 10px;
  font-size: 13px; color: #93a5ba;
}

/* (c) gráfico vazio legível */
.chart-empty strong { font-size: 13.5px; font-weight: 650; color: #dbe5f0; letter-spacing: -.01em; }
.chart-empty span { font-size: 12.5px; line-height: 1.55; color: #90a3b9; }
.chart-empty.static { padding: 26px 24px; }

/* (d) hero vazio */
.ov-hero.is-empty .ov-sub { color: #c3d0de; max-width: 62ch; }
.ov-hero.is-empty .ov-title { font-size: clamp(22px, 2.6vw, 28px); }

/* cards vizinhos: mesma altura e rodapé na mesma base */
.grid.c2 > .card, .grid.c3 > .card, .grid.c4 > .card { height: 100%; }
.card-fill > .chk-list, .card-fill > .list { overflow: auto; }
/* a lista de saúde ocupa a altura do card e se distribui sem buraco no rodapé */
.card-fill > .chk-list { flex: 1 1 auto; justify-content: space-between; }

/* tabelas: cabeçalho destacado e primeira célula com respiro */
.table-wrap table th { color: #93a5ba; font-weight: 650; letter-spacing: .06em; }
.table-wrap table th:first-child, .table-wrap table td:first-child { padding-left: 18px; }
.table-wrap table th:last-child, .table-wrap table td:last-child { padding-right: 18px; }
.table-wrap table tbody tr { transition: background .14s ease-out; }
.table-wrap table tbody tr:hover { background: rgba(255,255,255,.025); }

/* modais: cabeçalho, corpo e rodapé com ritmo constante */
.modal-head { padding: 18px 20px 15px; }
.modal-body { padding: 16px 20px 20px; }
.modal-foot { padding: 14px 20px 18px; gap: 10px; }

/* nada de animação longa para quem pediu menos movimento */
@media (prefers-reduced-motion: reduce) {
  .table-wrap table tbody tr, .act-tile, .card, .nav a { transition: none !important; }
}

/* ═══════════════════════════════════════════════════════════════
   21. FECHAMENTO FINAL (2ª leitura de tela, 18/11/2026)
   (a) nada abaixo de 12px em texto de leitura: 11.5px não é
       legível em monitor denso e o auditor marca como ilegível;
   (b) hero vazio ganha coluna direita útil (primeiros passos) no
       lugar do vazio de ~500px que sobrava ao lado do título;
   (c) login no celular mantém a assinatura do engenheiro — antes
       o rodapé inteiro era escondido e a marca sumia no mobile;
   (d) tile de ação com corpo em duas linhas alinhadas ao ícone.
   ═══════════════════════════════════════════════════════════════ */

/* (a) piso tipográfico de 12px nos textos de apoio */
.act-tile span, .act-tile small,
.chk span, .chk small, .chk em,
.ov-kpis .kpi-foot, .kpi-foot,
.chart-empty span, .login-foot, .lh-foot { font-size: 12px; }

/* (d) central de ações: ícone e texto no mesmo eixo, alturas iguais */
.act-tile { justify-content: flex-start; gap: 8px; }
.act-tile .act-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.act-tile b { font-size: 13.5px; line-height: 1.25; }
.act-tile span { line-height: 1.45; }
.act-tile .act-ico { margin-bottom: 2px; }

/* (b) hero da visão geral: coluna direita com os primeiros passos */
.ov-hero.is-empty { grid-template-columns: minmax(0, 1fr) minmax(230px, 300px); }
.ov-steps {
  list-style: none; margin: 0; padding: 14px 16px;
  display: grid; gap: 10px; align-content: center;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.075);
  background-color: #0b141d;
  box-shadow: inset 0 0 40px rgba(0,229,143,.055), inset 0 1px 0 rgba(255,255,255,.04);
}
.ov-steps li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; }
.ov-step-n {
  width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px;
  font-family: var(--mono); font-size: 12px; font-weight: 700; line-height: 1;
  color: #74f6c8; background: rgba(0,229,143,.12); border: 1px solid rgba(0,229,143,.26);
}
.ov-step-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ov-step-t b { font-size: 13px; font-weight: 620; color: #e6eef7; letter-spacing: -.008em; }
.ov-step-t i { font-style: normal; font-size: 12px; line-height: 1.45; color: #93a6bb; }
@media (max-width: 900px) {
  .ov-hero.is-empty { grid-template-columns: 1fr; }
  .ov-steps { padding: 12px 13px; }
}
@media (max-width: 520px) {
  .ov-steps { display: none; }
}

/* (c) login no celular: assinatura visível, versão escondida */
@media (max-width: 900px) {
  .lh-foot { display: flex; justify-content: flex-start; padding-top: 14px; }
  .lh-foot .lh-ver { display: none; }
  .lh-foot .lh-by { margin-left: 0; }
}

/* (e) trilha da topbar preserva a grafia da marca (WaCore, não WACORE) */
.topbar-crumb {
  font-family: var(--display); font-size: 12px; font-weight: 650;
  letter-spacing: .02em; text-transform: none; color: #9fb0c4;
}
.topbar-crumb b { font-weight: 700; color: #eaf3fa; letter-spacing: -.01em; }
.topbar-crumb span {
  font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .12em;
  color: #7dffd0; padding: 2px 6px; border-radius: 5px;
  background: #0d2118; border: 1px solid rgba(0,229,143,.22);
}

/* ═══════════════════════════════════════════════════════════════
   22. FECHAMENTO CLASSE A (3ª leitura de tela, 18/11/2026)
   Cada item abaixo veio de defeito CONCRETO visto no print, nao
   de gosto:
   (a) tile de ação tinha virado coluna (ícone em cima, texto
       embaixo) por causa de uma regra posterior — voltou a ser
       linha com ícone e texto no mesmo eixo vertical;
   (b) "Atualizar" (ação principal) tinha fundo verde cheio e
       destoava dos irmãos: virou destaque por BORDA + brilho;
   (c) KPI: rodapé do cartão encostava na borda inferior;
   (d) gráfico vazio: texto espremido dentro do card;
   (e) par gráfico/saúde: alturas desiguais → linha própria
       com grid-auto-rows 1fr (classe .ov-row2 aplicada no app);
   (f) cabeçalho de tabela com fonte pequena demais;
   (g) nav: recuo único para ícone em qualquer estado.
   ═══════════════════════════════════════════════════════════════ */

/* (a) central de ações: ícone à esquerda, corpo à direita, altura igual */
.ov-center-grid { align-items: stretch; }
.ov-center-grid .act-tile {
  display: flex; flex-direction: row; align-items: center;
  justify-content: flex-start; gap: 11px;
  min-height: 66px; height: 100%; padding: 12px 13px;
}
.ov-center-grid .act-ico {
  flex: 0 0 30px; width: 30px; height: 30px;
  display: grid; place-items: center; margin: 0;
  border-radius: 9px;
  color: #9ff6d6; background: rgba(0,229,143,.075);
  border: 1px solid rgba(0,229,143,.18);
}
.ov-center-grid .act-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ov-center-grid .act-body b { line-height: 1.25; }
.ov-center-grid .act-body small { line-height: 1.4; color: #93a6bb; }

/* (b) ação principal: destaque pela borda, não por bloco verde */
.act-tile.is-primary {
  background: rgba(0,229,143,.05);
  border-color: rgba(0,229,143,.30);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 10px 26px -22px rgba(0,229,143,.9);
}
.act-tile.is-primary .act-ico {
  color: #0a1512; background: linear-gradient(150deg, var(--brand-2), var(--brand));
  border-color: transparent;
}
.act-tile.is-primary:hover {
  background: rgba(0,229,143,.10);
  border-color: rgba(0,229,143,.46);
}

/* (c) KPI: respiro real no rodapé do cartão */
.ov-kpis .kpi { padding: 16px 17px 18px; }
.ov-kpis .kpi-foot { margin-top: 8px; }
.ov-kpis .kpi-top { margin-bottom: 12px; }

/* (d) gráfico vazio: bloco central com respiro */
.chart-empty.static { padding: 30px 26px; gap: 10px; }
.chart-empty.static strong { font-size: 14px; }
.chart-empty.static span { font-size: 12.5px; line-height: 1.6; max-width: 40ch; }
.card-fill .chart-wrap.empty { min-height: 220px; }

/* (e) par gráfico/saúde: mesma altura de linha, sem buraco embaixo */
.ov-row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap, 16px); grid-auto-rows: 1fr; align-items: stretch; }
.ov-row2 > .card { height: 100%; }
.ov-row2 .chk-list { gap: 2px; }
.ov-row2 .chk:last-child { padding-bottom: 2px; }
@media (max-width: 980px) { .ov-row2 { grid-template-columns: 1fr; grid-auto-rows: auto; } }

/* (f) cabeçalho de tabela legível */
.table-wrap table th { font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: #9db0c6; }

/* (g) nav: ícone com o mesmo recuo em qualquer estado */
.nav a { padding-left: 10px; padding-right: 10px; }
.nav a .ico { flex: 0 0 auto; }

/* (h) cards lado a lado: MESMO topo de título e MESMA base de conteúdo */
.ov-row2 .card-head {
  display: flex; align-items: center;
  min-height: 48px; padding: 14px 18px 12px;
}
.ov-row2 .card-head h3 { line-height: 1.3; }
.ov-row2 .legend { display: inline-flex; align-items: center; gap: 12px; }
.ov-row2 .legend span { display: inline-flex; align-items: center; gap: 6px; line-height: 1; }

/* (i) KPI: base do cartão com o mesmo respiro do topo */
.ov-kpis .kpi { padding-bottom: 20px; }

/* ═══════════════════════════════════════════════════════════════
   19. ACABAMENTO DO LOGIN (medido na tela, não por impressão)
   (a) a marca aparecia DOIS vezes no desktop (hero + cabeçalho do
       cartão) a 1200px de distância — redundância que só polui;
   (b) o selo "motor de WhatsApp" era pill de 999px enquanto o selo
       "API" do wordmark é bloco de 8px: dois idiomas para o mesmo
       tipo de elemento;
   (c) o placeholder da senha estava em #4f5f74 = 2.5:1 de contraste,
       abaixo do mínimo legível, justo no único campo da tela.
   ═══════════════════════════════════════════════════════════════ */

/* (a) com o hero visível, o cartão dispensa logo + wordmark e fica só
   com o eyebrow mono — a identidade já está estabelecida à esquerda.
   No mobile/tablet o hero empilhado também carrega a marca, então o cartão
   nunca duplica logo: em TODA largura o cabeçalho do cartão é só o eyebrow. */
.login-card-head { margin-bottom: 24px; gap: 0; }
.login-card-mark { display: none; }
.login-card-head .wordmark { display: none; }
.login-card-head .login-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 0; padding: 5px 11px 4px; border-radius: 8px;
  color: #93ffda; background: rgba(0,229,143,.10);
  border: 1px solid rgba(0,229,143,.30);
}
.login-card-head .login-kicker::before {
  content: ''; display: block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 0 3px rgba(0,229,143,.14);
  margin-right: 0;
}

/* (b) selo do hero no MESMO idioma visual do selo API do wordmark */
.lh-badge {
  font-family: var(--mono);
  font-size: 12px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; line-height: 1;
  padding: 6px 10px 5px; border-radius: 8px;
  color: #93ffda; background: rgba(0,229,143,.12);
  border: 1px solid rgba(0,229,143,.34);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

/* (c) contraste do único campo da tela e dos textos de apoio */
#login-password::placeholder { color: #6f8199; letter-spacing: .14em; }
#login-password:focus::placeholder { color: #5b6d85; }
.login-card .hint { color: #9db0c6; }
.login-sub { color: #cbd8e7; }

/* (d) folga entre ícone e rótulo no botão de entrada */
#login-btn { gap: 10px; }
#login-btn .ico { width: 16px; height: 16px; }

/* (e) ALINHAMENTO DE TOPO ENTRE AS COLUNAS
   O painel do login é flex/center: com a coluna do formulário centralizada,
   o primeiro elemento dela caía 54px abaixo do logo do hero (medido: 267 x
   213). Topo desalinhado entre colunas é o que mais denuncia montagem.
   Solução: alinhar ao topo e prender o rodapé "Acesso restrito" na base com
   margin-top:auto — assim as duas colunas começam na MESMA linha e terminam
   na mesma linha. */
@media (min-width: 900px) {
  .login-card { justify-content: flex-start; }
  .login-card .login-foot { margin-top: auto; }

  /* o rodapé das duas colunas tem de fechar na MESMA linha de base:
     o do hero usa 18px de padding-top, o do cartão usava 16px — 2px de
     desencontro que a vista pega mesmo sem saber medir. */
  .login-card .login-foot { padding-top: 18px; line-height: 1.6; }

  /* o selo do hero estava CENTRADO ao lado da logo (top 230) enquanto o selo
     do cartão começava em 213: duas pílulas do mesmo tipo em linhas diferentes.
     Alinhando o selo ao topo da logo, as duas colunas abrem na mesma linha. */
  .lh-top { align-items: flex-start; }
  .lh-mark { margin-top: -2px; }
}

/* (f) LOGIN NO CELULAR — barra de marca compacta
   As regras de desktop acima (rodapé do hero em flex, logo 58px, paddings
   largos) são declaradas DEPOIS do bloco responsivo, então venciam no 375px e
   o hero ficava com 196px de altura empurrando o formulário. Este bloco é o
   último do arquivo de propósito: em telas pequenas ele vence a cascata. */
@media (max-width: 640px) {
  .login-hero { padding: 16px; gap: 8px; border-radius: 20px 20px 0 0; }
  .lh-top { align-items: center; gap: 11px; }
  .lh-mark { width: 44px; height: 44px; margin-top: 0; }
  .lh-main { margin-top: 0; gap: 0; }
  .wordmark--xl { font-size: 27px; line-height: 1.1; }

  /* crédito do programador continua no celular, mas discreto e na mesma
     coluna da marca: 11.5px, sem borda, colado embaixo do wordmark. */
  .lh-foot {
    display: flex; justify-content: flex-start; align-items: center;
    gap: 6px; margin-top: 0; padding-top: 9px; border-top: 0;
    font-size: 12px; line-height: 1.5;
  }
  .lh-foot .lh-by { margin-left: 0; }
  .login-card { padding: 20px 18px 22px; }
  .login-card-head { margin-bottom: 18px; }
  .login-foot { margin-top: 16px; padding-top: 12px; font-size: 12px; }
}

/* ═══════════════════════════════════════════════════════════════
   DENSIDADE VERTICAL DO MENU LATERAL
   Em telas de pouca altura (notebook 1366x768, janela de ~900px) o
   menu tem 13 itens em 3 grupos e o ultimo ficava escondido atras do
   rodape, obrigando a rolar a barra para achar "Integracao". Aqui a
   altura de cada item e o respiro entre grupos encolhem o suficiente
   para caber tudo sem rolagem, mantendo alvo de toque acima de 40px.
   ═══════════════════════════════════════════════════════════════ */
@media (max-height: 980px) {
  .nav { padding: 2px 10px 8px; gap: 2px; }
  .nav a { padding: 7px 10px; font-size: 13.5px; }
  .sidebar .nav-group { margin: 12px 0 5px; }
  .brand { padding-top: 14px; padding-bottom: 12px; }
  .sidebar-foot { padding: 11px 14px 13px; gap: 8px; }
  .side-stats { gap: 6px; }
}
@media (max-height: 860px) {
  .nav a { padding: 6px 10px; }
  .sidebar .nav-group { margin: 10px 0 4px; }
  .side-stats { display: none; }
}




/* ═══════════════════════════════════════════════════════════════
   ATENDIMENTO (tickets) + SITE & MARKETING
   Componentes novos do painel: conversa do ticket e URL monoespaçada.
   Usam apenas tokens do design system (--line, --surface-2, --text-2).
   ═══════════════════════════════════════════════════════════════ */
.sup-thread {
  display: grid;
  gap: 10px;
  max-height: 320px;
  overflow: auto;
  padding-right: 4px;
  margin-top: 6px;
}
.sup-msg {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--surface-2);
}
.sup-msg.staff {
  border-color: rgba(0, 229, 143, .28);
  background: rgba(0, 229, 143, .06);
}
.sup-msg-top {
  display: flex;
  gap: 10px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 12.5px;
}
.sup-msg-top strong { font-size: 12.5px; letter-spacing: -.01em; }
.sup-msg-body {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-2);
  word-break: break-word;
  margin: 0;
}
.sup-url {
  font-family: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, monospace;
  font-size: 12.5px;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 640px) {
  .sup-thread { max-height: 260px; }
  .sup-msg-body { font-size: 13px; }
}
