/* Application Background Styling */
body {
    background-image: url('/assets/media/bg2.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
    min-height: 100vh;
}

/* Dark mode background */
[data-bs-theme="dark"] body,
body[data-bs-theme="dark"] {
    background-image: url('/assets/media/bg2-dark.png');
}

/* Content area and containers - transparent to show body background */
.content-wrapper,
.container-xxl,
.container-fluid {
    background-color: transparent;
}

/* Fix gap when sidebar collapsed: align with Sneat - layout-page must use collapsed width so navbar is flush (no unexplained gap) */
@media (min-width: 1200px) {
    /* Force padding so content/navbar start right after collapsed sidebar (no extra gap) */
    html.layout-menu-collapsed.layout-menu-fixed .layout-wrapper .layout-page,
    html.layout-menu-collapsed.layout-menu-fixed-offcanvas .layout-wrapper .layout-page,
    body.layout-menu-collapsed.layout-menu-fixed .layout-wrapper .layout-page,
    body.layout-menu-collapsed.layout-menu-fixed-offcanvas .layout-wrapper .layout-page,
    .layout-menu-collapsed .layout-wrapper .layout-page {
        padding-inline-start: var(--bs-menu-collapsed-width) !important;
    }
    /* Reposition .layout-page::before overlay so it does not span full viewport and create gap; start after collapsed sidebar */
    html.layout-menu-collapsed .layout-navbar-fixed .layout-wrapper:not(.layout-horizontal) .layout-page::before,
    body.layout-menu-collapsed .layout-navbar-fixed .layout-wrapper:not(.layout-horizontal) .layout-page::before,
    .layout-menu-collapsed .layout-navbar-fixed .layout-wrapper:not(.layout-horizontal) .layout-page::before {
        inset-inline-start: var(--bs-menu-collapsed-width) !important;
        inline-size: calc(100% - var(--bs-menu-collapsed-width)) !important;
    }
    /* Navbar detached: margin rata kiri-kanan (1.625rem) saat sidebar collapsed - match Sneat */
    html.layout-menu-collapsed .layout-content-navbar .layout-navbar.navbar-detached,
    body.layout-menu-collapsed .layout-content-navbar .layout-navbar.navbar-detached,
    .layout-menu-collapsed .layout-content-navbar .layout-navbar.navbar-detached {
        margin-inline-start: 1.625rem !important;
        margin-inline-end: 1.625rem !important;
    }

    /*
     * Monitor lebar (≥1200px): content + navbar memenuhi area konten dengan jarak
     * 1.625rem dari sidebar — bukan container-xxl centered (max ~1320px).
     */
    .layout-content-navbar .content-wrapper .container-xxl.container-p-y,
    .layout-content-navbar .content-wrapper .container-xxl.flex-grow-1,
    .layout-content-navbar .content-footer .container-xxl {
        max-width: none !important;
        max-inline-size: none !important;
        width: 100% !important;
        margin-inline: 0 !important;
        padding-inline: 1.625rem !important;
    }

    .layout-content-navbar #layout-navbar.layout-navbar.navbar-detached.container-xxl {
        max-width: none !important;
        max-inline-size: none !important;
        margin-inline: 0 !important;
        inset-inline-start: calc(var(--bs-menu-width, 16.25rem) + 1.625rem) !important;
        inset-inline-end: auto !important;
        inline-size: calc(100% - var(--bs-menu-width, 16.25rem) - 1.625rem * 2) !important;
        width: calc(100% - var(--bs-menu-width, 16.25rem) - 1.625rem * 2) !important;
    }

    html.layout-menu-collapsed .layout-content-navbar #layout-navbar.layout-navbar.navbar-detached.container-xxl,
    body.layout-menu-collapsed .layout-content-navbar #layout-navbar.layout-navbar.navbar-detached.container-xxl,
    .layout-menu-collapsed .layout-content-navbar #layout-navbar.layout-navbar.navbar-detached.container-xxl {
        inset-inline-start: calc(var(--bs-menu-collapsed-width, 5.25rem) + 1.625rem) !important;
        inline-size: calc(100% - var(--bs-menu-collapsed-width, 5.25rem) - 1.625rem * 2) !important;
        width: calc(100% - var(--bs-menu-collapsed-width, 5.25rem) - 1.625rem * 2) !important;
    }

    /* Ensure menu-mobile-toggler does not take any space on desktop */
    .layout-container .menu-mobile-toggler.d-xl-none {
        position: absolute !important;
        width: 0 !important;
        min-width: 0 !important;
        overflow: hidden !important;
        padding: 0 !important;
        margin: 0 !important;
        pointer-events: none !important;
    }

    /* Sidebar expand on hover when collapsed: force full width when layout-menu-hover is set */
    html.layout-menu-hover .layout-menu.menu-vertical,
    html.layout-menu-hover #layout-menu.layout-menu.menu-vertical,
    body.layout-menu-hover .layout-menu.menu-vertical,
    body.layout-menu-hover #layout-menu.layout-menu.menu-vertical {
        inline-size: var(--bs-menu-width) !important;
    }
    html.layout-menu-hover .layout-menu.menu-vertical .menu-inner > .menu-item,
    html.layout-menu-hover .layout-menu.menu-vertical .menu-inner > .menu-header,
    html.layout-menu-hover .layout-menu.menu-vertical .menu-inner > .menu-block,
    body.layout-menu-hover .layout-menu.menu-vertical .menu-inner > .menu-item,
    body.layout-menu-hover .layout-menu.menu-vertical .menu-inner > .menu-header,
    body.layout-menu-hover .layout-menu.menu-vertical .menu-inner > .menu-block {
        inline-size: var(--bs-menu-width) !important;
    }
    /* Show sidebar search when expanded via hover */
    html.layout-menu-hover .layout-menu .sidebar-search-container,
    body.layout-menu-hover .layout-menu .sidebar-search-container {
        display: block !important;
    }
    /* Logo ukuran expanded ketika sidebar melebar on hover (override collapsed size) */
    html.layout-menu-hover .layout-menu #sidebar-logo-wordmark,
    body.layout-menu-hover .layout-menu #sidebar-logo-wordmark {
        max-height: 44px !important;
        max-width: none !important;
        width: auto !important;
    }
}

