/* =============================================================================
   XLabs Honeypot - tema "cyber" (dark neon, vibe SaaS de cyber security)
   Visual carregado: gradientes, glow, grid de fundo, KPIs grandes.
   ============================================================================= */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap");

:root {
  --bg-0:   #060912;
  --bg-1:   #0b1220;
  --bg-2:   #111b2f;
  --line:   rgba(120, 200, 255, .12);
  --line-2: rgba(120, 200, 255, .22);
  --ink:    #e6f1ff;
  --ink-soft:#b8c6dc;
  --ink-dim: #7d8aa3;
  --ink-mute:#5a6580;

  --neon:        #39ff14;
  --neon-soft:   rgba(57, 255, 20, .14);
  --cyan:        #22d3ee;
  --cyan-soft:   rgba(34, 211, 238, .12);
  --magenta:     #f472b6;
  --magenta-soft:rgba(244, 114, 182, .12);
  --amber:       #fbbf24;
  --amber-soft:  rgba(251, 191, 36, .14);
  --red:         #ef4444;
  --red-soft:    rgba(239, 68, 68, .14);

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ========================================================================== */
/* Scrollbars (tema cyber)                                                    */
/* ========================================================================== */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--cyan) var(--bg-1);
}
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track {
  background: var(--bg-1);
  border-left: 1px solid var(--line);
}
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--cyan), #1098b0);
  border: 2px solid var(--bg-1);
  border-radius: 6px;
  box-shadow: 0 0 8px var(--cyan-soft);
}
*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--neon), #1ea810);
  box-shadow: 0 0 12px var(--neon-soft);
}
*::-webkit-scrollbar-corner { background: var(--bg-1); }

body {
  font-family: var(--font-sans);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(34,211,238,.08), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(57,255,20,.06), transparent 60%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1));
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Grid neon de fundo */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
  z-index: 0;
}
main, header, footer { position: relative; z-index: 1; }

a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--neon); text-shadow: 0 0 8px var(--neon-soft); }

code, kbd, samp {
  font-family: var(--font-mono);
  font-size: .9em;
  background: rgba(34,211,238,.08);
  border: 1px solid var(--line-2);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--cyan);
}

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 .5em;
  color: var(--ink);
}
h1 { font-size: clamp(2rem, 1.2rem + 2.6vw, 3.4rem); }
h2 { font-size: clamp(1.4rem, 1rem + 1.2vw, 1.9rem); }
h3 { font-size: 1.1rem; font-weight: 600; }
h4 { font-size: .95rem; font-weight: 600; }

p { margin: 0 0 1em; color: var(--ink-soft); }
.muted { color: var(--ink-mute); }
.small { font-size: .82rem; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ========================================================================== */
/* Cabeçalho                                                                    */
/* ========================================================================== */
.site-header {
  background: rgba(6, 9, 18, .75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-2);
  position: sticky; top: 0; z-index: 50;
}
.masthead { border-bottom: 1px solid var(--line); }
.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 28px;
  font-family: var(--font-mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--ink-dim);
  max-width: 1180px; margin: 0 auto; width: 100%;
}
.masthead-issue { display: flex; gap: 14px; align-items: center; }
.masthead-issue .sep { color: var(--ink-mute); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 28px;
  max-width: 1180px; margin: 0 auto; width: 100%;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--ink); text-decoration: none;
}
.brand:hover { color: var(--neon); }
.brand-logo {
  height: 36px; width: auto; display: block;
  filter: drop-shadow(0 0 10px rgba(57,255,20,.35));
}
.brand-tag {
  font-family: var(--font-mono);
  color: var(--ink-dim);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  padding-left: 12px;
  border-left: 1px solid var(--line-2);
}
@media (max-width: 720px) { .brand-tag { display: none; } }

