body{
  font-size: 10pt;
  background-color: #f5f6fa;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Fix Bootstrap modal scrollbar shift - COMPLETO */
body {
  padding-right: 0 !important;
}
body.modal-open {
  overflow: auto !important;
  padding-right: 0 !important;
}
.modal-open .navbar-fixed-top,
.modal-open .navbar-fixed-bottom {
  padding-right: 0 !important;
}
.modal {
  padding-right: 0 !important;
  overflow-y: auto !important;
}
.modal-backdrop {
  width: 100% !important;
}
#logo_login {
  display: flex;
  justify-content: center;
  /* Centrado horizontal del logo y texto */
  align-items: center;
  /* Centrado vertical del logo y texto */
  font-family: 'Roboto', sans-serif;
  /* Fuente Roboto */
  font-size: 24px;
  /* Ajusta el tamaño según tus necesidades */
  font-weight: 700;
  /* O usa 400 para un peso normal */
  height: 50px;
  margin-bottom: 20px;
}

#logo_login::before {
  content: '';
  display: inline-block;
  /* Muestra la imagen en línea con el texto */
  background-image: url('../../images/logo_2025.png');
  /* Ruta de la imagen */
  width: 160px;
  /* Ancho de la imagen */
  height: 43px;
  /* Altura de la imagen */
  background-size: contain;
  /* Asegura que la imagen se ajuste al tamaño del contenedor */
  background-repeat: no-repeat;
  /* Evita que la imagen se repita */
  margin-right: 10px;
  /* Espacio entre el logo y el texto */
  vertical-align: middle;
  /* Centra verticalmente la imagen con el texto */
}
#powerby {
  flex-shrink: 0;
  text-align: center;
  padding: 10px;
  font-size: 0.8em;
}
#logo{
  float: left;
  margin-right: 20px;
}

/* Estilos mejorados para botones del header */
.btns-tool-i .btn {
  margin-right: 8px;
  padding: 8px 16px;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btns-tool-i .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btns-tool-i .btn i {
  margin-right: 5px;
}

.btns-tool-i .btn-success {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  border: none;
}

.btns-tool-i .btn-info {
  background: linear-gradient(135deg, #17a2b8 0%, #6610f2 100%);
  border: none;
}

.btns-tool-i .btn-primary {
  background: linear-gradient(135deg, #007bff 0%, #6f42c1 100%);
  border: none;
}

.btns-tool-i .btn-warning {
  background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
  border: none;
  color: #212529;
}

.btns-tool-i .btn-danger {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  border: none;
}

/* Botón deshabilitado cuando no hay rutas */
.btns-tool-i .btn-secondary,
.btns-tool-i .btn-secondary:hover {
  background: #6c757d !important;
  border: none;
  cursor: not-allowed;
  opacity: 0.7;
}

.btns-tool-i .btn-secondary:hover {
  transform: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Alerta de rutas faltantes */
.alert-rutas {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
  border: 1px solid #ffc107;
  border-radius: 8px;
  padding: 15px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.alert-rutas i {
  color: #856404;
  margin-right: 8px;
}

/* =============================================
   BUSCADOR DE ARCHIVADOS
   ============================================= */

.buscador-archivados {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.buscador-archivados .input-group {
  max-width: 100%;
}

.buscador-archivados .form-control {
  font-size: 16px;
  padding: 12px 15px;
  height: auto;
}

.buscador-archivados .input-group-addon {
  background: #f8f9fa;
  border-color: #ddd;
  padding: 12px 15px;
}

.buscador-archivados small {
  display: block;
  margin-top: 8px;
}

/* Resultados de búsqueda */
.resultados-archivados {
  max-height: 400px;
  overflow-y: auto;
}

/* Tarjeta de resultado */
.resultado-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  margin-bottom: 10px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.resultado-item:hover {
  background: #e9ecef;
  border-color: #007bff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.resultado-info {
  flex: 1;
}

.resultado-info .nombre-alumno {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
}

.resultado-info .detalles {
  font-size: 13px;
  color: #666;
}

.resultado-info .detalles span {
  margin-right: 15px;
}

.resultado-info .badge-anio {
  background: #6c757d;
  color: #fff;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  margin-right: 10px;
}

.resultado-accion .btn {
  white-space: nowrap;
}

/* Sin resultados */
#sinArchivados {
  margin-top: 20px;
}

/* Scrollbar para resultados */
.resultados-archivados::-webkit-scrollbar {
  width: 6px;
}

.resultados-archivados::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.resultados-archivados::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.resultados-archivados::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

/* Responsive para buscador de archivados */
@media (max-width: 768px) {
  .resultado-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .resultado-info .detalles span {
    display: block;
    margin-bottom: 3px;
  }

  .resultado-accion {
    width: 100%;
  }

  .resultado-accion .btn {
    width: 100%;
  }

  .buscador-archivados .form-control {
    font-size: 16px; /* Evita zoom en iOS */
  }
}

/* =============================================
   MODAL VISUALIZAR RUTA
   ============================================= */

/* Estadísticas de la ruta */
.ruta-stats {
  display: flex;
  justify-content: space-around;
  padding: 15px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat-item > i {
  font-size: 24px;
  opacity: 0.9;
}

.stat-content {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
}

.stat-label {
  font-size: 11px;
  opacity: 0.8;
  text-transform: uppercase;
}

/* Lista de paradas */
.lista-paradas-container {
  padding: 15px 20px;
  background: #f8f9fa;
  max-height: 250px;
  overflow-y: auto;
}

.lista-paradas-container h5 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 14px;
  font-weight: 600;
}

.lista-paradas {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.parada-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 15px;
  background: white;
  border-radius: 8px;
  border-left: 4px solid #667eea;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.parada-numero {
  width: 30px;
  height: 30px;
  background: #667eea;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.parada-info {
  flex: 1;
}

.parada-nombre {
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.parada-direccion {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
}

.parada-tipo {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 500;
}

.parada-tipo.recogida {
  background: #d4edda;
  color: #155724;
}

.parada-tipo.entrega {
  background: #cce5ff;
  color: #004085;
}

/* Tiempos y distancias por parada */
.parada-tiempos {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  margin-right: 12px;
  min-width: 120px;
}

.tiempo-acumulado {
  font-size: 13px;
  font-weight: 600;
  color: #28a745;
}

.tiempo-acumulado i {
  margin-right: 4px;
  font-size: 11px;
}

.tiempo-tramo {
  font-size: 11px;
  font-weight: 400;
  color: #6c757d;
  margin-left: 4px;
}

.distancia-acumulada {
  font-size: 11px;
  color: #6c757d;
}

.distancia-acumulada i {
  margin-right: 4px;
  font-size: 10px;
}

/* Botón visualizar en tabla de rutas */
.btn-visualizar {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: #fff;
}

.btn-visualizar:hover {
  background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
  color: #fff;
}

.acciones-ruta-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-simular-ruta {
  background: linear-gradient(135deg, #ff7b00 0%, #ff3d00 100%);
  border: none;
  color: #fff;
}

.btn-simular-ruta:hover {
  background: linear-gradient(135deg, #e36f00 0%, #e03500 100%);
  color: #fff;
}

.simulador-controles {
  padding: 14px 18px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.simulador-controles-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
}


.simulador-controles .form-group {
  margin-bottom: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.simulador-controles label {
  font-size: 13px;
  font-weight: 600;
  color: #495057;
  margin-bottom: 0;
}

.simulador-btn-wrap {
  display: flex;
  align-items: flex-end;
}

.simulador-btn-wrap .btn {
  height: 34px;
  min-width: 120px;
  font-weight: 600;
  margin: 0;
}
.sim-resumen-destacado {
  margin-top: 12px;
  background: linear-gradient(135deg, #fff2d9 0%, #ffe6bf 100%);
  border: 1px solid #ffd08a;
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.sim-resumen-item {
  display: flex;
  flex-direction: column;
}

.sim-resumen-label {
  font-size: 11px;
  color: #7a5a2a;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.sim-resumen-valor {
  font-size: 24px;
  font-weight: 800;
  color: #b34700;
  line-height: 1.1;
}

@media (max-width: 640px) {
  .simulador-controles-grid {
    grid-template-columns: 1fr;
  }

  .simulador-btn-wrap .btn {
    width: 100%;
  }

  .sim-resumen-destacado {
    flex-direction: column;
  }

  .sim-resumen-valor {
    font-size: 20px;
  }
}

/* Asegura que las sugerencias de Google Places se vean sobre el modal */
.pac-container {
  z-index: 20000 !important;
}

/* =============================================
   MODAL DE PAGOS
   ============================================= */

.pagos-header {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: #fff;
}

.pagos-header .modal-title {
  color: #fff;
}

.pagos-header .close {
  color: #fff;
  opacity: 0.8;
}

.pagos-header .close:hover {
  opacity: 1;
}

/* Info del usuario */
.pago-usuario-info {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
  margin-bottom: 20px;
}

.pago-usuario-avatar {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pago-usuario-avatar i {
  font-size: 36px;
  color: #fff;
}

.pago-usuario-datos h4 {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 700;
  color: #333;
}

.pago-usuario-datos p {
  margin: 0 0 4px 0;
  font-size: 13px;
  color: #666;
}

.pago-usuario-datos p i {
  margin-right: 5px;
  color: #28a745;
}

/* Resumen de pagos */
.pago-resumen {
  display: flex;
  justify-content: space-around;
  gap: 15px;
  margin-bottom: 25px;
}

.pago-resumen-item {
  flex: 1;
  text-align: center;
  padding: 15px 10px;
  border-radius: 10px;
  background: #f8f9fa;
}

.pago-resumen-item.pagados {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  border: 1px solid #28a745;
}

.pago-resumen-item.pendientes {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
  border: 1px solid #ffc107;
}

.pago-resumen-item.total {
  background: linear-gradient(135deg, #cce5ff 0%, #b8daff 100%);
  border: 1px solid #007bff;
}

.pago-resumen-numero {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: #333;
}

.pago-resumen-label {
  display: block;
  font-size: 11px;
  color: #666;
  text-transform: uppercase;
  margin-top: 5px;
}

/* Grid de meses */
.meses-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.mes-card {
  position: relative;
  padding: 15px;
  border-radius: 12px;
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.mes-card.pagado {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  border-color: #28a745;
}

.mes-card.pendiente {
  background: #f8f9fa;
  border-color: #dee2e6;
}

.mes-card.pendiente:hover {
  border-color: #28a745;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

.mes-icono {
  font-size: 24px;
  margin-bottom: 8px;
}

.mes-card.pagado .mes-icono {
  color: #28a745;
}

.mes-card.pendiente .mes-icono {
  color: #6c757d;
}

.mes-nombre {
  font-weight: 600;
  font-size: 14px;
  color: #333;
  margin-bottom: 5px;
}

.mes-estado {
  font-size: 11px;
  margin-bottom: 5px;
}

.mes-card.pagado .mes-estado {
  color: #155724;
}

.mes-card.pagado .mes-estado i {
  color: #28a745;
}

.mes-card.pendiente .mes-estado {
  color: #856404;
}

.mes-fecha {
  font-size: 10px;
  color: #666;
  margin-bottom: 5px;
}

/* Descuento en tarjeta de mes */
.mes-descuento {
  font-size: 10px;
  color: #856404;
  background-color: #fff3cd;
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 3px;
  display: inline-block;
}

.mes-descuento i {
  margin-right: 3px;
  color: #e0a800;
}

/* Botón registrar pago */
.btn-registrar-pago {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  border: none;
  color: #fff;
  font-size: 11px;
  padding: 5px 12px;
  border-radius: 20px;
  margin-top: 8px;
}

.btn-registrar-pago:hover {
  background: linear-gradient(135deg, #218838 0%, #1aa179 100%);
  color: #fff;
  transform: scale(1.05);
}

/* Botón anular pago */
.btn-anular-pago {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(220, 53, 69, 0.1);
  border: none;
  color: #dc3545;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  padding: 0;
  font-size: 10px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.mes-card.pagado:hover .btn-anular-pago {
  opacity: 1;
}

.btn-anular-pago:hover {
  background: #dc3545;
  color: #fff;
}

/* Responsive para modal de pagos */
@media (max-width: 992px) {
  .meses-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .meses-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pago-usuario-info {
    flex-direction: column;
    text-align: center;
  }

  .pago-resumen {
    flex-wrap: wrap;
  }

  .pago-resumen-item {
    flex: 1 1 45%;
    min-width: 100px;
  }
}

@media (max-width: 480px) {
  .meses-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .mes-card {
    padding: 10px;
  }

  .mes-icono {
    font-size: 20px;
  }

  .mes-nombre {
    font-size: 12px;
  }

  .pago-resumen-numero {
    font-size: 22px;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .ruta-stats {
    flex-wrap: wrap;
    gap: 15px;
  }

  .stat-item {
    flex: 1 1 45%;
    min-width: 120px;
  }

  #mapRuta {
    height: 300px !important;
  }

  .lista-paradas-container {
    max-height: 200px;
  }

  /* Paradas en móvil */
  .parada-item {
    flex-wrap: wrap;
    gap: 8px;
  }

  .parada-tiempos {
    flex-direction: row;
    align-items: center;
    min-width: auto;
    width: 100%;
    order: 3;
    justify-content: flex-start;
    gap: 15px;
    padding-left: 42px;
    margin-right: 0;
    margin-top: 5px;
    padding-top: 8px;
    border-top: 1px dashed #dee2e6;
  }

  .parada-tipo {
    order: 2;
  }
}

/* Scrollbar para lista de paradas */
.lista-paradas-container::-webkit-scrollbar {
  width: 6px;
}

.lista-paradas-container::-webkit-scrollbar-track {
  background: #e9ecef;
  border-radius: 3px;
}

.lista-paradas-container::-webkit-scrollbar-thumb {
  background: #adb5bd;
  border-radius: 3px;
}

.lista-paradas-container::-webkit-scrollbar-thumb:hover {
  background: #868e96;
}

/* Estilos para botones de la tabla */
#mirutaList .btn {
  border-radius: 5px;
  font-weight: 500;
  transition: all 0.2s ease;
}

#mirutaList .btn i {
  margin-right: 3px;
}

#mirutaList .btn-primary {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  border: none;
}

#mirutaList .btn-primary:hover {
  background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
  transform: scale(1.05);
}

#mirutaList .btn-danger {
  background: linear-gradient(135deg, #dc3545 0%, #bd2130 100%);
  border: none;
}

#mirutaList .btn-danger:hover {
  background: linear-gradient(135deg, #bd2130 0%, #a71d2a 100%);
  transform: scale(1.05);
}

/* Viejo contenedor de header - ahora oculto en desktop con nuevo diseño */
#contenedor_header{
  display: none !important;
}
/* Viejo contenedor de tabla - ahora reemplazado por .main-table-container */
#contenedor_ruta{
  display: none !important;
}
#map {
  height: 300px;
  width: 100%;
  margin-bottom: 20px;
}
.form-group {
  margin-bottom: 15px !important;
  display: flex;
  gap: 10px;
}
.address-container {
  flex: 0 0 50%; /* Ocupa el 50% del ancho del contenedor */
}

.coords-container {
  display: flex; /* Usamos Flexbox también aquí para los inputs de longitud y latitud */
  gap: 10px; /* Margen entre los inputs */
  flex: 1; /* Ocupa el espacio restante del contenedor */
}

.coords-container .form-control {
  flex: 1; /* Los inputs de longitud y latitud comparten el espacio restante */
}

.form-control {
  width: 100%; /* Asegura que los inputs ocupen el ancho de sus contenedores */
  box-sizing: border-box; /* Incluye los bordes y paddings en el ancho total */
}
label {
  display: block;
  margin-bottom: 5px;
}
input {
  padding: 8px;
  box-sizing: border-box;
}


@media (min-width: 1366px) {
	.container {
		width: 1366px;
	}

	.modal-dialog {
		width: 1200px;
		margin: 30px auto;
	}
}

/* =============================================
   ESTILOS PARA SCROLL EN MODAL
   ============================================= */

/* Permitir scroll en el modal para todas las resoluciones */
#mirutaModal,
#nrutaModal {
	overflow: hidden;
}

#mirutaModal .modal-dialog,
#nrutaModal .modal-dialog {
	display: flex;
	flex-direction: column;
	max-height: calc(100vh - 60px);
	margin: 30px auto;
}

#mirutaModal form,
#nrutaModal form {
	display: flex;
	flex-direction: column;
	max-height: 100%;
	min-height: 0;
	flex: 1;
}

#mirutaModal .modal-content,
#nrutaModal .modal-content {
	display: flex;
	flex-direction: column;
	max-height: 100%;
	min-height: 0;
	overflow: hidden;
}

#mirutaModal .modal-header,
#nrutaModal .modal-header {
	flex-shrink: 0;
}

#mirutaModal .modal-body,
#nrutaModal .modal-body {
	overflow-y: auto;
	overflow-x: hidden;
	flex: 1 1 auto;
	min-height: 0;
	padding: 15px;
}

#mirutaModal .modal-footer,
#nrutaModal .modal-footer {
	flex-shrink: 0;
	border-top: 1px solid #e5e5e5;
	background: #fff;
}

/* Estilo del scrollbar para navegadores webkit (Chrome, Safari, Edge) */
#mirutaModal .modal-body::-webkit-scrollbar {
	width: 8px;
}

#mirutaModal .modal-body::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 4px;
}

#mirutaModal .modal-body::-webkit-scrollbar-thumb {
	background: #c1c1c1;
	border-radius: 4px;
}

