.inventory-page { max-width: none; }
.inventory-tools { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.inventory-search { flex: 1; margin: 0; }
.inventory-tools > .text-link { white-space: nowrap; font-size: var(--text-dense); }
.inventory-sheet-caption { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 12px; color: var(--muted); font-size: var(--text-meta); }
.inventory-sheet-caption > p { margin: 0; }
.inventory-guide { position: relative; flex: 0 0 auto; }
.inventory-guide > summary { min-height: var(--control-height); display: flex; align-items: center; cursor: pointer; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.inventory-guide > summary:hover { color: var(--accent); }
.inventory-guide > p { position: absolute; right: 0; top: 100%; z-index: 6; width: min(360px, calc(100vw - 40px)); margin: 0; padding: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-menu); font-size: var(--text-dense); line-height: 1.6; }
.inventory-sheet-scroll { height: var(--inventory-draft-height, auto); max-height: calc(100dvh - 300px); min-height: 180px; padding-bottom: var(--inventory-draft-clearance, 0px); }
.inventory-sheet { --inventory-actions-width: 80px; min-width: 1040px; table-layout: fixed; }
.inventory-sheet .inventory-actions { width: var(--inventory-actions-width); }
.inventory-sheet > thead th:first-child { width: 25%; }
.inventory-sheet > thead th:nth-child(2) { width: 92px; }
.inventory-sheet > thead th:nth-child(3) { width: 98px; }
.inventory-sheet > thead th:nth-child(4) { width: 116px; }
.inventory-sheet > thead th:nth-child(5) { width: auto; }
.inventory-sheet > thead th:nth-child(6) { width: 116px; }
.inventory-product-block + .inventory-product-block .inventory-product-heading > th { border-top: 1px solid var(--line); }
.inventory-product-heading > th { padding: var(--cell-padding-y) var(--cell-padding-x); background: var(--paper); border-bottom: 1px solid var(--line); font-weight: 600; text-align: left; }
.inventory-product-heading__content { display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 48px; }
.inventory-product-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.inventory-product-label { display: grid; gap: 4px; min-width: 0; }
.inventory-product-name { color: var(--ink); white-space: normal; overflow-wrap: anywhere; text-decoration: none; }
a.inventory-product-name:hover { color: var(--accent); text-decoration: underline; }
.inventory-product-count { color: var(--muted); font-size: var(--text-meta); font-weight: 400; }
.inventory-product-image-state { color: var(--ink); font-size: var(--text-meta); font-weight: 500; }
.inventory-add-image { display: inline-flex; align-items: center; min-height: 44px; margin-right: 8px; white-space: nowrap; font-size: var(--text-meta); }
.inventory-product-photo { flex: 0 0 48px; width: 48px; height: 48px; display: block; background: var(--surface); border: 1px solid var(--line); }
.inventory-product-photo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.inventory-product-photo__empty { display: flex; height: 100%; align-items: center; justify-content: center; color: var(--muted); }
.inventory-product-photo__empty > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.inventory-product-actions { position: sticky; right: 0; background: var(--paper); display: flex; align-items: center; flex: 0 0 auto; gap: 8px; font-weight: 400; }
.workspace-shell .order-actions-menu .inventory-product-menu-add { display: none; }
.inventory-add-component > span { font-size: var(--title-panel); line-height: 1; }
.inventory-part-identity { display: flex; align-items: center; gap: 8px; min-width: 0; }
.inventory-part-name { display: block; min-width: 0; color: var(--ink); font-weight: 500; white-space: normal; overflow-wrap: anywhere; text-decoration: none; }
a.inventory-part-name:hover { color: var(--accent); text-decoration: underline; }
.inventory-shared { flex: 0 0 auto; font-size: var(--text-meta); color: var(--muted); }
.inventory-number { font-variant-numeric: tabular-nums; }
.inventory-muted { color: var(--muted); font-weight: 400; }

.inventory-row-actions { display: flex; align-items: center; justify-content: flex-end; }
.inventory-actions .button_to { margin: 0; }
.inventory-empty-row > td { padding: 16px; color: var(--muted); font-size: var(--text-dense); }
.inventory-footer { margin-top: 16px; color: var(--muted); font-size: var(--text-meta); }
.inventory-draft-actions[hidden] { display: none; }
.inventory-removal { margin-top: var(--space-6); padding-top: 24px; border-top: 1px solid var(--line); }
.inventory-removal h2 { margin-bottom: 12px; font-size: var(--title-section); }
.inventory-removal .field-hint { margin-bottom: 12px; }
.inventory-create-part { margin-top: 24px; }
.inventory-catalog { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface); }
.inventory-catalog > li + li { border-top: 1px solid var(--line); }
.inventory-catalog-product { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: start; gap: 16px; padding: 16px; }
.inventory-catalog-product__photo { display: block; width: 64px; height: 64px; border: 1px solid var(--line); background: var(--paper); }
.inventory-catalog-product__photo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.inventory-catalog-product__no-photo { display: grid; place-content: center; height: 100%; color: var(--muted); font: var(--text-meta)/var(--line-meta) var(--sans); text-align: center; }
.inventory-catalog-product__details { min-width: 0; }
.inventory-catalog-product__details h2 { margin: 0; color: var(--ink); font: 600 var(--title-section)/var(--line-body) var(--sans); overflow-wrap: anywhere; }
.inventory-catalog-product__count { margin: 4px 0 0; color: var(--muted); font-size: var(--text-meta); }
.inventory-catalog-product__specifications, .inventory-catalog-product__missing { max-width: var(--reading-width); margin: 12px 0 0; font-size: var(--text-dense); line-height: 1.6; overflow-wrap: anywhere; }
.inventory-catalog-product__specifications { white-space: pre-line; }
.inventory-catalog-product__missing { color: var(--muted); }
.inventory-catalog-product__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.inventory-catalog-product__actions .text-link { display: inline-flex; align-items: center; min-height: var(--control-height); font-size: var(--text-dense); }
@media (max-width: 760px) {
  .inventory-tools { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .inventory-search { flex-basis: 100%; }
  .inventory-sheet-caption { align-items: flex-start; gap: 8px; }
  .inventory-sheet-caption > p { padding-top: 8px; }
  .inventory-sheet { --inventory-actions-width: 96px; min-width: 1030px; }
  .inventory-sheet-scroll { max-height: 65dvh; }
  .inventory-sheet > thead th:first-child { width: 160px; }
  .inventory-sheet > thead th:nth-child(2) { width: 84px; }
  .inventory-product-actions > .inventory-add-component { display: none; }
  .workspace-shell .order-actions-menu .inventory-product-menu-add { display: flex; }
  .inventory-catalog-product { grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 16px 12px; }
  .inventory-catalog-product__photo { width: 48px; height: 48px; }
  .inventory-catalog-product__actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; column-gap: 24px; }
  .inventory-catalog-product__actions .text-link { min-height: 44px; }
}
.inventory-edit-page { max-width: 920px; }
.inventory-component-fields { border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface); }
.inventory-component-field { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 12px 16px; }
.inventory-component-field + .inventory-component-field { border-top: 1px solid var(--line); }
.inventory-component-field > label { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.inventory-component-field > div { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; color: var(--muted); font-size: var(--text-meta); }
.inventory-component-field .text-input { width: 90px; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .inventory-component-field { align-items: flex-start; gap: 12px; padding: 12px; }
  .inventory-component-field .text-input { font-size: var(--text-body); width: 76px; }
  .inventory-component-field > div { flex-direction: column; gap: 4px; }
}
.inventory-movements { margin-top: var(--space-6); }
.inventory-movements h2 { margin-bottom: 16px; font-size: var(--title-section); }
.inventory-movement-table { min-width: 650px; }
.inventory-refresh-status { margin: 0 0 16px; color: var(--muted); font-size: var(--text-dense); }
.inventory-refresh-status:empty { display: none; }
.order-panel .inventory-edit-page .page-header { padding-right: 48px; margin-bottom: 24px; }
.order-panel .inventory-edit-page .page-header__actions { align-self: flex-start; }
.order-panel .inventory-edit-page .form-actions { z-index: 1; border-top: 1px solid var(--line); }
.order-panel .inventory-edit-page .inventory-removal { margin-top: 24px; padding-top: 24px; }
.order-panel .inventory-edit-page .inventory-create-part { padding-top: 20px; border-top: 1px solid var(--line); }
.inventory-supplier-content { display: flex; align-items: center; min-width: 0; min-height: var(--row-height); }
.inventory-fabricator { flex: 0 1 48%; max-width: 48%; min-width: 0; margin-right: 8px; padding-left: var(--cell-padding-x); color: var(--muted); font-size: var(--text-meta); line-height: var(--line-meta); overflow: hidden; text-overflow: ellipsis; }
.inventory-supplier-content > .grid-input { flex: 1 1 0; width: 0; }
.inventory-supplier-content > span:not(.inventory-fabricator) { min-width: 0; padding-inline: var(--cell-padding-x); overflow: hidden; text-overflow: ellipsis; }

.inventory-alert-history { margin: 0 0 24px; border-block: 1px solid var(--line); scroll-margin-top: 24px; }
.inventory-alert-history > summary { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; min-height: 48px; padding: 12px 0; cursor: pointer; font-size: var(--text-ui); }
.inventory-alert-history > summary::before { content: "+"; color: var(--accent); }
.inventory-alert-history[open] > summary::before { content: "−"; }
.inventory-alert-history > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.inventory-alert-empty { padding: 0 0 20px; font-size: var(--text-ui); }
.page-tabs__count[hidden] { display: none; }
