/* ==========================================================================
   INVESTIGASI FORENSIK @kingronal21 — OPTIMIZED STYLESHEET
   Theme: Cyberpunk Forensic & 2050.earth Telemetry Command Deck
   ========================================================================== */

@import url('tokens.css');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ======================== RESET & BASE ======================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background: var(--surface-canvas);
  color: var(--text-primary);
  overflow-x: hidden;
  min-height: 100vh;
  line-height: 1.5;
  background-image:
    radial-gradient(circle at 50% 30%, rgba(0, 242, 254, 0.04) 0%, transparent 65%),
    radial-gradient(circle at 85% 85%, rgba(255, 0, 127, 0.04) 0%, transparent 55%);
  background-attachment: fixed;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(7, 12, 22, 0.8); }
::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: var(--radius-xs); }
::-webkit-scrollbar-thumb:hover { background: var(--cyan-neon); }

/* ======================== HEADER ======================== */
.cyber-header {
  height: var(--header-height);
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-6);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.brand-title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--intent-core), var(--intent-crypto), var(--intent-judol));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.35rem;
  box-shadow: var(--glow-cyan);
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.brand-text h1 {
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, var(--white), var(--cyan-neon), var(--rose-neon));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.brand-text p {
  font-size: var(--text-2xs);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  letter-spacing: 0.2px;
}

/* Layout Switcher */
.layout-switcher {
  display: flex;
  background: rgba(10, 16, 30, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: var(--space-1);
}

.layout-btn {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 700;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font-sans);
}

.layout-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.layout-btn.active {
  background: rgba(0, 242, 254, 0.15);
  color: var(--cyan-neon);
  border-color: var(--cyan-neon);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.25);
}

.layout-btn-treeroot {
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.18), rgba(0, 242, 254, 0.18)) !important;
  color: var(--emerald-neon) !important;
  border-color: rgba(0, 255, 136, 0.45) !important;
}

.layout-btn-treeroot:hover {
  background: rgba(0, 255, 136, 0.25) !important;
}

.layout-btn-treeroot.active {
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.35), rgba(0, 242, 254, 0.35)) !important;
  color: var(--white) !important;
  border-color: var(--emerald-neon) !important;
  box-shadow: var(--glow-emerald) !important;
}

/* Header Status & Actions */
.header-status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--risk-critical-bg);
  border: 1px solid var(--risk-critical-border);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  color: var(--risk-critical-text);
  font-weight: 700;
  font-family: var(--font-mono);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--intent-judol);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--intent-judol);
  animation: pulseAnim 1.6s infinite ease-in-out;
}

@keyframes pulseAnim {
  0%, 100% { transform: scale(0.85); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 16px var(--intent-judol); }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Buttons */
.btn-cyber {
  background: var(--btn-cyber-bg);
  border: 1px solid var(--btn-cyber-border);
  color: var(--btn-cyber-text);
  padding: 8px 16px;
  border-radius: var(--btn-radius);
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
}

.btn-cyber:hover {
  background: var(--btn-cyber-hover-bg);
  color: var(--btn-cyber-hover-text);
  box-shadow: var(--glow-cyan);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--risk-critical-bg);
  border-color: var(--risk-critical-border);
  color: var(--risk-critical-text);
}

.btn-danger:hover {
  background: var(--intent-judol);
  color: var(--white);
  box-shadow: var(--glow-crimson);
}

/* ======================== TELEMETRY BAR ======================== */
.earth2050-telemetry-bar {
  background: var(--telemetry-bg);
  border-bottom: 1px solid var(--telemetry-border);
  padding: 6px var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--telemetry-text-label);
  position: relative;
  overflow: hidden;
  z-index: 90;
}

.earth2050-telemetry-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--cyan-neon), var(--emerald-neon), transparent);
  animation: telemetryScan 4.5s linear infinite;
}

@keyframes telemetryScan {
  0% { left: -100%; }
  100% { left: 100%; }
}