/* Navbar Styling - White background for better contrast with new background */
.navbar,
.layout-navbar,
#layout-navbar,
.bg-navbar-theme {
    background-color: #ffffff !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Navbar detached — positioning handled in @media (min-width: 1200px) full-width layout block above */

/* Dark mode navbar */
[data-bs-theme="dark"] .navbar,
[data-bs-theme="dark"] .layout-navbar,
[data-bs-theme="dark"] #layout-navbar,
[data-bs-theme="dark"] .bg-navbar-theme {
    background-color: #2b2b2b !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Ensure cards and sections have proper background for readability */
.card,
.list-section,
.filter-section {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .list-section,
[data-bs-theme="dark"] .filter-section {
    background-color: rgba(43, 43, 43, 0.95);
    backdrop-filter: blur(10px);
}

/* Sidebar Search Styling */
.sidebar-search-container {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background-color: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    display: block; /* Default: visible when expanded */
}

/* Sidebar collapsed visual fix:
   hide submenu chevron in collapsed state so it does not get clipped by menu bounds.
   Keep chevron visible when sidebar expands via hover (layout-menu-hover). */
html.layout-menu-collapsed:not(.layout-menu-hover) #layout-menu .menu-link.menu-toggle::after,
body.layout-menu-collapsed:not(.layout-menu-hover) #layout-menu .menu-link.menu-toggle::after {
    display: none !important;
}

/* Hide search when sidebar is collapsed - Base state */
#layout-menu.layout-menu-collapsed .sidebar-search-container,
.layout-menu.layout-menu-collapsed .sidebar-search-container,
body.layout-menu-collapsed #layout-menu .sidebar-search-container,
body.layout-menu-collapsed .layout-menu .sidebar-search-container,
html.layout-menu-collapsed .sidebar-search-container {
    display: none !important;
}

/* Show search when sidebar is collapsed but hovered (extended on hover) - Higher specificity */
#layout-menu.layout-menu-collapsed:hover .sidebar-search-container,
.layout-menu.layout-menu-collapsed:hover .sidebar-search-container,
body.layout-menu-collapsed #layout-menu:hover .sidebar-search-container,
body.layout-menu-collapsed .layout-menu:hover .sidebar-search-container,
html.layout-menu-collapsed #layout-menu:hover .sidebar-search-container {
    display: block !important;
}

/* Show search when sidebar is expanded (not collapsed) */
#layout-menu:not(.layout-menu-collapsed) .sidebar-search-container,
.layout-menu:not(.layout-menu-collapsed) .sidebar-search-container,
body:not(.layout-menu-collapsed) #layout-menu .sidebar-search-container,
body:not(.layout-menu-collapsed) .layout-menu .sidebar-search-container {
    display: block !important;
}

[data-bs-theme="dark"] .sidebar-search-container {
    border-bottom-color: rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.1);
}

.sidebar-search-container .input-group-text {
    border-color: rgba(0, 0, 0, 0.15);
    background-color: transparent;
}

[data-bs-theme="dark"] .sidebar-search-container .input-group-text {
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
}

.sidebar-search-container .form-control {
    border-color: rgba(0, 0, 0, 0.15);
    background-color: transparent;
    color: inherit;
}

.sidebar-search-container .form-control:focus {
    border-color: #2352a1;
    box-shadow: 0 0 0 0.2rem rgba(35, 82, 161, 0.25);
    background-color: transparent;
}

[data-bs-theme="dark"] .sidebar-search-container .form-control {
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
}

[data-bs-theme="dark"] .sidebar-search-container .form-control:focus {
    border-color: #2352a1;
    color: rgba(255, 255, 255, 0.9);
}

.sidebar-search-container .btn {
    border-color: rgba(0, 0, 0, 0.15);
    background-color: transparent;
    color: inherit;
}

[data-bs-theme="dark"] .sidebar-search-container .btn {
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
}

.sidebar-search-container .btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

[data-bs-theme="dark"] .sidebar-search-container .btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Hide menu items when searching */
.menu-item-hidden {
    display: none !important;
}

/* Transparent Scrollbar for Sidebar */
.layout-menu,
.menu-inner,
#menuInner {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.layout-menu::-webkit-scrollbar,
.menu-inner::-webkit-scrollbar,
#menuInner::-webkit-scrollbar {
    width: 6px;
}

.layout-menu::-webkit-scrollbar-track,
.menu-inner::-webkit-scrollbar-track,
#menuInner::-webkit-scrollbar-track {
    background: transparent;
}

.layout-menu::-webkit-scrollbar-thumb,
.menu-inner::-webkit-scrollbar-thumb,
#menuInner::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 3px;
}

/* Show scrollbar on hover (optional - subtle) */
.layout-menu:hover::-webkit-scrollbar-thumb,
.menu-inner:hover::-webkit-scrollbar-thumb,
#menuInner:hover::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] .layout-menu:hover::-webkit-scrollbar-thumb,
[data-bs-theme="dark"] .menu-inner:hover::-webkit-scrollbar-thumb,
[data-bs-theme="dark"] #menuInner:hover::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

/* Sidebar Logo Styling */
#sidebar-logo-icon,
#sidebar-logo-wordmark {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    transition: all 0.3s ease;
    display: block;
}

.sidebar-logo-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

#sidebar-logo-icon {
    max-height: 40px;
    max-width: 40px;
    width: auto;
    height: auto;
}

#sidebar-logo-wordmark {
    max-height: 44px;
    width: auto;
}

.layout-menu.layout-menu-collapsed #sidebar-logo-wordmark,
body.layout-menu-collapsed #sidebar-logo-wordmark,
html.layout-menu-collapsed #sidebar-logo-wordmark {
    display: none !important;
}

html.layout-menu-hover #sidebar-logo-wordmark,
body.layout-menu-hover #sidebar-logo-wordmark {
    display: block !important;
}

#sidebar-logo-wordmark.is-hidden {
    display: none !important;
}

/* App brand container adjustments - match demo.css height */
.menu .app-brand.demo,
.layout-menu .app-brand.demo,
aside.layout-menu .app-brand.demo {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 1.5rem 1rem 0.5rem !important;
    height: auto !important;
    min-height: 72px !important;
    margin-top: 28px !important;
}

.app-brand-logo.demo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Custom Bootstrap Button Primary Override */
/* This file overrides Bootstrap's btn-primary color to #2352a1 */

.btn-primary {
    background-color: #2352a1 !important;
    border-color: #2352a1 !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #1d4281 !important;
    border-color: #1d4281 !important;
}

