/* --- KHUSUS PWA ANDROID (STANDALONE MODE) --- */
@media all and (display-mode: standalone) {
    /* Gunakan selector yang lebih luas untuk memastikan area navy benar-benar hilang */
    #topbar, 
    nav, 
    header,
    .navbar,
    .fixed-top,
    #sidebar, 
    #sidebarCollapse, 
    #chat-mobile-btn,
    .navbar-responsive-collapse {
        display: none !important;
    }

    /* Paksa semua elemen body dan container naik ke atas */
    body {
        padding-top: 0 !important;
        margin-top: 0 !important;
        /* Tambahkan ini untuk memastikan tidak ada ruang sisa di atas */
        min-height: 100vh;
    }

    .container-fluid, .wrapper {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    /* Update di dalam blok @media all and (display-mode: standalone) */
#main-content, 
.main-content, 
#content, 
.container-fluid {
    margin: 0 !important;
    padding: 0 !important; /* Nolkan semua sisi */
    width: 100% !important;
    max-width: 100% !important;
}

    /* 4. NAVIGASI BAWAH (MODERN & ELEGAN) */
    .android-menu-bottom {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 85px !important;
        background: #ffffff;
        z-index: 11000 !important;
        align-items: center;
        justify-content: space-around;
        padding: 5px 10px;
        border-top: 1px solid rgba(0,0,0,0.06);
        box-shadow: 0 -5px 20px rgba(0,0,0,0.05);
    }

    .android-menu-item {
        color: #64748b;
        text-decoration: none !important;
        text-align: center;
        font-size: 11px;
        font-weight: 600;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 18%;
        height: 100%;
        border-radius: 12px;
        transition: all 0.3s ease;
    }

    .android-menu-item i {
        font-size: 22px;
        margin-bottom: 4px;
        display: block;
    }

    /* Style Khusus Tombol Tambah (Tengah) */
    .btn-add-center {
        background: #5a67e6;
        width: 35px;
        height: 35px;
        border-radius: 50%;
        display: flex !important;
        align-items: center;
        justify-content: center;
        color: white !important;
        margin-bottom: 2px;
        box-shadow: 0 4px 8px rgba(90,103,230,0.3);
    }

    .android-menu-item.active {
        color: #5a67e6 !important;
    }

    .android-menu-item:active {
        transform: scale(0.92);
    }
}

/* --- FULL MENU OVERLAY STYLE (TETAP SAMA) --- */
.full-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    z-index: 12000;
    display: none;
    overflow-y: auto;
    padding: 20px;
}

.full-menu-overlay.active-menu {
    display: block !important;
    animation: slideUp 0.3s ease-out;
}

/* --- RESPONSIVE MOBILE BROWSER (BUKAN PWA) --- */
@media (max-width: 991px) and (display-mode: browser) {
    .navbar-center-logo small {
        display: none !important;
    }
    .navbar-center-logo {
        top: 50%;
        transform: translate(-50%, -50%);
        margin-top: 0;
    }
}
/* 1. Sembunyikan elemen dan hilangkan dari tata letak grid */
body a.kpi-card-android.pwa-only {
    display: none !important;
}

/* 2. Tampilkan kembali hanya di mode PWA */
@media all and (display-mode: standalone) {
    body a.kpi-card-android.pwa-only {
        /* Kembalikan ke display: flex agar muncul kembali */
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
}
/* Style tombol login melayang */
.login-float-btn {
    position: fixed;
    bottom: 830px; /* Di atas android-menu-bottom */
    right: 0px;
    background: rgba(90, 103, 230, 0.9);
    color: white !important;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: bold;
    text-decoration: none !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 1050;
    transition: all 0.3s ease;
}

.login-float-btn:active {
    transform: scale(0.9);
}

/* Pastikan class pwa-only bekerja */
@media all and (display-mode: standalone) {
    .login-float-btn.pwa-only {
        display: flex !important;
    }
}
