/* ═══════════════════════════════════════════════════════════════
   APOLLO Web UI — Dark Industrial / Cyberpunk Theme
   Fonts: Syne (display) · Outfit (UI) · Space Mono (terminal)
   Palette: Volcanic Glass + Neon Orange
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg-base:       #0e0e0e;
  --bg-surface:    #161616;
  --bg-elevated:   #1e1e1e;
  --bg-hover:      #252525;
  --border:        #2a2a2a;
  --border-bright: #3a3a3a;

  --text-primary:  #f0ede8;
  --text-secondary:#9a9590;
  --text-muted:    #5a5550;

  --accent:        #FF6B2B;
  --accent-dim:    rgba(255,107,43,0.15);
  --accent-glow:   rgba(255,107,43,0.35);
  --accent-2:      #FFB088;

  --green:         #39d353;
  --green-dim:     rgba(57,211,83,0.12);
  --red:           #ff4757;
  --red-dim:       rgba(255,71,87,0.15);
  --yellow:        #ffd32a;
  --yellow-dim:    rgba(255,211,42,0.12);
  --blue:          #4a9eff;
  --blue-dim:      rgba(74,158,255,0.12);

  --sev-critical:  #ff4757;
  --sev-high:      #FF6B2B;
  --sev-medium:    #ffd32a;
  --sev-low:       #4a9eff;
  --sev-info:      #6c757d;

  --sidebar-w:     240px;
  --topbar-h:      56px;
  --radius:        6px;
  --radius-lg:     10px;

  --font-display:  'Syne', sans-serif;
  --font-ui:       'Outfit', sans-serif;
  --font-mono:     'Space Mono', monospace;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
  font-family: var(--font-ui);
  background: var(--bg-base);
  color: var(--text-primary);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }
a { color: var(--accent); text-decoration: none; }

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  transition: transform 0.25s ease;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px;
  border-bottom: 1px solid var(--border);
}
.logo-icon { flex-shrink: 0; }
.logo-text { display: flex; flex-direction: column; }
.logo-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--text-primary);
}
.logo-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-top: 1px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
  position: relative;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(255,107,43,0.2);
}
.nav-item svg { flex-shrink: 0; opacity: 0.7; }
.nav-item.active svg { opacity: 1; }
.nav-badge {
  margin-left: auto;
  color: var(--green);
  font-size: 10px;
  animation: blink 1.2s infinite;
}
.nav-count {
  margin-left: auto;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 10px;
  font-family: var(--font-mono);
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.status-indicator {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-secondary);
}
.dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dot-green { background: var(--green); box-shadow: 0 0 6px var(--green); }
.dot-orange { background: var(--accent); box-shadow: 0 0 6px var(--accent); animation: blink 1s infinite; }
.dot-red { background: var(--red); }
.sidebar-version { font-family: var(--font-mono); font-size: 9px; color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════════ */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Topbar ── */
.topbar {
  height: var(--topbar-h);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}
.topbar-right { display: flex; align-items: center; gap: 10px; }
.sidebar-toggle { color: var(--text-secondary); padding: 4px; display: none; }

.scan-status-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--accent-dim);
  border: 1px solid rgba(255,107,43,0.3);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--accent);
  font-family: var(--font-mono);
}
.pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-ring 1.2s infinite;
}

/* ── Views ── */
.view { display: none; flex: 1; }
.view.active { display: block; }
.view-inner { padding: 24px; max-width: 1200px; }

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-ui);
  transition: all 0.15s;
  letter-spacing: 0.02em;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px var(--accent-glow);
}
.btn-primary:hover {
  background: #ff7d42;
  box-shadow: 0 0 30px var(--accent-glow);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-bright);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-bright); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 11px 22px; font-size: 14px; }
.btn-xs { padding: 3px 8px; font-size: 11px; }
.link-btn { background: none; border: none; color: var(--accent); cursor: pointer; font-size: inherit; text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD — HERO
   ═══════════════════════════════════════════════════════════════ */
.hero-banner {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  position: relative;
  overflow: hidden;
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,107,43,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,107,43,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.hero-content { flex: 1; position: relative; z-index: 1; }
.hero-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(255,107,43,0.25);
  padding: 3px 10px;
  border-radius: 3px;
  margin-bottom: 14px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.hero-accent { color: var(--accent); }
.hero-desc {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 480px;
  line-height: 1.6;
  margin-bottom: 24px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Orbit diagram */
.hero-diagram {
  width: 200px;
  height: 200px;
  position: relative;
  flex-shrink: 0;
}
.orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,107,43,0.15);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: orbit-spin 20s linear infinite;
}
.ring-1 { width: 60px; height: 60px; animation-duration: 8s; }
.ring-2 { width: 110px; height: 110px; animation-duration: 15s; animation-direction: reverse; }
.ring-3 { width: 170px; height: 170px; animation-duration: 25s; }
.orbit-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}
.orbit-node {
  position: absolute;
  top: 50%; left: 50%;
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--accent);
  letter-spacing: 0.08em;
  transform-origin: 0 0;
  transform: rotate(var(--angle)) translateX(90px) rotate(calc(-1 * var(--angle)));
  white-space: nowrap;
  background: var(--bg-base);
  padding: 2px 5px;
  border: 1px solid rgba(255,107,43,0.2);
  border-radius: 2px;
}

