html,body {
    font-family: "Segoe UI", "Roboto", "Helvetica", "Arial", sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f7f7f7;
	
	height: 100%;
	overflow-x: hidden; /* 🔄 evita el scrollbar horizontal */
}

.wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  
  overflow-x: hidden;
  
}

.content {
  flex: 1;
  
  /*align-items: center;
  flex-grow: 1;*/
}

h1 {
	font-size: 1.5rem;
	margin-bottom: 5px;
	margin-top: 5px;
	text-align: center;
}
		
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-radius: 12px;

}

.search-box {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
	
	/*flex: 1;*/
}

.search-box img {
    height: 80px;
    width: auto;
}

.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    flex: 1;
}

.search-form .label-input {
    font-weight: bold;
    font-size: 16px;
    white-space: nowrap;
}

.search-form input[type="text"] {
    padding: 10px;
    border: 2px solid #007bff;
    border-radius: 8px;
    flex: 1;
    min-width: 200px;
    font-size: 16px;
}


.search-form button {
    padding: 10px 20px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 16px;
}


.search-form button:hover {
    background-color: #218838;
}

.result {
    padding-left: calc(80px + 20px); /* tamaño del logo + espacio */
    max-width: 700px;
}

.deuda-total {
    font-size: 18px;
    margin-bottom: 10px;
    color: black;
	font-weight: bold;
}

.nombre-persona {
    font-size: 18px;
    font-weight: bold;
    /*margin: 10px 0 5px 0;*/
    padding-left: calc(80px + 20px); /* Alineado con la parte izquierda (logo + espacio) */
    color: black;
}

.anio-actual {
  margin-top: 10px;
  font-size: 18px;
  font-weight: bold;
  color: black;
 /* padding-left: 10px;*/ /* para alinear con la caja */
}

.deuda-total-anio-actual{
  margin-top: 10px;
  font-size: 18px;
  font-weight: bold;
  color: black;
}

.deudatotalanio, .deudatotal, .nombres, .anioactual {
    color: #007bff;
    font-weight: bold;
}

/*.anio-actual .monto-total {
  font-weight: normal;
  color: #444444;
  margin-left: 8px;
  font-style: italic;
}*/

/* Contenedor de la tabla con bordes redondeados */
.tabla-wrapper {
    border: 2px solid #007bff;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
	
	overflow-x: auto;
	
	/*width: fit-content;*/ /* se ajusta al contenido (la tabla) */
}

.linea {
  border: none;
  border-top: 2px dotted #007bff;
  width: 100%;
  margin: 10px 0;
  
  display: none;
}

.result.mostrar-linea .linea {
	 display: block;
}


/* Mantiene la estructura de tabla */
table {
    width: 100%;
    border-collapse: collapse;
}

/* Cabecera con fondo sobrio */
th {
    background-color: #005b96;
    color: white;
    padding: 10px;
    text-align: center;
    border-right: 1px solid #ffffff; /* Borde entre columnas */
}

/* Última celda de cabecera sin borde derecho */
th:last-child {
    border-right: none;
}

/* Celdas del cuerpo */
td {
    padding: 10px;
    text-align: center;
    border-top: 1px solid #007bff;
    border-right: 1px solid #007bff;
}

/* Última celda de fila sin borde derecho */
td:last-child {
    border-right: none;
}

/* Última fila sin borde inferior opcional (si lo quieres más limpio) */
tbody tr:last-child td {
    border-bottom: none;
}

/*.paginador button {
    flex: 1 1 auto;
    min-width: 100px;
    padding: 10px 0;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    text-align: center;
    transition: background-color 0.3s ease;
}
 display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 100px;
  padding: 10px 0;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s ease;
}*/

.paginador .flecha {
  font-size: 20px;
  font-weight: bold;
  /*line-height: 1;*/
}

/* Mantiene espacio y alineación uniforme entre botones */
/*.paginador {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    margin-top: 10px;
}*/

.paginador {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  /*justify-content: flex-start;*/
  align-items: center; /* 🔹 Esto centra verticalmente todo el contenido */
  margin-top: 20px;
}

.paginador button {
  flex: 0 0 auto;
  width: 140px; /* 🔹 Ajusta según el botón más largo */
  padding: 10px 0;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.3s ease;
}

.pagina-info {
  flex: 0 0 auto;
  font-size: 16px;
  font-weight: bold;
  color: #333;
  /*margin: 0 10px;*/
  white-space: nowrap;
  text-align: center;
}

.paginador button:disabled {
    background-color: #999;
    cursor: not-allowed;
}

footer {
  flex-shrink: 0;
  background-color: #fffff0;
  /*color: white;*/
  text-align: left;
  padding: 10px;
  font-size: 14px;
  width: 100%;
}

.error {
    color: red;
    font-weight: bold;
    margin-top: 10px;
}

/* ===== Responsive (Media Queries) ===== */

@media screen and (max-width: 768px) {
    .search-box {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-form {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .search-form input[type="text"],
    .search-form button {
        width: 100%;
        box-sizing: border-box;
    }

    .result {
        padding-left: 0;
        max-width: 100%;
    }
	
	.nombre-persona {
        padding-left: 0;
    }
}

/* Responsivo para pantallas pequeñas */
@media screen and (max-width: 600px) {
  .tabla-wrapper {
    overflow-x: auto;
  }

  table {
    /*min-width: 400px;*/
    font-size: 14px;
  }

  .search-box {
    flex-direction: column;
    align-items: center;/*flex-start;*/
  }

  .search-form {
    flex-direction: column;
    width: 100%;
  }

  .search-form input[type="text"],
  .search-form button {
    width: 100%;
  }

  .result {
    padding-left: 0;
    width: 100%;
  }
 
  .paginador {
    /*flex-direction: column;
    align-items: stretch;*/
	flex-wrap: wrap; /* permite que pasen a múltiples líneas */
    justify-content: center;
  }
  
  .pagina-info {
	width: 100%;
    text-align: center;
    margin: 10px 0;
  }

  .paginador button {
    width: 100%; /* 🔄 que usen todo el ancho disponible */
  }
  
}


@media screen and (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 15px;
    }

    .search-box img {
        height: 60px;
    }

    th, td {
        font-size: 14px;
    }

    .paginador span {
        font-size: 14px;
    }
	
	h1{
		text-align: center;
	}
}