    :root {
        --sidebar-width: 250px;
        --sidebar-collapsed-width: 70px;
        --sidebar-mobile-width: 0px;          /* di mobile sidebar "hilang" */
        --primary-dark: #1e293b;
        --primary-dark-hover: #334155;
        --bg-light: #f8fafc;
        --border-light: #e5e7eb;
        --text-muted: #cbd5e1;
        --text-white: #ffffff;
    }

    body {
        overflow-x: hidden;
        background: var(--bg-light);
        margin: 0;
    }

    /* ─── SIDEBAR ─── */
    .sidebar {
        width: var(--sidebar-width);
        height: 100vh;
        position: fixed;
        top: 0;
        left: 0;
        background: var(--primary-dark);
        color: var(--text-muted);
        transition: width 0.3s ease, transform 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
    }

    .sidebar.collapsed {
        width: var(--sidebar-collapsed-width);
    }

    .sidebar.collapsed .sidebar-text,
    .sidebar.collapsed h5 {
        display: none;
    }

    /* ─── TOPBAR ─── */
    .topbar {
        position: fixed;
        top: 0;
        left: var(--sidebar-width);
        right: 0;
        height: 60px;
        background: white;
        border-bottom: 1px solid var(--border-light);
        z-index: 999;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 1rem;
        transition: left 0.3s ease;
        box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    }

    .topbar.collapsed {
        left: var(--sidebar-collapsed-width);
    }

    /* ─── MAIN CONTENT ─── */
    .main-content {
        margin-left: var(--sidebar-width);
        margin-top: 60px;
        padding: 30px;
        min-height: calc(100vh - 60px);
        transition: margin-left 0.3s ease;
        box-sizing: border-box;
    }

    .main-content.collapsed {
        margin-left: var(--sidebar-collapsed-width);
    }

/* ─── RESPONSIVE MOBILE ─── */
@media (max-width: 991.98px) {
    :root {
        --sidebar-width: 85%;                    /* atau 100% kalau mau benar-benar full */
        --sidebar-collapsed-width: 0px;
        --sidebar-max-width: 320px;              /* batas maksimal biar tidak terlalu lebar di tablet kecil */
    }

    .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        width: var(--sidebar-width);
        max-width: var(--sidebar-max-width);     /* opsional: jangan lebih dari 320px */
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1050;
        box-shadow: 4px 0 15px rgba(0,0,0,0.25); /* shadow lebih tegas biar kelihatan drawer */
        background: var(--primary-dark);
    }

    /* Saat dibuka (uncollapse) */
    .sidebar.show {
        transform: translateX(0);
    }

    /* Override collapsed agar tidak ganggu di mobile */
    .sidebar.collapsed {
        transform: translateX(-100%);
    }

    /* Topbar & main content selalu full di mobile */
    .topbar,
    .main-content {
        left: 0 !important;
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100vw;
        box-sizing: border-box;
    }

    .main-content {
        padding: 1rem 1.25rem;   /* sedikit lebih nyaman di HP */
    }

    /* Backdrop opsional (gelapkan background saat sidebar terbuka) */
    body.sidebar-open::before {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 1040;
        transition: opacity 0.3s ease;
        opacity: 0;
        pointer-events: none;
    }

    body.sidebar-open::before {
        opacity: 1;
        pointer-events: auto;
    }
}
    /* Footer */
    footer.footer {
        background: var(--text-muted);
        color: white;
        padding: 1rem 0;
        margin-top: 2rem;
        text-align: center;
        font-size: 0.875rem;
    }

/* Tambahkan ini di akhir CSS kamu (atau di dalam @media) */

@media (max-width: 991.98px) {
    :root {
        --sidebar-width: 85%;
        --sidebar-collapsed-width: 0px;
        --sidebar-max-width: 320px;
    }

    .sidebar {
        position: fixed;
        top: 0; bottom: 0; left: 0;
        width: var(--sidebar-width);
        max-width: var(--sidebar-max-width);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1050;
        box-shadow: 4px 0 15px rgba(0,0,0,0.3);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    /* Hilangkan efek collapsed di mobile */
    .sidebar.collapsed,
    .topbar.collapsed,
    .main-content.collapsed {
        margin-left: 0 !important;
        left: 0 !important;
        width: 100% !important;
        transform: none !important;
    }

    .topbar,
    .main-content {
        margin-left: 0 !important;
        left: 0 !important;
        width: 100%;
    }

    .main-content {
        padding: 1rem;
    }

    /* Backdrop gelap saat sidebar terbuka */
    body.sidebar-open::before {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1040;
        opacity: 0;
        transition: opacity 0.3s;
        pointer-events: none;
    }

    body.sidebar-open::before {
        opacity: 1;
        pointer-events: auto;
    }
}



</style>