/* Ignite › Equipment › Inventory (3.0). Its own looks only, built from tokens.css; the shared pieces (page head, subtabs,
   glass, strip, ih-tools / ih-row / ih-search / ih-who / ih-link, table.t → phone cards, chips, status, flags) come from
   components.css. Every class here starts with iv-. public/inventory-page.js */
.iv { display: flex; flex-direction: column; gap: var(--gap); }
.iv h2 { margin: 0; font-size: var(--fs-l); font-weight: var(--fw-x); }
.iv h3 { margin: 6px 0 0; font-size: 13.5px; font-weight: var(--fw-bold); }
.iv .lede { max-width: 80ch; }
.iv-body, .iv-list { display: flex; flex-direction: column; gap: var(--gap); }
.iv-grow { flex: 1 1 auto; }
.iv-nowrap { white-space: nowrap; }
.iv-none { margin: 0; }
.iv-pad { padding: 14px 18px 16px; }

/* Quick add: one row of fields on a computer (name widest), two on a tablet, one on a phone; Add ends the row */
.iv-add { display: grid; gap: 10px; }
.iv-sechead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.iv-adding { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: var(--fw-semi); color: var(--ink-2); }
.iv-adding .select-wrap { min-width: 170px; }
.iv-qa { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, .8fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.iv-qa .field, .iv-form .field { margin: 0; min-width: 0; }
.iv-qa .input, .iv-form .input { width: 100%; }
.iv-qa-go { justify-content: center; }
.iv-add > .hint { margin: 0; min-height: 1.5em; }
@media (max-width: 1180px) {
  .iv-qa { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .iv-qa .iv-qa-name { grid-column: 1 / -1; }
  .iv-qa > .iv-qa-go { grid-column: 1 / -1; }
}
@media (max-width: 640px) { .iv-qa { grid-template-columns: minmax(0, 1fr); } }

/* the filters: search, then the three pickers — they share a row on a computer and split evenly below it */
@media (max-width: 1180px) and (min-width: 641px) { .iv-filters .ih-search { flex-basis: 100%; } .iv-filters > .select-wrap { flex: 1 1 calc(33.333% - 6px); } }
@media (max-width: 640px) { .iv-filters > .select-wrap { flex: 1 1 100%; } }
/* on a computer the Status picker starts wide enough for its longest choice: the shared 190px cut "Todo menos lo dado de
   baja" (167px of words in 144px of room) and "Checked out (with somebody)" (185px) short at 1440 (w26fix) */
@media (min-width: 1181px) { .iv-filters > .select-wrap:has(> #ivfStatus) { flex-basis: 240px; } }

/* bulk: what is ticked, and what can be done to all of it; it stays in reach while the list scrolls */
.iv-bulk { position: sticky; top: calc(var(--tn-stuck, 0px) + 8px); z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 14px; }
.iv-bulkacts { display: flex; flex-wrap: wrap; gap: 8px; }

/* one glass panel per category: its name and value over the table */
.iv-group { overflow: hidden; }
.iv-ghead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding: 14px 18px 8px; }
.iv-group .table-wrap { padding: 0 6px 6px; }
.iv-table th.iv-cb, .iv-table td.iv-cb { width: 44px; padding-right: 0; }
/* every category's table keeps the same columns, so the edges line up from one panel to the next (a computer; below
   1001px the list is cards — see the foot of this sheet) */
@media (min-width: 1001px) {
  .iv-table { table-layout: fixed; }
  .iv-table th.iv-w-tag { width: 118px; } .iv-table th.iv-w-st { width: 200px; } .iv-table th.iv-w-who { width: 24%; }
  .iv-table th.iv-w-br { width: 14%; } .iv-table th.iv-w-cost { width: 150px; }
  .iv-table td { overflow-wrap: break-word; }
}
@media (min-width: 1001px) and (max-width: 1180px) { .iv-table th.iv-w-st { width: 176px; } .iv-table th.iv-w-cost { width: 120px; } .iv-table th.iv-w-tag { width: 104px; } .iv-table th.iv-w-who { width: 22%; } .iv-table th.iv-w-br { width: 12%; } }
.iv-tick { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; cursor: pointer; }
.iv-tick input { width: 17px; height: 17px; margin: 0; }
.iv-tag { all: unset; cursor: pointer; white-space: nowrap; font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; color: var(--accent-ink); border-radius: 6px; }
.iv-tag:hover { text-decoration: underline; }
.iv-tag:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.iv-tags { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.iv-st { vertical-align: middle; }
.iv .status { min-width: 118px; }   /* "Return requested" whole, and the pill the same width down a column */
.iv .chip.iv-stc { height: 36px; padding: 0 12px; border-radius: var(--r-pill); font-size: 12px; font-weight: var(--fw-bold); }   /* a status this login cannot change: the dropdown's 36px (2.x styles.css still gives every select that), read-only */
.iv-decide { display: inline-flex; flex-wrap: nowrap; gap: 6px; }
.iv .who > span:last-child { white-space: nowrap; }

/* Charges: the range, the total, the CSV */
.iv-range { align-items: flex-end; }
.iv-range .field { flex: 0 1 180px; margin: 0; min-width: 0; }
.iv-range .input { width: 100%; }
.ih-tools > .hint { margin: 0; }

/* the sheets (the shared modal(), with the kit inside) */
.iv-modal { gap: 12px; }
.iv-modal h2 { font-size: var(--fs-xl); }
.iv-modal > .hint, .iv-modal > p { margin: 0; }
.modal.iv-wide { max-width: 880px; }
.iv-sheethead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.iv-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 16px; margin: 0; }
.iv-facts > div { min-width: 0; overflow-wrap: anywhere; }
.iv-facts dt { font-size: 11.5px; font-weight: var(--fw-semi); color: var(--muted); }
.iv-facts dd { margin: 2px 0 0; font-size: 13px; }
.iv-notes { white-space: pre-wrap; color: var(--ink-2); font-size: 13px; }
.iv-hist td { vertical-align: top; }
.iv-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.iv-form .wide { grid-column: 1 / -1; }
.iv-form .field .hint { margin: 2px 0 0; font-size: 12px; }
.iv-acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.iv-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.iv-pick { max-height: 280px; overflow-y: auto; border: 1px solid var(--hair); border-radius: var(--r-m); }
.iv-pick .iv-none { padding: 10px 12px; }
.iv-pickrow { display: flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 4px 12px; margin: 0; border-top: 1px solid var(--hair); cursor: pointer; font-size: 13px; }
.iv-pickrow:first-child { border-top: 0; }
.iv-pickrow input { width: 18px; height: 18px; margin: 0; flex: none; }
.iv-wholine { margin: 0; font-size: 13px; line-height: 1.9; }   /* one sentence, the face inline in it */
.iv-wholine .ih-who { vertical-align: middle; }
.iv-wholine:empty { display: none; }
.iv-paste { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.iv-prev { max-height: 34vh; overflow: auto; border: 1px solid var(--hair); border-radius: var(--r-m); }
.iv-prev tr.iv-bad td { background: var(--bad-bg); }
.iv-modal .flags { margin: 0; }
@media (max-width: 760px) { .iv-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .iv-form { grid-template-columns: minmax(0, 1fr); }
  .iv-acts > .btn { flex: 1 1 auto; justify-content: center; }
  .iv-acts .iv-grow { display: none; }
}

/* the ticket's Equipment card (tickets-page.js mounts it into #invTkBox) */
.iv-tk { display: grid; gap: 8px; }
.iv-tk > .hint, .iv-tk > h3 { margin: 0; }
.iv-tklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.iv-tklist li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; min-width: 0; }
.iv-tkacts { display: flex; flex-wrap: wrap; gap: 8px; }
.iv-tkacts .btn { flex: 1 1 auto; justify-content: center; }

@media (max-width: 1180px), (pointer: coarse) {
  .iv-tick { width: var(--tap); height: var(--tap); margin: -8px; }   /* a 44px reach round the box, the row no taller */
  .iv-tag { padding: 10px 0; margin: -10px 0; }
}

/* the list on a phone or a touch iPad: one compact card per item — tag and name, the replacement cost, then the status
   dropdown beside who has it. The kit's .phone-cards swaps the table for them under 641px; this list swaps up to 1000px,
   where seven columns would squeeze the item's name to a letter a line. */
@media (max-width: 1000px) {
  .iv-pc .table-wrap { display: none; }
  .iv-pc .cards { display: flex; flex-direction: column; gap: 8px; }
}
.iv-pc .cards { padding: 0 10px 10px; }
.iv-selcards { display: inline-flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 0 6px; font-size: 13px; font-weight: var(--fw-semi); cursor: pointer; }
.iv-selcards input { width: 18px; height: 18px; margin: 0; }
.iv-card { display: grid; gap: 8px; }
.iv-cardtop { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.iv-cardname { min-width: 0; overflow-wrap: anywhere; font-size: 13.5px; }
.iv-cardcost { font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; white-space: nowrap; }
.iv-cardrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.iv-cardwho { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-width: 0; }
.iv-card > .hint { margin: 0; }
.iv label .hint, .iv-modal label .hint { margin-left: 4px; font-weight: var(--fw-med); }

/* ---- counted safety gear (3.0, Decision 46 — Inventory owns the gear stock; gear-stock-core.js) */
.iv-neg { color: var(--bad); }                     /* a count at or below zero: the count was off, not the hand-over */
.iv-cardtop.iv-cardtop-stock { grid-template-columns: minmax(0, 1fr) auto; }   /* no tick box on a counted line: name, then the count */