.site-nav { display: flex; gap: 18px; align-items: center; font-size: .92rem; }
.site-nav a {
  color: var(--ink-soft);
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover { color: var(--neon); border-bottom-color: var(--neon); text-shadow: 0 0 6px var(--neon-soft); }

.mode-stamp {
  font-family: var(--font-mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  padding: 6px 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  display: inline-flex; align-items: center; gap: 8px;
}
.mode-stamp::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}
.mode-red     { color: var(--red);   background: var(--red-soft); }
.mode-amber   { color: var(--amber); background: var(--amber-soft); }
.mode-emerald { color: var(--neon);  background: var(--neon-soft); }

/* ========================================================================== */
/* Dateline / cabeçalhos de seção                                               */
/* ========================================================================== */
.dateline {
  font-family: var(--font-mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--cyan);
  display: flex; gap: 14px; align-items: center;
  margin: 36px 0 14px;
}
.dateline::before {
  content: "";
  width: 28px;
  border-top: 1px solid var(--cyan);
  box-shadow: 0 0 6px var(--cyan-soft);
}

/* ========================================================================== */
/* Hero                                                                         */
/* ========================================================================== */
.hero {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 36px;
  padding: 12px 0 48px;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; gap: 24px; } }

.hero h1 {
  background: linear-gradient(135deg, #ffffff 0%, var(--cyan) 50%, var(--neon) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
  letter-spacing: -0.025em;
}
.hero .lede { font-size: 1.06rem; color: var(--ink-soft); max-width: 60ch; margin-top: 14px; }
.hero .lede:first-letter {
  font-family: var(--font-sans);
  font-size: 1.06rem; /* sem capitular nesse tema */
  float: none;
  padding: 0;
}

.hero-actions { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }

.hero-aside {
  background: linear-gradient(180deg, rgba(34,211,238,.06), rgba(11,18,32,.75));
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 18px 18px 14px;
  box-shadow: 0 0 0 1px rgba(34,211,238,.05) inset, 0 12px 40px -12px rgba(34,211,238,.25);
}
.aside-head {
  font-family: var(--font-mono);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--ink-dim);
  border-bottom: 1px dashed var(--line-2);
  padding-bottom: 8px;
  margin-bottom: 12px;
  display: flex; justify-content: space-between;
}
.aside-head .live { color: var(--neon); text-shadow: 0 0 10px var(--neon-soft); }
.aside-head .live::before {
  content: "● ";
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }

.aside-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  border-bottom: 1px dashed var(--line-2);
  padding-bottom: 14px;
  margin-bottom: 12px;
}
.aside-stats div { display: flex; flex-direction: column; }
.aside-stats .n {
  font-family: var(--font-mono);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--neon);
  text-shadow: 0 0 12px var(--neon-soft);
  font-variant-numeric: tabular-nums;
}
.aside-stats .l {
  font-family: var(--font-mono);
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--ink-dim);
}

.aside-feed { list-style: none; margin: 0; padding: 0; font-family: var(--font-mono); font-size: .8rem; }
.aside-feed li {
  display: grid; grid-template-columns: auto 1fr; column-gap: 10px;
  padding: 6px 0; border-bottom: 1px dashed var(--line);
  color: var(--ink-soft);
}
.aside-feed li:last-child { border-bottom: none; }
.aside-feed .t { color: var(--ink-dim); }
.aside-feed .p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aside-feed li.sev-high   .p,
.aside-feed li.sev-critical .p { color: var(--red); }
.aside-feed li.sev-medium .p { color: var(--amber); }
.aside-feed li.empty { display: block; text-align: center; color: var(--ink-mute); padding: 18px 0; }

/* ========================================================================== */
/* Botões                                                                       */
/* ========================================================================== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  font-family: var(--font-sans); font-size: .92rem; font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid var(--neon);
  background: var(--neon);
  color: #04150a;
  cursor: pointer;
  box-shadow: 0 0 18px var(--neon-soft);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 0 28px rgba(57,255,20,.5); color: #04150a; }
.btn-ghost {
  background: transparent; color: var(--cyan);
  border-color: var(--cyan); box-shadow: 0 0 14px var(--cyan-soft);
}
.btn-ghost:hover { background: var(--cyan-soft); color: var(--cyan); }
.btn.is-disabled,
.btn-ghost.is-disabled {
  opacity: .45; pointer-events: none; cursor: not-allowed;
  box-shadow: none;
}

.pagination {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 14px; flex-wrap: wrap;
}
.pagination .pagination-status { flex: 1 1 auto; text-align: center; }

/* ========================================================================== */
/* Tabela de cenários (modes-table)                                             */
/* ========================================================================== */
.section { padding: 36px 0; border-bottom: 1px solid var(--line); }
.section h2 { margin-bottom: 6px; }
.section .lede { color: var(--ink-soft); max-width: 70ch; margin: 0 0 22px; }

