.spv-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:12px 0}.spv-toolbar select{width:auto;max-width:340px}.spv-toolbar button,.spv-toolbar select{font-size:14px;padding:8px 12px}.spv-page .is-active{background:#00e83d;color:#05230e;box-shadow:0 0 8px #00e83d77}.spv-matrix{border-collapse:collapse}.spv-matrix th,.spv-matrix td{border-right:1px solid #bfc5bf;min-width:120px;padding:6px}.spv-matrix tr:nth-child(even){background:#e5e7e3}.spv-matrix th:first-child{min-width:220px;text-align:left}.spv-matrix input{width:100%;min-width:80px;text-align:right;background:transparent!important;color:#17281b!important;border:1px solid transparent!important;padding:5px!important}.spv-matrix input:disabled{opacity:1}.spv-matrix input:focus{background:white!important;border-color:#00ba36!important;outline:2px solid #00ba36}.spv-tooltip{position:fixed;background:black;color:#00ff41;padding:6px 12px;z-index:6000;pointer-events:none;border-radius:7px}.spv-tooltip[hidden]{display:none}.spv-badge{display:inline-flex;background:#e63738;color:white;border-radius:100px;min-width:23px;height:23px;align-items:center;justify-content:center;margin-left:7px;font:700 13px Arial}.spv-badge[hidden]{display:none}.spv-calendar{max-width:480px!important}.spv-calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;text-align:center}.spv-calendar-grid button{padding:8px;color:inherit;background:transparent;border:1px solid #555;border-radius:5px}.spv-calendar-grid .spv-orange{color:#ff982e;font-weight:800}.spv-calendar-grid .spv-blue{color:#40c4ff;font-weight:800}.spv-calendar input{width:85px}.spv-page .stock-scroll{max-height:65vh}
/* SPV>SAT viewport and folder tabs */
#portal-workspace:has(>.spv-page){display:flex;flex-direction:column;min-height:0;overflow:hidden;padding:12px 16px}
#portal-workspace>.spv-page{--spv-surface:#f1ead9;display:flex;flex:1;flex-direction:column;min-height:0;overflow:hidden;padding:0}
.spv-page>h1{flex:none;margin:0 0 12px;font-size:26px}
.spv-tabs{display:flex;flex:none;gap:2px;overflow-x:auto;overflow-y:hidden;align-items:flex-end;padding-top:3px;min-height:46px}
.spv-tabs button.portal-action{position:relative;flex:none;background:#253cbb;color:white;border:0;border-top:3px solid transparent;border-radius:9px 18px 0 0;clip-path:polygon(0 0,calc(100% - 20px) 0,100% 100%,0 100%);padding:11px 29px 11px 15px;white-space:nowrap;font:600 14px Arial;box-shadow:none;margin:0}
.spv-tabs button.portal-action.is-active{background:var(--spv-surface);color:#172a1b;border-top-color:#00cf41;box-shadow:none}
.spv-tabs button:focus-visible{outline:2px solid #00cf41;outline-offset:-5px}
.spv-content{display:flex;flex:1;flex-direction:column;min-height:0;overflow:hidden;background:var(--spv-surface)}
.spv-content>.spv-toolbar{flex:none;max-height:28vh;overflow:auto;margin:8px 0}
.spv-content>p{flex:none;margin:4px 0 8px}
.spv-toolbar select,.spv-calendar select{background:#fff!important;color:#18251e!important;border:1px solid #b9c4bd!important;border-radius:7px}
.spv-toolbar select:disabled{background:#fff!important;opacity:.7}
.spv-matrix-host{display:flex;flex:1;flex-direction:column;min-height:0;overflow:hidden}
.spv-page .stock-scroll{flex:1;min-height:0;max-height:none;overflow:auto;margin:0;isolation:isolate}
.spv-matrix{border-collapse:separate;border-spacing:0}
.spv-matrix tbody tr{--spv-row:#f1ead9}
.spv-matrix tbody tr:nth-child(even){--spv-row:#e5e7e3}
.spv-matrix tbody tr>th:first-child{position:sticky;left:0;z-index:3;background:var(--spv-row);box-shadow:2px 0 3px #0002}
.spv-matrix tbody tr>th:last-child{position:sticky;right:0;z-index:3;background:var(--spv-row);box-shadow:-2px 0 3px #0002}
.spv-page .spv-matrix thead{position:sticky;top:0;z-index:5;background:#e1eadf}
.spv-page .spv-matrix thead th{background:#e1eadf}
.spv-page .spv-matrix thead th:first-child{position:sticky;left:0;z-index:6}
.spv-page .spv-matrix thead th:last-child{position:sticky;right:0;z-index:6}
.spv-page .spv-matrix tfoot{position:sticky;bottom:0;z-index:5;background:#dce7d9}
.spv-page .spv-matrix tfoot th{position:sticky;bottom:0;background:#dce7d9;border-top:2px solid #87a080}
.spv-page .spv-matrix tfoot th:first-child{left:0;z-index:6}
.spv-page .spv-matrix tfoot th:last-child{right:0;z-index:6}
.spv-approvers{max-height:50vh;overflow:auto;display:flex;flex-direction:column;gap:12px}
.spv-approvers label{display:flex;align-items:center;gap:10px}
.spv-approvers input[type=checkbox]{width:20px;height:20px;flex:none;accent-color:#00c641}
/* Constrain flex items to the viewport: sticky right edge must use the visible scroller. */
#portal-workspace>.spv-page,.spv-content,.spv-matrix-host,.spv-page .stock-scroll{min-width:0;width:100%;max-width:100%;box-sizing:border-box}
.spv-page .spv-matrix tbody th{top:auto}
.spv-page .spv-matrix tfoot th{top:auto}
.spv-page .spv-matrix td,.spv-page .spv-matrix th,.spv-page .spv-matrix input{text-align:right}
.spv-page .spv-matrix th:first-child{text-align:left}
.spv-heading{display:flex;flex:none;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px;min-width:0}
.spv-heading h1{margin:0;font-size:26px}
.spv-cost{margin-left:auto;display:flex;flex-direction:column;align-items:flex-end;background:#fff;border:1px solid #ced6cd;border-radius:14px;padding:9px 16px;box-shadow:0 3px 10px #0001}
.spv-cost[hidden]{display:none}.spv-cost span{font-size:12px;color:#536456}.spv-cost strong{font-size:21px;font-variant-numeric:tabular-nums}.spv-cost small{color:#a44020}
/* Execution layout: sizing follows content; merged cells must not use nth-child rules. */
.spv-execution{border-collapse:separate;border-spacing:0;font-size:13px;width:max-content;min-width:100%;table-layout:auto}
.spv-execution th{position:sticky;top:0;background:#e1eadf;z-index:2;white-space:pre-line;line-height:1.2;padding:8px!important}
.spv-execution tbody,.spv-execution tbody button{font-family:"Arial Narrow","Liberation Sans Narrow",Arial,sans-serif;font-stretch:condensed}
.spv-execution td{border-right:1px solid #d0d5cd;vertical-align:top;padding:7px 8px!important;max-width:190px;overflow-wrap:break-word}
.spv-execution tr:nth-child(even){background:#e5e7e3}
.spv-execution .spv-exec-number{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.spv-execution .spv-order-number{white-space:nowrap;vertical-align:middle;background:#e1eadf;border-bottom:1px solid #bcc7bd;font-weight:600}
.spv-execution small{display:block;white-space:nowrap;color:#647168;font-size:11px;margin-top:4px}
.spv-execution button.portal-action{font-size:13px;padding:5px 7px;border-radius:7px;max-width:145px;white-space:normal}
.spv-execution-totals{display:flex;gap:10px;flex:none;padding:10px 0 0;flex-wrap:wrap}
.spv-execution-total{display:grid;grid-template-columns:auto 1fr;column-gap:10px;row-gap:3px;flex:1;min-width:200px;background:#fff;border:1px solid #d4ddd6;border-radius:15px;padding:10px 14px;box-shadow:0 3px 10px #0000000d;font:13px Arial;color:#24372b}
.spv-execution-total .spv-total-icon{grid-row:1/5;align-self:center;font-size:24px}.spv-execution-total small{color:#a34d21}
.spv-execution-menu{position:fixed;z-index:10000;background:white;padding:5px;border:1px solid #ced6cd;border-radius:10px;box-shadow:0 6px 24px #0003}.spv-execution-menu button{border:0;background:white;color:#172a20;font:14px Arial;padding:8px 28px;border-radius:6px}.spv-execution-menu button:hover{background:#e1f2e8}
.spv-execution-details{max-width:1200px!important}.spv-details-fields{display:grid;grid-template-columns:max-content 1fr;gap:6px 16px;font:14px Arial}.spv-details-fields dd{margin:0}
/* Override the shared price-table minimum and constrain the two identifier columns. */
.spv-page .price-scroll table.spv-execution{min-width:0;width:max-content}
.spv-execution th:first-child,.spv-execution .spv-order-number{width:70px;min-width:70px;max-width:70px}
.spv-execution th:nth-child(2),.spv-execution .spv-order-date{width:82px;min-width:82px;max-width:82px;white-space:normal;overflow-wrap:normal}
.spv-execution .spv-delete-pending td:not(.spv-order-number){background:#ffec86!important;color:#292711}
.spv-execution-menu button{display:block;width:100%;text-align:left}.spv-execution-menu button:disabled{opacity:.45;cursor:default}
.spv-support-message{border:1px solid #536456;border-radius:10px;padding:10px;margin:10px 0}.spv-support-message p{margin:5px 0}
.spv-execution .spv-kcell-linked td:not(.spv-order-number){background:#e8dff5!important;color:#292334}.spv-execution .spv-delete-pending td:not(.spv-order-number){background:#ffec86!important}

.spv-matrix thead select{display:block;width:100%;max-width:230px;min-width:110px;font-size:12px;padding:4px;margin-top:4px;background:white;color:#182b23}

.spv-kcl-quantity{display:inline-block;border:2px solid #d52929;background:#ffdd43;color:#292000;border-radius:20px;padding:2px 7px;margin-right:7px;font-size:12px;white-space:nowrap}.spv-kcl-stage{font-size:12px;white-space:nowrap;margin-bottom:5px}

.spv-order-meta{font-size:13px;line-height:1.4;margin-left:8px;white-space:normal}
/* Scoped overrides: shared tables must not widen or center SPV identifiers. */
.spv-page .spv-status-table tr>:first-child,.spv-page .spv-status-table tr>:last-child{text-align:left!important}
.spv-page .stock-scroll .spv-execution thead th:first-child,.spv-page .stock-scroll .spv-execution td.spv-order-number{width:76px;min-width:76px;max-width:76px;text-align:left!important;box-sizing:border-box;white-space:nowrap}
.spv-page .stock-scroll .spv-execution td.spv-order-number small{white-space:normal;overflow-wrap:break-word}
