.remove-elective-subject {
    position: absolute;
    right: 20px;
    margin-top: 3px;
}

#external-events {
    z-index: 2;
    /* width: 150px; */
    padding: 0 10px;
    border: 1px solid #ccc;
    background: #eee;
}

#external-events .fc-event {
    cursor: move;
    margin: 3px 0;
    height: 45px;
    display: flex;
    align-items: center;
    padding-left: 10px;
}

.fc-customButton-button {
    font-size: 13px !important;
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateY(-50%);
}


.form-group {
    margin-bottom: 1rem;
}

.form-group>label {
    margin-bottom: 10px;
}

#delete-modal .modal-footer>.btn {

    border-radius: 3px !important;
    padding: 0 8px !important;
    font-size: 15px;
}

.fc-scroller {
    overflow-y: hidden !important;
}

.context-menu {
    position: absolute;
    z-index: 1000;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
    padding: 5px;
}

.context-menu ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.context-menu ul>li {
    display: block;
    ;
    padding: 5px 15px;
    list-style-type: none;
    color: #333;
    cursor: pointer;
    margin: 0 auto;
    transition: 0.10s;
    font-size: 13px;
}

.context-menu ul>li:hover {
    color: #fff;
    background-color: #007bff;
    border-radius: 2px;
}

/*.fa, .fas {*/
/*    font-size: 13px;*/
/*    margin-right: 4px;*/
/*}*/

.no-header-toolbar .fc-header-toolbar.fc-toolbar {
    margin-top: 0;
    margin-bottom: 0;
}

.fc-h-event {
    border: none;
}

.remove-timetable {
    padding: 2px 3px;
}

.remove-timetable:hover {
    background: white;
    color: black;
    border-radius: 10px;
}

label.filter-menu {
    font-size: 13px;
    color: #7c7c7c;
    font-weight: 500;
    position: absolute;
    top: -8px;
    /*left: 27px;*/
    /*left: 1%;*/
    background: #fff;
    /*margin-bottom: 0;*/
    margin-left: 5px;
    padding: 0 5px;
    z-index: 10;
    border-radius: 20px;
}

/*.select2-container--default.select2-container--focus .select2-selection--multiple {*/
/*    height: 45px;*/
/*}*/

/*.select2-container .select2-selection--multiple {*/
/*    min-height: 45px;*/
/*}*/

.w-fit-content {
    width: fit-content;
}

.select2-container--default .select2-selection--single {
    padding: 0.94rem 0.6rem !important;
}

/* ── Select2 Multiple: Compact Single-Line ── */
.select2-container--default .select2-selection--multiple {
    min-height: 38px !important;
    padding: 4px 6px !important;
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem !important;
    background-color: #ffffff !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    cursor: pointer !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__rendered {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
}

/* Individual choice pills (when 1 item selected) */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #0d6efd !important;
    border: none !important;
    color: #ffffff !important;
    border-radius: 5px !important;
    padding: 2px 8px !important;
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    margin: 0 4px 0 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    flex-shrink: 0 !important;
}

/* Remove button inside pill */
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: rgba(255, 255, 255, 0.85) !important;
    margin-right: 5px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #ffffff !important;
}

/* Hide the empty "extra" tags returned for non-first selections */
.select2-container--default .select2-selection--multiple .select2-selection__choice:has(.select2-extra-tag-hidden),
.select2-container--default .select2-selection--multiple li:empty {
    display: none !important;
    width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

/* Compact summary span (rendered by templateSelection) */
.select2-compact-summary {
    display: inline-flex !important;
    align-items: center !important;
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    white-space: nowrap !important;
    pointer-events: none !important;
    letter-spacing: 0.01em !important;
}

/* Hidden span returned for 2nd, 3rd… tags */
.select2-extra-tag-hidden {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Search field inside multi-select */
.select2-container--default .select2-selection--multiple .select2-search--inline {
    margin: 0 !important;
    padding: 0 !important;
    flex: 1 1 20px !important;
    min-width: 20px !important;
}

.select2-container--default .select2-selection--multiple .select2-search__field {
    margin: 0 !important;
    height: 28px !important;
    border: none !important;
    background: transparent !important;
}

.select2-search__field::placeholder {
    color: #444;
    font-size: 0.8125rem;
}


.asColorPicker-alpha {
    display: none;
}

.remove-number-increment::-webkit-inner-spin-button,
.remove-number-increment::-webkit-outer-spin-button {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin: 0;
}

.total_paidable_amount {
    background-color: lightgray;
}

.dashboard-description {
    font-size: 13px;
}

.v-scroll {
    height: 385px;
    overflow-y: scroll;
}

.custom-card-body {
    padding: 1.25rem !important;
}

.image-tile img {
    height: 200px;
    object-fit: cover;
}

.text-wrap div {
    white-space: normal !important;
}

.package-type-badge {
    position: absolute;
    left: auto;
    right: -10px;
    clip-path: polygon(50% 0%, 100% 0%, 100% 100%, 0% 100%, 14% 52%, 0% 0%);
    width: 130px;
    height: 38px;
    top: 8px;
    color: white !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.package-type-badge {
    right: -2px;
}

.postpaid-color {
    background: var(--primary-color);
}

.prepaid-color {
    background: var(--secondary-color);
}

.addon-border-primary {
    overflow: hidden;
}

.addon-ribbon {
    font: bold 15px sans-serif;
    color: #333;
    text-align: center;
    -webkit-transform: rotate(-45deg);
    -moz-transform: rotate(-45deg);
    -ms-transform: rotate(-45deg);
    -o-transform: rotate(-45deg);
    transform: rotate(-45deg);
    position: absolute;
    padding: 7px 0;
    top: 15px;
    left: -30px;
    width: 120px;
    background-color: #ff0000;
    color: #fff;
}

.sidebar .nav .nav-item {
    padding: 0 0.75rem !important;
}

/* Ensure parent nav-links remain visible when expanded */
.sidebar .nav .nav-item>.nav-link[data-toggle="collapse"] {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1 !important;
}

.sidebar .nav .nav-item .nav-link[aria-expanded="true"] {
    font-weight: 500;
}

/* Better alignment for nav links */
.sidebar .nav .nav-item .nav-link {
    display: flex !important;
    align-items: center !important;
    padding: 0.55rem 0.5rem !important;
    min-height: 38px !important;
    border-radius: 6px !important;
    position: relative !important;
}

.sidebar .nav .nav-item .nav-link i.menu-icon,
.sidebar .nav .nav-item .nav-link .menu-icon {
    font-size: 0.95rem !important;
    width: 18px !important;
    height: 18px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: 0 !important;
    margin-right: 0.65rem !important;
    text-align: center !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
}

/* Menu title spacing and vertical center */
.sidebar .nav .nav-item .nav-link .menu-title {
    flex: 1 1 auto !important;
    font-size: 0.825rem !important;
    font-weight: 500 !important;
    line-height: 1.25 !important;
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Menu arrow positioning */
.sidebar .nav .nav-item .nav-link i.menu-arrow,
.sidebar .nav.sub-menu .nav-item .nav-link i.menu-arrow {
    margin-left: auto !important;
    font-size: 14px !important;
    width: 16px !important;
    height: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
    transition: transform 0.2s ease !important;
}

/* Sidebar search padding reduction */
.sidebar-search {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
}

/* CRITICAL: Ensure collapse divs are visible when they have 'show' class */
.sidebar .nav .nav-item .collapse.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Active state styling handled centrally by _sidebar.scss and theme engine */

/* Ensure sub-menu is visible when parent has active child - but only the direct path */
.sidebar .nav .nav-item.parent-active>.collapse {
    display: block !important;
}

/* ============================================
   MODERN SIDEBAR - PERMANENT FIXES
   ============================================ */

/* Single scrollbar for entire sidebar */
.sidebar {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: calc(100vh - 70px) !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

/* Remove all nested scrollbars */
.sidebar .nav,
.sidebar .nav.sub-menu {
    overflow: visible !important;
    max-height: none !important;
}

/* Remove bottom margin that causes empty space */
.sidebar .nav {
    margin-bottom: 0 !important;
    padding-bottom: 1rem !important;
    /* Small padding for visual breathing room */
}

/* Smooth collapse animations */
.sidebar .nav .nav-item .collapse {
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease !important;
    -webkit-transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease !important;
    -moz-transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease !important;
    -ms-transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease !important;
}

.sidebar .nav .nav-item .collapse:not(.show) {
    /* display: block !important; */
    height: 0 !important;
    opacity: 0;
}

/* CRITICAL: Prevent nested collapses from auto-expanding */
.sidebar .nav .nav-item .collapse.show .collapse:not(.show) {
    height: 0 !important;
    opacity: 0;
}

/* Menu arrow smooth rotation */
.sidebar .nav .nav-item .nav-link i.menu-arrow {
    transition: transform 0.25s ease !important;
}

.sidebar .nav .nav-item .nav-link[aria-expanded="true"] i.menu-arrow {
    transform: rotate(90deg);
}

@media (min-width: 992px) {
    .sidebar-icon-only .sidebar .nav .nav-item {
        position: relative;
        padding: 0 !important;
    }
}

.sidebar .nav .nav-item .nav-link i.menu-arrow {
    font-size: 16px !important;
}

.student-id-card-demo {
    position: fixed;
    width: -webkit-fill-available;
    margin-right: 20px;
}





.payment-card-container {
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
    min-height: 80vh;
}

.payment-card {
    background: white;
    width: 100%;
    max-width: 700px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Header */
.payment-header {
    background-color: var(--header-bg);
    color: var(--header-text);
    padding: 2rem;
    text-align: center;
    position: relative;
}

.payment-header h4 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.payment-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.95rem;
}

.back-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.back-btn:hover {
    opacity: 1;
    color: white;
}

/* Body */
.payment-body {
    padding: 2rem;
}

.form-section-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6c757d;
    font-weight: 600;
    margin-bottom: 1rem;
    display: block;
}

/* Interactive Fee Row */
.fee-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.fee-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    margin-bottom: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-speed);
    opacity: 1;
}

.fee-item:hover {
    background-color: #f8f9fa;
    border-color: var(--primary-color);
}

.fee-item.selected {
    background-color: #f0f2ff;
    border-color: var(--primary-color);
}

.fee-item.fade-out {
    opacity: 0;
    transform: translateX(-20px);
    pointer-events: none;
}

.fee-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.fee-name {
    font-weight: 600;
    color: #374151;
}

.fee-price {
    font-weight: 700;
    color: #111827;
    font-size: 1.1rem;
}

/* Checkbox styling */
.custom-checkbox {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

/* Remove Button Styling */
.remove-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s;
    background: transparent;
    border: none;
}

.remove-btn:hover {
    background-color: var(--danger-soft);
    color: var(--danger-color);
}

.remove-btn i {
    transition: transform 0.2s;
}

.remove-btn:hover i {
    transform: scale(1.1);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: #9ca3af;
    border: 2px dashed #e5e7eb;
    border-radius: 8px;
    display: none;
    /* Hidden by default */
}

/* Payment Mode Tiles */
.mode-selection {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.mode-tile {
    flex: 1;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.mode-tile input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    cursor: pointer;
}

.mode-tile.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(75, 73, 172, 0.3);
}

.mode-tile span {
    font-weight: 600;
    display: block;
}

/* Inputs */
.form-control-custom {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    transition: border-color 0.2s;
}

.form-control-custom:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(75, 73, 172, 0.1);
}

/* Pay Button */
.btn-pay {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.1s, box-shadow 0.1s;
}

.btn-pay:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-pay:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-pay:not(:disabled):active {
    transform: translateY(0);
}

/* Total Section */
.total-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
}

