/* Product list controls share one line above the data grid. */
#products .product-list-settings {
  position:relative; display:flex; align-items:center; gap:12px; flex-wrap:wrap;
  padding:10px 14px; margin-top:12px; background:white; border:1px solid #dce5ef; border-radius:10px 10px 0 0;
}
.product-list-settings .ui-selection {margin:0; flex:1 1 auto; min-width:150px}
.product-list-settings .product-sort-panel,.product-list-settings #productVisibleColumns {margin:0; padding:0; min-width:0; border:0; background:none}
.product-list-settings summary,.product-row-tools>summary {cursor:pointer; color:#365574; font-size:13px; font-weight:600; padding:5px}
.product-sort-body,.product-column-options {border:1px solid #d4dfeb; border-radius:9px; background:white; padding:12px; box-shadow:0 8px 26px #2a456626}
.product-column-options {position:absolute; z-index:8; top:100%; right:0; width:min(540px,100%); max-height:50vh; overflow:auto}
.product-list-settings .product-sort-panel[open] {order:3; flex-basis:100%}
.product-sort-body {position:static; margin-top:6px; box-shadow:none}
.product-column-options {display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px}
.product-column-options label {display:flex; gap:7px; align-items:center; padding:4px; font-size:12px}
.product-column-options input {width:auto; margin:0}
.product-column-options button {justify-self:start}
.product-list-count {color:#6c7e95}
.product-list-settings #clearProductSorts:disabled {display:none}
.product-batch-tools {display:flex; flex-wrap:wrap; gap:6px}
#products:not(:has(#productRows .product-pick:checked)) :is(.product-batch-tools,#cancelProductPicks,.ui-selection small) {display:none}
#products .product-risk-overview-grid {display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
#productRiskOverview .product-risk-overview-grid button {display:flex;align-items:center;justify-content:space-between;flex-flow:row-reverse wrap;min-width:0;padding:10px;gap:5px;border-radius:8px}
#productRiskOverview .product-risk-overview-grid strong {font-size:19px;font-variant-numeric:tabular-nums}
#products .table-wrap:has(#productRows) {border-radius:0 0 10px 10px;margin-top:0}
#productRows td:last-child .product-row-tools {background:#fff;border:1px solid #dbe4ee;border-radius:6px;margin:0;padding:0}
.product-row-tools>div {display:grid;gap:4px;padding:4px}
#productAdvertisingStatus.ad-error {background:#fff7e9;border-left:3px solid #d99827;border-radius:4px;padding:6px 10px}
#products #syncProductCatalog:not([disabled]) {background:#2563eb;color:#fff;border-color:#2563eb}

/* Procurement has independent request and purchase scopes. */
.procurement-scopes,.logistics-follow-shortcuts {display:flex;align-items:center;flex-wrap:wrap;gap:5px}
.procurement-scopes button,.logistics-follow-shortcuts button {border:1px solid transparent;color:#4a627c;background:transparent;padding:6px 10px;border-radius:6px;font-size:13px}
.procurement-scopes [aria-pressed=true],.logistics-follow-shortcuts [aria-pressed=true] {background:#e9f2ff;color:#164f9e;border-color:#c5dafa;font-weight:700}
.procurement-request-filter {position:relative;gap:8px 12px;margin-bottom:0;border-radius:10px 10px 0 0}
@media(min-width:761px){
  .procurement-request-filter .procurement-scope-select {position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%)}
  .procurement-scope-select:focus-within {position:static;width:auto;height:auto;clip-path:none}
}
#procurement h3 {margin:18px 0 6px; font-size:16px}
#procurement .ui-table-section {margin-top:0}
#procurement .procurement-empty,#costs .cost-empty {height:auto;min-width:0;padding:20px 10px!important;text-align:center;white-space:normal}
.procurement-empty strong,.cost-empty strong,.procurement-empty small,.cost-empty small {display:block}
.procurement-empty strong,.cost-empty strong {font-size:14px;color:#3b526c}
.procurement-empty small,.cost-empty small {font-size:12px;margin:5px 0 9px}
.procurement-empty button,.cost-empty button {font-size:12px;margin:0 4px;padding:5px 12px}
.purchase-freight-preview.freight-incomplete {border-left:3px solid #d3951e;background:#fff6e3;color:#885b13;padding:10px 12px}

/* Track the route to each destination separately from the saved event history. */
#logisticsInventory {margin:6px 0 10px;border-radius:10px}
#logisticsInventory .inventory-primary {grid-template-columns:repeat(4,minmax(0,1fr))}
#logisticsInventory .inventory-primary button {display:grid;grid-template-columns:1fr auto;align-content:start;padding:10px;column-gap:8px}
#logisticsInventory .inventory-primary b {grid-column:2;grid-row:1 / 3;align-self:center}
#logisticsInventory .inventory-primary button small {font-size:11px}
#logisticsInventory .inventory-secondary {margin:6px 0}
#logisticsInventory .inventory-secondary .inventory-compact {display:flex;flex-flow:row wrap;align-items:center;gap:8px;padding:5px 10px}
#logisticsInventory .inventory-secondary .inventory-compact b {font-size:14px}
#logisticsInventory .inventory-load-status {margin:4px 0}
.logistics-follow-shortcuts {background:#fff;border:1px solid #dce5ef;border-radius:9px;padding:7px;margin-bottom:8px}
.logistics-follow-shortcuts[hidden] {display:none}
.shipment-route {list-style:none;display:flex;min-width:208px;gap:0;margin:0 0 8px;padding:0}
.shipment-route li {position:relative;flex:1;color:#75869c;text-align:center;white-space:nowrap;font-size:10px;line-height:1.3;padding-top:14px}
.shipment-route li::before {content:"";position:absolute;z-index:1;top:2px;left:calc(50% - 4px);width:8px;height:8px;border:2px solid #cfdae7;border-radius:50%;background:#fff;box-sizing:border-box}
.shipment-route li:not(:first-child)::after {content:"";position:absolute;top:5px;left:-50%;width:100%;height:2px;background:#dbe3ed}
.shipment-route li.passed::before,.shipment-route li.passed::after,.shipment-route li.current::after {background:#5089da;border-color:#5089da}
.shipment-route li.current {color:#1e5da7;font-weight:700}
.shipment-route li.current::before {background:#276acc;border-color:#276acc;outline:2px solid #d7e9ff}
.ticket-integrity summary {cursor:pointer;font-size:11px;color:#61768e}
.ticket-integrity.integrity-needed {margin-top:5px}
#logisticsRows .ticket-integrity.integrity-needed summary {color:#fff;background:#a12a20;border-radius:5px;padding:3px 7px;font-size:13px;font-weight:700}
.integrity-facts {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:4px 0;font-size:12px}
.integrity-facts dt {color:#65758b;font-size:11px}.integrity-facts dd {margin:2px 0;font-weight:600}
.ticket-integrity .integrity-facts {display:block}.ticket-integrity .integrity-facts div {display:flex;gap:7px;align-items:baseline}

/* Reference costs and actual settlement keep their source and units. */
#costsSyncOverview[data-sync-failed=true] {background:#fff5e3;border:1px solid #edcc93;color:#855510;padding:9px 12px;border-radius:8px}
#costs .cost-chain-note {border-left:3px solid #3878c8;background:#f5f9ff}
#costs .cost-chain-note>span {font-weight:700;color:#244b79}
#currentCostDialog {width:min(760px,94vw)}
.cost-source-cards {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:12px 0}
.cost-source-cards section {display:flex;flex-direction:column;align-items:flex-start;gap:5px;padding:12px;border:1px solid #d6e1ef;border-radius:8px;background:#f6f9fd}
.cost-source-cards small,.cost-source-cards span {font-size:12px;color:#596f86}
.cost-source-cards button {margin-top:auto;padding:4px 7px;font-size:12px}
.fc-primary-filters {display:contents}
.fc-row-meta {display:block;font-size:11px;color:#697b90;margin-top:4px}
.fc-intro {font-size:13px;color:#5b6d83;margin:0 0 12px}
#financeCenter .fc-summary article {border-top:3px solid #8aadc9}
#financeCenter .fc-summary article[data-metric=due_fen] {border-top-color:#dc9b3e}
#financeCenter .fc-summary article[data-metric=refund_due_fen] {border-top-color:#5087c3}
#financeCenter .fc-summary article span {display:block;margin-top:4px;font-size:12px;color:#61758c}
#financeCenter .fc-money {font-variant-numeric:tabular-nums;text-align:right}
.fc-status {display:inline-block;padding:3px 7px;border-radius:6px;background:#edf1f6;color:#43556d;font-size:12px;font-weight:600}
.fc-status[data-status=paid] {color:#167247;background:#e6f6ef}
.fc-status:is([data-status=partial],[data-status=unknown],[data-status=pending]) {color:#976314;background:#fff1d9}
.fc-status:is([data-status=unpaid],[data-status=refund_due]) {color:#9b4440;background:#fff0ea}
#financeCenterDialog.fc-drawer[open] {position:fixed;inset:0 0 0 auto;margin:0;width:min(590px,96vw);height:100dvh;max-height:100dvh;border:0;border-left:1px solid #d3dfeb;border-radius:12px 0 0 12px;box-sizing:border-box}
.fc-drawer .fc-dialog-head {position:sticky;top:-20px;background:white;padding:12px 0;border-bottom:1px solid #dce5ef}
.fc-drawer .fc-kv {display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:760px){
  #products .product-risk-overview-grid {grid-template-columns:repeat(3,minmax(0,1fr))}
  .procurement-scopes {display:none}
  .product-list-settings .ui-selection {flex-basis:100%}
  .cost-source-cards {grid-template-columns:1fr}
  #logisticsInventory .inventory-primary {grid-template-columns:repeat(2,minmax(0,1fr))}
  #logisticsInventory .inventory-primary button {display:flex;gap:3px;padding:8px}
  #logisticsInventory .inventory-primary b {align-self:flex-start}
  .shipment-route {min-width:0}
  #financeCenter .fc-heading [role=tablist] {gap:8px;flex-wrap:wrap}
  #financeCenter .fc-heading [role=tab] {font-size:13px}
  .fc-drawer .fc-dialog-head {top:-12px}
}
