.switch {
    --_switch-bg-clr: #007bff;
    --_switch-padding: 4px; /* padding around button*/
    --_slider-bg-clr: rgba(12, 74, 110, 0.65); /* slider color unchecked */
    --_slider-bg-clr-on: rgba(12, 74, 110, 1); /* slider color checked */
    --_slider-txt-clr: #ffffff;
    --_label-padding: 0.2rem 0.8rem; /* padding around the labels -  this gives the switch it's global width and height */
    --_switch-easing: cubic-bezier( 0.47, 1.64, 0.41, 0.8 ); /* easing on toggle switch */
    color: white;
    width: fit-content;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    border-radius: 9999px;
    cursor: pointer;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    position: relative;
    isolation: isolate;
    margin: 0;
    font-size: 10px;
}

    .switch input[type="checkbox"] {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border-width: 0;
    }

    .switch > span {
        display: grid;
        place-content: center;
        transition: opacity 300ms ease-in-out 150ms;
        padding: var(--_label-padding);
    }

    .switch::before,
    .switch::after {
        content: "";
        position: absolute;
        border-radius: inherit;
        transition: inset 150ms ease-in-out;
    }
    /* switch slider */
    .switch::before {
        background-color: var(--_slider-bg-clr);
        inset: var(--_switch-padding) 50% var(--_switch-padding) var(--_switch-padding);
        transition: inset 500ms var(--_switch-easing), background-color 500ms ease-in-out;
        z-index: -1;
        box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.3), 0 1px rgba(255, 255, 255, 0.3);
    }
    /* switch bg color */
    .switch::after {
        background-color: var(--_switch-bg-clr);
        inset: 0;
        z-index: -2;
    }
    /* switch hover & focus */
    .switch:focus-within::after {
        inset: -0.25rem;
    }

    .switch:has(input:checked):hover > span:first-of-type,
    .switch:has(input:not(:checked)):hover > span:last-of-type {
        opacity: 1;
        transition-delay: 0ms;
        transition-duration: 100ms;
    }
    /* switch hover */
    .switch:has(input:checked):hover::before {
        inset: var(--_switch-padding) var(--_switch-padding) var(--_switch-padding) 45%;
    }

    .switch:has(input:not(:checked)):hover::before {
        inset: var(--_switch-padding) 45% var(--_switch-padding) var(--_switch-padding);
    }
    /* checked - move slider to right */
    .switch:has(input:checked)::before {
        background-color: var(--_slider-bg-clr-on);
        inset: var(--_switch-padding) var(--_switch-padding) var(--_switch-padding) 50%;
    }
    /* checked - set opacity */
    .switch > span:last-of-type,
    .switch > input:checked + span:first-of-type {
        opacity: 0.75;
    }

    .switch > input:checked ~ span:last-of-type {
        opacity: 1;
    }


    .alert {
        text-align: left;
    }

.table thead th {
    border-bottom: 0px;
    border-top: 0px;
}

.table-bordered > :not(caption) > * {
    border: 1px solid #dee2e6 !important;
}

.table-bordered td, .table-bordered th {
    border: 2px solid #dee2e6;
}

tbody,
td,
tfoot,
th,
thead,
tr {
    border-color: inherit;
    border-style: solid;
    border-width: 0;
    border-bottom: 0 none;
}

.multiselect-container {
    min-width: max-content !important;
}

    .multiselect-container .dropdown-item {
        padding-left: 10px !important;
    }

.multiselect-native-select {
    flex: 1 1 auto !important;
}

.login-box,
.register-box {
    width: 60%;
}

/* Ukuran extra small untuk form-control */
.form-control-xs {
    padding: 0.15rem 0.25rem;
    font-size: 0.75rem;
    line-height: 1.2;
    border-radius: 0.15rem;
    height: auto; /* biar fleksibel dengan isi */
}

/* Khusus untuk <select> biar sejajar dan tidak terlalu tinggi */
select.form-control-xs {
    padding-top: 0.15rem;
    padding-bottom: 0.15rem;
    height: calc(1.4em + 0.3rem + 2px);
}


.cursor-pointer {
    cursor: pointer;
}

@media (max-width: 576px) {
    .login-box,
    .register-box {
        margin-top: 0.5rem;
        width: 90%;
    }
}

.login-box .card,
.register-box .card {
    margin-bottom: 0;
}

.datatables {
    width: 100% !important;
}

.scrollbar-top,
.dt-scrollbar-top {
    position: static;
    top: 55px;
    z-index: 10;
    background-color: #fff;
    width: 100%;
    overflow-x: scroll;
    overflow-y: hidden;
    height: 20px;
}
div.dt-scroll-body {
    border-bottom-style: none !important;
}

