:root {
    --jc-sidebar-width: 240px;
    --bs-font-sans-serif: 'Inter', sans-serif;
    --jc-btn-border-colour: #fff;
    --jc-btn-outline-colour: #000;
}

[data-bs-theme=dark] {
    --jc-btn-border-colour: #000;
    --jc-btn-outline-colour: #fff;
    --bs-body-bg: #000;
    color-scheme: dark;
}

/* Reboot */
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
    font-weight: 700;
}

a {
    text-decoration: none;
}

/* Bodyu and Main Section */
.main-body {
    display: flex;
    flex-flow: row;
    height: 100vh;
    transition: background-color .5s;
}

/* .main-body.hide {
    overflow: hidden;
} */

.section-main {
    padding: 1.25rem;
    width: calc(100% - var(--jc-sidebar-width));
    left: var(--jc-sidebar-width);
    position: relative;
    height: max-content;
}

.section-main.height-full {
    height: 100%;
    overflow: hidden;
}

/* Loader */
#loading-container {
    position: fixed;
    left: var(--jc-sidebar-width);
    top: 0;
    bottom: 0;
    right: 0;
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    z-index: 1090;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

#loading-container.hide {
    display: none;
}

.loading-wrapper {
    text-align: center;
    max-width: calc(300px + 2rem);
    padding: 1rem;
}

/* Buttons */
.btn {
    border-width: 1px;
    transition: 0s;
}

.btn:active {
    border-color: var(--jc-btn-border-colour) !important;
    outline: 2px solid var(--jc-btn-outline-colour) !important;
}

.btn-icon {
    height: 2.5rem;
    width: 2.8rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 5rem;
}

.btn-sm.btn-icon {
    height: 2.3rem;
    width: 2.5rem;
}

.btn-icon .btn-icon-text {
    display: none;
    margin-left: .5rem;
}

/* .btn-icon:hover {
    width: auto;
    padding: 0 .5rem;
}

.btn-icon:hover .btn-icon-text {
    display: inline-block;
} */

.input-group-append-icon {
    position: relative;
}

.input-group-append-icon input {
    padding-right: 2.5rem;
}

