body[data-stock-page] [hidden] { display: none !important; }
body[data-stock-page] #main { box-sizing: border-box; }
body[data-stock-page] label { display: block; margin-top: 8px; }
body[data-stock-page] input { box-sizing: border-box; width: 100%; max-width: 100%; }
body[data-stock-page] :focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
body[data-stock-page] [aria-invalid="true"] { border: 2px solid var(--error-fg-color); }
#stock-state { overflow-wrap: anywhere; }
#stock-state:empty { display: none; }
#stock-retry { width: 44px; height: 44px; }
.stock-filters { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr) auto; gap: 8px; align-items: end; margin-bottom: 12px; }
.stock-filters label { align-self: end; }
.stock-filters button { min-height: 40px; }
.stock-back { margin: 0 0 8px; }
.stock-back a,
.stock-actions a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.stock-location { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 8px; align-items: center; margin-bottom: 12px; }
.stock-location label { margin: 0; }
.stock-entry-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
#stock-entry-form > button,
.stock-actions > button { min-height: 44px; margin-top: 10px; }
.stock-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
#stock-table tbody tr[tabindex="0"] { cursor: pointer; }
#stock-table tbody tr[aria-selected="true"] { background-color: var(--input-focus-color); }
#stock-table td { overflow-wrap: anywhere; }
@media (max-width: 640px) {
   .stock-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
   .stock-filters label:nth-of-type(2) { grid-column: 1; }
   .stock-filters button { grid-column: 1 / -1; }
}