/* ── Stats row ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color 0.2s;
}
.stat-card:hover { border-color: var(--border-bright); }
.stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.stat-value { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--text-primary); }
.stat-critical .stat-value { color: var(--sev-critical); }
.stat-high .stat-value { color: var(--sev-high); }
.stat-medium .stat-value { color: var(--sev-medium); }
.stat-low .stat-value { color: var(--sev-low); }

/* ── Section header ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.section-header h3 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-primary);
}
.section-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

/* ── Architecture flow ── */
.arch-flow {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  overflow-x: auto;
}
.arch-orchestrator {
  background: var(--accent-dim);
  border: 1px solid rgba(255,107,43,0.3);
  border-radius: var(--radius);
  padding: 14px 18px;
  text-align: center;
  min-width: 130px;
  flex-shrink: 0;
}
.arch-node-icon { font-size: 20px; margin-bottom: 4px; }
.arch-node-name { font-family: var(--font-mono); font-size: 10px; color: var(--accent); letter-spacing: 0.08em; }
.arch-node-desc { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.arch-arrow { font-size: 20px; color: var(--accent); flex-shrink: 0; }
.arch-agents { display: flex; gap: 8px; flex-wrap: wrap; }
.arch-agent {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  white-space: nowrap;
  transition: border-color 0.2s;
}
.arch-agent:hover { border-color: var(--border-bright); color: var(--text-primary); }
.arch-agent-icon { font-size: 16px; }
.arch-agent small { display: block; font-size: 9px; color: var(--text-muted); margin-top: 2px; }

/* ── Recent scans ── */
.recent-scans { display: flex; flex-direction: column; gap: 8px; }
.scan-row {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.15s;
}
.scan-row:hover { border-color: var(--border-bright); background: var(--bg-elevated); }
.scan-row-target { font-family: var(--font-mono); font-size: 13px; color: var(--text-primary); flex: 1; }
.scan-row-time { font-size: 11px; color: var(--text-muted); }
.scan-row-stats { display: flex; gap: 8px; }
.scan-row-stat { font-family: var(--font-mono); font-size: 11px; padding: 2px 7px; border-radius: 3px; }
.scan-row-stat.c { background: rgba(255,71,87,0.15); color: var(--sev-critical); }
.scan-row-stat.h { background: rgba(255,107,43,0.15); color: var(--sev-high); }
.scan-row-stat.m { background: rgba(255,211,42,0.12); color: var(--sev-medium); }

/* ═══════════════════════════════════════════════════════════════
   NEW SCAN FORM
   ═══════════════════════════════════════════════════════════════ */
.scan-form-wrap {
  max-width: 680px;
}
.scan-form-header { margin-bottom: 28px; }
.scan-form-header h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 6px;
}
.scan-form-header p { color: var(--text-secondary); font-size: 13px; }

.form-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}
.form-section-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.form-section-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 2px 7px;
  border-radius: 3px;
}
.form-group { margin-bottom: 14px; }
.form-group:last-child { margin-bottom: 0; }
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}
.form-group input,
.form-group select {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 12px;
  color: var(--text-primary);
  font-size: 13px;
  transition: border-color 0.15s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-dim); }
