It's a fast visit but you've made good choices I think. Some thoughts:
The Alhambra can take most of your day, including the gardens. For your second Granada sight, if there's time, I suggest the late-Gothic Royal Chapel in the center of the city next to the cathedral, with the tombs of Ferdinand and Isabella and amazing Renaissance altar.
Take an early train to Cordoba and a late one to Madrid. The Mezquita is one of my favorite sights in Europe. I liked it better than the Alhambra, maybe because it's more manageable in scale, but also because the Christians built a cathedral in the middle of it (instead of replacing it entirely as in Sevilla and other cities). The old synagogue and Casa de Sefarad, a Jewish museum, are also very interesting. Check out the city view from halfway across the bridge, but don't bother with the obscurely hokey Museum of Andalucian Life at the far end.
The aqueduct in Segovia is another of my Europe "top" favorites, a stunning example of Roman engineering, and the hilltop city is also attractive and interesting. In my mind it competes with Toledo for a day trip. But Madrid has plenty to occupy your whole time there.