/* Task Helper — "HOW MANY?" (shared, public/shared/how-many/v1; lane TASK HELPER STOCK). Copyright Rapid Surveys Pty Ltd. Namespace hm-.
 * App tokens only (--bg --card --ink --muted --line --accent --accent-ink --err). The same look STOCK's sheet had (t-sm3), so moving it here
 * changed nothing on screen. The number box (THStockQty, .tsq-) is styled by public/stock/stock.css, which the app page always loads.
 * Amber = #b45309 (≈ 5:1 on white) — never the only signal: the words say "Below minimum". */
.hm-ov { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto;
  background: rgba(20,28,40,.45); padding: max(12px, env(safe-area-inset-top)) 0 24px; }
@media (min-width: 768px) { .hm-ov { padding-top: 48px; } }
body.hm-open { overflow: hidden; }
.hm-sheet { --th-dpad: 16px; width: 100%; max-width: 520px; margin: 0 12px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.hm-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px; }
.hm-head h3 { margin: 0; font-size: 18px; }
.hm-sheet > .th-dhead { margin-top: -16px; padding-top: 10px; padding-bottom: 6px; border-radius: 14px 14px 0 0; }
.hm-sheet .hm-form > .th-dfoot { margin-top: 4px; margin-bottom: -16px; border-radius: 0 0 14px 14px; }
.hm-x { width: 44px; height: 44px; margin: 0; padding: 0; flex: none; border: 0; background: none; color: var(--muted); font-size: 18px; }
.hm-form { display: flex; flex-direction: column; gap: 10px; }
.hm-muted { color: var(--muted); font-size: 13px; margin: 4px 0 10px; }
.hm-err { color: var(--err); font-size: 14px; margin: 8px 0; }
.hm-fl { display: flex; flex-direction: column; gap: 4px; margin: 0; font-size: 14px; font-weight: 600; }
.hm-fl input { margin: 0; min-height: 44px; font-size: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.hm-btn { width: auto; margin: 0; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 15px; }
.hm-btn.ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
.hm-btn:disabled { opacity: .6; }
.hm-btns { display: flex; gap: 10px; margin-top: 6px; }
.hm-btns .hm-btn { flex: 1; }
.hm-all { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.hm-after h4 { margin: 6px 0 4px; }
.hm-list { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.hm-line { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 6px 0; }
.hm-line + .hm-line { border-top: 1px solid var(--line); }
.hm-line { border-bottom: 1px solid var(--line); }
.hm-line:last-child { border-bottom: 0; }   /* the same double rule STOCK's sheet had (t-sm3 look kept) */
.hm-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; display: flex; flex-direction: column; gap: 2px; }
.hm-count { flex: none; display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.hm-n { font-size: 22px; line-height: 1.15; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink); }
.hm-bd { font-size: 12px; color: var(--muted); white-space: nowrap; }
.hm-bd.bad { color: var(--err); font-weight: 600; }
.hm-count.neg .hm-n, .hm-line.neg > .hm-name { color: var(--err); }
.hm-min { display: block; font-size: 12px; font-weight: 500; color: var(--muted); white-space: normal; overflow-wrap: anywhere; }
.hm-line.low > .hm-name { color: #b45309; font-weight: 600; }
.hm-line.low { box-shadow: inset 3px 0 0 #b45309; }
.hm-line.low .hm-min { color: #b45309; font-weight: 600; }
