/* ===================================
   BASE DE OPERACIONES — MÓDULO A
   =================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

/* RESET Y VARIABLES */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Paleta Industrial-Militar-Solar-Punk */
  --industrial-black: #0a0a0a;
  --industrial-gray: #1a1a1a;
  --concrete-gray: #2d2d2d;
  --metal-dark: #404040;
  --metal-light: #666666;
  
  /* Colores de advertencia militar */
  --warning-yellow: #ffcc00;
  --warning-orange: #ff6600;
  --alert-red: #ff3333;
  
  /* Colores solar-punk */
  --solar-green: #00ff88;
  --life-green: #44ff88;
  --organic-green: #22aa55;
  
  /* Colores tecnológicos */
  --tech-blue: #00d4ff;
  --energy-cyan: #00ffff;
  --hologram-purple: #9966ff;
  
  /* Luces cálidas */
  --warm-orange: #ff9933;
  --soft-yellow: #ffffcc;
  
  /* Materiales */
  --aged-metal: linear-gradient(135deg, #2a2a2a, #1a1a1a);
  --concrete-texture: linear-gradient(45deg, #3a3a3a, #2a2a2a);
  --leather-brown: #4a3020;
  --glass-opaque: rgba(255,255,255,0.1);
  
  /* Fuentes */
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

body {
  font-family: var(--font-body);
  background: var(--industrial-black);
  color: #ccc;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  position: relative;
  cursor: crosshair;
}

/* ===================================
   ESCENA PRINCIPAL
   =================================== */

.scene {
  position: absolute;
  inset: 0;
  transition: transform 0.3s ease-out;
}

.scene-background {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.scene-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ===================================
   OBJETOS INTERACTIVOS TRANSPARENTES
   =================================== */
.objects-container {
  position: absolute;
  inset: 0;
  z-index: 10;
}

.object {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  pointer-events: auto;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  transition: all 0.3s ease;
  z-index: 1 !important;
}

/* Indicadores laterales */
.side-indicators-container {
  position: absolute;
  inset: 0;
  z-index: 100;
  pointer-events: none;
}

.side-indicator {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.5s ease;
  opacity: 0.15;
  filter: grayscale(0.9);
  animation: breathe 6s ease-in-out infinite;
  animation-delay: calc(var(--random-delay, 0) * 1s);
}

.side-indicator:hover,
.side-indicator.active {
  opacity: 1;
  filter: grayscale(0);
  transform: scale(1.1);
  animation: none;
}

.indicator-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid;
  animation: indicator-pulse 2s infinite;
  flex-shrink: 0;
  transition: all 0.5s ease;
  opacity: 0.4;
}

.side-indicator:hover .indicator-dot,
.side-indicator.active .indicator-dot {
  box-shadow: 0 0 25px 10px currentColor;
  animation: indicator-active-pulse 0.6s infinite;
  opacity: 1;
}

.side-indicator:not(:hover):not(.active) .indicator-dot {
  animation: dot-breathe 6s ease-in-out infinite;
  animation-delay: calc(var(--random-delay, 0) * 1s);
}

.indicator-label {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 10px currentColor;
  background: rgba(0, 0, 0, 0.6);
  padding: 4px 8px;
  border-radius: 3px;
  border: 1px solid;
  white-space: nowrap;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: all 0.5s ease;
  opacity: 0.5;
}

.side-indicator:hover .indicator-label,
.side-indicator.active .indicator-label {
  background: rgba(0, 0, 0, 0.9);
  box-shadow: 0 0 30px currentColor;
  opacity: 1;
}

@keyframes indicator-pulse {
  0%, 100% { 
    box-shadow: 0 0 0 0 currentColor;
    opacity: 0.5;
  }
  50% { 
    box-shadow: 0 0 8px 2px currentColor;
    opacity: 0.8;
  }
}

@keyframes indicator-active-pulse {
  0%, 100% { 
    box-shadow: 0 0 10px 3px currentColor;
    opacity: 1;
  }
  50% { 
    box-shadow: 0 0 20px 8px currentColor;
    opacity: 1;
  }
}

@keyframes breathe {
  0%, 100% { 
    opacity: 0.15;
    transform: scale(0.9);
    filter: grayscale(0.9);
  }
  50% { 
    opacity: 0.6;
    transform: scale(1.05);
    filter: grayscale(0.3);
  }
}

@keyframes dot-breathe {
  0%, 100% { 
    opacity: 0.2;
    box-shadow: 0 0 1px 0 currentColor;
  }
  50% { 
    opacity: 0.8;
    box-shadow: 0 0 15px 5px currentColor;
  }
}

/* Paneles cuadrados interactivos */
.object-click-panel {
  position: absolute;
  cursor: pointer;
  pointer-events: auto;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hotspot-ring {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 3px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  animation: hotspot-ripple 2.5s ease-out infinite;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  flex-shrink: 0;
}

.object-click-panel:hover .hotspot-ring {
  width: 65px;
  height: 65px;
  border-width: 4px;
  box-shadow: 0 0 30px currentColor;
}

.hotspot-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.object-click-panel:hover .hotspot-dot {
  width: 20px;
  height: 20px;
}

/* NOMBRE AL LADO DEL ANILLO */
.hotspot-name {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 10px currentColor;
  background: rgba(0, 0, 0, 0.7);
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.object-click-panel:hover .hotspot-name {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.05);
  box-shadow: 0 0 20px currentColor;
}

@keyframes hotspot-ripple {
  0% { 
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
  }
  70% { 
    box-shadow: 0 0 0 15px rgba(255, 255, 255, 0);
  }
  100% { 
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

/* Ocultar completamente todos los elementos visuales */
.object-core,
.object-hint {
  display: none;
}

/* Mostrar etiquetas flotantes con colores temáticos */
.object-label {
  display: block;
  position: absolute;
  top: -48px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.92);
  color: white;
  padding: 7px 14px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 1;
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 100;
  font-family: var(--font-mono, monospace);
  white-space: nowrap;
  text-shadow: 0 0 12px currentColor;
}

/* Panel de navegación inferior */
.object-nav-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 20px;
  background: linear-gradient(to top, rgba(10,10,10,0.95), transparent);
  z-index: 100;
  pointer-events: none;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.3s ease;
  opacity: 0.7;
}

.nav-item:hover {
  opacity: 1;
  transform: translateY(-5px);
}

.nav-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid;
  animation: nav-pulse 2s infinite;
}

.nav-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
}

@keyframes nav-pulse {
  0%, 100% { 
    box-shadow: 0 0 0 0 currentColor;
    opacity: 0.7;
  }
  50% { 
    box-shadow: 0 0 15px 5px currentColor;
    opacity: 1;
  }
}

.object.terminal .object-label {
  border: 1px solid #00d4ff;
  box-shadow: 0 0 8px rgba(0,212,255,0.5);
  color: #00d4ff;
}

.object.workbench .object-label {
  border: 1px solid #ff00ff;
  box-shadow: 0 0 8px rgba(255,0,255,0.5);
  color: #ff00ff;
}

.object.archive .object-label {
  border: 1px solid #00ff88;
  box-shadow: 0 0 8px rgba(0,255,136,0.5);
  color: #00ff88;
}

.object.panel-industrial .object-label {
  border: 1px solid #ffcc00;
  box-shadow: 0 0 8px rgba(255,204,0,0.5);
  color: #ffcc00;
}

.object.door .object-label {
  border: 1px solid #ff9933;
  box-shadow: 0 0 8px rgba(255,153,51,0.5);
  color: #ff9933;
}

/* Formas exactas con clip-path - polígonos corregidos */
.object.terminal {
  clip-path: polygon(
    34% 31%,
    55% 30%,
    58% 42%,
    56% 58%,
    45% 63%,
    33% 50%
  );
  z-index: 1 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.object.workbench {
  clip-path: polygon(
    60% 27%,
    93% 27%,
    96% 40%,
    92% 53%,
    72% 56%,
    57% 38%
  );
  z-index: 1 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.object.archive {
  clip-path: polygon(
    2% 26%,
    19% 25%,
    21% 42%,
    19% 65%,
    6% 68%,
    1% 45%
  );
  z-index: 1 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.object.panel-industrial {
  clip-path: polygon(
    1% 73%,
    22% 71%,
    23% 82%,
    20% 97%,
    2% 99%,
    0% 85%
  );
  z-index: 1 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.object.door {
  clip-path: polygon(
    73% 57%,
    88% 58%,
    91% 69%,
    87% 84%,
    70% 87%,
    65% 67%
  );
  z-index: 1 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Los polígonos son zonas de clic invisibles — sin background ni box-shadow */
.object:hover  { background: transparent !important; box-shadow: none !important; }
.object.active { background: transparent !important; box-shadow: none !important; }

/* ── GLOW SPOTS — luz suave en el centro visual de cada objeto ── */
.glow-spot {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 5;
  transform: translate(-50%, -50%);
  transition: opacity 0.35s ease, transform 0.35s ease, width 0.35s ease, height 0.35s ease;
  mix-blend-mode: screen;
}

.glow-spot .glow-core {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: glow-breathe 3s ease-in-out infinite;
  animation-delay: var(--gd, 0s);
}

.glow-spot .glow-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid;
  opacity: 0;
  transition: opacity 0.3s ease, inset 0.3s ease;
}

/* Estado idle — pulso suave */
@keyframes glow-breathe {
  0%, 100% { opacity: 0.25; transform: scale(0.9); }
  50%       { opacity: 0.55; transform: scale(1.1); }
}

/* Hover — glow spot se activa */
.glow-spot.hovered {
  width: 160px !important;
  height: 160px !important;
  opacity: 1 !important;
}
.glow-spot.hovered .glow-core {
  opacity: 0.85;
  animation: glow-pulse-active 0.8s ease-in-out infinite alternate;
}
.glow-spot.hovered .glow-ring {
  opacity: 0.7;
  inset: -16px;
  animation: ring-expand 1.2s ease-out infinite;
}

@keyframes glow-pulse-active {
  from { transform: scale(0.95); opacity: 0.7; }
  to   { transform: scale(1.1);  opacity: 1; }
}

@keyframes ring-expand {
  0%   { inset: -8px;  opacity: 0.8; }
  100% { inset: -40px; opacity: 0; }
}

/* Panel abierto — glow spot permanece encendido */
.glow-spot.panel-open {
  width: 140px !important;
  height: 140px !important;
  opacity: 0.9 !important;
}
.glow-spot.panel-open .glow-core {
  animation: glow-breathe-active 2s ease-in-out infinite;
}
@keyframes glow-breathe-active {
  0%, 100% { opacity: 0.6; transform: scale(0.95); }
  50%       { opacity: 1;   transform: scale(1.05); }
}

/* ── HUD SUPERIOR ───────────────────────────────────────────────────────── */
.hud-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to bottom, rgba(10,10,10,0.95), transparent);
  z-index: 1000;
  pointer-events: none;
}

/* Centrar el status en el HUD */
.hud-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
}
.hud-brand  { justify-self: start; }
.hud-status { justify-self: center; text-align: center; }
.hud-time   { justify-self: end; }

.hud-brand {
  font-size: 12px;
  letter-spacing: 4px;
  color: var(--tech-blue);
  font-weight: 900;
  text-shadow: 0 0 10px var(--tech-blue);
  animation: hud-glitch 8s infinite;
}

.hud-status {
  font-size: 10px;
  color: var(--solar-green);
  letter-spacing: 2px;
  font-weight: 700;
  animation: status-blink 4s infinite;
}

.hud-time {
  font-size: 10px;
  color: var(--metal-light);
  letter-spacing: 2px;
  font-weight: 700;
}

@keyframes hud-glitch {
  0%, 95%, 100% { text-shadow: 0 0 10px var(--tech-blue); }
  96% { text-shadow: 2px 0 var(--warning-yellow), -2px 0 var(--solar-green); }
  98% { text-shadow: -2px 0 var(--warning-yellow), 2px 0 var(--solar-green); }
}

@keyframes status-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes idle-pulse {
  0%, 100% { opacity: 1; text-shadow: 0 0 14px #00d4ff, 0 0 30px rgba(0,212,255,0.4); }
  50%       { opacity: 0.6; text-shadow: 0 0 6px #00d4ff; }
}

/* ===================================
   PANEL CONTAINER
   =================================== */

.panel-container {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.panel-container.active {
  display: block;
  opacity: 1;
}

.panel-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Simple lighting effect */
.panel-backdrop::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(0,212,255,0.1) 0%, transparent 70%);
  animation: backdrop-pulse 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes backdrop-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

.panel-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 90%;
  max-width: 1000px;
  max-height: 85vh;
  background: linear-gradient(135deg, rgba(26,26,26,0.98), rgba(16,16,16,0.98));
  border: 3px solid var(--metal-dark);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 
    0 20px 60px rgba(0,0,0,0.9),
    0 0 40px rgba(0,212,255,0.1);
  transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
  position: relative;
}

/* Colored panel variations with full themed borders */
.panel-content[data-color="blue"] {
  border-color: #00d4ff;
  box-shadow: 
    0 20px 60px rgba(0,0,0,0.9),
    0 0 20px rgba(0,212,255,0.6),
    0 0 40px rgba(0,212,255,0.4),
    0 0 60px rgba(0,212,255,0.2),
    inset 0 0 20px rgba(0,212,255,0.1);
}

.panel-content[data-color="green"] {
  border-color: #00ff88;
  box-shadow: 
    0 20px 60px rgba(0,0,0,0.9),
    0 0 20px rgba(0,255,136,0.6),
    0 0 40px rgba(0,255,136,0.4),
    0 0 60px rgba(0,255,136,0.2),
    inset 0 0 20px rgba(0,255,136,0.1);
}

.panel-content[data-color="purple"] {
  border-color: #ff00ff;
  box-shadow: 
    0 20px 60px rgba(0,0,0,0.9),
    0 0 20px rgba(255,0,255,0.6),
    0 0 40px rgba(255,0,255,0.4),
    0 0 60px rgba(255,0,255,0.2),
    inset 0 0 20px rgba(255,0,255,0.1);
}

.panel-content[data-color="orange"] {
  border-color: #ffcc00;
  box-shadow: 
    0 20px 60px rgba(0,0,0,0.9),
    0 0 20px rgba(255,204,0,0.6),
    0 0 40px rgba(255,204,0,0.4),
    0 0 60px rgba(255,204,0,0.2),
    inset 0 0 20px rgba(255,204,0,0.1);
}

.panel-content[data-color="warm-orange"] {
  border-color: #ff9933;
  box-shadow: 
    0 20px 60px rgba(0,0,0,0.9),
    0 0 20px rgba(255,153,51,0.6),
    0 0 40px rgba(255,153,51,0.4),
    0 0 60px rgba(255,153,51,0.2),
    inset 0 0 20px rgba(255,153,51,0.1);
}

.panel-container.active .panel-content {
  transform: translate(-50%, -50%) scale(1);
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: linear-gradient(to right, rgba(0,212,255,0.1), transparent);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}

.panel-status-bar {
  width: 4px;
  height: 32px;
  background: var(--tech-blue);
  border-radius: 2px;
  animation: status-pulse 2s infinite;
}

.panel-title-area {
  flex: 1;
}

.panel-code {
  font-size: 11px;
  color: var(--metal-light);
  letter-spacing: 3px;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.panel-title {
  font-size: 18px;
  color: #fff;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 0 0 10px currentColor;
}

.panel-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.panel-cta {
  background: var(--tech-blue);
  color: var(--industrial-black);
  border: none;
  padding: 10px 20px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.panel-cta:hover {
  background: var(--warning-yellow);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255,204,0,0.3);
}

.panel-close {
  background: transparent;
  color: var(--metal-light);
  border: 2px solid var(--metal-dark);
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 4px;
}

.panel-close:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  max-height: calc(85vh - 120px);
}

/* Scrollbar personalizado */
.panel-body::-webkit-scrollbar {
  width: 6px;
}

.panel-body::-webkit-scrollbar-track {
  background: var(--industrial-gray);
}

.panel-body::-webkit-scrollbar-thumb {
  background: var(--tech-blue);
  border-radius: 3px;
}

.panel-body::-webkit-scrollbar-thumb:hover {
  background: var(--warning-yellow);
}

/* ===================================
   INDICADOR INACTIVO
   =================================== */

.idle-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  opacity: 1;
  transition: all 0.3s ease;
}

.idle-indicator.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(10px);
}

.idle-text {
  font-size: 13px;
  color: #00d4ff;
  letter-spacing: 4px;
  font-weight: 800;
  text-shadow: 0 0 14px #00d4ff, 0 0 30px rgba(0,212,255,0.4);
  animation: idle-pulse 2.5s ease-in-out infinite;
  text-transform: uppercase;
  animation: idle-pulse 2.5s infinite;
}

@keyframes idle-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes status-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ===================================
   INDICADORES — MÁS VISIBLES
   =================================== */

/* Base más visible */
.side-indicator {
  opacity: 0.7 !important;
  filter: none !important;
}
.indicator-dot {
  width: 16px;
  height: 16px;
  opacity: 0.9;
}
.indicator-label {
  font-size: 11px;
  font-family: var(--font-mono);
  opacity: 0.9;
  font-weight: 700;
}
.side-indicator:hover,
.side-indicator.active {
  opacity: 1 !important;
}

/* ===================================
   PANEL — COMPONENTES DE CONTENIDO
   =================================== */
.panel-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.panel-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 10px;
  font-weight: 600;
}

