body {
  background-color: #0b1120;
  color: #f8fafc;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow-x: hidden;
}

/* =========================================================
   PANTALLA DE CARGA SUPERPUESTA SOFISTICADA (LOADER)
   ========================================================= */
#pantallaCargaTervian {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(circle at center, #0f172a 0%, #060913 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.55s ease;
}

#pantallaCargaTervian.oculto {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-contenedor-orbital {
  position: relative;
  width: 128px;
  height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-anillo-externo {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  border: 2px solid transparent;
  border-top-color: #06b6d4;
  border-right-color: rgba(6, 182, 212, 0.3);
  animation: giroOrbital 1.8s linear infinite;
  filter: drop-shadow(0 0 12px rgba(6, 182, 212, 0.6));
}

.loader-anillo-interno {
  position: absolute;
  inset: 12px;
  border-radius: 9999px;
  border: 2px solid transparent;
  border-bottom-color: #10b981;
  border-left-color: rgba(16, 185, 129, 0.25);
  animation: giroOrbitalInverso 2.4s linear infinite;
  filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.5));
}

.loader-nucleo-logo {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
  border: 1px solid rgba(6, 182, 212, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.25), inset 0 0 12px rgba(16, 185, 129, 0.15);
  animation: pulsoLogo 2.2s ease-in-out infinite;
}

@keyframes giroOrbital {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes giroOrbitalInverso {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}

@keyframes pulsoLogo {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

/* =========================================================
   ICONOS VECTORIALES SVG & TARJETAS REDISEÑADAS
   ========================================================= */
.svg-simbolo {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.18em;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* Scrollbar elegante */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }

/* FullCalendar Modo Oscuro Conservando tu Paleta */
.fc {
  --fc-border-color: #1e293b;
  --fc-page-bg-color: #0f172a;
  --fc-neutral-bg-color: #1e293b;
  --fc-today-bg-color: rgba(6, 182, 212, 0.15);
}
.fc-toolbar-title {
  font-size: 1.05rem !important;
  font-weight: 700;
  color: #f8fafc;
  text-transform: capitalize;
}
.fc-button-primary {
  background-color: #0284c7 !important;
  border-color: #0369a1 !important;
  font-size: 0.75rem !important;
  border-radius: 0.5rem !important;
  padding: 0.35rem 0.75rem !important;
}
.fc-button-primary:hover {
  background-color: #0ea5e9 !important;
}
.fc-daygrid-day-number {
  color: #cbd5e1;
  font-size: 0.8rem;
  padding: 6px !important;
}
.fc-list-event:hover td {
  background-color: #1e293b !important;
}

/* Tarjetas Kanban Mejoradas */
.tarjeta-tarea {
  cursor: grab;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.tarjeta-tarea:hover {
  transform: translateY(-2px);
  border-color: rgba(6, 182, 212, 0.45);
  box-shadow: 0 10px 18px -4px rgba(0, 0, 0, 0.5);
}
.tarjeta-tarea:active {
  cursor: grabbing;
  opacity: 0.75;
  transform: scale(0.97);
}

/* Animaciones Dinámicas */
@keyframes saltar {
  0% { transform: scale(1); }
  50% { transform: scale(1.12); }
  100% { transform: scale(1); }
}
.animar-salto {
  animation: saltar 0.35s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.vista-animada {
  animation: fadeIn 0.28s ease-out forwards;
}

@keyframes llamaRacha {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.6)); }
  50% { transform: scale(1.12); filter: drop-shadow(0 0 12px rgba(6, 182, 212, 0.85)); }
}
.icono-fuego {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: llamaRacha 1.8s infinite ease-in-out;
}

/* Destacado del Tutorial Interactivo */
.tutorial-destacado {
  position: relative;
  z-index: 45 !important;
  box-shadow: 0 0 0 3px #06b6d4, 0 0 30px rgba(6, 182, 212, 0.5) !important;
  transition: all 0.35s ease;
}

/* Temas Exclusivos TervianOS Pro */
body.tema-cyberpunk { background-color: #120924 !important; }
body.tema-esmeralda { background-color: #061c17 !important; }