﻿/* =========================================================
   RESUMEN DE PAGOS
========================================================= */

.payment-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}


/* =========================================================
   INDICADORES
========================================================= */

.payment-stat {
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 11px;
    border: 1px solid #D8E3EF;
    border-radius: 10px;
    background: #F8FBFF;
}


    .payment-stat > i {
        font-size: 16px;
    }


    .payment-stat div {
        min-width: 0;
        display: flex;
        flex-direction: column;
    }


    .payment-stat span {
        color: #64748B;
        font-size: 10px;
    }


    .payment-stat strong {
        margin-top: 1px;
        color: var(--gsk-primary);
        font-size: 14px;
        font-weight: 700;
    }


/* PAGADOS */

.payment-stat-paid {
    background: #ECF9F1;
    border-color: #BDE8CE;
    color: #168149;
}


/* PENDIENTES */

.payment-stat-pending {
    background: #FFF9E8;
    border-color: #F2D995;
    color: #B17A00;
}



/* =========================================================
   TABLA DE PAGOS
========================================================= */

.payment-table {
    min-width: 1050px;
}



/* =========================================================
   ASISTENCIA EN TABLA
========================================================= */

.payment-attendance {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}


.attendance-days {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #475569;
    font-size: 11px;
    font-weight: 600;
}


    .attendance-days i {
        color: #1769C2;
    }


.attendance-values {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
}


.attendance-present-value {
    color: #168149;
    font-weight: 600;
}


.attendance-absent-value {
    color: #C73642;
    font-weight: 600;
}


.attendance-separator {
    color: #CBD5E1;
}



/* =========================================================
   PORCENTAJE DE ASISTENCIA
========================================================= */

.attendance-percent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 68px;
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}


/* 80% O MÁS */

.percent-high {
    background: #E9F9F0;
    border: 1px solid #BDE8CE;
    color: #168149;
}


/* ENTRE 60 Y 79 */

.percent-medium {
    background: #FFF9E8;
    border: 1px solid #F2D995;
    color: #A96F00;
}


/* MENOS DE 60 */

.percent-low {
    background: #FFF0F1;
    border: 1px solid #F7C9CF;
    color: #C73642;
}


/* SIN REGISTROS */

.percent-empty {
    background: #F1F5F9;
    border: 1px solid #DCE3EA;
    color: #64748B;
}



/* =========================================================
   INPUTS DE PAGO
========================================================= */

.payment-input {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}


    .payment-input > i {
        position: absolute;
        left: 11px;
        z-index: 2;
        color: #64748B;
        font-size: 13px;
        pointer-events: none;
    }


    .payment-input .form-control {
        width: 100%;
        height: 40px;
        padding-left: 34px;
        border: 1px solid #D7E0EA;
        border-radius: 9px;
        background: #FBFDFF;
        color: var(--gsk-text);
        font-size: 11px;
        box-shadow: none;
        transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
    }


        .payment-input .form-control:focus {
            background: #FFFFFF;
            border-color: #3979C5;
            box-shadow: 0 0 0 3px rgba(57,121,197,.10);
        }



/* =========================================================
   MONTO
========================================================= */

.payment-amount .form-control {
    padding-left: 27px;
}


.currency-symbol {
    position: absolute;
    left: 11px;
    z-index: 2;
    color: #64748B;
    font-size: 12px;
    font-weight: 600;
    pointer-events: none;
}



/* =========================================================
   ESTADO PENDIENTE
========================================================= */

.status-pending {
    background: #FFF9E8;
    border: 1px solid #F2D995;
    color: #A96F00;
}



/* =========================================================
   CARD MÓVIL
========================================================= */

.payment-mobile-card {
    padding: 14px;
}



/* =========================================================
   SECCIÓN DE ASISTENCIA MÓVIL
========================================================= */

.payment-mobile-section {
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px solid #DFE7EF;
}


.payment-mobile-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 9px;
    color: var(--gsk-primary);
    font-size: 11px;
    font-weight: 600;
}


    .payment-mobile-title i {
        color: #1769C2;
        font-size: 13px;
    }



/* =========================================================
   RESUMEN DE ASISTENCIA MÓVIL
   DISEÑO LIMPIO SIN CUADRÍCULAS
========================================================= */

.attendance-mobile-summary {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 1px 0;
}


.attendance-mobile-row {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    font-size: 11px;
}


.attendance-mobile-present {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #168149;
    font-weight: 600;
}


    .attendance-mobile-present i {
        font-size: 11px;
    }


