body.dashboard {
  font-family: 'Space Grotesk', sans-serif;
  background-color: #0b0204;
  color: #fef2f2;
}
.font-hud { font-family: 'Rajdhani', sans-serif; }
.font-logo { font-family: 'Orbitron', sans-serif; }
.font-mono-hud { font-family: 'Share Tech Mono', monospace; }

/* ---------- The Sanctum: sala de agentes ---------- */
.cyber-room-floor {
  background-image:
    radial-gradient(rgba(245, 158, 11, 0.14) 1.5px, transparent 1.5px),
    linear-gradient(to right, rgba(245, 158, 11, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(245, 158, 11, 0.04) 1px, transparent 1px);
  background-size: 32px 32px, 96px 96px, 96px 96px;
}
@keyframes cablePulse {
  0%, 100% { stroke-dashoffset: 0; opacity: 0.25; }
  50% { stroke-dashoffset: 35; opacity: 0.85; }
}
.synapse-wire { stroke-dasharray: 6 6; animation: cablePulse 3s linear infinite; }

/* ---------- Glow / glassmorphism Iron Man (dorado + rojo vino) ---------- */
.glow-gold {
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.22), inset 0 0 15px rgba(245, 158, 11, 0.06);
}
.glow-gold-lg {
  box-shadow: 0 0 35px rgba(245, 158, 11, 0.32), inset 0 0 25px rgba(190, 18, 60, 0.15);
}
.glow-dock-pill {
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.45), inset 0 0 18px rgba(159, 18, 57, 0.4);
}
.glow-text-gold {
  text-shadow: 0 0 14px rgba(251, 191, 36, 0.75), 0 0 30px rgba(245, 158, 11, 0.35);
}
.glow-text-gold-strong {
  text-shadow: 0 0 18px rgba(255, 215, 0, 0.95), 0 0 45px rgba(245, 158, 11, 0.6);
}
.glow-ring {
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.45);
}

/* ---------- Panel base (paneles reales del dashboard) ---------- */
.panel-hud {
  background: rgba(26, 4, 9, 0.8);
  border: 1px solid rgba(245, 158, 11, 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.22), inset 0 0 15px rgba(245, 158, 11, 0.06);
  min-height: 140px;
}

/* ---------- Bisel HUD ---------- */
.hud-clip-badge {
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}

.badge:empty { display: none; }