#mirutaModal .modal-body::-webkit-scrollbar-thumb:hover {
	background: #a1a1a1;
}

/* Para Firefox */
#mirutaModal .modal-body {
	scrollbar-width: thin;
	scrollbar-color: #c1c1c1 #f1f1f1;
}
div.dataTables_wrapper div.dataTables_filter {
  text-align: right;
  float: right;
}

.editable {
  cursor: pointer;
}
.editing {
  padding: 0 !important;
}
.editing input {
  width: 100%;
  height: 100%;
  padding: 5px;
}
/* Viejos estilos de total_ingresos y totales-container - ahora ocultos/no usados */
#total_ingresos{
  display: none !important;
}

.totales-container {
  display: none !important;
}

#box-in-line {
  display: flex;
  gap: 10px; /* Esto crea el espacio entre los divs */
  margin-bottom: 5px;
}
.box-20{
  width: calc(20% - 5px); /* 20%  menos la mitad del gap */
}
.box-25{
  width: calc(25% - 5px); /* 25%  menos la mitad del gap */
}
.box-33{
  width: calc(33% - 5px); /* 33%  menos la mitad del gap */
}
.box-40{
  width: calc(40% - 5px); /* 33%  menos la mitad del gap */
}
.box-60{
  width: calc(60% - 5px);
}
input:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
}

/* TOOLTIP */
.tooltip-container {
  position: relative;
  display: inline-block;
  width: 100%;
}

.custom-tooltip {
  visibility: hidden;
  background-color: #333;
  color: #fff;
  text-align: center;
  padding: 5px 10px;
  border-radius: 6px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.3s;
}

.custom-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

.tooltip-container:hover .custom-tooltip {
  visibility: visible;
  opacity: 1;
}
/*FIN TOOLTIP*/

/* Estilos para mensajes de validación de posiciones */
.mensaje-libre {
  color: #28a745;
  font-size: 12px;
  font-weight: 500;
  margin-top: 5px;
  display: block;
}

.mensaje-no-disponible {
  color: #dc3545;
  font-size: 12px;
  font-weight: 500;
  margin-top: 5px;
  display: block;
}

.mensaje-usuario-libre {
  color: #28a745;
  font-size: 12px;
  font-weight: 500;
  margin-top: 5px;
  display: block;
}

.mensaje-usuario-no-disponible {
  color: #dc3545;
  font-size: 12px;
  font-weight: 500;
  margin-top: 5px;
  display: block;
}

/* Estilos para inputs deshabilitados con mejor visibilidad */
#mPos_r:disabled,
#mPos_e:disabled {
  background-color: #e9ecef;
  cursor: not-allowed;
  opacity: 0.7;
}

#mPos_r:enabled,
#mPos_e:enabled {
  background-color: #fff;
  border-color: #28a745;
}

.modalSZ1 {
	width: 160px;
	float: left;
	margin-right: 5px;
}

/* =============================================
   ESTILOS RESPONSIVE PARA MÓVILES
   ============================================= */

/* Menú móvil */
.mobile-menu-toggle {
  display: none;
  background: #FAAF41;
  color: #2c3e50;
  border: 1px solid #e9a03a;
  padding: 10px 15px;
  border-radius: 5px;
  font-size: 18px;
  cursor: pointer;
  margin-left: 10px;
}

.mobile-menu-toggle:hover {
  background: #f5a030;
  border-color: #e9a03a;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #f2f4f7;
  z-index: 9999;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 18px 0 calc(24px + env(safe-area-inset-bottom, 0px));
}

.mobile-menu.active {
  display: flex;
}

.mobile-menu .btn {
  width: 88%;
  max-width: 340px;
  padding: 12px 16px;
  font-size: 15px;
  text-align: center;
}

.mobile-menu h3 {
  color: #2f3a45 !important;
  margin-bottom: 10px !important;
}

.mobile-menu .close-menu {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  color: #285F8F;
  font-size: 30px;
  cursor: pointer;
}

/* Header móvil - TEMA CLARO */
.mobile-header {
  display: none;
  width: 100%;
  padding: 10px 15px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-bottom: 2px solid #FAAF41;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  box-sizing: border-box;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.mobile-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-header .logo-mobile img {
  height: 30px;
}

.mobile-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.placa-badge {
  font-size: 11px !important;
}

.mobile-header-right .plan-badge {
  font-size: 9px;
  padding: 3px 10px;
  gap: 3px;
}

.mobile-header-right .plan-badge i {
  font-size: 8px;
}

/* Tabla responsive */
.table-responsive-mobile {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Cards para móvil (alternativa a tabla) */
.mobile-card {
  display: none;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mobile-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.mobile-card-header h4 {
  margin: 0;
  font-size: 16px;
  color: #333;
}

.mobile-card-body {
  font-size: 14px;
}

.mobile-card-body .row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid #f5f5f5;
}

.mobile-card-body .label {
  color: #666;
  font-weight: 500;
}

.mobile-card-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.mobile-card-actions .btn {
  flex: 1;
  padding: 10px;
}

/* Floating Action Button */
.fab-container {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
}

.fab-main {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #28a745;
  color: #fff;
  border: none;
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fab-main:hover {
  background: #218838;
  transform: scale(1.1);
}

.fab-options {
  display: none;
  position: absolute;
  bottom: 70px;
  right: 0;
  flex-direction: column;
  gap: 10px;
}

.fab-container.open .fab-options {
  display: flex;
}

.fab-option {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.fab-option.add { background: #007bff; }
.fab-option.routes { background: #17a2b8; }
.fab-option.archive { background: #ffc107; color: #333; }
.fab-option.logout { background: #dc3545; }

/* =============================================
   MEDIA QUERIES PARA TABLETS Y MÓVILES
   ============================================= */

@media (max-width: 992px) {
  .totales-container {
    flex-wrap: wrap;
  }

  .total-colegio {
    flex: 1 1 45%;
    min-width: 150px;
  }
}

@media (max-width: 768px) {
  /* Ocultar header desktop, mostrar móvil */
  #contenedor_header {
    display: none !important;
  }

  .mobile-header {
    display: block;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .fab-container {
    display: block;
  }

  /* Ajustar contenido principal */
  body {
    padding-top: 60px;
    font-size: 14px;
  }

  #contenedor_ruta {
    width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
  }

  /* Total ingresos */
  #total_ingresos {
    width: 100%;
    padding: 10px 15px;
    box-sizing: border-box;
    text-align: center;
  }

  #total_ingresos .resultado {
    display: block;
    font-size: 28px;
    margin-top: 5px;
  }

  /* Totales por colegio */
  .totales-container {
    flex-direction: column;
    width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
  }

  .total-colegio {
    width: 100%;
    margin-bottom: 10px;
  }

  /* Tabla DataTable */
  #mirutaList {
    font-size: 12px;
  }

  #mirutaList th,
  #mirutaList td {
    padding: 8px 5px !important;
    white-space: nowrap;
  }

  /* Ocultar columnas menos importantes en móvil */
  #mirutaList th:nth-child(1),
  #mirutaList td:nth-child(1),
  #mirutaList th:nth-child(7),
  #mirutaList td:nth-child(7),
  #mirutaList th:nth-child(8),
  #mirutaList td:nth-child(8),
  #mirutaList th:nth-child(9),
  #mirutaList td:nth-child(9),
  #mirutaList th:nth-child(10),
  #mirutaList td:nth-child(10) {
    display: none;
  }

  /* Botones más pequeños en tabla */
  #mirutaList .btn {
    padding: 5px 8px;
    font-size: 11px;
  }

  /* Modal pantalla completa */
  .modal-dialog {
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100%;
  }

  .modal-content {
    border-radius: 0;
    min-height: 100vh;
    border: none;
  }

  .modal-body {
    padding: 15px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
  }

  /* Formulario responsive */
  #box-in-line {
    flex-direction: column;
    gap: 15px;
  }

  .box-20, .box-25, .box-33, .box-40, .box-60 {
    width: 100% !important;
  }

  /* Mapa más pequeño en móvil */
  #map {
    height: 200px;
  }

  /* Acordeones */
  .panel-title a {
    font-size: 14px;
    padding: 10px;
    display: block;
  }

  .panel-body {
    padding: 10px;
  }

  /* DataTables controles */
  div.dataTables_wrapper div.dataTables_filter {
    float: none;
    text-align: center;
    margin-bottom: 10px;
  }

  div.dataTables_wrapper div.dataTables_filter input {
    width: 100%;
    max-width: 250px;
  }

  div.dataTables_wrapper div.dataTables_length {
    float: none;
    text-align: center;
    margin-bottom: 10px;
  }

  div.dataTables_wrapper div.dataTables_info {
    text-align: center;
    padding-top: 10px;
  }

  div.dataTables_wrapper div.dataTables_paginate {
    text-align: center;
    margin-top: 10px;
  }

  div.dataTables_wrapper div.dataTables_paginate ul.pagination {
    justify-content: center;
    flex-wrap: wrap;
  }

  /* Modal archivados */
  #archivadosModal .modal-body {
    padding: 10px;
  }

  #tablaArchivados {
    font-size: 12px;
  }

  #tablaArchivados th,
  #tablaArchivados td {
    padding: 8px 5px;
  }

  /* Botón buscar archivados */
  #btnBuscarArchivados {
    font-size: 13px;
    padding: 12px;
  }

  /* Inputs más grandes para touch */
  .form-control {
    font-size: 16px !important;
    padding: 12px 10px !important;
    min-height: 44px;
  }

  select.form-control {
    min-height: 44px;
  }

  /* Botones más grandes para touch */
  .btn {
    min-height: 44px;
    padding: 10px 15px;
  }

  .modal-footer .btn {
    flex: 1;
  }

  .modal-footer {
    display: flex;
    gap: 10px;
    padding: 15px;
    flex-wrap: wrap;
  }
}

/* =============================================
   VISTA MÓVIL CON CARDS
   ============================================= */

/* Mostrar/ocultar según dispositivo */
.desktop-only {
  display: block;
}

.mobile-only {
  display: none;
}

@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: block !important;
  }
}

/* Contenedor principal móvil */
#mobile-view {
  width: 100%;
  padding: 0 15px;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Barra de herramientas móvil */
.mobile-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 5px;
  margin-bottom: 10px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.mobile-toolbar #mobileResultsCount {
  font-size: 14px;
  color: #666;
  font-weight: 600;
  margin-left: 10px;
}
.mobile-transfer-bar {
  margin-bottom: 10px;
  display: flex;
}

#btnTransferirMobile {
  width: 100%;
  min-height: 42px;
  font-size: 14px;
}


.mobile-search-toggle {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(40, 167, 69, 0.3);
  transition: all 0.2s ease;
}

.mobile-search-toggle:active {
  transform: scale(0.95);
}

.mobile-search-toggle.active {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  box-shadow: 0 3px 8px rgba(220, 53, 69, 0.3);
}

/* Buscador móvil */
.mobile-search-container {
  margin-bottom: 12px;
  background: white;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  animation: slideDown 0.2s ease;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.mobile-search-box input {
  flex: 1 1 auto;
  width: 1%;
  min-width: 0;
  box-sizing: border-box;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  outline: none;
  font-size: 15px;
  padding: 10px 12px;
  background: #f8f9fa;
  transition: border-color 0.2s ease;
}

.mobile-search-box input:focus {
  border-color: #28a745;
  background: white;
}

.mobile-search-btn,
.mobile-clear-btn {
  flex: 0 0 40px;
  width: 40px;
  min-width: 40px;
  max-width: 40px;
  height: 40px;
  padding: 0;
  box-sizing: border-box;
  border-radius: 10px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mobile-search-btn {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: #fff;
  font-size: 16px;
}

.mobile-search-btn:active {
  transform: scale(0.95);
}

.mobile-clear-btn {
  background: #6c757d;
  color: #fff;
  font-size: 14px;
}

.mobile-clear-btn:active {
  background: #dc3545;
}

#mobileSearchContainer * {
  box-sizing: border-box;
}


@media (max-width: 768px) {
  .mobile-toolbar {
    position: fixed;
    top: 60px;
    left: 15px;
    right: 15px;
    z-index: 996;
    margin-bottom: 0;
  }

  .mobile-transfer-bar {
    position: fixed;
    top: 126px;
    left: 15px;
    right: 15px;
    z-index: 995;
    margin-bottom: 0;
    background: transparent;
  }

  .mobile-search-container {
    position: fixed;
    top: 182px;
    left: 15px;
    right: 15px;
    width: auto;
    z-index: 994;
    margin-bottom: 0;
  }

  #mobileCardsContainer {
    margin-top: 128px;
  }

  #mobile-view.mobile-search-open #mobileCardsContainer {
    margin-top: 230px;
  }

  #mobile-view.mobile-notif-transfer #mobileCardsContainer {
    margin-top: 195px;
  }

  #mobile-view.mobile-search-open.mobile-notif-transfer #mobileCardsContainer {
    margin-top: 295px;
  }
}
/* Contenedor de cards */
#mobileCardsContainer {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
}