.btn-primary:active,
.btn-primary.active,
.btn-primary.show {
    background-color: #18356b !important;
    border-color: #18356b !important;
}

.btn-primary:disabled,
.btn-primary.disabled {
    background-color: #2352a1 !important;
    border-color: #2352a1 !important;
    opacity: 0.65;
}

/* Background utilities */
.bg-primary {
    background-color: #2352a1 !important;
}

.bg-primary-subtle {
    background-color: rgba(35, 82, 161, 0.1) !important;
}

/* Border utilities */
.border-primary {
    border-color: #2352a1 !important;
}

/* Text utilities */
.text-primary {
    color: #2352a1 !important;
}

/* Link overrides */
a.text-primary:hover,
a.text-primary:focus {
    color: #1d4281 !important;
}

/* DataTables Fixed Columns Fix - Prevent header columns from being cut off */
/* Ensure scroll head inner container has proper width calculation */
.dataTables_wrapper .dataTables_scrollHeadInner {
    width: auto !important;
    min-width: 100% !important;
}

/* Ensure last column header is fully visible with proper padding */
.dataTables_wrapper .dataTables_scrollHeadInner table thead th:last-child {
    padding-right: 20px !important;
}

/* Ensure scroll head width matches scroll body width */
.dataTables_wrapper .dataTables_scrollHead {
    overflow: hidden !important;
}

.dataTables_wrapper .dataTables_scrollBody {
    overflow-x: auto !important;
    overflow-y: auto !important;
}

/* Fix for fixed columns header alignment */
.DTFC_LeftHeadWrapper table,
.DTFC_RightHeadWrapper table {
    table-layout: auto !important;
}

/* Ensure DataTables scroll container has proper width calculation */
.dataTables_scroll {
    position: relative;
    clear: both;
}

/* Fix for fixed columns with scrollX */
/* Ensure fixed columns are above scrollable content */
.dataTables_scrollBody {
    position: relative;
    z-index: 1;
}

.DTFC_LeftWrapper,
.DTFC_RightWrapper {
    position: relative;
    z-index: 10;
}

.DTFC_LeftHeadWrapper,
.DTFC_RightHeadWrapper {
    position: relative;
    z-index: 11;
}

/* Ensure fixed column cells are above scrollable body content */
table.dataTable thead tr > .dtfc-fixed-start,
table.dataTable thead tr > .dtfc-fixed-end,
table.dataTable tfoot tr > .dtfc-fixed-start,
table.dataTable tfoot tr > .dtfc-fixed-end {
    z-index: 12 !important;
    position: relative;
}

table.dataTable tbody tr > .dtfc-fixed-start,
table.dataTable tbody tr > .dtfc-fixed-end {
    z-index: 10 !important;
    position: relative;
}

/* Ensure fixed column body wrapper is above scrollable content */
.DTFC_LeftBodyLiner,
.DTFC_RightBodyLiner {
    position: relative;
    z-index: 10;
}

