Our recent itinerary was 5 nights in Dubrovnik. It looked like this:
Thursday: Arrive early afternoon flight to Dubrovnik; check into apartment that was about a 15 minute walk to Old Town; have dinner and stroll the Old Town
Friday: Day trip to Mostar with our private guide
Saturday: Explore Dubrovnik; Homeland War Museum etc.
Sunday: Day trip to Montenegro again with our guide
Monday: Another day in Dubrovnik; walked the walls etc.
Tuesday: Toured the Peljesac Wine Peninsula; wine tastings and lunch with our guide; ferry from Orebic to Korcula.
We felt this timeline provided us with more than enough time in Dubrovnik itself.
I can't speak to Hvar, because we chose Korcula instead, and it was a highlight of our time in Croatia.
After 3 nights in Korcula, (in an amazing apartment) we took a ferry to Split for 3 nights. We were not big fans of Split; it was our least favorite destination in Croatia.
Our 3 day guide in Croatia was Petar Vlasic, and he is absolutely fabulous! Professional, knowledgeable, personable and an excellent value for the services that he provides. Highly recommend him if that is something that appeals to you. https://www.dubrovnikrivieratours.com/category/tours/