/* TRAVESÍA · ESTILOS DE ADMINISTRACIÓN
   Estilos reutilizables para el panel de administrador */

/* --- LAYOUT PRINCIPAL --- */
.pagina-admin {
  background-color: #f8fafc;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.admin-contenedor {
  display: flex;
  height: 100vh;
  width: 100%;
}

/* --- SIDEBAR --- */
.admin-sidebar {
  width: 260px;
  background: linear-gradient(180deg, #1a3a5f 0%, #0f2a3f 100%);
  color: white;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  /* Cambio clave: */
  overflow-y: auto; /* Habilita el scroll solo en la lista de enlaces */
  scrollbar-width: thin; /* En Firefox */
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
  height: 100vh;
  position: sticky;
  top: 0;
}

.sidebar-header {
  padding: 1.5rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: white;
}

.sidebar-rol {
  font-size: 0.8rem;
  opacity: 0.7;
  margin: 0.25rem 0 0;
  color: #f39c12;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
  height: 100vh; /* Altura total de la ventana */
}

/* Estilo para la barra de scroll en Chrome/Edge/Safari */
.sidebar-nav::-webkit-scrollbar {
  width: 5px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.sidebar-nav .nav {
  gap: 0.25rem;
}

.sidebar-nav .nav-link {
  color: rgba(255, 255, 255, 0.7);
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transition: all 0.2s;
  border-left: 4px solid transparent;
}

.sidebar-nav .nav-link i {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
}

.sidebar-nav .nav-link:hover {
  color: white;
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: #f39c12;
}

.sidebar-nav .nav-link.active {
  color: white;
  background-color: rgba(243, 156, 18, 0.2);
  border-left-color: #f39c12;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(
    15,
    42,
    63,
    0.9
  ); /* Un fondo ligeramente más oscuro para separarlo */
  margin-top: auto; /* Asegura que siempre esté al final */
}

.btn-volver-admin {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.btn-volver-admin:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #f39c12;
}

/* --- CONTENIDO PRINCIPAL --- */
.admin-contenido {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 2rem;
  background-color: #f8fafc;
}

/* Header superior */
.admin-header {
  margin-bottom: 1.5rem;
}

.admin-titulo {
  font-size: 1.8rem;
  font-weight: 600;
  color: #1a3a5f;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-titulo i {
  color: #f39c12;
  font-size: 2rem;
}

.admin-subtitulo {
  color: #6c757d;
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
}

/* Botones de administración */
.btn-admin-primario {
  background: linear-gradient(135deg, #f39c12, #e08e0b);
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-admin-primario:hover {
  background: linear-gradient(135deg, #e08e0b, #f39c12);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(243, 156, 18, 0.3);
}

.btn-admin-secundario {
  background-color: white;
  color: #1a3a5f;
  border: 1px solid #dee2e6;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-admin-secundario:hover {
  background-color: #f8f9fa;
  border-color: #1a3a5f;
}

/* Filtros */
.admin-filtros {
  background-color: white;
  padding: 1.2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  margin-bottom: 1.5rem;
}

.campo-busqueda {
  position: relative;
}

.campo-busqueda i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  z-index: 10;
}

.campo-busqueda input {
  padding-left: 38px;
}

.btn-filtro {
  width: 100%;
  padding: 0.5rem;
  background-color: #1a3a5f;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-filtro:hover {
  background-color: #0f2a3f;
}

/* Tabla de datos */
.admin-tabla-contenedor {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  overflow: auto;
  margin-bottom: 1.5rem;
}

.admin-tabla {
  width: 100%;
  border-collapse: collapse;
}

.admin-tabla thead {
  background-color: #f8fafc;
  border-bottom: 2px solid #dee2e6;
}

.admin-tabla th {
  padding: 1rem;
  font-weight: 600;
  color: #1a3a5f;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-tabla td {
  padding: 1rem;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}

.admin-tabla tbody tr:hover {
  background-color: #f8fafc;
}

/* Badge para rutas en tabla */
.badge-ruta-tabla {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 40px;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Estados */
.estado-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 500;
}

.estado-badge.activo {
  background-color: rgba(39, 174, 96, 0.1);
  color: #27ae60;
}

.estado-badge.inactivo {
  background-color: rgba(108, 117, 125, 0.1);
  color: #6c757d;
}

/* Acciones en tabla */
.acciones-tabla {
  display: flex;
  gap: 0.3rem;
}

.btn-accion {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: none;
  background-color: transparent;
  color: #1a3a5f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-accion:hover {
  background-color: #f39c12;
  color: white;
}

.btn-accion i {
  font-size: 1rem;
}

/* Paginación */
.admin-paginacion {
  background-color: white;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.paginacion-info {
  margin: 0;
  color: #6c757d;
  font-size: 0.9rem;
}

.pagination .page-link {
  color: #1a3a5f;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  margin: 0 2px;
}

.pagination .page-link:hover {
  background-color: #f39c12;
  color: white;
  border-color: #f39c12;
}

.pagination .active .page-link {
  background-color: #1a3a5f;
  border-color: #1a3a5f;
  color: white;
}

/* Modal de rutas */
.modal-content {
  border-radius: 16px;
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
  background: linear-gradient(135deg, #1a3a5f, #0f2a3f);
  color: white;
  border-radius: 16px 16px 0 0;
  padding: 1.2rem 1.5rem;
}

.modal-header .btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.8;
}

.modal-title i {
  color: #f39c12;
  margin-right: 0.5rem;
}

#modalTitulo {
  color: white;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1.2rem 1.5rem;
  border-top: 1px solid #f0f0f0;
}

/* Editor de mapa simulado */
.editor-mapa-simulado {
  border: 2px dashed #dee2e6;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.mapa-placeholder {
  background-color: #f8fafc;
  padding: 2rem;
  text-align: center;
  color: #6c757d;
}

.mapa-placeholder i {
  font-size: 3rem;
  color: #dee2e6;
  margin-bottom: 0.5rem;
}

.mapa-placeholder p {
  margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 992px) {
  .admin-sidebar {
    width: 70px;
    overflow: hidden;
  }

  .sidebar-logo,
  .sidebar-rol,
  .sidebar-footer span {
    display: none;
  }

  .sidebar-nav .nav-link span {
    display: none;
  }

  .sidebar-nav .nav-link i {
    margin: 0 auto;
  }

  .btn-volver-admin span {
    display: none;
  }

  .btn-volver-admin {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .admin-contenido {
    padding: 1rem;
  }

  .admin-tabla {
    min-width: 800px;
  }

  .btn-admin-primario {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .admin-titulo {
    font-size: 1.4rem;
  }
}

/* --- AÑADIR AL FINAL DE admin.css --- */
/* Estilos específicos para gestión de paradas */

/* Layout de dos columnas */
.admin-paradas-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Columna izquierda - Mapa */
.paradas-mapa-columna {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mapa-paradas-contenedor {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  overflow: hidden;
}

.mapa-paradas-header {
  padding: 1rem;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mapa-paradas-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a3a5f;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mapa-paradas-header h2 i {
  color: #f39c12;
}

.mapa-paradas-placeholder {
  padding: 2rem;
  text-align: center;
  background-color: #f8fafc;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.mapa-paradas-placeholder i {
  font-size: 3rem;
  color: #dee2e6;
  margin-bottom: 1rem;
}

.mapa-paradas-placeholder p {
  color: #6c757d;
  margin-bottom: 1rem;
}

/* Miniatura de paradas en mapa */
.paradas-miniatura-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: 1rem 0;
}

.miniatura-parada {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.parada-marcador {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.miniatura-nombre {
  font-size: 0.8rem;
  color: #1a3a5f;
  font-weight: 500;
}

/* Estadísticas de paradas */
.paradas-estadisticas {
  background-color: white;
  border-radius: 12px;
  padding: 1.2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.estadistica-parada {
  text-align: center;
}

.estadistica-valor {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a3a5f;
  display: block;
  line-height: 1.2;
}

.estadistica-etiqueta {
  font-size: 0.75rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Columna derecha - Lista */
.paradas-lista-columna {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Elementos en tabla de paradas */
.parada-nombre-tabla {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: #1a3a5f;
}

.parada-marcador-tabla {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.coordenadas-code {
  font-size: 0.8rem;
  background-color: #f8fafc;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  color: #e74c3c;
}

/* Badge de ruta pequeño para tabla */
.badge-ruta-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 30px;
  color: white;
  font-weight: 600;
  font-size: 0.75rem;
  margin-right: 2px;
}

/* Selector de mapa pequeño */
.selector-mapa-simulado {
  border: 2px dashed #dee2e6;
  border-radius: 12px;
  overflow: hidden;
}

.mapa-placeholder-pequeno {
  background-color: #f8fafc;
  padding: 1.5rem;
  text-align: center;
}

.mapa-placeholder-pequeno i {
  font-size: 2rem;
  color: #dee2e6;
  margin-bottom: 0.5rem;
}

.mapa-placeholder-pequeno p {
  font-size: 0.9rem;
  color: #6c757d;
  margin-bottom: 0.5rem;
}

.coordenadas-preview {
  background-color: white;
  padding: 0.5rem;
  border-radius: 8px;
  font-family: monospace;
  font-size: 0.8rem;
  color: #1a3a5f;
  border: 1px solid #dee2e6;
  display: inline-flex;
  gap: 1rem;
}

/* Selector de rutas en modal */
.rutas-selector-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
  margin-top: 0.5rem;
}

.ruta-selector-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background-color: #f8fafc;
  border-radius: 8px;
}

.ruta-selector-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.ruta-selector-item label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #1a3a5f;
  cursor: pointer;
}

/* Foto placeholder */
.foto-placeholder {
  border: 2px dashed #dee2e6;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  background-color: #f8fafc;
}

.foto-placeholder i {
  font-size: 2rem;
  color: #dee2e6;
  margin-bottom: 0.5rem;
}

.foto-placeholder p {
  font-size: 0.9rem;
  color: #6c757d;
  margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 1200px) {
  .admin-paradas-layout {
    grid-template-columns: 1fr;
  }

  .paradas-mapa-columna {
    order: 2;
  }

  .paradas-lista-columna {
    order: 1;
  }
}

@media (max-width: 768px) {
  .rutas-selector-grid {
    grid-template-columns: 1fr;
  }

  .coordenadas-preview {
    flex-direction: column;
    gap: 0.3rem;
  }
}

/* --- AÑADIR AL FINAL DE admin.css --- */
/* Estilos específicos para moderación de reportes */

/* Pestañas de moderación */
.moderacion-tabs {
  border-bottom: 2px solid #dee2e6;
  margin-bottom: 1.5rem;
  padding: 0 1rem;
}

.moderacion-tabs .nav-link {
  color: #1a3a5f;
  font-weight: 500;
  border: none;
  padding: 0.8rem 1.2rem;
  position: relative;
}

.moderacion-tabs .nav-link i {
  margin-right: 0.5rem;
}

.moderacion-tabs .nav-link .badge {
  margin-left: 0.5rem;
  border-radius: 30px;
}

.moderacion-tabs .nav-link.active {
  color: #f39c12;
  background: transparent;
  border-bottom: 3px solid #f39c12;
}

/* Filtros de moderación */
.moderacion-filtros {
  margin-bottom: 1.5rem;
}

/* Tabla de moderación */
.moderacion-tabla td {
  vertical-align: middle;
}

/* Tipos de reporte */
.tipo-reporte {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.tipo-reporte.lleno {
  color: #e74c3c;
}

.tipo-reporte.retraso {
  color: #f39c12;
}

.tipo-reporte.accidente {
  color: #e74c3c;
  font-weight: 600;
}

.tipo-reporte.incivismo {
  color: #6c757d;
}

.tipo-reporte.otro {
  color: #6c757d;
}

/* Severidad badge */
.severidad-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.severidad-badge.baja {
  background-color: rgba(108, 117, 125, 0.1);
  color: #6c757d;
}

.severidad-badge.media {
  background-color: rgba(243, 156, 18, 0.1);
  color: #f39c12;
}

.severidad-badge.alta {
  background-color: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
}

.severidad-badge.critica {
  background-color: #e74c3c;
  color: white;
}

/* Reportado por */
.reportado-por {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.9rem;
}

.reportado-por i {
  font-size: 1rem;
  color: #6c757d;
}

.reportado-por.baja-reputacion {
  color: #e74c3c;
}

.reputacion-badge {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  background-color: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
  border-radius: 30px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-left: 0.3rem;
}

/* Votos en reportes */
.votos-reporte {
  font-size: 0.9rem;
  white-space: nowrap;
}

.votos-reporte.negativos {
  color: #e74c3c;
  font-weight: 500;
}

/* Botones específicos de moderación */
.btn-accion.aprobar:hover {
  background-color: #27ae60;
  color: white;
}

.btn-accion.rechazar:hover,
.btn-accion.banear:hover {
  background-color: #e74c3c;
  color: white;
}

.btn-accion.ocultar:hover {
  background-color: #6c757d;
  color: white;
}

.btn-accion.resolver:hover {
  background-color: #27ae60;
  color: white;
}

.btn-accion.restaurar:hover {
  background-color: #f39c12;
  color: white;
}

.btn-accion.eliminar:hover {
  background-color: #e74c3c;
  color: white;
}

.btn-accion.duplicar:hover {
  background-color: #1a3a5f;
  color: white;
}

/* Filas con reportes pendientes especiales */
.reporte-pendiente {
  background-color: rgba(243, 156, 18, 0.02);
}

.reporte-pendiente.sancionado {
  background-color: rgba(231, 76, 60, 0.05);
}

/* Estadísticas de moderación */
.moderacion-stats {
  margin-top: 2rem;
}

.stat-card {
  background-color: white;
  border-radius: 12px;
  padding: 1.2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icono {
  width: 48px;
  height: 48px;
  border-radius: 48px;
  background-color: rgba(243, 156, 18, 0.1);
  color: #f39c12;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-contenido {
  display: flex;
  flex-direction: column;
}

.stat-valor {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a3a5f;
  line-height: 1.2;
}

.stat-etiqueta {
  font-size: 0.75rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Modal de detalle */
.detalle-reporte {
  padding: 0.5rem;
}

.detalle-item {
  margin-bottom: 0.8rem;
  display: flex;
  align-items: flex-start;
}

.detalle-etiqueta {
  width: 120px;
  font-weight: 600;
  color: #1a3a5f;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.detalle-valor {
  flex: 1;
  color: #1a3a5f;
}

.detalle-item.descripcion {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.detalle-texto {
  width: 100%;
  padding: 0.8rem;
  background-color: #f8fafc;
  border-radius: 8px;
  margin: 0;
  font-style: italic;
  color: #1a3a5f;
  border-left: 4px solid #f39c12;
}

/* Responsive */
@media (max-width: 768px) {
  .moderacion-tabs .nav-link {
    padding: 0.6rem 0.8rem;
    font-size: 0.8rem;
  }

  .moderacion-tabs .nav-link i {
    margin-right: 0.2rem;
  }

  .detalle-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }

  .detalle-etiqueta {
    width: 100%;
  }
}

/* --- AÑADIR AL FINAL DE admin.css --- */
/* Estilos específicos para estadísticas */

/* Tarjetas KPI */
.estadisticas-kpi {
  margin-bottom: 2rem;
}

.kpi-card {
  background-color: white;
  border-radius: 16px;
  padding: 1.2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.2s;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.kpi-icono {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}

.kpi-contenido {
  flex: 1;
}

.kpi-valor {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1a3a5f;
  line-height: 1.2;
  display: block;
}

.kpi-etiqueta {
  font-size: 0.8rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 0.25rem;
}

.kpi-tendencia {
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.kpi-tendencia.positiva {
  color: #27ae60;
}

.kpi-tendencia.negativa {
  color: #e74c3c;
}

.kpi-tendencia i {
  font-size: 0.8rem;
}

/* Tarjetas de gráficas */
.estadisticas-graficas {
  margin-bottom: 2rem;
}

.grafica-card {
  background-color: white;
  border-radius: 16px;
  padding: 1.2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  height: 100%;
}

.grafica-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.grafica-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #1a3a5f;
  margin: 0;
}

.grafica-header .form-select-sm {
  font-size: 0.8rem;
  padding: 0.2rem 1.5rem 0.2rem 0.5rem;
}

.grafica-contenedor {
  position: relative;
  width: 100%;
  height: 200px;
}

/* Leyenda de gráfica */
.grafica-leyenda {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.2rem;
}

.leyenda-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: #1a3a5f;
}

.color-badge {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  display: inline-block;
}

/* Mapa de calor placeholder */
.mapa-calor-placeholder {
  position: relative;
  width: 100%;
  height: 200px;
  background: linear-gradient(145deg, #d4e0f0 0%, #b0c6de 100%);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #1a3a5f;
  overflow: hidden;
}

.mapa-calor-placeholder i {
  font-size: 2.5rem;
  opacity: 0.3;
  margin-bottom: 0.5rem;
}

.mapa-calor-placeholder p {
  position: relative;
  z-index: 2;
  background-color: rgba(255, 255, 255, 0.7);
  padding: 0.3rem 1rem;
  border-radius: 30px;
  font-size: 0.8rem;
}

.mapa-calor-simulado {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.calor-punto {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #f39c12;
  transform: translate(-50%, -50%);
  filter: blur(15px);
  animation: pulso 2s infinite;
}

.calor-punto:nth-child(1) {
  background-color: #e74c3c;
}
.calor-punto:nth-child(2) {
  background-color: #f39c12;
}
.calor-punto:nth-child(3) {
  background-color: #e74c3c;
}
.calor-punto:nth-child(4) {
  background-color: #f39c12;
}
.calor-punto:nth-child(5) {
  background-color: #1a3a5f;
}

@keyframes pulso {
  0% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1.2);
  }
  100% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Ranking de usuarios */
.ranking-usuarios {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.5rem;
  border-radius: 8px;
  transition: background-color 0.2s;
}

.ranking-item:hover {
  background-color: #f8fafc;
}

.ranking-puesto {
  width: 24px;
  height: 24px;
  border-radius: 24px;
  background-color: #f39c12;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  flex-shrink: 0;
}

.ranking-puesto:nth-child(1) {
  background-color: #f39c12;
}
.ranking-puesto:nth-child(2) {
  background-color: #6c757d;
}
.ranking-puesto:nth-child(3) {
  background-color: #1a3a5f;
}

.ranking-info {
  flex: 2;
  min-width: 0;
}

.ranking-nombre {
  font-weight: 600;
  color: #1a3a5f;
  font-size: 0.9rem;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ranking-email {
  font-size: 0.7rem;
  color: #6c757d;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ranking-reputacion {
  flex: 1;
  text-align: right;
  font-size: 0.9rem;
}

.reputacion-valor {
  font-weight: 700;
  color: #27ae60;
}

.reputacion-max {
  font-size: 0.7rem;
  color: #6c757d;
}

.ranking-progreso {
  flex: 2;
}

.ranking-progreso .progress {
  height: 6px;
  border-radius: 6px;
  background-color: #f0f0f0;
}

/* Tablas de estadísticas */
.tabla-estadistica-card {
  background-color: white;
  border-radius: 16px;
  padding: 1.2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  height: 100%;
}

.tabla-estadistica-card h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #1a3a5f;
  margin-bottom: 1rem;
}

.tabla-estadistica {
  width: 100%;
  border-collapse: collapse;
}

.tabla-estadistica th {
  font-size: 0.7rem;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.5rem;
  border-bottom: 1px solid #f0f0f0;
}

.tabla-estadistica td {
  padding: 0.8rem 0.5rem;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9rem;
  color: #1a3a5f;
}

.tabla-estadistica tbody tr:last-child td {
  border-bottom: none;
}

.tendencia {
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.tendencia.positiva {
  color: #27ae60;
}
.tendencia.negativa {
  color: #e74c3c;
}
.tendencia.estable {
  color: #6c757d;
}

/* Exportar datos */
.exportar-datos {
  margin-top: 1rem;
}

/* Botones activos */
.btn-admin-secundario.active {
  background-color: #1a3a5f;
  color: white;
  border-color: #1a3a5f;
}

/* Responsive */
@media (max-width: 768px) {
  .kpi-card {
    flex-direction: column;
    text-align: center;
  }

  .grafica-header {
    flex-direction: column;
    gap: 0.5rem;
  }

  .ranking-item {
    flex-wrap: wrap;
  }

  .ranking-progreso {
    flex: 100%;
    margin-top: 0.3rem;
  }

  .tabla-estadistica {
    font-size: 0.8rem;
  }

  .tabla-estadistica td {
    padding: 0.5rem 0.3rem;
  }
}

.paradas-lista {
  min-height: 300px;
  background-color: #f8fafc;
  border-radius: 12px;
  padding: 1rem;
}

.parada-item {
  background-color: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 0.8rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: grab;
  transition: all 0.2s;
  user-select: none;
}

.parada-item:hover {
  border-color: #f39c12;
  box-shadow: 0 2px 8px rgba(243, 156, 18, 0.2);
}

.parada-item.dragging {
  opacity: 0.4;
  cursor: grabbing;
}

.parada-item.drag-over {
  border-color: #f39c12;
  border-style: dashed;
  background-color: rgba(243, 156, 18, 0.05);
}

.drag-handle {
  cursor: grab;
  color: #6c757d;
  margin-right: 0.5rem;
}

.parada-nombre {
  flex: 1;
  font-weight: 500;
  color: #1a3a5f;
}

.parada-orden {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #f39c12;
  background-color: rgba(243, 156, 18, 0.1);
  border-radius: 50%;
  margin-right: 0.6rem;
  font-size: 0.85rem;
}

.direccion-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  font-weight: 600;
  margin-right: 0.4rem;
}

.direccion-ida {
  background-color: rgba(39, 174, 96, 0.12);
  color: #27ae60;
}
.direccion-vuelta {
  background-color: rgba(243, 156, 18, 0.12);
  color: #f39c12;
}
.direccion-alternativa {
  background-color: rgba(26, 58, 95, 0.12);
  color: #1a3a5f;
}
.direccion-foraneo {
  background-color: rgba(231, 76, 60, 0.12);
  color: #e74c3c;
}

.badge-ruta-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: white;
  font-weight: 700;
  font-size: 0.8rem;
}

.selector-ruta {
  border-radius: 60px;
  padding: 0.5rem 1.2rem;
  border: 2px solid #dee2e6;
  font-weight: 500;
  color: #1a3a5f;
}

.selector-ruta:focus {
  border-color: #f39c12;
  outline: none;
  box-shadow: none;
}

.sin-ruta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  color: #6c757d;
}
