/* ==========================================
   ESTILOS GLOBAIS - VOLTZ GARAGE (css/style.css)
   Unificando identidade visual do painel e do site
=========================================== */

:root {
  --void: #07090d;
  --surface: #0e1218;
  --raised: #161c25;
  --hairline: rgba(255, 255, 255, .08);
  --texto: #f0f4f8;
  --dim: #9aa6b2;
  --corrente: #2aa8ff;
  --faisca: #f4a72a;
  --wpp: #25d366;
  --erro: #ff6b6b;
  --r-sm: 9px;
  --r-md: 13px;
  --r-card: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  background-color: var(--void);
  color: var(--texto);
  font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--corrente); text-decoration: none; }
a:hover { color: var(--texto); }

.text-glow-blue {
    text-shadow: 0 0 25px rgba(42, 168, 255, 0.4);
}

.text-glow-green {
    text-shadow: 0 0 25px rgba(34, 155, 56, 0.3);
}

html {
    scroll-behavior: smooth;
}

::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--void);
}
::-webkit-scrollbar-thumb {
    background: var(--raised);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--corrente);
}

/* Botão Flutuante do WhatsApp (Mantido e Integrado) */
.whatsapp-float {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    z-index: 99999 !important;
    width: 60px !important;
    height: 60px !important;
    background-color: var(--wpp) !important;
    color: #04250f !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.6) !important;
    animation: whatsapp-pulse 2s infinite !important;
    transition: all 0.3s ease !important;
}

.whatsapp-float:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.9) !important;
    background-color: #20ba5a !important;
    color: #04250f !important;
}

@keyframes whatsapp-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* ---------- topo ---------- */

