.sp-filters{display:grid;grid-template-columns:minmax(180px,1fr) minmax(200px,1.3fr) auto;gap:12px;align-items:end}.sp-filters label,.sp-status-filter{font-size:12px;font-weight:600;margin:0}.sp-filters input,.sp-filters select{margin-top:5px;min-height:36px}.sp-tabs{display:flex;gap:6px;border-bottom:1px solid #b8cde1;margin:14px 0}.sp-tab{background:#edf3f8;color:#254969;border:1px solid #b8cde1;border-bottom:0;border-radius:7px 7px 0 0;padding:11px 16px;font-weight:600}.sp-tab.active{background:#3d709f;color:#fff}.sp-selection-bar,.sp-create-bar,.sp-pagination,.sp-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.sp-selection-bar{border:1px solid #aac4dd;background:#eaf3fb;padding:10px 12px;border-radius:8px 8px 0 0}.sp-selection-bar .checkline{margin:0}.sp-selection-bar>span{font-size:12px}.sp-create-bar{padding:12px 0}.sp-pagination{justify-content:flex-end;padding:10px 0;font-size:12px}.sp-table-frame{overflow:auto;border:1px solid #aac4dd;border-radius:8px;background:#fff}.sp-table-frame table{width:100%;margin:0;font-size:12px}.sp-table-frame th{background:#e7f0f8;color:#294e6c;white-space:nowrap}.sp-table-frame td,.sp-table-frame th{padding:9px 10px;vertical-align:middle}.sp-table-frame tbody tr+tr{border-top:1px solid #cfdeec}.sp-table-frame tbody tr:nth-child(even){background:#f7fafc}.sp-table-frame tbody tr.sp-selected{background:#eaf5ef}.sp-table-frame small{font-size:10px;line-height:1.5;margin-top:3px;color:#526a7d}.sp-table-frame input[type=number]{min-width:86px;width:100px;padding:7px;min-height:34px;font-size:12px;border-color:#8caecf}.sp-table-frame select{min-width:145px;max-width:230px;padding:7px;min-height:34px;font-size:11px;border-color:#8caecf}.sp-suggestions{min-width:940px}.sp-suggestions td:nth-child(2){min-width:220px;max-width:330px}.sp-zero{color:#a32c24}.sp-status-filter{display:flex;align-items:center;gap:10px;margin:12px 0;max-width:290px}.sp-status-filter select{flex:1}.suggested-purchases-page [hidden]{display:none!important}.editor.suggested-purchase-editor{width:min(1120px,calc(100vw - 24px));max-width:1120px;padding:22px}.suggested-purchase-editor h2{margin-top:0}.suggested-purchase-editor fieldset{border:0;padding:0;min-width:0;margin:0}.suggested-purchase-editor .form-grid{gap:10px}.sp-editor-lines{min-width:780px}.sp-editor-lines td:first-child{min-width:220px;width:40%}.sp-editor-lines-frame{max-height:47vh;margin-top:12px}.sp-editor-lines thead{position:sticky;top:0;z-index:1}.sp-totals{font-weight:700;font-size:12px;padding:10px;background:#e8f2e9;border:1px solid #b3cdb8;border-radius:6px}.sp-editor-footer{position:sticky;bottom:-22px;background:#fff;border-top:1px solid #b8cde1;flex-wrap:wrap;padding-block:12px;z-index:2}.sp-add-products{border:1px solid #b8cde1;border-radius:7px;margin-top:12px;padding:10px;background:#f5f9fd}.sp-add-products summary{font-size:12px;font-weight:700;cursor:pointer}.sp-add-search{display:flex;gap:10px;align-items:end;margin:10px 0}.sp-add-search label{flex:1;font-size:12px}.sp-add-search input{min-height:34px}.sp-found-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:8px 0;border-top:1px solid #d7e3ee;font-size:12px}.sp-found-row .tiny-btn{flex:none}.sp-add-products #sp-editor-found{max-height:230px;overflow:auto}.suggested-purchase-editor fieldset:disabled input,.suggested-purchase-editor fieldset:disabled select{opacity:1;color:#254969}.sp-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
@media(max-width:900px){.sp-filters{grid-template-columns:1fr 1fr}.sp-filters button{grid-column:1/-1}.sp-table-frame{max-width:100%}.sp-create-bar .small{flex-basis:100%}}@media(max-width:540px){.sp-filters{grid-template-columns:1fr;padding:12px}.sp-tabs{gap:4px;flex-wrap:wrap}.sp-tab{padding:10px;font-size:12px;flex:1}.sp-create-bar .btn{width:100%}.sp-selection-bar{gap:8px}.sp-pagination{justify-content:space-between;gap:5px}.editor.suggested-purchase-editor{width:calc(100vw - 12px);padding:14px;margin:6px;border-radius:12px}.sp-editor-footer{bottom:-14px;gap:8px}.sp-editor-footer .btn{padding:10px 12px}.sp-editor-lines-frame{max-height:48dvh}.sp-add-search{align-items:stretch;flex-direction:column}}
.sp-table-frame small.block{display:block}
.sp-money{white-space:nowrap;text-align:right;font-variant-numeric:tabular-nums}
.sp-editor-lines .sp-money input{width:120px;text-align:right}
.sp-price-hint:not([hidden]){display:block;white-space:normal;line-height:1.3;max-width:18ch;margin-left:auto}
.sp-totals{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 18px;margin:12px 0}
.sp-totals>span:first-child{margin-right:auto;font-weight:500}
.sp-totals strong{font-size:14px}
.sp-editor-lines [data-sp-editor-remove]{
  min-width:64px;
  width:max-content;
  white-space:nowrap;
  word-break:normal;
  overflow-wrap:normal;
}
.sp-suggestions-frame,.sp-lists-frame{
  max-height:min(55vh,560px);
  overscroll-behavior:contain;
}
.sp-suggestions-frame thead,.sp-lists-frame thead{
  position:sticky;
  top:0;
  z-index:2;
}
.sp-suggestions-frame td,.sp-lists-frame td{
  padding:7px 8px;
}
.sp-supplier-picker{
  position:relative;
  min-width:150px;
  max-width:100%;
}
.sp-supplier-search{
  width:100%;
  min-width:0;
  padding:7px;
  min-height:34px;
  font-size:12px;
}
.sp-supplier-results{
  max-height:180px;
  overflow-y:auto;
  overscroll-behavior:contain;
  margin-top:4px;
  border:1px solid #aac4dd;
  border-radius:6px;
  background:#fff;
  box-shadow:0 4px 12px #17355020;
}
.sp-supplier-results[hidden]{display:none}
.sp-supplier-results [role=option]{
  display:block;
  width:100%;
  padding:8px 10px;
  border:0;
  border-bottom:1px solid #e5edf4;
  border-radius:0;
  background:#fff;
  color:#254969;
  text-align:left;
  white-space:normal;
  overflow-wrap:anywhere;
  font-size:12px;
  line-height:1.4;
}
.sp-supplier-results [role=option]:hover,
.sp-supplier-results [aria-selected=true]{
  background:#e7f0f8;
}
.sp-supplier-status{margin:6px 8px;font-size:12px}
.sp-filters .sp-supplier-results{
  position:absolute;
  left:0;
  right:0;
  top:100%;
  z-index:10;
}
.sp-table-frame .sp-supplier-picker{width:180px}
.sp-editor-lines td:first-child{width:28%}
.sp-editor-lines th{white-space:normal}
.sp-editor-lines .sp-supplier-picker{width:160px}
.sp-editor-lines [data-sp-editor-quantity]{width:86px}
@media(max-width:540px){
  .sp-suggestions-frame,.sp-lists-frame{max-height:52dvh}
}

/* Category filters share the bounded, compact purchasing workspace. */
.sp-filters.sp-purchase-filters{grid-template-columns:minmax(180px,1fr) minmax(150px,.8fr) minmax(180px,1.1fr) auto}
.sp-add-search select{width:100%;min-height:34px;margin-top:5px}
@media(max-width:900px){.sp-filters.sp-purchase-filters{grid-template-columns:1fr 1fr}}
@media(max-width:540px){.sp-filters.sp-purchase-filters{grid-template-columns:1fr}.sp-add-search label{flex:none;min-width:0}}

.br-history-table{min-width:760px}.br-history-actions{min-width:280px;white-space:nowrap}.br-history-actions .tiny-btn{display:inline-block;white-space:nowrap;margin:2px}.br-editor-lines{min-width:620px}.br-editor-lines td:first-child{width:52%;min-width:240px}
