/*
=========================================================
TEACHER RESULTS — UI FOUNDATION
=========================================================
*/

/* Main teacher result detail area */
#em-teacher-result-detail {
    width: 100%;
    box-sizing: border-box;
}

/* Dynamic result content */
#em-teacher-result-detail-content { 
    width: 100%; 
    max-width: 1180px; 
    margin: 0 auto; 
    padding: 12px 24px 24px; 
    box-sizing: border-box; 
}

/* Result header information */
.em-result-session-info {
    width: 100%;
    margin-bottom: 28px;
    box-sizing: border-box;
}

/* Batch / Exam / Date information */
.em-result-session-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
}

/* Individual information item */
.em-result-detail-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-sizing: border-box;
}

/* Information label */
.em-result-detail-item span {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

/* Information value */
.em-result-detail-item strong {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

/*
=========================================================
RESULT SUMMARY — DESKTOP GRID
=========================================================
*/

.em-result-summary {
    width: 100%;
    margin-top: 8px;
    box-sizing: border-box;
}

.em-result-summary h3 {
    margin: 0 0 14px 0;
}

/* Summary card grid */
.em-result-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
    box-sizing: border-box;
}

/* Individual summary card */
.em-result-summary-card {
    min-height: 105px;
    padding: 18px 20px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 3px solid #2563eb;
    border-radius: 10px;

    box-sizing: border-box;

    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

/* Summary label */
.em-result-summary-card span {
    display: block;

    margin-bottom: 8px;

    font-size: 12px;
    line-height: 1.3;
    font-weight: 600;

    color: #64748b;
}

/* Summary value */
.em-result-summary-card strong {
    display: block;

    font-size: 24px;
    line-height: 1.2;
    font-weight: 700;

    color: #0f172a;
}

/*
=========================================================
RESULT SUMMARY — MOBILE
=========================================================
*/

@media (max-width: 768px) {

    .em-result-summary-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .em-result-summary-card {
        min-height: 90px;
        padding: 16px 18px;
    }

    .em-result-summary-card strong {
        font-size: 22px;
    }

}

/*
=========================================================
STUDENT RESULTS — TABLE UI
=========================================================
*/

.em-result-student-section {
    width: 100%;
    margin-top: 28px;
}

.em-result-student-section h3 {
    margin: 0 0 6px;
}

.em-result-student-section > p {
    margin: 0 0 14px;
    color: #64748b;
    font-size: 13px;
}

.em-result-student-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.em-result-student-table {
    width: 100%;
    min-width: 820px;
    border-collapse: collapse;
    background: #ffffff;
    border: 1px solid #dbe3ec;
    font-size: 13px;
}

.em-result-student-table th {
    padding: 11px 10px;
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid #cbd5e1;
}

.em-result-student-table td {
    padding: 11px 10px;
    color: #334155;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.em-result-student-table tbody tr:last-child td {
    border-bottom: 0;
}

.em-result-student-table tbody tr:hover {
    background: #f8fafc;
}

/* Student name */
.em-result-student-table td strong {
    display: block;
    color: #0f172a;
    font-weight: 700;
}

/* Student ID */
.em-result-student-table td small {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 10px;
}

/* Rank */
.em-result-student-table td:first-child {
    font-weight: 700;
    text-align: center;
}

/* Score */
.em-result-student-table td:nth-child(8) {
    font-weight: 700;
    color: #0f172a;
}

/* Percentage */
.em-result-student-table td:nth-child(9) {
    font-weight: 600;
    white-space: nowrap;
}


/*
=========================================================
TOP 3 PERFORMERS
=========================================================
*/

/* 1st place */
.em-result-student-table tr.em-top-student-1 {
    background: #fff8dc;
}

/* 2nd place */
.em-result-student-table tr.em-top-student-2 {
    background: #f3f5f7;
}

/* 3rd place */
.em-result-student-table tr.em-top-student-3 {
    background: #fff1e6;
}

/* Keep highlight when hovering */
.em-result-student-table tr.em-top-student-1:hover {
    background: #fff3c4;
}

.em-result-student-table tr.em-top-student-2:hover {
    background: #e9edf1;
}

.em-result-student-table tr.em-top-student-3:hover {
    background: #ffe4cf;
}

/* Rank emphasis */
.em-result-student-table tr.em-top-student-1 td:first-child {
    font-size: 15px;
}

.em-result-student-table tr.em-top-student-2 td:first-child {
    font-size: 14px;
}

.em-result-student-table tr.em-top-student-3 td:first-child {
    font-size: 14px;
}


/* -------------------------------------------------------
   BACK TO EXAMS
------------------------------------------------------- */

#em-teacher-result-detail-content > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin: 0 0 12px 0;
    padding: 7px 14px;

    background: #1d4ed8;
    color: #ffffff !important;

    border: 0;
    border-radius: 6px;

    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;

    text-decoration: none !important;

    box-shadow: 0 2px 6px rgba(29, 78, 216, 0.18);

    transition:
        background-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

#em-teacher-result-detail-content > a:hover {
    background: #1e40af;
    color: #ffffff !important;
    transform: translateY(-1px);
}


/* -------------------------------------------------------
   MAIN PAGE TITLE
------------------------------------------------------- */

/*
   The result page title.
*/

#em-teacher-result-detail-content > h2,
#em-teacher-result-detail-content > h3 {

    margin: 0 0 7px 0;
    padding: 14px 18px;

    background: linear-gradient(
        135deg,
        #eff6ff 0%,
        #f8fafc 100%
    );

    border-left: 4px solid #2563eb;
    border-radius: 8px;

    color: #0f172a;

    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;

    letter-spacing: -0.2px;

    box-sizing: border-box;
}


/* -------------------------------------------------------
   PAGE DESCRIPTION
------------------------------------------------------- */

#em-teacher-result-detail-content > p {

    margin: 0 0 18px 0;

    color: #64748b;

    font-size: 12px;
    line-height: 1.6;
}


/* -------------------------------------------------------
   BATCH / EXAM / DATE AREA
------------------------------------------------------- */

.em-result-session-info {
    margin-top: 0;
    margin-bottom: 22px;
    padding: 0;
}

.em-result-session-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}


/* Session cards */

.em-result-detail-item {
    min-height: 68px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: 12px 15px;

    background: #ffffff;

    border: 1px solid #dbe4ef;
    border-radius: 8px;

    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);

    box-sizing: border-box;
}

.em-result-detail-item span {
    margin-bottom: 4px;

    font-size: 10px;
    line-height: 1.2;
    font-weight: 600;

    color: #64748b;
}

.em-result-detail-item strong {
    font-size: 14px;
    line-height: 1.3;
    font-weight: 700;

    color: #0f172a;
}


/* -------------------------------------------------------
   SECTION HEADINGS
------------------------------------------------------- */

.em-result-summary h3,
.em-result-student-section h3,
.em-result-question-section h3 {

    margin: 0 0 7px 0;
    padding: 9px 12px;

    background: #f8fafc;

    border-left: 3px solid #2563eb;
    border-bottom: 1px solid #e2e8f0;

    border-radius: 5px;

    color: #0f172a;

    font-size: 15px;
    line-height: 1.35;
    font-weight: 700;

    box-sizing: border-box;
}


/* -------------------------------------------------------
   SECTION DESCRIPTIONS
------------------------------------------------------- */

.em-result-summary > p,
.em-result-student-section > p,
.em-result-question-section > p {

    margin: 0 0 12px 0;

    color: #64748b;

    font-size: 11px;
    line-height: 1.5;
}