.attendance-mobile-absent {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #C73642;
    font-weight: 600;
}


    .attendance-mobile-absent i {
        font-size: 11px;
    }


.attendance-divider {
    color: #CBD5E1;
}
/* =========================================================
   RESUMEN DE PAGOS - ALINEACIÓN
========================================================= */

.payment-summary-wrapper {
    min-height: 44px;

    display: flex;
    align-items: center;
}


.payment-summary {
    width: 100%;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 8px;
}


.payment-stat {
    height: 44px;
    min-height: 44px;

    display: flex;
    align-items: center;

    gap: 9px;

    padding: 7px 10px;

    border-radius: 10px;
}

/* =========================================================
   FILTRO DE PAGOS
========================================================= */

.payment-filter {
    width: 100%;
    max-width: 420px;
    margin-left: auto;
    margin-bottom: 14px;
}


.payment-filter .input-pro .form-control {
    height: 42px;

    background: #FFFFFF;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    .payment-filter {
        max-width: 100%;
        margin-left: 0;
        margin-bottom: 12px;
    }

}


/* =========================================================
   PORCENTAJE MÓVIL
========================================================= */

.attendance-mobile-percentage {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}


    .attendance-mobile-percentage > span {
        font-size: 15px;
        font-weight: 700;
    }


    .attendance-mobile-percentage small {
        color: #64748B;
        font-size: 10px;
        line-height: 1.3;
    }


.percentage-good {
    color: #168149;
}


.percentage-medium {
    color: #A96F00;
}


.percentage-low {
    color: #C73642;
}



/* =========================================================
   CAMPOS DE PAGO MÓVIL
========================================================= */

.payment-mobile-fields {
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px solid #DFE7EF;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}


    .payment-mobile-fields .form-field {
        margin-bottom: 0;
    }



/* =========================================================
   BOTÓN GUARDAR
========================================================= */

.payment-save {
    margin-top: 18px;
}


/* =========================================================
   BOTÓN GUARDAR MÓVIL
========================================================= */

/* Por defecto no aparece en escritorio */
.payment-save-mobile {
    display: none;
}


/* =========================================================
   MÓVIL
========================================================= */

@media (max-width: 767.98px) {

    .payment-save-mobile {
        position: fixed;
        left: 12px;
        right: 12px;
        /* deja espacio para el menú inferior */
        bottom: 78px;
        z-index: 9999;
        display: flex !important;
        justify-content: center;
        align-items: center;
        pointer-events: none;
    }


    .payment-save-mobile-button {
        width: 100%;
        max-width: 420px;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        pointer-events: auto;
        box-shadow: 0 5px 18px rgba(0, 0, 0, 0.20);
    }


    /* Evita que el botón tape el último alumno */

    .payment-mobile-list {
        padding-bottom: 150px;
    }
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 768px) {

    /* =========================================
       RESUMEN SUPERIOR
    ========================================= */

    .payment-summary {
        margin-top: 4px;
    }


    .payment-stat {
        min-height: 48px;
        padding: 8px 9px;
    }


        .payment-stat span {
            font-size: 9px;
        }


        .payment-stat strong {
            font-size: 13px;
        }



    /* =========================================
       CARD ALUMNO
    ========================================= */

    .payment-mobile-card {
        padding: 14px;
    }



    /* =========================================
       CAMPOS UNO DEBAJO DEL OTRO
    ========================================= */

    .payment-mobile-fields {
        grid-template-columns: 1fr;
        gap: 12px;
    }


    .payment-input .form-control {
        height: 42px;
        font-size: 12px;
    }



    /* =========================================
       GUARDAR
    ========================================= */

    .payment-save {
        margin-top: 15px;
    }


        .payment-save .btn-docente-primary {
            width: 100%;
        }
}



/* =========================================================
   PANTALLAS MUY PEQUEÑAS
========================================================= */

@media (max-width: 420px) {

    .payment-stat {
        min-height: 45px;
        padding: 7px 8px;
    }


        .payment-stat > i {
            font-size: 14px;
        }


        .payment-stat span {
            font-size: 8px;
        }


        .payment-stat strong {
            font-size: 12px;
        }


    .attendance-mobile-row {
        gap: 5px;
        font-size: 10px;
    }


    .attendance-mobile-percentage > span {
        font-size: 14px;
    }


    .attendance-mobile-percentage small {
        font-size: 9px;
    }
}
