/* ===== ESTILOS GENERALES Y CONTENEDOR PRINCIPAL ===== */
.rutas-container {
  width: 100%;
  max-width: 100%;
  margin: 1.6rem auto;
  padding: 0 0.8rem;
  box-sizing: border-box;
}

/* ===== PANEL DE ACCIONES PRINCIPALES ===== */
.acciones {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.6rem;
  padding: 1.2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 1px solid #f0f0f0;
}

.acciones h2 {
  color: #1a202c;
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
}

.acciones > div {
  display: flex;
  gap: 0.8rem;
}

/* ===== SISTEMA DE BOTONES PRINCIPALES (tamaño mediano) ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-family: 'Nunito', sans-serif;
  font-size: 0.85rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  min-height: 40px;
  min-width: auto;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
  width: auto;
  white-space: nowrap;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

/* ===== COLORES PARA BOTONES PRINCIPALES ===== */

/* Principal - Verde */
.btn-primary,
.btn-success {
  background: linear-gradient(135deg, #008c3a 0%, #00b050 100%);
  color: #fff;
  box-shadow: 0 3px 8px rgba(0, 140, 58, 0.25);
}

.btn-primary:hover,
.btn-success:hover {
  background: linear-gradient(135deg, #006e2e 0%, #008c3a 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 140, 58, 0.35);
}

/* Outline - Verde borde */
.btn-outline {
  background: transparent;
  border: 2px solid #008c3a;
  color: #008c3a;
  box-shadow: 0 2px 6px rgba(0, 140, 58, 0.1);
}

.btn-outline:hover {
  background: #008c3a;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 140, 58, 0.25);
}

/* Mantenimiento - Gris */
.btn-mantenimiento {
  background: linear-gradient(135deg, #5b5b5b 0%, #7a7a7a 100%);
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(91, 91, 91, 0.25);
}

.btn-mantenimiento:hover {
  background: linear-gradient(135deg, #4a4a4a 0%, #666666 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(91, 91, 91, 0.35);
}

/* Agregar Fila - Verde agua */
#btnAgregarFila {
  background: linear-gradient(135deg, #17a2b8 0%, #20c997 100%);
  color: #fff;
  box-shadow: 0 3px 8px rgba(23, 162, 184, 0.25);
}

#btnAgregarFila:hover {
  background: linear-gradient(135deg, #138496 0%, #17a2b8 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(23, 162, 184, 0.35);
}

/* Cancelar - Gris */
.btn-cancelar {
  background: linear-gradient(135deg, #6c757d 0%, #868e96 100%);
  color: #fff;
  box-shadow: 0 2px 6px rgba(108, 117, 125, 0.2);
}

.btn-cancelar:hover {
  background: linear-gradient(135deg, #5a6268 0%, #6c757d 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* ===== BOTONES DE TABLA - TAMAÑO Y ESPACIADO OPTIMIZADO ===== */
.btn-edit,
.btn-delete,
.btn-guardar,
.btn-cancelar,
.btn-guardar-nueva,
.btn-cancelar-nueva {
  background: linear-gradient(135deg, #0d6efd 0%, #3d8bfd 100%);
  color: #fff;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  min-height: 34px;
  max-width: 50px;
  min-width: 45px;
  justify-content: center;
  box-sizing: border-box;
  box-shadow: 0 2px 6px rgba(13, 110, 253, 0.2);
  flex: 1 1 auto;
}

.btn-edit:hover {
  background: linear-gradient(135deg, #094bb3 0%, #0d6efd 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.btn-delete {
  background: linear-gradient(135deg, #dc3545 0%, #e35d6a 100%);
  box-shadow: 0 2px 6px rgba(220, 53, 69, 0.2);
}

.btn-delete:hover {
  background: linear-gradient(135deg, #c82333 0%, #dc3545 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Botones de Guardar/Cancelar en tabla */
.btn-guardar,
.btn-guardar-nueva {
  background: linear-gradient(135deg, #28a745 0%, #34ce57 100%);
  color: #fff;
  box-shadow: 0 2px 6px rgba(40, 167, 69, 0.2);
}

.btn-guardar:hover,
.btn-guardar-nueva:hover {
  background: linear-gradient(135deg, #218838 0%, #28a745 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-cancelar-nueva {
  background: linear-gradient(135deg, #6c757d 0%, #868e96 100%);
  color: #fff;
  box-shadow: 0 2px 6px rgba(108, 117, 125, 0.2);
}

.btn-cancelar-nueva:hover {
  background: linear-gradient(135deg, #5a6268 0%, #6c757d 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* ===== BOTÓN DE REENVÍO ===== */
.btn-reenviar {
  background: linear-gradient(135deg, #ff6b35 0%, #ff8e53 100%);
  color: #fff;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  min-height: 34px;
  max-width: 50px;
  min-width: 45px;
  justify-content: center;
  box-sizing: border-box;
  box-shadow: 0 2px 6px rgba(255, 107, 53, 0.2);
  flex: 1 1 auto;
}

.btn-reenviar:hover {
  background: linear-gradient(135deg, #e55a2b 0%, #ff7a40 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

/* ===== BOTONES DESHABILITADOS ===== */
.btn:disabled,
.btn[disabled],
.btn-edit:disabled,
.btn-delete:disabled,
.btn-reenviar:disabled {
  background: #e5e7eb !important;
  border-color: #d1d5db !important;
  color: #9ca3af !important;
  cursor: not-allowed;
  opacity: 0.6;
  transform: none !important;
  box-shadow: none !important;
}

/* ===== BOTÓN CANCELAR DEL FORMULARIO (especial - más grande) ===== */
.acciones-formulario .btn-cancelar {
  padding: 0.6rem 1rem !important;
  font-size: 0.85rem !important;
  min-width: 110px;
  min-height: 40px;
}

/* ===== BOTONES DE PAGINACIÓN ===== */
.btn-pag {
  background: linear-gradient(135deg, #008c3a 0%, #00b050 100%);
  color: white;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-family: 'Nunito', sans-serif;
  transition: all 0.25s;
  min-height: 40px;
  max-width: 40px;
  box-sizing: border-box;
  box-shadow: 0 3px 8px rgba(0, 140, 58, 0.25);
}

.btn-pag:hover:not(:disabled) {
  background: linear-gradient(135deg, #006e2e 0%, #008c3a 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 140, 58, 0.35);
}

.btn-pag:disabled {
  background: #e5e7eb;
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
  box-shadow: none;
}

/* ===== BOTONES DE TABLA (PESTAÑAS) ===== */
.btn-tabla {
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  color: #495057;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-family: 'Nunito', sans-serif;
  transition: all 0.25s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-tabla.activa {
  background: linear-gradient(135deg, #008c3a 0%, #00b050 100%);
  color: white;
  border-color: #008c3a;
  box-shadow: 0 3px 8px rgba(0, 140, 58, 0.25);
}

.btn-tabla:hover:not(.activa) {
  background: #e9ecef;
  border-color: #dee2e6;
  transform: translateY(-1px);
}

/* Estilos para los íconos dentro de los botones */
.btn i {
  font-size: 0.9rem;
  width: 16px;
  text-align: center;
}

.acciones-tabla i {
  font-size: 0.85rem;
}

/* ===== MEDIA QUERIES PARA BOTONES ===== */

/* TABLET - 768px */
@media (max-width: 768px) {
  /* Botones principales - más compactos */
  .btn {
    padding: 0.5rem 0.8rem;
    min-height: 36px;
    font-size: 0.8rem;
  }
  
  /* Ajustar específicamente los botones con íconos */
  .btn i {
    font-size: 0.9em;
  }
  
  /* Botones de tabla en tablet */
  .btn-edit,
  .btn-delete,
  .btn-guardar,
  .btn-cancelar,
  .btn-guardar-nueva,
  .btn-cancelar-nueva,
  .btn-reenviar {
    padding: 0.35rem 0.6rem;
    min-height: 32px;
    max-width: 50px;
    min-width: 45px;
    font-size: 0.7rem;
    gap: 0.3rem;
  }
  
  .acciones-tabla i {
    font-size: 0.8rem;
    width: 14px;
  }
  
  .btn-pag {
    padding: 0.55rem 0.9rem;
    min-height: 38px;
  }
  
  /* Contenedor general */
  .rutas-container {
    padding: 0 0.6rem;
    margin: 1rem auto;
  }
  
  .acciones {
    flex-direction: column;
    gap: 0.8rem;
    align-items: flex-start;
    padding: 1rem;
  }
  
  .acciones > div {
    width: 100%;
    flex-direction: column;
    gap: 0.6rem;
  }
  
  .filtros-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
  
  .paginacion {
    flex-direction: column;
    gap: 0.8rem;
    padding: 1rem;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .tabla-contenedor {
    padding: 0.8rem;
  }
  
  .tabla th {
    padding: 0.6rem 0.5rem;
    font-size: 0.65rem;
  }
  
  .tabla td {
    padding: 0.6rem 0.5rem;
    font-size: 0.7rem;
  }
  
  .modal-contenido {
    width: 95%;
    margin: 10% auto;
  }
}

/* CELULAR - 526px */
@media (max-width: 526px) {
  /* Botones principales - ocupar ancho completo pero sin exceso */
  .btn {
    padding: 0.45rem 0.7rem;
    min-height: 34px;
    justify-content: center;
    font-size: 0.75rem;
  }
  
  /* Si los botones están en línea (no en columna) */
  .acciones > div:not(.acciones-formulario) .btn {
    width: calc(50% - 0.25rem); /* Dos botones por fila */
  }
  
  /* BOTONES APILADOS VERTICALMENTE EN MÓVIL */
  .btn-edit,
  .btn-delete,
  .btn-guardar,
  .btn-cancelar,
  .btn-guardar-nueva,
  .btn-cancelar-nueva,
  .btn-reenviar {
    width: 100% !important;
    max-width: 50px;
    min-width: 45px;
    padding: 0.3rem 0.4rem;
    min-height: 30px;
    font-size: 0.65rem;
    margin: 0;
    justify-content: center;
  }
  
  /* Solo mostrar íconos en móvil, ocultar texto */
  .btn-edit span,
  .btn-delete span,
  .btn-guardar span,
  .btn-cancelar span,
  .btn-guardar-nueva span,
  .btn-cancelar-nueva span,
  .btn-reenviar span {
    display: none;
  }
  
  .acciones-tabla i {
    font-size: 0.75rem;
    width: 14px;
  }
  
  .btn-pag {
    width: 100%;
  }
}

/* MÓVIL PEQUEÑO - 360px */
@media (max-width: 360px) {
  .acciones > div:not(.acciones-formulario) .btn {
    width: 100%; /* Un botón por fila en pantallas muy pequeñas */
  }
  
  /* Botones principales - tamaño mínimo legible */
  .btn {
    padding: 0.4rem 0.6rem;
    min-height: 32px;
    font-size: 0.7rem;
  }
  
  /* BOTONES DE TABLA - MÁS COMPACTOS EN MÓVIL PEQUEÑO */
  .btn-edit,
  .btn-delete,
  .btn-guardar,
  .btn-cancelar,
  .btn-guardar-nueva,
  .btn-cancelar-nueva,
  .btn-reenviar {
    padding: 0.25rem 0.35rem;
    min-height: 28px;
    max-width: 50px;
    min-width: 45px;
    font-size: 0.6rem;
  }
  
  .acciones-tabla i {
    font-size: 0.7rem;
    width: 12px;
  }
  
  .btn-pag {
    min-height: 36px;
    font-size: 0.8rem;
  }
  
  /* Contenedor general para móviles pequeños */
  .rutas-container {
    padding: 0 0.4rem;
    margin: 0.4rem auto;
  }
  
  .acciones,
  .filtros-container,
  .tabla-contenedor {
    padding: 0.8rem;
    margin-bottom: 0.8rem;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  .estado {
    min-width: 70px;
    font-size: 0.6rem;
    padding: 0.3rem 0.5rem;
  }
  
  .modal-footer {
    flex-direction: column;
  }
  
  .modal-footer .btn {
    width: 100%;
  }
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
  .btn,
  .btn-edit,
  .btn-delete,
  .btn-pag,
  .btn-guardar,
  .btn-cancelar,
  .btn-reenviar {
    transition: none;
    transform: none;
  }
  
  .btn::before {
    display: none;
  }
  
  .modal-contenido {
    animation: none;
  }
}

/* Efectos de brillo */
.btn:active {
  transform: translateY(0);
  transition: transform 0.1s;
}

/* ===== EL RESTO DE LOS ESTILOS SE MANTIENEN IGUAL ===== */

/* Select dentro de la tabla en modo edición */
.select-estado {
  width: 100%;
  padding: 0.5rem 0.7rem;
  border: 2px solid #7ba5ff;
  border-radius: 8px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.8rem;
  background: white;
  box-sizing: border-box;
  min-height: 36px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(123, 165, 255, 0.1);
}

.select-estado:focus {
  outline: none;
  border-color: #5f76dc;
  box-shadow: 0 0 0 3px rgba(123, 165, 255, 0.2);
}

/* ===== SISTEMA DE FILTROS MEJORADO ===== */
.filtros-container {
  background: #fff;
  padding: 1.2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  margin-bottom: 1.2rem;
  border: 1px solid #f0f0f0;
}

.filtros-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid #e8e8e8;
  padding-bottom: 0.7rem;
}

.filtros-header h3 {
  color: #1a202c;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.filtros-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.2rem;
}

.filtro-grupo {
  display: flex;
  flex-direction: column;
}

.filtro-grupo label {
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: #374151;
  font-size: 0.85rem;
}

.filtro-grupo input,
.filtro-grupo select {
  padding: 0.65rem;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.85rem;
  transition: all 0.25s;
  font-family: 'Nunito', sans-serif;
  min-height: 40px;
  box-sizing: border-box;
  background: #fafafa;
}

.filtro-grupo input:focus,
.filtro-grupo select:focus {
  outline: none;
  border-color: #008c3a;
  box-shadow: 0 0 0 3px rgba(0, 140, 58, 0.15);
  background: white;
  transform: translateY(-1px);
}

/* ===== SISTEMA DE TABLA MEJORADO ===== */
.tabla-contenedor {
  background: #fff;
  padding: 1.2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  overflow-x: auto;
  margin-bottom: 1.2rem;
  width: 100%;
  border: 1px solid #f0f0f0;
  -webkit-overflow-scrolling: touch;
  display: none;
}

.tabla-contenedor.activa {
  display: block;
}

.tabla {
  width: 100%;
  border-collapse: collapse;
  border-radius: 8px;
  overflow: hidden;
}

/* Cabeceras de tabla mejoradas */
.tabla th {
  background: #7ba5ff;
  color: #fff;
  padding: 0.7rem;
  text-align: left;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-size: 0.75rem;
  border-bottom: 2px solid #5f76dc;
}

/* Celdas de tabla mejoradas */
.tabla td {
  padding: 0.7rem;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.8rem;
  text-align: left;
  color: #374151;
  vertical-align: middle;
  transition: background-color 0.2s;
}

.tabla tr:last-child td {
  border-bottom: none;
}

.tabla tr:hover {
  background: #f8fafc;
  transform: scale(1.002);
}

/* ===== INDICADORES DE ESTADO MEJORADOS ===== */
.estado {
  padding: 0.35rem 0.7rem;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  display: inline-block;
  text-align: center;
  min-width: 80px;
  border: 1.5px solid;
  white-space: nowrap;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.estado-reenviado {
  background: #ffffff;
  color: #484848;
  border-color: #929292;
}

.estado-anulado {
  background: linear-gradient(135deg, #a2a2a2 0%, #616060 100%);
  color: #ffffff;
  border-color: #2c2c2c;
}

.estado-devolucion {
  background: linear-gradient(135deg, #ffcfcf 0%, #ffabab 100%);
  color: #721c24;
  border-color: #dc3545;
}

.estado-otros {
  background: linear-gradient(135deg, #fff3cd 0%, #ffe695 100%);
  color: #856404;
  border-color: #ffd351;
}

.estado-entregado-parcial,
.estado-nota-credito {
  background: linear-gradient(135deg, #d1ecf1 0%, #abdae2 100%);
  color: #0c5460;
  border-color: #6edff6;
}

/* ===== BOTONES DE ACCIÓN EN TABLA MEJORADOS ===== */
.acciones-tabla {
  display: flex;
  gap: 0.4rem;
  justify-content: flex-start;
  flex-wrap: wrap;
}

/* ===== SISTEMA DE PAGINACIÓN MEJORADO ===== */
.paginacion {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.2rem;
  margin-top: 1.6rem;
  padding: 1.2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #f0f0f0;
}

.info-pagina {
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

/* ===== FORMULARIOS MEJORADOS ===== */
.formulario-ruta {
  background: white;
  border-radius: 12px;
  padding: 1.6rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  margin-top: 1.2rem;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #f0f0f0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.2rem;
  margin-bottom: 1.2rem;
}

.form-grupo {
  display: flex;
  flex-direction: column;
}

.form-grupo label {
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: #1a202c;
  font-size: 0.85rem;
}

.form-grupo input,
.form-grupo select,
.form-grupo textarea {
  padding: 0.65rem;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  transition: all 0.25s;
  width: 100%;
  box-sizing: border-box;
  min-height: 40px;
  background: #fafafa;
}

.form-grupo input:focus,
.form-grupo select:focus,
.form-grupo textarea:focus {
  outline: none;
  border-color: #008c3a;
  box-shadow: 0 0 0 3px rgba(0, 140, 58, 0.15);
  background: white;
  transform: translateY(-1px);
}

.form-grupo textarea {
  min-height: 90px;
  resize: vertical;
}

.acciones-formulario {
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
  margin-top: 1.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid #e8e8e8;
}

/* ===== MODAL ESTILOS ===== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  backdrop-filter: blur(5px);
}

.modal-contenido {
  background-color: white;
  margin: 5% auto;
  padding: 0;
  border-radius: 12px;
  width: 90%;
  max-height: 310px;
  max-width: 500px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  animation: modalAppear 0.3s ease-out;
}

@keyframes modalAppear {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid #e8e8e8;
  background: #f8f9fa;
  border-radius: 12px 12px 0 0;
}

.modal-header h3 {
  margin: 0;
  color: #1a202c;
  font-size: 1.2rem;
}

.cerrar-modal {
  font-size: 1.5rem;
  cursor: pointer;
  color: #6c757d;
  transition: color 0.2s;
}

.cerrar-modal:hover {
  color: #dc3545;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
  padding: 1.2rem 1.5rem;
  border-top: 1px solid #e8e8e8;
  background: #f8f9fa;
  border-radius: 0 0 12px 12px;
}

/* ===== MENSAJES DE ESTADO ===== */
.mensaje-exito {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  color: #155724;
  padding: 1rem 1.2rem;
  border-radius: 8px;
  border: 1px solid #c3e6cb;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.mensaje-error {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  color: #721c24;
  padding: 1rem 1.2rem;
  border-radius: 8px;
  border: 1px solid #f5c6cb;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

/* ===== FILTRO DE ESTADO ESPECÍFICO ===== */
#filtroEstado {
  padding: 0.65rem;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: 'Nunito', sans-serif;
  min-height: 40px;
  background: #fafafa;
  width: 100%;
  box-sizing: border-box;
}

#filtroEstado:focus {
  outline: none;
  border-color: #008c3a;
  box-shadow: 0 0 0 3px rgba(0, 140, 58, 0.15);
  background: white;
}

.tabla-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.tabla-header .filtros {
  min-width: 200px;
}

/* ===== FILTRO ÚNICO ===== */
.filtro-unico-simple {
  margin-top: 1rem;
}

.search-container {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 0.8rem;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  background: white;
  box-sizing: border-box;
  max-width: 280px;
  min-height: 48px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.search-input:focus {
  outline: none;
  border-color: #7ba5ff;
  box-shadow: 0 0 0 3px rgba(123, 165, 255, 0.2);
  transform: translateY(-1px);
}

.search-input::placeholder {
  color: #9ca3af;
  font-style: italic;
}