/* -------------------------------------------------------
   SECTION SPACING
------------------------------------------------------- */

.em-result-summary {
    margin-top: 0;
    margin-bottom: 24px;
}

.em-result-student-section {
    margin-top: 0;
    margin-bottom: 24px;
}

.em-result-question-section {
    margin-top: 0;
    margin-bottom: 0;
}


/* -------------------------------------------------------
   MOBILE
------------------------------------------------------- */

@media (max-width: 768px) {

    #em-teacher-result-detail-content {
        padding: 8px 14px 20px;
    }

    #em-teacher-result-detail-content > h2,
    #em-teacher-result-detail-content > h3 {
        padding: 12px 14px;
        font-size: 18px;
    }

    .em-result-session-details {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .em-result-detail-item {
        min-height: 64px;
        padding: 11px 13px;
    }

    .em-result-summary h3,
    .em-result-student-section h3,
    .em-result-question-section h3 {
        padding: 8px 10px;
        font-size: 14px;
    }
}

/*
=========================================================
STEP 4.4 — STUDENT RESULTS STATUS
=========================================================
*/

/* Result column */
.em-result-student-table th:nth-child(10),
.em-result-student-table td:nth-child(10) {
    text-align: center;
    white-space: nowrap;
}

/* Result value */
.em-result-student-table td:nth-child(10) {
    font-weight: 700;
    color: #334155;
}

/*
=========================================================
STEP 4.4B — RESULT STATUS BADGES
=========================================================
*/

.em-result-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 82px;
    padding: 5px 9px;

    border-radius: 999px;

    font-size: 11px;
    line-height: 1.2;
    font-weight: 700;

    white-space: nowrap;
    box-sizing: border-box;
}

/* PASS */
.em-result-status-pass {
    color: #166534;
    background: #dcfce7;
    border: 1px solid #bbf7d0;
}

/* FAIL */
.em-result-status-fail {
    color: #b91c1c;
    background: #fee2e2;
    border: 1px solid #fecaca;
}

/* NOT ATTEMPTED */
.em-result-status-not-attempted {
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

/* PENDING */
.em-result-status-pending {
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fde68a;
}

/*
=========================================================
STEP 4.4C — STUDENT RESULTS TABLE POLISH
=========================================================
*/

/* -------------------------------------------------------
   TABLE HEADER
------------------------------------------------------- */

.em-result-student-table th {
    padding: 12px 10px;
    background: #f1f5f9;
    color: #1e293b;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
    border-bottom: 2px solid #cbd5e1;
}


/* -------------------------------------------------------
   TABLE CELLS
------------------------------------------------------- */

.em-result-student-table td {
    padding: 12px 10px;
    font-size: 12px;
    line-height: 1.4;
    color: #334155;
    vertical-align: middle;
    border-bottom: 1px solid #e2e8f0;
}


/* -------------------------------------------------------
   STUDENT COLUMN
------------------------------------------------------- */

.em-result-student-table th:nth-child(2),
.em-result-student-table td:nth-child(2) {
    text-align: left;
}

.em-result-student-table td strong {
    font-size: 12px;
    line-height: 1.3;
    color: #0f172a;
}

.em-result-student-table td small {
    margin-top: 3px;
    font-size: 9px;
    line-height: 1.2;
    color: #64748b;
}


/* -------------------------------------------------------
   RANK
------------------------------------------------------- */

.em-result-student-table th:first-child,
.em-result-student-table td:first-child {
    width: 55px;
    text-align: center;
}

.em-result-student-table td:first-child {
    font-weight: 700;
    color: #475569;
}


/* -------------------------------------------------------
   PERFORMANCE COLUMNS
------------------------------------------------------- */

.em-result-student-table td:nth-child(8),
.em-result-student-table td:nth-child(9) {
    font-weight: 700;
    color: #0f172a;
    text-align: center;
}


/* -------------------------------------------------------
   GENERAL NUMERIC COLUMNS
------------------------------------------------------- */

.em-result-student-table th:nth-child(n+3):nth-child(-n+9),
.em-result-student-table td:nth-child(n+3):nth-child(-n+9) {
    text-align: center;
}


/* -------------------------------------------------------
   DATE COLUMN
------------------------------------------------------- */

.em-result-student-table th:nth-child(11),
.em-result-student-table td:nth-child(11) {
    text-align: center;
    white-space: nowrap;
    font-size: 10px;
}


/* -------------------------------------------------------
   ROW HOVER
------------------------------------------------------- */

.em-result-student-table tbody tr:not(.em-top-student-1):not(.em-top-student-2):not(.em-top-student-3):hover {
    background: #f8fafc;
}


/* -------------------------------------------------------
   TOP 3 — STRONGER VISUAL EMPHASIS
------------------------------------------------------- */

.em-result-student-table tr.em-top-student-1 td:first-child,
.em-result-student-table tr.em-top-student-2 td:first-child,
.em-result-student-table tr.em-top-student-3 td:first-child {
    font-weight: 800;
}


/* -------------------------------------------------------
   TOP 1
------------------------------------------------------- */

.em-result-student-table tr.em-top-student-1 td {
    border-bottom-color: #f1d77a;
}


/* -------------------------------------------------------
   TOP 2
------------------------------------------------------- */

.em-result-student-table tr.em-top-student-2 td {
    border-bottom-color: #d7dce1;
}


/* -------------------------------------------------------
   TOP 3
------------------------------------------------------- */

.em-result-student-table tr.em-top-student-3 td {
    border-bottom-color: #f0c9aa;
}

/*
=========================================================
STEP 4.5 — QUESTION ANALYSIS DIFFICULTY BADGES
=========================================================
*/

.em-question-difficulty {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 72px;
    padding: 4px 9px;

    border-radius: 999px;

    font-size: 10px;
    line-height: 1.2;
    font-weight: 700;

    white-space: nowrap;
    box-sizing: border-box;
}


/* EASY */

.em-question-difficulty-easy {
    color: #166534;
    background: #dcfce7;
    border: 1px solid #bbf7d0;
}


/* MODERATE */

.em-question-difficulty-moderate {
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fde68a;
}


/* DIFFICULT */

.em-question-difficulty-difficult {
    color: #b91c1c;
    background: #fee2e2;
    border: 1px solid #fecaca;
}

/*
=========================================================
STEP 4.6 — EXPANDABLE QUESTION TEXT
=========================================================
*/

/* Question text column */
.em-result-question-table
.em-question-text-cell {
    text-align: left;
    vertical-align: top;
}

/* Question content container */
.em-question-text-content {
    width: 100%;
    box-sizing: border-box;
}

/* Short question preview */
.em-question-text-preview {
    display: -webkit-box;

    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;

    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: anywhere;

    color: #334155;
}

/* Expanded question */
.em-question-text-cell.em-question-expanded
.em-question-text-preview {

    display: block;

    -webkit-line-clamp: unset;

    overflow: visible;

    white-space: normal;

    line-height: 1.5;
}


/* View / Hide button */
.em-question-expand-toggle {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 4px;

    margin-top: 6px;
    padding: 3px 7px;

    border: 1px solid #cbd5e1;
    border-radius: 5px;

    background: #f8fafc;
    color: #2563eb;

    font-size: 9px;
    font-weight: 700;

    line-height: 1.2;

    cursor: pointer;

    box-sizing: border-box;
}


/* Arrow */
.em-question-expand-icon {
    font-size: 11px;
    line-height: 1;
}


/* Hover */
.em-question-expand-toggle:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}


