American student Amanda Knox has told an Italian court that the last time she saw murdered Briton Meredith Kercher was hours before her death.