.modes-table {
  width: 100%;
  border-collapse: separate; border-spacing: 0 8px;
  margin-top: 10px;
}
.modes-table th, .modes-table td {
  text-align: left; padding: 14px 16px; vertical-align: top;
}
.modes-table th {
  font-family: var(--font-mono);
  font-size: .68rem; text-transform: uppercase; letter-spacing: .16em;
  color: var(--ink-dim); font-weight: 500;
}
.modes-table tbody tr {
  background: rgba(17, 27, 47, .65);
  border: 1px solid var(--line-2);
}
.modes-table tbody td {
  border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
}
.modes-table tbody td:first-child { border-left: 1px solid var(--line-2); border-top-left-radius: 10px; border-bottom-left-radius: 10px; }
.modes-table tbody td:last-child  { border-right: 1px solid var(--line-2); border-top-right-radius: 10px; border-bottom-right-radius: 10px; }
.modes-table td .host { font-family: var(--font-mono); color: var(--cyan); }
.modes-table td .cenario { color: var(--ink-soft); font-size: .92rem; }
.modes-table tr.is-active td { background: rgba(57,255,20,.06); box-shadow: inset 0 0 0 1px rgba(57,255,20,.35); }
.modes-table tr.is-active .host { color: var(--neon); text-shadow: 0 0 10px var(--neon-soft); }
.modes-table .stamp-cell { width: 1%; white-space: nowrap; }

/* ========================================================================== */
/* Lista de vulnerabilidades (entries) - cards neon                              */
/* ========================================================================== */
.entries {
  list-style: none; margin: 18px 0 0; padding: 0;
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.entry {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr auto;
  gap: 8px 16px;
  padding: 18px 18px;
  background: linear-gradient(180deg, rgba(17,27,47,.85), rgba(11,18,32,.85));
  border: 1px solid var(--line-2);
  border-radius: 14px;
  text-decoration: none; color: inherit;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
  position: relative; overflow: hidden;
}
.entry::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(400px 120px at 0% 0%, rgba(57,255,20,.08), transparent 60%);
  pointer-events: none;
}
.entry:hover {
  transform: translateY(-2px);
  border-color: var(--neon);
  box-shadow: 0 12px 40px -10px rgba(57,255,20,.35);
  color: inherit;
}
.entry .seq {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .14em;
  color: var(--cyan); text-transform: uppercase;
  grid-row: 1; grid-column: 1;
}
.entry .body { grid-row: 1 / span 3; grid-column: 2; }
.entry .body h3 {
  font-family: var(--font-sans); font-size: 1.1rem; font-weight: 700;
  margin: 0 0 6px; color: var(--ink);
}
.entry .body p { margin: 0 0 8px; color: var(--ink-soft); font-size: .92rem; }
.entry .body .target { font-family: var(--font-mono); font-size: .8rem; color: var(--ink-dim); }
.entry .tag {
  font-family: var(--font-mono); font-size: .65rem; letter-spacing: .14em;
  text-transform: uppercase; padding: 4px 10px; border-radius: 999px;
  border: 1px solid currentColor; align-self: start; white-space: nowrap;
  grid-row: 1; grid-column: 1;
  justify-self: start;
}
.tag-sqli     { color: var(--red);     background: var(--red-soft); }
.tag-xss      { color: var(--amber);   background: var(--amber-soft); }
.tag-leak     { color: var(--cyan);    background: var(--cyan-soft); }
.tag-recon    { color: var(--ink-dim); background: rgba(125,138,163,.1); }
.tag-auth     { color: var(--magenta); background: var(--magenta-soft); }
.tag-lfi      { color: var(--amber);   background: var(--amber-soft); }
.tag-rce      { color: #fff;           background: var(--red); border-color: var(--red); }
.tag-ssrf     { color: var(--cyan);    background: var(--cyan-soft); }
.tag-ssti     { color: var(--magenta); background: var(--magenta-soft); }
.tag-redirect { color: var(--ink-dim); background: rgba(125,138,163,.1); }
.tag-cve      { color: #fff;           background: var(--magenta); border-color: var(--magenta); letter-spacing: .04em; }

.entry .seq { display: none; } /* tag substitui o número no tema cyber */

/* ========================================================================== */
/* Note callout                                                                 */
/* ========================================================================== */
.note {
  background: linear-gradient(135deg, rgba(34,211,238,.08), rgba(57,255,20,.05));
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--cyan);
  border-radius: 12px;
  padding: 18px 22px;
  margin: 28px 0;
}
.note h2 {
  font-size: 1.2rem; margin-top: 0; color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan-soft);
}
.note p { color: var(--ink-soft); }

