/* ----------------- IMPORTACIÓN ----------------- */
@import url('https://cdn.jsdelivr.net/npm/purecss@2.0.6/build/pure-min.css');


/* ----------------- ESTILOS GENERALES ----------------- */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 20px;
}


/* ----------------- CONTENEDORES ----------------- */
.container-plugin {
    width: 80%;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}


/* ----------------- ENCABEZADOS ----------------- */
h3 {
    color: #333;
    border-bottom: 2px solid #0078e7;
    padding-bottom: 10px;
    margin-bottom: 20px;
}


/* ----------------- SECCIÓN DE USUARIO ----------------- */
.user-data {
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 20px;
}

.user-data ul {
    list-style: none;
    padding: 0;
}

.user-data ul li {
    padding: 8px;
    border-bottom: 1px solid #ddd;
}

.user-data ul li:last-child {
    border-bottom: none;
}


/* ----------------- BOTONES ----------------- */
.pure-button {
    padding: 10px 15px;
    font-size: 14px;
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
    text-decoration: none;
}

.pure-button-primary {
    background: #0078e7;
    color: white;
}

.pure-button-primary:hover {
    background: #005bb5;
}

.pure-button-danger {
    background: #dc3545;
    color: white;
}

.pure-button-danger:hover {
    background: #c82333;
}

.pure-button-secondary {
    background: #6c757d;
    color: white;
}

.pure-button-success {
    background: #28a745;
    color: white;
}

.pure-button-warning {
    background: #ffc107;
    color: black;
}

.pure-button.pure-button-warning {
    background-color: #ffc107 !important;
    color: #000 !important;
    border: 1px solid #e0a800 !important;
    font-weight: bold;
}


/* ----------------- FORMULARIOS ----------------- */
.pure-form input,
.pure-form select,
.pure-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.pure-form button {
    margin-top: 10px;
}


/* ----------------- TABLAS ----------------- */
.pure-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
     font-size: 15px;
}

.pure-table thead {
    background-color: #0078e7 !important;
    color: white !important;
}

.pure-table th {
    font-weight: bold;
    text-align: center;
}


.pure-table th, .pure-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: center;
    white-space: normal; /* ← permite saltos de línea */
    word-wrap: break-word;
    word-break: break-word;
    vertical-align: middle;
}


.pure-table tbody tr:hover {
    background-color: #f1f1f1;
}


/* ----------------- ACCIONES EN TABLAS ----------------- */
td.acciones {
    width: 1%;
    white-space: nowrap;
    padding: 0;
    text-align: center;
    vertical-align: middle;
}

td.acciones .acciones {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 4px;
}

td.acciones .acciones a.pure-button {
    padding: 4px 6px;
    font-size: 12px;
    min-width: 24px;
    text-align: center;
    line-height: 1;
}


/* ----------------- INPUTS EN TABLAS ----------------- */
.pure-table input[type="datetime-local"] {
    width: 100%;
    box-sizing: border-box;
    padding: 5px;
}

tr td form > div {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}

tr td form input[type="datetime-local"] {
    width: 100%;
    max-width: 180px;
}


/* ----------------- ESTADOS Y ALERTAS ----------------- */
.alert {
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.resaltado-edicion {
    background-color: #c3f3cd !important;
    transition: background-color 1s ease;
}


/* ----------------- CAMPOS Y COLORES PERSONALIZADOS ----------------- */
.fondo-claro {
    background-color: #f9f9f9;
}

.fondo-oscuro {
    background-color: #e0e0e0;
}


/* ----------------- BOTÓN GUARDAR EN EDICIÓN ----------------- */
.fila-editar .guardar-btn {
    visibility: visible;
    opacity: 0.6;
    pointer-events: none;
}

.fila-editar .guardar-btn:not([disabled]) {
    opacity: 1;
    pointer-events: auto;
}


/* ----------------- BARRA DE ADMINISTRACIÓN ----------------- */
#wpadminbar {
    display: none;
}




/* ----------------- EXTRAS ----------------- */
.registro-form {
    text-align: center;
    margin-bottom: 20px;
}

.botonera-filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.resumen-horas {
    font-size: 18px;
    color: #333;
    text-align: center;
}


/* ----------------- AJUSTES DE COLUMNAS PARA TABLAS ----------------- */
/* Para revisión de los trabajadores */
table.pure-table th:nth-child(1),
table.pure-table td:nth-child(1) {
    width: 180px;
}

