/* Dark Analytic UI — estilos compartilhados.
   Tokens Tailwind ficam em /ui/js/tailwind-theme.js.
   Aqui moram classes CSS puras (componentes do DESIGN_SYSTEM.md) e overrides
   que não cabem como utility. */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

html {
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  background: #101010;
}

body {
  font-family: Inter, system-ui, sans-serif;
  color: #F0F0F0;
  background: #101010;
}

.font-mono,
code,
pre {
  font-family: "JetBrains Mono", monospace;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #101010; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.14); }

/* Focus ring:
   — Mouse: sem ring (default do browser desativado por `*:focus`)
   — Teclado: ring visível em brand pra todos os interativos (focus-visible).
   Em componentes de entrada preferimos border-color, mas o ring funciona como
   fallback universal (inputs, botões, links, cards clicáveis). */
*:focus { outline: none; }
*:focus-visible {
  outline: 2px solid rgba(62,207,142,0.55);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Landing glow helper (usado na tela de login) */
.glow-brand {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  background: rgba(62,207,142,0.10);
  filter: blur(120px);
  border-radius: 9999px;
  pointer-events: none;
  z-index: 0;
}

/* Stat card — card de métrica com accent lateral colorido.
   Padrão do DESIGN_SYSTEM.md: aplicar `style="border-left: 3px solid <cor>"` inline. */
.stat-card {
  background: #171717;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 16px 20px;
  transition: border-color 150ms;
}
.stat-card:hover { border-color: rgba(255,255,255,0.10); }
.stat-card .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #A8A8A8;
  font-weight: 600;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.stat-card .value {
  font-family: "JetBrains Mono", monospace;
  font-size: 24px;
  font-weight: 600;
  color: #F0F0F0;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.stat-card .sub {
  font-size: 12px;
  color: #A8A8A8;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

/* Clickable variation — útil no card WAHA */
button.stat-card {
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

/* Status dot (bolinha colorida de status) */
.dot { width: 8px; height: 8px; border-radius: 9999px; display: inline-block; }
.dot-ok       { background: #3ECF8E; }
.dot-warn     { background: #F59E0B; }
.dot-info     { background: #38BDF8; animation: pulse 1.6s ease-in-out infinite; }
.dot-err      { background: #F43F5E; }
.dot-muted    { background: #666;    }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* Section title — label de seção */
.section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #7A7A7A;
  font-weight: 600;
}

/* Toast */
.toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  border: 1px solid rgba(255,255,255,0.10);
  background: #171717;
  color: #F0F0F0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 180ms, transform 180ms;
}
.toast.visible { opacity: 1; transform: translateY(0); }
.toast-ok  { border-color: rgba(62,207,142,0.35); }
.toast-err { border-color: rgba(244,63,94,0.45); color: #FCA5A5; }

/* Modal: foco visual + sem scroll no body quando aberto */
body.modal-open { overflow: hidden; }
