Sevilla, Granada, Cordoba, Toledo, all wonderful cities and you could find a lot to do in all four. Some on this forum love day trips because they find the packing/unpacking and moving cumbersome. This is valid, it certainly is easier to minimize changes and some places just make sense for day trips. I, myself, don't mind changing hotels when it makes sense, and I dislike backtracking and can pack up pretty quickly. Toledo is a wonderful town, but it will be flooded with tourists. I stayed over one night, could have stayed two but was short on time. It was much more enjoyable in the evening and morning when it was calmer. Segovia is a place that makes sense, to me, to do a day trip, though even there I could find enough to stay overnight. The earlier you can get to Segovia the better for being able to enjoy the aqueduct. I love Cordoba and there is a lot to do. Again, it is wonderful there when the day trippers are gone and you can enjoy the river, bridge and views of the Mezquita with the locals. I stayed in Madrid two nights. It is a lovely, lively city, but it is not as interesting and historical as the other cities on your list. Unless you like art, I would minimize time in Madrid and stay just the last night before you fly out, unless you wanted to do a day trip to Segovia. Again, there is nothing wrong with Madrid, but Toledo and the cities in Andalusia are so much more interesting.