/* Card de alumno */
.alumno-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  border-left: 4px solid #28a745;
}

.alumno-card.estado-inactivo {
  border-left-color: #dc3545;
  opacity: 0.8;
}

/* Header de la card */
.alumno-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-bottom: 1px solid #eee;
}

.alumno-info-principal {
  flex: 1;
}

.alumno-nombre {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  margin: 0 0 5px 0;
}

.alumno-acudiente {
  font-size: 13px;
  color: #666;
  display: flex;
  align-items: center;
  gap: 5px;
}

.alumno-id {
  background: #28a745;
  color: #fff;
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
}

.alumno-card.estado-inactivo .alumno-id {
  background: #dc3545;
}
.alumno-card-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.mobile-transfer-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  cursor: pointer;
  margin: 0;
}

.mobile-transfer-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #ff6b35;
}

.mobile-transfer-check > span {
  display: none;
}


/* Body de la card */
.alumno-card-body {
  padding: 15px;
}

.alumno-datos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.dato-item {
  display: flex;
  flex-direction: column;
}

.dato-label {
  font-size: 11px;
  color: #999;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 3px;
}

.dato-valor {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

.dato-valor.tarifa {
  color: #28a745;
  font-weight: 700;
  font-size: 16px;
}

.alumno-info-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alumno-info-line {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.dato-compact {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f7f9fc;
  border: 1px solid #e8edf3;
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 13px;
  color: #334155;
  font-weight: 600;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dato-compact i {
  color: #64748b;
  flex-shrink: 0;
}

.dato-compact.tarifa {
  color: #17803d;
  border-color: #d4f2df;
  background: #f3fcf6;
}

@media (max-width: 420px) {
  .dato-compact {
    font-size: 12px;
    padding: 6px 8px;
  }
}
/* Info de rutas */
.alumno-rutas {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #ddd;
}

.ruta-badge {
  flex: 1;
  text-align: center;
  padding: 8px;
  border-radius: 8px;
  font-size: 12px;
}

.ruta-badge.recogida {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  color: #155724;
}

.ruta-badge.entrega {
  background: linear-gradient(135deg, #cce5ff 0%, #b8daff 100%);
  color: #004085;
}

.ruta-badge .ruta-tipo {
  display: block;
  font-size: 10px;
  opacity: 0.8;
  margin-bottom: 2px;
}

.ruta-badge .ruta-num {
  font-weight: 700;
  font-size: 14px;
}

/* Footer de la card - botones */
.alumno-card-footer {
  display: flex;
  border-top: 1px solid #eee;
}

.alumno-card-footer .btn-card {
  flex: 1;
  padding: 14px;
  border: none;
  background: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.alumno-card-footer .btn-card:not(:last-child) {
  border-right: 1px solid #eee;
}

.alumno-card-footer .btn-card.btn-pagos {
  color: #28a745;
}

.alumno-card-footer .btn-card.btn-pagos:hover,
.alumno-card-footer .btn-card.btn-pagos:active {
  background: #28a745;
  color: #fff;
}

.alumno-card-footer .btn-card.btn-editar {
  color: #007bff;
}

.alumno-card-footer .btn-card.btn-editar:hover,
.alumno-card-footer .btn-card.btn-editar:active {
  background: #007bff;
  color: #fff;
}

.alumno-card-footer .btn-card.btn-eliminar {
  color: #dc3545;
}

.alumno-card-footer .btn-card.btn-eliminar:hover,
.alumno-card-footer .btn-card.btn-eliminar:active {
  background: #dc3545;
  color: #fff;
}

/* Paginación móvil */
.mobile-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 10px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 80px; /* Espacio para FAB */
}

.mobile-page-btn {
  background: #28a745;
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.mobile-page-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.mobile-page-btn:not(:disabled):hover {
  background: #218838;
  transform: scale(1.02);
}

#mobilePageInfo {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

/* Loading spinner */
.mobile-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #666;
}

.mobile-loading .spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #28a745;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Estado vacío */
.mobile-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}

.mobile-empty-state i {
  font-size: 60px;
  opacity: 0.3;
  margin-bottom: 15px;
}

.mobile-empty-state p {
  font-size: 16px;
  margin: 0;
}

/* Efecto de toque en cards */
.alumno-card:active {
  transform: scale(0.98);
}

.alumno-card-footer .btn-card:active {
  transform: scale(0.95);
}

/* Indicador de estado en el header de la card */
.alumno-card.estado-inactivo .alumno-card-header {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
}

.alumno-card.estado-inactivo .alumno-nombre {
  color: #721c24;
}

/* Animación de entrada para las cards */
@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alumno-card {
  animation: cardFadeIn 0.3s ease forwards;
}

.alumno-card:nth-child(1) { animation-delay: 0.05s; }
.alumno-card:nth-child(2) { animation-delay: 0.1s; }
.alumno-card:nth-child(3) { animation-delay: 0.15s; }
.alumno-card:nth-child(4) { animation-delay: 0.2s; }
.alumno-card:nth-child(5) { animation-delay: 0.25s; }
.alumno-card:nth-child(6) { animation-delay: 0.3s; }
.alumno-card:nth-child(7) { animation-delay: 0.35s; }
.alumno-card:nth-child(8) { animation-delay: 0.4s; }
.alumno-card:nth-child(9) { animation-delay: 0.45s; }
.alumno-card:nth-child(10) { animation-delay: 0.5s; }

/* Mejoras para pantallas pequeñas */
@media (max-width: 400px) {
  .alumno-datos-grid {
    grid-template-columns: 1fr;
  }

  .alumno-rutas {
    flex-direction: column;
  }

  .ruta-badge {
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .alumno-card-footer .btn-card {
    padding: 12px 8px;
    font-size: 12px;
  }

  .alumno-card-footer .btn-card i {
    display: none;
  }
}

/* Asegurar que el contenedor móvil tenga margen inferior para el FAB */
#mobile-view {
  width: 100%;
  padding: 0 15px;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Prevenir pull-to-refresh sin bloquear scroll */
@media (max-width: 768px) {
  body {
    overscroll-behavior-y: contain;
  }
}

/* Skeleton loading para cards */
.alumno-card.skeleton {
  background: #f8f9fa;
}

.alumno-card.skeleton .skeleton-line {
  background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (max-width: 480px) {
  /* Pantallas muy pequeñas */
  body {
    font-size: 13px;
  }

  #total_ingresos .resultado {
    font-size: 24px;
  }

  .total-colegio h3 {
    font-size: 12px;
  }

  .total-colegio p {
    font-size: 11px;
    margin: 3px 0;
  }

  /* Ocultar más columnas */
  #mirutaList th:nth-child(5),
  #mirutaList td:nth-child(5),
  #mirutaList th:nth-child(6),
  #mirutaList td:nth-child(6) {
    display: none;
  }

  #mirutaList .btn {
    padding: 4px 6px;
    font-size: 10px;
  }

  /* FAB más pequeño */
  .fab-main {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }

  .fab-option {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  /* Mapa aún más pequeño */
  #map {
    height: 180px;
  }

  /* Modal header */
  .modal-header {
    padding: 10px 15px;
  }

  .modal-title {
    font-size: 16px;
  }
}

/* =========================================
   NAVEGACION PRINCIPAL (USUARIOS / PAGOS)
   ========================================= */

.nav-principal {
  display: inline-flex;
  gap: 5px;
  margin-right: 10px;
  background: rgba(0, 0, 0, 0.1);
  padding: 4px;
  border-radius: 8px;
}

.btn-nav {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
  background: transparent;
  color: #666;
  cursor: pointer;
}

.btn-nav:hover {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
}

.btn-nav.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.btn-nav i {
  margin-right: 5px;
}

.nav-separator {
  color: #ddd;
  margin: 0 10px;
  font-weight: 300;
}

/* Botones deshabilitados cuando no aplican */
.btn-usuario-action.disabled-nav,
.mobile-usuario-action.disabled-nav {
  opacity: 0.4 !important;
  pointer-events: none !important;
  cursor: not-allowed !important;
}

/* Navegacion movil */
.mobile-nav-principal {
  display: flex;
  gap: 10px;
  margin-bottom: 6px;
  width: 88%;
  max-width: 340px;
}

.btn-nav-mobile {
  flex: 1;
  padding: 11px 12px;
  border: 1px solid #cfd6df;
  border-radius: 10px;
  background: #ffffff;
  color: #5b6673;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-nav-mobile:hover {
  background: #f8fafc;
  color: #2f3a45;
}

.btn-nav-mobile.active {
  background: #e8eefc;
  color: #4457c8;
  border-color: #bfd0fb;
}

.btn-nav-mobile i {
  font-size: 1.1em;
}

/* FAB oculto cuando esta en pagos */
.fab-container.hidden-fab {
  display: none !important;
}

/* Responsive para navegacion */
@media (max-width: 992px) {
  .nav-principal {
    display: none;
  }

  .nav-separator {
    display: none;
  }
}

@media (min-width: 993px) {
  .mobile-nav-principal {
    display: none;
  }
}

/* =========================================
   RESUMEN DE PAGOS DEL MES
   ========================================= */

.resumen-pagos-container {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  padding: 20px;
  margin: 15px auto;
  width: 95%;
  max-width: 1400px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.resumen-pagos-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.resumen-pagos-header h3 {
  color: #fff;
  margin: 0;
  font-size: 1.4em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.resumen-pagos-header h3 i {
  font-size: 1.2em;
}

.mes-selector {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mes-selector select {
  padding: 8px 15px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.95);
  cursor: pointer;
}

.btn-actualizar-pagos {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid white;
  color: #fff;
  padding: 8px 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-actualizar-pagos:hover {
  background: white;
  color: #667eea;
}

.resumen-pagos-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-card .stat-icon {
  font-size: 28px;
  margin-bottom: 8px;
  display: block;
}

.stat-card .stat-value {
  font-size: 1.8em;
  font-weight: 700;
  color: #fff;
  display: block;
}

.stat-card .stat-label {
  font-size: 0.85em;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: bold;
}

.stat-card.recaudado .stat-icon { color: #2ecc71; }
.stat-card.pendiente .stat-icon { color: #f39c12; }
.stat-card.pagados .stat-icon { color: #3498db; }
.stat-card.no-pagados .stat-icon { color: #e74c3c; }

.resumen-pagos-toggle {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 15px;
}

.toggle-btn {
  padding: 10px 25px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggle-btn.active {
  transform: scale(1.05);
}

.toggle-btn.pagados-btn {
  background: rgba(46, 204, 113, 0.3);
  color: #fff;
}

.toggle-btn.pagados-btn.active {
  background: #2ecc71;
  color: #fff;
}

.toggle-btn.pendientes-btn {
  background: rgba(231, 76, 60, 0.3);
  color: #fff;
}

.toggle-btn.pendientes-btn.active {
  background: #e74c3c;
  color: #fff;
}

.resumen-pagos-lista {
  background: white;
  border-radius: 10px;
  max-height: 400px;
  overflow-y: auto;
}

.lista-alumnos-pago {
  padding: 0;
  margin: 0;
  list-style: none;
}

.alumno-pago-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
  transition: background 0.2s;
}

.alumno-pago-item:hover {
  background: #f8f9fa;
}

.alumno-pago-item:last-child {
  border-bottom: none;
}

.alumno-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.alumno-status-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.alumno-status-icon.pagado {
  background: #d4edda;
  color: #28a745;
}

.alumno-status-icon.pendiente {
  background: #f8d7da;
  color: #dc3545;
}

.alumno-datos {
  flex: 1;
  min-width: 0;
}

.alumno-datos .nombre {
  font-weight: 600;
  color: #333;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alumno-datos .acudiente {
  font-size: 0.85em;
  color: #666;
  display: block;
}

.alumno-datos .colegio-jornada {
  font-size: 0.75em;
  color: #999;
}

.alumno-tarifa {
  font-weight: 600;
  color: #333;
  text-align: right;
  min-width: 80px;
}

.alumno-tarifa .fecha-pago {
  font-size: 0.75em;
  color: #28a745;
  display: block;
}

.alumno-tarifa .descuento-badge {
  font-size: 0.7em;
  color: #856404;
  background-color: #fff3cd;
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 5px;
  display: inline-block;
}

.alumno-acciones {
  display: flex;
  gap: 8px;
  margin-left: 10px;
}

.btn-recordar {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  border: none;
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}

.btn-recordar:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.btn-recordar i {
  font-size: 14px;
}

.lista-vacia {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

.lista-vacia i {
  font-size: 48px;
  margin-bottom: 15px;
  opacity: 0.5;
}

/* Scrollbar personalizado para la lista */
.resumen-pagos-lista::-webkit-scrollbar {
  width: 8px;
}

.resumen-pagos-lista::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.resumen-pagos-lista::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 10px;
}

.resumen-pagos-lista::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

/* Modal recordatorio de pago */
.recordatorio-preview {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
}

.recordatorio-preview p {
  margin: 5px 0;
}

.recordatorio-opciones {
  margin: 15px 0;
}

.recordatorio-opciones .checkbox {
  margin: 10px 0;
}

.btn-whatsapp-recordar {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  border: none;
  color: #fff;
}

.btn-whatsapp-recordar:hover {
  background: linear-gradient(135deg, #128c7e 0%, #075e54 100%);
  color: #fff;
}

/* Responsive para resumen de pagos */
@media (max-width: 768px) {
  .resumen-pagos-container {
    padding: 15px;
    margin: 10px;
    width: calc(100% - 20px);
  }

  .resumen-pagos-header {
    flex-direction: column;
    text-align: center;
  }

  .resumen-pagos-header h3 {
    font-size: 1.2em;
  }

  .mes-selector {
    width: 100%;
    justify-content: center;
  }

  .resumen-pagos-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .stat-card {
    padding: 12px;
  }

  .stat-card .stat-value {
    font-size: 1.4em;
  }

  .toggle-btn {
    padding: 8px 15px;
    font-size: 13px;
  }

  .alumno-pago-item {
    flex-wrap: wrap;
    gap: 10px;
  }

  .alumno-info {
    width: 100%;
  }

  .alumno-tarifa {
    text-align: left;
  }

  .alumno-acciones {
    width: 100%;
    justify-content: flex-end;
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  .resumen-pagos-stats {
    grid-template-columns: 1fr 1fr;
  }

  .stat-card .stat-icon {
    font-size: 22px;
  }

  .stat-card .stat-value {
    font-size: 1.2em;
  }

  .stat-card .stat-label {
    font-size: 0.75em;
  }
}

/* =====================================================
   ESTILOS MODAL CONFIRMAR PAGO
   ===================================================== */

#confirmarPagoModal .modal-dialog {
  width: 350px;
  max-width: 95%;
}

#confirmarPagoModal .confirmar-pago-header {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: #fff;
  border-bottom: none;
  padding: 15px 20px;
}

#confirmarPagoModal .confirmar-pago-header .modal-title {
  font-size: 18px;
  font-weight: 600;
}

#confirmarPagoModal .confirmar-pago-body {
  padding: 20px;
}

/* Forzar layout vertical en todo el formulario */
#confirmarPagoModal .confirmar-pago-body .form-group {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
}

#confirmarPagoModal .confirmar-pago-body .form-group > * {
  width: 100% !important;
  flex-shrink: 0;
}

#confirmarPagoModal .confirmar-pago-mes {
  background: #f8f9fa;
  padding: 12px 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
  border-left: 4px solid #28a745;
}

#confirmarPagoModal .confirmar-pago-mes span {
  display: block;
  font-size: 12px;
  color: #666;
  margin-bottom: 3px;
}

#confirmarPagoModal .confirmar-pago-mes strong {
  font-size: 18px;
  color: #28a745;
}

#confirmarPagoModal .form-group {
  margin-bottom: 20px !important;
  display: block !important;
  clear: both !important;
}

#confirmarPagoModal .form-group::after {
  content: "";
  display: table;
  clear: both;
}