/* ---------- Paneles pendientes (diseño original, sin conectar todavía) ---------- */
.panel-hud.proximamente {
  filter: saturate(0.55);
  cursor: default;
}
.panel-hud.proximamente:hover { filter: saturate(0.75); }
.badge-pendiente {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: rgba(226, 232, 240, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

/* ---------- AI Core: expansión a pantalla completa ---------- */
/* posición/z-index/margen se fijan por JS (máxima especificidad, evita que
   las utilidades de Tailwind como .relative los pisen); aquí solo la transición */
.ai-core-flotante {
  transition:
    top 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    left 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    border-radius 0.3s ease;
}

/* El núcleo (anillos + texto A.R.I.S.) crece al expandir el panel a pantalla completa — hay mucho más espacio que llenar */
.ai-core-nucleo-visual { transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.ai-core-flotante .ai-core-nucleo-visual { transform: scale(1.9) translateY(-8%); }

/* La barra de chat de AI Core solo se ve cuando el panel está expandido */
.ai-core-chat-ui { display: none; }
.ai-core-flotante .ai-core-chat-ui { display: flex; }

#ai-core-chat-log p {
  margin: 0 0 4px;
  padding: 5px 12px;
  border-radius: 8px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.82rem;
  background: rgba(20, 3, 6, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.15);
  max-width: 80%;
}
#ai-core-chat-log .yo { margin-left: auto; border-color: rgba(244, 63, 94, 0.25); }
#ai-core-chat-log .yo::before { content: "Tú: "; color: #fb7185; font-weight: 700; }
#ai-core-chat-log .aris::before { content: "A.R.I.S.: "; color: #fbbf24; font-weight: 700; }

#ai-core-mic.ai-core-mic-activo {
  color: #fff;
  background: rgba(244, 63, 94, 0.6);
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.7);
  animation: mic-pulso 1s ease-in-out infinite;
}
@keyframes mic-pulso {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

/* ---------- Esquinas decorativas HUD ---------- */
.hud-corner-tl { position: absolute; top: 0; left: 0; width: 8px; height: 8px; border-top: 1.5px solid rgba(245, 158, 11, 0.8); border-left: 1.5px solid rgba(245, 158, 11, 0.8); }
.hud-corner-tr { position: absolute; top: 0; right: 0; width: 8px; height: 8px; border-top: 1.5px solid rgba(245, 158, 11, 0.8); border-right: 1.5px solid rgba(245, 158, 11, 0.8); }
.hud-corner-bl { position: absolute; bottom: 0; left: 0; width: 8px; height: 8px; border-bottom: 1.5px solid rgba(245, 158, 11, 0.8); border-left: 1.5px solid rgba(245, 158, 11, 0.8); }
.hud-corner-br { position: absolute; bottom: 0; right: 0; width: 8px; height: 8px; border-bottom: 1.5px solid rgba(245, 158, 11, 0.8); border-right: 1.5px solid rgba(245, 158, 11, 0.8); }

/* ---------- Textura de escaneo (dock inferior) ---------- */
.hud-scanlines {
  background: repeating-linear-gradient(-45deg, rgba(245, 158, 11, 0.02), rgba(245, 158, 11, 0.02) 2px, transparent 2px, transparent 8px);
}

/* ---------- Nav ---------- */
.nav-item.activo .font-hud { color: inherit; }

/* ---------- Elementos "Pronto" (sin función real todavía) ---------- */
.proximamente { cursor: default; }
.proximamente:hover { opacity: 0.8; }

/* ---------- Onda de voz ---------- */
@keyframes soundBar { 0%, 100% { height: 4px; } 50% { height: 22px; } }
.wave-bar { animation: soundBar 1.2s ease-in-out infinite; }
.wave-bar:nth-child(2) { animation-delay: 0.1s; }
.wave-bar:nth-child(3) { animation-delay: 0.25s; }
.wave-bar:nth-child(4) { animation-delay: 0.4s; }
.wave-bar:nth-child(5) { animation-delay: 0.15s; }

/* ---------- Órbitas del núcleo ---------- */
@keyframes orbit1 { 0% { transform: rotate(-25deg) rotateZ(0deg); } 100% { transform: rotate(-25deg) rotateZ(360deg); } }
@keyframes orbit2 { 0% { transform: rotate(35deg) rotateZ(360deg); } 100% { transform: rotate(35deg) rotateZ(0deg); } }
.animate-orbit-1 { animation: orbit1 20s linear infinite; }
.animate-orbit-2 { animation: orbit2 25s linear infinite; }

/* ---------- Mini-orbes de The Sanctum: anillo decorativo en reposo ---------- */
.orb-ring-1 { opacity: 0; animation-play-state: paused; }
.orb-ring-2 { opacity: 1; }

/* ---------- Feedback de hover/clic en los mini-orbes (sin implicar actividad real) ---------- */
.orb-inner-layer { transition: transform 0.18s ease; }
.sanctum-orb-hitbox:hover .orb-inner-layer { transform: scale(1.15); }
.sanctum-orb-hitbox:active .orb-inner-layer { transform: scale(1.22); }

/* ---------- Anillos giroscopio de The Sanctum (núcleo ARIS + mini-orbes) ---------- */
@keyframes orbitSpinCW { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes orbitSpinCCW { 0% { transform: rotate(0deg); } 100% { transform: rotate(-360deg); } }
.animate-spin-slow { animation: orbitSpinCW 28s linear infinite; }
.animate-spin-cw { animation: orbitSpinCW 16s linear infinite; }
.animate-spin-ccw { animation: orbitSpinCCW 22s linear infinite; }

/* ---------- Órbita local de subdepartamentos en The Sanctum (100% CSS, sin JS por frame) ---------- */
/* El pivote gira alrededor del hub de departamento; el brazo interior contra-rota exactamente
   igual para que el icono del orbe no gire sobre sí mismo, solo se desplace en círculo. */
.sanctum-orbit-pivot { position: absolute; top: 0; left: 0; animation: orbitSpinCW 90s linear infinite; }
.sanctum-orbit-counter { animation: orbitSpinCCW 90s linear infinite; }

/* ---------- Listas / items reales (usadas desde dashboard.js) ---------- */
.item-real {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border-radius: 10px;
  background: rgba(159, 18, 57, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.15);
}
.item-real .icono {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.item-real .icono svg { width: 14px; height: 14px; }
.item-real .titulo { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 0.8rem; color: #fff; line-height: 1.1; }
.item-real .subtexto { font-family: 'Rajdhani', sans-serif; font-size: 0.66rem; color: rgba(253, 164, 175, 0.7); line-height: 1.2; }

.tool-card {
  padding: 8px; border-radius: 12px;
  background: rgba(159, 18, 57, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.2);
  display: flex; align-items: center; gap: 8px;
}
.tool-card.inactiva { opacity: 0.45; }
.tool-card .icono { width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.tool-card .icono svg { width: 14px; height: 14px; }
.tool-card .nombre { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 0.76rem; color: #fff; }
.tool-card .estado { font-family: 'Rajdhani', sans-serif; font-size: 0.64rem; font-weight: 600; text-transform: uppercase; }

.timeline-row { display: flex; align-items: center; justify-content: space-between; font-size: 0.76rem; }
.timeline-row .hora { font-family: 'Share Tech Mono', monospace; font-size: 0.66rem; color: rgba(253, 164, 175, 0.6); width: 48px; flex-shrink: 0; }
.timeline-row .cuerpo { flex: 1; display: flex; align-items: center; margin: 0 6px; overflow: hidden; min-width: 0; }
.timeline-row .punto { width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; flex-shrink: 0; }
.timeline-row .titulo { font-family: 'Rajdhani', sans-serif; font-weight: 600; color: #fecdd3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timeline-row .tag { font-family: 'Rajdhani', sans-serif; font-size: 0.6rem; color: rgba(245, 158, 11, 0.9); flex-shrink: 0; }

.stat-tile-hud { text-align: center; border: 1px solid rgba(245, 158, 11, 0.2); border-radius: 10px; padding: 10px 4px; background: rgba(159, 18, 57, 0.1); }
.stat-tile-hud .valor { font-family: 'Orbitron', sans-serif; font-size: 1.3rem; font-weight: 800; color: #fbbf24; text-shadow: 0 0 12px rgba(245, 158, 11, 0.5); }
.stat-tile-hud .etiqueta { font-family: 'Rajdhani', sans-serif; font-size: 0.6rem; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(253, 164, 175, 0.6); }

.vacio { color: rgba(253, 164, 175, 0.5); font-size: 0.8rem; font-style: italic; font-family: 'Rajdhani', sans-serif; margin: 0; }

#toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #20050b;
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-family: 'Rajdhani', sans-serif;
  color: #fef2f2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 100;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

#chat-log {
  position: fixed;
  bottom: 78px;
  left: 240px;
  right: 220px;
  max-height: 130px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.82rem;
  z-index: 25;
  pointer-events: auto;
}
#chat-log p {
  margin: 0;
  padding: 4px 12px;
  border-radius: 8px;
  background: rgba(20, 3, 6, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.15);
  max-width: 80%;
  align-self: flex-start;
}
#chat-log .yo { align-self: flex-end; border-color: rgba(244, 63, 94, 0.25); }
#chat-log .yo::before { content: "Tú: "; color: #fb7185; font-weight: 700; }
#chat-log .aris::before { content: "A.R.I.S.: "; color: #fbbf24; font-weight: 700; }

@media (max-width: 900px) {
  #chat-log { left: 16px; right: 16px; }
  #nav-rail { display: none; }
  #chat-bar > div:first-child, #chat-bar > div:last-child { display: none; }
}

/* ---------- Base Noxus (30 niveles del organigrama real) ---------- */
.base-dept-tab { background: transparent; }
.base-dept-tab-active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(190, 18, 60, 0.35));
  color: #fde9c2 !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

.base-level-row { position: relative; border-bottom: 1px solid rgba(245, 158, 11, 0.08); cursor: pointer; }
.base-level-room {
  position: relative;
  min-height: 96px;
  background: linear-gradient(180deg, #3a4152 0%, #2a2f3d 62%, #20232e 100%);
  overflow: hidden;
  transition: background 0.15s ease;
}
.base-level-room::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 22%;
  background: linear-gradient(180deg, #565f72 0%, #454d5f 100%);
  border-top: 1px solid rgba(0, 0, 0, 0.25);
}
.base-level-row:hover .base-level-room { background: linear-gradient(180deg, #454d60 0%, #323848 62%, #262a36 100%); }
.base-level-row.base-level-dept .base-level-room { min-height: 128px; }
.base-level-row.base-level-dept .base-level-room { border-left: 3px solid rgba(245, 158, 11, 0.55); }
.base-level-row.base-level-sub .base-level-room { border-left: 3px solid rgba(232, 178, 150, 0.18); }
.base-level-row.base-level-pending .base-level-room { opacity: 0.62; }

.base-level-tag {
  position: absolute; top: 14px; left: 18px; z-index: 5;
  display: flex; flex-direction: column; gap: 2px;
}
.base-level-num { font-family: 'Share Tech Mono', monospace; font-size: 10px; letter-spacing: 0.14em; color: #f5b451; }
.base-level-title { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 15px; color: #f2f5fa; }
.base-level-dept .base-level-title { font-size: 17px; }
.base-level-sub .base-level-title { font-size: 13.5px; color: #dbe1ec; }
.base-level-status {
  display: inline-block; margin-top: 2px; width: fit-content;
  font-family: 'Share Tech Mono', monospace; font-size: 9px; letter-spacing: 0.08em;
  padding: 2px 8px; border-radius: 999px;
}
.base-level-status.ok { background: rgba(52, 211, 153, 0.14); color: #34d399; border: 1px solid rgba(52, 211, 153, 0.35); }
.base-level-status.pend { background: rgba(255, 255, 255, 0.05); color: rgba(232, 178, 150, 0.55); border: 1px solid rgba(255, 255, 255, 0.1); }

/* Salas ya definidas (con SVG propio) en vez del shell neutro generico */
.base-level-featured .base-level-room {
  min-height: 0;
  background: none;
}
.base-level-featured .base-level-room::after { display: none; }
