.mpe-dashboard{

    max-width:1200px;

    margin:40px auto;

}

.mpe-dashboard-header{

    background:#2563eb;

    color:#fff;

    border-radius:20px;

    padding:40px;

    margin-bottom:30px;

}

.mpe-dashboard-header h1{

    font-size:42px;

    margin-bottom:10px;

}

.mpe-dashboard-header p{

    font-size:18px;

    opacity:.9;

}

.mpe-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px;
    width: 100%;
    box-sizing: border-box;
}

.mpe-dashboard-card{

    background:#fff;

    border-radius:18px;

    padding:30px;

    box-shadow:0 15px 35px rgba(0,0,0,.08);

    transition:.3s;

}

.mpe-dashboard-card:hover{

    transform:translateY(-5px);

}

.mpe-card h3{

    margin-bottom:20px;

    font-size:20px;

}

.mpe-card strong{

    display:block;

    font-size:34px;

    color:#2563eb;

    margin-bottom:12px;

}

.mpe-card span{

    color:#666;

}

/* =========================================================
   Subject Performance
   ========================================================= */

.mpe-subject-performance {
    grid-column: 1 / -1 !important;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    margin: 0;
    padding: 28px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
}

.mpe-subject-performance-header {
    margin-bottom: 22px;
}

.mpe-subject-performance-header h3 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 700;
}

.mpe-subject-performance-header p {
    margin: 0;
    color: #666;
    font-size: 15px;
}

.mpe-subject-performance-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
}

.mpe-performance-column {
    padding: 20px;
    border-radius: 14px;
    background: #f8fafc;
}

.mpe-performance-column h4 {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 700;
}

.mpe-performance-item {
    padding: 15px 16px;
    margin-bottom: 12px;
    background: #ffffff;
    border-radius: 12px;
    box-sizing: border-box;
}

.mpe-performance-item:last-child {
    margin-bottom: 0;
}

.mpe-performance-name {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
}

.mpe-performance-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.mpe-performance-meta strong {
    font-size: 18px;
}

.mpe-performance-meta span {
    font-size: 13px;
    color: #777;
}

.mpe-performance-bar {
    width: 100%;
    height: 7px;
    background: #e9edf2;
    border-radius: 10px;
    overflow: hidden;
}

.mpe-performance-bar-fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    transition: width 0.4s ease;
}

.mpe-strong-column .mpe-performance-bar-fill {
    background: #22a06b;
}

.mpe-weak-column .mpe-performance-bar-fill {
    background: #e55353;
}

.mpe-developing-column .mpe-performance-bar-fill {
    background: #e0a11a;
}

.mpe-performance-empty {
    padding: 15px;
    color: #777;
    font-size: 14px;
}

@media (max-width: 700px) {

    .mpe-subject-performance {
        padding: 20px;
    }

    .mpe-subject-performance-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   MEDSTERZ DASHBOARD — MOBILE LAYOUT FIX
   ========================================================= */

@media (max-width: 900px) {

    html,
    body {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    /* THE IMPORTANT FIX:
       Desktop is flex-row.
       Mobile must become flex-column.
    */
    .mpe-layout {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;

        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        margin: 0 !important;
        padding: 0 !important;

        box-sizing: border-box !important;
    }

    /* Sidebar */
    .mpe-layout .mpe-sidebar {
        flex: 0 0 auto !important;

        width: calc(100% - 32px) !important;
        max-width: 100% !important;
        min-width: 0 !important;

        margin: 0 16px 20px !important;
        padding: 20px !important;

        box-sizing: border-box !important;
    }

    /* Main content */
    .mpe-layout .mpe-content {
        flex: 0 0 auto !important;

        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        margin: 0 !important;
        padding: 0 16px !important;

        box-sizing: border-box !important;
    }

    /* Dashboard grid */
    .mpe-dashboard-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;

        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        gap: 18px !important;

        box-sizing: border-box !important;
    }

    .mpe-dashboard-grid > * {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        box-sizing: border-box !important;
    }

    /* Subject Performance */
    .mpe-subject-performance {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        box-sizing: border-box !important;
    }

    .mpe-subject-performance-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;

        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        gap: 14px !important;

        box-sizing: border-box !important;
    }

    .mpe-performance-column {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        box-sizing: border-box !important;
    }

    .mpe-dashboard-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        box-sizing: border-box !important;
    }
}