/* ===========================================================
   app.css — Registro de Horas
   Versión 13.2 — incluye UI principal + modales Eliminar Datos
   =========================================================== */

/* ======= Estilos Básicos ======= */
body {
    font-family: Arial, sans-serif;
    text-align: center;
    background-color: #f8f9fa;
    margin: 0;
    padding: 5px;
}
.container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    max-width: 1000px;
    margin: auto;
}

/* ======= Títulos ======= */
.subtitulo {
    font-size: 20px;
    color: #910000;
    margin: 5px 0;
}
.nombre {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
}

/* ======= Botones Superiores ======= */
.botones-superiores {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 15px;
}
.btn {
    padding: 10px 15px;
    border: none;
    color: white;
    font-size: 14px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}
.descargar {
    background-color: #b2791e;
}
.descargar:hover {
    background-color: #8c6714;
}
.eliminar {
    background-color: #700100;
}
.eliminar:hover {
    background-color: #5b0100;
}
.cerrar {
    background-color: #104182;
}
.cerrar:hover {
    background-color: #082554;
}

/* ======= Sección Alarma ======= */
.alarma-contenedor {
    background: #eaeaea;
    padding: 10px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    max-width: 700px;
    margin: 15px auto;
    border: 2px solid #c4c4c4;
}
.alarma-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 5px;
}
.horas-input {
    padding: 10px;
    width: 200px;
    border: 2px solid #707070;
    border-radius: 5px;
    font-size: 14px;
    text-align: left;
    background: white;
    color: #000;
}
.duracion-input {
    padding: 10px;
    width: 50px;
    border: 2px solid #505050;
    border-radius: 5px;
    font-size: 14px;
    text-align: center;
    background: white;
    color: #000;
    max-width: 80px;
}
.botones-alarma {
    display: flex;
    gap: 10px;
}
.alarma-activar {
    background: #016305;
    width: 100px;
}
.alarma-activar:hover {
    background: #003d01;
}
.alarma-desactivar {
    background: #700100;
    width: 100px;
}
.alarma-desactivar:hover {
    background: #5b0500;
}
.alarma-activar:disabled,
.alarma-desactivar:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ======= Jornadas ======= */
.jornada {
    margin: 20px 0;
}
.jornada .btn {
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    margin: 5px;
}
.jornada .btn:disabled {
    background: #b0b0b0;
    cursor: not-allowed;
}
.iniciar {
    background: #303030;
}
.iniciar:hover {
    background: #000000;
}
.finalizar {
    background: #0056b3;
}
.finalizar:hover {
    background: #003d7a;
}
.detalle-jornada {
    font-size: 18px;
    font-weight: bold;
}
.tiempo-transcurrido {
    font-size: 16px;
    color: #700100;
    font-weight: bold;
}

/* ======= Historial ======= */
.historial-titulo {
    font-size: 26px;
    font-weight: bold;
    margin-top: 30px;
}
.historial {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
.historial th, .historial td {
    border: 2px solid #BABABA;
    padding: 5px;
    text-align: center;
}
.historial th {
    background: darkred;
    color: white;
}
.tiempo {
    font-weight: bold;
    color: blue;
}

/* ======= Resúmenes ======= */
.resumen {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    gap: 15px;
}
.resumen-item {
    background: white;
    padding: 15px;
    border-radius: 10px;
    width: 30%;
    text-align: center;
    font-size: 16px;
    border: 2px solid #d1d1d1;
    box-shadow: 0px 4px 6px rgba(0,0,0,0.1);
}
.resumen-item h3 {
    background: #bababa;
    padding: 10px;
    margin: -15px -15px 10px -15px;
    border-radius: 5px 5px 0 0;
}

/* ======= Banner Alarma ======= */
.banner-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: none;
    z-index: 9998 !important;
}
.alarm-banner {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    background: #fff;
    color: #333;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    width: 300px;
    text-align: center;
    display: none;
    z-index: 9999 !important;
}
.alarm-banner h2 {
    margin-top: 0;
}
.alarm-banner p {
    margin-bottom: 20px;
    line-height: 1.4;
}
.alarm-banner button {
    padding: 8px 16px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
.alarm-banner button:hover {
    background-color: #0056b3;
}

/* ======== MODALES ELIMINAR DATOS v13.2 ======== */
#del-backdrop {
    position: fixed;
    inset: 0;
    display: none;
    background: rgba(0,0,0,.6);
    z-index: 9997;
}
.rha-del-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    background: #fff;
    color: #000;
    width: 380px;
    max-width: 90%;
    padding: 28px 34px;
    border-radius: 10px;
    box-shadow: 0 4px 18px rgba(0,0,0,.35);
    display: none;
    z-index: 9998;
    text-align: center;
}
.rha-del-modal h2 {
    margin: 0 0 15px;
    font-size: 22px;
    font-weight: bold;
}
.rha-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
}
.rha-del-btn {
    display: block;
    width: 100%;
    padding: 12px 10px;
    margin: 6px 0;
    border: none;
    background: #114AD2;
    color: #fff;
    font-size: 15px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background .25s;
}
.rha-del-btn:hover {
    background: #0036aa;
}
.rha-del-btn.grey {
    background: #7A7A7A;
}
.rha-del-btn.grey:hover {
    background: #595959;
}
label {
    display: block;
    text-align: left;
    margin: 12px 0 4px;
    font-weight: bold;
}
.rha-del-modal input,
.rha-del-modal select {
    width: 100%;
    padding: 9px 8px;
    border: 2px solid #C0C0C0;
    border-radius: 6px;
    font-size: 14px;
}
.option-group {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}
.option-group button {
    flex: 1;
}