.input-group-append-icon .btn {
    width: 2.5rem;
    color: var(--bs-secondary);
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-group-append-icon .btn:not(a, button) {
    cursor: initial;
}

/* Badge */
.badge {
    background-color: rgba(var(--badge-color), 0.1);
    border: 1px solid rgba(var(--badge-color), 0.4);
    font-weight: 500;
    font-size: 80%;
    letter-spacing: .2px;
    color: rgba(var(--badge-color), 1);
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    padding: 0.3rem 0.5rem 0.22rem;
}

.badge.badge-success {
    --badge-color: var(--bs-success-rgb);
}

.badge.badge-danger {
    --badge-color: var(--bs-danger-rgb);
}

.badge.badge-warning {
    --badge-color: 253, 126, 20;
}

.badge.badge-info {
    --badge-color: var(--bs-info-rgb);
}

.badge.badge-primary {
    --badge-color: var(--bs-primary-rgb);
}

.badge.badge-secondary {
    --badge-color: var(--bs-secondary-rgb);
}

.badge.badge-dark {
    --badge-color: var(--bs-dark-rgb);
}

.badge.badge-light {
    --badge-color: var(--bs-light-rgb);
}

[data-bs-theme=dark] .badge.badge-dark {
    --badge-color: var(--bs-light-rgb);
}

[data-bs-theme=dark] .badge.badge-light {
    --badge-color: var(--bs-dark-rgb);
}

/* Navigation */
.nav-icons {
    display: inline-block;
    width: 1.5rem;
}

.nav-item {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

.nav-menu {
    height: 100vh;
    flex-shrink: 0;
    width: var(--jc-sidebar-width);
    background-color: var(--bs-dark);
    position: fixed;
    top: 0;
    z-index: 1000;
}

.nav-menu .nav-area {
    overflow: auto;
    flex-wrap: nowrap;
}

.nav-menu .nav-link {
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    transition: 0s;
    border: 2px solid transparent;
    padding: .25rem 0.75rem;
    margin-bottom: 0.25rem;
}

.nav-menu .nav-link:hover {
    background-color: var(--bs-black);
}

.nav-menu .nav-link.active:hover {
    background-color: var(--bs-link-hover-color);
}

.nav-menu .nav-link:active {
    border-color: #fff;
}

#nav-wrapper {
    width: 100%;
    flex-flow: column;
    justify-content: space-between;
    align-items: stretch;
    overflow: hidden;
}

.navw-bottom::before,
.nav-site-title::after {
    border-top: 1px solid;
    opacity: .25;
    margin: 1rem 0;
    content: "";
    display: block;
    width: 100%;
}

.table-nopadding td,
.table-nopadding th {
    padding: 0;
}

.table-action td {
    vertical-align: middle;
}

.table-action td:last-child {
    /* padding: .25rem; */
    text-align: center;
}

.table-numbering td:first-child {
    text-align: center;
}

[data-bs-theme=dark] .table-warning,
[data-bs-theme=dark] .table-primary,
[data-bs-theme=dark] .table-success,
[data-bs-theme=dark] .table-danger,
[data-bs-theme=dark] .table-info,
[data-bs-theme=dark] .table-dark,
[data-bs-theme=dark] .table-light {
    --bs-table-bg:
    rgba(var(--this-bg-colour), 0.2);
    --bs-table-hover-color: inherit;
    --bs-table-border-color: inherit;
    color: inherit;
}

[data-bs-theme=dark] .table-warning {
    --this-bg-colour: var(--bs-warning-rgb);
}

[data-bs-theme=dark] .table-primary {
    --this-bg-colour: var(--bs-primary-rgb);
}

[data-bs-theme=dark] .table-success {
    --this-bg-colour: var(--bs-success-rgb);
}

[data-bs-theme=dark] .table-danger {
    --this-bg-colour: var(--bs-danger-rgb);
}

[data-bs-theme=dark] .table-info {
    --this-bg-colour: var(--bs-info-rgb);
}

[data-bs-theme=dark] .table-dark {
    --this-bg-colour: var(--bs-dark-rgb);
}

[data-bs-theme=dark] .table-light {
    --this-bg-colour: var(--bs-light-rgb);
}

/* .table-action td:last-child .btn {
    margin: .25rem;
} */

@media screen and (min-width: 768px) {
    #nav-wrapper {
        height: 100%;
    }
}

@media screen and (max-width: 767.98px) {
    .main-body {
        flex-flow: column;
    }

    .section-main {
        width: 100%;
        left: 0;
    }

    #loading-container {
        left: 0;
    }

    .nav-menu {
        width: 100%;
        height: auto;
        position: relative;
    }

    .nav-menu .nav-area {
        margin-top: 1rem;
        max-height: calc(100vh - 139px);
    }

    .nav-site-title::after {
        content: none;
    }
}

/* DataTables custom */
.dataTables-table {
    width: calc(100% - 2px) !important;
}

.dataTables_wrapper>.row:not(:last-child) {
    margin-bottom: 1rem;
}

.dataTables_paginate .page-item.previous a,
.dataTables_paginate .page-item.next a {
    font-size: 0;
    height: 100%;
    display: flex;
    align-items: center;
}

