@charset "UTF-8";
/* Only the inventory presentation changes. Both views share the same rows,
 * filters, paging, focus and delegated action handlers. */
body[data-density="cards"] #inventory-view .table-scroll:has(>.inventory-table){overflow-x:visible;}
body[data-density="cards"] #inventory-view .inventory-table{display:block;min-width:0;max-width:100%;border:0;border-collapse:separate;}
body[data-density="cards"] #inventory-view .inventory-table thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap;border:0;}
body[data-density="cards"] #inventory-view .inventory-table tbody{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,340px),1fr));align-items:stretch;gap:18px;padding:18px;max-width:100%;box-sizing:border-box;}
body[data-density="cards"] #inventory-view .inventory-table tbody:empty{padding:0;}
body[data-density="cards"] #inventory-view .inventory-table tbody>tr{display:grid;grid-template-columns:minmax(0,1fr);align-content:start;gap:16px;min-width:0;padding:18px;border:1px solid var(--theme-ui-border);border-radius:15px;background:var(--theme-ui-panel);box-shadow:0 4px 16px #00000006;}
body[data-density="cards"] #inventory-view .inventory-table tbody>tr:hover,
body[data-density="cards"] #inventory-view .inventory-table tbody>tr:focus-within{background:var(--theme-ui-panel);border-color:var(--theme-ui-accent);box-shadow:0 6px 20px #0000000a;}
body[data-density="cards"] #inventory-view .inventory-table tbody>tr.row-low-stock{border-color:var(--theme-ui-accent);}
body[data-density="cards"] #inventory-view .inventory-table tbody>tr>td{display:block;grid-column:1/-1;width:auto;height:auto;min-width:0;margin:0;padding:0;text-align:left;border:0;background:transparent;}
body[data-density="cards"] #inventory-view .inventory-table tbody>tr>td::before{display:none;}
body[data-density="cards"] #inventory-view .inventory-table .product-cell{align-items:center;gap:16px;}
body[data-density="cards"] #inventory-view .inventory-table .thumbnail{width:96px;height:108px;min-width:96px;max-width:96px;flex:0 0 96px;border-radius:11px;background:var(--theme-ui-raised);}
body[data-density="cards"] #inventory-view .inventory-table .thumbnail img{width:100%;height:100%;object-fit:contain!important;}
body[data-density="cards"] #inventory-view .inventory-table .product-name{font-size:16px;line-height:1.6;}
body[data-density="cards"] #inventory-view .inventory-table .product-text .sku{display:inline-block;margin-top:8px;font-size:11px;}
body[data-density="cards"] #inventory-view .inventory-table .product-notes{margin-top:7px;font-size:11px;line-height:1.65;}
body[data-density="cards"] #inventory-view .inventory-stock-distribution{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;}
body[data-density="cards"] #inventory-view .inventory-stock-distribution .inventory-stock-total{grid-column:1/-1;padding:13px 10px;border-radius:11px;gap:5px;}
body[data-density="cards"] #inventory-view .inventory-stock-distribution .inventory-stock-total>span{font-size:12px;}
body[data-density="cards"] #inventory-view .inventory-stock-distribution .inventory-stock-total>strong{font-size:28px;line-height:1.15;white-space:nowrap;overflow-wrap:normal;}
body[data-density="cards"] #inventory-view .inventory-stock-distribution .inventory-stock-total>small{font-size:10px;}
body[data-density="cards"] #inventory-view .inventory-stock-distribution .warehouse-stock-secondary,
body[data-density="cards"] #inventory-view .inventory-stock-distribution .inventory-stock-split>span{min-height:63px;padding:9px 6px;border-radius:10px;gap:5px;font-size:11px;}
body[data-density="cards"] #inventory-view .inventory-stock-distribution .warehouse-stock-secondary>span{font-size:11px;}
body[data-density="cards"] #inventory-view .inventory-stock-distribution .warehouse-stock-secondary>strong,
body[data-density="cards"] #inventory-view .inventory-stock-distribution .inventory-stock-split>span>b{font-size:16px;white-space:nowrap;overflow-wrap:normal;}
/* Long stock figures get their own full-width line instead of being split or
 * squeezed into a narrow third of a card. The underlying values stay intact. */
body[data-density="cards"] #inventory-view .inventory-table tr[data-large-counts="true"] .inventory-stock-distribution{grid-template-columns:minmax(0,1fr);}
body[data-density="cards"] #inventory-view .inventory-table tr[data-large-counts="true"] :is(.warehouse-stock-secondary,.inventory-stock-split>span){flex-direction:row;align-items:center;justify-content:space-between;min-height:38px;padding:8px 12px;}
body[data-density="cards"] #inventory-view .inventory-table td[data-label="规格与预警"]{display:flex;align-items:baseline;flex-wrap:wrap;gap:8px 16px;}
body[data-density="cards"] #inventory-view .inventory-table .inventory-unit-label,
body[data-density="cards"] #inventory-view .inventory-table .warning-details{display:flex;align-items:baseline;flex-wrap:wrap;gap:5px 8px;margin:0;font-size:11px;}
body[data-density="cards"] #inventory-view .inventory-table .inventory-unit-label b,
body[data-density="cards"] #inventory-view .inventory-table .minimum-label b{white-space:nowrap;}
body[data-density="cards"] #inventory-view .inventory-table td[data-label="库存操作"]{padding-top:15px;border-top:1px solid var(--theme-ui-border);}
body[data-density="cards"] #inventory-view .inventory-table td[data-label="库存操作"]::before{content:attr(data-label);display:block;margin-bottom:9px;color:var(--theme-dense-text);font-size:11px;font-weight:600;}
body[data-density="cards"] #inventory-view .inventory-table .wh-product-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
body[data-density="cards"] #inventory-view .inventory-table :is(.wh-product-actions,.inventory-records-actions)>button{min-height:38px;padding:8px 9px;font-size:12px;border-radius:9px;}
body[data-density="cards"] #inventory-view .inventory-table .inventory-records-actions{display:flex;align-items:center;gap:8px;}
body[data-density="cards"] #inventory-view .inventory-table .inventory-records-actions>button{flex:1;}
body[data-density="cards"] #inventory-view .inventory-table .product-edit-actions{display:flex;align-items:center;gap:8px;}
body[data-density="cards"] #inventory-view .inventory-table .product-edit-actions .icon-button{width:38px;height:38px;flex:0 0 38px;border-radius:9px;}
@media(max-width:760px){
 body[data-density="cards"] #inventory-view .inventory-table tbody{grid-template-columns:minmax(0,1fr);padding:14px;gap:14px;}
 body[data-density="cards"] #inventory-view .inventory-table tbody>tr{padding:16px;gap:14px;}
}
@media(prefers-reduced-motion:reduce){
 body[data-density="cards"] #inventory-view .inventory-table tbody>tr{transition:none;}
}
