/* Admin Panel Custom Styles */
/* Custom styles for the admin panel interface */

/* ===== GENERAL STYLES ===== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

input::placeholder, 
::-webkit-input-placeholder, 
::-moz-placeholder, 
:-ms-input-placeholder, 
::-ms-input-placeholder, 
::placeholder {
    color: #90979c !important;
}

/* Additional placeholder styling for form controls */
.form-control::placeholder {
    color: #90979c !important;
}

textarea::placeholder,
textarea::-webkit-input-placeholder,
textarea::-moz-placeholder,
textarea:-ms-input-placeholder,
textarea::-ms-input-placeholder {
    color: #90979c !important;
}

/* Force placeholder color for all input types */
input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="tel"]::placeholder,
input[type="password"]::placeholder,
input[type="search"]::placeholder,
input[type="url"]::placeholder,
input[type="number"]::placeholder,
input[type="date"]::placeholder,
input[type="time"]::placeholder,
input[type="datetime-local"]::placeholder {
    color: #90979c !important;
}

/* Override any Bootstrap or framework placeholder styles */
.form-control::placeholder,
.form-control::-webkit-input-placeholder,
.form-control::-moz-placeholder,
.form-control:-ms-input-placeholder,
.form-control::-ms-input-placeholder {
    color: #90979c !important;
    opacity: 1;
}

/* Most specific placeholder override - should work in all cases */
body input::placeholder,
body textarea::placeholder,
body .form-control::placeholder {
    color: #90979c !important;
    opacity: 1 !important;
}

/* Webkit specific overrides */
body input::-webkit-input-placeholder,
body textarea::-webkit-input-placeholder,
body .form-control::-webkit-input-placeholder {
    color: #90979c !important;
    opacity: 1 !important;
}

/* Mozilla specific overrides */
body input::-moz-placeholder,
body textarea::-moz-placeholder,
body .form-control::-moz-placeholder {
    color: #90979c !important;
    opacity: 1 !important;
}

/* IE/Edge specific overrides */
body input:-ms-input-placeholder,
body textarea:-ms-input-placeholder,
body .form-control:-ms-input-placeholder {
    color: #90979c !important;
    opacity: 1 !important;
}

/* ===== PRELOADER STYLES ===== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner {
    color: #3bafda;
}

/* Hide preloader when page is loaded */
.loaded #preloader {
    display: none;
}

