/* ===== OVERLAY ===== */
#drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.60);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
#drawer-overlay.open {
    opacity: 1;
    pointer-events: all;
}

/* ===== DRAWER ===== */
#drawer {
    position: fixed !important;
    top: 0;
    left: 0;
    bottom: 0;
    width: 330px;
    background: #efefef;
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform 0.3s;
    overflow-y: auto;
    overflow-x: hidden;
    font-family: Arial, sans-serif;
    padding-top: 20px;
    box-sizing: border-box;
}
#drawer.open {
    transform: translateX(0);
}

/* ===== HEADER ===== */
.drawer-header {
    position: fixed !important;
    top: 0px;
    width: 280px;
    background: #00bcd4;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 16px !important;
    padding-left: 40px !important;
}
.drawer-header span {
    font-size: 22px;
    font-weight: bold;
}
.drawer-header button {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    padding: 0;
}

/* ===== MENU ITEM ===== */
.menu-item {
    border-bottom: 1px solid #e8e8e8;
    text-align: left !important;
    color: #1f1f1f !important;
}

/* Menu Link (level 1) */
.menu-link {
    top: 15px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 16px;
    font-size: 22px !important;
    color: #1f1f1f !important;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
}
.menu-link:hover {
    background: transparent;
}

/* Highlight menu aktif/terakhir diklik */
.menu-link.last-active {
    color: #00bcd4 !important;
}

/* Icon panah */
.arrow-icon {
    font-size: 18px;
    color: #888;
    transition: transform 0.25s;
    display: inline-block;
}
.menu-link.active .arrow-icon {
    transform: rotate(90deg);
}

/* ===== SUBMENU ===== */
.submenu {
    background: #00bcd4;
    width: 100%;
    max-width: 330px;
    box-sizing: border-box;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.5s ease;
}
.submenu.open {
    max-height: 500px;
    opacity: 1;
}

.sub-link {
    display: block !important;
    padding: 8px 16px 8px 28px !important;
    font-size: 20px !important;
    font-weight: bold;
    border-bottom: 1px solid #efefef !important;
    text-decoration: none !important;
    text-align: left !important;
    color: #ffffff !important;
}
.sub-link:hover {
    background: rgba(0,0,0,0.15);
    color: #1f1f1f !important;
}

/* Highlight sub-link terakhir diklik */
.sub-link.sub-last-active {
    background: rgba(0,0,0,0.25) !important;
    color: #ffffff !important;
}

/* ===== TOMBOL TOGGLE (Ikon) ===== */
.menu-toggle-btn {
    position: fixed;
    top: 10px;
    left: 15px;
    background: transparent;
    color: transparent;
    border: none;
    padding: 8px 14px;
    font-size: 24px;
    border-radius: 6px;
    cursor: pointer;
    z-index: 10000;
}
.menu-toggle-btn:hover {
    background: transparent;
}

/* ===== SEMBUNYIKAN DI DESKTOP ===== */
@media (min-width: 769px) {
    .menu-toggle-btn {
        display: none !important;
    }
    #drawer {
        display: none !important;
    }
    #drawer-overlay {
        display: none !important;
    }
}