.total-label {
    font-weight: 600;
    color: #6b7280;
}

.total-amount {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-color);
}

/* Sidebar sub-categories and sub-menus */
.sub-category {
    padding: 10px 0 5px 15px;
    font-weight: bold;
    color: #6c7293;
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-top: 10px;
    border-left: 3px solid #3e4b5b;
}

.nav-item.pl-3 .nav-link {
    padding-left: 15px !important;
    font-size: 0.85rem;
}

.nav-item.pl-3 .nav-link i.small-icon {
    font-size: 8px;
    margin-right: 5px;
    vertical-align: middle;
}

/* Semester-wise Syllabus Alert styling */
.syllabus-info-alert {
    background-color: #f0f7ff !important;
    border: 1px solid #dbeafe !important;
    border-radius: 8px !important;
    color: #1e40af !important;
    padding: 1.25rem !important;
    margin-bottom: 1.5rem !important;
}

.syllabus-info-alert .alert-heading {
    color: #1e3a8a !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    margin-bottom: 0.25rem !important;
}

.syllabus-info-alert .info-text {
    color: #475569 !important;
    font-size: 14px !important;
    margin-bottom: 0.5rem;
}

.syllabus-info-alert .info-text strong {
    color: #1e3a8a !important;
}

.syllabus-info-alert .info-icon {
    font-size: 20px !important;
    color: #3b82f6 !important;
    margin-right: 1rem;
    margin-top: 0.25rem;
}

.syllabus-info-alert .syllabus-badge {
    background-color: #dbeafe !important;
    color: #1e40af !important;
    border: 1px solid #bfdbfe !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    border-radius: 4px !important;
    padding: 4px 8px !important;
    display: inline-block;
}

/* ============ Header Language Switcher ============ */
.lang-switcher-toggle {
    display: flex;
    align-items: center;
    gap: 7px;
}

.lang-switcher-toggle .lang-switcher-current-flag {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #e9ecef;
    background-color: #ffffff;
}

