/* Inventory cards have fixed, font-aware tracks. Text never determines track height. */
.inventory-card .mobile-records .mobile-stock-card{
  --stock-name-h:calc(var(--f) * 3);
  --stock-spec-h:calc(var(--xs) * 2.8);
  --stock-header-h:calc(var(--stock-name-h) + var(--stock-spec-h) + 4px);
  --stock-body-h:calc(var(--sm) * 3.3 + var(--xs) * 1.65 + 10px);
  --stock-footer-h:max(48px,calc(var(--sm) * 1.65 + 20px));
  --stock-indent:30px;
  display:grid;grid-template-rows:var(--stock-header-h) var(--stock-body-h) var(--stock-footer-h);
  gap:12px;padding:14px;min-width:0;overflow:hidden;align-content:start;
}
:root[data-density=compact] .inventory-card .mobile-stock-card{--stock-footer-h:max(38px,calc(var(--sm) * 1.65 + 14px));gap:7px;padding-top:9px;padding-bottom:9px}
.stock-readonly .inventory-card .mobile-stock-card{--stock-indent:0px}
.inventory-card .mobile-stock-card .mobile-card-heading{display:grid;grid-template-columns:24px minmax(0,1fr);align-items:start;gap:6px;min-width:0;min-height:0;overflow:hidden}
.stock-readonly .inventory-card .mobile-stock-card .mobile-card-heading{grid-template-columns:minmax(0,1fr)}
.inventory-card .mobile-stock-card .mobile-check{height:var(--stock-name-h);min-height:0;margin:0;padding:4px 0 0;align-items:flex-start;justify-content:center}
.inventory-card .mobile-stock-card .material-label,
.inventory-card .mobile-stock-card .material-cell,
.inventory-card .mobile-stock-card .material-cell>div{min-width:0;width:100%;max-width:100%}
.inventory-card .mobile-stock-card .material-cell{display:block}
.inventory-card .mobile-stock-card .material-name,
.inventory-card .mobile-stock-card .material-spec{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;white-space:normal;overflow-wrap:anywhere;word-break:normal}
.inventory-card .mobile-stock-card .material-name{height:var(--stock-name-h);line-height:1.5}
.inventory-card .mobile-stock-card .material-spec{height:var(--stock-spec-h);max-width:none;line-height:1.4;margin-top:4px}
.inventory-card .mobile-stock-card .mobile-stock-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(80px,35%);column-gap:8px;align-items:start;min-width:0;min-height:0;margin:0;padding:0 0 0 var(--stock-indent);overflow:hidden}
.inventory-card .mobile-stock-card .mobile-stock-body>div:first-child{min-width:0;overflow:hidden}
.inventory-card .mobile-stock-card .stock-card-meta{height:calc(var(--sm) * 1.65);display:flex;align-items:center;gap:6px;min-width:0;overflow:hidden;white-space:nowrap}
.inventory-card .mobile-stock-card .category-pill{flex-shrink:0;line-height:calc(var(--sm) * 1.65)}
.inventory-card .mobile-stock-card .mobile-code{margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.inventory-card .mobile-stock-card .mobile-stock-body p,
.inventory-card .mobile-stock-card .mobile-stock-body>div>small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.65}
.inventory-card .mobile-stock-card .mobile-stock-body p{margin-top:4px;height:calc(var(--sm) * 1.65)}
.inventory-card .mobile-stock-card .mobile-stock-body>div>small{margin-top:4px;height:calc(var(--xs) * 1.65)}
.inventory-card .mobile-stock-card .mobile-stock-body p .icon{margin-right:4px}
.inventory-card .mobile-stock-card .mobile-stock-quantity{min-width:0;padding-top:0;align-self:start}
.inventory-card .mobile-stock-card .mobile-stock-quantity>small{line-height:1.65;white-space:nowrap}
.inventory-card .mobile-stock-card .mobile-stock-quantity>strong{display:flex;align-items:baseline;justify-content:flex-end;gap:4px;line-height:1.5;white-space:nowrap;overflow:hidden}
.inventory-card .mobile-stock-card .stock-quantity-value{font:inherit;min-width:0;overflow:hidden;text-overflow:ellipsis}
.inventory-card .mobile-stock-card .mobile-stock-quantity>strong.stock-quantity-long{font-size:17px;flex-direction:column;align-items:flex-end;gap:0}
.inventory-card .mobile-stock-card .stock-quantity-long>.stock-quantity-value{flex-shrink:0;max-width:100%}
.inventory-card .mobile-stock-card .mobile-stock-quantity>strong>span{margin:0;max-width:35%;overflow:hidden;text-overflow:ellipsis;flex-shrink:0}
.inventory-card .mobile-stock-card .mobile-card-footer{align-self:stretch;min-width:0;margin:0 0 0 var(--stock-indent);padding-top:7px;gap:8px;overflow:hidden}
.inventory-card .mobile-stock-card .mobile-card-footer>button:first-child{min-width:0;white-space:nowrap;padding-top:3px;padding-bottom:3px}
.inventory-card .mobile-stock-card .mobile-card-footer>.button{flex-shrink:0}
@media(max-width:760px){
  .inventory-card .mobile-records .mobile-stock-card{--stock-footer-h:max(48px,calc(var(--sm) * 1.65 + 20px))}
}
