﻿/* Reporte general y estados */
.reporte-asistencia-fondo {
    position: static;
    width: 100%;
    min-width: 0;
    background: #fff;
}

.reporte-asistencia-pagina {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    color: #203e64;
}

.reporte-volver {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 18px;
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: #850b29;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

/* UNIDAD */

.reporte-unidad {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px;
    border: 1px solid #f2d7b7;
    border-radius: 10px;
    background: linear-gradient(110deg, #fff8ee, #f9ead6);
}

.reporte-unidad-icono {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 65px;
    flex: 0 0 70px;
    border-radius: 11px;
    background: #ed9409;
    color: #fff;
    font-size: 27px;
    box-shadow: 0 5px 12px rgba(180, 100, 0, .15);
}

.reporte-unidad-texto > span {
    color: #d47700;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .7px;
}

.reporte-unidad-texto h2 {
    margin: 7px 0;
    color: #18365f;
    font-size: 19px;
    font-weight: 800;
}

.reporte-separador {
    padding: 0 7px;
    color: #bd9a78;
    font-weight: 400;
}

.reporte-unidad-texto p {
    margin: 0;
    color: #6b819e;
    font-size: 12px;
}

/* ENCABEZADO */

.reporte-encabezado {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0 16px;
}

.reporte-titulo-grupo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reporte-titulo-icono {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 9px;
    background: #fae9ed;
    color: #8d0b2b;
    font-size: 19px;
}

.reporte-titulo-grupo h2 {
    margin: 0;
    color: #69091f;
    font-size: 21px;
    font-weight: 800;
}

.reporte-titulo-grupo p {
    margin: 5px 0 0;
    color: #69809d;
    font-size: 13px;
}

/* FILTROS */

.reporte-filtros {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px;
    border: 1px solid #eeded6;
    border-radius: 9px;
    background: #fffdfb;
}

.reporte-campo {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 150px;
}

.reporte-campo-busqueda {
    flex: 1 1 260px;
}

.reporte-campo label {
    color: #365274;
    font-size: 11px;
    font-weight: 700;
}

.reporte-campo input {
    width: 100%;
    min-height: 37px;
    padding: 8px 10px;
    border: 1px solid #d8e0e9;
    border-radius: 7px;
    background: #fff;
    color: #25466d;
    font-size: 12px;
}

.reporte-btn-limpiar,
.reporte-btn-excel,
.reporte-reintentar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 37px;
    padding: 8px 12px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.reporte-btn-limpiar {
    border: 1px solid #e7c9c2;
    background: #fff;
    color: #870b29;
}

.reporte-btn-excel {
    border: 1px solid #16803e;
    background: #16803e;
    color: #fff;
}

    .reporte-btn-excel:disabled {
        opacity: .55;
        cursor: not-allowed;
    }

.reporte-reintentar {
    border: 1px solid #e8b9bd;
    background: #fff;
    color: #a91c32;
}

/* LEYENDA */

.reporte-leyenda {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin: 14px 0;
    padding: 12px 14px;
    border: 1px solid #eeded6;
    border-radius: 8px;
    background: #fffdfb;
    color: #365274;
    font-size: 12px;
}

    .reporte-leyenda > strong {
        color: #760b26;
    }

    .reporte-leyenda > span {
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }

/* PANEL Y TABLA */

.reporte-panel {
    overflow: hidden;
    border: 1px solid #ebdfdc;
    border-radius: 9px;
    background: #fff;
}

.reporte-panel-cabecera {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 13px 15px;
    background: #760b26;
    color: #fff;
    font-size: 14px;
}

    .reporte-panel-cabecera span {
        font-size: 12px;
    }

.reporte-tabla-scroll {
    width: 100%;
    overflow-x: auto;
}

.reporte-tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

    .reporte-tabla th,
    .reporte-tabla td {
        padding: 10px;
        border-right: 1px solid #eee6e2;
        border-bottom: 1px solid #eee6e2;
        text-align: left;
        vertical-align: middle;
    }

    .reporte-tabla th {
        background: #fff5eb;
        color: #68091f;
        font-weight: 700;
        white-space: nowrap;
    }

    .reporte-tabla tbody tr:nth-child(even) {
        background: #fffdfb;
    }

    .reporte-tabla tbody tr:hover {
        background: #fff7ed;
    }

.reporte-th-estudiante {
    min-width: 220px;
}

.reporte-th-fecha {
    min-width: 74px;
    text-align: center !important;
}

    .reporte-th-fecha span,
    .reporte-th-fecha small {
        display: block;
    }

    .reporte-th-fecha small {
        margin-top: 2px;
        color: #927d76;
        font-size: 9px;
        font-weight: 500;
    }

.reporte-th-total,
.reporte-total,
.reporte-celda-marca {
    text-align: center !important;
}

.reporte-estudiante {
    min-width: 220px;
}

    .reporte-estudiante strong,
    .reporte-estudiante small {
        display: block;
    }

    .reporte-estudiante strong {
        color: #24456c;
        font-size: 11px;
    }

    .reporte-estudiante small {
        margin-top: 4px;
        color: #8394a9;
        font-size: 10px;
    }

.reporte-licencia {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 5px;
    padding: 3px 7px;
    border-radius: 12px;
    background: #f2eaff;
    color: #7654a3;
    font-size: 10px;
    font-weight: 700;
}

/* MARCAS */

.marca-asistencia {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 24px;
    padding: 2px 7px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
}

    .marca-asistencia.presente {
        background: #ddf5e7;
        color: #16804a;
    }

    .marca-asistencia.falta {
        background: #ffe3e7;
        color: #c8243c;
    }

    .marca-asistencia.tardanza {
        background: #fff0d8;
        color: #c47700;
    }

    .marca-asistencia.justificado {
        background: #e3efff;
        color: #286ab3;
    }

    .marca-asistencia.pendiente {
        background: #edf1f5;
        color: #67788c;
    }

    .marca-asistencia.duplicado {
        background: #ffe9d6;
        color: #a4470c;
    }

    .marca-asistencia.sin-dato {
        background: #f1f1f1;
        color: #777;
    }

/* ACCIONES Y PAGINACIÓN */

.reporte-btn-detalle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border: 1px solid #e7c2ca;
    border-radius: 7px;
    background: #fff;
    color: #850c2a;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.reporte-tabla-pie {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 15px;
    color: #7589a1;
    font-size: 11px;
}

.reporte-paginacion {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .reporte-paginacion button {
        width: 30px;
        height: 30px;
        border: 1px solid #eadbd6;
        border-radius: 6px;
        background: #fff;
        color: #810b28;
        cursor: pointer;
    }

        .reporte-paginacion button:disabled {
            opacity: .4;
            cursor: not-allowed;
        }

/* MENSAJES */

.reporte-mensaje,
.reporte-error,
.reporte-advertencia,
.reporte-nota {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    padding: 13px;
    border-radius: 8px;
    font-size: 12px;
}

.reporte-mensaje,
.reporte-nota {
    background: #f1f6fc;
    color: #54708f;
}

.reporte-error {
    background: #fff0f1;
    color: #a72036;
}

.reporte-advertencia {
    background: #fff3df;
    color: #9a6000;
}

@media (max-width: 768px) {
    .reporte-asistencia-fondo {
        padding: 12px;
    }

    .reporte-unidad {
        align-items: flex-start;
    }

    .reporte-unidad-icono {
        width: 50px;
        height: 50px;
        flex-basis: 50px;
        font-size: 20px;
    }

    .reporte-unidad-texto h2 {
        font-size: 15px;
    }

    .reporte-titulo-grupo h2 {
        font-size: 17px;
    }

    .reporte-campo {
        width: 100%;
    }
}

.reporte-porcentaje {
    color: #760b26;
    font-weight: 800;
    white-space: nowrap;
}

.estado {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.estado-verde {
    background: #dff5e8;
    color: #16804a;
}

.estado-naranja {
    background: #fff0d8;
    color: #b76d00;
}

.estado-rojo {
    background: #ffe3e7;
    color: #c3263d;
}

.estado-gris {
    background: #eef1f5;
    color: #68788d;
}

.estado-licencia {
    background: #f0e9ff;
    color: #7650a5;
}

.reporte-estado-nota {
    display: block;
    margin-top: 5px;
    color: #aa7b37;
    font-size: 10px;
    white-space: nowrap;
}

/* Carga, errores y detalle del estudiante */
.estado-vacio {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 120px;
    padding: 20px;
    color: #7c8b9d;
    text-align: center;
}

.mensaje-error {
    display: flex;
    gap: 9px;
    padding: 14px;
    border: 1px solid #f0c4c9;
    border-radius: 9px;
    background: #fff0f1;
    color: #a12131;
}

.detalle-alumno-fondo {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(35, 21, 25, 0.62);
}

.detalle-alumno-modal {
    width: min(780px, 100%);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.22);
}

/* Encabezado */

.detalle-alumno-cabecera {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 20px 22px;
    border-bottom: 1px solid #eee7e3;
}

.detalle-alumno-titulo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.detalle-alumno-icono {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: #fae9ed;
    color: #790b26;
    font-size: 20px;
}

.detalle-alumno-titulo h3 {
    margin: 0 0 4px;
    color: #59081e;
    font-size: 20px;
    font-weight: 800;
}

.detalle-alumno-titulo p {
    margin: 0;
    color: #798a9c;
    font-size: 13px;
}

.detalle-alumno-cerrar {
    width: 35px;
    height: 35px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #a36a77;
    font-size: 18px;
    cursor: pointer;
}

    .detalle-alumno-cerrar:hover {
        background: #faedf0;
    }

/* Cuerpo */

.detalle-alumno-cuerpo {
    overflow-y: auto;
    padding: 20px 22px;
}

.detalle-alumno-datos {
    display: grid;
    grid-template-columns: 2fr 1fr 2fr;
    gap: 15px;
    padding: 16px;
    border: 1px solid #f1dfcd;
    border-radius: 10px;
    background: #fff9f2;
}

    .detalle-alumno-datos div {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .detalle-alumno-datos span {
        color: #8a99a9;
        font-size: 12px;
    }

    .detalle-alumno-datos strong {
        color: #24476f;
        font-size: 13px;
        line-height: 1.4;
    }

/* Porcentaje */

.detalle-alumno-porcentaje {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 17px;
    padding: 15px;
    border: 1px solid #ece4de;
    border-radius: 10px;
    background: #fff;
}

    .detalle-alumno-porcentaje > div {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

        .detalle-alumno-porcentaje > div span {
            color: #75879a;
            font-size: 13px;
        }

        .detalle-alumno-porcentaje > div strong {
            color: #790b26;
            font-size: 25px;
        }

/* Avisos */

.detalle-alumno-aviso {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 16px;
    padding: 12px;
    border-radius: 9px;
    font-size: 13px;
    line-height: 1.5;
}

    .detalle-alumno-aviso.licencia {
        background: #eaf2ff;
        color: #2765a5;
    }

    .detalle-alumno-aviso.advertencia {
        background: #fff4e4;
        color: #9c650c;
    }

.detalle-alumno-subtitulo {
    margin: 20px 0 12px;
    color: #59081e;
    font-size: 15px;
    font-weight: 800;
}

/* Tarjetas de marcas */

.detalle-alumno-resumen {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.detalle-metrica {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    border: 1px solid #eee6e0;
    border-radius: 10px;
    background: #fff;
}

.metrica-icono {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
}

    .metrica-icono.total {
        background: #f5e9ed;
        color: #790b26;
    }

    .metrica-icono.presente {
        background: #e2f6e9;
        color: #16864e;
    }

    .metrica-icono.tardanza {
        background: #fff1dc;
        color: #c77700;
    }

    .metrica-icono.falta {
        background: #fde8ea;
        color: #c52d3c;
    }

    .metrica-icono.justificado {
        background: #e7f1ff;
        color: #2971bc;
    }

    .metrica-icono.pendiente {
        background: #eff2f5;
        color: #718092;
    }

.detalle-metrica div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detalle-metrica strong {
    color: #253e60;
    font-size: 19px;
    line-height: 1;
}

.detalle-metrica div span {
    color: #8090a2;
    font-size: 12px;
}

.detalle-alumno-nota {
    margin: 14px 0 0;
    color: #75879a;
    font-size: 12px;
    line-height: 1.5;
}

/* Pie */

.detalle-alumno-pie {
    display: flex;
    justify-content: flex-end;
    padding: 15px 22px;
    border-top: 1px solid #eee7e3;
}

.detalle-btn-cerrar {
    min-width: 100px;
    padding: 10px 16px;
    border: 1px solid #e5cbbd;
    border-radius: 8px;
    background: #fff;
    color: #790b26;
    font-weight: 700;
    cursor: pointer;
}

    .detalle-btn-cerrar:hover {
        background: #fff5ef;
    }

@media (max-width: 650px) {
    .detalle-alumno-datos {
        grid-template-columns: 1fr;
    }

    .detalle-alumno-resumen {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detalle-alumno-cabecera,
    .detalle-alumno-cuerpo,
    .detalle-alumno-pie {
        padding-left: 16px;
        padding-right: 16px;
    }
}

.btn-volver-sesiones {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 8px 0;
    border: 0;
    background: transparent;
    color: #790b26;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

    .btn-volver-sesiones:hover {
        color: #a90c32;
        text-decoration: underline;
    }

    .btn-volver-sesiones:focus-visible {
        outline: 2px solid #790b26;
        outline-offset: 4px;
        border-radius: 3px;
    }

/* Sección de fechas dentro del modal */

.detalle-fechas {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #f0e2df;
}

.detalle-fechas-encabezado {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 14px;
}

    .detalle-fechas-encabezado h4 {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 0;
        color: #760b26;
        font-size: 15px;
        font-weight: 700;
    }

    .detalle-fechas-encabezado p {
        margin: 5px 0 0;
        color: #667c99;
        font-size: 12px;
    }

.detalle-fechas-filtro {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 170px;
}

    .detalle-fechas-filtro label {
        color: #35547b;
        font-size: 11px;
        font-weight: 600;
    }

    .detalle-fechas-filtro select {
        width: 100%;
        padding: 8px 10px;
        border: 1px solid #d8e0e9;
        border-radius: 7px;
        background: #fff;
        color: #243f65;
        font-size: 12px;
    }

.detalle-fechas-tabla-contenedor {
    max-height: 280px;
    overflow: auto;
    border: 1px solid #eadfdd;
    border-radius: 8px;
}

.detalle-fechas-tabla {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    font-size: 12px;
}

    .detalle-fechas-tabla thead {
        position: sticky;
        top: 0;
        z-index: 1;
    }

    .detalle-fechas-tabla th {
        padding: 11px 10px;
        background: #760b26;
        color: #fff;
        text-align: left;
        font-size: 11px;
        font-weight: 700;
    }

    .detalle-fechas-tabla td {
        padding: 10px;
        border-bottom: 1px solid #eee8e6;
        color: #27456c;
        vertical-align: middle;
    }

    .detalle-fechas-tabla tbody tr:nth-child(even) {
        background: #fcf9f8;
    }

    .detalle-fechas-tabla tbody tr:hover {
        background: #fff5e9;
    }

.detalle-fecha {
    white-space: nowrap;
    font-weight: 600;
}

/* Etiquetas de asistencia */

.detalle-estado {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

    .detalle-estado.presente {
        background: #dcf5e6;
        color: #16814b;
    }

    .detalle-estado.falta {
        background: #ffe4e7;
        color: #c9253c;
    }

    .detalle-estado.tardanza {
        background: #fff0d7;
        color: #c77b00;
    }

    .detalle-estado.justificado {
        background: #e4efff;
        color: #276bb4;
    }

    .detalle-estado.pendiente {
        background: #edf1f5;
        color: #64748b;
    }

    .detalle-estado.programada {
        background: #f1ebff;
        color: #7652ad;
    }

    .detalle-estado.duplicado {
        background: #ffe5d2;
        color: #a34512;
    }

.detalle-fechas-mensaje,
.detalle-fechas-error,
.detalle-fechas-aviso {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 13px;
    border-radius: 7px;
    font-size: 12px;
}

.detalle-fechas-mensaje {
    background: #f5f7fa;
    color: #64748b;
}

.detalle-fechas-error {
    background: #fff0f1;
    color: #a61e31;
}

.detalle-fechas-aviso {
    margin-bottom: 10px;
    background: #fff4e3;
    color: #986000;
}

.detalle-fechas-pie {
    margin-top: 9px;
    color: #7588a0;
    font-size: 11px;
}

/* Resaltado suave para estudiantes que superan
   el límite de inasistencia. */

.reporte-tabla tbody tr.fila-dpi {
    background-color: #fff2f2;
}

    .reporte-tabla tbody tr.fila-dpi:hover {
        background-color: #ffe7e9;
    }

    /* Identifica la fila sin depender solo del color. */
    .reporte-tabla tbody tr.fila-dpi td:first-child {
        box-shadow: inset 4px 0 0 #d75a6c;
    }