/* Expanded button */
.em-question-text-cell.em-question-expanded
.em-question-expand-toggle {

    background: #eff6ff;
    border-color: #93c5fd;
}


/* Focus accessibility */
.em-question-expand-toggle:focus {
    outline: 2px solid #93c5fd;
    outline-offset: 1px;
}

/*
=========================================================
STEP 4.7 — QUESTION ANALYSIS — FINAL 11-COLUMN LAYOUT
=========================================================
*/

/* -------------------------------------------------------
   TABLE WRAPPER
------------------------------------------------------- */

.em-result-question-table-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}


/* -------------------------------------------------------
   MAIN TABLE
------------------------------------------------------- */

.em-result-question-table {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    table-layout: fixed;
    border-collapse: collapse;
    background: #ffffff;
    border: 2px solid #cbd5e1;
    box-sizing: border-box;
}


/* -------------------------------------------------------
   ALL CELLS
------------------------------------------------------- */

.em-result-question-table th,
.em-result-question-table td {
    box-sizing: border-box;
    vertical-align: middle;
    overflow-wrap: anywhere;
    word-break: break-word;
}


/* -------------------------------------------------------
   HEADER
------------------------------------------------------- */

.em-result-question-table th {
    padding: 10px 5px;

    background: #f1f5f9;
    color: #1e293b;

    font-size: 10px;
    line-height: 1.25;
    font-weight: 700;

    text-align: center;
    vertical-align: middle;

    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;

    border: 1px solid #b8c5d4;
}
/* Keep header labels visually separated */
.em-result-question-table th + th {
    border-left: 1px solid #b8c5d4;
}

/* Prevent header text from touching neighboring cells */
.em-result-question-table th {
    letter-spacing: 0.1px;
}

/* -------------------------------------------------------
   BODY CELLS
------------------------------------------------------- */

.em-result-question-table td {
    padding: 9px 6px;
    color: #334155;
    font-size: 10px;
    line-height: 1.35;
    text-align: center;
    vertical-align: middle;
    border: 1px solid #d1d9e2;
}


/* 
---------------------------------------------------------
COLUMN WIDTHS
FINAL 11-COLUMN LAYOUT
---------------------------------------------------------
*/

/* 1. Question */
.em-result-question-table th:first-child,
.em-result-question-table td:first-child {
    width: 6%;
    text-align: center;
    white-space: nowrap;
}

/* 2. Question Text */
.em-result-question-table th:nth-child(2),
.em-result-question-table td:nth-child(2) {
    width: 25%;
    min-width: 0;
    max-width: 25%;
    text-align: left;
    white-space: normal;
}

/* 3. Question Type */
.em-result-question-table th:nth-child(3),
.em-result-question-table td:nth-child(3) {
    width: 9%;
    text-align: center;
    white-space: normal;
}

/* 4. Total */
.em-result-question-table th:nth-child(4),
.em-result-question-table td:nth-child(4),

/* 5. Attempted */
.em-result-question-table th:nth-child(5),
.em-result-question-table td:nth-child(5),

/* 6. Correct */
.em-result-question-table th:nth-child(6),
.em-result-question-table td:nth-child(6),

/* 7. Wrong */
.em-result-question-table th:nth-child(7),
.em-result-question-table td:nth-child(7),

/* 8. Skipped */
.em-result-question-table th:nth-child(8),
.em-result-question-table td:nth-child(8) {
    width: 7%;
    text-align: center;
    white-space: nowrap;
}

/* 9. Accuracy */
.em-result-question-table th:nth-child(9),
.em-result-question-table td:nth-child(9) {
    width: 8%;
    text-align: center;
    white-space: nowrap;
    font-weight: 700;
}

/* 10. Attempt Rate */
.em-result-question-table th:nth-child(10),
.em-result-question-table td:nth-child(10) {
    width: 9%;
    text-align: center;
    white-space: nowrap;
    font-weight: 700;
}

/* 11. Difficulty */
.em-result-question-table th:nth-child(11),
.em-result-question-table td:nth-child(11) {
    width: 8%;
    text-align: center;
    white-space: normal;
}


/* -------------------------------------------------------
   ACCURACY / ATTEMPT RATE VISUAL EMPHASIS
------------------------------------------------------- */

.em-result-question-table th:nth-child(9),
.em-result-question-table th:nth-child(10) {
    color: #1e3a5f;
    background: #eaf0f7;
}

.em-result-question-table td:nth-child(9),
.em-result-question-table td:nth-child(10) {
    background: #f8fafc;
}


/* -------------------------------------------------------
   QUESTION TEXT
------------------------------------------------------- */

.em-result-question-table .em-question-text-preview {
    display: -webkit-box;
    width: 100%;
    max-width: 100%;

    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;

    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: anywhere;
}


/* Expanded question */
.em-result-question-table
.em-question-text-cell.em-question-expanded
.em-question-text-preview {
    display: block;

    width: 100%;
    max-width: 100%;

    -webkit-line-clamp: unset;

    overflow: visible;

    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;

    line-height: 1.5;
}


/* -------------------------------------------------------
   QUESTION TEXT CELL
------------------------------------------------------- */

.em-result-question-table .em-question-text-cell {
    text-align: left;
    vertical-align: top;
}


/* -------------------------------------------------------
   DIFFICULTY BADGE
------------------------------------------------------- */

.em-result-question-table td:nth-child(11)
.em-question-difficulty {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    max-width: 100%;
    min-width: 0;

    box-sizing: border-box;
}


/* -------------------------------------------------------
   ROW HOVER
------------------------------------------------------- */

.em-result-question-table tbody tr:hover {
    background: #f8fafc;
}


/* -------------------------------------------------------
   MOBILE
------------------------------------------------------- */

@media (max-width: 768px) {

    .em-result-question-table-wrapper {
        overflow-x: auto;
    }

    .em-result-question-table {
        min-width: 760px;
    }

    .em-result-question-table th,
    .em-result-question-table td {
        padding: 8px 5px;
        font-size: 10px;
    }

}


/*
---------------------------------------------------------
6. TABLET
---------------------------------------------------------
*/

@media (max-width: 900px) and (min-width: 769px) {

    #em-teacher-result-detail-content {
        padding-left: 20px;
        padding-right: 20px;
    }

    .em-result-session-details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .em-result-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


/*
---------------------------------------------------------
7. MOBILE
---------------------------------------------------------
*/

@media (max-width: 768px) {

    #em-teacher-result-detail-content {
        width: 100%;
        padding: 8px 14px 20px;
    }

    /*
    Session cards
    */
    .em-result-session-details {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .em-result-detail-item {
        min-height: 64px;
        padding: 11px 13px;
    }


    /*
    Summary cards
    */
    .em-result-summary-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .em-result-summary-card {
        min-height: 88px;
        padding: 15px 16px;
    }


    /*
    Section headings
    */
    .em-result-summary h3,
    .em-result-student-section h3,
    .em-result-question-section h3 {
        width: 100%;
        box-sizing: border-box;
    }


    /*
    Tables
    */
    .em-result-student-table-wrapper,
    .em-result-question-table-wrapper {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

}


/*
---------------------------------------------------------
8. VERY SMALL MOBILE SCREENS
---------------------------------------------------------
*/

@media (max-width: 480px) {

    #em-teacher-result-detail-content {
        padding-left: 10px;
        padding-right: 10px;
    }

    .em-result-detail-item {
        padding: 10px 12px;
    }

    .em-result-summary-card {
        padding: 14px 15px;
    }

    .em-result-summary-card strong {
        font-size: 21px;
    }

    .em-result-summary-card span {
        font-size: 11px;
    }

}

