/* Theme */

:root,
[data-bs-theme=light] {
    --bs-light-subtle: #ffffff;
    --bs-dark-subtle: #eeeeee;
    --bs-body-bg: #f8f8f8;
    --bs-primary: #303030;
}

[data-bs-theme=dark] {
    --bs-light-subtle: #272727;
    --bs-dark-subtle: #303030;
    --bs-body-bg: #1e1e1e;
    --bs-primary: #ffbe24;
}

/* Main */

#main {
    margin-left: 250px;
    padding: 2rem;
}

/* @media screen and (max-width: 1199px) { */
@media screen and (max-width: 1199px) {
    #main {
        margin-left: 0;
    }
}

#main.layout-navbar {
    padding: 0;
}

#main #main-content {
    padding: 2rem;
}

/* @media screen and (max-width: 1199px) { */
@media screen and (max-width: 1199px) {
    #main #main-content {
        padding: 1rem;
    }
}

/* Body */

body {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 400;
}

/* Loading */

.loading-hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-show {
    opacity: 1;
    visibility: visible;
}

/* Navbar */

.navbar-fixed {
    position: fixed;
    /* background-color: #fff; */
}

.navbar {
    height: 60px;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.navbar .navbar-brand img {
    height: 1.5rem;
}

.navbar .user-menu img {
    width: 36px;
    height: 36px;
}

.navbar.navbar-header li {
    display: flex;
    align-items: center;
}

.navbar.navbar-header li.nav-icon {
    margin-right: 0.4rem;
}

.navbar.navbar-header li.nav-icon .nav-link {
    display: block;
    padding: 0.4rem;
    border-radius: 50%;
}

.navbar.navbar-header li.nav-icon .nav-link:hover {
    background-color: var(--bs-info-subtle);
}

.navbar.navbar-header .dropdown>a {
    color: var(--bs-info-subtle);
    font-weight: 600;
}

.navbar.navbar-header .dropdown>a svg {
    height: 24px;
    width: 24px;
}

.navbar.navbar-header .dropdown>a:after {
    display: none;
}

/* Sidebar */

#sidebar.active .sidebar-wrapper {
    left: 0;
    position: fixed;
    z-index: 9999;
    height: 100vh;
}


#sidebar:not(.active) .sidebar-wrapper {
    left: -250px;
}

#sidebar:not(.active)~#main {
    margin-left: 0;
}

.sidebar-wrapper {
    width: 250px;
    height: 100vh;
    position: fixed;
    top: 0;
    z-index: 10;
    overflow-y: auto;
    bottom: 0;
    transition: left 0.3s ease-out;
}

.sidebar-wrapper .sidebar-header {
    padding: 2rem 2rem 1rem;
    font-size: 2rem;
    font-weight: 700;
}

.sidebar-wrapper .sidebar-header img {
    height: 1.2rem;
}

.sidebar-wrapper .sidebar-toggler.x {
    position: absolute;
    right: 0;
    top: 0.5rem;
    display: none;
}

.sidebar-wrapper .menu {
    margin-top: 2rem;
    padding: 0 1rem;
    font-weight: 500;
}

.sidebar-wrapper .menu .sidebar-title {
    padding: 0 1rem;
    margin: 1.5rem 0 1rem;
    font-size: 1rem;
    list-style: none;
    font-weight: 600;
    color: var(--bs-light-emphasis);
}

.sidebar-wrapper .menu .sidebar-link {
    display: block;
    padding: 0.7rem 1rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    border-radius: 0.5rem;
    transition: all 0.5s;
    text-decoration: none;
    color: var(--bs-light-emphasis);
}

.sidebar-wrapper .menu .sidebar-link i,
.sidebar-wrapper .menu .sidebar-link svg {
    color: var(--bs-success);
}

.sidebar-wrapper .menu .sidebar-link span {
    margin-left: 1rem;
}

.sidebar-wrapper .menu .sidebar-link:hover {
    background-color: var(--bs-dark-subtle);
    color: var(--bs-warning);
}

.sidebar-wrapper .menu .sidebar-item {
    list-style: none;
    margin-top: 0.5rem;
    position: relative;
}

.sidebar-wrapper .menu .sidebar-item.has-sub .sidebar-link:after {
    content: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down"><path stroke="gray" stroke-width="1" d="M6 9l6 6 6-6"/></svg>');
    position: absolute;
    color: var(--bs-dark);
    right: 1rem;
    top: 1.1rem;
    display: block;
}

