the first night in Istanbul I will be solo. .safe to walk around?any areas better than other?
Yes, I have been safe and there will probably be lots of people out late, if the weather is warm. If you don't want to shop, don't want a glass of tea, don't want a helpful gentleman to show you around, then just say, "No." Dark glasses help, but are not practical at night. Sitting on a bench is rarely an activity you can do alone; someone will join you. When I arrived before tour a few years ago, I was lucky to run into a summer music fest in the main square in Sultanahmet. If you are joining a tour and staying in the same neighborhood or at the same hotel, then it is likely to be a fine location.
See also recent replies to https://community.ricksteves.com/travel-forum/turkey/safe-for-2-women. That question came from two women, but all the answers came from solo women travelers. To repeat my answer there, the tips that we offer for solo women apply all over Europe and in Turkey.
I was born when Truman was in office and during two nights of a RS 7 day tour of Istanbul I wandered solo at night to take pictures of the beautifully lit mosques. In ALL honesty I won't walk around downtown Los Angeles at night but in Istanbul had no cause for concern or fear. Loads of people out and about. Simply be aware of your surroundings as you would anywhere in the world at night as a single female.
I would suggest you wear a scarf if you feel unwanted attention. Our daughter had a terrible time until she started wearing a scarf, especially in the markets.
I will be back in Istanbul for a long weekend in June before tour. I have never had a problem in three visits. I stay at Hotel Aya Sofia which is just downhill from the Hippodrome. I will be lucky enough again this year to be in Istanbul during Ramadan, a lovely family time.
If you don't want to buy something just say, "No," and keep walking. Offering of tea takes place everywhere. I once bought postcards in the town of Foca, on the Aegean and was offered tea. I said, "Yes. " The woman then proceeded to find a chair so I could sit down. She didn't want to sell me anything else. Relax and enjoy!
I was just there two weeks ago and felt very safe at all times. I was with my husband, but on two occasions, he felt ill and I wandered around solo. I walked all around the Old City by myself at night. I did get advice from my hotel reception to avoid the waterfront at night. If you check with your hotel concierge, they will show you areas on a map to avoid.
Also walked all the way from Old City to New City by myself.
You will be approached by men who want you to go to their carpet store or entice you to visit their shop/restaurant. You can just politely say no and walk away as I did and never felt bothered.