/*
=========================================================
STEP 8 — STUDENT RESULTS TABLE UI REFINEMENT
=========================================================
*/

/* Student Results table header */
.em-result-student-table thead th {
    background: #f1f5f9;
    color: #1e293b;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    padding: 10px 8px;
    text-align: center;
    vertical-align: middle;
    white-space: normal;
    border: 1px solid #cbd5e1;
}

/* Keep Student column left aligned */
.em-result-student-table thead th:nth-child(2) {
    text-align: left;
}

/* Student Results table cells */
.em-result-student-table tbody td {
    padding: 10px 8px;
    font-size: 11px;
    line-height: 1.35;
    border: 1px solid #dbe3ec;
    vertical-align: middle;
}

/* Center numeric/result columns */
.em-result-student-table tbody td:not(:nth-child(2)) {
    text-align: center;
}

/* Student information */
.em-result-student-table tbody td:nth-child(2) {
    text-align: left;
    min-width: 120px;
}

/* Student name */
.em-result-student-table tbody td strong {
    font-size: 11px;
    line-height: 1.3;
}

/* Student ID */
.em-result-student-table tbody td small {
    font-size: 9px;
    line-height: 1.2;
}
/* Stronger table boundary */
.em-result-student-table {
    border: 1px solid #b8c6d6;
    border-radius: 6px;
    overflow: hidden;
}
/* Row interaction */
.em-result-student-table tbody tr:not(.em-top-student-1):not(.em-top-student-2):not(.em-top-student-3):hover {
    background: #f8fafc;
}
/* Result column */
.em-result-student-table th:nth-child(10),
.em-result-student-table td:nth-child(10) {
    text-align: center;
    white-space: nowrap;
}
/* Date column */
.em-result-student-table th:nth-child(11),
.em-result-student-table td:nth-child(11) {
    text-align: center;
    white-space: normal;
    font-size: 10px;
    line-height: 1.3;
}

/*
=========================================================
FINAL UI POLISH — EXAM RESULT DETAILS
=========================================================
*/

/* =======================================================
   PAGE CONTAINER
   ======================================================= */

#em-teacher-result-detail-content {
    max-width: 1180px;
    padding: 18px 28px 32px;
    box-sizing: border-box;
}


/* =======================================================
   BACK TO EXAMS BUTTON
   ======================================================= */

#em-teacher-result-detail-content > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin: 0 0 12px 0;
    padding: 8px 15px;

    background: #2563eb;
    color: #ffffff !important;

    border: 1px solid #1d4ed8;
    border-radius: 7px;

    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;

    text-decoration: none !important;

    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.20);

    transition:
        background-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

#em-teacher-result-detail-content > a:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(37, 99, 235, 0.25);
}


/* =======================================================
   PROFESSIONAL PAGE HEADER
   ======================================================= */

#em-teacher-result-detail-content > h2,
#em-teacher-result-detail-content > h3 {

    position: relative;

    margin: 0 0 18px 0;
    padding: 24px 28px 24px 30px;

    background:
        linear-gradient(
            135deg,
            #eff6ff 0%,
            #f8fbff 55%,
            #eef4ff 100%
        );

    border: 1px solid #dbe7f5;
    border-left: 5px solid #2563eb;
    border-radius: 12px;

    color: #0f172a;

    font-size: 25px;
    line-height: 1.25;
    font-weight: 800;

    letter-spacing: -0.4px;

    box-sizing: border-box;

    box-shadow:
        0 4px 14px rgba(15, 23, 42, 0.06);

    overflow: hidden;
}


/* Decorative header glow */

#em-teacher-result-detail-content > h2::after,
#em-teacher-result-detail-content > h3::after {

    content: "";

    position: absolute;

    width: 190px;
    height: 190px;

    right: -65px;
    top: -105px;

    background: rgba(37, 99, 235, 0.07);

    border-radius: 50%;

    pointer-events: none;
}


/* Small visual accent before title */

#em-teacher-result-detail-content > h2::before,
#em-teacher-result-detail-content > h3::before {

    content: "▥";

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    margin-right: 12px;

    vertical-align: middle;

    background: #2563eb;
    color: #ffffff;

    border-radius: 9px;

    font-size: 18px;
    font-weight: 700;

    box-shadow:
        0 4px 10px rgba(37, 99, 235, 0.20);
}


/* =======================================================
   PAGE DESCRIPTION
   ======================================================= */

#em-teacher-result-detail-content > p {

    margin: -7px 0 20px 0;

    color: #64748b;

    font-size: 12px;
    line-height: 1.6;
}


/* =======================================================
   BATCH / EXAM / DATE CARDS
   ======================================================= */

.em-result-session-info {
    margin-bottom: 22px;
}