#confirmarPagoModal .form-group > label {
  display: block !important;
  width: 100% !important;
  font-weight: 600 !important;
  color: #495057 !important;
  margin-bottom: 10px !important;
  font-size: 13px !important;
  float: none !important;
  clear: both !important;
  text-align: left !important;
  padding: 0 !important;
}

#confirmarPagoModal .form-group > label i {
  margin-right: 6px;
  color: #28a745;
  vertical-align: middle;
}

#confirmarPagoModal .form-control {
  display: block !important;
  width: 100% !important;
  height: 42px !important;
  font-size: 14px !important;
  border-radius: 4px !important;
  float: none !important;
  clear: both !important;
}

#confirmarPagoModal .form-control:focus {
  border-color: #28a745 !important;
  box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2) !important;
}

#confirmarPagoModal .input-group {
  width: 100% !important;
  display: table !important;
  border-collapse: separate;
  clear: both !important;
}

#confirmarPagoModal .input-group .form-control {
  display: table-cell !important;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  float: none !important;
}

#confirmarPagoModal .input-group .input-group-addon {
  display: table-cell !important;
  width: 1% !important;
  padding: 8px 15px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #fff !important;
  background: #28a745 !important;
  border: 1px solid #28a745 !important;
  border-radius: 0 4px 4px 0 !important;
  vertical-align: middle !important;
}

/* Clase personalizada para campos del formulario - evita conflictos con Bootstrap */
#confirmarPagoModal .pago-campo {
  margin-bottom: 20px;
  display: block;
}

#confirmarPagoModal .pago-campo > label {
  display: block;
  width: 100%;
  font-weight: 600;
  color: #495057;
  margin-bottom: 10px;
  font-size: 13px;
}

#confirmarPagoModal .pago-campo > label i {
  margin-right: 6px;
  color: #28a745;
}

#confirmarPagoModal .pago-campo .form-control {
  display: block;
  width: 100%;
  height: 42px;
  font-size: 14px;
  border-radius: 4px;
  border: 1px solid #ccc;
  padding: 6px 12px;
  box-sizing: border-box;
}

#confirmarPagoModal .pago-campo .form-control:focus {
  border-color: #28a745;
  box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
  outline: none;
}

#confirmarPagoModal .pago-campo .input-group {
  width: 100%;
  display: table;
  border-collapse: separate;
}

#confirmarPagoModal .pago-campo .input-group .form-control {
  display: table-cell;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

#confirmarPagoModal .pago-campo .input-group .input-group-addon {
  display: table-cell;
  width: 1%;
  padding: 8px 15px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: #28a745;
  border: 1px solid #28a745;
  border-radius: 0 4px 4px 0;
  vertical-align: middle;
}

#confirmarPagoModal .pago-campo > small {
  display: block;
  width: 100%;
  margin-top: 10px;
  font-size: 11px;
  color: #888;
  line-height: 1.5;
}

/* Checkbox personalizado */
#confirmarPagoModal .checkbox-custom {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #f8f9fa;
  border-radius: 6px;
  cursor: pointer;
}

#confirmarPagoModal .checkbox-custom input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

#confirmarPagoModal .checkbox-custom label {
  margin: 0 !important;
  font-weight: 500 !important;
  font-size: 13px;
  color: #495057;
  cursor: pointer;
}

#confirmarPagoModal .checkbox-custom label i {
  color: #25D366;
  margin-right: 5px;
}

#confirmarPagoModal .modal-footer {
  border-top: 1px solid #eee;
  padding: 15px 20px;
}

#confirmarPagoModal .modal-footer .btn-success {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  border: none;
}

#confirmarPagoModal .modal-footer .btn-success:hover {
  background: linear-gradient(135deg, #218838 0%, #1aa179 100%);
}

/* =====================================================
   BOTON PERFIL
   ===================================================== */
.btn-perfil {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  border: none !important;
  color: white !important;
  cursor: pointer !important;
  opacity: 1 !important;
}

.btn-perfil:hover {
  background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%) !important;
  color: white !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

/* =====================================================
   ESTILOS MODAL PERFIL
   ===================================================== */

#perfilModal .modal-dialog {
  width: 700px;
  max-width: 95%;
}

/* =====================================================
   MODAL PERFIL
   Usa clases pf-* propias para evitar conflictos con BS3
   ===================================================== */

/* Header */
.perfil-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: #fff !important;
  border-bottom: none !important;
}
.perfil-header .modal-title { color: #fff; font-weight: 600; }
.perfil-header .close { color: #fff; opacity: .8; text-shadow: none; }
.perfil-header .close:hover { opacity: 1; }

/* Body */
.perfil-body {
  padding: 20px !important;
  max-height: 74vh;
  overflow-y: auto;
  overflow-x: hidden !important;
}

/* ---- Identidad: foto + placa ---- */
.pf-identidad {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 18px;
  background: linear-gradient(135deg, #f6f8ff 0%, #eef2ff 100%);
  border: 1px solid #dfe6fb;
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 4px 12px rgba(102,126,234,0.08);
  margin-bottom: 20px;
}
.pf-foto-bloque {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.pf-foto {
  position: relative;
  width: 98px; height: 98px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #667eea;
  box-shadow: 0 6px 16px rgba(102,126,234,0.25);
}
.pf-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-foto-btn {
  position: static;
  transform: none;
  background: linear-gradient(135deg, #5c72e8 0%, #6e47a6 100%);
  color: #fff;
  font-size: 11px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 2px solid #fff;
  text-align: center;
  cursor: pointer;
  margin: 0;
  transition: .2s;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(92,114,232,0.35);
}
.pf-foto-btn:hover {
  background: linear-gradient(135deg, #4e63d4 0%, #613a98 100%);
  color: #fff;
}
.pf-placa {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 98px;
  gap: 8px;
}
.pf-placa-tag {
  background: #dfe5ff;
  color: #4357c9;
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  line-height: 1;
}
.pf-placa-num {
  background: #fff;
  color: #253053;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 2.4px;
  line-height: 1;
  padding: 10px 16px;
  border: 2px solid #5f74e6;
  border-radius: 10px;
  min-width: 165px;
  text-align: center;
  box-shadow: 0 3px 8px rgba(95,116,230,0.16);
}

/* ---- Cards (secciones) ---- */
.pf-card {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 16px;
}
.pf-card:last-of-type { margin-bottom: 0; }
.pf-card-security {
  background: #fef7f7;
  border-color: #f5c6cb;
}

/* Titulos */
.pf-card-title {
  font-weight: 700; font-size: 11px;
  text-transform: uppercase; letter-spacing: 1px;
  margin: 0 0 14px; padding-bottom: 8px;
  border-bottom: 1px solid #dee2e6;
}
.pf-card-title i { margin-right: 5px; }
.pf-blue  { color: #667eea; border-bottom-color: #c8d4fa; }
.pf-orange { color: #e67e22; border-bottom-color: #fce0c2; }
.pf-red   { color: #dc3545; border-bottom-color: #f5c6cb; }

/* ---- Grid propio (flexbox, NO Bootstrap) ---- */
.pf-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.pf-grid-2 > .pf-field { flex: 1 1 calc(50% - 7px); min-width: 200px; }
.pf-grid-3 > .pf-field { flex: 1 1 calc(33.33% - 10px); min-width: 160px; }

/* ---- Campos ---- */
.pf-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}
.pf-field > label {
  display: block !important;
  width: 100% !important;
  float: none !important;
  font-weight: 600;
  font-size: 12px;
  color: #555;
  margin-bottom: 5px !important;
  padding: 0;
  line-height: 1.4;
  max-width: none !important;
}
.pf-field > label i {
  margin-right: 4px;
  font-size: 12px;
}
.pf-blue ~ .pf-grid label i { color: #667eea; }
.pf-orange ~ .pf-grid label i { color: #e67e22; }
.pf-red ~ .pf-grid label i { color: #dc3545; }

.pf-field > input,
.pf-field > select,
.pf-input-btn > input {
  display: block !important;
  width: 100% !important;
  height: 38px;
  padding: 6px 10px;
  font-size: 14px;
  color: #333;
  background: #fff;
  border: 1px solid #ced4da;
  border-radius: 6px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
  -webkit-appearance: none;
  -moz-appearance: none;                                                                                
  appearance: none;
}
.pf-field > input:focus,
.pf-field > select:focus,
.pf-input-btn > input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102,126,234,.15);
}
.pf-field > small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  min-height: 14px;
}

/* Input + boton (password toggle) */
.pf-input-btn {
  display: flex;
}
.pf-input-btn > input {
  border-radius: 6px 0 0 6px !important;
  flex: 1;
}
.pf-input-btn > button {
  height: 38px;
  padding: 0 12px;
  border: 1px solid #ced4da;
  border-left: none;
  border-radius: 0 6px 6px 0;
  background: #f8f9fa;
  cursor: pointer;
  color: #555;
  font-size: 14px;
  outline: none;
}
.pf-input-btn > button:hover { background: #e9ecef; }

/* Hint */
.pf-hint {
  font-size: 11px; color: #888;
  margin: 8px 0 0; padding: 0;
}

/* Status colores */
#perfilModal .text-danger { color: #dc3545 !important; font-weight: 600; }
#perfilModal .text-warning { color: #e6a800 !important; font-weight: 600; }

/* Footer */
.perfil-footer { border-top: 1px solid #eee; text-align: right; }
.perfil-footer .btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none; font-weight: 600; color: #fff;
}
.perfil-footer .btn-primary:hover {
  background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
}

/* Responsive */
@media (max-width: 768px) {
  #perfilModal {
    padding: 0 !important;
    overflow: hidden !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }

  #perfilModal .modal-dialog {
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none !important;
  }

  #perfilModal .modal-content {
    border-radius: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  #perfilModal .perfil-header {
    flex-shrink: 0;
  }

  #perfilModal .perfil-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 15px !important;
    min-height: 0;
  }

  #perfilModal .perfil-footer {
    flex-shrink: 0;
    padding: 10px 12px;
    display: flex;
    gap: 8px;
  }

  #perfilModal .perfil-footer .btn {
    flex: 1;
    justify-content: center;
    padding: 10px 8px;
    font-size: 13px;
  }

  .pf-identidad { flex-direction: column; text-align: center; }
  .pf-placa { justify-content: center; }
  .pf-grid-2 > .pf-field,
  .pf-grid-3 > .pf-field { flex: 1 1 100%; min-width: 0; }
  .pf-card { padding: 14px; }
}

/* =====================================================
   NUEVO DISEÑO ESTILO ADMIN - HEADER, STATS, TOOLBAR
   ===================================================== */

/* Variables de colores */
:root {
    --main-primary: #28a745;
    --main-secondary: #218838;
    --main-accent: #20c997;
    --main-dark: #1e7e34;
    --main-light: #f8f9fa;
    --main-gradient: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

/* =====================================================
   HEADER PRINCIPAL DESKTOP - TEMA CLARO
   ===================================================== */
.main-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 15px 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border-bottom: 2px solid #FAAF41;
}

.main-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.main-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.main-logo img {
    height: 35px;
}

.main-title {
    color: #2c3e50;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.main-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.main-user {
    color: #495057;
    font-size: 14px;
    font-weight: 500;
}

.main-user i {
    margin-right: 5px;
    color: #FAAF41;
}

.main-badge {
    background: linear-gradient(135deg, #FAAF41 0%, #f39c12 100%);
    color: #1a1a1a;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(250,175,65,0.3);
}

.main-badge i {
    margin-right: 5px;
}

/* Plan Badge */
.plan-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

.plan-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: planShimmer 3s ease-in-out infinite;
}

@keyframes planShimmer {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

.plan-badge i {
    font-size: 11px;
}

/* Basico - Gris elegante */
.plan-badge-basico {
    background: linear-gradient(135deg, #636e72 0%, #95a5a6 100%);
    border: 1px solid rgba(255,255,255,0.15);
}

/* Standard - Naranja vibrante */
.plan-badge-standard {
    background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 2px 10px rgba(243,156,18,0.35);
}

/* Premium - Dorado brillante */
.plan-badge-premium {
    background: linear-gradient(135deg, #f9a825 0%, #ffd54f 50%, #f9a825 100%);
    color: #5d4037;
    text-shadow: 0 1px 1px rgba(255,255,255,0.3);
    border: 1px solid rgba(255,215,0,0.4);
    box-shadow: 0 2px 12px rgba(249,168,37,0.4);
}

.plan-badge-premium i {
    color: #bf360c;
}

.main-header .btn {
    padding: 8px 15px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s;
}

.main-header .btn-info {
    background: #FAAF41;
    border: 1px solid #e9a03a;
    color: #2c3e50;
    font-weight: 600;
}

.main-header .btn-info:hover {
    background: #f5a030;
    border-color: #e9a03a;
    color: #1a252f;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(250,175,65,0.3);
}

.main-header .btn-danger {
    background: #fff;
    border: 1px solid #e74c3c;
    color: #e74c3c;
}

.main-header .btn-danger:hover {
    background: #e74c3c;
    border-color: #c0392b;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(231,76,60,0.3);
}

/* =====================================================
   CONTENEDOR PRINCIPAL
   ===================================================== */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 20px 20px;
}

/* =====================================================
   ESTADISTICAS - TARJETAS CON SOMBRA
   ===================================================== */
.main-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.main-stats .stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
}

.main-stats .stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.12);
}

.main-stats .stat-icon {
    width: 55px;
    height: 55px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    flex-shrink: 0;
}

.main-stats .stat-total .stat-icon { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.main-stats .stat-active .stat-icon { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.main-stats .stat-schools .stat-icon { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.main-stats .stat-routes .stat-icon { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.main-stats .stat-income .stat-icon { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }

.main-stats .stat-info {
    display: flex;
    flex-direction: column;
}

.main-stats .stat-number {
    font-size: 26px;
    font-weight: 700;
    color: #1a252f;
    line-height: 1;
}

.main-stats .stat-label {
    font-size: 13px;
    color: #7f8c8d;
    margin-top: 5px;
    text-transform: none;
    letter-spacing: 0;
    opacity: 1;
}

/* =====================================================
   TOOLBAR
   ===================================================== */
.main-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    flex-wrap: wrap;
    gap: 15px;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.main-toolbar .nav-principal {
    margin-right: 0;
    background: rgba(0, 0, 0, 0.05);
}

.main-toolbar .btn {
    padding: 8px 16px;
    font-weight: 500;
    border-radius: 6px;
    font-size: 13px;
}

.main-toolbar .btn i {
    margin-right: 5px;
}

.main-toolbar .btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
}

.main-toolbar .btn-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1aa179 100%);
}

.main-toolbar .btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%);
    border: none;
}

.main-toolbar .btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #6610f2 100%);
    border: none;
}

