.medx-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.medx-stat {
    background: linear-gradient(
        135deg,
        #0f1f4a,
        #233f92
    );
    color: #fff;
    border-radius: 18px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(15,31,74,.18);
    transition: .25s ease;
}

.medx-stat:hover {
    transform: translateY(-3px);
}

.medx-stat div:first-child {
    font-size: 12px;
    opacity: .85;
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-bottom: 10px;
}

.medx-stat div:last-child {
    font-size: 30px;
    font-weight: 700;
}

.medx-grid-top {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.medx-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.medx-card {
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0,0,0,.06);
    border: 1px solid #eef2f7;
    transition: .25s ease;
}

.medx-card:hover {
    transform: translateY(-2px);
}

.medx-card h3 {
    margin: 0 0 18px;
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}

#score-trend-chart {
    width: 100% !important;
    height: 260px !important;
}

.readiness-card {
    background: linear-gradient(
        135deg,
        #0f1f4a,
        #233f92
    );
    color: #fff;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    text-align: center;
}

.readiness-card h3 {
    color: #fff;
}

#readiness-score {
    font-size: 72px;
    font-weight: 800;
    line-height: 1;
    margin-top: 20px;
}

.readiness-caption {
    margin-top: 12px;
    opacity: .85;
    font-size: 14px;
}

#mastery-matrix {
    max-height: 550px;
    overflow-y: auto;
    padding-right: 8px;
}

.mastery-item {
    margin-bottom: 16px;
}

.mastery-card {
    margin-top: 24px;
}

.mastery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
}

.mastery-bar {
    height: 10px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.mastery-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        #3b82f6,
        #2563eb
    );
}

#weak-topics > div,
#strong-topics > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eef2f7;
    font-size: 14px;
}

#weak-topics > div:last-child,
#strong-topics > div:last-child {
    border-bottom: none;
}

.ai-coach-card {
    background: linear-gradient(
        135deg,
        #eff6ff,
        #dbeafe
    );
    border: 1px solid #bfdbfe;

    margin-top: 24px;
}

#ai-coach {
    font-size: 15px;
    line-height: 1.9;
    color: #1e3a8a;
}

#ai-coach ol {
    margin-top: 10px;
    padding-left: 22px;
}

#mastery-matrix::-webkit-scrollbar {
    width: 6px;
}

#mastery-matrix::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

@media (max-width: 768px) {

    .medx-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .medx-grid-top {
        grid-template-columns: 1fr;
    }

    .medx-grid {
        grid-template-columns: 1fr;
    }

}