.em-result-session-details {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.em-result-detail-item {

    min-height: 72px;

    padding: 13px 17px;

    background: #ffffff;

    border: 1px solid #dbe5f0;
    border-radius: 9px;

    box-shadow:
        0 2px 8px rgba(15, 23, 42, 0.045);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.em-result-detail-item:hover {

    transform: translateY(-1px);

    border-color: #bfdbfe;

    box-shadow:
        0 5px 14px rgba(15, 23, 42, 0.07);
}

.em-result-detail-item span {

    margin-bottom: 5px;

    color: #64748b;

    font-size: 10px;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.em-result-detail-item strong {

    color: #0f172a;

    font-size: 15px;
    font-weight: 800;
}


/* =======================================================
   RESULT SUMMARY — 5 COLUMNS / 2 ROWS
   ======================================================= */

.em-result-summary {

    margin-top: 0;
    margin-bottom: 24px;
}


/* Summary heading */

.em-result-summary h3 {

    display: flex;
    align-items: center;

    margin: 0 0 14px 0;
    padding: 10px 14px;

    background:
        linear-gradient(
            90deg,
            #f1f6fc 0%,
            #f8fafc 100%
        );

    border: 1px solid #e2e8f0;
    border-left: 4px solid #2563eb;
    border-radius: 7px;

    color: #0f172a;

    font-size: 15px;
    font-weight: 800;

    box-sizing: border-box;
}


/* Summary grid */

.em-result-summary-grid {

    display: grid;

    grid-template-columns:
        repeat(5, minmax(0, 1fr));

    gap: 12px;

    width: 100%;

    box-sizing: border-box;
}


/* Summary cards */

.em-result-summary-card {

    position: relative;

    min-height: 82px;

    padding: 14px 15px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    background:
        linear-gradient(
            145deg,
            #ffffff 0%,
            #f8fbff 100%
        );

    border: 1px solid #dbe5f0;
    border-left: 3px solid #2563eb;

    border-radius: 9px;

    box-shadow:
        0 3px 10px rgba(15, 23, 42, 0.055);

    overflow: hidden;

    box-sizing: border-box;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


/* Decorative circle */

.em-result-summary-card::after {

    content: "";

    position: absolute;

    width: 58px;
    height: 58px;

    right: -20px;
    top: -20px;

    background: rgba(37, 99, 235, 0.065);

    border-radius: 50%;

    pointer-events: none;
}


.em-result-summary-card:hover {

    transform: translateY(-2px);

    box-shadow:
        0 6px 15px rgba(15, 23, 42, 0.09);
}


/* Summary label */

.em-result-summary-card span {

    position: relative;
    z-index: 1;

    margin-bottom: 5px;

    color: #64748b;

    font-size: 9px;
    line-height: 1.3;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.2px;
}


/* Summary value */

.em-result-summary-card strong {

    position: relative;
    z-index: 1;

    color: #0f172a;

    font-size: 20px;
    line-height: 1.15;
    font-weight: 800;
}


/* =======================================================
   SUMMARY CARD ACCENT COLORS
   ======================================================= */

/* Total Students */

.em-result-summary-card:nth-child(1) {
    border-left-color: #2563eb;
}


/* Attempted */

.em-result-summary-card:nth-child(2) {
    border-left-color: #7c3aed;
}


/* Not Attempted */

.em-result-summary-card:nth-child(3) {
    border-left-color: #f59e0b;
}


/* Passed */

.em-result-summary-card:nth-child(4) {
    border-left-color: #16a34a;
}


/* Failed */

.em-result-summary-card:nth-child(5) {
    border-left-color: #dc2626;
}


/* Average Percentage */

.em-result-summary-card:nth-child(6) {
    border-left-color: #0891b2;
}


/* Average Score */

.em-result-summary-card:nth-child(7) {
    border-left-color: #f59e0b;
}


/* Highest Score */

.em-result-summary-card:nth-child(8) {
    border-left-color: #4f46e5;
}


/* Lowest Score */

.em-result-summary-card:nth-child(9) {
    border-left-color: #db2777;
}


/* Pass Rate */

.em-result-summary-card:nth-child(10) {
    border-left-color: #0d9488;
}


/* =======================================================
   SECTION HEADINGS
   ======================================================= */

.em-result-student-section h3,
.em-result-question-section h3 {

    display: flex;
    align-items: center;

    margin: 0 0 7px 0;

    padding: 10px 14px;

    background:
        linear-gradient(
            90deg,
            #f1f6fc 0%,
            #f8fafc 100%
        );

    border: 1px solid #e2e8f0;
    border-left: 4px solid #2563eb;

    border-radius: 7px;

    color: #0f172a;

    font-size: 16px;
    line-height: 1.35;
    font-weight: 800;

    box-sizing: border-box;
}


/* Section descriptions */

.em-result-student-section > p,
.em-result-question-section > p {

    margin: 0 0 12px 0;

    color: #64748b;

    font-size: 10px;
    line-height: 1.5;
}


/* =======================================================
   TABLE SPACING
   ======================================================= */

.em-result-student-section {
    margin-bottom: 25px;
}

.em-result-question-section {
    margin-bottom: 0;
}


/* =======================================================
   DESKTOP — KEEP SUMMARY IN 2 ROWS
   ======================================================= */

@media (min-width: 901px) {

    .em-result-summary-grid {
        grid-template-columns:
            repeat(5, minmax(0, 1fr));
    }

}


/* =======================================================
   TABLET
   ======================================================= */

@media (max-width: 900px) and (min-width: 769px) {

    .em-result-summary-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

    #em-teacher-result-detail-content {
        padding-left: 20px;
        padding-right: 20px;
    }

}


/* =======================================================
   MOBILE
   ======================================================= */

@media (max-width: 768px) {

    #em-teacher-result-detail-content {
        padding: 12px 14px 22px;
    }

    #em-teacher-result-detail-content > h2,
    #em-teacher-result-detail-content > h3 {

        padding: 18px 18px;

        font-size: 20px;
    }

    #em-teacher-result-detail-content > h2::before,
    #em-teacher-result-detail-content > h3::before {

        width: 32px;
        height: 32px;

        margin-right: 9px;

        font-size: 15px;
    }

    .em-result-session-details {
        grid-template-columns: 1fr;
    }

    .em-result-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .em-result-summary-card {
        min-height: 78px;
        padding: 12px;
    }

    .em-result-summary-card strong {
        font-size: 19px;
    }

    .em-result-student-section h3,
    .em-result-question-section h3 {
        font-size: 14px;
    }
}


/* =======================================================
   VERY SMALL MOBILE
   ======================================================= */

@media (max-width: 480px) {

    .em-result-summary-grid {
        grid-template-columns: 1fr;
    }

    #em-teacher-result-detail-content > h2,
    #em-teacher-result-detail-content > h3 {
        font-size: 18px;
        padding: 15px;
    }

}

/* =========================================================
   PROFESSIONAL EXAM INFORMATION CARDS
   ========================================================= */

.em-result-session-info {
    width: 100%;
    margin: 22px 0 28px;
}

.em-result-session-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
}

.em-result-detail-item {
    position: relative;
    min-height: 82px;
    padding: 18px 20px;
    background: #ffffff;
    border: 1px solid #dce5f0;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(30, 64, 175, 0.07);

    display: flex;
    flex-direction: column;
    justify-content: center;

    overflow: hidden;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

/* Small blue accent on left */
.em-result-detail-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: #2563eb;
}

/* Soft decorative circle */
.em-result-detail-item::after {
    content: "";
    position: absolute;
    width: 75px;
    height: 75px;
    right: -25px;
    top: -28px;
    border-radius: 50%;
    background: #eff6ff;
    pointer-events: none;
}

.em-result-detail-item:hover {
    transform: translateY(-2px);
    border-color: #c7d7ef;
    box-shadow: 0 7px 20px rgba(30, 64, 175, 0.10);
}

/* Label */
.em-result-detail-item span {
    position: relative;
    z-index: 2;

    display: block;
    margin-bottom: 7px;

    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;

    color: #64748b;
}

/* Value */
.em-result-detail-item strong {
    position: relative;
    z-index: 2;

    display: block;

    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;

    color: #172033;

    word-break: break-word;
}

/* Different accent for each information card */
.em-result-detail-item:nth-child(1)::before {
    background: #2563eb;
}

.em-result-detail-item:nth-child(1)::after {
    background: #eff6ff;
}

.em-result-detail-item:nth-child(2)::before {
    background: #7c3aed;
}

.em-result-detail-item:nth-child(2)::after {
    background: #f5f3ff;
}

.em-result-detail-item:nth-child(3)::before {
    background: #16a34a;
}

.em-result-detail-item:nth-child(3)::after {
    background: #f0fdf4;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 800px) {

    .em-result-session-details {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .em-result-detail-item {
        min-height: 72px;
    }

}

@media (max-width: 480px) {

    .em-result-session-info {
        margin: 16px 0 22px;
    }

    .em-result-detail-item {
        padding: 15px 17px;
    }

    .em-result-detail-item strong {
        font-size: 16px;
    }

}

/* =========================================================
   RESULT DETAILS — PROFESSIONAL HEADER
   ========================================================= */

.em-results-detail-header {
    width: 100%;
    margin: 0 0 26px;
    box-sizing: border-box;
}


/* ---------------------------------------------------------
   BACK BUTTON AREA
   --------------------------------------------------------- */

.em-results-detail-header-top {
    width: 100%;
    margin-bottom: 16px;
}

.em-result-back-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    min-height: 38px;
    padding: 8px 15px;

    border: 1px solid #cbdaf2;
    border-radius: 8px;

    background: #0f5fcf;
    color: #ffffff;

    font-size: 12px;
    font-weight: 700;

    cursor: pointer;

    box-shadow: 0 3px 8px rgba(15, 95, 207, 0.18);

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.em-result-back-button:hover {
    background: #0b4fae;
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(15, 95, 207, 0.22);
}

.em-result-back-button:active {
    transform: translateY(0);
}

.em-result-back-icon {
    font-size: 16px;
    line-height: 1;
}


/* ---------------------------------------------------------
   HERO HEADER
   --------------------------------------------------------- */

.em-results-detail-hero {
    position: relative;

    display: flex;
    align-items: center;
    gap: 18px;

    width: 100%;
    min-height: 112px;

    padding: 24px 28px;

    box-sizing: border-box;

    border: 1px solid #dbe6f5;
    border-left: 5px solid #2563eb;
    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            #f8fbff 0%,
            #eef5ff 55%,
            #f8fbff 100%
        );

    overflow: hidden;
}


