
.invoice-template-modal{position:fixed;inset:0;z-index:10050;display:grid;place-items:center;padding:18px}
.invoice-template-modal.hidden{display:none!important}
.invoice-template-backdrop{position:absolute;inset:0;background:rgba(4,24,38,.62);backdrop-filter:blur(3px)}
.invoice-template-card{position:relative;width:min(940px,96vw);max-height:92vh;overflow:auto;background:#fff;border-radius:20px;box-shadow:0 28px 80px rgba(0,0,0,.28);padding:22px;color:#08283c}
.invoice-template-card>header{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;border-bottom:1px solid #e5eef1;padding-bottom:16px}
.invoice-template-card h2{margin:4px 0 4px;font-size:25px}
.invoice-template-card header p{margin:0;color:#69808d}
.invoice-template-layout{display:grid;grid-template-columns:minmax(300px,.85fr) minmax(330px,1.15fr);gap:24px;padding-top:20px}
#invoice-pdf-template-form{display:grid;gap:14px}
#invoice-pdf-template-form label{display:grid;gap:7px;font-size:13px;font-weight:700}
#invoice-pdf-template-form input:not([type=checkbox]),#invoice-pdf-template-form textarea{width:100%;box-sizing:border-box;border:1px solid #cbdce2;border-radius:11px;padding:11px 12px;font:inherit;color:#08283c;background:#fff}
.invoice-template-color{display:grid;grid-template-columns:54px 1fr;gap:10px}
.invoice-template-color input[type=color]{width:54px;height:42px;padding:3px;border-radius:10px}
#invoice-pdf-template-form .invoice-template-check{display:flex;align-items:center;gap:9px;font-weight:600}
.invoice-template-actions{display:flex;justify-content:flex-end;gap:9px;padding-top:4px}
.invoice-template-preview>span{display:block;margin-bottom:8px;color:#66808d;font-size:10px;font-weight:900;letter-spacing:.12em}
.invoice-preview-sheet{position:relative;overflow:hidden;border:1px solid #d5e3e8;border-radius:15px;padding:23px;background:#fff;box-shadow:0 10px 28px rgba(8,40,60,.08)}
.invoice-preview-sheet>i{position:absolute;left:0;right:0;top:0;height:8px}
.invoice-preview-top{display:flex;justify-content:space-between;gap:14px;margin:6px 0 4px}
.invoice-preview-top b{font-size:13px}.invoice-preview-top em{font-style:normal;font-weight:900;font-size:11px}
.invoice-preview-sheet>strong{display:block;text-align:right;font-size:22px;margin:4px 0 18px}
.invoice-preview-client{background:#f5fafb;border-radius:10px;padding:13px;margin-bottom:17px}
.invoice-preview-client small{display:block;color:#708692;font-size:8px;font-weight:800}.invoice-preview-client b{display:block;margin:5px 0}.invoice-preview-client p{margin:0;color:#6b808a;font-size:10px}
.invoice-preview-row{display:flex;justify-content:space-between;padding:12px 0;border-bottom:1px solid #e8eff2;font-size:11px}
.invoice-preview-total{display:flex;justify-content:flex-end;gap:34px;padding:18px 0 8px;font-size:12px}.invoice-preview-total b{font-size:15px}
.invoice-preview-sheet>p{margin:15px 0 0;text-align:center;color:#7a8e98;font-size:9px}
.invoice-template-card .message{min-height:18px;margin:0;color:#08765d}
@media(max-width:760px){
  .invoice-template-modal{padding:8px}
  .invoice-template-card{padding:16px;border-radius:16px;max-height:96vh}
  .invoice-template-layout{grid-template-columns:1fr}
  .invoice-template-preview{order:-1}
  .invoice-preview-sheet{padding:18px}
}
