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