/* ========================================================================== */
/* Páginas internas                                                             */
/* ========================================================================== */
.page-head { padding: 36px 0 14px; border-bottom: 1px solid var(--line); }
.page-head h1 { margin-bottom: 8px; }
.page-head .lede { color: var(--ink-soft); max-width: 70ch; }

.prose { max-width: 760px; margin: 24px auto 60px; }
.prose h2 { margin-top: 32px; font-size: 1.4rem; color: var(--cyan); }
.prose ol, .prose ul { color: var(--ink-soft); padding-left: 22px; }
.prose li { margin: 8px 0; }
.prose strong { color: var(--ink); }

.kv-list { list-style: none; padding: 0; margin: 12px 0; }
.kv-list li {
  display: grid; grid-template-columns: 200px 1fr;
  padding: 10px 0; border-bottom: 1px dashed var(--line-2);
  font-size: .92rem;
}
.kv-list li span {
  color: var(--ink-dim); font-family: var(--font-mono);
  font-size: .82rem; text-transform: uppercase; letter-spacing: .1em;
}
.kv-list li strong { color: var(--ink); font-weight: 500; }

/* ========================================================================== */
/* Forms                                                                        */
/* ========================================================================== */
.search-form { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0; }
.search-form input {
  flex: 1 1 280px;
  background: rgba(11,18,32,.75);
  border: 1px solid var(--line-2);
  color: var(--ink);
  padding: 11px 14px;
  border-radius: 10px;
  font-family: var(--font-mono); font-size: .95rem;
}
.search-form input:focus {
  outline: none;
  border-color: var(--neon);
  box-shadow: 0 0 0 3px var(--neon-soft);
}

.auth-form {
  display: grid; gap: 12px; max-width: 420px;
  background: rgba(17,27,47,.7);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 22px;
  margin-top: 18px;
}
.auth-form label {
  display: grid; gap: 6px;
  font-size: .78rem; color: var(--ink-dim);
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .12em;
}
.auth-form input {
  background: rgba(11,18,32,.75);
  border: 1px solid var(--line-2);
  color: var(--ink);
  padding: 10px 12px; border-radius: 8px;
  font-family: var(--font-mono); font-size: .95rem;
}
.auth-form input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-soft); }

.sql-debug {
  font-size: .82rem;
  background: rgba(11,18,32,.7);
  border: 1px dashed var(--line-2);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 14px 0;
  color: var(--ink-soft);
  font-family: var(--font-mono);
}
.sql-debug code { background: transparent; border: none; padding: 0; color: var(--cyan); }

.alert {
  padding: 12px 14px; margin: 12px 0 18px;
  border-left: 3px solid;
  border-radius: 8px;
  font-size: .94rem; font-family: var(--font-mono);
}
.alert-ok    { border-color: var(--neon);  background: var(--neon-soft);  color: var(--neon); }
.alert-warn  { border-color: var(--amber); background: var(--amber-soft); color: var(--amber); }
.alert-error { border-color: var(--red);   background: var(--red-soft);   color: var(--red); }

.reflect-card {
  background: rgba(17,27,47,.7);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 18px 22px; margin-top: 18px;
}
.reflect-card h3 {
  font-family: var(--font-mono); font-size: .9rem;
  background: rgba(11,18,32,.75);
  border: 1px dashed var(--line-2);
  border-radius: 8px;
  padding: 10px 14px; word-break: break-word; font-weight: 500; margin-bottom: 14px;
  color: var(--cyan);
}
.result-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.result-list li { border-top: 1px dashed var(--line-2); padding: 10px 0; }
.result-list li:last-child { border-bottom: 1px dashed var(--line-2); }
.result-list strong { color: var(--ink); font-size: 1.05rem; }
.result-list p { margin: 4px 0 0; color: var(--ink-soft); font-size: .9rem; }

