/* Stock and Materials, Suppliers and supplier invoices (STK-01..16, CFG-06). Builds on the shared classes in app.css. */

/* line editors (Supplier Orders, receipts) reuse .qrows from the quote builder */
.stk-lines-wrap { padding: 0; }
.stk-lines td:first-child { min-width: 220px; }
.stk-lines tfoot td { padding-top: .5rem; border-top: 1px solid var(--border); }
.stk-qty-in, .stk-cost-in { width: 120px; text-align: right; }
.input.stk-err { border-color: var(--red-solid); box-shadow: 0 0 0 1px var(--red-solid); }
.stk-receive td { vertical-align: middle; }
.stk-over { color: var(--amber); font-size: .82rem; font-weight: 600; white-space: normal; max-width: 180px; margin-left: auto; text-align: right; }
.stk-over:empty { display: none; }
.stk-order-total { margin-top: .75rem; }

/* quantities and variances: sign and colour together (DSN-01) */
.stk-var-neg { color: var(--red); font-weight: 700; }
.stk-var-pos { color: var(--green); font-weight: 700; }
.stk-hint { font-size: .9rem; color: var(--muted); background: var(--surface-2); border: 1px solid var(--grey-bg); border-radius: var(--radius); padding: .45rem .65rem; }
.stk-hint:empty { display: none; }
.stk-desc { white-space: pre-line; }

/* Signed Handover thumbnails in movement and issue lists */
.stk-recipient { display: grid; gap: .2rem; }
.stk-sig-thumb { height: 40px; width: auto; max-width: 130px; border: 1px solid var(--border); border-radius: 4px; background: #fff; display: block; }

/* Stock Take count entry */
.stk-count-cell { display: inline-flex; align-items: center; gap: .4rem; justify-content: flex-end; }
.stk-count-in { width: 120px; min-height: 44px; text-align: right; }
.stk-saved { color: var(--green); font-size: .8rem; font-weight: 700; min-width: 3.5em; text-align: left; }

/* supplier invoice: Supplier Order picker */
.stk-orders-pick { display: grid; gap: .1rem; max-height: 220px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius); padding: .3rem .6rem; background: #fff; }
.stk-orders-pick .radio { min-height: 40px; }

@media (max-width: 800px) {
  .stk-lines td:first-child { min-width: 180px; }
  .stk-qty-in, .stk-cost-in, .stk-count-in { width: 96px; }
}

/* wide lists (Stock items, movements, counts, supplier invoices): headers may wrap so every column fits from 1280px (DSN-04) */
.stk-compact .table th { white-space: normal; line-height: 1.2; }
.stk-compact .table th, .stk-compact .table td { padding-left: .5rem; padding-right: .5rem; }
.stk-compact .th-btn { text-align: left; }
.stk-item-cell { min-width: 150px; overflow-wrap: anywhere; }
.stk-nowrap { white-space: nowrap; }
.stk-desc-cell { min-width: 180px; }
