body.exam-master-page.assessment-ui {
    background:
        radial-gradient(ellipse at 65% 0, #eeeeff, transparent 48%), #fcfdff !important;
    font-family: Inter, sans-serif;
    color: #121938 !important;
    font-size: 14px;
}
body.exam-master-page .cw-school-strip {
    padding: 12px 34px !important;
    margin: 0 !important;
    border-radius: 0 !important;
    min-height: 84px;
    background: linear-gradient(110deg, #fff, #f0f0ff) !important;
    border-bottom: 1px solid #d8ddff;
    box-shadow: 0 2px 7px #293dae15;
}
body.exam-master-page .cw-school-logo {
    border: 1px solid #dce2ff;
    background: #fafbff !important;
    color: #3055ff !important;
    border-radius: 14px;
    box-shadow: 0 4px 7px #263fad15;
}
body.exam-master-page .cw-school-brand p {
    color: #2148ff !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 12px;
    font-weight: 800;
}
body.exam-master-page .erp-page-purpose {
    margin: 26px 22px 18px !important;
    padding: 16px 22px !important;
    border: 1px solid #d9dcff !important;
    border-radius: 18px !important;
    background: linear-gradient(110deg, #fafaff, #e9eaff) !important;
    box-shadow: 0 3px 6px #24379a18;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.assessment-purpose-copy {
    display: flex;
    gap: 20px;
    align-items: center;
}
.assessment-purpose-icon {
    padding: 16px;
    border-radius: 18px;
    background: #e8eaff;
    color: #3855ff;
    font-size: 34px;
}
.assessment-purpose-copy h1 {
    font-size: 28px;
    margin: 0 0 4px;
}
.assessment-purpose-copy p {
    margin: 0;
    font-size: 16px;
}
body.exam-master-page .erp-nav-chip {
    border: 1px solid #bdc6ff !important;
    background: linear-gradient(#fff, #e0e5ff) !important;
    color: #26389b !important;
    border-radius: 11px;
    padding: 12px 18px;
    font-weight: 700 !important;
    box-shadow: 0 3px 5px #28378c18;
    text-decoration: none;
}
.erp-page-purpose__actions {
    display: flex;
    gap: 15px;
}
body.exam-master-page .cw-school-actions .erp-nav-chip {
    background: linear-gradient(#5276ff, #0730ed) !important;
    color: white !important;
    -webkit-text-fill-color: white !important;
}
body.exam-master-page .admin-container {
    display: block !important;
    padding: 0 20px 20px !important;
    margin: 0 !important;
}
body.exam-master-page #mastering-marks {
    display: block !important;
    height: auto !important;
    position: relative;
    padding: 0 !important;
}
.mm-breadcrumb {
    padding: 11px 16px;
    background: linear-gradient(100deg, #f4f5ff, #dfe5ff);
    border-radius: 10px;
    margin-bottom: 24px;
    color: #424c72;
}
.mm-breadcrumb a {
    color: #284cff;
    text-decoration: none;
    font-weight: 700;
}
body.exam-master-page .pane-header {
    margin: 0 0 20px !important;
    padding: 0 !important;
    max-width: 68%;
}
body.exam-master-page .pane-header h2 {
    font-size: 28px;
    margin: 0 0 8px !important;
    letter-spacing: -0.7px;
}
body.exam-master-page .pane-header i {
    color: #3658ff;
}
body.exam-master-page .pane-header p {
    font-size: 16px;
    margin: 0 !important;
}
body.exam-master-page .filter-bar {
    width: 68%;
    display: flex !important;
    gap: 24px !important;
    padding: 18px 24px !important;
    margin: 0 !important;
    box-sizing: border-box;
    background: linear-gradient(110deg, #fff, #f6f7ff) !important;
    border: 1px solid #d4dbff !important;
    box-shadow: 0 3px 5px #233b8712 !important;
    border-radius: 15px !important;
}
.filter-group {
    flex: 1;
    min-width: 0;
}
.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
}
.filter-group label:before {
    content: '◇';
    color: #3157ff;
    font-size: 20px;
    margin-right: 12px;
}
body.exam-master-page select {
    width: 100%;
    height: 38px;
    border: 1px solid #cdd1e2 !important;
    border-radius: 8px !important;
    font-size: 14px;
    font-weight: 500 !important;
}
.mm-context {
    position: absolute;
    right: 0;
    top: 62px;
    width: 30%;
    box-sizing: border-box;
    border: 1px solid #d6dcff;
    border-radius: 15px;
    background: linear-gradient(115deg, #fbfcff, #e8e9ff);
    box-shadow: 0 4px 7px #233b8712;
    padding: 14px 16px;
    min-height: 178px;
}
.mm-context h3 {
    margin: 0 0 18px;
    color: #3047cf !important;
    font-size: 16px;
}
.mm-context > div {
    background: #ffffffa8;
    padding: 12px 8px;
    border-radius: 12px;
    font-weight: 600;
    line-height: 1.7;
}
.mm-context p {
    border-top: 1px solid #d5daed;
    padding-top: 12px;
    margin-bottom: 0;
    font-size: 12px;
}
#mm-current-year-note {
    margin: 20px 6px 26px !important;
    font-size: 16px;
    color: #171e43 !important;
}
.mm-stats {
    display: flex;
    gap: 20px;
    margin: 0 5px 30px;
}
.mm-stats > div {
    flex: 1;
    min-width: 0;
    border: 1px solid #dce5ff;
    border-radius: 12px;
    background: linear-gradient(120deg, #fafdff, #e9f0ff);
    padding: 16px;
    display: grid;
    grid-template-columns: 48px 1fr;
    column-gap: 12px;
    align-items: center;
}
.mm-stats i {
    grid-row: span 2;
    color: #3958ff;
    background: #e1ecff;
    border-radius: 50%;
    padding: 10px;
    font-size: 25px;
}
.mm-stats strong {
    font-size: 24px;
    color: #373fc1;
}
.mm-stats span {
    font-size: 12px;
    color: #424c73;
}
.mm-stats > div:nth-child(2) {
    background: #f3edff;
}
.mm-stats > div:nth-child(3) {
    background: #effaf3;
}
.mm-stats > div:nth-child(4) {
    background: #fff0f3;
}
.mm-stats > div:nth-child(4) strong {
    color: #aa1724;
}
.mm-stats > div:nth-child(5) {
    font-size: 12px;
}
.mm-stats .mm-entry-progress {
    flex: 1.6;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    border-color: #f0f2fc;
    gap: 7px;
    font-size: 12px;
}
progress {
    width: 100%;
    height: 13px;
    accent-color: #4360fa;
}
body.exam-master-page .btn {
    border-radius: 9px !important;
    padding: 10px 15px !important;
    font-size: 13px;
    font-weight: 600 !important;
    box-shadow: 0 3px 5px #233b8718;
    white-space: nowrap;
}
body.exam-master-page .btn-secondary {
    background: linear-gradient(#fff, #dfe4f6) !important;
    border: 1px solid #cad2ef !important;
    color: #182453 !important;
    -webkit-text-fill-color: #182453 !important;
}
body.exam-master-page .btn-primary {
    background: linear-gradient(#5275ff, #1035ef) !important;
    border: 0;
}
body.exam-master-page .btn-success {
    background: linear-gradient(#31bb51, #009723) !important;
    border: 0;
}
.action-bar {
    margin-bottom: 24px !important;
    gap: 12px;
    flex-wrap: wrap;
}
body.exam-master-page #mm-grid {
    height: 260px !important;
    min-height: 260px;
    border: 1px solid #cdd6ff !important;
    border-radius: 13px;
    overflow: hidden;
    box-shadow: 0 3px 7px #233b8710;
    --ag-header-background-color: #e2e5ff;
    --ag-header-foreground-color: #1c275d;
    --ag-background-color: #fcfdff;
    --ag-odd-row-background-color: #f8f8ff;
    --ag-border-color: #e1e4f2;
    --ag-font-family: Inter, sans-serif;
    --ag-font-size: 14px;
    --ag-cell-horizontal-padding: 18px;
}
#mm-grid .ag-header-cell {
    font-weight: 700;
}
body.exam-master-page #mm-grid .ag-cell {
    display: flex;
    align-items: center;
    border-right: 1px solid #e3e5f4;
    font-weight: 600;
}
body.exam-master-page #mm-grid .ag-cell.mm-mark-cell {
    background: #fafaff !important;
    box-shadow:
        inset 10px 10px #f8f9ff,
        inset -10px -10px #f8f9ff;
}
body.exam-master-page #mm-grid .ag-cell.mm-summary-cell {
    background: #2b374e !important;
    box-shadow:
        inset 9px 10px #fafbff,
        inset -9px -10px #fafbff;
    justify-content: center;
    color: white !important;
}
body.exam-master-page #mm-grid .ag-cell.mm-result-pass {
    background: #dcf8e4 !important;
    color: #087932 !important;
    -webkit-text-fill-color: #087932 !important;
}
body.exam-master-page #mm-grid .ag-cell.mm-result-fail {
    background: #fbdce2 !important;
    color: #a31324 !important;
    -webkit-text-fill-color: #a31324 !important;
}
.mm-keyboard {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 28px;
    padding: 13px 20px;
    background: linear-gradient(100deg, #f5f5ff, #eef0fa);
    border: 1px solid #e0e5ff;
    border-radius: 12px;
    margin-top: 22px;
    font-size: 12px;
}
kbd {
    padding: 5px 8px;
    background: #fafbff;
    border: 1px solid #cbd3ed;
    box-shadow: 0 2px 3px #29365712;
    border-radius: 5px;
    color: #293da3;
}
.mm-progress-panel {
    margin: 12px 0;
}
@media (max-width: 1000px) {
    .mm-context {
        position: static;
        width: 100%;
        margin-bottom: 20px;
    }
    body.exam-master-page .filter-bar,
    body.exam-master-page .pane-header {
        width: 100%;
        max-width: 100%;
    }
    .mm-stats {
        flex-wrap: wrap;
    }
    .mm-stats > div {
        min-width: 150px;
    }
    .erp-page-purpose {
        flex-wrap: wrap;
        gap: 20px;
    }
    .filter-bar {
        flex-wrap: wrap;
    }
    .filter-group {
        min-width: 140px;
    }
}
/* Extended tools stay collapsed to preserve the reference marks workspace. */
body.exam-master-page #mm-grid .ag-cell.mm-mark-cell {
    padding: 10px !important;
    box-shadow: none;
    background: #f9faff !important;
}
body.exam-master-page input.mm-score {
    width: 100%;
    height: 38px;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid #ccd1e0 !important;
    border-radius: 7px !important;
    background: linear-gradient(#fff, #fafaff) !important;
    font-size: 15px;
    font-weight: 500 !important;
    padding: 0 12px;
    outline-offset: 2px;
}
body.exam-master-page input.mm-score.mm-empty {
    background: #fff0f2 !important;
    border-color: #f0b8c3 !important;
}
body.exam-master-page input.mm-score.mm-edited {
    border-color: #647cff !important;
    box-shadow: inset 3px 0 #647cff;
}
body.exam-master-page input.mm-score[aria-invalid='true'] {
    border: 2px solid #bb1637 !important;
    background: #fff0f3 !important;
}
body.exam-master-page input.mm-score:focus-visible {
    outline: 2px solid #3155ff !important;
}
.mm-subject-limits {
    display: block;
    font-size: 9px;
    font-weight: 500;
    color: #4e587b;
    line-height: 13px;
}
.mm-row-select {
    display: flex;
    gap: 5px;
    align-items: center;
    font-size: 13px;
}
.mm-row-select input {
    accent-color: #3155ff;
    width: 13px;
    height: 13px;
}
.ag-row.mm-selected-row {
    outline: 1px solid #8b9dff;
    outline-offset: -1px;
}
body.exam-master-page #mm-grid .ag-cell.mm-result-cell {
    justify-content: center;
    font-weight: 700;
    background: #f2f3fa !important;
    color: #4b5470 !important;
    box-shadow:
        inset 9px 10px #fafbff,
        inset -9px -10px #fafbff;
}
body.exam-master-page #mm-grid .ag-cell.mm-result-pass {
    background: #d9f4df !important;
    color: #087932 !important;
    -webkit-text-fill-color: #087932 !important;
}
body.exam-master-page #mm-grid .ag-cell.mm-result-fail {
    background: #fbdce2 !important;
    color: #a31324 !important;
    -webkit-text-fill-color: #a31324 !important;
}
body.exam-master-page #mm-grid .ag-cell.mm-result-incomplete {
    background: #fff1cf !important;
    color: #72500c !important;
    -webkit-text-fill-color: #72500c !important;
    font-size: 12px;
}
.mm-tools[hidden] {
    display: none !important;
}
.mm-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
    padding: 14px;
    border: 1px solid #d6ddff;
    background: #f5f7ff;
    border-radius: 12px;
    margin-bottom: 12px;
}
.mm-tools label {
    display: grid;
    gap: 5px;
    font-size: 12px;
}
.mm-tools label input {
    height: 38px;
    padding: 8px !important;
    font-size: 13px;
}
.mm-tools label select {
    min-width: 155px;
}
.mm-tools button {
    height: 38px;
}
.mm-tools span {
    align-self: center;
    font-size: 12px;
}
.mm-keyboard {
    gap: 18px !important;
}
.mm-autosave {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.mm-tools-toggle {
    border: 0;
    background: none;
    color: #2445bc;
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
    padding: 0;
}
.mm-save-result {
    font-size: 12px;
    color: #344676;
    margin: 8px 4px;
    min-height: 15px;
}
.mm-input-error:not(:empty) {
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 1px solid #f1a4b7;
    background: #fff1f4;
    color: #991b32;
    border-radius: 8px;
}
.mm-input-error {
    font-size: 13px;
}
.mm-stats [role='button'] {
    cursor: pointer;
}
.mm-stats [role='button']:focus-visible {
    outline: 2px solid #3155ff;
    outline-offset: 3px;
}
#mm-dialog {
    width: min(760px, 90vw);
    max-height: 85vh;
    overflow: auto;
    border: 1px solid #cbd5ff;
    border-radius: 18px;
    padding: 24px;
    color: #172045;
    background: #fcfdff;
    box-shadow: 0 20px 80px #16275d40;
    font-family: Inter, sans-serif;
}
#mm-dialog::backdrop {
    background: #18254666;
}
#mm-dialog h2 {
    font-size: 23px;
    margin: 0 0 20px;
}
#mm-dialog p {
    font-size: 14px;
    line-height: 1.6;
}
#mm-dialog table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
#mm-dialog th,
#mm-dialog td {
    padding: 9px;
    text-align: left;
    border-bottom: 1px solid #dce2f4;
}
#mm-dialog th {
    background: #e9edff;
    position: sticky;
    top: 0;
}
#mm-dialog-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}
.mm-preview-scroll {
    max-height: 350px;
    overflow: auto;
}
.mm-error-list {
    background: #fff1f4;
    color: #9d1933;
    padding: 12px 25px;
    border-radius: 8px;
    max-height: 160px;
    overflow: auto;
}
.mm-history {
    padding: 0;
    list-style: none;
}
.mm-history li {
    padding: 12px 0;
    border-bottom: 1px solid #dce2f4;
}
.mm-history p {
    margin: 5px 0;
}
.mm-history small {
    color: #52617e;
}
.mm-mobile {
    display: none;
}
.mm-score:disabled {
    opacity: 0.75 !important;
    cursor: not-allowed;
}
.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
@media (max-width: 1250px) {
    .action-bar > div:last-child {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    .mm-stats {
        gap: 10px;
    }
    .mm-stats > div {
        padding: 12px;
        column-gap: 6px;
    }
    .mm-keyboard {
        gap: 12px !important;
    }
}
@media (max-width: 700px) {
    #mm-grid {
        display: none !important;
    }
    .mm-mobile {
        display: block;
        border: 1px solid #d6ddff;
        background: #fafbff;
        padding: 16px;
        border-radius: 12px;
    }
    .mm-mobile > span {
        display: block;
        margin: 8px 0;
        color: #52617e;
        font-size: 12px;
    }
    #mm-mobile-card {
        display: grid;
        gap: 12px;
    }
    #mm-mobile-card > label {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        font-size: 13px;
    }
    #mm-mobile-card .mm-score {
        width: 110px;
    }
    .cw-school-strip {
        flex-wrap: wrap;
        gap: 12px;
    }
    .erp-page-purpose__actions {
        flex-wrap: wrap;
        gap: 8px;
    }
    .mm-keyboard span:has(kbd) {
        display: none;
    }
    .mm-context {
        min-height: 0;
    }
    .mm-stats > div {
        min-width: 105px;
    }
    .action-bar > div {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    .action-bar > div:last-child {
        justify-content: flex-start;
    }
}
body.exam-master-page.assessment-ui .cw-school-strip {
    width: 100%;
    box-sizing: border-box;
}
body.exam-master-page.assessment-ui .admin-container {
    width: calc(100% - 40px);
    margin: 0 auto !important;
    padding: 0 0 20px !important;
    box-sizing: border-box;
}
body.exam-master-page.assessment-ui .erp-page-purpose {
    width: calc(100% - 44px);
    box-sizing: border-box;
}
body.exam-master-page.assessment-ui .erp-page-purpose h1 {
    font-size: 28px;
}
body.exam-master-page.assessment-ui .erp-page-purpose p {
    font-size: 16px;
}
body.exam-master-page.assessment-ui .erp-page-purpose__actions .erp-nav-chip {
    background: linear-gradient(#fff, #e0e5ff) !important;
    color: #26389b !important;
    -webkit-text-fill-color: #26389b !important;
    border: 1px solid #bdc6ff !important;
    font-size: 15px;
}
body.exam-master-page.assessment-ui .cw-school-brand h2 {
    font-size: 22px;
}
.mm-stats > div > strong {
    grid-column: 2;
    grid-row: 1;
}
.mm-stats > div > span {
    grid-column: 2;
    grid-row: 2;
    white-space: nowrap;
}
.mm-stats > div:nth-child(5) > span {
    grid-row: 1;
}
.mm-stats > div:nth-child(5) > b {
    grid-column: 2;
    grid-row: 2;
    font-size: 11px;
}
.mm-stats .mm-entry-progress span {
    white-space: normal;
}
.mm-stats > div {
    padding: 16px 12px;
    grid-template-columns: 42px 1fr;
}
.mm-stats i {
    font-size: 23px;
    padding: 9px;
}
.mm-stats .mm-entry-progress {
    flex: 1.6;
}
body.exam-master-page.assessment-ui .filter-bar label {
    margin-bottom: 4px;
}
body.exam-master-page.assessment-ui .filter-bar {
    padding: 14px 24px !important;
}
.mm-breadcrumb.erp-breadcrumbs {
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 24px !important;
    border: 0 !important;
    font-size: 14px;
}
.mm-keyboard {
    font-size: 12px;
}
.mm-stats > div {
    min-height: 82px;
    box-sizing: border-box;
}
body.exam-master-page.assessment-ui .pane-header {
    margin-bottom: 16px !important;
}
body.exam-master-page.assessment-ui .filter-bar {
    padding: 10px 24px !important;
}
body.exam-master-page.assessment-ui .filter-group label {
    line-height: 20px;
}
.mm-stats {
    height: 82px;
}
.mm-stats > div {
    min-height: 82px;
    height: 82px;
    padding-block: 12px;
}
.mm-stats .mm-entry-progress {
    justify-content: center;
    gap: 5px;
}
.mm-stats .mm-entry-progress progress {
    height: 13px;
    appearance: none;
    border: 0;
    border-radius: 20px;
    background: #d5daec;
}
.mm-stats progress::-webkit-progress-bar {
    border-radius: 20px;
    background: #d5daec;
}
.mm-stats progress::-webkit-progress-value {
    border-radius: 20px;
    background: #4360fa;
}
body.exam-master-page #mm-grid {
    height: 215px !important;
    min-height: 215px !important;
}
body.exam-master-page #mm-grid .ag-root-wrapper {
    border: 0 !important;
}
.ag-cell:not(.ag-cell-focus) {
    border-bottom: 1px solid #e1e4f2 !important;
    border-left: 0 !important;
}
.ag-cell-focus {
    border-color: #4668ff !important;
}
#mm-context-values {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}
#mm-context-values > span {
    font-size: 12px;
    border-radius: 10px;
    background: #eef0fa;
    padding: 3px 7px;
}
body.exam-master-page.assessment-ui input.mm-score.mm-empty {
    background: #fff0f2 !important;
    border-color: #f0b8c3 !important;
}
body.exam-master-page .erp-company-footer.erp-support-footer {
    width: 100% !important;
    border-radius: 0 !important;
    margin: 14px 0 0 !important;
    padding: 18px 20px !important;
    background: linear-gradient(100deg, #fbfcff, #edf0ff) !important;
    font-size: 12px;
}
.mm-save-result:empty {
    min-height: 0;
    margin: 0;
}
.mm-keyboard {
    padding-block: 12px;
}
@media (max-width: 700px) {
    .mm-stats {
        height: auto;
    }
    .mm-stats > div {
        flex: 1 1 calc(50% - 10px);
        min-width: 0;
        height: 90px;
    }
    .mm-stats > div > span {
        white-space: normal;
    }
    .mm-stats .mm-entry-progress {
        flex: 1 1 calc(50% - 10px);
        height: 90px;
    }
    .mm-mobile-selection input {
        width: 18px;
        height: 18px;
        accent-color: #3155ff;
    }
}
body.exam-master-page.assessment-ui #mm-grid input.mm-score.mm-empty {
    background: #fff0f2 !important;
    border-color: #f0b8c3 !important;
}
body.exam-master-page.assessment-ui #mm-grid .ag-cell {
    border-right: 1px solid #e1e4f2 !important;
    border-top: 0 !important;
    border-bottom: 1px solid #e1e4f2 !important;
}
body.exam-master-page.assessment-ui #mm-grid .ag-cell.mm-summary-cell,
body.exam-master-page.assessment-ui #mm-grid .ag-cell.mm-result-cell {
    background: #fafbff !important;
    box-shadow: none !important;
    padding: 10px !important;
}
.mm-summary-value,
.mm-result-value {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 38px;
    border-radius: 7px;
    font-weight: 700;
}
.mm-summary-value {
    background: linear-gradient(#344159, #253047);
    color: #fff;
    -webkit-text-fill-color: #fff;
}
.mm-result-value {
    background: #edf0f7;
    color: #465473;
    -webkit-text-fill-color: #465473;
}
.mm-badge-pass {
    background: #ddf5e4;
    color: #087932;
    -webkit-text-fill-color: #087932;
}
.mm-badge-fail {
    background: #fbdce2;
    color: #a31324;
    -webkit-text-fill-color: #a31324;
}
.mm-badge-incomplete {
    background: #fff1cf;
    color: #72500c;
    -webkit-text-fill-color: #72500c;
    font-size: 12px;
}