.main-toolbar .btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    border: none;
    color: #fff;
}

/* =====================================================
   CONTENEDOR DE TABLA
   ===================================================== */
.main-table-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    width: 95%;
    max-width: 1400px;
    margin: 0 auto 20px;
    overflow-x: auto;
    box-sizing: border-box;
}

.main-table-container #mirutaList {
    width: 100% !important;
}

.main-table-container #mirutaList thead th {
    background: #f8f9fa;
    color: #1a252f;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
    padding: 12px 10px;
}

.main-table-container #mirutaList tbody td {
    padding: 12px 10px;
    vertical-align: middle;
}

.main-table-container #mirutaList tbody tr:hover {
    background-color: #f8f9fa;
}

/* =====================================================
   RESUMEN POR COLEGIOS - TARJETAS
   ===================================================== */
.colegios-resumen {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin: 0 auto 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    width: 95%;
    max-width: 1400px;
}

.colegios-titulo {
    margin: 0 0 20px 0;
    color: #1a252f;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.colegios-titulo i {
    color: #667eea;
}

.colegios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}

.colegio-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e9ecef;
}

.colegio-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.colegio-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.colegio-card-header i {
    font-size: 18px;
}

.colegio-nombre {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.colegio-card-body {
    padding: 15px;
}

.colegio-dato {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.colegio-dato i {
    color: #667eea;
    width: 16px;
}

.colegio-total {
    font-size: 22px;
    font-weight: 700;
    color: #28a745;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #ddd;
}

/* =====================================================
   ALERTA DE RUTAS - NUEVO ESTILO
   ===================================================== */
.alert-rutas-container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto 20px;
}

.alert-rutas-new {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
    border: 1px solid #ffc107;
    border-radius: 12px;
    padding: 15px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.alert-rutas-new i.bi-exclamation-triangle-fill {
    font-size: 24px;
    color: #856404;
}

.alert-rutas-new span {
    flex: 1;
    color: #856404;
}

.alert-rutas-new .btn {
    white-space: nowrap;
}

/* =====================================================
   ANIMACIONES
   ===================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-stats .stat-card {
    animation: fadeInUp 0.3s ease-out;
}

.main-stats .stat-card:nth-child(1) { animation-delay: 0.05s; }
.main-stats .stat-card:nth-child(2) { animation-delay: 0.1s; }
.main-stats .stat-card:nth-child(3) { animation-delay: 0.15s; }
.main-stats .stat-card:nth-child(4) { animation-delay: 0.2s; }
.main-stats .stat-card:nth-child(5) { animation-delay: 0.25s; }

.colegio-card {
    animation: fadeInUp 0.3s ease-out;
}

/* =====================================================
   RESPONSIVE PARA NUEVO DISEÑO
   ===================================================== */
@media (max-width: 992px) {
    .main-header-content {
        flex-direction: column;
        gap: 10px;
    }

    .main-title {
        font-size: 16px;
    }

    .main-container {
        padding: 100px 15px 20px;
    }

    .main-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .main-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-left,
    .toolbar-right {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .main-header,
    .main-container,
    .colegios-resumen,
    .main-table-container {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .main-stats {
        grid-template-columns: 1fr;
    }

    .main-stats .stat-card {
        padding: 15px;
    }

    .main-stats .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .main-stats .stat-number {
        font-size: 22px;
    }

    .colegios-grid {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   DATATABLES OVERRIDE PARA NUEVO DISEÑO
   ===================================================== */
.main-table-container .dataTables_wrapper .dataTables_length,
.main-table-container .dataTables_wrapper .dataTables_filter {
    margin-bottom: 15px;
}

.main-table-container .dataTables_wrapper .dataTables_length select,
.main-table-container .dataTables_wrapper .dataTables_filter input {
    border-radius: 6px;
    border: 1px solid #ddd;
    padding: 6px 12px;
}

.main-table-container .dataTables_wrapper .dataTables_filter input:focus {
    border-color: #28a745;
    outline: none;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
}

.main-table-container .dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 6px !important;
    margin: 0 3px;
}

.main-table-container .dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #28a745 !important;
    border-color: #28a745 !important;
    color: white !important;
}

.main-table-container .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #f8f9fa !important;
    border-color: #ddd !important;
}

.main-table-container .dataTables_wrapper .dataTables_info {
    color: #7f8c8d;
    font-size: 13px;
}

/* =====================================================
   MODAL USUARIO - ESTILO MEJORADO
   ===================================================== */

/* Contenedor del modal */
#mirutaModal .modal-dialog {
    width: 900px;
    max-width: 95%;
}

#mirutaModal .modal-content.modal-usuario {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

/* Header del modal */
#mirutaModal .modal-header-usuario {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
    border-bottom: none;
    padding: 18px 25px;
}

#mirutaModal .modal-header-usuario .modal-title {
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

#mirutaModal .modal-header-usuario .modal-title i {
    font-size: 24px;
}

#mirutaModal .modal-header-usuario .close {
    font-size: 28px;
    text-shadow: none;
    margin-top: -5px;
}

/* Body del modal */
#mirutaModal .modal-body {
    padding: 20px 25px;
    background: #f8f9fa;
}

/* Alerta de archivados */
#mirutaModal .alert-archivados {
    background: linear-gradient(135deg, #cce5ff 0%, #b8daff 100%);
    border: 1px solid #007bff;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

#mirutaModal .alert-archivados:hover {
    background: linear-gradient(135deg, #b8daff 0%, #9ec5fe 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.2);
}

#mirutaModal .alert-archivados i {
    font-size: 24px;
    color: #0056b3;
}

#mirutaModal .alert-archivados span {
    color: #004085;
    font-size: 14px;
}

/* Panel group */
#mirutaModal .panel-usuario {
    margin-bottom: 0;
}

/* Paneles estilizados */
#mirutaModal .panel-styled {
    border: none;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

#mirutaModal .panel-styled .panel-heading {
    padding: 0;
    border: none;
}

#mirutaModal .panel-styled .panel-title a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s;
}

#mirutaModal .panel-styled .panel-title a i:first-child {
    font-size: 20px;
    margin-right: 12px;
}

#mirutaModal .panel-styled .panel-title .panel-chevron {
    margin-left: auto;
    transition: transform 0.3s;
}

#mirutaModal .panel-styled .panel-title a.collapsed .panel-chevron {
    transform: rotate(-90deg);
}

/* Colores de los paneles */
#mirutaModal .panel-ubicacion {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

#mirutaModal .panel-personal {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

#mirutaModal .panel-colegio {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

#mirutaModal .panel-rutas {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Panel body */
#mirutaModal .panel-styled .panel-body {
    padding: 20px;
    background: white;
}

/* Ajustes combo.select en modal Nueva Ruta */
#nrutaModal .campo-nueva-ruta {
    overflow: visible;
}

#nrutaModal .combo-select {
    width: 100% !important;
    max-width: 100% !important;
    float: none;
    margin-right: 0;
    margin-bottom: 0;
    box-sizing: border-box;
}

#nrutaModal .combo-select .combo-input {
    width: 100%;
}

#nrutaModal .combo-dropdown {
    width: 100%;
    max-width: 100%;
    z-index: 1065;
    box-sizing: border-box;
}
/* Grid de campos */
#mirutaModal .campos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

#mirutaModal .campos-grid:last-child {
    margin-bottom: 0;
}

#mirutaModal .campo-grupo {
    display: flex;
    flex-direction: column;
}

#mirutaModal .campo-grupo.campo-largo {
    grid-column: span 2;
}

#mirutaModal .campo-grupo > label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 13px;
}

#mirutaModal .campo-grupo > label i {
    color: #667eea;
    font-size: 16px;
}

#mirutaModal .campo-grupo .form-control {
    height: 42px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 14px;
    transition: all 0.2s;
}

#mirutaModal .campo-grupo .form-control:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.15);
}

#mirutaModal .campo-grupo select.form-control {
    cursor: pointer;
}

/* Mapa */
#mirutaModal #map {
    height: 250px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 2px solid #e9ecef;
}

/* Separador de rutas */
#mirutaModal .rutas-separator {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 10px 15px;
    border-radius: 8px;
    margin: 20px 0 15px;
    border-left: 4px solid #4facfe;
}

#mirutaModal .rutas-separator span {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #495057;
    font-size: 13px;
}

#mirutaModal .rutas-separator i {
    color: #4facfe;
    font-size: 18px;
}

/* Footer del modal */
#mirutaModal .modal-footer-usuario,
#nrutaModal .modal-footer-usuario {
    background: white;
    border-top: 1px solid #e9ecef;
    padding: 15px 25px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

#mirutaModal .modal-footer-usuario .btn,
#nrutaModal .modal-footer-usuario .btn {
    padding: 10px 25px;
    font-weight: 600;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#mirutaModal .modal-footer-usuario .btn-default,
#nrutaModal .modal-footer-usuario .btn-default {
    background: #f8f9fa;
    border: 1px solid #ddd;
    color: #495057;
}

#mirutaModal .modal-footer-usuario .btn-default:hover,
#nrutaModal .modal-footer-usuario .btn-default:hover {
    background: #e9ecef;
}

#mirutaModal .modal-footer-usuario .btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    color: #fff;
}

#nrutaModal .modal-footer-usuario .btn-success {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
}

#mirutaModal .modal-footer-usuario .btn-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1aa179 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

#nrutaModal .modal-footer-usuario .btn-success:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Scrollbar del modal */
#mirutaModal .modal-body::-webkit-scrollbar {
    width: 8px;
}

#mirutaModal .modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#mirutaModal .modal-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

#mirutaModal .modal-body::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Responsive para modal usuario */
@media (max-width: 768px) {
    #mirutaModal,
    #nrutaModal {
        padding: 0 !important;
        overflow: hidden !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }

    #mirutaModal .modal-dialog,
    #nrutaModal .modal-dialog {
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        transform: none !important;
    }

    #mirutaModal form,
    #nrutaModal form {
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    #mirutaModal .modal-content.modal-usuario,
    #nrutaModal .modal-content.modal-usuario {
        border-radius: 0;
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    #mirutaModal .modal-header-usuario,
    #nrutaModal .modal-header-usuario {
        padding: 16px 20px;
        flex-shrink: 0;
    }

    #mirutaModal .modal-header-usuario .modal-title,
    #nrutaModal .modal-header-usuario .modal-title {
        font-size: 20px;
        font-weight: 700;
    }

    #mirutaModal .modal-header-usuario .modal-title i,
    #nrutaModal .modal-header-usuario .modal-title i {
        font-size: 24px;
    }

    #mirutaModal .modal-body,
    #nrutaModal .modal-body {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding: 12px;
        min-height: 0;
    }

    #mirutaModal .campos-grid {
        grid-template-columns: 1fr;
    }

    #mirutaModal .campo-grupo.campo-largo {
        grid-column: span 1;
    }

    #mirutaModal #map {
        height: 180px;
        margin-bottom: 12px;
    }

    #mirutaModal .panel-styled .panel-title a {
        padding: 10px 12px;
        font-size: 14px;
    }

    #mirutaModal .panel-styled .panel-body {
        padding: 12px;
    }

    #mirutaModal .modal-footer-usuario,
    #nrutaModal .modal-footer-usuario {
        flex-shrink: 0;
        padding: 10px 12px;
        flex-wrap: nowrap;
        gap: 8px;
        background: #fff;
        border-top: 1px solid #e9ecef;
    }

    #mirutaModal .modal-footer-usuario .btn,
    #nrutaModal .modal-footer-usuario .btn {
        flex: 1;
        justify-content: center;
        min-width: 0;
        padding: 10px 8px;
        font-size: 13px;
    }

    #mirutaModal .modal-footer-usuario .btn i {
        font-size: 13px;
    }
}

/* =====================================================
   MODALES GENERALES ESTILIZADOS
   ===================================================== */

/* Modal styled base */
.modal-content.modal-styled {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

/* Headers de modales con colores */
.modal-header-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: #fff;
    border-bottom: none;
    padding: 15px 20px;
}

.modal-header-primary {
    background: linear-gradient(135deg, #007bff 0%, #6610f2 100%);
    color: #fff;
    border-bottom: none;
    padding: 15px 20px;
}

.modal-header-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
    border-bottom: none;
    padding: 15px 20px;
}

.modal-header-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: #212529;
    border-bottom: none;
    padding: 15px 20px;
}

.modal-header-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: #fff;
    border-bottom: none;
    padding: 15px 20px;
}

.modal-header-info .modal-title,
.modal-header-primary .modal-title,
.modal-header-success .modal-title,
.modal-header-danger .modal-title {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header-warning .modal-title {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #212529;
}

.modal-header-info .modal-title i,
.modal-header-primary .modal-title i,
.modal-header-success .modal-title i,
.modal-header-warning .modal-title i,
.modal-header-danger .modal-title i {
    font-size: 22px;
}

/* Contenedor de tabla estilizado */
.table-container-styled {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.table-container-styled .table {
    margin-bottom: 0;
}

.table-container-styled .table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    padding: 12px 15px;
}

.table-container-styled .table tbody td {
    padding: 12px 15px;
    vertical-align: middle;
}

/* Campo de modal estilizado */
.campo-modal {
    margin-bottom: 20px;
}

.campo-modal > label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 14px;
}

