body {
    font-family: 'Kumbh Sans', sans-serif;
    font-weight: 600;
    overflow-x: hidden;
}

.sidebar {
    background-color: #0055b3;
    color: white;
    height: 100vh;
    width: 242px;
    position: fixed;
    z-index: 1050;
    transition: left 0.3s ease;
}

@media (max-width: 991.98px) {
    .sidebar {
        left: -242px;
    }

    .sidebar.show {
        left: 0;
    }
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.logo-container img {
    max-width: 230px;
    height: auto;
    display: block;
}

.sidebar .menu-item {
    padding: 12px 25px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s;
}

.sidebar .menu-item:hover,
.sidebar .menu-item.active {
    background-color: #509CDB;
    color: white;
    border-radius: 4px;
}

.sidebar .menu-item i {
    margin-right: 10px;
    width: 20px;
}

.school-name {
    font-size: 14px;
    margin-top: 10px;
}

/* Notification Dropdown */
.notification-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 360px;
    max-height: 480px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    z-index: 9999;
}

.notification-dropdown.show {
    display: block;
}

.notification-item {
    padding: 10px 14px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.15s;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unseen {
    background: #eef5ff;
}

.msg-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: #0078d4;
    border-radius: 50%;
    margin-left: 4px;
}

.dot-badge {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: red;
    border-radius: 50%;
    vertical-align: middle;
    margin-left: 3px;
}

.message-search-box {
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
}

.message-per-page {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.8rem;
}

.message-per-page .form-select {
    width: auto;
}

/* Global Select2 consistency: match dropdown panel to input field */
.select2-container {
    width: 100% !important;
}

.select2-container .select2-selection--single {
    height: 40px !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 10px !important;
    background-color: #f9fafb !important;
    box-sizing: border-box;
}

.select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 38px !important;
    padding-left: 12px !important;
    color: #1f2937 !important;
}

.select2-container .select2-selection--single .select2-selection__arrow {
    height: 38px !important;
}

.select2-dropdown {
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 10px !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08) !important;
    box-sizing: border-box;
    overflow: hidden;
}

/* Consistent dropdown styling for all modal form selects */
.modal .select2-container {
    width: 100% !important;
}

.modal .select2-container--default .select2-selection--single {
    height: 40px !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 10px !important;
    background-color: #f9fafb !important;
}

.modal .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 38px !important;
    color: #1f2937 !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    padding-left: 12px !important;
}

.modal .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 38px !important;
    right: 10px !important;
}

.modal .select2-dropdown {
    border-radius: 10px !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08) !important;
    overflow: hidden;
}

.modal .select2-results__option {
    font-size: 0.875rem !important;
    font-weight: 600 !important;
}

.messages-list {
    max-height: 260px;
    overflow-y: auto;
}

.message-loading {
    padding: 12px;
    text-align: center;
    color: #888;
    font-size: 0.85rem;
}

.message-pagination {
    padding: 8px 12px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.message-pagination-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dashboard-icon {
    background-color: #3498db;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.dash-ico img {
    margin-right: 1rem !important;
}

.collapsible-menu {
    margin-left: 30px;
    transition: height 0.3s ease;
}

.sub-menu-item {
    padding: 8px 20px;
    display: block;
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 14px;
}

.sub-menu-item.active {
    color: white;
    background-color: #509CDB;
}

.sub-menu-item:hover {
    color: white;
    background-color: #509CDB;
}

/* Custom Validation Errors */
.invalid-feedback-custom {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 4px;
    font-weight: 600;
    text-align: left;
    display: block;
    animation: fadeInError 0.2s ease-out;
}

@keyframes fadeInError {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.is-invalid-custom {
    border-color: #dc3545 !important;
}

.is-invalid-custom:focus-within, .is-invalid-custom:focus {
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.15) !important;
    background: #fff !important;
}

/* Make sure select2 container borders respect validation error state */
.select2-container--default .is-invalid-custom.select2-selection {
    border-color: #dc3545 !important;
}

/* Date input field & calendar icon pointer cursor */
input[type="date"],
input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
}

/* High z-index for Select2 dropdowns in modals so they sit above all form controls */
.select2-container--open {
    z-index: 9999999 !important;
}
.select2-dropdown {
    z-index: 9999999 !important;
}