/* ===== FIXED TOPBAR STYLES ===== */
.topbar {
    position: fixed;
    top: 0;
    left: 240px;
    right: 0;
    z-index: 50;
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

body.side-menu-sm .topbar {
    left: 70px;
}

@media (max-width: 768px) {
    .topbar {
        left: 0;
    }
    
    .page-content-wrapper {
        padding-top: 60px; /* Slightly less padding on mobile */
    }
    
    .topbar .navbar-custom {
        padding: 0 15px;
        height: 60px;
    }
}

/* Adjust main content to account for fixed topbar */
.page-content-wrapper {
    padding-top: 70px; /* Adjust based on your topbar height */
}

/* Ensure topbar content is properly aligned */
.topbar .navbar-custom {
    padding: 0 20px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    -webkit-box-shadow: none;
    box-shadow: none;
}

.topbar .navbar-custom ul {
    margin: 0;
    padding: 0;
}

.topbar .navbar-custom .menu-left {
    display: flex;
    align-items: center;
}

.topbar .navbar-custom .float-right {
    display: flex;
    align-items: center;
}

/* Ensure dropdowns appear above other content */
.topbar .dropdown-menu {
    z-index: 1031;
}

/* Smooth transition for sidebar toggle */
.topbar {
    transition: left 0.3s ease;
}

/* ===== NAVIGATION STYLES ===== */
.nav-user img.rounded-circle {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.nav-user {
    color: #6c757d !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
}

.nav-user:hover,
.nav-user:focus,
.nav-user.show {
    color: #495057 !important;
    text-decoration: none !important;
}

.nav-user img {
    margin-right: 8px !important;
}

.nav-user .username-text {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.profile-dropdown {
    min-width: 200px;
}

.dropdown-menu.show {
    display: block !important;
}

.notification-list .noti-title {
    background-color: #35b1a2;
}

/* ===== FOOTER STYLES ===== */
.footer {
    position: fixed;
    bottom: 0;
    left: 240px;
    right: 0;
    background-color: #f8f9fa;
    padding: 10px 20px;
    text-align: center;
    border-top: 1px solid #dee2e6;
    z-index: 1000;
    transition: all 0.3s ease;
}

.content-page {
    padding-bottom: 50px;
}

body.side-menu-sm .footer {
    left: 70px;
}

@media (max-width: 768px) {
    .footer {
        left: 0;
    }
}

/* ===== RED MARQUEE STYLES ===== */
.red-marquee {
    color: red;
    font-size: 24px;
}

/* ===== HEADER STYLES ===== */
.page-title-box {
    background: transparent;
    /*color: white;*/
    /*padding: 20px;*/
    /*border-radius: 8px;*/
    margin-bottom: 0px;
    box-shadow: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title-box h3 {
    margin: 0;
    font-weight: 600;
}

.page-title-box .page-title {
    color: #2d3b48;
}

.page-title-box .btn-secondary {
    background: linear-gradient(135deg, #3C4157 0%, #33374B 100%);
}
.page-title-box .btn-secondary:hover {
    background: linear-gradient(135deg, #33374B 0%, #202538 100%);
}

.page-title-box .btn-group > * {
    margin-bottom: 0 !important;
}

.page-title-box .btn-group>.btn-group:not(:last-child)>.btn, .page-title-box .btn-group>.btn:not(:last-child):not(.dropdown-toggle), .page-title-box .btn-group>.btn-group:not(:first-child)>.btn, .page-title-box .btn-group>.btn:not(:first-child) {
    border-radius: 6px;
}

/* ===== CARD STYLES ===== */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    border-radius: 10px 10px 0 0 !important;
    padding: 15px 20px;
}

.card-body {
    padding: 20px;
}

/* ===== BUTTON STYLES ===== */
a {
    color: #35b1a2;
    text-decoration: none;
}
a:hover, a:focus, a:active {
    color: #2f878d;
    text-decoration: none;
}
.btn {
    border-radius: 6px;
    font-weight: 500;
    padding: 8px 16px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.btn-primary:not(:disabled):not(.disabled).active, .btn-primary:not(:disabled):not(.disabled):active, .show > .btn-primary.dropdown-toggle, .btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active, .btn-primary.focus, .btn-primary:active, .btn-primary:focus, .btn-primary:hover, .open > .dropdown-toggle.btn-primary, .btn-outline-primary.active, .btn-outline-primary:active, .show > .btn-outline-primary.dropdown-toggle, .btn-outline-primary:hover, .btn-primary.active, .btn-primary:active, .show > .btn-primary.dropdown-toggle {
    border: 1px solid transparent;
}
.btn-primary:not(:disabled):not(.disabled).active:focus, .btn-primary:not(:disabled):not(.disabled):active:focus, .show > .btn-primary.dropdown-toggle:focus, .btn-primary.focus, .btn-primary:focus {
    -webkit-box-shadow: none;
    box-shadow: none;
}

.btn-primary {
    background: linear-gradient(135deg, #35b1a2 0%, #2f8d82 100%);
    box-shadow: 0 2px 4px rgba(16, 58, 121, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #35a9b1 0%, #2f878d 100%);
    box-shadow: 0 4px 8px rgba(16, 58, 121, 0.4);
}

.btn-outline-primary {
    color: #35b1a2;
}
.btn-outline-primary:hover, .btn-outline-primary:not(:disabled):not(.disabled).active, .btn-outline-primary:not(:disabled):not(.disabled):active, .show>.btn-outline-primary.dropdown-toggle, .btn-outline-primary.focus, .btn-outline-primary:focus {
    color: #2f878d;
    border-color: #35b1a2;
    background-color: transparent;
}

.btn-outline-primary:not(:disabled):not(.disabled).active, .btn-outline-primary:not(:disabled):not(.disabled):active, .show>.btn-outline-primary.dropdown-toggle, .btn-outline-primary.focus, .btn-outline-primary:focus {
    box-shadow: none !important;
}

.btn-success {
    background: linear-gradient(135deg, #2ab45f 0%, #3ab86a 100%);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #28b159 0%, #20954a 100%);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.4);
}

.btn-info {
    background: linear-gradient(135deg, #0da5d3 0%, #1165a7 100%);
    box-shadow: 0 2px 4px rgba(23, 162, 184, 0.3);
}

.btn-info:hover {
    background: linear-gradient(135deg, #0d9cd3 0%, #1142a7 100%);
    box-shadow: 0 4px 8px rgba(23, 162, 184, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #fdca2f 0%, #f4a90d 100%);
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
    color: #212529;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #ffc312 0%, #eb8f0f 100%);
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.4);
    color: #212529;
}

.btn-danger {
    background: linear-gradient(135deg, #f13863 0%, #e12c3e 100%);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #d72c3c 0%, #d92837 100%);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #3C4157 0%, #33374B 100%);
    box-shadow: 0 2px 4px rgba(16, 58, 121, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #33374B 0%, #202538 100%);
    box-shadow: 0 4px 8px rgba(16, 58, 121, 0.4);
}   

/* ===== TABLE STYLES ===== */
.table {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.table thead th {
    background: #fbfbfb;
    color: #202538;
    border: none;
    padding: 12px 15px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}   

.table tbody td {
    padding: 12px 15px;
    border-top: 1px solid #dee2e6;
    vertical-align: middle;
}

.page-link {
    border: 0;
    color: #35b1a2;
}

.page-item.active .page-link {
    background-color: #35b1a2;
    border-color: #35b1a2;
}

/* ===== FORM STYLES ===== */
.form-control {
    border-radius: 6px;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: #35b1a2;
    box-shadow: none;
}

.form-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

/* ===== ALERT STYLES ===== */
.alert {
    border: none;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.alert-success {
    background: linear-gradient(135deg, #f6fffe 0%, #def3ef 100%);
    color: #2f8d82;
    border: 1px solid #35b1a2;
}

.alert-danger {
    background: linear-gradient(135deg, #fff7f8 0%, #fde5e8 100%);
    color: #d92837;
    border: 1px solid #f13863;
}

.alert-warning {
    background: linear-gradient(135deg, #fffef7 0%, #fffaf0 100%);
    color: #856404;
    border: 1px solid #f4a90d;
}

.alert-info {
    background: linear-gradient(135deg, #f8fcff 0%, #e7f6ff 100%);
    color: #1165a7;
    border: 1px solid #1165a7;
}

.alert .close {
    font-size: 1.2rem;
    font-weight: bold;
    opacity: 0.7;
}

.alert .close:hover {
    opacity: 1;
}

/* ===== SIDEBAR STYLES ===== */
#sidebar-menu {
    padding-top: 0;
    padding-bottom: 0;
}
#sidebar-menu, #sidebar-menu ul, #sidebar-menu li, #sidebar-menu a {
    line-height: 1.5;
}

#sidebar-menu > ul > li > a:hover, #sidebar-menu > ul > li > a:hover i, #sidebar-menu > ul > li > a.active .mdi-chevron-right, #sidebar-menu ul ul li.active a {
    color: #35b1a2;
}

#sidebar-menu > ul > li > a.active {
    color: #35b1a2;
    border-radius: 0;
    border-right-color: #2d3145;
    margin-left: 0;
    background-color: rgba(53, 177, 162, 0.1);
    border-right: 3px solid #35b1a2;
}

#sidebar-menu > ul > li.nav-active > a {
    background-color: rgba(53, 177, 162, 0.1);
    border-radius: 0;
    border-right: 3px solid #35b1a2;
}

#sidebar-menu ul ul li.active a:before {
    top: 50%;
    transform: translateY(-50%);
    color: #35b1a2;
}

#sidebar-menu ul ul a:hover {
    color: #35b1a2;
}

/* ===== DASHBOARD STATS CARDS ===== */
.dashboard .card.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
}

.dashboard .card.bg-primary {
    background: linear-gradient(135deg, #007bff 0%, #6610f2 100%) !important;
}

.dashboard .card.bg-info {
    background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%) !important;
}

.dashboard .card.bg-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%) !important;
}

.dashboard .card .round {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

/* ===== BADGE STYLES ===== */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.75rem;
}

.badge-success {
    background: linear-gradient(135deg, #2ab45f 0%, #3ab86a 100%);
}

.badge-danger {
    background: linear-gradient(135deg, #f13863 0%, #e12c3e 100%);
}

.badge-warning {
    background: linear-gradient(135deg, #fdca2f 0%, #f4a90d 100%);
    color: #212529;
}

.badge-info {
    background: linear-gradient(135deg, #0da5d3 0%, #1165a7 100%);
}

/* ===== MODAL STYLES ===== */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    border-radius: 12px 12px 0 0;
}

.modal-footer {
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 12px 12px;
}

/* ===== LOADING SPINNER ===== */
.spinner-border {
    width: 1.5rem;
    height: 1.5rem;
    border-width: 0.2em;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .page-title-box {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .table-responsive {
        border-radius: 8px;
        overflow: hidden;
    }
    
    .btn {
        padding: 6px 12px;
        font-size: 0.875rem;
    }
}

/* ===== CUSTOM UTILITIES ===== */
.shadow-custom {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.rounded-custom {
    border-radius: 12px;
}

.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* ===== ATTENDANCE TABLE STYLES ===== */
#attendance-table th,
#attendance-table td {
    vertical-align: middle;
    white-space: nowrap;
}

#attendance-table td {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 991.98px) {
    #attendance-table th:nth-child(5),
    #attendance-table td:nth-child(5),
    #attendance-table th:nth-child(6),
    #attendance-table td:nth-child(6) {
        display: none;
    }
}

@media (max-width: 767.98px) {
    #attendance-table th:nth-child(2),
    #attendance-table td:nth-child(2),
    #attendance-table th:nth-child(3),
    #attendance-table td:nth-child(3) {
        display: none;
    }
}

.sticky-action-col {
    position: sticky;
    right: 0;
    background: #fff;
    z-index: 2;
}

.remarks-btn {
    cursor: pointer;
    border: none;
    background: none;
}

/* ===== HOLIDAY CALENDAR STYLES ===== */
.holiday-details-modal .modal-body {
    padding: 25px;
}

.holiday-info-row {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.holiday-info-row:last-child {
    border-bottom: none;
}

.holiday-info-label {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.holiday-info-value {
    color: #666;
}

.holiday-type-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: bold;
}

.type-public {
    background-color: #d4edda;
    color: #155724;
}

.type-exam {
    background-color: #fff3cd;
    color: #856404;
}

.type-break {
    background-color: #cce7ff;
    color: #004085;
}

.type-other {
    background-color: #f8d7da;
    color: #721c24;
}

.fc-event-title {
    font-weight: bold;
}

#calendar {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    min-height: 650px;
}

/* ===== BARCODE STYLES ===== */
.ss {
    font-family: "Libre Barcode 128 Text";
    font-size: 60px;
    display: block;
    margin-bottom: 10px;
}

/* ===== PROFILE STYLES ===== */
.profile-picture-container {
    text-align: center;
    margin-bottom: 20px;
}

.profile-picture {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.profile-picture-preview {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    display: none;
    margin-top: 10px;
}

.custom-file-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== FORM VALIDATION STYLES ===== */
.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-control.is-valid {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
}

.valid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #28a745;
}

/* ===== COMMON UTILITY CLASSES ===== */
.text-danger {
    color: #dc3545 !important;
}

.text-success {
    color: #28a745 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-info {
    color: #17a2b8 !important;
}

.text-muted {
    color: #6c757d !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mt-5 {
    margin-top: 3rem !important;
}

.p-3 {
    padding: 1rem !important;
}

.rounded {
    border-radius: 0.25rem !important;
}

.bg-light {
    background-color: #f8f9fa !important;
}

/* ===== DATATABLE CUSTOMIZATION ===== */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 15px;
}

.dataTables_wrapper .dataTables_info {
    margin-top: 15px;
}

.dataTables_wrapper .dataTables_paginate {
    margin-top: 15px;
}

/* ===== FILTER SECTION STYLES ===== */
.filter-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.filter-section .card-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-radius: 8px 8px 0 0;
    padding: 12px 20px;
}

.filter-section .card-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.filter-section .card-body {
    padding: 20px;
}

.filter-section .form-group {
    margin-bottom: 15px;
}

.filter-section .form-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.filter-section .form-control {
    border-radius: 6px;
    border: 2px solid #e9ecef;
    padding: 8px 12px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filter-section .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.filter-section .btn-group .btn {
    border-radius: 6px;
    font-size: 0.85rem;
    padding: 8px 12px;
    transition: all 0.3s ease;
}

.filter-section .btn-group .btn:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Enhanced DataTable styling */
.dataTables_wrapper .dataTables_length select {
    border-radius: 6px;
    border: 2px solid #e9ecef;
    padding: 4px 8px;
    font-size: 0.9rem;
}

.dataTables_wrapper .dataTables_filter input {
    border-radius: 6px;
    border: 2px solid #e9ecef;
    padding: 6px 12px;
    font-size: 0.9rem;
    margin-left: 8px;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 6px;
    margin: 0 2px;
    padding: 6px 12px;
    border: 1px solid #dee2e6;
    background: #fff;
    color: #007bff;
    transition: all 0.3s ease;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

.dataTables_wrapper .dataTables_info {
    color: #6c757d;
    font-size: 0.9rem;
    padding-top: 10px;
}

/* DataTable buttons styling */
.dt-buttons .btn {
    margin-right: 5px;
    border-radius: 6px;
    font-size: 0.85rem;
    padding: 6px 12px;
    transition: all 0.3s ease;
}

.dt-buttons .btn:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ===== RESPONSIVE UTILITIES ===== */
@media (max-width: 576px) {
    .btn {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .card-body {
        padding: 15px;
    }
}

/* ===== LOADING STATES ===== */
.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ===== ENHANCED FILTER SECTION STYLES ===== */
.filter-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 10px;
    margin-bottom: 20px;
}

.filter-section .card-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-radius: 10px 10px 0 0;
    padding: 15px 20px;
}

.filter-section .card-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 16px;
}

.filter-section .card-body {
    padding: 20px;
}

.filter-section .form-group {
    margin-bottom: 15px;
}

.filter-section .form-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    display: block;
}

.filter-section .form-control {
    border: 2px solid #e9ecef;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.filter-section .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.filter-section .btn-group .btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-section .btn-group .btn:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Search Results Info */
#search_results_info {
    font-size: 14px;
    padding: 8px 12px;
    background: rgba(0, 123, 255, 0.1);
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

/* ===== PRINT STYLES ===== */
@media print {
    .sidebar-menu,
    .topbar,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
    
    .table {
        box-shadow: none;
    }
}

/* ===== TABLE SORTING STYLES ===== */
.sortable {
    cursor: pointer;
    position: relative;
    user-select: none;
    transition: background-color 0.3s ease;
}

.sort-icon {
    margin-left: 5px;
    opacity: 0.5;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.sortable:hover .sort-icon {
    opacity: 1;
}

.sort-asc .sort-icon::before {
    content: "\f0de"; /* fa-sort-up */
}

.sort-desc .sort-icon::before {
    content: "\f0dd"; /* fa-sort-down */
}

.sort-asc .sort-icon,
.sort-desc .sort-icon {
    opacity: 1;
    color: #fff;
}

.highlight-row {
    background-color: #fff3cd !important;
    transition: background-color 0.3s ease;
}

/* Enhanced sorting for admin tables */
.table thead th.sortable {
    background: #fbfbfb;
    color: #202538;
    border: none;
    padding: 12px 15px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    position: relative;
}

.table thead th.sortable:hover {
    background: #d9dde9;
}

.table thead th.sortable.sort-asc,
.table thead th.sortable.sort-desc {
    background: linear-gradient(135deg, #d9dde9 0%, #d9dde9 100%);
}

.table thead th.sortable.sort-asc .sort-icon,
.table thead th.sortable.sort-desc .sort-icon {
    color: #fff;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.5);
}

.table-striped tbody tr:nth-of-type(odd), .table-striped tbody tr:nth-of-type(even) {
    background-color: #ffffff;
}

/* ===== TABLE COUNT DISPLAY STYLES ===== */
.table-count-display {
}

.count-badge {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #2fafa9 0%, #249da7 100%);
    color: white;
    padding: 8px 15px;
    border-radius: 25px;
    box-shadow: 0 2px 8px rgba(0, 247, 255, 0.3);
    font-weight: 600;
    transition: all 0.3s ease;
}

.count-badge i {
    font-size: 1rem;
    margin-right: 8px;
}

.count-badge #student_count {
    font-size: 1.5rem;
    font-weight: 700;
    margin-right: 5px;
    min-width: 30px;
    text-align: center;
}

.count-badge .count-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.count-details {
    flex: 1;
}

.count-details small {
    font-size: 0.85rem;
    line-height: 1.4;
}

.count-details i {
    margin-right: 5px;
    color: #6c757d;
}

/* Responsive count display */
@media (max-width: 768px) {
    .table-count-display {
        padding: 12px 15px;
    }
    
    .count-badge {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .count-badge #student_count {
        font-size: 1.3rem;
    }
    
    .count-details {
        margin-left: 10px !important;
    }
    
    .count-details small {
        font-size: 0.8rem;
    }
}

/* ===== HORIZONTAL SCROLL TABLE STYLES ===== */
/* Horizontal scroll styling for wide tables */
.table-responsive {
    -webkit-overflow-scrolling: touch;
    position: relative;
    will-change: scroll-position;
    transform: translateZ(0);
}

/* Top scrollbar container */
.table-scroll-top, .table-scroll-bottom {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    border-radius: 4px;
    background: #f8f9fa;
    will-change: scroll-position;
    transform: translateZ(0);
}

/* Invisible scrollbar track for synchronization */
.table-scroll-sync {
    height: 1px;
    overflow: hidden;
}

/* Scrollbar styling for all table scroll containers */
.table-responsive::-webkit-scrollbar,
.table-scroll-top::-webkit-scrollbar,
.table-scroll-bottom::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track,
.table-scroll-top::-webkit-scrollbar-track,
.table-scroll-bottom::-webkit-scrollbar-track {
    background: rgb(212 231 236);
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb,
.table-scroll-top::-webkit-scrollbar-thumb,
.table-scroll-bottom::-webkit-scrollbar-thumb {
    background: #b8e9e4;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover,
.table-scroll-top::-webkit-scrollbar-thumb:hover,
.table-scroll-bottom::-webkit-scrollbar-thumb:hover {
    background: rgb(54, 179, 184)
}

/* Ensure table headers stay visible and readable */
#datatable-buttons thead th {
    white-space: nowrap;
}

#datatable-buttons thead th.sortable {
    cursor: pointer;
    user-select: none;
}

/* Ensure table cells don't wrap unnecessarily */
#datatable-buttons td {
    white-space: nowrap;
    vertical-align: middle;
    position: relative;
    border: 0;
    border-top: 1px solid #edeeef;
    /*will-change: transform;
    transform: translateZ(0);*/
}

#datatable-buttons tbody tr:hover {
    background-color: #eaf7f6;
}

/* Profile picture column specific styling */
#datatable-buttons td:nth-child(10) {
    text-align: center;
    min-width: 80px;
}

/* Action column specific styling */
#datatable-buttons td:last-child {
    text-align: center;
    min-width: 120px;
}

/* Row selection checkbox */
#datatable-buttons th .form-check-input, #datatable-buttons td .form-check-input {
    position: relative;
    margin: 0;;
}

/* Responsive adjustments for horizontal scroll tables */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    
    #datatable-buttons thead th {
        min-width: 100px;
    }
}

/* ===== ACTION BUTTONS STYLES ===== */
.action-buttons {
    display: flex;
    gap: 5px;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 4px;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
}

.action-btn:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    text-decoration: none;
}

.action-btn i {
    font-size: 14px;
}

/* Button color variations */
.action-btn.btn-info {
    background-color: #17a2b8;
    color: white;
}

.action-btn.btn-info:hover {
    background-color: #138496;
    color: white;
}

.action-btn.btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.action-btn.btn-warning:hover {
    background-color: #e0a800;
    color: #212529;
}

.action-btn.btn-danger {
    background-color: #dc3545;
    color: white;
}

.action-btn.btn-danger:hover {
    background-color: #c82333;
    color: white;
}

.action-btn.btn-primary {
    background-color: #007bff;
    color: white;
}

.action-btn.btn-primary:hover {
    background-color: #0056b3;
    color: white;
}

/* No enrollments message styling */
.action-buttons .text-muted.small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 8px;
    border-radius: 4px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #6c757d;
    font-size: 12px;
    white-space: nowrap;
}