/* Decorative background shape */

.em-results-detail-hero::after {
    content: "";

    position: absolute;

    width: 190px;
    height: 190px;

    right: -70px;
    top: -90px;

    border-radius: 50%;

    background: rgba(37, 99, 235, 0.07);

    pointer-events: none;
}


/* ---------------------------------------------------------
   HEADER ICON
   --------------------------------------------------------- */

.em-results-detail-hero-icon {
    position: relative;
    z-index: 2;

    flex: 0 0 54px;

    width: 54px;
    height: 54px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: #2563eb;

    color: #ffffff;

    font-size: 25px;

    box-shadow:
        0 6px 14px rgba(37, 99, 235, 0.22);
}


/* ---------------------------------------------------------
   HEADER CONTENT
   --------------------------------------------------------- */

.em-results-detail-hero-content {
    position: relative;
    z-index: 2;

    min-width: 0;
}

.em-results-detail-eyebrow {
    display: block;

    margin-bottom: 5px;

    font-size: 10px;
    line-height: 1.2;

    font-weight: 800;
    letter-spacing: 0.10em;

    color: #2563eb;
}

.em-results-detail-hero h2 {
    margin: 0 0 6px;

    font-size: 27px;
    line-height: 1.2;

    font-weight: 800;

    color: #172033;
}

.em-results-detail-hero p {
    margin: 0;

    font-size: 13px;
    line-height: 1.5;

    color: #64748b;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

    .em-results-detail-header {
        margin-bottom: 20px;
    }

    .em-results-detail-hero {
        min-height: auto;

        padding: 20px;

        gap: 13px;
    }

    .em-results-detail-hero-icon {
        flex-basis: 46px;

        width: 46px;
        height: 46px;

        font-size: 21px;
    }

    .em-results-detail-hero h2 {
        font-size: 21px;
    }

    .em-results-detail-hero p {
        font-size: 12px;
    }

}

@media (max-width: 480px) {

    .em-results-detail-hero {
        align-items: flex-start;
    }

    .em-results-detail-hero-icon {
        flex-basis: 40px;

        width: 40px;
        height: 40px;

        font-size: 18px;
    }

    .em-results-detail-hero h2 {
        font-size: 19px;
    }

    .em-results-detail-eyebrow {
        font-size: 9px;
    }

}

/* =========================================================
   TEACHER EXAM RESULTS — NEXT-GEN EXAM CARD UI
   ========================================================= */

/* ---------------------------------------------------------
   EXAM GRID
   --------------------------------------------------------- */

#em-teacher-results-list-view .em-teacher-results-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* ---------------------------------------------------------
   EXAM CARD
   --------------------------------------------------------- */

#em-teacher-results-list-view .em-teacher-results-list > div,
#em-teacher-results-list-view .em-teacher-result-exam-card {

    position: relative;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    width: 100%;
    min-height: 190px;

    margin: 0;
    padding: 20px;

    box-sizing: border-box;

    background:
        linear-gradient(
            145deg,
            #ffffff 0%,
            #fbfdff 100%
        );

    border: 1px solid #e2e8f0;
    border-radius: 14px;

    box-shadow:
        0 2px 6px rgba(15, 23, 42, 0.04),
        0 8px 24px rgba(15, 23, 42, 0.05);

    overflow: hidden;

    transition:
        transform 0.22s ease,
        border-color 0.22s ease,
        box-shadow 0.22s ease;
}


/* ---------------------------------------------------------
   LEFT ACCENT
   --------------------------------------------------------- */

#em-teacher-results-list-view
.em-teacher-results-list > div::before {

    content: "";

    position: absolute;

    left: 0;
    top: 14px;
    bottom: 14px;

    width: 4px;

    background:
        linear-gradient(
            to bottom,
            #2563eb,
            #60a5fa
        );

    border-radius: 0 4px 4px 0;

    opacity: 0.95;
}


/* ---------------------------------------------------------
   TOP AREA
   --------------------------------------------------------- */

#em-teacher-results-list-view
.em-result-exam-card-top {

    display: flex;
    flex-direction: column;

    width: 100%;
    min-width: 0;

    gap: 10px;

    position: relative;
    z-index: 1;
}


/* ---------------------------------------------------------
   EXAM TITLE
   --------------------------------------------------------- */

#em-teacher-results-list-view
.em-teacher-results-list > div h3 {

    display: flex;
    align-items: center;

    gap: 9px;

    margin: 0 0 14px 0;
    padding: 0;

    color: #172033;

    font-size: 17px;
    line-height: 1.3;

    font-weight: 800;

    letter-spacing: -0.01em;

    word-break: break-word;
}


/* Emoji / icon inside title */

#em-teacher-results-list-view
.em-teacher-results-list > div h3:first-letter {
    font-size: 16px;
}


/* ---------------------------------------------------------
   INFORMATION TEXT
   --------------------------------------------------------- */

#em-teacher-results-list-view
.em-teacher-results-list > div p {

    margin: 6px 0;

    color: #64748b;

    font-size: 12px;
    line-height: 1.5;

    font-weight: 500;
}


/* Information label */

#em-teacher-results-list-view
.em-teacher-results-list > div p strong {

    color: #1e293b;

    font-size: 12px;

    font-weight: 750;
}


/* ---------------------------------------------------------
   BOTTOM ACTION AREA
   --------------------------------------------------------- */

