@media (max-width: 768px) {
    body { overflow: auto; }

    .mobile-header {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        background: #fff;
        border-bottom: 1px solid #eee;
        position: sticky; 
        top: 0; 
        z-index: 900;
		height: auto;
		min-height: 55px;
    }

/* --- 1. THIẾT LẬP MẶC ĐỊNH (KHI LOGOUT) --- */
.mobile-header, .od-sidebar {
    top: 0 !important; /* Luôn khít lên trên cùng khi không có Admin Bar */
}

/* Trạng thái khi KHÔNG đăng nhập */
.mobile-header, .od-sidebar {
    top: 0 !important;
}

/* Trạng thái khi CÓ đăng nhập */
body.admin-bar .mobile-header, 
body.admin-bar .od-sidebar {
    top: 32px !important; /* Thử 32px trước cho desktop */
}

@media screen and (max-width: 782px) {
    body.admin-bar .mobile-header,
    body.admin-bar .od-sidebar {
        top: 46px !important;
    }
}

    .mobile-logo { height: 55px; }
    .hamburger-btn { background: none; border: none; display: flex; flex-direction: column; gap: 5px; cursor: pointer; }
    .hamburger-btn span { width: 25px; height: 2px; background: #000; }

    .od-sidebar {
        position: fixed !important;
        top: 0; 
        left: 0;
        width: 65% !important;
        max-width: 280px;
        background: #f2f2f2 !important;
        transform: translateX(-101%);
        z-index: 2000 !important;
        transition: transform 0.3s ease;
        border-right: none;
    }

    .od-sidebar.active { 
		transform: translateX(0) !important;
    	width: var(--sidebar-width);
    	height: 100vh;
    	background: var(--bg-sidebar);
    	border-right: 1px solid var(--border-color);
    	display: flex;
    	flex-direction: column;
    	padding: 50px 0;
    	z-index: 100;
    	position: fixed;
    	top: 0;
	}

    .overlay {
        display: none;
        position: fixed; 
        inset: 0;
        background: rgba(255, 255, 255, 0.85);
        z-index: 1500;
        backdrop-filter: blur(2px);
    }
    .overlay.active { display: block !important; }

    /* ĐIỀU CHỈNH NÚT X TẠI ĐÂY */
    .close-btn-outer {
        display: block !important;
        position: absolute; 
        top: 20px; /* Tăng khoảng cách từ trên xuống */
        right: 20px;
        font-size: 40px; 
        background: none; 
        border: none; 
        color: #000; 
        cursor: pointer; 
        line-height: 1;
        z-index: 2100;
    }

    /* Nếu đang đăng nhập Admin, đẩy nút X xuống thấp hơn nữa để không bị thanh đen che */
    .admin-bar .close-btn-outer {
        top: 60px;
    }

    .od-main { padding: 0; overflow: visible; height: auto; }
}
