/* ============================================================
   SOPHEL-K · Dashboard Operacional — Layout (grid rígido)
   Header 70px | Sidebar 200px | Main ~70% | Right ~30%
   ============================================================ */

/* ── GRID RAIZ ─────────────────────────────────────────── */
.app {
  display: grid;
  grid-template-columns: 200px 1fr 340px;
  grid-template-rows: 70px 1fr;
  grid-template-areas:
    "header header header"
    "sidebar main right";
  height: 100vh;
  gap: 8px;
  padding: 8px;
  background:
    radial-gradient(ellipse 60% 40% at 70% -10%, rgba(0, 212, 255, 0.04), transparent),
    var(--bg);
}

/* ═══ HEADER ═════════════════════════════════════════════ */
.app-header {
  grid-area: header;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  background: linear-gradient(180deg, #060b12, #040810);
  border: 1px solid var(--border);
  border-radius: 6px;
}

/* logo triangular */
.logo-tri {
  width: 26px; height: 26px; flex-shrink: 0;
  background:
    linear-gradient(135deg, transparent 46%, var(--red) 46%, var(--red) 54%, transparent 54%),
    conic-gradient(from 90deg at 50% 40%, transparent 0 60deg, #ff2a4d 60deg 120deg, #ff2a4dcc 120deg 180deg, #a855f7 180deg 240deg, #00d4ff 240deg 300deg, #00d4ffaa 300deg 360deg);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  filter: drop-shadow(0 0 4px rgba(255,42,77,.5));
}

.hd-brand { line-height: 1.15; }
.hd-name { font-family: var(--sans); font-weight: 700; font-size: 12.5px; letter-spacing: 0.18em; color: #fff; }
.hd-sub { font-family: var(--mono); font-size: 7.5px; letter-spacing: 0.26em; color: var(--text-dim); }

.hd-sep { width: 1px; height: 32px; background: linear-gradient(180deg, transparent, var(--border-strong), transparent); }

.hd-sys { display: flex; align-items: center; gap: 8px; font-size: 10.5px; }
.sys-tag { color: var(--cyan); border: 1px solid rgba(0,212,255,.35); padding: 2px 8px; border-radius: 3px; background: rgba(0,212,255,.06); }
.sys-online { color: var(--green); display: flex; align-items: center; gap: 5px; font-size: 10px; }

.hd-stats { display: flex; gap: 6px; }
.stat-chip {
  display: flex; flex-direction: column; align-items: center; gap: 0;
  border: 1px solid var(--border); border-radius: 4px;
  padding: 3px 10px; background: rgba(0,0,0,.35);
  min-width: 46px;
}
.stat-chip .lbl { font-size: 7px; letter-spacing: .18em; color: var(--text-dim); }
.stat-chip .val { font-size: 12px; color: var(--cyan); font-weight: 700; }

.hd-center { flex: 1; display: flex; justify-content: center; min-width: 0; }
.hd-search {
  display: flex; align-items: center; gap: 8px;
  width: 100%; max-width: 420px;
  border: 1px solid rgba(0,212,255,.2); border-radius: 4px;
  padding: 6px 12px; color: var(--text-dim);
  background: rgba(3,6,9,.7);
}
.hd-search input { background: none; border: none; outline: none; color: var(--text); font-family: var(--mono); font-size: 11px; width: 100%; }
.hd-search input::placeholder { color: rgba(91,130,145,.55); }

.hd-right { display: flex; align-items: center; gap: 12px; }
.icon-btn {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 4px;
  background: rgba(0,212,255,.05); border: 1px solid var(--border);
  color: var(--text-dim); cursor: pointer; transition: all .15s;
}
.icon-btn:hover { color: var(--cyan); border-color: rgba(0,212,255,.4); }
.notif-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--red); color: #fff;
  font-size: 8px; font-weight: 700; font-family: var(--mono);
  width: 13px; height: 13px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 6px rgba(255,42,77,.6);
}
.hd-profile { display: flex; align-items: center; gap: 8px; padding: 3px 10px; border: 1px solid var(--border); border-radius: 5px; background: rgba(0,0,0,.35); }
.avatar {
  width: 26px; height: 26px; border-radius: 4px;
  background: linear-gradient(135deg, #a855f7, #ff2a4d);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; color: #fff; font-family: var(--mono);
}
.p-name { font-size: 11px; color: #fff; font-weight: 700; }
.p-status { font-size: 8.5px; color: var(--green); display: flex; gap: 4px; align-items: center; }
.hd-clock { text-align: right; line-height: 1.3; }
#clock-date { font-size: 10px; color: var(--text-dim); }
#clock-time { font-size: 13px; color: var(--cyan); font-weight: 600; }

/* ═══ SIDEBAR ════════════════════════════════════════════ */
.sidebar {
  grid-area: sidebar;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #050a10, #030609);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 10px 0 0;
  overflow: hidden;
}
.sb-title {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .22em;
  color: var(--text-dim); padding: 4px 14px 10px;
  border-bottom: 1px solid rgba(0,212,255,.08);
}
.sb-menu { flex: 1; overflow-y: auto; padding: 6px 0; }
.sb-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 14px; cursor: pointer;
  color: #7fb3c4; font-size: 12px;
  border-left: 2px solid transparent;
  transition: all .12s;
  user-select: none; position: relative;
}
.sb-item .ic { width: 16px; text-align: center; font-size: 12px; opacity: .8; }
.sb-item .arr { margin-left: auto; color: rgba(91,130,145,.5); font-size: 10px; }
.sb-item:hover { background: rgba(0,212,255,.05); color: var(--cyan); }
.sb-item.active {
  background: linear-gradient(90deg, rgba(255,42,77,.14), rgba(255,42,77,.03) 70%, transparent);
  border-left: 2px solid var(--red);
  color: #fff;
}
.sb-item.active .ic { color: var(--red); opacity: 1; }

.sb-status {
  margin: 8px; padding: 10px 12px;
  border: 1px solid rgba(0,212,255,.15); border-radius: 6px;
  background: rgba(0,0,0,.4);
}
.sb-st-title { font-family: var(--mono); font-size: 8px; letter-spacing: .18em; color: var(--text-dim); margin-bottom: 6px; }
.sb-st-online { font-family: var(--mono); font-size: 11px; color: var(--green); display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.sb-st-row { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-dim); padding: 2px 0; }
.sb-st-row b { color: var(--text); font-weight: 600; }
.sb-st-row.key-row b { color: var(--amber); }

.sb-footer {
  padding: 10px 14px; border-top: 1px solid rgba(0,212,255,.08);
  font-size: 9px; letter-spacing: .14em; color: var(--text-dim);
  display: flex; flex-direction: column; gap: 2px;
}
.sb-footer .mono { color: var(--cyan); font-size: 10px; }

/* ═══ MAIN ═══════════════════════════════════════════════ */
.main {
  grid-area: main;
  display: flex; flex-direction: column;
  gap: 8px;
  min-height: 0; min-width: 0;
  overflow: hidden;
}

.page-title h1 { font-size: 15px; font-weight: 700; letter-spacing: .2em; color: #fff; }
.page-title p { font-size: 10px; color: var(--text-dim); font-family: var(--mono); letter-spacing: .08em; }

/* ── métricas ── */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.m-card {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(180deg, #050a10, #040810);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 12px 14px;
  position: relative; overflow: hidden;
}
.m-card::after {
  content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(180deg, transparent, var(--border-strong), transparent);
}
.m-icon {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid; flex-shrink: 0;
}
.cyan-ic { color: var(--cyan); border-color: rgba(0,212,255,.35); background: rgba(0,212,255,.07); }
.red-ic { color: var(--red); border-color: rgba(255,42,77,.4); background: rgba(255,42,77,.07); }
.purple-ic { color: var(--purple); border-color: rgba(168,85,247,.4); background: rgba(168,85,247,.08); }
.m-label { font-size: 8.5px; letter-spacing: .14em; color: var(--text-dim); text-transform: uppercase; margin-bottom: 2px; }
.m-value { font-size: 21px; font-weight: 700; color: #fff; line-height: 1; }
.m-value .m-total { font-size: 12px; color: var(--text-dim); font-weight: 500; }

.m-card.zero { border-color: rgba(168,85,247,.45); background: linear-gradient(180deg, rgba(168,85,247,.09), rgba(255,42,77,.05) 60%, #040810); }
.m-card.zero .m-value { color: var(--purple); text-shadow: 0 0 12px rgba(168,85,247,.45); }
.zd-pulse { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 22px rgba(168,85,247,.16); border-radius: 6px; }

/* ── meio: mapa | alvos | visual ── */
.mid-grid {
  display: grid;
  grid-template-columns: 1fr 230px 170px;
  gap: 8px;
  flex: 1;
  min-height: 0;
}
.map-body { padding: 6px !important; position: relative; }
#world-map { width: 100%; height: 100%; display: block; }
.map-legend {
  display: flex; gap: 14px; align-items: center;
  padding: 5px 10px; border-top: 1px solid rgba(0,212,255,.08);
  font-size: 9px; color: var(--text-dim);
}
.map-legend span { display: flex; align-items: center; gap: 5px; }
.map-legend i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

/* alvos */
.targets-list { display: flex; flex-direction: column; gap: 6px; }
.t-item {
  border: 1px solid rgba(0,212,255,.12); border-radius: 5px;
  padding: 7px 9px; cursor: default;
  background: rgba(0,0,0,.3);
  transition: all .12s;
}
.t-item:hover { border-color: rgba(0,212,255,.35); background: rgba(0,212,255,.04); }
.t-top { display: flex; align-items: center; gap: 6px; }
.t-ic { font-size: 10px; opacity: .8; }
.t-name { font-family: var(--mono); font-size: 10.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-meta { display: flex; justify-content: space-between; margin-top: 3px; font-size: 9px; }
.t-type { color: var(--text-dim); font-family: var(--mono); }
.t-vulns { color: var(--red); font-family: var(--mono); }
.t-status { font-family: var(--mono); font-size: 8.5px; text-transform: uppercase; }
.t-status.running { color: var(--cyan); }
.t-status.done { color: var(--green); }
.t-status.waiting { color: var(--amber); }

/* visual SOPHEL-K */
.p-visual { overflow: hidden; }
.visual-body {
  position: relative; padding: 0 !important; flex: 1;
  background: radial-gradient(ellipse 90% 60% at 50% 0%, rgba(168,85,247,.07), transparent),
              linear-gradient(180deg, #03060a 0%, #010204 100%);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.vz-silhouette { position: absolute; inset: 0; overflow: hidden; }
.vz-hood {
  position: absolute; left: 50%; top: 12%; transform: translateX(-50%);
  width: 88px; height: 108px;
  background:
    radial-gradient(ellipse 34px 40px at 50% 34%, #0a0f18 98%, transparent),
    conic-gradient(from 220deg at 50% 30%, #05080f 0deg, #0d1420 40deg, #05080f 80deg);
  border-radius: 50% 50% 42% 42% / 60% 60% 40% 40%;
  box-shadow:
    0 -6px 30px rgba(168,85,247,.1),
    inset 0 -10px 24px rgba(255,42,77,.06),
    0 22px 40px -18px #000;
}
.vz-hood::before {
  content: '';
  position: absolute; left: 50%; top: 30%; transform: translate(-50%, -50%);
  width: 46px; height: 15px;
  background: linear-gradient(90deg, transparent, rgba(255,42,77,.85), transparent);
  border-radius: 50%;
  box-shadow: 0 0 18px 2px rgba(255,42,77,.45);
  filter: blur(1px);
}
.vz-glow {
  position: absolute; left: 50%; top: 26%; transform: translate(-50%, -50%);
  width: 130px; height: 130px;
  background: radial-gradient(circle, rgba(255,42,77,.1) 0%, transparent 65%);
  animation: vz-breathe 4.5s ease-in-out infinite;
}
@keyframes vz-breathe { 0%,100% { opacity: .5; transform: translate(-50%,-50%) scale(1); } 50% { opacity: 1; transform: translate(-50%,-50%) scale(1.18); } }
.vz-code {
  position: absolute; inset: 0;
  font-size: 8.5px; line-height: 1.75; letter-spacing: .05em;
  color: rgba(0,212,255,.13);
  padding: 8px 10px; word-break: break-all;
  user-select: none; pointer-events: none;
}
.vz-lines {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, transparent 49.6%, rgba(255,42,77,.05) 50%, transparent 50.4%),
    repeating-linear-gradient(0deg, transparent 0 34px, rgba(0,212,255,.045) 34px 35px);
}
.vz-caption {
  margin-top: auto; padding: 12px 8px 14px; text-align: center;
  background: linear-gradient(180deg, transparent, rgba(3,6,9,.9) 45%);
  position: relative; z-index: 2;
}
.vz-name { font-family: var(--mono); font-size: 13px; letter-spacing: .38em; color: #fff; text-shadow: 0 0 14px rgba(168,85,247,.5); margin-bottom: 4px; }
.vz-tag { font-family: var(--mono); font-size: 7px; letter-spacing: .2em; color: var(--text-dim); line-height: 1.8; }

/* ── baixo: terminal | vulns ── */
.bot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  height: 240px;
  flex-shrink: 0;
}
.p-terminal { overflow: hidden; }
.term-body {
  flex: 1; min-height: 0; padding: 6px 8px;
  background: #01040a;
  font-family: var(--mono);
}

/* ── ações rápidas ── */
.actions-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #050a10, #040810);
  border: 1px solid var(--border); border-radius: 6px;
  flex-shrink: 0;
}
.qa-title { font-size: 9px; letter-spacing: .2em; color: var(--text-dim); white-space: nowrap; }
.qa-spacer { flex: 1; }
.footer-tag { display: flex; align-items: center; gap: 14px; font-size: 9px; letter-spacing: .12em; color: var(--cyan); }
.nodes-deco { opacity: .55; }

/* ═══ RIGHT COL ═══════════════════════════════════════════ */
.right-col {
  grid-area: right;
  min-height: 0;
  display: flex;
}
.rc-scroll {
  display: flex; flex-direction: column; gap: 8px;
  width: 100%; overflow-y: auto; padding-right: 2px;
}

/* operação ativa */
.op-body { display: flex; flex-direction: column; gap: 10px; }
.op-title { font-size: 12px; color: #fff; font-weight: 600; }
.op-progress { display: flex; align-items: center; gap: 10px; }
.op-bar { flex: 1; height: 5px; background: rgba(0,212,255,.1); border-radius: 3px; overflow: hidden; }
.op-fill { height: 100%; background: linear-gradient(90deg, var(--green), var(--cyan)); box-shadow: 0 0 8px rgba(0,255,156,.4); transition: width .6s; }
#op-pct { font-size: 11px; color: var(--green); font-weight: 700; }
.op-info { display: flex; flex-direction: column; gap: 4px; }
.op-row { display: flex; justify-content: space-between; font-size: 10.5px; }
.op-row span { color: var(--text-dim); }
.op-row b { color: var(--text); font-weight: 600; }

/* alertas */
.alerts-list { display: flex; flex-direction: column; gap: 2px; max-height: 210px; overflow-y: auto; }
.al-item { display: flex; gap: 9px; padding: 5px 2px; border-bottom: 1px solid rgba(0,212,255,.04); }
.al-item .al-dot { width: 6px; height: 6px; border-radius: 50%; margin-top: 4px; flex-shrink: 0; }
.al-dot.critical { background: var(--red); box-shadow: 0 0 6px var(--red); }
.al-dot.warn { background: var(--amber); box-shadow: 0 0 6px var(--amber); }
.al-dot.success { background: var(--green); box-shadow: 0 0 6px var(--green); }
.al-dot.info { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.al-item .al-time { font-family: var(--mono); font-size: 9.5px; color: var(--text-dim); flex-shrink: 0; margin-top: 1px; }
.al-item .al-msg { font-size: 10.5px; color: var(--text); line-height: 1.35; }
.al-item .al-msg b { color: var(--red); font-family: var(--mono); }

/* uso do sistema — gauges */
.usage-body { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; place-items: center; padding: 10px 6px !important; }
.gauge { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.gauge svg { display: block; }
.gauge .g-label { font-family: var(--mono); font-size: 8px; letter-spacing: .18em; color: var(--text-dim); }

/* agentes por tipo */
.ag-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.ag-row .ag-ic { width: 14px; text-align: center; font-size: 11px; opacity: .75; flex-shrink: 0; }
.ag-row .ag-name { font-family: var(--mono); font-size: 10px; color: var(--text); width: 128px; flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-row .ag-bar { flex: 1; height: 4px; border-radius: 2px; background: rgba(0,212,255,.08); overflow: hidden; }
.ag-row .ag-bar i { display: block; height: 100%; border-radius: 2px; transition: width .8s ease; }
.ag-row .ag-val { font-family: var(--mono); font-size: 10px; font-weight: 700; width: 22px; text-align: right; color: var(--text); }

/* atividade recente */
.activity-list { display: flex; flex-direction: column; gap: 1px; max-height: 190px; overflow-y: auto; }
.ac-item { display: flex; justify-content: space-between; gap: 8px; padding: 4px 2px; border-bottom: 1px solid rgba(0,212,255,.04); font-size: 10.5px; }
.ac-item .ac-msg { color: var(--text); line-height: 1.3; }
.ac-item .ac-msg b { color: var(--cyan); font-family: var(--mono); font-weight: 600; }
.ac-item .ac-time { font-family: var(--mono); font-size: 9px; color: var(--text-dim); flex-shrink: 0; margin-top: 1px; }

/* ═══ MODAL ══════════════════════════════════════════════ */
.modal {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(1,3,6,.78);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(3px);
}
.modal-box { width: 720px; max-width: 94vw; max-height: 84vh; }
#modal-body { padding: 16px 20px; font-family: var(--mono); font-size: 12px; line-height: 1.7; white-space: pre-wrap; }

/* ═══ AI CONSOLE ══════════════════════════════════════════ */
.ai-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #a855f7, #ff2a4d);
  border: 1px solid rgba(168,85,247,.6);
  color: #fff; font-size: 17px; cursor: pointer;
  box-shadow: 0 0 18px rgba(168,85,247,.45);
  transition: transform .15s;
}
.ai-fab:hover { transform: scale(1.08); }
.ai-console {
  position: fixed; right: 22px; bottom: 78px; z-index: 80;
  width: 480px; height: 420px;
}
.ai-console .panel { height: 100%; }

/* ═══ TUI FULLSCREEN — chat-first do SOPHEL-K ═══ */
.ai-console.console-full {
  inset: 0 !important;
  right: 0 !important; bottom: 0 !important;
  width: 100% !important; height: 100% !important;
  border-radius: 0;
}
.ai-console.console-full .panel {
  border-radius: 0;
  border-left: none; border-right: none; border-bottom: none;
  box-shadow: none;
  background: rgba(1, 4, 9, 0.96);
  backdrop-filter: blur(6px);
}
.ai-console.console-full .ai-log {
  padding: 14px 18%;
  font-size: 12.5px;
  line-height: 1.75;
}
.ai-console.console-full .ai-input-row {
  padding: 12px 18%;
  border-top: 1px solid rgba(0, 212, 255, 0.22);
  background: rgba(0, 10, 16, 0.82);
}
.ai-console.console-full .ai-input-row .input {
  height: 44px; font-size: 13px;
  border-color: rgba(0, 212, 255, 0.32);
  background: rgba(0, 30, 45, 0.5);
}
/* chip inicie uma operação */
.chat-chips { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 18% 10px; }
.chat-chip {
  border: 1px solid rgba(0, 212, 255, 0.35);
  background: rgba(0, 212, 255, 0.07);
  color: #9adfff;
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em;
  padding: 6px 11px; border-radius: 14px; cursor: pointer;
  transition: background .15s, transform .15s;
}
.chat-chip:hover { background: rgba(0, 212, 255, 0.16); transform: translateY(-1px); }
/* linha de operação ao vivo (progresso no chat) */
.mission-live {
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-left: 3px solid var(--cyan);
  background: rgba(0, 25, 40, 0.55);
  border-radius: 5px;
  padding: 9px 12px;
  margin: 8px 0;
  font-size: 10.5px;
}
.mission-live .bar {
  height: 5px; border-radius: 3px;
  background: rgba(0, 212, 255, 0.14);
  margin: 6px 0 4px;
  overflow: hidden;
}
.mission-live .bar > i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--cyan), #7cf);
  box-shadow: 0 0 10px rgba(0, 212, 255, .7);
  transition: width .6s ease;
}
.mission-live .mrt { color: #8fd0ff; letter-spacing: .08em; }
.mission-live .mst { color: var(--text-dim); }
.ai-log {
  flex: 1; overflow-y: auto; padding: 10px 12px;
  font-size: 11px; line-height: 1.65;
  background: #01040a;
}
.ai-log .ai-u { color: var(--cyan); }
.ai-log .ai-a { color: #e8f6ff; }
.ai-log .ai-ego { color: var(--purple); }
.ai-log .ai-sys { color: var(--text-dim); font-size: 10px; }
.ai-log pre { white-space: pre-wrap; word-break: break-word; }
.ai-input-row { display: flex; gap: 8px; padding: 10px; border-top: 1px solid rgba(0,212,255,.1); }

/* ═══ helpers ═════════════════════════════════════════════ */
.btn-xs { padding: 2px 8px; font-size: 9px; }
.hdr-badge { font-size: 8.5px; color: var(--text-dim); border: 1px solid var(--border); padding: 2px 7px; border-radius: 3px; letter-spacing: .1em; }
.count-badge { background: var(--red-dim); color: var(--red); border: 1px solid rgba(255,42,77,.4); font-size: 9px; padding: 1px 6px; border-radius: 8px; font-weight: 700; }
.link { color: var(--cyan); font-size: 8.5px; letter-spacing: .1em; }

/* ═══ RESPONSIVO (prioridade desktop) ═════════════════════ */
@media (max-width: 1400px) {
  .app { grid-template-columns: 200px 1fr 300px; }
  .mid-grid { grid-template-columns: 1fr 210px 150px; }
}
@media (max-width: 1200px) {
  .app { grid-template-columns: 200px 1fr; grid-template-areas: "header header" "sidebar main" "sidebar right"; grid-template-rows: 70px 1fr auto; }
  .right-col { grid-column: 2; }
  .rc-scroll { max-height: 40vh; }
  .mid-grid { grid-template-columns: 1fr 200px; }
  .p-visual { display: none; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; grid-template-areas: "header" "main" "right"; }
  .sidebar { display: none; }
  .hd-stats { display: none; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
}
/* botão de caçada zero-day (enxame) */
.purple-btn { color: var(--purple); border-color: rgba(168,85,247,.5); background: rgba(168,85,247,.08); }
.purple-btn:hover { background: rgba(168,85,247,.18); box-shadow: 0 0 14px rgba(168,85,247,.35); }
