.shimmer-wrapper {
    width: 0px;
    border-radius: 10px;
    background-color: white;
    overflow: hidden;
    animation: fullView 0.5s forwards cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes fullView {
    100% {
        width: 100%;
    }
}

.shimmer {
    width: 100%;
    height: 100%;
    animation: shimmer 1s infinite linear;
    background: linear-gradient(to right, #eff1f3 4%, #e2e2e2 25%, #eff1f3 36%);
    background-size: 1000px 100%;
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.modal.from-bottom.fade .modal-dialog {
    transform: translate3d(0, 100vh, 0);
}

.modal.from-bottom.fade.show .modal-dialog {
    transform: unset;
}

.modal.from-bottom.in .modal-dialog {
    transform: translate3d(0, 0, 0);
}

.input-style-1 input,
.select-style-1 .select-position select,
.input-style-2 input,
.select-style-2 .select-position select {
    padding: 8px !important;
}

.list-decoration-none {
    list-style-type: none;
}

.input-style-2 .icon {
    padding: 9px !important;
}

.btn-sm {
    padding: 5px 15px;
}

.siswa-list {
    max-height: 400px;
}

.siswa-list>div.siswa-item:hover {
    background-color: grey;
    color: white;
}

.tox-notifications-container {
    display: none;
}

.gridjs-limits {
    background-color: #fff;
    border: 1px solid #d2d6dc;
    border-radius: 5px;
    font-size: 14px;
    line-height: 1.45;
    outline: none;
    padding: 10px 13px;
    margin-top: -4px;
}

button>i {
    pointer-events: none;
}

.select-style-1 {
    margin-bottom: 10px;
}

.input-style-1 {
    margin-bottom: 10px;
}

.input-style-2 {
    margin-bottom: 10px;
}

.rounded-md {
    border-radius: 20px;
}

.header {
    padding: 15px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: none;
    position: relative;
    z-index: 1;
}

/* Modern Header Button Styles */
.header-modern-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    font-weight: 600;
    padding: 8px 16px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.header-modern-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.header-modern-btn:focus {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

/* Redis Status Styles */
.redis-status {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 5px 10px;
    font-size: 11px;
    color: white;
    text-transform: uppercase;
    font-weight: 600;
}

.redis-status.active {
    color: #00ff88;
    border-color: rgba(0, 255, 136, 0.3);
    background: rgba(0, 255, 136, 0.1);
}

.redis-status.inactive {
    color: #ff6b6b;
    border-color: rgba(255, 107, 107, 0.3);
    background: rgba(255, 107, 107, 0.1);
}

/* Profile Box Styles */
.header .profile-box {
    position: relative;
    display: inline-block;
}

.header .profile-box .dropdown-toggle {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 6px 12px;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.header .profile-box .dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.header .profile-box .profile-info .info .image img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
}

.header .verification-badge {
    width: 25px;
    height: 25px;
    margin-left: -30px;
    margin-bottom: -30px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Dropdown Menu Styles */
.header .profile-box .dropdown-menu {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    margin-top: 8px;
}

.header .profile-box .dropdown-menu li a {
    color: #333;
    font-weight: 500;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

.header .profile-box .dropdown-menu li a:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.header .header-right {
    text-align: right;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* Global Modern Styles - Optimized */
body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
}

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

/* Modern Card Styles - Hardware Accelerated */
.card-style {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    transform: translateZ(0);
    will-change: transform;
    overflow: hidden;
}

.card-style:hover {
    transform: translateY(-4px) translateZ(0);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Modern Title Wrapper - Optimized Animation */
.title-wrapper {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #6c757d;
    border-radius: 24px;
    padding: 30px;
    margin: 0 5px 30px 5px;
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
}

.title-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: shimmer 4s ease-in-out infinite;
    will-change: transform;
}

/* Optimized Animation - Reduced Frequency */
@keyframes shimmer {

    0%,
    100% {
        transform: translateX(-100%) translateY(-100%) rotate(0deg) translateZ(0);
    }

    50% {
        transform: translateX(0%) translateY(0%) rotate(180deg) translateZ(0);
    }
}

.title-wrapper h2 {
    margin: 0;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
    color: #fff;
}

.title-wrapper .btn {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border-radius: 12px;
    position: relative;
    z-index: 2;
    transform: translateZ(0);
}

.title-wrapper .btn:hover {
    transform: scale(1.05) translateZ(0);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
}

/* TomSelect dropdown fixes: render above cards and modals */
.ts-dropdown {
    z-index: 2005;
    /* above .card-style and common modals but below toasts */
}

/* Modern Dashboard Banner */
.dashboard-banner-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
    min-height: 320px;
}

.dashboard-banner-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
}

.dashboard-banner-container h2 {
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

.dashboard-banner-container .text-dark {
    color: rgba(255, 255, 255, 0.95) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Modern Shortcut Styles */
.shortcut-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    padding: 20px 10px;
}

.shortcut-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 25px 15px;
    text-align: center;
    color: white !important;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    border: none;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.shortcut-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.shortcut-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    color: white !important;
    text-decoration: none;
}

.shortcut-item:hover::before {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
}

.shortcut-item i {
    font-size: 2.5rem !important;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.shortcut-item:hover i {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.shortcut-item span {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.3;
    position: relative;
    z-index: 1;
}

/* Individual gradient colors for each shortcut */
.shortcut-siswa {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #2d3436 !important;
}

.shortcut-presensi-guru {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #2d3436 !important;
}

.shortcut-perizinan {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #2d3436 !important;
}

.shortcut-jadwal {
    background: linear-gradient(135deg, #96fbc4 0%, #f9f586 100%);
    color: #2d3436 !important;
}

.shortcut-rekap {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #2d3436 !important;
}

.shortcut-presensi-siswa {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #2d3436 !important;
}

.shortcut-bank-soal {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #2d3436 !important;
}

.shortcut-ujian {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #2d3436 !important;
}

.shortcut-asesmen {
    background: linear-gradient(135deg, #fd79a8 0%, #fdcb6e 100%);
    color: #2d3436 !important;
}

.shortcut-pengumuman {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #2d3436 !important;
}

/* Modern Progress Bars - Optimized Performance */
.progress {
    background: rgba(248, 249, 250, 0.8);
    border-radius: 12px;
    height: 16px;
    overflow: hidden;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.progress-bar {
    border-radius: 12px;
    font-weight: 600;
    font-size: 11px;
    line-height: 16px;
    transition: width 0.6s ease-out;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transform: translateZ(0);
}

/* Conditional Animation - Only on Hover */
.progress:hover .progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.3) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0.3) 75%, transparent 75%);
    background-size: 24px 24px;
    animation: progress-animation 1.5s linear infinite;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2), transparent);
    border-radius: 12px 12px 0 0;
    pointer-events: none;
}

@keyframes progress-animation {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 24px 0;
    }
}

/* Progress Bar Colors - Cached */
#progress-perencanaan {
    background: linear-gradient(135deg, #ffc107 0%, #ffeb3b 100%) !important;
    color: #2d3436 !important;
}

#progress-kehadiran,
#progress-jurnal,
#progress-keaktifan {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    color: white !important;
}

#progress-supervisi {
    background: linear-gradient(135deg, #17a2b8 0%, #20c997 100%) !important;
    color: white !important;
}

/* Modern Monthly Report Section */
.chart h6 {
    color: #2d3436;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    padding: 15px 20px;
    background: rgba(248, 249, 250, 0.6);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.chart h6 i {
    padding: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.performance-section {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.performance-section:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.performance-item {
    background: rgba(248, 249, 250, 0.8);
    border-radius: 16px;
    padding: 0 20px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.performance-item:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(5px);
}

.performance-item span:first-child {
    color: #2d3436;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Modern Sidebar Cards */
.chat-list-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.chat-list-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
}

.chat-list-card h5 {
    color: #2d3436;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    font-size: 1.1rem;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
}

.chat-list-card h5 i {
    font-size: 1.3rem;
    padding: 8px;
    border-radius: 10px;
    background: rgba(102, 126, 234, 0.1);
}

/* Modern Buttons - Optimized Performance */
.modern-btn {
    border-radius: 16px;
    font-weight: 600;
    padding: 14px 20px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
}

/* Shimmer Effect - Only on Hover */
.modern-btn:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease-out;
    animation: shimmer-button 0.6s ease-out;
}

@keyframes shimmer-button {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.modern-btn:hover {
    transform: translateY(-3px) translateZ(0);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

/* Support Items - Reduced Animation */
.support-avatar {
    position: relative;
}

.support-item {
    background: rgba(248, 249, 250, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 10px 0 0 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: background-color 0.3s ease, transform 0.3s ease;
    transform: translateZ(0);
}

.support-item:hover {
    background: rgba(248, 249, 250, 0.9);
    transform: translateY(-2px) translateZ(0);
}

/* Optimized Pulse Animation */
.online-indicator {
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 14px;
    height: 14px;
    background: #28a745;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    animation: pulse-optimized 3s ease-in-out infinite;
}

@keyframes pulse-optimized {

    0%,
    100% {
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(40, 167, 69, 0.7);
        transform: scale(1) translateZ(0);
    }

    50% {
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2), 0 0 0 8px rgba(40, 167, 69, 0);
        transform: scale(1.1) translateZ(0);
    }
}

.support-avatar img {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border: 3px solid rgba(255, 255, 255, 0.8);
    margin-right: 10px;
}

/* Performance Breakdown */
.performance-breakdown,
.assessment-breakdown {
    background: rgba(248, 249, 250, 0.8);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    margin-top: 20px;
}

.breakdown-item {
    margin: 8px -8px;
    transition: all 0.3s ease;
    border-radius: 12px;
    position: relative;
}

.breakdown-item:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.color-indicator {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.breakdown-item:hover .color-indicator {
    transform: scale(1.2);
}

.badge {
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Modern Donut Chart */
.donut-size {
    width: 150px;
    height: 150px;
    margin: 0 auto;
}

.pie-wrapper {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto;
    filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.15));
}

.pie-wrapper .label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-radius: 50%;
    width: 100px;
    height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.8);
    text-align: center;
}

.pie-wrapper .label>span:first-child {
    display: block;
    text-align: center;
    line-height: 1;
}

.pie-wrapper .num {
    font-size: 1.8rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    margin: 0 !important;
    display: inline-block;
}

.pie-wrapper .smaller {
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    margin: 0 !important;
    line-height: 1 !important;
    display: inline-block;
    vertical-align: super;
    margin-left: 2px;
}

.pie-wrapper .label>span:last-child {
    font-size: 0.6rem !important;
    font-weight: 600 !important;
    margin: 4px 0 0 0 !important;
    line-height: 1 !important;
    display: block;
}

.pie-wrapper .pie {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    clip: rect(0, 75px, 150px, 0);
    position: absolute;
    top: 0;
    left: 0;
}

.pie-wrapper .half-circle {
    width: 150px;
    height: 150px;
    border: 12px solid transparent;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 75px 75px;
}

.pie-wrapper .left-side {
    clip: rect(0, 75px, 150px, 0);
    border-color: #667eea;
    transform: rotate(0deg);
    transition: transform 0.8s ease-in-out;
}

.pie-wrapper .right-side {
    clip: rect(0, 150px, 150px, 75px);
    border-color: #667eea;
    transform: rotate(180deg);
    transition: transform 0.8s ease-in-out;
}

.pie-wrapper .shadow {
    width: 150px;
    height: 150px;
    border: 12px solid rgba(102, 126, 234, 0.2);
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
}

/* Performance Chart Specific */
#specificChart .pie-wrapper .num {
    color: #667eea !important;
}

#specificChart .pie-wrapper .smaller,
#specificChart .pie-wrapper span:last-child {
    color: #636e72 !important;
}

/* Ujikom Chart Specific */
#ujikomChart .pie-wrapper .num {
    color: #e74c3c !important;
}

