/* Islamic-themed Dashboard Styling */
.content-wrapper {
    background: #f8f9fa;
    min-height: calc(100vh - 100px);
    padding: 30px;
}

/* Adjust content wrapper when sidebar is collapsed */
@media (min-width: 768px) {
    .sidebar-collapse .content-wrapper {
        margin-right: 0;
        padding: 30px;
    }
}

.content-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    color: white;
    padding: 40px 0;
    margin-bottom: 40px;
    border-radius: 0 0 30px 30px;
    /* box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); */
}

.content-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.content-header h1::before {
    content: '🕌';
    font-size: 2rem;
    margin-left: 15px;
}

/* Modern News Ticker */
.modern-news-ticker {
    background: linear-gradient(45deg, #1e3a8a 0%, #3b82f6 50%, #60a5fa 100%);
    color: #ffffff;
    padding: 20px 30px;
    border-radius: 15px;
    margin: 20px 0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.modern-news-ticker::before {
    content: '📢';
    font-size: 1.5rem;
    margin-left: 10px;
}

.news-content {
    display: inline-block;
    white-space: nowrap;
    animation: scroll-left 30s linear infinite;
}

.news-content a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.news-content a:hover {
    color: #ffd700;
    text-decoration: underline;
}

@keyframes scroll-left {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Statistics Cards */
.stats-section {
    margin: 30px 0 20px 0;
}

.stats-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    text-align: center;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.15);
}

.stats-card h3 {
    color: #1e3a8a;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.stats-card h3::before {
    content: '📊';
    margin-right: 10px;
}

/* Modern Small Boxes - Full Card Clickable */
.modern-small-box {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    color: #1e293b;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    border: 2px solid #cbd5e1;
    cursor: pointer;
    text-decoration: none;
    display: block;
    position: relative;
    overflow: hidden;
}

.modern-small-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    border-color: #3b82f6;
    text-decoration: none;
    color: #1e293b;
}

.modern-small-box .inner {
    padding: 30px;
    position: relative;
    z-index: 2;
    text-align: center;
}

.modern-small-box .inner p {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.modern-small-box .icon {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 2.5rem;
    opacity: 0.7;
    z-index: 1;
}

/* Remove the footer - entire card is now clickable */
.modern-small-box .small-box-footer {
    display: none;
}

.modern-small-box .small-box-footer:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    text-decoration: none;
}

.modern-small-box .small-box-footer i {
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.modern-small-box .small-box-footer:hover i {
    transform: translateX(-5px);
}

/* Islamic-themed icons for different sections */
.modern-small-box.supervisor .icon::before {
    content: '👨‍🏫';
}

.modern-small-box.teacher .icon::before {
    content: '🎓';
}

.modern-small-box.student .icon::before {
    content: '📚';
}

.modern-small-box.program .icon::before {
    content: '📋';
}

.modern-small-box.circle .icon::before {
    content: '⭕';
}

.modern-small-box.mosque .icon::before {
    content: '🕌';
}

.modern-small-box.stage .icon::before {
    content: '🏛️';
}

.modern-small-box.classroom .icon::before {
    content: '🏫';
}

.modern-small-box.test .icon::before {
    content: '📝';
}

.modern-small-box.report .icon::before {
    content: '📊';
}

.modern-small-box.news .icon::before {
    content: '📰';
}

.modern-small-box.settings .icon::before {
    content: '⚙️';
}

.modern-small-box.job .icon::before {
    content: '💼';
}

.modern-small-box.supervision .icon::before {
    content: '👁️';
}

.modern-small-box.country .icon::before {
    content: '🌍';
}

.modern-small-box.city .icon::before {
    content: '🏙️';
}

.modern-small-box.area .icon::before {
    content: '🏘️';
}

.modern-small-box.region .icon::before {
    content: '🗺️';
}

.modern-small-box.program .icon::before {
    content: '🏫';
}

.modern-small-box.admin .icon::before {
    content: '👑';
}

.modern-small-box.banner .icon::before {
    content: '📢';
}

.modern-small-box.logout .icon::before {
    content: '🚪';
}

/* No Data Message */
.no-data-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: #1e293b;
    text-align: center;
    padding: 60px 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    margin: 40px 0;
    border: 2px solid #cbd5e1;
}

