Cagliari lose last-gasp Juve appeal