#ujikomChart .pie-wrapper .smaller,
#ujikomChart .pie-wrapper span:last-child {
    color: #636e72 !important;
}

#ujikomChart .pie-wrapper .left-side,
#ujikomChart .pie-wrapper .right-side {
    border-color: #e74c3c;
}

#ujikomChart .pie-wrapper .shadow {
    border-color: rgba(231, 76, 60, 0.2);
}

/* Schedule List Improvements */
.unread-notification-lists li {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.unread-notification-lists li:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(5px);
}

.bullet-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    margin-right: 10px;
}

/* Modal Improvements */
.modal-content.card-style {
    /* border: 1.5px solid #667eea; */
    box-shadow: 0 24px 80px rgba(102, 126, 234, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
    background: #fff !important;
    color: #222 !important;
    /* Remove blur and saturation */
    /* backdrop-filter: none !important; */
    -webkit-backdrop-filter: none !important;
    padding: 32px 28px 24px 28px;
}

/* Empty schedule modal */
.empty-modal .modal-content {
    border: none;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(43, 63, 116, 0.15);
    background: #fff;
}

.empty-modal__header {
    background: linear-gradient(135deg, #6c63ff, #7f87ff);
    color: #fff;
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.empty-modal__eyebrow {
    font-size: 0.85rem;
    opacity: 0.9;
}

.empty-modal__title {
    font-size: 1.2rem;
    font-weight: 600;
}

.empty-modal__body {
    padding: 32px;
    position: relative;
}

.empty-modal__close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #6c63ff;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(63, 81, 181, 0.2);
    transition: background 0.2s ease, color 0.2s ease;
}

.empty-modal__close:hover {
    background: #6c63ff;
    color: #fff;
}

.empty-modal__illustration {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(145deg, #f4f6ff, #ffffff);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.empty-modal__badge {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6cab, #7366ff);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2rem;
    position: relative;
    box-shadow: 0 15px 40px rgba(115, 102, 255, 0.35);
}

.empty-modal__badge::after {
    content: '!';
    position: absolute;
    top: -8px;
    right: -8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ffd369;
    color: #4b3f72;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-modal__lead {
    color: #6c7485;
    font-size: 1rem;
}

.empty-modal__info {
    background: #f5f7ff;
    border-radius: 16px;
    padding: 18px 22px;
    border: 1px solid #dfe4ff;
}

.empty-modal__info-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #eef2ff;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.empty-modal__list {
    background: #fdfcff;
    border-radius: 18px;
    border: 1px dashed #d9d2ff;
    padding: 16px 18px;
}

.empty-modal__list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* padding: 10px 0; */
    border-bottom: 1px solid #ede9ff;
    gap: 12px;
}

.empty-modal__list-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.empty-modal__list-mapel {
    font-weight: 600;
    color: #2d2a52;
}

.empty-modal__list-kelas {
    color: #7a75a5;
    font-size: 0.9rem;
}

.empty-modal__list-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.empty-modal__pill {
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.empty-modal__pill.is-missing {
    background: #ffe6e6;
    color: #c53030;
}

.empty-modal__pill.is-ok {
    background: #e5f6ef;
    color: #0f9d58;
}

.empty-modal__footer-text {
    color: #8b92a5;
}

.empty-modal__primary {
    background: linear-gradient(135deg, #6f5efb, #8367ff);
    color: #fff;
    border-radius: 999px;
    padding: 10px 24px;
    font-weight: 600;
    border: none;
    min-width: 190px;
    box-shadow: 0 10px 30px rgba(111, 94, 251, 0.35);
    transition: all 0.25s ease-in-out;
}

.empty-modal__primary:hover {
    background: linear-gradient(135deg, #ff9a9e, #5f58ff);
    color: #fff;
    border: none;
    box-shadow: 0 18px 36px rgba(95, 88, 255, 0.4);
}

.empty-modal__ghost {
    border-radius: 999px;
    padding: 10px 24px;
    font-weight: 600;
    border: 1px solid #d1d5ff;
    color: #6f5efb;
    background: #fbfaff;
    min-width: 150px;
    transition: all 0.25s ease-in-out;
}

.empty-modal__ghost:hover {
    background: linear-gradient(135deg, #ff9a9e, #5f58ff);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 12px 32px rgba(255, 154, 158, 0.35);
}

@media (max-width: 576px) {
    .empty-modal__body {
        padding: 24px;
    }

    .empty-modal__primary,
    .empty-modal__ghost {
        width: 100%;
    }
}

/* Modal Focus Effect - Only blur background, not modal */
body.modal-open {
    overflow: hidden;
}

body.modal-open .main-wrapper:not(.modal),
body.modal-open .sidebar-nav-wrapper.modern-sidebar:not(.modal),
body.modal-open .header:not(.modal),
body.modal-open .overlay:not(.modal),
body.modal-open .dashboard-banner-container:not(.modal),
body.modal-open .shortcut-grid:not(.modal),
body.modal-open .performance-section:not(.modal),
body.modal-open .chat-list-card:not(.modal) {
    pointer-events: none;
    user-select: none;
}

/* Mobile: allow interacting with sidebar when it is active */
@media (max-width: 767px) {

    body.modal-open .sidebar-nav-wrapper.modern-sidebar.active,
    .sidebar-nav-wrapper.modern-sidebar.active {
        pointer-events: auto !important;
        z-index: 1500 !important;
        /* bring above overlay */
    }

    /* Make overlay clickable to close sidebar on mobile */
    body.modal-open .overlay:not(.modal) {
        pointer-events: auto !important;
    }

    /* Prevent excessive blur feel on mobile when sidebar is open */
    body.modal-open .main-wrapper:not(.modal),
    body.modal-open .header:not(.modal) {
        filter: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}

/* Pastikan modal dan semua anak modal tidak ikut ngeblur */
body.modal-open .modal,
body.modal-open .modal *,
body.modal-open .modal-content,
body.modal-open .modal-dialog,
body.modal-open .modal-content.card-style {
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    pointer-events: auto !important;
    user-select: auto !important;
}

/* Modal and Backdrop Z-index */
.modal {
    z-index: 2000 !important;
    pointer-events: auto !important;
    background: transparent !important;
    filter: none !important;
}

/* Ensure modals inside main wrapper are always above the sidebar */
body.modal-open .main-wrapper {
    /* Sidebar sits at ~999; lift main wrapper stacking context so child .modal (z 2000) is on top */
    z-index: 1998 !important;
}

/* Remove blur from backdrop */
.modal-backdrop {
    z-index: 1999 !important;
    pointer-events: none !important;
    background: rgba(102, 126, 234, 0.22) !important;
    /* No blur */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Modal clarity improvements - thicker border shadow */
.modal-content,
.modal-content.card-style {
    box-shadow: 0 16px 64px rgba(102, 126, 234, 0.35), 0 4px 16px rgba(0, 0, 0, 0.18);
    /* border: 3px solid #667eea; */
    background: #fff !important;
    color: #222 !important;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    opacity: 1 !important;
}

/* Sidebar z-index fix */
.sidebar-nav-wrapper.modern-sidebar {
    z-index: 998 !important;
}

/* Pastikan modal dan backdrop selalu di atas sidebar */
.modal,
.modal.show {
    z-index: 2000 !important;
    filter: none !important;
}

.modal-backdrop {
    z-index: 1999 !important;
}

.overlay.active {
    /* Keep overlay below sidebar so menu remains clickable */
    z-index: 800 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .title-wrapper {
        margin: 0 5px 20px 5px;
        padding: 20px;
    }

    .shortcut-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 15px;
        padding: 15px 5px;
    }

    .shortcut-item {
        padding: 20px 10px;
        min-height: 100px;
    }

    .shortcut-item i {
        font-size: 2rem !important;
    }

    .shortcut-item span {
        font-size: 0.8rem;
    }

    .dashboard-banner-container {
        padding: 20px 15px;
    }
}

.gridjs-container {
    font-size: small;
}

/* custom scrollbar */
::-webkit-scrollbar {
    width: 20px;
}

::-webkit-scrollbar-track {
    background-color: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: #d6dee1;
    border-radius: 20px;
    border: 6px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #a8bbbf;
}

.icon-card {

    border-radius: 20px;
}

div.dt-buttons {
    background-color: #6c757d;
    border-radius: 3px;
}

div.dt-button-collection .dt-button:not(.dt-btn-split-drop) {
    margin-bottom: 3px;
    border-radius: 5px;
}

table.dataTable>tbody>tr>td {
    padding-left: 10px;
}

table.dataTable>tbody>tr>td {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

table.dataTable>thead>tr>th {
    text-align: center;
}

table.dataTable>* {
    font-size: 12px;
}

.hide-kelas {
    max-height: 74px;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: inset 0 -11px 9px -12px #000000;
    cursor: pointer;
}

table.gridjs-table {
    width: 100% !important;
}

.dataTables_length {
    float: left;
}

.dataTables_filter {
    float: right;
}

#redis-state.active {
    color: green;
}

#redis-state.inactive {
    color: red;
}

#redis-state.off {
    display: none;
}

.blink_me {
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

/* .btn-primary {
  color: #fff;
  background-color: #1d1c1c;
  border-color: #bdbdbd;
}

.primary-btn {
  background: #1d1c1c;
  color: #fff;
}

.danger-btn {
  background: #1d1c1c;
  color: #fff;
}

.btn-success {
  color: #fff;
  background-color: #1d1c1c;
  border-color: #198754;
}

.success-btn {
  color: #fff;
  background-color: #1d1c1c;
  border-color: #198754;
}

.btn-danger {
  color: #fff;
  background-color: #1d1c1c;
  border-color: #871919;
}

.btn-warning {
  color: #fff;
  background-color: #1d1c1c;
  border-color: #768719;
} */

.sidebar-nav-wrapper .sidebar-nav ul .nav-item.nav-item-has-children ul {
    background: rgba(248, 249, 250, 0.6);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    margin: 8px 0;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 10px 24px;
}

/* ========== Modern Sidebar Styles ========== */

/* Modern Sidebar Container */
.sidebar-nav-wrapper.modern-sidebar {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.9) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    /* Let inner nav handle scroll to avoid nested scroll issues */
    overflow: hidden;
    /* Use flex layout so nav can own the scroll area */
    display: flex;
    flex-direction: column;
    touch-action: pan-y;
    min-height: 0;
    /* allow flex child to shrink and scroll */
    /* Pastikan sidebar memiliki positioning yang benar */
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    z-index: 999;
}

/* Modern Backdrop Effect */
.modern-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    pointer-events: none;
    z-index: 0;
}

/* Modern Logo Section */
.modern-logo-section {
    position: relative;
    z-index: 2;
    padding: 25px 20px 20px;
    margin-bottom: 20px;
    /* In flex column sidebar, keep logo as fixed-size block */
    flex: 0 0 auto;
}

.logo-container {
    display: block;
    text-decoration: none;
}

.logo-wrapper {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.95);
}

.modern-logo {
    width: 100%;
    max-width: 180px;
    height: auto;
    display: block;
    margin: 0 auto;
    filter: brightness(1.1);
    transition: filter 0.3s ease;
}

/* Modern Navigation */
.modern-nav {
    position: relative;
    z-index: 2;
    padding: 0 15px;
    /* Make nav area scrollable to ensure consistent scroll behavior */
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    min-height: 0;
    /* critical for flexbox scrolling on mobile */
    height: 100%;
    transform: translateZ(0);
    will-change: transform;
}

/* Modern Loading State */
.modern-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.modern-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.spinner-ring {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(102, 126, 234, 0.2);
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: #667eea;
    font-size: 14px;
    font-weight: 600;
}

/* Modern Menu List */
.modern-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Modern Navigation Items */
.modern-nav-item {
    margin: 6px 0;
    position: relative;
}

/* Modern Links */
.modern-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(45, 52, 54, 0.8);
    text-decoration: none;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    background: transparent;
    border: 1px solid transparent;
    font-weight: 500;
    font-size: 14px;
}

/* Modern Link Hover Effects */
.modern-link:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    transform: translateX(4px);
    border-color: rgba(102, 126, 234, 0.2);
    text-decoration: none;
}

