/* Same centred page width and gutters as Deal List. */
html body.deal-editor-page main.page{width:100%!important;max-width:1600px!important;margin:0 auto!important;padding:28px 28px 60px!important}
html body.deal-editor-page{overflow-x:clip}
html body #deal-editor-content #deal-form.stage-navigation-form{overflow:visible!important}
html body #deal-editor-content #deal-form>details.stage-section{position:relative;isolation:isolate;background:transparent!important}
html body #deal-editor-content #deal-form>details.stage-section::before{content:'';position:absolute;inset:0;background:#f7f7ff;box-shadow:0 0 0 100vmax #f7f7ff;clip-path:inset(0 -100vmax);z-index:-1;pointer-events:none}
html[data-theme=dark] body #deal-editor-content #deal-form>details.stage-section::before{background:#242536;box-shadow:0 0 0 100vmax #242536}
html body #deal-editor-content .documents-columns{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:20px!important;align-items:start!important}
html body #deal-editor-content .document-column>label{margin:0!important;min-height:0!important}
html body #deal-editor-content .assignment-save-status{display:block;min-height:18px;margin:2px 0 8px}
html body #deal-editor-content .document-upload-row{display:flex!important;align-items:center!important;gap:8px!important;margin-top:12px!important}
html body #deal-editor-content .document-upload-row .upload-form{display:flex!important;align-items:center!important;gap:8px!important;flex:1;min-width:0}
html body #deal-editor-content .document-upload-row input[type=file]{flex:1;min-width:0;width:0}
html body #deal-editor-content .document-upload-row button{flex:none;white-space:nowrap}
html body #deal-editor-content .quotation-detail-fields{margin-top:18px}
html body #deal-editor-content .quote-reference-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
/* Five stage positions: the last position contains two alternative outcomes. */
html body #deal-stage-nav .stage-nav-timeline{width:100%!important;max-width:760px!important;margin:8px auto!important;grid-template-columns:repeat(4,minmax(44px,1fr)) 88px!important;align-items:center!important;padding:0!important}
html body #deal-stage-nav .stage-nav-timeline::before{left:calc((100% - 88px)/8)!important;right:44px!important;top:50%!important}
html body #deal-stage-nav .stage-nav-final-outcomes{display:flex!important;align-items:center!important;justify-content:center!important;gap:0!important;position:relative;background:transparent!important}
html body #deal-stage-nav .stage-nav-final-outcomes>button{display:flex!important;align-items:center!important;justify-content:center!important;flex:0 0 44px!important;width:44px!important;height:44px!important;min-height:44px!important;margin:0!important;padding:0!important;background:transparent!important;border:0!important}
html body #deal-stage-nav .stage-nav-final-outcomes>button:first-child{justify-content:flex-end!important}
html body #deal-stage-nav .stage-nav-final-outcomes>button:last-child{justify-content:flex-start!important;padding-left:4px!important}
html body #deal-stage-nav [data-view-stage="4"] .stage-nav-node.actual-stage{border:2px solid #24835f!important;color:#176344!important;background:var(--sd-canvas)!important;box-shadow:none!important}
html body #deal-stage-nav [data-view-stage="5"] .stage-nav-node.actual-stage{border:2px solid #c1334e!important;color:#b12640!important;background:var(--sd-canvas)!important;box-shadow:none!important}
html[data-theme=dark] body #deal-stage-nav [data-view-stage="4"] .stage-nav-node.actual-stage{border-color:#78d4a6!important;color:#78d4a6!important}
html[data-theme=dark] body #deal-stage-nav [data-view-stage="5"] .stage-nav-node.actual-stage{border-color:#ff91a2!important;color:#ff91a2!important}
@media(max-width:760px){html body.deal-editor-page main.page{padding:22px 14px 45px!important}}
@media(max-width:600px){html body #deal-editor-content .documents-columns{grid-template-columns:minmax(0,1fr)!important}html body #deal-editor-content .document-upload-row .upload-form{flex-wrap:wrap!important}html body #deal-editor-content .document-upload-row input[type=file]{flex-basis:100%;width:100%}html body #deal-editor-content .quote-reference-grid{grid-template-columns:minmax(0,1fr)}}
