/* =========================================================
   RAJ MOCK TEST V2.0
   ADMIN RESULTS
========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Poppins", sans-serif;
    background: #f5f7fb;
    color: #172033;
}


/* =========================================================
   TOPBAR
========================================================= */

.topbar {
    min-height: 72px;
    background: #ffffff;
    border-bottom: 1px solid #e7eaf0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 30px;
    position: sticky;
    top: 0;
    z-index: 50;
}


.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}


.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #eef2ff;
    font-size: 22px;
}


.brand strong {
    display: block;
    font-size: 17px;
}


.brand span {
    display: block;
    color: #7b8496;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
}


.top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}


.back-btn,
.logout-btn,
.refresh-btn {
    border: 0;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    border-radius: 10px;
    padding: 10px 15px;
}


.back-btn {
    background: #eef2ff;
    color: #3949ab;
}


.logout-btn {
    background: #fff0f0;
    color: #d93025;
}


.refresh-btn {
    background: #172033;
    color: #ffffff;
}


/* =========================================================
   CONTAINER
========================================================= */

.container {
    width: min(1500px, calc(100% - 40px));
    margin: 0 auto;
    padding: 32px 0 60px;
}


/* =========================================================
   PAGE HEADER
========================================================= */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 24px;
}


.eyebrow {
    color: #5264d9;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 5px;
}


.page-header h1 {
    font-size: 30px;
    line-height: 1.2;
}


.page-header p {
    color: #7a8395;
    margin-top: 7px;
    font-size: 14px;
}


/* =========================================================
   STATS
========================================================= */

.stats-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}


.stat-card {
    background: #ffffff;
    border: 1px solid #e7eaf0;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}


.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: #f0f3ff;
    display: grid;
    place-items: center;
    font-size: 21px;
}


.stat-card span {
    display: block;
    color: #7b8496;
    font-size: 12px;
}


.stat-card strong {
    display: block;
    font-size: 23px;
    margin-top: 2px;
}


/* =========================================================
   FILTER
========================================================= */

.filter-card {
    background: #ffffff;
    border: 1px solid #e7eaf0;
    border-radius: 16px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
}


.search-box {
    width: min(560px, 100%);
    height: 46px;
    border: 1px solid #dfe3eb;
    border-radius: 11px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    gap: 9px;
}


.search-box span {
    font-size: 17px;
}


.search-box input {
    border: 0;
    outline: 0;
    width: 100%;
    font: inherit;
    color: #172033;
    background: transparent;
}


.result-info {
    color: #7b8496;
    font-size: 13px;
}


.result-info strong {
    color: #172033;
}


/* =========================================================
   MESSAGES
========================================================= */

.message {
    background: #ffffff;
    border: 1px solid #e7eaf0;
    border-radius: 15px;
    padding: 22px;
    text-align: center;
    margin-bottom: 16px;
}


.loading-message {
    color: #5264d9;
}


.empty-message {
    color: #7b8496;
}


/* =========================================================
   RESULTS TABLE
========================================================= */

.results-card {
    background: #ffffff;
    border: 1px solid #e7eaf0;
    border-radius: 16px;
    overflow: hidden;
}


.table-wrapper {
    width: 100%;
    overflow-x: auto;
}


table {
    width: 100%;
    min-width: 1180px;
    border-collapse: collapse;
}


thead {
    background: #f8f9fc;
}


th {
    text-align: left;
    padding: 14px 13px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #717b8e;
    white-space: nowrap;
}


td {
    padding: 14px 13px;
    border-top: 1px solid #edf0f5;
    font-size: 12px;
    vertical-align: middle;
}


tbody tr:hover {
    background: #fafbff;
}


/* =========================================================
   STUDENT CELL
========================================================= */

.student-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 175px;
}


.table-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #eef2ff;
    color: #5264d9;
    display: grid;
    place-items: center;
    font-weight: 700;
}


.student-cell strong,
.student-cell span {
    display: block;
}


.student-cell strong {
    font-size: 12px;
}


.student-cell span {
    color: #8991a1;
    font-size: 10px;
    margin-top: 2px;
}


/* =========================================================
   TEST CELL
========================================================= */

.test-cell {
    max-width: 230px;
}


.test-cell strong,
.test-cell span {
    display: block;
}


.test-cell strong {
    font-size: 12px;
}


.test-cell span {
    color: #8991a1;
    font-size: 10px;
    margin-top: 2px;
}


/* =========================================================
   SCORE
========================================================= */

.score-text {
    font-size: 13px;
}


.score-excellent {
    color: #16864b;
}


.score-average {
    color: #5264d9;
}


.score-low {
    color: #d93025;
}


.correct-pill,
.wrong-pill,
.unattempted-pill {
    display: inline-flex;
    min-width: 30px;
    justify-content: center;
    padding: 4px 7px;
    border-radius: 7px;
    font-weight: 700;
}


.correct-pill {
    background: #eaf8f0;
    color: #16864b;
}


.wrong-pill {
    background: #fff0f0;
    color: #d93025;
}


.unattempted-pill {
    background: #f0f2f5;
    color: #697386;
}


