/* =========================================================
   PANARIA - FICHAJES
========================================================= */

.pagina-fichajes {
    min-height: 100vh;
}

.contenedor-fichajes {
    max-width: 1180px;
}

.encabezado-fichajes {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.encabezado-fichajes h1 {
    margin-bottom: 4px;
}

.etiqueta-fichajes,
.etiqueta-seccion-fichajes {
    display: inline-block;
    margin-bottom: 5px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.09em;
    color: #8b6a45;
}

.boton-volver-fichajes,
.boton-secundario-fichajes {
    border: 1px solid rgba(74, 58, 49, 0.18);
    border-radius: 10px;
    background: #f7f2eb;
    color: #4a3a31;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.boton-volver-fichajes {
    padding: 10px 15px;
}

.boton-secundario-fichajes {
    padding: 10px 14px;
}

.ficha-fichaje-principal {
    margin-top: 22px;
}

.cabecera-mi-jornada,
.cabecera-seccion-fichajes {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cabecera-mi-jornada h2,
.cabecera-seccion-fichajes h2 {
    margin: 0;
}

.estado-jornada {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 110px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.estado-sin-iniciar {
    background: #eee9e4;
    color: #66584f;
}

.estado-trabajando {
    background: #e6f5e8;
    color: #286238;
}

.estado-finalizada {
    background: #eee5d6;
    color: #725326;
}

.grid-resumen-fichaje {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 18px;
}

.dato-fichaje {
    padding: 14px;
    border: 1px solid rgba(74, 58, 49, 0.11);
    border-radius: 12px;
    background: rgba(255,255,255,0.70);
}

.dato-fichaje span {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    color: #7b6d63;
}

.dato-fichaje strong {
    font-size: 18px;
    color: #4a3a31;
}

.acciones-fichaje {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 18px;
}

.boton-fichaje {
    min-height: 54px;
    padding: 13px 18px;
    border: 0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
}

.boton-fichaje:disabled {
    cursor: not-allowed;
    opacity: 0.42;
}

.boton-entrada {
    background: #4a3a31;
    color: #fff;
}

.boton-salida {
    background: #d8b16c;
    color: #3c2f27;
}

.nota-ubicacion-fichaje {
    margin: 14px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: #7a6d64;
}

.aviso-contexto-dia {
    margin-top: 15px;
    padding: 11px 13px;
    border-radius: 10px;
    background: #fff3d7;
    color: #644b2f;
    font-weight: 750;
    font-size: 13px;
}

.lista-fichajes {
    display: grid;
    gap: 8px;
    margin-top: 15px;
}

.fichaje-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(74, 58, 49, 0.10);
    border-radius: 11px;
    background: #fff;
}

.fichaje-item-principal {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.icono-tipo-fichaje {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f1ebe4;
}

.fichaje-item strong {
    display: block;
}

.fichaje-item small {
    display: block;
    margin-top: 2px;
    color: #82756c;
}

.ubicacion-fichaje {
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.ubicacion-dentro {
    background: #e4f4e7;
    color: #286238;
}

.ubicacion-cerca {
    background: #fff1d2;
    color: #76511f;
}

.ubicacion-fuera {
    background: #fae4e4;
    color: #8b3434;
}

.ubicacion-no_fiable,
.ubicacion-sin_ubicacion,
.ubicacion-sin_configurar {
    background: #ece9e6;
    color: #6c625b;
}

.texto-fichajes-vacio {
    color: #7f736c;
}

.panel-gestor-fichajes {
    margin-bottom: 40px;
}

.cabecera-gestor-fichajes {
    align-items: flex-start;
}

.estado-configuracion-local {
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f5f1ec;
    font-size: 13px;
    color: #65584f;
}

.barra-filtro-fichajes {
    display: flex;
    align-items: end;
    gap: 10px;
    margin-top: 16px;
}

.barra-filtro-fichajes label {
    display: grid;
    gap: 5px;
    font-size: 12px;
    font-weight: 800;
}

.barra-filtro-fichajes input {
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid rgba(74, 58, 49, 0.20);
    border-radius: 9px;
    background: #fff;
}

.tabla-fichajes-contenedor {
    width: 100%;
    overflow-x: auto;
    margin-top: 16px;
}

.tabla-fichajes {
    width: 100%;
    border-collapse: collapse;
    min-width: 660px;
}

.tabla-fichajes th,
.tabla-fichajes td {
    padding: 10px;
    border-bottom: 1px solid rgba(74, 58, 49, 0.09);
    text-align: left;
    vertical-align: middle;
}

.tabla-fichajes th {
    font-size: 11px;
    letter-spacing: 0.04em;
    color: #75685f;
}

.boton-corregir-fichaje {
    padding: 7px 9px;
    border: 1px solid rgba(74, 58, 49, 0.15);
    border-radius: 8px;
    background: #f6f1eb;
    color: #4a3a31;
    font-weight: 800;
    cursor: pointer;
}

.marca-corregido {
    display: inline-block;
    margin-left: 6px;
    font-size: 10px;
    color: #8b6a45;
}

.modal-fichaje-fondo {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(32, 25, 21, .48);
}

.modal-fichaje {
    width: min(470px, 100%);
    padding: 20px;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 18px 60px rgba(0,0,0,.20);
}

.cabecera-modal-fichaje {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.cabecera-modal-fichaje h2 {
    margin: 0;
}

.cabecera-modal-fichaje button {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #eee8e2;
    font-size: 22px;
    cursor: pointer;
}

.modal-fichaje label {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
    font-weight: 800;
    font-size: 13px;
}

.modal-fichaje input,
.modal-fichaje textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid rgba(74, 58, 49, .20);
    border-radius: 9px;
    font: inherit;
}

@media (max-width: 720px) {

    .encabezado-fichajes,
    .cabecera-mi-jornada,
    .cabecera-seccion-fichajes {
        align-items: stretch;
    }

    .grid-resumen-fichaje {
        grid-template-columns: 1fr 1fr;
    }

    .acciones-fichaje {
        grid-template-columns: 1fr;
    }

    .fichaje-item {
        grid-template-columns: 1fr;
    }

    .ubicacion-fichaje {
        width: fit-content;
    }

    .cabecera-gestor-fichajes {
        flex-direction: column;
    }

    .barra-filtro-fichajes {
        align-items: stretch;
        flex-direction: column;
    }
}


/* =========================================================
   ADMIN / JEFAS - RESUMEN SEMANAL
========================================================= */

.resumen-semanal-gestor {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(74, 58, 49, 0.10);
}

.resumen-semanal-gestor h3 {
    margin: 0;
    color: #4a3a31;
}

.grid-resumen-semanal-empleados {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.tarjeta-horas-empleado {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 14px;
    border: 1px solid rgba(74, 58, 49, 0.11);
    border-radius: 11px;
    background: rgba(255,255,255,.82);
}

.tarjeta-horas-empleado strong {
    display: block;
    color: #4a3a31;
}

.tarjeta-horas-empleado > span {
    font-weight: 900;
    color: #4a3a31;
    white-space: nowrap;
}

.estado-trabajando-mini {
    display: inline-block;
    margin-top: 4px;
    padding: 3px 6px;
    border-radius: 999px;
    background: #e6f5e8;
    color: #286238;
    font-size: 10px;
    font-weight: 800;
}
