/* ==========================================================================
   RADAR VORCARO - REDE NEURAL INVESTIGATIVA
   Design System: Deep Cyber-Noir / Neural Network Aesthetics
   ========================================================================== */

:root {
  --bg-primary: #060913;
  --bg-secondary: #0b1120;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(56, 189, 248, 0.35);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  /* Paleta de Núcleos */
  --c-central: #f43f5e;
  --c-politica: #38bdf8;
  --c-judiciario: #fbbf24;
  --c-celebridade: #ec4899;
  --c-empresas: #34d399;
  --c-instituicao: #a855f7;
  
  /* Fontes */
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Efeitos */
  --shadow-neon: 0 0 25px rgba(56, 189, 248, 0.2);
  --glass-blur: blur(14px);
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-main);
  position: relative;
  user-select: none;
}

/* Fundo com grade neural sutil e orbes de luz */
.neural-bg-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: 
    radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.07) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(244, 63, 94, 0.06) 0%, transparent 50%);
  background-size: 100% 100%;
}

/* ==========================================================================
   HEADER SUPERIOR
   ========================================================================== */
.header-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: rgba(6, 9, 19, 0.85);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 50;
}

.header-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-badge {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pulse-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444;
  animation: pulseBeacon 1.8s infinite;
}

@keyframes pulseBeacon {
  0% { transform: scale(0.95); opacity: 0.9; }
  50% { transform: scale(1.35); opacity: 1; box-shadow: 0 0 16px #ef4444; }
  100% { transform: scale(0.95); opacity: 0.9; }
}

.logo-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: #f87171;
  text-transform: uppercase;
}

.app-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.title-sub {
  font-size: 13px;
  font-weight: 700;
  color: var(--c-politica);
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-left: 4px;
}

.app-subtitle {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 400;
}

/* Métricas Rápidas */
.header-metrics {
  display: flex;
  align-items: center;
  gap: 24px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 6px 18px;
}

.metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.metric-val {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: #38bdf8;
}

#metricRombo {
  color: #f43f5e;
}

.metric-lbl {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Ações no Header */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-primary {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 9px 18px;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
  transition: var(--transition-fast);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.45);
}

.btn-secondary {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-secondary:hover {
  background: rgba(51, 65, 85, 0.8);
  color: #ffffff;
  border-color: var(--border-highlight);
}

/* ==========================================================================
   BARRA DE FILTROS E BUSCA
   ========================================================================== */
.filter-panel {
  position: absolute;
  top: 72px;
  left: 0;
  right: 0;
  height: 52px;
  background: rgba(11, 17, 32, 0.75);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 45;
  gap: 16px;
}

.search-box-wrap {
  position: relative;
  width: 320px;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-dim);
  pointer-events: none;
}

.search-box-wrap input {
  width: 100%;
  height: 36px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0 32px 0 36px;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 13px;
  outline: none;
  transition: var(--transition-fast);
}

.search-box-wrap input:focus {
  border-color: var(--c-politica);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
  background: rgba(15, 23, 42, 1);
}

.search-clear {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
}

.search-clear.hidden {
  display: none;
}

.filter-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-tags::-webkit-scrollbar {
  display: none;
}

.filter-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.filter-tag:hover {
  background: rgba(30, 41, 59, 0.8);
  color: #fff;
}

.filter-tag.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--c-politica);
  color: #ffffff;
  font-weight: 600;
}

.tag-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.tag-dot.all { background: #cbd5e1; }
.tag-dot.politica { background: var(--c-politica); }
.tag-dot.judiciario { background: var(--c-judiciario); }
.tag-dot.celebridade { background: var(--c-celebridade); }
.tag-dot.empresas { background: var(--c-empresas); }
.tag-dot.instituicao { background: var(--c-instituicao); }

.mode-toggles {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toggle-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-muted);
}

.toggle-pill input {
  display: none;
}

