.pagination {
  flex-wrap: wrap !important;
  gap: 4px;
  justify-content: center;
}

.pagination .page-item { margin: 2px; }

.pagination .page-link {
  padding: 6px 12px;
  border-radius: 5px;
  color: #1f385e;
  text-decoration: none;
}

.pagination .page-link:hover {
  background-color: #1f385e;
  color: #fff;
}

.pagination .page-item.active .page-link {
  background-color: #1f385e;
  border-color: #1f385e;
  color: #fff !important;
}

.pagination .page-item.active .page-link:hover {
  background-color: #cf9957;
  border-color: #cf9957;
  color: #fff !important;
}

.table thead th {
  background-color: #1f385e;
  color: #fff;
}

/* 🔧 AQUÍ FALTABA LA LLAVE */
#filters {
  display: none; /* Estilos para móviles */
}

/* Tarjetas móviles */
.mobile-result-card {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.mobile-result-card:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.clickable-data {
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 4px;
  padding: 2px 4px;
}

.clickable-data:hover {
  background-color: rgba(31, 56, 94, 0.1);
  transform: scale(1.02);
}

.copy-success {
  background-color: #d1e7dd !important;
  animation: pulse 0.5s ease-in-out;
}

/* ✅ Tabla realmente responsive en móvil */
.table-responsive {
  overflow-x: auto;              /* fuerza scroll horizontal si hace falta */
  -webkit-overflow-scrolling: touch;
}

.break-anywhere {                /* para emails o textos largos */
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Mejoras para tabla y paginación en pantallas chicas */
@media (max-width: 767.98px) {
  .table-responsive { font-size: 0.875rem; }
  .pagination { font-size: 0.875rem; }
  .pagination .page-link { padding: 0.375rem 0.5rem; }
}

/* Ocultar columnas poco críticas en celulares muy chicos (<576px) */
@media (max-width: 575.98px) {
  .hide-on-small { display: none !important; }
}

/* Iconos y badges en tarjetas móviles */
.mobile-result-card .bi { margin-right: 0.5rem; }
.mobile-result-card .badge { font-size: 0.75rem; margin-right: 0.25rem; }

/* Badge Red Interna discreto */
#ipInfo .badge {
  font-size: 0.75rem;
  opacity: 0.9;
  border: 1px solid rgba(207, 153, 87, 0.3);
}

/* Esquema de colores personalizado */
:root {
  --color-principal: #1f385e;
  --color-secundario: #cf9957;
  --color-principal-claro: rgba(31, 56, 94, 0.1);
  --color-secundario-claro: rgba(207, 153, 87, 0.1);
}

/* Elementos con color secundario */
.btn-secondary, .text-secondary {
  background-color: var(--color-secundario) !important;
  border-color: var(--color-secundario) !important;
  color: white !important;
}

/* Celdas clicables */
#results td { transition: all 0.2s ease; }
#results td:hover {
  background-color: rgba(31, 56, 94, 0.1) !important;
  transform: scale(1.02);
}

/* Animaciones copy */
.table-success { background-color: #d1e7dd !important; animation: pulse 0.5s ease-in-out; }

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Notificación de copia */
.copy-notification { animation: slideIn 0.3s ease-out; }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

#paginator { max-width: 100%; }

/* Ajuste fino extra para paginación en móvil */
@media (max-width: 768px) {
  .pagination .page-link {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
  }
}


/* Fix puntual para el área de resultados en móvil */
@media (max-width: 767.98px) {
  #resultTable .d-none.d-md-block { display: none !important; }
  #resultTable .d-block.d-md-none { display: block !important; }
  /* Cinturón y tirantes: si igual se llegara a ver la tabla, ocultamos el thead */
  #resultTable .table-responsive thead { display: none !important; }
}

/* Evitar desbordes por cadenas largas (emails, etc.) */
#resultTable .break-anywhere {
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Scroll horizontal suave si hiciera falta */
#resultTable .table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Ocultar columnas poco críticas en móviles muy chicos */
@media (max-width: 575.98px) {
  #resultTable .hide-on-small { display: none !important; }
}