.lang-switcher-toggle .lang-switcher-current-code {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.dropdown-menu.lang-switcher-menu {
    min-width: 260px;
    padding: 8px;
    margin-top: 10px;
    border: 1px solid #eef0f4;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.04);
}

.lang-switcher-header {
    padding: 6px 10px 10px;
    margin-bottom: 6px;
    border-bottom: 1px solid #f1f3f7;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8a94a6;
}

.lang-switcher-list {
    max-height: 320px;
    overflow-y: auto;
}

.lang-switcher-list::-webkit-scrollbar {
    width: 5px;
}

.lang-switcher-list::-webkit-scrollbar-thumb {
    background: #d5dae3;
    border-radius: 10px;
}

.lang-switcher-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    border-radius: 10px;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.lang-switcher-item+.lang-switcher-item {
    margin-top: 2px;
}

.lang-switcher-item:hover {
    background-color: #f4f6f9;
    text-decoration: none;
}

.lang-switcher-flag {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #e9ecef;
    background-color: #ffffff;
    flex-shrink: 0;
}

.lang-switcher-flag-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: color-mix(in srgb, var(--theme-color) 10%, #ffffff);
    color: var(--theme-color);
    font-size: 14px;
    flex-shrink: 0;
}

.lang-switcher-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.lang-switcher-name {
    font-size: 13px;
    font-weight: 600;
    color: #2b3445;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lang-switcher-code {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #98a1b3;
    line-height: 1.4;
}

.lang-switcher-check {
    display: none;
    color: var(--theme-color);
    font-size: 15px;
    flex-shrink: 0;
}

.lang-switcher-item.active {
    background-color: color-mix(in srgb, var(--theme-color) 8%, #ffffff);
}

.lang-switcher-item.active .lang-switcher-name,
.lang-switcher-item.active .lang-switcher-code {
    color: var(--theme-color);
}

.lang-switcher-item.active .lang-switcher-check {
    display: inline-block;
}

/* Submenu Container & Alignment */
.sidebar .nav.sub-menu {
    padding: 0.2rem 0 0.4rem 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

.sidebar .nav.sub-menu .nav-item {
    padding: 0 0.75rem !important;
}

/* Level 2 Submenu Links */
.sidebar .nav.sub-menu>.nav-item>.nav-link {
    display: flex !important;
    align-items: center !important;
    padding: 0.42rem 0.5rem 0.42rem 2.05rem !important;
    min-height: 34px !important;
    font-size: 0.8125rem !important;
    position: relative !important;
    border-radius: 4px !important;
}

/* Level 2 items with menu-icon or nested group (e.g. Fees, Expense, Income) */
.sidebar .nav.sub-menu>.nav-item>.nav-link:has(i.menu-icon),
.sidebar .nav.sub-menu>.nav-item>.nav-link[data-toggle="collapse"] {
    padding-left: 0.95rem !important;
}

.sidebar .nav.sub-menu>.nav-item>.nav-link:has(i.menu-icon):before,
.sidebar .nav.sub-menu>.nav-item>.nav-link[data-toggle="collapse"]:before {
    display: none !important;
}

.sidebar .nav.sub-menu>.nav-item>.nav-link i.menu-icon {
    width: 16px !important;
    height: 16px !important;
    font-size: 0.9rem !important;
    margin-left: 0 !important;
    margin-right: 0.55rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

/* Level 2 Bullet Indicator (for leaf links without icons) */
.sidebar .nav.sub-menu>.nav-item>.nav-link:before {
    content: "•" !important;
    font-family: inherit !important;
    position: absolute !important;
    left: 1.15rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 13px !important;
    line-height: 1 !important;
    opacity: 0.75;
}

/* Level 3 Submenu Links (e.g. Fees Type, Manage fee, Student fees under Fees) */
.sidebar .nav.sub-menu .nav.sub-menu {
    padding: 0.15rem 0 0.35rem 0 !important;
}

.sidebar .nav.sub-menu .nav.sub-menu>.nav-item>.nav-link {
    padding: 0.38rem 0.5rem 0.38rem 2.85rem !important;
    min-height: 32px !important;
    font-size: 0.78rem !important;
    position: relative !important;
    border-radius: 4px !important;
}

/* Level 3 Bullet Indicator - Positioned precisely at the parent submenu text alignment line */
.sidebar .nav.sub-menu .nav.sub-menu>.nav-item>.nav-link:before {
    content: "•" !important;
    font-family: inherit !important;
    position: absolute !important;
    left: 2.05rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 12px !important;
    line-height: 1 !important;
    opacity: 0.7;
}

.sidebar .nav.sub-menu .nav.sub-menu>.nav-item>.nav-link:hover:before,
.sidebar .nav.sub-menu .nav.sub-menu>.nav-item>.nav-link.active:before {
    opacity: 1 !important;
}

/* Sidebar Submenu Active & Hover - Dynamic Theme Alignment across all roles */
.sidebar .nav.sub-menu .nav-item>.nav-link.active,
.sidebar .nav.sub-menu .nav-item.active>.nav-link,
.sidebar .nav .nav-item .sub-menu .nav-item .nav-link.active,
.sidebar .nav .nav-item .sub-menu .nav-item.active>.nav-link {
    background: var(--color-primary, #4F46E5) !important;
    background-color: var(--color-primary, #4F46E5) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 8px rgba(var(--color-primary-rgb, 79, 70, 229), 0.3) !important;
}

.sidebar .nav.sub-menu .nav-item>.nav-link.active:hover,
.sidebar .nav.sub-menu .nav-item.active>.nav-link:hover,
.sidebar .nav .nav-item .sub-menu .nav-item .nav-link.active:hover,
.sidebar .nav .nav-item .sub-menu .nav-item.active>.nav-link:hover {
    background: var(--color-primary-hover, #4338CA) !important;
    background-color: var(--color-primary-hover, #4338CA) !important;
    color: #ffffff !important;
}

.sidebar .nav.sub-menu .nav-item>.nav-link.active .menu-title,
.sidebar .nav.sub-menu .nav-item>.nav-link.active .menu-icon,
.sidebar .nav.sub-menu .nav-item>.nav-link.active i,
.sidebar .nav .nav-item .sub-menu .nav-item .nav-link.active .menu-title,
.sidebar .nav .nav-item .sub-menu .nav-item .nav-link.active .menu-icon,
.sidebar .nav .nav-item .sub-menu .nav-item .nav-link.active i {
    color: #ffffff !important;
    background: transparent !important;
}

.sidebar .nav.sub-menu .nav-item>.nav-link.active:before,
.sidebar .nav.sub-menu .nav-item>.nav-link.active::before,
.sidebar .nav .nav-item .sub-menu .nav-item .nav-link.active:before,
.sidebar .nav .nav-item .sub-menu .nav-item .nav-link.active::before {
    color: #ffffff !important;
    background-color: #ffffff !important;
    opacity: 1 !important;
}

/*
 * Fix: grey hairline flashing under the fixed navbar when a toast appears.
 * Cause: the toast (.jq-toast-wrap, position:fixed, z-index:9000) overlaps the
 * fixed navbar; when it composites/decomposites the GPU re-rasterises the navbar
 * layer, leaving a 1px seam at its bottom edge for the frames the toast is shown.
 * Promoting the navbar and toast to their own stable GPU layers stops the reseam.
 */
.navbar.fixed-top {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.jq-toast-wrap {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Timetable UI Modern Enhancements */
.timetable-table-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    margin-top: 0.5rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.timetable-table-wrapper table {
    margin-bottom: 0 !important;
}

.timetable-table-wrapper table thead th {
    min-width: 175px;
    background-color: #f8fafc !important;
    color: #1e293b !important;
    font-weight: 600 !important;
    font-size: 13.5px !important;
    vertical-align: middle !important;
    border-top: none !important;
    border-bottom: 2px solid #e2e8f0 !important;
    padding: 12px 14px !important;
    white-space: nowrap !important;
    text-align: center !important;
}

.timetable-table-wrapper table thead th[data-field="no"],
.timetable-table-wrapper table thead th[data-field="id"] {
    min-width: 65px;
}

.timetable-table-wrapper table thead th[data-field="full_name"] {
    min-width: 150px;
    font-weight: 700 !important;
    text-align: left !important;
}

.timetable-table-wrapper table thead th[data-field="operate"] {
    min-width: 110px;
}

.timetable-table-wrapper table tbody td {
    vertical-align: top !important;
    padding: 10px 8px !important;
    border-color: #f1f5f9 !important;
}

.timetable-slots-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 155px;
}

.timetable-slot {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 3.5px solid #4F46E5;
    border-radius: 6px;
    padding: 6px 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.15s ease-in-out;
    text-align: left;
}

.timetable-slot:hover {
    box-shadow: 0 3px 8px rgba(79, 70, 229, 0.12);
    transform: translateY(-1px);
}

.timetable-slot.slot-break {
    background: #fffbeb;
    border-color: #fde68a;
    border-left-color: #f59e0b;
}

.timetable-slot.slot-break .slot-subject {
    color: #b45309;
}

.timetable-slot.slot-break .slot-time {
    color: #92400e;
}

.timetable-slot.slot-break .slot-time i {
    color: #d97706;
}

.timetable-slot .slot-subject {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
    margin-bottom: 3px;
    word-break: break-word;
}

.timetable-slot .slot-time {
    font-size: 11.5px;
    color: #64748b;
    display: flex;
    align-items: center;
    white-space: nowrap;
    font-weight: 450;
}

.timetable-slot .slot-time i {
    font-size: 11px;
    margin-right: 4px;
    color: #94a3b8;
}

.timetable-empty-slot {
    color: #94a3b8;
    font-size: 14px;
    display: inline-block;
    padding: 4px 8px;
    text-align: center;
    width: 100%;
}

.badge-primary-subtle {
    background-color: #EEF2FF !important;
    color: #4F46E5 !important;
    border: 1px solid #C7D2FE !important;
    font-size: 11px !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
}

.calendar-wrapper {
    overflow-x: auto !important;
    width: 100% !important;
    -webkit-overflow-scrolling: touch;
}

.calendar-wrapper #calendar {
    min-width: 790px;
}

.calendar-wrapper .fc .fc-col-header-cell,
.calendar-wrapper .fc .fc-timegrid-col {
    min-width: 150px;
}

/* =====================================================
   Universal Standardized Table Action Buttons (Image 1 Reference)
   ===================================================== */

/* Action column alignment & compact spacing */
.table td[data-field="operate"],
.table th[data-field="operate"],
.table td[data-field="action"],
.table th[data-field="action"],
.table td.action-column,
.table th.action-column {
    text-align: center !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    width: 1% !important;
    min-width: 80px !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
}

.table-action-btn-group,
.action-column-menu,
.table-action-column {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    flex-wrap: nowrap !important;
    vertical-align: middle !important;
    margin: 0 auto !important;
}

/* Base style for all action buttons inside tables */
.table td a.btn,
.table td button.btn,
.table td .btn-icon,
.table td .btn-action-approve,
.table td .btn-action-cancel,
.table td .btn-action-publish,
.table td .btn-action-unpublish,
.table td .btn-action-result,
.table td .btn-action-question,
.table td .btn-action-edit,
.table td .btn-action-soft-delete,
.table td .btn-action-hard-delete,
.table td .btn-action-restore,
.table td .btn-action-view,
.table td .btn-action-download,
.table td .btn-action-custom,
.table td .approve-data,
.table td .cancel-data,
.table td .publish-data,
.table td .unpublish-data,
.table td .result-data,
.table td .question-data,
.table td .add-questions-data,
.table td .publish-exam-result,
.table td .edit-data,
.table td .delete-form,
.table td .trash-data,
.table td .restore-data,
.table td .view-data,
.table-action-btn-group a,
.table-action-btn-group button {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    max-width: 30px !important;
    max-height: 30px !important;
    padding: 0 !important;
    margin: 0 1px !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 1px solid transparent !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
    float: none !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.table td a.btn i,
.table td button.btn i,
.table td .btn-icon i,
.table td a.btn svg,
.table td button.btn svg,
.table-action-btn-group a i,
.table-action-btn-group button i {
    font-size: 12.5px !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: middle !important;
    color: inherit !important;
}

/* 1. Edit Action Button (Light Blue tint with Blue icon - Image 1 Reference) */
.table td .btn-action-edit,
.table td .edit-data,
.table td a.btn-inverse-primary,
.table td a.btn-gradient-primary,
.table td a.btn-outline-primary,
.table td button.btn-inverse-primary,
.table-action-btn-group .btn-action-edit {
    background-color: #f0f9ff !important;
    color: #0284c7 !important;
    border-color: #bae6fd !important;
}

.table td .btn-action-edit:hover,
.table td .edit-data:hover,
.table td a.btn-inverse-primary:hover,
.table td a.btn-gradient-primary:hover,
.table td a.btn-outline-primary:hover,
.table td button.btn-inverse-primary:hover,
.table-action-btn-group .btn-action-edit:hover {
    background-color: #0284c7 !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 5px rgba(2, 132, 199, 0.25) !important;
}

/* 2. Delete / Soft Delete Action Button (Light Red tint with Red icon - Image 1 Reference) */
.table td .btn-action-soft-delete,
.table td .btn-action-delete,
.table td .delete-form,
.table td a.btn-inverse-danger,
.table td a.btn-gradient-danger,
.table td a.btn-outline-danger,
.table td button.btn-inverse-danger,
.table-action-btn-group .btn-action-soft-delete {
    background-color: #fef2f2 !important;
    color: #ef4444 !important;
    border-color: #fecaca !important;
}

.table td .btn-action-soft-delete:hover,
.table td .btn-action-delete:hover,
.table td .delete-form:hover,
.table td a.btn-inverse-danger:hover,
.table td a.btn-gradient-danger:hover,
.table td a.btn-outline-danger:hover,
.table td button.btn-inverse-danger:hover,
.table-action-btn-group .btn-action-soft-delete:hover {
    background-color: #ef4444 !important;
    color: #ffffff !important;
    border-color: #ef4444 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 5px rgba(239, 68, 68, 0.25) !important;
}

/* 3. Hard Delete / Permanent Trash Action Button (Rose Red tint) */
.table td .btn-action-hard-delete,
.table td .trash-data,
.table-action-btn-group .btn-action-hard-delete {
    background-color: #fff1f2 !important;
    color: #e11d48 !important;
    border-color: #fecdd3 !important;
}

.table td .btn-action-hard-delete:hover,
.table td .trash-data:hover,
.table-action-btn-group .btn-action-hard-delete:hover {
    background-color: #e11d48 !important;
    color: #ffffff !important;
    border-color: #e11d48 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 5px rgba(225, 29, 72, 0.25) !important;
}

/* Reject Action Button (Light Rose tint with Flaticon Reject Icon) */
    .table td .btn-action-reject,
    .table td .reject-data,
    .table td .reject-delegation-btn,
    .table-action-btn-group .btn-action-reject,
    .table-action-btn-group .reject-delegation-btn {
        background-color: #fff1f2 !important;
        color: #e11d48 !important;
        border-color: #fecdd3 !important;
    }

    .table td .btn-action-reject:hover,
    .table td .reject-data:hover,
    .table td .reject-delegation-btn:hover,
    .table-action-btn-group .btn-action-reject:hover,
    .table-action-btn-group .reject-delegation-btn:hover {
        background-color: #ffe4e6 !important;
        border-color: #fda4af !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 2px 5px rgba(225, 29, 72, 0.25) !important;
    }

    .table td .reject-icon-img,
    .table-action-btn-group .reject-icon-img,
    .action-reject-icon {
        width: 18px !important;
        height: 18px !important;
        max-width: 18px !important;
        max-height: 18px !important;
        object-fit: contain !important;
        display: inline-block !important;
        vertical-align: middle !important;
        pointer-events: none !important;
        transition: transform 0.15s ease-in-out;
    }

    .table td .btn-action-reject:hover .reject-icon-img,
    .table-action-btn-group .btn-action-reject:hover .reject-icon-img {
        transform: scale(1.15);
    }

    /* Approve Action Button (Light Emerald tint - Image 1 Reference) */
    .table td .btn-action-approve,
    .table td .approve-data,
    .table-action-btn-group .btn-action-approve {
        background-color: #ecfdf5 !important;
        color: #10b981 !important;
        border-color: #a7f3d0 !important;
    }

    .table td .btn-action-approve:hover,
    .table td .approve-data:hover,
    .table-action-btn-group .btn-action-approve:hover {
        background-color: #10b981 !important;
        color: #ffffff !important;
        border-color: #10b981 !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 2px 5px rgba(16, 185, 129, 0.25) !important;
    }

    /* Cancel Action Button (Light Amber / Warning tint - Image 1 Reference) */
    .table td .btn-action-cancel,
    .table td .cancel-data,
    .table-action-btn-group .btn-action-cancel {
        background-color: #fffbeb !important;
        color: #d97706 !important;
        border-color: #fde68a !important;
    }

    .table td .btn-action-cancel:hover,
    .table td .cancel-data:hover,
    .table-action-btn-group .btn-action-cancel:hover {
        background-color: #f59e0b !important;
        color: #ffffff !important;
        border-color: #f59e0b !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 2px 5px rgba(245, 158, 11, 0.25) !important;
    }

    /* Publish Action Button (Light Blue tint with Blue icon - Image 1 Reference) */
    .btn-action-publish,
    .publish-data,
    .publish-exam-result:not(.btn-action-unpublish):not(.unpublish-data),
    .table td .btn-action-publish,
    .table td .publish-data,
    .table td .publish-exam-result:not(.btn-action-unpublish):not(.unpublish-data),
    .table-action-btn-group .btn-action-publish,
    .table-action-btn-group .publish-data,
    .table-action-btn-group .publish-exam-result:not(.btn-action-unpublish):not(.unpublish-data),
    .table td a.btn-action-publish,
    .table td a.publish-data,
    .table td a.publish-exam-result:not(.btn-action-unpublish):not(.unpublish-data),
    .table td button.btn-action-publish,
    .table td button.publish-data,
    .table td button.publish-exam-result:not(.btn-action-unpublish):not(.unpublish-data) {
        background-color: #eff6ff !important;
        color: #2563eb !important;
        border-color: #bfdbfe !important;
    }

    .btn-action-publish:hover,
    .publish-data:hover,
    .publish-exam-result:not(.btn-action-unpublish):not(.unpublish-data):hover,
    .table td .btn-action-publish:hover,
    .table td .publish-data:hover,
    .table td .publish-exam-result:not(.btn-action-unpublish):not(.unpublish-data):hover,
    .table-action-btn-group .btn-action-publish:hover,
    .table-action-btn-group .publish-data:hover,
    .table-action-btn-group .publish-exam-result:not(.btn-action-unpublish):not(.unpublish-data):hover,
    .table td a.btn-action-publish:hover,
    .table td a.publish-data:hover,
    .table td a.publish-exam-result:not(.btn-action-unpublish):not(.unpublish-data):hover,
    .table td button.btn-action-publish:hover,
    .table td button.publish-data:hover,
    .table td button.publish-exam-result:not(.btn-action-unpublish):not(.unpublish-data):hover {
        background-color: #2563eb !important;
        color: #ffffff !important;
        border-color: #2563eb !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 2px 5px rgba(37, 99, 235, 0.25) !important;
    }

    /* Unpublish Action Button (Light Slate tint with Dark Slate icon - Image 3 Reference) */
    .btn-action-unpublish,
    .unpublish-data,
    .publish-exam-result.btn-action-unpublish,
    .publish-exam-result.unpublish-data,
    .table td .btn-action-unpublish,
    .table td .unpublish-data,
    .table td .publish-exam-result.btn-action-unpublish,
    .table td .publish-exam-result.unpublish-data,
    .table-action-btn-group .btn-action-unpublish,
    .table-action-btn-group .unpublish-data,
    .table-action-btn-group .publish-exam-result.btn-action-unpublish,
    .table-action-btn-group .publish-exam-result.unpublish-data,
    .table td a.btn-action-unpublish,
    .table td a.unpublish-data,
    .table td a.publish-exam-result.btn-action-unpublish,
    .table td a.publish-exam-result.unpublish-data,
    .table td button.btn-action-unpublish,
    .table td button.unpublish-data,
    .table td button.publish-exam-result.btn-action-unpublish,
    .table td button.publish-exam-result.unpublish-data {
        background-color: #f1f5f9 !important;
        color: #475569 !important;
        border-color: #cbd5e1 !important;
    }

    .btn-action-unpublish:hover,
    .unpublish-data:hover,
    .publish-exam-result.btn-action-unpublish:hover,
    .publish-exam-result.unpublish-data:hover,
    .table td .btn-action-unpublish:hover,
    .table td .unpublish-data:hover,
    .table td .publish-exam-result.btn-action-unpublish:hover,
    .table td .publish-exam-result.unpublish-data:hover,
    .table-action-btn-group .btn-action-unpublish:hover,
    .table-action-btn-group .unpublish-data:hover,
    .table-action-btn-group .publish-exam-result.btn-action-unpublish:hover,
    .table-action-btn-group .publish-exam-result.unpublish-data:hover,
    .table td a.btn-action-unpublish:hover,
    .table td a.unpublish-data:hover,
    .table td a.publish-exam-result.btn-action-unpublish:hover,
    .table td a.publish-exam-result.unpublish-data:hover,
    .table td button.btn-action-unpublish:hover,
    .table td button.unpublish-data:hover,
    .table td button.publish-exam-result.btn-action-unpublish:hover,
    .table td button.publish-exam-result.unpublish-data:hover {
        background-color: #334155 !important;
        color: #ffffff !important;
        border-color: #334155 !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 2px 5px rgba(51, 65, 85, 0.25) !important;
    }

    /* Result Action Button (Light Emerald / Mint tint with Green icon - Image 2 Reference) */
    .btn-action-result,
    .result-data,
    .table td .btn-action-result,
    .table td .result-data,
    .table-action-btn-group .btn-action-result,
    .table-action-btn-group .result-data,
    .table td a.btn-action-result,
    .table td a.result-data,
    .table td button.btn-action-result,
    .table td button.result-data {
        background-color: #ecfdf5 !important;
        color: #059669 !important;
        border-color: #a7f3d0 !important;
    }

    .btn-action-result:hover,
    .result-data:hover,
    .table td .btn-action-result:hover,
    .table td .result-data:hover,
    .table-action-btn-group .btn-action-result:hover,
    .table-action-btn-group .result-data:hover,
    .table td a.btn-action-result:hover,
    .table td a.result-data:hover,
    .table td button.btn-action-result:hover,
    .table td button.result-data:hover {
        background-color: #059669 !important;
        color: #ffffff !important;
        border-color: #059669 !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 2px 5px rgba(5, 150, 105, 0.25) !important;
    }

    /* Question / Add Questions Action Button (Light Indigo tint with Indigo icon - Image 2 Reference) */
    .btn-action-question,
    .question-data,
    .add-questions-data,
    .table td .btn-action-question,
    .table td .question-data,
    .table td .add-questions-data,
    .table-action-btn-group .btn-action-question,
    .table-action-btn-group .question-data,
    .table-action-btn-group .add-questions-data,
    .table td a.btn-action-question,
    .table td a.question-data,
    .table td a.add-questions-data,
    .table td button.btn-action-question,
    .table td button.question-data,
    .table td button.add-questions-data {
        background-color: #eef2ff !important;
        color: #4f46e5 !important;
        border-color: #c7d2fe !important;
    }

    .btn-action-question:hover,
    .question-data:hover,
    .add-questions-data:hover,
    .table td .btn-action-question:hover,
    .table td .question-data:hover,
    .table td .add-questions-data:hover,
    .table-action-btn-group .btn-action-question:hover,
    .table-action-btn-group .question-data:hover,
    .table-action-btn-group .add-questions-data:hover,
    .table td a.btn-action-question:hover,
    .table td a.question-data:hover,
    .table td a.add-questions-data:hover,
    .table td button.btn-action-question:hover,
    .table td button.question-data:hover,
    .table td button.add-questions-data:hover {
        background-color: #4f46e5 !important;
        color: #ffffff !important;
        border-color: #4f46e5 !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 2px 5px rgba(79, 70, 229, 0.25) !important;
    }

    /* 4. Restore Action Button (Light Green tint) */
    .table td .btn-action-restore,
    .table td .restore-data,
    .table td a.btn-inverse-success,
    .table td a.btn-gradient-success,
    .table td a.btn-outline-success,
    .table-action-btn-group .btn-action-restore {
        background-color: #f0fdf4 !important;
        color: #16a34a !important;
        border-color: #bbf7d0 !important;
    }

    .table td .btn-action-restore:hover,
    .table td .restore-data:hover,
    .table td a.btn-inverse-success:hover,
    .table td a.btn-gradient-success:hover,
    .table td a.btn-outline-success:hover,
    .table-action-btn-group .btn-action-restore:hover {
        background-color: #16a34a !important;
        color: #ffffff !important;
        border-color: #16a34a !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 2px 5px rgba(22, 163, 74, 0.25) !important;
    }

    /* 5. View Action Button (Light Purple / Indigo tint) */
    .table td .btn-action-view,
    .table td .view-data,
    .table td a.btn-inverse-info,
    .table td a.btn-outline-info,
    .table-action-btn-group .btn-action-view {
        background-color: #f5f3ff !important;
        color: #7c3aed !important;
        border-color: #ddd6fe !important;
    }

    .table td .btn-action-view:hover,
    .table td .view-data:hover,
    .table td a.btn-inverse-info:hover,
    .table td a.btn-outline-info:hover,
    .table-action-btn-group .btn-action-view:hover {
        background-color: #7c3aed !important;
        color: #ffffff !important;
        border-color: #7c3aed !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 2px 5px rgba(124, 58, 237, 0.25) !important;
    }

    /* 6. Download / File Action Button (Light Teal / Cyan tint) */
    .table td .btn-action-download,
    .table-action-btn-group .btn-action-download {
        background-color: #f0fdfa !important;
        color: #0d9488 !important;
        border-color: #99f6e4 !important;
    }

    .table td .btn-action-download:hover,
    .table-action-btn-group .btn-action-download:hover {
        background-color: #0d9488 !important;
        color: #ffffff !important;
        border-color: #0d9488 !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 2px 5px rgba(13, 148, 136, 0.25) !important;
    }

    /* 7. Generic / Other Action Buttons (Light Slate tint) */
    .table td .btn-action-custom,
    .table td a.btn-inverse-dark,
    .table td a.btn-outline-secondary,
    .table-action-btn-group .btn-action-custom {
        background-color: #f8fafc !important;
        color: #475569 !important;
        border-color: #e2e8f0 !important;
    }

    .table td .btn-action-custom:hover,
    .table td a.btn-inverse-dark:hover,
    .table td a.btn-outline-secondary:hover,
    .table-action-btn-group .btn-action-custom:hover {
        background-color: #475569 !important;
        color: #ffffff !important;
        border-color: #475569 !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 2px 5px rgba(71, 85, 105, 0.25) !important;
    }

    /* =====================================================
   EQUAL SIZE ENFORCER — All table action buttons must
   be exactly the same size. This rule sits last in the
   stylesheet and beats all per-page overrides.
   ===================================================== */
    .table td a.btn-xs.btn-icon,
    .table td button.btn-xs.btn-icon,
    .table td a.btn-action-approve,
    .table td button.btn-action-approve,
    .table td a.btn-action-cancel,
    .table td button.btn-action-cancel,
    .table td a.btn-action-publish,
    .table td button.btn-action-publish,
    .table td a.btn-action-unpublish,
    .table td button.btn-action-unpublish,
    .table td a.btn-action-result,
    .table td button.btn-action-result,
    .table td a.btn-action-question,
    .table td button.btn-action-question,
    .table td a.btn-action-edit,
    .table td button.btn-action-edit,
    .table td a.btn-action-soft-delete,
    .table td button.btn-action-soft-delete,
    .table td a.btn-action-hard-delete,
    .table td button.btn-action-hard-delete,
    .table td a.btn-action-reject,
    .table td button.btn-action-reject,
    .table td a.reject-data,
    .table td button.reject-data,
    .table td a.reject-delegation-btn,
    .table td button.reject-delegation-btn,
    .table td a.btn-action-restore,
    .table td button.btn-action-restore,
    .table td a.btn-action-view,
    .table td button.btn-action-view,
    .table td a.btn-action-download,
    .table td button.btn-action-download,
    .table td a.btn-action-custom,
    .table td button.btn-action-custom,
    .table td a.approve-data,
    .table td button.approve-data,
    .table td a.cancel-data,
    .table td button.cancel-data,
    .table td a.publish-data,
    .table td button.publish-data,
    .table td a.unpublish-data,
    .table td button.unpublish-data,
    .table td a.result-data,
    .table td button.result-data,
    .table td a.question-data,
    .table td button.question-data,
    .table td a.add-questions-data,
    .table td button.add-questions-data,
    .table td a.publish-exam-result,
    .table td button.publish-exam-result,
    .table td a.edit-data,
    .table td button.edit-data,
    .table td a.delete-form,
    .table td button.delete-form,
    .table td a.trash-data,
    .table td button.trash-data,
    .table td a.restore-data,
    .table td button.restore-data,
    .table td a.view-data,
    .table td button.view-data,
    .table-action-btn-group>a,
    .table-action-btn-group>button {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        min-height: 30px !important;
        max-width: 30px !important;
        max-height: 30px !important;
        padding: 0 !important;
        margin: 0 2px !important;
        border-radius: 6px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        line-height: 1 !important;
        text-decoration: none !important;
        cursor: pointer !important;
        flex-shrink: 0 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        vertical-align: middle !important;
        float: none !important;
    }

    /* Icon inside — 16px–18px for Hugeicons SVGs, 14px for font icons, centered, no extra margin */
    .table td a.btn-xs.btn-icon i,
    .table td button.btn-xs.btn-icon i,
    .table td a.btn-action-edit i,
    .table td button.btn-action-edit i,
    .table td a.btn-action-soft-delete i,
    .table td button.btn-action-soft-delete i,
    .table td a.btn-action-hard-delete i,
    .table td button.btn-action-hard-delete i,
    .table td a.btn-action-restore i,
    .table td button.btn-action-restore i,
    .table td a.btn-action-view i,
    .table td button.btn-action-view i,
    .table td a.btn-action-download i,
    .table td button.btn-action-download i,
    .table td a.btn-action-custom i,
    .table td button.btn-action-custom i,
    .table td a.edit-data i,
    .table td button.edit-data i,
    .table td a.delete-form i,
    .table td button.delete-form i,
    .table td a.trash-data i,
    .table td button.trash-data i,
    .table td a.restore-data i,
    .table td button.restore-data i,
    .table td a.view-data i,
    .table td button.view-data i,
    .table-action-btn-group>a i,
    .table-action-btn-group>button i {
        font-size: 14px !important;
        line-height: 1 !important;
        margin: 0 !important;
        padding: 0 !important;
        display: inline-block !important;
        vertical-align: middle !important;
        color: inherit !important;
        width: auto !important;
        height: auto !important;
    }

    /* Hugeicons SVGs in Table Action Buttons */
    .table td a.btn-xs.btn-icon svg,
    .table td button.btn-xs.btn-icon svg,
    .table td .btn-action-approve svg,
    .table td .btn-action-cancel svg,
    .table td .btn-action-publish svg,
    .table td .btn-action-unpublish svg,
    .table td .btn-action-result svg,
    .table td .btn-action-question svg,
    .table td .btn-action-edit svg,
    .table td .btn-action-soft-delete svg,
    .table td .btn-action-hard-delete svg,
    .table td .btn-action-restore svg,
    .table td .btn-action-view svg,
    .table td .btn-action-download svg,
    .table td .btn-action-custom svg,
    .table td .approve-data svg,
    .table td .cancel-data svg,
    .table td .publish-data svg,
    .table td .unpublish-data svg,
    .table td .result-data svg,
    .table td .question-data svg,
    .table td .add-questions-data svg,
    .table td .publish-exam-result svg,
    .table td .edit-data svg,
    .table td .delete-form svg,
    .table td .trash-data svg,
    .table td .restore-data svg,
    .table td .view-data svg,
    .table-action-btn-group svg,
    .table-action-btn-group svg.hugeicon,
    svg.hugeicon {
        width: 16px !important;
        height: 16px !important;
        min-width: 16px !important;
        min-height: 16px !important;
        max-width: 16px !important;
        max-height: 16px !important;
        display: inline-block !important;
        vertical-align: middle !important;
        color: inherit !important;
        stroke: currentColor !important;
        fill: none !important;
        stroke-width: 1.5 !important;
        stroke-linecap: round !important;
        stroke-linejoin: round !important;
        flex-shrink: 0 !important;
        pointer-events: none !important;
        transition: transform 0.15s ease !important;
    }

    /* Image 2 Question Icon Geometry & Boldness */
    svg.hugeicon-question {
        stroke-width: 2.2 !important;
    }

    svg.hugeicon-question circle {
        fill: currentColor !important;
        stroke: none !important;
    }

    .table td a.btn:hover svg,
    .table td button.btn:hover svg,
    .table-action-btn-group a:hover svg,
    .table-action-btn-group button:hover svg {
        transform: scale(1.08) !important;
    }


    /* =====================================================
   UNIVERSAL MODAL CLOSE BUTTON — Standardized across
   the entire project. Covers BOTH patterns:
     1. class="btn-close"  (Bootstrap 5, empty button)
     2. class="close"      (Bootstrap 4, with span/icon inside)
   Sits last in the stylesheet to win every override.
   ===================================================== */

    /* ---- SHARED: Base shape, size, position ---- */
    .modal .modal-header .btn-close,
    .modal .modal-header button.btn-close,
    .modal .modal-header .close,
    .modal .modal-header button.close {
        /* Size & shape */
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
        max-width: 32px !important;
        max-height: 32px !important;
        padding: 0 !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
        border-radius: 8px !important;

        /* Layout */
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;

        /* Colors — soft red tint, clearly visible on any header */
        background-color: rgba(239, 68, 68, 0.12) !important;
        border: 1px solid rgba(239, 68, 68, 0.28) !important;
        color: #ef4444 !important;

        /* Reset & positioning */
        position: relative !important;
        top: auto !important;
        right: auto !important;
        float: none !important;
        opacity: 1 !important;
        outline: none !important;
        box-shadow: none !important;
        cursor: pointer !important;
        transition: background-color 0.18s ease, border-color 0.18s ease,
            color 0.18s ease, transform 0.18s ease !important;
        text-shadow: none !important;
        font-weight: normal !important;
        line-height: 1 !important;
        vertical-align: middle !important;
        appearance: none !important;
        -webkit-appearance: none !important;
    }

    /* ---- HOVER state ---- */
    .modal .modal-header .btn-close:hover,
    .modal .modal-header button.btn-close:hover,
    .modal .modal-header .close:hover,
    .modal .modal-header button.close:hover {
        background-color: #ef4444 !important;
        border-color: #ef4444 !important;
        color: #ffffff !important;
        transform: rotate(90deg) scale(1.05) !important;
        opacity: 1 !important;
    }

    /* ---- Force icon inside button to white on hover ---- */
    .modal .modal-header .btn-close:hover span,
    .modal .modal-header .btn-close:hover i,
    .modal .modal-header button.btn-close:hover span,
    .modal .modal-header button.btn-close:hover i,
    .modal .modal-header .close:hover span,
    .modal .modal-header .close:hover i,
    .modal .modal-header button.close:hover span,
    .modal .modal-header button.close:hover i {
        color: #ffffff !important;
        opacity: 1 !important;
    }

    /* ---- FOCUS state — accessibility ring ---- */
    .modal .modal-header .btn-close:focus,
    .modal .modal-header button.btn-close:focus,
    .modal .modal-header .close:focus,
    .modal .modal-header button.close:focus {
        outline: 2px solid rgba(239, 68, 68, 0.4) !important;
        outline-offset: 2px !important;
        box-shadow: none !important;
    }

    /* ---- Bootstrap 5 btn-close: replace the default filter-based × icon
         with a crisp FontAwesome × via pseudo-element ---- */
    .modal .modal-header .btn-close,
    .modal .modal-header button.btn-close {
        /* Kill the built-in background-image × icon */
        background-image: none !important;
        /* Use the "×" character as the content */
        font-family: "Font Awesome 5 Free", "FontAwesome", Arial, sans-serif !important;
        font-weight: 900 !important;
        font-size: 14px !important;
        filter: none !important;
    }

    .modal .modal-header .btn-close::before,
    .modal .modal-header button.btn-close::before {
        content: "\f00d" !important;
        /* fa-times */
        font-family: "Font Awesome 5 Free", "FontAwesome", Arial, sans-serif !important;
        font-weight: 900 !important;
        font-size: 13px !important;
        color: inherit !important;
        line-height: 1 !important;
        display: block !important;
    }

    /* ---- Bootstrap 4 .close: icon & span inside the button ---- */
    .modal .modal-header .close span,
    .modal .modal-header button.close span,
    .modal .modal-header .close i,
    .modal .modal-header button.close i {
        font-size: 14px !important;
        color: inherit !important;
        line-height: 1 !important;
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
    }

    /* ---- When header has a coloured/dark background (comman.css sets
         --theme-color), we need enough contrast.
         The red tint works on white headers; on coloured ones we
         switch to a semi-transparent white pill. ---- */
    .modal .modal-header[style*="background"] .btn-close,
    .modal .modal-header[style*="background"] button.btn-close,
    .modal .modal-header[style*="background"] .close,
    .modal .modal-header[style*="background"] button.close,
    .modal .modal-header.bg-primary .btn-close,
    .modal .modal-header.bg-primary .close,
    .modal .modal-header.bg-dark .btn-close,
    .modal .modal-header.bg-dark .close,
    .modal .modal-header.bg-secondary .btn-close,
    .modal .modal-header.bg-secondary .close {
        background-color: rgba(255, 255, 255, 0.15) !important;
        border-color: rgba(255, 255, 255, 0.3) !important;
        color: #ffffff !important;
    }

    .modal .modal-header[style*="background"] .btn-close:hover,
    .modal .modal-header[style*="background"] button.btn-close:hover,
    .modal .modal-header[style*="background"] .close:hover,
    .modal .modal-header[style*="background"] button.close:hover,
    .modal .modal-header.bg-primary .btn-close:hover,
    .modal .modal-header.bg-primary .close:hover,
    .modal .modal-header.bg-dark .btn-close:hover,
    .modal .modal-header.bg-dark .close:hover {
        background-color: rgba(255, 255, 255, 0.35) !important;
        border-color: rgba(255, 255, 255, 0.5) !important;
        color: #ffffff !important;
    }

    /* ---- Ensure the modal-header itself is flex so the close button
         stays anchored to the right without positional hacks ---- */
    .modal .modal-header {
        display: flex !important;
        align-items: flex-start !important;
        justify-content: space-between !important;
        gap: 12px !important;
    }

    /* ---- Keep title area growing, close button shrinking ---- */
    .modal .modal-header> :first-child {
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }

    .modal .modal-header .btn-close,
    .modal .modal-header button.btn-close,
    .modal .modal-header .close,
    .modal .modal-header button.close {
        flex: 0 0 auto !important;
        align-self: flex-start !important;
        margin-top: 2px !important;
    }

    /* =====================================================
   HORIZONTAL ACTION BUTTONS ROW — STRICT NOWRAP ENFORCER
   All action buttons (View, Edit, Delete, etc.) MUST
   display side by side in a single horizontal row.
   ===================================================== */
    .table th[data-field="operate"],
    .table td[data-field="operate"],
    .table th[data-field="action"],
    .table td[data-field="action"],
    .table th.table-action-column,
    .table td.table-action-column,
    .table th.action-column,
    .table td.action-column {
        width: 1% !important;
        min-width: 110px !important;
        max-width: none !important;
        white-space: nowrap !important;
        text-align: center !important;
        vertical-align: middle !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .table-action-btn-group,
    .table td[data-field="operate"] .table-action-btn-group,
    .table td[data-field="action"] .table-action-btn-group,
    .action-column-menu,
    .table-action-column {
        display: inline-flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        white-space: nowrap !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        vertical-align: middle !important;
        margin: 0 auto !important;
    }

    /* Direct action buttons inside cells — always side by side */
    .table td[data-field="operate"] a.btn,
    .table td[data-field="operate"] button.btn,
    .table td[data-field="action"] a.btn,
    .table td[data-field="action"] button.btn,
    .table-action-btn-group>a,
    .table-action-btn-group>button {
        display: inline-flex !important;
        flex-direction: row !important;
        flex-shrink: 0 !important;
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        min-height: 30px !important;
        max-width: 30px !important;
        max-height: 30px !important;
        padding: 0 !important;
        margin: 0 1px !important;
        border-radius: 6px !important;
        align-items: center !important;
        justify-content: center !important;
        float: none !important;
        vertical-align: middle !important;
    }

    /* =====================================================
   TOP NAVBAR BRAND LOGO — CLEAN ROUNDED BADGE & CLEAR PROPORTIONS
   ===================================================== */
    .navbar.default-layout-navbar .navbar-brand-wrapper {
        padding: 0.4rem 1rem !important;
    }

    .navbar .navbar-brand-wrapper .navbar-brand,
    .navbar .navbar-brand-wrapper .brand-logo,
    .navbar-brand.brand-logo {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: #ffffff !important;
        border-radius: 10px !important;
        padding: 5px 16px !important;
        height: 52px !important;
        max-height: 54px !important;
        width: auto !important;
        max-width: 270px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18) !important;
        border: 1px solid rgba(255, 255, 255, 0.25) !important;
        text-decoration: none !important;
        overflow: hidden !important;
        margin: 0 auto !important;
    }

    .navbar .navbar-brand-wrapper .navbar-brand img,
    .navbar .navbar-brand-wrapper .brand-logo img,
    .navbar-brand.brand-logo img,
    .brand-logo img,
    .custom-default-image {
        height: 42px !important;
        max-height: 44px !important;
        max-width: 230px !important;
        width: auto !important;
        object-fit: contain !important;
        display: block !important;
        margin: 0 auto !important;
        border-radius: 6px !important;
    }

    .navbar .navbar-brand-wrapper .navbar-brand.brand-logo-mini,
    .navbar .navbar-brand-wrapper .brand-logo-mini {
        display: none !important;
        align-items: center !important;
        justify-content: center !important;
        background: #ffffff !important;
        border-radius: 10px !important;
        padding: 4px !important;
        width: 48px !important;
        height: 48px !important;
        max-width: 48px !important;
        max-height: 48px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18) !important;
        overflow: hidden !important;
        margin: 0 auto !important;
    }

    .navbar .navbar-brand-wrapper .navbar-brand.brand-logo-mini img,
    .navbar .navbar-brand-wrapper .brand-logo-mini img {
        height: 38px !important;
        max-height: 40px !important;
        max-width: 40px !important;
        width: auto !important;
        object-fit: contain !important;
        display: block !important;
        margin: 0 auto !important;
        border-radius: 6px !important;
    }

    /* =====================================================
   APP MAIN BACKGROUND COLOR — #f6f8fa
   ===================================================== */
    :root {
        --color-background: #f6f8fa !important;
    }

    body,
    .container-scroller,
    .page-body-wrapper,
    .main-panel,
    .content-wrapper {
        background-color: #f6f8fa !important;
    }

    /* =====================================================
   SIDEBAR — SOLID WHITE TEXT & ICONS ALWAYS (NO HOVER NEEDED)
   ===================================================== */
    .sidebar .nav .nav-item,
    .sidebar .nav .nav-item:hover,
    .sidebar .nav.sub-menu .nav-item,
    .sidebar .nav.sub-menu .nav-item:hover {
        background: transparent !important;
        background-color: transparent !important;
    }

    /* All root & submenu links always white by default */
    .sidebar .nav .nav-item .nav-link,
    .sidebar .nav .nav-item .nav-link .menu-title,
    .sidebar .nav .nav-item .nav-link span,
    .sidebar .nav.sub-menu .nav-item .nav-link,
    .sidebar .nav.sub-menu .nav-item .nav-link .menu-title,
    .sidebar .nav.sub-menu .nav-item .nav-link span {
        color: #ffffff !important;
    }

    .sidebar .nav .nav-item .nav-link .menu-icon,
    .sidebar .nav .nav-item .nav-link i,
    .sidebar .nav.sub-menu .nav-item .nav-link .menu-icon,
    .sidebar .nav.sub-menu .nav-item .nav-link i {
        color: #ffffff !important;
        background: transparent !important;
    }

    .sidebar .nav .nav-item .nav-link .menu-icon::before,
    .sidebar .nav .nav-item .nav-link .menu-icon:before,
    .sidebar .nav .nav-item .nav-link i::before,
    .sidebar .nav .nav-item .nav-link i:before,
    .sidebar .nav.sub-menu .nav-item .nav-link::before,
    .sidebar .nav.sub-menu .nav-item .nav-link:before {
        color: #ffffff !important;
    }

    .sidebar .nav .nav-item .nav-link .menu-arrow,
    .sidebar .nav .nav-item .nav-link .menu-arrow::before {
        color: #ffffff !important;
        background: transparent !important;
    }

    /* Subtle hover background highlight with white text */
    .sidebar .nav .nav-item .nav-link:not(.active):hover,
    .sidebar .nav.sub-menu .nav-item .nav-link:not(.active):hover {
        color: #ffffff !important;
        background: rgba(255, 255, 255, 0.08) !important;
        background-color: rgba(255, 255, 255, 0.08) !important;
    }

    /* Active and Parent-Active Top-Level & Module Navigation Items */
    .sidebar .nav .nav-item.active>.nav-link,
    .sidebar .nav .nav-item.parent-active>.nav-link,
    .sidebar .nav .nav-item.active.parent-active>.nav-link,
    .sidebar .nav>.nav-item.active>.nav-link,
    .sidebar .nav>.nav-item.parent-active>.nav-link,
    .sidebar .nav>.nav-item.active.parent-active>.nav-link,
    .sidebar .nav .nav-link.active,
    .sidebar .nav .nav-item.active>.nav-link[aria-expanded="true"],
    .sidebar .nav .nav-item.parent-active>.nav-link[aria-expanded="true"],
    .sidebar .nav .nav-item.active.parent-active>.nav-link[aria-expanded="true"] {
        background: var(--color-primary, #4F46E5) !important;
        background-color: var(--color-primary, #4F46E5) !important;
        color: #ffffff !important;
        font-weight: 600 !important;
        border-radius: 8px !important;
        border: none !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
    }

    .sidebar .nav .nav-item.active>.nav-link:hover,
    .sidebar .nav .nav-item.parent-active>.nav-link:hover,
    .sidebar .nav .nav-item.active.parent-active>.nav-link:hover,
    .sidebar .nav .nav-link.active:hover {
        background: var(--color-primary-hover, #4338CA) !important;
        background-color: var(--color-primary-hover, #4338CA) !important;
        color: #ffffff !important;
    }

    .sidebar .nav .nav-item.active>.nav-link .menu-title,
    .sidebar .nav .nav-item.active>.nav-link .menu-icon,
    .sidebar .nav .nav-item.active>.nav-link i,
    .sidebar .nav .nav-item.active>.nav-link .menu-arrow,
    .sidebar .nav .nav-item.parent-active>.nav-link .menu-title,
    .sidebar .nav .nav-item.parent-active>.nav-link .menu-icon,
    .sidebar .nav .nav-item.parent-active>.nav-link i,
    .sidebar .nav .nav-item.parent-active>.nav-link .menu-arrow,
    .sidebar .nav .nav-item.active.parent-active>.nav-link .menu-title,
    .sidebar .nav .nav-item.active.parent-active>.nav-link .menu-icon,
    .sidebar .nav .nav-item.active.parent-active>.nav-link i,
    .sidebar .nav .nav-item.active.parent-active>.nav-link .menu-arrow,
    .sidebar .nav .nav-link.active .menu-title,
    .sidebar .nav .nav-link.active .menu-icon,
    .sidebar .nav .nav-link.active i,
    .sidebar .nav .nav-link.active .menu-arrow {
        color: #ffffff !important;
        background: transparent !important;
    }

    /* Active Submenu / Child Item Highlight - Follows Brand Primary Color Across All Logins */
    .sidebar .sub-menu .nav-item.active>.nav-link,
    .sidebar .sub-menu .nav-item>.nav-link.active,
    .sidebar .sub-menu .nav-link.active,
    .sidebar .nav.sub-menu .nav-item.active>.nav-link,
    .sidebar .nav.sub-menu .nav-item>.nav-link.active,
    .sidebar .nav.sub-menu .nav-link.active,
    .sidebar .collapse .nav-item.active>.nav-link,
    .sidebar .collapse .nav-item>.nav-link.active,
    .sidebar .collapse .nav-link.active,
    .sidebar-dark .sidebar .nav.sub-menu .nav-item.active>.nav-link,
    .sidebar-dark .sidebar .nav.sub-menu .nav-item>.nav-link.active,
    .sidebar-dark .sidebar .nav.sub-menu .nav-link.active {
        background: var(--color-primary, #4F46E5) !important;
        background-color: var(--color-primary, #4F46E5) !important;
        color: #ffffff !important;
        font-weight: 600 !important;
        border-radius: 7px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    }

    .sidebar .sub-menu .nav-item.active>.nav-link:hover,
    .sidebar .sub-menu .nav-item>.nav-link.active:hover,
    .sidebar .sub-menu .nav-link.active:hover,
    .sidebar .nav.sub-menu .nav-item.active>.nav-link:hover,
    .sidebar .nav.sub-menu .nav-item>.nav-link.active:hover,
    .sidebar .nav.sub-menu .nav-link.active:hover,
    .sidebar .collapse .nav-item.active>.nav-link:hover,
    .sidebar .collapse .nav-item>.nav-link.active:hover,
    .sidebar .collapse .nav-link.active:hover,
    .sidebar-dark .sidebar .nav.sub-menu .nav-item.active>.nav-link:hover,
    .sidebar-dark .sidebar .nav.sub-menu .nav-item>.nav-link.active:hover,
    .sidebar-dark .sidebar .nav.sub-menu .nav-link.active:hover {
        background: var(--color-primary-hover, #4338CA) !important;
        background-color: var(--color-primary-hover, #4338CA) !important;
        color: #ffffff !important;
    }

    .sidebar .sub-menu .nav-link.active,
    .sidebar .sub-menu .nav-link.active .menu-title,
    .sidebar .sub-menu .nav-link.active .menu-icon,
    .sidebar .sub-menu .nav-link.active i,
    .sidebar .sub-menu .nav-item.active>.nav-link .menu-title,
    .sidebar .sub-menu .nav-item.active>.nav-link .menu-icon,
    .sidebar .sub-menu .nav-item.active>.nav-link i,
    .sidebar .sub-menu .nav-item>.nav-link.active .menu-title,
    .sidebar .sub-menu .nav-item>.nav-link.active .menu-icon,
    .sidebar .sub-menu .nav-item>.nav-link.active i,
    .sidebar .collapse .nav-link.active,
    .sidebar .collapse .nav-link.active .menu-title,
    .sidebar .collapse .nav-link.active .menu-icon,
    .sidebar .collapse .nav-link.active i,
    .sidebar-dark .sidebar .nav.sub-menu .nav-item .nav-link.active,
    .sidebar-dark .sidebar .nav.sub-menu .nav-item.active>.nav-link {
        color: #ffffff !important;
        background: transparent !important;
    }

    .sidebar .sub-menu .nav-link.active::before,
    .sidebar .sub-menu .nav-link.active:before,
    .sidebar .sub-menu .nav-item.active>.nav-link::before,
    .sidebar .sub-menu .nav-item.active>.nav-link:before,
    .sidebar .sub-menu .nav-item>.nav-link.active::before,
    .sidebar .sub-menu .nav-item>.nav-link.active:before,
    .sidebar .collapse .nav-link.active::before,
    .sidebar .collapse .nav-link.active:before {
        color: #ffffff !important;
        background-color: #ffffff !important;
        opacity: 1 !important;
    }

    .sidebar .sub-menu .nav-item .nav-link:not(.active):hover,
    .sidebar .nav.sub-menu .nav-item .nav-link:not(.active):hover,
    .sidebar .collapse .nav-item .nav-link:not(.active):hover {
        color: #ffffff !important;
        background: rgba(var(--color-primary-rgb, 79, 70, 229), 0.16) !important;
        background-color: rgba(var(--color-primary-rgb, 79, 70, 229), 0.16) !important;
        border-radius: 6px !important;
    }

    /* =====================================================
   GLOBAL ACTION BUTTONS — ACTIVATE & DEACTIVATE
   ===================================================== */
    .btn-action-activate,
    .activate-data,
    .activate-teacher,
    .activate-student,
    .activate-school {
        background-color: #ecfdf5 !important;
        color: #059669 !important;
        border-color: #a7f3d0 !important;
    }

    .btn-action-activate:hover,
    .activate-data:hover,
    .activate-teacher:hover,
    .activate-student:hover,
    .activate-school:hover {
        background-color: #059669 !important;
        color: #ffffff !important;
        border-color: #059669 !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 2px 5px rgba(5, 150, 105, 0.25) !important;
    }

    .btn-action-deactivate,
    .deactivate-data,
    .deactivate-teacher,
    .deactivate-student,
    .deactivate-school {
        background-color: #fffbeb !important;
        color: #d97706 !important;
        border-color: #fde68a !important;
    }

    .btn-action-deactivate:hover,
    .deactivate-data:hover,
    .deactivate-teacher:hover,
    .deactivate-student:hover,
    .deactivate-school:hover {
        background-color: #d97706 !important;
        color: #ffffff !important;
        border-color: #d97706 !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 2px 5px rgba(217, 119, 6, 0.25) !important;
    }

    /* ==========================================================================
   Gallery Thumbnail Cards & Media Display Layout
   ========================================================================== */
    .gallery-thumbnail-card {
        position: relative !important;
        background: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 10px !important;
        padding: 6px !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
        transition: all 0.2s ease-in-out !important;
        height: 100% !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        box-sizing: border-box !important;
    }

    .gallery-thumbnail-card:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
        border-color: #cbd5e1 !important;
        transform: translateY(-2px) !important;
    }

    .gallery-thumbnail-wrapper {
        position: relative !important;
        width: 100% !important;
        height: 125px !important;
        min-height: 125px !important;
        max-height: 125px !important;
        border-radius: 6px !important;
        overflow: hidden !important;
        background-color: #f1f5f9 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-decoration: none !important;
    }

    .gallery-thumbnail-wrapper .gallery-thumbnail-img {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
        display: block !important;
        border-radius: 6px !important;
        transition: transform 0.25s ease !important;
    }

    .gallery-thumbnail-card:hover .gallery-thumbnail-img {
        transform: scale(1.04) !important;
    }

    .gallery-thumbnail-card .gallery-remove-btn,
    .gallery-thumbnail-card .remove-gallery-image {
        position: absolute !important;
        top: 10px !important;
        right: 10px !important;
        width: 26px !important;
        height: 26px !important;
        min-width: 26px !important;
        max-width: 26px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: #ef4444 !important;
        color: #ffffff !important;
        border: 2px solid #ffffff !important;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
        z-index: 10 !important;
        font-size: 11px !important;
        line-height: 1 !important;
        cursor: pointer !important;
        transition: background 0.15s ease, transform 0.15s ease !important;
    }

    .gallery-thumbnail-card .gallery-remove-btn:hover,
    .gallery-thumbnail-card .remove-gallery-image:hover {
        background: #dc2626 !important;
        transform: scale(1.1) !important;
        color: #ffffff !important;
    }

    .gallery-thumbnail-wrapper .video-badge-icon {
        position: absolute !important;
        bottom: 6px !important;
        left: 6px !important;
        background: rgba(15, 23, 42, 0.75) !important;
        backdrop-filter: blur(2px) !important;
        color: #ffffff !important;
        border-radius: 4px !important;
        padding: 2px 7px !important;
        font-size: 11px !important;
        font-weight: 500 !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 4px !important;
        pointer-events: none !important;
        z-index: 2 !important;
    }

    .lightGallery,
    #lightgallery {
        width: 100% !important;
        margin: 0 !important;
    }

    .lightGallery .image-tile,
    .lightGallery a.image-tile,
    #lightgallery .image-tile,
    #lightgallery a.image-tile {
        -webkit-box-flex: 0 0 100% !important;
        -ms-flex: 0 0 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        margin-bottom: 0 !important;
        display: block !important;
    }

    .lightGallery .image-tile img,
    .lightGallery a.image-tile img,
    #lightgallery .image-tile img,
    #lightgallery a.image-tile img {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: cover !important;
    }

    /* ==========================================================================
   Custom Search Select & Modal Controls Standard Alignment
   ========================================================================== */
    .custom-select-wrapper {
        position: relative !important;
        width: 100% !important;
        display: block !important;
    }

    .custom-select-wrapper.open,
    .custom-select-wrapper:has(.custom-select-dropdown.show) {
        z-index: 1080 !important;
    }

    .custom-select-trigger {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        width: 100% !important;
        min-height: 42px !important;
        height: auto !important;
        padding: 0.5rem 2.5rem 0.5rem 0.875rem !important;
        font-size: 0.875rem !important;
        font-weight: 400 !important;
        line-height: 1.45 !important;
        white-space: normal !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        color: #212529 !important;
        background-color: #fff !important;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
        background-repeat: no-repeat !important;
        background-position: right 0.85rem center !important;
        background-size: 14px 10px !important;
        border: 1px solid #cbd5e1 !important;
        border-radius: 8px !important;
        transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out !important;
        cursor: pointer !important;
        text-align: left !important;
        user-select: none !important;
        pointer-events: auto !important;
        box-sizing: border-box !important;
    }

    .custom-select-trigger .custom-select-trigger-text,
    .custom-select-trigger>span {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        white-space: normal !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        line-height: 1.45 !important;
        text-align: left !important;
    }

    .custom-select-wrapper.open-up .custom-select-trigger {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 11 6-6 6 6'/%3e%3c/svg%3e") !important;
    }

    .custom-select-trigger:focus {
        border-color: #86b7fe !important;
        outline: 0 !important;
        box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
    }

    .sr-select-hidden {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        padding: 0 !important;
        margin: -1px !important;
        overflow: hidden !important;
        clip: rect(0, 0, 0, 0) !important;
        border: 0 !important;
        opacity: 0 !important;
        pointer-events: none !important;
        z-index: -1 !important;
    }

    .custom-select-dropdown {
        position: absolute;
        top: 100%;
        bottom: auto;
        left: 0;
        right: 0;
        z-index: 1090;
        display: none;
        min-width: 100%;
        margin-top: 0.25rem;
        background-color: #fff;
        border: 1px solid rgba(0, 0, 0, .15);
        border-radius: 0.375rem;
        box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.15);
        max-height: 350px;
        overflow: hidden;
        flex-direction: column;
    }

    .custom-select-dropdown.show {
        display: flex !important;
        z-index: 99999 !important;
    }

    /* Enable textarea drag resize extension */
    textarea,
    textarea.form-control,
    #edit_description,
    #description {
        resize: vertical !important;
        min-height: 75px;
    }


    /* Global "Same as Current Address" Checkbox & Row Styling */
    .same-as-current-label-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 6px;
        margin-bottom: 6px;
    }

    .same-as-current-container {
        display: inline-flex;
        align-items: center;
        user-select: none;
    }

    .same-as-current-container label {
        display: inline-flex !important;
        align-items: center !important;
        margin: 0 !important;
        font-size: 0.8125rem !important;
        font-weight: 500 !important;
        color: #475569 !important;
        cursor: pointer !important;
        line-height: 1.2 !important;
    }

    .same-as-current-address-checkbox {
        cursor: pointer !important;
        width: 15px !important;
        height: 15px !important;
        min-width: 15px !important;
        margin: 0 6px 0 0 !important;
        accent-color: var(--color-primary, #4F46E5) !important;
        position: static !important;
        display: inline-block !important;
        vertical-align: middle !important;
    }

    textarea[readonly].same-as-current-synced,
    input[readonly].same-as-current-synced {
        background-color: #f8fafc !important;
        cursor: not-allowed;
        border-color: #e2e8f0 !important;
    }