/* =========================================================
   📱 PERBAIKAN TAMPILAN MOBILE (RESPONSIVE DESIGN BCOS)
   ========================================================= */

/* Sembunyikan tombol logout mobile & hamburger di layar Laptop */
.btn-logout-mobile { display: none; }
.hamburger { display: none; font-size: 28px; color: var(--bcos-blue); cursor: pointer; user-select: none; padding: 5px 10px; border-radius: 6px; border: 1px solid #eee; background: #f8f9fa; margin-left: auto; transition: 0.3s; }
.hamburger:hover { background: #e2e8f0; }

@media screen and (max-width: 768px) {
    .grid-layout, .main-container { flex-direction: column !important; margin-top: 20px; padding: 0 10px; }
    .col-left, .col-right, .col-profile, .col-tasks { width: 100% !important; min-width: 100%; position: static; }
    .card { padding: 20px 15px; margin-bottom: 20px; }
    h2 { font-size: 18px; } h3 { font-size: 16px; }
    .modal-content, .modal-master-content { width: 95% !important; padding: 25px 15px !important; box-sizing: border-box; margin: 10% auto; }
    .close-btn { right: 10px; top: 10px; font-size: 28px; }
    .tab-container, .tabs { flex-direction: column; gap: 5px; }
    .tab-btn { width: 100%; border-radius: 8px !important; margin-bottom: 0; padding: 12px; }
    .task-card { flex-direction: column; gap: 15px; padding: 15px; }
    .task-info h4 { font-size: 16px; }
    .btn-grade { width: 100%; text-align: center; box-sizing: border-box; }
    .filter-bar { flex-direction: column; align-items: stretch; gap: 10px; }
    .filter-bar select, .filter-bar input, .filter-bar button { width: 100%; }
    .preview-table, .data-table, .target-table { font-size: 11px; }
    .preview-table th, .preview-table td, .data-table th, .data-table td { padding: 6px; }
    div[style*="overflow"], div[style*="overflow-x"], .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .progress-container { width: 90%; }
    .bcos-alert-box { width: 95%; padding: 25px 15px; }
}

/* =========================================================
   🍔 KHUSUS MENU DROPDOWN (Tablet & HP - Lebar di bawah 950px)
   ========================================================= */
@media screen and (max-width: 950px) {
    .hamburger { display: block; }
    .btn-logout-desktop { display: none !important; }
    .header-nav { flex-direction: row; padding: 15px 20px; flex-wrap: wrap; }
    
    .nav-links {
        display: none; /* Disembunyikan dulu sampai tombol ditekan */
        flex-direction: column; 
        position: absolute; 
        top: 100%; /* Turun persis di bawah Navbar */
        left: 0; 
        width: 100%; 
        background: white; 
        padding: 0 20px 20px 20px; 
        box-sizing: border-box; 
        box-shadow: 0 10px 15px rgba(0,0,0,0.1); 
        border-bottom: 4px solid var(--bcos-blue);
        align-items: stretch;
        z-index: 9999;
    }
    
    /* KELAS AJAIB UNTUK MEMUNCULKAN MENU */
    .nav-links.active { display: flex !important; animation: slideDown 0.3s ease; }
    
    .nav-links a { text-align: left; padding: 15px; border-bottom: 1px solid #f1f5f9; border-radius: 0; font-size: 15px; width: 100%; box-sizing: border-box;}
    
    /* Tombol Logout Khusus HP */
    .btn-logout-mobile { 
        display: block; 
        width: 100%; 
        margin-top: 15px; 
        background: var(--bcos-red); 
        color: white; 
        border: none; 
        padding: 15px; 
        border-radius: 8px; 
        font-weight: bold; 
        cursor: pointer; 
        font-size: 15px; 
    }
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }