/* ============================================================
   Dashboard Styles - Ragnos Framework
   Extracted from app/Views/admin/dashboard.php
   ============================================================ */

/* --- Info Cards --- */
.custom-info-card {
  background-color: var(--bs-card-bg, var(--bs-body-bg, #fff)) !important;
  color: var(--bs-body-color, #212529) !important;
  border: 1px solid var(--bs-border-color, #e3e6f0) !important;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  padding: 1.25rem 1rem;
  box-shadow: 0 0.15rem 1.75rem 0 rgba(0, 0, 0, 0.05);
  height: 100%;
  transition: all 0.3s ease;
}

[data-bs-theme="dark"] .custom-info-card {
  background-color: #1e293b !important;
  box-shadow: 0 0.15rem 1.75rem 0 rgba(0, 0, 0, 0.35) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

.custom-info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 2rem 0 rgba(0, 0, 0, 0.15) !important;
}

.icon-container {
  width: 60px;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 0.5rem;
  font-size: 2rem;
  color: #fff;
  margin-right: 1rem;
  flex-shrink: 0;
  animation: iconPulse 2s ease-in-out infinite;
}

.custom-info-card:hover .icon-container {
  animation: iconBounce 0.6s ease;
}

.text-content h3 {
  margin-bottom: 0.1rem;
  font-weight: 700;
  color: var(--bs-body-color);
}

.text-content p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--bs-secondary-color);
}

[data-bs-theme="dark"] .text-content h3 {
  color: #f8fafc !important;
}

[data-bs-theme="dark"] .text-content p {
  color: #94a3b8 !important;
}

/* --- Clickable Links in Tables and Cards --- */
.btn-link,
.card-tools a,
.ligacliente,
.ligaproducto {
  cursor: pointer;
  color: var(--bs-primary);
  text-decoration: underline;
  transition: all 0.2s ease;
}

.btn-link:hover,
.card-tools a:hover,
.ligacliente:hover,
.ligaproducto:hover {
  color: var(--bs-primary-text-emphasis, #0a58ca);
}

[data-bs-theme="dark"] a:not(.btn):not(.dropdown-item):not(.nav-link),
[data-bs-theme="dark"] .link-primary,
[data-bs-theme="dark"] .btn-link,
[data-bs-theme="dark"] .card-tools a,
[data-bs-theme="dark"] .ligacliente,
[data-bs-theme="dark"] .ligaproducto {
  color: #60a5fa !important;
  text-decoration-color: rgba(96, 165, 250, 0.4) !important;
}

[data-bs-theme="dark"] a:not(.btn):not(.dropdown-item):not(.nav-link):hover,
[data-bs-theme="dark"] .link-primary:hover,
[data-bs-theme="dark"] .btn-link:hover,
[data-bs-theme="dark"] .card-tools a:hover,
[data-bs-theme="dark"] .ligacliente:hover,
[data-bs-theme="dark"] .ligaproducto:hover {
  color: #93c5fd !important;
  text-decoration-color: #93c5fd !important;
}

.card-title {
  font-weight: bold;
}

/* --- Chart Containers --- */
#chartventas,
#chartventasporlinea {
  min-height: 350px;
  width: 100%;
}

/* --- Table Row Animations --- */
.table tbody tr {
  transition: all 0.3s ease;
}

.table tbody tr:hover {
  transform: scale(1.01);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background-color: rgba(0, 123, 255, 0.05) !important;
}

/* --- Card Animations --- */
.card {
  transition: all 0.3s ease;
  overflow: hidden;
}

.card:hover {
  box-shadow: 0 0.5rem 2.5rem 0 rgba(58, 59, 69, 0.2) !important;
}

/* --- Badge Animations --- */
.badge {
  transition: all 0.3s ease;
}

.badge:hover {
  transform: scale(1.1);
}

/* --- Fade-In Animations for Charts --- */
#chartventas,
#chartventasporlinea,
#echarts-map,
#chartMargenDona,
#chartEmpleadosRanking,
#chartInventarioMuerto,
#chartParetoDeuda {
  opacity: 0;
  animation: fadeInChart 1s ease forwards;
}

#chartventas {
  animation-delay: 0.3s;
}
#chartventasporlinea {
  animation-delay: 0.4s;
}
#echarts-map {
  animation-delay: 0.5s;
}
#chartMargenDona {
  animation-delay: 0.6s;
}
#chartEmpleadosRanking {
  animation-delay: 0.7s;
}
#chartInventarioMuerto {
  animation-delay: 0.8s;
}
#chartParetoDeuda {
  animation-delay: 0.9s;
}

@keyframes iconPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes iconBounce {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

@keyframes fadeInChart {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* --- Card Tools --- */
.card-tools a {
  transition: all 0.3s ease;
}

.card-tools a:hover {
  transform: translateX(-3px);
}

.btn-tool {
  transition: all 0.3s ease;
}

.btn-tool:hover {
  transform: rotate(90deg);
}