.toggle-slider {
  width: 32px;
  height: 18px;
  background: rgba(51, 65, 85, 0.7);
  border-radius: 20px;
  position: relative;
  transition: var(--transition-fast);
}

.toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: var(--transition-fast);
}

.toggle-pill input:checked + .toggle-slider {
  background: var(--c-politica);
}

.toggle-pill input:checked + .toggle-slider::after {
  transform: translateX(14px);
}

/* ==========================================================================
   CANVAS DO GRAFO
   ========================================================================== */
.network-container {
  position: absolute;
  top: 124px;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  cursor: grab;
}

.network-container.grabbing {
  cursor: grabbing;
}

#neuralCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Legenda Flutuante no Canto Inferior Esquerdo */
.canvas-legend {
  position: absolute;
  bottom: 24px;
  left: 24px;
  background: rgba(11, 17, 32, 0.85);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 14px 18px;
  width: 260px;
  pointer-events: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 30;
}

.legend-header {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.legend-dot.central { background: var(--c-central); box-shadow: 0 0 8px var(--c-central); }
.legend-dot.politica { background: var(--c-politica); }
.legend-dot.judiciario { background: var(--c-judiciario); }
.legend-dot.celebridade { background: var(--c-celebridade); }
.legend-dot.empresas { background: var(--c-empresas); }
.legend-dot.instituicao { background: var(--c-instituicao); }

.legend-hint {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.4;
}

/* Controles Flutuantes de Zoom / Câmera */
.canvas-floating-controls {
  position: absolute;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 30;
}

.ctrl-btn {
  width: 42px;
  height: 42px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  color: var(--text-main);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}

.ctrl-btn:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: var(--c-politica);
  transform: scale(1.05);
}

/* Tooltip Rápido */
.node-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-highlight);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
  z-index: 40;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}

.node-tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   DRAWER LATERAL: DOSSIÊ INVESTIGATIVO
   ========================================================================== */
.dossier-drawer {
  position: fixed;
  top: 72px;
  right: -520px;
  width: 480px;
  bottom: 0;
  background: rgba(11, 17, 32, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-left: 1px solid var(--border-subtle);
  box-shadow: -15px 0 40px rgba(0,0,0,0.6);
  z-index: 60;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.dossier-drawer.open {
  right: 0;
}

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

.drawer-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--c-politica);
  background: rgba(56, 189, 248, 0.1);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.drawer-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition-fast);
}

.drawer-close:hover {
  color: #ffffff;
  transform: scale(1.1);
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}

/* Estilos de Detalhes no Dossiê */
.profile-card {
  display: flex;
  gap: 18px;
  margin-bottom: 24px;
  align-items: center;
}

.profile-avatar-wrap {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--c-politica), transparent);
  flex-shrink: 0;
}

.profile-avatar-wrap.central {
  background: linear-gradient(135deg, var(--c-central), #fbbf24);
}

.profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #1e293b;
}

.profile-info h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.profile-role {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.status-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.dossier-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.dossier-stat-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px;
}

.dossier-stat-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.dossier-stat-val {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.section-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 20px 0 10px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.bio-paragraph {
  font-size: 13.5px;
  line-height: 1.6;
  color: #cbd5e1;
  margin-bottom: 16px;
}

/* Conexões Diretas no Card */
.connection-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.connection-item {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 14px;
  transition: var(--transition-fast);
  cursor: pointer;
}

.connection-item:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: var(--border-highlight);
  transform: translateX(4px);
}

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

.conn-target {
  font-weight: 600;
  font-size: 14px;
  color: #38bdf8;
}

.conn-val {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #fbbf24;
}

.conn-desc {
  font-size: 12.5px;
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 8px;
}

.conn-source {
  font-size: 11px;
  color: var(--text-dim);
  font-style: italic;
}

/* ==========================================================================
   MODAL DO TOUR GUIADO
   ========================================================================== */
