#checkPlaceholder.cheque-workspace{max-width:1550px;margin:20px auto;padding:24px}.cheque-grid{display:grid;grid-template-columns:minmax(330px,420px) minmax(400px,1fr);gap:18px}.cheque-grid section{margin:0}.cheque-settings{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.cheque-designer{margin:22px 0;padding:18px;background:#f5f8f7;border:1px solid #d4e2dd;border-radius:9px}#cheque-fields input[type=number]{width:80px}#cheque-preview{min-height:220px;display:flex;align-items:center;justify-content:center;background:#f2f5f4;border-radius:8px;padding:16px}#cheque-preview svg{width:100%;max-height:430px;overflow:visible}#cheque-history-rows td{min-width:95px}#cheque-words{font-size:12px;background:#f5f8f7}#cheque-status-dialog{max-width:460px}.cheque-workspace details{margin:18px 0}.cheque-workspace .notice{margin-bottom:15px}.cheque-workspace #cheque-pdf{margin-top:8px}.cheque-workspace input[type=date]{min-width:150px}@media(max-width:1000px){.cheque-grid{grid-template-columns:1fr}.cheque-settings{grid-template-columns:repeat(2,1fr)}}@media(max-width:600px){#checkPlaceholder.cheque-workspace{padding:15px;margin:10px}.cheque-settings{grid-template-columns:1fr}.cheque-grid .two{display:block}}
/* Separate Check Printing sections keep the visual designer and calibration workflow clear. */
#checkPlaceholder.cheque-workspace{width:100%;max-width:none;min-height:calc(100vh - 170px);margin:0;padding:16px 24px;flex:1}.cheque-tabs{padding:10px 0 16px}.cheque-tab-panel{min-height:calc(100vh - 260px)}.cheque-design-panel{display:grid;grid-template-columns:minmax(340px,.9fr) minmax(620px,1.25fr);gap:18px;align-items:start}#checkPlaceholder .cheque-design-panel>section,#checkPlaceholder .cheque-design-panel>details{margin:0;min-width:0}.cheque-design-panel .cheque-settings{grid-template-columns:repeat(3,minmax(0,1fr))}.cheque-design-panel .table-scroll{overflow:auto;max-height:none}.cheque-design-panel #cheque-fields{min-width:660px}#cheque-preview{min-height:55vh}#cheque-preview svg{max-height:65vh;touch-action:none}.cheque-field{cursor:grab}.cheque-field.dragging{cursor:grabbing}.cheque-field.dragging rect{fill:#d9eee8;stroke:#087c72;stroke-width:.4}#cheque-printing-panel>section{max-width:960px}#cheque-history-panel>section{margin:0}#cheque-maintenance-panel>details{max-width:900px}
#cheque-preview{flex-direction:column;gap:12px}#cheque-preview>.hint{max-width:680px;text-align:center}#cheque-preview svg{flex:1;min-height:250px;width:100%}
#checkPlaceholder .required-missing{border:1.5px solid #c74436;background:#fff4f2;box-shadow:0 0 0 1px #f2c3bd}#checkPlaceholder .required-missing:focus{outline:2px solid #c74436;outline-offset:1px}
#cheque-printing-panel{display:grid;grid-template-columns:minmax(420px,.8fr) minmax(520px,1.2fr);gap:18px;align-items:start}#cheque-printing-panel[hidden]{display:none}#cheque-printing-panel>section{max-width:none;margin:0;min-width:0}#cheque-printing-panel .toolbar{flex-wrap:wrap}#cheque-print-preview{min-height:65vh;background:#f3f5f4;border-radius:8px;padding:12px;display:flex;align-items:center;justify-content:center}#cheque-print-preview svg{display:block;width:100%;max-height:64vh}#cheque-print-preview iframe{border:0;width:100%;height:70vh;background:white}
#cheque-designer-panel>.cheque-template-manager{grid-column:1/-1;display:flex;align-items:end;gap:14px;flex-wrap:wrap;padding:14px 18px}#cheque-designer-panel>.cheque-template-manager .eyebrow{width:100%;margin:0}#cheque-designer-panel>.cheque-template-manager label{min-width:280px;max-width:460px;flex:1;margin:0}#cheque-designer-panel>.cheque-template-manager .toolbar{flex-wrap:wrap}#cheque-designer-panel>.cheque-template-manager .hint{width:100%;margin:0}
#cheque-print-preview{flex-direction:column;gap:12px}#cheque-print-preview>.hint{margin:0;text-align:center}#cheque-print-preview>a{font-size:14px;font-weight:700}
@media(max-width:1100px){#cheque-printing-panel{grid-template-columns:1fr}#cheque-print-preview{min-height:360px}}
@media(max-width:1200px){.cheque-design-panel{grid-template-columns:1fr}#cheque-preview{min-height:330px}.cheque-design-panel .cheque-settings{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){#checkPlaceholder.cheque-workspace{margin:0;padding:12px}.cheque-design-panel .cheque-settings{grid-template-columns:1fr}.cheque-tabs{flex-wrap:wrap}.cheque-tabs button{flex:1;min-width:110px}}

/* The global .dirty rule colors text amber; keep the primary Save layout label readable. */
#cheque-save-layout.primary.dirty{color:#fff!important;background:#a64f12;border-color:#a64f12}
#cheque-save-layout.primary.dirty:hover{background:#873e0a;border-color:#873e0a}
