/* ============================================================
   Dashboard de Ataque — Zyko Shield Suite Demo
   Dark / agressivo, contrasta com Atlas CRM
   ============================================================ */
:root {
  --bg:         #080a14;
  --surface:    #0f1120;
  --surface-2:  #141728;
  --border:     #1e2235;
  --border-2:   #252840;
  --text:       #e2e8f0;
  --muted:      #64748b;
  --primary:    #ef4444;
  --primary-d:  #dc2626;
  --primary-s:  rgba(239,68,68,.12);
  --green:      #22c55e;
  --green-s:    rgba(34,197,94,.12);
  --yellow:     #eab308;
  --yellow-s:   rgba(234,179,8,.12);
  --orange:     #f97316;
  --blue:       #3b82f6;
  --purple:     #a855f7;
  --amber:      #f59e0b;
  --gray:       #475569;
  --shadow:     0 4px 24px rgba(0,0,0,.6);
  --radius:     12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4 { margin: 0; letter-spacing: -.01em; }

/* ── Header ── */
.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex; align-items: center; gap: 14px;
  position: sticky; top: 0; z-index: 30;
}
.logo-badge {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg,#ef4444,#b91c1c);
  display: grid; place-items: center; font-size: 18px; font-weight: 800;
  box-shadow: 0 6px 16px rgba(239,68,68,.4);
}
.header h1 { font-size: 17px; font-weight: 700; }
.header .sub { color: var(--muted); font-size: 12px; }
.header .spacer { flex: 1; }
.header .fase {
  background: rgba(239,68,68,.15); color: #f87171;
  border: 1px solid rgba(239,68,68,.3);
  padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600;
}

/* ── Layout ── */
.layout { display: grid; grid-template-columns: 1fr 380px; gap: 0; min-height: calc(100vh - 65px); }
.main { padding: 24px 28px; }
.sidebar { background: var(--surface); border-left: 1px solid var(--border); padding: 24px 20px; display: flex; flex-direction: column; gap: 16px; }

/* ── Section titles ── */
.section-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted); margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Site cards ── */
.cards { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; margin-bottom: 24px; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px; cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 2px; opacity: 0; transition: opacity .2s;
}
.card.blue::before   { background: var(--blue); }
.card.purple::before { background: var(--purple); }
.card.green::before  { background: var(--green); }
.card.amber::before  { background: var(--amber); }
.card:hover, .card.active { border-color: var(--border-2); box-shadow: var(--shadow); }
.card.active::before { opacity: 1; }
.card.active.blue   { border-color: rgba(59,130,246,.4); }
.card.active.purple { border-color: rgba(168,85,247,.4); }
.card.active.green  { border-color: rgba(34,197,94,.4); }
.card.active.amber  { border-color: rgba(245,158,11,.4); }

.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.card-dot {
  width: 10px; height: 10px; border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
.blue .card-dot   { background: var(--blue); box-shadow: 0 0 8px var(--blue); }
.purple .card-dot { background: var(--purple); box-shadow: 0 0 8px var(--purple); }
.green .card-dot  { background: var(--green); box-shadow: 0 0 8px var(--green); }
.amber .card-dot  { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

.card-name { font-weight: 700; font-size: 14px; }
.card-url  { font-size: 11.5px; color: var(--muted); }
.card-model { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.card-latencia {
  display: inline-block; margin-top: 8px;
  font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted);
}

/* ── Attack form ── */
.attack-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px; margin-bottom: 24px;
  display: none;
}
.attack-panel.visible { display: block; }
.attack-panel .panel-title { font-size: 14px; font-weight: 700; margin-bottom: 16px; color: var(--text); }
.attack-panel .panel-title span { color: var(--primary); }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.select, .input {
  width: 100%; padding: 9px 12px;
  background: var(--bg); border: 1px solid var(--border-2);
  border-radius: 8px; color: var(--text); font: inherit;
  transition: border .15s, box-shadow .15s;
}
.select:focus, .input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(239,68,68,.15);
}
select option { background: var(--surface); }

.narrativa-box {
  background: rgba(239,68,68,.06); border: 1px solid rgba(239,68,68,.2);
  border-radius: 8px; padding: 12px 14px; font-size: 13px; color: #fca5a5;
  margin-bottom: 14px; min-height: 50px; font-style: italic;
  display: none;
}
.narrativa-box.visible { display: block; }

