[data-testid="table-purchase-orders"].rp-doc-orders {
  table-layout: fixed !important;
  min-width: 1360px !important;
}
.rp-supplier-identity-table { table-layout: fixed !important; min-width: 1320px !important; }
.rp-item-identity {
  padding: 10px 12px !important;
  text-align: center !important;
  vertical-align: middle !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
}
.rp-po-compact-filters {
  padding: 10px 12px !important;
  gap: 10px !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}
.rp-po-compact-filters > div { min-width: 0 !important; }
.rp-po-compact-filters > div:first-child { flex: 1 1 250px !important; }
.rp-po-compact-filters > div:nth-child(4) { width: 180px !important; }
.rp-po-compact-filters > div:nth-child(5) { width: 160px !important; }
.rp-po-compact-filters label {
  margin-bottom: 3px !important;
  font-weight: 500 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}
.rp-po-compact-filters :is(input, select, button) {
  height: 32px !important;
  min-height: 32px !important;
  font-size: 13px !important;
  border-radius: 7px !important;
}
.rp-po-compact-filters input[type="date"] { width: 132px !important; padding-inline: 8px !important; }
.rp-po-compact-filters input[type="search"] { padding-left: 32px !important; }
.rp-po-compact-filters .relative > svg { width: 14px !important; height: 14px !important; left: 10px !important; }
.rp-po-compact-filters :is(input,select):focus-visible {
  outline: 2px solid rgba(0, 122, 255, .45);
  outline-offset: 1px;
}
@media (max-width: 640px) {
  .rp-po-compact-filters > div:first-child { flex-basis: 100% !important; }
  .rp-po-compact-filters :is(input,select,button) { min-height: 40px !important; height: 40px !important; }
  .rp-po-compact-filters :is(input,select) { font-size: 17px !important; }
}
/* A single vertical page scroll: do not clip the order ledger at 650px.
   Keep narrow-screen horizontal overflow inside the table, not the document. */