.topo {
  background: rgba(14, 18, 24, .96);
  border-bottom: 1px solid var(--hairline);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topo-in {
  max-width: 1220px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.marca strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.marca span { font-size: 12.5px; color: var(--dim); }
.sair { color: var(--dim); text-decoration: none; font-size: 13.5px; }
.sair:hover { color: var(--texto); }

.wrap { max-width: 1220px; margin: 0 auto; padding: 22px 20px 60px; }

/* ---------- cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: 15px 17px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: rgba(255, 255, 255, .18); transform: translateY(-2px); }
.card.on { border-color: rgba(42, 168, 255, .5); }
.card .n { font-size: 27px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.card .l { font-size: 12px; color: var(--dim); letter-spacing: .04em; }
.card.ok .n { color: var(--corrente); }
.card.warn .n { color: var(--faisca); }
.card.bad .n { color: var(--erro); }
.card.warn.on { border-color: rgba(244, 167, 42, .5); }
.card.bad.on { border-color: rgba(255, 107, 107, .5); }

/* ---------- alerta ---------- */

.alerta {
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  background: var(--surface);
  padding: 13px 16px;
  margin-bottom: 16px;
  font-size: 14px;
}
.alerta.acao {
  border-color: rgba(244, 167, 42, .32);
  background: rgba(244, 167, 42, .06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.alerta.erro {
  border-color: rgba(255, 107, 107, .35);
  background: rgba(255, 107, 107, .08);
  color: #ffd3d3;
}

/* ---------- filtros ---------- */

.filtros {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
}
.filtros input[type="search"] { flex: 1; min-width: 200px; }
.periodo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--dim);
}

input, select {
  font: inherit;
  font-size: 14px;
  padding: 8px 11px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  background: var(--raised);
  color: var(--texto);
  max-width: 100%;
}
input::placeholder { color: #6b7681; }
input:focus, select:focus {
  outline: 2px solid var(--corrente);
  outline-offset: -1px;
  border-color: transparent;
}
input[type="date"] { color-scheme: dark; }

/* ---------- botões ---------- */

.btn {
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 15px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--raised);
  color: var(--texto);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
  transition: border-color .15s ease, background .15s ease;
}
.btn:hover { border-color: rgba(255, 255, 255, .2); color: var(--texto); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primario { background: var(--faisca); border-color: var(--faisca); color: #2a1c02; }
.btn.primario:hover { background: #ffc75e; border-color: #ffc75e; }
.btn.faisca { background: transparent; border-color: rgba(244, 167, 42, .4); color: var(--faisca); }
.btn.faisca:hover { border-color: var(--faisca); }
.btn.wpp { background: transparent; border-color: rgba(37, 214, 102, .4); color: var(--wpp); }
.btn.wpp:hover { border-color: var(--wpp); }
.btn.mini { font-size: 12.5px; padding: 5px 10px; border-radius: var(--r-sm); }
.btn.bloco { display: block; width: 100%; text-align: center; padding: 11px; margin-top: 6px; }
.vazio-link { color: var(--dim); }

/* ---------- tabela ---------- */

.tabela-wrap {
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  background: var(--surface);
  overflow-x: auto;
}
.tabela { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabela th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
  padding: 11px 14px;
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
}
.tabela td { padding: 11px 14px; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
.tabela tbody tr:last-child td { border-bottom: 0; }
.tabela .linha { cursor: pointer; }
.tabela .linha:hover td { background: rgba(255, 255, 255, .025); }
.tabela .linha.aberta td { background: rgba(42, 168, 255, .05); }
.tabela .linha:focus-visible { outline: 2px solid var(--corrente); outline-offset: -2px; }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.dim { color: var(--dim); }
.acoes { text-align: right; }
.acoes .btn + .btn { margin-left: 6px; }

.tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.tag.ok { color: var(--corrente); border-color: rgba(42, 168, 255, .35); background: rgba(42, 168, 255, .08); }
.tag.warn { color: var(--faisca); border-color: rgba(244, 167, 42, .35); background: rgba(244, 167, 42, .08); }
.tag.bad { color: var(--erro); border-color: rgba(255, 107, 107, .35); background: rgba(255, 107, 107, .08); }

/* ---------- detalhe ---------- */

.detalhe td { background: #0a0e13; padding: 18px 16px; }
.det-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px;
}
.det-bloco h3 {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
}
.det-bloco h3 + dl + h3 { margin-top: 16px; }

.respostas { margin: 0; font-size: 13.5px; }
.respostas dt { color: var(--dim); font-size: 12.5px; }
.respostas dd { margin: 1px 0 9px; }

.pares {
  margin: 0;
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 4px 10px;
  font-size: 13px;
}
.pares dt { color: var(--dim); }
.pares dd { margin: 0; }
.quebra { word-break: break-all; }

.det-erro {
  margin-top: 16px;
  border: 1px solid rgba(255, 107, 107, .3);
  background: rgba(255, 107, 107, .06);
  border-radius: var(--r-sm);
  padding: 11px 13px;
  font-size: 13px;
}
.det-erro strong { display: block; color: var(--erro); font-size: 12px; margin-bottom: 4px; }
.det-erro code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; word-break: break-word; }

/* ---------- paginação e vazio ---------- */

.paginacao {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  font-size: 13px;
  flex-wrap: wrap;
}
.pag-btns { display: flex; gap: 8px; }
.vazio {
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  background: var(--surface);
  padding: 34px 20px;
  text-align: center;
  color: var(--dim);
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  max-width: min(520px, calc(100vw - 32px));
  background: var(--raised);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 11px 17px;
  font-size: 13.5px;
  z-index: 50;
}
.toast.ok { border-color: rgba(42, 168, 255, .45); }
.toast.bad { border-color: rgba(255, 107, 107, .45); }

/* ---------- navegação do topo ---------- */

.nav { display: flex; align-items: center; gap: 18px; }
.nav a {
  color: var(--dim);
  text-decoration: none;
  font-size: 13.5px;
}
.nav a:hover { color: var(--texto); }
.nav a.on { color: var(--texto); font-weight: 600; }

.alerta.ok {
  border-color: rgba(42, 168, 255, .32);
  background: rgba(42, 168, 255, .06);
}
.alerta code, .estado code, .info code, .passos code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12.5px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--hairline);
  border-radius: 5px;
  padding: 1px 5px;
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .pares { grid-template-columns: 96px 1fr; }
  .dupla { grid-template-columns: 1fr; }
  .passos li { grid-template-columns: 32px 1fr; gap: 11px; padding: 14px; }
  .passo-n { width: 28px; height: 28px; font-size: 13.5px; }
  .nav { gap: 13px; }
  .topo-in { padding: 12px 14px; }
  .wrap { padding: 16px 14px 50px; }
}