Consumer surplus after quota: red
(Domestic) producer surplus before quota: yellow
(Domestic) Producer surplus after tariff: yellow plus green
Foreign producers who are able to sell to us get the light blue region as additional producer surplus (because they can sell at a higher price).
Government gain from quota: none. Government never gets anything from a simple quota.
Why there is a net national loss: the nation consists of consumers plus government plus domestic producers.
(You may notice that this graph looks just like the graph for the tariff
problem. It's the same picture -- the only difference is that the
light blue area goes to the lucky foreign producers who get in under the
quota, instead of to government. This shows that if you just want
to protect a domestic industry, you cn do so with either a tariff or a
quota.)