.action-buttons .text-muted.small:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

/* Responsive action buttons */
@media (max-width: 768px) {
    .action-buttons {
        gap: 3px;
    }
    
    .action-btn {
        width: 28px;
        height: 28px;
    }
    
    .action-btn i {
        font-size: 12px;
    }
    
    .action-buttons .text-muted.small {
        height: 28px;
        font-size: 11px;
        padding: 0 6px;
    }
}

/* ===== STUDENT DETAILS TABLE STYLES ===== */
.student-details-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.student-details-table th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #495057;
    font-weight: 600;
    padding: 15px 20px;
    border-bottom: 2px solid #dee2e6;
    width: 30%;
    vertical-align: middle;
}

.student-details-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

.student-details-table tr:last-child td,
.student-details-table tr:last-child th {
    border-bottom: none;
}

.student-details-table h3 {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 10px;
}

.student-details-table h4 {
    color: #6c757d;
    font-weight: 400;
    margin-bottom: 20px;
}

.student-details-table .badge {
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 20px;
}

.student-details-table a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.student-details-table a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.student-details-table img {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.student-details-table img:hover {
    transform: scale(1.05);
}

.student-details-table .text-muted {
    color: #6c757d !important;
    font-style: italic;
}

/* Responsive student details table */
@media (max-width: 768px) {
    .student-details-table th,
    .student-details-table td {
        padding: 12px 15px;
    }
    
    .student-details-table th {
        width: 35%;
        font-size: 0.9rem;
    }
    
    .student-details-table h3 {
        font-size: 1.5rem;
    }
    
    .student-details-table h4 {
        font-size: 1.1rem;
    }
}

/* ===== FILTER SECTION STYLES ===== */
#filterForm .form-group {
    margin-bottom: 15px;
}

