body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
    color: #333;
}

.container {
    width: 90%; /* Ajustado para usar más espacio en pantallas grandes */
    max-width: 1200px; /* Tamaño máximo para mejorar la legibilidad en pantallas grandes */
    margin: auto;
    overflow: hidden;
}

header {
    background: #333;
    color: #fff;
    padding: 15px 20px; /* Aumentado para mejor espaciado */
    min-height: 70px;
    border-bottom: #bbb 1px solid;
}

header a {
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 16px;
}

.main-content {
    margin: 20px 0;
    background: #fff;
    padding: 20px;
    border-radius: 8px; /* Esquinas más redondeadas */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

h1, h2 {
    color: #333;
}

form {
    margin: 20px 0;
}

input[type="submit"], input[type="number"] {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

.btn {
    display: inline-block; /* Cambiado para estar en línea con otros elementos */
    padding: 10px 20px; /* Aumentado para mejor visibilidad */
    background: #333;
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
}

.btn:hover {
    background: #555;
}

.top-right {
    text-align: right;
    padding: 10px;
}

.scrollable-table {
    overflow-x: auto;
    display: block;
    white-space: nowrap;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin: 20px 0;
    table-layout: fixed; /* Fijo para evitar el desplazamiento horizontal */
}

th, td {
    padding: 12px; /* Aumentado para mejor espaciado */
    border: 1px solid #ddd;
    text-align: left;
    word-wrap: break-word; /* Asegura que el texto largo se ajuste */
}

th {
    background-color: #f4f4f4;
}

thead th {
    position: sticky;
    top: 0;
    background: #f4f4f4;
    z-index: 1; /* Para que los encabezados se mantengan visibles al hacer scroll */
}

/* Estilo para el modal (si lo necesitas) */
#editModal {
    display: none;
    position: fixed;
    top: 20%;
    left: 20%;
    width: 60%;
    background: white;
    padding: 20px;
    border: 1px solid #ccc;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

#editModal button {
    margin-right: 10px;
}

/* Estilo para las tarjetas de resultado */
.results-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* Espacio entre tarjetas */
}

.result-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px; /* Esquinas redondeadas */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 100%; /* Asegura que la tarjeta ocupe el ancho completo en pantallas pequeñas */
    box-sizing: border-box; /* Incluye padding y border en el cálculo del width */
}

.field {
    margin-bottom: 10px;
}

.field strong {
    display: block; /* Asegura que los labels de los campos estén en líneas separadas */
}

.actions {
    margin-top: 20px;
}

.actions .btn {
    display: inline-block;
    margin-right: 10px; /* Espacio entre botones de acción */
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .container {
        width: 95%; /* Ajustar para pantallas pequeñas */
    }

    table, thead, tbody, th, td, tr {
        display: block;
    }

    th {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        border: 1px solid #ccc;
        margin-bottom: 10px;
        display: block;
    }

    td {
        border: none;
        position: relative;
        padding-left: 50%;
        text-align: right;
        white-space: nowrap;
    }

    td::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
    }
}
