/* ============================================
   ESTILOS MEJORADOS PARA DASHBOARD
   ============================================ */

/* Animaciones */
@keyframes slideInMenu {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeInContent {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Dashboard Sidebar */
.dashboard-sidebar {
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
  animation: slideInMenu 0.3s ease-out;
}

.dashboard-sidebar.mobile-visible {
  animation: slideInMenu 0.3s ease-out;
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.2);
}

/* Menu Items */
.menu-reports a {
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}

.menu-reports a:hover {
  border-left-color: #0073aa;
  background-color: rgba(255, 255, 255, 0.15);
}

.menu-reports a.active {
  border-left-color: #0073aa;
  background-color: rgba(0, 115, 170, 0.2);
  font-weight: 600;
}

/* Dashboard Header */
.dashboard-top-bar {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  animation: fadeInContent 0.4s ease-out 0.2s both;
}

/* Hamburger Button */
.hamburger-btn {
  transition: all 0.3s ease;
  border-radius: 4px;
  padding: 8px 12px;
}

.hamburger-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.hamburger-btn:active {
  transform: scale(0.95);
}

/* Report Container */
.report-container {
  animation: fadeInContent 0.5s ease-out 0.3s both;
  transition: all 0.3s ease;
}

.report-placeholder {
  animation: pulse 2s ease-in-out infinite;
}

/* User Section */
.dashboard-user-section {
  animation: fadeInContent 0.6s ease-out 0.4s both;
}

.dashboard-logout-btn {
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(211, 47, 47, 0.2);
}

.dashboard-logout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(211, 47, 47, 0.3);
}

.dashboard-logout-btn:active {
  transform: translateY(0);
}

/* Scrollbar personalizado */
.dashboard-sidebar::-webkit-scrollbar {
  width: 6px;
}

.dashboard-sidebar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.dashboard-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.dashboard-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.dashboard-main::-webkit-scrollbar {
  width: 8px;
}

.dashboard-main::-webkit-scrollbar-track {
  background: #f5f5f5;
}

.dashboard-main::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

.dashboard-main::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* Overlay para móvil */
.dashboard-sidebar.mobile-visible::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: -1;
}

/* Responsive mejorado */
@media (max-width: 768px) {
  .dashboard-sidebar {
    width: 80%;
    max-width: 300px;
  }

  .dashboard-top-bar {
    padding: 12px 15px;
  }

  .dashboard-title {
    font-size: 18px;
    flex: 1;
    text-align: center;
  }

  .dashboard-main {
    padding: 12px;
  }

  .menu-reports a {
    padding: 10px 12px;
  }

  .menu-reports a:hover,
  .menu-reports a.active {
    padding-left: 17px;
  }
}

@media (max-width: 480px) {
  .dashboard-sidebar {
    width: 100%;
    max-width: none;
  }

  .dashboard-top-bar {
    padding: 10px 12px;
  }

  .dashboard-title {
    font-size: 16px;
  }

  .dashboard-main {
    padding: 8px;
  }

  .dashboard-header {
    margin-bottom: 20px;
  }

  .dashboard-logo img {
    max-width: 120px;
  }

  .menu-reports a {
    padding: 10px;
    font-size: 14px;
  }
}

/* Estados de carga */
.report-loading {
  position: relative;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

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

/* Transiciones suaves */
* {
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

button, a {
  transition: all 0.3s ease;
}
