/* Shared Bootstrap button palette. */
html body:is(#staffDashboard, body) :is(.btn.btn-primary, :is(.staff-course-edit-save, button[id$='btnSave' i], input[id$='btnSave' i], a[id$='btnSave' i])) {
    --system-button-bg: #007bff;
    --system-button-hover: #0069d9;
    --system-button-text: #fff;
}

html body:is(#staffDashboard, body) :is(.btn.btn-secondary) {
    --system-button-bg: #6c757d;
    --system-button-hover: #5a6268;
    --system-button-text: #fff;
}

html body:is(#staffDashboard, body) :is(.btn.btn-success:not(.btn-primary), :is(.eb-open-create, .staff-admin-teacher-create-action, .staff-group-management-action, .staff-student-group-create), :is(button, a.btn-u):has(> .fa-plus)) {
    --system-button-bg: #28a745;
    --system-button-hover: #218838;
    --system-button-text: #fff;
}

html body:is(#staffDashboard, body) :is(.btn.btn-danger) {
    --system-button-bg: #dc3545;
    --system-button-hover: #c82333;
    --system-button-text: #fff;
}

html body:is(#staffDashboard, body) :is(.btn.btn-warning) {
    --system-button-bg: #ffc107;
    --system-button-hover: #e0a800;
    --system-button-text: #212529;
}

html body:is(#staffDashboard, body) :is(.btn.btn-info) {
    --system-button-bg: #17a2b8;
    --system-button-hover: #138496;
    --system-button-text: #fff;
}

html body:is(#staffDashboard, body) :is(.btn.btn-light) {
    --system-button-bg: #f8f9fa;
    --system-button-hover: #e2e6ea;
    --system-button-text: #212529;
}

html body:is(#staffDashboard, body) :is(.btn.btn-dark) {
    --system-button-bg: #343a40;
    --system-button-hover: #23272b;
    --system-button-text: #fff;
}

