Preheat oven to 350°F (175°C).
Combine flour, powdered sugar, softened butter, and a pinch of salt in a bowl until crumbly dough forms.
Press the dough firmly into the bottom of a greased 9x13-inch baking pan.
Bake the crust for 12-15 minutes until set and lightly golden.
In a separate bowl, whisk eggs and granulated sugar until smooth.
Stir in flour, then add lime zest, lime juice, tequila (if using), and vanilla extract, whisking until well combined.
Pour the filling over the baked crust.
Bake for 15-20 minutes until filling is just set and slightly wobbly in the center.
Allow the bars to cool completely on a wire rack.
Dust with powdered sugar and garnish with lime slices or zest.
Optionally, sprinkle coarse sugar or salt along the edges to mimic a margarita glass rim.