/* Estilos base de la aplicación */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: #f8f9fa;
  padding-top: 56px; /* Altura del navbar */
}

#app {
  min-height: calc(100vh - 56px);
}

#app-content {
  min-height: calc(100vh - 56px);
  opacity: 1;
}

/* Transiciones de página - deshabilitadas para cambio instantáneo */

/* Estilos para el navbar */
.navbar {
  box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.navbar-brand {
  font-weight: 600;
}

.nav-link {
  transition: color 0.2s ease-in-out;
}

.nav-link:hover {
  color: #fff !important;
}

/* Estilos para enlaces activos */
.nav-link.active {
  color: #fff !important;
  font-weight: 500;
}

/* Mejoras generales */
.card {
  transition: box-shadow 0.2s ease-in-out;
}

.btn {
  transition: all 0.2s ease-in-out;
}

/* Loader */
.page-loader {
  position: fixed;
  top: 56px; /* Debajo del navbar */
  left: 0;
  width: 100%;
  height: 4px;
  background-color: rgba(0, 0, 0, 0.1);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
}

.page-loader.active {
  opacity: 1;
  transition: none;
}

/* Overlay negro durante la carga - sin transición */
.page-loader.active::before {
  content: '';
  position: fixed;
  top: 60px; /* Debajo del loader */
  left: 0;
  width: 100%;
  height: calc(100vh - 60px);
  background-color: #000000;
  z-index: 9998;
  pointer-events: none;
  opacity: 1;
}

.page-loader.complete::before {
  opacity: 0;
  transition: opacity 0.2s ease-out;
}

.page-loader-bar {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #667eea 100%);
  background-size: 200% 100%;
  width: 0%;
  animation: loaderProgress 1.5s ease-in-out infinite, loaderWidth 0.6s ease-out forwards;
}

@keyframes loaderProgress {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@keyframes loaderWidth {
  0% {
    width: 0%;
  }
  50% {
    width: 70%;
  }
  100% {
    width: 100%;
  }
}

.page-loader.complete .page-loader-bar {
  animation: loaderComplete 0.3s ease-out forwards;
}

@keyframes loaderComplete {
  to {
    width: 100%;
    opacity: 0;
  }
}

/* Responsive */
@media (max-width: 768px) {
  body {
    padding-top: 56px;
  }
  
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-loader {
    top: 56px;
  }
}
