/* Inventory-scoped presentation. These rules are intentionally unlayered so the
   readable control text and target sizes win over the existing unlayered
   sample-dashboard rules. They never depend on .ui-preview and never restyle
   the sample-order dashboard. */
  /* Labels, controls and data use the readable floral control size and at least
     44px targets. */
  .inventory-page {
    --inventory-gap: var(--space-md);
  }

  .inventory-page .ad-main {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    min-width: 0;
    max-width: 100%;
  }

  .inventory-page .ad-main > * {
    min-width: 0;
    max-width: 100%;
  }

  /* The shared shell keeps its geometry; inventory pages raise its small draft
     typography to the readable control size without changing sample screens. */
  .inventory-page .ad-nav-label,
  .inventory-page .ad-nav-link,
  .inventory-page .ad-management .ad-nav-link,
  .inventory-page .ad-topbar,
  .inventory-page .ad-account,
  .inventory-page .ad-account small,
  .inventory-page .ad-demo-notice,
  .inventory-page .ad-demo-notice p,
  .inventory-page .ad-footer {
    font-size: var(--floral-control-text);
    line-height: 1.4;
  }

  .inventory-page .ad-nav-link {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .inventory-page .ad-topbar {
    height: auto;
    min-height: 4.75rem;
    flex-wrap: wrap;
    padding-block: var(--space-xs);
  }

  .inventory-page .ad-topbar > span,
  .inventory-page .ad-account,
  .inventory-page .ad-account > span {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .inventory-page .ad-account {
    flex-wrap: wrap;
    min-height: 44px;
  }

  .inventory-page .ad-account-menu nav :is(a, button) {
    display: flex;
    align-items: center;
    min-height: 44px;
    font-size: var(--floral-control-text);
  }

  .inventory-page .ad-impersonation {
    flex-wrap: wrap;
    gap: var(--space-xs);
    font-size: var(--floral-control-text);
    line-height: 1.4;
  }

  .inventory-page .ad-impersonation button {
    min-width: 44px;
    min-height: 44px;
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--floral-control-text);
  }

  /* Unlayered readable overrides for labels, controls, data and shell text.
     The existing sample dashboard keeps its own small typography. */
  .inventory-page :is(input, select, textarea, button, label, legend, dt, dd, th, td) {
    font-size: var(--floral-control-text);
  }

  /* The shared shell's skip link keeps its layout but matches the readable
     inventory control size; measured on the real technical recipe page. */
  .inventory-page .ad-skip {
    font-size: var(--floral-control-text);
  }

  .inventory-page :is(
    .inventory-text-link,
    .inventory-back-link,
    .inventory-reference,
    .inventory-table-note,
    .ui-floral-table__reference,
    .ui-floral-feedback__title,
    .ui-floral-feedback__message,
    .ui-floral-feedback__items li,
    .ui-floral-record__title,
    .ui-floral-record__reference,
    .ui-floral-record__field dt,
    .ui-floral-record__field dd,
    .ad-nav-link,
    .ad-nav-label,
    .ad-topbar,
    .ad-account,
    .ad-account small,
    .ad-demo-notice,
    .ad-demo-notice p,
    .ad-footer,
    .ad-impersonation
  ) {
    font-size: var(--floral-control-text);
  }

  /* The unlayered sample shell resets every anchor color. Restore the
     button-link appearance (especially the primary link on a dark surface). */
  .inventory-page a.ui-floral-button {
    color: var(--button-paper);
  }

  .inventory-page a.ui-floral-button--secondary,
  .inventory-page a.ui-floral-button--outline,
  .inventory-page a.ui-floral-button--text {
    color: var(--button-ink);
  }

  .inventory-page a.ui-floral-button--text {
    text-decoration: underline;
  }

  .inventory-page a.ui-floral-button--destructive {
    color: var(--floral-danger);
  }

  .inventory-page :is(.inventory-text-link, .inventory-back-link) {
    color: var(--floral-rose);
  }

  .inventory-page .ad-demo-notice {
    flex-wrap: wrap;
    gap: var(--space-xs);
  }

  .inventory-page .ad-footer {
    flex-wrap: wrap;
    gap: var(--space-xs);
  }

  .inventory-page-heading {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    min-width: 0;
    padding-block: var(--space-sm) 0;
  }

  .inventory-page-heading h1 {
    margin: 0;
    color: var(--floral-ink);
    font-family: var(--floral-serif);
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 400;
    letter-spacing: -0.045em;
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  .inventory-eyebrow {
    margin: 0;
    color: var(--floral-muted);
    font-family: var(--floral-sans);
    font-size: var(--floral-control-text);
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-transform: uppercase;
  }

  .inventory-intro,
  .inventory-note,
  .inventory-section-note,
  .inventory-result-count {
    margin: 0;
    color: var(--floral-muted);
    font-family: var(--floral-sans);
    font-size: var(--floral-control-text);
    line-height: 1.6;
    overflow-wrap: anywhere;
  }

  .inventory-note {
    padding: var(--space-sm);
    border-left: 3px solid var(--floral-line);
    background: var(--floral-sage-paper);
  }

  .inventory-location-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-sm);
    min-width: 0;
    padding: var(--space-sm);
    border: 1px solid var(--floral-line);
    border-radius: var(--floral-control-radius);
    background: var(--floral-paper);
  }

  .inventory-location-header__identity {
    min-width: 0;
  }

  .inventory-location-name {
    margin: var(--space-3xs) 0 0;
    color: var(--floral-ink);
    font-family: var(--floral-sans);
    font-size: var(--floral-control-text);
    line-height: 1.5;
    overflow-wrap: anywhere;
  }

  .inventory-location-code {
    color: var(--floral-muted);
    font-weight: 400;
  }

  .inventory-units-note {
    flex: 1 1 18rem;
    min-width: 0;
    margin: 0;
    color: var(--floral-muted);
    font-family: var(--floral-sans);
    font-size: var(--floral-control-text);
    line-height: 1.5;
  }

  .inventory-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--space-sm);
    min-width: 0;
    padding: var(--space-sm);
    border: 1px solid var(--floral-line);
    border-radius: var(--floral-control-radius);
    background: var(--floral-paper);
  }

  .inventory-filter-field {
    display: flex;
    flex: 1 1 13rem;
    flex-direction: column;
    gap: var(--space-3xs);
    min-width: 0;
  }

  .inventory-filter-field label {
    color: var(--floral-ink);
    font-family: var(--floral-sans);
    font-size: var(--floral-control-text);
    line-height: 1.4;
  }

  .inventory-filter-field :is(input, select) {
    width: 100%;
    min-width: 0;
    min-height: max(44px, var(--floral-control-height));
    padding: var(--space-xs) var(--space-sm);
    border: 1px solid var(--floral-line);
    border-radius: var(--floral-control-radius);
    background: var(--floral-paper);
    color: var(--floral-ink);
    font-family: var(--floral-sans);
    font-size: var(--floral-control-text);
    line-height: 1.4;
  }

  .inventory-filter-field :is(input, select):focus-visible {
    outline: 2px solid var(--floral-ink);
    outline-offset: 2px;
  }

  .inventory-table-scroll {
    max-width: 100%;
    overflow-x: auto;
  }

  .inventory-record-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    min-width: 0;
  }

  .inventory-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: var(--space-sm);
    min-width: 0;
  }

  .inventory-summary-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-3xs);
    min-width: 0;
    padding: var(--space-sm);
    border: 1px solid var(--floral-line);
    border-radius: var(--floral-control-radius);
    background: var(--floral-paper);
  }

  .inventory-summary-card p,
  .inventory-summary-card span {
    margin: 0;
    color: var(--floral-muted);
    font-family: var(--floral-sans);
    font-size: var(--floral-control-text);
    line-height: 1.4;
  }

  .inventory-summary-card strong {
    color: var(--floral-ink);
    font-family: var(--floral-sans);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .inventory-actions,
  .inventory-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
    min-width: 0;
  }

  .inventory-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    min-width: 0;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--floral-line);
  }

  .inventory-section h2 {
    margin: 0;
    color: var(--floral-ink);
    font-family: var(--floral-serif);
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    font-weight: 400;
    letter-spacing: -0.03em;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .inventory-location-list,
  .inventory-grant-list,
  .inventory-steps {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .inventory-location-list__item,
  .inventory-grant-list__item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    min-width: 0;
    padding: var(--space-sm);
    border: 1px solid var(--floral-line);
    border-radius: var(--floral-control-radius);
    background: var(--floral-paper);
  }

  .inventory-location-list__identity,
  .inventory-grant-list__identity {
    display: flex;
    flex: 1 1 16rem;
    flex-direction: column;
    gap: var(--space-3xs);
    min-width: 0;
  }

  .inventory-location-list__identity strong,
  .inventory-grant-list__identity strong {
    color: var(--floral-ink);
    font-family: var(--floral-sans);
    font-size: var(--floral-control-text);
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  .inventory-location-list__identity span,
  .inventory-grant-list__identity span,
  .inventory-grant-list__identity p {
    margin: 0;
    color: var(--floral-muted);
    font-family: var(--floral-sans);
    font-size: var(--floral-control-text);
    line-height: 1.5;
    overflow-wrap: anywhere;
  }

  .inventory-grant-list__identity p {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2xs);
  }

  .inventory-grant-list__reason {
    color: var(--floral-ink) !important;
  }

  .inventory-grant-list--history .inventory-grant-list__item {
    background: var(--floral-sage-paper);
  }

  .inventory-inline-form {
    display: flex;
    flex: 1 1 18rem;
    flex-direction: column;
    gap: var(--space-xs);
    min-width: 0;
    padding: var(--space-sm);
    border: 1px solid var(--floral-line);
    border-radius: var(--floral-control-radius);
    background: var(--floral-blush);
  }

  .inventory-inline-form .input {
    min-width: 0;
  }

  .inventory-inline-form textarea {
    width: 100%;
    min-width: 0;
    min-height: max(44px, 5rem);
    padding: var(--space-xs) var(--space-sm);
    border: 1px solid var(--floral-line);
    border-radius: var(--floral-control-radius);
    background: var(--floral-paper);
    color: var(--floral-ink);
    font-family: var(--floral-sans);
    font-size: var(--floral-control-text);
    line-height: 1.4;
  }

  .inventory-inline-form textarea:focus-visible {
    outline: 2px solid var(--floral-ink);
    outline-offset: 2px;
  }

  .inventory-setup-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
  }

  .inventory-steps {
    margin: 0;
    padding-left: 1.4rem;
    list-style: decimal;
  }

  .inventory-steps li {
    min-width: 0;
    color: var(--floral-ink);
    font-family: var(--floral-sans);
    font-size: var(--floral-control-text);
    line-height: 1.6;
    overflow-wrap: anywhere;
  }

  .inventory-steps li strong {
    font-weight: 600;
  }

  .inventory-history {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .inventory-history__item {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs);
    min-width: 0;
    padding: var(--space-sm);
    border: 1px solid var(--floral-line);
    border-radius: var(--floral-control-radius);
    background: var(--floral-paper);
  }

  .inventory-history__header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-2xs) var(--space-sm);
    min-width: 0;
  }

  .inventory-history__header strong {
    color: var(--floral-ink);
    font-family: var(--floral-sans);
    font-size: var(--floral-control-text);
    font-weight: 600;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  .inventory-history__header time,
  .inventory-history__actor,
  .inventory-history__reason {
    margin: 0;
    color: var(--floral-muted);
    font-family: var(--floral-sans);
    font-size: var(--floral-control-text);
    line-height: 1.5;
    overflow-wrap: anywhere;
  }

  .inventory-history__reason {
    color: var(--floral-ink);
  }

  .inventory-history__facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: var(--space-2xs) var(--space-sm);
    min-width: 0;
    margin: 0;
  }

  .inventory-history__facts div {
    min-width: 0;
  }

  .inventory-history__facts dt {
    color: var(--floral-muted);
    font-family: var(--floral-sans);
    font-size: var(--floral-control-text);
    line-height: 1.4;
  }

  .inventory-history__facts dd {
    margin: 0;
    color: var(--floral-ink);
    font-family: var(--floral-sans);
    font-size: var(--floral-control-text);
    font-variant-numeric: tabular-nums;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  .inventory-text-link,
  .inventory-back-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    min-width: 44px;
    color: var(--floral-rose);
    font-family: var(--floral-sans);
    font-size: var(--floral-control-text);
    font-weight: 600;
    line-height: 1.4;
    text-decoration: underline;
    text-underline-offset: 0.15em;
    overflow-wrap: anywhere;
  }

  .inventory-text-link:focus-visible,
  .inventory-back-link:focus-visible {
    outline: 2px solid var(--floral-ink);
    outline-offset: 2px;
  }

  .inventory-field-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: var(--space-sm);
    min-width: 0;
  }

  .inventory-field-row > .input {
    min-width: 0;
  }

  .inventory-field-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs);
    min-width: 0;
    margin: 0;
    padding: var(--space-sm);
    border: 1px solid var(--floral-line);
    border-radius: var(--floral-control-radius);
    background: var(--floral-paper);
  }

  .inventory-field-group legend {
    padding-inline: var(--space-3xs);
    color: var(--floral-ink);
    font-family: var(--floral-sans);
    font-size: var(--floral-control-text);
    font-weight: 600;
    line-height: 1.4;
  }

  .inventory-field-group__hint {
    margin: 0;
    color: var(--floral-muted);
    font-family: var(--floral-sans);
    font-size: var(--floral-control-text);
    line-height: 1.6;
    overflow-wrap: anywhere;
  }

  .inventory-detail-flags {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3xs);
    min-width: 0;
  }

  .inventory-unit-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .inventory-unit-list__item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    min-width: 0;
    padding: var(--space-sm);
    border: 1px solid var(--floral-line);
    border-radius: var(--floral-control-radius);
    background: var(--floral-paper);
  }

  .inventory-unit-list__identity {
    display: flex;
    flex: 1 1 18rem;
    flex-direction: column;
    gap: var(--space-3xs);
    min-width: 0;
  }

  .inventory-unit-list__identity strong {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3xs);
    color: var(--floral-ink);
    font-family: var(--floral-sans);
    font-size: var(--floral-control-text);
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  .inventory-unit-list__identity span,
  .inventory-unit-list__identity p {
    margin: 0;
    color: var(--floral-muted);
    font-family: var(--floral-sans);
    font-size: var(--floral-control-text);
    line-height: 1.5;
    overflow-wrap: anywhere;
  }

  .inventory-unit-list__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-xs);
    min-width: 0;
  }

  .inventory-reference {
    color: var(--floral-muted);
    font-family: var(--floral-sans);
    font-size: var(--floral-control-text);
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  .inventory-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .inventory-form-shell,
  .inventory-review,
  .inventory-item-identity {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    min-width: 0;
    max-width: 100%;
    padding: var(--space-md);
    border: 1px solid var(--floral-line);
    border-radius: var(--floral-control-radius);
    background: var(--floral-paper);
  }

  .inventory-item-identity h2,
  .inventory-form-shell h2,
  .inventory-review h2 {
    margin: 0;
    color: var(--floral-ink);
    font-family: var(--floral-serif);
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    font-weight: 400;
    letter-spacing: -0.03em;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .inventory-item-identity p {
    margin: 0;
    color: var(--floral-muted);
    font-family: var(--floral-sans);
    font-size: var(--floral-control-text);
    line-height: 1.6;
    overflow-wrap: anywhere;
  }

  .inventory-review {
    border-color: var(--floral-rose);
    background: var(--floral-blush);
  }

  .inventory-review__facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: var(--space-2xs) var(--space-sm);
    min-width: 0;
    margin: 0;
  }

  .inventory-review__facts div {
    min-width: 0;
  }

  .inventory-review__facts dt {
    color: var(--floral-muted);
    font-family: var(--floral-sans);
    font-size: var(--floral-control-text);
    line-height: 1.4;
  }

  .inventory-review__facts dd {
    margin: 0;
    color: var(--floral-ink);
    font-family: var(--floral-sans);
    font-size: var(--floral-control-text);
    font-variant-numeric: tabular-nums;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }

  .inventory-review-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
    min-width: 0;
  }

  .inventory-movements-table td,
  .inventory-movements-table th {
    vertical-align: top;
  }

  .inventory-table-note {
    display: block;
    margin-top: var(--space-3xs);
    color: var(--floral-muted);
    font-family: var(--floral-sans);
    font-size: var(--floral-control-text);
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  .inventory-movement-line,
  .inventory-event-line {
    border-left: 3px solid var(--floral-line);
  }

  .inventory-operation-form,
  .inventory-count-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    min-width: 0;
  }

  .inventory-form-actions form {
    display: inline-flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    min-width: 0;
    margin: 0;
  }

  @media (max-width: 56.25rem) {
    .inventory-page .ad-topbar {
      min-height: 0;
    }

    .inventory-page .ad-demo-notice {
      align-items: flex-start;
    }

    .inventory-page .ad-nav {
      flex-wrap: wrap;
      overflow: visible;
    }

    .inventory-page .ad-nav-link {
      flex: 1 1 12rem;
    }
  }

  @media (max-width: 37.5rem) {
    .inventory-filters {
      align-items: stretch;
      flex-direction: column;
    }

    .inventory-filter-field {
      flex: 0 0 auto;
    }

    .inventory-filters > .ui-floral-button,
    .inventory-filters > .ui-floral-button--text {
      width: 100%;
    }

    .inventory-location-list__item,
    .inventory-grant-list__item,
    .inventory-unit-list__item {
      align-items: stretch;
      flex-direction: column;
    }

    .inventory-location-list__item > .ui-floral-button,
    .inventory-inline-form {
      width: 100%;
    }

    .inventory-unit-list__actions .inventory-text-link {
      width: 100%;
    }

    .inventory-actions,
    .inventory-form-actions,
    .inventory-review-actions {
      align-items: stretch;
      flex-direction: column;
    }

    .inventory-actions > .ui-floral-button,
    .inventory-form-actions > .ui-floral-button,
    .inventory-form-actions > .ui-floral-button--text,
    .inventory-review-actions > .ui-floral-button,
    .inventory-review-actions > .ui-floral-button--text {
      width: 100%;
    }

    .inventory-form-actions form,
    .inventory-inline-form {
      width: 100%;
    }

    .inventory-form-actions form > .ui-floral-button {
      width: 100%;
    }

    .inventory-form-shell,
    .inventory-review,
    .inventory-item-identity {
      padding: var(--space-sm);
    }
  }

