  We present general analytical criteria for the design of lossless reciprocal
two-port systems, which exhibit prescribed scattering spectra $S(\omega)$
satisfying $S_{22}(\omega)=e^{i\varphi}S_{11}(\omega)$, including symmetric
($S_{22}=S_{11}$) or "antimetric" ($S_{22}=-S_{11}$) responses, such as
standard filters (Butterworth, Chebyshev, elliptic, etc.). We show that the
non-normalized resonant (quasi-normal) modes (QNMs) of all such two-port
systems couple to the input and output ports with specific unitary ratios,
whose relative signs determine the position of the scattering zeros on the real
frequency axis. This allows us to obtain design criteria assigning values to
the poles, background response, and QNM-to-ports coupling coefficients. Filter
devices can then be designed via a well-conditioned nonlinear optimization (or
root-finding) problem using a numerical eigensolver. As an application, we
design multiple microwave metasurfaces configured for polarization-preserving
transmission, reflective polarization conversion, or diffractive "perfect
anomalous reflection", to realize filters that precisely match standard
bandpass or bandstop filters of various types, orders and bandwidths, with
focus on the best-performing elliptic filters.
