/* Overlay Gelap */
.side-menu-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0; 
    visibility: hidden; /* Gunakan visibility, bukan display: none */
    transition: all 0.3s ease;
}
.side-menu-overlay.active { opacity: 1; visibility: visible; }

/* Side Menu Container */
.side-menu {
    position: fixed;
    top: 0; 
    right: -320px; /* Sembunyi di luar layar kanan */
    width: 300px; 
    max-width: 85%; 
    height: 100vh;
    background: #fff;
    z-index: 9999;
    box-shadow: -4px 0 16px rgba(0,0,0,0.1);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    display: flex; /* Tetap flex agar layout di dalamnya rapi */
    flex-direction: column;
}
.side-menu.active { right: 0; } /* Muncul saat class active ditambahkan oleh JS */