.panel-name {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.panel-role {
  font-size: 13px;
  color: #888;
  margin-bottom: 14px;
  font-weight: 400;
}

.panel-p {
  font-size: 14px;
  color: #aaa;
  line-height: 1.7;
  font-weight: 400;
}

.panel-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.stat-card {
  padding: 12px;
  border: 1px solid;
  border-radius: 6px;
}
.stat-n {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-mono);
}
.stat-l {
  font-size: 10px;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  font-size: 11px;
  padding: 3px 10px;
  border: 1px solid;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-weight: 500;
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.info-item {
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
  border-left: 3px solid rgba(0,212,255,0.4);
}
.info-title {
  font-size: 13px;
  font-weight: 600;
  color: #ddd;
}
.info-sub {
  font-size: 11px;
  color: #666;
  margin-top: 2px;
}

/* ── PROYECTOS ─────────────────────────────── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.project-card {
  display: block;
  text-decoration: none;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  transition: all 0.25s ease;
  cursor: pointer;
}
.project-card:hover {
  border-color: var(--c, #fff);
  background: rgba(255,255,255,0.06);
  transform: translateY(-2px);
  box-shadow: 0 0 16px color-mix(in srgb, var(--c, #fff) 30%, transparent);
}
.project-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.project-status {
  font-size: 9px;
  font-family: var(--font-mono);
  letter-spacing: 1px;
  border: 1px solid;
  padding: 2px 6px;
  border-radius: 3px;
}
.project-cat {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.project-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}
.project-desc {
  font-size: 12px;
  color: #888;
  line-height: 1.6;
  margin-bottom: 10px;
}
.project-arrow {
  font-size: 12px;
  font-weight: 600;
}

/* ── ARCHIVO ──────────────────────────────── */
.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.archive-card {
  padding: 18px;
  border: 1px solid;
  border-radius: 8px;
  background: rgba(0,255,136,0.03);
}
.archive-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.archive-code {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #555;
  letter-spacing: 2px;
}
.archive-status {
  font-size: 9px;
  font-family: var(--font-mono);
  border: 1px solid;
  padding: 2px 7px;
  border-radius: 3px;
  letter-spacing: 1px;
}
.archive-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}
.archive-open-btn {
  display: inline-block;
  text-decoration: none;
  color: #00ff88;
  border: 1px solid rgba(0,255,136,0.4);
  padding: 7px 14px;
  font-size: 12px;
  border-radius: 5px;
  transition: all 0.2s ease;
  font-weight: 600;
}
.archive-open-btn:hover {
  background: #00ff88;
  color: #000;
}
.archive-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  background: rgba(255,255,255,0.03);
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.07);
}
.archive-meta-item {
  display: flex;
  gap: 12px;
  align-items: baseline;
}
.archive-meta-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #555;
  letter-spacing: 2px;
  text-transform: uppercase;
  white-space: nowrap;
  min-width: 100px;
}
.archive-meta-value {
  font-size: 12px;
  color: #888;
}

