/* =========================
   RESET BÁSICO
========================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Tahoma, sans-serif;
}

body {
  font-family: Arial, sans-serif;
  background-color: #121212; /* Color de respaldo si la imagen no carga */
  color: #eee;
  display: flex; /* Usa flexbox para el diseño */
  flex-direction: column; /* Apila los elementos hijos verticalmente */
  align-items: center; /* Centra los elementos hijos horizontalmente */
  min-height: 100vh; /* Asegura que el body ocupe al menos el 100% de la altura de la ventana */
  margin: 0; /* Elimina el margen predeterminado del navegador */
}

/* Pseudo-elemento para el fondo desenfocado */
body::before {
  content: "";
  position: fixed; /* Fijo para que cubra toda la pantalla y no se desplace */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* Lo posiciona detrás de todo el contenido */
  background-image: url("../img/fondo.jpg");
  background-size: cover;
  background-position: center;
  /* Efecto de desenfoque gaussiano de 5px */
  filter: blur(5px);
  /* Evita bordes borrosos en los extremos */
  transform: scale(1.05);
}

/* =========================
   HEADER
========================= */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: #020617;
  border-bottom: 1px solid #1e293b;
}

header h1 {
  font-size: 1.4rem;
}

header span {
  margin-right: 12px;
  font-size: 0.9rem;
  color: #cbd5f5;
}

/* =========================
   BOTONES BASE
========================= */
button,
a.btn-volver,
a.btn-ingresar,
a.btn-historial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.9rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
}

/* =========================
   BOTÓN VOLVER
========================= */
.btn-volver {
  background: #1e3a8a;
  color: #fff;
  min-width: 120px;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.45);
}

.btn-volver:hover {
  box-shadow: 0 0 18px rgba(59, 130, 246, 0.9);
  transform: translateY(-1px);
}

/* =========================
   FORM BUSCADOR
========================= */
.form-section {
  padding: 20px;
}

.search-input-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 600px;
}

.search-input-group input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #020617;
  color: #fff;
}

.search-input-group input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.search-input-group button {
  background: #2563eb;
  color: #fff;
  padding: 10px 22px;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
}

.search-input-group button:hover {
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.9);
  transform: translateY(-1px);
}

/* =========================
   CONTENEDOR
========================= */
.contenedor {
  padding: 20px;
}

/* =========================
   TABLA
========================= */
.tabla-section {
  background: #020617;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.6);
}

.tabla-section h3 {
  margin-bottom: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid #1e293b;
  text-align: center;
}

th {
  background: #020617;
  color: #93c5fd;
}

tr:hover {
  background: #020617;
}

/* =========================
   BOTONES DE ACCIÓN
========================= */
.btn-ingresar {
  background: #15803d;
  color: #fff;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

.btn-ingresar:hover {
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.9);
}

.btn-historial {
  background: #9333ea;
  color: #fff;
  margin-left: 6px;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}

.btn-historial:hover {
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.9);
}

.btn-disabled {
  padding: 8px 14px;
  background: #334155;
  color: #94a3b8;
  border-radius: 8px;
  font-size: 0.85rem;
}

/* =========================
   PAGINACIÓN (Siguiente / Anterior)
========================= */
.pagination {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.pagination a {
  padding: 10px 18px;
  background: #1e40af;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
  transition: all 0.25s ease;
}

.pagination a:hover {
  box-shadow: 0 0 22px rgba(59, 130, 246, 1);
  transform: translateY(-2px);
}

.pagination a.active {
  background: #3b82f6;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .search-input-group {
    flex-direction: column;
  }

  table {
    font-size: 0.75rem;
  }

  td,
  th {
    padding: 6px;
  }
}