.tour-modal {
  position: fixed;
  inset: 0;
  background: rgba(6, 9, 19, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.tour-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.tour-card {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border-highlight);
  border-radius: 18px;
  width: 90%;
  max-width: 580px;
  padding: 32px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), var(--shadow-neon);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.tour-modal.show .tour-card {
  transform: translateY(0);
}

.tour-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.tour-progress-bar {
  width: 140px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #2563eb);
  width: 12.5%;
  transition: width 0.3s ease;
}

.tour-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 14px;
}

.tour-body {
  font-size: 14px;
  line-height: 1.7;
  color: #cbd5e1;
  margin-bottom: 24px;
}

.tour-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tour-skip {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
}

.tour-skip:hover {
  color: #fff;
}

/* ==========================================================================
   RESPONSIVIDADE
   ========================================================================== */
@media (max-width: 900px) {
  .header-metrics {
    display: none;
  }
  .dossier-drawer {
    width: 100vw;
    right: -100vw;
  }
  .filter-panel {
    overflow-x: auto;
    gap: 10px;
  }
  .search-box-wrap {
    width: 200px;
  }
  .canvas-legend {
    display: none;
  }
}

/* Ajustes editoriais discretos: preservam a composição visual original. */
.source-link { color: #7dd3fc; text-decoration: underline; text-underline-offset: 3px; }
.source-meta { color: #aab8cb; font-size: 12px; line-height: 1.6; margin-top: 8px; }
.profile-initials { display: grid; place-items: center; color: #7dd3fc; font-size: 25px; }
.drawer-content { user-select: text; }
button.connection-item { width: 100%; text-align: left; font-family: inherit; color: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid #7dd3fc; outline-offset: 3px; }
#tourPrev { width: auto; padding: 0 12px; }
.toggle-pill input { display: block; width: 16px; height: 16px; accent-color: #38bdf8; }
.toggle-slider { display: none; }
@media (max-width: 700px) {
 .header-bar { padding: 6px 12px; height: auto; min-height: 72px; }
 .app-title { font-size: 16px; }
 .app-subtitle { display: none; }
 .header-actions { gap: 5px; }
 #btnTour { padding: 6px 10px; }
 #btnTour .btn-text { font-size: 11px; }
 .view-switch-btn { font-size: 10px; padding: 3px 6px; }
 #btnSound { display: none; }
 .filter-panel { padding: 0 12px; }
 .search-box-wrap { min-width: 175px; }
 .filter-tags, .mode-toggles { flex-shrink: 0; }
 .dossier-drawer { width: 100vw; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

#neuralCanvas { touch-action: none; }
.tour-card { max-height: 85vh; overflow-y: auto; }

/* ==========================================================================
   ESTILOS APERFEIÇOADOS: DOSSIÊ INVESTIGATIVO COM ABAS E FOTOS REAIS
   ========================================================================== */
.dossier-nav-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.dossier-nav-tabs::-webkit-scrollbar { display: none; }

.dossier-tab-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: var(--transition-fast);
}
.dossier-tab-btn:hover {
  color: #ffffff;
}
.dossier-tab-btn.active {
  color: #38bdf8;
  border-bottom-color: #38bdf8;
}

.dossier-pane {
  display: none;
  animation: fadeInPane 0.25s ease;
}
.dossier-pane.active {
  display: block;
}
@keyframes fadeInPane {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Caixa de Defesa e Contraditório */
.defesa-box {
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-left: 4px solid #fbbf24;
  border-radius: 8px;
  padding: 14px 16px;
  margin: 16px 0;
}
.defesa-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fbbf24;
  margin-bottom: 8px;
}
.defesa-text {
  font-size: 13px;
  line-height: 1.6;
  color: #cbd5e1;
  font-style: italic;
}

/* Mini-Avatares de Conexões */
.conn-avatar-wrap {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 1.5px solid var(--border-highlight);
  background: #1e293b;
}
.conn-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.connection-item-rich {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: var(--transition-fast);
}
.connection-item-rich:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: var(--border-highlight);
  transform: translateX(4px);
}
.conn-rich-body {
  flex: 1;
}

/* Modal de Fontes e Metodologia */
.sources-modal-wrap {
  position: fixed;
  inset: 0;
  background: rgba(6, 9, 19, 0.85);
  backdrop-filter: blur(12px);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.sources-modal-wrap.open {
  display: flex;
}
.sources-modal-card {
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid var(--border-highlight);
  border-radius: 16px;
  width: 90%;
  max-width: 840px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0,0,0,0.8);
}
.sources-modal-header {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}
.sources-modal-body {
  padding: 24px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.sources-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 12.5px;
}
.sources-table th {
  text-align: left;
  padding: 10px 12px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-subtle);
  text-transform: uppercase;
  font-size: 11px;
}
.sources-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: #cbd5e1;
}

/* ==========================================================================
   ÁREA DE EVIDÊNCIAS & PROVAS FORENSES (DRAWER & LIGHTBOX)
   ========================================================================== */

/* Filtros rápidos na aba do dossiê */
.ev-filter-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.ev-filter-btn {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}
.ev-filter-btn:hover {
  border-color: #38bdf8;
  color: #fff;
  background: rgba(56, 189, 248, 0.12);
}
.ev-filter-btn.active {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
  color: #38bdf8;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

/* Grid de cards de evidências */
.evidence-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.evidence-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  gap: 12px;
}
.evidence-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: #38bdf8;
  opacity: 0.6;
  transition: all 0.2s ease;
}
.evidence-card[data-type="print_conversa"]::before { background: #22c55e; }
.evidence-card[data-type="documento"]::before { background: #fbbf24; }
.evidence-card[data-type="foto"]::before { background: #ec4899; }
.evidence-card[data-type="laudo"]::before { background: #a855f7; }

.evidence-card:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.evidence-card:hover::before {
  opacity: 1;
  width: 4px;
}

.evidence-card-thumb {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.evidence-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.evidence-card-thumb-icon {
  font-size: 24px;
}

.evidence-card-content {
  flex: 1;
  min-width: 0;
}
.evidence-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.evidence-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  font-family: var(--font-mono);
}
.evidence-badge.badge-print {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}
.evidence-badge.badge-doc {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}
.evidence-badge.badge-foto {
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.3);
}
.evidence-badge.badge-laudo {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.evidence-card-date {
  font-size: 10.5px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}
.evidence-card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #f1f5f9;
  line-height: 1.35;
  margin-bottom: 5px;
}
.evidence-card-summary {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.evidence-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.06);
}
.evidence-card-cta {
  font-size: 11px;
  color: #38bdf8;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   MODAL LIGHTBOX FORENSE (#evidenceModal)
   ========================================================================== */
.evidence-modal-wrap {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 15, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.evidence-modal-wrap.open {
  display: flex;
}

.evidence-modal-card {
  background: #090d16;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 16px;
  width: 95%;
  max-width: 1080px;
  height: 88vh;
  max-height: 860px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9), 0 0 30px rgba(56, 189, 248, 0.15);
  overflow: hidden;
}

.evidence-modal-header {
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.85);
  flex-shrink: 0;
}
.ev-modal-header-meta {
  flex: 1;
  min-width: 0;
}
.ev-modal-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 4px;
  text-transform: uppercase;
  font-family: var(--font-mono);
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.ev-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.3;
  margin: 0;
}
.ev-modal-date {
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  margin-top: 3px;
}

.evidence-modal-body {
  flex: 1;
  display: flex;
  overflow: hidden;
  background: #070a12;
}

/* Coluna Esquerda: Visualizador Interativo */
.evidence-viewer-col {
  flex: 1.45;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  background: #0b0f19;
}
.evidence-viewer-box {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  scrollbar-width: thin;
}
.ev-viewer-actions {
  padding: 12px 20px;
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 12px;
}
.btn-ev-action {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-ev-action:hover {
  background: rgba(56, 189, 248, 0.25);
  color: #fff;
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}
.ev-copy-feedback {
  font-size: 11.5px;
  color: #4ade80;
  font-weight: 500;
}

/* Coluna Direita: Metadados Forenses e Contraditório */
.evidence-meta-col {
  flex: 1;
  overflow-y: auto;
  padding: 22px;
  scrollbar-width: thin;
  background: #090d16;
}
.ev-section-heading {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 10px;
  font-family: var(--font-mono);
}
.ev-meta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.ev-meta-item {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px 12px;
}
.ev-meta-key {
  font-size: 10px;
  color: #38bdf8;
  font-family: var(--font-mono);
  text-transform: uppercase;
  margin-bottom: 3px;
}
.ev-meta-val {
  font-size: 12px;
  color: #e2e8f0;
  font-weight: 500;
}

.ev-summary-text {
  font-size: 13px;
  line-height: 1.6;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 12px 14px;
}

.ev-defesa-box {
  background: rgba(251, 191, 36, 0.07);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-left: 3px solid #fbbf24;
  border-radius: 8px;
  padding: 14px;
  margin-top: 18px;
}
.ev-defesa-label {
  font-size: 11px;
  font-weight: 700;
  color: #fbbf24;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}
.ev-defesa-text {
  font-size: 12.5px;
  line-height: 1.55;
  color: #fef08a;
  font-style: italic;
}

/* ==========================================================================
   RENDERER 1: SIMULADOR DE CHAT WHATSAPP FORENSE
   ========================================================================== */
.ev-chat-container {
  background: #0b141a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.ev-chat-header {
  background: #202c33;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ev-chat-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ev-chat-pf-badge {
  font-size: 10px;
  background: #0284c7;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-weight: bold;
}
.ev-chat-title {
  font-size: 13px;
  font-weight: 600;
  color: #e9edef;
}
.ev-chat-subtitle {
  font-size: 11px;
  color: #8696a0;
}

.ev-chat-body {
  padding: 18px 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: 
    radial-gradient(circle at 50% 50%, rgba(17, 27, 33, 0.95), #0b141a 90%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.015) 0, rgba(255,255,255,0.015) 1px, transparent 0, transparent 20px);
}
.ev-chat-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-25deg);
  font-size: 26px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.035);
  white-space: nowrap;
  pointer-events: none;
  font-family: var(--font-mono);
  letter-spacing: 4px;
  z-index: 1;
}

.ev-chat-notice {
  align-self: center;
  background: #182229;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 11px;
  color: #ffd279;
  text-align: center;
  max-width: 85%;
  line-height: 1.4;
  margin-bottom: 8px;
  z-index: 2;
}

.chat-bubble {
  max-width: 78%;
  padding: 8px 12px;
  border-radius: 8px;
  position: relative;
  font-size: 13px;
  line-height: 1.45;
  z-index: 2;
  word-break: break-word;
}
.chat-bubble.incoming {
  align-self: flex-start;
  background: #202c33;
  color: #e9edef;
  border-top-left-radius: 2px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.chat-bubble.outgoing {
  align-self: flex-end;
  background: #005c4b;
  color: #e9edef;
  border-top-right-radius: 2px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.chat-sender {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 2px;
  color: #53bdeb;
}
.chat-bubble.outgoing .chat-sender {
  color: #85efac;
}

.chat-text {
  color: #f0f2f5;
  white-space: pre-wrap;
}

.chat-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 4px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.55);
}
.chat-ticks {
  color: #53bdeb;
  font-size: 11px;
}

.ev-chat-footer-hash {
  background: #111b21;
  padding: 8px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 10px;
  color: #64748b;
  font-family: var(--font-mono);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==========================================================================
   RENDERER 2: SIMULADOR DE DOCUMENTO FAC-SÍMILE OFICIAL
   ========================================================================== */
.ev-doc-paper {
  background: #faf8f2;
  color: #1e293b;
  border: 1px solid #dcd3c1;
  border-radius: 6px;
  padding: 34px 38px;
  font-family: 'Times New Roman', Times, serif;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  position: relative;
  line-height: 1.6;
}
.ev-doc-stamp-watermark {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-18deg);
  border: 4px double rgba(185, 28, 28, 0.18);
  color: rgba(185, 28, 28, 0.22);
  padding: 10px 24px;
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 5px;
  text-transform: uppercase;
  pointer-events: none;
  white-space: nowrap;
}
.ev-doc-header {
  text-align: center;
  border-bottom: 2px solid #334155;
  padding-bottom: 14px;
  margin-bottom: 20px;
}
.ev-doc-republica {
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 1.5px;
  color: #0f172a;
  text-transform: uppercase;
}
.ev-doc-sub {
  font-size: 11px;
  letter-spacing: 1px;
  color: #475569;
  text-transform: uppercase;
  margin-top: 2px;
}
.ev-doc-title {
  font-size: 15px;
  font-weight: bold;
  margin-top: 10px;
  color: #020617;
  text-decoration: underline;
}
.ev-doc-body {
  font-size: 13.5px;
  white-space: pre-wrap;
  text-align: justify;
  color: #0f172a;
}
.ev-doc-footer-stamps {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid #cbd5e1;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.ev-doc-cartorio-stamp {
  border: 2px solid #b91c1c;
  color: #b91c1c;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: bold;
  border-radius: 4px;
  transform: rotate(-3deg);
  text-align: center;
}
.ev-doc-signatures {
  text-align: center;
  font-size: 11.5px;
  color: #334155;
}
.ev-doc-sig-line {
  width: 180px;
  border-top: 1px solid #0f172a;
  margin-bottom: 4px;
}

/* ==========================================================================
   RENDERER 3: VISUALIZADOR DE FOTOGRAFIA & LAUDO PERICIAL
   ========================================================================== */
.ev-photo-view-box {
  background: #020617;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ev-photo-frame {
  max-width: 100%;
  max-height: 420px;
  border-radius: 8px;
  border: 2px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
  object-fit: contain;
}
.ev-photo-caption {
  font-size: 12px;
  color: #cbd5e1;
  text-align: center;
  margin-top: 12px;
  line-height: 1.5;
}

/* Responsividade Mobile / Telas menores */
@media (max-width: 900px) {
  .evidence-modal-card {
    height: 94vh;
  }
  .evidence-modal-body {
    flex-direction: column;
  }
  .evidence-viewer-col {
    flex: 1.2;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .evidence-meta-col {
    flex: 1;
  }
}

/* ==========================================================================
   ALTERNADOR DE VISTAS (REDE NEURAL VS LINHA DO TEMPO)
   ========================================================================== */
.tour-switch-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
  z-index: 60;
}

.tour-switch-group #btnTour {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: 8px;
}

.view-switch-pills {
  display: inline-flex;
  background: rgba(11, 17, 32, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 20px;
  padding: 2px;
  gap: 2px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 61;
}

.view-switch-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  padding: 4px 10px;
  border-radius: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.view-switch-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.view-switch-btn.active {
  background: rgba(56, 189, 248, 0.25);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

/* ==========================================================================
   LINHA DO TEMPO CRONOLÓGICA INTERATIVA (#timelineContainer)
   ========================================================================== */
.timeline-view {
  position: absolute;
  inset: 0;
  z-index: 50;
  background: radial-gradient(circle at 50% 15%, rgba(15, 23, 42, 0.98), #060913 95%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow-y: auto;
  padding: 30px 24px 80px 24px;
  scrollbar-width: thin;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: default;
  user-select: text;
  pointer-events: auto;
}

.timeline-view.hidden {
  display: none !important;
}

.timeline-header-panel {
  width: 100%;
  max-width: 980px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.timeline-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  margin-bottom: 6px;
}

.timeline-title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
  letter-spacing: -0.3px;
}

.timeline-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.timeline-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.timeline-filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tl-chip {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.tl-chip:hover {
  border-color: #38bdf8;
  color: #fff;
}

.tl-chip.active {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  color: #38bdf8;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.btn-tl-sort {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-tl-sort:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #fff;
  border-color: #38bdf8;
}

/* Trilho Central e Stream de Cards */
.timeline-stream-wrap {
  width: 100%;
  max-width: 980px;
  position: relative;
  padding: 20px 0;
}

.timeline-spine {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #38bdf8 0%, #fbbf24 35%, #ec4899 65%, #f43f5e 100%);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.timeline-events-container {
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: relative;
}

.timeline-event-item {
  display: flex;
  position: relative;
  width: 100%;
  justify-content: flex-start;
}

.timeline-event-item.right {
  justify-content: flex-end;
}

/* Ponto no trilho central */
.tl-spine-dot {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #060913;
  border: 3px solid #38bdf8;
  box-shadow: 0 0 12px #38bdf8;
  z-index: 2;
  transition: transform 0.2s ease;
}

.timeline-event-item:hover .tl-spine-dot {
  transform: translate(-50%, -50%) scale(1.3);
  border-color: #fff;
  box-shadow: 0 0 18px #38bdf8;
}

.tl-spine-dot.dot-critico { border-color: #f43f5e; box-shadow: 0 0 12px #f43f5e; }
.tl-spine-dot.dot-alto { border-color: #fbbf24; box-shadow: 0 0 12px #fbbf24; }
.tl-spine-dot.dot-celebridade { border-color: #ec4899; box-shadow: 0 0 12px #ec4899; }

/* Card do Evento */
.timeline-card {
  width: 45%;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.timeline-card:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(56, 189, 248, 0.45);
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7), 0 0 20px rgba(56, 189, 248, 0.15);
}

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

.timeline-date-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.timeline-actors-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tl-actor {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 6px;
  transition: background 0.15s ease;
}
.tl-actor:hover {
  background: rgba(255, 255, 255, 0.08);
}

.tl-actor-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid #38bdf8;
  object-fit: cover;
}

.tl-actor-name {
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
}

.tl-actors-arrow {
  color: #fbbf24;
  font-size: 13px;
  font-weight: bold;
}

.timeline-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.35;
  margin-bottom: 6px;
}

.timeline-card-desc {
  font-size: 12.5px;
  color: #cbd5e1;
  line-height: 1.55;
  margin-bottom: 10px;
}

.timeline-card-val {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.3);
  padding: 3px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.timeline-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.06);
}

.btn-tl-view-graph, .btn-tl-view-dossier, .btn-tl-view-ev {
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.6);
  color: #94a3b8;
}

.btn-tl-view-graph:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border-color: #38bdf8;
}

.btn-tl-view-dossier:hover {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  border-color: #fbbf24;
}

.btn-tl-view-ev {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.3);
}
.btn-tl-view-ev:hover {
  background: rgba(34, 197, 94, 0.3);
  color: #fff;
  border-color: #22c55e;
}