/* Ensure fixed columns have solid background to cover scrolling content */
.DTFC_LeftWrapper,
.DTFC_RightWrapper,
.DTFC_LeftHeadWrapper,
.DTFC_RightHeadWrapper,
.DTFC_LeftBodyLiner,
.DTFC_RightBodyLiner {
    background-color: var(--bs-body-bg, #ffffff) !important;
    opacity: 1 !important;
}

/* Ensure all fixed column table cells have solid background */
.DTFC_LeftBodyLiner table tbody td,
.DTFC_RightBodyLiner table tbody td,
.DTFC_LeftBodyLiner table tbody th,
.DTFC_RightBodyLiner table tbody th {
    background-color: inherit !important;
    opacity: 1 !important;
}

/* Ensure fixed column cells have solid background and full opacity */
table.dataTable thead tr > .dtfc-fixed-start,
table.dataTable thead tr > .dtfc-fixed-end,
table.dataTable tfoot tr > .dtfc-fixed-start,
table.dataTable tfoot tr > .dtfc-fixed-end,
table.dataTable thead tr th.dtfc-fixed-start,
table.dataTable thead tr th.dtfc-fixed-end {
    background-color: #2352a1 !important;
    opacity: 1 !important;
    background-image: none !important;
}

/* Fixed column body cells - default solid background (white/body bg for odd rows) */
table.dataTable tbody tr > .dtfc-fixed-start,
table.dataTable tbody tr > .dtfc-fixed-end,
table.dataTable tbody tr td.dtfc-fixed-start,
table.dataTable tbody tr td.dtfc-fixed-end,
table.dataTable tbody tr th.dtfc-fixed-start,
table.dataTable tbody tr th.dtfc-fixed-end {
    background-color: #ffffff !important;
    opacity: 1 !important;
    background-image: none !important;
}

/* Fixed column body cells - striped background for even rows (solid color, not transparent) */
table.dataTable.table-striped tbody tr.even > .dtfc-fixed-start,
table.dataTable.table-striped tbody tr.even > .dtfc-fixed-end,
table.dataTable tbody tr.even > .dtfc-fixed-start,
table.dataTable tbody tr.even > .dtfc-fixed-end,
table.dataTable.table-striped tbody tr.even td.dtfc-fixed-start,
table.dataTable.table-striped tbody tr.even td.dtfc-fixed-end,
table.dataTable tbody tr.even td.dtfc-fixed-start,
table.dataTable tbody tr.even td.dtfc-fixed-end {
    background-color: #f4f6fa !important;
    opacity: 1 !important;
    background-image: none !important;
}

/* Fixed column body cells - solid white/body bg for odd rows (not transparent) */
table.dataTable.table-striped tbody tr.odd > .dtfc-fixed-start,
table.dataTable.table-striped tbody tr.odd > .dtfc-fixed-end,
table.dataTable tbody tr.odd > .dtfc-fixed-start,
table.dataTable tbody tr.odd > .dtfc-fixed-end,
table.dataTable.table-striped tbody tr.odd td.dtfc-fixed-start,
table.dataTable.table-striped tbody tr.odd td.dtfc-fixed-end,
table.dataTable tbody tr.odd td.dtfc-fixed-start,
table.dataTable tbody tr.odd td.dtfc-fixed-end {
    background-color: #ffffff !important;
    opacity: 1 !important;
    background-image: none !important;
}

/* Fixed column hover effect - solid color, not transparent */
table.dataTable.table-hover tbody tr:hover > .dtfc-fixed-start,
table.dataTable.table-hover tbody tr:hover > .dtfc-fixed-end,
table.dataTable tbody tr:hover > .dtfc-fixed-start,
table.dataTable tbody tr:hover > .dtfc-fixed-end,
table.dataTable.table-hover tbody tr:hover td.dtfc-fixed-start,
table.dataTable.table-hover tbody tr:hover td.dtfc-fixed-end,
table.dataTable tbody tr:hover td.dtfc-fixed-start,
table.dataTable tbody tr:hover td.dtfc-fixed-end {
    background-color: #e8ecf5 !important;
    opacity: 1 !important;
    background-image: none !important;
}

/* Dark mode support for fixed columns */
[data-bs-theme="dark"] .DTFC_LeftWrapper,
[data-bs-theme="dark"] .DTFC_RightWrapper,
[data-bs-theme="dark"] .DTFC_LeftHeadWrapper,
[data-bs-theme="dark"] .DTFC_RightHeadWrapper,
[data-bs-theme="dark"] .DTFC_LeftBodyLiner,
[data-bs-theme="dark"] .DTFC_RightBodyLiner {
    background-color: var(--bs-body-bg, #2b2b2b) !important;
}

[data-bs-theme="dark"] table.dataTable tbody tr > .dtfc-fixed-start,
[data-bs-theme="dark"] table.dataTable tbody tr > .dtfc-fixed-end,
[data-bs-theme="dark"] table.dataTable tbody tr td.dtfc-fixed-start,
[data-bs-theme="dark"] table.dataTable tbody tr td.dtfc-fixed-end {
    background-color: #2b2b2b !important;
    opacity: 1 !important;
    background-image: none !important;
}

[data-bs-theme="dark"] table.dataTable.table-striped tbody tr.even > .dtfc-fixed-start,
[data-bs-theme="dark"] table.dataTable.table-striped tbody tr.even > .dtfc-fixed-end,
[data-bs-theme="dark"] table.dataTable tbody tr.even > .dtfc-fixed-start,
[data-bs-theme="dark"] table.dataTable tbody tr.even > .dtfc-fixed-end,
[data-bs-theme="dark"] table.dataTable.table-striped tbody tr.even td.dtfc-fixed-start,
[data-bs-theme="dark"] table.dataTable.table-striped tbody tr.even td.dtfc-fixed-end,
[data-bs-theme="dark"] table.dataTable tbody tr.even td.dtfc-fixed-start,
[data-bs-theme="dark"] table.dataTable tbody tr.even td.dtfc-fixed-end {
    background-color: #2d3d4f !important;
    opacity: 1 !important;
    background-image: none !important;
}

[data-bs-theme="dark"] table.dataTable.table-striped tbody tr.odd > .dtfc-fixed-start,
[data-bs-theme="dark"] table.dataTable.table-striped tbody tr.odd > .dtfc-fixed-end,
[data-bs-theme="dark"] table.dataTable tbody tr.odd > .dtfc-fixed-start,
[data-bs-theme="dark"] table.dataTable tbody tr.odd > .dtfc-fixed-end,
[data-bs-theme="dark"] table.dataTable.table-striped tbody tr.odd td.dtfc-fixed-start,
[data-bs-theme="dark"] table.dataTable.table-striped tbody tr.odd td.dtfc-fixed-end,
[data-bs-theme="dark"] table.dataTable tbody tr.odd td.dtfc-fixed-start,
[data-bs-theme="dark"] table.dataTable tbody tr.odd td.dtfc-fixed-end {
    background-color: #2b2b2b !important;
    opacity: 1 !important;
    background-image: none !important;
}

[data-bs-theme="dark"] table.dataTable.table-hover tbody tr:hover > .dtfc-fixed-start,
[data-bs-theme="dark"] table.dataTable.table-hover tbody tr:hover > .dtfc-fixed-end,
[data-bs-theme="dark"] table.dataTable tbody tr:hover > .dtfc-fixed-start,
[data-bs-theme="dark"] table.dataTable tbody tr:hover > .dtfc-fixed-end,
[data-bs-theme="dark"] table.dataTable.table-hover tbody tr:hover td.dtfc-fixed-start,
[data-bs-theme="dark"] table.dataTable.table-hover tbody tr:hover td.dtfc-fixed-end,
[data-bs-theme="dark"] table.dataTable tbody tr:hover td.dtfc-fixed-start,
[data-bs-theme="dark"] table.dataTable tbody tr:hover td.dtfc-fixed-end {
    background-color: #354a5f !important;
    opacity: 1 !important;
    background-image: none !important;
}

/* Table Header Styling - Custom Color #2352a1 for ALL tables */
/* Override Bootstrap table-light class with high specificity */
.table thead th,
table thead th,
.table thead.table-light th,
table thead th.table-light,
.table-light th,
thead.table-light th,
.table.table-striped thead th,
.table.table-hover thead th,
.table.table-striped.table-hover thead th,
#itemDetailTable thead th,
#chooseItemTable thead th,
#approvalTable thead th,
#prTable thead th,
#poTable thead th,
#confirmPOTable thead th,
#releaseTable thead th,
#receiveTable thead th,
#bulkyReleaseTable thead th,
#updateBulkyPricePOTable thead th,
#updateBulkyPriceItemTable thead th,
#documentTable thead th,
#confirm-items-table thead th,
#confirm-documents-table thead th {
    background-color: #2352a1 !important;
    color: white !important;
    border-color: #1d4281 !important;
    font-weight: 600;
}

.table thead th:hover,
table thead th:hover,
.table thead.table-light th:hover,
table thead th.table-light:hover,
.table-light th:hover,
thead.table-light th:hover,
.table.table-striped thead th:hover,
.table.table-hover thead th:hover,
.table.table-striped.table-hover thead th:hover,
#itemDetailTable thead th:hover,
#chooseItemTable thead th:hover,
#approvalTable thead th:hover,
#prTable thead th:hover,
#poTable thead th:hover,
#confirmPOTable thead th:hover,
#releaseTable thead th:hover,
#receiveTable thead th:hover,
#bulkyReleaseTable thead th:hover,
#updateBulkyPricePOTable thead th:hover,
#updateBulkyPriceItemTable thead th:hover,
#documentTable thead th:hover,
#confirm-items-table thead th:hover,
#confirm-documents-table thead th:hover {
    background-color: #1d4281 !important;
}

