/* Service-only material catalog and closeout spreadsheet. */
.sm-library,.sm-usage-summary{--sh-control-min-height:44px;min-width:0;color:var(--sh-ink,#102434)}
.sm-heading,.sm-dialog-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.sm-heading h2,.sm-dialog-heading h2{margin:0;overflow-wrap:anywhere}
.sm-heading p{color:var(--sh-muted,#536477)}
.sm-library-toolbar{display:flex;align-items:flex-end;flex-wrap:wrap;gap:12px;margin:20px 0 12px}
.sm-library-toolbar label{display:grid;gap:6px;flex:1 1 200px;min-width:0}
.sm-toolbar-actions{display:flex;flex-wrap:wrap;gap:8px}
.sm-library button,.sm-dialog button,.sm-usage-summary button{min-height:44px;white-space:normal}
.sm-library input,.sm-library select,.sm-dialog input{min-height:44px;min-width:0;width:100%;font-size:16px;box-sizing:border-box}
.sm-table-scroll{overflow:auto;max-width:100%;border:1px solid var(--sh-border,#e4ebf2);border-radius:9px;background:var(--sh-surface,#fff)}
.sm-table-scroll:focus-visible,.sm-dialog :focus-visible,.sm-library :focus-visible,.sm-usage-summary :focus-visible{outline:2px solid var(--sh-blue,#0862c9);outline-offset:2px}
.sm-table-scroll table{border-collapse:collapse;width:100%;min-width:0;color:var(--sh-ink,#102434);margin:0}
.sm-table-scroll th{background:var(--sh-page,#f4f7fb);text-align:left;font-weight:600}
.sm-table-scroll th,.sm-table-scroll td{padding:12px;border-bottom:1px solid var(--sh-border,#e4ebf2);vertical-align:top;white-space:normal}
.sm-table-scroll tr:last-child td{border-bottom:0}
.sm-table-scroll td small{display:block;color:var(--sh-muted,#536477);margin-top:4px;font-size:12px}
.sm-table-scroll .sm-library-table{min-width:400px}
.sm-library-table td:nth-child(2){min-width:170px;overflow-wrap:anywhere}
.sm-number{font-variant-numeric:tabular-nums;text-align:right}
.sm-table-scroll .sm-number{white-space:nowrap}
.sm-helper{color:var(--sh-muted,#536477);font-size:13px;line-height:1.5;margin:10px 0}
.sm-empty{padding:16px;color:var(--sh-muted,#536477)}
.sm-dialog{--sh-control-min-height:44px;width:min(620px,calc(100vw - 24px));max-width:none;max-height:calc(100dvh - 24px);padding:0;border:1px solid var(--sh-border,#e4ebf2);border-radius:14px;background:var(--sh-surface,#fff);color:var(--sh-ink,#102434);box-sizing:border-box;overflow:hidden}
.sm-dialog-wide{width:min(1120px,calc(100vw - 24px))}
.sm-dialog::backdrop{background:rgba(16,36,52,.5)}
.sm-dialog-form{display:flex;flex-direction:column;gap:14px;padding:22px;min-width:0;max-height:calc(100dvh - 24px);box-sizing:border-box}
.sm-dialog-heading{align-items:center;flex-shrink:0}
.sm-dialog-heading h2{font-size:22px}
.sm-close{font-size:26px;padding:0;width:44px;flex:0 0 44px}
.sm-dialog-body{min-width:0;min-height:0;overflow-y:auto}
.sm-dialog-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:10px;padding-top:10px;border-top:1px solid var(--sh-border,#e4ebf2);flex-shrink:0}
.sm-dialog-actions [role=status]{margin-right:auto;color:var(--sh-muted,#536477);font-size:13px}
.sm-fields{display:grid;gap:14px;border:0;margin:0;padding:0;min-width:0}
.sm-fields label{display:grid;gap:6px;min-width:0}
.sm-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.sm-calculated{display:grid;align-content:center;gap:5px;padding:12px;border-radius:8px;background:var(--sh-page,#f4f7fb)}
.sm-calculated strong{font-size:23px;font-variant-numeric:tabular-nums}
.sm-calculated small{color:var(--sh-muted,#536477)}
.sm-modifier-table td:last-child{width:160px}
.sm-error,.sm-needs-price{color:#b42318}
.sm-error{margin:0;line-height:1.5}
.sm-error[hidden],.sm-suggestions[hidden],.sm-dialog [data-sm-no-materials][hidden]{display:none}
.sm-sheet-scroll{max-height:55dvh}
.sm-sheet th{position:sticky;top:0;z-index:1}
.sm-sheet td,.sm-sheet th{padding:8px}
.sm-sheet-field{table-layout:fixed}
.sm-sheet-field th:first-child{width:62px}
.sm-sheet-field th:nth-child(2){width:68px}
.sm-sheet-field th:last-child{width:60px}
.sm-sheet-field .sm-quantity-cell,.sm-sheet-field .sm-unit-cell,.sm-sheet-field .sm-material-cell{min-width:0;width:auto}
.sm-sheet-field input{width:100%;min-width:0}
.sm-sheet-field abbr{border:0;text-decoration:none}
.sm-sheet-scroll-hint{display:none;margin:8px 0 0;color:var(--sh-muted,#536477);font-size:12px}
.sm-quantity-cell{width:80px;min-width:68px}
.sm-unit-cell{width:90px;min-width:80px}
.sm-material-cell{width:100%;min-width:200px}
.sm-price-cell{min-width:112px;width:112px}
.sm-remove-cell{width:44px}
.sm-remove-cell button{width:44px;padding:0;font-size:24px}
.sm-row-type{display:flex;align-items:center;gap:6px;margin-top:6px;font-size:12px;color:var(--sh-muted,#536477)}
.sm-row-type input{flex:1;min-width:0}
.sm-sheet .sm-row-note:empty{display:none}
.sm-sheet-footer{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-top:12px}
.sm-sheet-footer p{margin:0}
.sm-sheet-footer strong{margin-left:12px;font-variant-numeric:tabular-nums}
.sm-suggestions{position:fixed;z-index:20;overflow:auto;background:var(--sh-surface,#fff);border:1px solid var(--sh-border,#e4ebf2);border-radius:8px;box-shadow:0 8px 24px rgba(16,36,52,.2);padding:4px;box-sizing:border-box}
.sm-suggestions button{display:flex;gap:12px;align-items:center;justify-content:space-between;width:100%;min-height:52px;border:0;border-radius:4px;background:var(--sh-surface,#fff);color:var(--sh-ink,#102434);text-align:left;padding:10px;white-space:normal}
.sm-suggestions button:hover,.sm-suggestions [aria-selected=true]{background:var(--sh-page,#f4f7fb)}
.sm-suggestions button>span:first-child{min-width:0;overflow-wrap:anywhere}
.sm-suggestions strong{font-size:14px}
.sm-suggestions small{display:block;color:var(--sh-muted,#536477);font-size:12px;margin-top:3px}
.sm-suggestions p{padding:10px;margin:0;font-size:13px;line-height:1.5}
.sm-suggestion-price{white-space:nowrap;font-size:13px;font-variant-numeric:tabular-nums}
.sm-usage-summary .service-form-heading{flex-wrap:wrap;gap:12px}
.sm-usage-summary-table td:nth-child(2),.sm-usage-summary-table td:nth-child(3){overflow-wrap:anywhere}
@media(max-width:600px){.sm-dialog,.sm-dialog-wide{width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}.sm-dialog-form{padding:12px;gap:10px}.sm-dialog-heading h2{font-size:20px}.sm-form-grid{grid-template-columns:minmax(0,1fr)}.sm-dialog-actions button:not(.sm-close){flex:1 1 100px}.sm-dialog-actions [role=status]:not(:empty){flex-basis:100%}.sm-sheet td,.sm-sheet th{padding:5px}.sm-quantity-cell{width:60px;min-width:52px}.sm-material-cell{min-width:148px}.sm-sheet input{padding:8px}.sm-sheet-field th:first-child,.sm-sheet-field th:nth-child(2),.sm-sheet-field th:last-child{width:60px}.sm-sheet-field input{padding-inline:4px}.sm-row-type{display:grid;gap:2px}.sm-library-toolbar{align-items:stretch}.sm-toolbar-actions>*{flex:1 1 130px}.sm-usage-summary .service-form-heading>button{width:100%}.sm-table-scroll th,.sm-table-scroll td{font-size:13px}.sm-sheet-scroll{max-height:50dvh}.sm-sheet-scroll-hint{display:block}}
