I agree with the posters who think your itinerary is fine. The important question to ask yourself is this: Will you return to Andalucia some day to see Granada and the AMAZING Alhambra if you omit Granada from this itinerary? I can't imagine going to Andalucia and not seeing the Alhambra.
With your current itinerary, you get to see the 3 most important cities in Andalucia: Seville, Granada, and Cordoba. if you don't mind the hotel changes, I would definitely spend one night in Cordoba. It is magical at night when the day trippers are gone, and the Roman Bridge and Mezquita are illuminated. Cordoba was one of our favorite places.
If the train schedules don't work in and out of Granada, I recommend the ALSA bus. We took it twice; the bus is comfortable, air conditioned, modern and clean. I agree with DebVT that train and bus travel in Spain is low stress. And I would not add more time to Madrid, even though we like Madrid, because as DebVT says, Madrid is easy to fly in and out of. See Andalucia while you are there, and save Madrid for another trip.