/* .vertical-menu {
    z-index: 1005 !important;
    position: fixed; 
    top: 0;
}

#page-topbar {
    z-index: 1000 !important;
} */

/* 1. Mengatur container scroll DataTables */
.dataTables_scrollBody {
    border-bottom: none !important;
}

/* 2. Mengubah tampilan scrollbar agar tipis dan modern */
.dataTables_scrollBody::-webkit-scrollbar {
    width: 3px;
    /* Membuat scrollbar vertikal sangat tipis */
    height: 6px;
    /* Membuat scrollbar horizontal sangat tipis */
}

/* 3. Mengatur area latar belakang scrollbar (Track) */
.dataTables_scrollBody::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

/* 4. Mengatur warna batang scrollbar yang digeser (Thumb) */
.dataTables_scrollBody::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

/* 5. Mengubah warna batang scrollbar saat di-hover */
.dataTables_scrollBody::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 6. Memastikan header tabel tidak bergeser atau berantakan saat ada scroll */
.dataTables_scrollHead table {
    margin-bottom: 0 !important;
}

::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-button {
    display: none;
}

.chat-popup-amezia {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    animation: ameziaPopupSlide 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes ameziaPopupSlide {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Penyesuaian focus input di dalam popup */
.chat-popup-amezia .form-control:focus {
    box-shadow: none !important;
    background: transparent !important;
}

.main-content {
    height: 100vh;
    overflow-y: auto;
}

/* 1. Efek putar panah saat accordion terbuka */
.pemicu-alerts[aria-expanded="true"] .panah-alerts {
    transform: rotate(180deg);
    transition: transform 0.2s ease;
}

.pemicu-alerts[aria-expanded="false"] .panah-alerts {
    transform: rotate(0deg);
    transition: transform 0.2s ease;
}

/* 2. Sembunyikan teks singkat JIKA teks lengkap sedang berstatus '.show' (terbuka) */
.pemicu-alerts[aria-expanded="true"] .teks-singkat {
    display: none !important;
}

#side-menu .mm-collapse li>a {
    max-width: 100%;
    white-space: normal;
    /* IZINKAN turun baris */
    word-break: break-word;
    /* patahkan kata panjang */
    overflow-wrap: break-word;
}

tr.group {
    background-color: #f0f0f0;
    font-weight: bold;
}

#textarea-custom {
    background-color: #f0f0f0;
    white-space: pre-wrap;
    overflow: hidden;
}

.progress-container {
    width: 100%;
    background-color: #f3f3f3;
    border-radius: 5px;
    margin-top: 10px;
}

.progress-bar {
    width: 0%;
    height: 20px;
    background-color: #0000FF;
    text-align: center;
    line-height: 25px;
    color: white;
    border-radius: 5px;
}

.placeholder-glow .placeholder {
    animation: placeholder-glow 2s infinite;
}

.placeholder-wave .placeholder {
    animation: placeholder-wave 1.5s linear infinite;
}

@keyframes placeholder-glow {
    0% {
        background-color: #e9ecef;
    }

    50% {
        background-color: #f8f9fa;
    }

    100% {
        background-color: #e9ecef;
    }
}

@keyframes placeholder-wave {
    0% {
        background-position: -200px 0;
    }

    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.placeholder {
    height: 20rem;
    display: inline-block;
    background-color: #e9ecef;
    border-radius: 0.25rem;
}

.placeholder-div {
    height: 20rem;
}

.placeholder-title {
    height: 1rem;
}

.placeholder.col-12 {
    width: 100%;
}

.placeholder.col-6 {
    width: 50%;
}

.placeholder.col-4 {
    width: 33.33%;
}

.placeholder.col-3 {
    width: 25%;
}

.placeholder-lg {
    height: 2rem;
}

.placeholder-sm {
    height: 0.75rem;
}

.placeholder-circle {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
}

.placeholder-square {
    width: 2rem;
    height: 2rem;
    border-radius: 0.25rem;
}

#template_title.placeholder {
    width: 50%;
    height: 1.5rem;
    background-color: #e9ecef;
    border-radius: 0.25rem;
}

.page-title-right.placeholder {
    width: 50%;
    height: 1.5rem;
    background-color: #e9ecef;
    border-radius: 0.25rem;
}

#template_title.placeholder-glow {
    animation: placeholder-glow 2s infinite;
}

.page-title-right.placeholder-glow {
    animation: placeholder-glow 2s infinite;
}

#template_title.placeholder-wave {
    animation: placeholder-wave 1.5s linear infinite;
}

.page-title-right.placeholder-wave {
    animation: placeholder-glow 2s infinite;
}

.dropdown-menu-tahun {
    max-height: 200px;
    overflow-y: auto;
}