.sidebar-wrapper .menu .sidebar-item.active .sidebar-link {
    background-color: var(--bs-dark-subtle);
}

.sidebar-wrapper .menu .sidebar-item.active .sidebar-link span {
    color: var(--bs-info-emphasis);
}

.sidebar-wrapper .menu .sidebar-item.active .sidebar-link i,
.sidebar-wrapper .menu .sidebar-item.active .sidebar-link svg {
    fill: var(--bs-info-emphasis);
    color: var(--bs-info-emphasis);
}

.sidebar-wrapper .menu .sidebar-item.active .sidebar-link.has-sub:after {
    content: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down"><path stroke="%23fff" stroke-width="1" d="M6 9l6 6 6-6"/></svg>');
}

.sidebar-wrapper .menu .submenu {
    list-style: none;
    display: none;
    transition: max-height 2s cubic-bezier(0, 0.55, 0.45, 1);
    overflow: hidden;
}

.sidebar-wrapper .menu .submenu.active {
    max-height: 999px;
    display: block;
}

.sidebar-wrapper .menu .submenu .submenu-item.active {
    position: relative;
}

.sidebar-wrapper .menu .submenu .submenu-item.active>a {
    color: var(--bs-warning);
    font-weight: 500;
}

.sidebar-wrapper .menu .submenu .submenu-item a {
    padding: 0.7rem 2rem;
    display: block;
    color: var(--bs-dark);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s;
}

.sidebar-wrapper .menu .submenu .submenu-item a:hover {
    margin-left: 0.3rem;
    color: var(--bs-warning);
}

@media screen and (max-width: 1199px) {
    .sidebar-wrapper {
        position: absolute;
        left: -250px;
    }

    .sidebar-wrapper .sidebar-toggler.x {
        display: block;
    }
}

/* link */

a {
    text-decoration: none;
}

/* Bootstrap Icon */

.bi {
    width: 1rem;
    height: 1rem;
}

.bi.bi-middle:before {
    vertical-align: middle;
}

.bi.bi-sub:before {
    vertical-align: sub;
}

/* Form Control */

.form-control {
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: 1px solid var(--bs-border-color);
    border-radius: 8px 8px 0px 0px;
    background-color: var(--bs-dark-subtle);
    box-shadow: none;
    padding-right: 10px;
    padding-left: 10px;
    margin-bottom: 0.25rem;
    font-weight: 400;
}

.form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: none;
}

.form-select {
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: 1px solid var(--bs-border-color);
    border-radius: 8px 8px 0px 0px;
    background-color: var(--bs-dark-subtle);
    box-shadow: none;
    padding-right: 10px;
    padding-left: 10px;
    margin-bottom: 0.25rem;
    font-weight: 400;
}

.form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: none;
}

.form-check {
    padding-left: 0.75em !important;
}

/* Dropdown */

.dropdown-toggle:after {
    color: var(--bs-light);
}

.dropdown-menu-large {
    min-width: 16rem;
}

.dropdown-menu {
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.03);
}

.dropdown-item {
    transition: all 0.5s;
}

/* Text */

.text-xs {
    font-size: 0.7rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-4xl {
    font-size: 2.25rem;
}

.text-6xl {
    font-size: 4rem;
}

.text-black {
    color: #000;
}

/* Close */

.modal .modal-header .close {
    border-radius: 8px;
    background: none;
    border: none;
}

.modal .modal-header .close:hover {
    background: var(--bs-danger);
}

::placeholder {
    font-size: 0.75rem;
}

/* Mengubah border dan background untuk semua Select2 */
.select2-container--default .select2-selection--multiple,
.select2-container--default .select2-selection--single {
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: 1px solid var(--bs-border-color) !important;
    border-radius: 8px 8px 0px 0px !important;
    background-color: var(--bs-dark-subtle) !important;
    box-shadow: none !important;
    margin-bottom: 0.75rem !important;
    height: 2.2rem !important;
}

/* Mengubah fokus atau border saat Select2 aktif */
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--multiple {
    border-color: var(--bs-dark) !important;
    box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25) !important;
}

/* Mengubah warna teks dan background untuk pilihan (tags) */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: var(--bs-success) !important;
    color: var(--bs-light-emphasis) !important;
    border: 1px solid var(--bs-dark-subtle) !important;
    border-radius: 0.2rem;
}

/* Mengubah tombol hapus tag */
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: var(--bs-danger) !important;
    margin-right: 5px;
}

