/* ==========================================================
   HAHU SKILL HERITAGE LMS
   Dashboard Version 2
   ========================================================== */


/* ----------------------------------------------------------
   Dashboard Hero
   ---------------------------------------------------------- */

.dashboard-hero{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:var(--space-6);
}

.dashboard-eyebrow,
.section-kicker{
    margin:0 0 7px;
    color:var(--color-accent);
    font-size:.76rem;
    font-weight:900;
    letter-spacing:.08em;
    text-transform:uppercase;
}

.hero-progress-badge{
    min-width:150px;
    padding:20px;
    background:rgba(255,255,255,.14);
    border:1px solid rgba(255,255,255,.28);
    border-radius:var(--radius-large);
    text-align:center;
    backdrop-filter:blur(4px);
}

.hero-progress-badge strong{
    display:block;
    color:#fff;
    font-family:var(--font-heading);
    font-size:2rem;
    line-height:1;
}

.hero-progress-badge span{
    display:block;
    margin-top:7px;
    color:rgba(255,255,255,.9);
    font-size:.78rem;
    font-weight:800;
}


/* ----------------------------------------------------------
   Section Headings
   ---------------------------------------------------------- */

.dashboard-section-heading{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:var(--space-5);
    margin-bottom:var(--space-5);
}

.dashboard-section-heading h2{
    margin:0;
}


/* ----------------------------------------------------------
   Learner Profile
   ---------------------------------------------------------- */

.dashboard-profile-card{
    border-left:5px solid var(--color-accent);
}

.profile-summary{
    display:flex;
    flex-wrap:wrap;
    gap:var(--space-3);
}

.profile-badge{
    padding:9px 14px;
    background:var(--color-primary-light);
    border:1px solid rgba(31,78,121,.18);
    border-radius:var(--radius-pill);
    color:var(--color-primary-dark);
    font-size:.88rem;
    font-weight:800;
}

.learner-status-badge{
    padding:8px 13px;
    background:#eaf5ed;
    border:1px solid #bedfc5;
    border-radius:var(--radius-pill);
    color:#237a3b;
    font-size:.78rem;
    font-weight:900;
}

.learner-status-completed{
    background:#fff4d8;
    border-color:#ebca70;
    color:#815c00;
}


/* ----------------------------------------------------------
   Summary Statistics
   ---------------------------------------------------------- */

.dashboard-summary{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:var(--space-5);
}

.dashboard-stat{
    position:relative;
    padding:var(--space-6);
    overflow:hidden;
    background:#fff;
    border:1px solid var(--color-border);
    border-radius:var(--radius-large);
    box-shadow:var(--shadow-small);
    text-align:center;
}

.dashboard-stat::after{
    position:absolute;
    right:-25px;
    bottom:-25px;
    width:75px;
    height:75px;
    background:var(--color-primary-light);
    border-radius:50%;
    content:"";
}

.stat-icon{
    display:flex;
    align-items:center;
    justify-content:center;
    width:38px;
    height:38px;
    margin:0 auto var(--space-3);
    background:var(--color-primary-light);
    border-radius:50%;
    color:var(--color-primary);
    font-weight:900;
}

.dashboard-stat strong{
    position:relative;
    z-index:1;
    display:block;
    margin-bottom:var(--space-2);
    color:var(--color-primary);
    font-family:var(--font-heading);
    font-size:1.65rem;
}

.dashboard-stat > span:last-child{
    position:relative;
    z-index:1;
    color:var(--color-text-muted);
    font-size:.88rem;
    font-weight:700;
}


/* ----------------------------------------------------------
   Overall Progress
   ---------------------------------------------------------- */

.progress-summary{
    margin-top:var(--space-4);
}

.progress-track{
    width:100%;
    height:18px;
    overflow:hidden;
    background:#e4e9ed;
    border-radius:var(--radius-pill);
    box-shadow:inset 0 1px 3px rgba(0,0,0,.08);
}

.progress-fill{
    height:100%;
    background:linear-gradient(
        90deg,
        var(--color-accent),
        #5ca95e
    );
    border-radius:inherit;
    transition:width 500ms ease;
}

.progress-percentage-label{
    color:var(--color-primary);
    font-family:var(--font-heading);
    font-size:1.5rem;
}

.progress-text{
    margin:12px 0 0;
    color:var(--color-text-muted);
    font-size:.92rem;
    font-weight:700;
    text-align:center;
}


/* ----------------------------------------------------------
   Module Cards
   ---------------------------------------------------------- */

.dashboard-module-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:var(--space-5);
}

.dashboard-module-card{
    display:flex;
    flex-direction:column;
    min-height:230px;
    padding:var(--space-5);
    background:#fff;
    border:1px solid var(--color-border);
    border-top:4px solid #aab4bc;
    border-radius:var(--radius-large);
    box-shadow:var(--shadow-small);
    transition:
        transform 180ms ease,
        box-shadow 180ms ease;
}