table.pure-table th:nth-child(2),
table.pure-table td:nth-child(2) {
    width: 180px;
}

table.pure-table th:nth-child(3),
table.pure-table td:nth-child(3) {
    width: 140px;
}

table.pure-table th:nth-child(4),
table.pure-table td:nth-child(4) {
    width: 140px;
}

table.pure-table th:nth-child(5),
table.pure-table td:nth-child(5) {
    width: 110px;
}


/* ----------------- VER CONTRASEÑA ----------------- */
#toggle-password {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.8em;
    color: #888;
    text-decoration: none;
}

#toggle-password:hover {
    text-decoration: underline;
    color: #555;
}

.campo-centro {
    max-width: 320px;
    margin: 0 auto 15px auto;
}

.campo-centro input {
    width: 100%;
    padding: 15x;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
}


/* Filtros centrados */
.filtros-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

/* ----------------- RESPONSIVE ----------------- */


/* filtros más pequeños en móvil */
@media (max-width: 600px) {
    .filtros-container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
        margin: 0 auto;
        padding: 0 10px;
    }

    .filtros-container button {
        flex: 1 1 auto;
        font-size: 12px;
        padding: 5px 8px;
        margin: 2px;
        min-width: 100px;
        max-width: 100%;
    }

    .tabla-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }

    .tabla-responsive table {
    width: 100%;
    table-layout: auto;
}

    .pure-table {
    font-size: 7.5px;
}

.tabla-responsive table {
    width: 100%;
    table-layout: fixed;
}

.tabla-responsive th,
.tabla-responsive td {
    white-space: normal;
    word-wrap: break-word;
    word-break: break-word;
}

.tabla-responsive th:first-child,
.tabla-responsive td:first-child {
    width: 1%;
    white-space: nowrap;
}
.observacion-fila {
        flex-direction: column;
        align-items: stretch;
    }

    .observacion-fila input,
    .observacion-fila button {
        width: 100%;
    }


}

/*@media (max-width: 768px) {
    .container-plugin {
        width: 95%;
        padding: 15px;
    }

    .pure-button {
        width: 100%;
        text-align: center;
    }

    .botonera-filtros {
        flex-direction: column;
        align-items: center;
    }
}
*/

.tabla-responsive th:first-child,
.tabla-responsive td:first-child {
    width: 30px !important;
    max-width: 30px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.form-observacion fieldset {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.observacion-fila {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap; /* Permite saltos si no cabe */
}

.observacion-fila input[type="date"] {
    flex: 1 1 auto;
    min-width: 120px;
    max-width: 100%;
}

.observacion-fila button {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 8px 12px;
    width: auto;
}


.tabla-solicitudes td:last-child,
.tabla-solicitudes th:last-child {
    min-width: 120px;
    white-space: nowrap;
}

.tabla-solicitudes th,
.tabla-solicitudes td {
    word-break: break-word;
    white-space: normal;
    vertical-align: middle;
    text-align: center;
}

.tabla-solicitudes td:nth-child(3),
.tabla-solicitudes th:nth-child(3),
.tabla-solicitudes td:nth-child(4),
.tabla-solicitudes th:nth-child(4),
.tabla-solicitudes td:nth-child(6),
.tabla-solicitudes th:nth-child(6) {
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ----------------- PESTAÑAS PURECSS ----------------- */
#tabs-panel {
    margin-bottom: 20px;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

#tabs-panel button {
    font-weight: bold;
    min-width: 120px;
    text-align: center;
    cursor: pointer;
    border-radius: 5px;
}

.contenidos-gestion .contenido-tab {
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #fff;
}


.filtros-puntos {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin: 30px auto;
}

.widget-filtro {
    cursor: pointer;
    border-radius: 12px;
    padding: 25px 30px;
    text-align: center;
    flex: 1 1 200px;
    min-width: 180px;
    max-width: 250px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 18px;
    font-weight: 600;
}

.widget-filtro span {
    display: block;
}

.widget-filtro:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.azul {
    background: #e6f3ff;
    border: 2px solid #3399ff;
    color: #003366;
}

.verde {
    background: #e8fff0;
    border: 2px solid #33cc66;
    color: #1a472a;
}

.naranja {
    background: #fff3e0;
    border: 2px solid #ffaa33;
    color: #8a4b00;
}
</style>