@keyframes placeholder-glow {
    0% {
        background-color: #e9ecef;
    }

    50% {
        background-color: #f8f9fa;
    }

    100% {
        background-color: #e9ecef;
    }
}

/* Animasi untuk efek wave */
@keyframes placeholder-wave {
    0% {
        background-position: -200px 0;
    }

    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.fade-container {
    opacity: 0;
}

.fade-container.show {
    opacity: 1;
}

/* .select2-container--open {
    z-index: 99;
} */

.footer {
    height: auto;
    /* Tinggi otomatis mengikuti konten bertumpuk di HP */
}

@media (min-width: 992px) {

    /* .nav-item.dropdown:hover .dropdown-menu {
        display: block !important;
    } */
    .border-lg-start {
        border-left: 1px solid #dee2e6 !important;
    }

    .footer {
        position: fixed;
        bottom: 0;
        height: 60px;
        /* Tinggi dikunci rapi karena layout desktop melebar ke samping */
    }
}

@media (max-width: 991.98px) {
    .vertical-menu {
        display: none !important;
    }

    body.sidebar-enable .vertical-menu {
        z-index: 9999;
        display: block !important;
    }

    .border-md-bottom {
        border-bottom: 1px solid #dee2e6 !important;
    }
}

.card-hover-secondary:hover {
    background-color: #e2e3e5 !important;
    transition: 0.2s;
}

/* Dark mode */
[data-bs-theme="dark"] .card-hover-secondary:hover {
    background-color: #3a3b3d !important;
    /* warna hover khusus dark */
}

/* .main-content {
    height: 100vh;
    overflow-y: auto;
} */

/* 1. Sembunyikan segitiga panah bawaan Select2 */
.select2-container--default .select2-selection--single .select2-selection__arrow b {
    display: none !important;
}

/* 2. Gunakan Pseudo-element untuk memasukkan icon baru */
.select2-container--default .select2-selection--single .select2-selection__arrow::before {
    content: "\f107";
    /* Kode Unicode Font Awesome untuk panah bawah (fa-caret-down) */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    display: block;
    text-align: center;
    font-size: 14px;
    color: #888;
    line-height: 29px;
}

/* 3. Efek saat Dropdown terbuka (opsional: icon berputar) */
.select2-container--open .select2-selection--single .select2-selection__arrow::before {
    content: "\f106";
    /* fa-caret-up */
    color: #888;
}

/* 1. Kondisi Default (Tanpa Border) */
.select2-container--default .select2-selection--single {
    border: none !important;
    background-color: transparent !important;
    transition: border 0.2s ease;
    /* Opsional: agar transisi lebih halus */
}

/* 2. Menghilangkan garis biru fokus agar tidak bentrok */
.select2-container--default.select2-container--focus .select2-selection--single {
    outline: none !important;
}

/* 3. Kondisi saat Dropdown MUNCUL (Border Muncul Kembali) */
.select2-container--default.select2-container--open .select2-selection--single {
    border: 1px solid #a5a5a5 !important;
    /* Gunakan warna border default bootstrap */
    background-color: #fff !important;
    /* Biasanya lebih rapi jika bg jadi putih saat open */
    border-bottom: none !important;
    /* Opsional: agar menyambung dengan dropdown di bawahnya */
    border-radius: 4px 4px 0 0 !important;
    /* Agar sudut bawah tidak membulat saat menyambung */
}

.arrow-icon {
    transition: transform 0.3s ease;
    /* Biar gerakannya halus */
}

/* Keadaan saat Collapse Terbuka (data-bs-toggle diklik) */
[aria-expanded="true"] .arrow-icon {
    transform: rotate(180deg);
    color: #5b626b;
    /* Opsional: ubah warna saat aktif */
}


/* --- KONDISI LIGHT MODE (Default) --- */
.footer {
    --bs-footer-bg: #ffffff;
    color: #74788d;
    /* Warna teks abu-abu standar */
    border-top: 1px solid #e9ecef !important;
}

/* --- KONDISI DARK MODE --- */
/* Menyesuaikan dengan selektor template Amezia/Bootstrap 5 */
[data-bs-theme="dark"] .footer,
body[data-sidebar="dark"] .footer,
body[data-layout-mode="dark"] .footer {
    --bs-footer-bg: #0f111d;
    /* Warna gelap yang senada dengan sidebar/header dark */
    color: #abb2bd;
    /* Warna teks lebih terang agar terbaca di background gelap */
    border-top: 1px solid #32394e !important;
}

/* Jika kamu ingin footernya benar-benar hitam pekat di dark mode */
[data-bs-theme="dark"] .footer {
    --bs-footer-bg: #222736;
}

/* --- TAMPILAN DEFAULT (LIGHT MODE) --- */
.custom-btn-theme {
    background-color: #f8f9fa;
    /* Warna terang/light */
    border: 1px solid #dee2e6;
    color: #343a40;
    /* Ikon berwarna gelap */
    transition: all 0.3s ease;
}

.custom-btn-theme:hover {
    background-color: #e2e6ea;
}

/* --- KONDISI DARK MODE --- */
[data-bs-theme="dark"] .custom-btn-theme,
body[data-topbar="dark"] .custom-btn-theme,
body[data-sidebar="dark"] .custom-btn-theme {
    background-color: #32394e !important;
    /* Warna gelap khas Amezia */
    border: 1px solid #3b445e !important;
    color: #ffffff !important;
    /* Ikon menjadi putih */
}

[data-bs-theme="dark"] .custom-btn-theme:hover {
    background-color: #3b445e !important;
}

/* --- OVERLAY SIDEBAR MOBILE --- */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9998;
    /* Satu tingkat di bawah sidebar .vertical-menu (z-index: 9999) */
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    transition: all 0.3s ease;
}

