Lawsuits allege 'grave harm' to immigrant children in detention