.overlay-submit {
    display: none;
    position: fixed;
    z-index: 9999;
    height: 2em;
    width: 2em;
    overflow: show;
    margin: auto;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

    .overlay-submit:before {
        content: '';
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

.breadcrumb-item a {
    text-decoration: none;
    color: #000;
}

.nav-tabs .nav-item .nav-link {
    color: #000;
}

.nav-tabs .nav-item .active {
    box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;
    font-weight: 500;
    color: #0D6EFD;
}


/*STEPPER*/
.steps {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: auto;
}

.step-item {
    display: flex;
    align-items: center;
    flex: 1 0 32px;
    border: 0.1px solid #D9D9D9;
    padding: 6px;
    gap: 4px;
    background-color: #fff;
    color: #BABABA;
    text-decoration: none;
    height: 72px;
    min-width: 150px;
}

.step-item-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0.8 0 0px;
    border: 0.1px solid #D9D9D9;
    padding: 6px;
    gap: 4px;
    background-color: #fff;
    color: #BABABA;
    text-decoration: none;
    height: 72px;
    min-width: 100px;
}

.steps .btn-step {
    display: flex;
    align-items: center;
    border: 0.1px solid #D9D9D9;
    padding: 6px;
    gap: 4px;
    background-color: #fff;
    text-decoration: none;
    height: 72px;
}

.step-number {
    text-align: center;
    padding: 4px 12px;
    border-radius: 4px;
}

.step-item.active,
.step-item-tab.active {
    border-bottom: 3px solid #007BFF;
    color: #000;
}

.step-item.completed {
    border-bottom: 3px solid #85FF91;
    color: #000;
}

.step-item .step-completed {
    display: none;
    color: #85FF91;
    text-align: center;
    padding: 4px 12px;
    border-radius: 4px;
}

.step-item.completed .step-completed {
    display: block;
}

.step-item.completed .step-number {
    display: none;
}

.breadcrumb.sub-steps .breadcrumb-item {
    font-size: 12px;
    color: #BABABA;
}

    .breadcrumb.sub-steps .breadcrumb-item.active,
    .breadcrumb.sub-steps .breadcrumb-item.active a {
        color: #007BFF;
    }

.breadcrumb .breadcrumb-item,
.breadcrumb .breadcrumb-item a {
    color: #BABABA;
}

    .breadcrumb .breadcrumb-item.active {
        color: #000;
    }

.dropdown-sub-steps button.btn {
    background-color: #fff !important;
    color: #0d6efd;
    font-size: 12px;
    -webkit-box-shadow: 0px 6px 7px -3px rgba(0,0,0,0.1);
    -moz-box-shadow: 0px 6px 7px -3px rgba(0,0,0,0.1);
    box-shadow: 0px 6px 7px -3px rgba(0,0,0,0.1);
}

.dropdown-sub-steps button.btn:focus {
    box-shadow: 0;
}

.dropdown-sub-steps .dropdown-item,
.dropdown-sub-steps .dropdown-item a {
    font-size: 12px;
}

/*Multiselect*/
.multiselect-container {
    width: 100%;
}

    .multiselect-container .multiselect-search {
        width: 100%;
    }

    .multiselect-container.dropdown-menu.show {
        display: flex !important;
        flex-direction: column !important;
        justify-content: start !important;
        max-height: 300px !important;
        overflow: auto !important;
    }

    .multiselect-container .dropdown-item {
        width: 100%;
    }

    .multiselect-container .form-check {
        text-wrap: wrap;
        display: flex !important;
        justify-content: start !important;
        width: 100%; 
    }

/*Datepicker*/
.datepicker.datepicker-dropdown {
    padding: 12px;
    z-index: 1600 !important;
}

/*DataTable*/
.dt-container .dt-search {
    display: none;
}

table .fixed-col {
    position: sticky;
    border-top: 5px solid #dee2e6;
    border-bottom: 5px solid #dee2e6;
}

table th.fixed-col {
    z-index: 200 !important;
}
table td.fixed-col {
    z-index: 100 !important;
}

tr .fixed-col::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 3px; /* Lebar border yang diinginkan */
    height: 100%;
    background-color: #dee2e6; /* Warna border yang diinginkan */
}

.fixed-col:not(.no-bg-fixed) {
    background-color: #f8f9fa !important;
}

.overlay-container,
.overlay-step {
    display: none
}

@media only screen and (max-width: 568px) {
    .overlay-container {
        display: block;
        position: sticky;
        right: 0;
        height: 48px;
    }

    .overlay-step {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 70px;
        height: 100%;
        background: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 150%);
        opacity: 1;
        transition: opacity 0.2s ease-out, width 0.2s ease-out;
        pointer-events: none; /* Supaya tidak mengganggu interaksi */
    }
}