.btn-fire {
  width: 100%; padding: 12px; border-radius: 10px; border: none;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff; font: inherit; font-size: 15px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: opacity .15s, transform .1s;
  box-shadow: 0 6px 20px rgba(239,68,68,.35);
}
.btn-fire:hover { opacity: .9; }
.btn-fire:active { transform: scale(.98); }
.btn-fire:disabled { opacity: .4; cursor: not-allowed; }
.btn-fire svg { width: 18px; height: 18px; }

/* ── Timeline ── */
.timeline { display: flex; flex-direction: column; gap: 12px; }
.tl-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 24px 0; }
.tl-item {
  display: flex; gap: 12px; align-items: flex-start;
  animation: fadein .3s ease;
}
@keyframes fadein { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }
.tl-icon {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  display: grid; place-items: center;
}
.tl-icon svg { width: 16px; height: 16px; }
.tl-icon.red    { background: var(--primary-s); color: var(--primary); }
.tl-icon.gray   { background: rgba(71,85,105,.15); color: var(--gray); }
.tl-icon.yellow { background: var(--yellow-s); color: var(--yellow); }
.tl-icon.green  { background: var(--green-s); color: var(--green); }
.tl-icon.orange { background: rgba(249,115,22,.12); color: var(--orange); }
.tl-body {}
.tl-titulo { font-weight: 650; font-size: 13.5px; }
.tl-corpo  { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.tl-ts     { font-size: 11px; color: #334155; margin-top: 4px; }

/* ── Reset button ── */
.btn-reset {
  width: 100%; padding: 10px; border-radius: 10px;
  border: 1px solid var(--border-2); background: var(--surface-2);
  color: var(--text); font: inherit; font-size: 13.5px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all .15s;
}
.btn-reset:hover { background: var(--surface); border-color: #334155; }
.btn-reset:disabled { opacity: .4; cursor: not-allowed; }
.btn-reset svg { width: 15px; height: 15px; }
.btn-reset.all { margin-top: 8px; border-color: rgba(239,68,68,.3); color: #f87171; }
.btn-reset.all:hover { background: rgba(239,68,68,.08); }

/* ── Status bar ── */
.status-bar {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 8px 28px; font-size: 12px; color: var(--muted);
  display: flex; align-items: center; gap: 16px;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; }
.status-dot.ok  { background: var(--green); }
.status-dot.err { background: var(--primary); }

/* ── Shield config panel ── */
.shield-config {
  background: rgba(99,102,241,.07); border: 1px solid rgba(99,102,241,.25);
  border-radius: 10px; padding: 14px 16px; margin-bottom: 14px;
}
.sc-title { font-size: 12.5px; font-weight: 700; color: #818cf8; margin-bottom: 10px; }
.sc-grid  { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px,1fr)); gap: 8px; }
.sc-item  { background: rgba(0,0,0,.25); border-radius: 8px; padding: 8px 10px; }
.sc-key   { font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing:.04em; margin-bottom:3px; }
.sc-val   { font-size: 13px; font-weight: 600; }
.sc-val.yes  { color: #ef4444; }
.sc-val.no   { color: #475569; }
.sc-val.high { color: #f59e0b; }
.sc-val.critical { color: #ef4444; }
.sc-val.email, .sc-val.numeric, .sc-val.format, .sc-val.free_text,
.sc-val.skip, .sc-val.texto, .sc-val.senha { color: #818cf8; }
.sc-nota  { grid-column: 1/-1; font-size: 12px; color: #64748b; margin-top: 4px;
            background: rgba(0,0,0,.2); border-radius: 6px; padding: 6px 10px; font-style: italic; }

/* ── Valor field ── */
.btn-reset-valor {
  background: none; border: none; cursor: pointer;
  font-size: 11.5px; color: #64748b; padding: 0 0 0 8px;
  font-family: inherit; transition: color .15s;
}
.btn-reset-valor:hover { color: #ef4444; }

/* ── Utils ── */
.hidden { display: none !important; }
.mt { margin-top: 16px; }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .cards  { grid-template-columns: 1fr 1fr; }
  .sidebar { border-left: none; border-top: 1px solid var(--border); }
}
