﻿/* =========================================================
   ASISTENCIA - ESTILO GENERAL
========================================================= */


/* =========================================================
   RESUMEN DE ASISTENCIA - ESCRITORIO
========================================================= */

/* =========================================================
   RESUMEN DE ASISTENCIA
   MISMO DISEÑO EN ESCRITORIO Y MÓVIL
========================================================= */

.attendance-summary {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 4px;
    padding: 8px 0 5px;
    background: transparent;
}


/* =========================================================
   INDICADOR
========================================================= */

.attendance-stat {
    min-width: 0;
    min-height: 62px;
    padding: 4px 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}


    /* ICONO */

    .attendance-stat > i {
        flex-shrink: 0;
        font-size: 16px;
        line-height: 1;
    }


    /* TEXTO + CANTIDAD */

    .attendance-stat > div {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
    }


    /* DESCRIPCIÓN */

    .attendance-stat span {
        display: block;
        width: 100%;
        font-size: 9px;
        font-weight: 500;
        line-height: 1.2;
        text-align: center;
        white-space: nowrap;
    }


    /* CANTIDAD */

    .attendance-stat strong {
        display: block;
        font-size: 14px;
        font-weight: 700;
        line-height: 1;
        text-align: center;
    }


/* =========================================================
   COLORES
========================================================= */

.stat-pending {
    color: #C68A00;
}


.stat-present {
    color: #168149;
}


.stat-absent {
    color: #C73642;
}


.stat-total {
    color: #1769C2;
}


/* =========================================================
   BOTONES DE ESTADO
========================================================= */

.attendance-btn {
    min-width: 120px;
    min-height: 36px;
    padding: 7px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}


    .attendance-btn:hover {
        transform: translateY(-1px);
    }


/* =========================================================
   BOTÓN PENDIENTE
========================================================= */

.attendance-pending {
    border: 1px solid #F0D28A;
    background: #FFF8E2;
    color: #A96F00;
}


    .attendance-pending:hover {
        background: #FFF1C7;
    }


/* =========================================================
   BOTÓN PRESENTE
========================================================= */

.attendance-present {
    border: 1px solid #BDE8CE;
    background: #E9F9F0;
    color: #168149;
}


    .attendance-present:hover {
        background: #DCF5E7;
    }


/* =========================================================
   BOTÓN AUSENTE
========================================================= */

.attendance-absent {
    border: 1px solid #F7C9CF;
    background: #FFF0F1;
    color: #C73642;
}


    .attendance-absent:hover {
        background: #FFE4E7;
    }


/* =========================================================
   TABLA
========================================================= */

.attendance-table-wrapper {
    width: 100%;
    overflow: hidden;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
}


.attendance-identification {
    color: var(--gsk-text);
    font-size: 12px;
    font-weight: 500;
}


/* =========================================================
   ESTADO VACÍO
========================================================= */

.attendance-empty-state {
    min-height: 95px;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}


.attendance-empty-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--gsk-text-muted);
}


    .attendance-empty-content i {
        color: #1769C2;
        font-size: 16px;
    }


    .attendance-empty-content span {
        font-size: 11px;
        font-weight: 500;
    }


/* =========================================================
   SIN ALUMNOS
========================================================= */

.attendance-empty {
    min-height: 110px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-align: center;
}


.attendance-empty-icon {
    width: 38px;
    height: 38px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #EEF5FC;
    color: #1769C2;
    font-size: 16px;
}


.attendance-empty strong {
    color: var(--gsk-primary);
    font-size: 12px;
    font-weight: 700;
}


.attendance-empty span {
    color: var(--gsk-text-muted);
    font-size: 10px;
}


/* =========================================================
   CARGANDO
========================================================= */

.attendance-loading {
    min-height: 95px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--gsk-text-muted);
    font-size: 11px;
}


/* =========================================================
   FOOTER
========================================================= */

.attendance-footer {
    margin-top: 14px;
    padding-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid #E7EDF5;
}


/* =========================================================
   ESTADO DEL REGISTRO
========================================================= */

.attendance-save-status {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}


.attendance-status-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 14px;
}


    .attendance-status-icon.status-complete {
        color: #168553;
        background: #EAF8F1;
    }


    .attendance-status-icon.status-warning {
        color: #B77900;
        background: #FFF7E5;
    }


/* =========================================================
   TEXTO FOOTER
========================================================= */

.attendance-status-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}


    .attendance-status-text strong {
        color: #132744;
        font-size: 12px;
        font-weight: 700;
        line-height: 1.3;
    }


    .attendance-status-text span {
        color: #74839A;
        font-size: 10px;
        font-weight: 400;
        line-height: 1.4;
    }