/* Mengubah dropdown Select2 */
.select2-container--default .select2-dropdown {
    border-color: var(--bs-dark-subtle) !important;
    border-radius: 0.25rem;
    background: var(--bs-body-bg);
}

/* Mengubah warna background saat mengarahkan mouse ke pilihan */
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: var(--bs-dark-subtle) !important;
    /* Ubah warna background highlight */
    color: var(--bs-dark);
    /* Ubah warna teks highlight */
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--bs-light-emphasis) !important;
    line-height: 2rem !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 0px !important;
    background: var(--bs-light) !important;
    border-radius: 8px 8px 0px 0px !important;
    color: var(--bs-dark) !important;
    background-color: var(--bs-dark-subtle) !important;
    outline: none !important;
    box-shadow: none !important;
    border-color: transparent !important;
    line-height: 1.5rem !important;
    padding: 5px;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: var(--bs-dark-subtle) !important;
    color: var(--bs-dark) !important;
}


a.btn {
    font-size: 0.75rem;
    border: none;
}

/* Sembunyikan tombol secara default */
.table-actions {
    display: none;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

/* Tampilkan tombol saat container di-hover */
.table-cell-hover-container:hover .table-actions {
    display: block;
    visibility: visible;
}

.stats-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    background-color: #000;
    float: right;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stats-icon i {
    color: #fff;
    font-size: 1.7rem;
}

.stats-icon.purple {
    background-color: #9694ff;
}

.stats-icon.blue {
    background-color: #57caeb;
}

.stats-icon.red {
    background-color: #ff7976;
}

.stats-icon.green {
    background-color: #5ddab4;
}

@media (max-width: 767px) {
    .stats-icon {
        float: left;
        margin-bottom: 0.4rem;
    }
}

.card {
    margin-bottom: 2.2rem;
    border: none;
}

.card.card-statistic {
    box-shadow: 1px 2px 5px rgba(47, 170, 244, 0.5);
    background: linear-gradient(180deg, #25a6f1, #54b9ff);
}

.card.card-statistic .card-title {
    text-transform: uppercase;
    color: #fff;
    letter-spacing: 0.8px;
    font-weight: 400;
    font-size: 1.3rem;
    margin-bottom: 0;
    margin-top: 5px;
}

.card.card-statistic .card-right p {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 0;
}

.card.card-statistic .card-right span.green {
    color: #6fff6f;
}

.card.card-statistic .card-right span.red {
    color: #ff7979;
}

.card.card-statistic .chart-wrapper {
    height: 100px;
}

.card .card-header {
    border: none;
}

.card .card-header h4 {
    font-size: 1.2rem;
    font-weight: 700;
}

.card .card-header~.card-body {
    padding-top: 0;
}

.card .card-content {
    position: relative;
}

.card .card-title {
    font-size: 1.2rem;
}

.card .card-body {
    padding: 1.5rem;
}

.card .card-heading {
    color: #555;
    font-size: 1.5rem;
}

.card .card-img-overlay {
    background-color: rgba(0, 0, 0, 0.6);
}

.card .card-img-overlay p {
    color: #eee;
}

.card .card-img-overlay .card-title {
    color: #fff;
}

.avatar {
    display: inline-flex;
    border-radius: 50%;
    text-align: center;
    vertical-align: middle;
    position: relative;
    border: solid 0.15rem var(--bs-light);
}

.avatar .avatar-content {
    width: 32px;
    height: 32px;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.875rem;
}

.avatar .avatar-content i,
.avatar .avatar-content svg {
    color: #fff;
    font-size: 1rem;
    height: 1rem;
}

.avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.avatar .avatar-status {
    width: 0.7rem;
    height: 0.7rem;
    position: absolute;
    border-radius: 50%;
    border: 1px solid #fff;
    bottom: 0;
    right: 0;
}

.avatar.avatar-sm .avatar-content,
.avatar.avatar-sm img {
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
}

.avatar.avatar-md .avatar-content,
.avatar.avatar-md img {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
}

.avatar.avatar-lg .avatar-content,
.avatar.avatar-lg img {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
}

.avatar.avatar-xl .avatar-content,
.avatar.avatar-xl img {
    width: 60px;
    height: 60px;
    font-size: 1.4rem;
}

.dt-layout-cell.dt-start>div>label,
.dt-layout-cell.dt-end>div>label {
    padding-left: 5px;
    padding-right: 5px;
}

#dt-search-0,
#dt-length-0 {
    border: solid 1px var(--bs-border-color);
}

.row-actions {
    visibility: hidden;
    opacity: 0;
    /* Properti baru: opacity 0 untuk menyembunyikan elemen */
    transition: opacity 0.3s ease-in-out;
    /* Properti baru: transisi untuk efek fade */
    font-size: 13px;
    padding: 2px 0 0;
    line-height: 1.5;
}

/* Mengubah opacity dan visibility saat kursor di atas baris tabel */
tr:hover .row-actions {
    visibility: visible;
    opacity: 1;
    /* Mengubah opacity menjadi 1 untuk menampilkan elemen */
}

@media (max-width: 767px) {

    #dt-search-0 {
        width: -webkit-fill-available;
        align-items: start;
    }

    .dt-container .dt-search {
        margin-top: 0.5em;
        justify-content: flex-start;
        flex-direction: row;
        display: flex;
        align-items: center;
    }

    .dt-container .dt-length {
        float: none;
        text-align: left !important;
    }

    table.dataTable.dtr-inline.collapsed>tbody>tr>td.dtr-control:before,
    table.dataTable.dtr-inline.collapsed>tbody>tr>th.dtr-control:before {
        margin-right: 0.77em !important;
    }

    .post-title-link {
        text-decoration: none;
        pointer-events: none;
        color: inherit;
        cursor: default;
    }

}

