.estimates-view{display:grid;gap:20px;min-width:0}
.estimates-view>.estimates-common-texts[hidden],.estimates-view>.estimate-specialist[hidden]{display:none}
.estimates-view>.estimates-background-panel[hidden],.estimates-view>.estimates-tracking[hidden],.estimates-view>.estimates-advanced[hidden]{display:none}
.estimates-list-actions{flex-wrap:wrap;justify-content:flex-end}
.estimates-form>.panel,.estimates-form .form-grid,.estimates-form .form-grid>.field{min-width:0}
.estimates-form .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.estimates-form .form-grid input,.estimates-form .form-grid select,.estimates-form .form-grid textarea{min-width:0;max-width:100%}
@media(max-width:850px){.estimates-form .form-grid{grid-template-columns:minmax(0,1fr)}}
.estimates-background-slot{min-width:0}
.estimates-background-slot .actions{align-items:center;gap:12px;margin-top:8px}
.estimates-background-slot img{display:block;max-width:100px;max-height:140px;object-fit:contain;border:1px solid #d5ddd8;border-radius:4px;background:#fff}
.estimates-background-slot img[hidden],.estimates-background-slot button[hidden]{display:none}
.estimates-background-panel input[type=range]{width:100%}
.estimates-settings-fold>summary{list-style:none;color:inherit;cursor:pointer}
.estimates-settings-fold>summary::-webkit-details-marker{display:none}
.estimates-settings-fold:not([open])>summary{border-bottom:0}
.estimates-fold-icon{font-size:22px;line-height:1;transition:transform .2s ease}
.estimates-settings-fold[open] .estimates-fold-icon{transform:rotate(180deg)}
.estimates-visual-subpanel{margin:0 20px 18px;border:1px solid var(--line,#e0e5dc);border-radius:9px;overflow:hidden}
.estimates-visual-subpanel>summary.panel-head{padding:14px 18px}
.estimates-visual-subpanel>summary h2{font-size:16px}
.estimates-visual-subpanel>.panel-body{padding:18px}
.estimates-page-layout h3{margin:6px 0 0;font-size:15px}
.estimates-design-library{padding:18px 20px;border-bottom:1px solid var(--line,#e0e5dc)}
.estimates-design-library-head{display:flex;justify-content:space-between;align-items:start;gap:14px;flex-wrap:wrap}
.estimates-design-library-head h3{margin:0 0 5px;font-size:16px}
.estimates-design-library-head p{margin:0 0 14px}
.estimates-design-list{display:grid;gap:8px}
.estimates-design-list article{display:flex;align-items:center;gap:12px;flex-wrap:wrap;border:1px solid var(--line,#e0e5dc);border-radius:8px;padding:10px 12px}
.estimates-design-list article>.actions{margin-left:auto}
.estimates-dialog.estimates-design-dialog{width:min(1240px,calc(100vw - 32px));max-width:1240px;max-height:90vh;overflow:auto}
.estimates-canvas-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.estimates-canvas-top h3{margin:0 0 4px;font-size:18px}
.estimates-canvas-top .help{margin:0}
.estimates-canvas-top [aria-pressed=true]{background:var(--primary,#1d5053);color:#fff}
.estimates-canvas-workspace{display:grid;grid-template-columns:minmax(0,590px) minmax(225px,1fr);align-items:start;gap:20px;padding:18px;background:#e9eeeb;border:1px solid var(--line,#d6ded7);border-radius:10px}
.estimates-canvas-sheet{position:relative;width:100%;aspect-ratio:210/297;background:white;box-shadow:0 4px 18px #173b4228;overflow:hidden;touch-action:none;user-select:none}
.estimates-canvas-background{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;pointer-events:none}
.estimates-canvas-item{position:absolute;z-index:3;border:1px dashed #257d9a;background:#ffffff88;cursor:grab;overflow:visible;touch-action:none}
.estimates-canvas-item.is-selected{border:2px solid #007ba6;box-shadow:0 0 0 3px #007ba644}
.estimates-canvas-item.is-hidden{background:#eef3f080;border-color:#929d9a}.estimates-canvas-item.is-hidden .estimates-canvas-item-content{visibility:hidden}
.estimates-canvas-item:active{cursor:grabbing}
.estimates-canvas-item-content{display:block;width:100%;height:100%;overflow:hidden;line-height:1.18;overflow-wrap:anywhere}
.estimates-canvas-item-content strong{font-size:inherit}
.estimates-canvas-item-content small{display:block;font-size:.7em}
.estimates-canvas-item-content img{display:block;width:100%;height:100%;object-fit:contain}
.estimates-canvas-item-label{position:absolute;left:0;top:-16px;background:#fff;color:#16576a;padding:0 3px;font:10px Arial,sans-serif;white-space:nowrap;pointer-events:none}
.estimates-canvas-placeholder{display:flex;align-items:center;justify-content:center;width:100%;height:100%;font:10px Arial,sans-serif;color:#567}
.estimates-canvas-resize{position:absolute;right:-5px;bottom:-5px;width:11px;height:11px;background:#007ba6;border:1px solid white;cursor:nwse-resize}
.estimates-canvas-guide{position:absolute;left:0;right:0;z-index:4;border-top:1px dashed #187da3;cursor:ns-resize;touch-action:none}
.estimates-canvas-guide.is-selected{border-top:2px solid #006a93}
.estimates-canvas-guide span{position:absolute;right:0;top:-15px;background:#e8f6fb;color:#174e63;padding:1px 3px;font:10px Arial,sans-serif}
.estimates-canvas-flow{position:absolute;left:5.7%;right:5.7%;z-index:2;overflow:hidden;line-height:1.25;pointer-events:none}
.estimates-canvas-flow h4{margin:0 0 7px;line-height:1.2}
.estimates-canvas-flow p{margin:8px 0;white-space:pre-wrap;overflow-wrap:anywhere;max-height:52px;overflow:hidden}
.estimates-canvas-flow [data-canvas-text]{pointer-events:auto;cursor:text;outline:1px dashed transparent}
.estimates-canvas-flow [data-canvas-text]:hover,.estimates-canvas-flow [data-canvas-text]:focus{outline-color:#007ba6;background:#ffffffb8}
.estimates-canvas-dates{display:flex;justify-content:space-between;gap:8px;font-size:.8em;padding:4px 0}
.estimates-canvas-table-head,.estimates-canvas-table-row{display:grid;grid-template-columns:minmax(0,1fr) 12% 16% 16%;gap:3px;padding:6px 4px}
.estimates-canvas-table-head{font-weight:bold}
.estimates-canvas-table-row{border-bottom:1px solid #dae0da}
.estimates-canvas-chapter{padding:5px 4px;font-weight:bold}
.estimates-canvas-table-head span:not(:first-child),.estimates-canvas-table-row span:not(:first-child){text-align:right}
.estimates-canvas-table-control{pointer-events:auto;cursor:ew-resize;touch-action:none}.estimates-canvas-table-control.is-selected{outline:1px dashed #007ba6;outline-offset:2px}
.estimates-canvas-total{display:flex;justify-content:space-between;gap:8px;margin-top:13px;padding:7px 5px;font-weight:bold}
.estimates-canvas-inspector{background:white;padding:16px;border-radius:8px;border:1px solid var(--line,#d6ded7)}
.estimates-canvas-inspector h3{margin:0 0 8px}
.estimates-canvas-inspector .form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.estimates-canvas-inspector .field{min-width:0}
.estimates-canvas-inspector input{width:100%}
.estimates-canvas-inspector input[type=checkbox]{width:auto;flex:none}
@media(max-width:850px){.estimates-canvas-workspace{grid-template-columns:1fr}.estimates-canvas-sheet{max-width:590px;margin:auto}.estimates-canvas-inspector{max-width:590px;width:100%;margin:auto}}
.estimates-palette{display:grid;gap:14px}
.estimates-palette fieldset{min-width:0;border:1px solid var(--line,#e0e5dc);border-radius:8px;padding:12px}
.estimates-palette legend{font-weight:650;padding:0 5px}
.estimates-palette-inputs{display:flex;align-items:end;gap:12px;flex-wrap:wrap}
.estimates-palette-inputs .field{min-width:160px;flex:1}
.estimates-palette-inputs input[type=color]{width:100%;min-height:42px;cursor:pointer}
.estimates-palette-preview{border:1px solid var(--line,#e0e5dc);border-radius:7px;overflow:hidden;font-weight:650}
.estimates-palette-preview>div{padding:10px 14px}
.estimates-visual-design-form{display:grid;gap:16px}
.estimates-design-dialog .estimates-visual-subpanel{margin:0}
.estimates-design-image{border:1px solid var(--line,#e0e5dc);border-radius:8px;padding:14px;margin:12px 0}
.estimates-design-image-preview{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.estimates-design-image-preview img{width:90px;height:70px;object-fit:contain;background:#fff;border:1px solid var(--line,#e0e5dc)}
.estimates-design-image-preview .btn{cursor:pointer}
.estimates-view .panel{margin:0}
.estimates-filters,.estimates-search-form{display:flex;align-items:end;gap:12px;flex-wrap:wrap}
.estimates-search{flex:1;min-width:220px}
.estimates-filters .field,.estimates-search-form .field{margin:0;min-width:140px}
.estimates-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.estimates-action-bar{min-width:0;container-type:inline-size}
.estimates-action-bar .estimates-toolbar-actions{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:8px;width:100%}
.estimates-action-bar .estimates-start{display:contents}

.estimates-action-bar .btn{min-width:0;min-height:50px;width:100%;padding:7px 6px;font-size:12px;line-height:1.25;white-space:normal;text-align:center;overflow-wrap:break-word;justify-content:center;align-content:center;gap:5px}
.estimates-action-bar .btn svg{flex:none;width:17px;height:17px}
@container (max-width:1399px){.estimates-action-bar .btn{font-size:11px;padding:5px 4px;gap:3px}.estimates-action-bar .btn svg{width:15px;height:15px}}
@container (max-width:959px){.estimates-action-bar .estimates-toolbar-actions{grid-template-columns:repeat(6,minmax(0,1fr))}}
@container (max-width:849px){.estimates-action-bar .estimates-toolbar-actions{grid-template-columns:repeat(4,minmax(0,1fr))}}
@container (max-width:529px){.estimates-action-bar .estimates-toolbar-actions{grid-template-columns:repeat(2,minmax(0,1fr))}}
.estimates-proposal-data [data-proposal-toggle]{cursor:pointer}
.estimates-proposal-data [data-proposal-toggle]:focus-visible{outline:2px solid var(--primary,#b72e32);outline-offset:-2px}
.estimates-proposal-data [data-proposal-body][hidden]{display:none}
.estimates-title-row{display:flex;align-items:flex-end;flex-wrap:wrap;column-gap:18px;row-gap:8px;min-width:0;max-width:100%}
.estimates-title-row h1{min-width:0;margin-bottom:2px;overflow-wrap:anywhere}
.estimates-code-bar{display:flex;align-items:flex-end;gap:7px;flex:0 0 auto;max-width:100%;margin-left:8px}
.estimates-code-bar .field{margin:0;min-width:0;flex:0 1 auto}
.estimates-code-bar .field span{font-size:11px;line-height:1.2;margin-bottom:3px;white-space:nowrap}
.estimates-code-bar input{width:19ch;max-width:calc(100vw - 100px);min-width:0;padding:7px 9px;font-size:13px}
.estimates-code-bar .btn{width:auto;min-width:36px;height:37px;padding:7px 10px;white-space:nowrap;flex-shrink:0}
.estimates-form{display:grid;grid-template-columns:minmax(0,1fr);gap:20px;min-width:0}
.estimates-customer-entry{position:relative;min-width:0}
.estimates-customer-entry>.field{margin:0}
.estimates-customer-suggestions{position:absolute;z-index:12;top:100%;left:0;right:0;max-height:270px;overflow:auto;padding:8px;background:var(--panel,#fff);border:1px solid var(--line,#e0e5dc);border-radius:8px;box-shadow:0 12px 24px #172b2026}
.estimates-customer-suggestions[hidden],.estimates-new-customer[hidden]{display:none}
.estimates-customer-suggestions .estimates-pick{margin-bottom:4px}
.estimates-customer-suggestions .help{margin:4px 6px}
.estimates-new-customer{display:flex;align-items:center;gap:8px}
.estimates-new-customer input{width:auto;flex:none}
.estimates-professional-discount{grid-column:1/-1;display:flex;align-items:end;gap:18px;flex-wrap:wrap;padding:12px 14px;border:1px solid var(--line,#dde5dd);border-radius:8px;background:var(--surface-soft,#f8faf7)}
.estimates-professional-discount .check{min-height:42px;display:flex;align-items:center;gap:8px}
.estimates-professional-discount .field{width:min(220px,100%)}
.estimates-professional-discount [hidden]{display:none}
.estimates-start{gap:10px;flex-wrap:wrap}
.estimates-import-hint{margin:-4px 0 4px}
.estimates-status-draft{background:#edf1f4;color:#35516a}
.estimates-status-sent{background:#e5eff8;color:#245b83}
.estimates-status-accepted{background:#e5f1e9;color:#21623a}
.estimates-status-rejected,.estimates-status-expired{background:#fae9e7;color:#9e3430}
.estimates-chapter .panel-head .field{margin:0;min-width:180px;max-width:480px;flex:1}
.estimates-chapter .panel-head input{font-weight:600}
.estimates-chapter .panel-head .estimates-chapter-code{flex:0 1 140px;min-width:0;max-width:140px}
.estimates-chapter-actions{display:inline-flex;align-items:center;gap:8px;flex:0 0 auto;margin-left:auto}
.estimates-chapter-actions .btn{white-space:nowrap}
.estimates-lines{min-width:0}
.estimates-add-line-end{justify-content:flex-end;padding:14px 20px;margin:0 0 18px;border:1px solid var(--line,#e0e5dc);border-top:0;border-radius:0 0 9px 9px;background:var(--surface-soft,#f8faf7)}
.estimates-line{padding:18px 20px;border-top:1px solid var(--line,#e0e5dc);min-width:0}
.estimates-line-main{display:grid;grid-template-columns:minmax(240px,3fr) minmax(80px,.7fr) minmax(64px,.6fr) minmax(110px,1fr) minmax(110px,1fr) minmax(110px,1fr) 36px;gap:12px;align-items:start}
.estimates-line-main .field{margin:0;min-width:0;font-size:12px}
.estimates-line-main .field>span{min-height:20px}
.estimates-line-main input{width:100%;min-width:0}
.estimates-line-amount input{font-weight:650;background:var(--surface-soft,#f7f9f6);color:var(--ink,#153d40);cursor:default}
.estimates-description textarea{resize:vertical;min-height:64px;max-height:500px;width:100%;line-height:1.5}
.estimates-description{display:grid;gap:8px;min-width:0}
.estimates-description .estimates-line-code{max-width:170px}
.estimates-line-main>.estimates-line-images{grid-column:2/-1;grid-row:1;align-self:start;margin-top:64px;display:grid;grid-template-columns:130px minmax(180px,250px) max-content;align-items:start;gap:7px 12px;padding:9px 0 0;border-top:1px solid var(--line,#e0e5dc);font-size:12px;color:var(--muted,#65756e)}
.estimates-line-main>.estimates-line-images>span{min-width:0;padding-top:4px}
.estimates-line-main>.estimates-line-images>small{grid-column:1/-1;margin:0}
.estimates-line-image-preview{display:flex;align-items:start;gap:8px;flex-wrap:wrap}
.estimates-line-image-list{display:flex;flex-wrap:wrap;gap:7px}
.estimates-line-image-size{display:grid;gap:4px;min-width:74px;flex:0 1 150px;font-size:11px}
.estimates-line-image-size .btn{padding:3px 6px;min-height:0;font-size:11px}
.estimates-line-image{display:grid;justify-items:start;gap:3px}
.estimates-line-image img{display:block;width:80px;height:60px;object-fit:contain;border-radius:5px;background:transparent}
.estimates-line-image .btn{padding:3px 8px;min-height:0;font-size:11px}
.estimates-line-image-upload{justify-self:start;cursor:pointer}
.estimates-line-image-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.estimates-line-images small{font-size:11px}
.estimates-chapter-images .estimates-line-images{display:flex;flex-wrap:wrap;align-items:flex-start;gap:10px 16px;font-size:12px;color:var(--muted,#65756e)}
.estimates-chapter-images .estimates-line-images>span{padding-top:4px}
.estimates-chapter-images[data-image-size="2"] .estimates-line-image img{width:112px;height:78px}
.estimates-chapter-images[data-image-size="3"] .estimates-line-image img{width:152px;height:104px}
.estimates-line-main>.btn{padding:8px;margin-top:24px;min-height:38px}
.estimates-line-options{margin-top:10px;font-size:12px}
.estimates-line-options>summary{cursor:pointer;color:var(--muted,#65756e);padding:5px 0}
.estimates-options-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding-top:12px}
.estimates-options-grid .field{font-size:12px;margin:0;min-width:0}
.estimates-options-grid .check{font-size:12px;align-self:center;margin:0;display:flex;align-items:center;gap:8px}
.estimates-options-grid .check input{width:auto;flex:none}
.estimates-import-custom,.estimates-line-custom-fields{display:grid;gap:8px;min-width:0}
.estimates-import-custom-row,.estimates-import-custom-value,.estimates-line-custom-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr)) auto;gap:10px;align-items:end;min-width:0}
.estimates-import-custom-value{grid-column:1/-1}
.estimates-import-custom-row .field,.estimates-import-custom-value .field,.estimates-line-custom-row .field{min-width:0;margin:0}
.estimates-line-extras{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:12px;padding-top:12px;border-top:1px solid var(--line,#e0e5dc)}
.estimates-line-extras>.field,.estimates-line-extras>.btn,.estimates-line-custom-fields{min-width:0}
.estimates-line-custom-fields{grid-column:1/-1}
.estimates-line-extras>.btn{justify-self:start}
.estimates-optional{background:#fafaf6}
.estimates-total-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.estimates-total-grid>div{display:grid;gap:6px}
.estimates-total-grid span{font-size:12px;color:var(--muted,#65756e)}
.estimates-total-grid strong{font-size:23px;font-variant-numeric:tabular-nums}
.estimates-total-grid .estimates-professional-discount-row,.estimates-total-grid .estimates-professional-discount-row span,.estimates-total-grid .estimates-professional-discount-row strong{color:#b42328}
.estimates-totals .panel-body.help{padding-top:0;margin:0;font-size:12px}
.estimates-warning{margin:0 20px 16px;background:#fff5df;border:1px solid #ead39b;color:#80551c;padding:12px 16px;border-radius:8px;font-size:13px}
ul.estimates-warning{padding-left:32px}
.estimates-save{z-index:5;gap:12px;border:1px solid var(--line,#e0e5dc);border-radius:10px;background:var(--panel,#fff);box-shadow:0 3px 15px #172b2012}
.estimates-followup{display:grid;gap:16px}
.estimates-followup .help{margin:0;font-size:12px}
.estimates-followup details>summary{cursor:pointer}
.estimates-history article{padding:12px 0;border-bottom:1px solid var(--line,#e0e5dc)}
.estimates-dialog{max-width:950px;width:min(950px,calc(100vw - 32px));padding:0;max-height:90vh;overflow:auto}
.estimates-dialog .panel-body{display:grid;gap:16px}
.estimates-dialog form .field{margin-bottom:12px}
.estimates-pick{appearance:none;display:grid;gap:5px;width:100%;padding:13px 15px;text-align:left;border:1px solid var(--line,#e0e5dc);border-radius:8px;background:var(--panel,#fff);color:inherit;font:inherit;cursor:pointer;margin-bottom:8px}
.estimates-pick:hover,.estimates-pick:focus-visible{border-color:var(--primary,#b72e32);background:#f7f8f5}
.estimates-pick span{font-size:12px;color:var(--muted,#65756e)}
.estimates-usage{display:flex;flex-wrap:wrap;gap:12px;padding:12px;border:1px solid var(--line,#e0e5dc);border-radius:8px}
.estimates-usage legend{font-size:13px;padding:0 5px;font-weight:600}
.estimates-usage .check{display:flex;gap:8px;align-items:center;margin:0;font-size:13px}
.estimates-usage input{width:auto;min-height:0}
.estimates-consult{display:grid;gap:14px;min-width:0}
.estimates-consult [role="tab"][aria-selected="true"]{border-color:var(--primary,#b72e32);color:var(--primary,#b72e32);font-weight:700}
.estimates-consult-detail{padding:16px;border:1px solid var(--line,#e0e5dc);border-radius:8px;overflow-wrap:anywhere}
.estimates-consult-detail h3{margin:0 0 10px}
.estimates-consult-detail p{margin:8px 0}
.estimates-view input:disabled,.estimates-view textarea:disabled,.estimates-view select:disabled{color:inherit;opacity:.8;background:#f6f7f3}
@media(max-width:1200px){.estimates-line-main{grid-template-columns:minmax(200px,2fr) 80px 65px 100px 100px 100px 32px;gap:8px}.estimates-line{padding:15px}.estimates-total-grid strong{font-size:20px}}
@media(max-width:900px){.estimates-line-main{grid-template-columns:repeat(5,minmax(0,1fr)) 32px}.estimates-description{grid-column:1/-1}.estimates-line-main>.btn{margin-top:24px}.estimates-options-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.estimates-total-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.estimates-toolbar .actions{width:100%}}
@media(max-width:560px){.estimates-view,.estimates-form{gap:14px}.estimates-toolbar .actions,.estimates-start{display:grid;grid-template-columns:1fr 1fr;gap:8px}.estimates-toolbar .btn,.estimates-start .btn{font-size:12px;padding:10px 8px;justify-content:center}.estimates-line{padding:14px 12px}.estimates-line-main{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.estimates-description{grid-column:1/-1}.estimates-line-main>.btn{grid-column:2;justify-self:end;margin-top:0}.estimates-options-grid{grid-template-columns:1fr 1fr}.estimates-options-grid .check{grid-column:1/-1}.estimates-total-grid{gap:16px}.estimates-total-grid strong{font-size:19px}.estimates-totals .panel-head{align-items:start;flex-direction:column;gap:7px}.estimates-save{padding:12px;flex-direction:column;align-items:stretch}.estimates-save .btn{justify-content:center}.estimates-filters,.estimates-search-form{align-items:stretch;display:grid;grid-template-columns:1fr}.estimates-filters .field,.estimates-search{min-width:0}.estimates-dialog{width:calc(100vw - 16px);max-height:94vh}.estimates-chapter .panel-head{gap:8px;flex-wrap:wrap}.estimates-chapter .panel-head .field{min-width:0;width:100%}.estimates-usage{flex-direction:column}.estimates-warning{margin-left:12px;margin-right:12px}}
@media(max-width:900px){.estimates-line-main>.estimates-line-images{grid-column:1/-1;grid-row:auto;margin-top:0;grid-template-columns:130px minmax(180px,1fr) max-content}}
@media(max-width:560px){.estimates-chapter .panel-head{display:grid;grid-template-columns:100px minmax(0,1fr);align-items:end}.estimates-chapter .panel-head .field,.estimates-chapter .panel-head .estimates-chapter-code{width:100%;max-width:none}.estimates-chapter .panel-head>.btn,.estimates-chapter .panel-head>.estimates-chapter-actions{grid-column:1/-1;justify-self:end}}
@media(max-width:560px){.estimates-import-custom-row,.estimates-import-custom-value,.estimates-line-custom-row,.estimates-line-extras{grid-template-columns:1fr}.estimates-line-extras>.btn{width:100%}}
.estimates-import-upload{display:flex;align-items:end;gap:12px;flex-wrap:wrap}
.estimates-import-upload .field{flex:1;min-width:220px}
.estimates-import-settings,.estimates-import-columns,.estimates-import-line-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:end}
.estimates-import-settings>.wide,.estimates-import-line-fields>.wide{grid-column:1/-1}
.estimates-import-settings details>summary,.estimates-import-result details>summary{cursor:pointer;padding:8px 0}
.estimates-import-columns{padding:10px 0}
.estimates-import-result{border-top:1px solid var(--line,#e0e5dc);padding-top:16px;display:grid;gap:12px;min-width:0}
.estimates-import-result h3{margin:0}
.estimates-import-result .estimates-warning{margin:0}
.estimates-import-chapters{display:grid;gap:8px}
.estimates-import-chapters>div{display:grid;grid-template-columns:minmax(100px,1fr) minmax(180px,4fr);gap:10px}
.estimates-import-list{display:grid;gap:10px;max-height:48vh;overflow:auto;padding-right:4px}
.estimates-import-list article{border:1px solid var(--line,#e0e5dc);border-radius:8px;padding:12px;display:grid;gap:8px}
.estimates-import-list textarea{min-height:85px;resize:vertical}
.estimates-import-warnings{color:#9b3a21;margin:0;padding-left:20px;font-size:12px}
.estimates-import-text{white-space:pre-wrap;overflow-wrap:anywhere;max-height:320px;overflow:auto;padding:12px;background:#f5f6f3;border-radius:6px;font-size:12px}
.estimates-import-review{display:flex;gap:8px;align-items:center}
@media(max-width:700px){.estimates-import-settings,.estimates-import-columns,.estimates-import-line-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.estimates-import-chapters>div{grid-template-columns:1fr}.estimates-import-list{max-height:55vh}}
@media(max-width:430px){.estimates-import-settings,.estimates-import-columns,.estimates-import-line-fields{grid-template-columns:1fr}}
@media(max-width:560px){.estimates-start{grid-template-columns:repeat(2,minmax(0,1fr))}.estimates-start .btn{min-width:0;white-space:normal;overflow-wrap:anywhere;text-align:center}}
.estimates-ai-proposal{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem 1rem;margin:.65rem 0 0;padding:.75rem 1rem;border:1px solid #a9d5c5;border-radius:.55rem;background:#f0f8f4;color:#174c40}
.estimates-ai-proposal strong{font-weight:700}
.estimates-ai-proposal span{flex:1 1 20rem;font-size:.88rem}
.estimates-ai-proposal .actions{margin-left:auto}
.estimates-ai-applied{margin:.5rem 0 0;color:#176349;font-size:.86rem;font-weight:600}
.estimates-saltoki-items{display:grid;gap:10px;max-height:46vh;overflow:auto}
.estimates-saltoki-guide{border-top:1px solid var(--line,#e0e5dc);margin:20px 0;padding:16px 0}
.estimates-saltoki-guide summary{cursor:pointer;font-weight:650}
.estimates-saltoki-steps{padding-left:1.5rem;line-height:1.6}
.estimates-saltoki-steps li{margin:8px 0}
.estimates-saltoki-steps code{user-select:all;overflow-wrap:anywhere}
.estimates-saltoki-onboarding{display:grid;gap:14px}
.estimates-saltoki-onboarding>p{margin:0}
.estimates-saltoki-store,.estimates-saltoki-check,.estimates-saltoki-next,.estimates-saltoki-manual{padding:16px;border:1px solid var(--line,#d8e1da);border-radius:10px;background:var(--panel,#fff)}
.estimates-saltoki-store{background:#edf6f2;border-color:#9bc4b0}
.estimates-saltoki-store[hidden]{display:none}
.estimates-saltoki-onboarding.is-ready .estimates-saltoki-store{display:none}
.estimates-saltoki-onboarding.is-ready .estimates-saltoki-check{background:#edf6f2;border-color:#9bc4b0}
.estimates-saltoki-manual>summary{cursor:pointer;font-weight:650}
.estimates-saltoki-manual[open]>summary{margin-bottom:12px}
.estimates-saltoki-check>.actions{align-items:center;margin-top:12px}
.estimates-saltoki-check [role=status]{font-weight:600;overflow-wrap:anywhere}
.estimates-saltoki-next p{margin-bottom:0}
.estimates-saltoki-item{display:grid;gap:10px;border:1px solid var(--line,#e0e5dc);border-radius:8px;padding:12px}
.estimates-saltoki-item>.check{display:flex;align-items:flex-start;gap:8px;overflow-wrap:anywhere}
.estimates-saltoki-item>.check input{width:auto;min-height:0;margin-top:4px}
.estimates-saltoki-item .form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.estimates-saltoki-item .notice{margin:0;font-size:12px}
@media(max-width:560px){.estimates-saltoki-item .form-grid{grid-template-columns:1fr}}
.estimate-plan-review{margin:16px 0;padding:16px;border:1px solid #d5dfda;border-radius:10px;background:#f7faf8}
.estimate-plan-codes{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0}
.estimate-plan-image{position:relative;max-height:60vh;overflow:auto;border:1px solid #cdd8d2;background:white}
.estimate-plan-canvas{position:relative;width:100%}
.estimate-plan-canvas img{display:block;width:100%;height:auto}
.estimate-plan-canvas svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.estimate-plan-image circle{fill:#e3342f88;stroke:#b8201d;stroke-width:.25}
.estimate-plan-zoom{max-width:240px;margin:8px 0}
.estimate-plan-canvas [data-plan-svg]{pointer-events:auto;cursor:crosshair}
.estimate-plan-canvas [data-plan-svg] circle{pointer-events:auto;cursor:pointer;stroke-width:.22}
.estimate-plan-canvas .estimate-plan-rejected{fill:#89939aaa;stroke:#6b7378}
.estimate-plan-canvas .estimate-plan-accepted{fill:#24a34a77;stroke:#147d36}
.estimate-plan-canvas .estimate-plan-template{fill:#ffd54a33;stroke:#c47700;stroke-width:.15;pointer-events:none}
.estimate-plan-canvas .estimate-plan-help-zone{fill:#2d88b222;stroke:#106393;stroke-width:.24;stroke-dasharray:1 .5;pointer-events:none}
.estimate-plan-symbol-row{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem;margin:.4rem 0}
.estimate-plan-symbol-row input{min-width:180px;flex:1;max-width:320px}
.estimate-plan-threshold{max-width:260px;margin:1rem 0}
.estimates-plan-dialog{max-width:1400px;width:min(1400px,calc(100vw - 24px))}
.estimate-plan-source-settings{border:1px solid #d5dfda;border-radius:8px;padding:10px 14px;background:#fff}
.estimate-plan-source-settings>summary{cursor:pointer;font-weight:600;color:#164e4b}
.estimate-plan-source-settings[open]>summary{margin-bottom:16px}
.estimate-plan-workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(330px,390px);gap:16px;align-items:start}
.estimate-plan-stage{min-width:0;position:sticky;top:8px}
.estimate-plan-sidebar{min-width:0;max-height:70vh;overflow:auto;padding:12px;border:1px solid #d5dfda;border-radius:8px;background:#fff}
.estimate-plan-sidebar>.help{margin-top:0}
.estimate-plan-sidebar>.actions{position:sticky;top:0;z-index:2;gap:6px;padding:8px 0;background:#fff}
.estimate-plan-sidebar>.actions .btn{font-size:12px;padding:6px 8px}
.estimate-plan-help{margin:12px 0;padding:12px;border:1px solid #a9c7bc;border-radius:8px;background:#f5faf7}
.estimate-plan-help[hidden]{display:none}
.estimate-plan-help>.help{margin:7px 0}
.estimate-plan-help .actions{gap:6px;align-items:center}
.estimate-plan-help-messages{display:grid;gap:8px;max-height:250px;overflow:auto;margin:10px 0}
.estimate-plan-help-message{padding:9px 10px;border-radius:8px;background:#fff;white-space:pre-wrap;overflow-wrap:anywhere}
.estimate-plan-help-message.user{background:#e6f1ec}
.estimate-plan-help-message strong{display:block;margin-bottom:3px}
.estimate-plan-help textarea{width:100%}
.estimate-plan-auto-status{margin:10px 0;padding:10px 12px;border:1px solid #a9c7bc;border-radius:8px;background:#edf6f1;color:#225048;font-weight:600}
.estimate-plan-mode-hint{padding:10px 12px;border:1px solid #9ebeb5;border-radius:8px;background:#edf6f2;color:#164e4b;font-weight:600}
.estimate-plan-stage [hidden]{display:none}
.estimate-plan-stage [data-plan-image-state]:not([hidden]){padding:8px 10px;border:1px solid #e3ce9e;background:#fff8e6}
.estimate-plan-stage [data-plan-end-mode]{margin-top:8px}
.estimate-plan-selected{background:#eaf4ef;border-color:#8db9a2}
.estimate-plan-symbol-row{padding:8px;border:1px solid #e0e8e2;border-radius:8px}
.estimate-plan-symbol-row input{max-width:none}
.estimate-plan-symbol-row [data-plan-state]{width:100%;color:#586f67}
.estimate-plan-symbol-row>.actions{width:100%;gap:6px}
.estimate-plan-symbol-row>.actions .btn{font-size:12px;padding:6px 9px}
.estimate-plan-canvas .estimate-plan-selection{fill:#2d88b233;stroke:#106393;stroke-width:.3;pointer-events:none}
.estimate-plan-canvas [data-plan-mode=legend],.estimate-plan-canvas [data-plan-mode=template],.estimate-plan-canvas [data-plan-mode=help]{touch-action:none}
@media(max-width:1000px){.estimate-plan-workspace{grid-template-columns:1fr}.estimate-plan-stage{position:static}.estimate-plan-sidebar{max-height:none;overflow:visible}}

.estimates-list select.estimates-state-select{display:inline-block;width:auto;min-width:0;max-width:125px;min-height:0;height:30px;padding:3px 22px 3px 8px;border:1px solid transparent;border-radius:5px;font:inherit;font-size:12px;cursor:pointer;vertical-align:middle}.estimates-list select.estimates-state-select:focus-visible{outline:2px solid var(--primary,#245b83);outline-offset:2px}.estimates-status-completed{background:#e7ecee;color:#344b55}

.estimates-line-image [draggable="true"]{cursor:grab}.estimates-line-image [draggable="true"]:active{cursor:grabbing}.estimates-image-drop-active{outline:2px dashed var(--primary,#ffa500);outline-offset:3px;background:#fff5df;border-radius:6px}

.estimates-chapter-index{position:sticky;top:72px;z-index:15;background:var(--surface,#fffefa);border:1px solid var(--line,#dce3d9);border-radius:8px;margin:12px 0;padding:10px 14px;box-shadow:0 2px 6px #0000000d}.estimates-chapter-index summary{cursor:pointer;font-weight:600}.estimates-chapter-index nav{display:flex;flex-wrap:wrap;gap:8px;max-height:35vh;overflow:auto;padding-top:12px}.estimates-chapter-index .btn{white-space:normal;text-align:left}.estimates-chapter{scroll-margin-top:135px}

.estimates-save > button[type="submit"]{margin-left:auto}

body:has(.estimates-save) #toast{bottom:110px}
@media(max-width:560px){body:has(.estimates-save) #toast{bottom:160px}}

.estimates-margin-control{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px}.estimates-margin-control .field{flex:1;min-width:140px;margin:0}.estimates-margin-control input{width:100%;max-width:190px}.estimates-margin-control small{display:block;flex-basis:100%;font-weight:normal;color:var(--muted,#6b7c78);line-height:1.5}.estimates-margin-control .btn{margin-bottom:2px}

.estimates-template-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:16px 0;border-bottom:1px solid var(--line,#dce3d9)}.estimates-template-editor>[data-template-chapters]{margin:20px 0}.estimates-template-editor .panel{margin-top:16px}.estimates-template-editor .estimates-line{padding:16px}.estimates-template-editor .field{margin-bottom:12px}@media(max-width:600px){.estimates-template-row{align-items:flex-start;flex-direction:column}}
:is(.estimates-illustrations){display:flex;flex-wrap:wrap;gap:20px}
.estimates-illustrations figure{margin:0;display:flex;flex-direction:column;align-items:center;gap:10px;max-width:100%}
.estimates-illustrations img{display:block;max-width:100%;width:190px;height:270px;object-fit:contain}
.estimates-illustrations figcaption{max-width:260px;overflow-wrap:anywhere;text-align:center;font-weight:600}
.estimate-rich-label{display:inline-flex;align-items:center;gap:6px;align-self:flex-start;max-width:100%;line-height:1.4}
.estimate-rich-label>span{margin:0}
.estimate-rich-label>.estimate-rich-format-toggle{display:inline-flex;align-items:center;justify-content:center;flex:0 0 26px;width:26px;height:26px;min-height:0;padding:4px;margin:-3px 0;border:0;border-radius:4px;background:transparent;color:var(--muted,#63766f);cursor:pointer}
.estimate-rich-format-toggle svg{width:16px;height:16px;pointer-events:none}
.estimate-rich-label>.estimate-rich-format-toggle:hover,.estimate-rich-label>.estimate-rich-format-toggle[aria-expanded=true]{background:#e5eeea;color:#1d5053}
.estimate-rich-label>.estimate-rich-format-toggle:focus-visible{outline:2px solid var(--primary,#1d5053);outline-offset:2px}
.estimate-rich-editor{display:block;min-width:0;width:100%;border:1px solid #a8b6b1;border-radius:7px;background:#fff;color:var(--text,#203b40);overflow:hidden;font-weight:normal;letter-spacing:normal;text-transform:none}
.estimate-rich-editor:focus-within{outline:2px solid var(--primary,#1d5053);outline-offset:1px}
.estimate-rich-toolbar{display:flex;flex-wrap:wrap;align-items:end;gap:5px;padding:6px;background:#f3f6f3;border-bottom:1px solid #dce3dc;font:12px/1.3 sans-serif}
.estimate-rich-toolbar label{display:grid;gap:2px;margin:0;font:inherit;color:#304e51}
.estimate-rich-toolbar select{min-height:32px;width:auto;max-width:180px;padding:4px;font:13px sans-serif}
.estimate-rich-toolbar button{min-height:32px;min-width:32px;padding:4px 8px;border:1px solid #bdc9c1;border-radius:4px;color:#203b40;background:#fff;font:13px sans-serif;cursor:pointer}
.estimate-rich-toolbar button[aria-pressed=true]{background:#d8ebe6;border-color:#1d5053}
.estimate-rich-content{min-height:85px;max-height:480px;overflow:auto;padding:10px 12px;white-space:pre-wrap;overflow-wrap:anywhere;outline:none;font:15px/1.5 sans-serif;text-align:left;cursor:text}
.estimate-rich-content.is-single-line{min-height:40px;max-height:150px}
.estimate-rich-content[aria-readonly=true]{background:#f7f9f7;cursor:default}
.estimate-rich-content[aria-invalid=true]{outline:2px solid #b42328;outline-offset:-2px}
.estimate-rich-toolbar[hidden]{display:none}
.estimates-chapter .panel-head>.field:has(.estimate-rich-editor){flex:1;min-width:160px}
.estimate-rich-editor [hidden]{display:none}
@media(max-width:600px){.estimate-rich-toolbar select{max-width:140px}.estimate-rich-content{padding:8px;font-size:14px}.estimate-rich-toolbar{gap:4px}}

.estimates-hide-line-prices{align-self:center;min-height:42px;gap:8px;line-height:1.4}

.estimates-subchapter{margin-left:1.5rem;border-left:4px solid var(--primary,#e7a31b)}
@media(max-width:600px){.estimates-subchapter{margin-left:.4rem}}
