"Take care, sir!" - how formal/informal is "take care" in the meaning of "goodbye"?
Solution 1:
With take care, the issue isn't really about whether the register is formal or informal. If there is incongruence read into "Take care, sir", it comes from the different degrees of social distance implied.
I'm using the term somewhat loosely, but the version of social distance I'm referring to is affective social distance:
According to this approach, social distance is associated with affective distance, i.e. how much sympathy the members of a group feel for another group. - wikipedia
Here, take care is something that one might say to a close friend or loved one, wishing them well with a degree of tenderness. It carries the connotation that the wisher and the 'wished' are close.
On the other hand, addressing someone as sir instead of using his name or a term of affection implies that the speaker and the person addressed are not close.
You ask:
How formal / informal is take care used in the meaning of goodbye? Is it appropriate to be mixed with the addressing by sir (when meant seriously and not in a funny way)?
The phrase "take care" used as a farewell isn't necessarily formal or informal, just as a word like "Hello" isn't easily categorised as formal or informal. Also, "take care" doesn't mean goodbye, even though it is a farewell wish.
In a situation such as the fictional workplace setting between Tony Stark the boss and his extremely close member of staff, Pepper Potts, the mixture of close and distant language expressed in "Take care, sir" can work. In the scenario you asked about, it might also work if the assistant was trying to express friendliness within the constraints of the protocols she had to follow.
A parting "Take care, sir" to you isn't necessarily inappropriate, but it suggests (whether real or manufactured) a degree of concern for your well-being.
Solution 2:
'Take care, Sir' is certainly a mixture of styles of informal and formal - and it is an incongruous one. To my English ears, it sounds wierd, and if someone at a service desk said that to me (in which case it would be 'take care, Madam') I would be mildly offended.
It is a bit like saying 'cuddles duckie dearie, Sir' it sounds too familiar, and mixed with 'Sir' just makes it sound overweeningly sugary and ridiculous - like something from Monty Python!
Better choices might be: 'Thank you for your enquiry Sir. Have a good evening'. Or 'Thank-you for visiting us Sir. Let us know if you need anything more. Good-bye'.
'Take care' is an American expression that has become accepted in the UK. It tetains a slight cheesiness however and I would avoid using it in formal or semi-formal situations.
In informal situations like saying goodnye to a partner at the railway station, you could say 'take care of yourself' - but this is not the use of the expression 'take care'. It is a proper sentence, commonly used, that includes the words 'take care'. If you said 'take care!' at such an emotive moment - 'take care' being an expression similar to 'have a nice day!' - it would seem cheesy and insincere - as incongrous as saying 'Thank-you for your visit, Sir!' in that situation!
I hope that helps!
Take care now, ducky loves! 😊