#em-teacher-results-list-view
.em-teacher-results-list > div button,
#em-teacher-results-list-view
.em-teacher-results-list > div a {

    display: inline-flex;

    align-items: center;
    justify-content: center;

    align-self: flex-start;

    min-width: 118px;
    min-height: 36px;

    margin-top: 16px;

    padding: 8px 14px;

    box-sizing: border-box;

    background:
        linear-gradient(
            135deg,
            #2563eb 0%,
            #1d4ed8 100%
        );

    color: #ffffff !important;

    border: 1px solid #1d4ed8;
    border-radius: 8px;

    font-size: 11px;
    line-height: 1.2;

    font-weight: 750;

    text-decoration: none !important;

    white-space: nowrap;

    cursor: pointer;

    box-shadow:
        0 3px 8px rgba(37, 99, 235, 0.20);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


/* ---------------------------------------------------------
   BUTTON HOVER
   --------------------------------------------------------- */

#em-teacher-results-list-view
.em-teacher-results-list > div button:hover,
#em-teacher-results-list-view
.em-teacher-results-list > div a:hover {

    background:
        linear-gradient(
            135deg,
            #1d4ed8 0%,
            #1e40af 100%
        );

    color: #ffffff !important;

    transform: translateY(-2px);

    box-shadow:
        0 6px 14px rgba(37, 99, 235, 0.28);
}


/* ---------------------------------------------------------
   BUTTON ACTIVE
   --------------------------------------------------------- */

#em-teacher-results-list-view
.em-teacher-results-list > div button:active,
#em-teacher-results-list-view
.em-teacher-results-list > div a:active {

    transform: translateY(0);

    box-shadow:
        0 2px 5px rgba(37, 99, 235, 0.18);
}


/* ---------------------------------------------------------
   CARD HOVER
   --------------------------------------------------------- */

#em-teacher-results-list-view
.em-teacher-results-list > div:hover {

    transform: translateY(-4px);

    border-color: #bfdbfe;

    box-shadow:
        0 4px 10px rgba(15, 23, 42, 0.05),
        0 14px 32px rgba(37, 99, 235, 0.10);
}


/* ---------------------------------------------------------
   SUBTLE CARD BACKGROUND DECORATION
   --------------------------------------------------------- */

#em-teacher-results-list-view
.em-teacher-results-list > div::after {

    content: "";

    position: absolute;

    width: 110px;
    height: 110px;

    right: -55px;
    top: -55px;

    border-radius: 50%;

    background: rgba(37, 99, 235, 0.045);

    pointer-events: none;
}


/* ---------------------------------------------------------
   KEEP CONTENT ABOVE DECORATION
   --------------------------------------------------------- */

#em-teacher-results-list-view
.em-teacher-results-list > div > * {

    position: relative;
    z-index: 2;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1000px) {

    #em-teacher-results-list-view
    .em-teacher-results-list {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 15px;
    }

    #em-teacher-results-list-view
    .em-teacher-results-list > div {

        min-height: 185px;

        padding: 18px;
    }
}


/* =========================================================
   MOBILE
   2 CARDS PER ROW
   ========================================================= */

@media (max-width: 768px) {

    #em-teacher-results-list-view
    .em-teacher-results-list {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 12px;
    }

    #em-teacher-results-list-view
    .em-teacher-results-list > div {

        min-height: 175px;

        padding: 15px;

        border-radius: 12px;
    }

    #em-teacher-results-list-view
    .em-teacher-results-list > div h3 {

        gap: 6px;

        margin-bottom: 10px;

        font-size: 14px;
    }

    #em-teacher-results-list-view
    .em-teacher-results-list > div p {

        margin: 5px 0;

        font-size: 10px;
    }

    #em-teacher-results-list-view
    .em-teacher-results-list > div p strong {

        font-size: 10px;
    }

    #em-teacher-results-list-view
    .em-teacher-results-list > div button,
    #em-teacher-results-list-view
    .em-teacher-results-list > div a {

        min-width: 96px;
        min-height: 31px;

        margin-top: 12px;

        padding: 6px 10px;

        font-size: 9px;

        border-radius: 7px;
    }
}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

    #em-teacher-results-list-view
    .em-teacher-results-list {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 9px;
    }

    #em-teacher-results-list-view
    .em-teacher-results-list > div {

        min-height: 160px;

        padding: 13px;

        border-radius: 11px;
    }

    #em-teacher-results-list-view
    .em-teacher-results-list > div h3 {

        font-size: 12px;

        line-height: 1.35;
    }

    #em-teacher-results-list-view
    .em-teacher-results-list > div p {

        font-size: 9px;

        line-height: 1.4;
    }

    #em-teacher-results-list-view
    .em-teacher-results-list > div p strong {

        font-size: 9px;
    }

    #em-teacher-results-list-view
    .em-teacher-results-list > div button,
    #em-teacher-results-list-view
    .em-teacher-results-list > div a {

        min-width: 88px;

        min-height: 29px;

        padding: 5px 8px;

        font-size: 8px;
    }
}

/* =========================================================
   PASSED CARD — PASSING MARKS
   ========================================================= */

.em-result-passed-card {
    position: relative;
}

.em-result-passing-marks {
    display: block;

    margin-top: 8px;

    color: #64748b;

    font-size: 11px;
    line-height: 1.4;

    font-weight: 600;
}

.em-result-passing-marks::before {
    content: "✓ ";

    color: #16a34a;

    font-weight: 800;
}

/* =========================================================
   FINAL UI POLISH
   QUESTION BANK STYLE — TEACHER RESULTS
========================================================= */


/* =========================================================
   MAIN RESULT PAGE
========================================================= */

#em-teacher-result-detail {
    width: 100%;
    box-sizing: border-box;
}

#em-teacher-result-detail-content {
    width: 100%;
    max-width: 1365px;
    margin: 0 auto;

    padding: 22px 28px 40px;

    box-sizing: border-box;
}


/* =========================================================
   RESULT HEADER WRAPPER
========================================================= */

.em-results-detail-header {
    width: 100%;
    margin: 0 0 24px;
}


/* =========================================================
   BACK BUTTON
========================================================= */

.em-results-detail-header-top {
    margin-bottom: 20px;
}

.em-result-back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    min-height: 44px;

    padding: 10px 18px;

    background: #ffffff;
    color: #344054;

    border: 1px solid #d9e1eb;
    border-radius: 11px;

    font-size: 14px;
    font-weight: 650;

    box-shadow:
        0 2px 5px rgba(15, 23, 42, 0.04);

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.em-result-back-button:hover {
    background: #f8fafc;
    color: #101828;

    border-color: #cbd5e1;

    transform: translateY(-1px);

    box-shadow:
        0 6px 16px rgba(15, 23, 42, 0.07);
}

.em-result-back-icon {
    font-size: 17px;
    line-height: 1;
}


/* =========================================================
   RESULT HERO
========================================================= */

.em-results-detail-hero {
    position: relative;

    display: flex;
    align-items: center;

    gap: 18px;

    width: 100%;
    min-height: 118px;

    padding: 28px 30px;

    box-sizing: border-box;

    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #f8fbff 100%
        );

    border: 1px solid #e1e8f0;
    border-radius: 18px;

    box-shadow:
        0 10px 30px rgba(15, 23, 42, 0.055);

    overflow: hidden;
}


/* Decorative circle */

.em-results-detail-hero::after {
    width: 210px;
    height: 210px;

    right: -70px;
    top: -105px;

    background: rgba(37, 99, 235, 0.055);
}


/* Hero icon */

.em-results-detail-hero-icon {
    flex: 0 0 54px;

    width: 54px;
    height: 54px;

    border-radius: 13px;

    background: #f1f5f9;
    color: #2563eb;

    font-size: 25px;

    box-shadow: none;
}


/* Hero content */

.em-results-detail-hero-content {
    min-width: 0;
}

.em-results-detail-eyebrow {
    margin-bottom: 7px;

    color: #64748b;

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 0.12em;
}

.em-results-detail-hero h2 {
    margin: 0;

    color: #101828;

    font-size: 28px;
    line-height: 1.15;

    font-weight: 750;

    letter-spacing: -0.4px;
}

.em-results-detail-hero p {
    margin: 9px 0 0;

    color: #667085;

    font-size: 14px;
    line-height: 1.6;
}


/* =========================================================
   EXAM INFORMATION CARDS
========================================================= */

.em-result-session-info {
    width: 100%;

    margin: 22px 0 22px;
}

.em-result-session-details {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 16px;

    width: 100%;
}

.em-result-detail-item {
    position: relative;

    min-height: 100px;

    padding: 18px 20px;

    background: #ffffff;

    border: 1px solid #e4e9ef;
    border-radius: 15px;

    box-shadow:
        0 6px 20px rgba(15, 23, 42, 0.045);

    box-sizing: border-box;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;

    overflow: hidden;
}


/* Accent */

.em-result-detail-item::before {
    width: 4px;

    left: 0;
    top: 16px;
    bottom: 16px;

    height: auto;

    border-radius: 0 4px 4px 0;

    background: #2563eb;
}


/* Decorative circle */

.em-result-detail-item::after {
    width: 90px;
    height: 90px;

    right: -30px;
    top: -32px;

    background: #f5f8fc;
}

.em-result-detail-item:hover {
    transform: translateY(-2px);

    border-color: #d3dce7;

    box-shadow:
        0 10px 26px rgba(15, 23, 42, 0.07);
}