/* Responsividade da Linha do Tempo em telas menores */
@media (max-width: 768px) {
  .timeline-spine {
    left: 20px;
  }
  .timeline-event-item, .timeline-event-item.right {
    justify-content: flex-start;
    padding-left: 45px;
  }
  .tl-spine-dot {
    left: 20px;
  }
  .timeline-card {
    width: 100%;
  }
}

/* ==========================================================================
   SISTEMA DE EDIÇÃO & VALIDAÇÃO DE DADOS (MODO CURADOR) - TEMPORARIAMENTE DESABILITADO
   ========================================================================== */
.btn-editor-toggle,
.btn-drawer-edit,
.btn-tl-edit,
.editor-modal-wrap,
.editor-toast,
.avatar-change-hint {
  display: none !important;
}

/* Modal do Editor */
.editor-modal-wrap {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(6, 9, 19, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.editor-modal-wrap.show {
  opacity: 1;
  pointer-events: auto;
}

.editor-modal-card {
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  background: #0b1120;
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 30px rgba(251, 191, 36, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalEnter 0.25s ease;
}

.editor-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.editor-modal-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.15);
  padding: 3px 9px;
  border-radius: 5px;
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.editor-target-pill {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
}

.editor-tabs-nav {
  display: flex;
  background: rgba(15, 23, 42, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0 16px;
  gap: 8px;
}

.editor-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.editor-tab-btn:hover {
  color: #fff;
}

.editor-tab-btn.active {
  color: #fbbf24;
  border-bottom-color: #fbbf24;
}

.editor-modal-body {
  padding: 22px 24px;
  overflow-y: auto;
  flex: 1;
}

.editor-pane {
  display: none;
}

.editor-pane.active {
  display: block;
}

/* Formulário do Editor */
.editor-form-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.form-group-full {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.form-row-2 {
  display: flex;
  gap: 14px;
}

.form-row-3 {
  display: flex;
  gap: 12px;
}

@media (max-width: 600px) {
  .form-row-2, .form-row-3 {
    flex-direction: column;
  }
}

.editor-label {
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.editor-input, .editor-select, .editor-textarea {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px 14px;
  color: #f8fafc;
  font-family: inherit;
  font-size: 13.5px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.editor-input:focus, .editor-select:focus, .editor-textarea:focus {
  outline: none;
  border-color: #fbbf24;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.25);
}

.editor-textarea {
  resize: vertical;
  line-height: 1.6;
}

/* Lista de Anexos no Editor */
.editor-anexos-header {
  margin-bottom: 16px;
}
.editor-anexos-header h4 {
  font-size: 16px;
  color: #f8fafc;
  margin-bottom: 4px;
}
.editor-subtext {
  font-size: 12.5px;
  color: #94a3b8;
}

.editor-anexos-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.editor-anexo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 16px;
  transition: border-color 0.2s ease;
}

.editor-anexo-item:hover {
  border-color: rgba(251, 191, 36, 0.35);
}

.editor-anexo-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.editor-anexo-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}

.editor-anexo-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(56, 189, 248, 0.4);
  flex-shrink: 0;
}

.editor-anexo-texts h5 {
  font-size: 13.5px;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 2px;
}

.editor-anexo-texts p {
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.4;
}

.btn-delete-anexo {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #f43f5e;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-delete-anexo:hover {
  background: #f43f5e;
  color: #fff;
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.4);
}

/* Dropzone de upload */
.editor-file-dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 18px;
  text-align: center;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-file-select {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.dropzone-text {
  font-size: 12px;
  color: #94a3b8;
}

.file-preview-wrap {
  position: relative;
  display: inline-block;
}

.file-preview-wrap img {
  max-height: 80px;
  border-radius: 8px;
  border: 1px solid #38bdf8;
}

.btn-remove-preview {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f43f5e;
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}

/* Footer do Editor */
.editor-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.editor-footer-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.editor-sync-status {
  font-size: 11px;
  font-family: var(--font-mono);
  color: #4ade80;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.editor-footer-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Toast de Notificação */
.editor-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  background: #0b1120;
  border: 1px solid #22c55e;
  color: #f0fdf4;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(34, 197, 94, 0.35);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.editor-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Estilos para Alteração de Imagem do Nó */
.node-avatar-preview-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid #38bdf8;
  overflow: hidden;
  background: #060913;
  flex-shrink: 0;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.35);
}

.node-avatar-preview-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-change-hint {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.75);
  color: #38bdf8;
  font-size: 9.5px;
  font-weight: 700;
  text-align: center;
  padding: 2px 0;
  opacity: 0.9;
  transition: all 0.2s ease;
}

.profile-avatar-wrap:hover .avatar-change-hint {
  background: rgba(56, 189, 248, 0.85);
  color: #060913;
  opacity: 1;
}

.btn-avatar-action {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.btn-avatar-action:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #fff;
}



