/* DASHBOARD ESTADÍSTICAS */

#segittur-estadisticas-dashboard {
  font-family: 'system-ui', 'Segoe UI', Roboto, sans-serif;
}

#segittur-estadisticas-dashboard h5.card-title {
  font-size: 1rem;
  font-weight: 600;
}

#segittur-estadisticas-dashboard .card.clickable-card {
  border: 1px solid #dee2e6;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease-in-out;
  cursor: pointer;
}

#segittur-estadisticas-dashboard .card.clickable-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

#segittur-estadisticas-dashboard .card-body {
  text-align: center;
  padding: 1.5rem;
}

#segittur-estadisticas-dashboard .mini-chart-container {
  margin-top: 0.75rem;
}

#segittur-estadisticas-dashboard .nav-tabs .nav-link {
  border: none;
  border-bottom: 2px solid transparent;
  color: #495057;
  font-weight: 500;
}

#segittur-estadisticas-dashboard .nav-tabs .nav-link.active {
  color: #CE0E71;
  border-bottom: 2px solid #CE0E71;
}

#segittur-estadisticas-dashboard .card.clickable-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  padding: 1.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

#segittur-estadisticas-dashboard .card.clickable-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

#segittur-estadisticas-dashboard .card-body {
  text-align: center;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

#segittur-estadisticas-dashboard .card-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #1a202c;
}

#segittur-estadisticas-dashboard .card-text {
  font-size: 1.25rem;
  font-weight: 500;
  color: #CE0E71;
  margin-bottom: 0.75rem;
  flex-grow: 1; /* Permite que el texto tome el espacio disponible */
}

#segittur-estadisticas-dashboard .card.chart-none .card-text {
  display: block;
  flex-grow: unset;
}

#segittur-estadisticas-dashboard .card.chart-none .mini-chart-container {
  display: none;
}

#segittur-estadisticas-dashboard .mini-chart-container {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  padding-top: 0.5rem;
  margin-top: auto; /* Empuja el contenedor de gráfico al fondo si es necesario */
}

#segittur-estadisticas-dashboard .modal-content {
  border-radius: 1rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  border: none;
  background-color: #ffffff;
  padding: 1.5rem;
}

#segittur-estadisticas-dashboard .modal-header {
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

#segittur-estadisticas-dashboard .modal-header .modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #2d3748;
}

#segittur-estadisticas-dashboard .modal-header .btn-close {
  background-color: transparent;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

#segittur-estadisticas-dashboard .modal-header .btn-close:hover {
  opacity: 1;
}

#segittur-estadisticas-dashboard .modal-body {
  font-size: 0.95rem;
  color: #4a5568;
  line-height: 1.6;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 0.5rem;
}

#segittur-estadisticas-dashboard .modal-body table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.9rem;
}

#segittur-estadisticas-dashboard .modal-body th,
#segittur-estadisticas-dashboard .modal-body td {
  padding: 0.5rem 0.75rem;
  border: 1px solid #e2e8f0;
  text-align: left;
}

#segittur-estadisticas-dashboard .modal-body th {
  background-color: #f7fafc;
  font-weight: 600;
}

/* Responsive adaptativo */
@media (max-width: 991.98px) {
  #segittur-estadisticas-dashboard .col-md-4 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

@media (max-width: 767.98px) {
  #segittur-estadisticas-dashboard .col-md-4 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

@media (max-width: 991.98px) {
  #segittur-estadisticas-dashboard .col-md-4 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

@media (max-width: 767.98px) {
  #segittur-estadisticas-dashboard .col-md-4 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  #segittur-estadisticas-dashboard .nav-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  #segittur-estadisticas-dashboard .nav-tabs .nav-item {
    flex: 1 0 auto;
  }
}

/* --- Pestañas horizontales scrollables en móvil --- */
#segittur-estadisticas-dashboard .nav-tabs {
  overflow-x: auto;
  overflow-y: hidden;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* Firefox */
}

#segittur-estadisticas-dashboard .nav-tabs::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari */
}

#segittur-estadisticas-dashboard .nav-tabs .nav-link {
  white-space: nowrap;
}

