.new-proposal-actions{max-width:350px;min-width:240px}.new-proposal-actions p{font-size:13px!important;line-height:1.5!important;margin:10px 0 5px!important}.new-proposal-actions a{font-size:13px;color:#254bd1}
.template-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.template-card{padding:22px;border:1px solid #d9e1f1;border-radius:14px;background:#f7f9ff;min-width:0}.template-card.is-default{border-color:#3459ff;background:#eef3ff}.template-card h3{font-size:20px;line-height:1.4;margin:12px 0 8px;overflow-wrap:anywhere}.template-card p{font-size:14px;line-height:1.6;color:#52627c;overflow-wrap:anywhere}.template-badges{display:flex;flex-wrap:wrap;gap:8px}.template-badge{display:inline-block;padding:5px 9px;background:#e1e8fc;border-radius:6px;font-size:12px;color:#1e397d;font-weight:700}.template-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:18px}.template-actions button,.template-actions a{min-height:44px}.template-card small{font-size:12px;color:#52627c}.template-empty{grid-column:1/-1;padding:22px;border:1px dashed #c0cee7;border-radius:12px;color:#52627c;line-height:1.6}
.template-dialog{width:min(560px,calc(100% - 32px));max-height:calc(100dvh - 40px);overflow:auto;padding:26px;border:1px solid #d9e1f1;border-radius:16px;color:#0b163a;background:#fff;box-shadow:0 20px 80px #0b163a33}.template-dialog::backdrop{background:#0b163a88}.template-dialog h2{font-size:23px;line-height:1.35;margin:0 0 20px}.template-dialog label{display:block;font-size:14px;font-weight:650;margin:14px 0}.template-dialog input:not([type=checkbox]),.template-dialog textarea{display:block;width:100%;box-sizing:border-box;font:inherit;margin-top:7px;padding:11px;border:1px solid #bdcbe2;border-radius:8px;color:#0b163a;background:white}.template-dialog p{font-size:13px;line-height:1.6;color:#52627c}.template-dialog .template-check{display:flex;gap:10px;align-items:center;min-height:36px}.template-dialog input[type=checkbox]{width:18px;height:18px;flex-shrink:0;accent-color:#3459ff}.template-dialog .template-error{padding:10px;border-radius:6px;background:#fff0ed;color:#9c2920}.template-dialog button{font:inherit;cursor:pointer}.template-dialog [hidden]{display:none!important}.template-dialog :focus-visible,.template-card :focus-visible,.new-proposal-actions :focus-visible{outline:3px solid #3459ff;outline-offset:3px}
.template-context{padding:14px 24px;margin:0;border-bottom:1px solid #dbe3f3;background:#eef3ff;font-size:13px;line-height:1.6;color:#253c75}.template-context strong{display:block}.template-context button{margin-top:10px;min-height:44px}.template-context[hidden]{display:none}
.template-card .template-action-hint{font-size:13px;margin:8px 0 0;line-height:1.5}
.template-edit-mode{height:100dvh;display:grid;grid-template-rows:auto minmax(0,1fr)}
.template-edit-mode .app-header{height:auto;min-height:86px;padding-top:12px;padding-bottom:12px;gap:16px;background:var(--paper);backdrop-filter:none}
.template-edit-mode .header-actions{min-width:0;justify-content:flex-end}
.template-edit-mode .workspace{height:auto;min-height:0}
.template-edit-mode .brand>div{display:none}
.template-edit-mode .header-actions .button{min-height:44px}
.template-edit-mode .save-status{font-size:12px}
#saveTemplateButton{white-space:normal;max-width:310px;line-height:1.35}
#templatePublishStatus{margin:12px 0 0;padding:10px 12px;border:1px solid #c2d0ee;border-radius:8px;background:#fff;font-weight:600}
#templatePublishStatus[data-state=success]{background:#edf9f2;border-color:#a9d7bb;color:#195c37}
#templatePublishStatus[data-state=error]{background:#fff0f2;border-color:#d79ca5;color:#961426}
@media(max-width:820px){.template-edit-mode{height:auto;display:block}.template-edit-mode .workspace{height:auto}.template-edit-mode .app-header{align-items:flex-start}.template-edit-mode .header-actions{flex:1}.template-edit-mode .save-status{flex-basis:100%;margin:0;text-align:right}#saveTemplateButton{flex-basis:100%;max-width:none}.template-edit-mode .header-actions .pdf-format-label{min-width:0}.template-edit-mode .header-actions .button{font-size:12px}}
.proposal-row .row-actions{max-width:350px;gap:8px}.proposal-row .row-actions .portal-button{min-height:44px}.proposal-row :focus-visible{outline:3px solid #3459ff;outline-offset:3px}
@media(max-width:700px){.template-list{grid-template-columns:1fr}.template-card{padding:18px}#templatesSection .panel-heading{flex-direction:column}.new-proposal-actions{max-width:none;width:100%}.template-dialog{padding:20px}.template-dialog input:not([type=checkbox]),.template-dialog textarea{font-size:16px}.template-actions{gap:10px}}