.em-result-detail-item span {
    margin-bottom: 7px;

    color: #667085;

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 0.07em;
}

.em-result-detail-item strong {
    color: #101828;

    font-size: 17px;
    font-weight: 750;
}


/* Different accents */

.em-result-detail-item:nth-child(1)::before {
    background: #2563eb;
}

.em-result-detail-item:nth-child(2)::before {
    background: #7c3aed;
}

.em-result-detail-item:nth-child(3)::before {
    background: #16a34a;
}


/* =========================================================
   SUMMARY SECTION
========================================================= */

.em-result-summary {
    width: 100%;

    margin: 0 0 24px;
}

.em-result-summary h3 {
    display: flex;
    align-items: center;

    margin: 0 0 14px;

    padding: 13px 16px;

    background:
        linear-gradient(
            90deg,
            #f8fafc 0%,
            #ffffff 100%
        );

    border: 1px solid #e4e9ef;
    border-left: 4px solid #2563eb;

    border-radius: 11px;

    color: #101828;

    font-size: 17px;
    line-height: 1.3;

    font-weight: 750;
}


/* Summary grid */

.em-result-summary-grid {
    display: grid;

    grid-template-columns:
        repeat(5, minmax(0, 1fr));

    gap: 15px;

    width: 100%;
}


/* Summary card */

.em-result-summary-card {
    position: relative;

    min-height: 96px;

    padding: 17px 18px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    background:
        linear-gradient(
            145deg,
            #ffffff 0%,
            #f8fbff 100%
        );

    border: 1px solid #e4e9ef;
    border-left: 3px solid #2563eb;

    border-radius: 13px;

    box-shadow:
        0 6px 18px rgba(15, 23, 42, 0.045);

    overflow: hidden;

    box-sizing: border-box;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.em-result-summary-card:hover {
    transform: translateY(-2px);

    box-shadow:
        0 10px 25px rgba(15, 23, 42, 0.075);
}


/* Decorative circle */

.em-result-summary-card::after {
    width: 70px;
    height: 70px;

    right: -24px;
    top: -24px;

    background: rgba(37, 99, 235, 0.045);
}


/* Summary text */

.em-result-summary-card span {
    margin-bottom: 6px;

    color: #667085;

    font-size: 10px;
    line-height: 1.3;

    font-weight: 700;

    letter-spacing: 0.04em;
}

.em-result-summary-card strong {
    color: #101828;

    font-size: 23px;
    line-height: 1.15;

    font-weight: 800;
}


/* =========================================================
   STUDENT RESULT SECTION
========================================================= */

.em-result-student-section {
    width: 100%;

    margin: 0 0 26px;
}

.em-result-student-section h3,
.em-result-question-section h3 {
    display: flex;
    align-items: center;

    margin: 0 0 8px;

    padding: 13px 16px;

    background:
        linear-gradient(
            90deg,
            #f8fafc 0%,
            #ffffff 100%
        );

    border: 1px solid #e4e9ef;
    border-left: 4px solid #2563eb;

    border-radius: 11px;

    color: #101828;

    font-size: 17px;
    line-height: 1.3;

    font-weight: 750;
}

.em-result-student-section > p,
.em-result-question-section > p {
    margin: 0 0 14px;

    color: #667085;

    font-size: 12px;
    line-height: 1.55;
}


/* =========================================================
   STUDENT TABLE
========================================================= */

.em-result-student-table-wrapper {
    width: 100%;

    overflow-x: auto;

    border: 1px solid #e1e7ee;
    border-radius: 13px;

    box-shadow:
        0 5px 18px rgba(15, 23, 42, 0.04);

    background: #ffffff;
}

.em-result-student-table {
    width: 100%;

    min-width: 820px;

    border: 0;

    border-collapse: separate;
    border-spacing: 0;

    background: #ffffff;

    font-size: 12px;
}

.em-result-student-table th {
    padding: 13px 10px;

    background: #f8fafc;

    color: #344054;

    font-size: 11px;
    font-weight: 750;

    border-bottom: 1px solid #dce3eb;

    white-space: nowrap;
}

.em-result-student-table td {
    padding: 13px 10px;

    color: #475467;

    font-size: 11px;

    border-bottom: 1px solid #edf0f3;

    vertical-align: middle;
}

.em-result-student-table tbody tr:last-child td {
    border-bottom: 0;
}

.em-result-student-table tbody tr:hover {
    background: #f8fafc;
}


/* =========================================================
   QUESTION ANALYSIS SECTION
========================================================= */

.em-result-question-section {
    width: 100%;

    margin: 0;
}


/* =========================================================
   QUESTION ANALYSIS TABLE
========================================================= */

.em-result-question-table-wrapper {
    width: 100%;

    overflow-x: auto;

    border: 1px solid #e1e7ee;
    border-radius: 13px;

    background: #ffffff;

    box-shadow:
        0 5px 18px rgba(15, 23, 42, 0.04);
}

.em-result-question-table {
    width: 100%;

    border: 0;

    border-collapse: separate;
    border-spacing: 0;

    background: #ffffff;
}

.em-result-question-table th {
    padding: 12px 7px;

    background: #f8fafc;

    color: #344054;

    font-size: 10px;
    font-weight: 750;

    border-bottom: 1px solid #dce3eb;

    text-align: center;
}

.em-result-question-table td {
    padding: 11px 7px;

    color: #475467;

    font-size: 10px;

    border-bottom: 1px solid #edf0f3;
}

.em-result-question-table tbody tr:hover {
    background: #f8fafc;
}

.em-result-question-table tbody tr:last-child td {
    border-bottom: 0;
}


/* =========================================================
   DIFFICULTY BADGES
========================================================= */

.em-question-difficulty {
    min-width: 76px;

    padding: 5px 9px;

    border-radius: 999px;

    font-size: 10px;
    font-weight: 750;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 900px) {

    #em-teacher-result-detail-content {
        padding: 18px 20px 30px;
    }

    .em-result-summary-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

}


@media (max-width: 768px) {

    #em-teacher-result-detail-content {
        padding: 15px 14px 25px;
    }

    .em-results-detail-hero {
        min-height: auto;

        padding: 22px;

        gap: 13px;
    }

    .em-results-detail-hero-icon {
        flex: 0 0 46px;

        width: 46px;
        height: 46px;

        font-size: 21px;
    }

    .em-results-detail-hero h2 {
        font-size: 22px;
    }

    .em-results-detail-hero p {
        font-size: 12px;
    }

    .em-result-session-details {
        grid-template-columns: 1fr;

        gap: 12px;
    }

    .em-result-detail-item {
        min-height: 86px;

        padding: 16px 18px;
    }

    .em-result-summary-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 11px;
    }

    .em-result-summary-card {
        min-height: 86px;

        padding: 14px;
    }

    .em-result-summary-card strong {
        font-size: 20px;
    }

    .em-result-student-section h3,
    .em-result-question-section h3 {
        font-size: 15px;
    }

}


@media (max-width: 480px) {

    #em-teacher-result-detail-content {
        padding: 12px 10px 22px;
    }

    .em-results-detail-hero {
        padding: 18px;
    }

    .em-results-detail-hero-icon {
        flex: 0 0 40px;

        width: 40px;
        height: 40px;

        font-size: 18px;
    }

    .em-results-detail-hero h2 {
        font-size: 19px;
    }

    .em-result-summary-grid {
        grid-template-columns: 1fr;
    }

    .em-result-summary-card {
        min-height: 80px;
    }

}