.no-data-card h3 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.no-data-card p {
    font-size: 1.3rem;
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-header h1 {
        font-size: 2rem;
    }

    .modern-small-box .inner p {
        font-size: 1.1rem;
    }

    .stats-card {
        padding: 20px;
    }

    .modern-news-ticker {
        padding: 12px 20px;
    }
}

/* Header and Footer Styles */
.main-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%) !important;
    border-bottom: 3px solid #3b82f6;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.main-header .logo {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%) !important;
    border-right: 1px solid #3b82f6;
    color: #ffffff !important;
}

.main-header .logo h2 {
    color: #ffffff !important;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    margin: 0;
    font-size: 1.5rem;
}

.navbar {
    background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%) !important;
    border: none !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.navbar .nav > li > a {
    color: #e2e8f0 !important;
    transition: all 0.3s ease;
}

.navbar .nav > li > a:hover,
.navbar .nav > li > a:focus {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #ffffff !important;
}

.navbar .dropdown-menu {
    background: #1e293b;
    border: 1px solid #3b82f6;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.navbar .dropdown-menu > li > a {
    color: #e2e8f0 !important;
    padding: 10px 15px;
}

.navbar .dropdown-menu > li > a:hover {
    background: #3b82f6 !important;
    color: #ffffff !important;
}

.user-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #ffffff;
    padding: 15px;
    border-bottom: 1px solid #3b82f6;
}



.user-footer {
    background: #0f172a;
    border-top: 1px solid #3b82f6;
    padding: 10px;
}

.user-footer .btn {
    background: #3b82f6 !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
    transition: all 0.3s ease;
}

.user-footer .btn:hover {
    background: #2563eb !important;
    border-color: #2563eb !important;
}

.main-footer {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%) !important;
    border-top: 3px solid #3b82f6;
    color: #e2e8f0 !important;
    padding: 15px;
    text-align: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.main-footer strong {
    color: #e2e8f0 !important;
    font-weight: 600;
}

/* Modern Sidebar Styles */
.modern-sidebar {
    background: linear-gradient(180deg, #1e293b 0%, #334155 100%) !important;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    border-right: 3px solid #3b82f6;
}

/* Sidebar collapse adjustments */
@media (min-width: 768px) {
    .sidebar-collapse .modern-sidebar {
        width: 70px;
    }
    
    .sidebar-collapse .modern-user-panel {
        padding: 15px 10px;
        text-align: center;
    }
    
    .sidebar-collapse .modern-user-panel .user-info h4,
    .sidebar-collapse .modern-user-panel .user-info p {
        display: none;
    }
    
    .sidebar-collapse .menu-item .menu-link span {
        display: none;
    }
    
    .sidebar-collapse .menu-item .menu-icon {
        margin-right: 0;
        text-align: center;
        width: 100%;
    }
}

.modern-user-panel {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 20px 15px;
    border-bottom: 2px solid #3b82f6;
    text-align: center;
    position: relative;
}

.modern-user-panel .user-avatar {
    position: relative;
    display: inline-block;
    margin-bottom: 10px;
}

.modern-user-panel .user-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #3b82f6;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modern-user-panel .user-status {
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #10b981;
    border: 2px solid #1e293b;
}

.modern-user-panel .user-info h4 {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 5px 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.modern-user-panel .user-role {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 400;
}

.modern-sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-category {
    margin: 20px 0 10px 0;
}

.menu-category .category-header {
    padding: 8px 16px;
    color: #f1f5f9;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #475569;
    position: relative;
}

.menu-category .category-header i {
    margin-left: 8px;
    color: #3b82f6;
    font-size: 10px;
}

.menu-item {
    position: relative;
}

.menu-item .menu-link {
    display: flex;
    align-items: center;
    padding: 8px;
    color: #e2e8f0 !important;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 2px 10px;
    position: relative;
}

.menu-item .menu-link:hover {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #ffffff !important;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.menu-item.active .menu-link {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.menu-item.submenu {
    margin-left: 20px;
}

.menu-item.submenu .menu-link {
    padding: 8px;
    font-size: 12px;
}

/* Has submenu styles */
.menu-item.has-submenu .submenu {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-item.has-submenu.active .submenu {
    display: block;
}

.menu-item.has-submenu .menu-link::after {
    content: '▼';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    transition: transform 0.3s ease;
}

.menu-item.has-submenu.active .menu-link::after {
    transform: translateY(-50%) rotate(180deg);
}

.menu-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    position: relative;
    overflow: hidden;
}

.menu-icon i {
    color: #ffffff;
    font-size: 16px;
    z-index: 2;
}

.menu-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-radius: 10px;
}

