/* Shared compact source grid. Specification and realization keep their own styles. */
body.selection-ui-mode #systemsContainer table.grid{table-layout:fixed;width:100%;font-size:11px}
body.selection-ui-mode #systemsContainer thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
body.selection-ui-mode:not(.quote-table-mode):not(.selection-custom-width) .floating-table-header{display:none!important}
body.selection-ui-mode #systemsContainer .system-id,body.selection-ui-mode #systemsContainer .sec-id{display:none}
body.selection-ui-mode #systemsContainer .system-card{margin-bottom:12px;border-radius:9px;scroll-margin-top:104px}
body.selection-ui-mode #systemsContainer .system-header{padding:7px 10px;min-height:36px;background:rgba(120,107,180,.18)}
body.selection-ui-mode #systemsContainer .system-title{gap:7px;min-width:0;font-size:12px}
body.selection-ui-mode #systemsContainer .system-name-input{font-size:12px!important;min-width:70px}
body.selection-ui-mode #systemsContainer .system-actions{gap:3px;flex-shrink:0}
body.selection-ui-mode #systemsContainer tr.sec-header>td{padding:3px 7px!important;background:rgba(185,149,69,.13)!important}
body.selection-ui-mode #systemsContainer tr.sub-header>td{padding:2px 7px!important;background:rgba(201,132,88,.11)!important}
body.selection-ui-mode #systemsContainer .sec-title,body.selection-ui-mode #systemsContainer .sub-title{min-height:25px;font-size:11px}
body.selection-ui-mode #systemsContainer .row-pos>td{padding:2px 3px!important;vertical-align:middle;min-width:0}
body.selection-ui-mode #systemsContainer .row-pos input:not([type=checkbox]),body.selection-ui-mode #systemsContainer .row-pos .compact-select-button{font-size:11px!important;min-height:25px;height:25px;padding:3px!important;line-height:19px}
body.selection-ui-mode #systemsContainer .row-pos input:not([type=checkbox]){background:transparent}
body.selection-ui-mode #systemsContainer .row-pos input:focus{background:var(--panel-solid);outline:1px solid var(--accent2);outline-offset:-1px}
body.selection-ui-mode #systemsContainer .row-pos:focus-within{box-shadow:inset 3px 0 var(--accent2);background-color:rgba(96,165,250,.06)}
body.selection-ui-mode #systemsContainer .row-pos:hover{background-color:rgba(96,165,250,.045)}
body.selection-ui-mode #systemsContainer .row-pos .compact-select-button{justify-content:center;gap:0;border:1px solid var(--border);background:rgba(255,255,255,.035);border-radius:5px}
body.selection-ui-mode #systemsContainer .compact-select-button>span[aria-hidden=true]{display:none}
body.selection-ui-mode #systemsContainer .row-pos [data-column-key="5"] .compact-select-button{font-size:9px!important}
body.selection-ui-mode #systemsContainer .row-pos [data-column-key="6"] .compact-select-button{font-size:12px!important}
body.selection-ui-mode #systemsContainer .addr-cell{font-size:9px;white-space:nowrap}
body.selection-ui-mode #systemsContainer [data-selection-check]{display:inline-block!important;width:13px!important;min-width:13px!important;height:13px;accent-color:var(--accent);vertical-align:middle;margin:0 2px 0 0;cursor:pointer}
body.selection-ui-mode #systemsContainer .addr-cell .drag-handle{display:inline-block!important}
body.selection-ui-mode #systemsContainer .addr-cell .drag-handle{font-size:12px;margin:0;opacity:.55}
body.selection-ui-mode #systemsContainer .st-icon-only{width:25px;height:25px;min-width:25px;padding:0!important;display:inline-flex;align-items:center;justify-content:center;border-radius:5px}
body.selection-ui-mode #systemsContainer [hidden]{display:none!important}
body.selection-ui-mode #systemsContainer .position-deadline-actions{display:flex;align-items:center;gap:2px}
body.selection-ui-mode #systemsContainer .row-actions{display:flex;gap:1px;flex:none;opacity:.55}
body.selection-ui-mode #systemsContainer .row-pos:hover .row-actions,body.selection-ui-mode #systemsContainer .row-pos:focus-within .row-actions{opacity:1}
body.selection-ui-mode #systemsContainer .row-actions button{width:19px;min-width:19px;height:24px;margin:0;padding:0;font-size:12px}
body.selection-ui-mode #systemsContainer .row-actions .realization-highlight-marker svg{width:13px;height:13px}
.st-delivery{display:flex;align-items:center;flex-wrap:wrap;gap:2px;min-width:0;flex:1}
body.selection-ui-mode #systemsContainer .st-delivery-days{min-width:0;width:38px!important;flex:1;text-align:right}
.st-day-type{font-size:10px!important;width:25px!important;padding:0;border:1px solid var(--border)!important;background:rgba(255,255,255,.035)!important}
.st-legacy-date{font:inherit!important;font-size:8px!important;width:100%!important;height:12px!important;color:var(--muted)!important;padding:0!important}
body.selection-ui-mode #systemsContainer .price-mode-button{font-size:8px;padding:0 1px;max-width:37px;white-space:normal;line-height:1.1}
@media(max-width:1100px){body.selection-ui-mode #systemsContainer .price-mode-button{max-width:24px}}
body.selection-ui-mode #systemsContainer .position-quantity-stack{gap:0}
body.quote-table-mode #systemsContainer .position-quantity-stack .allocation-status{margin-top:0;line-height:11px}
body.selection-ui-mode #systemsContainer .system-footer-actions{padding:3px 8px}
body.selection-ui-mode #rowSelectionBar{padding:4px 8px;min-height:27px;gap:8px;font-size:10px}
body.selection-ui-mode #rowSelectionBar .row-selection-hint{display:none}
.st-bulk-icon{display:none}
body.selection-ui-mode #rowSelectionBar button{font-size:0;padding:0;width:26px;height:26px;justify-content:center}
body.selection-ui-mode #rowSelectionBar .st-bulk-icon{display:inline;font-size:13px}
body.selection-ui-mode .topbar-user .app-search-button span,body.selection-ui-mode .topbar-user .exit-label{display:none}
body.selection-ui-mode #tableModeButton{display:none!important}
body.selection-ui-mode #totalsBar{display:none!important}
body.selection-ui-mode #topTotalsBar{padding:7px 12px;margin:4px 0 9px;gap:14px;border-radius:8px;box-shadow:none}
body.selection-ui-mode #topTotalsBar .total-box{display:flex;align-items:baseline;gap:8px;padding:2px 8px;min-width:0;background:transparent!important;border-left-width:2px}
body.selection-ui-mode #topTotalsBar .label{font-size:8px;margin:0;white-space:nowrap}
body.selection-ui-mode #topTotalsBar .value{font-size:13px;white-space:nowrap}
body.selection-ui-mode #addSystemBtnWrap{margin:7px 0!important}
body.selection-ui-mode #addSystemBtnWrap .st-icon-only{width:31px;height:29px;min-width:31px;padding:0;justify-content:center}
body.selection-ui-mode.selection-comfortable #systemsContainer .row-pos>td{padding-top:6px!important;padding-bottom:6px!important}
.st-extra-actions,.st-tools{display:flex;align-items:center;gap:3px;flex-wrap:wrap}.st-extra-actions[hidden]{display:none}
.st-expanded-text{display:none}
body.selection-ui-mode.selection-full-text #systemsContainer [data-st-text],body.selection-ui-mode #systemsContainer td.column-wrap [data-st-text]{display:none!important}
body.selection-ui-mode.selection-full-text #systemsContainer .st-expanded-text,body.selection-ui-mode #systemsContainer td.column-wrap .st-expanded-text{display:block;flex:1;min-width:0;width:100%;height:auto;padding:5px 3px;text-align:left;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--text);background:transparent;border:0;font:inherit;line-height:1.45;cursor:text}
body.selection-ui-mode:not(.selection-full-text) #systemsContainer td.column-wrap .st-expanded-text{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;padding-block:0;margin-block:5px}
body.quote-table-mode:not(.selection-full-text) #systemsContainer td.column-wrap .selection-name-field .st-expanded-text{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;height:25px;line-height:25px;padding:0 3px;margin:0}
body.selection-ui-mode #systemsContainer .st-expanded-text:focus-visible{outline:1px solid var(--accent2);border-radius:3px}
.st-icon{display:inline-flex;align-items:center;justify-content:center;width:29px;height:29px;flex:none;padding:0;border:1px solid transparent;border-radius:6px;background:transparent;color:var(--muted);cursor:pointer}
.st-icon:hover,.st-icon[aria-pressed=true]{color:var(--text);border-color:var(--border);background:var(--hover-color)}
.st-icon:disabled{opacity:.4;cursor:default}.st-icon:focus-visible{outline:2px solid var(--accent2);outline-offset:1px}
.st-text-popover{position:fixed;z-index:22500;width:min(450px,calc(100vw - 16px));max-height:calc(100vh - 24px);overflow:auto;border:1px solid var(--muted);border-radius:10px;background:var(--panel-solid);color:var(--text);padding:12px;box-shadow:0 12px 38px #0008;font-size:12px}
.st-text-popover header{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.st-text-popover footer{display:flex;justify-content:flex-end;gap:4px;margin-top:8px}.st-text-popover [hidden]{display:none!important}
.st-full-text{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6;max-height:40vh;overflow:auto;user-select:text}
.st-text-popover textarea{width:100%;height:150px;min-height:75px;background:var(--bg);color:var(--text);border:1px solid var(--border);border-radius:6px;padding:9px;resize:vertical;line-height:1.5}
.st-text-popover input{background:var(--bg);color:var(--text);border:1px solid var(--border);padding:7px;border-radius:6px;color-scheme:dark}
.st-text-popover p{font-size:11px;color:var(--muted);margin:8px 0}.st-editor-error{color:var(--danger);font-size:11px;margin-top:5px}
.st-jump-highlight{outline:2px solid var(--accent2);outline-offset:2px}.st-help{max-width:440px!important}.st-help dl{display:grid;grid-template-columns:155px 1fr;gap:12px;font-size:12px}.st-help dt{font-weight:500;color:var(--accent2)}.st-help dd{margin:0}
@media(hover:none){body.selection-ui-mode #systemsContainer .row-actions{opacity:1}}
@media(min-width:901px){body.selection-ui-mode #systemsContainer .system-card:not(.agent-supplier-system) .system-header{flex-wrap:nowrap;align-items:center}body.selection-ui-mode #systemsContainer .system-card:not(.agent-supplier-system) .system-title{flex:1 1 auto;flex-wrap:nowrap}body.selection-ui-mode #systemsContainer .system-card:not(.agent-supplier-system) .system-actions{flex:0 0 auto}}
@media(max-width:900px){body.selection-ui-mode #systemsContainer table.grid{min-width:880px!important}body.quote-table-mode #systemsContainer table.grid{min-width:1100px!important}body.selection-ui-mode #systemsContainer .grid-wrap{overflow-x:auto}.st-help dl{grid-template-columns:1fr;gap:5px}}
@media(max-width:1100px){body.selection-ui-mode #topTotalsBar{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}body.selection-ui-mode #topTotalsBar .label{font-size:9px}}
@media(max-width:540px){body.selection-ui-mode #topTotalsBar .total-box{flex-direction:column;align-items:flex-start;gap:3px}body.selection-ui-mode #topTotalsBar .value{max-width:100%;white-space:normal;overflow-wrap:anywhere}}

/* Structure is expressed with spacing and rules as well as muted colour. */
body.selection-ui-mode #systemsContainer .system-header{border-bottom:2px solid rgba(167,139,250,.38);gap:8px}
body.selection-ui-mode #systemsContainer tr.sec-header>td{border-top:2px solid rgba(234,179,8,.25)!important;padding-block:5px!important}
body.selection-ui-mode #systemsContainer tr.sub-header>td{border-top:1px solid rgba(251,146,60,.25)!important;padding-left:20px!important}
body.selection-ui-mode #systemsContainer .sec-title{font-weight:650}
body.selection-ui-mode #systemsContainer .sub-title{font-weight:500}
body.selection-ui-mode #systemsContainer .st-row-number{font-variant-numeric:tabular-nums;font-size:10px;display:inline-block;white-space:nowrap}
body.selection-ui-mode #systemsContainer .addr-cell{overflow:visible!important;text-overflow:clip;padding-inline:5px!important}
body.selection-ui-mode #systemsContainer .grid-wrap{overflow-x:auto}
body.selection-ui-mode #systemsContainer .st-text-action,body.selection-ui-mode #addSystemBtnWrap .st-text-action,.st-tools .st-text-action{display:inline-flex;align-items:center;justify-content:center;gap:5px;width:auto;min-width:0;min-height:27px;height:auto;padding:4px 7px!important;font-size:10px;white-space:normal}
body.selection-ui-mode #systemsContainer .st-delete-action{color:#fb7185}
body.selection-ui-mode #systemsContainer .system-actions{flex-wrap:wrap}
body.selection-ui-mode #systemsContainer .system-header{flex-wrap:wrap}
body.selection-ui-mode #systemsContainer .system-title{flex:1 1 250px}
body.selection-ui-mode #rowSelectionBar button{font-size:10px;width:auto;gap:5px;padding:3px 7px}
body.quote-table-mode #systemsContainer [data-column-key="6"] .compact-select-button{font-size:9px!important}
body.quote-table-mode #systemsContainer .calc-cell{font-variant-numeric:tabular-nums;font-size:10px;white-space:normal;overflow-wrap:normal}
body.quote-table-mode #systemsContainer .markup-editor{max-width:100%}
body.quote-table-mode #systemsContainer .markup-editor input{min-width:0;width:100%}
body.selection-ui-mode #systemsContainer .system-name-input{width:100%}
@media(max-width:1100px){body.selection-ui-mode #systemsContainer .system-actions{max-width:100%}body.selection-ui-mode #systemsContainer .sec-title,body.selection-ui-mode #systemsContainer .sub-title{flex-wrap:wrap;gap:5px}}

/* Four commercial money values need an unambiguous compact header. */
body.quote-table-mode #systemsContainer thead{position:static;width:auto;height:auto;overflow:visible;clip-path:none}
body.quote-table-mode #systemsContainer thead th{font-size:9px;line-height:1.3;padding:6px 4px;white-space:normal;word-break:normal}
body.selection-ui-mode.selection-custom-width #systemsContainer thead{position:static;width:auto;height:auto;overflow:visible;clip-path:none}
body.selection-ui-mode.selection-custom-width #systemsContainer thead th{font-size:9px;line-height:1.3;padding:6px 4px;white-space:normal;word-break:normal}