#filterForm .form-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

#filterForm .form-control {
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

#filterForm .form-control:focus {
    border-color: #42bfbb;
    box-shadow: 0 0 0 0.2rem rgb(59 203 218 / 25%);
}

#filterForm .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
}

#filterForm .btn-primary {
    background-color: #3bafda;
    border-color: #3bafda;
}

#filterForm .btn-primary:hover {
    background-color: #2a9fd0;
    border-color: #2a9fd0;
}

#filterForm .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

#filterForm .btn-secondary:hover {
    background-color: #5a6268;
    border-color: #5a6268;
}

#filterForm .btn i {
    margin-right: 5px;
}

/* Filter section card styling */
.card .card-title {
    color: #495057;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

/* Loading spinner styles */
.fa-spinner {
    animation: spin 1s linear infinite;
}

/* Responsive filter section */
@media (max-width: 768px) {
    #filterForm {
        padding: 15px;
    }
    
    #filterForm .col-md-4,
    #filterForm .col-md-3,
    #filterForm .col-md-2 {
        margin-bottom: 15px;
    }
    
    #filterForm .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    #filterForm .d-flex {
        flex-direction: column;
    }
    
    #filterForm .d-flex .btn {
        margin-right: 0 !important;
    }
}

/* ===== BULK DELETE STYLES ===== */
.student-checkbox {
    cursor: pointer;
    transform: scale(1.2);
}