.campo-modal > label i {
    color: #007bff;
    font-size: 16px;
}

.campo-modal .form-control {
    height: 42px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 14px;
    transition: all 0.2s;
}

.campo-modal .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

/* Footer inline para formularios */
.modal-footer-inline {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.modal-footer-inline .btn {
    padding: 10px 20px;
    font-weight: 600;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-footer-inline .btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    color: #fff;
}

.modal-footer-inline .btn-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1aa179 100%);
}

/* Modal footer mejorado */
.modal-styled .modal-footer {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 15px 20px;
}

.modal-styled .modal-footer .btn {
    padding: 8px 20px;
    font-weight: 500;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* =====================================================
   MODAL VER RUTAS - DISEÑO COMPLETO
   ===================================================== */

#rutasModal .modal-dialog {
    width: 900px;
    max-width: 95%;
}

.modal-content.modal-rutas {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0,0,0,0.2);
}

/* Header del modal rutas */
.modal-header-rutas {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #fff;
    border-bottom: none;
    padding: 20px 25px;
    position: relative;
}

.modal-header-rutas::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.modal-header-rutas .modal-title {
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.modal-header-rutas .modal-title i {
    font-size: 28px;
}

.modal-header-rutas .close {
    color: #fff;
    opacity: 1;
    font-size: 28px;
    text-shadow: none;
    position: relative;
    z-index: 1;
}

/* Resumen de rutas */
.rutas-resumen {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.rutas-resumen-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.resumen-icono {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
}

.resumen-icono.recogida {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.resumen-icono.entrega {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.resumen-info {
    display: flex;
    flex-direction: column;
}

.resumen-numero {
    font-size: 24px;
    font-weight: 700;
    color: #1a252f;
    line-height: 1;
}

.resumen-label {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 3px;
}

.btn-nueva-ruta {
    margin-left: auto;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    color: #fff;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-nueva-ruta:hover {
    background: linear-gradient(135deg, #218838 0%, #1aa179 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    color: #fff;
}

/* Tabla de rutas */
.rutas-tabla-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.table-rutas {
    margin-bottom: 0;
}

.table-rutas thead th {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #fff;
    font-weight: 600;
    padding: 15px;
    border: none;
    font-size: 13px;
}

.table-rutas thead th i {
    margin-right: 6px;
    opacity: 0.8;
}

.table-rutas thead th.th-acciones {
    text-align: center;
    width: 200px;
}

.table-rutas tbody td {
    padding: 15px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f1f1;
}

.table-rutas tbody tr:hover {
    background-color: #f8f9fa;
}

.table-rutas tbody tr:last-child td {
    border-bottom: none;
}

/* Botones de acción en tabla */
.table-rutas .btn-accion {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 3px;
    transition: all 0.2s;
}

.table-rutas .btn-accion:hover {
    transform: scale(1.1);
}

.table-rutas .btn-ver {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
}

.table-rutas .btn-editar {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    border: none;
    color: #212529;
}

.table-rutas .btn-eliminar {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
    color: #fff;
}

/* Estado vacío */
.rutas-vacio {
    text-align: center;
    padding: 50px 20px;
    color: #7f8c8d;
}

.rutas-vacio i {
    font-size: 60px;
    opacity: 0.3;
    margin-bottom: 15px;
}

.rutas-vacio p {
    font-size: 16px;
    margin-bottom: 20px;
}

/* Footer del modal rutas */
.modal-footer-rutas {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 15px 25px;
}

.modal-footer-rutas .btn-default {
    background: white;
    border: 1px solid #ddd;
    color: #495057;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 500;
}

/* =====================================================
   MODAL NUEVA RUTA - DISEÑO COMPLETO
   ===================================================== */

/* nrutaModal ahora usa clases modal-lg + modal-usuario de mirutaModal */

/* Header nueva ruta */
.modal-header-nueva-ruta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-bottom: none;
    padding: 25px;
    text-align: center;
}

.modal-header-nueva-ruta .modal-title {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: left;
    gap: 12px;
    margin-bottom: 8px;
}

.modal-header-nueva-ruta .modal-title i {
    font-size: 28px;
}

.modal-header-nueva-ruta .modal-subtitle {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

.modal-header-nueva-ruta .close {
    position: absolute;
    right: 20px;
    top: 20px;
    color: #fff;
    opacity: 1;
    font-size: 24px;
    text-shadow: none;
}

/* Body nueva ruta */
#nrutaModal .modal-body {
    padding: 25px;
    background: #f8f9fa;
}

/* Secciones */
.nueva-ruta-seccion {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.seccion-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #667eea;
}

.seccion-header i {
    font-size: 20px;
    color: #667eea;
}

.seccion-header span {
    font-weight: 700;
    font-size: 15px;
    color: #1a252f;
}

/* Display de placa */
.placa-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    border: 2px dashed #ddd;
}

.placa-label {
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.placa-valor {
    font-size: 28px;
    font-weight: 800;
    color: #1a252f;
    letter-spacing: 3px;
    font-family: 'Courier New', monospace;
}

/* Campos nueva ruta */
.campo-nueva-ruta {
    margin-bottom: 15px;
}

.campo-nueva-ruta:last-child {
    margin-bottom: 0;
}

.campo-nueva-ruta > label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
    font-size: 14px;
}

.campo-nueva-ruta > label i {
    color: #667eea;
    font-size: 16px;
}

.campo-nueva-ruta .form-control,
.campo-nueva-ruta .select-styled {
    height: 48px;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    font-size: 15px;
    padding: 10px 15px;
    transition: all 0.2s;
    background: white;
}

.campo-nueva-ruta .form-control:focus,
.campo-nueva-ruta .select-styled:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

/* Ajustes combo.select en modal Nueva Ruta */
#nrutaModal .campo-nueva-ruta {
    overflow: visible;
}

#nrutaModal .combo-select {
    width: 100% !important;
    max-width: 100% !important;
    float: none;
    margin-right: 0;
    margin-bottom: 0;
    box-sizing: border-box;
}

#nrutaModal .combo-select .combo-input {
    width: 100%;
}

#nrutaModal .combo-dropdown {
    width: 100%;
    max-width: 100%;
    z-index: 1065;
    box-sizing: border-box;
}
/* Grid de campos */
.campos-ruta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Info adicional */
.nueva-ruta-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: linear-gradient(135deg, #e8f4fd 0%, #d6eaf8 100%);
    border-radius: 10px;
    border-left: 4px solid #3498db;
}

.nueva-ruta-info i {
    font-size: 20px;
    color: #3498db;
    flex-shrink: 0;
}

.nueva-ruta-info span {
    font-size: 13px;
    color: #2c3e50;
    line-height: 1.5;
}

/* nrutaModal footer ahora usa .modal-footer-usuario */

/* Responsive para modales de rutas */
@media (max-width: 768px) {
    #rutasModal .modal-dialog {
        margin: 10px;
        width: auto;
    }

    .rutas-resumen {
        flex-direction: column;
        align-items: stretch;
    }

    .rutas-resumen-item {
        justify-content: flex-start;
    }

    .btn-nueva-ruta {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }

    /* Ocultar tabla, mostrar cards en móvil */
    .rutas-tabla-container {
        display: none !important;
    }

    .rutas-cards-mobile {
        display: flex !important;
    }

    .campos-ruta-grid {
        grid-template-columns: 1fr;
    }

    /* Modal rutas fullscreen en móvil */
    #rutasModal {
        padding: 0 !important;
        overflow: hidden !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }

    #rutasModal .modal-dialog {
        margin: 0;
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        transform: none !important;
    }

    #rutasModal .modal-content.modal-rutas {
        border-radius: 0;
        height: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    #rutasModal .modal-header-rutas {
        flex-shrink: 0;
    }

    #rutasModal .modal-body {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    #rutasModal .modal-footer-rutas {
        display: none;
    }

    /* nrutaModal hereda estilos fullscreen de mirutaModal via clases compartidas */

    /* Modal Galería de Fotos fullscreen en móvil */
    #galeriaModal {
        padding: 0 !important;
        overflow: hidden !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }

    #galeriaModal > .modal-dialog {
        margin: 0;
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        transform: none !important;
    }

    #galeriaModal .modal-content.modal-galeria {
        border-radius: 0;
        height: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    #galeriaModal .modal-header-galeria {
        flex-shrink: 0;
    }

    #galeriaModal > .modal-dialog .modal-body {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    #galeriaModal .modal-footer-galeria {
        display: none;
    }

    /* Modal Historial de Novedades fullscreen en móvil */
    #novedadesModal {
        padding: 0 !important;
        overflow: hidden !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }

    #novedadesModal > .modal-dialog {
        margin: 0;
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        transform: none !important;
    }

    #novedadesModal .modal-content.modal-novedades {
        border-radius: 0;
        height: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    #novedadesModal .modal-header-novedades {
        flex-shrink: 0;
    }

    #novedadesModal > .modal-dialog .modal-body {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    #novedadesModal .modal-footer-novedades {
        display: none;
    }

    /* Modal Mapa Novedad fullscreen en móvil */
    #novedadesMapaModal {
        padding: 0 !important;
        overflow: hidden !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }

    #novedadesMapaModal .modal-dialog {
        margin: 0;
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        transform: none !important;
    }

    #novedadesMapaModal .modal-content.modal-galeria-mapa {
        border-radius: 0;
        height: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    #novedadesMapaModal .modal-header-mapa {
        flex-shrink: 0;
    }

    #novedadesMapaModal .modal-body {
        flex: 1;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        padding: 12px;
    }

    #novedadesMapaModal .galeria-mapa-info {
        font-size: 14px;
        flex-shrink: 0;
        margin-bottom: 10px;
        line-height: 1.6;
    }

    #novedadesMapaModal #novedadesMapaContainer {
        flex: 1;
        height: auto !important;
        min-height: 0;
    }

    #novedadesMapaModal .modal-footer-galeria {
        display: none;
    }

    /* Modal Imagen Ampliada fullscreen en móvil */
    #galeriaImagenModal {
        padding: 0 !important;
        overflow: hidden !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }

    #galeriaImagenModal .modal-dialog {
        margin: 0;
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        transform: none !important;
    }

    #galeriaImagenModal .modal-content.modal-galeria-imagen {
        border-radius: 0;
        height: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    #galeriaImagenModal .modal-header-imagen {
        flex-shrink: 0;
    }

    #galeriaImagenModal .modal-body {
        flex: 1;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 8px;
        background: #f8f9fa;
    }

    #galeriaImagenModal .modal-body .galeria-imagen-full {
        max-height: calc(100% - 50px);
        max-width: 100%;
        object-fit: contain;
        border-radius: 8px;
        flex-shrink: 1;
        min-height: 0;
    }

    #galeriaImagenModal .modal-body .galeria-share-btn {
        flex-shrink: 0;
    }

}

/* ===================== CARDS MÓVILES - RUTAS ===================== */

.rutas-cards-mobile {
    display: none;
    flex-direction: column;
    gap: 12px;
    padding: 4px;
}

.ruta-mobile-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.ruta-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f1f1;
}

.ruta-card-titulo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ruta-card-id {
    font-size: 12px;
    color: #999;
    font-weight: 600;
}

.ruta-card-nombre {
    font-size: 15px;
    font-weight: 700;
    color: #2c3e50;
}

