/* ============================================================
   layout.css — include di semua blade
   ============================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    z-index: 0;
}

/* ── BACKGROUND LOGO ────────────────────────────────────────────── */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('../img/minitok.jpeg');
    background-position: center;
    background-repeat: no-repeat;
    background-size: 50vmin; /* Responsive size */
    opacity: 0.04; /* Very low opacity so it doesn't disturb */
    z-index: -1;
    pointer-events: none;
}

/* ── WRAPPER ────────────────────────────────────────────────────── */
.wrapper {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    min-height: 100vh;
    width: 100%;
}

/* ── CONTENT ────────────────────────────────────────────────────── */
/*
   flex: 1 1 auto  → isi semua ruang sisa setelah sidebar
   min-width: 0    → KUNCI: cegah konten paksa melebar keluar flex
   Jangan pakai width:0 — bisa bentrok di beberapa browser/zoom
*/
#content {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: hidden;
    box-sizing: border-box;
    width: auto !important;
    margin: 0 !important;
}

/* ── SIDEBAR GUARANTEE ──────────────────────────────────────────── */
#sidebar {
    flex-shrink: 0 !important;
}

/* ── MOBILE ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    #sidebar {
        position: fixed !important;
        left: calc(-1 * var(--sb-width, 260px)) !important;
        top: 0;
        height: 100vh !important;
        z-index: 1001 !important;
    }

    #sidebar.active {
        left: 0 !important;
        width: 260px !important;
        min-width: 260px !important;
        max-width: 260px !important;
    }

    #content {
        width: 100% !important;
        margin-left: 0 !important;
    }
}