@media only screen and (max-width: 768px) {
    .breadcrumb.sub-steps .breadcrumb-item {
        display: none;
    }

    .steps .step-item,
    .steps .btn.btn-step,
    .steps .step-item-tab {
        height: 48px;
        font-size: 12px;
    }

    .content-header .breadcrumb-item {
        font-size: 12px;
    }

    .content-header h5 {
        font-size: 18px;
    }

    .content-header span {
        font-size: 14px;
    }

    table .fixed-col {
        border-top: 1px solid #dee2e6;
        border-bottom: 1px solid #dee2e6;
    }
    tr .fixed-col::after {
        width: 1px; /* Lebar border yang diinginkan */
        height: 100%;
        background-color: #dee2e6; /* Warna border yang diinginkan */
    }
    .fixed-col:not(.no-bg-fixed) {
        background-color: #fff !important;
    }


    /*    .steps .step-item-tab {
        height: 32px;
        font-size: 10px;
    }*/

    .datatable-items,
    .datatable-items thead,
    .datatable-items tbody,
    .datatable-items th,
    .datatable-items td,
    .datatable-items tr,
    .table-block,
    .table-block .thead-block,
    .table-block .tbody-block,
    .table-block .th-block,
    .table-block .td-block,
    .table-block .tr-block {
        display: block;
    }

        .datatable-items thead tr,
        .table-block .thead-block .tr-block {
            position: absolute;
            top: -9999px;
            left: -9999px;
        }

        .datatable-items tr,
        .table-block .tr-block {
            border: 1px solid #ccc;
        }

        .datatable-items td,
        .table-block .td-block {
            border: none;
            border-bottom: 1px solid #eee;
            height: auto;
            white-space: normal;
            text-align: right !important;
            display: grid;
            grid-template-columns: 45% auto; /* Label 45%, konten sisanya */
            align-items: stretch; /* Pastikan semua elemen memiliki tinggi yang sama */
        }


        /*fix bug different color on last tr*/
        .datatable-items tr:last-child td,
        .table-block .tr-block:last-child .td-block {
            border-bottom: 1px solid #eee !important;
        }

        .datatable-items td:before,
        .table-block .td-block:before {
            content: attr(data-label);
            text-align: left !important;
            font-weight: bold;
            padding-right: 10px;
            display: block;
            word-wrap: break-word;
        }
}




/*Responsive width*/
/* Small devices (landscape phones, 576px and up)*/ @media (min-width: 576px) {
    .d-sm-none {
        display: none;
    }

    .d-sm-block {
        display: block;
    }

    .w-sm-100 {
        width: 100% !important;
    }

    .w-sm-75 {
        width: 75% !important;
    }

    .w-sm-50 {
        width: 50% !important;
    }

    .w-sm-25 {
        width: 25% !important;
    }

    .w-sm-fit {
        width: fit-content !important;
    }

    .h-sm-100 {
        height: 100% !important;
    }

    .h-sm-75 {
        height: 75% !important;
    }

    .h-sm-50 {
        height: 50% !important;
    }

    .h-sm-25 {
        height: 25% !important;
    }
}

/* Medium devices (tablets, 768px and up)*/ @media (min-width: 768px) {
    .d-md-none {
        display: none;
    }

    .d-md-block {
        display: block;
    }

    .w-md-100 {
        width: 100% !important;
    }

    .w-md-75 {
        width: 75% !important;
    }

    .w-md-50 {
        width: 50% !important;
    }

    .w-md-25 {
        width: 25% !important;
    }

    .w-md-fit {
        width: fit-content !important;
        }

    .h-md-100 {
        height: 100% !important;
    }

    .h-md-75 {
        height: 75% !important;
    }

    .h-md-50 {
        height: 50% !important;
    }

    .h-md-25 {
        height: 25% !important;
    }
}

/* Large devices (desktops, 992px and up)*/ @media (min-width: 992px) {
    .d-lg-none {
        display: none;
    }

    .d-lg-block {
        display: block;
    }

    .w-lg-100 {
        width: 100% !important;
    }

    .w-lg-75 {
        width: 75% !important;
    }

    .w-lg-50 {
        width: 50% !important;
    }

    .w-lg-25 {
        width: 25% !important;
    }

    .w-sm-fit {
        width: fit-content !important;
    }

    .h-lg-100 {
        height: 100% !important;
    }

    .h-lg-75 {
        height: 75% !important;
    }

    .h-lg-50 {
        height: 50% !important;
    }

    .h-lg-25 {
        height: 25% !important;
    }
}

/* Extra large devices (large desktops, 1200px and up)*/ @media (min-width: 1200px) {
    .w-xl-100 {
        width: 100% !important;
    }

    .w-xl-75 {
        width: 75% !important;
    }

    .w-xl-50 {
        width: 50% !important;
    }

    .w-xl-25 {
        width: 25% !important;
    }

    .h-xl-100 {
        height: 100% !important;
    }

    .h-xl-75 {
        height: 75% !important;
    }

    .h-xl-50 {
        height: 50% !important;
    }

    .h-xl-25 {
        height: 25% !important;
    }
}