/* Fixed chrome over a constant spacer: hiding tabs cannot reflow the document. */
body.salesdesk-sticky-mode>.topbar{position:fixed!important;top:0!important;left:0;right:0;width:100%;margin:0!important;z-index:100;min-height:0!important;transition:none!important}
.sd-header-spacer{width:100%;pointer-events:none;overflow-anchor:none}
body.salesdesk-sticky-mode .topbar .nav-scroller{overflow:hidden;max-height:var(--nav-expanded-height,44px);opacity:1;transform:translateY(0);transition:max-height 260ms cubic-bezier(.22,.7,.2,1),opacity 200ms ease,transform 260ms cubic-bezier(.22,.7,.2,1)!important}
body.salesdesk-sticky-mode.deal-tabs-hidden .topbar .nav-scroller{max-height:0!important;min-height:0!important;opacity:0;transform:translateY(-10px);padding-block:0!important;margin-block:0!important;pointer-events:none}
html body.salesdesk-sticky-mode .deal-stage-nav{transition:box-shadow 200ms ease!important;overflow-anchor:none}
@media(max-width:1100px){body.salesdesk-sticky-mode>.topbar{grid-template-rows:auto minmax(0,auto)!important;align-content:start!important;min-height:0!important}body.salesdesk-sticky-mode.deal-tabs-hidden>.topbar>.nav-scroller{height:44px!important;max-height:0!important}}
/* One flat editing surface; individual document groups retain their own boundary. */
html body .page .deal-editor-main>.panel.form-panel{border:0!important;box-shadow:none!important;border-radius:0!important;padding:0!important;margin-inline:0!important;background:transparent!important}
html body .page .stage-navigation-form{padding-inline:0!important;overflow-x:clip}
html body .page .stage-navigation-form>details.stage-section{padding:8px 0!important;margin-inline:0!important;border:0!important;box-shadow:none!important;background:transparent!important}
html body .page .stage-navigation-form input,html body .page .stage-navigation-form select,html body .page .stage-navigation-form textarea{touch-action:pan-y}
html:not([data-theme=dark]) .deal-stage-nav .stage-nav-node.past-stage{border:2.5px solid #23734f!important;background:#eef8f1!important;color:#185536!important;font-weight:700}
html:not([data-theme=dark]) .deal-stage-nav .stage-nav-node.actual-stage{border:2.5px solid #23734f!important;box-shadow:0 0 0 2px #d0ead8!important}
html:not([data-theme=dark]) .deal-stage-nav .stage-nav-timeline button[aria-pressed=true] .stage-nav-node{background:#6257d9!important;color:#fff!important;border-color:#6257d9!important}
/* Header/footer never scroll out of the upload sheet. Only its compact body scrolls. */
html body #dl-chat-upload .dl-upload-panel{display:flex!important;flex-direction:column;overflow:hidden!important;max-height:calc(100dvh - 20px)!important;padding:12px!important;gap:4px!important;scroll-padding:0!important}
#dl-chat-upload .dl-upload-panel>header{flex:none;min-height:36px}#dl-chat-upload .dl-upload-panel>p{flex:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0 0 4px!important}
html body #dl-upload-form{display:flex!important;flex-direction:column;min-height:0!important;overflow:hidden;gap:0!important;margin:0!important}
#dl-upload-form .dl-upload-body{display:flex;flex-direction:column;gap:8px;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:2px 1px 6px}
html body #dl-chat-upload #dl-upload-form fieldset{margin:0!important;padding:0!important;border:0;min-width:0;gap:4px!important}
#dl-upload-form .dl-upload-body>fieldset:first-of-type{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px!important}
#dl-upload-form .dl-upload-body>fieldset:first-of-type legend{grid-column:1/-1;width:100%}
html body #dl-chat-upload #dl-upload-form legend{font-size:12px!important;line-height:1.3;margin:0 0 3px!important;padding:0!important}
html body #dl-chat-upload #dl-upload-form fieldset label{display:flex!important;flex-direction:row!important;align-items:center!important;gap:6px!important;width:auto!important;min-height:40px!important;height:auto!important;padding:5px 6px!important;margin:0!important;font-size:12px!important;line-height:1.25!important}
html body #dl-chat-upload #dl-upload-form input[type=radio]{appearance:auto!important;width:17px!important;height:17px!important;min-width:17px!important;min-height:17px!important;flex:0 0 17px!important;margin:0!important;padding:0!important;box-shadow:none!important;outline:none!important;background:transparent!important;accent-color:#6257d9;border-radius:50%;-webkit-tap-highlight-color:transparent}
html body #dl-chat-upload #dl-upload-form input[type=radio]:focus-visible{outline:2px solid #6257d9!important;outline-offset:3px!important}
#dl-upload-form .completion-radio-row{display:grid!important;grid-template-columns:1fr 1fr;gap:6px!important}
html body #dl-chat-upload #dl-upload-form .upload-quotation-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px!important;margin:0!important}
html body #dl-chat-upload #dl-upload-form label:not(:has(input[type=radio])){display:flex;flex-direction:column;gap:3px!important;min-width:0;margin:0!important;font-size:12px!important;line-height:1.3!important}
html body #dl-chat-upload #dl-upload-form input:not([type=radio]):not([type=hidden]):not([type=file]){font-size:16px!important;min-height:38px!important;height:38px!important;padding:6px 8px!important;min-width:0!important;width:100%!important}
#dl-upload-form #dl-upload-permissions{font-size:11px!important;margin:0!important;line-height:1.3}
#dl-upload-form #dl-upload-selected{font-size:11px;margin:0!important;max-height:34px;overflow:auto;overflow-wrap:anywhere}
html body #dl-chat-upload #dl-upload-form input[type=file]{height:auto!important;min-height:34px!important;margin:0!important;padding:5px!important;font-size:12px!important}
html body #dl-chat-upload #dl-upload-form footer{position:static!important;flex:none;display:flex;padding:8px 0 0!important;margin:0!important;border-top:1px solid var(--sd-rule);background:var(--sd-canvas);gap:8px}
#dl-upload-form footer button{min-height:44px!important}
/* An open stage owns its pinned heading until its section scrolls away. */
html body .page .pipeline-stage,html body .page .pipeline-stage>.pipeline-archive-content,html body .page .pipeline-stage .pipeline-cards{overflow:visible!important;max-height:none!important}
html body .page .pipeline-stage-grid{align-items:start}
html body .page .pipeline-stage[open]>.pipeline-stage-summary{position:sticky!important;top:var(--pipeline-sticky-top,64px)!important;z-index:25;background:var(--sd-canvas)!important;transition:box-shadow 180ms ease,background-color 180ms ease!important;overflow-anchor:none}
.pipeline-stage-summary.is-pinned{box-shadow:0 3px 9px #13223c1c!important}
.dl-list-toolbar{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:8px}.dl-list-toolbar p{margin:0}.dl-sent-line{display:flex;gap:6px;margin-top:6px}.dl-finish-line{flex-wrap:wrap}.sent-cell{text-align:center!important}.sent-cell .finish-symbol{display:inline-flex;align-items:center;justify-content:center}
@media(prefers-reduced-motion:reduce){body.salesdesk-sticky-mode .topbar .nav-scroller,html body .page .pipeline-stage[open]>.pipeline-stage-summary{transition:none!important}}
html body #dl-chat-upload #dl-upload-form [hidden]{display:none!important}
html body .dl-finish-line[hidden]{display:none!important}
#dl-chat-upload{top:var(--upload-visible-top,0px);bottom:auto;height:var(--upload-visible-height,100dvh)}
html body #dl-chat-upload .dl-upload-panel{max-height:calc(var(--upload-visible-height,100dvh) - 20px)!important}
body.salesdesk-sticky-mode.sd-header-measuring .topbar .nav-scroller{transition:none!important}
@media(pointer:coarse){html body #dl-chat-upload #dl-upload-form fieldset label{min-height:44px!important}}
