/* Purchasing catalogue additions; existing Office/editor styles remain separate. */
.stock-orders .so-catalogue-store{max-width:360px;margin:20px 0}
.stock-orders .so-catalogue-counts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:20px 0}
.stock-orders .so-catalogue-counts>div{display:flex;flex-direction:column;gap:5px;background:var(--surface);border:1px solid var(--edge);border-radius:var(--radius-lg);padding:20px}
.stock-orders .so-catalogue-counts strong{font-size:28px;line-height:1.2;color:var(--green)}
.stock-orders .so-catalogue-counts span{font-size:13px;color:var(--muted)}
.stock-orders .so-catalogue-row{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:20px;border-top:1px solid var(--line)}
.stock-orders .so-catalogue-row:first-child{border-top:0}
.stock-orders .so-catalogue-row>div{min-width:0;overflow-wrap:anywhere;flex:1}
.stock-orders .so-catalogue-row h3{font-size:16px;margin-bottom:7px}
.stock-orders .so-catalogue-row p{margin:6px 0}
.stock-orders .so-catalogue-row .so-pill{margin:7px 0}
.stock-orders .so-catalogue-row details{margin-top:12px;font-size:13px}
.stock-orders .so-catalogue-row summary{cursor:pointer;color:var(--green);font-weight:600}
.stock-orders .so-source-facts{padding-top:15px;gap:12px}
.stock-orders .so-source-facts dt{text-transform:capitalize}
.stock-orders .so-source-facts dd{font-weight:500;font-size:13px}
.stock-orders .so-catalogue-dialog{width:min(760px,calc(100vw - 32px))}
.stock-orders .so-catalogue-dialog .so-grid{margin-top:14px}
.stock-orders .so-catalogue-dialog .so-check{align-self:center;padding:10px 0}
.stock-orders .so-catalogue-dialog [role=alert]:not([hidden]){margin-top:12px;padding:10px;background:var(--danger-bg);color:var(--danger);border-radius:var(--radius)}
.stock-orders .so-picker-results{display:grid;gap:8px;margin-top:14px;max-height:360px;overflow:auto;overscroll-behavior:contain}
.stock-orders .so-picker-item{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:12px;background:var(--subtle);border-radius:var(--radius);font-size:13px}
.stock-orders .so-picker-item>div{min-width:0;overflow-wrap:anywhere}
.stock-orders .so-picker-item p{margin:5px 0 0}
.stock-orders .so-field input[readonly]{background:var(--subtle);color:var(--muted)}
.stock-orders .so-copy-text{width:100%;min-height:300px;font:13px/1.6 monospace;padding:12px}
.stock-orders .so-supplier-print{width:min(760px,calc(100vw - 32px))}
.stock-orders .so-supplier-print pre{font:14px/1.7 sans-serif;margin:20px 0}
/* One navigation position for the purchasing workspace: heading, tab bar, then content. */
.stock-orders .so-navigation{margin:0 0 20px}
.stock-orders .so-workspace-tabs{display:flex;gap:4px;flex-wrap:wrap;border-bottom:1px solid var(--edge);padding:0;margin:0}
.stock-orders .so-workspace-tab{min-height:44px;margin-bottom:-1px;border:0;border-radius:8px 8px 0 0;background:transparent;font-weight:650;padding:10px 18px;color:#5f625e}
.stock-orders .so-workspace-tab:hover:not(:disabled){background:var(--subtle);color:var(--ink)}
.stock-orders .so-workspace-tab[aria-current=page]{color:var(--ink);background:transparent;box-shadow:inset 0 -2px var(--green)}
.stock-orders .so-order-tabs{margin-top:14px}
.stock-orders .so-catalogue-store{margin:0 0 20px}
.stock-orders .so-product-summary{display:flex;gap:16px;align-items:center;flex-wrap:wrap;padding:14px 0}
.stock-orders .so-product-summary strong{font-size:23px;letter-spacing:-.5px}
.stock-orders .so-product-summary>span{font-size:13px;color:var(--muted);flex:1}
.stock-orders .so-product-filters{display:grid;grid-template-columns:minmax(220px,2fr) minmax(160px,1fr) minmax(150px,1fr);gap:12px;padding:16px;background:var(--surface);border:1px solid var(--edge);border-radius:10px}
.stock-orders .so-product-optional{display:flex;align-items:center;gap:20px;flex-wrap:wrap;margin:12px 0}
.stock-orders .so-product-optional .so-check{font-size:12px;white-space:nowrap}
.stock-orders .so-product-optional p{font-size:12px;margin:0}
.stock-orders .so-product-list{border:1px solid var(--edge);border-radius:10px;overflow:hidden;background:var(--surface)}
.stock-orders .so-products-table{min-width:760px;width:100%;border-collapse:collapse}
.stock-orders .so-products-table th,.stock-orders .so-products-table td{padding:12px 14px;vertical-align:middle;text-align:left}
.stock-orders .so-products-table th{font-size:10px;letter-spacing:.65px;text-transform:uppercase;background:var(--subtle)}
.stock-orders .so-products-table td{font-size:13px;line-height:1.45;border-top:1px solid var(--line)}
.stock-orders .so-products-table tbody tr:hover{background:var(--subtle)}
.stock-orders .so-products-table td:first-child{width:27%}
.stock-orders .so-products-table td:nth-child(2){width:18%}
.stock-orders .so-products-table td:nth-child(3){width:24%}
.stock-orders .so-products-table small,.stock-orders .so-suppliers-table small{display:block;font-size:11px;color:var(--muted);line-height:1.5;margin-top:4px}
.stock-orders .so-product-name{display:block;text-align:left;padding:0;border:0;background:transparent;box-shadow:none;min-height:0;font-size:15px;font-weight:700;text-transform:none;letter-spacing:normal;color:var(--ink);text-decoration-color:var(--green);cursor:pointer}
.stock-orders .so-products-table .so-pill{white-space:nowrap;word-break:normal;overflow-wrap:normal}
.stock-orders .so-products-table td:nth-child(4){min-width:120px}
.stock-orders .so-product-name:hover{text-decoration:underline;color:var(--green)}
.stock-orders .so-product-actions{display:flex;gap:5px;align-items:flex-start;flex-wrap:wrap}
.stock-orders .so-product-actions .so-button{font-size:11px;min-height:28px;padding:5px 8px;white-space:nowrap}
.stock-orders .so-suppliers-table{min-width:740px;font-size:13px}
.stock-orders .so-suppliers-table td{overflow-wrap:anywhere;vertical-align:top;max-width:300px}
.stock-orders .so-suppliers-table td:nth-child(2){min-width:240px;width:30%}
.stock-orders .so-supplier-product-scope>span{display:block;margin-bottom:10px}
.stock-orders .so-supplier-product-strip{display:flex;gap:8px;flex-wrap:wrap}
.stock-orders .so-supplier-product-tile{display:flex;flex-direction:column;align-items:center;gap:5px;width:62px;padding:0;border:0;background:none;color:var(--ink);font:inherit;text-align:center;cursor:pointer;text-transform:none;letter-spacing:normal}
.stock-orders .so-product-photo-frame{display:flex;position:relative;width:56px;height:56px;align-items:center;justify-content:center;background:#fff;border:1px solid var(--edge);border-radius:9px;overflow:hidden;flex:none}
.stock-orders .so-product-photo-frame.unverified{border-color:#e87516}
.stock-orders .so-photo-legend{display:flex;align-items:center;gap:8px;font-size:12px;line-height:1.5;color:var(--muted);margin:0 0 16px}
.stock-orders .so-photo-legend-swatch{display:inline-block;width:14px;height:14px;flex:none;border:1px solid #e87516;border-radius:4px;background:#fff}
.stock-orders .so-product-photo-frame img{width:100%;height:100%;object-fit:contain;padding:3px;box-sizing:border-box}
.stock-orders .so-product-photo-missing{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;width:100%;height:100%;background:var(--subtle);color:var(--muted);font-size:8px;line-height:1.2}
.stock-orders .so-product-photo-missing>span:first-child{font-size:23px;line-height:1}
.stock-orders .so-product-photo-missing[hidden],.stock-orders .so-product-photo-frame img[hidden]{display:none}
.stock-orders .so-supplier-product-label{font-size:10px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;max-width:62px}
.stock-orders .so-supplier-product-tile:hover .so-product-photo-frame,.stock-orders .so-supplier-product-tile:focus-visible .so-product-photo-frame{border-color:var(--green);box-shadow:0 0 0 2px var(--green-soft,var(--subtle))}
.stock-orders .so-supplier-product-tile:hover .so-product-photo-frame.unverified,.stock-orders .so-supplier-product-tile:focus-visible .so-product-photo-frame.unverified{border-color:#e87516}
.stock-orders .so-supplier-all-products{font-size:11px;padding:0;min-height:28px;margin-top:5px;border:0;background:none;text-transform:none;letter-spacing:normal;color:var(--green)}
.stock-orders .so-supplier-products-dialog{width:min(850px,calc(100vw - 32px));max-height:90vh;overflow:auto}
.stock-orders .so-supplier-photo-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:16px;margin-top:20px}
.stock-orders .so-supplier-photo-card{display:flex;align-items:flex-start;flex-direction:column;gap:10px;padding:14px;background:var(--subtle);border-radius:10px;min-width:0}
.stock-orders .so-product-photo-frame.large{width:100%;height:180px}
.stock-orders .so-product-photo-frame.large img{padding:12px}
.stock-orders .so-product-photo-frame.large .so-product-photo-missing{font-size:12px}
.stock-orders .so-product-photo-frame.large .so-product-photo-missing>span:first-child{font-size:40px}
.stock-orders .so-supplier-photo-card>strong{font-size:15px;line-height:1.4}
.stock-orders .so-supplier-photo-card small{display:block;color:var(--muted);font-size:12px;line-height:1.5}
.stock-orders .so-product-photo-source{display:inline-block;font-size:12px;margin-top:8px;color:var(--green);text-decoration:underline}
.stock-orders .so-product-photo-reference{display:block;font-size:12px;line-height:1.5;margin-bottom:5px;color:var(--ink)}
.stock-orders .so-setup-rows{display:grid;gap:14px;margin:20px 0}
.stock-orders .so-setup-row{padding:16px;background:var(--subtle);border:1px solid var(--edge);border-radius:10px}
.stock-orders .so-setup-row>.so-actions{margin-top:12px;justify-content:space-between}
.stock-orders .so-supplier-editor-nav{display:flex;flex-wrap:wrap;gap:6px;padding-bottom:16px;margin-bottom:16px;border-bottom:1px solid var(--line)}
.stock-orders .so-supplier-editor-nav .so-button{flex:1;min-width:100px;text-transform:none;letter-spacing:normal;font-size:13px}
.stock-orders .so-supplier-editor-nav .so-button[aria-current=page]{background:var(--mint);border-color:var(--green);color:var(--green);cursor:default}
.stock-orders .so-suppliers-table th:nth-child(1){width:20%}
.stock-orders .so-suppliers-table th:nth-child(2){width:40%}
.stock-orders .so-suppliers-table th:nth-child(3){width:25%}
.stock-orders .so-suppliers-table th:nth-child(4){width:15%}
.stock-orders .so-products-print{width:min(1100px,calc(100vw - 32px));max-height:90vh;overflow:auto}
.stock-orders .so-products-paper{width:100%;border-collapse:collapse;font-size:12px;margin-top:20px}
.stock-orders .so-products-paper th,.stock-orders .so-products-paper td{padding:7px;border:1px solid #ccc;text-align:left;vertical-align:top}
.stock-orders .so-products-paper small{display:block;font-size:10px;color:#666;margin-top:2px}
@media(max-width:700px){.stock-orders .so-workspace-tab{padding:10px 14px}.stock-orders .so-product-filters{grid-template-columns:1fr 1fr;padding:12px}.stock-orders .so-product-filters>.so-field:first-child{grid-column:1/-1}.stock-orders .so-product-summary{gap:10px}.stock-orders .so-product-summary>span{flex-basis:55%}.stock-orders .so-products-table th,.stock-orders .so-products-table td{padding:10px}.stock-orders .so-product-optional{gap:8px}.stock-orders .so-products-table{min-width:700px}.stock-orders .so-setup-row{padding:12px}}
@media(max-width:540px){.stock-orders .so-catalogue-counts{gap:7px}.stock-orders .so-catalogue-counts>div{padding:12px}.stock-orders .so-catalogue-counts strong{font-size:24px}.stock-orders .so-catalogue-counts span{font-size:11px}.stock-orders .so-catalogue-row{flex-direction:column;padding:16px;gap:12px}.stock-orders .so-catalogue-row>button{width:100%}.stock-orders .so-catalogue-dialog .so-grid{grid-template-columns:minmax(0,1fr)}.stock-orders .so-source-facts{grid-template-columns:minmax(0,1fr)}}
/* Shared catalogue tables follow Office's rounded panels, green tints and quiet dividers. */
.stock-orders .so-product-filters,.stock-orders .so-supplier-filters{padding:20px;border:1px solid var(--edge);border-radius:var(--radius-lg);background:var(--surface);box-shadow:var(--shadow-card)}
.stock-orders .so-supplier-filters{margin:18px 0}
.stock-orders .so-supplier-filters .so-field{max-width:640px}
.stock-orders .so-product-optional{margin:16px 0 20px}
.stock-orders .so-catalogue-register{border:1px solid var(--edge);border-radius:var(--radius-lg);background:var(--surface);box-shadow:var(--shadow-card);overflow:hidden}
.stock-orders .so-catalogue-head{padding:14px 20px;gap:12px;background:var(--surface);border-bottom:0}
.stock-orders .so-catalogue-head h2{font-size:17px;line-height:1.4;margin:0}
.stock-orders .so-table-count{margin:4px 0 0;font-size:12px;line-height:1.5;color:var(--muted);font-weight:500}
.stock-orders .so-catalogue-table{width:100%;min-width:0;border-collapse:collapse}
.stock-orders .so-catalogue-table th{padding:10px 18px;background:color-mix(in srgb,var(--mint) 48%,var(--surface));border-top:1px solid var(--line);border-bottom:1px solid var(--line);color:var(--green);font-size:10px;line-height:1.5;font-weight:700;letter-spacing:.055em;text-align:left}
.stock-orders .so-catalogue-table td{padding:10px 18px;border-top:0;border-bottom:1px solid var(--line);vertical-align:middle;font-size:13px;line-height:1.5;max-width:none;min-width:0;text-align:left}
.stock-orders .so-catalogue-table tbody tr:last-child td{border-bottom:0}
.stock-orders .so-catalogue-table tbody tr:hover,.stock-orders .so-catalogue-table tbody tr:focus-within{background:color-mix(in srgb,var(--mint) 23%,var(--surface))}
.stock-orders .so-catalogue-table th:last-child,.stock-orders .so-catalogue-table td:last-child{text-align:right}
.stock-orders .so-catalogue-table small{margin-top:3px;font-size:11px;line-height:1.5;color:var(--muted)}
.stock-orders .so-catalogue-table td:first-child{width:27%}
.stock-orders .so-catalogue-table td:nth-child(2){width:17%}
.stock-orders .so-catalogue-table td:nth-child(3){width:23%}
.stock-orders .so-catalogue-table td:nth-child(4){min-width:0}
.stock-orders .so-products-table:has(td[data-label="Source price · indicative"]) td:first-child{width:24%}
.stock-orders .so-products-table:has(td[data-label="Source price · indicative"]) td:nth-child(2){width:15%}
.stock-orders .so-products-table:has(td[data-label="Source price · indicative"]) td:nth-child(3){width:20%}
.stock-orders .so-products-table td[data-label="Source price · indicative"]{min-width:120px;overflow-wrap:normal;word-break:normal;font-variant-numeric:tabular-nums}
.stock-orders .so-catalogue-table .so-product-name,.stock-orders .so-suppliers-table td:first-child>strong{font-size:14px;font-weight:700;line-height:1.55;letter-spacing:0;color:var(--ink)}
.stock-orders .so-catalogue-table .so-product-name{min-height:0;padding:0;text-transform:none;border-radius:3px}
.stock-orders .so-catalogue-table .so-pill{align-items:center;gap:6px;white-space:normal;text-align:left;font-size:11px;line-height:1.45;padding:5px 9px}
.stock-orders .so-catalogue-table .so-pill::before{content:'';width:5px;height:5px;flex:none;border-radius:50%;background:currentColor;opacity:.55}
.stock-orders .so-catalogue-table .so-pill.complete{color:var(--green)}
.stock-orders .so-catalogue-table .so-button:not(.so-product-name){min-height:28px;padding:4px 10px;font-size:11px;font-weight:650;line-height:1.4;letter-spacing:0;text-transform:none;white-space:nowrap;box-shadow:none}
.stock-orders .so-product-actions{flex-direction:row;align-items:center;justify-content:flex-end;flex-wrap:nowrap;gap:6px;max-width:none;margin-left:auto}
.stock-orders .so-products-table td[data-label=Actions]{width:1%;white-space:nowrap}
.stock-orders .so-product-actions .so-button:first-child{background:var(--mint);border-color:color-mix(in srgb,var(--green) 24%,var(--edge));color:var(--green)}
.stock-orders .so-product-actions .so-button:first-child:hover:not(:disabled){background:var(--green);border-color:var(--green);color:#fff}
.stock-orders .so-suppliers-table{table-layout:fixed}
.stock-orders .so-suppliers-table th:nth-child(1),.stock-orders .so-suppliers-table td:nth-child(1){width:22%}
.stock-orders .so-suppliers-table th:nth-child(2),.stock-orders .so-suppliers-table td:nth-child(2){width:39%}
.stock-orders .so-suppliers-table th:nth-child(3),.stock-orders .so-suppliers-table td:nth-child(3){width:25%}
.stock-orders .so-suppliers-table th:nth-child(4),.stock-orders .so-suppliers-table td:nth-child(4){width:14%}
.stock-orders .so-supplier-product-scope>span{font-size:12px;color:var(--muted);margin-bottom:8px}
.stock-orders .so-supplier-product-strip{gap:8px}
.stock-orders .so-supplier-product-tile{width:48px;gap:4px}
.stock-orders .so-supplier-product-strip .so-product-photo-frame{width:40px;height:40px;border-radius:8px}
.stock-orders .so-supplier-product-label{max-width:48px;font-size:9px;line-height:1.45}
.stock-orders .so-catalogue-table .so-supplier-all-products{min-height:24px;padding:3px 0;margin-top:5px;border:0;color:var(--green);font-size:12px;justify-content:flex-start;text-decoration:underline;text-underline-offset:3px}
.stock-orders .so-catalogue-table [hidden]{display:none!important}
@media(max-width:900px) and (min-width:701px){
  .stock-orders .so-catalogue-table th,.stock-orders .so-catalogue-table td{padding:10px 12px}
  .stock-orders .so-suppliers-table th:nth-child(1),.stock-orders .so-suppliers-table td:nth-child(1){width:22%}
  .stock-orders .so-suppliers-table th:nth-child(2),.stock-orders .so-suppliers-table td:nth-child(2){width:34%}
  .stock-orders .so-suppliers-table th:nth-child(3),.stock-orders .so-suppliers-table td:nth-child(3){width:26%}
  .stock-orders .so-suppliers-table th:nth-child(4),.stock-orders .so-suppliers-table td:nth-child(4){width:18%}
}
@media(max-width:700px){
  .stock-orders .so-product-filters,.stock-orders .so-supplier-filters{padding:16px}
  .stock-orders .so-product-filters{grid-template-columns:minmax(0,1fr)}
  .stock-orders .so-product-filters>.so-field:first-child{grid-column:auto}
  .stock-orders .so-catalogue-head{padding:14px 16px;align-items:center}
  .stock-orders .so-catalogue-head h2{font-size:16px}
  .stock-orders .so-catalogue-head>.so-button{font-size:11px;min-height:40px;padding:8px 12px;white-space:nowrap}
  .stock-orders .so-catalogue-table,.stock-orders .so-catalogue-table tbody{display:block;width:100%;min-width:0}
  .stock-orders .so-catalogue-table thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
  .stock-orders .so-catalogue-table tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:14px 16px;border-top:1px solid var(--line)}
  .stock-orders .so-catalogue-table tbody td{display:block;width:auto!important;min-width:0;max-width:none;padding:0;border:0;text-align:left!important;overflow-wrap:anywhere}
  .stock-orders .so-catalogue-table td::before{content:attr(data-label);display:block;margin-bottom:4px;color:var(--muted);font-size:10px;line-height:1.4;font-weight:650;letter-spacing:.04em;text-transform:uppercase}
  .stock-orders .so-catalogue-table td:first-child,.stock-orders .so-catalogue-table td[data-label=Actions]{grid-column:1/-1}
  .stock-orders .so-catalogue-table td:first-child::before,.stock-orders .so-catalogue-table td[data-label=Actions]::before{display:none}
  .stock-orders .so-catalogue-table td:first-child .so-product-name,.stock-orders .so-suppliers-table td:first-child>strong{font-size:16px}
  .stock-orders .so-catalogue-table .so-product-actions{flex-direction:row;flex-wrap:nowrap;max-width:none;margin:0;gap:8px}
  .stock-orders .so-catalogue-table .so-button:not(.so-product-name){min-height:40px;padding:9px 14px;font-size:12px}
  .stock-orders .so-catalogue-table .so-product-actions>.so-button{flex:1}
  .stock-orders .so-suppliers-table td[data-label=Products],.stock-orders .so-suppliers-table td[data-label="How to order"]{grid-column:1/-1}
  .stock-orders .so-supplier-product-strip{gap:10px}
  .stock-orders .so-supplier-product-tile{width:48px}
  .stock-orders .so-suppliers-table td[data-label=Actions]>.so-button{width:100%}
  .stock-orders .so-catalogue-table .so-supplier-all-products{padding:5px 0;min-height:40px}
}
/* One deliberate two-line identity, with all other desktop content kept inside a 64px row. */
.stock-orders .so-products-table{table-layout:fixed;min-width:940px}
.stock-orders .so-products-table:has(td[data-label="Source price · indicative"]){min-width:1060px}
.stock-orders .so-products-table .so-col-product{width:30%}
.stock-orders .so-products-table .so-col-pack{width:14%}
.stock-orders .so-products-table .so-col-status{width:155px}
.stock-orders .so-products-table .so-col-price{width:120px}
.stock-orders .so-products-table .so-col-actions{width:228px}
.stock-orders .so-products-table:has(td[data-label="Source price · indicative"]) .so-col-product{width:26%}
.stock-orders .so-products-table:has(td[data-label="Source price · indicative"]) .so-col-pack{width:13%}
.stock-orders .so-suppliers-table{min-width:940px}
.stock-orders .so-catalogue-table th{padding-left:12px;padding-right:12px}
.stock-orders .so-catalogue-table td{height:64px;padding-left:12px;padding-right:12px;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.stock-orders .so-catalogue-table small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:16px}
.stock-orders .so-catalogue-table .so-pill{white-space:nowrap;word-break:normal;overflow-wrap:normal;flex-shrink:0}
.stock-orders .so-product-identity{display:flex;align-items:center;gap:10px;min-width:0;height:40px}
.stock-orders .so-product-identity-text{min-width:0;flex:1}
.stock-orders .so-catalogue-table .so-product-name{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:20px}
.stock-orders .so-product-identity-text small{margin-top:3px;line-height:16px}
.stock-orders .so-product-identity>.so-product-photo-frame,.stock-orders .so-supplier-product-strip .so-product-photo-frame{width:32px;height:32px;border-radius:7px}
.stock-orders .so-product-identity .so-product-photo-missing>span:last-child,.stock-orders .so-supplier-product-strip .so-product-photo-missing>span:last-child{display:none}
.stock-orders .so-product-identity .so-product-photo-missing>span:first-child,.stock-orders .so-supplier-product-strip .so-product-photo-missing>span:first-child{font-size:16px}
.stock-orders .so-suppliers-table td:first-child>strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:20px}
.stock-orders .so-supplier-product-scope{display:flex;align-items:center;gap:10px;min-width:0;height:40px}
.stock-orders .so-supplier-product-strip{flex-wrap:nowrap;gap:6px;flex:none}
.stock-orders .so-supplier-product-tile{width:32px;height:32px;gap:0;flex:none}
.stock-orders .so-supplier-product-label{display:none}
.stock-orders .so-supplier-product-summary{min-width:0;flex:1;overflow:hidden}
.stock-orders .so-supplier-product-summary>span{display:block;font-size:12px;line-height:18px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.stock-orders .so-catalogue-table .so-supplier-all-products{display:block;min-height:20px;max-width:100%;margin:0;padding:0;line-height:20px;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left}
.stock-orders .so-supplier-ordering{max-height:38px;overflow:hidden;line-height:19px}
.stock-orders .so-supplier-ordering>div,.stock-orders .so-supplier-ordering small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(min-width:701px){
  .stock-orders .so-products-table th:first-child,.stock-orders .so-products-table td:first-child{position:sticky;left:0;z-index:1;background:var(--surface);box-shadow:1px 0 var(--line)}
  .stock-orders .so-products-table th:first-child{background:color-mix(in srgb,var(--mint) 48%,var(--surface))}
}
@media(max-width:700px){
  .stock-orders .so-products-table,.stock-orders .so-products-table:has(td[data-label="Source price · indicative"]),.stock-orders .so-suppliers-table{min-width:0;table-layout:auto}
  .stock-orders .so-products-table colgroup{display:none}
  .stock-orders .so-catalogue-table tbody td{height:auto}
  .stock-orders .so-products-table td[data-label="Purchase pack"],.stock-orders .so-products-table td[data-label=Supplier]{min-height:57px}
  .stock-orders .so-product-identity{height:40px}
  .stock-orders .so-supplier-product-scope{height:44px}
  .stock-orders .so-supplier-product-strip{gap:5px}
  .stock-orders .so-catalogue-table .so-supplier-all-products{min-height:26px;padding:3px 0;font-size:11px;line-height:20px}
  .stock-orders .so-suppliers-table td[data-label="How to order"]{min-height:56px}
}
@media(max-width:360px){.stock-orders .so-products-table td[data-label=Status]{grid-column:1/-1}}
@media print{
  body:has(.so-products-print[open]) *{visibility:hidden!important}
  body:has(.so-products-print[open]) .so-products-print,body:has(.so-products-print[open]) .so-products-print *{visibility:visible!important}
  .stock-orders .so-products-print[open]{position:absolute;inset:0;display:block;width:100%;max-width:none;max-height:none;height:auto;overflow:visible;border:0;box-shadow:none;margin:0;padding:0;color:#000;background:#fff}
  .stock-orders .so-products-print .so-print-controls{display:none!important}
  .stock-orders .so-products-print::backdrop{display:none}
  .stock-orders .so-products-paper{font:9pt/1.4 Arial,sans-serif;color:#000}
  .stock-orders .so-products-paper thead{display:table-header-group}
  .stock-orders .so-products-paper tr{break-inside:avoid}
  body:has(.so-supplier-print[open]) *{visibility:hidden!important}
  body:has(.so-supplier-print[open]) .so-supplier-print,body:has(.so-supplier-print[open]) .so-supplier-print *{visibility:visible!important}
  .stock-orders .so-supplier-print[open]{position:absolute;inset:0;display:block;width:100%;max-width:none;max-height:none;height:auto;overflow:visible;border:0;box-shadow:none;margin:0;padding:0;color:#000;background:#fff}
  .stock-orders .so-supplier-print .so-print-controls{display:none!important}
  .stock-orders .so-supplier-print::backdrop{display:none}
  .stock-orders .so-supplier-print pre{font-size:11pt;line-height:1.5;white-space:pre-wrap}
}

/* Product photos keep the same compact frame; the viewer and uploader use the full image. */
.stock-orders .so-product-photo-button{display:flex;flex:none;width:32px;height:32px;padding:0;border:0;border-radius:7px;background:none;cursor:zoom-in}
.stock-orders .so-product-photo-button .so-product-photo-frame{width:32px;height:32px;border-radius:7px}
.stock-orders .so-product-photo-button:hover,.stock-orders .so-product-photo-button:focus-visible{outline:2px solid var(--green);outline-offset:2px}
.stock-orders .so-photo-viewer{width:min(720px,calc(100vw - 32px));max-width:720px;box-sizing:border-box}
.stock-orders .so-photo-viewer h2{overflow-wrap:anywhere}
.stock-orders .so-photo-viewer .so-product-photo-frame.large{height:min(62vh,520px);width:100%;border-color:var(--edge)}
.stock-orders .so-photo-upload{max-width:650px}
.stock-orders .so-photo-upload .so-product-photo-frame.large{height:260px;max-width:420px}
.stock-orders .so-photo-upload-form{display:grid;gap:16px;margin-top:20px}
.stock-orders .so-photo-upload-form input[type=file]{max-width:100%;box-sizing:border-box}
.stock-orders .so-photo-upload{padding:20px;box-sizing:border-box}
.stock-orders .so-product-photo-button{min-height:0}
.stock-orders .so-photo-dropzone{display:grid;gap:8px;padding:24px;border:2px dashed var(--edge);border-radius:14px;background:var(--subtle);transition:border-color .15s,background .15s}
.stock-orders .so-photo-dropzone p{margin:0}
.stock-orders .so-photo-dropzone.drag-over{border-color:var(--green);background:var(--green-soft,var(--mint))}
.stock-orders .so-photo-dropzone:focus-within{border-color:var(--green)}
.stock-orders .so-photo-new-preview{padding:16px;border:1px solid var(--line);border-radius:12px;background:#fff}
.stock-orders .so-photo-new-preview[hidden]{display:none}
.stock-orders .so-photo-new-preview h3{margin:0 0 12px;font-size:14px}
.stock-orders .so-photo-new-preview img{display:block;width:100%;height:280px;object-fit:contain}
@media(max-width:700px){.stock-orders .so-photo-dropzone{padding:16px}.stock-orders .so-photo-new-preview img{height:220px}}

/* Supplier account cards keep store scope and the secure sign-in prerequisite visible. */
.stock-orders .so-connections-intro{padding:18px 20px;border:1px solid var(--edge);border-radius:var(--radius-lg);background:color-mix(in srgb,var(--mint) 35%,var(--surface))}
.stock-orders .so-connections-intro>strong{display:block;font-size:15px;color:var(--green)}
.stock-orders .so-connections-intro p{margin:6px 0 0;max-width:85ch;line-height:1.6}
.stock-orders .so-connection-filters{display:grid;grid-template-columns:minmax(220px,2fr) minmax(180px,1fr);gap:16px}
.stock-orders .so-connection-filters .so-field{max-width:none}
.stock-orders .so-connections-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:24px 0 16px}
.stock-orders .so-connections-heading h2{font-size:20px;line-height:1.35;margin:0}
.stock-orders .so-connections-heading>.so-button{flex:none;min-height:42px}
.stock-orders .so-connection-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,280px),1fr));align-items:stretch;gap:16px}
.stock-orders .so-connection-card{display:flex;flex-direction:column;min-width:0;padding:22px;border:1px solid var(--edge);border-radius:var(--radius-lg);background:var(--surface);box-shadow:var(--shadow-card);overflow-wrap:anywhere}
.stock-orders .so-connection-card.is-unavailable{background:#f1f2f1;border-color:#d6dad6;box-shadow:none;color:#505850}
.stock-orders .so-connection-card.is-unavailable .so-connection-mark{background:#e1e5e1;border-color:#ccd2cc;color:#536053}
.stock-orders .so-connection-card.is-unavailable h3{color:#505850}
.stock-orders .so-connection-card.is-unavailable .so-connection-account{background:#e8ebe8;border-color:#d2d8d2}
.stock-orders .so-connection-card.is-unavailable .so-connection-site,.stock-orders .so-connection-card.is-unavailable .so-connection-open{color:#596359}
.stock-orders .so-connection-card.is-unavailable .so-connection-type,.stock-orders .so-connection-card.is-unavailable .so-connection-status,.stock-orders .so-connection-card.is-unavailable .so-connection-details dt,.stock-orders .so-connection-card.is-unavailable .so-connection-required{color:#596359}
.stock-orders .so-connection-card[hidden],.stock-orders .so-connection-cards[hidden]{display:none!important}
.stock-orders .so-connection-card-head{display:flex;align-items:flex-start;gap:12px;min-width:0}
.stock-orders .so-connection-card-head>div{min-width:0}
.stock-orders .so-connection-mark{display:flex;align-items:center;justify-content:center;flex:none;width:42px;height:42px;border:1px solid color-mix(in srgb,var(--green) 15%,var(--edge));border-radius:12px;background:var(--mint);color:var(--green);font-size:13px;font-weight:750;letter-spacing:.025em}
.stock-orders .so-connection-type{display:block;font-size:10px;line-height:1.5;color:var(--muted);font-weight:650;letter-spacing:.05em;text-transform:uppercase}
.stock-orders .so-connection-card h3{margin:3px 0 0;font-size:17px;line-height:1.35;color:var(--ink)}
.stock-orders .so-connection-websites{margin:16px 0 0;min-height:38px}
.stock-orders .so-connection-site{color:var(--green);font-size:12px;line-height:1.55;font-weight:550}
.stock-orders .so-connection-site+.so-connection-site{margin-top:6px}
.stock-orders .so-connection-site.is-missing{color:var(--muted)}
.stock-orders .so-connection-site small{display:block;font-size:11px;font-weight:400;margin-top:3px}
.stock-orders .so-connection-details{margin:14px 0 18px}
.stock-orders .so-connection-details>div{display:flex;align-items:baseline;justify-content:space-between;gap:12px;font-size:12px;line-height:1.5}
.stock-orders .so-connection-details dt{color:var(--muted);flex:none}
.stock-orders .so-connection-details dd{margin:0;text-align:right;font-weight:600}
.stock-orders .so-connection-account{margin-top:auto;padding:14px;border:1px solid var(--line);border-radius:10px;background:var(--subtle)}
.stock-orders .so-connection-account-head{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:6px 10px;margin-bottom:12px;font-size:12px;line-height:1.5}
.stock-orders .so-connection-account-head>span:first-child{font-weight:650}
.stock-orders .so-connection-status{display:inline-flex;gap:6px;align-items:baseline;color:var(--muted);font-size:11px;line-height:1.5}
.stock-orders .so-connection-status::before{content:'';width:6px;height:6px;flex:none;background:currentColor;border-radius:50%;opacity:.6}
.stock-orders .so-connection-connect{width:100%;min-height:40px;justify-content:center}
.stock-orders .so-connection-connect:disabled{background:var(--surface);color:var(--muted);border-color:var(--edge);opacity:1;cursor:not-allowed;box-shadow:none}
.stock-orders .so-connection-required{display:block;margin-top:8px;color:var(--muted);font-size:11px;line-height:1.5;text-align:center}
.stock-orders .so-connection-actions{display:flex;gap:8px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-top:14px}
.stock-orders .so-connection-actions .so-button{min-height:38px;padding:8px 10px;font-size:12px;line-height:1.4}
.stock-orders .so-connection-open{color:var(--green);text-align:center}
.stock-orders .so-connection-open:hover{background:var(--mint)}
.stock-orders .so-supplier-vm-dialog .so-supplier-vm-progress{display:block;width:100%;height:6px;margin:0 0 16px;appearance:none;-webkit-appearance:none;accent-color:var(--green);background:#e2ebe2;border:0;border-radius:999px;overflow:hidden}
.stock-orders .so-supplier-vm-dialog .so-supplier-vm-progress:not([value]){background-image:linear-gradient(var(--green),var(--green)),linear-gradient(#e2ebe2,#e2ebe2);background-size:32% 100%,100% 100%;background-repeat:no-repeat;animation:so-supplier-vm-loading 1.3s ease-in-out infinite}
.stock-orders .so-supplier-vm-dialog .so-supplier-vm-progress::-webkit-progress-bar{background:transparent}
.stock-orders .so-supplier-vm-dialog .so-supplier-vm-progress::-webkit-progress-value{background:transparent}
.stock-orders .so-supplier-vm-dialog .so-supplier-vm-progress::-moz-progress-bar{background:transparent}
.stock-orders .so-supplier-vm-dialog .so-supplier-vm-progress[hidden]{display:none}
@keyframes so-supplier-vm-loading{from{background-position:-50% 0,0 0}to{background-position:150% 0,0 0}}
@media(prefers-reduced-motion:reduce){.stock-orders .so-supplier-vm-dialog .so-supplier-vm-progress:not([value]){animation:none;background-image:repeating-linear-gradient(135deg,var(--green) 0 6px,#e2ebe2 6px 12px);background-size:100% 100%;background-position:0 0}}
.stock-orders .so-supplier-vm-dialog .so-supplier-vm-screen{height:min(60dvh,720px);min-height:240px;border:1px solid var(--edge);border-radius:var(--radius-lg);overflow:hidden;box-sizing:border-box}
.stock-orders .so-supplier-vm-dialog .so-supplier-vm-footer{margin-top:24px;gap:12px}
@media(max-width:700px){
  .stock-orders .so-connections-intro{padding:16px}
  .stock-orders .so-connection-filters{grid-template-columns:minmax(0,1fr);gap:12px}
  .stock-orders .so-connections-heading{align-items:flex-start;gap:12px}
  .stock-orders .so-connections-heading h2{font-size:18px}
  .stock-orders .so-connections-heading>.so-button{min-height:40px;padding:8px 12px;font-size:12px}
  .stock-orders .so-connection-card{padding:18px}
  .stock-orders .so-connection-actions .so-button{min-height:40px}
  .stock-orders .so-supplier-vm-dialog .so-supplier-vm-screen{height:min(48dvh,560px);min-height:180px}
  .stock-orders .so-supplier-vm-dialog .so-supplier-vm-footer{margin-top:20px}
}
