.spreadsheet-document{min-width:0}.spreadsheet-view-tools{align-items:center;gap:var(--space-3);padding:var(--space-2);background:var(--surface);border-bottom:1px solid var(--border-default);font-size:var(--text-sm);flex-wrap:wrap;display:flex}.spreadsheet-zoom-controls{align-items:center;gap:var(--space-2);display:flex}.spreadsheet-zoom-controls output{text-align:center;font-variant-numeric:tabular-nums;min-width:3.5rem}.spreadsheet-view-tools>small{color:var(--text-muted)}.spreadsheet-view-tools>span{color:var(--text-muted);margin-left:auto}.spreadsheet-preview{min-width:0;height:var(--spreadsheet-preview-height);background:var(--surface-muted);padding:var(--space-4);overscroll-behavior-x:contain;overscroll-behavior-y:auto;overflow:auto}.spreadsheet-scaled-page{position:relative}.spreadsheet-surface{transform-origin:0 0;color:#000;box-shadow:var(--shadow-sm);background:#fff;font-family:Calibri,Malgun Gothic,sans-serif;font-size:14.667px;line-height:normal;position:absolute;inset:0 auto auto 0}.spreadsheet-source-cell{box-sizing:border-box;white-space:pre;-webkit-user-select:none;user-select:none;cursor:cell;flex-direction:column;justify-content:flex-end;padding:0 2px;display:flex;position:absolute}.spreadsheet-source-cell[data-grid]{outline-offset:-.5px;outline:.5px solid #d9d9d9}.spreadsheet-source-cell:focus-visible{outline:2px solid var(--border-focus);outline-offset:-2px}.spreadsheet-source-text{z-index:1;pointer-events:none;flex-shrink:0;width:100%;display:block;position:relative;overflow:hidden}.spreadsheet-ruler{background:var(--surface-muted);color:var(--text-muted);border:1px solid var(--border-default);justify-content:center;align-items:center;font:12px sans-serif;display:flex;position:absolute}.spreadsheet-source-image{pointer-events:none;z-index:1;max-width:none;position:absolute}.spreadsheet-overlay-layer{pointer-events:none;z-index:2;position:absolute;inset:0}.spreadsheet-connection,.spreadsheet-region,.spreadsheet-selection,.spreadsheet-print-area{box-sizing:border-box;position:absolute}.spreadsheet-connection{border-bottom:2px solid var(--button-primary-background)}.spreadsheet-connection i{background:var(--button-primary-background);border-radius:50%;width:7px;height:7px;position:absolute;top:0;right:0}.spreadsheet-region{border:2px dashed var(--button-primary-background)}.spreadsheet-region span{background:var(--button-primary-background);color:var(--button-primary-color,#fff);padding:2px 4px;font:11px sans-serif;position:absolute;bottom:100%;right:0}.spreadsheet-selection{z-index:3;border:3px solid var(--border-focus);background:color-mix(in srgb, var(--border-focus) 14%, transparent);box-shadow:inset 0 0 0 1px #fff,0 0 0 1px #fff}.spreadsheet-print-area{border:2px dashed #777}.template-designer{border:1px solid var(--border-strong);border-radius:var(--radius-md);min-width:0;overflow:hidden}.template-designer-toolbar,.template-designer-heading,.template-designer-actions,.template-designer-panel-title,.template-designer-sheets,.template-designer-preview-options{align-items:center;gap:var(--space-2);flex-wrap:wrap;display:flex}.template-designer-toolbar{padding:var(--space-4);border-bottom:1px solid var(--border-default);justify-content:space-between}.template-designer-heading h2{font-size:var(--text-lg);font-weight:600}.template-designer>.template-designer-help{padding:var(--space-3) var(--space-4);background:var(--surface-muted);margin:0}.template-designer-help{color:var(--text-muted);font-size:var(--text-sm);line-height:1.65}.template-designer-workspace{grid-template-columns:17rem minmax(0, 1fr) var(--spreadsheet-inspector-width);align-items:stretch;display:grid}.template-designer-panel{padding:var(--space-4);gap:var(--space-3);background:var(--surface);flex-direction:column;min-width:0;display:flex}.template-designer-panel:first-child{border-right:1px solid var(--border-strong)}.template-designer-panel:last-child{border-left:1px solid var(--border-strong)}.template-designer-panel-title{justify-content:space-between}.template-designer-panel h3{font-weight:600}.template-designer-panel hr{border:0;border-top:1px solid var(--border-default);margin:var(--space-2) 0}.template-field-list{max-height:var(--spreadsheet-field-list-height);overflow:auto}.template-field-group h4{color:var(--text-muted);font-size:var(--text-sm);padding:var(--space-3) var(--space-2) var(--space-1)}.template-field-row{align-items:center;display:flex}.template-field-row>.button:first-child{padding-inline:var(--space-2);justify-content:flex-start;min-width:0}.template-field-row svg{width:var(--space-4);color:var(--text-muted)}.template-designer-canvas{background:var(--surface-muted);flex-direction:column;min-width:0;display:flex}.template-designer-formula{padding:var(--space-3);align-items:center;gap:var(--space-3);border-bottom:1px solid var(--border-strong);background:var(--surface);font-size:var(--text-sm);display:flex}.template-designer-formula strong{min-width:var(--spreadsheet-address-width)}.template-designer-formula svg{width:var(--space-4);color:var(--text-muted);flex-shrink:0}.template-designer-formula span{color:var(--text-muted)}.template-designer-sheets{padding:var(--space-2);background:var(--surface);border-top:1px solid var(--border-strong);margin-top:auto}.template-designer-preview-options{padding:var(--space-2)}.template-designer-preview-options>*{flex:1;min-width:0}.template-value-preview{gap:var(--space-2);padding:var(--space-3);border-radius:var(--radius-sm);background:var(--surface-muted);overflow-wrap:anywhere;flex-direction:column;display:flex}.template-value-preview>span,.template-value-preview small{font-size:var(--text-sm);color:var(--text-muted)}.template-value-preview strong{font-weight:600}.template-block{padding:var(--space-2);border:1px solid var(--border-default);border-radius:var(--radius-sm);margin-bottom:var(--space-2);justify-content:space-between;align-items:center;display:flex}.template-block strong,.template-block small{display:block}.template-block small{color:var(--text-muted)}.template-designer-status{justify-content:space-between;gap:var(--space-2);padding:var(--space-3) var(--space-4);border-top:1px solid var(--border-strong);font-size:var(--text-sm);color:var(--text-secondary);flex-wrap:wrap;display:flex}.template-designer-empty{min-height:var(--spreadsheet-field-list-height);justify-content:center;align-items:center;gap:var(--space-3);padding:var(--space-6);text-align:center;flex-direction:column;display:flex}.template-compose{gap:var(--space-4);flex-direction:column;display:flex}.template-compose-parts{gap:var(--space-3);grid-template-columns:2fr 1fr 2fr 1fr;display:grid}@media (max-width:90rem){.template-designer-workspace{grid-template-columns:17rem minmax(0,1fr)}.template-designer-panel:last-child{border-left:0;border-top:1px solid var(--border-strong);grid-column:1/-1;grid-template-columns:repeat(2,minmax(0,1fr));display:grid}.template-designer-panel:last-child .template-designer-panel-title{grid-column:1/-1}}@media (max-width:56.25rem){.template-designer-workspace{grid-template-columns:minmax(0,1fr)}.template-designer-panel:first-child{border-right:0;border-bottom:1px solid var(--border-strong)}.template-field-list{max-height:var(--selection-picker-max-height)}.template-designer-panel:last-child,.template-compose-parts{grid-template-columns:minmax(0,1fr)}}.template-designer-workspace.template-designer-source{grid-template-columns:17rem minmax(0,1fr)}.template-designer-preset-panel{max-height:max(36rem, calc(calc(var(--app-vh) * 100) - 23rem));overflow:auto}.template-designer-preset-panel>*{flex-shrink:0}.template-designer-file{padding:var(--space-3) var(--space-4);background:var(--surface);border-bottom:1px solid var(--border-default);overflow-wrap:anywhere}.print-template-editor-info{gap:var(--space-4);min-width:0;padding:var(--space-4);border-right:1px solid var(--border-default);background:var(--surface);overflow-wrap:anywhere;flex-direction:column;display:flex}.print-template-editor-info .file-attachment-list li>.button:first-child{padding-inline:var(--space-1);flex:1}.print-template-editor-info .file-attachment-list .button{white-space:normal;overflow-wrap:anywhere;min-width:0;max-width:100%}.print-template-editor-info>p{font-size:var(--text-sm);color:var(--text-muted)}.print-template-editor-info .form-section>legend{margin-bottom:var(--space-4)}.estimate-layout-workspace{grid-template-columns:17rem minmax(0,1fr);align-items:start;display:grid}.estimate-layout-workspace.estimate-layout-advanced{grid-template-columns:minmax(0,1fr) 20rem}.estimate-layout-advanced>.template-designer-panel{max-height:max(36rem, calc(calc(var(--app-vh) * 100) - 23rem));overflow:auto}.estimate-layout-sidebar{height:max(36rem, calc(calc(var(--app-vh) * 100) - 23rem));border-right:1px solid var(--border-strong);flex-direction:column;min-width:0;display:flex}.estimate-layout-sidebar>.estimate-layout-fields{gap:var(--space-4);border:0;flex:1;min-height:0;overflow:auto}.estimate-layout-fields>*{flex-shrink:0}.estimate-layout-region>*+*{margin-top:var(--space-3)}.estimate-layout-actions{padding:var(--space-3);border-top:1px solid var(--border-default);background:var(--surface);flex-shrink:0}.estimate-layout-workspace small{color:var(--text-muted);overflow-wrap:anywhere}.estimate-layout .template-designer-canvas>.template-designer-help{padding:var(--space-3)}.estimate-layout-fields .template-designer-help{margin:0}.template-designer .spreadsheet-preview{height:max(36rem, calc(calc(var(--app-vh) * 100) - 23rem))}@media (max-width:56.25rem){.template-designer-preset-panel{max-height:28rem}.template-designer-workspace.template-designer-source,.estimate-layout-workspace{grid-template-columns:minmax(0,1fr)}.estimate-layout-sidebar{height:24rem}.estimate-layout-workspace.estimate-layout-advanced{grid-template-columns:minmax(0,1fr)}.print-template-editor-info{border-right:0;border-bottom:1px solid var(--border-default)}}.template-cell-value-preview>strong,.template-cell-value-preview>span{white-space:pre-wrap}.template-estimate-picker{height:min(48rem, var(--dialog-max-height))}.template-estimate-picker>.dialog-body{flex:1;display:flex;overflow:hidden}.template-estimate-picker .template-compose{gap:var(--space-3);flex:1;min-width:0;min-height:0}.template-estimate-picker .template-compose>*{flex-shrink:0}.template-estimate-picker-search{align-items:center;gap:var(--space-2);flex-wrap:wrap;display:flex}.template-estimate-picker-search .search-field{flex:1;min-width:min(100%,15rem)}.template-estimate-picker .template-estimate-picker-list{flex:1;min-height:6rem;overflow:auto}.template-estimate-picker .template-designer-help{font-size:var(--text-xs);margin:0}@media (max-width:48rem){.template-estimate-picker .pagination-bar{gap:var(--space-2);flex-wrap:wrap}}
