.acct-template-control{display:grid;grid-template-columns:auto minmax(230px,440px) auto;align-items:center;gap:10px;margin:0 0 14px;padding:12px 16px;background:#f4f8fc;border:1px solid #d7e1eb;border-radius:8px}.acct-template-control>label{font-size:12px;font-weight:700}.acct-template-control>select{padding:9px;border:1px solid #c8d8e6;border-radius:6px;background:#fff}.acct-template-control>small{font-size:11px;color:#637c93;grid-column:2/-1}.acct-tax-origin{display:block;font-size:10px;color:#637c93;margin-top:3px}@media print{.acct-template-control,.template-editor-backdrop,.template-confirm{display:none!important}}


.acct-template-control{grid-template-columns:auto minmax(230px,440px) auto;justify-content:start}
.acct-template-control>small{grid-column:2/-1}
.template-editor-backdrop{z-index:130;padding:18px;background:rgba(12,32,51,.40)}
.template-confirm{z-index:150}
.template-editor-card{display:flex;flex-direction:column;width:min(1080px,100%);max-width:1080px;max-height:94vh;padding:0;overflow:hidden}
.template-editor-header{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:18px 22px;border-bottom:1px solid #dce5ed;background:#f7faff}
.template-editor-header h2{margin:2px 0 5px;font-size:20px}.template-editor-header small,.template-editor-header p{color:#687b8d;font-size:11px;margin:0}
.template-editor-body{padding:18px 22px;overflow:auto}
.template-editor-toolbar{display:flex;align-items:end;justify-content:space-between;gap:12px;flex-wrap:wrap;padding-bottom:16px;margin-bottom:16px;border-bottom:1px solid #e2e9ef}
.template-editor-toolbar>label{flex:1;min-width:240px;max-width:490px;color:#526b82;font-size:11px;font-weight:700}
.template-editor-toolbar select{display:block;width:100%;margin-top:5px;padding:9px;border:1px solid #c8d8e6;border-radius:7px;background:white}
.template-editor-toolbar>div{display:flex;gap:6px;flex-wrap:wrap}.template-editor-toolbar button{font-size:11px;padding:8px 10px}
.template-editor-meta{display:grid;grid-template-columns:1.7fr 1fr 1fr;gap:12px}.template-editor-field{display:block;color:#526b82;font-size:11px;font-weight:700;min-width:0}
.template-editor-field input,.template-editor-field select{display:block;width:100%;min-height:38px;padding:8px;margin-top:5px;border:1px solid #cbd9e5;border-radius:6px;color:#183049;background:white}
.template-editor-field small{display:block;margin-top:4px;color:#7b8e9e;font-size:10px;font-weight:400}
.template-editor-visible{display:flex;align-items:center;gap:6px;margin:15px 0;font-size:12px;color:#45627e}.template-editor-visible input{width:auto}.template-editor-visible small{color:#7b8e9e;font-size:10px}
.template-editor-line{border:1px solid #d5e0ea;border-radius:8px;margin-bottom:12px;overflow:hidden;background:white}
.template-editor-line-head{display:flex;justify-content:space-between;align-items:center;padding:7px 12px;background:#f1f6fa;border-bottom:1px solid #dfe7ee;font-size:12px}
.template-editor-line-head>div{display:flex;gap:5px}.template-editor-line-head .compact{padding:4px 8px;font-size:10px}.template-editor-card button:disabled{opacity:.4;cursor:default}
.template-editor-row-fields{display:grid;grid-template-columns:1.15fr 1.8fr 160px;gap:12px;padding:12px}
.template-editor-row-fields.transfer{grid-template-columns:1fr 1fr 1.5fr 140px}
.template-editor-tax{display:flex;align-items:end;gap:18px;padding:0 12px 12px;color:#597287;font-size:11px}
.template-editor-tax label{max-width:330px;width:100%}.template-editor-tax>span{padding-bottom:10px}.needs-check{color:#995f0c!important}
.template-editor-note{font-size:11px;line-height:1.7;color:#718798;margin:16px 0 9px}
.template-editor-preview{padding:11px 13px;background:#edf5ff;border-radius:6px;color:#416b96;font-size:12px}
.template-editor-footer{display:flex;gap:8px;align-items:center;padding:14px 22px;border-top:1px solid #dce5ed;background:#fff}
.template-editor-footer>span{flex:1}.template-editor-card .notice[hidden]{display:none}
.template-editor-footer .template-delete-button,.template-confirm .template-delete-button{border:1px solid #bb3c49;color:#fff;background:#a52f3d}
.template-editor-footer .template-delete-button:hover,.template-confirm .template-delete-button:hover{background:#892534}
@media(max-width:900px){.acct-template-control{grid-template-columns:1fr auto}.acct-template-control>label{grid-column:1/-1}.acct-template-control>small{grid-column:1/-1}
.template-editor-backdrop{padding:8px}.template-editor-card{max-height:97vh}.template-editor-header,.template-editor-body{padding:14px}
.template-editor-meta{grid-template-columns:1fr 1fr}.template-editor-meta>label:first-child{grid-column:1/-1}
.template-editor-row-fields,.template-editor-row-fields.transfer{grid-template-columns:1fr 1fr}.template-editor-visible{flex-wrap:wrap}
.template-editor-footer{padding:12px;flex-wrap:wrap}.template-editor-footer button{font-size:11px;padding:9px}.template-editor-tax{align-items:start;flex-direction:column;gap:3px}}