.telemetry-col {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.telemetry-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.telemetry-label {
  color: var(--slate-500);
  text-transform: uppercase;
  font-size: var(--text-2xs);
  letter-spacing: 0.5px;
}

.telemetry-value {
  color: var(--telemetry-text-value);
  font-weight: 600;
}

.telemetry-badge-live {
  background: var(--risk-safe-bg);
  border: 1px solid var(--risk-safe-border);
  color: var(--risk-safe-text);
  padding: 2px 10px;
  border-radius: var(--radius-xs);
  font-size: var(--text-2xs);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.telemetry-audio-btn {
  background: rgba(14, 23, 40, 0.85);
  border: 1px solid var(--border-subtle);
  color: var(--cyan-400);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.telemetry-audio-btn:hover {
  background: rgba(0, 242, 254, 0.2);
  border-color: var(--cyan-neon);
  color: var(--white);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
}

.telemetry-audio-btn.muted {
  color: var(--text-muted);
  border-color: rgba(100, 116, 139, 0.3);
}

/* ======================== HERO BANNER ======================== */
.investigation-hero-banner {
  background: var(--hero-banner-bg);
  border-bottom: 1px solid var(--hero-banner-border);
  box-shadow: 0 10px 30px -10px rgba(0, 242, 254, 0.15);
  padding: 16px var(--space-6);
  position: relative;
  z-index: 80;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.hero-banner-inner {
  max-width: 1720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-headline-group {
  flex: 1;
  min-width: 320px;
}

.hero-badge-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.hero-badge {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero-badge-danger {
  background: var(--risk-critical-bg);
  border: 1px solid var(--risk-critical-border);
  color: var(--risk-critical-text);
  box-shadow: 0 0 10px rgba(255, 0, 85, 0.25);
}

.hero-badge-cyan {
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid rgba(0, 242, 254, 0.35);
  color: var(--cyan-neon);
}

.hero-badge-emerald {
  background: rgba(0, 255, 136, 0.12);
  border: 1px solid rgba(0, 255, 136, 0.35);
  color: var(--emerald-neon);
}

.hero-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  margin: 0 0 4px 0;
  line-height: 1.25;
}

.hero-title span {
  background: linear-gradient(135deg, var(--cyan-neon), var(--intent-crypto));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
  max-width: 900px;
}

.hero-stats-quick {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-pill-stat {
  background: rgba(14, 23, 42, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  min-width: 130px;
}

.hero-pill-stat span.label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.hero-pill-stat span.value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.hero-actions-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-hero-toggle {
  background: rgba(14, 23, 40, 0.9);
  border: 1px solid var(--border-default);
  color: var(--cyan-neon);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-hero-toggle:hover {
  background: rgba(0, 242, 254, 0.2);
  border-color: var(--cyan-neon);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.35);
  color: var(--white);
  transform: translateY(-1px);
}

.investigation-hero-banner.collapsed {
  padding: 10px var(--space-6);
}

.investigation-hero-banner.collapsed .hero-subtitle,
.investigation-hero-banner.collapsed .hero-pipeline-wrapper {
  display: none !important;
}

/* Pipeline */
.hero-pipeline-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.3s ease;
}

.pipeline-header-label {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--cyan-400);
  text-transform: uppercase;
  letter-spacing: 0.75px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pipeline-stages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.pipeline-stage-btn {
  background: var(--hero-step-bg);
  border: 1px solid var(--hero-step-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pipeline-stage-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3.5px;
  height: 100%;
  background: var(--border-subtle);
  transition: all 0.2s ease;
}

.pipeline-stage-btn:hover {
  background: var(--hero-step-hover-bg);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.pipeline-stage-btn.active {
  background: rgba(18, 28, 52, 0.95);
  border-color: var(--cyan-neon);
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.2);
}

.pipeline-stage-btn.stage-1::before { background: #3b82f6; }
.pipeline-stage-btn.stage-1.active { border-color: #3b82f6; box-shadow: 0 0 14px rgba(59, 130, 246, 0.35); }

.pipeline-stage-btn.stage-2::before { background: #9900ff; }
.pipeline-stage-btn.stage-2.active { border-color: #9900ff; box-shadow: 0 0 14px rgba(153, 0, 255, 0.35); }

.pipeline-stage-btn.stage-3::before { background: #ff007f; }
.pipeline-stage-btn.stage-3.active { border-color: #ff007f; box-shadow: 0 0 14px rgba(255, 0, 127, 0.35); }

.pipeline-stage-btn.stage-4::before { background: #ffaa00; }
.pipeline-stage-btn.stage-4.active { border-color: #ffaa00; box-shadow: 0 0 14px rgba(255, 170, 0, 0.35); }

.stage-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stage-number-tag {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.stage-year-tag {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: var(--cyan-400);
}

.stage-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.stage-desc {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.35;
  margin: 0;
}

/* Simple Flow View */
.simple-flow-view {
  display: none;
  background: rgba(6, 10, 20, 0.95);
  border-radius: var(--card-radius);
  border: 1px solid var(--border-subtle);
  padding: 24px;
  height: 100%;
  overflow-y: auto;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.7);
}

.simple-flow-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.flow-step-card {
  background: rgba(14, 22, 38, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  transition: all 0.25s ease;
}

.flow-step-card:hover, .flow-step-card.active-focus {
  border-color: var(--cyan-neon);
  box-shadow: var(--glow-cyan);
  transform: translateY(-2px);
}

.flow-step-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.flow-step-badge-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.flow-step-meta h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

.flow-step-meta span {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.flow-evidence-box {
  background: rgba(5, 9, 16, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-xs);
  padding: 10px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.flow-evidence-box strong {
  color: var(--white);
}

.flow-key-entities {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.flow-entity-chip {
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.25);
  color: var(--cyan-400);
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
}

.flow-entity-chip:hover {
  background: var(--cyan-neon);
  color: var(--slate-950);
  font-weight: 700;
}

.canvas-floating-helper {
  position: absolute;
  top: 14px;
  left: 16px;
  background: rgba(7, 12, 24, 0.88);
  border: 1px solid rgba(0, 242, 254, 0.35);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.75rem;
  color: var(--slate-300);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 15;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.canvas-floating-helper i {
  color: var(--cyan-neon);
  font-size: 0.95rem;
}

/* ======================== DASHBOARD GRID ======================== */
.dashboard-container {
  display: grid;
  grid-template-columns: 320px 1fr 370px;
  grid-template-rows: auto 640px auto;
  min-height: calc(100vh - 105px);
  gap: var(--space-4);
  padding: var(--space-4);
}

/* Stat Cards */
.stats-bar {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--space-4);
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  padding: 14px 18px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  position: relative;
  overflow: hidden;
  box-shadow: var(--card-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.25s ease;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3.5px;
  height: 100%;
  background: var(--intent-core);
}

.stat-card-core::after { background: var(--intent-core); }
.stat-card-core .stat-icon { background: rgba(0, 242, 254, 0.15); color: var(--intent-core); }
.stat-card-core:hover { border-color: var(--intent-core); box-shadow: var(--shadow-lg), var(--glow-cyan); }

.stat-card-crypto::after { background: var(--intent-crypto); }
.stat-card-crypto { border-color: rgba(255, 0, 127, 0.35); background: rgba(255, 0, 127, 0.06); }
.stat-card-crypto .stat-icon { background: rgba(255, 0, 127, 0.18); color: var(--intent-crypto); }
.stat-card-crypto:hover { border-color: var(--intent-crypto); box-shadow: var(--shadow-lg), var(--glow-rose); transform: translateY(-2px); }
.stat-card-crypto .stat-value { color: #ff66aa; }

.stat-card-money::after { background: var(--intent-laundering); }
.stat-card-money { border-color: rgba(255, 170, 0, 0.35); background: rgba(255, 170, 0, 0.06); }
.stat-card-money .stat-icon { background: rgba(255, 170, 0, 0.18); color: var(--intent-laundering); }
.stat-card-money:hover { border-color: var(--intent-laundering); box-shadow: var(--shadow-lg), var(--glow-amber); transform: translateY(-2px); }
.stat-card-money .stat-value { color: #ffcc66; }

.stat-card-auditor::after { background: var(--intent-forensic); }
.stat-card-auditor { border-color: rgba(0, 255, 136, 0.35); background: rgba(0, 255, 136, 0.06); }
.stat-card-auditor .stat-icon { background: rgba(0, 255, 136, 0.18); color: var(--intent-forensic); }
.stat-card-auditor:hover { border-color: var(--intent-forensic); box-shadow: var(--shadow-lg), var(--glow-emerald); transform: translateY(-2px); }
.stat-card-auditor .stat-value { color: var(--emerald-neon); }

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.stat-info h4 {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-primary);
  line-height: 1.1;
}

/* ======================== SIDEBARS ======================== */
.sidebar-left, .sidebar-right {
  background: var(--surface-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  padding: 18px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  overflow-y: auto;
  max-height: 640px;
}

.panel-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
}

.search-box {
  position: relative;
}

.search-box input {
  width: 100%;
  background: rgba(11, 18, 32, 0.95);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 10px 14px 10px 38px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-family: var(--font-sans);
  outline: none;
  transition: all 0.25s ease;
}

.search-box input:focus {
  border-color: var(--cyan-neon);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.25);
  background: rgba(14, 24, 42, 1);
}

.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.preset-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-preset {
  background: rgba(18, 28, 48, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-sans);
}

.btn-preset:hover, .btn-preset.active {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--cyan-neon);
  color: var(--cyan-neon);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.25);
}

.btn-preset-danger { background: rgba(255, 0, 127, 0.12) !important; border-color: rgba(255, 0, 127, 0.35) !important; color: #ff66aa !important; }
.btn-preset-danger:hover, .btn-preset-danger.active { background: var(--intent-crypto) !important; color: var(--white) !important; box-shadow: var(--glow-rose) !important; }

.btn-preset-blue { background: rgba(59, 130, 246, 0.12); border-color: rgba(59, 130, 246, 0.35); color: #60a5fa; }
.btn-preset-blue:hover, .btn-preset-blue.active { background: var(--blue-500) !important; border-color: var(--blue-500) !important; color: var(--white) !important; box-shadow: 0 0 14px rgba(59, 130, 246, 0.4); }

.btn-preset-legal { background: rgba(34, 211, 238, 0.12); border-color: rgba(34, 211, 238, 0.35); color: #22d3ee; }
.btn-preset-legal:hover, .btn-preset-legal.active { background: #06b6d4 !important; border-color: #06b6d4 !important; color: var(--white) !important; box-shadow: 0 0 14px rgba(6, 182, 212, 0.45); }

.btn-preset-emerald { background: rgba(0, 255, 136, 0.12) !important; border-color: rgba(0, 255, 136, 0.35) !important; color: var(--emerald-neon) !important; }
.btn-preset-emerald:hover, .btn-preset-emerald.active { background: var(--emerald-neon) !important; color: #03150d !important; border-color: var(--emerald-neon) !important; box-shadow: var(--glow-emerald) !important; }

.btn-preset-cb { border-color: rgba(16, 185, 129, 0.4) !important; color: #6ee7b7 !important; }
.btn-preset-cb:hover, .btn-preset-cb.active { background: rgba(16, 185, 129, 0.22) !important; border-color: #10b981 !important; box-shadow: 0 0 14px rgba(16, 185, 129, 0.4) !important; color: #a7f3d0 !important; }

/* Legend */
.category-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(12, 19, 34, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 7px 10px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.2s ease;
}

.legend-item:hover {
  border-color: var(--border-default);
  background: rgba(18, 28, 48, 0.7);
}

.legend-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.color-indicator {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.legend-item label {
  font-size: var(--text-xs);
  color: var(--text-primary);
  cursor: pointer;
}

.legend-item input[type="checkbox"] {
  accent-color: var(--cyan-neon);
  cursor: pointer;
}

/* ======================== GRAPH CONTAINER ======================== */
.graph-container {
  background: #04070d;
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--card-shadow), inset 0 0 40px rgba(0, 0, 0, 0.8);
}

#network-canvas {
  width: 100%;
  height: 100%;
}

.hud-corner {
  position: absolute;
  width: var(--hud-corner-size);
  height: var(--hud-corner-size);
  pointer-events: none;
  z-index: 10;
}

.hud-corner-tl { top: 8px; left: 8px; border-top: var(--hud-corner-thickness) solid var(--hud-corner-color); border-left: var(--hud-corner-thickness) solid var(--hud-corner-color); }
.hud-corner-tr { top: 8px; right: 8px; border-top: var(--hud-corner-thickness) solid var(--hud-corner-color); border-right: var(--hud-corner-thickness) solid var(--hud-corner-color); }
.hud-corner-bl { bottom: 8px; left: 8px; border-bottom: var(--hud-corner-thickness) solid var(--hud-corner-color); border-left: var(--hud-corner-thickness) solid var(--hud-corner-color); }
.hud-corner-br { bottom: 8px; right: 8px; border-bottom: var(--hud-corner-thickness) solid var(--hud-corner-color); border-right: var(--hud-corner-thickness) solid var(--hud-corner-color); }

.graph-hud-controls {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 6px;
  background: rgba(9, 14, 25, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  padding: 4px;
  border-radius: var(--radius-sm);
  z-index: 10;
}

.hud-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.hud-btn:hover {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--border-default);
  color: var(--cyan-neon);
  box-shadow: 0 0 8px rgba(0, 242, 254, 0.3);
}

.graph-legend-badge {
  position: absolute;
  bottom: 12px;
  left: 16px;
  right: 16px;
  background: rgba(7, 12, 22, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 10;
  pointer-events: none;
}

/* ======================== NODE INSPECTOR ======================== */
.node-inspector-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: var(--text-muted);
  gap: 12px;
  padding: 24px;
}

.node-inspector-empty i {
  font-size: 3rem;
  color: rgba(0, 242, 254, 0.2);
}

.node-profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 14px;
}

.profile-avatar-wrapper {
  width: var(--inspector-avatar-size);
  height: var(--inspector-avatar-size);
  border-radius: 50%;
  margin-bottom: 8px;
  box-shadow: var(--shadow-md), var(--glow-cyan);
}

.node-title-handle {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-mono);
  margin-bottom: 2px;
}

.node-real-name {
  font-size: var(--text-xs);
  color: var(--cyan-400);
  font-weight: 600;
  margin-bottom: 8px;
}

.risk-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 700;
  font-family: var(--font-mono);
}

.risk-critical { background: var(--risk-critical-bg); color: var(--risk-critical-text); border: 1px solid var(--risk-critical-border); box-shadow: var(--risk-critical-glow); }
.risk-high { background: var(--risk-high-bg); color: var(--risk-high-text); border: 1px solid var(--risk-high-border); }
.risk-medium { background: var(--risk-medium-bg); color: var(--risk-medium-text); border: 1px solid var(--risk-medium-border); }
.risk-safe { background: var(--risk-safe-bg); color: var(--risk-safe-text); border: 1px solid var(--risk-safe-border); }

.threat-gauge-bar {
  width: 100%;
  max-width: 260px;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  margin-top: 8px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.threat-gauge-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.threat-gauge-fill.risk-critical { background: linear-gradient(90deg, #ff0055, #ff007f); box-shadow: 0 0 10px rgba(255, 0, 85, 0.8); }
.threat-gauge-fill.risk-high { background: linear-gradient(90deg, #f97316, #ef4444); box-shadow: 0 0 8px rgba(249, 115, 22, 0.6); }
.threat-gauge-fill.risk-medium { background: linear-gradient(90deg, #eab308, #f59e0b); box-shadow: 0 0 8px rgba(234, 179, 8, 0.6); }
.threat-gauge-fill.risk-safe { background: linear-gradient(90deg, #10b981, #06b6d4); box-shadow: 0 0 8px rgba(16, 185, 129, 0.6); }

.detail-section {
  background: rgba(14, 22, 38, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.detail-section h5 {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.detail-item label {
  display: block;
  font-size: var(--text-2xs);
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.detail-item span {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag-badge {
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.25);
  color: var(--cyan-400);
  font-size: var(--text-2xs);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
}

.neighbors-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
}

.neighbor-chip {
  background: rgba(18, 28, 48, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: var(--text-xs);
}

.neighbor-chip:hover {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--cyan-neon);
  transform: translateX(3px);
}

/* ======================== BOTTOM SECTION & TABS ======================== */
.bottom-section {
  grid-column: 1 / -1;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-2);
}

.tab-navigation {
  display: flex;
  background: rgba(10, 16, 28, 0.92);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 6px;
  gap: 8px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  flex-wrap: wrap;
}

.tab-btn {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.2), rgba(0, 102, 255, 0.15));
  border-color: var(--cyan-neon);
  color: var(--white);
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.3);
}

/* Data Table Full Width 100% */
.data-table-wrapper {
  background: var(--surface-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  padding: 22px;
  box-shadow: var(--card-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow-x: auto;
  width: 100%;
}

.cyber-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--text-xs);
}

.cyber-table th {
  background: rgba(6, 11, 22, 0.95);
  color: var(--cyan-400);
  text-align: left;
  padding: 14px 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 2px solid var(--border-default);
  font-family: var(--font-mono);
  white-space: nowrap;
}

.cyber-table td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  vertical-align: middle;
}

.cyber-table tbody tr {
  transition: all 0.2s ease;
  background: rgba(9, 15, 28, 0.45);
}

.cyber-table tbody tr:nth-child(even) {
  background: rgba(13, 21, 38, 0.55);
}

.cyber-table tbody tr:hover {
  background: rgba(0, 242, 254, 0.08);
  box-shadow: inset 0 0 12px rgba(0, 242, 254, 0.06);
}

.btn-table-trace {
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid var(--cyan-neon);
  color: var(--cyan-neon);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-family: var(--font-sans);
}

.btn-table-trace:hover {
  background: var(--cyan-neon);
  color: #020617;
  box-shadow: var(--glow-cyan);
  transform: translateY(-1px);
}

.tag-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--slate-300);
  font-size: 0.68rem;
  font-family: var(--font-mono);
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  margin: 2px 3px 2px 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.badge-risk-critical, .badge.bg-danger {
  background: var(--risk-critical-bg) !important;
  border: 1px solid var(--risk-critical-border) !important;
  color: var(--risk-critical-text) !important;
  box-shadow: 0 0 10px rgba(255, 0, 51, 0.3) !important;
}

.badge-risk-high {
  background: var(--risk-high-bg) !important;
  border: 1px solid var(--risk-high-border) !important;
  color: var(--risk-high-text) !important;
  box-shadow: 0 0 10px rgba(255, 0, 127, 0.25) !important;
}

.badge-risk-medium, .badge.bg-warning {
  background: var(--risk-medium-bg) !important;
  border: 1px solid var(--risk-medium-border) !important;
  color: var(--risk-medium-text) !important;
}

.badge-risk-safe, .badge.bg-success {
  background: var(--risk-safe-bg) !important;
  border: 1px solid var(--risk-safe-border) !important;
  color: var(--risk-safe-text) !important;
}

/* ======================== ANALYTICS TAB ======================== */
.analytics-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 24px;
  align-items: start;
}

.analytics-chart {
  background: rgba(6, 10, 20, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.analytics-chart h4 {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--cyan-400);
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: var(--font-mono);
}

.chart-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 310px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.analytics-content {
  background: rgba(8, 14, 26, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.analytics-content h4 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.analytics-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.analytics-list li {
  background: rgba(14, 22, 38, 0.7);
  border-left: 3.5px solid var(--border-default);
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--slate-300);
  transition: all 0.25s ease;
}

.analytics-list li:hover {
  border-left-color: var(--cyan-neon);
  background: rgba(18, 28, 48, 0.9);
  transform: translateX(4px);
}

/* ======================== TIMELINE ======================== */
.timeline-summary-box {
  background: linear-gradient(135deg, rgba(255, 0, 51, 0.08), rgba(12, 20, 36, 0.95));
  border: 1px solid rgba(255, 0, 51, 0.3);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 10px;
}

.timeline-header h4 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--white);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline-desc {
  font-size: var(--text-sm);
  color: var(--slate-300);
  line-height: 1.6;
  margin-bottom: 14px;
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: var(--text-xs);
  color: var(--slate-400);
  background: rgba(5, 8, 16, 0.6);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.timeline-meta a {
  color: var(--cyan-neon);
  text-decoration: none;
}

.timeline-meta a:hover {
  text-decoration: underline;
}

.timeline-container {
  position: relative;
  padding-left: 28px;
}

.timeline-container::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(180deg, var(--blue-500) 0%, var(--intent-crypto) 25%, var(--intent-judol) 50%, var(--intent-smokescreen) 75%, var(--emerald-neon) 100%);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.timeline-card {
  position: relative;
  background: rgba(14, 22, 38, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  padding: 18px 22px;
  margin-bottom: 20px;
  transition: all 0.25s ease;
}

.timeline-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 4px 20px rgba(0, 242, 254, 0.15);
  transform: translateX(4px);
}

.timeline-dot {
  position: absolute;
  left: -29px;
  top: 20px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid #090d15;
  box-shadow: 0 0 10px currentColor;
}

.timeline-badge {
  font-size: var(--text-2xs);
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

/* ======================== MODALS ======================== */
.modal-overlay, .cyber-modal-overlay, .forensic-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 6, 12, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.modal-overlay.active, .cyber-modal-overlay.active, .forensic-modal.active {
  display: flex !important;
}

.modal-container, .cyber-modal-card, .forensic-modal-dialog {
  background: linear-gradient(180deg, #0b1322 0%, #060a14 100%);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 1000px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(0, 242, 254, 0.2);
  padding: 26px 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 0, 51, 0.15);
  border: 1px solid rgba(255, 0, 51, 0.4);
  color: #ff4d6d;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
}

.modal-close-btn:hover {
  background: #ff0033;
  color: #fff;
  transform: rotate(90deg) scale(1.1);
  box-shadow: var(--glow-crimson);
}

.modal-header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-right: 48px;
  gap: 16px;
}

.modal-header-content h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--white);
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-header-content p {
  font-size: var(--text-xs);
  color: var(--slate-400);
  margin: 0;
  line-height: 1.4;
}

.modal-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
  overflow-x: auto;
  flex-wrap: wrap;
}

.modal-tab-btn {
  background: rgba(14, 22, 38, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  white-space: nowrap;
}

.modal-tab-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.modal-tab-btn.active {
  background: rgba(0, 242, 254, 0.18);
  border-color: var(--cyan-neon);
  color: var(--white);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.3);
}

.modal-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.modal-stat-box {
  background: rgba(10, 16, 30, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.modal-stat-label {
  font-size: var(--text-2xs);
  color: var(--text-muted);
  text-transform: uppercase;
  font-family: var(--font-mono);
  display: block;
  margin-bottom: 4px;
}

.modal-stat-box h5 {
  font-size: 1rem;
  font-weight: 800;
  margin: 0;
  font-family: var(--font-mono);
}

.money-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--amber-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.money-trail-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 16px 0;
  overflow-x: auto;
  padding: 8px 4px;
}

.trail-step {
  background: rgba(10, 16, 28, 0.9);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  min-width: 155px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.trail-step span:first-child {
  font-size: var(--text-2xs);
  font-weight: 800;
  font-family: var(--font-mono);
  text-transform: uppercase;
}

.trail-step strong {
  font-size: var(--text-xs);
  color: var(--white);
}

.trail-step span:last-child {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.trail-arrow {
  font-size: 1.4rem;
  color: var(--cyan-neon);
  font-weight: 800;
  flex-shrink: 0;
}

.forensic-data-box {
  background: #020617;
  border: 1px solid var(--border-default);
  border-left: 4px solid var(--amber-neon);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--slate-300);
  line-height: 1.7;
  margin-top: 14px;
}

.legal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.legal-card {
  background: rgba(8, 14, 26, 0.7);
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.legal-card strong {
  color: var(--cyan-400);
  font-size: var(--text-sm);
  display: block;
  margin-bottom: 6px;
}

.legal-card p {
  font-size: var(--text-xs);
  color: var(--slate-300);
  line-height: 1.5;
  margin: 0;
}

.fake-accounts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.fake-account-card {
  background: rgba(14, 22, 38, 0.75);
  border: 1px solid rgba(255, 102, 0, 0.3);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.fake-account-card strong {
  color: #ff8833;
  font-size: var(--text-sm);
  font-family: var(--font-mono);
  display: block;
  margin-bottom: 4px;
}

.fake-account-card p {
  font-size: var(--text-xs);
  color: var(--slate-300);
  line-height: 1.4;
  margin: 0;
}

.warning-box {
  background: rgba(255, 170, 0, 0.1);
  border: 1px solid rgba(255, 170, 0, 0.4);
  border-left: 4px solid var(--amber-neon);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-top: 14px;
}

.warning-box strong {
  color: var(--amber-400);
  font-size: var(--text-xs);
  display: block;
  margin-bottom: 4px;
}

.warning-box p {
  font-size: var(--text-xs);
  color: var(--slate-300);
  margin: 0;
  line-height: 1.45;
}

.discord-profile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 14px 0;
}

.discord-field {
  background: rgba(6, 10, 20, 0.75);
  border: 1px solid rgba(88, 101, 242, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.discord-field strong {
  font-size: 0.68rem;
  color: #8599f7;
  text-transform: uppercase;
  font-family: var(--font-mono);
  display: block;
  margin-bottom: 4px;
}

.discord-field p {
  font-size: var(--text-xs);
  color: var(--white);
  margin: 0;
  line-height: 1.35;
}

.modal-footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
  margin-top: 8px;
}

.exhibit-card {
  background: rgba(14, 22, 38, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin-bottom: 12px;
}

.exhibit-card.border-blue { border-color: rgba(59, 130, 246, 0.4); }
.exhibit-card.border-pink { border-color: rgba(255, 0, 127, 0.4); }
.exhibit-card.border-red { border-color: rgba(255, 0, 51, 0.4); }
.exhibit-card.border-green { border-color: rgba(0, 255, 136, 0.4); }
.exhibit-card.border-cyan { border-color: rgba(34, 211, 238, 0.4); }
.exhibit-card.border-orange { border-color: rgba(255, 102, 0, 0.4); }
.exhibit-card.border-discord { border-color: rgba(88, 101, 242, 0.4); }

.exhibit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.exhibit-badge {
  font-size: var(--text-2xs);
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  font-family: var(--font-mono);
}

.badge-blue { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid #3b82f6; }
.badge-pink { background: rgba(255, 0, 127, 0.2); color: #ff66aa; border: 1px solid #ff007f; }
.badge-red { background: rgba(255, 0, 51, 0.2); color: #ff4d6d; border: 1px solid #ff0033; }
.badge-green { background: rgba(0, 255, 136, 0.2); color: #00ff88; border: 1px solid #00ff88; }
.badge-cyan { background: rgba(34, 211, 238, 0.2); color: #22d3ee; border: 1px solid #22d3ee; }
.badge-orange { background: rgba(255, 102, 0, 0.2); color: #ff8833; border: 1px solid #ff6600; }
.badge-discord { background: rgba(88, 101, 242, 0.2); color: #8599f7; border: 1px solid #5865f2; }

.exhibit-type {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.exhibit-card h4 {
  font-size: 1.05rem;
  color: var(--white);
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.exhibit-card p {
  font-size: var(--text-sm);
  color: var(--slate-300);
  line-height: 1.55;
  margin-bottom: 10px;
}

.exhibit-card ul {
  padding-left: 20px;
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--slate-300);
}

.exhibit-card code {
  background: #020617;
  color: var(--cyan-neon);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  border: 1px solid rgba(0, 242, 254, 0.2);
}

/* ==========================================================================
   COMPREHENSIVE RESPONSIVE DESIGN — FULL MOBILE SUPPORT
   Breakpoints: 1400 → 1200 → 1024 → 768 → 480 → 360
   ========================================================================== */

/* ======================== 1400px — Wide Desktop ======================== */
@media (max-width: 1400px) {
  .dashboard-container {
    grid-template-columns: 280px 1fr 320px;
  }
  .hero-title { font-size: 1.3rem; }
  .hero-subtitle { font-size: 0.82rem; }
  .stat-value { font-size: 1.4rem; }
}

/* ======================== 1200px — Laptop ======================== */
@media (max-width: 1200px) {
  .dashboard-container {
    grid-template-columns: 260px 1fr;
    grid-template-rows: auto 550px auto;
  }
  .sidebar-right {
    grid-column: 1 / -1;
    max-height: none;
  }

  /* Header: stack elements */
  .cyber-header {
    height: auto;
    padding: 10px var(--space-4);
    flex-wrap: wrap;
    gap: 8px;
  }
  .brand-text h1 { font-size: 0.85rem; }
  .brand-text p { font-size: 0.65rem; }
  .layout-switcher {
    order: 10;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
  .layout-btn { font-size: 0.7rem; padding: 5px 10px; }
  .header-status-badge { font-size: 0.68rem; padding: 4px 10px; }
  .header-actions { gap: var(--space-2); }
  .btn-cyber { font-size: 0.75rem; padding: 6px 12px; }

  /* Hero */
  .hero-title { font-size: 1.2rem; }
  .hero-pill-stat { min-width: 110px; padding: 5px 10px; }
  .hero-pill-stat span.value { font-size: 0.85rem; }
  .pipeline-stages-grid { grid-template-columns: repeat(2, 1fr); }

  /* Stat cards */
  .stats-bar { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .stat-value { font-size: 1.35rem; }

  /* Telemetry */
  .earth2050-telemetry-bar { padding: 6px var(--space-4); }

  .cb-tools-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ======================== 1024px — Tablet Landscape ======================== */
@media (max-width: 1024px) {
  .dashboard-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: var(--space-3);
    padding: var(--space-3);
  }
  .sidebar-left {
    grid-column: 1 / -1;
    max-height: none;
  }
  .sidebar-right {
    grid-column: 1 / -1;
    max-height: none;
  }
  .graph-container {
    min-height: 450px;
  }

  /* Header */
  .cyber-header {
    padding: 8px var(--space-3);
  }
  .brand-title { gap: var(--space-2); }
  .brand-icon { width: 36px; height: 36px; font-size: 1.1rem; }

  /* Hero */
  .hero-header-row { flex-direction: column; gap: 12px; }
  .hero-headline-group { min-width: unset; }
  .hero-stats-quick { width: 100%; }
  .hero-pill-stat { flex: 1; min-width: 100px; }
  .investigation-hero-banner { padding: 12px var(--space-4); }

  /* Modals */
  .modal-container, .cyber-modal-card, .forensic-modal-dialog {
    max-width: 95vw;
    padding: 20px;
  }
  .modal-header-content h3 { font-size: 1.1rem; }

  /* Info panel & accordion */
  .info-panel-grid { grid-template-columns: 1fr !important; }
  .accordion-content-grid { grid-template-columns: 1fr !important; }

  .cb-tools-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ======================== 768px — Tablet Portrait ======================== */
@media (max-width: 768px) {
  /* Dashboard */
  .dashboard-container {
    grid-template-columns: 1fr;
    padding: var(--space-2);
    gap: var(--space-2);
  }

  /* Header: fully stacked */
  .cyber-header {
    padding: 8px 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .brand-title {
    justify-content: center;
    text-align: center;
  }
  .brand-text h1 { font-size: 0.78rem; text-align: center; }
  .brand-text p { text-align: center; }
  .layout-switcher {
    width: 100%;
    justify-content: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 2px 0;
  }
  .layout-switcher::-webkit-scrollbar { display: none; }
  .layout-btn { font-size: 0.65rem; padding: 4px 8px; white-space: nowrap; flex-shrink: 0; }
  .header-status-badge {
    justify-content: center;
    font-size: 0.65rem;
    padding: 3px 8px;
  }
  .header-actions {
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
  }
  .btn-cyber { font-size: 0.7rem; padding: 5px 10px; }
  .badge-12 { font-size: 0.6rem; padding: 1px 4px; }

  /* Telemetry */
  .earth2050-telemetry-bar {
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
    padding: 6px 12px;
  }
  .telemetry-col { flex-direction: column; gap: 4px; align-items: flex-start; }
  .telemetry-item { gap: 4px; flex-wrap: wrap; }
  .telemetry-label { font-size: 0.6rem; }
  .telemetry-value { font-size: 0.7rem; }
  .telemetry-badge-live { font-size: 0.6rem; justify-content: center; }
  .telemetry-audio-btn { align-self: flex-start; }

  /* Hero Banner */
  .investigation-hero-banner { padding: 10px 12px; }
  .hero-title { font-size: 1rem; letter-spacing: -0.3px; }
  .hero-subtitle { font-size: 0.78rem; }
  .hero-badge { font-size: 0.55rem; padding: 2px 6px; }
  .hero-badge-strip { gap: 4px; }
  .hero-stats-quick { gap: 6px; }
  .hero-pill-stat { min-width: 90px; padding: 4px 8px; }
  .hero-pill-stat span.label { font-size: 0.58rem; }
  .hero-pill-stat span.value { font-size: 0.78rem; }
  .pipeline-stages-grid { grid-template-columns: 1fr; gap: 8px; }
  .pipeline-header-label { font-size: 0.65rem; }
  .stage-title { font-size: 0.75rem; }
  .stage-desc { font-size: 0.68rem; }

  /* Stat Cards */
  .stats-bar { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-card { padding: 10px 14px; }
  .stat-icon { width: 36px; height: 36px; font-size: 1.1rem; }
  .stat-value { font-size: 1.2rem; }
  .stat-info h4 { font-size: 0.65rem; }

  /* Sidebars */
  .sidebar-left, .sidebar-right {
    padding: 14px;
    max-height: none;
  }
  .panel-title { font-size: 0.78rem; }
  .preset-buttons { grid-template-columns: 1fr 1fr; gap: 6px; }
  .btn-preset { font-size: 0.7rem; padding: 6px 8px; }

  /* Graph Container */
  .graph-container { min-height: 380px; border-radius: var(--radius-md); }
  .canvas-floating-helper { font-size: 0.68rem; padding: 4px 8px; }
  .graph-hud-controls { top: 8px; right: 8px; }

  /* Modals */
  .modal-container, .cyber-modal-card, .forensic-modal-dialog {
    max-width: 100vw;
    max-height: 95vh;
    padding: 16px;
    border-radius: var(--radius-md);
    margin: 8px;
  }
  .modal-overlay, .cyber-modal-overlay, .forensic-modal { padding: 8px; }
  .modal-close-btn { top: 10px; right: 10px; width: 32px; height: 32px; font-size: 0.95rem; }
  .modal-header-content { padding-right: 40px; gap: 10px; flex-direction: column; }
  .modal-header-content h3 { font-size: 1rem; }

  /* Node Detail */
  .node-detail-panel { padding: 14px; }

  /* Simple Flow */
  .simple-flow-view { padding: 16px; }
  .simple-flow-steps-grid { grid-template-columns: 1fr; gap: 12px; }

  .cb-tools-grid { grid-template-columns: 1fr; }

  /* Flow Step Cards */
  .flow-step-card { padding: 12px; }
  .flow-step-badge-num { width: 28px; height: 28px; font-size: 0.75rem; }
  .flow-step-meta h4 { font-size: 0.85rem; }
  .flow-evidence-box { font-size: 0.72rem; padding: 8px; }

  /* Legend */
  .category-legend { gap: 4px; }
  .legend-item { padding: 5px 8px; }
  .legend-item label { font-size: 0.7rem; }
}

/* ======================== 480px — Mobile ======================== */
@media (max-width: 480px) {
  /* Dashboard */
  .dashboard-container {
    padding: var(--space-1);
    gap: var(--space-1);
  }

  /* Header */
  .cyber-header { padding: 6px 8px; gap: 4px; }
  .brand-icon { width: 30px; height: 30px; font-size: 0.95rem; }
  .brand-text h1 { font-size: 0.68rem; letter-spacing: 0; }
  .brand-text p { font-size: 0.55rem; display: none; }
  .layout-switcher { gap: 2px; padding: 2px; }
  .layout-btn { font-size: 0.58rem; padding: 3px 6px; gap: 3px; }
  .layout-btn i { font-size: 0.7rem; }
  .header-status-badge { font-size: 0.58rem; padding: 2px 6px; }
  .header-actions { gap: 4px; }
  .btn-cyber { font-size: 0.62rem; padding: 4px 8px; gap: 4px; }
  .badge-12 { display: none; }

  /* Telemetry */
  .earth2050-telemetry-bar { padding: 4px 8px; font-size: 0.6rem; }
  .telemetry-value { font-size: 0.62rem; }
  .telemetry-label { font-size: 0.55rem; }
  .telemetry-badge-live { font-size: 0.55rem; padding: 2px 6px; }

  /* Hero Banner */
  .investigation-hero-banner { padding: 8px; }
  .hero-title { font-size: 0.85rem; }
  .hero-subtitle { font-size: 0.72rem; line-height: 1.35; }
  .hero-badge { font-size: 0.5rem; padding: 1px 5px; }
  .hero-badge i { font-size: 0.55rem; }
  .hero-stats-quick {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
  }
  .hero-pill-stat { min-width: unset; padding: 4px 6px; }
  .hero-pill-stat span.label { font-size: 0.52rem; }
  .hero-pill-stat span.value { font-size: 0.7rem; }
  .btn-hero-toggle { font-size: 0.55rem; padding: 3px 8px; }

  /* Pipeline */
  .pipeline-stages-grid { gap: 6px; }
  .pipeline-stage-btn { padding: 8px; }
  .stage-number-tag { font-size: 0.58rem; }
  .stage-year-tag { font-size: 0.58rem; }
  .stage-title { font-size: 0.7rem; }
  .stage-desc { font-size: 0.62rem; }
  .pipeline-header-label { font-size: 0.6rem; }

  /* Stat Cards */
  .stats-bar { grid-template-columns: 1fr 1fr; gap: 6px; }
  .stat-card { padding: 8px 10px; gap: var(--space-2); }
  .stat-icon { width: 30px; height: 30px; font-size: 0.95rem; }
  .stat-value { font-size: 1rem; }
  .stat-info h4 { font-size: 0.58rem; letter-spacing: 0.3px; }

  /* Sidebars */
  .sidebar-left, .sidebar-right { padding: 10px; gap: var(--space-3); }
  .panel-title { font-size: 0.72rem; padding-bottom: 8px; }
  .search-box input { padding: 8px 12px 8px 32px; font-size: 0.7rem; }
  .preset-buttons { grid-template-columns: 1fr; gap: 4px; }
  .btn-preset { font-size: 0.65rem; padding: 5px 6px; }

  /* Graph */
  .graph-container { min-height: 300px; }
  .canvas-floating-helper { display: none; }
  .graph-hud-controls { top: 6px; right: 6px; gap: 4px; }

  /* Modals */
  .modal-container, .cyber-modal-card, .forensic-modal-dialog {
    padding: 12px;
    gap: 12px;
    margin: 4px;
  }
  .modal-overlay, .cyber-modal-overlay, .forensic-modal { padding: 4px; }
  .modal-close-btn { top: 8px; right: 8px; width: 28px; height: 28px; font-size: 0.85rem; }
  .modal-header-content h3 { font-size: 0.9rem; }
  .modal-header-content p { font-size: 0.68rem; }
  .modal-header-content { padding-right: 32px; }

  /* Legend */
  .legend-item { padding: 4px 6px; }
  .legend-item label { font-size: 0.65rem; }
  .color-indicator { width: 8px; height: 8px; }

  /* Flow View */
  .simple-flow-view { padding: 10px; }
  .flow-step-card { padding: 10px; gap: 8px; }
  .flow-step-badge-num { width: 24px; height: 24px; font-size: 0.65rem; }
  .flow-step-meta h4 { font-size: 0.78rem; }
  .flow-step-meta span { font-size: 0.6rem; }
  .flow-evidence-box { font-size: 0.65rem; padding: 6px; }
  .flow-entity-chip { font-size: 0.6rem; padding: 2px 6px; }

  .cb-tool-card { padding: 12px; }
  .cb-tool-name { font-size: 0.78rem; }
  .cb-tool-desc { font-size: 0.65rem; }
}

/* ======================== 360px — Small Mobile ======================== */
@media (max-width: 360px) {
  .cyber-header { padding: 4px 6px; }
  .brand-icon { width: 26px; height: 26px; font-size: 0.85rem; }
  .brand-text h1 { font-size: 0.6rem; }

  .layout-switcher { flex-wrap: nowrap; }
  .layout-btn span:not(.bi) { display: none; }
  .layout-btn { padding: 4px 6px; }

  .hero-title { font-size: 0.75rem; }
  .hero-subtitle { font-size: 0.65rem; }
  .hero-badge { font-size: 0.45rem; }
  .hero-stats-quick { grid-template-columns: 1fr; }

  .stats-bar { grid-template-columns: 1fr; }
  .stat-value { font-size: 0.9rem; }

  .graph-container { min-height: 260px; }

  .modal-container, .cyber-modal-card, .forensic-modal-dialog {
    padding: 8px;
    gap: 8px;
  }
  .modal-header-content h3 { font-size: 0.82rem; }

  .btn-cyber { font-size: 0.55rem; padding: 3px 6px; }
  .earth2050-telemetry-bar { display: none; }
}

/* ======================== Touch & Mobile Enhancements ======================== */
@media (hover: none) and (pointer: coarse) {
  .btn-cyber, .btn-preset, .layout-btn, .pipeline-stage-btn,
  .flow-entity-chip, .legend-item, .telemetry-audio-btn,
  .btn-hero-toggle, .cb-tool-card {
    min-height: 44px;
    min-width: 44px;
  }
  .btn-preset { min-height: 40px; }
  .layout-btn { min-height: 36px; }
  .legend-item { min-height: 38px; }
  .flow-entity-chip { min-height: 32px; }

  /* Increase tap targets on mobile */
  .modal-close-btn { width: 40px; height: 40px; }
  .search-box input { min-height: 44px; }
}

/* ======================== Landscape Mobile ======================== */
@media (max-height: 500px) and (orientation: landscape) {
  .cyber-header { height: auto; min-height: 40px; padding: 4px 12px; }
  .earth2050-telemetry-bar { padding: 3px 12px; }
  .investigation-hero-banner { padding: 6px 12px; }
  .hero-title { font-size: 0.85rem; }
  .hero-subtitle { display: none; }
  .hero-pipeline-wrapper { display: none; }
  .graph-container { min-height: 200px; }
  .modal-container, .cyber-modal-card, .forensic-modal-dialog {
    max-height: 90vh;
  }
}

/* ======================== Print Styles ======================== */
@media print {
  .cyber-header, .earth2050-telemetry-bar, .layout-switcher,
  .header-actions, .graph-hud-controls, .canvas-floating-helper,
  .telemetry-audio-btn, .btn-hero-toggle { display: none !important; }

  body { background: #fff !important; color: #111 !important; }
  .dashboard-container { display: block !important; }
  .stat-card { break-inside: avoid; border: 1px solid #ccc; }
  .graph-container { min-height: 400px; break-inside: avoid; }
}