/* --- Columnas adaptables para cards --- */
@media (min-width: 576px) {
  #segittur-estadisticas-dashboard .col-sm-6 {
    flex: 0 0 auto;
    width: 50%;
  }
}

@media (max-width: 575.98px) {
  #segittur-estadisticas-dashboard .col-12 {
    width: 100%;
  }
}

/* --- Espaciado uniforme entre tarjetas --- */
#segittur-estadisticas-dashboard .row.g-4>[class*='col-'] {
  padding-bottom: 1rem;
}

/* --- Mini gráficos mejor centrados y visuales --- */
#segittur-estadisticas-dashboard .mini-chart-container {
  border-radius: 50%;
  background: #f8f9fa;
  padding: 0.5rem;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
  width: 80px;
  height: 80px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

#segittur-estadisticas-dashboard .mini-chart-container.line,
#segittur-estadisticas-dashboard .mini-chart-container.doughnut,
#segittur-estadisticas-dashboard .mini-chart-container.pie,
#segittur-estadisticas-dashboard .mini-chart-container.bar {
  border-radius: 0;
  width: 100%!important;
  height: 150px!important;
}

#segittur-estadisticas-dashboard .mini-chart-container.none {
  background: none;
  height: auto;
  box-shadow: none;
}

/* --- Modal con detalle: separador superior y scroll suave --- */
#segittur-estadisticas-dashboard .modal-body {
  border-top: 1px solid #dee2e6;
  padding-top: 1rem;
  scroll-behavior: smooth;
}


/* --- Spinner de carga centralizado --- */
#detalleModalBody .spinner-border {
  width: 3rem;
  height: 3rem;
  margin: 2rem auto;
  display: block;
}

#segittur-estadisticas-dashboard #stats-filter-form .form-label {
  font-weight: 500;
  color: #2d3748;
}

#segittur-estadisticas-dashboard #stats-filter-form button,
#segittur-estadisticas-dashboard #stats-filter-form .dropdown-toggle {
  padding: 0.65rem 1rem;
  font-weight: 600;
  border-radius: 0.5rem;
  transition: all 0.2s ease-in-out;
  font-size: 0.95rem;
}

#segittur-estadisticas-dashboard #stats-filter-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Botón principal de acción (Filtrar) */
#segittur-estadisticas-dashboard #stats-filter-form .segittur-btn {
  font-family: 'Nunito Sans';
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  text-align: center;
  background-color: #CE0E71;
  color: #FFF;
  padding: 8px 16px;
  border-radius: 4px;
  gap: 4px;
  border: none;
  box-shadow: none
}

#segittur-estadisticas-dashboard #stats-filter-form .segittur-btn:hover {
  background-color: #AB005C;
}

/* Botón amarillo (Restablecer) */
#segittur-estadisticas-dashboard #stats-filter-form .btn-warning {
  color: #fff;
  background-color: #f59e0b;
  font-family: 'Nunito Sans';
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  text-align: center;
  color: #FFF;
  padding: 8px 16px;
  border-radius: 4px;
  gap: 4px;
  border: none;
  box-shadow: none
}

#segittur-estadisticas-dashboard #stats-filter-form .btn-warning:hover {
  background-color: #d97706;
}

/* Botón gris (Descargar Informe) */
#segittur-estadisticas-dashboard #stats-filter-form .btn-secondary {
  background-color: #4b5563;
  color: #fff;
  font-family: 'Nunito Sans';
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  text-align: center;
  color: #FFF;
  padding: 8px 16px;
  border-radius: 4px;
  gap: 4px;
  border: none;
  box-shadow: none
}

#segittur-estadisticas-dashboard #stats-filter-form .btn-secondary:hover {
  background-color: #374151;
}

/* Estilo del dropdown */
#segittur-estadisticas-dashboard .dropdown-menu {
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  font-size: 0.9rem;
}

#segittur-estadisticas-dashboard .stats-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

#segittur-estadisticas-dashboard .stats-list li {
  margin-bottom: 0.2rem;
  text-align: center;
}