.qcWorkspace{display:grid;gap:12px;min-width:0}
.qcOverview{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:10px}
.qcMetric{min-width:0;padding:12px;border:1px solid #d7e5ef;border-left:4px solid #1769aa;border-radius:8px;background:#fff}
.qcMetric.contract{border-left-color:#16845b}.qcMetric.warn{border-left-color:#c87900}.qcMetric span{display:block;color:#667085;font-size:12px;font-weight:800}.qcMetric b{display:block;margin-top:4px;color:#123a5d;font-size:22px;line-height:1.2}.qcMetric small{display:block;margin-top:3px;color:#667085}
.qcPanel{min-width:0;border:1px solid #d7e5ef;border-radius:8px;background:#fff;overflow:hidden}
.qcHead{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:10px 12px;border-bottom:1px solid #dce7ef;background:#f8fbfd}
.qcTabs{display:flex;gap:6px}.qcTab{min-height:34px;padding:0 12px;border:1px solid #b9cad8;border-radius:6px;background:#fff;color:#31536d;font-weight:800;cursor:pointer}.qcTab.active{border-color:#1769aa;background:#1769aa;color:#fff}
.qcToolbar{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.qcToolbar input{min-width:230px}.qcToolbar select{min-width:130px}
.qcTable{max-height:calc(100vh - 340px);overflow:auto}.qcTable table{width:100%;min-width:1120px;border-collapse:collapse}.qcTable th,.qcTable td{padding:7px 8px;border-bottom:1px solid #e2eaf1;font-size:12px;line-height:1.35;vertical-align:middle}.qcTable th{position:sticky;top:0;z-index:1;background:#edf5fa;color:#284b66;white-space:nowrap}.qcTable td{color:#294359}.qcTable td strong{color:#123a5d}.qcTable .qcAmount{text-align:right;font-weight:900;color:#1769aa;white-space:nowrap}.qcTable .qcActions{display:flex;justify-content:flex-end;gap:5px;white-space:nowrap}.qcEmpty{padding:34px 14px;text-align:center;color:#667085}.qcEmpty b{display:block;margin-bottom:4px;color:#31536d;font-size:16px}
.qcStatus{display:inline-flex;padding:2px 7px;border:1px solid #c9d7e2;border-radius:999px;background:#f6f8fa;color:#53697b;font-size:11px;font-weight:900;white-space:nowrap}.qcStatus.good{border-color:#addbc4;background:#edf8f2;color:#08794e}.qcStatus.warn{border-color:#efd492;background:#fff9e8;color:#946300}.qcStatus.risk{border-color:#efb8b4;background:#fff3f1;color:#b42318}.qcStatus.info{border-color:#b8d8ed;background:#eef7fd;color:#1769aa}
.qcModalBg{position:fixed;inset:0;z-index:180;display:none;place-items:center;padding:12px;background:rgba(15,23,42,.66)}.qcModalBg.open{display:grid}.qcModal{display:grid;grid-template-rows:auto minmax(0,1fr) auto;width:min(1460px,100%);max-height:calc(100dvh - 24px);overflow:hidden;border:1px solid #afc7d8;border-radius:8px;background:#fff;box-shadow:0 24px 70px rgba(15,23,42,.35)}.qcModalHead,.qcModalFoot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 14px;border-bottom:1px solid #dce7ef;background:#f8fbfd}.qcModalHead h2{margin:0;color:#123a5d;font-size:17px}.qcModalFoot{justify-content:flex-end;border-top:1px solid #dce7ef;border-bottom:0}.qcModalBody{min-width:0;overflow:auto;padding:14px}.qcForm{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.qcField{display:grid;align-content:start;gap:5px;min-width:0}.qcField label{color:#294359;font-size:12px;font-weight:900}.qcField input,.qcField select,.qcField textarea{box-sizing:border-box;width:100%;min-width:0;line-height:1.45}.qcField textarea.qcAutoGrow{height:auto;min-height:44px;overflow:hidden;resize:none;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word}.qcField textarea.qcLongText{min-height:92px}.qcField.full{grid-column:1/-1}.qcField.wide{grid-column:span 2}.qcRequired{color:#b42318}.qcFormNote{grid-column:1/-1;padding:8px 10px;border-left:4px solid #1769aa;background:#eef7fd;color:#47657d;font-size:12px}
.qcFormSection{grid-column:1/-1;min-width:0;padding-top:2px;border-top:1px solid #dce7ef}.qcFormSection:first-child{border-top:0}.qcSectionHead{display:flex;align-items:baseline;gap:10px;margin:0 0 9px}.qcSectionHead strong{color:#123a5d;font-size:14px}.qcSectionHead span{color:#667085;font-size:11px}.qcSectionGrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
body.crm-ui .nav button[data-page="quoteContracts"] .navIcon{background:#16845b;color:#fff}body.crm-ui .mobileMenuItem[data-page="quoteContracts"] .mobileMenuIcon{background:#e9f7f0;color:#08794e}
.brand{position:relative}.brandVersion{position:absolute;right:8px;bottom:5px;padding:1px 6px;border-radius:5px;background:#123a5d;color:#fff;font-size:10px;font-weight:900;line-height:1.5}.qcTable table{min-width:1000px}.qcTable th,.qcTable td{padding:6px 7px;font-size:11px}.qcToolbar>.btn{display:none}
body.device-mobile .qcTable{max-height:none;padding:8px}body.device-mobile .qcTable table,body.device-mobile .qcTable tbody{display:block;width:100%;min-width:0}body.device-mobile .qcTable thead{display:none}body.device-mobile .qcTable tbody{display:grid;gap:8px}body.device-mobile .qcTable tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:hidden;border:1px solid #d7e5ef;border-left:4px solid #1769aa;border-radius:8px;background:#fff}body.device-mobile .qcTable td{display:grid!important;grid-template-columns:88px minmax(0,1fr);gap:7px;align-items:center;min-width:0;padding:7px 8px!important;border-bottom:1px solid #e7edf2!important;font-size:11px!important;word-break:break-word}body.device-mobile .qcTable td:before{content:attr(data-label);color:#667085;font-size:10px;font-weight:900}body.device-mobile .qcTable td:last-child{grid-column:1/-1;border-bottom:0!important}body.device-mobile .qcTable .qcActions{justify-content:flex-start}
@media(max-width:980px){.qcOverview{grid-template-columns:repeat(2,minmax(0,1fr))}.qcForm{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.qcOverview{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.qcMetric{padding:9px}.qcMetric b{font-size:18px}.qcHead{align-items:stretch}.qcTabs,.qcToolbar{width:100%}.qcTab{flex:1}.qcToolbar input,.qcToolbar select{width:100%;min-width:0}.qcTable{max-height:none}.qcForm{grid-template-columns:1fr}.qcField.full{grid-column:auto}.qcModalBg{padding:5px}.qcModal{height:calc(100dvh - 10px);max-height:none}.qcModalHead,.qcModalFoot{padding:9px}.qcModalBody{padding:10px}body.device-mobile .qcTable tr{grid-template-columns:1fr}}
/* Structured quote and contract editor */
.qcToolbar>.btn{display:inline-flex}
.qcItems{grid-column:1/-1;min-width:0;border:1px solid #d7e5ef;border-radius:6px;padding:10px;background:#f8fbfd}.qcItemsHead,.qcItemsFoot{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px;color:#294359;font-size:12px}.qcItemsFoot{justify-content:flex-end;margin:8px 0 0}.qcItemsFoot strong{color:#1769aa;font-size:15px}.qcItemLabels,.qcItemRow{display:grid;grid-template-columns:minmax(180px,1.7fr) minmax(140px,1.25fr) minmax(76px,.55fr) minmax(70px,.5fr) minmax(100px,.8fr) minmax(110px,.8fr) minmax(150px,1.15fr) 64px;gap:6px;align-items:start}.qcItemLabels{margin-bottom:4px;color:#667085;font-size:10px;font-weight:900}.qcItemLabels span:last-child{text-align:center}.qcItemRow{margin-bottom:8px}.qcItemField{display:grid;align-content:start;gap:4px;min-width:0;margin:0}.qcItemField>span{display:none;color:#667085;font-size:10px;font-weight:900}.qcItemField input,.qcItemField textarea{box-sizing:border-box;width:100%;min-width:0;line-height:1.4}.qcItemField textarea.qcAutoGrow{height:auto;min-height:44px;overflow:hidden;resize:none;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word}.qcItemRow>.danger{min-height:44px}.qcItemTotal{background:#eef7fd;color:#1769aa;font-weight:800}.qcActions{flex-wrap:wrap}.qcActions .btn{padding:3px 7px;font-size:11px}
.qcPhotoManagers{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;min-width:0}.qcPhotoArea{display:grid;align-content:start;gap:8px;min-width:0;padding:10px;border:1px solid #cbdce8;border-radius:6px;background:#f8fbfd}.qcPhotoHead{display:flex;align-items:center;justify-content:space-between;gap:10px}.qcPhotoHead>div{display:grid;gap:2px;min-width:0}.qcPhotoHead strong{color:#123a5d;font-size:13px}.qcPhotoHead span,.qcPhotoCount{color:#667085;font-size:10px}.qcPhotoChoose{position:relative;flex:0 0 auto;overflow:hidden;cursor:pointer}.qcPhotoChoose input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.qcPhotoGrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;min-height:120px}.qcPhotoEmpty{grid-column:1/-1;display:grid;place-items:center;min-height:116px;border:1px dashed #b8cad8;border-radius:5px;background:#fff;color:#718096;font-size:12px}.qcPhotoCard{position:relative;display:grid;grid-template-rows:96px auto;min-width:0;overflow:hidden;border:1px solid #cbdce8;border-radius:6px;background:#fff}.qcPhotoThumb{display:grid;place-items:center;width:100%;height:96px;padding:0;overflow:hidden;border:0;border-bottom:1px solid #e0e8ef;border-radius:0;background:#edf3f7;cursor:zoom-in}.qcPhotoThumb img{display:block;width:100%;height:100%;object-fit:cover}.qcPhotoLoading{padding:8px;color:#667085;font-size:10px;text-align:center}.qcPhotoCard.loadFailed .qcPhotoThumb{background:#fff1f0}.qcPhotoCard.loadFailed .qcPhotoLoading{color:#b42318}.qcPhotoMeta{display:grid;gap:2px;min-width:0;padding:6px 28px 6px 7px}.qcPhotoMeta strong{overflow:hidden;color:#294359;font-size:11px;text-overflow:ellipsis;white-space:nowrap}.qcPhotoMeta span{color:#667085;font-size:9px}.qcPhotoRemove{position:absolute;right:4px;bottom:6px;display:grid;place-items:center;width:24px;height:24px;padding:0;border:1px solid #efb8b4;border-radius:5px;background:#fff;color:#b42318;font-size:18px;line-height:1;cursor:pointer}.qcPhotoRemove:hover{background:#fff1f0}.qcPhotoCount{text-align:right}.qcPhotoPreviewBg{position:fixed;inset:0;z-index:260;display:none;place-items:center;padding:20px;background:rgba(15,23,42,.84)}.qcPhotoPreviewBg.open{display:grid}.qcPhotoPreview{position:relative;display:grid;grid-template-rows:minmax(0,1fr) auto;max-width:min(1100px,100%);max-height:calc(100dvh - 40px);overflow:hidden;border:1px solid #7893a8;border-radius:7px;background:#101820;box-shadow:0 24px 70px rgba(0,0,0,.5)}.qcPhotoPreview img{display:block;max-width:100%;max-height:calc(100dvh - 100px);object-fit:contain}.qcPhotoPreviewClose{position:absolute;top:8px;right:8px;z-index:1;display:grid;place-items:center;width:36px;height:36px;padding:0;border:1px solid rgba(255,255,255,.6);border-radius:5px;background:rgba(15,23,42,.75);color:#fff;font-size:24px;line-height:1;cursor:pointer}.qcPhotoPreviewCaption{padding:9px 48px 9px 12px;overflow:hidden;background:#fff;color:#294359;font-size:12px;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:1180px){.qcSectionGrid{grid-template-columns:repeat(2,minmax(0,1fr))}.qcField.wide{grid-column:1/-1}.qcItemLabels{display:none}.qcItemRow{grid-template-columns:repeat(4,minmax(0,1fr));padding:10px;border:1px solid #d7e5ef;border-radius:6px;background:#fff}.qcItemField>span{display:block}.qcItemField.product,.qcItemField.model{grid-column:span 2}.qcItemField.note{grid-column:span 3}.qcItemRow>.danger{align-self:end}}
@media(max-width:900px){.qcPhotoManagers{grid-template-columns:1fr}.qcPhotoGrid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:720px){.qcSectionHead{display:grid;gap:2px}.qcSectionGrid{grid-template-columns:1fr}.qcField.wide{grid-column:auto}.qcItems{padding:8px}.qcItemRow{grid-template-columns:repeat(2,minmax(0,1fr))}.qcItemField.product,.qcItemField.model,.qcItemField.note{grid-column:1/-1}.qcItemRow>.danger{width:100%}.qcPhotoHead{align-items:stretch}.qcPhotoHead .qcPhotoChoose{display:flex;align-items:center;justify-content:center}.qcPhotoGrid{grid-template-columns:repeat(2,minmax(0,1fr))}.qcPhotoCard{grid-template-rows:110px auto}.qcPhotoThumb{height:110px}.qcPhotoPreviewBg{padding:8px}.qcPhotoPreview{max-height:calc(100dvh - 16px)}.qcPhotoPreview img{max-height:calc(100dvh - 76px)}}
@supports(field-sizing:content){.qcField textarea.qcAutoGrow,.qcItemField textarea.qcAutoGrow{field-sizing:content;height:auto}}

/* V221: keep the two photo upload entrances together and unmistakable. */
.qcPhotoManagers{display:grid;grid-template-columns:1fr;gap:10px;padding:10px;border:1px solid #cbdce8;border-radius:6px;background:#f8fbfd}
.qcPhotoUploadHead{display:flex;align-items:baseline;justify-content:space-between;gap:10px;min-width:0}.qcPhotoUploadHead strong{color:#123a5d;font-size:14px}.qcPhotoUploadHead span{color:#667085;font-size:11px}
.qcPhotoPorts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.qcPhotoPort{position:relative;display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:9px;min-width:0;min-height:58px;padding:8px 10px;border:1px solid #8fb6d2;border-left:4px solid #1769aa;border-radius:6px;background:#fff;cursor:pointer}.qcPhotoPort-product{border-color:#9bcdb7;border-left-color:#16845b}.qcPhotoPort:hover,.qcPhotoPort:focus-within{border-color:#1769aa;background:#eef7fd;box-shadow:0 0 0 2px rgba(23,105,170,.12)}.qcPhotoPort-product:hover,.qcPhotoPort-product:focus-within{border-color:#16845b;background:#edf8f2;box-shadow:0 0 0 2px rgba(22,132,91,.12)}.qcPhotoPort input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.qcPhotoPortIcon{display:grid;place-items:center;width:32px;height:32px;border-radius:5px;background:#1769aa;color:#fff;font-size:24px;font-weight:500;line-height:1}.qcPhotoPort-product .qcPhotoPortIcon{background:#16845b}.qcPhotoPortText{display:grid;gap:2px;min-width:0}.qcPhotoPortText strong{color:#123a5d;font-size:13px}.qcPhotoPortText small{color:#667085;font-size:10px;white-space:normal}.qcPhotoPortCount{color:#31536d;font-size:11px;font-weight:900;white-space:nowrap}.qcPhotoGalleries{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;min-width:0}.qcPhotoArea{padding:9px;background:#fff}.qcPhotoHead .qcPhotoCount{flex:0 0 auto;text-align:right}
@media(max-width:900px){.qcPhotoGalleries{grid-template-columns:1fr}.qcPhotoUploadHead{display:grid;gap:2px}.qcPhotoPorts{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.qcPhotoManagers{padding:8px}.qcPhotoPorts{gap:6px}.qcPhotoPort{grid-template-columns:28px minmax(0,1fr);gap:6px;min-height:64px;padding:7px;border-left-width:3px}.qcPhotoPortIcon{width:28px;height:28px;font-size:21px}.qcPhotoPortCount{grid-column:2;font-size:10px}.qcPhotoPortText strong{font-size:11px}.qcPhotoPortText small{display:none}}

/* V222: editable attachment lists used by both quotation and contract templates. */
.qcReferenceTable{margin-top:4px;border:1px solid #c9dbe9;background:#f8fbfd;padding:10px;min-width:0}.qcReferenceTable .qcItemsHead>div{display:flex;align-items:baseline;gap:10px;min-width:0}.qcReferenceTable .qcItemsHead span{color:#64768a;font-size:12px}.qcReferenceLabels,.qcReferenceRow{display:grid;align-items:start;gap:7px;min-width:0}.qcReferenceLabels-configuration,.qcReferenceRow-configuration{grid-template-columns:1.35fr 1.15fr .55fr .55fr 1.25fr 62px}.qcReferenceLabels-productSpec,.qcReferenceRow-productSpec{grid-template-columns:.9fr .65fr .65fr 1.65fr .65fr 1.15fr 62px}.qcReferenceLabels{padding:7px 7px 4px;color:#607286;font-size:12px;font-weight:700}.qcReferenceRow{padding:5px 7px;border-top:1px solid #dce8f1}.qcReferenceField{display:block;min-width:0}.qcReferenceField>span{display:none}.qcReferenceField textarea{box-sizing:border-box;width:100%;min-width:0;min-height:40px;resize:none;overflow:hidden;padding:9px 10px;line-height:1.35;background:#fff;border:1px solid #bfd3e4;border-radius:6px}.qcReferenceRow>.btn{height:40px;padding:0 10px}
@media(max-width:980px){.qcReferenceLabels{display:none}.qcReferenceRow-configuration,.qcReferenceRow-productSpec{grid-template-columns:repeat(2,minmax(0,1fr))}.qcReferenceField>span{display:block;margin:0 0 4px;color:#607286;font-size:12px;font-weight:700}.qcReferenceRow>.btn{align-self:end}}
@media(max-width:560px){.qcReferenceTable{padding:8px}.qcReferenceTable .qcItemsHead{align-items:flex-start}.qcReferenceTable .qcItemsHead>div{display:block}.qcReferenceRow-configuration,.qcReferenceRow-productSpec{grid-template-columns:1fr}.qcReferenceRow>.btn{width:100%}}

/* V223: optional PDF attachment switches shared by quotations and contracts. */
.qcOptionalAttachment{min-width:0;overflow:hidden;border:1px solid #c9dbe9;border-radius:6px;background:#fff}.qcOptionalAttachmentSwitch{position:relative;display:grid;grid-template-columns:24px minmax(0,1fr) auto;align-items:center;gap:9px;min-height:54px;padding:8px 10px;cursor:pointer;background:#f8fbfd}.qcOptionalAttachmentSwitch input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.qcOptionalAttachmentCheck{display:grid;place-items:center;width:22px;height:22px;border:2px solid #8da9bd;border-radius:4px;background:#fff;color:transparent;font-size:15px;font-weight:900;line-height:1}.qcOptionalAttachmentSwitch input:focus-visible+.qcOptionalAttachmentCheck{outline:3px solid rgba(23,105,170,.2);outline-offset:2px}.qcOptionalAttachmentSwitch input:checked+.qcOptionalAttachmentCheck{border-color:#1769aa;background:#1769aa;color:#fff}.qcOptionalAttachmentText{display:grid;gap:2px;min-width:0}.qcOptionalAttachmentText strong{color:#123a5d;font-size:13px}.qcOptionalAttachmentText small{color:#667085;font-size:10px;white-space:normal}.qcOptionalAttachmentState{min-width:52px;color:#667085;font-size:10px;font-weight:900;text-align:right}.qcOptionalAttachment.enabled{border-color:#8fb6d2}.qcOptionalAttachment.enabled .qcOptionalAttachmentSwitch{background:#eef7fd}.qcOptionalAttachment.enabled .qcOptionalAttachmentState{color:#1769aa}.qcOptionalAttachmentBody{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;min-width:0;padding:10px;border-top:1px solid #dce8f1}.qcOptionalAttachmentBody[hidden]{display:none!important}.qcOptionalAttachmentBody>.qcReferenceTable{margin:0;border:0;padding:0;background:#fff}
@media(max-width:980px){.qcOptionalAttachmentBody{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.qcOptionalAttachmentSwitch{grid-template-columns:24px minmax(0,1fr);padding:8px}.qcOptionalAttachmentState{grid-column:2;text-align:left}.qcOptionalAttachmentBody{grid-template-columns:1fr;padding:8px}}

/* V224: sample-data action in quotation and contract editor headers. */
.qcModalHeadActions{display:flex;align-items:center;gap:7px;flex:0 0 auto}.qcSampleDataButton{border-color:#9bcdb7;background:#edf8f2;color:#08794e}.qcSampleDataButton:hover{border-color:#16845b;background:#def2e7;color:#06633f}
@media(max-width:560px){.qcModalHead{align-items:flex-start}.qcModalHeadActions{gap:5px}.qcModalHeadActions .btn{min-height:36px;padding:0 8px;font-size:11px}}

/* V225: customer-grouped quotation and contract workspace. */
.qcWorkspace{gap:10px}.qcOverview{gap:8px}.qcMetric{padding:10px 12px}.qcMetric b{font-size:20px}.qcHead{padding:9px 12px}.qcToolbar{margin-left:auto}.qcToolbar input{width:min(330px,38vw)}
.qcGroupingBar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 12px;border-bottom:1px solid #dce7ef;background:#fff}.qcGroupingBar>div:first-child{display:flex;align-items:baseline;gap:9px;min-width:0}.qcGroupingBar strong{color:#123a5d;font-size:13px}.qcGroupingBar span{color:#667085;font-size:11px}.qcGroupingActions{display:flex;gap:6px;flex:0 0 auto}.qcGroupingActions .btn{min-height:30px;padding:0 9px;font-size:11px}
.qcCustomerGroups{display:grid;min-width:0}.qcCustomerGroup{min-width:0;border-top:1px solid #dce7ef;background:#fff}.qcCustomerGroup:first-child{border-top:0}.qcCustomerGroupHead{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:54px;padding:7px 12px;background:#f8fbfd}.qcCustomerGroupToggle{display:flex;align-items:center;gap:9px;min-width:0;padding:4px 6px;border:0;border-radius:6px;background:transparent;color:#123a5d;text-align:left;cursor:pointer}.qcCustomerGroupToggle:hover{background:#edf6fb}.qcCustomerGroupToggle:hover .qcCustomerIdentity strong{color:#1769aa}.qcCustomerGroupToggle:focus-visible{outline:3px solid rgba(23,105,170,.2);outline-offset:1px}.qcCustomerChevron{position:relative;display:grid;place-items:center;width:28px;height:28px;flex:0 0 auto;border:0;border-radius:50%;background:#e4f0f7;color:#1769aa;box-shadow:inset 0 0 0 1px rgba(23,105,170,.12);transition:background-color .16s ease,box-shadow .16s ease,transform .16s ease}.qcCustomerChevron::before{content:"";width:7px;height:7px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:translateY(-2px) rotate(45deg)}.qcCustomerGroupToggle:hover .qcCustomerChevron{background:#d2e8f5;box-shadow:inset 0 0 0 1px rgba(23,105,170,.22)}.qcCustomerGroup.collapsed .qcCustomerChevron{transform:rotate(-90deg)}.qcCustomerIdentity{display:grid;gap:1px;min-width:0}.qcCustomerIdentity strong{overflow-wrap:anywhere;font-size:14px}.qcCustomerIdentity small{color:#667085;font-size:10px}.qcCustomerGroupMeta{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex:0 0 auto;color:#53697b;font-size:11px}.qcCustomerGroupMeta b{min-width:110px;color:#1769aa;font-size:14px;text-align:right}.qcCustomerGroup.collapsed .qcCustomerGroupBody{display:none}.qcCustomerGroup .qcTable{max-height:none;border-top:1px solid #e2eaf1}.qcCustomerGroup .qcTable table{min-width:1040px}.qcCustomerGroup .qcTable th{top:0;background:#edf5fa}.qcCustomerGroup .qcTable th:last-child,.qcCustomerGroup .qcTable td:last-child{min-width:320px}.qcCustomerGroup .qcTable tbody tr:last-child td{border-bottom:0}.qcCustomerGroup .qcActions{justify-content:flex-end;gap:4px}.qcCustomerGroup .qcActions .btn{min-height:32px;padding:0 8px}.qcCustomerGroup .qcActions .danger{background:#fff8f7}.qcCustomerGroup .qcActions .danger:hover{background:#fff0ed}
.qcModuleTabs{display:grid;grid-template-columns:repeat(2,minmax(150px,190px));gap:8px}.qcModuleTab{position:relative;display:grid;grid-template-columns:42px minmax(0,1fr);align-items:center;gap:10px;min-width:0;min-height:62px;padding:8px 12px;border:1px solid #c7d8e5;border-radius:7px;background:#fff;text-align:left;box-shadow:0 1px 2px rgba(15,45,68,.05);transition:border-color .16s ease,background-color .16s ease,box-shadow .16s ease,transform .16s ease}.qcModuleTab:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(15,45,68,.1)}.qcModuleTab:focus-visible{outline:3px solid rgba(23,105,170,.2);outline-offset:2px}.qcModuleTabIcon{display:grid;place-items:center;width:40px;height:40px;border-radius:7px;font-size:21px;font-weight:900;line-height:1}.qcModuleTabText{display:grid;gap:2px;min-width:0}.qcModuleTabText strong{color:#294359;font-size:14px}.qcModuleTabText small{color:#718096;font-size:10px;font-weight:800}.qcModuleTab-quotation .qcModuleTabIcon{background:#e5f1fa;color:#1769aa}.qcModuleTab-contract .qcModuleTabIcon{background:#e5f5ed;color:#08794e}.qcModuleTab-quotation.active{border-color:#1769aa;background:#eef7fd;color:inherit;box-shadow:0 0 0 1px rgba(23,105,170,.12)}.qcModuleTab-contract.active{border-color:#16845b;background:#edf8f2;color:inherit;box-shadow:0 0 0 1px rgba(22,132,91,.12)}.qcModuleTab-quotation.active .qcModuleTabIcon{background:#1769aa;color:#fff}.qcModuleTab-contract.active .qcModuleTabIcon{background:#16845b;color:#fff}.qcModuleTab.active .qcModuleTabText strong{color:#123a5d}.qcModuleTab.active::after{content:"";position:absolute;right:12px;bottom:0;left:64px;height:3px;border-radius:3px 3px 0 0;background:#1769aa}.qcModuleTab-contract.active::after{background:#16845b}
.qcCustomerLookupField{position:relative}.qcCustomerLookupControl{position:relative;min-width:0}.qcCustomerLookupControl input{padding-right:42px}.qcCustomerLookupIcon{position:absolute;top:50%;right:14px;width:14px;height:14px;pointer-events:none;transform:translateY(-58%)}.qcCustomerLookupIcon::before{content:"";position:absolute;top:0;left:0;width:8px;height:8px;border:2px solid #1769aa;border-radius:50%}.qcCustomerLookupIcon::after{content:"";position:absolute;right:0;bottom:0;width:6px;height:2px;border-radius:2px;background:#1769aa;transform:rotate(45deg);transform-origin:right center}.qcCustomerLookupStatus{display:block;min-height:16px;color:#667085;font-size:10px;line-height:1.4}.qcCustomerLookupStatus[data-state="success"]{color:#08794e}.qcCustomerLookupStatus[data-state="success"]::before{content:"✓ ";font-weight:900}.qcCustomerLookupStatus[data-state="new"]{color:#946300}.qcCustomerLookupStatus[data-state="new"]::before{content:"! ";font-weight:900}
@media(max-width:980px){.qcHead{align-items:stretch}.qcModuleTabs{grid-template-columns:repeat(2,minmax(150px,1fr));width:100%}.qcToolbar{width:100%;margin-left:0}.qcToolbar input{width:auto;flex:1 1 260px}.qcGroupingBar>div:first-child{display:grid;gap:1px}}
@media(max-width:560px){.qcWorkspace{gap:8px}.qcOverview{grid-template-columns:repeat(2,minmax(0,1fr))}.qcMetric{padding:8px 9px}.qcMetric b{font-size:17px}.qcHead{gap:8px}.qcModuleTabs{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.qcModuleTab{grid-template-columns:34px minmax(0,1fr);gap:7px;min-height:54px;padding:7px}.qcModuleTabIcon{width:34px;height:34px;font-size:18px}.qcModuleTabText strong{font-size:12px}.qcModuleTab.active::after{right:8px;left:48px}.qcToolbar{display:grid;grid-template-columns:1fr}.qcToolbar input,.qcToolbar select{width:100%}.qcGroupingBar{align-items:stretch;padding:8px;flex-direction:column}.qcGroupingActions{display:grid;grid-template-columns:1fr 1fr}.qcCustomerGroup{margin:0 6px 7px;overflow:hidden;border:1px solid #d7e5ef;border-radius:6px}.qcCustomerGroup:first-child{border-top:1px solid #d7e5ef}.qcCustomerGroupHead{align-items:flex-start;padding:7px}.qcCustomerGroupMeta{display:grid;gap:0;text-align:right}.qcCustomerGroupMeta b{min-width:0;font-size:12px}.qcCustomerGroup .qcTable{border-top:1px solid #dce7ef}.qcCustomerGroup .qcActions{justify-content:flex-start}.qcCustomerGroup .qcActions .btn{flex:1 1 auto}body.device-mobile .qcCustomerGroup .qcTable{padding:7px}}

/* V226: unlimited selectable photo galleries with editor-only machine metadata. */
.qcPhotoHead{align-items:flex-start;flex-wrap:wrap}.qcPhotoHeadTools{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-left:auto}.qcPhotoViewModes{display:inline-grid;grid-template-columns:repeat(3,auto);overflow:hidden;border:1px solid #b8cad8;border-radius:5px;background:#fff}.qcPhotoViewModes button{min-width:52px;height:28px;padding:0 8px;border:0;border-left:1px solid #d7e3eb;background:#fff;color:#53697b;font:inherit;font-size:10px;font-weight:800;cursor:pointer}.qcPhotoViewModes button:first-child{border-left:0}.qcPhotoViewModes button:hover{background:#eef7fd;color:#1769aa}.qcPhotoViewModes button.active{background:#1769aa;color:#fff}.qcPhotoViewModes button:focus-visible{position:relative;z-index:1;outline:3px solid rgba(23,105,170,.22);outline-offset:-2px}
.qcPhotoGrid{align-items:start;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));min-height:150px}.qcPhotoGrid-small{grid-template-columns:repeat(auto-fill,minmax(126px,1fr));gap:6px}.qcPhotoGrid-medium{grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:8px}.qcPhotoGrid-large{grid-template-columns:1fr;gap:10px}.qcPhotoCard{display:grid;grid-template-rows:auto var(--qc-photo-thumb,150px) auto auto;align-content:start;overflow:hidden}.qcPhotoGrid-small .qcPhotoCard{--qc-photo-thumb:90px}.qcPhotoGrid-medium .qcPhotoCard{--qc-photo-thumb:150px}.qcPhotoGrid-large .qcPhotoCard{--qc-photo-thumb:280px}.qcPhotoCardTop{display:flex;align-items:center;justify-content:space-between;gap:6px;min-height:33px;padding:4px 5px;border-bottom:1px solid #e0e8ef;background:#f8fbfd}.qcPhotoDocumentChoice{display:inline-flex;align-items:center;gap:5px;min-width:0;color:#31536d;font-size:10px;font-weight:900;cursor:pointer}.qcPhotoDocumentChoice input{width:16px;height:16px;margin:0;accent-color:#1769aa;cursor:pointer}.qcPhotoRemove{position:static;flex:0 0 auto;width:24px;height:24px}.qcPhotoThumb{height:var(--qc-photo-thumb,150px);border-bottom:1px solid #e0e8ef}.qcPhotoCard.excluded{border-style:dashed;border-color:#aebdca}.qcPhotoCard.excluded .qcPhotoCardTop{background:#f2f4f6}.qcPhotoCard.excluded .qcPhotoThumb{opacity:.5;filter:saturate(.35)}.qcPhotoCard.excluded .qcPhotoDocumentChoice{color:#667085}.qcPhotoMeta{padding:6px 7px}.qcPhotoMachineFields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:0 7px 7px}.qcPhotoMachineFields label{display:grid;gap:3px;min-width:0}.qcPhotoMachineFields span{color:#667085;font-size:9px;font-weight:800}.qcPhotoMachineFields input{box-sizing:border-box;width:100%;min-width:0;height:34px;padding:6px 7px;border:1px solid #bfd3e4;border-radius:5px;background:#fff;color:#1f2937;font-size:11px}.qcPhotoMachineFields input:focus{border-color:#1769aa;outline:2px solid rgba(23,105,170,.14)}.qcPhotoGrid-small .qcPhotoMachineFields{grid-template-columns:1fr;padding:0 5px 5px}.qcPhotoGrid-small .qcPhotoMeta{padding:5px}.qcPhotoGrid-small .qcPhotoMeta strong{font-size:10px}.qcPhotoGrid-small .qcPhotoMachineFields input{height:31px;padding:5px;font-size:10px}.qcPhotoGrid-large .qcPhotoMachineFields{grid-template-columns:repeat(2,minmax(0,1fr))}.qcPhotoGrid-large .qcPhotoMeta strong{font-size:12px}
@media(max-width:900px){.qcPhotoGrid-small{grid-template-columns:repeat(auto-fill,minmax(120px,1fr))}.qcPhotoGrid-medium{grid-template-columns:repeat(auto-fill,minmax(180px,1fr))}.qcPhotoGrid-large .qcPhotoCard{--qc-photo-thumb:240px}}
@media(max-width:560px){.qcPhotoHeadTools{width:100%;justify-content:space-between;margin-left:0}.qcPhotoViewModes{flex:0 0 auto}.qcPhotoGrid-small{grid-template-columns:repeat(2,minmax(0,1fr))}.qcPhotoGrid-medium,.qcPhotoGrid-large{grid-template-columns:1fr}.qcPhotoGrid-medium .qcPhotoCard{--qc-photo-thumb:190px}.qcPhotoGrid-large .qcPhotoCard{--qc-photo-thumb:260px}.qcPhotoMachineFields{grid-template-columns:1fr}.qcPhotoGrid-small .qcPhotoMachineFields{grid-template-columns:1fr}.qcPhotoCount{text-align:left}}

/* V246: place create actions inside the shared quotation/contract ledger toolbar. */
.qcCreateActions{display:flex;align-items:center;gap:7px;flex:0 0 auto}.qcCreateAction{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;padding:0 13px;white-space:nowrap}.qcCreateActionIcon{font-size:18px;font-weight:700;line-height:1}.qcCreateAction-contract{border-color:#9bcdb7;background:#edf8f2;color:#08794e}.qcCreateAction-contract:hover{border-color:#16845b;background:#def2e7;color:#06633f}.qcLedgerTable{width:100%}.qcLedgerTable table{width:100%}
@media(min-width:981px){.qcHead>.qcModuleTabs{flex:0 1 388px}.qcHead>.qcCreateActions{margin-left:4px}.qcHead>.qcToolbar{margin-left:auto}}
@media(max-width:980px){.qcHead>.qcModuleTabs{order:1}.qcHead>.qcCreateActions{order:2}.qcHead>.qcToolbar{order:3}.qcCreateActions{width:100%}}
@media(max-width:560px){.qcCreateActions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.qcCreateAction{width:100%;min-width:0;padding:0 8px;font-size:11px}}

/* V231: uncropped photo thumbnails and compact editor-only machine metadata. */
.qcPhotoGrid-small{grid-template-columns:repeat(auto-fill,minmax(160px,1fr))}.qcPhotoThumb{padding:5px;background:#fff}.qcPhotoThumb img{width:100%;height:100%;object-fit:contain;object-position:center;background:#fff}.qcPhotoMeta{min-height:22px;padding:4px 7px}.qcPhotoMeta span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.qcPhotoMachineFields{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;padding:0 6px 6px}.qcPhotoMachineFields label{gap:2px}.qcPhotoMachineFields span{font-size:8px;line-height:1.2}.qcPhotoMachineFields input{height:28px;padding:3px 6px;font-size:10px}.qcPhotoGrid-small .qcPhotoMachineFields{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;padding:0 5px 5px}.qcPhotoGrid-small .qcPhotoMachineFields input{height:26px;padding:2px 4px;font-size:9px}.qcPhotoGrid-small .qcPhotoMeta{min-height:20px;padding:3px 5px}.qcPhotoGrid-large .qcPhotoMachineFields{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:560px){.qcPhotoMachineFields,.qcPhotoGrid-small .qcPhotoMachineFields{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* V232: uniform line-item control heights in both quotation and contract editors. */
.qcItemField input,.qcItemField textarea.qcAutoGrow,.qcItemRow>.danger{height:44px;min-height:44px}.qcItemField input,.qcItemField textarea.qcAutoGrow{padding-top:10px;padding-bottom:10px}

/* V233: bounded in-app PDF preview so closing it never closes the CRM window. */
.qcPdfPreviewBg{position:fixed;inset:0;z-index:250;display:none;place-items:center;padding:36px;background:rgba(15,23,42,.68);backdrop-filter:blur(2px)}.qcPdfPreviewBg.open{display:grid}.qcPdfPreviewDialog{display:grid;grid-template-rows:auto minmax(0,1fr) auto;width:min(1080px,calc(100vw - 72px));height:min(840px,calc(100dvh - 72px));min-height:420px;overflow:hidden;border:1px solid #9bb4c8;border-radius:8px;background:#fff;box-shadow:0 24px 70px rgba(15,23,42,.42)}.qcPdfPreviewHead,.qcPdfPreviewFoot{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:50px;padding:8px 12px;border-bottom:1px solid #d8e4ed;background:#f8fbfd}.qcPdfPreviewHead h2{min-width:0;margin:0;overflow:hidden;color:#123a5d;font-size:15px;text-overflow:ellipsis;white-space:nowrap}.qcPdfPreviewClose{display:grid;place-items:center;width:34px;height:34px;flex:0 0 auto;padding:0;border:1px solid #b9cad8;border-radius:6px;background:#fff;color:#294359;font-size:23px;line-height:1;cursor:pointer}.qcPdfPreviewClose:hover{border-color:#6fa6ce;background:#eef7fd;color:#1769aa}.qcPdfPreviewClose:focus-visible{outline:3px solid rgba(23,105,170,.2);outline-offset:1px}.qcPdfPreviewBody{min-width:0;min-height:0;padding:8px;background:#dfe5e9}.qcPdfPreviewBody iframe{display:block;width:100%;height:100%;border:0;background:#fff}.qcPdfPreviewFoot{justify-content:flex-end;border-top:1px solid #d8e4ed;border-bottom:0}.qcPdfPreviewFoot .btn{min-width:96px}
@media(max-width:760px){.qcPdfPreviewBg{padding:8px}.qcPdfPreviewDialog{width:100%;height:calc(100dvh - 16px);min-height:0}.qcPdfPreviewHead,.qcPdfPreviewFoot{padding:7px 8px}.qcPdfPreviewBody{padding:4px}.qcPdfPreviewFoot .btn{flex:1}}

/* V243: linked contracts display quotation-owned attachments as one synchronized set. */
.qcLinkedAttachmentNotice{grid-column:1/-1;display:grid;gap:3px;padding:10px 12px;border:1px solid #9bcdb7;border-left:4px solid #16845b;border-radius:6px;background:#edf8f2}.qcLinkedAttachmentNotice strong{color:#08794e;font-size:13px}.qcLinkedAttachmentNotice span{color:#47675a;font-size:11px;line-height:1.5}.qcLinkedAttachmentMode .qcOptionalAttachment,.qcLinkedAttachmentMode .qcPhotoManagers{background:#f8fafb}.qcLinkedAttachmentMode :disabled{cursor:not-allowed}.qcLinkedAttachmentMode .qcOptionalAttachmentSwitch{cursor:default}.qcLinkedAttachmentMode .qcOptionalAttachment input:disabled+.qcOptionalAttachmentCheck{opacity:.72}.qcLinkedAttachmentMode .qcPhotoPort:has(input:disabled){opacity:.68;cursor:not-allowed}.qcLinkedAttachmentMode .qcPhotoDocumentChoice:has(input:disabled),.qcLinkedAttachmentMode .qcPhotoMachineFields input:disabled{cursor:not-allowed}.qcLinkedAttachmentMode .qcPhotoMachineFields input:disabled{background:#f1f4f6;color:#53697b}.qcLinkedAttachmentMode .qcPhotoRemove:disabled{opacity:.45}.qcLinkedAttachmentMode .qcPhotoThumb,.qcLinkedAttachmentMode .qcPhotoViewModes button{cursor:pointer}
@media(max-width:560px){.qcLinkedAttachmentNotice{padding:8px 9px}.qcLinkedAttachmentNotice strong{font-size:12px}.qcLinkedAttachmentNotice span{font-size:10px}}