/* Colorful Icon Backgrounds */
.menu-icon.dashboard { background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); }
.menu-icon.supervisor { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.menu-icon.teacher { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.menu-icon.student { background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%); }
.menu-icon.uncertified { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }
.menu-icon.program { background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%); }
.menu-icon.subprogram { background: linear-gradient(135deg, #67e8f9 0%, #22d3ee 100%); }
.menu-icon.circle { background: linear-gradient(135deg, #84cc16 0%, #65a30d 100%); }
.menu-icon.subcircle { background: linear-gradient(135deg, #bef264 0%, #a3e635 100%); }
.menu-icon.program-type { background: linear-gradient(135deg, #f97316 0%, #ea580c 100%); }
.menu-icon.stage { background: linear-gradient(135deg, #ec4899 0%, #db2777 100%); }
.menu-icon.classroom { background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%); }
.menu-icon.program-school { background: linear-gradient(135deg, #14b8a6 0%, #0f766e 100%); }
.menu-icon.timeline { background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%); }
.menu-icon.la7n { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.menu-icon.mosque { background: linear-gradient(135deg, #059669 0%, #047857 100%); }
.menu-icon.country { background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); }
.menu-icon.region { background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%); }
.menu-icon.city { background: linear-gradient(135deg, #c2410c 0%, #9a3412 100%); }
.menu-icon.location { background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); }
.menu-icon.vacation { background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%); }
.menu-icon.exp-vacation { background: linear-gradient(135deg, #c2410c 0%, #9a3412 100%); }
.menu-icon.procedure { background: linear-gradient(135deg, #7c2d12 0%, #9a3412 100%); }
.menu-icon.statistics { background: linear-gradient(135deg, #365314 0%, #4d7c0f 100%); }
.menu-icon.results { background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%); }
.menu-icon.news { background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%); }
.menu-icon.questionnaire { background: linear-gradient(135deg, #be185d 0%, #9d174d 100%); }
.menu-icon.notes { background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%); }
.menu-icon.cure { background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); }
.menu-icon.category { background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%); }
.menu-icon.quran { background: linear-gradient(135deg, #166534 0%, #14532d 100%); }
.menu-icon.sms { background: linear-gradient(135deg, #0f766e 0%, #115e59 100%); }
.menu-icon.sms-library { background: linear-gradient(135deg, #92400e 0%, #78350f 100%); }
.menu-icon.sender { background: linear-gradient(135deg, #5b21b6 0%, #4c1d95 100%); }
.menu-icon.contact { background: linear-gradient(135deg, #7c2d12 0%, #9a3412 100%); }
.menu-icon.test { background: linear-gradient(135deg, #365314 0%, #4d7c0f 100%); }
.menu-icon.settings { background: linear-gradient(135deg, #374151 0%, #1f2937 100%); }
.menu-icon.report { background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%); }
.menu-icon.job { background: linear-gradient(135deg, #92400e 0%, #78350f 100%); }
.menu-icon.supervision { background: linear-gradient(135deg, #be185d 0%, #9d174d 100%); }
.menu-icon.admin { background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); }
.menu-icon.logout { background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%); }

.menu-link span {
    margin-right: 8px;
    font-weight: 400;
    font-size: 12px;
}

/* Collapsible Categories */
.menu-category.collapsible {
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-category.collapsible:hover {
    background: rgba(59, 130, 246, 0.1);
}

.menu-category.collapsible .category-header {
    position: relative;
}

.menu-category.collapsible .category-header::after {
    content: '▼';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #60a5fa;
    font-size: 8px;
    transition: transform 0.3s ease;
}

.menu-category.collapsible.collapsed .category-header::after {
    transform: translateY(-50%) rotate(-90deg);
}

.category-container {
    overflow: hidden;
    transition: all 0.3s ease;
}

.menu-category.collapsible.collapsed + .category-container {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
}

.menu-category.collapsible + .category-container {
    max-height: 2000px; /* Large enough to contain all menu items */
    opacity: 1;
}

/* Expandable Menu Items */
.menu-item.expandable .submenu {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 8px;
    margin: 5px 20px;
    overflow: hidden;
}

.menu-item.expandable.active .submenu {
    display: block;
}

.menu-item.expandable .submenu-link {
    display: block;
    padding: 10px 20px;
    color: #cbd5e1 !important;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(71, 85, 105, 0.3);
}

.menu-item.expandable .submenu-link:hover {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #ffffff !important;
    padding-left: 25px;
}

.menu-item.expandable .submenu-link i {
    margin-left: 8px;
    width: 16px;
}

.menu-toggle .toggle-icon {
    margin-right: 10px;
    transition: transform 0.3s ease;
}

.menu-item.expandable.active .toggle-icon {
    transform: rotate(180deg);
}

/* Logout Item Special Styling */
.logout-item .menu-link {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    margin-top: 20px;
}

.logout-item .menu-link:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%) !important;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

/* Responsive Sidebar */
@media (max-width: 768px) {
    .modern-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .modern-sidebar.open {
        transform: translateX(0);
    }

    .menu-item .menu-link {
        padding: 15px 20px;
    }

    .menu-icon {
        width: 35px;
        height: 35px;
    }

    .menu-icon i {
        font-size: 14px;
    }
}

/* DataTables Search and Filter - Latest Version */
.dataTables_filter {
    margin-bottom: 20px;
    text-align: left;
}

.dataTables_filter input {
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #ffffff;
    min-width: 250px;
}

.dataTables_filter input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dataTables_length {
    margin-bottom: 20px;
    text-align: right;
}

.dataTables_length select {
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    background: #ffffff;
    transition: all 0.3s ease;
}

.dataTables_length select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Override AdminLTE table styles for DataTables */
.dataTables_wrapper {
    width: 100% !important;
}

.dataTables_wrapper .dataTable {
    width: 100% !important;
    table-layout: auto !important;
}

.dataTables_wrapper .dataTable thead th {
    position: relative !important;
    text-align: right !important;
}

.dataTables_wrapper .dataTable tbody td {
    text-align: right !important;
}

.dataTable thead .sorting,
.dataTable thead .sorting_asc,
.dataTable thead .sorting_desc {
    cursor: pointer;
    position: relative;
}

.dataTable tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
}

.dataTables_wrapper .dataTable tbody tr:nth-child(even) {
    background: #f1f5f9 !important;
}

.dataTables_wrapper .dataTable tbody tr:hover {
    background: #f0f9ff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.dataTables_wrapper .dataTable tbody tr.selected {
    background: #dbeafe !important;
    border-left: 4px solid #3b82f6 !important;
}

/* Override AdminLTE table body styles */
.dataTables_wrapper .dataTable tbody td {
    padding: 12px 20px !important;
    color: #111827 !important;
    font-size: 14px !important;
    border: none !important;
    vertical-align: middle !important;
    border-bottom: 1px solid #f3f4f6 !important;
}

.dataTables_wrapper .dataTable tbody td a {
    color: #3b82f6 !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.dataTables_wrapper .dataTable tbody td a:hover {
    color: #1d4ed8 !important;
}

.dataTable tbody td .fa {
    margin: 0 5px;
    transition: transform 0.2s ease;
}

.dataTable tbody td .fa:hover {
    transform: scale(1.1);
}

/* DataTables Pagination - Latest Version */
.dataTables_wrapper .dataTables_paginate {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    background: white;
    border: 2px solid #e5e7eb;
    color: #6b7280;
    padding: 8px 12px;
    margin: 0 2px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: inline-block;
    text-decoration: none;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
    transform: translateY(-1px);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #1e3a8a !important;
    border-color: #1e3a8a;
    color: white;
    font-weight: 600;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    background: #f9fafb;
    border-color: #f3f4f6;
    color: #d1d5db;
    cursor: not-allowed;
    opacity: 0.6;
}

/* DataTables Info */
.dataTables_wrapper .dataTables_info {
    color: #6b7280;
    font-size: 14px;
    padding: 15px 20px;
}

/* DataTables Processing - Latest Version */
.dataTables_wrapper .dataTables_processing {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: #3b82f6;
    font-weight: 500;
    padding: 20px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    border: 2px solid #e5e7eb;
}

/* Responsive DataTables - Latest Version */
@media (max-width: 768px) {
    .dataTables_wrapper,
    .modern-datatable {
        border-radius: 10px;
        margin: 10px;
        padding: 15px;
    }

    .dataTables_wrapper .dataTable thead th,
    .dataTables_wrapper .dataTable tbody td {
        padding: 8px 12px;
        font-size: 12px;
    }

    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_info {
        padding: 10px 0;
        text-align: center;
    }

    .dataTables_wrapper .dataTables_paginate .paginate_button {
        padding: 6px 10px;
        margin: 2px;
        font-size: 12px;
    }

    .dataTables_wrapper .dataTables_length select,
    .dataTables_wrapper .dataTables_filter input {
        font-size: 12px;
        padding: 4px 8px;
    }
}

/* DataTables Empty State - Latest Version */
.dataTables_empty {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
    font-style: italic;
    background: #f9fafb;
    border-radius: 8px;
    margin: 20px 0;
}

.dataTables_empty::before {
    content: '📋';
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Fix for invisible labels - ensure dark text on light backgrounds */
label, .form-label, .control-label {
    color: #374151 !important;
}

/* .form-control, input, textarea, select {
    color: #374151 !important;
    background-color: #ffffff !important;
} */

.table td, .table th {
    color: #374151 !important;
}

.box-title, .box-header h3 {
    color: #374151 !important;
}

/* Additional fix for all div text visibility */
div {
    color: #374151 !important;
}

/* Ensure all text elements have proper contrast */
p, span, div, h1, h2, h3, h4, h5, h6 {
    color: #374151 !important;
}

/* Exception for sidebar - keep text white */
.main-sidebar, .main-sidebar * {
    color: #ffffff !important;
}

.sidebar, .sidebar * {
    color: #ffffff !important;
}

.modern-sidebar-menu, .modern-sidebar-menu * {
    color: #ffffff !important;
}

.menu-link, .menu-link * {
    color: #ffffff !important;
}

.category-header, .category-header * {
    color: #ffffff !important;
}

.user-info, .user-info * {
    color: #ffffff !important;
}

.user-menu span, .user-menu span * {
    color: #ffffff !important;
}

.user-header p {
    color: #ffffff !important;
}

/* Modern Colorful Table Action Icons */
.table .fa-edit,
.table .fa-pencil {
    color: #3498db !important;
    transition: all 0.3s ease;
    font-size: 16px;
    padding: 5px;
    border-radius: 4px;
    background: rgba(52, 152, 219, 0.1);
}

.table .fa-edit:hover,
.table .fa-pencil:hover {
    color: #ffffff !important;
    background: #3498db !important;
    transform: scale(1.1);
}

.table .fa-remove,
.table .fa-trash,
.table .fa-times {
    color: #e74c3c !important;
    transition: all 0.3s ease;
    font-size: 16px;
    padding: 5px;
    border-radius: 4px;
    background: rgba(231, 76, 60, 0.1);
}

.table .fa-remove:hover,
.table .fa-trash:hover,
.table .fa-times:hover {
    color: #ffffff !important;
    background: #e74c3c !important;
    transform: scale(1.1);
}

.table .fa-eye,
.table .fa-search {
    color: #27ae60 !important;
    transition: all 0.3s ease;
    font-size: 16px;
    padding: 5px;
    border-radius: 4px;
    background: rgba(39, 174, 96, 0.1);
}

.table .fa-eye:hover,
.table .fa-search:hover {
    color: #ffffff !important;
    background: #27ae60 !important;
    transform: scale(1.1);
}

.table .fa-plus,
.table .fa-plus-circle {
    color: #9b59b6 !important;
    transition: all 0.3s ease;
    font-size: 16px;
    padding: 5px;
    border-radius: 4px;
    background: rgba(155, 89, 182, 0.1);
}

.table .fa-plus:hover,
.table .fa-plus-circle:hover {
    color: #ffffff !important;
    background: #9b59b6 !important;
    transform: scale(1.1);
}

.table .fa-check,
.table .fa-check-circle {
    color: #2ecc71 !important;
    transition: all 0.3s ease;
    font-size: 16px;
    padding: 5px;
    border-radius: 4px;
    background: rgba(46, 204, 113, 0.1);
}

.table .fa-check:hover,
.table .fa-check-circle:hover {
    color: #ffffff !important;
    background: #2ecc71 !important;
    transform: scale(1.1);
}

.table .fa-download,
.table .fa-file-download {
    color: #f39c12 !important;
    transition: all 0.3s ease;
    font-size: 16px;
    padding: 5px;
    border-radius: 4px;
    background: rgba(243, 156, 18, 0.1);
}

.table .fa-download:hover,
.table .fa-file-download:hover {
    color: #ffffff !important;
    background: #f39c12 !important;
    transform: scale(1.1);
}

.table .fa-print {
    color: #95a5a6 !important;
    transition: all 0.3s ease;
    font-size: 16px;
    padding: 5px;
    border-radius: 4px;
    background: rgba(149, 165, 166, 0.1);
}

.table .fa-print:hover {
    color: #ffffff !important;
    background: #95a5a6 !important;
    transform: scale(1.1);
}

.table .fa-users,
.table .fa-user {
    color: #1abc9c !important;
    transition: all 0.3s ease;
    font-size: 16px;
    padding: 5px;
    border-radius: 4px;
    background: rgba(26, 188, 156, 0.1);
}

.table .fa-users:hover,
.table .fa-user:hover {
    color: #ffffff !important;
    background: #1abc9c !important;
    transform: scale(1.1);
}

/* Action buttons spacing */
.table td a {
    margin: 0 3px;
    display: inline-block;
    text-decoration: none;
}

.table td a:hover {
    text-decoration: none;
}

/* Responsive Tables */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: -ms-autohiding-scrollbar;
}

.table-responsive > .table {
    margin-bottom: 0;
}

.table-responsive > .table > thead > tr > th,
.table-responsive > .table > tbody > tr > th,
.table-responsive > .table > tfoot > tr > th,
.table-responsive > .table > thead > tr > td,
.table-responsive > .table > tbody > tr > td,
.table-responsive > .table > tfoot > tr > td {
    white-space: nowrap;
}

/* Enhanced responsive table styles */
.table {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 1rem;
    background-color: transparent;
}

.table th,
.table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    background-color: #f8f9fa !important;
    font-weight: 600 !important;
    color: #495057 !important;
}

.table tbody + tbody {
    border-top: 2px solid #dee2e6;
}

.table .table {
    background-color: #fff;
}

/* Responsive breakpoints */
@media screen and (max-width: 768px) {
    .table-responsive {
        border: 1px solid #dee2e6;
        border-radius: 0.375rem;
    }
    
    .table-responsive .table th,
    .table-responsive .table td {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
    
    /* Stack table rows on very small screens */
    .table-responsive .table {
        font-size: 0.75rem;
    }
    
    .table-responsive .table th,
    .table-responsive .table td {
        padding: 0.25rem;
    }
}

@media screen and (max-width: 576px) {
    .table-responsive {
        font-size: 0.75rem;
    }
    
    .table-responsive .table th,
    .table-responsive .table td {
        padding: 0.25rem 0.125rem;
        min-width: 80px;
    }
    
    /* Hide less important columns on very small screens */
    .table-responsive .table th:nth-child(n+4),
    .table-responsive .table td:nth-child(n+4) {
        display: none;
    }
}

/* Card-like appearance for tables on mobile */
@media screen and (max-width: 768px) {
    .table-responsive {
        box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
        border-radius: 0.375rem;
        margin-bottom: 1rem;
    }
    
    .table-responsive .table {
        border-radius: 0.375rem;
        overflow: hidden;
    }
}

/* Ensure table headers are always visible */
.table-responsive thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #f8f9fa !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Better scrolling experience */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Make all tables in box-body responsive by default */
.box-body .table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: -ms-autohiding-scrollbar;
    border-radius: 0.375rem;
}

.box-body .table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #f8f9fa !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Enhanced mobile table experience */
@media screen and (max-width: 768px) {
    .box-body .table {
        font-size: 0.875rem;
        margin-bottom: 1rem;
        box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    }
    
    .box-body .table th,
    .box-body .table td {
        padding: 0.5rem;
        white-space: nowrap;
        min-width: 80px;
    }
}

@media screen and (max-width: 576px) {
    .box-body .table {
        font-size: 0.75rem;
    }
    
    .box-body .table th,
    .box-body .table td {
        padding: 0.25rem;
        min-width: 70px;
    }
    
    /* Hide action column on very small screens if it exists */
    .box-body .table th:last-child,
    .box-body .table td:last-child {
        position: sticky;
        right: 0;
        background-color: #fff;
        box-shadow: -2px 0 4px rgba(0, 0, 0, 0.1);
    }
}