#root .apple-reference-shell .rp-ledger-purchasing .rp-ledger-surface:has(> table[data-testid="table-purchase-orders"]) {
  max-height: none !important;
  height: auto !important;
  overflow-x: auto !important;
  overflow-y: auto !important;
}
[data-testid="table-purchase-orders"] .rp-doc-order-header > td {
  padding: 10px 12px !important;
}
[data-testid="table-purchase-orders"] .rp-doc-order-heading {
  justify-content: flex-start;
  text-align: left;
}
[data-testid="table-purchase-orders"] .rp-doc-order-heading strong { text-align: left; }
[data-testid="table-purchase-orders"] .rp-po-document-total {
  font-variant-numeric: tabular-nums;
  white-space: nowrap !important;
}
[data-testid="table-purchase-orders"] .rp-po-document-total small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--ap-sec, #697386);
}
[data-testid="table-purchase-orders"] .rp-po-document-notes {
  font-size: 11px;
  font-weight: 400;
}
[data-testid="table-purchase-orders"] .rp-po-document-notes summary {
  cursor: pointer;
  color: var(--ap-blue, #315d91);
}
[data-testid="table-purchase-orders"] .rp-po-document-notes p {
  margin: 8px 0 0;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
  font-weight: 400;
}
[data-testid="table-purchase-orders"] .rp-po-action-row > td {
  padding: 12px 16px !important;
  background: var(--ap-surface, #fff) !important;
  text-align: left !important;
}
.rp-po-action-tree { text-align: left; font-size: 12px; }
.rp-po-action-tree > p { margin: 0 0 8px; font-weight: 600; color: var(--ap-text, #1d1d1f); }
.rp-po-action-tree > p.rp-po-approval-notice { font-size: 12px; font-weight: 400; color: var(--ap-sec, #697386); max-width: 700px; white-space: normal !important; }
.rp-po-tree-branch { margin-left: 9px; padding: 0 0 0 18px; border-left: 1px solid var(--ap-line, #dfe3e8); }
.rp-po-tree-branch > span { font-size: 11px; color: var(--ap-sec, #697386); }
.rp-po-tree-branch ul { list-style: none; margin: 7px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, max-content); justify-content: start; gap: 5px 18px; }
.rp-po-tree-branch li { position: relative; padding-left: 13px; }
.rp-po-tree-branch li::before { content: ""; position: absolute; top: 50%; left: 0; width: 8px; height: 1px; background: var(--ap-line, #dfe3e8); }
#root .apple-reference-shell [data-testid="table-purchase-orders"] .rp-po-action-tree button {
  padding: 6px 9px !important;
  min-height: 30px;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: var(--ap-blue, #315d91) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  box-shadow: none !important;
}
#root .apple-reference-shell [data-testid="table-purchase-orders"] .rp-po-action-tree button:enabled:hover {
  background: color-mix(in srgb, var(--ap-blue, #315d91) 8%, transparent) !important;
  border-color: color-mix(in srgb, var(--ap-blue, #315d91) 18%, transparent) !important;
}
#root .apple-reference-shell [data-testid="table-purchase-orders"] .rp-po-action-tree button:disabled { opacity: .45; color: var(--ap-sec, #697386) !important; cursor: not-allowed; }
.rp-po-action-tree button:focus-visible { outline: 2px solid var(--ap-blue, #007aff); outline-offset: 2px; }

/* Supplier report: align each value with its own heading. */
.rp-supplier-identity-table thead th,
.rp-supplier-identity-table tbody tr[data-testid^="supplier-line-row-"] > th,
.rp-supplier-identity-table tbody tr[data-testid^="supplier-line-row-"] > td {
  text-align: center !important;
  vertical-align: middle;
}
.rp-supplier-identity-table tr[data-testid^="supplier-line-row-"] > th > button {
  position: relative;
  justify-content: center;
  align-items: center;
  padding-inline: 18px;
  text-align: center !important;
}
.rp-supplier-identity-table tr[data-testid^="supplier-line-row-"] > th > button > svg {
  position: absolute;
  left: 0;
  top: 50%;
  margin-top: 0;
  transform: translateY(-50%) rotate(-90deg);
}
.rp-supplier-identity-table tr[data-testid^="supplier-line-row-"] > th > button[aria-expanded="true"] > svg {
  transform: translateY(-50%);
}
.rp-supplier-identity-table tr[data-testid^="supplier-line-row-"] > th > button > span {
  width: 100%;
}
.rp-supplier-identity-table tr[data-testid^="supplier-line-row-"] > th > button .truncate {
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
}
[data-testid="table-purchase-orders"].rp-doc-orders {
  table-layout: fixed !important;
  min-width: 1360px !important;
}

/* Supplier comparison: actual heading/content alignment under the public shell. */
#root .apple-reference-shell .rp-supplier-control .rp-supplier-identity-table :is(th,td) {
  box-sizing: border-box;
  text-align: center !important;
  vertical-align: middle !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
}
#root .apple-reference-shell .rp-supplier-control .rp-supplier-identity-table thead th {
  white-space: normal !important;
  line-height: 1.4;
}
#root .apple-reference-shell .rp-supplier-control .rp-supplier-identity-table tbody td {
  white-space: normal !important;
  overflow-wrap: break-word;
}
#root .apple-reference-shell .rp-supplier-control .rp-supplier-identity-table .rp-supplier-column-groups th {
  padding-block: 8px !important;
  font-weight: 600;
  border-bottom: 1px solid var(--ap-line, #dfe3e8);
}
#root .apple-reference-shell .rp-supplier-control .rp-supplier-identity-table .rp-supplier-column-groups th:nth-child(2) {
  background: color-mix(in srgb, var(--ap-blue, #007aff) 7%, var(--ap-surface, #fff)) !important;
}
#root .apple-reference-shell .rp-supplier-control .rp-supplier-identity-table .rp-supplier-column-groups th:nth-child(3) {
  background: color-mix(in srgb, #8060ab 8%, var(--ap-surface, #fff)) !important;
}
#root .apple-reference-shell .rp-supplier-control .rp-supplier-identity-table :is(thead tr:last-child, tr[data-testid^="supplier-line-row-"]) > :is(:nth-child(4), :nth-child(7)) {
  border-left: 1px solid var(--ap-line, #dfe3e8) !important;
}
#root .apple-reference-shell .rp-supplier-control .rp-supplier-identity-table :is(thead tr:last-child, tr[data-testid^="supplier-line-row-"]) > :is(:nth-child(6), :nth-child(9)) {
  background: color-mix(in srgb, var(--ap-blue, #007aff) 5%, var(--ap-surface, #fff)) !important;
  font-weight: 600;
}
#root .apple-reference-shell .rp-supplier-control .rp-supplier-identity-table :is(thead tr:last-child, tr[data-testid^="supplier-line-row-"]) > :nth-child(9) {
  background: color-mix(in srgb, #8060ab 6%, var(--ap-surface, #fff)) !important;
}
#root .apple-reference-shell .rp-supplier-control .rp-supplier-identity-table td[data-testid*="-deviation-"].font-bold {
  background: color-mix(in srgb, #e34b5c 12%, var(--ap-surface, #fff)) !important;
}
#root .apple-reference-shell .rp-supplier-control .rp-supplier-identity-table th[scope="rowgroup"] {
  padding-block: 8px !important;
  background: var(--ap-surface, #f8f9fb) !important;
}
#root .apple-reference-shell .rp-supplier-control .rp-supplier-identity-table th[scope="rowgroup"] > span {
  position: static !important;
  justify-content: center !important;
  flex-wrap: wrap;
  gap: 4px 8px;
  background: transparent !important;
  font-weight: 600;
}
#root .apple-reference-shell .rp-supplier-control .rp-supplier-identity-table td > .inline-flex {
  justify-content: center !important;
  flex-wrap: wrap;
  white-space: normal !important;
}
.rp-supplier-control .rp-supplier-scroll { max-height: 45vh; overflow: auto; }
#root .apple-reference-shell .rp-supplier-control :is(.rp-supplier-filter,.rp-supplier-page-size) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center !important;
  font-size: 12px;
  color: var(--ap-sec, #697386);
}
#root .apple-reference-shell .rp-supplier-control :is(.rp-supplier-filter,.rp-supplier-page-size) select {
  min-height: 32px;
  max-width: 280px;
  padding: 5px 22px 5px 10px !important;
  border: 1px solid var(--ap-line, #dfe3e8) !important;
  border-radius: 7px !important;
  background: var(--ap-surface, #fff) !important;
  text-align: center !important;
  font-size: 12px !important;
  color: var(--ap-text, #1d1d1f) !important;
}
.rp-supplier-control nav { position: sticky; bottom: 0; z-index: 25; }
/* End supplier comparison layout. */
/* Compact supplier controls: retain all filters without oversized cards. */
#root .apple-reference-shell .rp-supplier-datebar,
#root .apple-reference-shell .rp-supplier-threshold {
  padding: 6px 8px !important;
  gap: 8px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ap-line, #dfe3e8) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
#root .apple-reference-shell .rp-supplier-datebar > div:first-child { gap: 6px !important; }
#root .apple-reference-shell .rp-supplier-datebar > div:first-child span {
  font-size: 12px !important;
  font-weight: 500 !important;
}
#root .apple-reference-shell .rp-supplier-datebar svg { width: 14px !important; height: 14px !important; }
#root .apple-reference-shell .rp-supplier-datebar button {
  min-height: 26px !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  box-shadow: none !important;
}
#root .apple-reference-shell .rp-supplier-datebar input {
  height: 30px !important;
  min-height: 30px !important;
  padding: 4px 7px !important;
  font-size: 12px !important;
  border-radius: 6px !important;
}
#root .apple-reference-shell .rp-supplier-summary {
  padding: 6px 10px !important;
  border-radius: 7px !important;
  box-shadow: none !important;
}
#root .apple-reference-shell .rp-supplier-searchbar {
  gap: 8px !important;
  padding: 0 !important;
  background: transparent !important;
}
#root .apple-reference-shell .rp-supplier-searchbar > label:first-child {
  flex: 0 1 310px !important;
  min-width: 210px !important;
}
#root .apple-reference-shell .rp-supplier-searchbar :is(input,select) {
  height: 30px !important;
  min-height: 30px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  box-shadow: none !important;
}
#root .apple-reference-shell .rp-supplier-searchbar [role="group"] { padding: 2px !important; border-radius: 7px !important; }
#root .apple-reference-shell .rp-supplier-searchbar [role="group"] button {
  min-height: 26px !important;
  padding: 4px 8px !important;
  border-radius: 5px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}
@media (max-width: 640px) {
  #root .apple-reference-shell .rp-supplier-searchbar > label:first-child { flex-basis: 100% !important; }
  #root .apple-reference-shell :is(.rp-supplier-datebar,.rp-supplier-searchbar) :is(input,select) {
    height: 40px !important;
    min-height: 40px !important;
    font-size: 17px !important;
  }
}
/* End compact supplier controls. */