.dataTables_paginate .page-item.previous a::before,
.dataTables_paginate .page-item.next a::before {
    content: "";
    font-size: 1.25rem;
    display: inline-block;
    font-display: block;
    font-family: bootstrap-icons !important;
    font-style: normal;
    font-weight: 400 !important;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    vertical-align: -0.125em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.dataTables_paginate .page-item.previous a::before {
    content: "\F12F";
}

.dataTables_paginate .page-item.next a::before {
    content: "\F138";
}

.dataTables_processing {
    z-index: 1000;
}

.dataTables_scrollHeadInner {
    margin: auto;
}

.dataTables_scrollHead table>thead>tr>th {
    border-bottom-width: 2px !important;
    border-bottom-color: currentColor;
}

/* Table responsive for mobile: */
.table-mobile-responsive td:empty::before {
    content: "—";
    color: var(--bs-secondary);
}

@media screen and (max-width: 991.98px) {
    .table-mobile-responsive {
        --this-padding: 0.75rem;
    }

    .dataTable.table-mobile-responsive {
        min-width: 100% !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .table-mobile-responsive thead,
    .table-mobile-responsive tbody,
    .table-mobile-responsive th,
    .table-mobile-responsive td,
    .table-mobile-responsive tr {
        display: block;
    }

    .table-mobile-responsive td {
        border-left: none;
        border-right: none;
    }

    /* Special case for table foot */
    .table-mobile-responsive tfoot td:not(:first-child) {
        padding-top: 0;

    }

    .table-mobile-responsive tfoot td:not(:last-child) {
        padding-bottom: 0;
    }

    /* Hide table headers (but not display: none;, for accessibility) */
    .table-mobile-responsive thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .table-mobile-responsive tbody tr td {
        /* Behave  like a "row" */
        position: relative;
        padding-left: calc(35% + 1.5rem);
    }

    .table-mobile-responsive tbody td:before {
        /* Now like a table header */
        position: absolute;
        /* Top/left values mimic padding */
        top: .5rem;
        left: var(--this-padding);
        width: 35%;
        padding-right: var(--this-padding);
        color: var(--bs-secondary);
        white-space: break-spaces;
        overflow: visible;
        line-height: 1.15;
        height: calc(100% - 1rem);
        display: flex;
        align-items: center;
    }

    .table-action.table-mobile-responsive td:last-child {
        padding-left: calc(35% + var(--this-padding) + var(--this-padding) - .5rem);
        border-bottom-color: currentColor;
    }

    /* Special case if td is empty */
    .table-mobile-responsive td:empty {
        display: none;
    }

    /* DataTable: override for empty data: */
    .dataTable.table-mobile-responsive td.dataTables_empty {
        padding-left: var(--this-padding) !important;
    }

    .dataTable.table-mobile-responsive td.dataTables_empty::before {
        content: none !important;
    }
}

/* New */
.img-preview {
    width: 100%;
    height: auto;
    max-width: 200px;
    object-fit: contain;
}

.input-required::after {
    content: "*";
    color: var(--bs-danger);
}

form.form-readonly .form-control,
form.form-readonly .form-select,
.readonly-field:disabled {
    padding: 0;
    background: none;
    /* agar background color transparent & tidak ada icon dropdown */
    border: none;
    border-bottom: 1px dashed var(--bs-border-color);
    border-radius: 0;
}
form.form-readonly input[type="file"],
.readonly-field[type="file"]:disabled {
    display: none;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    margin-bottom: 0.5rem;
    cursor: pointer;
}

.form-control-nopadding {
    padding: 0;
    outline: none;
}

/* Toast */
#toast-container {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
}

#toast-container:empty {
    display: none;
}

.toast:hover {
    --bs-toast-bg: var(--bs-body-bg);
}

/* Print, siaap tau mau */
@media print {
    .nav-menu {
        display: none !important;
    }

    .section-main {
        width: 100%;
    }
}

/* Custom bottom navigation */
.btmnav-container {
    left: var(--jc-sidebar-width);
    position: fixed;
    bottom: 0;
    right: 0;
    z-index: 1000;
}

@media screen and (max-width: 767.98px) {
    .btmnav-container {
        left: 0;
    }
}

/*  */
.dropdown-item-text {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    font-weight: 500;
    color: var(--bs-secondary);
}