/* Google Fonts - Outfit for headings, Inter for body */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;500;600;700&display=swap');

:root {
  --bg-primary: #04040d;
  --bg-secondary: #0a0a1f;
  --sidebar-width: 260px;
  --accent-blue: #007cff;
  --accent-red: #ff1a4a;
  --accent-purple: #8b5cf6;
  --text-primary: #ffffff;
  --text-secondary: #8e9bb2;
  --border-glow: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  background-image: radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
                    radial-gradient(circle at 10% 80%, rgba(0, 124, 255, 0.05) 0%, transparent 40%);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
}

/* --- MAIN LAYOUT CONTAINER --- */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* --- SIDEBAR NAVIGATION --- */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-glow);
  display: flex;
  flex-direction: column;
  padding: 30px 16px;
  justify-content: space-between;
  flex-shrink: 0;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  padding-left: 12px;
}

.brand-logo {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #007cff 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  transition: stroke 0.2s ease;
}

.nav-item:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.04);
}

.nav-item.active {
  color: var(--text-primary);
  background: linear-gradient(90deg, rgba(0, 124, 255, 0.15) 0%, rgba(139, 92, 246, 0.05) 100%);
  border: 1px solid rgba(0, 124, 255, 0.25);
  box-shadow: 0 4px 20px rgba(0, 124, 255, 0.1);
}

.nav-item.active svg {
  stroke: var(--accent-blue);
  filter: drop-shadow(0 0 4px rgba(0, 124, 255, 0.5));
}

.sidebar-divider {
  height: 1px;
  background-color: var(--border-glow);
  margin: 20px 0;
}

/* --- MAIN DASHBOARD CONTENT AREA --- */
.content-area {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.content-header {
  padding: 24px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-glow);
}

.content-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  font-size: 26px;
  letter-spacing: -0.2px;
}

/* --- ACTIVITY MAP INTERACTIVE CANVAS --- */
.canvas-container {
  flex-grow: 1;
  position: relative;
  overflow: hidden;
  background-image: radial-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 24px 24px;
}

#network-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* --- INTERACTIVE DETAILS SIDEBAR / PANEL --- */
.details-panel {
  position: absolute;
  right: 24px;
  top: 24px;
  bottom: 24px;
  width: 380px;
  background: rgba(10, 10, 31, 0.75);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  z-index: 10;
  transform: translateX(420px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.details-panel.open {
  transform: translateX(0);
}

.panel-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
}

.panel-close:hover {
  color: var(--text-primary);
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-vulnerable {
  background-color: rgba(255, 26, 74, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(255, 26, 74, 0.25);
}

.badge-healthy {
  background-color: rgba(0, 124, 255, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(0, 124, 255, 0.25);
}

.findings-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  flex-grow: 1;
}

.finding-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background 0.2s ease;
}

.finding-card:hover {
  background: rgba(255, 255, 255, 0.05);
}

.finding-title {
  font-size: 13px;
  font-weight: 600;
}

.finding-tool {
  font-size: 11px;
  color: var(--text-secondary);
}

.finding-severity {
  font-size: 11px;
  align-self: flex-start;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}
