/* Extension of the existing full-width warehouse workspace. */
@layer permission {
  #inventoryView .inventory-location-table :is(th, td),
  #inventoryView .warehouse-product-name-cell strong,
  #inventoryView .inventory-location-table .status { font-size: 14px !important; }
  #inventoryView .inventory-location-table small { font-size: 12px !important; }
  #inventoryView .warehouse-product-photo-cell { text-align: center !important; }
  #inventoryView .warehouse-product-photo-cell > :is(button, .warehouse-photo-missing) { margin-inline: auto !important; }
  #inventoryView .warehouse-product-name-cell { text-align: left !important; white-space: normal !important; overflow-wrap: anywhere; }
  #inventoryView .warehouse-photo-button { width: 66px !important; min-width: 66px !important; padding: 0 !important; }
  #inventoryView .warehouse-photo-missing button { min-height: 44px !important; font-size: 14px !important; }
  @media(min-width:981px) {
    #inventoryView .inventory-location-table { min-width: 960px !important; table-layout: auto !important; }
    #inventoryView .inventory-location-table .warehouse-product-photo-cell { width: 104px !important; min-width: 104px !important; }
    #inventoryView .inventory-location-table .warehouse-product-name-cell { width: 24% !important; min-width: 180px !important; }
    #inventoryView .inventory-location-table :is(th, td):nth-child(4),
    #inventoryView .inventory-location-table :is(th, td):nth-child(7),
    #inventoryView .inventory-location-table :is(th, td):nth-child(8) { display: table-cell !important; }
    #inventoryView .inventory-location-table :is(th, td):nth-child(n+4):nth-child(-n+6) { text-align: right !important; white-space: nowrap !important; font-variant-numeric: tabular-nums; }
  }
  @media(max-width:980px) {
    #inventoryView .inventory-location-table { min-width: 0 !important; }
    #warehouseStockTable tr.vi-mobile-record > td { order: 0 !important; }
    #warehouseStockTable tr.vi-mobile-record > td:first-child { grid-column: 1 / -1 !important; }
    #warehouseStockTable tr.vi-mobile-record > .warehouse-product-photo-cell { grid-column: 1 !important; text-align: left !important; }
    #warehouseStockTable tr.vi-mobile-record > .warehouse-product-name-cell { grid-column: 2 !important; }
    #inventoryView .warehouse-product-photo-cell > :is(button, .warehouse-photo-missing) { margin-inline: 0 !important; }
    #inventoryView .warehouse-product-name-cell strong { font-size: 16px !important; }
  }
  #orangeInventoryReport :is(button, input, select) { font-size: 14px !important; }
  #orangeInventoryReport .orange-report-tabs button { flex-shrink: 0 !important; }
  #orangeInventoryReport .orange-money-value { display: inline-block !important; white-space: nowrap !important; overflow-wrap: normal !important; word-break: normal !important; }
  #orangeInventoryReport .orange-report-table td.orange-report-number { text-align: right !important; font-variant-numeric: tabular-nums; }
  @media(min-width:701px) {
    #orangeInventoryReport .orange-report-table { min-width: 920px !important; }
    #orangeInventoryReport .orange-report-table td:nth-child(n+3):nth-child(-n+7) { white-space: nowrap; }
  }
  @media(max-width:700px) {
    #orangeInventoryReport .orange-report-table td.orange-report-number { text-align: left !important; }
    #orangeInventoryReport .orange-report-table td.orange-report-money { grid-column: 1 / -1; }
  }
  #inventoryView[data-active-board="reports"] > .section-bar,
  #inventoryView[data-active-board="reports"] > #inventoryCentralWorkflowGuide,
  #inventoryView[data-active-board="reports"] > .inventory-board-nav,
  #inventoryView[data-active-board="reports"] > [data-inventory-board]:not([data-inventory-board="reports"]) { display: none !important; }
}
#orangeInventoryReport {
  --orange-ink: #243e35;
  --orange-muted: #4e635b;
  --orange-line: #ccd8d2;
  --orange-green: #27644f;
  color: var(--orange-ink);
  background: #fffefa;
  border: 1px solid var(--orange-line);
  padding: 20px;
  min-width: 0;
  font-variant-numeric: tabular-nums;
  caret-color: var(--orange-green);
  scrollbar-color: #758f82 #edf2ee;
}
#orangeInventoryReport * { box-sizing: border-box; }
#orangeInventoryReport ::selection { background: #d2e8dc; color: #183e2c; }
#orangeInventoryReport :focus-visible { outline: 2px solid var(--orange-green); outline-offset: 3px; }
#orangeInventoryReport button, #orangeInventoryReport input, #orangeInventoryReport select { min-height: 44px; font: inherit; }
#orangeInventoryReport button { cursor: pointer; }
#orangeInventoryReport button:disabled { cursor: not-allowed; opacity: .55; }
#orangeInventoryReport input::placeholder { color: #586d63; }
.orange-report-heading { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
#orangeInventoryReport h2 { font-size: 24px; line-height: 1.35; margin: 0 0 8px; }
#orangeInventoryReport h3 { font-size: 18px; margin: 28px 0 12px; }
#orangeInventoryReport p { color: var(--orange-muted); font-size: 14px; line-height: 1.65; margin: 0; }
.orange-report-note { padding: 12px 0 20px; }
.orange-posting { margin-bottom: 20px; }
.orange-posting-content p { margin: 12px 0 !important; }
.orange-posting-confirm { display: flex; align-items: start; gap: 10px; margin: 16px 0; line-height: 1.6; }
.orange-posting-confirm input { flex: 0 0 20px; min-height: 24px !important; }
.orange-posting-content a { color: var(--orange-green); text-underline-offset: 3px; }
@media(max-width:700px) {
  #orangeInventoryReport .orange-posting :is(button,p,label) { font-size: 16px !important; }
  #orangeInventoryReport .orange-posting-content .orange-report-table { min-width: 0 !important; }
}
.orange-report-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--orange-line); overflow-x: auto; }
.orange-report-tabs button { border: 0; border-bottom: 3px solid transparent; padding: 12px 4px; background: transparent; color: var(--orange-muted); white-space: nowrap; }
.orange-report-tabs button[aria-pressed="true"] { color: var(--orange-green); border-bottom-color: var(--orange-green); font-weight: 700; }
.orange-report-tabs button:hover { background: #edf4ef; }
.orange-report-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; margin: 20px 0; }
.orange-report-filters label { display: flex; flex-direction: column; gap: 7px; min-width: 150px; font-size: 14px; }
.orange-report-filters label.orange-report-search { flex: 1; min-width: 240px; }
.orange-report-filters input, .orange-report-filters select { width: 100%; max-width: 100%; padding: 8px 10px; border: 1px solid #98afa2; background: #fff; color: var(--orange-ink); border-radius: 6px; }
.orange-filter-actions { display: flex; gap: 8px; }
.orange-report-caption { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin: 12px 0; }
.orange-report-caption button { flex-shrink: 0; }
.orange-table-wrap { overflow: auto; max-width: 100%; border: 1px solid var(--orange-line); }
#orangeInventoryReport .orange-report-table { width: 100%; min-width: 920px; border-collapse: collapse; table-layout: auto; font-size: 14px; }
#orangeInventoryReport .orange-report-table th { text-align: left; background: #f0f4f0; color: var(--orange-muted); font-weight: 600; }
#orangeInventoryReport .orange-report-table th, #orangeInventoryReport .orange-report-table td { padding: 12px 14px; border-bottom: 1px solid var(--orange-line); vertical-align: middle; }
.orange-report-table tr:last-child td { border-bottom: 0; }
.orange-report-table tbody tr:hover { background: #f1f7f2; }
.orange-report-table strong { font-weight: 650; }
#orangeInventoryReport .orange-report-table small { display: block; color: var(--orange-muted); margin-top: 5px; }
.orange-report-table .orange-report-number { text-align: right; white-space: nowrap; }
.orange-report-negative { color: #9b3826; }
.orange-report-flag { display: inline-block; color: #805019; background: #fff4df; padding: 3px 6px; margin: 2px 3px 2px 0; font-size: 13px; }
.orange-report-pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 16px; font-size: 14px; }
.orange-report-pagination>div { display: flex; gap: 8px; }
.orange-report-empty { text-align: center; padding: 48px 16px !important; }
.orange-report-loading { padding: 40px 0; }
.orange-report-detail { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin: 24px 0; border-top: 1px solid var(--orange-line); }
.orange-report-detail>div { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--orange-line); min-width: 0; }
.orange-report-detail dt { color: var(--orange-muted); font-size: 13px; margin-bottom: 8px; }
.orange-report-detail dd { margin: 0; overflow-wrap: anywhere; line-height: 1.6; }
.orange-product-photo { display: block; width: 64px; height: 64px; object-fit: contain; background: #fff; border: 1px solid var(--orange-line); }
.orange-photo-missing { color: var(--orange-muted); font-size: 13px; white-space: nowrap; }
.orange-photo-shortcut { display: block; margin-top: 6px; }
.warehouse-product-source-photo { display: block; width: 64px; height: 64px; object-fit: contain; }
.warehouse-photo-button { flex: 0 0 66px; padding: 0; border: 1px solid var(--erp-line-strong, #bac7bf); background: #fff; cursor: zoom-in; }
.warehouse-photo-button:hover { border-color: var(--erp-jade-600, #27664d); }
.warehouse-photo-button:focus-visible { outline: 2px solid var(--erp-jade-600, #27664d); outline-offset: 3px; }
.warehouse-photo-missing { flex: 0 0 66px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: #4e635b; font-size: 12px; }
.warehouse-photo-missing button { min-height: 44px; }
.warehouse-product-photo-dialog { width: min(560px, calc(100vw - 24px)); }
#warehouseProductPhotoImage { display: block; width: 100%; height: auto; max-height: 65vh; object-fit: contain; background: #fff; }
.orange-group-back { margin: 16px 0 8px; }
#orangeInventoryReport .orange-selected-line { background: #e3f1e8; }
#orangeInventoryReport h2 { scroll-margin-top: 120px; }
.orange-photo-editor { margin-top: 28px; padding: 0 0 20px; border-bottom: 1px solid var(--orange-line); }
.orange-photo-current { margin: 12px 0; }
.orange-photo-picker { display: block; margin: 12px 0; max-width: 420px; font-size: 14px; }
.orange-photo-picker input { display: block; width: 100%; margin-top: 8px; }
.orange-photo-draft:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.orange-photo-draft img { object-fit: contain; border: 1px solid var(--orange-line); background: #fff; }
.orange-provenance { margin-top: 24px; }
.orange-provenance summary { cursor: pointer; min-height: 44px; padding: 12px 0; font-weight: 600; }
#orangeInventoryReport .orange-movement-totals { margin-bottom: 12px; color: var(--orange-ink); }
@media(max-width:700px) {
  #orangeInventoryReport { padding: 14px; }
  #orangeInventoryReport h2 { font-size: 20px; }
  .orange-report-heading, .orange-report-caption { flex-wrap: wrap; gap: 12px; }
  .orange-report-heading>div { flex: 1 1 220px; }
  .orange-report-tabs { gap: 16px; }
  .orange-report-filters { gap: 12px; }
  .orange-report-filters label { flex: 1 1 140px; min-width: 0; }
  .orange-report-filters label.orange-report-search { flex-basis: 100%; min-width: 0; }
  .orange-filter-actions { width: 100%; }
  .orange-filter-actions button { flex: 1; }
  .orange-report-pagination { flex-wrap: wrap; }
  .orange-report-detail { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .orange-report-detail>div:last-child { grid-column: 1 / -1; }
  #orangeInventoryReport .orange-report-table { min-width: 0; }
  #orangeInventoryReport .orange-report-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  #orangeInventoryReport .orange-report-table tbody { display: block; }
  #orangeInventoryReport .orange-report-table tr { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); border-bottom: 1px solid var(--orange-line); padding: 10px 0; }
  #orangeInventoryReport .orange-report-table td { display: block; height: auto; min-height: 0; border: 0; padding: 7px 10px; overflow-wrap: anywhere; text-align: left; white-space: normal; }
  #orangeInventoryReport .orange-report-table td:first-child { grid-column: 1 / -1; font-size: 16px; }
  #orangeInventoryReport .orange-report-table td:last-child { align-self: end; }
  #orangeInventoryReport .orange-report-table td:not(:first-child)::before { content: attr(data-label); display: block; color: var(--orange-muted); font-size: 12px; margin-bottom: 5px; }
}