/* ========================================================================== */
/* Tabelas de dados                                                              */
/* ========================================================================== */
.data-table {
  width: 100%; border-collapse: collapse; margin-top: 10px; font-size: .9rem;
}
.data-table th, .data-table td {
  text-align: left; padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.data-table th {
  background: rgba(17,27,47,.6);
  font-family: var(--font-mono); font-size: .68rem;
  text-transform: uppercase; letter-spacing: .16em; color: var(--ink-dim);
  font-weight: 500;
}
.data-table td { color: var(--ink-soft); font-family: var(--font-mono); font-size: .85rem; }
.data-table td.num, .data-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table tbody tr:hover { background: rgba(34,211,238,.05); }

.pill {
  display: inline-block; font-family: var(--font-mono);
  font-size: .65rem; text-transform: uppercase; letter-spacing: .14em;
  padding: 3px 9px; border-radius: 999px;
  border: 1px solid currentColor; font-weight: 500;
}
.pill.sev-low      { color: var(--ink-dim); }
.pill.sev-medium   { color: var(--amber); background: var(--amber-soft); }
.pill.sev-high     { color: var(--red);   background: var(--red-soft); }
.pill.sev-critical { color: #fff; background: var(--red); border-color: var(--red); box-shadow: 0 0 10px var(--red-soft); }

.sev-row.sev-critical { background: rgba(239,68,68,.06); }
.sev-row.sev-high td:first-child   { box-shadow: inset 3px 0 0 var(--red); }
.sev-row.sev-medium td:first-child { box-shadow: inset 3px 0 0 var(--amber); }

/* ========================================================================== */
/* KPIs                                                                          */
/* ========================================================================== */
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 18px 0 28px;
}
.kpi {
  background: linear-gradient(180deg, rgba(17,27,47,.85), rgba(11,18,32,.85));
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 4px;
}
.kpi-label {
  font-family: var(--font-mono); color: var(--ink-dim);
  font-size: .68rem; text-transform: uppercase; letter-spacing: .16em;
}
.kpi-value {
  font-family: var(--font-mono);
  font-size: 2.2rem; font-weight: 700;
  color: var(--neon); text-shadow: 0 0 14px var(--neon-soft);
  font-variant-numeric: tabular-nums;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 24px 0; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }

.panel {
  background: linear-gradient(180deg, rgba(17,27,47,.75), rgba(11,18,32,.85));
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 18px 20px;
}
.panel h3 {
  margin-top: 0; margin-bottom: 12px;
  font-family: var(--font-mono); font-weight: 500;
  font-size: .78rem; text-transform: uppercase; letter-spacing: .14em;
  color: var(--cyan);
  border-bottom: 1px dashed var(--line-2); padding-bottom: 8px;
}
.panel-header {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 1px dashed var(--line-2);
  padding-bottom: 8px; margin-bottom: 12px;
}
.panel-header h3 { margin: 0; padding: 0; border: none; }

.bar-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.bar-list li {
  display: grid; grid-template-columns: 130px 1fr 40px;
  gap: 12px; align-items: center;
  font-family: var(--font-mono); font-size: .82rem;
}
.bar-label { color: var(--ink-soft); text-transform: capitalize; }
.bar-label.sev-low      { color: var(--ink-dim); }
.bar-label.sev-medium   { color: var(--amber); }
.bar-label.sev-high     { color: var(--red); }
.bar-label.sev-critical { color: var(--red); font-weight: 700; }
.bar { height: 8px; background: rgba(17,27,47,.7); border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; }
.bar > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--neon));
  box-shadow: 0 0 8px var(--neon-soft);
  min-width: 4px;
}
.bar-value { font-variant-numeric: tabular-nums; color: var(--ink); text-align: right; }

/* ========================================================================== */
/* Footer                                                                        */
/* ========================================================================== */
.site-footer {
  border-top: 1px solid var(--line-2);
  margin-top: 60px;
  padding: 26px 0;
  font-family: var(--font-mono);
  font-size: .76rem;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--ink-dim);
}
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.footer-inner strong { color: var(--neon); font-weight: 600; }