.date-text {
    color: #697386;
    white-space: nowrap;
    font-size: 10px;
}


/* =========================================================
   ACTION BUTTONS
========================================================= */

.action-buttons {
    display: flex;
    gap: 6px;
}


.view-btn,
.delete-btn {
    border: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 10px;
    font-weight: 700;
    border-radius: 7px;
    padding: 7px 9px;
    white-space: nowrap;
}


.view-btn {
    background: #eef2ff;
    color: #5264d9;
}


.delete-btn {
    background: #fff0f0;
    color: #d93025;
}


.view-btn:hover {
    background: #e0e5ff;
}


.delete-btn:hover {
    background: #ffe0e0;
}


.error-cell {
    text-align: center;
    padding: 35px;
    color: #d93025;
}


/* =========================================================
   MODAL
========================================================= */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 18, 35, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 100;
}


.modal {
    width: min(600px, 100%);
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 70px rgba(0,0,0,.2);
}


.modal-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #edf0f5;
}


.modal-label {
    color: #5264d9;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}


.modal-header h2 {
    font-size: 19px;
    margin-top: 3px;
}


.close-btn {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 9px;
    background: #f2f4f7;
    font-size: 23px;
    cursor: pointer;
}


.modal-body {
    padding: 20px;
}


.student-modal {
    display: flex;
    align-items: center;
    gap: 11px;
}


.modal-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #eef2ff;
    color: #5264d9;
    display: grid;
    place-items: center;
    font-weight: 700;
}


.student-modal strong,
.student-modal span {
    display: block;
}


.student-modal span {
    color: #7b8496;
    font-size: 11px;
    margin-top: 2px;
}


.modal-score {
    margin: 22px 0;
    text-align: center;
}


.modal-score strong {
    display: block;
    font-size: 38px;
    color: #5264d9;
}


.modal-score span {
    color: #7b8496;
    font-size: 11px;
}


.modal-grid {
    display: grid;
    grid-template-columns:
        repeat(4, 1fr);
    gap: 10px;
}


.modal-grid > div {
    border: 1px solid #edf0f5;
    border-radius: 10px;
    padding: 12px;
}


.modal-grid span,
.modal-grid strong {
    display: block;
}


.modal-grid span {
    color: #7b8496;
    font-size: 10px;
}


.modal-grid strong {
    margin-top: 3px;
    font-size: 12px;
}


.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #edf0f5;
    display: flex;
    justify-content: flex-end;
    gap: 9px;
}


.modal-delete-btn,
.modal-close-btn {
    border: 0;
    cursor: pointer;
    border-radius: 9px;
    padding: 10px 14px;
    font-family: inherit;
    font-weight: 600;
}


.modal-delete-btn {
    background: #fff0f0;
    color: #d93025;
}


.modal-close-btn {
    background: #172033;
    color: #ffffff;
}


/* =========================================================
   DELETE MODAL
========================================================= */

.delete-modal {
    width: min(430px, 100%);
    background: #ffffff;
    border-radius: 18px;
    padding: 28px;
    text-align: center;
}


.delete-icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #fff2df;
    display: grid;
    place-items: center;
    margin: 0 auto 15px;
    font-size: 25px;
}


.delete-modal h2 {
    font-size: 20px;
}


.delete-modal > p {
    color: #7b8496;
    font-size: 12px;
    margin: 8px 0 18px;
}


.delete-info {
    background: #f7f8fa;
    border-radius: 11px;
    padding: 13px;
}


.delete-info strong,
.delete-info span,
.delete-info small {
    display: block;
}


.delete-info strong {
    font-size: 13px;
}


.delete-info span {
    color: #5264d9;
    font-size: 11px;
    margin-top: 3px;
}


.delete-info small {
    color: #7b8496;
    margin-top: 4px;
}


.delete-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}


.cancel-btn,
.confirm-delete-btn {
    border: 0;
    cursor: pointer;
    border-radius: 9px;
    padding: 10px 17px;
    font-family: inherit;
    font-weight: 600;
}


.cancel-btn {
    background: #eef0f4;
    color: #3d4657;
}


.confirm-delete-btn {
    background: #d93025;
    color: #ffffff;
}


.confirm-delete-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 800px) {

    .topbar {
        padding: 12px 15px;
    }


    .top-actions {
        gap: 5px;
    }


    .back-btn,
    .logout-btn {
        padding: 8px 9px;
        font-size: 11px;
    }


    .container {
        width: min(
            100% - 24px,
            1500px
        );

        padding-top: 22px;
    }


    .page-header {
        align-items: flex-start;
        flex-direction: column;
    }


    .page-header h1 {
        font-size: 25px;
    }


    .stats-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }


    .filter-card {
        align-items: stretch;
        flex-direction: column;
    }


    .search-box {
        width: 100%;
    }


    .modal-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

}


@media (max-width: 500px) {

    .brand span {
        display: none;
    }


    .brand strong {
        font-size: 14px;
    }


    .stats-grid {
        grid-template-columns: 1fr;
    }


    .modal-grid {
        grid-template-columns: 1fr 1fr;
    }

}