/* ── GAVETA DEL ARCHIVO ───────────────────── */
/* Paleta de verdes orgánicos-neon:
   #22b56b emerald profundo · #00ff88 neon signature · #9fffb8 mint claro */

.drawer-intro {
  margin-bottom: 22px;
  color: #b4c0d4;
}
.drawer-branches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

/* ── Tarjeta de rama (gaveta home) ── */
.drawer-branch {
  background:
    radial-gradient(circle at top right, rgba(var(--branch-rgb,0,255,136),0.08) 0%, transparent 55%),
    rgba(255,255,255,0.02);
  border: 1px solid rgba(var(--branch-rgb,0,255,136),0.18);
  border-radius: 10px;
  padding: 22px 18px 18px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.25s ease, background 0.25s ease;
  animation: drawer-halo-breath 5s ease-in-out infinite;
}

/* Enredadera SVG — oculta */
.drawer-branch-vine {
  display: none;
}

/* Contenido por encima de la enredadera */
.drawer-branch > *:not(.drawer-branch-vine) {
  position: relative;
  z-index: 2;
}

.drawer-branch:hover {
  transform: translateY(-3px);
  background:
    radial-gradient(circle at top right, rgba(var(--branch-rgb,0,255,136),0.14) 0%, transparent 55%),
    rgba(255,255,255,0.04);
}
.drawer-branch-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
}
.drawer-branch-n { color: #666; text-transform: uppercase; }
.drawer-branch-tag {
  color: var(--branch-color, #00ff88);
  text-transform: uppercase;
  font-weight: 500;
}
.drawer-branch-icon {
  font-size: 28px;
  color: var(--branch-color, #00ff88);
  line-height: 1;
  margin: 4px 0;
}
.drawer-branch-label {
  font-size: 15px;
  font-weight: 700;
  color: #e8ecf4;
  line-height: 1.25;
}
.drawer-branch-sub {
  font-size: 12px;
  color: #8b9bb4;
  line-height: 1.5;
  flex: 1;
}
.drawer-branch-foot {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--branch-color, #00ff88);
  text-transform: uppercase;
  font-weight: 500;
}

/* ── FALLING LEAVES INSIDE DRAWER-BRANCH ────────────────────── */
.drawer-branch::after {
  content: "";
  position: absolute;
  top: -100%;
  left: -10%;
  width: 120%;
  height: 300%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.45;
  background-image:
    radial-gradient(1.5px 1.5px at 10px 15px, rgba(var(--branch-rgb,0,255,136),0.7), transparent),
    radial-gradient(1px 1px at 55px 40px, rgba(var(--branch-rgb,0,255,136),0.5), transparent),
    radial-gradient(1.5px 1.5px at 90px 70px, rgba(var(--branch-rgb,0,255,136),0.6), transparent),
    radial-gradient(1px 1px at 130px 25px, rgba(var(--branch-rgb,0,255,136),0.5), transparent),
    radial-gradient(1px 1px at 170px 90px, rgba(var(--branch-rgb,0,255,136),0.4), transparent),
    radial-gradient(1.5px 1.5px at 40px 110px, rgba(var(--branch-rgb,0,255,136),0.6), transparent),
    radial-gradient(1px 1px at 200px 55px, rgba(var(--branch-rgb,0,255,136),0.5), transparent);
  background-size: 220px 140px;
  background-repeat: repeat;
  animation: falling-leaves-inside 12s linear infinite;
}

@keyframes falling-leaves-inside {
  0% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(33%) translateX(5px); }
  100% { transform: translateY(66%) translateX(0); }
}

/* ── META BLOCK EN HOME ──────────────────── */
.drawer-meta {
  margin-top: 22px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.025);
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.drawer-meta-line {
  display: flex;
  gap: 14px;
  align-items: baseline;
}
.drawer-meta-k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: #556;
  min-width: 110px;
}
.drawer-meta-v { font-size: 12px; color: #8b9bb4; }

/* ── VISTA DE RAMA ───────────────────────── */
.drawer-breadcrumb {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.drawer-back {
  background: transparent;
  border: 1px solid rgba(var(--branch-rgb, 0,255,136), 0.4);
  color: var(--branch-color, #00ff88);
  padding: 7px 14px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}
.drawer-back:hover {
  background: var(--branch-color, #00ff88);
  color: #000;
}
.drawer-crumb {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--branch-color, #00ff88);
  text-transform: uppercase;
}
.drawer-lead {
  margin-bottom: 18px;
  color: #b4c0d4;
}
.drawer-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.drawer-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(var(--branch-rgb, 0,255,136), 0.16);
  border-left: 2px solid var(--branch-color, #00ff88);
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
  animation: drawer-item-halo 6s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 0.45s);
}
.drawer-item:hover {
  transform: translateY(-2px);
  background: rgba(var(--branch-rgb, 0,255,136), 0.07);
  border-color: var(--branch-color, #00ff88);
  box-shadow: 0 0 24px -8px rgba(var(--branch-rgb, 0,255,136), 0.45);
}
.drawer-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
}
.drawer-item-code { color: #666; text-transform: uppercase; }
.drawer-item-year {
  color: #889;
  border: 1px solid rgba(255,255,255,0.1);
  padding: 2px 7px;
  border-radius: 3px;
}
.drawer-item-title {
  font-size: 14px;
  font-weight: 700;
  color: #e8ecf4;
  line-height: 1.3;
}
.drawer-item-desc {
  font-size: 12.5px;
  color: #8b9bb4;
  line-height: 1.5;
  flex: 1;
}
.drawer-item-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.drawer-item-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 1px;
  padding: 2px 6px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 3px;
  color: #889;
  text-transform: uppercase;
}
.drawer-item-cta {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  color: #889;
  text-transform: uppercase;
  text-align: right;
}
.drawer-item:hover .drawer-item-cta { color: var(--branch-color, #00ff88); }

/* ── KEYFRAMES (idle, solo halos respirando) ─ */
@keyframes drawer-halo-breath {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(var(--branch-rgb, 0,255,136), 0.10),
      0 0 22px -10px rgba(var(--branch-rgb, 0,255,136), 0.28),
      inset 0 0 28px -22px rgba(var(--branch-rgb, 0,255,136), 0.22);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(var(--branch-rgb, 0,255,136), 0.28),
      0 0 36px -8px rgba(var(--branch-rgb, 0,255,136), 0.45),
      inset 0 0 38px -20px rgba(var(--branch-rgb, 0,255,136), 0.32);
  }
}

@keyframes drawer-item-halo {
  0%, 100% {
    box-shadow: 0 0 0 1px rgba(var(--branch-rgb, 0,255,136), 0.05),
                0 0 12px -10px rgba(var(--branch-rgb, 0,255,136), 0.20);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(var(--branch-rgb, 0,255,136), 0.14),
                0 0 20px -8px  rgba(var(--branch-rgb, 0,255,136), 0.34);
  }
}

/* Respetar usuarios que prefieren menos movimiento */
@media (prefers-reduced-motion: reduce) {
  .drawer-branch,
  .drawer-item { animation: none !important; }
}

/* ── SERVICIOS ────────────────────────────── */
.services-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.service-item {
  display: flex;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(255,204,0,0.15);
  border-radius: 6px;
  background: rgba(255,204,0,0.04);
}
.service-num {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  padding-top: 2px;
  flex-shrink: 0;
}
.service-title {
  font-size: 13px;
  font-weight: 700;
  color: #ddd;
  margin-bottom: 4px;
}

/* ── CONTACTO ─────────────────────────────── */
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.contact-item {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px;
  text-decoration: none;
  background: var(--cc, rgba(255,255,255,0.05));
  border: 1px solid var(--cb, rgba(255,255,255,0.1));
  border-radius: 6px;
  transition: all 0.2s ease;
  color: inherit;
}
.contact-item:hover {
  opacity: 0.85;
  transform: translateX(2px);
}
.contact-icon {
  font-size: 18px;
  width: 32px;
  text-align: center;
  flex-shrink: 0;
}
.contact-label {
  font-size: 10px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-family: var(--font-mono);
}
.contact-value {
  font-size: 13px;
  color: #ddd;
  font-weight: 500;
}
.response-box {
  padding: 12px 16px;
  border: 1px solid;
  border-radius: 6px;
}
.response-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-family: var(--font-mono);
  margin-bottom: 4px;
}
.response-value {
  font-size: 14px;
  color: #ccc;
}

/* ── ALIANZAS ─────────────────────────────── */
.allies-types {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.ally-type {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 12px;
  background: rgba(255,153,51,0.05);
  border: 1px solid rgba(255,153,51,0.15);
  border-radius: 6px;
}
.ally-icon { font-size: 18px; flex-shrink: 0; }
.ally-label { font-size: 13px; font-weight: 600; color: #ddd; }
.ally-desc  { font-size: 12px; color: #777; margin-top: 2px; }

.alliance-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-label {
  font-size: 10px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-family: var(--font-mono);
}
.form-input {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,153,51,0.25);
  border-radius: 5px;
  color: #ddd;
  padding: 9px 12px;
  font-size: 13px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus { border-color: #ff9933; }
.form-input option { background: #1a1a1a; }
.form-textarea { resize: vertical; min-height: 80px; }
.form-submit {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-mono);
}
.form-submit:hover { opacity: 0.85; transform: translateY(-1px); }

/* ── CTA LINK ──────────────────────────────── */
.panel-cta {
  display: inline-block;
  text-decoration: none;
  font-family: var(--font-mono);
}

/* Los polígonos NO muestran ningún estilo visible al hover — el efecto lo hacen los glow spots */

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 768px) {
  .hud-top    { padding: 8px 16px; }
  .hud-brand  { font-size: 9px; letter-spacing: 2px; }

  /* Ocultar indicadores en mobile (sustituidos por nav) */
  .side-indicators-container { display: none; }

  /* Panel full width */
  .panel-content { width: 100%; max-width: 100%; max-height: 92vh; border-radius: 16px 16px 0 0; top: auto; bottom: 0; left: 0; right: 0; transform: none; }
  .panel-container.active .panel-content { transform: none; }
  .panel-header { padding: 14px 16px; flex-wrap: wrap; gap: 10px; }
  .panel-title  { font-size: 14px; }
  .panel-body   { padding: 16px; max-height: calc(92vh - 100px); }
  .panel-actions { flex-direction: column; gap: 8px; width: 100%; }
  .panel-cta, .panel-close { width: 100%; text-align: center; }

  /* Grids → una columna */
  .panel-grid-2, .project-grid, .archive-grid { grid-template-columns: 1fr; }
  .drawer-branches, .drawer-items { grid-template-columns: 1fr; }
  .drawer-meta-line { flex-direction: column; gap: 2px; align-items: flex-start; }
  .panel-stats { grid-template-columns: 1fr 1fr; }

  /* Nav mobile visible (gana al display:none base por orden de fuente) */
  .mobile-nav { display: flex !important; }
  .idle-indicator { bottom: 90px; }
}

/* Nav mobile — bottom bar */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 500;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 10px 8px 14px;
  justify-content: space-around;
  gap: 4px;
}
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.2s ease;
  flex: 1;
  border: none;
  background: transparent;
}
.mobile-nav-item:hover, .mobile-nav-item.active-nav {
  background: rgba(255,255,255,0.07);
}
.mobile-nav-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px solid;
}
.mobile-nav-label {
  font-size: 9px;
  font-family: var(--font-mono);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #888;
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .panel-name { font-size: 16px; }
  .panel-actions { gap: 6px; }
}

/* ── CITY ACCORDIONS (Archivo Político) ───── */
.city-accordions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}
.city-accordion {
  border: 1px solid rgba(0,255,136,0.12);
  border-radius: 6px;
  overflow: hidden;
  background: rgba(0,255,136,0.03);
  transition: border-color 0.2s;
}
.city-accordion:hover {
  border-color: rgba(0,255,136,0.25);
}
.city-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  background: transparent;
  border: none;
  color: inherit;
  font-family: var(--font-mono);
  transition: background 0.2s;
}
.city-header:hover {
  background: rgba(0,255,136,0.05);
}
.city-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.city-chevron {
  font-size: 12px;
  color: #00ff88;
  transition: transform 0.3s ease;
  display: inline-block;
}
.city-accordion.open .city-chevron {
  transform: rotate(90deg);
}
.city-name {
  font-size: 13px;
  font-weight: 600;
  color: #ddd;
  letter-spacing: 0.5px;
}
.city-count {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: #666;
  text-transform: uppercase;
}
.city-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.city-accordion.open .city-body {
  max-height: 600px;
}
.city-body .drawer-items {
  padding: 0 16px 14px;
  border-top: 1px solid rgba(0,255,136,0.08);
}