/* Active Modern Link */
.modern-nav-item.active>.modern-link,
.modern-link.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: #667eea;
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
    transform: translateX(4px);
}

/* Modern Icon Wrapper */
.modern-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    margin-right: 15px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.modern-link:hover .modern-icon-wrapper {
    background: rgba(102, 126, 234, 0.2);
    transform: scale(1.1);
}

.modern-nav-item.active .modern-icon-wrapper {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Modern Icons */
.modern-icon {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: rgba(102, 126, 234, 0.8);
    transition: all 0.3s ease;
}

.modern-link:hover .modern-icon {
    color: #667eea;
}

.modern-nav-item.active .modern-icon {
    color: white;
}

/* Modern Text */
.modern-text {
    flex: 1;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

/* Modern Arrow for Dropdown */
/* custom arrow removed: rely on template's default caret */
.modern-arrow {
    display: none;
}

/* Modern Dropdown */
.modern-dropdown {
    background: rgba(248, 249, 250, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 16px;
    margin: 8px 0 8px 35px;
    padding: 10px 0;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Modern Dropdown Items */
.modern-dropdown-item {
    margin: 2px 0;
}

.modern-sub-link {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: rgba(45, 52, 54, 0.7);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 500;
    margin: 0 8px;
}

.modern-sub-link:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    transform: translateX(4px);
    text-decoration: none;
}

.modern-sub-link.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.2);
    transform: translateX(4px);
}

/* Sub Indicator */
.sub-indicator {
    width: 6px;
    height: 6px;
    background: rgba(102, 126, 234, 0.4);
    border-radius: 50%;
    margin-right: 12px;
    transition: all 0.3s ease;
}

.modern-sub-link:hover .sub-indicator,
.modern-sub-link.active .sub-indicator {
    background: #667eea;
    transform: scale(1.3);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.sub-text {
    transition: all 0.3s ease;
}

/* Responsive Modern Sidebar */
@media only screen and (max-width: 1199px) {
    .sidebar-nav-wrapper.modern-sidebar {
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(25px);
    }
}

@media only screen and (max-width: 767px) {
    .modern-logo-section {
        padding: 20px 15px 15px;
    }

    .modern-nav {
        padding: 0 10px;
    }

    .modern-link {
        padding: 10px 15px;
    }

    .modern-icon-wrapper {
        width: 36px;
        height: 36px;
        margin-right: 12px;
    }

    .modern-icon {
        font-size: 16px !important;
    }
}

/* Animation enhancements */
.modern-nav-item {
    animation: slideInLeft 0.3s ease-out;
    animation-fill-mode: both;
}

.modern-nav-item:nth-child(1) {
    animation-delay: 0.1s;
}

.modern-nav-item:nth-child(2) {
    animation-delay: 0.2s;
}

.modern-nav-item:nth-child(3) {
    animation-delay: 0.3s;
}

.modern-nav-item:nth-child(4) {
    animation-delay: 0.4s;
}

.modern-nav-item:nth-child(5) {
    animation-delay: 0.5s;
}

.modern-nav-item:nth-child(n+6) {
    animation-delay: 0.6s;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scrollbar styling for modern sidebar */
.sidebar-nav-wrapper.modern-sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav-wrapper.modern-sidebar::-webkit-scrollbar-track {
    background: rgba(248, 249, 250, 0.3);
    border-radius: 3px;
}

.sidebar-nav-wrapper.modern-sidebar::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.4);
    border-radius: 3px;
    transition: background 0.3s ease;
}

.sidebar-nav-wrapper.modern-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.6);
}