.form-group select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%239a9590' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
.input-with-icon { position: relative; }
.input-with-icon svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.input-with-icon input { padding-left: 34px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* LLM provider cards */
.llm-provider-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.provider-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.provider-card:hover { border-color: var(--border-bright); }
.provider-card.active { border-color: var(--accent); background: var(--accent-dim); }
.provider-logo { font-family: var(--font-mono); font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.provider-name { font-size: 12px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.provider-models { font-size: 10px; color: var(--text-muted); font-family: var(--font-mono); }

/* Toggles */
.toggle-grid { display: flex; flex-direction: column; gap: 12px; }
.toggle-item {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 10px;
  border-radius: var(--radius);
  transition: background 0.15s;
}
.toggle-item:hover { background: var(--bg-hover); }
.toggle-item input { display: none; }
.toggle-switch {
  width: 36px; height: 20px;
  background: var(--bg-hover);
  border: 1px solid var(--border-bright);
  border-radius: 10px;
  position: relative;
  flex-shrink: 0;
  transition: all 0.2s;
}
.toggle-switch::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  background: var(--text-muted);
  border-radius: 50%;
  top: 2px; left: 2px;
  transition: all 0.2s;
}
.toggle-item input:checked + .toggle-switch { background: var(--accent-dim); border-color: var(--accent); }
.toggle-item input:checked + .toggle-switch::after { background: var(--accent); transform: translateX(16px); }
.toggle-label { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.toggle-desc { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

.form-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 20px; }

/* ═══════════════════════════════════════════════════════════════
   LIVE CONSOLE
   ═══════════════════════════════════════════════════════════════ */
.phase-tracker {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  margin-bottom: 16px;
  overflow-x: auto;
}
.phase-step { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; }
.phase-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg-hover);
  border: 2px solid var(--border-bright);
  transition: all 0.3s;
}
.phase-step.active .phase-dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
.phase-step.done .phase-dot { background: var(--green); border-color: var(--green); }
.phase-label { font-family: var(--font-mono); font-size: 9px; color: var(--text-muted); letter-spacing: 0.08em; }
.phase-step.active .phase-label { color: var(--accent); }
.phase-step.done .phase-label { color: var(--green); }
.phase-line { flex: 1; height: 1px; background: var(--border); min-width: 30px; }

.live-stats-bar {
  display: flex;
  gap: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}
.live-stat {
  flex: 1;
  padding: 10px 16px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.live-stat:last-child { border-right: none; }
.live-stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.live-stat-val { font-family: var(--font-mono); font-size: 14px; font-weight: 700; color: var(--text-primary); }
.sev-critical { color: var(--sev-critical) !important; }
.sev-high { color: var(--sev-high) !important; }
.sev-medium { color: var(--sev-medium) !important; }
.sev-low { color: var(--sev-low) !important; }

/* Terminal */
.terminal-wrap {
  background: #0a0a0a;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: calc(100vh - 320px);
  min-height: 300px;
  display: flex;
  flex-direction: column;
}
.terminal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #111;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.terminal-dots { display: flex; gap: 6px; }
.tdot { width: 10px; height: 10px; border-radius: 50%; }
.tdot-red { background: #ff5f57; }
.tdot-yellow { background: #febc2e; }
.tdot-green { background: #28c840; }
.terminal-title { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); flex: 1; text-align: center; letter-spacing: 0.08em; }
.terminal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  scroll-behavior: smooth;
}
.terminal-body::-webkit-scrollbar { width: 4px; }
.terminal-body::-webkit-scrollbar-track { background: transparent; }
.terminal-body::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 2px; }
.terminal-welcome { color: var(--text-muted); }
.ascii-art { color: var(--accent); font-size: 11px; line-height: 1.4; margin-bottom: 12px; }
.terminal-hint { font-size: 11px; color: var(--text-muted); }

.log-line { display: flex; gap: 10px; margin-bottom: 2px; }
.log-ts { color: var(--text-muted); flex-shrink: 0; font-size: 11px; }
.log-msg { color: var(--green); word-break: break-all; }
.log-msg.phase { color: var(--accent); font-weight: 700; }
.log-msg.error { color: var(--red); }
.log-msg.complete { color: var(--green); font-weight: 700; }
.log-msg.recon { color: #4a9eff; }
.log-msg.scan { color: #ffd32a; }
.log-msg.exploit { color: var(--sev-critical); }
.log-msg.post { color: #b388ff; }
.log-msg.report { color: var(--green); }

/* ═══════════════════════════════════════════════════════════════
   FINDINGS
   ═══════════════════════════════════════════════════════════════ */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.filter-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  transition: all 0.15s;
}
.filter-btn:hover { border-color: var(--border-bright); color: var(--text-primary); }
.filter-btn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.filter-count {
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--bg-elevated);
  padding: 1px 5px;
  border-radius: 3px;
}
.filter-spacer { flex: 1; }
.filter-search {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 12px;
  color: var(--text-primary);
  font-size: 12px;
  width: 200px;
  outline: none;
  transition: border-color 0.15s;
}
.filter-search:focus { border-color: var(--accent); }

.findings-list { display: flex; flex-direction: column; gap: 8px; }
.finding-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.15s;
  border-left: 3px solid transparent;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.finding-card:hover { border-color: var(--border-bright); background: var(--bg-elevated); }
.finding-card.sev-CRITICAL { border-left-color: var(--sev-critical); }
.finding-card.sev-HIGH { border-left-color: var(--sev-high); }
.finding-card.sev-MEDIUM { border-left-color: var(--sev-medium); }
.finding-card.sev-LOW { border-left-color: var(--sev-low); }
.finding-card.sev-NONE { border-left-color: var(--sev-info); }

.finding-sev-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 7px;
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 2px;
}
.badge-CRITICAL { background: rgba(255,71,87,0.2); color: var(--sev-critical); }
.badge-HIGH { background: rgba(255,107,43,0.2); color: var(--sev-high); }
.badge-MEDIUM { background: rgba(255,211,42,0.15); color: var(--sev-medium); }
.badge-LOW { background: rgba(74,158,255,0.15); color: var(--sev-low); }
.badge-NONE { background: rgba(108,117,125,0.2); color: var(--sev-info); }

.finding-body { flex: 1; min-width: 0; }
.finding-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.finding-desc { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.finding-meta { display: flex; gap: 12px; margin-top: 6px; }
.finding-meta-item { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); }
.finding-meta-item span { color: var(--text-secondary); }

/* ═══════════════════════════════════════════════════════════════
   HISTORY
   ═══════════════════════════════════════════════════════════════ */
.history-list { display: flex; flex-direction: column; gap: 10px; }
.history-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.15s;
}
.history-card:hover { border-color: var(--border-bright); }
.history-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.history-target { font-family: var(--font-mono); font-size: 14px; color: var(--text-primary); }
.history-status {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 3px;
  letter-spacing: 0.06em;
}
.status-complete { background: var(--green-dim); color: var(--green); }
.status-running { background: var(--accent-dim); color: var(--accent); }
.status-error { background: var(--red-dim); color: var(--red); }
.status-pending { background: var(--bg-hover); color: var(--text-muted); }
.history-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.history-stat { font-size: 11px; color: var(--text-muted); }
.history-stat strong { color: var(--text-secondary); }
.history-time { font-size: 11px; color: var(--text-muted); margin-top: 6px; font-family: var(--font-mono); }

/* ═══════════════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 640px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  animation: modal-in 0.2s ease;
}
.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  color: var(--text-muted);
  font-size: 16px;
  padding: 4px 8px;
  border-radius: var(--radius);
  transition: all 0.15s;
}
.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }
.modal-sev { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.1em; padding: 3px 8px; border-radius: 3px; display: inline-block; margin-bottom: 10px; }
.modal-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.modal-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 16px; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.modal-field label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; display: block; margin-bottom: 3px; }
.modal-field span { font-family: var(--font-mono); font-size: 12px; color: var(--text-primary); word-break: break-all; }
.modal-section-title { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; margin-top: 16px; }
.modal-code {
  background: #0a0a0a;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--green);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}
.modal-remediation {
  background: var(--green-dim);
  border: 1px solid rgba(57,211,83,0.2);
  border-radius: var(--radius);
  padding: 12px;
  font-size: 12px;
  color: var(--green);
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 20px; right: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-primary);
  min-width: 240px;
  animation: toast-in 0.25s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }
.toast.info { border-left: 3px solid var(--accent); }

/* ═══════════════════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}
.empty-icon { font-size: 32px; margin-bottom: 12px; opacity: 0.4; }
.empty-state p { font-size: 13px; line-height: 1.6; }

/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(255,107,43,0.6); }
  70% { box-shadow: 0 0 0 6px rgba(255,107,43,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,107,43,0); }
}
@keyframes orbit-spin { from { transform: translate(-50%,-50%) rotate(0deg); } to { transform: translate(-50%,-50%) rotate(360deg); } }
@keyframes modal-in { from { opacity: 0; transform: scale(0.96) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes toast-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fade-in 0.25s ease both; }

/* ═══════════════════════════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .sidebar-toggle { display: flex; }
  .stats-row { grid-template-columns: repeat(3, 1fr); }
  .hero-diagram { display: none; }
  .hero-title { font-size: 36px; }
  .form-row { grid-template-columns: 1fr; }
  .llm-provider-grid { grid-template-columns: 1fr; }
  .modal-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .view-inner { padding: 16px; }
  .hero-banner { padding: 24px; }
  .hero-title { font-size: 28px; }
}