/* Warehouse workbench: readable balances, explicit units and accessible warnings. */
.stock-workspace{--stock-normal:#6ca285;--stock-orange:#c67a25;--stock-red:#c94747;--stock-unknown:#d4dcda}
.stock-visuals{display:grid;grid-template-columns:minmax(300px,.85fr) minmax(340px,1.15fr);gap:20px;margin:18px 0}
.stock-chart-title{padding:22px 25px 0}.stock-chart-title .eyebrow{font-size:10px;letter-spacing:1.5px;color:#94704e}.stock-chart-title h2{margin:7px 0;font-size:19px;color:var(--vi-oasis)}.stock-chart-title p{font-size:12px;color:#6b7a70;line-height:1.7;margin:0}
.stock-health-content{display:flex;align-items:center;gap:27px;padding:24px 25px 27px}.stock-donut{width:154px;height:154px;flex-shrink:0;border-radius:50%;background:var(--stock-conic);display:grid;place-items:center;position:relative;box-shadow:inset 0 0 0 1px #244a3005}.stock-donut>div{width:119px;height:119px;border-radius:50%;background:#fff;display:flex;flex-direction:column;justify-content:center;align-items:center}.stock-donut strong{font-size:33px;line-height:1.25;color:var(--vi-oasis);font-variant-numeric:tabular-nums}.stock-donut span{font-size:11px;color:#7d8a81;margin-top:5px}.stock-health-legend{flex:1;display:grid;gap:4px;min-width:160px}.stock-health-key{appearance:none;background:transparent;border:1px solid transparent;border-radius:7px;color:#4e6155;display:flex;justify-content:space-between;align-items:center;text-align:left;padding:8px 10px;cursor:pointer;font-family:inherit;font-size:12px;gap:20px}.stock-health-key:hover,.stock-health-key.selected{background:#f2f6f3;border-color:#d4e2d9}.stock-health-key span{display:flex;align-items:center;gap:8px;white-space:nowrap}.stock-health-key i{display:inline-block;width:8px;height:8px;background:var(--stock-normal);border-radius:2px}.stock-health-key.orange i{background:var(--stock-orange)}.stock-health-key.red i{background:var(--stock-red)}.stock-health-key.unknown i{background:var(--stock-unknown)}.stock-health-key strong{font-variant-numeric:tabular-nums;font-size:17px;color:#244a30}.stock-health-key small{font-size:10px;font-weight:400;color:#7b887e}
.stock-ranking{padding:16px 25px 22px}.stock-rank-row{display:flex;align-items:center;gap:17px;padding:10px 0;border-bottom:1px solid #edf0ee}.stock-rank-row:last-child{border:0}.stock-rank-row>div:first-child{width:48%;min-width:0;display:grid;gap:4px}.stock-rank-row strong{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#394e40}.stock-rank-row>div>span{font-size:10px;color:#7b887f;line-height:1.5}.stock-rank-row>.stock-ratio{flex:1;min-width:100px}.stock-ratio{display:flex;align-items:center;gap:9px;min-width:130px;margin-top:5px}.stock-ratio-track{height:7px;display:block;background:#e9efeb;position:relative;border-radius:3px;flex:1;overflow:hidden;min-width:60px}.stock-ratio-track i{height:100%;display:block;background:#6ca285;border-radius:3px;min-width:1px}.stock-ratio b{font-size:11px;min-width:45px;text-align:right;color:#46604f;font-variant-numeric:tabular-nums}.stock-ratio.orange .stock-ratio-track i{background:#c67a25}.stock-ratio.red .stock-ratio-track i{background:#c94747}.stock-ratio.orange b,.stock-quantity.orange{color:#a55c19}.stock-ratio.red b,.stock-quantity.red{color:#b73838}.stock-ratio.compact{margin:0}.stock-unknown{display:block;font-size:11px;color:#7d857f;margin-top:5px}.stock-chart-empty{display:flex;gap:12px;align-items:center;justify-content:center;min-height:175px;color:#7b8a80;font-size:12px;line-height:1.8}.stock-chart-empty .icon{color:#9aafa0}
.stock-alert-strip{padding:17px 21px;border:1px solid #dbe6de;border-left:3px solid #6ca285;background:#f1f7f3;display:flex;align-items:center;gap:13px;border-radius:9px;margin-bottom:21px;color:#46634e}.stock-alert-strip>div{flex:1;display:grid;gap:6px}.stock-alert-strip strong{font-size:13px}.stock-alert-strip span{font-size:11px;line-height:1.75}.stock-alert-strip.orange{background:#fff8ef;border-color:#f0debf;border-left-color:#c67a25;color:#88571e}.stock-alert-strip.red{background:#fff4f3;border-color:#edd3cf;border-left-color:#c94747;color:#9f3d36}.stock-alert-strip>.icon{align-self:flex-start;margin-top:2px;flex-shrink:0}
.stock-ledger-heading{flex-wrap:wrap;gap:13px}.stock-ledger-heading .tabs{margin:0}.stock-ledger-heading .tab{padding:10px 14px}.stock-ledger-heading .tab span{font-size:10px;margin-left:6px;opacity:.7}.stock-toolbar .search-wrap{max-width:410px;flex:1}.stock-toolbar select{min-width:190px;max-width:250px}.stock-toolbar #stock-list-count{margin-left:auto;white-space:nowrap}.stock-table td{padding-top:17px;padding-bottom:17px}.stock-table td:first-child{min-width:180px;max-width:270px;white-space:normal;overflow-wrap:anywhere}.stock-table .row-actions{white-space:nowrap;gap:7px}.stock-table .stock-quantity{font-size:18px;font-variant-numeric:tabular-nums}.stock-table .cell-sub{font-size:11px}.stock-readonly{color:#79877d;font-size:12px}.stock-rules-note{font-size:11px;line-height:1.9;color:#7a877e;margin:18px 2px 0}.stock-history-table td{font-variant-numeric:tabular-nums}.stock-history-table td:last-child{min-width:170px;max-width:260px;white-space:normal;overflow-wrap:anywhere}.stock-history-table td:nth-child(2){min-width:150px;max-width:240px;white-space:normal;overflow-wrap:anywhere}
.stock-entry-top{display:grid;grid-template-columns:1fr 1fr;gap:20px}.stock-entry-guide{display:flex;align-items:center;justify-content:center;gap:20px;background:#f2f7f3;border:1px solid #dce8df;border-radius:8px;padding:13px;font-size:12px;color:#4b6c55}.stock-entry-guide>span{color:#9aaf9e}.stock-entry-scroll{max-height:43vh;border:1px solid #e0e8e2;border-radius:8px}.stock-entry-table thead{position:sticky;top:0;z-index:1}.stock-entry-table th{font-size:11px;white-space:nowrap;background:#f2f6f3;padding:13px 10px}.stock-entry-table td{padding:11px 10px}.stock-entry-table td:first-child{min-width:165px;max-width:240px;white-space:normal;overflow-wrap:anywhere}.stock-entry-table td:last-child{min-width:170px}.stock-entry-table td:nth-child(2),.stock-entry-table td:nth-child(6){min-width:75px;font-variant-numeric:tabular-nums}.stock-entry-table input{min-width:76px;width:100%;max-width:105px;min-height:40px;padding:7px 8px;font-size:13px}.stock-entry-table td:last-child input{max-width:none}.stock-entry-table tr[hidden]{display:none}.stock-entry-table input:disabled{background:#f1f3f2;color:#9aa39d;cursor:not-allowed}.stock-row-hint{font-size:11px;color:#a36627;line-height:1.7;margin-top:5px}.stock-draft-summary{margin:0;padding:11px 13px;background:#f8f5ef;border:1px solid #eadfce;border-radius:7px;color:#816b4f;font-size:12px}.stock-negative{color:#c94747!important}.stock-count-item{display:grid;gap:9px;border:1px solid #d8e6dc;border-radius:8px;background:#f4f8f5;padding:18px}.stock-count-item strong{color:#244a30;font-size:17px}.stock-count-item span{color:#6d7e72;font-size:12px}.stock-review-intro{display:flex;gap:12px;align-items:center;padding:15px 17px;background:#f1f7f3;border-radius:8px;margin-bottom:18px;color:#41664a}.stock-review-intro>div{display:grid;gap:5px}.stock-review-intro strong{font-size:13px}.stock-review-intro span{font-size:11px;line-height:1.8}.stock-review-table{margin-bottom:20px}.stock-review-table td{line-height:1.9;white-space:normal;min-width:100px}.stock-review-table td:first-child{min-width:150px}.stock-review-table td:last-child strong{font-size:20px;color:#244a30;font-variant-numeric:tabular-nums}
.stock-health-key:focus-visible{outline:2px solid #6ca285;outline-offset:2px}
@media(min-width:1600px){.stock-visuals{grid-template-columns:minmax(420px,.9fr) minmax(420px,1.1fr)}.stock-health-content{gap:40px}.stock-donut{width:170px;height:170px}.stock-donut>div{width:131px;height:131px}}
@media(max-width:1100px){.stock-visuals{grid-template-columns:1fr 1fr;gap:14px}.stock-health-content{padding:22px 18px;gap:14px}.stock-donut{width:123px;height:123px}.stock-donut>div{width:95px;height:95px}.stock-donut strong{font-size:27px}.stock-health-legend{min-width:130px}.stock-health-key{padding:7px 5px;gap:8px}.stock-chart-title{padding:21px 20px 0}.stock-ranking{padding:12px 20px 20px}.stock-rank-row>div:first-child{width:47%}.stock-entry-scroll{max-height:42vh}}
@media(max-width:850px){.stock-visuals{grid-template-columns:1fr}.stock-health-content{justify-content:center;gap:35px;padding:24px}.stock-health-legend{max-width:300px}.stock-donut{width:145px;height:145px}.stock-donut>div{width:111px;height:111px}.stock-alert-strip{align-items:flex-start;flex-wrap:wrap}.stock-alert-strip>div{min-width:calc(100% - 40px)}.stock-alert-strip>.button{margin-left:33px}.stock-toolbar{flex-wrap:wrap;gap:10px}.stock-toolbar .search-wrap{max-width:none;min-width:100%}.stock-toolbar select{flex:1;max-width:none}.stock-entry-top{gap:12px}.stock-entry-guide{gap:10px}.stock-entry-scroll{max-height:47vh}}
@media(max-width:600px){.stock-workspace>.tabs-bar{align-items:stretch;gap:15px}.stock-workspace>.tabs-bar>.row-actions{display:flex;gap:9px}.stock-workspace>.tabs-bar>.row-actions>.button{flex:1;justify-content:center;padding:10px 12px;font-size:12px}.stock-visuals{margin-top:16px;gap:15px}.stock-chart-title h2{font-size:18px}.stock-chart-title p{font-size:11px}.stock-health-content{gap:20px;padding:23px 18px}.stock-donut{width:123px;height:123px}.stock-donut>div{width:94px;height:94px}.stock-health-key{font-size:12px}.stock-chart-title,.stock-ranking{padding-left:18px;padding-right:18px}.stock-rank-row{gap:12px}.stock-rank-row>div:first-child{width:50%}.stock-rank-row>.stock-ratio{min-width:100px}.stock-table thead{display:none}.stock-table,.stock-table tbody,.stock-table tr,.stock-table td{display:block}.stock-table tr{padding:12px 18px;border-top:1px solid #e2e9e4}.stock-table td{border:0!important;white-space:normal!important;padding:6px 0!important;min-width:0!important;max-width:none!important}.stock-table td:before{content:attr(data-label);font-size:10px;line-height:1.9;color:#7d8d81;display:block}.stock-table td[colspan]:before{display:none}.stock-table .stock-ratio{max-width:260px}.stock-table .row-actions{padding-top:5px;flex-wrap:wrap}.stock-ledger-heading .tabs{width:100%}.stock-toolbar select{min-width:0;width:68%;font-size:12px}.stock-entry-top{grid-template-columns:1fr}.stock-entry-guide{justify-content:space-between;gap:5px;font-size:10px;padding:12px 8px}.stock-entry-table td:first-child{min-width:150px}.stock-entry-scroll{max-height:43vh}.stock-rules-note{font-size:10px}.stock-review-table td{font-size:12px}.stock-alert-strip{padding:15px}.stock-alert-strip strong{font-size:12px}.stock-alert-strip span{font-size:10px}}
@media(prefers-reduced-motion:reduce){.stock-workspace *{scroll-behavior:auto}}

/* Finished-rice cards follow the available work area, including a collapsed sidebar. */
.stock-sku-results {
  container: stock-skus / inline-size;
  padding: 0 14px 14px;
}
.stock-sku-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@supports (container-type: inline-size) {
  .stock-sku-grid { grid-template-columns: minmax(0, 1fr); }
  @container stock-skus (min-width: 290px) {
    .stock-sku-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @container stock-skus (min-width: 490px) {
    .stock-sku-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  }
  @container stock-skus (min-width: 670px) {
    .stock-sku-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  }
  @container stock-skus (min-width: 840px) {
    .stock-sku-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  }
  @container stock-skus (min-width: 1020px) {
    .stock-sku-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  }
}
.stock-sku-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--ws-line, #dce6de);
  border-radius: 9px;
  background: var(--ws-surface, #fff);
  color: var(--ws-ink, #252d27);
  overflow-wrap: anywhere;
}
.stock-sku-media {
  position: relative;
  display: grid;
  place-items: center;
  height: 74px;
  border-bottom: 1px solid var(--ws-line, #dce6de);
  border-radius: 8px 8px 0 0;
  background: var(--ws-soft, #f2f5f0);
  color: var(--ws-muted, #61705d);
}
.stock-sku-media > span { display: grid; justify-items: center; gap: 4px; }
.stock-sku-media .icon { width: 22px; height: 22px; }
.stock-sku-media small { font-size: 11px; }
.stock-sku-media img {
  position: absolute;
  inset: 4px 0;
  width: 100%;
  height: calc(100% - 8px);
  object-fit: contain;
  background: var(--ws-soft, #f2f5f0);
}
.stock-sku-content { flex: 1; padding: 10px; }
.stock-sku-card .stock-sku-content h3 { margin: 0 0 4px; font-size: 14px; line-height: 1.45; }
.stock-sku-card .stock-sku-content p {
  margin: 0;
  color: var(--ws-muted, #61705d);
  font-size: 12px;
  line-height: 1.5;
}
.stock-sku-identity span { font-size: 10px; letter-spacing: .03em; }
.stock-sku-card .stock-sku-content .stock-sku-spec { margin-top: 2px; }
.stock-sku-balance {
  display: grid;
  gap: 2px;
  margin: 8px 0 4px;
  padding-top: 8px;
  border-top: 1px solid var(--ws-line, #dce6de);
  font-variant-numeric: tabular-nums;
}
.stock-sku-balance > span { color: var(--ws-muted, #61705d); font-size: 11px; }
.stock-sku-balance > strong { font-size: 19px; line-height: 1.25; }
.stock-sku-balance small { color: var(--ws-muted, #61705d); font-size: 12px; font-weight: 500; }
.stock-sku-card .stock-ratio { min-width: 0; margin: 4px 0 0; }
.stock-sku-card .stock-ratio-track { min-width: 0; }
.stock-sku-card .stock-ratio b { min-width: 0; }
.stock-sku-card .stock-sku-status { margin: 6px 0 4px; white-space: normal; }
.stock-sku-card .stock-sku-oem {
  max-width: 100%;
  margin-top: 6px;
  color: var(--ws-ink, #253c30);
  background: var(--ws-soft, #f2f5f0);
  white-space: normal;
  overflow-wrap: anywhere;
}
.stock-sku-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 6px;
  border-top: 1px solid var(--ws-line, #dce6de);
}
.stock-sku-actions .button { flex: 1 1 auto; justify-content: center; padding-inline: 6px; font-size: 12px; }
.stock-sku-pickers {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.stock-sku-pickers label,
.stock-sku-pickers select {
  min-width: 0;
}
.stock-sku-pickers select {
  width: 100%;
  text-overflow: ellipsis;
}
.stock-sku-pickers .notice {
  margin: 0;
}
.stock-sku-pickers [hidden] {
  display: none;
}
body[data-theme="dark"] .stock-sku-card .stock-ratio b { color: var(--ws-ink); }
body[data-theme="dark"] .stock-sku-card .stock-quantity.orange,
body[data-theme="dark"] .stock-sku-card .stock-ratio.orange b { color: #ffd1a0; }
body[data-theme="dark"] .stock-sku-card .stock-quantity.red,
body[data-theme="dark"] .stock-sku-card .stock-ratio.red b { color: #ffc2bf; }
body[data-theme="dark"] .stock-sku-card .stock-ratio-track { background: var(--ws-line); }
@media (max-width: 600px) {
  .stock-sku-results { padding-inline: 10px; }
  .stock-sku-actions .button { min-height: 40px; }
}
