"Sir" or "Ma'am" comes from the Feudal times where a person of power was addressed as per their sex. The same goes for "Lord". Sir coming from the word "sire" who was a "Lord"; Ma'am coming from the word Madame, the wife (or "Dame") of a lord. The French follows suit: monsieur et madame.
I follow, unfortunately, modern rules of decorum and will address most everyone as sir or madam. But a common term for both cannot be by nature of the rules of those Feudal times. Women never had official power, only by proxy.
Our word for someone leasing living quarters is titled "landlord". You can see where that came from, eh?