/* DataTables Header Styling - Custom Color #2352a1 */
.dataTables_wrapper table thead th,
.dataTables_wrapper table.dataTable thead th,
table.dataTable thead th {
    background-color: #2352a1 !important;
    color: white !important;
    border-color: #1d4281 !important;
    font-weight: 600;
}

.dataTables_wrapper table thead th:hover,
.dataTables_wrapper table.dataTable thead th:hover,
table.dataTable thead th:hover {
    background-color: #1d4281 !important;
}

/* Fixed columns header styling */
.DTFC_LeftHeadWrapper table thead th,
.DTFC_RightHeadWrapper table thead th {
    background-color: #2352a1 !important;
    color: white !important;
    border-color: #1d4281 !important;
}

/* Dark mode support for table header */
[data-bs-theme="dark"] .table thead th,
[data-bs-theme="dark"] table thead th,
[data-bs-theme="dark"] .table-light th,
[data-bs-theme="dark"] thead.table-light th {
    background-color: #2352a1 !important;
    color: white !important;
    border-color: #1d4281 !important;
}

/* Dark mode support for DataTables header */
[data-bs-theme="dark"] .dataTables_wrapper table thead th,
[data-bs-theme="dark"] .dataTables_wrapper table.dataTable thead th,
[data-bs-theme="dark"] table.dataTable thead th {
    background-color: #2352a1 !important;
    color: white !important;
    border-color: #1d4281 !important;
}

[data-bs-theme="dark"] .DTFC_LeftHeadWrapper table thead th,
[data-bs-theme="dark"] .DTFC_RightHeadWrapper table thead th {
    background-color: #2352a1 !important;
    color: white !important;
    border-color: #1d4281 !important;
}

/* Remove grey backgrounds from table rows - ALL tables */
/* BUT: Keep solid background for fixed columns */
.table tbody tr,
table tbody tr,
.dataTables_wrapper table tbody tr,
table.dataTable tbody tr {
    background-color: transparent !important;
}