.student-checkbox:checked {
    background-color: #dc3545;
    border-color: #dc3545;
}

#select_all {
    cursor: pointer;
    transform: scale(1.2);
}

#select_all:checked {
    background-color: #dc3545;
    border-color: #dc3545;
}

#bulk_delete_btn {
    transition: all 0.3s ease;
}

#bulk_delete_btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

#bulk_delete_btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Checkbox column styling */
#datatable-buttons th:first-child,
#datatable-buttons td:first-child {
    text-align: center;
    vertical-align: middle;
    width: 40px;
    min-width: 40px;
}

/* Indeterminate state for select all checkbox */
#select_all:indeterminate {
    background-color: #ffc107;
    border-color: #ffc107;
}

/* ===== SELECT2 STYLES ===== */
/* Custom Select2 styling to match Bootstrap 4 form controls */

/* Single selection dropdown styling (for tutor field) */
.select2-container--bootstrap4 .select2-selection--single {
    height: 38px;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    background-color: #fff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    cursor: pointer;
}

.select2-container--bootstrap4 .select2-selection--single:hover {
    border-color: #adb5bd;
}

.select2-container--bootstrap4.select2-container--focus .select2-selection--single {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.select2-container--bootstrap4.select2-container--open .select2-selection--single {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered {
    padding: 0.375rem 0.75rem;
    line-height: 1.5;
    color: #495057;
    font-size: 1rem;
}

.select2-container--bootstrap4 .select2-selection--single .select2-selection__placeholder {
    color: #6c757d;
    font-size: 1rem;
}

/* Disabled state styling */
.select2-container--bootstrap4.select2-container--disabled .select2-selection--single {
    background-color: #e9ecef;
    cursor: not-allowed;
    opacity: 0.65;
}

.select2-container--bootstrap4.select2-container--disabled .select2-selection--single .select2-selection__rendered {
    color: #6c757d;
}

/* Match form-control spacing */
.select2-container--bootstrap4 + .invalid-feedback,
.select2-container--bootstrap4 + .valid-feedback {
    display: block;
    margin-top: 0.25rem;
}

.select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow {
    height: 36px;
    width: 20px;
    position: absolute;
    right: 8px;
    top: 1px;
}

.select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b {
    border-color: #6c757d transparent transparent transparent;
    border-style: solid;
    border-width: 4px 4px 0 4px;
    height: 0;
    left: 50%;
    margin-left: -4px;
    margin-top: -2px;
    position: absolute;
    top: 50%;
    width: 0;
    transition: transform 0.15s ease-in-out;
}

/* Search field styling for single selection */
.select2-container--bootstrap4 .select2-search--dropdown .select2-search__field {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    color: #495057;
    background-color: #fff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.select2-container--bootstrap4 .select2-search--dropdown .select2-search__field:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

.select2-container--bootstrap4 .select2-search__field::placeholder {
    color: #6c757d;
    opacity: 0.7;
}

.select2-container--bootstrap4.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #6c757d transparent;
    border-width: 0 4px 5px 4px;
    margin-top: -3px;
}

/* Multiple selection dropdown styling */
.select2-container--bootstrap4 .select2-selection--multiple {
    min-height: 38px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    background-color: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    padding: 0.26rem 0.75rem;
    cursor: text;
}

.select2-container--bootstrap4 .select2-selection--multiple:hover {
    border-color: #ced4da;
}

.select2-container--bootstrap4.select2-container--focus .select2-selection--multiple {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.select2-container--bootstrap4.select2-container--open .select2-selection--multiple {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice {
    background: linear-gradient(135deg, #2fafa9 0%, #249da7 100%);
    border: 0;
    color: #fff;
    border-radius: 4px;
    padding: 4px 8px;
    margin: 0 5px 0 0;
    font-size: 0.8rem;
    display: inline-block;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice:hover {
    background: linear-gradient(135deg, #35a9b1 0%, #2f878d 100%);
    box-shadow: 0 4px 8px rgba(16, 58, 121, 0.4);
}

.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove {
    color: #fff;
    margin-right: 6px;
    font-weight: bold;
    font-size: 1.1em;
    line-height: 1;
    padding: 0 2px;
    border: 0;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__rendered {
    padding: 0;
    line-height: 1.5;
}

.select2-container--bootstrap4 .select2-search--inline .select2-search__field {
    margin: 2px 0;
    padding: 4px 8px;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.875rem;
    color: #495057;
}

.select2-container--bootstrap4 .select2-search--inline .select2-search__field::placeholder {
    color: #6c757d;
    opacity: 0.7;
}

.select2-dropdown--bootstrap4 {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    background-color: #fff;
}

.select2-results__option--bootstrap4 {
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    color: #495057;
    transition: all 0.15s ease-in-out;
}

.select2-results__option--bootstrap4:hover {
    background-color: #f8f9fa;
    color: #495057;
}

.select2-results__option--bootstrap4[aria-selected=true] {
    background-color: #007bff;
    color: #fff;
}

.select2-results__option--bootstrap4[data-selected=true] {
    background-color: #007bff;
    color: #fff;
}

.select2-results__option--bootstrap4[aria-selected=true]:hover,
.select2-results__option--bootstrap4[data-selected=true]:hover {
    background-color: #0056b3;
    color: #fff;
}

/* Select2 container width and positioning */
.select2-container--bootstrap4 {
    width: 100% !important;
    display: block;
}

/* Ensure Select2 dropdowns align properly with form controls */
.select2-container--bootstrap4 .select2-selection--single,
.select2-container--bootstrap4 .select2-selection--multiple {
    display: flex;
    align-items: center;
    height: 38px;
}

/* Fix for Select2 container positioning in form groups */
.form-group .select2-container--bootstrap4 {
    position: relative;
    display: block;
    margin-bottom: 0;
}

/* Placeholder styling */
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__placeholder {
    color: #6c757d;
    font-size: 0.875rem;
    padding: 0.375rem 0;
}

/* Clear button styling */
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear {
    color: #6c757d;
    font-size: 1.2em;
    font-weight: bold;
    margin-right: 8px;
    transition: color 0.2s ease;
}

.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear:hover {
    color: #dc3545;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .select2-container--bootstrap4 .select2-selection--single {
        height: 36px;
        font-size: 0.875rem;
    }
    
    .select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow {
        height: 34px;
        width: 18px;
    }
    
    .select2-container--bootstrap4 .select2-selection--multiple {
        min-height: 36px;
        font-size: 0.875rem;
    }
    
    .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice {
        font-size: 0.8rem;
        padding: 3px 6px;
        margin: 1px 2px 1px 0;
    }
    
    .select2-results__option--bootstrap4 {
        padding: 0.3rem 0.5rem;
        font-size: 0.875rem;
    }
}

.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #fff;
    background-color: rgba(255,255,255,0.2);
}

.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__rendered {
    padding: 0.375rem 0.75rem;
}

.select2-container--bootstrap4 .select2-search--inline .select2-search__field {
    margin-top: 3px;
}

.select2-container--bootstrap4.select2-container--focus .select2-selection--multiple {
    border-color: #35b1a2;
    box-shadow: none;
}

.select2-container--bootstrap4.select2-container--open .select2-selection--multiple {
    border-color: #35b1a2;
    box-shadow: none;
}

.select2-container .select2-search--inline .select2-search__field {
    margin: 0px !important;
}

.select2-dropdown--bootstrap4 {
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.select2-results__option--bootstrap4 {
    padding: 0.375rem 0.75rem;
}

.select2-results__option--bootstrap4[aria-selected=true] {
    background-color: #007bff;
    color: #fff;
}

.select2-results__option--bootstrap4[data-selected=true] {
    background-color: #007bff;
    color: #fff;
}

/* ===== CALENDAR STYLES ===== */
/* Common calendar styling for both edit_course.php and calendar_reservation.php */

/* FullCalendar base styles */
.fc {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.fc-toolbar {
    margin-bottom: 1.5rem;
}

.fc-toolbar-title {
    font-size: 1.5em;
    font-weight: 600;
    color: #2c3e50;
}

.fc-button-primary {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.fc-button-primary:hover {
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.fc-button-primary:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.fc-button-primary:not(:disabled):not(.disabled).active,
.fc-button-primary:not(:disabled):not(.disabled):active {
    background: linear-gradient(135deg, #004085 0%, #002752 100%);
    border-color: #004085;
}

/* Calendar event styles */
.fc-event {
    cursor: pointer;
    border-radius: 6px;
    padding: 3px 6px;
    font-size: 0.85em;
    font-weight: 500;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.fc-event:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

.fc-event-title {
    font-weight: 600;
    line-height: 1.3;
}

.fc-event-time {
    font-size: 0.8em;
    opacity: 0.9;
}

/* Course lesson events - Blue background */
.lesson-event,
.fc-event.lesson-event {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    border-color: #0056b3 !important;
    color: #ffffff !important;
}

.lesson-event:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%) !important;
    border-color: #004085 !important;
}

/* Scheduled lesson events - Green background */
.scheduled-lesson-event,
.fc-event.scheduled-lesson-event {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%) !important;
    border-color: #1e7e34 !important;
    color: #ffffff !important;
}

.scheduled-lesson-event:hover {
    background: linear-gradient(135deg, #1e7e34 0%, #155724 100%) !important;
    border-color: #155724 !important;
}

/* Reservation events - Orange background */
.reservation-event,
.fc-event.reservation-event {
    background: linear-gradient(135deg, #fd7e14 0%, #e55a00 100%) !important;
    border-color: #e55a00 !important;
    color: #ffffff !important;
}

.reservation-event:hover {
    background: linear-gradient(135deg, #e55a00 0%, #cc4a00 100%) !important;
    border-color: #cc4a00 !important;
}

/* Calendar day styles */
.fc-daygrid-day {
    transition: background-color 0.3s ease;
}

.fc-daygrid-day:hover {
    background-color: #f8f9fa;
}

.fc-daygrid-day.fc-day-today {
    background-color: #fff3cd;
}

.fc-daygrid-day-number {
    font-weight: 600;
    color: #495057;
}

/* Calendar view styles */
.fc-dayGridMonth-view .fc-daygrid-day-frame {
    min-height: 100px;
}

.fc-timeGridWeek-view .fc-timegrid-slot {
    min-height: 40px;
}

.fc-timeGridDay-view .fc-timegrid-slot {
    min-height: 60px;
}

/* Calendar header styles */
.fc-col-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.fc-col-header-cell {
    padding: 10px 5px;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

/* Calendar grid lines */
.fc td, .fc th {
    border-color: #e9ecef;
}

/* Calendar event count badge */
.fc-daygrid-more-link {
    color: #007bff;
    font-weight: 500;
    text-decoration: none;
}

/* Remove any dots or indicators from calendar events */
.fc-event::before,
.fc-event::after,
.fc-event .fc-event-time::before,
.fc-event .fc-event-time::after {
    content: none !important;
}

/* Ensure no dots appear in event titles */
.fc-event-title::before,
.fc-event-title::after {
    content: none !important;
}

/* Remove any list-style dots or bullets from calendar events */
.fc-event,
.fc-event *,
.fc-event-time,
.fc-event-title {
    list-style: none !important;
    list-style-type: none !important;
}

/* Remove any pseudo-elements that might be adding dots */
.fc-event *::before,
.fc-event *::after {
    content: none !important;
}

/* Ensure no dots in event content */
.fc-event-main {
    list-style: none !important;
}

/* Remove any default FullCalendar dots */
.fc-daygrid-event-dot {
    display: none !important;
}

.fc-daygrid-more-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Calendar filters styling */
.calendar-filters {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.calendar-filters .card-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-radius: 10px 10px 0 0;
    padding: 15px 20px;
}

.calendar-filters .card-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 16px;
}

.calendar-filters .card-body {
    padding: 20px;
}

.calendar-filters .form-group {
    margin-bottom: 15px;
}

.calendar-filters .form-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    display: block;
}

.calendar-filters .form-control {
    border: 2px solid #e9ecef;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.calendar-filters .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.calendar-filters .btn-group .btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.calendar-filters .btn-group .btn:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Calendar container styling */
#calendar {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    min-height: 650px;
}

/* Responsive calendar adjustments */
@media (max-width: 768px) {
    .fc-toolbar {
        flex-direction: column;
        gap: 10px;
    }
    
    .fc-toolbar-chunk {
        margin-bottom: 10px;
    }
    
    .fc-header-toolbar {
        margin-bottom: 1em;
    }
    
    .fc-event {
        font-size: 0.8em;
        padding: 2px 4px;
    }
    
    .fc-daygrid-day-frame {
        min-height: 80px;
    }
    
    .calendar-filters .card-body {
        padding: 15px;
    }
    
    .calendar-filters .form-group {
        margin-bottom: 10px;
    }
}

/* Calendar event tooltip enhancements */
.fc-event[title]:hover::after {
    content: attr(title);
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
}

/* Calendar loading states */
.fc-loading {
    opacity: 0.6;
    pointer-events: none;
}

.fc-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #007bff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   SELECT2 DROPDOWN STYLING
   ======================================== */

.select2-container--default .select2-selection--single {
    height: calc(2.25rem + 2px) !important;
    padding: 0 .75rem;
    border: 2px solid #e9ecef !important;
    border-radius: 6px !important;
    transition: all 0.2s ease;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 5px !important;
    line-height: 2.25rem !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: inherit !important;
}

/* Force Bootstrap 4 theme to override default theme */
.select2-container--bootstrap4 {
    z-index: 9999 !important;
}

.select2-container--bootstrap4 .select2-selection--single,
.select2-container--bootstrap4 .select2-selection--multiple {
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem !important;
    min-height: calc(2.25rem + 2px) !important;
    background-color: #fff !important;
}

/* Override default theme styles with Bootstrap 4 */
.select2-container--bootstrap4 .select2-selection--single {
    height: calc(1.5em + 0.75rem + 2px) !important;
    padding: 0.375rem 0.75rem !important;
    font-size: 1rem !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    background-color: #fff !important; /* White background to match Bootstrap 4 */
    border: 1px solid #ced4da !important; /* Bootstrap 4 border color */
    border-radius: 0.375rem !important; /* Bootstrap 4 border radius */
    transition: all 0.2s ease !important;
}

/* Force Bootstrap 4 theme for multiple selection */
.select2-container--bootstrap4 .select2-selection--multiple {
    min-height: calc(1.5em + 0.75rem + 2px) !important;
    padding: 0.375rem 0.75rem !important;
    background-color: #fff !important;
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem !important;
}

/* Ensure dropdown uses Bootstrap 4 theme */
.select2-dropdown--bootstrap4 {
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem !important;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* Force results options to use Bootstrap 4 theme */
.select2-results__option--bootstrap4 {
    padding: 0.375rem 0.75rem !important;
    color: #495057 !important;
}

.select2-results__option--bootstrap4[aria-selected=true] {
    background-color: #e9ecef !important;
    color: #495057 !important;
}

.select2-results__option--bootstrap4[aria-selected=true]:hover {
    background-color: #dee2e6 !important;
}

/* ========================================
   Select2 Multiple Selection Fixes
   ======================================== */

/* Fix Select2 multiple selection overflow and remove additional clear button */
.select2-container--bootstrap4 .select2-selection--multiple,
.form-group .select2-container--bootstrap4 .select2-selection--multiple {
    min-height: calc(1.5em + 0.75rem + 2px) !important;
    padding: 0.375rem 0.75rem !important;
    background-color: #fff !important;
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    /* Force natural expansion */
    box-sizing: border-box !important;
    display: block !important;
    position: relative !important;
}

/* Override any height constraints from other CSS */
.select2-container--bootstrap4 .select2-selection--multiple[style*="height"],
.form-group .select2-container--bootstrap4 .select2-selection--multiple[style*="height"] {
    height: auto !important;
    max-height: none !important;
}

/* Hide the additional clear button */
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear,
.form-group .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear {
    display: none !important;
}

/* Style the individual choice tags */
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice,
.form-group .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice {
    background-color: #35b1a2 !important;
    border: 1px solid #35b1a2 !important;
    color: #fff !important;
    padding: 0.25rem 0.5rem !important;
    margin: 0.125rem !important;
    border-radius: 0.25rem !important;
    font-size: 0.875rem !important;
    line-height: 1.2 !important;
    word-wrap: break-word !important;
    white-space: nowrap !important;
    display: inline-block !important;
}

/* Style the remove button for each choice */
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove,
.form-group .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove {
    color: #fff !important;
    margin-right: 0.25rem !important;
    font-weight: bold !important;
}

.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove:hover,
.form-group .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.2) !important;
    border-radius: 50% !important;
}

/* Ensure proper spacing and layout */
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__rendered,
.form-group .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__rendered {
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    min-height: auto !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

/* Search field styling */
.select2-container--bootstrap4 .select2-search--inline .select2-search__field,
.form-group .select2-container--bootstrap4 .select2-search--inline .select2-search__field {
    min-width: 120px !important;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 0.875rem !important;
}

/* Placeholder styling */
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__placeholder,
.form-group .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__placeholder {
    color: #6c757d !important;
    font-style: italic !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Additional overrides to ensure natural height expansion */
.select2-container--bootstrap4 .select2-selection,
.form-group .select2-container--bootstrap4 .select2-selection {
    height: auto !important;
    max-height: none !important;
    min-height: calc(1.5em + 0.75rem + 2px) !important;
}

/* Override any inline styles that might set height */
.select2-container--bootstrap4 .select2-selection--multiple[style],
.form-group .select2-container--bootstrap4 .select2-selection--multiple[style] {
    height: auto !important;
    max-height: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice,
    .form-group .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice {
        font-size: 0.8rem !important;
    }
}

/* Select2 Selection - Text styling */
.select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered {
    padding-left: 0;
    color: #495057 !important; /* Dark gray text */
    font-weight: 500;
}

/* Select2 Placeholder - Light gray placeholder text */
.select2-container--bootstrap4 .select2-selection--single .select2-selection__placeholder {
    color: #6c757d !important; /* Light gray placeholder */
    font-style: italic;
}

/* Select2 Arrow Icon - Dark gray chevron */
.select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow {
    height: 100%;
    top: 0;
    right: 0.75rem;
}

.select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b {
    border-color: #6c757d transparent transparent transparent !important; /* Dark gray arrow */
    border-width: 5px 4px 0 4px;
    margin-left: -4px;
    margin-top: -2px;
}

/* Select2 Dropdown - Enhanced dropdown styling */
.select2-container--bootstrap4 .select2-dropdown {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    margin-top: 2px;
}

/* Select2 Search Field - Styled search input */
.select2-container--bootstrap4 .select2-search--dropdown .select2-search__field {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    color: #495057;
}

.select2-container--bootstrap4 .select2-search--dropdown .select2-search__field:focus {
    background-color: #ffffff;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

/* Select2 Results - Option styling */
.select2-container--bootstrap4 .select2-results__option {
    padding: 0.5rem 0.75rem;
    color: #495057;
    transition: background-color 0.15s ease;
}

.select2-container--bootstrap4 .select2-results__option:hover {
    background-color: #f8f9fa;
    color: #495057;
}

/* Select2 Highlighted Option - Blue highlight for selected */
.select2-container--bootstrap4 .select2-results__option--highlighted[aria-selected] {
    background-color: #007bff !important;
    color: #ffffff !important;
}

/* Select2 Selected Option - Gray background for already selected */
.select2-container--bootstrap4 .select2-results__option[aria-selected=true] {
    background-color: #e9ecef;
    color: #495057;
}

/* Select2 Focus State - Blue border when focused */
.select2-container--bootstrap4.select2-container--focus .select2-selection--single {
    border-color: #007bff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Select2 Hover State - Slightly darker background on hover */
.select2-container--bootstrap4 .select2-selection--single:hover {
    background-color: #e9ecef !important;
    border-color: #ced4da !important;
}

/* Select2 Disabled State */
.select2-container--bootstrap4.select2-container--disabled .select2-selection--single {
    background-color: #e9ecef !important;
    color: #ffffff !important;
    cursor: not-allowed;
}

/* Select2 Loading State */
.select2-container--bootstrap4.select2-container--loading .select2-selection--single {
    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='m1 1 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
}

/* Select2 Responsive Design */
@media (max-width: 768px) {
    .select2-container--bootstrap4 {
        width: 100% !important;
    }
    
    .select2-container--bootstrap4 .select2-selection--single {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Table Action Button */
.table .btn-group .btn {
    box-shadow: none;
    min-width: 36px;
    padding: 8px 16px;
}

.table .btn-group.show .btn {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    opacity: 0.9;
}

.table .dropdown-menu {
    top: 0 !important;
    left: 100% !important;
    transform: none !important;
    margin: 0;
    padding: 0;
    font-size: 14px;
    border: 1px solid #33374B;
    border-radius: 0 6px 6px 0;
    opacity: 0;
    transition: opacity 0.5s;
}

.table .dropdown-menu.show {
    display: flex !important;
    opacity: 1;
}

.table .dropdown-item {
    padding: 8px 16px;
}

.table .dropdown-item:hover, .table .dropdown-item:focus {
    border: 0;
    background-color: #e7eaf1;
}

.table .dropdown-item:last-child:hover {
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}

.table .dropdown-toggle::after {
    transform: rotate(-90deg);
    transition: all 0.3s ease;
}
.table .btn-group.show .dropdown-toggle::after {
    transform: rotate(90deg);
}

.table .btn-secondary:not(:disabled):not(.disabled).active:focus, .table .btn-secondary:not(:disabled):not(.disabled):active:focus, .table .show>.btn-secondary.dropdown-toggle:focus {
    box-shadow: none !important;
}

/* Text Style */
.text-primary {
    color: #35b1a2 !important;
}

/* ===== HERO SECTION STYLES ===== */
.hero-section {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    padding: 100px 0 80px 0;
}

.hero-section .badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}
