﻿/* =========================================================
   HOME / DASHBOARD
========================================================= */

.home-dashboard {
    padding-bottom: 20px;
}


/* =========================================================
   ENCABEZADO
========================================================= */

.dashboard-header {
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}


.dashboard-greeting {
    display: block;
    margin-bottom: 3px;
    color: #64748B;
    font-size: 12px;
    font-weight: 500;
}


.dashboard-header h1 {
    margin: 0;
    color: var(--gsk-primary);
    font-size: 25px;
    font-weight: 700;
    letter-spacing: -.3px;
}


.dashboard-header p {
    margin: 4px 0 0;
    color: var(--gsk-text-muted);
    font-size: 12px;
}


.dashboard-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}


.dashboard-period {
    min-height: 38px;
    padding: 7px 11px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid #D8E3EF;
    border-radius: 10px;
    background: #FFFFFF;
    color: #475569;
    font-size: 11px;
    font-weight: 600;
}


    .dashboard-period i {
        color: #1769C2;
    }


/* =========================================================
   BOTÓN PRIVACIDAD
========================================================= */

.dashboard-privacy-button {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #D8E3EF;
    border-radius: 10px;
    background: #FFFFFF;
    color: var(--gsk-primary);
    cursor: pointer;
    font-size: 16px;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}


    .dashboard-privacy-button:hover {
        background: #EEF5FC;
        border-color: #BFD5ED;
        transform: translateY(-1px);
    }


/* =========================================================
   KPIS
========================================================= */

.dashboard-kpis {
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}


.dashboard-kpi {
    min-height: 112px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 13px;
    border: 1px solid #D8E3EF;
    border-radius: 14px;
    background: #FFFFFF;
    box-shadow: 0 5px 18px rgba(15,23,42,.055);
}


.dashboard-kpi-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 18px;
}


.kpi-students {
    background: #E8F1FB;
    color: #1769C2;
}


.kpi-attendance {
    background: #EAF8F0;
    color: #168149;
}


.kpi-income {
    background: #E8F1FB;
    color: #174A7E;
}


.kpi-pending {
    background: #FFF7E3;
    color: #A96F00;
}


.dashboard-kpi-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
}


    .dashboard-kpi-content > span {
        color: #64748B;
        font-size: 10px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: .035em;
    }


    .dashboard-kpi-content > strong {
        margin-top: 3px;
        color: var(--gsk-primary);
        font-size: 22px;
        font-weight: 700;
        line-height: 1.15;
        white-space: nowrap;
    }


    .dashboard-kpi-content > small {
        margin-top: 4px;
        color: #94A3B8;
        font-size: 10px;
    }


/* =========================================================
   DINERO
========================================================= */

.dashboard-money {
    letter-spacing: -.2px;
}


.dashboard-money-hidden {
    letter-spacing: 2px;
}


/* =========================================================
   FILA PRINCIPAL
========================================================= */

.dashboard-main-row {
    margin-bottom: 24px;
}


/* =========================================================
   ASISTENCIA HOY
========================================================= */

.today-attendance {
    min-height: 190px;
    display: flex;
    flex-direction: column;
}


.today-attendance-summary {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 15px;
}


.today-attendance-value strong {
    display: block;
    color: var(--gsk-primary);
    font-size: 31px;
    font-weight: 700;
    line-height: 1;
}


.today-attendance-value span {
    display: block;
    margin-top: 5px;
    color: #64748B;
    font-size: 11px;
}


.today-attendance-counts {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    font-size: 11px;
    font-weight: 600;
}


.today-present {
    color: #168149;
}


.today-absent {
    color: #C73642;
}


.summary-divider {
    color: #CBD5E1;
}


/* =========================================================
   PROGRESS ASISTENCIA
========================================================= */

.attendance-progress {
    width: 100%;
    height: 8px;
    margin-top: 20px;
    border-radius: 20px;
    background: #E9EEF4;
    overflow: hidden;
}


.attendance-progress-bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient( 90deg, #1D7D4D, #31A266 );
    transition: width .4s ease;
}


.today-attendance-footer {
    margin-top: auto;
    padding-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    color: #64748B;
    font-size: 10px;
}


    .today-attendance-footer > span {
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }


/* =========================================================
   BOTÓN LINK
========================================================= */

.dashboard-link-button {
    padding: 0;
    border: none;
    background: transparent;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1769C2;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}


    .dashboard-link-button:hover {
        color: #0B4C8A;
    }


    .dashboard-link-button i {
        font-size: 11px;
        transition: transform .15s ease;
    }


    .dashboard-link-button:hover i {
        transform: translateX(2px);
    }


/* =========================================================
   PAGOS
========================================================= */

.payments-overview {
    min-height: 190px;
    display: flex;
    flex-direction: column;
}


.payment-overview-row {
    padding: 8px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}


    .payment-overview-row + .payment-overview-row {
        border-top: 1px solid #EDF1F5;
    }


.payment-overview-label {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
}


.payment-overview-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    font-size: 12px;
}


    .payment-overview-icon.paid {
        background: #E9F9F0;
        color: #168149;
    }


    .payment-overview-icon.pending {
        background: #FFF7E3;
        color: #A96F00;
    }


.payment-overview-label strong {
    display: block;
    color: var(--gsk-primary);
    font-size: 11px;
    font-weight: 600;
}


.payment-overview-label small {
    display: block;
    margin-top: 2px;
    color: #94A3B8;
    font-size: 9px;
}


