.sidenav .nav-link.active {
    background-image: linear-gradient(195deg, #1b5e20, #66bb6a) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 20px rgba(27, 94, 32, 0.35);
    border-radius: 0.5rem;
}

/* icon ikut putih */
.sidenav .nav-link.active i {
    color: #ffffff !important;
}

/* hover tetap hijau lembut */
.sidenav .nav-link:hover {
    background-color: rgba(102, 187, 106, 0.15);
}

.btn-icon-round {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50% !important;
}

/* preload */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    visibility: visible;
    transition:
        opacity 0.5s ease,
        visibility 0.5s ease;
}

#preloader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.dots-container {
    display: flex;
    align-items: center;
}

.dot {
    width: 15px;
    height: 15px;
    margin: 0 5px;
    background-color: #66bb6a;
    border-radius: 50%;
    opacity: 0.6;
    transform: scale(0.5);

    animation: dot-pulse 1.4s infinite ease-in-out;
}

.dot:nth-child(1) {
    animation-delay: 0s;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dot-pulse {

    0%,
    80%,
    100% {
        transform: scale(0.5);
        opacity: 0.6;
    }

    40% {
        transform: scale(1.1);
        opacity: 1;
    }
}

body.preload-active main {
    visibility: hidden;
    opacity: 0;
    transition:
        visibility 0s 0.5s,
        opacity 0.5s ease;
}

body:not(.preload-active) main {
    visibility: visible;
    opacity: 1;
}

body.preload-active main {
    visibility: hidden;
    opacity: 0;
    transition:
        visibility 0s 0.5s,
        opacity 0.5s ease;
}

body:not(.preload-active) main {
    visibility: visible;
    opacity: 1;
}

.qr-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    padding: 2px;
}

.qr-x {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 0px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s;
    padding: 2px;
}

.qr-icon:hover {
    border-color: #999;
}

.qr-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.select2-container .select2-selection--single {
    height: 40px;
    border: 1px solid #d2d6da;
    border-radius: 0.375rem;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 40px;
    padding-left: 12px;
    color: #7b809a;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #d2d6da !important;
    border-radius: 0.375rem !important;
    padding: 0.5rem 0.75rem !important;
    font-size: 0.875rem;
    outline: none !important;
    transition: all 0.15s ease-in-out;
    font-family: inherit;
}

.input-group-static label {
    z-index: 1051;
}

.box-jadwal-kosong {
    border: 1px dashed #d2d6da;
    border-radius: 0.5rem;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.box-jadwal-kosong:hover {
    background-color: #f8f9fa;
    border-color: #4caf50;
    color: #4caf50 !important;
}

.box-jadwal-kosong:hover i,
.box-jadwal-kosong:hover p {
    color: #4caf50 !important;
}

.box-jadwal-isi {
    background-color: #f8f9fa;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 60px;
}

.box-jadwal-isi:hover {
    background-color: #e9ecef;
    border-color: #ff9800;
}

.modal-header .btn-close {
    background-size: 0.75rem 0.75rem;
    opacity: 1;
}

.card-header-action {
    cursor: pointer;
    transition: background-color 0.2s;
}

.card-header-action:hover {
    background-color: #f8f9fa;
}

.toggle-icon {
    transition: transform 0.3s ease;
}

[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

.denah-grid-container {
    background-color: #f1f3f5;
    padding: 20px;
    border-radius: 0 0 8px 8px;
}

.denah-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.seat-cell {
    display: flex;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    min-height: 80px;
}

.seat-badge {
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    text-align: center;
    font-size: 0.75rem;
    padding: 5px;
}

.seat-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px;
    text-align: center;
}

.seat-santri-name {
    font-weight: bold;
    font-size: 0.8rem;
    color: #343a40;
    margin-bottom: 4px;
    line-height: 1.2;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    word-wrap: break-word;
}

.seat-exam-number {
    font-weight: bold;
    font-size: 0.95rem;
    color: #0d6efd;
}

.seat-empty-number {
    font-size: 2rem;
    font-weight: bold;
    color: #e9ecef;
}

.seat-cell.empty .seat-details {
    background-color: #fdfdfe;
}

.nav-tabs-arab {
    border-bottom: none;
}

.nav-tabs-arab .nav-link {
    color: #000000 !important;
    border: none !important;
    background: transparent !important;
    padding: 0.5rem 1rem;
    transition: color 0.2s ease-in-out;
}

.nav-tabs-arab .nav-link.active {
    color: #28a745 !important;
    font-weight: bold;
}

.nav-tabs-arab .nav-link:hover {
    color: #28a745 !important;
}

.cell-jadwal {
    transition: all 0.2s ease-in-out;
    border: 1px dashed #d2d6da;
    background-color: #f8f9fa;
}

.cell-jadwal:hover {
    background-color: #e9ecef;
    transform: translateY(-2px);
    border-color: #28a745;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.cell-jadwal.filled {
    border: 1px solid #e9ecef;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}



@media (max-width: 767.98px) {

    .nav-pills.nav-fill,
    .card-body .nav-pills.nav-fill,
    form .nav-pills.nav-fill {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        display: flex !important;
    }

    .nav-pills.nav-fill .nav-item,
    .card-body .nav-pills.nav-fill .nav-item,
    form .nav-pills.nav-fill .nav-item {
        width: 100% !important;
        flex: 0 0 auto !important;
    }

    .nav-pills.nav-fill .nav-link,
    .card-body .nav-pills.nav-fill .nav-link,
    form .nav-pills.nav-fill .nav-link {
        justify-content: center !important;
        width: 100% !important;
    }
}