body.sidebar-enable .sidebar-overlay {
    display: block;
}

@media (min-width: 992px) {
    body.sidebar-enable .sidebar-overlay {
        display: none !important;
    }
}

/* --- RESPONSIVE AI CHAT OVERLAY --- */
@media (max-width: 576px) {
    #chatPopup {
        width: 100% !important;
        height: 100% !important;
        bottom: 0 !important;
        right: 0 !important;
        border-radius: 0 !important;
        z-index: 1050 !important;
    }

    .ai-chat-header {
        border-top-left-radius: 0 !important;
        border-top-right-radius: 0 !important;
    }

    .ai-chat-footer {
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
    }

    #btnFullscreenChat {
        display: none !important;
    }
}

/* --- PREMIUM SIDEBAR MENU OVERRIDES (Image 1 Style) --- */
/* Hanya berlaku jika sidebar dalam keadaan TERBUKA/LEBAR (body:not(.vertical-collpsed)) */
body:not(.vertical-collpsed) #sidebar-menu>ul>li>a {
    margin: 4px 12px !important;
    padding: 10px 16px !important;
    border-radius: 8px !important;
    transition: all 0.2s ease-in-out !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    border-left: none !important;
    /* Hapus garis biru default */
}

/* 2. Layout dasar item menu tingkat 2 (Submenu / Children) */
body:not(.vertical-collpsed) #sidebar-menu ul.sub-menu li a {
    margin: 4px 12px !important;
    padding: 10px 16px 10px 48px !important;
    /* Indentasi agar rapi */
    border-radius: 8px !important;
    transition: all 0.2s ease-in-out !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    border-left: none !important;
}

body:not(.vertical-collpsed) #sidebar-menu ul li a i {
    margin-right: 0 !important;
    /* Reset margin bawaan */
    font-size: 1.1rem !important;
}

/* 3. Efek Hover Default */
body:not(.vertical-collpsed) #sidebar-menu ul li a:hover {
    background-color: rgba(16, 42, 67, 0.04) !important;
    color: #102a43 !important;
}

/* 4. AKTIF: Item Halaman Aktif (Card View - Navy Gelap & Teks Putih) */
body:not(.vertical-collpsed) #sidebar-menu li a.ini__link.mm-active {
    background-color: #102a43 !important;
    /* Dark Navy */
    color: #ffffff !important;
    border-left: none !important;
}

body:not(.vertical-collpsed) #sidebar-menu li a.ini__link.mm-active i,
body:not(.vertical-collpsed) #sidebar-menu li a.ini__link.mm-active span {
    color: #ffffff !important;
}

body:not(.vertical-collpsed) #sidebar-menu li a.ini__link.mm-active:hover {
    background-color: #0b2238 !important;
    /* Sedikit lebih gelap saat di-hover */
    color: #ffffff !important;
}

/* 5. AKTIF: Parent Dropdown Menu (Soft Highlight agar tidak tabrakan dengan anak) */
body:not(.vertical-collpsed) #sidebar-menu li a.has-arrow.mm-active {
    background-color: rgba(16, 42, 67, 0.08) !important;
    /* Soft semi-transparent navy */
    color: #102a43 !important;
    /* font-weight: 600 !important; */
    border-left: none !important;
}

body:not(.vertical-collpsed) #sidebar-menu li a.has-arrow.mm-active i,
body:not(.vertical-collpsed) #sidebar-menu li a.has-arrow.mm-active span {
    color: #102a43 !important;
}

/* --- GLOBAL BG-DARK OVERRIDE --- */
.bg-dark {
    /* background-color: #0b2238 !important; */
    background-color: #102a43 !important;
}