/* Override: Fixed columns must have solid background */
table.dataTable tbody tr > .dtfc-fixed-start,
table.dataTable tbody tr > .dtfc-fixed-end,
table.dataTable tbody tr td.dtfc-fixed-start,
table.dataTable tbody tr td.dtfc-fixed-end,
table.dataTable tbody tr th.dtfc-fixed-start,
table.dataTable tbody tr th.dtfc-fixed-end {
    background-color: var(--bs-body-bg, #ffffff) !important;
    opacity: 1 !important;
}

/* Striped rows with custom color */
.table-striped tbody tr:nth-of-type(even),
.table-striped > tbody > tr:nth-of-type(even),
.dataTables_wrapper table tbody tr.even,
table.dataTable tbody tr.even {
    background-color: rgba(35, 82, 161, 0.05) !important;
}

.table-striped tbody tr:nth-of-type(odd),
.table-striped > tbody > tr:nth-of-type(odd),
.dataTables_wrapper table tbody tr.odd,
table.dataTable tbody tr.odd {
    background-color: transparent !important;
}

/* Hover effect with custom color - ALL tables */
.table-hover tbody tr:hover,
.table tbody tr:hover,
table tbody tr:hover,
.dataTables_wrapper table tbody tr:hover,
table.dataTable tbody tr:hover {
    background-color: rgba(35, 82, 161, 0.1) !important;
}

/* Dark mode table row styling */
[data-bs-theme="dark"] .table-striped tbody tr:nth-of-type(even),
[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(even),
[data-bs-theme="dark"] .dataTables_wrapper table tbody tr.even,
[data-bs-theme="dark"] table.dataTable tbody tr.even {
    background-color: rgba(35, 82, 161, 0.15) !important;
}

[data-bs-theme="dark"] .table-hover tbody tr:hover,
[data-bs-theme="dark"] .table tbody tr:hover,
[data-bs-theme="dark"] table tbody tr:hover,
[data-bs-theme="dark"] .dataTables_wrapper table tbody tr:hover,
[data-bs-theme="dark"] table.dataTable tbody tr:hover {
    background-color: rgba(35, 82, 161, 0.2) !important;
}

/* Action Button Icon Hover Styling */
/* Set button text color to white on hover so SVG currentColor works */
.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active,
.action-select-btn:hover,
.action-select-btn:focus,
.action-select-btn:active {
    color: white !important;
}

/* Make icon white when button is hovered using CSS filter */
/* This works by making the icon black first (brightness(0)), then inverting to white (invert(1)) */
.btn-outline-primary:hover svg,
.btn-outline-primary:focus svg,
.btn-outline-primary:active svg,
.action-select-btn:hover svg,
.action-select-btn:focus svg,
.action-select-btn:active svg,
.action-select-btn:hover .action-icon-svg,
.action-select-btn:focus .action-icon-svg,
.action-select-btn:active .action-icon-svg,
.btn-outline-primary:hover .action-icon-svg,
.btn-outline-primary:focus .action-icon-svg,
.btn-outline-primary:active .action-icon-svg {
    filter: brightness(0) invert(1) !important;
    -webkit-filter: brightness(0) invert(1) !important;
    transition: filter 0.15s ease-in-out;
}

/* Ensure SVG container has proper display */
.action-icon-svg {
    display: inline-block;
    vertical-align: middle;
}

/* Alternative approach: Force fill on all SVG elements */
.btn-outline-primary:hover svg use,
.btn-outline-primary:focus svg use,
.btn-outline-primary:active svg use,
.action-select-btn:hover svg use,
.action-select-btn:focus svg use,
.action-select-btn:active svg use {
    fill: white !important;
    color: white !important;
}

/* For SVG paths and groups */
.btn-outline-primary:hover svg path,
.btn-outline-primary:focus svg path,
.btn-outline-primary:active svg path,
.btn-outline-primary:hover svg g,
.btn-outline-primary:focus svg g,
.btn-outline-primary:active svg g,
.action-select-btn:hover svg path,
.action-select-btn:focus svg path,
.action-select-btn:active svg path,
.action-select-btn:hover svg g,
.action-select-btn:focus svg g,
.action-select-btn:active svg g {
    fill: white !important;
    stroke: white !important;
}

/* Ensure SVG inherits color on hover */
.btn-outline-primary:hover svg,
.action-select-btn:hover svg {
    color: white !important;
}

/* Dark mode support */
[data-bs-theme="dark"] .btn-outline-primary:hover svg,
[data-bs-theme="dark"] .btn-outline-primary:focus svg,
[data-bs-theme="dark"] .btn-outline-primary:active svg,
[data-bs-theme="dark"] .action-select-btn:hover svg,
[data-bs-theme="dark"] .action-select-btn:focus svg,
[data-bs-theme="dark"] .action-select-btn:active svg {
    filter: brightness(0) invert(1) !important;
    -webkit-filter: brightness(0) invert(1) !important;
}

[data-bs-theme="dark"] .btn-outline-primary:hover svg use,
[data-bs-theme="dark"] .btn-outline-primary:focus svg use,
[data-bs-theme="dark"] .btn-outline-primary:active svg use,
[data-bs-theme="dark"] .action-select-btn:hover svg use,
[data-bs-theme="dark"] .action-select-btn:focus svg use,
[data-bs-theme="dark"] .action-select-btn:active svg use {
    fill: white !important;
    color: white !important;
}

[data-bs-theme="dark"] .btn-outline-primary:hover svg path,
[data-bs-theme="dark"] .btn-outline-primary:focus svg path,
[data-bs-theme="dark"] .btn-outline-primary:active svg path,
[data-bs-theme="dark"] .btn-outline-primary:hover svg g,
[data-bs-theme="dark"] .btn-outline-primary:focus svg g,
[data-bs-theme="dark"] .btn-outline-primary:active svg g,
[data-bs-theme="dark"] .action-select-btn:hover svg path,
[data-bs-theme="dark"] .action-select-btn:focus svg path,
[data-bs-theme="dark"] .action-select-btn:active svg path,
[data-bs-theme="dark"] .action-select-btn:hover svg g,
[data-bs-theme="dark"] .action-select-btn:focus svg g,
[data-bs-theme="dark"] .action-select-btn:active svg g {
    fill: white !important;
    stroke: white !important;
}

[data-bs-theme="dark"] .btn-outline-primary:hover svg,
[data-bs-theme="dark"] .action-select-btn:hover svg {
    color: white !important;
}

/* SweetAlert above open Bootstrap modals (Task To Do, pipeline, etc.) */
body.modal-open .swal2-container {
    z-index: 200000 !important;
}

body.modal-open .swal2-popup {
    z-index: 200001 !important;
}

/* SweetAlert2 Custom Styling */
/* Make font smaller and text center aligned */
.swal2-popup {
    font-size: 0.75rem !important;
    text-align: center !important;
    padding: 1.25rem !important;
    width: 90% !important;
    max-width: 450px !important;
}

.swal2-title {
    font-size: 1rem !important;
    font-weight: 600 !important;
    text-align: center !important;
    justify-content: center !important;
    margin-bottom: 0.75rem !important;
    padding: 0 !important;
    line-height: 1.4 !important;
}

.swal2-content {
    font-size: 0.75rem !important;
    text-align: center !important;
    justify-content: center !important;
    padding: 0.5rem 0 !important;
    line-height: 1.5 !important;
}

.swal2-html-container {
    text-align: center !important;
    justify-content: center !important;
    font-size: 0.75rem !important;
    line-height: 1.5 !important;
}

.swal2-html-container * {
    text-align: center !important;
}

.swal2-icon {
    margin: 0 auto 1rem !important;
    width: 5em !important;
    height: 5em !important;
}

.swal2-icon.swal2-success {
    border-color: #a5dc86 !important;
}

.swal2-icon.swal2-success [class^=swal2-success-line] {
    background-color: #a5dc86 !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
    border: 4px solid rgba(165, 220, 134, 0.3) !important;
}

.swal2-actions {
    margin-top: 1rem !important;
    gap: 0.5rem !important;
    justify-content: center !important;
}

.swal2-confirm,
.swal2-cancel {
    font-size: 0.75rem !important;
    padding: 0.5rem 1rem !important;
    min-width: 80px !important;
}

/* Ensure backdrop covers entire page including navbar and sidebar */
.swal2-container {
    z-index: 99999 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
}

/* Backdrop overlay - covers everything */
.swal2-backdrop-show {
    background-color: rgba(0, 0, 0, 0.5) !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99998 !important;
}

/* Ensure backdrop covers layout-wrapper (includes sidebar and navbar) */
body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) {
    overflow: hidden !important;
}

/* Lower z-index for navbar and sidebar when SweetAlert is shown */
body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .layout-wrapper,
body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .layout-container,
body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .layout-page,
body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .layout-menu,
body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .navbar,
body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .layout-navbar,
body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .layout-menu-toggle {
    z-index: 1 !important;
}

/* Make sure backdrop container is above everything including navbar and sidebar */
.swal2-container.swal2-backdrop-show {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
}

/* Ensure popup is centered and above backdrop */
.swal2-popup {
    z-index: 100000 !important;
    position: relative !important;
}

/* SweetAlert2 Toast Validation Styling */
/* Custom styling for validation toast messages */
.swal2-toast-validation {
    max-width: 500px !important;
    width: auto !important;
    min-width: 300px !important;
    padding: 1rem 1.25rem !important;
    font-size: 0.875rem !important;
    text-align: left !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    position: relative !important;
}

.swal2-toast-validation .swal2-title {
    font-size: 1rem !important;
    font-weight: 600 !important;
    text-align: left !important;
    margin-bottom: 0.75rem !important;
    color: #dc3545 !important;
}

.swal2-toast-validation .swal2-html-container {
    text-align: left !important;
    font-size: 0.875rem !important;
    line-height: 1.6 !important;
    color: #495057 !important;
    max-height: 400px !important;
    overflow-y: auto !important;
    padding-right: 2rem !important; /* Add padding to prevent overlap with close button */
    margin-right: 0 !important;
}

.swal2-toast-validation .swal2-html-container * {
    text-align: left !important;
}

.swal2-toast-validation .swal2-html-container strong {
    font-weight: 600 !important;
    color: #212529 !important;
}

.swal2-toast-validation .swal2-html-container ul {
    margin-left: 1.5rem !important;
    margin-top: 0.5rem !important;
    margin-bottom: 0.5rem !important;
}

.swal2-toast-validation .swal2-html-container li {
    margin-bottom: 0.25rem !important;
}

/* Scrollbar styling for toast content */
.swal2-toast-validation .swal2-html-container::-webkit-scrollbar {
    width: 6px;
}

.swal2-toast-validation .swal2-html-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.swal2-toast-validation .swal2-html-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.swal2-toast-validation .swal2-html-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Custom Dropdown with Search Styling - Applied to all custom dropdowns */
[id$="DropdownContainer"] .dropdown-menu {
    padding: 0 !important;
}

[id$="DropdownContainer"] .dropdown-menu [id$="SearchInput"] {
    border: none !important;
    border-bottom: 1px solid #dee2e6 !important;
    border-radius: 0 !important;
    padding: 0.5rem 0.75rem !important;
}

[id$="DropdownContainer"] .dropdown-menu [id$="SearchInput"]:focus {
    outline: none !important;
    box-shadow: none !important;
    border-bottom-color: #696cff !important;
}

[id$="DropdownContainer"] .dropdown-menu .dropdown-item {
    padding: 0.5rem 0.75rem !important;
    cursor: pointer !important;
    transition: background-color 0.15s ease !important;
}

[id$="DropdownContainer"] .dropdown-menu .dropdown-item:hover {
    background-color: #f8f9fa !important;
}

[id$="DropdownContainer"] .dropdown-menu .dropdown-item:active {
    background-color: #e9ecef !important;
}

[id$="DropdownContainer"] .dropdown-menu .dropdown-divider {
    margin: 0 !important;
}

[id$="DropdownContainer"] [id$="DropdownBtn"] {
    position: relative !important;
}

[id$="DropdownContainer"] [id$="DropdownBtn"]:invalid {
    border-color: #dc3545 !important;
}

[id$="DropdownContainer"] [id$="DropdownBtn"]:invalid:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Position close button at top right corner */
.swal2-toast-validation .swal2-close {
    position: absolute !important;
    top: 0.5rem !important;
    right: 0.5rem !important;
    width: 1.5rem !important;
    height: 1.5rem !important;
    line-height: 1.5rem !important;
    font-size: 1.25rem !important;
    color: #6c757d !important;
    opacity: 0.7 !important;
    transition: opacity 0.2s ease !important;
    z-index: 10 !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
}

.swal2-toast-validation .swal2-close:hover {
    opacity: 1 !important;
    color: #495057 !important;
}

/* Disabled Form Controls - Better Text Readability */
/* Make disabled fields have better contrast for text readability */
.form-control:disabled,
.form-control[disabled],
.form-select:disabled,
.form-select[disabled],
textarea.form-control:disabled,
textarea.form-control[disabled],
input.form-control:disabled,
input.form-control[disabled] {
    background-color: #f5f5f5 !important;
    color: #495057 !important;
    opacity: 1 !important;
    border-color: #dee2e6 !important;
    cursor: not-allowed !important;
}

/* Dark mode support for disabled fields */
[data-bs-theme="dark"] .form-control:disabled,
[data-bs-theme="dark"] .form-control[disabled],
[data-bs-theme="dark"] .form-select:disabled,
[data-bs-theme="dark"] .form-select[disabled],
[data-bs-theme="dark"] textarea.form-control:disabled,
[data-bs-theme="dark"] textarea.form-control[disabled],
[data-bs-theme="dark"] input.form-control:disabled,
[data-bs-theme="dark"] input.form-control[disabled] {
    background-color: #3a3f44 !important;
    color: #e9ecef !important;
    opacity: 1 !important;
    border-color: #495057 !important;
}

/* Ensure disabled select options are also readable */
.form-select:disabled,
.form-select[disabled] {
    background-color: #f5f5f5 !important;
    color: #495057 !important;
    opacity: 1 !important;
}

[data-bs-theme="dark"] .form-select:disabled,
[data-bs-theme="dark"] .form-select[disabled] {
    background-color: #3a3f44 !important;
    color: #e9ecef !important;
}

/* ================================================================
   RESPONSIVE DESIGN - ALL SCREEN SIZES
   Breakpoints: xs(<576) sm(576-767) md(768-991) lg(992-1199) xl(1200+)
   ================================================================ */

/* --- Touch & Scroll (All Devices) --- */
.table-responsive,
.dataTables_scrollBody,
.dataTables_scroll {
    -webkit-overflow-scrolling: touch;
}

/* Prevent body overflow on mobile */
@media (max-width: 1199.98px) {
    .layout-page {
        min-width: 0;
    }
    .container-xxl,
    .container-fluid {
        max-width: 100% !important;
    }
}

/* ----------------------------------------------------------------
   Laptop / Large Tablet (992px – 1199px)
   Sidebar goes offcanvas at 1200px; content fills full width here
   ---------------------------------------------------------------- */
@media (max-width: 1199.98px) {
    .container-xxl {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    .container-p-y {
        padding-top: 1.25rem !important;
        padding-bottom: 1.25rem !important;
    }
    /* Reduce DataTable scroll height to give more breathing room */
    .dataTables_wrapper .dataTables_scrollBody {
        max-height: 60vh !important;
    }
}

/* ----------------------------------------------------------------
   Tablet Portrait (768px – 991px)
   ---------------------------------------------------------------- */
@media (max-width: 991.98px) {
    .container-p-y {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
    .card-body {
        padding: 1rem;
    }
    .dataTables_wrapper .dataTables_scrollBody {
        max-height: 55vh !important;
    }
    /* Slightly smaller table text for tablets */
    .table thead th,
    table.dataTable thead th {
        font-size: 0.8rem !important;
        padding: 0.5rem 0.6rem !important;
    }
    .table tbody td,
    table.dataTable tbody td {
        font-size: 0.8rem;
        padding: 0.45rem 0.6rem;
    }
    /* List header - allow buttons to wrap on tablet */
    .list-header {
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        padding: 0.875rem 1.25rem !important;
    }
    .list-header > div:last-child {
        flex-shrink: 0;
    }
}

/* ----------------------------------------------------------------
   Mobile (max 767px)
   ---------------------------------------------------------------- */
@media (max-width: 767.98px) {
    /* Content padding */
    .container-xxl {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    .container-p-y {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }
    .card-body {
        padding: 0.75rem;
    }
    .list-section,
    .filter-section {
        border-radius: 0.375rem;
    }

    /* Page title */
    h4.fw-bold,
    h5.fw-bold {
        font-size: 0.95rem !important;
    }
    .breadcrumb {
        font-size: 0.75rem;
    }

    /* --- List header: stack title + actions on mobile --- */
    .list-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
        padding: 0.75rem 1rem !important;
    }
    .list-header > div {
        width: 100%;
    }
    .list-header > div:last-child {
        display: flex !important;
        flex-wrap: wrap;
        gap: 0.4rem !important;
    }
    .list-header .btn {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 0.8rem;
        padding: 0.35rem 0.65rem !important;
    }

    /* Filter content padding */
    .filter-content {
        padding: 1rem !important;
    }
    /* Filter action buttons - full-width stacked on mobile */
    .filter-content .d-flex.justify-content-center.gap-3 {
        flex-direction: column;
        gap: 0.5rem !important;
    }
    .filter-content .d-flex.justify-content-center.gap-3 .btn {
        width: 100%;
    }

    /* List partial padding */
    .list-partial-content {
        padding: 0.75rem !important;
    }

    /* --- Tables on mobile --- */
    .table thead th,
    table.dataTable thead th {
        font-size: 0.72rem !important;
        padding: 0.4rem 0.5rem !important;
        white-space: nowrap;
    }
    .table tbody td,
    table.dataTable tbody td {
        font-size: 0.72rem;
        padding: 0.35rem 0.5rem;
    }
    /* Tighten action buttons inside table cells */
    .table td .btn,
    table.dataTable td .btn {
        padding: 0.2rem 0.35rem;
        font-size: 0.68rem;
    }
    .table td .d-flex.gap-2,
    table.dataTable td .d-flex.gap-2 {
        gap: 0.2rem !important;
    }
    .action-btn {
        width: 28px !important;
        height: 28px !important;
    }
    /* Employee name inline-block width */
    .employee-name {
        width: 120px !important;
        max-width: 28vw !important;
    }

    /* DataTable scroll height */
    .dataTables_wrapper .dataTables_scrollBody {
        max-height: 50vh !important;
    }

    /* --- DataTable controls on mobile --- */
    /* Length selector: left-aligned */
    .dataTables_wrapper .dataTables_length {
        text-align: left;
    }
    .dataTables_wrapper .dataTables_length label {
        font-size: 0.8rem;
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        white-space: nowrap;
    }
    .dataTables_wrapper .dataTables_length select {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
    /* Search input: left-aligned and full-width */
    .dataTables_wrapper .dataTables_filter {
        text-align: left !important;
        margin-top: 0.25rem;
    }
    .dataTables_wrapper .dataTables_filter label {
        font-size: 0.8rem;
        display: flex;
        align-items: center;
        gap: 0.35rem;
        width: 100%;
    }
    .dataTables_wrapper .dataTables_filter input {
        width: 100% !important;
        max-width: none !important;
        font-size: 0.8rem;
        margin-left: 0 !important;
        flex: 1;
    }
    /* Info and pagination: center-aligned */
    .dataTables_wrapper .dataTables_info {
        font-size: 0.75rem;
        text-align: center;
        padding-top: 0.5rem;
    }
    .dataTables_wrapper .dataTables_paginate {
        text-align: center !important;
        padding-top: 0.5rem;
    }
    .dataTables_wrapper .dataTables_paginate .paginate_button {
        padding: 0.25rem 0.45rem !important;
        font-size: 0.75rem;
    }

    /* Form controls */
    .form-control,
    .form-select {
        font-size: 0.8rem;
    }
    .form-label {
        font-size: 0.8rem;
        margin-bottom: 0.2rem;
    }

    /* Date range row: allow the 'to' separator to breathe */
    .filter-content .col-1.d-flex {
        padding-left: 0;
        padding-right: 0;
    }

    /* Navbar height compact on mobile */
    #layout-navbar.layout-navbar {
        padding-top: 0.4rem !important;
        padding-bottom: 0.4rem !important;
    }
}

/* ----------------------------------------------------------------
   Small Mobile (max 575px)
   ---------------------------------------------------------------- */
@media (max-width: 575.98px) {
    .container-xxl {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    .container-p-y {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
    .card-body {
        padding: 0.5rem;
    }
    .list-partial-content {
        padding: 0.5rem !important;
    }
    .filter-content {
        padding: 0.75rem !important;
    }

    /* Even smaller table text */
    .table thead th,
    table.dataTable thead th {
        font-size: 0.68rem !important;
        padding: 0.3rem 0.4rem !important;
    }
    .table tbody td,
    table.dataTable tbody td {
        font-size: 0.68rem;
        padding: 0.3rem 0.4rem;
    }

    .dataTables_wrapper .dataTables_scrollBody {
        max-height: 45vh !important;
    }

    /* SweetAlert2 on small screens */
    .swal2-popup {
        width: 95% !important;
        padding: 0.875rem !important;
        font-size: 0.72rem !important;
    }
    .swal2-title {
        font-size: 0.9rem !important;
    }

    /* Employee name */
    .employee-name {
        width: 100px !important;
        max-width: 24vw !important;
    }

    /* Filter date range: stack start/to/end vertically */
    .filter-content .row.g-2 > .col-6,
    .filter-content .row.g-2 > .col-1,
    .filter-content .row.g-2 > .col-5 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .filter-content .col-1.d-flex.align-items-center.justify-content-center {
        padding: 0.1rem 0;
        justify-content: flex-start !important;
    }

    /* List header title */
    .list-header h5 {
        font-size: 0.85rem !important;
    }
    /* Heading area shrink */
    .d-flex.justify-content-between.align-items-center.py-3 {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
        margin-bottom: 0.75rem !important;
    }
}

/* DataTables list grids: pastikan text-start / text-end / text-center di scroll & fixed columns */
.dataTables_wrapper table.dataTable thead th.text-end,
.dataTables_wrapper table.dataTable tbody td.text-end,
table.dataTable thead th.text-end,
table.dataTable tbody td.text-end {
    text-align: end !important;
}
.dataTables_wrapper table.dataTable thead th.text-start,
.dataTables_wrapper table.dataTable tbody td.text-start,
table.dataTable thead th.text-start,
table.dataTable tbody td.text-start {
    text-align: start !important;
}
.dataTables_wrapper table.dataTable thead th.text-center,
.dataTables_wrapper table.dataTable tbody td.text-center,
table.dataTable thead th.text-center,
table.dataTable tbody td.text-center {
    text-align: center !important;
}

