/* Keep quotation entry separate from the list without changing other workspaces. */
.quote-page-stack > .quote-create-panel:not(.is-open) { display:none; }
#quoteEditorModal { position:fixed; inset:0; z-index:1100; display:flex; align-items:center; justify-content:center; padding:20px; background:rgba(15,23,42,.48); box-sizing:border-box; }
#quoteEditorModal .quote-editor-dialog { display:flex; flex-direction:column; width:min(1380px,100%); height:min(860px,calc(100dvh - 40px)); min-width:0; min-height:0; max-height:calc(100dvh - 40px); box-sizing:border-box; margin:0; padding:0; overflow:hidden; border:1px solid #d9e3ee; border-radius:10px; background:#fff; box-shadow:0 18px 60px #0f172a33; }
#quoteEditorModal .quote-form-head { display:flex; flex:none; align-items:center; justify-content:space-between; gap:12px; margin:0; padding:12px 18px; border-bottom:1px solid #dbe4ef; }
#quoteEditorModal .quote-form-head h3 { margin:0; font-size:17px; }
#quoteEditorModal .quote-form-head-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
#quoteEditorModal .quote-form-head-actions button { width:auto; margin:0; min-height:32px; padding:5px 12px; }
#quoteEditorModal #quoteForm { display:grid; flex:1 1 auto; align-content:start; min-height:0; min-width:0; overflow:auto; scrollbar-gutter:stable; overscroll-behavior:contain; margin:0; padding:14px 18px 0; gap:16px; scroll-padding-top:70px; scroll-padding-bottom:90px; }
#quoteEditorModal #quoteForm > * { min-width:0; }
#quoteEditorModal .quote-form-step-nav { position:sticky; top:-14px; z-index:8; margin:0; background:#f5f8fc; }
#quoteEditorModal :is(#quoteBasicInfoSection,#quoteServicePlanSection,#quoteCostEstimateSection,#quoteEditorSection,#quoteResultSection) { scroll-margin-top:70px; }
#quoteEditorModal #quoteForm .quote-form-save-actions { position:sticky; bottom:0; z-index:9; display:flex; flex-wrap:wrap; justify-content:flex-end; align-items:center; gap:8px; margin:0 -18px; padding:10px 18px; border-top:1px solid #dbe4ef; background:#fff; box-shadow:0 -5px 12px #20364d08; }
#quoteEditorModal .quote-form-save-actions button { min-width:96px; width:auto; margin:0; min-height:34px; padding:6px 12px; }
#quoteEditorModal .quote-draft-save-state { flex:1 1 280px; margin-right:auto; font-size:12px; }
#quoteEditorModal .quote-form-save-actions[hidden] { display:none !important; }
body:has(#quoteEditorModal) :is(#quoteActionModal,#quoteExportModal,.bf-modal) { z-index:1250; }
@media(max-width:768px) {
  #quoteEditorModal { padding:8px; }
  #quoteEditorModal .quote-editor-dialog { height:calc(100dvh - 16px); max-height:calc(100dvh - 16px); }
  #quoteEditorModal .quote-form-head { padding:10px 12px; flex-wrap:wrap; }
  #quoteEditorModal #quoteForm { grid-template-columns:minmax(0,1fr); padding:12px 12px 0; scroll-padding-top:120px; }
  #quoteEditorModal .quote-form-step-nav { top:-12px; }
  #quoteEditorModal #quoteForm .quote-form-save-actions { margin:0 -12px; padding:10px 12px; }
  #quoteEditorModal .quote-draft-save-state { flex-basis:100%; }
  #quoteEditorModal .quote-form-save-actions button { min-width:70px; }
}
/* Quote decisions stay small and above the centre on both layouts. */
body #quoteWorkspaceChoice.bf-modal { position:fixed; inset:0; z-index:1700; display:flex; align-items:center; justify-content:center; height:100dvh; padding:16px 16px max(16px,10dvh); box-sizing:border-box; }
body #quoteWorkspaceChoice .bf-shell { width:min(440px,100%); height:auto; max-height:calc(90dvh - 32px); min-height:0; border-radius:12px; }
body #quoteWorkspaceChoice .bf-header { padding:16px 16px 0; gap:8px; }
body #quoteWorkspaceChoice .bf-header h2 { font-size:16px; }
body #quoteWorkspaceChoice .bf-header button { width:auto; min-width:36px; min-height:32px; padding:4px 6px; font-size:12px; }
body #quoteWorkspaceChoice .bf-content { padding:12px 16px 14px; overflow:auto; min-height:0; }
body #quoteWorkspaceChoice .system-dialog-message { margin:0 0 16px; font-size:13px; line-height:1.65; }
body #quoteWorkspaceChoice .workflow-message:empty { display:none; }
body #quoteWorkspaceChoice .quote-workspace-choice-actions { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); gap:8px; }
body #quoteWorkspaceChoice .quote-workspace-choice-actions button { width:100%; min-width:0; min-height:40px; margin:0; padding:8px 6px; font-size:13px; white-space:normal; }
body #quoteWorkspaceChoice .quote-workspace-choice-actions .bf-primary { color:#fff; background:#175fc6; border-color:#175fc6; }
body #quoteWorkspaceChoice .quote-workspace-choice-cancel { display:block; width:100%; margin:10px 0 0; padding:6px; min-height:32px; background:transparent; border-color:transparent; color:#526983; font-size:13px; }
.quote-page-stack .quote-saved-drafts { margin:10px 0 0; padding:0; border:0; border-top:1px solid #e2e8f0; background:transparent; }
.quote-page-stack .quote-saved-drafts > summary { width:fit-content; padding:9px 0; color:#526983; font-size:13px; cursor:pointer; }
.quote-page-stack .quote-saved-drafts > summary span { color:#175fc6; margin-left:4px; }
.quote-page-stack .quote-saved-drafts:not([open]) > :not(summary) { display:none!important; }
.quote-page-stack .quote-saved-draft-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:9px 0; border-top:1px solid #edf1f5; }
.quote-page-stack .quote-saved-draft-row > div:first-child { flex:1; min-width:0; }
.quote-page-stack .quote-saved-draft-row strong { display:block; overflow-wrap:anywhere; font-size:13px; line-height:1.5; }
.quote-page-stack .quote-saved-draft-row small { display:block; color:#6d8095; font-size:11px; line-height:1.5; }
.quote-page-stack .quote-saved-draft-actions { display:flex; align-items:center; flex:none; gap:6px; }
.quote-page-stack .quote-saved-draft-actions button { width:auto; min-height:32px; padding:5px 8px; margin:0; font-size:12px; }
.quote-page-stack .quote-saved-drafts > [data-refresh-quote-drafts] { width:auto; min-height:30px; margin:4px 0 8px; font-size:12px; }
@media(max-width:380px) { .quote-page-stack .quote-saved-draft-row { gap:6px; } .quote-page-stack .quote-saved-draft-actions { gap:4px; } .quote-page-stack .quote-saved-draft-actions button { padding:5px; } body #quoteWorkspaceChoice .quote-workspace-choice-actions button { font-size:12px; } }