.dashboard-module-card:hover{
    transform:translateY(-3px);
    box-shadow:var(--shadow-medium);
}

.module-card-completed{
    border-top-color:#2f8745;
}

.module-card-progress{
    border-top-color:var(--color-accent);
}

.module-card-not-started{
    border-top-color:#9aa7b1;
}

.module-card-top{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
    margin-bottom:var(--space-4);
}

.module-number-badge{
    display:flex;
    align-items:center;
    justify-content:center;
    width:34px;
    height:34px;
    background:var(--color-primary-light);
    border-radius:10px;
    color:var(--color-primary);
    font-weight:900;
}

.module-status{
    padding:6px 9px;
    border-radius:var(--radius-pill);
    font-size:.7rem;
    font-weight:900;
}

.module-status-completed{
    background:#e8f5eb;
    color:#237a3b;
}

.module-status-progress{
    background:#fff3d5;
    color:#9a6800;
}

.module-status-not-started{
    background:#eef1f3;
    color:#65717a;
}

.dashboard-module-card h3{
    margin:0 0 var(--space-4);
    color:var(--color-primary-dark);
}

.module-card-details{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
    margin-bottom:var(--space-5);
}

.module-card-details div{
    padding:10px;
    background:#f6f8fa;
    border-radius:10px;
}

.module-card-details span{
    display:block;
    margin-bottom:4px;
    color:var(--color-text-muted);
    font-size:.72rem;
    font-weight:700;
}

.module-card-details strong{
    display:block;
    color:var(--color-primary-dark);
    font-size:.86rem;
}

.module-card-action{
    margin-top:auto;
    color:var(--color-primary);
    font-weight:900;
    text-decoration:none;
}

.module-card-action:hover{
    text-decoration:underline;
}

.small-dashboard-link{
    color:var(--color-primary);
    font-size:.85rem;
    font-weight:900;
    text-decoration:none;
}

.small-dashboard-link:hover{
    text-decoration:underline;
}


/* ----------------------------------------------------------
   Certificate Status
   ---------------------------------------------------------- */

.certificate-status-card{
    display:flex;
    align-items:center;
    gap:var(--space-5);
    border-left:5px solid #aab4bc;
}

.certificate-ready{
    background:#fffaf0;
    border-left-color:#d6a516;
}

.certificate-status-icon{
    display:flex;
    flex:0 0 auto;
    align-items:center;
    justify-content:center;
    width:62px;
    height:62px;
    background:var(--color-primary-light);
    border-radius:50%;
    color:var(--color-primary);
    font-size:1.6rem;
}

.certificate-ready .certificate-status-icon{
    background:#fff0c5;
    color:#946c00;
}

.certificate-status-content{
    flex:1;
}

.certificate-status-content h2{
    margin:0 0 6px;
}

.certificate-status-content p:last-child{
    margin-bottom:0;
}


/* ----------------------------------------------------------
   Dashboard Actions
   ---------------------------------------------------------- */

.dashboard-actions{
    display:flex;
    flex-wrap:wrap;
    gap:14px;
}

.logout-dashboard-button{
    margin-left:auto;
}


/* ----------------------------------------------------------
   Empty and Error States
   ---------------------------------------------------------- */

.dashboard-empty-state{
    grid-column:1 / -1;
    padding:var(--space-6);
    background:#fff5f5;
    border:1px solid #efc3c3;
    border-radius:var(--radius-large);
    color:#9c2e2e;
    text-align:center;
}


/* ----------------------------------------------------------
   Responsive Design
   ---------------------------------------------------------- */

@media (max-width:1000px){

    .dashboard-summary{
        grid-template-columns:repeat(2,1fr);
    }

    .dashboard-module-grid{
        grid-template-columns:repeat(2,1fr);
    }

}


@media (max-width:700px){

    .dashboard-hero{
        align-items:flex-start;
        flex-direction:column;
    }

    .hero-progress-badge{
        width:100%;
    }

    .dashboard-section-heading{
        align-items:flex-start;
        flex-direction:column;
    }

    .dashboard-module-grid{
        grid-template-columns:1fr;
    }

    .certificate-status-card{
        align-items:flex-start;
        flex-direction:column;
    }

    .dashboard-actions{
        flex-direction:column;
    }

    .dashboard-actions a{
        width:100%;
        text-align:center;
    }

    .logout-dashboard-button{
        margin-left:0;
    }

}


@media (max-width:520px){

    .dashboard-summary{
        grid-template-columns:1fr;
    }

    .profile-summary{
        flex-direction:column;
    }

    .profile-badge{
        width:100%;
    }

    .module-card-details{
        grid-template-columns:1fr;
    }

}