/* Keep the existing table markup and actions; stack each article on narrow screens. */
@media(max-width:900px){
 .table-wrap:has(#article-table),.table-wrap:has(#stock-table),.table-wrap:has(#location-stock-table){overflow:visible;padding:0 12px 4px}
 .table-wrap:has(#article-table)>table,.table-wrap:has(#stock-table)>table,.table-wrap:has(#location-stock-table)>table{width:100%;min-width:0;max-width:100%;border-collapse:separate;border-spacing:0}
 .table-wrap:has(#article-table) thead,.table-wrap:has(#stock-table) thead,.table-wrap:has(#location-stock-table) thead{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 #article-table,#stock-table,#location-stock-table{display:block;width:100%;max-width:100%}
 #article-table>tr,#stock-table>tr,#location-stock-table>tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;width:100%;min-width:0;padding:16px;margin:0 0 12px;border:1px solid var(--border);border-radius:12px;background:#fff;box-sizing:border-box}
 #article-table>tr{grid-template-areas:"title title" "id id" "places places" "unit minimum" "actions actions"}
 #stock-table>tr{grid-template-areas:"title title" "id id" "total status" "places places" "minimum actions"}
 #location-stock-table>tr{grid-template-areas:"title title" "id total"}
 #article-table td,#stock-table td,#location-stock-table td{display:block;min-width:0;max-width:100%;padding:0;border:0;white-space:normal;overflow-wrap:anywhere;word-break:normal;font-size:14px;line-height:1.5;text-align:left}
 #article-table td::before,#stock-table td::before,#location-stock-table td::before{display:block;margin-bottom:3px;color:var(--muted);font-size:11px;font-weight:600;letter-spacing:.02em;line-height:1.4}
 #article-table td:nth-child(1),#stock-table td:nth-child(2),#location-stock-table td:nth-child(1){grid-area:id}
 #article-table td:nth-child(1)::before,#stock-table td:nth-child(2)::before,#location-stock-table td:nth-child(1)::before{content:"Artikelnummer"}
 #article-table td:nth-child(2),#stock-table td:nth-child(1),#location-stock-table td:nth-child(2){grid-area:title;min-height:72px;padding-bottom:12px;border-bottom:1px solid var(--border);font-size:16px;font-weight:650;line-height:1.5}
 #article-table td:nth-child(2)>a,#stock-table td:nth-child(1)>a,#location-stock-table td:nth-child(2)>a{float:left;display:block;margin:0 12px 6px 0;max-width:72px}
 #article-table .article-thumb,#stock-table .article-thumb,#location-stock-table .article-thumb{display:block;width:72px;height:72px;max-width:100%;margin:0;object-fit:contain;border:1px solid #eef0ec;border-radius:9px;background:#fff}
 #article-table td:nth-child(3),#stock-table td:nth-child(3){grid-area:places}
 #article-table td:nth-child(3)::before,#stock-table td:nth-child(3)::before{content:"Lagerplätze und Bestand"}
 #article-table td:nth-child(4){grid-area:unit}
 #article-table td:nth-child(4)::before{content:"Einheit"}
 #article-table td:nth-child(5),#stock-table td:nth-child(5){grid-area:minimum}
 #article-table td:nth-child(5)::before,#stock-table td:nth-child(5)::before{content:"Mindestbestand"}
 #article-table td:nth-child(6),#stock-table td:nth-child(7){grid-area:actions;display:flex;flex-wrap:wrap;align-items:end;gap:8px}
 #article-table td:nth-child(6){padding-top:10px;border-top:1px solid var(--border)}
 #article-table td:nth-child(6)>button,#stock-table td:nth-child(7)>button{flex:1 1 90px;min-width:0;min-height:44px;padding:10px 12px;margin:0;white-space:normal;overflow-wrap:anywhere}
 #stock-table td:nth-child(4),#location-stock-table td:nth-child(3){grid-area:total}
 #stock-table td:nth-child(4)::before{content:"Gesamtbestand"}
 #location-stock-table td:nth-child(3)::before{content:"Bestand am Lagerplatz"}
 #stock-table td:nth-child(6){grid-area:status}
 #stock-table td:nth-child(6)::before{content:"Status"}
 #stock-table .badge{display:inline-block;max-width:100%;white-space:normal;font-size:12px}
 #article-table>tr:has(td[colspan]),#stock-table>tr:has(td[colspan]),#location-stock-table>tr:has(td[colspan]){display:block}
 #article-table td[colspan],#stock-table td[colspan],#location-stock-table td[colspan]{min-height:0;padding:8px 0;border:0;text-align:center;font-size:14px;font-weight:400}
 #article-table td[colspan]::before,#stock-table td[colspan]::before,#location-stock-table td[colspan]::before{content:none}
}