.ruta-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.ruta-card-dato {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.ruta-card-dato i {
    color: #999;
    font-size: 14px;
    width: 16px;
    text-align: center;
}

.ruta-card-label {
    color: #888;
    min-width: 60px;
}

.ruta-card-valor {
    color: #333;
    font-weight: 500;
}

.ruta-card-acciones {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.ruta-card-acciones .btn {
    font-size: 13px;
    padding: 8px 10px;
    border-radius: 8px;
    font-weight: 600;
}

/* ===================== GALERÍA DE FOTOS ===================== */

/* Modal principal */
.modal-content.modal-galeria {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0,0,0,0.2);
}

.modal-header-galeria {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    color: #fff;
    border-bottom: none;
    padding: 20px 25px;
    position: relative;
}

.modal-header-galeria::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.modal-header-galeria .modal-title {
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.modal-header-galeria .modal-title i {
    font-size: 28px;
}

.modal-header-galeria .close {
    color: #fff;
    opacity: 1;
    font-size: 28px;
    text-shadow: none;
    position: relative;
    z-index: 1;
}

.modal-footer-galeria {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 15px 25px;
}

.modal-footer-galeria .btn-default {
    background: white;
    border: 1px solid #ddd;
    color: #495057;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 500;
}

/* Resumen / Selector de ruta */
.galeria-resumen {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.galeria-resumen-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.galeria-resumen-icono {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
}

.galeria-selector-ruta {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.galeria-selector-ruta label {
    margin-bottom: 0;
    white-space: nowrap;
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 6px;
}

.galeria-select {
    min-width: 220px;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    padding: 8px 12px;
    font-size: 13px;
    transition: border-color 0.3s;
}

.galeria-select:focus {
    border-color: #6c5ce7;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

/* Estados: loading y vacío */
.galeria-estado {
    text-align: center;
    padding: 50px 20px;
    color: #999;
}

.galeria-spinner {
    display: inline-block;
    font-size: 2.5rem;
    color: #6c5ce7;
    animation: spin 1s linear infinite;
}

.galeria-estado p {
    margin-top: 12px;
    font-size: 15px;
}

/* Info bar */
.galeria-info-bar {
    margin-bottom: 12px;
    color: #7f8c8d;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Grid de fotos */
.galeria-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

.galeria-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

.galeria-item:hover {
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.2);
    transform: translateY(-3px);
}

.galeria-img-wrap {
    position: relative;
    overflow: hidden;
}

.galeria-img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    cursor: pointer;
    display: block;
    transition: transform 0.3s;
}

.galeria-item:hover .galeria-img {
    transform: scale(1.05);
}

.galeria-img-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(108, 92, 231, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    cursor: pointer;
    pointer-events: none;
}

.galeria-img-overlay i {
    color: #fff;
    font-size: 24px;
}

.galeria-item:hover .galeria-img-overlay {
    opacity: 1;
}

.galeria-item-info {
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    border-top: 1px solid #f0f0f0;
}

.galeria-fecha {
    font-size: 10px;
    color: #7f8c8d;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.galeria-btn-mapa {
    padding: 3px 8px;
    font-size: 12px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #00b894 0%, #55efc4 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    transition: all 0.2s;
}

.galeria-btn-mapa:hover {
    transform: scale(1.1);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 184, 148, 0.4);
}

/* Paginación */
.galeria-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #eee;
}

.galeria-page-info {
    font-size: 13px;
    color: #555;
    font-weight: 600;
}

.galeria-btn-pag {
    background: white;
    border: 2px solid #6c5ce7;
    color: #6c5ce7;
    border-radius: 8px;
    font-weight: 600;
    padding: 6px 16px;
    transition: all 0.2s;
}

.galeria-btn-pag:hover:not(:disabled) {
    background: #6c5ce7;
    color: #fff;
}

.galeria-btn-pag:disabled {
    border-color: #ddd;
    color: #ccc;
}

/* Modal imagen ampliada */
.modal-content.modal-galeria-imagen {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0,0,0,0.12);
}

.modal-header-imagen {
    background: #fff;
    color: #333;
    border-bottom: 1px solid #e9ecef;
    padding: 15px 20px;
}

.modal-header-imagen .close {
    color: #999;
    opacity: 1;
    font-size: 26px;
    text-shadow: none;
}

.modal-header-imagen .modal-title {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.modal-header-imagen .modal-header-fecha {
    font-size: 12px;
    color: #888;
    margin: 4px 0 0 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.galeria-share-btn {
    display: none;
    margin: 10px auto 0;
    font-weight: 600;
    padding: 8px 24px;
    border-radius: 8px;
    align-items: center;
    gap: 6px;
}

@media (max-width: 768px) {
    .galeria-share-btn {
        display: inline-flex;
    }
}

.galeria-imagen-full {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* Modal mapa */
.modal-content.modal-galeria-mapa {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0,0,0,0.2);
}

.modal-header-mapa {
    background: linear-gradient(135deg, #00b894 0%, #55efc4 100%);
    color: #fff;
    border-bottom: none;
    padding: 15px 20px;
}

.modal-header-mapa .modal-title {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header-mapa .close {
    color: #fff;
    opacity: 1;
    font-size: 26px;
    text-shadow: none;
}

.galeria-mapa-info {
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.mapa-info-titulo {
    font-size: 15px;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mapa-info-dato {
    font-size: 13px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

@media (max-width: 768px) {
    .galeria-mapa-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .mapa-info-titulo {
        font-size: 16px;
    }

    .mapa-info-dato {
        font-size: 14px;
    }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 991px) {
    .galeria-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    .galeria-img {
        height: 110px;
    }
    .galeria-selector-ruta {
        margin-left: 0;
        width: 100%;
    }
    .galeria-select {
        flex: 1;
        min-width: 0;
    }
}

@media (max-width: 576px) {
    .galeria-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .galeria-img {
        height: 100px;
    }
    .galeria-resumen {
        flex-direction: column;
        gap: 12px;
        padding: 15px;
    }
    .galeria-selector-ruta {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    .galeria-select {
        min-width: 100%;
    }
    .galeria-fecha {
        font-size: 9px;
    }
    .modal-header-galeria .modal-title {
        font-size: 18px;
    }
}

/* ===================== NOVEDADES ===================== */

/* Modal principal */
.modal-content.modal-novedades {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0,0,0,0.2);
}

#novedadesModal .modal-body {
    position: relative;
}

.modal-header-novedades {
    background: linear-gradient(135deg, #e17055 0%, #fdcb6e 100%);
    color: #fff;
    border-bottom: none;
    padding: 20px 25px;
    position: relative;
}

.modal-header-novedades::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.modal-header-novedades .modal-title {
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.modal-header-novedades .modal-title i {
    font-size: 28px;
}

.modal-header-novedades .close {
    color: #fff;
    opacity: 1;
    font-size: 28px;
    text-shadow: none;
    position: relative;
    z-index: 1;
}

.modal-footer-novedades {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 15px 25px;
}

.modal-footer-novedades .btn-default {
    background: white;
    border: 1px solid #ddd;
    color: #495057;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 500;
}

/* Resumen / Selector */
.novedades-resumen {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 20;
}

.novedades-resumen-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.novedades-resumen-icono {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #e17055 0%, #fdcb6e 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
}

.novedades-filtros {
    margin-left: auto;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.novedades-selector-ruta,
.novedades-buscador {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.novedades-selector-ruta label,
.novedades-buscador label {
    margin-bottom: 0;
    white-space: nowrap;
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 6px;
}

.novedades-select,
.novedades-search-input {
    min-width: 220px;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    padding: 8px 12px;
    font-size: 13px;
    transition: border-color 0.3s;
}

.novedades-select:focus,
.novedades-search-input:focus {
    border-color: #e17055;
    box-shadow: 0 0 0 3px rgba(225, 112, 85, 0.15);
}

/* Estados */
.novedades-estado {
    text-align: center;
    padding: 50px 20px;
    color: #999;
}

.novedades-spinner {
    display: inline-block;
    font-size: 2.5rem;
    color: #e17055;
    animation: spin 1s linear infinite;
}

.novedades-estado p {
    margin-top: 12px;
    font-size: 15px;
}

.novedades-info-bar {
    margin-bottom: 12px;
    color: #7f8c8d;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Lista de cards */
.novedades-lista {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.novedad-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    border-left: 4px solid #e17055;
    transition: all 0.3s;
}

.novedad-card.novedad-clickable {
    cursor: pointer;
}

.novedad-card.novedad-clickable:hover {
    box-shadow: 0 6px 20px rgba(225, 112, 85, 0.2);
    transform: translateX(4px);
    border-left-color: #fdcb6e;
}

/* Icono izquierdo */
.novedad-icono {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.novedad-icono img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}

.novedad-icono-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e17055;
    font-size: 22px;
}

/* Contenido */
.novedad-contenido {
    flex: 1;
    min-width: 0;
}

.novedad-titulo {
    font-size: 14px;
    font-weight: 700;
    color: #2d3436;
    margin-bottom: 3px;
    line-height: 1.3;
}

.novedad-fecha {
    font-size: 11px;
    color: #b2bec3;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.novedad-msj {
    font-size: 13px;
    color: #636e72;
    line-height: 1.5;
    margin-bottom: 6px;
}

.novedad-evento {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #e17055;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
}

/* Hint mapa */
.novedad-mapa-hint {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #00b894 0%, #55efc4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    align-self: center;
    transition: transform 0.2s;
}

.novedad-card.novedad-clickable:hover .novedad-mapa-hint {
    transform: scale(1.15);
}

/* Paginación */
.novedades-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #eee;
}

.novedades-page-info {
    font-size: 13px;
    color: #555;
    font-weight: 600;
}

.novedades-btn-pag {
    background: white;
    border: 2px solid #e17055;
    color: #e17055;
    border-radius: 8px;
    font-weight: 600;
    padding: 6px 16px;
    transition: all 0.2s;
}

.novedades-btn-pag:hover:not(:disabled) {
    background: #e17055;
    color: #fff;
}

.novedades-btn-pag:disabled {
    border-color: #ddd;
    color: #ccc;
}

/* Responsive novedades */
@media (max-width: 991px) {
    .novedades-filtros {
        margin-left: 0;
        width: 100%;
    }
    .novedades-selector-ruta,
    .novedades-buscador {
        width: 100%;
    }
    .novedades-select,
    .novedades-search-input {
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 576px) {
    .novedades-resumen {
        flex-direction: column;
        gap: 12px;
        padding: 15px;
    }
    .novedades-filtros {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    .novedades-selector-ruta,
    .novedades-buscador {
        width: 100%;
    }
    .novedades-select,
    .novedades-search-input {
        min-width: 100%;
    }
    .novedad-card {
        padding: 12px;
        gap: 10px;
    }
    .novedad-icono {
        width: 40px;
        height: 40px;
    }
    .novedad-titulo {
        font-size: 13px;
    }
    .novedad-msj {
        font-size: 12px;
    }
    .modal-header-novedades .modal-title {
        font-size: 18px;
    }
}

/* =====================================================
   TRIAL BANNER
   ===================================================== */
.trial-banner {
    max-width: 900px;
    margin: 10px auto 15px;
    padding: 0 15px;
}

.trial-banner-content {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 10px rgba(108, 92, 231, 0.3);
}

.trial-banner-content i {
    font-size: 20px;
}

/* =====================================================
   MI PLAN - CONDUCTOR PLAN PAYMENT VIEW
   ===================================================== */
.mi-plan-container {
    max-width: 900px;
    margin: 20px auto;
    padding: 0 15px;
}

.mi-plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #1a1a2e;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    margin-bottom: 15px;
    color: #fff;
}

.mi-plan-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.mi-plan-header h3 i {
    color: #a29bfe;
    margin-right: 8px;
}

.mi-plan-precio {
    font-size: 22px;
    font-weight: 700;
    color: #00d2ff;
}

.mi-plan-precio small {
    font-size: 12px;
    color: #7f8c8d;
    font-weight: 400;
}

.mi-plan-resumen {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.plan-resumen-card {
    flex: 1;
    text-align: center;
    padding: 15px;
    border-radius: 10px;
    background: #16213e;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.plan-resumen-card .plan-resumen-num {
    display: block;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.plan-resumen-card .plan-resumen-lbl {
    font-size: 11px;
    color: #7f8c8d;
    text-transform: uppercase;
    font-weight: 600;
}

.plan-resumen-card.pagados .plan-resumen-num { color: #27ae60; }
.plan-resumen-card.pendientes .plan-resumen-num { color: #e74c3c; }
.plan-resumen-card.total .plan-resumen-num { color: #00d2ff; font-size: 20px; }

.mi-plan-meses-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.plan-mes-card {
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 15px 10px;
    text-align: center;
    background: #16213e;
    box-shadow: 0 1px 5px rgba(0,0,0,0.2);
    transition: all 0.2s;
}

.plan-mes-card.pagado {
    border-color: rgba(39,174,96,0.3);
    background: linear-gradient(135deg, #1a2a1a 0%, #16213e 100%);
}

.plan-mes-card.pendiente {
    border-color: rgba(255,255,255,0.05);
    background: #1a1a2e;
}

.plan-mes-icono {
    font-size: 22px;
    margin-bottom: 5px;
}

.plan-mes-card.pagado .plan-mes-icono { color: #27ae60; }
.plan-mes-card.pendiente .plan-mes-icono { color: #555; }

.plan-mes-nombre {
    font-weight: 700;
    font-size: 13px;
    color: #e0e0e0;
    margin-bottom: 4px;
}

.plan-mes-estado {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 4px;
}

.plan-mes-estado.pagado { color: #27ae60; }
.plan-mes-estado.pendiente { color: #666; }

.plan-mes-fecha {
    font-size: 11px;
    color: #7f8c8d;
}

.plan-mes-descuento {
    font-size: 10px;
    color: #e67e22;
    font-weight: 600;
    margin-top: 3px;
}

.plan-mes-descuento i {
    color: #f39c12;
}

.plan-mes-monto {
    font-size: 11px;
    color: #00d2ff;
    font-weight: 700;
    margin-top: 2px;
}

.mi-plan-trial {
    font-size: 13px;
    color: #a29bfe;
    margin-top: 5px;
}

.mi-plan-trial i {
    margin-right: 4px;
}

.mi-plan-trial.vencido {
    color: #7f8c8d;
}

/* Billing cycle info - conductor */
.mi-plan-facturacion {
    font-size: 12px;
    color: #636e72;
    margin-top: 5px;
    padding: 6px 10px;
    background: rgba(108,92,231,0.08);
    border-radius: 6px;
}
.mi-plan-facturacion i {
    color: #6c5ce7;
    margin-right: 4px;
}

/* Billing month highlight - conductor */
.plan-mes-card.mes-actual {
    border-color: #6c5ce7;
    box-shadow: 0 0 0 2px rgba(108,92,231,0.2);
}
.plan-mes-card.mes-actual .plan-mes-nombre::after {
    content: ' \2190';
    font-size: 10px;
    color: #6c5ce7;
}

/* Date range in month cards */
.plan-mes-rango {
    font-size: 10px;
    color: #636e72;
    margin-bottom: 3px;
    font-weight: 500;
}

/* Responsive Mi Plan */
@media (max-width: 768px) {
    .mi-plan-meses-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .mi-plan-resumen {
        flex-direction: column;
    }
    .mi-plan-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .mi-plan-meses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =============================================
   TRANSFERENCIA DE USUARIOS
   ============================================= */

/* Checkbox en DataTable */
.transfer-checkbox-col {
    text-align: center;
    vertical-align: middle !important;
}
.transfer-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #ff6b35;
}
#selectAllUsers {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #ff6b35;
}

/* Boton Transferir */
.btn-transfer {
    background: linear-gradient(135deg, #ff6b35 0%, #f7c59f 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 5px;
    transition: all 0.2s ease;
    font-size: 13px;
}
.btn-transfer:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
    color: #fff;
}
.btn-transfer:disabled {
    background: #ccc;
    color: #888;
    cursor: not-allowed;
    box-shadow: none;
}

/* Barras de notificacion */
.transferencia-notif {
    margin: 10px 20px;
    padding: 12px 20px;
    border-radius: 10px;
    animation: slideInDown 0.3s ease;
}
.transferencia-entrante {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-left: 4px solid #28a745;
}
.transferencia-saliente {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-left: 4px solid #ffc107;
}
.transferencia-cancelada {
    background: linear-gradient(135deg, #e2e3e5, #d6d8db);
    border-left: 4px solid #6c757d;
}
.transferencia-notif-content {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}
.transferencia-notif-content > i:first-child {
    font-size: 24px;
}

@keyframes slideInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Modal headers */
.modal-header-transferir {
    background: linear-gradient(135deg, #ff6b35, #f7c59f);
    color: #fff;
    border-bottom: none;
}
.modal-header-aceptar {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: #fff;
    border-bottom: none;
}

/* Resumen en modal transferir */
.transferir-resumen {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}
.transferir-lista-nombres {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
    max-height: 200px;
    overflow-y: auto;
}
.transferir-lista-nombres li {
    padding: 5px 10px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}
.transferir-lista-nombres li:last-child {
    border-bottom: none;
}

/* Cards de transferencia (modal aceptar) */
.transferencia-card {
    border: 1px solid #dee2e6;
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.transferencia-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.transferencia-card-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.transferencia-alumno {
    font-weight: 600;
    font-size: 14px;
}
.transferencia-badge {
    background: rgba(255,255,255,0.2);
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 12px;
}
.transferencia-card-info {
    padding: 10px 15px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #495057;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}
.transferencia-card-form {
    padding: 15px;
}
.transferencia-card-form .campos-grid {
    display: grid;
    grid-template-columns: 1fr 80px 1fr 80px auto;
    gap: 10px;
    align-items: end;
}
.transferencia-card-form .campo-grupo label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #555;
    margin-bottom: 3px;
    text-transform: uppercase;
}
.transferencia-card-form .campo-grupo-btn {
    display: flex;
    align-items: flex-end;
}

/* Items salientes */
.transferencia-saliente-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    gap: 10px;
    flex-wrap: wrap;
}
.transferencia-saliente-item:last-child {
    border-bottom: none;
}

/* Responsive transferencias */
@media (max-width: 768px) {
    .transferencia-card-form .campos-grid {
        grid-template-columns: 1fr 1fr;
    }
    .transferencia-card-form .campo-grupo-btn {
        grid-column: 1 / -1;
        justify-content: center;
        padding-top: 5px;
    }
    .transferencia-card-info {
        flex-direction: column;
        gap: 5px;
    }
    .transferencia-notif-content {
        flex-direction: column;
        text-align: center;
    }
    .transferencia-saliente-item {
        flex-direction: column;
        text-align: center;
    }
    .btn-transfer {
        font-size: 12px;
        padding: 5px 10px;
    }

    /* Notificación saliente fija en móvil, debajo del toolbar y transfer bar */
    #notifTransferenciasSalientes {
        position: fixed;
        top: 170px;
        left: 15px;
        right: 15px;
        z-index: 993;
        margin: 0;
        padding: 8px 12px;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        transition: top 0.2s ease;
    }

    /* Cuando el buscador está abierto, desplazar notificación debajo */
    #notifTransferenciasSalientes.search-open-offset {
        top: 245px;
    }

    #notifTransferenciasSalientes .transferencia-notif-content {
        flex-direction: row;
        flex-wrap: wrap;
        text-align: left;
        gap: 8px;
        justify-content: center;
    }

    #notifTransferenciasSalientes .transferencia-notif-content > i:first-child {
        font-size: 16px;
    }

    #notifTransferenciasSalientes .transferencia-notif-content > span {
        font-size: 12px;
        flex: 1;
        min-width: 0;
    }

    #notifTransferenciasSalientes .transferencia-notif-content .btn {
        padding: 3px 8px;
        font-size: 11px;
    }
}

/* =============================================
   AGREGAR COLEGIO
   ============================================= */

/* Select + boton "+" en linea */
.input-con-btn {
    display: flex;
    gap: 6px;
    align-items: center;
}
.input-con-btn select {
    flex: 1;
    min-width: 0;
}
.btn-agregar-colegio {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 16px;
}

/* Modal header */
.modal-header-colegio {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: #fff;
    border-bottom: none;
}

/* Form grid */
.colegio-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 15px;
}
.colegio-form-grid .campo-grupo label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 3px;
}

/* Mapa */
.colegio-seccion-mapa {
    margin-bottom: 15px;
}
.colegio-seccion-mapa > label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}
.colegio-direccion-row {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}
.colegio-direccion-row input {
    flex: 1;
}
#mapColegio {
    width: 100%;
    height: 300px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-bottom: 8px;
}
.colegio-coords-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.colegio-coords-row .campo-grupo label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #888;
    margin-bottom: 2px;
}

/* Horario */
.colegio-seccion-horario {
    margin-bottom: 10px;
}
.colegio-seccion-horario > label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}
.colegio-horario-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.colegio-horario-grid .campo-grupo label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #888;
    margin-bottom: 2px;
}

@media (max-width: 768px) {
    .colegio-form-grid {
        grid-template-columns: 1fr;
    }
    #mapColegio {
        height: 220px;
    }
    .colegio-horario-grid {
        grid-template-columns: 1fr 1fr;
    }
}
















/* Fix color titulos de modales en escritorio */
@media (min-width: 769px) {
  :is(
    .pagos-header,
    .confirmar-pago-header,
    .ficha-header,
    .whatsapp-header,
    .perfil-header,
    .modal-header-rutas,
    .modal-header-nueva-ruta,
    .modal-header-galeria,
    .modal-header-mapa,
    .modal-header-novedades,
    .modal-header-transferir,
    .modal-header-aceptar,
    .modal-header-colegio,
    .modal-header-info,
    .modal-header-primary,
    .modal-header-success,
    .modal-header-danger,
    .modal-header-admin,
    .modal-header-usuario
  ) .modal-title,
  :is(
    .pagos-header,
    .confirmar-pago-header,
    .ficha-header,
    .whatsapp-header,
    .perfil-header,
    .modal-header-rutas,
    .modal-header-nueva-ruta,
    .modal-header-galeria,
    .modal-header-mapa,
    .modal-header-novedades,
    .modal-header-transferir,
    .modal-header-aceptar,
    .modal-header-colegio,
    .modal-header-info,
    .modal-header-primary,
    .modal-header-success,
    .modal-header-danger,
    .modal-header-admin,
    .modal-header-usuario
  ) .modal-title i {
    color: #fff !important;
  }

  :is(
    .pagos-header,
    .confirmar-pago-header,
    .ficha-header,
    .whatsapp-header,
    .perfil-header,
    .modal-header-rutas,
    .modal-header-nueva-ruta,
    .modal-header-galeria,
    .modal-header-mapa,
    .modal-header-novedades,
    .modal-header-transferir,
    .modal-header-aceptar,
    .modal-header-colegio,
    .modal-header-info,
    .modal-header-primary,
    .modal-header-success,
    .modal-header-danger,
    .modal-header-admin,
    .modal-header-usuario
  ) .close,
  :is(
    .pagos-header,
    .confirmar-pago-header,
    .ficha-header,
    .whatsapp-header,
    .perfil-header,
    .modal-header-rutas,
    .modal-header-nueva-ruta,
    .modal-header-galeria,
    .modal-header-mapa,
    .modal-header-novedades,
    .modal-header-transferir,
    .modal-header-aceptar,
    .modal-header-colegio,
    .modal-header-info,
    .modal-header-primary,
    .modal-header-success,
    .modal-header-danger,
    .modal-header-admin,
    .modal-header-usuario
  ) .close span {
    color: #fff !important;
  }
}












/* =============================================
   LAYOUT MODAL PAGOS (SCROLL SOLO EN BODY)
   ============================================= */
#pagosModal {
  overflow: hidden;
}

#pagosModal .modal-dialog {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 60px);
  margin: 30px auto;
}

#pagosModal .modal-content {
  display: flex;
  flex-direction: column;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
}

#pagosModal .modal-header,
#pagosModal .modal-footer {
  flex-shrink: 0;
}

#pagosModal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

@media (max-width: 768px) {
  #pagosModal {
    padding: 0 !important;
    overflow: hidden !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }

  #pagosModal .modal-dialog {
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none !important;
  }

  #pagosModal .modal-content {
    border-radius: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  #pagosModal .modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 12px;
  }

  #pagosModal .modal-footer {
    flex-shrink: 0;
    background: #fff;
    border-top: 1px solid #e9ecef;
  }
}