/* Integration with Dashboard Layout */
.main-wrapper {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* Pastikan main content memiliki margin yang benar */
    margin-left: 250px;
    position: relative;
    z-index: 1;
}

/* Responsive main wrapper */
@media only screen and (max-width: 1199px) {
    .main-wrapper {
        margin-left: 0;
    }
}

/* Active state - saat sidebar disembunyikan */
.main-wrapper.active {
    margin-left: 0;
}

/* Modern sidebar mobile improvements */
@media only screen and (max-width: 767px) {
    .sidebar-nav-wrapper.modern-sidebar {
        background: rgba(255, 255, 255, 0.98);
        /* Disable blur on mobile to prevent scroll bugs on iOS/Safari */
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        /* Mobile: sidebar tersembunyi secara default */
        transform: translateX(-260px);
    }

    .sidebar-nav-wrapper.modern-sidebar.active {
        transform: translateX(0);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    }

    /* Ensure the inner scroll container always receives pointer events */
    .modern-nav {
        pointer-events: auto;
    }
}

/* Desktop positioning fix */
@media only screen and (min-width: 768px) {
    .sidebar-nav-wrapper.modern-sidebar {
        transform: translateX(0);
    }

    .sidebar-nav-wrapper.modern-sidebar.active {
        transform: translateX(-260px);
    }
}