html body:is(#staffDashboard, body) :is(.btn.btn-primary, :is(.staff-course-edit-save, button[id$='btnSave' i], input[id$='btnSave' i], a[id$='btnSave' i])),
html body:is(#staffDashboard, body) :is(.btn.btn-secondary),
html body:is(#staffDashboard, body) :is(.btn.btn-success:not(.btn-primary), :is(.eb-open-create, .staff-admin-teacher-create-action, .staff-group-management-action, .staff-student-group-create), :is(button, a.btn-u):has(> .fa-plus)),
html body:is(#staffDashboard, body) :is(.btn.btn-danger),
html body:is(#staffDashboard, body) :is(.btn.btn-warning),
html body:is(#staffDashboard, body) :is(.btn.btn-info),
html body:is(#staffDashboard, body) :is(.btn.btn-light),
html body:is(#staffDashboard, body) :is(.btn.btn-dark) {
    background: var(--system-button-bg) !important;
    border-color: var(--system-button-bg) !important;
    color: var(--system-button-text) !important;
}

html body:is(#staffDashboard, body) :is(.btn.btn-primary, :is(.staff-course-edit-save, button[id$='btnSave' i], input[id$='btnSave' i], a[id$='btnSave' i])):is(:hover, :focus-visible, :active):not(:disabled):not(.disabled):not([aria-disabled='true']),
html body:is(#staffDashboard, body) :is(.btn.btn-secondary):is(:hover, :focus-visible, :active):not(:disabled):not(.disabled):not([aria-disabled='true']),
html body:is(#staffDashboard, body) :is(.btn.btn-success:not(.btn-primary), :is(.eb-open-create, .staff-admin-teacher-create-action, .staff-group-management-action, .staff-student-group-create), :is(button, a.btn-u):has(> .fa-plus)):is(:hover, :focus-visible, :active):not(:disabled):not(.disabled):not([aria-disabled='true']),
html body:is(#staffDashboard, body) :is(.btn.btn-danger):is(:hover, :focus-visible, :active):not(:disabled):not(.disabled):not([aria-disabled='true']),
html body:is(#staffDashboard, body) :is(.btn.btn-warning):is(:hover, :focus-visible, :active):not(:disabled):not(.disabled):not([aria-disabled='true']),
html body:is(#staffDashboard, body) :is(.btn.btn-info):is(:hover, :focus-visible, :active):not(:disabled):not(.disabled):not([aria-disabled='true']),
html body:is(#staffDashboard, body) :is(.btn.btn-light):is(:hover, :focus-visible, :active):not(:disabled):not(.disabled):not([aria-disabled='true']),
html body:is(#staffDashboard, body) :is(.btn.btn-dark):is(:hover, :focus-visible, :active):not(:disabled):not(.disabled):not([aria-disabled='true']) {
    background: var(--system-button-hover) !important;
    border-color: var(--system-button-hover) !important;
}

/* Bootstrap 4 button geometry shared by native and legacy actions. */
html body:is(#staffDashboard, body) :is(#exam-question-editor, .staff-main, .wrapper, body) :is(.btn, .btn-u, .exam-question-btn, .em-button, .exam-bank-btn, .exam-bank-small-btn, .exam-icon-btn, .staff-profile-photo-button, .staff-teacher-password-toggle, button[type="submit"], input[type="submit"], input[type="button"]) {
    display: inline-block;
    box-sizing: border-box;
    vertical-align: middle;
    text-align: center;
    white-space: nowrap;
    padding: 6px 12px !important;
    min-height: 0 !important;
    height: auto;
    border: 1px solid !important;
    border-radius: 4px !important;
    font-family: inherit;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    text-decoration: none !important;
    background-image: none !important;
    box-shadow: none !important;
    transform: none !important;
    cursor: pointer;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}
html body:is(#staffDashboard, body) :is(#exam-question-editor, .staff-main, .wrapper, body) :is(.btn, .btn-u, .exam-question-btn, .em-button, .exam-bank-btn, .exam-bank-small-btn, .exam-icon-btn, .staff-profile-photo-button, .staff-teacher-password-toggle, button[type="submit"], input[type="submit"], input[type="button"]):focus-visible { outline: 0; box-shadow: 0 0 0 3px rgba(0,123,255,.25) !important; }
html body:is(#staffDashboard, body) :is(#exam-question-editor, .staff-main, .wrapper, body) :is(.btn, .btn-u, .exam-question-btn, .em-button, .exam-bank-btn, .exam-bank-small-btn, .exam-icon-btn, .staff-profile-photo-button, .staff-teacher-password-toggle, button[type="submit"], input[type="submit"], input[type="button"]):is(:disabled, .disabled, [aria-disabled="true"]) { opacity: .65; cursor: default; }
html body:is(#staffDashboard, body) :is(#exam-question-editor, .staff-main, .wrapper, body) :is(.btn-primary, .btn-u-blue, .staff-course-edit-save, .exam-question-btn--primary) { background: #007bff !important; border-color: #007bff !important; color: #fff !important; }
html body:is(#staffDashboard, body) :is(#exam-question-editor, .staff-main, .wrapper, body) :is(.btn-primary, .btn-u-blue, .staff-course-edit-save, .exam-question-btn--primary):hover { background: #0069d9 !important; border-color: #0069d9 !important; }
html body:is(#staffDashboard, body) :is(#exam-question-editor, .staff-main, .wrapper, body) :is(.btn-secondary, .btn-default, .btn-u-default, .em-toolbar-back, .exam-question-btn--soft) { background: #6c757d !important; border-color: #6c757d !important; color: #fff !important; }
html body:is(#staffDashboard, body) :is(#exam-question-editor, .staff-main, .wrapper, body) :is(.btn-secondary, .btn-default, .btn-u-default, .em-toolbar-back, .exam-question-btn--soft):hover { background: #5a6268 !important; border-color: #5a6268 !important; }
html body:is(#staffDashboard, body) :is(#exam-question-editor, .staff-main, .wrapper, body) :is(.btn-success, .btn-u-green, .exam-question-btn--excel-save, .eb-open-create) { background: #28a745 !important; border-color: #28a745 !important; color: #fff !important; }
html body:is(#staffDashboard, body) :is(#exam-question-editor, .staff-main, .wrapper, body) :is(.btn-success, .btn-u-green, .exam-question-btn--excel-save, .eb-open-create):hover { background: #218838 !important; border-color: #218838 !important; }
html body:is(#staffDashboard, body) :is(#exam-question-editor, .staff-main, .wrapper, body) :is(.btn-danger, .btn-u-red, .exam-bank-small-btn--danger) { background: #dc3545 !important; border-color: #dc3545 !important; color: #fff !important; }
html body:is(#staffDashboard, body) :is(#exam-question-editor, .staff-main, .wrapper, body) :is(.btn-danger, .btn-u-red, .exam-bank-small-btn--danger):hover { background: #c82333 !important; border-color: #c82333 !important; }
html body:is(#staffDashboard, body) :is(#exam-question-editor, .staff-main, .wrapper, body) :is(.btn-warning, .btn-u-orange, .em-toolbar-preview) { background: #ffc107 !important; border-color: #ffc107 !important; color: #212529 !important; }
html body:is(#staffDashboard, body) :is(#exam-question-editor, .staff-main, .wrapper, body) :is(.btn-warning, .btn-u-orange, .em-toolbar-preview):hover { background: #e0a800 !important; border-color: #e0a800 !important; }
html body:is(#staffDashboard, body) :is(#exam-question-editor, .staff-main, .wrapper, body) .btn-info { background: #17a2b8 !important; border-color: #17a2b8 !important; color: #fff !important; }
html body:is(#staffDashboard, body) :is(#exam-question-editor, .staff-main, .wrapper, body) .btn-info:hover { background: #138496 !important; border-color: #138496 !important; }

html body#staffDashboard #exam-question-editor :is(.em-bank-text-button, .em-bank-option) {
    border-radius: 4px !important;
    font-weight: 400 !important;
    border: 1px solid #ced4da;
    box-shadow: none;
}
html body#staffDashboard #exam-question-editor .em-bank-text-button {
    padding: 4px 8px;
    background: #6c757d;
    color: #fff;
    line-height: 1.5;
}
html body#staffDashboard #exam-question-editor .exam-question-btn--bank-copy {
    background: #007bff !important;
    border-color: #007bff !important;
    color: #fff !important;
}
html body#staffDashboard #exam-question-editor .exam-question-btn--bank-copy:hover {
    background: #0069d9 !important;
    border-color: #0069d9 !important;
}
html body#staffDashboard#staffDashboard .staff-main .staff-group-actions :is(.staff-group-register-action, .staff-group-action-primary) {
    border: 0 !important;
    box-shadow: none !important;
}
html body#staffDashboard#staffDashboard .staff-main .staff-group-actions .staff-group-register-action.is-registered {
    background: #28a745 !important;
    color: #fff !important;
}
html body#staffDashboard#staffDashboard .staff-main .staff-group-actions .staff-group-register-action.is-registered:hover {
    background: #218838 !important;
}
html body#staffDashboard#staffDashboard .staff-main .staff-group-list-page .staff-group-subject-link > .fa-file-text-o {
    color: #b45309 !important;
}
html body#staffDashboard#staffDashboard .staff-main .staff-group-subject-link > :is(.fa-folder-open, .fa-file-text-o, .fa-users) {
    color: #e8ad16 !important;
    background: #fff8dd !important;
    border-color: #f2d879 !important;
}
html body#staffDashboard#staffDashboard .staff-main .staff-group-subject-link > :is(.fa-folder-open, .fa-file-text-o, .fa-users) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    flex: 0 0 36px;
    width: 36px !important;
    height: 26px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 4px !important;
    background: #ffc107 !important;
    color: #212529 !important;
    font-size: 14px !important;
    line-height: 1 !important;
}
/* Action colors shared across every application screen. */
html body:is(#staffDashboard, body):is(#staffDashboard, body):is(#staffDashboard, body):is(#staffDashboard, body) [data-system-action]:not([data-system-action="preview"]),
html body:not([id]) [data-system-action]:not([data-system-action="preview"]) {
    display: inline-block;
    box-sizing: border-box;
    padding: 6px 12px !important;
    border: 1px solid var(--action-color) !important;
    border-radius: 4px !important;
    background: var(--action-color) !important;
    color: #fff !important;
    font: inherit;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    text-align: center;
    vertical-align: middle;
    text-decoration: none !important;
    box-shadow: none !important;
}
[data-system-action="search"] { --action-color: #005ecb; --action-hover: #004ba3; }
[data-system-action="add"] { --action-color: #28a745; --action-hover: #218838; }
[data-system-action="save"] { --action-color: #007bff; --action-hover: #0069d9; }
html body:is(#staffDashboard, body):is(#staffDashboard, body):is(#staffDashboard, body):is(#staffDashboard, body) [data-system-action]:not([data-system-action="preview"]):hover,
html body:not([id]) [data-system-action]:not([data-system-action="preview"]):hover {
    background: var(--action-hover) !important;
    border-color: var(--action-hover) !important;
}
html body:is(#staffDashboard, body):is(#staffDashboard, body):is(#staffDashboard, body):is(#staffDashboard, body) [data-system-action]:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 3px rgba(0,123,255,.25) !important;
}

/* These action colors take precedence over individual page palettes. */
@layer system-action-colors {
    [data-system-action="search"] {
        background: #005ecb !important;
        border-color: #005ecb !important;
    }

    [data-system-action="search"]:is(:hover, :focus-visible, :active) {
        background: #004ba3 !important;
        border-color: #004ba3 !important;
    }

    [data-system-action="preview"] {
        background: #946c00 !important;
        border-color: transparent !important;
    }

    [data-system-action="preview"]:is(:hover, :focus-visible, :active) {
        background: #805b00 !important;
    }

    [data-system-action="search"], [data-system-action="preview"],
    :is([data-system-action="search"], [data-system-action="preview"]) :is(i, svg, span) {
        color: #fff !important;
    }
}
html body#staffDashboard#staffDashboard#staffDashboard#staffDashboard#staffDashboard .staff-student-list-page :is(.staff-student-list-add, .staff-student-list-import) {
    background: #007bff !important;
    border-color: #007bff !important;
    color: #fff !important;
}
html body#staffDashboard#staffDashboard#staffDashboard#staffDashboard#staffDashboard .staff-student-list-page .staff-student-list-back {
    background: #6c757d !important;
    border-color: #6c757d !important;
    color: #fff !important;
}
html body#staffDashboard#staffDashboard#staffDashboard#staffDashboard#staffDashboard .staff-student-list-page :is(.staff-student-list-add, .staff-student-list-import):hover {
    background: #0069d9 !important;
    border-color: #0069d9 !important;
}
html body#staffDashboard#staffDashboard#staffDashboard#staffDashboard#staffDashboard .staff-student-list-page .staff-student-list-back:hover {
    background: #5a6268 !important;
    border-color: #5a6268 !important;
}
html body#staffDashboard#staffDashboard#staffDashboard .staff-main .staff-group-actions .staff-group-action-primary {
    background: #ff5b42 !important;
    border-color: #ff5b42 !important;
    color: #fff !important;
}
html body#staffDashboard#staffDashboard#staffDashboard .staff-main .staff-group-actions .staff-group-action-secondary {
    background: #b26cff !important;
    border-color: #b26cff !important;
    color: #fff !important;
}
html body#staffDashboard#staffDashboard#staffDashboard .staff-main :is(.staff-group-actions .staff-group-action-edit, .staff-category-actions .staff-category-action-edit) {
    background: #fd7e14 !important;
    border-color: #fd7e14 !important;
    color: #fff !important;
}
html body#staffDashboard#staffDashboard#staffDashboard .staff-main .staff-category-actions .staff-category-action-btn {
    box-sizing: border-box;
    width: 36px !important;
    padding: 6px !important;
}
@media (max-width: 767px) {
    html body#staffDashboard#staffDashboard#staffDashboard .staff-main .staff-category-actions .staff-category-action-btn {
        width: 44px !important;
    }
}
html body#staffDashboard#staffDashboard#staffDashboard .staff-main .staff-group-actions .staff-group-register-action.is-registered {
    background: #55e07e !important;
    color: #153d22 !important;
}
html body#staffDashboard#staffDashboard#staffDashboard .staff-main .staff-group-actions .staff-group-action-secondary:has(.fa-users) {
    background: #007bff !important;
    border-color: #007bff !important;
    color: #fff !important;
}
html body#staffDashboard#staffDashboard#staffDashboard .staff-main .staff-group-actions .staff-group-action-secondary:has(.fa-users):hover {
    background: #0069d9 !important;
    border-color: #0069d9 !important;
}
html body#staffDashboard#staffDashboard#staffDashboard .staff-main .exam-bank-small-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 36px !important;
    height: 26px !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    line-height: 1 !important;
    box-shadow: none !important;
    color: #fff !important;
}
html body#staffDashboard#staffDashboard#staffDashboard .staff-main .exam-bank-small-btn--edit {
    background: #fd7e14 !important;
}
html body#staffDashboard#staffDashboard#staffDashboard .staff-main .exam-bank-small-btn--danger {
    background: #dc3545 !important;
}
html body#staffDashboard#staffDashboard#staffDashboard .staff-main .exam-bank-small-btn--manage {
    background: #007bff !important;
}
html body#staffDashboard#staffDashboard#staffDashboard .staff-main .exam-bank-small-btn--manage:is(:hover, :focus-visible) {
    background: #0069d9 !important;
}
/* Consistent text line spacing for tables across application pages. */
html body:is(#staffDashboard, body):is(#staffDashboard, body):is(#staffDashboard, body):is(#staffDashboard, body)
table :is(th, td),
html body:is(#staffDashboard, body):is(#staffDashboard, body):is(#staffDashboard, body):is(#staffDashboard, body)
table :is(th, td) :is(a, p, span, strong, small, label, div) {
    line-height: 19px !important;
}
html body#staffDashboard#staffDashboard#staffDashboard .staff-main .staff-group-actions .staff-group-action-preview {
    background: #06d6a0 !important;
    border-color: #06d6a0 !important;
    color: #fff !important;
}
html body#staffDashboard#staffDashboard#staffDashboard .staff-main .staff-group-actions .staff-group-action-preview:hover {
    background: #05b88a !important;
    border-color: #05b88a !important;
}
.site-cookie-consent { position: fixed; z-index: 1500; bottom: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: center; gap: 16px; padding: 16px; background: #eee9fc; color: #222; border-top: 1px solid #d9d0ef; box-shadow: 0 -2px 8px #0001; }
.site-cookie-consent button { padding: 6px 12px; border: 1px solid #6f42c1; border-radius: 4px; background: #6f42c1; color: #fff; white-space: nowrap; }
@media(max-width: 600px) { .site-cookie-consent { flex-direction: column; gap: 8px; font-size: 13px; } }
/* Shared footer palette on public, teacher and student pages. */
html body:is(#staffDashboard, body):is(#staffDashboard, body) .footer-v4,
html body:is(#staffDashboard, body):is(#staffDashboard, body) .footer-v4 .copyright {
    background: #4e46a8 !important;
    border-top-color: #4e46a8 !important;
}
html body:is(#staffDashboard, body):is(#staffDashboard, body) .footer-v4 :is(p, a, span, i) {
    color: #fff !important;
}
html body:is(#staffDashboard, body):is(#staffDashboard, body) .footer-v4 a:hover {
    color: #e6dfff !important;
}
/* Light rich-text toolbar controls. */
html body:is(#staffDashboard, body):is(#staffDashboard, body):is(#staffDashboard, body):is(#staffDashboard, body):is(#staffDashboard, body)
.note-editor :is(.note-toolbar, .note-popover) .btn {
    background: #fff !important;
    border: 1px solid #d5deeb !important;
    color: #29445f !important;
    box-shadow: none !important;
}
html body:is(#staffDashboard, body):is(#staffDashboard, body):is(#staffDashboard, body):is(#staffDashboard, body):is(#staffDashboard, body)
.note-editor :is(.note-toolbar, .note-popover) .btn:is(:hover, :focus-visible, .active) {
    background: #eee9fc !important;
    border-color: #d9d0ef !important;
    color: #40358a !important;
}
html body#staffDashboard#staffDashboard#staffDashboard .staff-main .staff-student-list-row-actions :is(.staff-student-list-edit, .staff-student-list-delete) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 36px;
    height: 26px;
    min-height: 0;
    padding: 0;
    border: 0 !important;
    border-radius: 4px !important;
    color: #fff !important;
    font-size: 14px;
    line-height: 1;
    box-shadow: none !important;
}
html body#staffDashboard#staffDashboard#staffDashboard .staff-main .staff-student-list-edit {
    background: #fd7e14 !important;
}
html body#staffDashboard#staffDashboard#staffDashboard .staff-main .staff-student-list-delete {
    background: #dc3545 !important;
}
html body#staffDashboard#staffDashboard#staffDashboard .staff-main .staff-student-list-edit:hover {
    background: #e66c08 !important;
}
html body#staffDashboard#staffDashboard#staffDashboard .staff-main .staff-student-list-delete:hover {
    background: #c82333 !important;
}
html body#staffDashboard#staffDashboard#staffDashboard .staff-main .staff-student-list-row-actions :is(.staff-student-list-edit, .staff-student-list-delete) > .fa {
    color: #fff !important;
}
