#dlg.template-dialog{width:min(72rem,calc(100vw - 2rem));max-width:none;max-height:calc(100dvh - 2rem)}
.template-dialog .body{min-width:0}
.template-tools{display:flex;gap:1rem;align-items:end;flex-wrap:wrap;margin:1rem 0}
.template-tools .field{flex:1;min-width:0}
.template-tools select{width:100%;max-width:100%}
.template-pdf{display:block;width:100%;height:60dvh;min-height:16rem;border:1px solid var(--line);background:#fff}
@media(max-width:600px){#dlg.template-dialog{width:calc(100vw - 1rem);max-height:calc(100dvh - 1rem);padding:1rem}.template-tools{display:block}.template-tools button{margin-top:.75rem;max-width:100%}.template-pdf{height:50dvh}}

@media(max-width:600px){.template-list,.template-list tbody,.template-list tr,.template-list td{display:block;min-width:0;width:100%}.template-list thead{display:none}.template-list tr{padding:.8rem;border-bottom:1px solid var(--line)}.template-list td{padding:.25rem 0;border:0;white-space:normal;overflow-wrap:anywhere}.template-list td.name{min-width:0}.template-list td:nth-child(2){font-size:.8rem;color:var(--muted)}.template-list td:last-child{padding-top:.5rem}}