/* Tablet and small desktop: behave like mobile (hide sidebar by default) */
@media only screen and (min-width: 768px) and (max-width: 1200px) {
    .sidebar-nav-wrapper.modern-sidebar {
        /* hidden by default, slide in when active */
        transform: translateX(-260px);
    }

    .sidebar-nav-wrapper.modern-sidebar.active {
        transform: translateX(0);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    }

    /* Ensure inner scroll remains usable when shown */
    .modern-nav {
        pointer-events: auto;
    }
}

/* Smooth interaction with overlay */
.overlay.active {
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* Modern focus states for accessibility */
.modern-link:focus {
    outline: 2px solid rgba(102, 126, 234, 0.4);
    outline-offset: 2px;
    border-radius: 16px;
}

.modern-sub-link:focus {
    outline: 2px solid rgba(102, 126, 234, 0.4);
    outline-offset: 2px;
    border-radius: 12px;
}

/* Force correct positioning - override any conflicts */
.main-wrapper {
    margin-left: 250px !important;
}

.main-wrapper.active {
    margin-left: 0 !important;
}

@media only screen and (max-width: 1199px) {
    .main-wrapper {
        margin-left: 0 !important;
    }

    .main-wrapper.active {
        margin-left: 0 !important;
    }
}

/* Ensure sidebar stays in correct position */
.sidebar-nav-wrapper.modern-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 250px !important;
    height: 100vh !important;
    z-index: 999 !important;
    /* Let inner .modern-nav handle scrolling to avoid nested scroll issues */
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
}

.dt-buttons.btn-group {
    margin-left: 17% !important;
    margin-right: unset !important;
}

div.dataTables_wrapper {
    margin-top: 3% !important;
}

.card-action .blockUI .sk-fold {
    margin: 0 auto;
}

.card-action .blockUI h5,
.card-action .blockUI .h5 {
    color: #6f6b7d;
    margin: 1rem 0 0 0;
}

.blockUI.blockOverlay,
.blockUI.blockMsg {
    z-index: 1091 !important;
    color: #fff !important;
}

/* Ensure SweetAlert2 dialogs always appear above Bootstrap modals/backdrops */
.swal2-container {
    /* Bootstrap modal is at ~2000 in this theme; keep SweetAlert2 above it */
    z-index: 2105 !important;
}

/* small badge for new/notification markers in sidebar */
.modern-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    color: #fff;
    vertical-align: middle;
}