/* =========================================================
   BOTÓN GUARDAR
========================================================= */

.attendance-save-button {
    min-width: 155px;
    flex-shrink: 0;
    padding-left: 18px;
    padding-right: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}


/* =========================================================
   MÓVIL
========================================================= */

@media (max-width: 767.98px) {

    /* =====================================================
       ESPACIADO GENERAL
    ====================================================== */

    .asistencia-page .card-pro {
        margin-bottom: 13px;
    }


    /* =====================================================
       RESUMEN MÓVIL
       SIN RECTÁNGULOS
       ICONO + TEXTO + CANTIDAD
    ====================================================== */

    .asistencia-page .attendance-summary {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 4px;
        margin-top: 8px;
        padding: 8px 0 5px;
        background: transparent;
    }


    .asistencia-page .attendance-stat {
        min-width: 0;
        min-height: 62px;
        padding: 4px 1px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        border: none;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }


        .asistencia-page .attendance-stat > i {
            flex-shrink: 0;
            font-size: 15px;
            line-height: 1;
        }


        .asistencia-page .attendance-stat > div {
            width: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 2px;
        }


        .asistencia-page .attendance-stat span {
            display: block;
            width: 100%;
            font-size: 8px;
            font-weight: 500;
            line-height: 1.2;
            text-align: center;
            white-space: nowrap;
        }


        .asistencia-page .attendance-stat strong {
            display: block;
            font-size: 13px;
            font-weight: 700;
            line-height: 1;
            text-align: center;
        }


    /* =====================================================
       COLORES HEREDADOS
    ====================================================== */

    .asistencia-page .stat-pending {
        color: #C68A00;
    }


    .asistencia-page .stat-present {
        color: #168149;
    }


    .asistencia-page .stat-absent {
        color: #C73642;
    }


    .asistencia-page .stat-total {
        color: #1769C2;
    }


    /* =====================================================
       LISTADO MÓVIL
    ====================================================== */

    .attendance-mobile-list {
        width: 100%;
        display: flex;
        flex-direction: column;
    }


    .attendance-mobile-row {
        width: 100%;
        padding: 11px 2px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        border-bottom: 1px solid #EDF1F5;
    }


        .attendance-mobile-row:first-child {
            padding-top: 3px;
        }


        .attendance-mobile-row:last-child {
            border-bottom: none;
        }


    /* =====================================================
       ALUMNO MÓVIL
    ====================================================== */

    .attendance-mobile-student {
        flex: 1;
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 9px;
    }


    .attendance-mobile-avatar {
        width: 30px;
        height: 30px;
        flex: 0 0 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 9px;
        background: #EDF4FC;
        color: #1769C2;
        font-size: 12px;
    }


    .attendance-mobile-name {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 2px;
    }


        .attendance-mobile-name strong {
            color: #132744;
            font-size: 11px;
            font-weight: 700;
            line-height: 1.3;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }


        .attendance-mobile-name span {
            color: #8A98AB;
            font-size: 9px;
        }


    /* =====================================================
       ESTADO MÓVIL
       MISMA LÓGICA DE ESCRITORIO
    ====================================================== */

    .attendance-mobile-state {
        flex: 0 0 auto;
    }


        .attendance-mobile-state .attendance-btn {
            width: auto;
            min-width: 90px;
            min-height: 32px;
            padding: 5px 10px;
            font-size: 9px;
            border-radius: 8px;
        }


            .attendance-mobile-state .attendance-btn i {
                font-size: 10px;
            }


    /* =====================================================
       ESTADO VACÍO MÓVIL
    ====================================================== */

    .attendance-empty-state {
        min-height: 85px;
        padding: 15px;
    }


    .attendance-empty-content {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }


        .attendance-empty-content i {
            font-size: 17px;
        }


    /* =====================================================
       FOOTER MÓVIL
    ====================================================== */

    .attendance-footer {
        margin-top: 10px;
        padding-top: 11px;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }


    .attendance-save-status {
        gap: 8px;
    }


    .attendance-status-icon {
        width: 32px;
        height: 32px;
        flex: 0 0 32px;
        border-radius: 9px;
        font-size: 12px;
    }


    .attendance-status-text strong {
        font-size: 11px;
    }


    .attendance-status-text span {
        font-size: 9px;
    }


    .attendance-save-button {
        width: 100%;
        min-width: 0;
        min-height: 40px;
    }
}
