/* The Inventory register (wave343, 2026-11-02): its own top-level view,
 * #view-inventory, inserted by inventory.js. On the design-system tokens,
 * every one with a fallback so it reads right under every skin. Every class
 * is invt- (the invoice gallery already owns inv-). Picture-led: each item
 * carries a picture slot — a photo once it has loaded, a clean category
 * placeholder otherwise; never a broken image.
 * wave353: warranty chips, the bought/warranty/link rows in the editor, the
 * register's List + Grid views and the view switcher, and the import and
 * insurance-export dialogs (inventory-io.js). */

.invt-wrap { max-width: none; padding: 0 0 48px; }
.invt-ov .hidden, .invt-wrap .hidden { display: none !important; }
.invt-loading, .invt-down { padding: 18px 0; }

/* head: totals on a stated basis + ops actions */
.invt-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 18px; margin-bottom: 12px; }
.invt-totals { flex: 1 1 420px; background: var(--ds-card, #fff); border: 1px solid var(--ds-line, #e3e3e8); border-radius: 10px; padding: 10px 14px; }
.invt-tot-main { font-size: 14.5px; color: var(--ds-ink, #222); font-variant-numeric: tabular-nums; line-height: 1.5; }
.invt-tot-main b { color: var(--ds-navy, #1d2b4f); font-size: 15.5px; }
.invt-tot-label { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ds-faint, #888); margin-right: 6px; }
.invt-tot-note { font-size: 12.5px; color: var(--ds-muted, #666); }
.invt-tot-sub { font-size: 12.5px; color: var(--ds-muted, #666); margin-top: 3px; font-variant-numeric: tabular-nums; }
.invt-head-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.invt-ro { font-size: 12.5px; color: var(--ds-muted, #666); }
.invt-flash { font-size: 13px; color: #2e7d4f; background: #eaf5ee; border: 1px solid #cfe6d7; border-radius: 8px; padding: 7px 10px; margin-bottom: 10px; }
.invt-flash-bad { color: #8a2b20; background: #fbecea; border-color: #f0cdc8; }

/* tabs */
.invt-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--ds-line, #e3e3e8); margin-bottom: 12px; overflow-x: auto; }
.invt-tab { font: inherit; font-size: 14px; font-weight: 600; color: var(--ds-muted, #666); background: none; border: 0; border-bottom: 3px solid transparent; padding: 8px 12px; cursor: pointer; white-space: nowrap; }
.invt-tab.active { color: var(--ds-navy, #1d2b4f); border-bottom-color: var(--ds-gold-strong, #b8892b); }
.invt-tabn { display: inline-block; min-width: 20px; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 1px 7px; margin-left: 4px; background: var(--ds-tint, #f3f3f6); color: var(--ds-muted, #666); font-variant-numeric: tabular-nums; }
.invt-tab.active .invt-tabn { background: var(--ds-gold-tint, #fbf3df); color: #8a5a00; }

/* filters */
.invt-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.invt-filters input[type=search], .invt-filters select, .invt-k-q { font: inherit; font-size: 14px; color: var(--ds-ink, #222); background: var(--ds-fill, #fff); border: 1px solid var(--ds-line-strong, #c9c9d2); border-radius: 8px; padding: 7px 9px; min-width: 0; }
.invt-filters input[type=search] { flex: 1 1 260px; }
.invt-filters select { flex: 0 1 190px; }
.invt-hv { display: inline-flex; gap: 6px; align-items: center; font-size: 13.5px; color: var(--ds-ink, #222); white-space: nowrap; }
.invt-showing { font-size: 12.5px; color: var(--ds-muted, #666); min-height: 18px; margin-bottom: 6px; }
.invt-showing:empty { min-height: 0; margin: 0; }
.invt-link { font: inherit; font-size: inherit; color: var(--ds-navy, #1d2b4f); background: none; border: 0; padding: 0 2px; text-decoration: underline; cursor: pointer; }
.invt-empty { padding: 18px 0; }
.invt-lede { margin: 0 0 12px; font-size: 13.5px; color: var(--ds-muted, #666); }

/* the register: picture-led cards, grouped by category */
.invt-group { margin: 6px 0 18px; content-visibility: auto; contain-intrinsic-size: auto 600px; }
.invt-gh { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ds-faint, #888); margin: 0 0 8px; }
.invt-gh span { font-weight: 600; color: var(--ds-muted, #666); margin-left: 4px; }
.invt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 8px; }
.invt-card { display: flex; gap: 12px; align-items: flex-start; background: var(--ds-card, #fff); border: 1px solid var(--ds-line, #e3e3e8); border-left: 4px solid var(--ds-line, #e3e3e8); border-radius: 10px; padding: 10px; cursor: pointer; min-width: 0; }
.invt-card:hover { border-color: var(--ds-line-strong, #c9c9d2); }
.invt-card:focus-visible { outline: 2px solid var(--ds-navy, #1d2b4f); outline-offset: 2px; }
.invt-card.invt-st-out_for_repair { border-left-color: var(--ds-gold-strong, #b8892b); }
.invt-card.invt-st-out_of_service, .invt-card.invt-st-missing { border-left-color: #c0392b; }
.invt-pic { flex: none; position: relative; width: 64px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--ds-tint, #f3f3f6); }
.invt-pic-big { width: 112px; height: 112px; border-radius: 10px; }
.invt-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--ds-faint, #9a9aa6); }
.invt-ph svg { width: 56%; height: 56%; }
.invt-ph[hidden] { display: none; }
.invt-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.invt-img[hidden] { display: none; }
.invt-body { min-width: 0; flex: 1; }
.invt-name { font-weight: 600; color: var(--ds-navy, #1d2b4f); font-size: 14.5px; line-height: 1.3; overflow-wrap: anywhere; }
.invt-qty { font-weight: 600; font-size: 12.5px; color: var(--ds-muted, #666); }
.invt-ident { font-size: 12px; color: var(--ds-muted, #666); margin-top: 2px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.invt-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.invt-chip { display: inline-block; font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 2px 8px; color: var(--ds-muted, #555); background: var(--ds-tint, #f3f3f6); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.invt-chip-hv { color: #8a5a00; background: var(--ds-gold-tint, #fbf3df); }
.invt-chip-dup { color: #8a2b20; background: #fbecea; }
.invt-chip-st.invt-st-out_for_repair { color: #8a5a00; background: var(--ds-gold-tint, #fbf3df); }
.invt-chip-st.invt-st-out_of_service, .invt-chip-st.invt-st-missing { color: #fff; background: #c0392b; }
.invt-chip-st.invt-st-written_off { color: #fff; background: #6b6b76; }
.invt-chip-st.invt-st-in_service { color: #2e7d4f; background: #eaf5ee; }
.invt-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--ds-faint, #888); }
.invt-val { font-weight: 600; color: var(--ds-ink, #222); font-variant-numeric: tabular-nums; }

/* out for repair + written off: rows */
.invt-rlist { display: flex; flex-direction: column; gap: 8px; }
.invt-rrow, .invt-worow { display: grid; grid-template-columns: 64px minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px; align-items: center;
  background: var(--ds-card, #fff); border: 1px solid var(--ds-line, #e3e3e8); border-left: 4px solid var(--ds-gold-strong, #b8892b); border-radius: 10px; padding: 10px 12px; }
.invt-worow { grid-template-columns: 64px minmax(0, 1.5fr) minmax(0, 1.6fr) auto auto; border-left-color: #6b6b76; }
.invt-rrow.invt-late { border-left-color: #c0392b; }
.invt-rmain { min-width: 0; }
.invt-rnotes { font-size: 12.5px; color: var(--ds-muted, #666); margin-top: 3px; white-space: pre-line; }
.invt-rwhere, .invt-rwhen, .invt-rback, .invt-wowhy { font-size: 13.5px; color: var(--ds-ink, #222); min-width: 0; overflow-wrap: anywhere; }
.invt-k { display: block; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ds-faint, #888); margin-bottom: 2px; }
.invt-ago { display: block; font-size: 12px; color: var(--ds-muted, #666); }
.invt-pill-late { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 700; color: #fff; background: #c0392b; border-radius: 999px; padding: 1px 7px; }
.invt-woval { font-weight: 600; font-variant-numeric: tabular-nums; }
.invt-racts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 900px) {
  .invt-rrow, .invt-worow { grid-template-columns: 64px minmax(0, 1fr); }
  .invt-rrow > :nth-child(n+3), .invt-worow > :nth-child(n+3) { grid-column: 2; }
  .invt-racts { justify-content: flex-start; }
  .invt-filters select { flex: 1 1 45%; }
  .invt-grid { grid-template-columns: minmax(0, 1fr); }
}

/* dialogs (self-contained) */
.invt-ov { position: fixed; inset: 0; background: rgba(15, 20, 35, .42); display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; z-index: 1000; overflow-y: auto; }
.invt-dlg { background: var(--ds-card, #fff); color: var(--ds-ink, #222); border-radius: 12px; width: min(580px, 100%); padding: 20px 22px; box-shadow: 0 18px 50px rgba(0, 0, 0, .22); }
.invt-dlg-wide { width: min(780px, 100%); }
.invt-dlg h2 { margin: 0 0 6px; font-size: 19px; color: var(--ds-navy, #1d2b4f); overflow-wrap: anywhere; }
.invt-dlg h3 { margin: 16px 0 6px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ds-faint, #888); }
.invt-f { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--ds-muted, #666); margin-bottom: 10px; min-width: 0; }
.invt-f input, .invt-f select, .invt-f textarea { font: inherit; font-size: 14px; font-weight: 400; color: var(--ds-ink, #222); background: var(--ds-fill, #fff); border: 1px solid var(--ds-line-strong, #c9c9d2); border-radius: 8px; padding: 7px 9px; width: 100%; box-sizing: border-box; }
.invt-f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.invt-f3 { display: grid; grid-template-columns: 0.6fr 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .invt-f2, .invt-f3 { grid-template-columns: 1fr; gap: 0; } }
.invt-check { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--ds-ink, #222); margin: 26px 0 14px; }
@media (max-width: 560px) { .invt-check { margin-top: 0; } }
.invt-addrow { display: flex; gap: 6px; margin-top: 6px; }
.invt-addrow input { flex: 1; }
.invt-hint { font-size: 12.5px; color: var(--ds-muted, #666); margin: 4px 0 10px; line-height: 1.45; }
.invt-quiet { font-size: 12px; color: var(--ds-faint, #888); margin: 2px 0 8px; }
.invt-err { font-size: 13px; color: #8a2b20; background: #fbecea; border-radius: 8px; padding: 7px 10px; margin: 8px 0 0; }
.invt-dlg-acts { display: flex; gap: 8px; align-items: center; margin-top: 14px; }
.invt-dlg-acts .grow { flex: 1; }
.invt-danger { color: #fff; background: #c0392b; border-color: #c0392b; }
.invt-danger-ghost { color: #8a2b20; }
.invt-quiet-btn { color: var(--ds-muted, #666); }

/* the item record */
.invt-rec { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 10px; }
.invt-rechead { min-width: 0; flex: 1; }
.invt-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 16px; margin: 12px 0; }
.invt-fact { font-size: 14px; color: var(--ds-ink, #222); min-width: 0; overflow-wrap: anywhere; }
.invt-fact i { color: var(--ds-faint, #888); }
.invt-src { font-size: 12px; color: var(--ds-muted, #666); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.invt-notes { font-size: 13.5px; color: var(--ds-ink, #222); background: var(--ds-tint, #f6f6f8); border-radius: 8px; padding: 8px 10px; white-space: pre-line; overflow-wrap: anywhere; }
.invt-woinfo, .invt-repinfo { font-size: 13.5px; border-radius: 8px; padding: 8px 10px; margin: 6px 0; }
.invt-woinfo { background: #efeff2; color: #3b3b44; }
.invt-repinfo { background: var(--ds-gold-tint, #fbf3df); color: #6b4700; }
.invt-hist { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ds-ink, #222); line-height: 1.55; }
.invt-hnote { font-size: 12.5px; color: var(--ds-muted, #666); white-space: pre-line; }
.invt-recacts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--ds-line, #e3e3e8); }

/* send-for-repair picker */
.invt-k-q { width: 100%; box-sizing: border-box; margin-bottom: 8px; }
.invt-picks { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow-y: auto; }
.invt-pick { display: flex; gap: 10px; align-items: center; text-align: left; font: inherit; background: var(--ds-card, #fff); border: 1px solid var(--ds-line, #e3e3e8); border-radius: 10px; padding: 6px; cursor: pointer; }
.invt-pick:hover, .invt-pick:focus-visible { border-color: var(--ds-navy, #1d2b4f); }
.invt-pick .invt-pic { width: 44px; height: 44px; }
.invt-pick b { display: block; color: var(--ds-navy, #1d2b4f); font-size: 14px; }
.invt-pick small { display: block; color: var(--ds-muted, #666); font-size: 12px; }

/* write-off reasons */
.invt-reasons { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.invt-reason { font: inherit; font-size: 13px; border: 1px solid var(--ds-line-strong, #c9c9d2); background: var(--ds-fill, #fff); color: var(--ds-ink, #222); border-radius: 999px; padding: 4px 11px; cursor: pointer; }

/* lists */
.invt-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 620px) { .invt-lists { grid-template-columns: 1fr; } }
.invt-lul { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.invt-lul li { display: flex; gap: 4px; align-items: center; }
.invt-lul input { flex: 1; min-width: 0; font: inherit; font-size: 13.5px; border: 1px solid var(--ds-line, #e3e3e8); border-radius: 6px; padding: 5px 7px; background: var(--ds-fill, #fff); color: var(--ds-ink, #222); }
.invt-lul .invt-arch input { color: var(--ds-faint, #888); font-style: italic; }
.invt-ib { font: inherit; font-size: 13px; width: 28px; height: 28px; border: 1px solid var(--ds-line, #e3e3e8); background: var(--ds-fill, #fff); border-radius: 6px; cursor: pointer; color: var(--ds-ink, #222); }
.invt-ladd { display: flex; gap: 6px; }
.invt-ladd input { flex: 1; min-width: 0; font: inherit; font-size: 13.5px; border: 1px solid var(--ds-line-strong, #c9c9d2); border-radius: 8px; padding: 6px 8px; }

/* wave353 — warranty chips: in warranty is quiet; out of warranty is a warning (like the dup-serial chip, not a status) */
.invt-chip-wr { color: #2e5d7d; background: #e9f1f7; }
.invt-chip-ow { color: #8a2b20; background: #fbecea; }

/* wave353 — view switcher (a file manager's segmented control) */
.invt-viewsw { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.invt-views { display: inline-flex; border: 1px solid var(--ds-line-strong, #c9c9d2); border-radius: 8px; overflow: hidden; background: var(--ds-fill, #fff); }
.invt-seg { font: inherit; font-size: 13px; font-weight: 600; color: var(--ds-muted, #666); background: none; border: 0; border-left: 1px solid var(--ds-line, #e3e3e8); padding: 6px 11px; cursor: pointer; white-space: nowrap; }
.invt-seg:first-child { border-left: 0; }
.invt-seg.active { color: var(--ds-navy, #1d2b4f); background: var(--ds-gold-tint, #fbf3df); }
.invt-seg:focus-visible { outline: 2px solid var(--ds-navy, #1d2b4f); outline-offset: -2px; }

/* wave353 — List view: one compact row per item */
.invt-list { display: flex; flex-direction: column; background: var(--ds-card, #fff); border: 1px solid var(--ds-line, #e3e3e8); border-radius: 10px; overflow: hidden; }
.invt-lrow { display: grid; grid-template-columns: 40px minmax(0, 2fr) minmax(0, 1.3fr) minmax(0, 1.2fr) minmax(0, 1fr); gap: 12px; align-items: center; padding: 6px 12px; border-top: 1px solid var(--ds-line, #e3e3e8); border-left: 4px solid transparent; cursor: pointer; min-width: 0; }
.invt-list-ops .invt-lrow { grid-template-columns: 40px minmax(0, 2fr) minmax(0, 1.3fr) minmax(0, 1.2fr) minmax(0, 1fr) 96px; }
.invt-lrow:first-child { border-top: 0; }
.invt-lrow:hover { background: var(--ds-tint, #f6f6f8); }
.invt-lrow:focus-visible { outline: 2px solid var(--ds-navy, #1d2b4f); outline-offset: -2px; }
.invt-lrow.invt-st-out_for_repair { border-left-color: var(--ds-gold-strong, #b8892b); }
.invt-lrow.invt-st-out_of_service, .invt-lrow.invt-st-missing { border-left-color: #c0392b; }
.invt-lrow .invt-pic { width: 40px; height: 40px; border-radius: 6px; }
.invt-lrow .invt-name { font-size: 14px; }
.invt-lchips { margin-top: 0; }
.invt-lwhere, .invt-lchk { font-size: 12.5px; color: var(--ds-muted, #666); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.invt-lwhere i { color: var(--ds-faint, #888); }
.invt-lval { font-size: 13px; font-weight: 600; text-align: right; color: var(--ds-ink, #222); font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  .invt-lrow, .invt-list-ops .invt-lrow { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .invt-lrow > .invt-lchips { grid-column: 2; }
  .invt-lrow > .invt-lwhere, .invt-lrow > .invt-lchk { display: none; }
  .invt-lrow > .invt-lval { grid-column: 3; grid-row: 1; }
}

/* wave353 — Grid view: picture-led tiles, large or small */
.invt-tiles { display: grid; gap: 10px; }
.invt-tiles-large { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.invt-tiles-small { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; }
.invt-tile { display: flex; flex-direction: column; background: var(--ds-card, #fff); border: 1px solid var(--ds-line, #e3e3e8); border-radius: 10px; padding: 8px; cursor: pointer; min-width: 0; }
.invt-tile:hover { border-color: var(--ds-line-strong, #c9c9d2); }
.invt-tile:focus-visible { outline: 2px solid var(--ds-navy, #1d2b4f); outline-offset: 2px; }
.invt-tile.invt-st-out_for_repair { box-shadow: inset 0 -3px 0 var(--ds-gold-strong, #b8892b); }
.invt-tile.invt-st-out_of_service, .invt-tile.invt-st-missing { box-shadow: inset 0 -3px 0 #c0392b; }
.invt-tile .invt-pic { width: 100%; height: auto; aspect-ratio: 1 / 1; border-radius: 7px; }
.invt-tile .invt-ph svg { width: 42%; height: 42%; }
.invt-tname { font-weight: 600; color: var(--ds-navy, #1d2b4f); font-size: 13.5px; line-height: 1.3; margin-top: 7px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.invt-tile-small { padding: 6px; }
.invt-tile-small .invt-tname { font-size: 12.5px; margin-top: 5px; }
.invt-tile-small .invt-chips { margin-top: 4px; }
.invt-tile-small .invt-chip { font-size: 10.5px; padding: 1px 6px; }
.invt-tile .invt-chip { white-space: normal; }
@media (max-width: 560px) {
  .invt-tiles-large { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .invt-tiles-small { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .invt-viewsw { margin-left: 0; }
}

/* wave353 — editor: link autofill, bought on, warranty.
 * wave363: the autofill entry wears the house ✦ doorway banner
 * (.aib-head family, project-summary-ai.css) — .invt-af now only
 * carries the spacing; the banner classes paint it. */
.invt-af { margin-bottom: 10px; align-items: flex-start; }
.invt-af .invt-f { margin-top: 8px; }
.invt-af .addie-open { flex: 0 0 auto; }
.invt-afrow { display: flex; gap: 6px; }
.invt-afrow input { flex: 1; min-width: 0; }
.invt-afout:empty { display: none; }
.invt-afout { font-size: 13px; color: var(--ds-ink, #222); margin: -2px 0 10px; display: flex; flex-direction: column; gap: 6px; }
.invt-afnote { color: var(--ds-muted, #666); font-size: 12.5px; }
.invt-afbad { color: #8a2b20; }
.invt-afprice { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.invt-afprice b { font-variant-numeric: tabular-nums; }
.invt-afphoto { display: flex; gap: 10px; align-items: center; }
.invt-afphoto img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--ds-line, #e3e3e8); }
.invt-afphoto label { display: flex; gap: 6px; align-items: center; font-size: 13px; }
.invt-yr { display: flex; gap: 6px; align-items: center; font-size: 12.5px; font-weight: 400; color: var(--ds-ink, #222); margin-top: 2px; }
.invt-f .invt-yr input { width: auto; padding: 0; margin: 0; }
.invt-bmark { display: inline-block; align-self: flex-start; font-size: 11.5px; font-weight: 700; color: #2e5d7d; background: #e9f1f7; border-radius: 999px; padding: 2px 9px; }
.invt-wout { font-size: 12.5px; font-weight: 600; color: var(--ds-muted, #666); min-height: 16px; }

/* wave353 — import + insurance export dialogs (inventory-io.js) */
.invt-dlg-xwide { width: min(1080px, 100%); }
.invt-steps { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 4px; }
.invt-file { font: inherit; font-size: 13.5px; }
.invt-imp-sum { font-size: 13.5px; color: var(--ds-ink, #222); margin: 10px 0 6px; }
.invt-imp-wrap { max-height: 52vh; overflow: auto; border: 1px solid var(--ds-line, #e3e3e8); border-radius: 10px; }
.invt-imp { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.invt-imp th { position: sticky; top: 0; background: var(--ds-tint, #f3f3f6); color: var(--ds-muted, #555); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; text-align: left; padding: 6px 8px; white-space: nowrap; }
.invt-imp td { padding: 6px 8px; border-top: 1px solid var(--ds-line, #e3e3e8); vertical-align: top; color: var(--ds-ink, #222); overflow-wrap: anywhere; }
.invt-imp tr.invt-imp-out td { color: var(--ds-faint, #888); background: #fafafb; }
.invt-imp td.n { font-variant-numeric: tabular-nums; white-space: nowrap; }
.invt-flag { display: block; font-size: 11.5px; font-weight: 600; border-radius: 6px; padding: 2px 6px; margin: 0 0 3px; color: #2e5d7d; background: #e9f1f7; }
.invt-flag-dup, .invt-flag-bad { color: #8a2b20; background: #fbecea; }
.invt-flag-new { color: #8a5a00; background: var(--ds-gold-tint, #fbf3df); }
.invt-exp-doc { border: 1px solid var(--ds-line, #e3e3e8); border-radius: 10px; padding: 12px 14px; margin: 8px 0; max-height: 46vh; overflow: auto; }
.invt-exp-co { font-weight: 700; color: var(--ds-navy, #1d2b4f); }
.invt-exp-title { font-size: 15px; font-weight: 700; color: var(--ds-ink, #222); margin: 2px 0; }
.invt-exp-line { font-size: 12.5px; color: var(--ds-muted, #666); margin: 2px 0; line-height: 1.45; }
.invt-exp-fence { font-size: 12.5px; font-weight: 600; color: #6b4700; background: var(--ds-gold-tint, #fbf3df); border-radius: 6px; padding: 4px 8px; margin: 6px 0; display: inline-block; }
.invt-exp-more { font-size: 12px; color: var(--ds-faint, #888); margin-top: 6px; }
.invt-exp-total { font-weight: 700; text-align: right; margin-top: 8px; font-variant-numeric: tabular-nums; }

/* wave356: the item editor's photo preview (Edit item) — the card frame's
   .invt-img is absolutely positioned; in the form it stands in flow. */
.invt-e-photo { margin: 4px 0 10px; }
.invt-e-photo .invt-img { position: static; display: block; width: 100%; height: 190px; object-fit: cover; border-radius: 10px; }
.invt-e-photo .invt-img[hidden] { display: none; }
.invt-e-photo p { margin: 6px 0 0; }

/* ---- wave590-fullwidth (2026-11-11): the wrapper cap comes off
 * in EVERY rail state. Micheal ruled 2026-10-16 that every
 * portal screen fills the whole window; the shell cap came off
 * then, but this page kept its own 1320px wrapper cap. The
 * Nov 10 fix (wave550, in styles.css) lifted the cap only while
 * the rail was collapsed — his 2026-11-11 screenshot shows
 * Inventory with the sidebar EXPANDED, stopped mid-screen
 * ("same with inventory"), so the collapsed-only lift is
 * superseded: uncapped here, by source order, in all states.
 * The card grid inside is fluid (auto-fill minmax 290px/1fr),
 * so the page genuinely widens. ---- */
.invt-wrap { max-width: none; }

/* wave679 — holder chip (cards, list rows, tiles): who has the tool, at a glance */
.invt-chip-out { color: #fff; background: var(--ds-navy, #1d2b4f); }

/* wave679 — Materials tab: counted consumable stock, separate from the tool register */
.invt-mhead { margin-bottom: 10px; }
.invt-mrow { display: grid; grid-template-columns: minmax(0, 2fr) auto auto; gap: 12px; align-items: center;
  background: var(--ds-card, #fff); border: 1px solid var(--ds-line, #e3e3e8); border-radius: 10px; padding: 10px 12px; }
.invt-mmain { min-width: 0; }
.invt-mcount { font-variant-numeric: tabular-nums; color: var(--ds-ink, #222); white-space: nowrap; }
.invt-mqty { font-size: 20px; font-weight: 700; color: var(--ds-navy, #1d2b4f); }
.invt-munit { font-size: 13px; color: var(--ds-muted, #666); }
.invt-macts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.invt-mbtn { font: inherit; font-size: 16px; font-weight: 700; line-height: 1; width: 30px; height: 30px; border: 1px solid var(--ds-line-strong, #c9c9d2); background: var(--ds-fill, #fff); border-radius: 8px; cursor: pointer; color: var(--ds-navy, #1d2b4f); }
.invt-mbtn:hover { border-color: var(--ds-navy, #1d2b4f); }
.invt-mbtn:disabled { opacity: .5; cursor: default; }
@media (max-width: 900px) {
  .invt-mrow { grid-template-columns: minmax(0, 1fr) auto; }
  .invt-macts { grid-column: 1 / -1; justify-content: flex-start; }
}

/* wave679 — the record's check-out section */
.invt-stockbox { margin-top: 6px; }
.invt-coacts { border-top: 0; padding-top: 0; margin-top: 8px; }
