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

.header-logo {
    text-align: center;
    margin: 20px 0;
}

.header-logo img {
    height: 80px;
}

.top-controls {
    text-align: center;
    margin-bottom: 20px;
}

/* Botones */
.btn-action {
    margin: 5px;
    padding: 8px 15px;
    background-color: rgb(0, 25, 52);
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

.btn-action:hover {
    background-color: #0056b3;
}

/* Modales */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Tabla */
.table {
    background-color: white;
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
}

.table th, .table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
    white-space: nowrap; /* Evita que el contenido se corte */
}

.table th {
    background-color: #007BFF;
    color: white;
}

/* Inputs */
input[type="text"], input[type="time"], select {
    padding: 8px;
    margin: 5px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

input[type="file"] {
    margin-top: 10px;
}

.form-control {
    width: 100%;
    padding: 8px;
    margin: 5px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.mt-2 {
    margin-top: 10px;
}

/* Botones de acción */
.action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    color: #007BFF;
    font-size: 20px;
    cursor: pointer;
    transition: color 0.3s ease;
    text-decoration: none;
    padding: 0;
}

.action-button i {
    font-size: 20px;
}

.action-button:hover {
    color: #0056b3;
}

.action-button.delete {
    color: #dc3545;
}

.action-button.delete:hover {
    color: #c82333;
}

/* Índice alfabético */
.alphabet-index {
    text-align: center;
    margin: 10px 0 20px;
}

.alphabet-index a {
    font-weight: bold;
    text-decoration: none;
    color: #007BFF;
    margin: 0 5px;
    transition: color 0.3s ease;
}

.alphabet-index a:hover {
    color: #0056b3;
}

.alphabet-index a.selected {
    color: white;
    background-color: #007BFF;
    padding: 3px 6px;
    border-radius: 3px;
}

/* Paginación */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 20px 0;
    padding: 0;
    list-style: none;
}

.pagination a {
    padding: 8px 12px;
    text-decoration: none;
    border: 1px solid #ddd;
    color: #007BFF;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.pagination a:hover {
    background-color: #007BFF;
    color: white;
}

.pagination a.current {
    background-color: #007BFF;
    color: white;
    pointer-events: none;
    font-weight: bold;
}

/* Dropdown de ordenación */
.sort-button {
    width: 100%;
    padding: 8px 12px;
    background-color: #007BFF;
    color: white;
    border: none;
    cursor: pointer;
    text-align: left;
    border-radius: 5px;
    font-weight: bold;
}

.sort-button:hover {
    background-color: #0056b3;
}

.sort-options {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 100;
    min-width: 160px;
    border-radius: 5px;
    overflow: hidden;
}

.sort-options a {
    display: block;
    padding: 8px 12px;
    text-decoration: none;
    color: #007BFF;
    transition: background 0.3s ease;
}

.sort-options a:hover {
    background: #f1f1f1;
}

.sort-options.show {
    display: block;
}

/* ========== RESPONSIVE: TABLETS Y MÓVILES ========== */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    .top-controls {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .top-controls input {
        width: 100%;
        padding: 14px;
        font-size: 16px;
    }

    .buttons-container {
        display: flex;
        justify-content: flex-start;
        overflow-x: auto;
        gap: 10px;
        padding: 5px 0;
    }

    .action-button {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }

    .alphabet-index {
        overflow-x: auto;
        white-space: nowrap;
        gap: 8px;
        justify-content: flex-start;
        padding: 8px 0;
    }

    .alphabet-index a {
        font-size: 14px;
        padding: 6px 10px;
    }

    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border: 1px solid #ddd;
        border-radius: 5px;
    }

    table {
        width: 100%;
        min-width: 600px;
        font-size: 14px;
    }

    th, td {
        padding: 10px;
        white-space: nowrap;
    }

    .pagination {
        display: flex;
        justify-content: flex-start;
        overflow-x: auto;
        white-space: nowrap;
        gap: 8px;
    }

    .pagination a {
        padding: 6px 12px;
        font-size: 14px;
    }
}

/* ========== RESPONSIVE: MÓVILES PEQUEÑOS ========== */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .top-controls input {
        font-size: 14px;
        padding: 12px;
    }

    .action-button {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }

    .alphabet-index a {
        font-size: 12px;
        padding: 4px 6px;
    }

    table {
        font-size: 12px;
    }

    th, td {
        padding: 8px;
    }

    .pagination a {
        font-size: 12px;
        padding: 5px 10px;
    }
}










/* Para móviles, aún más exagerado */
@media (max-width: 768px) {
    body {
        background-color: cyan !important;  /* FONDO TURQUESA EN MÓVIL */
    }

    .table th, .table td {
        font-size: 28px !important;  /* TEXTO ENORME EN MÓVIL */
        padding: 30px !important;
    }

    .action-button {
        width: 80px !important;  /* BOTONES ENORMES */
        height: 80px !important;
        font-size: 32px !important;
    }
}


@media (max-width: 768px) {
    body {
        background-color: lime !important;
    }

    table {
        font-size: 24px !important;
    }
}