/* Task 4 recipe revisions and material reservations. Scoped to the existing
   inventory wrapper; no global control or shell styles change. */
.inventory-page .inventory-recipe-lines {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  min-width: 0;
}

.inventory-page .inventory-recipe-line {
  border-left: 3px solid var(--floral-rose);
}

.inventory-page .inventory-recipe-line__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
  min-width: 0;
}

.inventory-page .inventory-material-line {
  border-left: 3px solid var(--floral-line);
}

.inventory-page .inventory-reservations-table td,
.inventory-page .inventory-reservations-table th {
  vertical-align: top;
}

.inventory-page .inventory-reservations-table .inventory-table-note {
  display: block;
  overflow-wrap: anywhere;
}

@media (max-width: 37.5rem) {
  .inventory-page .inventory-recipe-line__actions > .ui-floral-button {
    width: 100%;
  }
}

/* Task 4 assembly and finished-piece presentation. Additive and scoped to the
   existing inventory wrapper; no shared shell, input or theme rule changes. */
.inventory-page .inventory-assembly-choices {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  min-width: 0;
}

.inventory-page .inventory-assembly-planned {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  min-width: 0;
  margin-block-end: var(--space-sm);
}

.inventory-page .inventory-assembly-planned h3 {
  margin: 0;
  color: var(--floral-ink);
  font-family: var(--floral-serif);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 400;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.inventory-page .inventory-assemblies-table td,
.inventory-page .inventory-assemblies-table th {
  vertical-align: top;
  overflow-wrap: anywhere;
}

/* Keep the desktop column labels whole; narrow phones use the labeled
   record cards instead of this table. */
.inventory-page .inventory-assemblies-table th {
  overflow-wrap: normal;
}

.inventory-page .inventory-assemblies-table .inventory-table-note {
  display: block;
  overflow-wrap: anywhere;
}

@media (max-width: 37.5rem) {
  .inventory-page .inventory-assembly-choices,
  .inventory-page .inventory-assembly-planned {
    gap: var(--space-sm);
  }
}

/* --- Transfers (Task 5) scoped presentation ---------------------------- */
/* Only transfer-specific classes are introduced; shared table, record, card,
   feedback, button and form components keep their existing appearance. */
.inventory-page .inventory-transfer-route {
  display: inline;
  overflow-wrap: anywhere;
}

.inventory-page .inventory-transfer-form .inventory-review__facts {
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.inventory-page .inventory-transfer-form .inventory-review__facts dd input[readonly] {
  width: 100%;
  max-width: 100%;
  min-height: max(44px, var(--floral-control-height));
  padding: var(--space-xs) var(--space-sm);
  border: 1px solid var(--floral-line);
  border-radius: var(--floral-control-radius);
  background: var(--floral-sage-paper);
  color: var(--floral-ink);
  font-family: var(--floral-sans);
  font-size: var(--floral-control-text);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

@media (max-width: 56.25rem) {
  .inventory-page .inventory-transfer-form .inventory-review__facts {
    grid-template-columns: 1fr;
  }
}

.inventory-page .inventory-transfer-lines .inventory-transfer-line {
  min-width: 0;
}

.inventory-page .inventory-transfer-plan-table td,
.inventory-page .inventory-transfer-plan-table th,
.inventory-page .inventory-transfer-preview-table td,
.inventory-page .inventory-transfer-preview-table th {
  vertical-align: top;
  overflow-wrap: anywhere;
}

.inventory-page .inventory-transfer-plan-table .inventory-table-note,
.inventory-page .inventory-transfer-preview-table .inventory-table-note {
  display: block;
  overflow-wrap: anywhere;
}

.inventory-page .inventory-transfer-form .inventory-note,
.inventory-page .inventory-transfer-lines .inventory-field-group__hint {
  overflow-wrap: anywhere;
}

/* Task 5 read-only plan/preview tables keep whole words and use the desktop
   content width; the existing table-scroll wrapper still handles overflow. */
.inventory-page .inventory-transfer-plan-form {
  max-width: none;
}

.inventory-page .inventory-transfer-plan-table,
.inventory-page .inventory-transfer-preview-table {
  overflow-wrap: normal;
}

.inventory-page .inventory-transfer-plan-table th,
.inventory-page .inventory-transfer-plan-table td,
.inventory-page .inventory-transfer-preview-table th,
.inventory-page .inventory-transfer-preview-table td {
  overflow-wrap: normal;
}

.inventory-page .inventory-transfer-plan-table .ui-floral-table__reference,
.inventory-page .inventory-transfer-preview-table .ui-floral-table__reference {
  overflow-wrap: anywhere;
}

.inventory-page .inventory-transfer-preview-table th,
.inventory-page .inventory-transfer-preview-table td {
  padding-inline: var(--space-xs);
}

.inventory-page .inventory-transfers-table th,
.inventory-page .inventory-transfers-table td {
  padding-inline: var(--space-xs);
}

.inventory-page .inventory-transfers-table .ui-floral-badge,
.inventory-page .inventory-transfer-plan-table .ui-floral-badge,
.inventory-page .inventory-transfer-preview-table .ui-floral-badge {
  white-space: nowrap;
}

/* Task 5 full receipt: discrepancy explanation and per-line full-receipt mark. */
.inventory-page .inventory-transfer-discrepancy {
  margin-block: var(--space-3, 0.75rem);
  padding: var(--space-3, 0.75rem);
  border: 1px solid var(--color-warning-border, currentColor);
  border-radius: var(--radius-2, 0.5rem);
  overflow-wrap: anywhere;
}

.inventory-page .inventory-transfer-discrepancy summary {
  cursor: pointer;
  font-family: var(--floral-sans);
  font-size: var(--floral-control-text);
  font-weight: 600;
  line-height: 1.4;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.inventory-page .inventory-transfer-discrepancy:focus-within {
  outline: 2px solid var(--color-focus-ring, currentColor);
  outline-offset: 2px;
}

.inventory-page .inventory-transfer-full-receipt {
  display: inline-block;
  font-weight: 600;
  overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
  .inventory-page .inventory-transfer-discrepancy {
    transition: none;
  }
}
