.sidebar-wrapper {
    z-index: 1025; /* Angka ini harus lebih tinggi dari z-index sticky-top (1020) */
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
html[data-bs-theme="dark"] .sidebar-wrapper {
    z-index: 1025; /* Angka ini harus lebih tinggi dari z-index sticky-top (1020) */
}

.sidebar-backdrop {
    z-index: 1024; /* Angka ini harus lebih tinggi dari z-index sticky-top (1020) */
}
html[data-bs-theme="dark"] .sidebar-backdrop {
    z-index: 1024; /* Angka ini harus lebih tinggi dari z-index sticky-top (1020) */
}

.sidebar-header .logo a {
    display: inline-flex;
    align-items: center;
}

.sidebar-header .logo img {
    width: auto;
    height: 1.5rem;
}

html[data-bs-theme="dark"] .sidebar-wrapper .sidebar-header .logo img {
    width: auto;
    height: 1.5rem;
}

.theme-toggle-button {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--bs-border-color);
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.theme-toggle-button:hover {
    background: var(--bs-primary-bg-subtle);
    border-color: var(--bs-primary);
    color: var(--bs-primary);
    transform: translateY(-1px);
}

.theme-toggle-button:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

.theme-toggle-button i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
    font-size: 1.1rem;
    line-height: 1;
}

.theme-toggle-button i::before {
    line-height: 1;
    vertical-align: 0;
}

html[data-bs-theme="dark"] .theme-toggle-button .bi-sun-fill {
    color: var(--bs-warning);
}

html[data-bs-theme="light"] .theme-toggle-button .bi-moon-stars-fill {
    color: var(--bs-secondary);
}

.sidebar-menu {
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    padding-bottom: 7.75rem;
}

.sidebar-account-footer {
    position: absolute;
    right: 1rem;
    bottom: 1.25rem;
    left: 1rem;
    z-index: 3;
    padding: 0;
}

.sidebar-account {
    position: relative;
}

.sidebar-account__trigger {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 1.25rem;
    background: var(--bs-tertiary-bg);
    box-shadow: 0 0.75rem 1.75rem rgb(0 0 0 / 10%);
    padding: 1.1rem 1rem;
    color: var(--bs-body-color);
    cursor: pointer;
    list-style: none;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.sidebar-account__trigger::-webkit-details-marker {
    display: none;
}

.sidebar-account__trigger:hover,
.sidebar-account[open] .sidebar-account__trigger {
    border-color: var(--bs-border-color);
    background: var(--bs-secondary-bg);
}

.sidebar-account__trigger:hover {
    transform: translateY(-1px);
}

.sidebar-account__avatar {
    display: inline-flex;
    width: 2.8rem;
    height: 2.8rem;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%;
    background: var(--bs-primary);
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
}

.sidebar-account__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-account__avatar-fallback {
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.sidebar-account__copy {
    min-width: 0;
    flex: 1;
    text-align: left;
}

.sidebar-account__copy strong,
.sidebar-account__copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-account__copy strong {
    color: var(--bs-heading-color, var(--bs-body-color));
    font-size: 1rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.sidebar-account__copy small {
    margin-top: 0.2rem;
    color: var(--bs-secondary-color);
    font-size: 0.7rem;
    font-weight: 600;
}

.sidebar-account__chevron {
    flex: 0 0 auto;
    color: var(--bs-secondary-color);
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}

.sidebar-account[open] .sidebar-account__chevron {
    transform: rotate(180deg);
}

.sidebar-account__menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.75rem);
    left: 0;
    overflow: hidden;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.85rem;
    background: var(--bs-body-bg);
    box-shadow: 0 0.75rem 2rem rgb(0 0 0 / 12%);
}

.sidebar-account[open] .sidebar-account__menu {
    animation: sidebar-account-menu-in 0.2s ease-out both;
    transform-origin: bottom center;
}

.sidebar-account.is-closing .sidebar-account__menu {
    animation: sidebar-account-menu-out 0.16s ease-in both;
    pointer-events: none;
}

@keyframes sidebar-account-menu-in {
    from {
        opacity: 0;
        transform: translateY(0.5rem) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes sidebar-account-menu-out {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(0.5rem) scale(0.98);
    }
}

.sidebar-account__summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.sidebar-account__summary > span:last-child {
    min-width: 0;
}

.sidebar-account__summary strong,
.sidebar-account__summary span span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-account__summary strong {
    color: var(--bs-heading-color, var(--bs-body-color));
    font-size: 0.85rem;
}

.sidebar-account__summary span span {
    margin-top: 0.2rem;
    color: var(--bs-secondary-color);
    font-size: 0.7rem;
}

.sidebar-account__action {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 0.75rem;
    border: 0;
    border-bottom: 1px solid var(--bs-border-color);
    background: transparent;
    padding: 0.8rem 0.9rem;
    color: var(--bs-body-color);
    cursor: pointer;
    font: inherit;
    font-size: 0.85rem;
    text-align: left;
    text-decoration: none;
}

.sidebar-account__action:last-child {
    border-bottom: 0;
}

.sidebar-account__action:hover,
.sidebar-account__action.active {
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
}

.sidebar-account__action--logout {
    color: var(--bs-danger);
}

.sidebar-account__action--logout:hover {
    background: var(--bs-danger-bg-subtle);
    color: var(--bs-danger);
}

html[data-bs-theme="dark"] .sidebar-account__menu {
    box-shadow: 0 0.75rem 2rem rgb(0 0 0 / 35%);
}

html[data-bs-theme="dark"] .sidebar-account__trigger {
    background: #1e1e2d;
    box-shadow: 0 0.75rem 1.75rem rgb(0 0 0 / 28%);
}

html[data-bs-theme="dark"] .sidebar-account__trigger:hover,
html[data-bs-theme="dark"] .sidebar-account[open] .sidebar-account__trigger {
    background: #252538;
    border-color: #35354f;
}

html[data-bs-theme="dark"] .sidebar-account__copy strong {
    color: #ddddeb;
}

html[data-bs-theme="dark"] .sidebar-account__copy small {
    color: #b8d6c1;
}

html[data-bs-theme="dark"] summary.sidebar-account__trigger {
    display: flex;
    align-items: center;
    flex-direction: row;
}

@media (prefers-reduced-motion: reduce) {
    .sidebar-account__trigger,
    .sidebar-account__chevron,
    .sidebar-account[open] .sidebar-account__menu,
    .sidebar-account.is-closing .sidebar-account__menu {
        animation: none;
        transition: none;
    }
}