/* =============================================
   LAYOUT MODAL REGISTRAR PAGO (SCROLL SOLO EN BODY)
   ============================================= */
#confirmarPagoModal {
  overflow: hidden;
}

#confirmarPagoModal .modal-dialog {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 60px);
  margin: 30px auto;
}

#confirmarPagoModal .modal-content {
  display: flex;
  flex-direction: column;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
}

#confirmarPagoModal .modal-header,
#confirmarPagoModal .modal-footer {
  flex-shrink: 0;
}

#confirmarPagoModal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

@media (max-width: 768px) {
  #confirmarPagoModal {
    padding: 0 !important;
    overflow: hidden !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }

  #confirmarPagoModal .modal-dialog {
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none !important;
  }

  #confirmarPagoModal .modal-content {
    border-radius: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  #confirmarPagoModal .modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 12px;
  }

  #confirmarPagoModal .modal-footer {
    flex-shrink: 0;
    background: #fff;
    border-top: 1px solid #e9ecef;
  }
}

/* =============================================
   LAYOUT MODAL ARCHIVADOS (SCROLL SOLO EN BODY)
   ============================================= */
#archivadosModal {
  overflow: hidden;
}

#archivadosModal .modal-dialog {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 60px);
  margin: 30px auto;
}

#archivadosModal .modal-content {
  display: flex;
  flex-direction: column;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
}

#archivadosModal .modal-header,
#archivadosModal .modal-footer {
  flex-shrink: 0;
}

#archivadosModal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Evita doble scroll interno: el scroll queda en .modal-body */
#archivadosModal .resultados-archivados {
  max-height: none;
  overflow: visible;
}

@media (max-width: 768px) {
  #archivadosModal {
    padding: 0 !important;
    overflow: hidden !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }

  #archivadosModal .modal-dialog {
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none !important;
  }

  #archivadosModal .modal-content {
    border-radius: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  #archivadosModal .modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 10px;
  }
}

/* =============================================
   LAYOUT MODAL VISUALIZAR RUTA (SCROLL SOLO EN BODY)
   ============================================= */
#visualizarRutaModal {
  overflow: hidden;
}

#visualizarRutaModal .modal-dialog {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 60px);
  margin: 30px auto;
}

#visualizarRutaModal .modal-content {
  display: flex;
  flex-direction: column;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
}

#visualizarRutaModal .modal-header,
#visualizarRutaModal .modal-footer {
  flex-shrink: 0;
}

#visualizarRutaModal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0 !important;
}

/* Evita doble scroll interno: el scroll principal queda en .modal-body */
#visualizarRutaModal .lista-paradas-container {
  max-height: none;
  overflow: visible;
}

@media (max-width: 768px) {
  #visualizarRutaModal {
    padding: 0 !important;
    overflow: hidden !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }

  #visualizarRutaModal .modal-dialog {
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none !important;
  }

  #visualizarRutaModal .modal-content {
    border-radius: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  #visualizarRutaModal .modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 0 !important;
  }

  #visualizarRutaModal .modal-footer {
    flex-shrink: 0;
    background: #fff;
    border-top: 1px solid #e9ecef;
  }
}

/* =============================================
   LAYOUT MODAL SIMULAR RUTA (SCROLL SOLO EN BODY)
   ============================================= */
#simularRutaModal {
  overflow: hidden;
}

#simularRutaModal .modal-dialog {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 60px);
  margin: 30px auto;
}

#simularRutaModal .modal-content {
  display: flex;
  flex-direction: column;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
}

#simularRutaModal .modal-header,
#simularRutaModal .modal-footer {
  flex-shrink: 0;
}

#simularRutaModal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0 !important;
}

/* Evita doble scroll interno: el scroll principal queda en .modal-body */
#simularRutaModal .lista-paradas-container {
  max-height: none;
  overflow: visible;
}

@media (max-width: 768px) {
  #simularRutaModal {
    padding: 0 !important;
    overflow: hidden !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }

  #simularRutaModal .modal-dialog {
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none !important;
  }

  #simularRutaModal .modal-content {
    border-radius: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  #simularRutaModal .modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 0 !important;
  }

  #simularRutaModal .modal-footer {
    flex-shrink: 0;
    background: #fff;
    border-top: 1px solid #e9ecef;
  }
}

/* =============================================
   LAYOUT MODALES RESTANTES (SCROLL SOLO EN BODY)
   ============================================= */
#recordatorioPagoModal,
#galeriaMapaModal,
#novedadesMapaModal,
#transferirModal,
#aceptarTransferenciasModal,
#detalleSalientesModal,
#agregarColegioModal {
  overflow: hidden;
}

#recordatorioPagoModal .modal-dialog,
#galeriaMapaModal .modal-dialog,
#novedadesMapaModal .modal-dialog,
#transferirModal .modal-dialog,
#aceptarTransferenciasModal .modal-dialog,
#detalleSalientesModal .modal-dialog,
#agregarColegioModal .modal-dialog {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 60px);
  margin: 30px auto;
}

#recordatorioPagoModal .modal-content,
#galeriaMapaModal .modal-content,
#novedadesMapaModal .modal-content,
#transferirModal .modal-content,
#aceptarTransferenciasModal .modal-content,
#detalleSalientesModal .modal-content,
#agregarColegioModal .modal-content {
  display: flex;
  flex-direction: column;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
}

#recordatorioPagoModal .modal-header,
#recordatorioPagoModal .modal-footer,
#galeriaMapaModal .modal-header,
#galeriaMapaModal .modal-footer,
#novedadesMapaModal .modal-header,
#novedadesMapaModal .modal-footer,
#transferirModal .modal-header,
#transferirModal .modal-footer,
#aceptarTransferenciasModal .modal-header,
#aceptarTransferenciasModal .modal-footer,
#detalleSalientesModal .modal-header,
#detalleSalientesModal .modal-footer,
#agregarColegioModal .modal-header,
#agregarColegioModal .modal-footer {
  flex-shrink: 0;
}

#recordatorioPagoModal .modal-body,
#galeriaMapaModal .modal-body,
#novedadesMapaModal .modal-body,
#transferirModal .modal-body,
#aceptarTransferenciasModal .modal-body,
#detalleSalientesModal .modal-body,
#agregarColegioModal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

@media (max-width: 768px) {
  #recordatorioPagoModal,
  #galeriaMapaModal,
  #novedadesMapaModal,
  #transferirModal,
  #aceptarTransferenciasModal,
  #detalleSalientesModal,
  #agregarColegioModal {
    padding: 0 !important;
    overflow: hidden !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }

  #recordatorioPagoModal .modal-dialog,
  #galeriaMapaModal .modal-dialog,
  #novedadesMapaModal .modal-dialog,
  #transferirModal .modal-dialog,
  #aceptarTransferenciasModal .modal-dialog,
  #detalleSalientesModal .modal-dialog,
  #agregarColegioModal .modal-dialog {
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none !important;
  }

  #recordatorioPagoModal .modal-content,
  #galeriaMapaModal .modal-content,
  #novedadesMapaModal .modal-content,
  #transferirModal .modal-content,
  #aceptarTransferenciasModal .modal-content,
  #detalleSalientesModal .modal-content,
  #agregarColegioModal .modal-content {
    border-radius: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  #recordatorioPagoModal .modal-body,
  #galeriaMapaModal .modal-body,
  #novedadesMapaModal .modal-body,
  #transferirModal .modal-body,
  #aceptarTransferenciasModal .modal-body,
  #detalleSalientesModal .modal-body,
  #agregarColegioModal .modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 12px;
  }

  #recordatorioPagoModal .modal-footer,
  #galeriaMapaModal .modal-footer,
  #novedadesMapaModal .modal-footer,
  #transferirModal .modal-footer,
  #aceptarTransferenciasModal .modal-footer,
  #detalleSalientesModal .modal-footer,
  #agregarColegioModal .modal-footer {
    flex-shrink: 0;
    background: #fff;
    border-top: 1px solid #e9ecef;
  }
}

/* =============================================
   UNIFORMAR ALTURA Y ALINEACION DE HEADERS DE MODALES
   Referencia: estilo visual de Nuevo Usuario
   ============================================= */
.modal .modal-header {
  min-height: 72px;
  padding: 18px 25px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal .modal-header .modal-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.2;
  font-size: 22px !important;
  font-weight: 700 !important;
}

.modal .modal-header .close {
  float: none;
  order: 2;
  margin: 0 0 0 auto;
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  position: static;
  top: auto;
  right: auto;
  transform: none;
}

.modal .modal-header .close span {
  line-height: 1;
}

.modal .modal-header .modal-header-fecha {
  margin: 0;
  display: flex;
  align-items: center;
  line-height: 1.2;
}

@media (max-width: 768px) {
  .modal .modal-header {
    min-height: 64px;
    padding: 16px 20px;
  }
}

@media (max-width: 576px) {
  .modal .modal-header .modal-title {
    font-size: 18px !important;
  }
}

