.page-top{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:1px 0 20px}.page-top h1{font-size:21px;letter-spacing:-.035em;margin:0 0 4px;font-weight:650}.page-top p{margin:0;color:#777;font-size:12px}.top-actions{display:flex;gap:8px}.page-top .btn{height:34px;font-size:12px}.table-scroll small{display:block;color:#888;font-size:11px;margin-top:2px}.pill{display:inline-block;padding:4px 8px;background:#f2f2f2;border-radius:20px;font-size:11px}.pill.green{background:#eaf3e9;color:#497144}.customer-layout{display:grid;grid-template-columns:300px minmax(0,1fr);gap:0;border:1px solid #e8e8e8;border-radius:10px;min-height:calc(100vh - 125px);overflow:hidden}.customer-profile{border-right:1px solid #ececec;background:#fff;padding:17px;overflow:auto;max-height:calc(100vh - 126px)}.customer-main{min-width:0}.profile-title{display:flex;align-items:center;gap:12px;padding-bottom:15px;border-bottom:1px solid #eee}.profile-title>div{display:flex;flex-direction:column;gap:3px;font-size:13px}.profile-title>div span{font-size:11px;color:#777}.avatar.large{width:42px;height:42px;min-width:42px;font-size:16px;background:#e9efe5;color:#769244}.profile-status{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:14px 0}.profile-status label{display:grid;gap:5px;font-size:11px;color:#777}.profile-status select,.field input,.field select,.field textarea,.agreement-box,.invoice-input-row input{border:1px solid #dedede;border-radius:6px;background:#fff;color:#202020;outline:none}.profile-status select{height:32px;padding:0 6px;font-size:12px;min-width:0}.customer-profile h3{font-size:12px;margin:18px 0 9px}.field{display:flex;flex-direction:column;gap:5px;min-width:0}.customer-profile .field{margin-bottom:9px}.field>span{font-size:11px;color:#777}.field input,.field select{height:33px;padding:0 9px;font-size:12px;min-width:0;width:100%}.field textarea{padding:9px;min-height:62px;resize:vertical;font-size:12px;width:100%}.field-row{display:grid;grid-template-columns:100px 1fr;gap:7px}.subtabs{height:47px;border-bottom:1px solid #e8e8e8;display:flex;align-items:stretch;padding:0 18px;gap:19px}.subtab{border:0;background:none;color:#777;font-size:12px;padding:0 3px;border-bottom:2px solid transparent;white-space:nowrap}.subtab.active{color:#111;font-weight:650;border-color:#111}.pane-head{display:flex;justify-content:space-between;align-items:center;padding:22px}.pane-head h2{font-size:17px;margin:0 0 4px}.pane-head span{font-size:12px;color:#888}.pane-empty{height:320px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;color:#777;font-size:12px}.pane-empty strong{color:#333;font-size:14px}.empty-symbol{font-size:30px;color:#a0aa99}.customer-main .table-scroll{margin:0 20px;max-height:calc(100vh - 240px)}.offer-workspace{display:grid;grid-template-columns:minmax(560px,1.03fr) minmax(420px,.97fr);height:calc(100vh - 111px);min-height:600px;border:1px solid #e7e7e7;border-radius:10px;overflow:hidden}.offer-edit{display:flex;flex-direction:column;min-width:0;min-height:0}.offer-tabs{flex:none;padding:0 16px}.edit-scroll{overflow:auto;flex:1;padding:15px;background:#fff}.form-section{border:1px solid #e8e8e8;border-radius:8px;padding:14px;margin-bottom:13px;background:#fff}.form-section-head{display:flex;justify-content:space-between;align-items:flex-start;gap:8px;margin-bottom:13px}.form-section h2{font-size:14px;margin:0 0 3px}.form-section p{font-size:11px;color:#777;margin:0}.form-section .btn{flex:none}.form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}.selected-customer{display:flex;gap:7px;align-items:center;margin-top:10px;padding:9px;background:#f7f8f6;border-radius:6px;font-size:11px}.selected-customer span{color:#777;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.line-table{overflow:auto}.line-labels,.invoice-input-row{display:grid;grid-template-columns:minmax(210px,2.1fr) 47px 49px 90px 61px 92px 78px 24px;gap:5px;align-items:center;min-width:700px}.line-labels{color:#777;font-size:10px;margin-bottom:5px}.invoice-input-row{margin-bottom:6px}.invoice-input-row input{height:31px;padding:0 5px;width:100%;font-size:11px;min-width:0}.line-main{display:grid;grid-template-columns:1fr 67px;gap:4px}.line-total{text-align:right;font-size:11px;white-space:nowrap}.icon-btn{border:0;background:none;font-size:19px;color:#777;padding:0}.hint{font-size:10px!important;line-height:1.4;margin-top:8px!important}.agreement-box{width:100%;min-height:70px;resize:vertical;padding:9px;font-size:12px}.editor-actions{display:flex;justify-content:flex-end;gap:8px;padding:12px 15px;border-top:1px solid #e8e8e8;background:#fff}.editor-actions .btn{height:34px;font-size:12px}.preview-panel{min-width:0;overflow:auto;background:#f4f5f4;border-left:1px solid #e7e7e7}.preview-bar{position:sticky;top:0;z-index:2;height:43px;padding:0 14px;background:#fff;border-bottom:1px solid #e6e6e6;display:flex;align-items:center;justify-content:space-between;font-size:12px}.preview-bar span{color:#999;font-size:10px}.offer-paper{width:calc(100% - 28px);max-width:760px;margin:14px auto 24px;padding:28px 30px 35px;min-height:900px;background:#fff;box-shadow:0 2px 13px #00000012;font-size:10px;line-height:1.45;color:#222}.paper-top{display:flex;justify-content:space-between;align-items:flex-start}.paper-top>div:last-child{text-align:right;display:flex;flex-direction:column;font-size:9px}.paper-top span{color:#777;margin-top:3px}.paper-leaf{width:25px;height:27px;object-fit:contain}.paper-title{display:flex;justify-content:space-between;align-items:flex-start;margin-top:27px}.paper-title h2{font-size:23px;letter-spacing:.05em;margin:0}.paper-title span{text-align:right;color:#666;font-size:9px}.paper-address{display:flex;flex-direction:column;margin-top:20px;min-height:70px}.paper-address span{margin-top:4px}.paper-intro{margin:24px 0 11px}.paper-table{border-collapse:collapse;width:100%;white-space:normal;font-size:9px}.paper-table th,.paper-table td{border-bottom:1px solid #ddd;height:auto;padding:5px 3px;vertical-align:top}.paper-table th{position:static;background:#f3f3f3;font-size:8px}.paper-table th:first-child,.paper-table td:first-child{width:15%}.paper-table th:nth-child(2),.paper-table td:nth-child(2){width:53%}.paper-table th:nth-child(3),.paper-table td:nth-child(3){width:15%;text-align:right}.paper-table th:nth-child(4),.paper-table td:nth-child(4){width:17%;text-align:right}.paper-table td span{display:block;color:#888;font-size:8px;margin-top:1px}.paper-subtotal{display:flex;justify-content:flex-end;gap:40px;padding:9px 3px;font-size:9px}.offer-paper h3{font-size:10px;margin:17px 0 7px}.paper-totals{margin:15px 0 20px auto;width:55%;border-top:1px solid #ccc}.paper-totals div{display:flex;justify-content:space-between;gap:10px;padding:5px 3px;border-bottom:1px solid #e5e5e5;font-size:9px}.paper-totals .grand{font-weight:700;background:#f4f4f4;font-size:10px}.paper-agreements{min-height:35px;white-space:pre-wrap}.paper-foot{display:flex;justify-content:space-between;border-top:1px solid #ddd;padding-top:7px;margin-top:20px;font-size:9px}.paper-closing{margin-top:30px}.paper-seller{margin-top:24px;border-top:1px solid #ddd;padding-top:7px;color:#777;font-size:9px}.prep-list{display:grid;grid-template-columns:1fr 1fr;gap:0 14px}.prep-list h3{grid-column:1/-1;margin:12px 0 5px;font-size:11px}.prep-item{display:flex;align-items:center;gap:7px;padding:7px 0;border-bottom:1px solid #eee;font-size:11px;min-width:0}.prep-item input{accent-color:#789843}.prep-item span{flex:1}.prep-item strong{white-space:nowrap;font-size:10px}.calculation-note{display:flex;align-items:center;gap:7px;margin-top:13px;padding:10px;background:#f7f8f6;border-radius:6px;font-size:11px}.calculation-note span{color:#777;font-size:10px}.form-section>.field{margin-top:12px}@media(max-width:1350px){.offer-workspace{grid-template-columns:minmax(520px,1.1fr) minmax(350px,.9fr)}.offer-paper{padding:23px 21px}.prep-list{grid-template-columns:1fr}}@media(max-width:1050px){.offer-workspace{grid-template-columns:minmax(500px,1fr) minmax(300px,.7fr)}.form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.invoice-line-block{padding-bottom:2px}.add-line-link{display:flex;align-items:center;gap:6px;width:max-content;margin:2px auto 7px;padding:3px 0;border:0;background:none;color:#444;font-size:11px;font-weight:550;cursor:pointer;text-decoration:none;transition:opacity .15s}.add-line-link:hover{opacity:.55;text-decoration:none}.plus-icon{font-size:16px;line-height:10px;font-weight:400;text-decoration:none}.invoice-line-block+.invoice-line-block{border-top:1px solid #eee;padding-top:8px}.pill.amber{background:#fff4df;color:#926514}.pill.blue{background:#eaf0fc;color:#3f62a1}
.customer-tab-table{margin-top:0!important}.customer-chat{display:flex;flex-direction:column;gap:14px;max-width:760px;padding:0 22px 25px}.chat-message{max-width:78%;padding:13px 15px;border:1px solid #e8e8e8;border-radius:11px;background:#fafafa;font-size:12px}.chat-message.outgoing{align-self:flex-end;background:#f3f6ee;border-color:#e5ebdc}.chat-message-meta{display:flex;align-items:center;gap:12px}.chat-message-meta span{color:#888;font-size:10px}.chat-message p{margin:7px 0 0;line-height:1.5}
.mva-launch{white-space:nowrap}.mva-open{overflow:hidden}.mva-backdrop{position:fixed;inset:0;z-index:100;background:#1119;display:flex;align-items:center;justify-content:center;padding:24px}.mva-dialog{display:flex;flex-direction:column;width:min(1040px,100%);max-height:min(92vh,1000px);background:#fff;border-radius:13px;box-shadow:0 18px 65px #0004;overflow:hidden}.mva-dialog-head{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;padding:22px 26px;border-bottom:1px solid #eee}.mva-dialog-head h2{font-size:20px;margin:0 0 4px}.mva-dialog-head p{font-size:12px;color:#777;margin:0}.mva-close{border:0;background:none;font-size:26px;line-height:1;color:#777;padding:0 3px}.mva-dialog-body{overflow:auto;padding:23px 26px 28px}.mva-dialog-body h3{font-size:16px;margin:0 0 18px}.mva-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px 18px}.mva-fields label{display:flex;flex-direction:column;gap:7px;color:#555;font-size:12px}.mva-fields input,.mva-fields select{width:100%;height:39px;padding:0 11px;border:1px solid #dedede;border-radius:7px;background:#fff;color:#222;font-size:13px}.mva-fields select:disabled{background-color:#f7f7f7;color:#aaa}.mva-fields small{color:#888;font-size:11px}.mva-run{display:block;margin:21px 0 3px auto}.mva-dialog-footer{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:14px 26px;border-top:1px solid #eee;background:#fff}.mva-dialog-footer>span{font-size:11px;color:#888}.mva-dialog-footer>div{display:flex;gap:8px;white-space:nowrap}.mva-dialog-footer button:disabled{opacity:.45;cursor:not-allowed}.mva-results-head{display:flex;justify-content:space-between;align-items:flex-end;gap:14px;border-top:1px solid #eee;margin-top:25px;padding:22px 0 15px}.mva-results-head h3{margin:0 0 4px}.mva-results-head p{margin:0;color:#777;font-size:12px}.mva-results-head>strong{color:#8d1ce8;font-size:18px;white-space:nowrap}.mva-results-grid{display:grid;grid-template-columns:275px minmax(0,1fr);gap:14px}.mva-estimate-card{border:1px solid #ead5ff;border-radius:8px;background:#fbf6ff;padding:16px;color:#6b26ae;font-size:11px}.mva-estimate-card>span{display:block;font-weight:700}.mva-estimate-card>strong{display:block;font-size:18px;color:#8d1ce8;margin:12px 0 18px}.mva-estimate-card h4{font-size:11px;margin:15px 0 7px}.mva-estimate-card dl{margin:0}.mva-estimate-card dl>div{display:flex;justify-content:space-between;gap:10px;padding:7px 0;border-top:1px solid #ebd8fa}.mva-estimate-card dt{color:#a44aed}.mva-estimate-card dd{margin:0;text-align:right;font-weight:600}.mva-estimate-card p{line-height:1.5;margin:0}.mva-chart-card{border:1px solid #e8e8e8;border-radius:8px;padding:14px;min-width:0}.mva-chart-card h4,.mva-comparables h4{font-size:12px;margin:0 0 10px}.mva-chart{display:block;width:100%;height:auto}.mva-chart-card p{color:#999;font-size:10px;margin:5px 0 0}.mva-comparables{margin-top:16px;border:1px solid #e8e8e8;border-radius:8px;overflow:auto}.mva-comparables h4{padding:13px 14px;margin:0}.mva-comparables table{font-size:11px}.mva-comparables th,.mva-comparables td{height:34px;padding:8px 14px}@media(max-width:700px){.mva-backdrop{padding:9px}.mva-dialog{max-height:96vh}.mva-dialog-head,.mva-dialog-body,.mva-dialog-footer{padding-left:15px;padding-right:15px}.mva-fields,.mva-results-grid{grid-template-columns:1fr}.mva-dialog-footer{align-items:flex-end}.mva-dialog-footer>span{max-width:40%}}
.field select{appearance:none;-webkit-appearance:none;padding-right:38px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='m1 1 5 5 5-5' stroke='%23202020' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 17px center}
.form-section-head .btn{height:34px;padding:0 15px;font-size:12px}
.offer-workspace{grid-template-columns:minmax(0,1fr) 12px minmax(0,var(--preview-width,42%))}.preview-resizer{display:flex;align-items:center;justify-content:center;cursor:col-resize;background:#f4f5f4;border:0;touch-action:none;user-select:none;outline:none}.preview-resizer span{display:block;width:3px;height:42px;border-radius:4px;background:#c7ccc4}.preview-resizer:hover,.preview-resizer:focus-visible,.resizing-preview .preview-resizer{background:#fafafa}.preview-resizer:hover span,.preview-resizer:focus-visible span,.resizing-preview .preview-resizer span{background:#849938}.resizing-preview,.resizing-preview *{cursor:col-resize!important;user-select:none!important}.preview-panel{border-left:0}
.prep-check{display:flex;align-items:center;gap:7px;min-width:0;flex:1;cursor:pointer}.prep-check span{min-width:0}.prep-price{display:flex;align-items:center;justify-content:flex-end;gap:4px;flex:none;white-space:nowrap}.prep-price .prep-original{color:#999;text-decoration:line-through;font-size:10px}.prep-price input{width:78px;height:29px;padding:0 5px;text-align:right;border:1px solid transparent;border-radius:5px;background:transparent;color:#202020;font-size:11px;font-weight:700;outline:none}.prep-price input:hover,.prep-price input:focus{border-color:#d7d7d7;background:#fff}.prep-price input::-webkit-inner-spin-button,.prep-price input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.prep-price input[type=number]{appearance:textfield;-moz-appearance:textfield}.prep-price span{flex:none;font-size:10px;font-weight:700}
.paper-title h2 .paper-offer-id{display:block;margin-top:5px;color:#777;font-size:10px;font-weight:500;letter-spacing:0}
.offer-workspace{position:relative}.offer-edit{padding-bottom:59px}.preview-panel{padding-bottom:59px}.editor-actions{position:absolute;left:0;right:0;bottom:0;z-index:3;display:flex;align-items:center;justify-content:center;height:59px;padding:0}.editor-actions-buttons{display:flex;justify-content:center;gap:8px;padding:0}
.preview-bar{position:relative;top:auto;z-index:auto;background:transparent;border:0}
.quote-customer-select{max-width:360px;margin-bottom:13px}.quote-detail-subhead{font-size:11px;color:#555;margin:15px 0 9px;padding-top:11px;border-top:1px solid #eee}.quote-details-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:10px}.quote-details .field input.autofilled{background:#eaf4ff;border-color:#bdd9f5}.quote-details .field input.autofilled:focus{border-color:#8bbce9}
.field select,.profile-status select,.mva-fields select{appearance:none;-webkit-appearance:none;padding-right:38px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='m1 1 5 5 5-5' stroke='%23202020' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 17px center}
.kpi-inputs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:12px}.kpi-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.kpi-card{min-width:0;padding:10px 11px;border:1px solid #e8e8e8;border-radius:7px;background:#fafafa}.kpi-card.kpi-emphasis{background:#f5f8f0;border-color:#e5ebdb}.kpi-label{display:flex;align-items:flex-start;gap:5px;color:#666;font-size:10px;line-height:1.25;min-height:25px}.kpi-tag{display:inline-flex;align-items:center;justify-content:center;flex:none;width:16px;height:16px;border-radius:4px;background:#e9eee3;color:#607445;font-size:9px;font-weight:700}.kpi-card strong{display:block;margin:5px 0 3px;font-size:14px;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kpi-card.negative strong{color:#be3434}.kpi-card small{display:block;color:#909090;font-size:9px;line-height:1.3}@media(max-width:1100px){.kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.invoice-input-row .stock-input{padding-right:32px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='m1 1 5 5 5-5' stroke='%23202020' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 15px center}.invoice-input-row .stock-input::-webkit-calendar-picker-indicator{opacity:0;cursor:pointer;width:16px}
.line-main-labels span{white-space:nowrap}
.trade-detail-panel[hidden]{display:none}.trade-detail-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:8px 10px;min-width:0;margin:5px 0 9px;padding:10px;border:1px solid #e9ece5;border-radius:6px;background:#fbfcfa}.trade-detail-title{grid-column:1/-1;color:#666;font-size:10px;font-weight:650}.trade-detail-grid label{display:flex;flex-direction:column;gap:5px;min-width:0;color:#777;font-size:10px}.trade-detail-grid label span{min-height:14px}.trade-detail-grid input{width:100%;height:31px;padding:0 7px;border:1px solid #dedede;border-radius:6px;background:#fff;color:#202020;font-size:11px;outline:none}.trade-detail-grid input[readonly]{background:#f2f3f0;color:#555}
.offer-edit .form-section-head>div:first-child{margin-right:auto}.section-toggle{display:flex;align-items:center;justify-content:center;flex:none;width:31px;height:31px;margin:-4px -5px 0 0;padding:0;border:0;border-radius:6px;background:transparent;color:#555;cursor:pointer}.section-toggle:hover{background:#f2f3f1}.section-toggle:focus-visible{outline:2px solid #829a52;outline-offset:2px}.section-toggle svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;transition:transform .16s}.form-section:not(.is-collapsed) .section-toggle svg{transform:rotate(180deg)}.form-section.is-collapsed>.form-section-head{margin-bottom:0}.form-section.is-collapsed>.form-section-head p,.form-section.is-collapsed>:not(.form-section-head){display:none}
.invoice-input-row .line-total{display:flex;align-items:center;justify-content:flex-end;height:31px;min-width:0;padding:0 5px;border:1px solid #dedede;border-radius:6px;background:#fff;color:#202020;font-size:11px;font-weight:650;white-space:nowrap}

.line-labels.trade-line-labels,.invoice-input-row[data-kind="trade"]{grid-template-columns:minmax(210px,2.1fr) 47px 49px 90px 61px 92px 78px 24px 24px;min-width:730px}
.invoice-input-row .icon-btn{display:flex;align-items:center;justify-content:center;width:24px;height:31px;padding:0;border:0;border-radius:5px;background:transparent;color:#777;cursor:pointer;transition:background-color .15s,color .15s}
.invoice-input-row .icon-btn svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.invoice-input-row .icon-btn:hover{background:#f1f1f1;color:#333}
.invoice-input-row .icon-btn.active{background:#f1f1f1}
.invoice-input-row .icon-btn:focus-visible{outline:2px solid #829a52;outline-offset:1px}

.offer-edit .edit-scroll > .form-section{border:0;border-bottom:1px solid #e8e8e8;border-radius:0;background:transparent;margin:0;padding:18px 0 20px}.offer-edit .edit-scroll > .form-section:first-child{padding-top:3px}.offer-edit .edit-scroll > .form-section:last-child{border-bottom:0}.offer-edit .form-section-head{cursor:pointer}
/* The KPI sheet stays anchored above the editor's action bar. */
.offer-edit .kpi-drawer{flex:none;min-width:0;background:#e1e8e1;color:#172019;border-top:1px solid #c9d4c9;box-shadow:0 -5px 16px #1d292010;z-index:2}
.kpi-drawer-toggle{display:flex;align-items:center;gap:12px;width:100%;min-height:44px;padding:6px 16px;border:0;background:transparent;color:inherit;text-align:left;cursor:pointer;transition:background-color .16s}
.kpi-drawer-toggle:hover{background:#d5dfd5}.kpi-drawer-toggle:focus-visible{outline:2px solid #a8c488;outline-offset:-3px}
.kpi-drawer-title{font-size:12px;font-weight:700;white-space:nowrap}
.kpi-drawer-summary{display:flex;justify-content:flex-end;gap:16px;flex:1;min-width:0;font-size:10px;color:#536154}
.kpi-drawer-summary>span{display:flex;align-items:baseline;gap:5px;white-space:nowrap}
.kpi-drawer-summary strong{color:#172019;font-size:12px;font-variant-numeric:tabular-nums}
.kpi-drawer-toggle svg{width:16px;height:16px;flex:none;fill:none;stroke:#344337;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;transition:transform .18s}
.kpi-drawer.is-open .kpi-drawer-toggle svg{transform:rotate(180deg)}
.kpi-drawer-body{max-height:min(58vh,570px);overflow:auto;border-top:1px solid #c5d0c5;padding:4px 16px 13px}
.kpi-drawer-body[hidden]{display:none}
.kpi-table{display:grid;grid-template-columns:1fr;min-width:0}
.kpi-table-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;min-height:32px;padding:6px 3px;border-bottom:1px solid #c3cfc3;font-size:11px}
.kpi-table-row strong{font-size:11px;text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.kpi-table-row.negative strong{color:#a4322a}
.kpi-table-row.kpi-group-end{border-bottom:2px solid #829783}
.kpi-table-row.kpi-group-start{border-top:2px solid #829783}
.kpi-table-row.kpi-result{font-weight:700;background:#d1ddd1;padding-inline:8px}
.kpi-edit-row input{width:116px;height:26px;padding:0 8px;border:1px solid #8b9a8e;border-radius:4px;background:#f5f7f5;color:#1d281f;font:inherit;text-align:right;outline:none}
.kpi-edit-row input:focus{border-color:#cce0b8;box-shadow:0 0 0 2px #a8c48866}
.kpi-percent-input{display:flex;align-items:center;gap:6px}.kpi-percent-input input{width:62px}
@media(max-width:760px){.kpi-drawer-summary{gap:8px;font-size:9px}.kpi-drawer-summary>span{flex-direction:column;gap:0}.kpi-drawer-title{font-size:11px}}
/* Make the full accordion heading row, including its spacing, the hit target. */
.offer-edit .edit-scroll > .form-section{padding-top:0}
.offer-edit .edit-scroll > .form-section:first-child{padding-top:0}
.offer-edit .edit-scroll > .form-section.is-collapsed{padding-bottom:0}
.offer-edit .form-section-head{align-items:center;min-height:64px;padding:17px 0 14px;margin-bottom:0}
.offer-edit .form-section-head + *{margin-top:0}
.offer-edit .form-section:not(.is-collapsed) > .form-section-head{margin-bottom:3px}
.offer-edit .form-section-head .section-toggle{margin:0 -5px 0 0}
.offer-tabs .subtab{font-weight:500;border-bottom-color:transparent;transition:color .15s,border-color .15s}
.offer-tabs .subtab:hover:not(.active){color:#333;border-bottom-color:#1118}
.offer-tabs .subtab.active{font-weight:500;color:#111;border-bottom-color:#111}
.line-labels:not(.trade-line-labels),.invoice-input-row[data-kind="sale"]{grid-template-columns:minmax(210px,2.1fr) 47px 49px 90px 61px 92px 78px 24px 24px;min-width:730px}
.offer-detail-panel[hidden]{display:none}
.offer-edit .form-section-head{border-radius:6px;transition:background-color .16s ease}
.offer-edit .form-section-head:hover{background:#f2f5f1}
.offer-detail-panel .trade-detail-grid{grid-template-columns:repeat(4,minmax(180px,1fr));min-width:770px}
.offer-detail-panel .trade-detail-grid label span{white-space:nowrap}
.offer-edit .edit-scroll{padding:0}
.offer-edit .edit-scroll > .form-section{padding-right:15px;padding-left:15px}
.offer-edit .edit-scroll > .form-section > .form-section-head{margin-right:-15px;margin-left:-15px;padding-right:15px;padding-left:15px;border-radius:0}
.offer-edit .form-section-head:hover{background:#f3f3f3}
.offer-edit .form-section-head .section-toggle:hover{background:transparent}
.invoice-input-row .icon-btn.trade-pen svg{width:13px;height:13px;stroke-width:2.4}
.kpi-percent-input strong{min-width:86px;text-align:right;font-size:11px;font-variant-numeric:tabular-nums;white-space:nowrap}
.offer-chat{display:flex;flex-direction:column;min-height:100%;padding:25px 24px 28px;gap:18px}.offer-chat-head h2{margin:0 0 5px;font-size:18px}.offer-chat-head p{margin:0;color:#777;font-size:12px}.offer-chat-thread{display:flex;flex-direction:column;gap:15px;min-height:260px;padding:17px 4px 22px;border-top:1px solid #e8e8e8;border-bottom:1px solid #e8e8e8}.offer-chat-message{align-self:flex-start;max-width:min(82%,440px);padding:12px 15px;border-radius:12px 12px 12px 3px;background:#f2f3f1}.offer-chat-message.outgoing{align-self:flex-end;border-radius:12px 12px 3px 12px;background:#e4eddd}.offer-chat-meta{display:flex;align-items:baseline;gap:9px;font-size:11px}.offer-chat-meta time{color:#777}.offer-chat-message p{margin:7px 0 0;font-size:13px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}.offer-chat-compose{display:flex;flex-direction:column;gap:8px}.offer-chat-compose label{font-size:12px;font-weight:600}.offer-chat-compose textarea{width:100%;min-height:80px;resize:vertical;padding:11px 12px;border:1px solid #d9d9d9;border-radius:7px;font:inherit;font-size:13px;outline:none}.offer-chat-compose textarea:focus{border-color:#829a52;box-shadow:0 0 0 2px #829a5233}.offer-chat-compose>div{display:flex;justify-content:space-between;align-items:center;gap:14px}.offer-chat-compose>div span{font-size:11px;color:#777}.offer-chat-compose .btn{flex:none}
.mva-dialog-body #mva-form{max-width:520px;margin:0 auto;padding:14px 0 10px}.mva-dialog-body #mva-form h3{font-size:17px;margin-bottom:23px}.mva-dialog-body .mva-fields{grid-template-columns:minmax(0,1fr);gap:19px}.mva-dialog-body .mva-fields label{font-size:13px;gap:8px}.mva-dialog-body .mva-fields input,.mva-dialog-body .mva-fields select{height:41px;font-size:13px;box-shadow:0 1px 3px #0000000c}.mva-dialog-body .mva-fields select:disabled{background-color:#fff;color:#aaa}.mva-dialog-body .mva-fields small{font-size:12px}.mva-dialog-body .mva-run{margin:29px auto 4px;min-width:120px;text-transform:uppercase}.mva-dialog-body .mva-run:disabled{background:#f2f2f2;border-color:#f2f2f2;color:#777;box-shadow:none;cursor:not-allowed}
/* Mail thread keeps its composer visible while only the messages scroll. */
.offer-edit .edit-scroll:has(.offer-chat){overflow:hidden;min-height:0;display:flex;flex-direction:column}
.offer-chat{height:100%;min-height:0;padding:0;gap:0;background:#fff}
.offer-chat-head{flex:none;padding:20px 23px 16px;border-bottom:1px solid #e8e8e8}
.offer-chat-head h2{font-size:16px;margin:0 0 4px}
.offer-chat-head p{font-size:12px}
.offer-chat-thread{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:15px;padding:20px 23px 28px;background:#fafafa;border:0}
.offer-mail{flex:none;width:100%;padding:16px 18px;border:1px solid #e5e5e5;border-radius:11px;background:#fff;box-shadow:0 1px 3px #00000007}
.offer-mail.outgoing{border-left:3px solid #b2c6a1}
.offer-mail-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;font-size:12px}
.offer-mail-top>div{display:flex;flex-direction:column;gap:2px}
.offer-mail-top span,.offer-mail-top time{color:#858585;font-size:11px}
.offer-mail h3{font-size:13px;margin:13px 0 9px}
.offer-mail-body{font-size:12px;line-height:1.55;overflow-wrap:anywhere}
.offer-mail-body p{margin:0 0 8px;font-size:inherit;line-height:inherit}
.offer-mail-body ul,.offer-mail-body ol{padding-left:20px;margin:7px 0}
.offer-mail-body a{color:#2367b1;text-decoration:underline}
.offer-mail-files{display:flex;flex-wrap:wrap;gap:7px;margin-top:14px;padding-top:12px;border-top:1px solid #eee}
.offer-mail-file{display:inline-flex;align-items:center;gap:6px;max-width:100%;padding:6px 9px;border:1px solid #e0e0e0;border-radius:6px;background:#f8f8f8;color:#454545;font-size:11px;text-decoration:none;overflow-wrap:anywhere}
.offer-mail-file[href]:hover{background:#edf2e8;border-color:#b4c7a6}
.offer-chat-compose{flex:none;padding:13px 23px 16px;border-top:1px solid #e5e5e5;background:#fff;gap:7px}
.offer-chat-compose>label{font-size:12px}
.offer-mail-composer{border:1px solid #ddd;border-radius:11px;box-shadow:0 1px 3px #00000008;overflow:hidden}
.offer-mail-composer:focus-within{border-color:#8ba77d;box-shadow:0 0 0 2px #8ba77d33}
.offer-mail-editor{min-height:59px;max-height:150px;overflow:auto;padding:13px 14px 7px;outline:none;font-size:13px;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere}
.offer-mail-editor:empty:before{content:attr(data-placeholder);color:#a0a0a0;pointer-events:none}
.offer-mail-editor p{margin:0 0 6px}
.offer-mail-attachments{display:flex;flex-wrap:wrap;gap:6px;padding:5px 12px}
.offer-mail-attachments[hidden]{display:none}
.offer-mail-attachments .offer-mail-file button{border:0;background:transparent;color:#777;cursor:pointer;font-size:15px;line-height:1;padding:0}
.offer-mail-toolbar{display:flex;justify-content:space-between;align-items:flex-end;gap:8px;padding:3px 8px 8px}
.offer-mail-tools{display:flex;align-items:center;gap:2px;min-width:0;flex-wrap:wrap}
.offer-mail-tools>button{width:29px;height:29px;display:flex;align-items:center;justify-content:center;border:0;border-radius:5px;background:transparent;color:#777;font-size:13px;cursor:pointer}
.offer-mail-tools>button:hover{background:#f1f1f1;color:#222}
.offer-mail-tools>button svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.offer-mail-tools>span{color:#999;font-size:10px;margin-left:7px;white-space:nowrap}
.offer-mail-send{width:31px;height:31px;display:flex;align-items:center;justify-content:center;flex:none;border:0;border-radius:7px;background:#111;color:#fff;cursor:pointer}
.offer-mail-send:disabled{background:#c9c9c9;color:#fff;cursor:not-allowed}
.offer-mail-send:not(:disabled):hover{background:#3b4938}
.offer-mail-send svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.offer-chat-compose>small{font-size:10px;color:#888}
@media(max-width:700px){.offer-chat-head,.offer-chat-thread{padding-left:15px;padding-right:15px}.offer-chat-compose{padding-left:15px;padding-right:15px}.offer-mail-tools>span{display:none}}
.mva-dialog .btn{height:34px;padding:0 15px;border-radius:6px;font-size:12px;font-weight:400}
.mva-dialog-body .mva-run{min-width:0;text-transform:none}
.offer-chat-compose>.offer-mail-composer{display:flex;flex-direction:column;align-items:stretch;gap:0;width:100%}
.offer-chat-compose .offer-mail-editor{display:block;width:100%;min-height:48px;flex:none}
.offer-chat-compose .offer-mail-toolbar{width:100%;flex:none}
.prep-list{column-gap:40px}
.mva-dialog{width:min(620px,100%)}
.mva-dialog:has(#mva-result:not([hidden])){width:min(1040px,100%)}

.invoice-line-block+.invoice-line-block{border-top:0;padding-top:2px}
.preview-pdf-button{display:inline-flex;align-items:center;gap:6px;border:0;background:transparent;padding:4px 0;color:#202020;font:inherit;font-weight:650;cursor:pointer;transition:opacity .15s ease}
.preview-pdf-button svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.preview-pdf-button:hover{opacity:.5}
.preview-pdf-button:focus-visible{outline:2px solid #718c69;outline-offset:3px;border-radius:2px}
.preview-pdf-button:disabled{color:#777;cursor:wait;text-decoration:none}
.pdf-staging{position:fixed;left:-10000px;top:0;width:794px;z-index:-1;pointer-events:none}