/* ========================================================================== */
/* Flash                                                                         */
/* ========================================================================== */
@keyframes flash-in {
  from { background-color: rgba(57,255,20,.18); box-shadow: inset 0 0 0 1px var(--neon); }
  to   { background-color: transparent; box-shadow: none; }
}
.flash-new { animation: flash-in 1.6s ease-out; }
@media (prefers-reduced-motion: reduce) { .flash-new { animation: none; } }

/* ========================================================================== */
/* Seletor de tema                                                               */
/* ========================================================================== */
.theme-switch {
  display: inline-flex;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(11,18,32,.6);
}
.theme-switch a {
  font-family: var(--font-mono);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  padding: 6px 12px;
  color: var(--ink-dim);
  text-decoration: none;
  border-right: 1px solid var(--line-2);
}
.theme-switch a:last-child { border-right: none; }
.theme-switch a:hover { color: var(--cyan); background: var(--cyan-soft); }
.theme-switch a.is-active {
  color: var(--neon);
  background: var(--neon-soft);
  text-shadow: 0 0 8px var(--neon-soft);
}

/* ========================================================================== */
/* Gráfico de tráfego (dashboard)                                              */
/* ========================================================================== */
.chart-wrap {
  width: 100%;
  margin: 14px 0 6px;
  padding: 16px 18px;
  border: 1px solid var(--line-2);
  background:
    linear-gradient(180deg, rgba(34,211,238,.04), transparent 60%),
    var(--bg-1);
  border-radius: 10px;
  overflow-x: auto;
}
.chart-wrap svg { display: block; width: 100%; height: auto; min-width: 480px; }
.chart-wrap .ax-label { fill: var(--ink-mute); font: 11px var(--font-mono); }
.chart-wrap .ax-axis  { stroke: var(--line-2); }
.chart-wrap .row-label { fill: var(--ink); font: 12px var(--font-mono); text-transform: uppercase; letter-spacing: .12em; }
.chart-wrap .bar-req   { fill: var(--cyan); filter: drop-shadow(0 0 6px rgba(34,211,238,.35)); }
.chart-wrap .bar-att   { fill: var(--neon); filter: drop-shadow(0 0 6px rgba(57,255,20,.35)); }
.chart-wrap .bar-num   { fill: var(--ink-soft); font: 11px var(--font-mono); }
.chart-wrap .bar-pct   { fill: var(--neon); font: 11px var(--font-mono); font-weight: 700; }

.chart-legend {
  display: flex;
  gap: 18px;
  margin: 8px 0 4px;
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: .12em;
}
.chart-legend .legend-item { display: inline-flex; align-items: center; gap: 8px; }
.chart-legend .swatch { width: 14px; height: 14px; display: inline-block; border-radius: 3px; border: 1px solid var(--line-2); }
.chart-legend .swatch-req { background: var(--cyan); box-shadow: 0 0 6px rgba(34,211,238,.5); }
.chart-legend .swatch-att { background: var(--neon); box-shadow: 0 0 6px rgba(57,255,20,.5); }

/* Geo-pill: bandeira do país (XLabs GeoIP) */
.geo-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: .78rem;
  padding: 2px 9px 2px 6px;
  border: 1px solid var(--line-2);
  background: rgba(34, 211, 238, 0.06);
  color: var(--cyan);
  border-radius: 999px;
  white-space: nowrap;
  text-shadow: 0 0 6px rgba(34,211,238,.45);
}
.geo-pill .geo-flag { font-size: 1.05em; line-height: 1; filter: drop-shadow(0 0 4px rgba(34,211,238,.4)); }
.geo-pill .geo-name { letter-spacing: .04em; }

/* lipis/flag-icons — bandeira SVG integrada ao tema cyber */
.geo-pill .geo-flag.fi {
  width: 20px; line-height: 1; vertical-align: -3px;
  border: 1px solid rgba(34,211,238,.45);
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(34,211,238,.35);
  filter: none;
}

/* ========================================================================== */
/* Dashboard tables — fixes p/ overflow horizontal e IPv6 longos              */
/* ========================================================================== */