.input-group-text {
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: 1px solid var(--bs-border-color);
    border-radius: 8px 8px 0px 0px;
    background-color: var(--bs-dark-subtle);
    box-shadow: none;
    padding-right: 10px;
    padding-left: 10px;
    margin-bottom: 0.25rem;
    font-weight: 400;
}

/* see password */
.input-group-text.toggle-password {
    cursor: pointer;
    transition: all 0.3s ease;
}

.border-right,
.border-bottom,
.border-left,
.border-top {
    border-right: solid 1px var(--bs-dark-subtle);
}


/* Filepond Overide */

.filepond--credits,
.tox-statusbar__branding {
    display: none;
}

.filepond--panel-root {
    background-color: var(--bs-dark-subtle) !important;
    border: 1px solid var(--bs-border-color) !important;
}

.filepond--drop-label {
    color: var(--bs-dark-emphasis) !important;
}

.filepond--label-action {
    text-decoration-color: var(--bs-primary) !important;
}


#filepond-gallery .filepond--item {
    /* Mobile-first: 2 columns by default */
    width: calc(50% - 0.5em);
}

@media (min-width: 50em) {

    /* Desktop: Override for 10 columns on larger screens */
    #filepond-gallery .filepond--item {
        width: calc(15% - 0.5em);
    }
}

/*
 * Custom TinyMCE Dark Skin Overrides
 */

/* General Editor UI colors */
.tox-tinymce {
    border: 1px solid var(--bs-border-color) !important;
    border-radius: 8px 8px 0px 0px !important;
}

/* Toolbar and Menu backgrounds */
.tox-toolbar-overlord,
.tox-toolbar__group,
.tox-menubar,
.tox-menu {
    background-color: var(--bs-dark-subtle) !important;
    height: 38px !important;
    border: var(--bs-border-color) !important;
}

/* Buttons and Icons */
.tox-toolbar-button {
    color: var(--bs-dark-subtle) !important;
    background-color: var(--bs-dark-subtle) !important;
    border-color: var(--bs-border-color) !important;
    border: 1px solid var(--bs-border-color) !important;
}

.tox-toolbar-button:hover {
    background-color: var(--bs-dark-subtle) !important;
}

.tox .tox-tbtn svg {
    fill: var(--bs-light-emphasis) !important;
}

.tox .tox-tbtn__select-label {
    color: var(--bs-light-emphasis) !important;
}

.tox-toolbar__primary {
    background-color: var(--bs-dark-subtle) !important
}

.tox .tox-mbtn__select-label {
    color: var(--bs-light-emphasis) !important;
}

.tox-tbtn--enabled {
    background-color: #555;
}

/* Active elements */
.tox-toolbar-button.tox-tbtn--enabled {
    background-color: #555;
    box-shadow: none;
}

.tox-toolbar-button:focus,
.tox-toolbar-button:active {
    background-color: #555;
    box-shadow: inset 0 0 0 1px #888;
}

/* Content Area - Dark background and light text */
#tinymce.mce-content-body {
    background: var(--bs-dark-subtle) !important;
}

/* Links */
.mce-content-body a {
    color: #8ab4f8;
    /* A Google-like blue for links in dark mode */
}