        /* Importing Google Fonts - Poppins */
        @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: "Poppins", sans-serif;
        }

        :root {
        /* Light theme colors */
            --color-text-primary: #1F2936;
            --color-text-placeholder: #798EAE;
            --color-bg-primary: #f7f7f7;
            --color-bg-secondary: #ECECFD;
            --color-bg-sidebar: #FFFFFF;
            --color-bg-sidebar2:rgb(241, 241, 243);
            --color-border-hr: #E2E8F0;
            --color-hover-primary: #695CFE;
            --color-hover-primary2: #F75C5C;
            --color-hover-secondary: #e2e2fb;
            --color-shadow: rgba(0, 0, 0, 0.05);
        }

        body.dark-theme {
        /* Dark theme colors */
            --color-text-primary: #F1F5F9;
            --color-text-placeholder: #A6B7D2;
            --color-bg-primary: #111827;
            --color-bg-secondary: #3D4859;
            --color-bg-sidebar: #1f2937;
            --color-bg-sidebar2: #2b323d;
            --color-border-hr: #3B475C;
            --color-hover-secondary: #48566a;
            --color-shadow: rgba(0, 0, 0, 0.3);
        }

        body {
            min-height: 100dvh;
            background: var(--color-bg-primary);
            scrollbar-color: var(--color-text-placeholder) transparent;
        }


        .sidebar {
            position: sticky;
            top: 0;
            width: 270px;
            height: 100dvh;
            display: flex;
            flex-shrink: 0;
            flex-direction: column;
            background: var(--color-bg-sidebar);
            border-right: 1px solid var(--color-border-hr);
            box-shadow: 0 3px 9px var(--color-shadow);
            transition: width 0.4s ease;
            z-index: 1040;
        }

        .sidebar.collapsed {
            width: 75px;
        }

        .sidebar .sidebar-header {
            padding: 10px 18px;
            display: flex;
            position: relative;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid var(--color-border-hr);
        }

        .sidebar-header .header-logo {
            width: 150px;
            height: 50px;
            display: block;
            object-fit: contain;
            transition: opacity 0.4s ease;
        }

        .sidebar.collapsed .header-logo {
            opacity: 0;
            pointer-events: none;
        }

        .site-nav .sidebar-toggle,
        .sidebar-header .sidebar-toggle {
            height: 40px;
            width: 40px;
            border: none;
            cursor: pointer;
            display: flex;
            position: absolute;
            right: 9px;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            color: var(--color-text-primary);
            background: var(--color-bg-secondary);
            transition: 0.4s ease;
            z-index: 1040;
        }

        .site-nav .sidebar-toggle:hover,
        .sidebar-header .sidebar-toggle:hover {
            background: var(--color-hover-secondary);
        }

        .sidebar.collapsed .sidebar-header .sidebar-toggle {
            transform: translateX(-2px);
            height: 48px;
            width: 50px;
        }

        .sidebar-header .sidebar-toggle span {
            font-size: 1.75rem;
            transition: transform 0.4s ease;
        }

        .sidebar.collapsed .sidebar-toggle span {
            transform: rotate(180deg);
        }

        .sidebar .sidebar-content {
            flex: 1;
            margin-left:-40px;
            padding: 10px 9px;
            overflow: hidden auto;
            scrollbar-width: thin;
            scrollbar-color: var(--color-text-placeholder) transparent;
        }

        .sidebar.collapsed .sidebar-content {
            scrollbar-width: none;
        }

        .sidebar-content .search-form {
            border-radius: 8px;
            min-height: 48px;
            margin: 5px 0 20px;
            margin-left:40px;
            align-items: center;
            display: flex;
            padding: 0 15px;
            white-space: nowrap;
            background: var(--color-bg-secondary);
            transition: 0.4s ease;
        }

        .sidebar.collapsed .search-form:hover {
            cursor: pointer;
        }

        .sidebar-content .search-form:focus-within,
        .sidebar.collapsed .search-form:hover {
            background: var(--color-hover-secondary);
        }

        .sidebar-content .search-form span {
            color: var(--color-text-placeholder);
        }

        .search-form input {
            background: none;
            outline: none;
            border: none;
            width: 100%;
            margin-left: 15px;
            font-size: 1rem;
            color: var(--color-text-primary);
        }

        .search-form input::placeholder {
            color: var(--color-text-placeholder);
        }

        .sidebar-content .menu-list {
            display: flex;
            gap: 4px;
            list-style: none;
            flex-direction: column;
        }

        .menu-list .menu-link {
            display: flex;
            gap: 12px;
            white-space: nowrap;
            border-radius: 8px;
            padding: 12px 15px;
            align-items: center;
            text-decoration: none;
            color: var(--color-text-primary);
            transition: 0.3s ease;
        }

        .menu-link .menu-label,
        .submenu-link .menu-label {
            transition: opacity 0.3s ease;
        }

        .sidebar.collapsed .menu-link .menu-label,
        .sidebar.collapsed .submenu-link .menu-label {
            opacity: 0;
            pointer-events: none;
        }

        .menu-list .menu-link:is(:hover, .active) {
            color: #fff;
            background: var(--color-hover-primary);
        }

        .sidebar .sidebar-footer {
            padding: 10px 9px;
            white-space: nowrap;
            border-top: 1px solid var(--color-border-hr);
        }

        .sidebar-footer .theme-toggle {
            width: 100%;
            min-height: 48px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            cursor: pointer;
            border: none;
            padding: 0 15px;
            white-space: nowrap;
            color: var(--color-text-primary);
            background: var(--color-bg-secondary);
            transition: 0.3s ease;
        }

        .sidebar-footer .theme-toggle:hover {
            background: var(--color-hover-secondary);
        }

        .theme-toggle .theme-label {
            display: flex;
            gap: 10px;
            align-items: center;
        }

        .theme-toggle .theme-label .theme-text {
            font-size: 1rem;
            transition: opacity 0.4s 0.2s ease;
        }

        .sidebar.collapsed .theme-toggle :where(.theme-text, .theme-toggle-track) {
            opacity: 0;
            width: 0;
            transition: all 0.2s ease;
        }

        .theme-toggle .theme-toggle-track {
            height: 24px;
            width: 48px;
            border-radius: 999px;
            margin-left: auto;
            background: #c3d1ec;
            position: relative;
            transition: opacity 0.4s 0.2s ease, background-color 0.3s ease;
        }

        body.dark-theme .theme-toggle-track {
            background: #695CFE;
        }

        .theme-toggle-track .theme-toggle-indicator {
            position: absolute;
            top: 3px;
            left: 3px;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background-color: #fff;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s ease;
        }

        body.dark-theme .theme-toggle-indicator {
        transform: translateX(24px);
        }

        .site-nav {
            top: 0;
            display: none;
            padding: 15px 20px;
            position: sticky;
            background: var(--color-bg-primary);
            border-bottom: 1px solid var(--color-border-hr);
            z-index:1000;
        }

        .site-nav .sidebar-toggle {
            position: unset;
        }

        /* NEW ATAS */
        .layout-wrapper {
            display: flex; /* Sidebar kiri, konten kanan */
            min-height: 100dvh;
        }

        .layout-wrapper > .containerrr {
            display: flex;
            flex-direction: column;
            flex: 1;
            background-color: var(--color-bg-primary);
            color: var(--color-text-primary);
        }

        .containerrr .topbarrr {
            position: sticky;
            top: 0;
            z-index: 1039 !important;
            background-color: var(--color-bg-sidebar);
            height: 71px;
            color: white;
            display: flex;
            align-items: center;
            padding: 0 20px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            border-bottom: 1px solid var(--color-border-hr);
        }

        .containerrr .main-content {
            flex: 1;
            padding: 30px;
            color: var(--color-text-primary);
        }

        .topbarrr .page-title {
            font-size: 1.1rem;
            font-weight: bold;
            margin-left: 20px;
            color: var(--color-text-primary);
            margin-top:10px;
            vertical-align: middle !important;
        }

        .main-content .carddd {
            border-radius: 8px;
            padding: 20px;
            background-color: var(--color-bg-sidebar);
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
        }

        .main-content .carddd2 {
            border-radius: 8px;
            padding: 20px;
        }
        /* NEW BAWAH */

    /* Responsive media query code for small screens */
        @media (max-width: 768px) {
        body::before {
            content: "";
            position: fixed;
            inset: 0;
            z-index: 10;
            opacity: 0;
            pointer-events: none;
            background: rgba(0, 0, 0, 0.6);
            transition: 0.4s ease;
        }

        body:has(.sidebar:not(.collapsed))::before {
            opacity: 1;
            pointer-events: auto;
        }

        body:has(.sidebar:not(.collapsed)) {
            overflow: hidden;
        }

        .topbarrr {
            display: none !important;
        }

        .site-nav {
            display: block;
            z-index: 1000;
        }

        .sidebar {
            position: fixed;
            top: 0;
            left: 0;
            height: 100%;
            z-index: 1040;
            width: 270px;
            transition: left 0.4s ease;
        }

        .sidebar.collapsed {
            left: -270px;
            width: 270px;
        }

        .containerrr .main-content {
            padding: 30px 20px;
        }
        .theme-toggle {
            width: 100%;
            min-height: 48px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            cursor: pointer;
            border: none;
            padding: 0 15px;
            white-space: nowrap;
            color: var(--color-text-primary);
            background: var(--color-bg-secondary);
            transition: 0.3s ease;
        }

    }


    .table-custom {
        width: 100%;
        border-collapse: separate; /* wajib untuk border-radius */
        border-spacing: 0;
        background-color: var(--color-bg-sidebar);
        color: var(--color-text-primary);
        border: 1px solid var(--color-border-hr);
        font-size: 0.95rem;
        border-radius: 8px;
        overflow: hidden;
    }

    .table-custom thead {
        background-color: var(--color-bg-secondary);
    }

    .table-custom th,
    .table-custom td {
        padding: 12px 16px;
        text-align: left;
        border: 1px solid var(--color-border-hr); /* Border penuh */
    }

    .table-custom tbody tr:hover {
        background-color: var(--color-hover-secondary);
    }

    .table-custom thead tr:first-child th:first-child {
        border-top-left-radius: 8px;
    }

    .table-custom thead tr:first-child th:last-child {
        border-top-right-radius: 8px;
    }

    .table-custom tbody tr:last-child td:first-child {
        border-bottom-left-radius: 8px;
    }

    .table-custom tbody tr:last-child td:last-child {
        border-bottom-right-radius: 8px;
    }

    .table-wrapper {
        width: 100%;
        overflow-x: auto;
        margin-top: 1rem;
        border-radius: 8px;
    }

    /* Sidebar Menu */
    .menu-list .menu-item {
        position: relative;
    }

    .menu-list .menu-link {
        display: flex;
        gap: 12px;
        align-items: center;
        text-decoration: none;
        border-radius: 8px;
        padding: 12px 15px;
        white-space: nowrap;
        color: var(--color-text-primary);
        background: transparent;
        transition: 0.3s ease;
        cursor: pointer;
    }

    .menu-list .menu-link:hover,
    .menu-list .menu-link.active {
        color: #fff;
        background-color: var(--color-hover-primary);
    }

    /* Submenu wrapper */
    .has-submenu .submenu {
        list-style: none;
        padding-left: 40px;
        margin-top: 5px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease, opacity 0.5s ease;
    }

    .has-submenu.open .submenu {
        display: block;
        max-height: 1000px; /* Adjust if needed */
    }

    /* Submenu link */
    .submenu-link {
        display: block;
        padding: 6px;
        margin-bottom: 2px;;
        color: var(--color-text-primary);
        text-decoration: none;
        font-size: 0.9rem;
        border-radius: 6px;
        transition: 0.3s ease;
    }
    .sidebar.collapsed .submenu-link {
        margin-left: -30px;
        max-height: 40px;
    }

    .submenu-link:hover {
        color: var(--color-text-primary);
        background-color: var(--color-bg-secondary);
    }

    /* Submenu arrow rotate when open */
    .submenu-arrow {
        margin-left: auto;
        transition: transform 0.3s;
    }

    .has-submenu.open .submenu-arrow {
        transform: rotate(180deg);
    }
    .submenu-link.active {
        color: var(--color-text-primary);
        background-color: var(--color-bg-secondary);
        padding-left: 12px;
    }
    .modal-content {
        background-color: var(--color-bg-primary) !important;
        color: var(--color-text-primary) !important;
        border: 1px solid var(--color-border-hr) !important;
        box-shadow: 0 5px 15px var(--color-shadow) !important;
    }

    .modal-header,
    .modal-footer {
        border-color: var(--color-border-hr) !important;
    }

    body.dark-theme .btn-close {
        filter: invert(1);
    }

    .btn-hover-machine {
        color: var(--color-text-primary);
        border: 1px solid var(--color-text-primary);
        background-color: transparent;
        transition: 0.3s ease;
        padding: 10px;
        border-radius: 8px;
        text-align: center;
    }

    .btn-hover-machine:hover {
        background-color: var(--color-hover-secondary);
        color: var(--color-hover-primary);
        border-color: var(--color-hover-primary);
        box-shadow: 0 4px 10px var(--color-shadow);
        cursor: pointer;
    }

    .btn-hover-machine .material-symbols-rounded {
        font-size: 64px;
        display: block;
        transition: 0.3s ease;
    }

    .btn-hover-machine:hover .material-symbols-rounded {
        color: var(--color-hover-primary);
    }

    /* SELECT2 style selaras tema */
    .select2-container--bootstrap-5 .select2-selection--single {
        background-color: var(--color-bg-secondary) !important;
        color: var(--color-text-primary) !important;
        border: 1px solid var(--color-border-hr) !important;
        height: 38px;
        padding: 6px 12px;
        font-size: 1rem;
    }

    .select2-container--bootstrap-5 .select2-selection__rendered {
        color: var(--color-text-primary) !important;
    }

    .select2-container--bootstrap-5 .select2-selection__placeholder {
        color: var(--color-text-placeholder) !important;
    }

    .select2-container--bootstrap-5 .select2-dropdown {
        background-color: var(--color-bg-sidebar);
        color: var(--color-text-primary);
        border: 1px solid var(--color-border-hr);
    }

    .select2-container--bootstrap-5 .select2-results__option--highlighted {
        background-color: var(--color-hover-primary2);
        color: white;
    }
    /* Style untuk input search di dropdown Select2 */
    .select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field {
        background-color: var(--color-bg-secondary) !important;
        color: var(--color-text-primary) !important;
        border: 1px solid var(--color-border-hr);
    }

    /* Placeholder di search input */
    .select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field::placeholder {
        color: var(--color-text-placeholder);
    }

    /* Tambahkan ini ke CSS kamu */
    .dataTables_filter {
        margin-bottom: 10px;
    }
    .dataTables_filter input {
        color:  var(--color-text-primary); /* Ganti dengan warna yang diinginkan */
    }

    .dataTables_length {
        display: flex;
        align-items: center;
        gap: 8px; /* Jarak antara label dan select */
    }

    .dataTables_length label {
        display: flex;
        align-items: center;
        gap: 8px; /* Pastikan label dan select tetap rapat */
        margin-bottom: 0; /* Hilangkan margin bawah bawaan */
    }

    .dataTables_length .select2-container {
        width: 75px !important; /* Supaya tidak terlalu lebar */
    }
    #datatablesX {
        position: relative;
        z-index: 500;
    }
    /* Untuk semua tombol pagination */
    .dataTables_wrapper .dataTables_paginate .paginate_button {
        border-radius: 10px !important;
        padding: 2px 10px;
        margin: 2px;
    }
    /* Hover effect */
    .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
        border-radius: 10px !important;
    }
    /* Halaman yang aktif (selected) */
    .dataTables_wrapper .dataTables_paginate .paginate_button.current {
        border-radius: 10px !important;
    }

    .buttonnnn{
        color:  var(--color-text-primary);
        background-color: transparent;
    }

    .swal-title-sm {
        font-size: 16px;
    }
    .swal-popup-sm {
        font-size: 14px;
        padding: 1.5em;
    }
    .swal-button-sm {
        font-size: 13px;
        padding: 0.4em 1em;
    }
    .table-responsive{
        scrollbar-color: var(--color-text-placeholder) transparent;
    }

    /* Untuk Chrome, Safari, Edge, Opera */
    input[type=number]::-webkit-outer-spin-button,
    input[type=number]::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

    /* Untuk Firefox */
    input[type=number] {
        -moz-appearance: textfield;
    }
