@import url('https://fonts.googleapis.com/css2?family=Segoe+UI:wght@400;600;700&display=swap');

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    margin: 20px;
}

.container {
    max-width: 1400px;
    margin: auto;
    background-color: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* --- Header --- */
header {
    /*background-color: #006666;*/
    background-color: rgb(105, 28, 50);
    color: white;
    padding: 15px 25px;
    border-bottom: 5px solid #004d4d;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-text h1 {
    font-size: 1em;
    font-weight: normal;
    margin: 0;
}

.header-text h2 {
    font-size: 1.5em;
    margin: 5px 0 0 0;
}

.header-logo img {
    height: 60px;
}

/* --- Main Content & Filters --- */
main {
    padding: 20px 25px;
}

td {
    white-space: pre-line; /* Esto respetará los saltos de línea originales de forma ordenada */
    vertical-align: middle;
}

.filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 20px;
    padding: 20px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    margin-bottom: 20px;
}

.filter-group, .filter-group-right {
    display: flex;
    flex-direction: column;
}

.filter-group-right {
    grid-column: 1 / -1; /* Ocupa todo el ancho */
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #ddd;
    padding-top: 15px;
    margin-top: 10px;
}

label {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9em;
}

label .note {
    font-weight: normal;
    color: #666;
}

.button-group button {
    padding: 10px 15px;
    border: 1px solid #ccc;
    background-color: #e9e9e9;
    cursor: pointer;
    font-size: 0.9em;
}

.button-group button.active {
    /*background-color: #008080;*/
    background-color: rgb(188, 149, 92);

    color: white;
    border-color: #006666;
}

select, input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Importante para que el padding no afecte el ancho */
}

.search-box {
    display: flex;
}

.search-box input {
    border-right: none;
    border-radius: 4px 0 0 4px;
}

.search-box button {
    padding: 10px 15px;
    border: 1px solid #ccc;
    background-color: #e9e9e9;
    cursor: pointer;
    border-left: none;
    border-radius: 0 4px 4px 0;
}

.clear-filters {
    background-color: #a57f2c;
    border: 1px solid #ccc;
    padding: 8px 15px;
    cursor: pointer;
    font-weight: 600;
    color: whitesmoke;
}

/* --- Results Table --- */
.results-table {
    overflow-x: auto; /* Para tablas muy anchas en pantallas pequeñas */
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

th, td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

thead th {
    background-color: #e9e9e9;
    font-weight: 700;
    color: #333;
}

tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

tbody tr:hover {
    background-color: #f1f1f1;
}

td a {
    color: #006666;
    font-size: 1.2em;
    text-decoration: none;
}

td:nth-child(1), td:nth-child(3), td:nth-child(4) {
    white-space: nowrap; /* Evita que el contenido de estas celdas se parta */
}
td:nth-child(5), td:nth-child(6) {
    text-align: center;
}

/* --- Footer --- */
footer {
    border-top: 1px solid #ddd;
    padding-top: 15px;
    margin-top: 20px;
    font-size: 0.85em;
    color: #555;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

footer p {
    margin: 0;
    max-width: 70%;
}

.pagination {
            display: flex;
            justify-content: center;
            gap: 8px;
            margin: 25px 0;
            flex-wrap: wrap;
            align-items: center;
        }

        .pagination button {
            padding: 8px 16px; /* Un poco más de espacio lateral */
            border: 1px solid #003366;
            background-color: white;
            color: #003366;
            cursor: pointer;
            border-radius: 4px;
            font-weight: bold;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        /* Estilo para botones deshabilitados (cuando ya no hay más páginas) */
        .pagination button:disabled {
            border-color: #ccc;
            color: #999;
            cursor: not-allowed;
            background-color: #f9f9f9;
        }

        .pagination button.active {
            background-color: #003366 !important;
            color: white !important;
            transform: scale(1.05);
        }