/* H4 Inventory: styles for this module only. Tokens from tokens.css only (no raw hex). Printed documents reuse the .pd-* block in x_fin.css. */

/* overview: main column + side column */
.stk-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.stk-main, .stk-side { display: grid; gap: 16px; min-width: 0; }
.stk-cols .card > h4 em { margin-left: auto; font: 600 12.5px var(--mono); font-style: normal; color: var(--ink-3); }
.stk-cols .clear { display: flex; align-items: center; gap: 8px; padding: 10px 2px; color: var(--ink-3); font-size: 14px; }
.stk-cols .clear .i { color: var(--ok); }
.stk-cols .arow .am { gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.stk-cols .arow.link { cursor: pointer; }

/* quantities and dates */
.stk-n { font: 600 14px var(--mono); white-space: nowrap; }
.stk-n small { font: 500 12px var(--font); color: var(--ink-3); }
.stk-n.in { color: var(--ok); }
.stk-n.out { color: var(--ink); }
.stk-soon { color: var(--warn); font-weight: 600; }
.stk-sub { padding-left: 14px; position: relative; }
.stk-sub::before { content: ''; position: absolute; left: 2px; top: 50%; width: 7px; height: 1.5px; background: var(--line-2); }

/* forms */
.stk-chk { display: flex; align-items: center; gap: 10px; font-size: 14.5px; min-height: 36px; cursor: pointer; }
.stk-chk input { width: 18px; height: 18px; }
[data-trk-show][hidden], [data-demo-row][hidden], [data-lotbox][hidden], [data-manual][hidden], [data-fromdoc][hidden] { display: none !important; }

/* rows of lines in a purchase order or a delivery note */
.stk-lines-h, .stk-line { display: grid; gap: 8px; align-items: center; }
.stk-lines-h.po, .stk-line.po { grid-template-columns: minmax(0, 2.4fr) 80px minmax(0, 1.2fr) 32px; }
.stk-lines-h.dn, .stk-line.dn { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1.5fr) 80px 32px; }
.stk-lines-h { font-size: 12.5px; font-weight: 600; color: var(--ink-3); margin-top: 6px; }
.stk-line .in { height: 40px; min-width: 0; }

/* goods receipt: one block per order line */
.stk-rline { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; background: var(--panel-sunk); display: grid; gap: 6px; }
.stk-rl-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.stk-rl-h .sub { color: var(--ink-3); font-size: 13px; }

/* scan sheet */
.stk-cam { display: grid; gap: 10px; margin-bottom: 10px; }
.stk-cam video { width: 100%; max-height: 260px; border-radius: 12px; background: var(--panel-sunk); object-fit: cover; }
.stk-scan-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-top: 12px; display: grid; gap: 10px; background: var(--panel-sunk); }

@media (max-width: 860px) {
  .stk-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .stk-lines-h { display: none; }
  .stk-line.po, .stk-line.dn { grid-template-columns: 84px minmax(0, 1fr) 32px; }
  .stk-line select, .stk-line.dn input[name=ld] { grid-column: 1 / -1; }
  .stk-line.dn .ibtn { grid-column: 3; }
  .stk-line.dn input[name=lq] { grid-column: 1; }
  .stk-line .in { height: 44px; }
}

/* the global New menu can get long: it scrolls inside the window */
#create { max-height: calc(100vh - 96px); overflow-y: auto; overscroll-behavior: contain; }