.payment-overview-value {
    color: var(--gsk-primary);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}


    .payment-overview-value.hidden {
        letter-spacing: 2px;
    }


/* =========================================================
   PROGRESO PAGOS
========================================================= */

.payment-progress-info {
    margin-top: 13px;
    display: flex;
    justify-content: space-between;
    color: #64748B;
    font-size: 10px;
}


    .payment-progress-info strong {
        color: var(--gsk-primary);
    }


.payment-progress {
    width: 100%;
    height: 7px;
    margin-top: 6px;
    border-radius: 20px;
    background: #E9EEF4;
    overflow: hidden;
}


.payment-progress-bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient( 90deg, #1769C2, #3F8DDE );
}


.payment-link {
    margin-top: auto;
    align-self: flex-end;
}


/* =========================================================
   REQUIEREN ATENCIÓN
========================================================= */

.dashboard-attention-card {
    margin-top: 0;
}


.dashboard-attention-table {
    border: 1px solid #D9E3EE;
    border-radius: 10px;
    overflow: hidden;
}


.attention-identification {
    display: block;
    margin-top: 2px;
    color: #94A3B8;
    font-size: 10px;
}


/* PORCENTAJE */

.attention-percentage {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
}


.attention-good {
    background: #E9F9F0;
    color: #168149;
}


.attention-warning {
    background: #FFF7E3;
    color: #A96F00;
}


.attention-danger {
    background: #FFF0F1;
    color: #C73642;
}


.dashboard-status-pending {
    background: #FFF7E3;
    border: 1px solid #F2D995;
    color: #A96F00;
}


.attention-observation {
    color: #64748B;
    font-size: 11px;
}


/* =========================================================
   ATENCIÓN MÓVIL
========================================================= */

.attention-mobile-list {
    display: flex;
    flex-direction: column;
}


.attention-mobile-item {
    padding: 12px 2px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}


    .attention-mobile-item + .attention-mobile-item {
        border-top: 1px solid #EDF1F5;
    }


.attention-mobile-icon {
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #FFF7E3;
    color: #A96F00;
    font-size: 13px;
}


.attention-mobile-content {
    min-width: 0;
    flex: 1;
}


    .attention-mobile-content > strong {
        display: block;
        color: var(--gsk-primary);
        font-size: 12px;
        font-weight: 600;
    }


    .attention-mobile-content > span {
        display: block;
        margin-top: 2px;
        color: #64748B;
        font-size: 10px;
    }


.attention-mobile-meta {
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: #64748B;
    font-size: 9px;
}


.attention-payment-pending {
    color: #A96F00;
    font-weight: 600;
}


/* =========================================================
   EMPTY
========================================================= */

.dashboard-empty {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    color: #168149;
}


    .dashboard-empty > i {
        font-size: 28px;
    }


    .dashboard-empty strong {
        display: block;
        color: var(--gsk-primary);
        font-size: 12px;
    }


    .dashboard-empty span {
        display: block;
        margin-top: 2px;
        color: #64748B;
        font-size: 10px;
    }


/* =========================================================
   LOADING
========================================================= */

.dashboard-loading {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #64748B;
    font-size: 12px;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {

    .dashboard-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* =========================================================
   MÓVIL
========================================================= */

@media (max-width: 768px) {

    .dashboard-header {
        margin-bottom: 17px;
        align-items: flex-start;
    }


        .dashboard-header h1 {
            font-size: 20px;
        }


        .dashboard-header p {
            font-size: 10px;
        }


    .dashboard-period {
        display: none;
    }


    .dashboard-privacy-button {
        width: 36px;
        height: 36px;
        flex: 0 0 36px;
    }


    /* =====================================================
       KPI MÓVIL
    ====================================================== */

    .dashboard-kpis {
        margin-bottom: 20px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }


    .dashboard-kpi {
        min-height: 88px;
        padding: 11px;
        gap: 9px;
        border-radius: 12px;
        box-shadow: 0 3px 12px rgba(15,23,42,.05);
    }


    .dashboard-kpi-icon {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        border-radius: 9px;
        font-size: 14px;
    }


    .dashboard-kpi-content > span {
        font-size: 8px;
    }


    .dashboard-kpi-content > strong {
        font-size: 17px;
    }


    .dashboard-kpi-content > small {
        font-size: 8px;
    }


    /* =====================================================
       CARDS
    ====================================================== */

    .dashboard-main-row {
        margin-bottom: 20px;
    }


    .today-attendance,
    .payments-overview {
        min-height: auto;
    }


    .today-attendance-value strong {
        font-size: 25px;
    }


    .today-attendance-summary {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }


    .attendance-progress {
        margin-top: 14px;
    }


    .today-attendance-footer {
        margin-top: 15px;
        padding-top: 14px;
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }


    .dashboard-link-button {
        align-self: flex-end;
    }


    .payment-link {
        margin-top: 15px;
    }
}


/* =========================================================
   TELÉFONOS PEQUEÑOS
========================================================= */

@media (max-width: 420px) {

    .dashboard-kpi {
        padding: 9px;
    }


    .dashboard-kpi-icon {
        width: 31px;
        height: 31px;
        flex-basis: 31px;
        font-size: 13px;
    }


    .dashboard-kpi-content > strong {
        font-size: 15px;
    }


    .dashboard-kpi-content > small {
        display: none;
    }


    .today-attendance-counts {
        font-size: 10px;
    }
}