/* Grid items por padrão tem min-width: min-content, o que impede o
   shrink e força o overflow horizontal — comum quando há tabelas
   com IPv6 longos dentro de .grid-2. */
.grid-2 > * { min-width: 0; }

/* Quando a tabela mesmo assim ficar mais larga que o painel, o scroll
   acontece dentro do painel — não estoura a página inteira. */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--cyan) var(--bg-1);
}

/* Quebrar IPv6/paths longos sem comprometer o monoespaçamento. */
.data-table code { word-break: break-all; overflow-wrap: anywhere; }

/* --- Top IPs (panel da esquerda no grid-2) ------------------------------ */
.data-table--top-ips { table-layout: auto; width: 100%; }
.data-table--top-ips th,
.data-table--top-ips td { padding-left: 8px; padding-right: 8px; }
.data-table--top-ips .col-ip      { width: 1%; white-space: nowrap; }
.data-table--top-ips .col-ip code { white-space: nowrap; word-break: normal; overflow-wrap: normal; }
/* col-geo é a única flexível: encolhe e trunca com ellipsis em telas estreitas. */
.data-table--top-ips .col-geo     { width: auto; min-width: 0; max-width: 1px; }
.data-table--top-ips .col-geo .geo-pill {
  display: inline-flex; max-width: 100%; min-width: 0; overflow: hidden; vertical-align: middle;
}
.data-table--top-ips .col-geo .geo-name {
  flex: 1 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.data-table--top-ips .col-num     { width: 1%; white-space: nowrap; }
.data-table--top-ips .col-actions { width: 1%; white-space: nowrap; text-align: right; padding-right: 4px; }
.data-table--top-ips .col-actions .btn {
  padding: 3px 10px;
  font-size: .7rem;
  font-weight: 500;
  border-radius: 999px;
  gap: 4px;
  box-shadow: none;
}
.data-table--top-ips .col-actions .btn:hover {
  transform: none;
  box-shadow: 0 0 10px var(--cyan-soft);
}

/* --- Stream de eventos (8 colunas) -------------------------------------- */
.data-table--stream { table-layout: auto; min-width: 760px; }
.data-table--stream th,
.data-table--stream td { padding-left: 8px; padding-right: 8px; }
.data-table--stream .col-time   { width: 78px;  white-space: nowrap; }
.data-table--stream .col-sev    { width: 70px; }
.data-table--stream .col-method { width: 56px;  white-space: nowrap; }
/* Largura explícita (não usar min-width + width juntos — o navegador
   ignora um dos dois em table-layout: auto, e o conteúdo quebrava nos
   hífens, ex.: `xlabs-pro` virava `xlabs-` / `pro`). */
.data-table--stream .col-geo    { width: 72px;  white-space: nowrap; word-break: keep-all; overflow-wrap: normal; }
.data-table--stream .col-mode   { width: 92px;  white-space: nowrap; word-break: keep-all; overflow-wrap: normal; }
.data-table--stream .col-mode > *,
.data-table--stream .col-geo > * { white-space: nowrap; }
/* Path: pode quebrar em URLs muito longas, mas reserva espaço pra
   caminhos comuns como /wp-admin/images/admin.php sem fatiar. */
.data-table--stream .col-path   { min-width: 180px; max-width: 280px; overflow: hidden; }
.data-table--stream .col-path code {
  display: inline-block; max-width: 100%; vertical-align: middle;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* IP: nunca quebra. IPv4 cabe inteiro (15 chars ~ 130px em monospace);
   IPv6 longo trunca com reticências (sobrescreve o break-all global de
   .data-table code). */
.data-table--stream .col-ip      { min-width: 150px; max-width: 210px; white-space: nowrap; }
.data-table--stream .col-ip a,
.data-table--stream .col-ip code {
  display: inline-block; max-width: 100%; vertical-align: middle;
  white-space: nowrap; word-break: normal; overflow-wrap: normal;
  overflow: hidden; text-overflow: ellipsis;
}

/* Pílula geográfica não pode quebrar entre bandeira e nome. */
.geo-pill { white-space: nowrap; flex-wrap: nowrap; }
.geo-pill .geo-flag,
.geo-pill .geo-name { flex: 0 0 auto; white-space: nowrap; }
