/* Workspace audit follow-up: local integration for review.
   Source candidates are concatenated unchanged in the order below. */

/* Source: audit/order-detail-followup.css */
/* V13 follow-up candidate. Load after order-flow.css and orders-design.css.
   Presentation only: no native action, visibility preference or input value changes. */

/* Optional labels do not change the desktop toolbar. */
html:root.orders-crystal body #page-content .audit-detail-action-label,
html:root.orders-crystal body #page-content .audit-order-items-summary {
  display:none;
}

/* The legacy mobile amount has justify-self:end. Stretch the existing full-row
   grid area so its divider and total do not float in the right half of a card. */
html:root.orders-crystal body #page-content .flow-list-cards .order-row > [data-order-column="amount"] {
  box-sizing:border-box;
  justify-self:stretch!important;
  width:100%!important;
  max-width:100%;
  padding-inline:0;
}

/* Native count and catalog-price provenance still use light-only literal colors. */
html:root.orders-crystal body #page-content.flow-order-detail .section-top .counter {
  color:var(--text)!important;
  background:var(--orders-control-fill,var(--control-surface))!important;
  box-shadow:var(--orders-control-shadow,none)!important;
  border-radius:var(--orders-radius-control,999px);
  opacity:1;
}
html:root.orders-crystal body #page-content.flow-order-detail .product-row .price-source:not(.manual):not(.history):not(.copied) {
  color:var(--green,var(--text))!important;
  font-size:11px;
  opacity:1;
}

@media (max-width:760px) {
  /* Primary on its own row; Print / Status / More remain explicit and tappable.
     Extra permission-dependent actions wrap into the same three-column grid.
     No display override on buttons: native hidden/disabled states keep authority. */
  html:root.orders-crystal body #page-content.flow-order-detail > .detail-heading {
    padding-bottom:0!important;
    margin-bottom:12px!important;
  }
  html:root.orders-crystal body #page-content.flow-order-detail > .detail-heading > .heading-actions {
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr));
    grid-auto-flow:row;
    align-items:stretch;
    gap:8px!important;
    width:100%!important;
    min-width:0;
    margin:0!important;
    padding:0!important;
  }
  html:root.orders-crystal body #page-content.flow-order-detail > .detail-heading > .heading-actions > :is(.button,.icon-btn) {
    box-sizing:border-box;
    width:100%!important;
    min-width:0!important;
    max-width:100%;
    min-height:var(--orders-control-height,44px)!important;
    height:auto!important;
    flex:none!important;
    justify-content:center;
    gap:6px;
    padding:10px 8px!important;
    border-radius:var(--orders-radius-control,999px)!important;
    font-size:12px;
    line-height:1.3;
    white-space:normal;
  }
  html:root.orders-crystal body #page-content.flow-order-detail > .detail-heading > .heading-actions > :is(.primary,[data-act="retail-production"]) {
    grid-column:1 / -1;
    font-size:13px;
  }
  html:root.orders-crystal body #page-content.flow-order-detail > .detail-heading > .heading-actions .audit-detail-action-label {
    display:inline;
    min-width:0;
    overflow-wrap:anywhere;
  }

  /* A compact metadata count when the native full Items column is hidden.
     The source column, preview trigger, selection and saved preference stay intact. */
  html:root.orders-crystal body #page-content.flow-orders-page .flow-list-cards .order-row:has(> [data-order-column="items"].order-column-hidden) > [data-order-column="number"] .audit-order-items-summary {
    display:inline-flex;
    align-items:center;
    gap:6px;
    min-width:0;
    color:var(--muted);
    font-size:12px;
    font-weight:400;
    line-height:1.4;
    white-space:nowrap;
  }
  html:root.orders-crystal body #page-content.flow-orders-page .audit-order-items-summary::before {
    content:"·";
    color:var(--muted);
  }
}

/* Source: audit/writeoffs-followup.css */
/* V13 follow-up: restore the native narrow Writeoffs heading grid.
   Load after orders-design.css / inventory-consistency.css.
   Native actions, controls, permissions and data remain unchanged. */
@media (max-width:520px) {
  html:root.orders-crystal body #page-content:has(> .writeoff-toolbar) {
    grid-template-columns:44px minmax(0,1fr)!important;
    column-gap:8px;
  }

  /* app.css positions the heading's children in the main grid. The shared
     display:flex override boxed all of them into its first, 44px-wide track. */
  html:root.orders-crystal body #page-content:has(> .writeoff-toolbar) > .page-heading {
    display:contents!important;
  }
  html:root.orders-crystal body #page-content:has(> .writeoff-toolbar) > .page-heading > div:first-child {
    grid-column:1 / -1!important;
    grid-row:1;
    min-width:0;
    width:100%;
  }
  html:root.orders-crystal body #page-content:has(> .writeoff-toolbar) > .page-heading > .heading-actions {
    grid-column:2!important;
    grid-row:2;
    justify-self:stretch!important;
    align-self:start;
    width:100%;
    min-width:0;
    margin:0!important;
    padding:0!important;
  }
  html:root.orders-crystal body #page-content:has(> .writeoff-toolbar) > .page-heading > .heading-actions > [data-act="writeoff-new"] {
    width:100%;
    min-width:0;
    min-height:var(--orders-control-height,44px);
    justify-content:center;
    white-space:normal;
    word-break:normal;
    overflow-wrap:normal;
  }
  html:root.orders-crystal body #page-content:has(> .writeoff-toolbar) > .page-heading > .heading-actions > [data-act="writeoff-new"] > span {
    word-break:normal;
    overflow-wrap:normal;
  }
  html:root.orders-crystal body #page-content:has(> .writeoff-toolbar) > .writeoff-toolbar {
    grid-column:1!important;
    grid-row:2;
    justify-self:start;
    align-self:start;
    margin:0!important;
  }
  html:root.orders-crystal body #page-content:has(> .writeoff-toolbar) > :is(.stock-journal-filters,.panel) {
    grid-column:1 / -1;
    min-width:0;
  }
}

/* Source: audit/procurement-followup.css */
/* V13 Purchases + Supplier requests follow-up. Load after workspace-ux-refinement.css.
   Reuse its existing card hierarchy when the journal's real work area is
   narrower than a useful six/seven-column table. Native table roles and actions stay. */
html:root.orders-crystal body #page-content.procurement-page:is(.procurement-purchases,.procurement-requests) .procurement-data-panel {
  container-name:procurement-journal;
  container-type:inline-size;
}

@container procurement-journal (max-width:900px) {
  html:root.orders-crystal body #page-content.procurement-page:is(.procurement-purchases,.procurement-requests) .procurement-table-scroll {
    overflow:visible;
  }
  html:root.orders-crystal body #page-content.procurement-page:is(.procurement-purchases,.procurement-requests) .procurement-table {
    display:block;
    min-width:0!important;
    width:100%;
  }
  html:root.orders-crystal body #page-content.procurement-page:is(.procurement-purchases,.procurement-requests) .procurement-table thead {
    display:block!important;
    position:absolute;
    width:1px;
    height:1px;
    overflow:hidden;
    clip-path:inset(50%);
    white-space:nowrap;
  }
  html:root.orders-crystal body #page-content.procurement-page:is(.procurement-purchases,.procurement-requests) .procurement-table tbody {
    display:grid;
    gap:10px;
    width:100%;
  }
  html:root.orders-crystal body #page-content.procurement-page:is(.procurement-purchases,.procurement-requests) .procurement-table tbody tr {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:9px 12px;
    padding:14px;
    margin:0;
    border:1px solid var(--line)!important;
    border-radius:var(--orders-radius-inset,20px)!important;
    background:var(--soft-bg)!important;
  }
  html:root.orders-crystal body #page-content.procurement-page:is(.procurement-purchases,.procurement-requests) .procurement-table td {
    display:block;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    padding:0!important;
    border:0!important;
    text-align:left!important;
    white-space:normal;
  }
  html:root.orders-crystal body #page-content.procurement-page:is(.procurement-purchases,.procurement-requests) .procurement-table td::before {
    display:none!important;
  }
  html:root.orders-crystal body #page-content.procurement-page:is(.procurement-purchases,.procurement-requests) .procurement-table .procurement-cell-supplier {
    grid-column:1;
    grid-row:1;
    font-size:14px;
    font-weight:500;
  }
  html:root.orders-crystal body #page-content.procurement-page:is(.procurement-purchases,.procurement-requests) .procurement-table .procurement-cell-amount {
    grid-column:2;
    grid-row:1;
    font-size:14px;
    text-align:right!important;
    white-space:nowrap;
  }
  html:root.orders-crystal body #page-content.procurement-page:is(.procurement-purchases,.procurement-requests) .procurement-table .procurement-cell-date {
    grid-column:1;
    grid-row:2;
    color:var(--muted)!important;
    font-size:12px;
  }
  html:root.orders-crystal body #page-content.procurement-page:is(.procurement-purchases,.procurement-requests) .procurement-table .procurement-cell-date small {
    display:inline;
    margin-left:5px;
    font-size:11px;
  }
  html:root.orders-crystal body #page-content.procurement-page:is(.procurement-purchases,.procurement-requests) .procurement-table .procurement-cell-quantity {
    grid-column:2;
    grid-row:3;
    text-align:right!important;
    color:var(--muted)!important;
    font-size:12px;
  }
  html:root.orders-crystal body #page-content.procurement-page:is(.procurement-purchases,.procurement-requests) .procurement-table .procurement-cell-quantity::before {
    display:inline!important;
    content:attr(data-label) ': ';
  }
  html:root.orders-crystal body #page-content.procurement-page:is(.procurement-purchases,.procurement-requests) .procurement-table .procurement-cell-invoice {
    grid-column:1 / -1;
    grid-row:3;
    color:var(--muted)!important;
    font-size:12px;
  }
  html:root.orders-crystal body #page-content.procurement-page:is(.procurement-purchases,.procurement-requests) .procurement-table .procurement-cell-invoice::before {
    display:inline!important;
    content:attr(data-label) ': ';
  }
  html:root.orders-crystal body #page-content.procurement-page:is(.procurement-purchases,.procurement-requests) .procurement-table .procurement-cell-invoice.procurement-invoice-empty {
    display:none!important;
  }
  html:root.orders-crystal body #page-content.procurement-page:is(.procurement-purchases,.procurement-requests) .procurement-table .procurement-cell-actions {
    display:flex!important;
    align-items:center;
    justify-content:flex-end;
    gap:8px;
    grid-column:1 / -1;
    grid-row:4;
    padding-top:10px!important;
    border-top:1px solid var(--line)!important;
  }
  html:root.orders-crystal body #page-content.procurement-page:is(.procurement-purchases,.procurement-requests) .procurement-supply-table .procurement-no-invoice .procurement-cell-actions {
    grid-row:3;
  }
  html:root.orders-crystal body #page-content.procurement-page:is(.procurement-purchases,.procurement-requests) .procurement-cell-actions > div:not(:empty) {
    flex:1;
  }
  html:root.orders-crystal body #page-content.procurement-page:is(.procurement-purchases,.procurement-requests) .procurement-cell-actions > .procurement-row-tools {
    width:100%;
    min-width:0;
    max-width:100%;
  }
  html:root.orders-crystal body #page-content.procurement-page:is(.procurement-purchases,.procurement-requests) .procurement-row-more[open] {
    flex:1;
  }
  html:root.orders-crystal body #page-content.procurement-page:is(.procurement-purchases,.procurement-requests) .procurement-row-actions {
    justify-content:flex-start;
  }
  html:root.orders-crystal body #page-content.procurement-page:is(.procurement-purchases,.procurement-requests) .procurement-cell-status {
    grid-column:2;
    grid-row:2;
    font-size:12px;
    text-align:right!important;
  }
  html:root.orders-crystal body #page-content.procurement-page:is(.procurement-purchases,.procurement-requests) .procurement-cell-warehouse {
    grid-column:1;
    grid-row:3;
    color:var(--muted)!important;
    font-size:12px;
    overflow-wrap:anywhere;
  }
  html:root.orders-crystal body #page-content.procurement-page:is(.procurement-purchases,.procurement-requests) .procurement-supply-table .procurement-cell-quantity {
    grid-row:2;
  }
  html:root.orders-crystal body #page-content.procurement-page:is(.procurement-purchases,.procurement-requests) .procurement-data-panel [hidden] {
    display:none!important;
  }
}

/* Source: audit/inventory-table-followup.css */
/* Inventory only. Append after inventory-consistency.css.
 * Native workspace-ux.css paints each dark .data-table th #20344a!important.
 * Paint one neutral header surface; keep cells transparent and native geometry.
 * The existing mobile visually-hidden thead remains untouched. */
html:root.orders-crystal body #page-content.inventory-consistency-page .stock-page-table > thead {
  background:var(--orders-control-fill,var(--control-surface))!important;
  box-shadow:var(--orders-control-shadow,none)!important;
}

html:root.orders-crystal body #page-content.inventory-consistency-page .stock-page-table > thead > tr {
  background:transparent!important;
}

html:root.orders-crystal body #page-content.inventory-consistency-page .stock-page-table > thead > tr > th {
  background:transparent!important;
  color:var(--text-muted,var(--muted))!important;
  border-bottom-color:var(--line)!important;
  box-shadow:none!important;
}

@media (forced-colors:active) {
  html:root.orders-crystal body #page-content.inventory-consistency-page .stock-page-table > thead {
    background:Canvas!important;
    box-shadow:none!important;
  }
  html:root.orders-crystal body #page-content.inventory-consistency-page .stock-page-table > thead > tr > th {
    color:CanvasText!important;
    border-bottom-color:CanvasText!important;
  }
}

/* Source: audit/order-summary-ai-followup.css */
/* Order detail only. Append after order-flow.css and shared page clearance.
 * The desktop summary has its own scrollport: outer app-frame padding does not
 * change its sticky bottom edge. Reserve the launcher's space in its height.
 * <=1180px keeps the native static, unconstrained summary and page scrolling. */
@media (min-width:1181px) {
  html:root.orders-crystal body:has(> .sb-chat:not([hidden]) > .sb-launch:not([hidden])) #page-content.flow-order-detail .side-summary {
    box-sizing:border-box;
    min-height:0;
    max-height:calc(100dvh - var(--orders-summary-top,96px) - var(--orders-floating-action-clearance,96px));
    padding-block-end:16px;
    scroll-padding-block-end:16px;
  }
}


/* Load after operations-consistency.css. Scoped to Transactions' native root. */
html:root.orders-crystal #page-content .order-transactions-page .transactions-head {
  flex-direction:row;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  text-align:start;
}
html:root.orders-crystal #page-content .order-transactions-page .transactions-head>div:first-child {
  flex:1 1 280px;
  min-width:0;
}
html:root.orders-crystal #page-content .order-transactions-page .transactions-head>.transactions-actions {
  flex:0 0 auto;
  align-self:center;
}

/* Native/global input padding otherwise puts the search icon over the text. */
html:root.orders-crystal #page-content .order-transactions-page .transaction-search-field>input {
  padding-inline-start:42px!important;
  padding-left:42px!important;
}
html:root.orders-crystal #page-content .order-transactions-page .transaction-search-field>svg {
  left:14px;
  right:auto;
  width:17px;
  height:17px;
  pointer-events:none;
}

/* On desktop the existing fields participate in the original toolbar grid. */
html:root.orders-crystal #page-content .order-transactions-page .transactions-enhanced-toolbar {
  grid-template-columns:minmax(220px,360px) 44px minmax(160px,260px) minmax(150px,220px);
}
html:root.orders-crystal #page-content .order-transactions-page .transactions-enhanced-toolbar>.transaction-search-label {
  grid-column:1;
  grid-row:1;
}
html:root.orders-crystal #page-content .order-transactions-page .transactions-enhanced-toolbar>.transaction-icon-button {
  grid-column:2;
  grid-row:1;
  align-self:end;
}
html:root.orders-crystal #page-content .order-transactions-page :is(.transactions-filter-disclosure,.transactions-filter-fields) {
  display:contents;
}
html:root.orders-crystal #page-content .order-transactions-page .transactions-filter-fields>label:nth-child(1) {
  grid-column:3;
  grid-row:1;
}
html:root.orders-crystal #page-content .order-transactions-page .transactions-filter-fields>label:nth-child(2) {
  grid-column:4;
  grid-row:1;
}
html:root.orders-crystal #page-content .order-transactions-page .transactions-filter-toggle {
  display:none;
}
html:root.orders-crystal #page-content .order-transactions-page .transactions-filter-fields[hidden] {
  display:none!important;
}

@media (max-width:900px) {
  html:root.orders-crystal #page-content .order-transactions-page .transactions-enhanced-toolbar {
    grid-template-columns:minmax(0,1fr) 44px;
    gap:10px;
  }
  html:root.orders-crystal #page-content .order-transactions-page .transactions-enhanced-toolbar>.transaction-search-label {
    grid-column:1;
  }
  html:root.orders-crystal #page-content .order-transactions-page .transactions-enhanced-toolbar>.transaction-icon-button {
    grid-column:2;
  }
  html:root.orders-crystal #page-content .order-transactions-page .transactions-filter-disclosure {
    display:grid;
    grid-column:1/-1;
    min-width:0;
    gap:12px;
  }
  html:root.orders-crystal #page-content .order-transactions-page .transactions-filter-toggle {
    display:grid;
    grid-template-columns:auto minmax(0,1fr) 10px;
    align-items:center;
    justify-content:stretch;
    gap:10px;
    box-sizing:border-box;
    width:100%;
    min-width:0;
    min-height:44px!important;
    padding:11px 15px!important;
    border:0!important;
    border-radius:var(--orders-radius-control,999px)!important;
    background:var(--orders-control-fill,var(--control-surface))!important;
    box-shadow:var(--orders-control-shadow)!important;
    color:var(--text)!important;
    text-align:start;
  }
  html:root.orders-crystal #page-content .order-transactions-page .transactions-filter-toggle:focus-visible {
    outline:2px solid var(--focus, currentColor)!important;
    outline-offset:3px;
  }
  html:root.orders-crystal #page-content .order-transactions-page .transactions-filter-caption {
    font-size:13px;
    font-weight:600;
  }
  html:root.orders-crystal #page-content .order-transactions-page .transactions-filter-summary {
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
    color:var(--muted)!important;
    font-size:12px;
    font-weight:400;
  }
  html:root.orders-crystal #page-content .order-transactions-page .transactions-filter-chevron {
    width:7px;
    height:7px;
    margin-top:-3px;
    border-right:1.5px solid currentColor;
    border-bottom:1.5px solid currentColor;
    transform:rotate(45deg);
  }
  html:root.orders-crystal #page-content .order-transactions-page .transactions-filter-toggle[aria-expanded="true"] .transactions-filter-chevron {
    margin-top:3px;
    transform:rotate(225deg);
  }
  html:root.orders-crystal #page-content .order-transactions-page .transactions-filter-fields {
    display:grid;
    min-width:0;
    grid-template-columns:repeat(2,minmax(0,1fr));
    align-items:end;
    gap:12px;
  }
  html:root.orders-crystal #page-content .order-transactions-page .transactions-filter-fields>label:nth-child(n) {
    grid-column:auto;
    grid-row:auto;
    min-width:0;
    width:auto;
  }
  html:root.orders-crystal #page-content .order-transactions-page .transactions-filter-fields .transactions-local-dates {
    display:contents;
  }
  html:root.orders-crystal #page-content .order-transactions-page .transactions-filter-fields .transactions-local-dates>label {
    width:auto;
    min-width:0;
  }
  html:root.orders-crystal #page-content .order-transactions-page .transactions-filter-fields :is(.transaction-reset-local,.transactions-local-dates>small) {
    grid-column:1/-1;
    width:100%;
    max-width:none;
    margin-inline:0;
  }
}

/* One full-width select per row avoids the clipped labels seen at 390px. */
@media (max-width:560px) {
  html:root.orders-crystal #page-content .order-transactions-page .transactions-filter-fields {
    grid-template-columns:minmax(0,1fr);
  }
}
@container operations-transactions (max-width:560px) {
  html:root.orders-crystal #page-content .order-transactions-page .transactions-filter-fields {
    grid-template-columns:minmax(0,1fr);
  }
}

@media (forced-colors:active) {
  html:root.orders-crystal #page-content .order-transactions-page .transactions-filter-toggle {
    border:1px solid ButtonText!important;
    background:ButtonFace!important;
    color:ButtonText!important;
  }
  html:root.orders-crystal #page-content .order-transactions-page .transactions-filter-summary {
    color:ButtonText!important;
  }
}

/* V13 Integrations contrast follow-up. Load after operations-consistency.css.
   Presentation only: verified status keeps its meaning and all provider
   artwork, credentials, actions and verification state remain unchanged. */
html:root.orders-crystal #page-content .commerce-integrations .commerce-status.is-verified {
  color: var(--green)!important;
  -webkit-text-fill-color: var(--green)!important;
  background: var(--orders-control-fill,var(--control-surface))!important;
  background: color-mix(in srgb,var(--green) 14%,transparent)!important;
  box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--green) 28%,transparent)!important;
}

/* Brand artwork is authored for a white tile (TikTok uses a black SVG fill).
   Keep the original SVG/image untouched; restore only its native container. */
html:root.orders-crystal #page-content .commerce-integrations .commerce-mark[data-commerce-logo] {
  background: #fff!important;
  box-shadow: inset 0 0 0 1px rgba(35,35,35,.1)!important;
}

@media (forced-colors:active) {
  html:root.orders-crystal #page-content .commerce-integrations .commerce-status.is-verified {
    color: CanvasText!important;
    -webkit-text-fill-color: CanvasText!important;
    background: Canvas!important;
    box-shadow: none!important;
    border: 1px solid CanvasText!important;
  }
  html:root.orders-crystal #page-content .commerce-integrations .commerce-mark[data-commerce-logo] {
    forced-color-adjust: none;
  }
}

/* BEGIN settings-table-followup.css */
/* Only the native warehouse/production tables annotated by the companion JS.
   Load after settings-redesign.css. Card width, not viewport width, selects
   the narrow layout; every native column and action remains available. */
html:root.orders-crystal #page-content .settings-stock-tables {
  container-type: inline-size;
  container-name: settings-stock-tables;
  min-width: 0;
}
html:root.orders-crystal #page-content .settings-stock-tables .settings-stock-table-wrap {
  min-width: 0;
  max-width: 100%;
}
html:root.orders-crystal #page-content .settings-stock-tables table.settings-stock-table > thead > tr > th {
  background: var(--orders-control-fill,var(--control-surface))!important;
  color: var(--muted)!important;
  -webkit-text-fill-color: var(--muted)!important;
  border-color: var(--line)!important;
  font-weight: 500;
  white-space: normal;
}
html:root.orders-crystal #page-content .settings-stock-tables table.settings-stock-table > tbody > tr > :is(td,th) {
  color: var(--text);
  border-color: var(--line)!important;
}

@container settings-stock-tables (max-width:600px) {
  html:root.orders-crystal #page-content .settings-stock-tables .settings-stock-table-wrap {
    overflow: visible!important;
    max-height: none!important;
  }
  html:root.orders-crystal #page-content .settings-stock-tables table.settings-stock-table {
    position: relative;
    display: block;
    width: 100%!important;
    min-width: 0!important;
    max-width: 100%!important;
    border-collapse: separate;
  }
  /* Keep the original header nodes and their associations in the a11y tree. */
  html:root.orders-crystal #page-content .settings-stock-tables table.settings-stock-table > thead {
    position: absolute!important;
    width: 1px!important;
    height: 1px!important;
    padding: 0!important;
    margin: -1px!important;
    overflow: hidden!important;
    clip: rect(0,0,0,0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0!important;
  }
  html:root.orders-crystal #page-content .settings-stock-tables table.settings-stock-table > tbody {
    display: grid;
    gap: 12px;
    width: 100%;
    min-width: 0;
  }
  html:root.orders-crystal #page-content .settings-stock-tables table.settings-stock-table > tbody > tr {
    display: grid!important;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 12px 16px;
    min-width: 0;
    padding: 16px;
    border: 0!important;
    border-radius: var(--orders-radius-inset,20px);
    background: var(--orders-control-fill,var(--control-surface))!important;
    box-shadow: var(--orders-control-shadow)!important;
    -webkit-backdrop-filter: blur(var(--glass-blur,18px));
    backdrop-filter: blur(var(--glass-blur,18px));
  }
  html:root.orders-crystal #page-content .settings-stock-tables table.settings-stock-table > tbody > tr > :is(td,th) {
    display: block!important;
    min-width: 0!important;
    width: auto!important;
    padding: 0!important;
    border: 0!important;
    background: transparent!important;
    font-size: 14px;
    line-height: 1.5;
    white-space: normal!important;
    overflow-wrap: anywhere;
  }
  html:root.orders-crystal #page-content .settings-stock-tables table.settings-stock-table > tbody > tr > :first-child,
  html:root.orders-crystal #page-content .settings-stock-tables table.settings-stock-table > tbody > tr > [colspan]:not([colspan="1"]),
  html:root.orders-crystal #page-content .settings-stock-tables table.settings-stock-table[data-settings-stock-kind="warehouses"] > tbody > tr > :nth-child(4) {
    grid-column: 1 / -1;
  }
  html:root.orders-crystal #page-content .settings-stock-tables table.settings-stock-table [data-settings-stock-label]:not([data-settings-stock-label=""])::before {
    content: attr(data-settings-stock-label);
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
  }
  html:root.orders-crystal #page-content .settings-stock-tables table.settings-stock-table[data-settings-stock-kind="production"] > tbody > tr > :last-child:not([colspan]) {
    align-self: end;
    justify-self: end;
  }
  html:root.orders-crystal #page-content .settings-stock-tables table.settings-stock-table .button {
    min-height: var(--orders-control-height,44px)!important;
    max-width: 100%;
    border-radius: var(--orders-radius-control,999px)!important;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}
html:root.orders-crystal #page-content .settings-stock-tables table.settings-stock-table [hidden] {
  display: none!important;
}
@media (prefers-reduced-transparency:reduce) {
  html:root.orders-crystal #page-content .settings-stock-tables table.settings-stock-table > tbody > tr {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
@media (forced-colors:active) {
  html:root.orders-crystal #page-content .settings-stock-tables table.settings-stock-table > thead > tr > th {
    color: CanvasText!important;
    -webkit-text-fill-color: CanvasText!important;
    background: Canvas!important;
  }
  html:root.orders-crystal #page-content .settings-stock-tables table.settings-stock-table > tbody > tr {
    border: 1px solid CanvasText!important;
    box-shadow: none!important;
  }
}


/* BEGIN transactions-container-followup.css */
/* Expanded sidebar can leave less than 642px inside a >900px viewport.
   Keep the desktop controls visible, but use two compact toolbar rows.
   <=900px retains the existing disclosure and its native controls/handlers. */
@media (min-width:901px) {
  @container operations-transactions (max-width:760px) {
    html:root.orders-crystal #page-content .order-transactions-page .transactions-enhanced-toolbar {
      grid-template-columns:minmax(0,1fr) minmax(0,1fr) 44px;
    }
    html:root.orders-crystal #page-content .order-transactions-page .transactions-enhanced-toolbar>.transaction-search-label {
      grid-column:1 / 3;
      grid-row:1;
    }
    html:root.orders-crystal #page-content .order-transactions-page .transactions-enhanced-toolbar>.transaction-icon-button {
      grid-column:3;
      grid-row:1;
    }
    html:root.orders-crystal #page-content .order-transactions-page .transactions-enhanced-toolbar .transactions-filter-fields>label:nth-child(1) {
      grid-column:1;
      grid-row:2;
    }
    html:root.orders-crystal #page-content .order-transactions-page .transactions-enhanced-toolbar .transactions-filter-fields>label:nth-child(2) {
      grid-column:2 / 4;
      grid-row:2;
    }
    html:root.orders-crystal #page-content .order-transactions-page .transactions-enhanced-toolbar .transactions-filter-fields>.transactions-local-dates {
      grid-column:1 / -1;
      grid-row:3;
    }
  }
}


/* BEGIN order-final-followup.css */
/* Retake: legacy icon aspect-ratio made the three mobile actions square. */
@media (max-width:520px) {
  html:root.orders-crystal body #page-content.flow-order-detail > .detail-heading > .heading-actions {
    align-items:center!important;
  }
  html:root.orders-crystal body #page-content.flow-order-detail > .detail-heading > .heading-actions > :is([data-act="print-order"],[data-act="change-status"],[data-act="detail-menu"]) {
    aspect-ratio:auto!important;
    height:44px!important;
    min-height:44px!important;
    align-items:center!important;
  }
}

/* The initial summary can start well below its sticky top. Its measured
   viewport budget, not only the eventual sticky top, limits this scrollport. */
@media (min-width:1181px) {
  html:root.orders-crystal body #page-content.flow-order-detail .side-summary[data-order-summary-fit] {
    box-sizing:border-box;
    min-height:0;
    max-height:var(--orders-summary-available-height,calc(100dvh - var(--orders-summary-top,110px) - 96px))!important;
    overflow:auto;
    scroll-padding-block-end:16px;
  }
}


/* BEGIN payment-dialog-followup.css */
/* The native amount, method, comment, validation and footer remain main content. */
html:root.orders-crystal body .audit-payment-dialog .audit-payment-tip-field {
  display:flex!important;
  align-items:center;
  box-sizing:border-box;
  min-width:0;
  min-height:44px!important;
  height:44px!important;
  padding:0!important;
  border-radius:var(--orders-radius-control,999px)!important;
}
html:root.orders-crystal body .audit-payment-dialog .audit-payment-tip-field > #live-payment-tips {
  box-sizing:border-box;
  min-width:0;
  width:100%;
  min-height:44px!important;
  height:44px!important;
  padding:0 14px!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  border-radius:inherit;
  line-height:22px;
}
html:root.orders-crystal body .audit-payment-dialog .audit-payment-tip-presets {
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px!important;
  min-width:0;
  margin:8px 0 16px!important;
  padding:0;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}
html:root.orders-crystal body .audit-payment-dialog .audit-payment-tip-presets > [data-tip-percent] {
  box-sizing:border-box;
  min-width:0!important;
  width:100%;
  min-height:44px!important;
  height:44px!important;
  aspect-ratio:auto!important;
  padding:6px!important;
  border:0!important;
  border-radius:var(--orders-radius-control,999px)!important;
  background:var(--orders-control-fill,var(--control-surface))!important;
  color:var(--text)!important;
  -webkit-text-fill-color:var(--text)!important;
  box-shadow:var(--orders-control-shadow)!important;
  font-size:13px;
  line-height:16px;
  white-space:normal;
}
html:root.orders-crystal body .audit-payment-dialog .audit-payment-tip-presets > [aria-pressed="true"] {
  background:var(--orders-control-selected,var(--control-surface))!important;
  box-shadow:var(--orders-control-selected-shadow)!important;
  font-weight:600;
}

html:root.orders-crystal body .audit-payment-dialog .audit-payment-tools {
  min-width:0;
  margin:16px 0 0!important;
  padding:0;
  border:0;
  font-size:14px!important;
}
html:root.orders-crystal body .audit-payment-dialog .audit-payment-tools > summary {
  display:grid;
  grid-template-columns:minmax(0,1fr) 12px;
  gap:3px 12px;
  align-items:center;
  box-sizing:border-box;
  min-width:0;
  min-height:56px;
  padding:12px 16px;
  border:0;
  border-radius:var(--orders-radius-inset,20px);
  background:var(--orders-control-fill,var(--control-surface));
  box-shadow:var(--orders-control-shadow);
  color:var(--text);
  -webkit-backdrop-filter:blur(var(--glass-blur,18px));
  backdrop-filter:blur(var(--glass-blur,18px));
  cursor:pointer;
  list-style:none;
}
html:root.orders-crystal body .audit-payment-dialog .audit-payment-tools > summary::-webkit-details-marker { display:none; }
html:root.orders-crystal body .audit-payment-dialog .audit-payment-tools > summary::after {
  content:"";
  grid-column:2;
  grid-row:1 / 3;
  width:7px;
  height:7px;
  border-inline-end:1.5px solid currentColor;
  border-block-end:1.5px solid currentColor;
  transform:translateY(-2px) rotate(45deg);
}
html:root.orders-crystal body .audit-payment-dialog .audit-payment-tools[open] > summary::after { transform:translateY(2px) rotate(225deg); }
html:root.orders-crystal body .audit-payment-dialog [data-payment-tools-label] {
  grid-column:1;
  font-size:14px;
  line-height:20px;
  font-weight:600;
}
html:root.orders-crystal body .audit-payment-dialog [data-payment-tools-hint] {
  grid-column:1;
  min-width:0;
  color:var(--muted);
  font-size:12px;
  line-height:17px;
  overflow-wrap:anywhere;
}
html:root.orders-crystal body .audit-payment-dialog .audit-payment-tools-body {
  display:grid;
  gap:12px;
  min-width:0;
  padding-top:12px;
}
html:root.orders-crystal body .audit-payment-dialog .audit-payment-tools-body > :is(.opl-entry,[data-payin-dispatch],[data-screen-dispatch-panel]) {
  box-sizing:border-box;
  min-width:0!important;
  max-width:100%;
  margin:0!important;
  padding:14px!important;
  border:0!important;
  border-radius:var(--orders-radius-inset,20px);
  background:var(--orders-control-fill,var(--control-surface));
  box-shadow:var(--orders-control-shadow);
}
html:root.orders-crystal body .audit-payment-dialog .audit-payment-tools-body :is(input,select,textarea) {
  min-width:0!important;
  max-width:100%;
  box-sizing:border-box;
}
/* These panels live inside a modal, whose width can be much smaller than the
   viewport. Keep the picker full-width instead of competing with an auto
   column containing Refresh / Send / Clear. Native action wrapping remains. */
html:root.orders-crystal body .audit-payment-dialog .audit-payment-tools-body .screen-dispatch-panel {
  grid-template-columns:minmax(0,1fr);
}
html:root.orders-crystal body .audit-payment-dialog .audit-payment-tools-body .screen-dispatch-actions {
  justify-content:flex-start;
}
html:root.orders-crystal body .audit-payment-dialog .audit-payment-tools-body :is(.button,button) {
  min-height:44px;
  max-width:100%;
  white-space:normal;
}
html:root.orders-crystal body .audit-payment-dialog .audit-payment-tools-body :is(p,small) { overflow-wrap:anywhere; }
html:root.orders-crystal body .audit-payment-dialog :is(.audit-payment-tools > summary,.audit-payment-tip-presets > button):focus-visible {
  outline:2px solid var(--orders-focus,currentColor);
  outline-offset:3px;
}
html:root.orders-crystal body .audit-payment-dialog .audit-payment-tools [hidden] { display:none!important; }
/* A closed details must remain collapsed even with its content's grid display. */
html:root.orders-crystal body .audit-payment-dialog .audit-payment-tools:not([open]) > .audit-payment-tools-body { display:none; }

@media (max-width:520px) {
  html:root.orders-crystal body .audit-payment-dialog .audit-payment-tip-presets > [data-tip-percent] { font-size:12px; }
  html:root.orders-crystal body .audit-payment-dialog .audit-payment-tools-body > :is(.opl-entry,[data-payin-dispatch],[data-screen-dispatch-panel]) { padding:12px!important; }
}
@media (prefers-reduced-transparency:reduce) {
  html:root.orders-crystal body .audit-payment-dialog .audit-payment-tools > summary { -webkit-backdrop-filter:none; backdrop-filter:none; }
}
@media (forced-colors:active) {
  html:root.orders-crystal body .audit-payment-dialog .audit-payment-tools > summary,
  html:root.orders-crystal body .audit-payment-dialog .audit-payment-tip-presets > [data-tip-percent] {
    border:1px solid ButtonText!important;
    background:ButtonFace!important;
    color:ButtonText!important;
    -webkit-text-fill-color:ButtonText!important;
    box-shadow:none!important;
  }
}


/* BEGIN dropdown-icons.css */
/* Shared dropdown geometry. Append after the complete redesign cascade. */
html:root.orders-crystal {
  --orders-dropdown-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 5.75 8 10.25 12.5 5.75' fill='none' stroke='%23d4d6d5' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
html:root.orders-crystal[data-orders-theme="light"] {
  --orders-dropdown-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 5.75 8 10.25 12.5 5.75' fill='none' stroke='%23535554' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* BEGIN SHADOW-SAFE RULES: also installed once in known native open roots. */
.orders-dropdown-select {
  --orders-dropdown-select-background:var(--orders-dropdown-image) var(--orders-dropdown-position,right 16px center)/16px 16px no-repeat,var(--orders-control-fill,transparent);
  appearance:none!important;
  -webkit-appearance:none!important;
  padding-inline-end:44px!important;
  background:var(--orders-dropdown-select-background)!important;
}
[dir="rtl"] .orders-dropdown-select,
.orders-dropdown-select[dir="rtl"] {
  --orders-dropdown-position:left 16px center;
}
.orders-dropdown-trigger.orders-dropdown-positioned { position:relative; }
.orders-dropdown-trigger { padding-inline-end:44px!important; }
.orders-dropdown-trigger>.orders-dropdown-arrow {
  position:absolute!important;
  display:block!important;
  top:50%!important;
  left:auto!important;
  right:auto!important;
  inset-inline-end:16px!important;
  bottom:auto!important;
  width:16px!important;
  height:16px!important;
  min-width:16px!important;
  min-height:16px!important;
  max-width:16px!important;
  max-height:16px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:none!important;
  box-shadow:none!important;
  fill:none!important;
  stroke:currentColor!important;
  color:inherit!important;
  opacity:1!important;
  overflow:visible!important;
  pointer-events:none!important;
  transform:translateY(-50%)!important;
  transform-origin:center!important;
  flex:none!important;
}
.orders-dropdown-trigger>.orders-dropdown-arrow>path {
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.8!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
details[open]>.orders-dropdown-trigger>.orders-dropdown-arrow,
.orders-dropdown-trigger[aria-expanded="true"]>.orders-dropdown-arrow {
  transform:translateY(-50%) rotate(180deg)!important;
}
.orders-dropdown-trigger .orders-dropdown-obsolete { display:none!important; }
summary.orders-dropdown-trigger::after,
.sabsus-suite-trigger.orders-dropdown-trigger::after,
.sabsus-module-trigger.orders-dropdown-trigger::after { content:none!important; display:none!important; }
summary.orders-dropdown-trigger { list-style:none!important; }
summary.orders-dropdown-trigger::marker { content:""!important; }
summary.orders-dropdown-trigger::-webkit-details-marker { display:none!important; }
.screen-dispatch-picker:has(>select.orders-dropdown-select)::after { content:none!important; display:none!important; }
/* END SHADOW-SAFE RULES */

/* Explicit page scopes beat native important component declarations. Inline
   property guards in the companion JS also cover late-loaded modal styles. */
html:root.orders-crystal body .orders-dropdown-trigger .orders-dropdown-obsolete,
html:root.orders-crystal body #page-content .orders-dropdown-trigger .orders-dropdown-obsolete {
  display:none!important;
}
html:root.orders-crystal body summary.orders-dropdown-trigger::after,
html:root.orders-crystal body .sabsus-suite-trigger.orders-dropdown-trigger::after,
html:root.orders-crystal body .sabsus-module-trigger.orders-dropdown-trigger::after,
html:root.orders-crystal body #page-content summary.orders-dropdown-trigger::after {
  content:none!important;
  display:none!important;
}
html:root.orders-crystal body .orders-dropdown-trigger>.orders-dropdown-arrow,
html:root.orders-crystal body #page-content .orders-dropdown-trigger>.orders-dropdown-arrow {
  width:16px!important;
  height:16px!important;
  min-width:16px!important;
  min-height:16px!important;
  max-width:16px!important;
  max-height:16px!important;
  margin:0!important;
  inset-inline-end:16px!important;
  flex:none!important;
}
html:root.orders-crystal body #page-content .transactions-filter-toggle.orders-dropdown-trigger {
  grid-template-columns:auto minmax(0,1fr);
}
html:root.orders-crystal body #page-content .native-status.orders-dropdown-trigger {
  max-width:100%;
  min-width:0;
}
html:root.orders-crystal body #page-content .native-status.orders-dropdown-trigger>span:not(.orders-dropdown-obsolete) {
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* Native mobile grid reserved a 44px column for a menu already hidden by
   orders-design.css. Remove that empty track, retaining all live controls. */
@media (max-width:760px) {
  html:root.orders-crystal body .app-frame .app-header {
    grid-template-columns:minmax(0,1fr) auto;
  }
  html:root.orders-crystal body .app-frame .app-header>.brand {
    grid-column:1;
    grid-row:1;
    justify-content:flex-start;
    min-width:0;
    margin-inline-start:0;
  }
  html:root.orders-crystal body .app-frame .app-header>.header-actions {
    grid-column:2;
    grid-row:1;
  }
}


/* V16 candidate — append after workspace-audit-followup.css.
   Native app.js creates the completed production state as a disabled
   .production-confirmed button without .primary or data-act="retail-production".
   Both native variants occupy row 1; existing Print / Status / More keep row 2.
   Presentation only: preserve the original nodes, disabled state and handlers. */
@media (max-width:520px) {
  html:root.orders-crystal body #page-content.flow-order-detail > .detail-heading > .heading-actions > :is([data-act="retail-production"],.production-confirmed) {
    grid-column:1 / -1!important;
    aspect-ratio:auto!important;
    height:44px!important;
    min-height:44px!important;
    align-items:center!important;
  }
}


/* BEGIN COMPACT operations */
/* Load after workspace-audit-followup.css and the six routes' consistency CSS.
   Actual main-column width, including the expanded sidebar, drives adaptation.
   No native controls or delegated ancestors are moved or replaced. */
html:root.orders-crystal body #page-content.compact-ops-page {
  container: compact-ops / inline-size;
  display: flex!important;
  flex-flow: row wrap!important;
  align-items: center;
  align-content: flex-start;
  justify-content: flex-start;
  gap: 12px!important;
  min-width: 0;
}
html:root.orders-crystal body #page-content.compact-ops-page > .compact-ops-heading {
  display: contents!important;
}
html:root.orders-crystal body #page-content.compact-ops-page .compact-ops-title {
  order: 10;
  flex: 1 1 auto;
  width: auto!important;
  min-width: 0;
  max-width: 100%;
  margin: 0!important;
  padding: 0!important;
  align-self: center;
}
html:root.orders-crystal body #page-content.compact-ops-page .compact-ops-title > :is(.eyebrow,p),
html:root.orders-crystal body #page-content.compact-ops-page .compact-ops-secondary-heading {
  display: none!important;
}
html:root.orders-crystal body #page-content.compact-ops-page .compact-ops-title > h1 {
  margin: 0!important;
  font-size: 28px;
  line-height: 1.18;
  letter-spacing: -.035em;
}
html:root.orders-crystal body #page-content.compact-ops-page .compact-ops-actions {
  order: 20;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  gap: 8px;
  width: auto!important;
  min-width: 0;
  max-width: 100%;
  margin: 0 0 0 auto!important;
  align-self: center;
}
html:root.orders-crystal body #page-content.compact-ops-page .compact-ops-actions:not(.button) { padding: 0!important; }
html:root.orders-crystal body #page-content.compact-ops-page .compact-ops-actions > .button,
html:root.orders-crystal body #page-content.compact-ops-page .compact-ops-actions.button {
  min-height: var(--orders-control-height,44px);
  width: auto!important;
  white-space: nowrap!important;
}
html:root.orders-crystal body #page-content.compact-ops-page > .compact-ops-tools {
  order: 30;
  display: flex!important;
  align-items: center;
  flex: 1 1 100%;
  flex-wrap: wrap;
  gap: 8px;
  box-sizing: border-box;
  width: auto!important;
  min-width: 0;
  max-width: none!important;
  margin: 0!important;
}
html:root.orders-crystal body #page-content.compact-ops-page > .compact-ops-tools:not(.search-shell) {
  padding: 0!important;
  border: 0!important;
  border-radius: 0!important;
  background: transparent!important;
  box-shadow: none!important;
  backdrop-filter: none!important;
  -webkit-backdrop-filter: none!important;
}
html:root.orders-crystal body #page-content.compact-ops-page > .compact-ops-tools:not(.search-shell) > :is(canvas,.sg-pane),
html:root.orders-crystal body #page-content.compact-ops-page > .compact-ops-tools:not(.search-shell)::before,
html:root.orders-crystal body #page-content.compact-ops-page > .compact-ops-tools:not(.search-shell)::after {
  display: none!important;
}
html:root.orders-crystal body #page-content.compact-ops-page > :not(.compact-ops-heading):not(.compact-ops-tools):not(.compact-ops-refresh-group) {
  order: 50;
  flex: 1 0 100%;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  margin-block: 0!important;
}
html:root.orders-crystal body #page-content.compact-ops-page .compact-ops-tools > :is(.search-shell,.procurement-search) {
  flex: 0 1 280px;
  width: 280px!important;
  min-width: min(220px,100%);
  max-width: 320px;
  margin: 0!important;
}
html:root.orders-crystal body #page-content.compact-ops-page .compact-ops-tools > .icon-btn {
  flex: 0 0 var(--orders-control-height,44px);
  margin: 0!important;
}
html:root.orders-crystal body #page-content.compact-ops-promotions .compact-ops-tools > [data-act="promotion-filter"] {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 240px;
}
html:root.orders-crystal body #page-content.compact-ops-promotions .compact-ops-tools > [data-act="promotion-filter"] > span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Write-offs: flatten the filter card, retain its data-stock-journal scope. */
html:root.orders-crystal body #page-content.compact-ops-writeoffs > .compact-ops-refresh-group {
  order: 19;
  flex: 0 0 44px;
  min-width: 44px;
  width: 44px;
  margin: 0!important;
  align-self: center;
}
html:root.orders-crystal body #page-content.compact-ops-writeoffs > .compact-ops-tools > label:has(> select) {
  display: block;
  flex: 1 1 160px;
  min-width: 130px;
  max-width: 250px;
  font-size: 0;
}
html:root.orders-crystal body #page-content.compact-ops-writeoffs .compact-ops-tools select {
  min-height: var(--orders-control-height,44px);
  font-size: 13px;
}
html:root.orders-crystal body #page-content.compact-ops-writeoffs .compact-ops-tools > .stock-date-filters {
  order: 0;
  flex: 0 1 150px;
  min-width: 130px;
  max-width: 260px;
}
html:root.orders-crystal body #page-content.compact-ops-writeoffs .compact-ops-tools > .stock-date-filters[open] {
  order: 4;
  flex: 1 1 100%;
  max-width: none;
}
html:root.orders-crystal body #page-content.compact-ops-writeoffs .compact-ops-tools > .button {
  flex: 0 0 auto;
  min-height: var(--orders-control-height,44px);
}

/* Purchases: remove viewport-only forced wrapping when the work area fits. */
html:root.orders-crystal body #page-content.compact-ops-purchases .procurement-stock-disclosure {
  flex: 1 1 460px;
  min-width: 0;
}
html:root.orders-crystal body #page-content.compact-ops-purchases .procurement-stock-filters > .stock-date-filters:not([open]) {
  flex: 0 1 140px;
  min-width: 130px;
}
html:root.orders-crystal body #page-content.compact-ops-purchases .procurement-stock-filters > .procurement-warehouse-field {
  flex: 1 1 150px;
  min-width: 130px;
  max-width: 210px;
}

/* Narrow work areas keep title + primary together and tools immediately below.
   These queries apply equally to a phone and a tablet with expanded sidebar. */
@container compact-ops (max-width: 900px) {
  html:root.orders-crystal body #page-content.compact-ops-purchase-requests .procurement-filter-fields {
    grid-template-columns: repeat(3,minmax(0,1fr))!important;
  }
}
@container compact-ops (max-width: 680px) {
  html:root.orders-crystal body #page-content.compact-ops-page .compact-ops-title > h1 { font-size: 24px; }
  html:root.orders-crystal body #page-content.compact-ops-page .compact-ops-actions { max-width: 100%; }
  html:root.orders-crystal body #page-content.compact-ops-page .compact-ops-actions > .button,
  html:root.orders-crystal body #page-content.compact-ops-page .compact-ops-actions.button { font-size: 12px; gap: 6px; padding-inline: 12px; }
  html:root.orders-crystal body #page-content.compact-ops-page .compact-ops-tools > :is(.search-shell,.procurement-search) {
    flex: 1 1 calc(100% - 52px);
    width: calc(100% - 52px)!important;
    min-width: 0;
    max-width: none;
  }
  html:root.orders-crystal body #page-content.compact-ops-promotions .compact-ops-tools > .search-shell {
    flex-basis: 100%;
    width: 100%!important;
  }
  html:root.orders-crystal body #page-content.compact-ops-purchases .procurement-stock-disclosure,
  html:root.orders-crystal body #page-content.compact-ops-purchase-requests .procurement-request-filters {
    flex: 1 1 100%;
    min-width: 0;
    max-width: none;
  }
  html:root.orders-crystal body #page-content.compact-ops-purchases .procurement-stock-filters > .procurement-warehouse-field { max-width: none; }
  html:root.orders-crystal body #page-content.compact-ops-purchase-requests .procurement-filter-fields {
    grid-template-columns: repeat(2,minmax(0,1fr))!important;
  }
  html:root.orders-crystal body #page-content.compact-ops-writeoffs .compact-ops-tools > :is(label,.stock-date-filters) {
    flex: 1 1 130px!important;
    min-width: 0!important;
    max-width: none!important;
  }
  html:root.orders-crystal body #page-content.compact-ops-writeoffs .compact-ops-tools > .stock-date-filters[open] { flex-basis: 100%!important; }
}
@container compact-ops (max-width: 420px) {
  html:root.orders-crystal body #page-content.compact-ops-page .compact-ops-title > h1 { font-size: 23px; }
  html:root.orders-crystal body #page-content.compact-ops-page .compact-ops-title { flex: 1 1 100px; }
  html:root.orders-crystal body #page-content.compact-ops-page .compact-ops-actions { max-width: 60%; }
  html:root.orders-crystal body #page-content.compact-ops-page .compact-ops-actions > .button,
  html:root.orders-crystal body #page-content.compact-ops-page .compact-ops-actions.button {
    min-width: 0;
    max-width: 100%;
    white-space: normal!important;
    text-align: center;
    overflow-wrap: normal;
  }
  html:root.orders-crystal body #page-content.compact-ops-writeoffs > .compact-ops-refresh-group { order: 19; }
  html:root.orders-crystal body #page-content.compact-ops-writeoffs .compact-ops-title { flex-basis: 100%; }
  html:root.orders-crystal body #page-content.compact-ops-writeoffs .compact-ops-actions { flex: 1 1 0; max-width: none; }
  html:root.orders-crystal body #page-content.compact-ops-writeoffs .compact-ops-actions > .button { width: 100%!important; }
  html:root.orders-crystal body #page-content.compact-ops-writeoffs > .compact-ops-tools { flex-basis: 100%; }
  html:root.orders-crystal body #page-content.compact-ops-writeoffs .compact-ops-tools > .button { flex: 1 1 calc(50% - 4px); }
  html:root.orders-crystal body #page-content.compact-ops-writeoffs .journal-advanced-content,
  html:root.orders-crystal body #page-content.compact-ops-purchase-requests .procurement-filter-fields {
    grid-template-columns: minmax(0,1fr)!important;
  }
}

/* Normal, closed filters: all controls share the heading row when they fit. */
@container compact-ops (min-width: 660px) {
  html:root.orders-crystal body #page-content.compact-ops-customers .compact-ops-title { flex: 0 1 auto; }
  html:root.orders-crystal body #page-content.compact-ops-customers > .compact-ops-tools {
    order: 15; flex: 0 1 320px; min-width: 220px; max-width: 360px!important;
  }
}
@container compact-ops (min-width: 900px) {
  html:root.orders-crystal body #page-content:is(.compact-ops-purchase-requests,.compact-ops-writeoffs) .compact-ops-title { flex: 0 1 auto; }
  html:root.orders-crystal body #page-content.compact-ops-purchase-requests > .compact-ops-tools:not(:has(.procurement-request-filters[open])) {
    order: 15; flex: 1 1 420px;
  }
  html:root.orders-crystal body #page-content.compact-ops-purchase-requests .compact-ops-tools > .procurement-request-filters:not([open]) { flex: 0 1 auto; max-width: 230px; }
  html:root.orders-crystal body #page-content.compact-ops-writeoffs > .compact-ops-tools:not(:has(.stock-date-filters[open])) {
    order: 15; flex: 1 1 440px;
  }
}
@container compact-ops (min-width: 980px) {
  html:root.orders-crystal body #page-content.compact-ops-promotions .compact-ops-title { flex: 0 1 auto; }
  html:root.orders-crystal body #page-content.compact-ops-promotions > .compact-ops-tools { order: 15; flex: 1 1 440px; flex-wrap: nowrap; }
  html:root.orders-crystal body #page-content.compact-ops-promotions .compact-ops-tools > .search-shell { flex: 1 1 240px; min-width: 180px; max-width: 320px; }
}
@container compact-ops (min-width: 1120px) {
  html:root.orders-crystal body #page-content.compact-ops-purchases .compact-ops-title { flex: 0 1 auto; }
  html:root.orders-crystal body #page-content.compact-ops-purchases > .compact-ops-tools:not(:has(.stock-date-filters[open])) {
    order: 15; flex: 1 1 710px; flex-wrap: nowrap;
  }
  html:root.orders-crystal body #page-content.compact-ops-purchases .compact-ops-tools > .procurement-search { flex: 0 1 220px; width: 220px!important; min-width: 180px; }
  html:root.orders-crystal body #page-content.compact-ops-purchases .procurement-stock-disclosure { flex-basis: 430px; }
}

/* Do not let a hidden native region or a permission-gated action reappear. */
html:root.orders-crystal body #page-content.compact-ops-page [hidden] { display: none!important; }

/* END COMPACT operations */


/* BEGIN COMPACT workflows */
/* V17 retake replacement. Load in place of compact-workflows.css.
   Flex wrapping uses the available main width; no fixed desktop row count. */
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on.compact-workflow-root,
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-root {
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center;
  align-content:flex-start;
  column-gap:8px!important;
  row-gap:10px!important;
  min-width:0;
}
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on.compact-workflow-root > :not(.compact-workflow-flatten):not(.compact-workflow-item),
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-root > :not(.compact-workflow-flatten):not(.compact-workflow-item),
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-content,
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-task-content {
  flex:1 0 100%!important;
  width:100%;
  max-width:100%;
  min-width:0;
  order:30;
}
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-flatten {
  display:contents!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  background:none!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-flatten > :is(canvas,.sg-pane) { display:none!important; }
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-item {
  box-sizing:border-box;
  flex:0 0 auto!important;
  min-width:0!important;
  max-width:100%!important;
  width:auto!important;
  margin:0!important;
  grid-column:auto!important;
  grid-row:auto!important;
  order:4;
}
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-title {
  order:0;
  flex:0 1 auto!important;
}
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-title > :is(p,.eyebrow) { display:none!important; }
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-title h1 {
  margin:0!important;
  font-size:var(--orders-page-title-size,28px)!important;
  line-height:1.2;
  overflow-wrap:normal;
}
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-action {
  order:9;
  margin-inline-start:auto!important;
  min-height:44px;
  white-space:nowrap;
}
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-action + .compact-workflow-action { margin-inline-start:0!important; }
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-search {
  order:2;
  flex:1 1 180px!important;
  width:220px!important;
  min-width:min(180px,100%)!important;
  max-width:280px!important;
  height:44px!important;
  min-height:44px!important;
}
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-search :is(input,.search-shell,.transaction-search-field) {
  box-sizing:border-box;
  min-width:0!important;
  width:100%!important;
  height:44px!important;
  min-height:44px!important;
  margin:0!important;
}
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-types {
  order:3;
  min-height:44px;
}
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-types :is(.tabs,.segmented) { width:auto!important; }
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .orders-live-status.flow-live-idle {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip-path:inset(50%);
  white-space:nowrap;
}
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-period { order:5; }
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-storage { order:3; flex:0 1 190px!important; }
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on :is(.compact-workflow-refresh,.compact-workflow-utilities) { order:8; }
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-refresh {
  width:44px!important;
  min-width:44px!important;
  height:44px!important;
  min-height:44px!important;
  aspect-ratio:1;
}
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on :is(.compact-workflow-label-control,.transaction-search-label) { font-size:0!important; gap:0!important; }
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-label-control select {
  width:auto!important;
  min-width:130px;
  max-width:100%;
  font-size:13px!important;
  height:44px!important;
  padding-inline:14px 32px;
}
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .transaction-search-label input { font-size:13px!important; }

/* Each added disclosure holds original controls. Expanded content occupies a
   bounded full row instead of an overlay that can escape a narrow workspace. */
html:root.orders-crystal body #page-content.compact-workflow-page .compact-workflow-disclosure {
  min-width:0;
  max-width:100%;
}
html:root.orders-crystal body #page-content.compact-workflow-page .compact-workflow-summary {
  display:flex;
  align-items:center;
  justify-content:space-between;
  box-sizing:border-box;
  gap:10px;
  min-height:44px;
  width:fit-content;
  max-width:360px;
  padding:10px 14px;
  border:0!important;
  border-radius:var(--orders-radius-control,999px);
  background:var(--orders-control-fill,var(--control-surface))!important;
  box-shadow:var(--orders-control-shadow,none)!important;
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  color:var(--text)!important;
  font-size:13px;
  line-height:20px;
  cursor:pointer;
  list-style:none;
}
html:root.orders-crystal body #page-content.compact-workflow-page .compact-workflow-summary::-webkit-details-marker { display:none; }
html:root.orders-crystal body #page-content.compact-workflow-page .compact-workflow-summary:focus-visible { outline:2px solid var(--orders-focus,currentColor); outline-offset:3px; }
html:root.orders-crystal body #page-content.compact-workflow-page .compact-workflow-summary-copy { min-width:0; overflow-wrap:anywhere; }
html:root.orders-crystal body #page-content.compact-workflow-page .compact-workflow-disclosure:not([open]) > .compact-workflow-disclosure-body { display:none!important; }
html:root.orders-crystal body #page-content.compact-workflow-page .compact-workflow-live-disclosure[open] {
  flex:1 0 100%!important;
  width:100%!important;
}
html:root.orders-crystal body #page-content.compact-workflow-page .compact-workflow-live-disclosure > .compact-workflow-disclosure-body {
  box-sizing:border-box;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  width:100%;
  min-width:0;
  margin-top:8px;
  padding:14px;
  border-radius:var(--orders-radius-inset,20px);
  background:var(--card-surface)!important;
  box-shadow:var(--card-edge)!important;
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-live-disclosure > .compact-workflow-disclosure-body .compact-workflow-item { order:0!important; }
html:root.orders-crystal body #page-content.compact-workflow-page .compact-workflow-passthrough { display:none!important; }
html:root.orders-crystal body #page-content.compact-workflow-page .compact-workflow-disclosure [hidden] { display:none!important; }

/* Tasks keep the native list/calendar contents and all task actions intact. */
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-task-content {
  border-radius:var(--orders-radius-card,24px);
  background:var(--card-surface)!important;
  box-shadow:var(--card-edge)!important;
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  overflow:hidden;
}
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .ts-task-footer { padding:0 10px 6px; border:0; }
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .ts-assignee-filter > span { display:none; }
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .ts-assignee-filter select { max-width:200px; }
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .shift-filter-summary.compact-workflow-content { margin:0; padding:0; line-height:18px; }

/* Reserve the title/action pair before optional list controls can wrap. The
   original view tabs collapse only below 1180px of actual main width (JS).
   On a wider workspace they remain in their original viewbar, fully visible. */
@media (min-width:761px) {
  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on.compact-workflow-orders .compact-workflow-action { order:1; margin-inline-start:0!important; }
  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on.compact-workflow-orders .compact-workflow-search { max-width:240px!important; }
}

/* Existing inventory disclosures expand in normal flow; their anchors remain. */
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on :is(.inventory-filter-disclosure,.inventory-management,.compact-workflow-shift-advanced)[open] {
  flex:1 0 100%!important;
  width:100%!important;
}
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on :is(.inventory-filter-content,.inventory-management > .warehouse-heading-actions,.compact-workflow-shift-advanced > .journal-advanced-content) {
  position:static!important;
  inset:auto!important;
  width:100%!important;
  max-width:100%!important;
  margin-top:8px!important;
}
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .inventory-management > summary { width:fit-content; }
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-shift-advanced { min-width:0!important; }
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-shift-advanced > summary { min-height:44px; padding-block:10px; }

/* Transactions retains the existing <=900px disclosure and its native state. */
@media (min-width:901px) {
  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-transaction-filters { display:contents!important; }
  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-disclosure-body > .transactions-filter-fields {
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    flex:1 0 100%;
    gap:12px;
    min-width:0;
  }
  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .transactions-filter-fields > label { grid-column:auto!important; grid-row:auto!important; }
  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .transactions-local-dates { grid-column:1/-1!important; display:flex!important; flex-wrap:wrap; gap:10px; padding:0!important; margin:0!important; }
  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .transactions-local-dates > label { flex:1 1 150px; min-width:0; }
  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .transactions-local-dates > small { flex:1 0 100%; }
}
@media (max-width:900px) {
  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-transaction-filters { order:4; flex:1 0 100%!important; width:100%!important; }
  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-default-filters:not(:has(.transactions-filter-toggle[aria-expanded="true"])) { flex:0 0 auto!important; width:auto!important; }
  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-default-filters .transactions-filter-summary { display:none; }
  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-default-filters .transactions-filter-toggle { grid-template-columns:auto 10px; }
  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .transactions-filter-summary { white-space:normal; overflow:visible; text-overflow:clip; overflow-wrap:anywhere; }
}
@media (max-width:760px) {
  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-title h1 { font-size:var(--orders-page-title-size,24px)!important; }
  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-action { order:1; min-height:44px; padding-inline:12px; font-size:13px; }
  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-search { flex:1 1 200px!important; max-width:none!important; }
  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-refresh { order:2; }
  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-mobile-tools { order:3; flex:1 0 100%!important; width:100%!important; }
  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-mobile-tools > summary { width:100%; max-width:100%; }
  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-mobile-tools .compact-workflow-disclosure-body { gap:8px; }
  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-mobile-tools :is(.ts-scope,.ts-view-switch,.ts-assignee-filter) { width:100%!important; flex:1 0 100%!important; }
  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-mobile-tools .ts-assignee-filter select { width:100%; max-width:none; }
  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-storage { flex:1 1 150px!important; }
  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-label-control select { min-width:112px; }
  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-shift-advanced { flex:1 1 180px!important; }
}

/* Order detail: retain the prepared production/confirmed full row when narrow.
   At 640–760px the original controls use one flex row when their labels fit;
   additional permission-dependent actions can still wrap without shrinking. */
@media (max-width:760px) {
  html:root.orders-crystal body #page-content.flow-order-detail.compact-workflow-order-detail > .detail-heading > .heading-actions > :is(.button,.icon-btn) {
    aspect-ratio:auto!important;
    height:44px!important;
    min-height:44px!important;
    align-items:center!important;
  }
}
@media (max-width:639px) {
  html:root.orders-crystal body #page-content.flow-order-detail.compact-workflow-order-detail > .detail-heading > .heading-actions > :is([data-act="retail-production"],.production-confirmed) { grid-column:1 / -1!important; }
}
@media (min-width:640px) and (max-width:760px) {
  html:root.orders-crystal body #page-content.flow-order-detail.compact-workflow-order-detail > .detail-heading > .heading-actions {
    display:flex!important;
    flex-wrap:wrap!important;
    align-items:center!important;
    gap:8px!important;
  }
  html:root.orders-crystal body #page-content.flow-order-detail.compact-workflow-order-detail > .detail-heading > .heading-actions > :is(.button,.icon-btn) {
    flex:0 0 auto!important;
    width:auto!important;
    min-width:0!important;
    grid-column:auto!important;
    white-space:nowrap;
  }
}

/* END COMPACT workflows */


/* BEGIN COMPACT administration */
/* Compact administration candidate. Load after the current workspace styles.
   Scoped presentation only; colors, CTA states and glass come from shared tokens.
   Chats list-header rules are injected into its native ShadowRoot by companion JS. */

/* Overview: title/location, original period controls and utility actions share
   the available width. No chart, date, preset or export behavior changes. */
html:root.orders-crystal #page-content .compact-admin-overview {
  min-width: 0;
  container: compact-admin-overview / inline-size;
}
html:root.orders-crystal #page-content .compact-admin-overview > :is(.page-heading,.page-head) {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  min-height: 0;
  margin: 0 0 14px!important;
  padding: 0!important;
}
html:root.orders-crystal #page-content .compact-admin-overview > :is(.page-heading,.page-head) > div:not(.heading-actions) {
  order: 1;
  flex: 0 1 170px;
  min-width: 0;
}
html:root.orders-crystal #page-content .compact-admin-overview > :is(.page-heading,.page-head) :is(.eyebrow) { display: none; }
html:root.orders-crystal #page-content .compact-admin-overview > :is(.page-heading,.page-head) h1 { margin: 0; }
html:root.orders-crystal #page-content .compact-admin-overview > :is(.page-heading,.page-head) > div > p {
  margin: 3px 0 0;
  font-size: 12px;
  line-height: 1.35;
}
html:root.orders-crystal #page-content .compact-admin-overview .ov-period {
  order: 2;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 1 1 640px;
  flex-wrap: wrap;
  gap: 8px;
  width: auto;
  min-width: 0;
  min-height: 0;
  margin: 0!important;
  padding: 0!important;
  border: 0!important;
  border-radius: 0!important;
  background: transparent!important;
  box-shadow: none!important;
  -webkit-backdrop-filter: none!important;
  backdrop-filter: none!important;
}
html:root.orders-crystal #page-content .compact-admin-overview .ov-period > :is(.glass-canvas,.sg-pane) { display: none!important; }
html:root.orders-crystal #page-content .compact-admin-overview .ov-presets {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
  margin: 0;
}
html:root.orders-crystal #page-content .compact-admin-overview .ov-presets > button {
  flex: 0 0 auto;
  white-space: nowrap;
}
html:root.orders-crystal #page-content .compact-admin-overview [data-act="overview-calendar"] {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
}
html:root.orders-crystal #page-content .compact-admin-overview > :is(.page-heading,.page-head) > .heading-actions {
  order: 3;
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  margin: 0;
}
html:root.orders-crystal #page-content .compact-admin-overview :is(.ov-kpis,.ov-main-grid,.ov-detail-grid) { gap: 14px; }
html:root.orders-crystal #page-content .compact-admin-overview .ov-kpis { margin-bottom: 14px; }
@container compact-admin-overview (max-width: 999px) {
  html:root.orders-crystal #page-content .compact-admin-overview > :is(.page-heading,.page-head) > div:not(.heading-actions) { flex: 1 1 auto; }
  html:root.orders-crystal #page-content .compact-admin-overview > :is(.page-heading,.page-head) > .heading-actions { order: 2; }
  html:root.orders-crystal #page-content .compact-admin-overview .ov-period { order: 3; flex-basis: 100%; }
}
@container compact-admin-overview (max-width: 600px) {
  html:root.orders-crystal #page-content .compact-admin-overview .ov-period { display: grid; grid-template-columns: minmax(0,1fr); }
  html:root.orders-crystal #page-content .compact-admin-overview .ov-presets {
    width: 100%;
    max-width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    padding: 2px 0 4px;
  }
  html:root.orders-crystal #page-content .compact-admin-overview [data-act="overview-calendar"] { width: 100%; justify-content: center; }
}

/* Integrations: remove the fixed 680px payment column and Stripe's full-row
   span. Individual provider cards determine their inner form layout. */
html:root.orders-crystal #page-content .compact-admin-integrations {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  container: compact-admin-integrations / inline-size;
}
html:root.orders-crystal #page-content .compact-admin-integrations > .page-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: 0 0 14px!important;
  min-width: 0;
}
html:root.orders-crystal #page-content .compact-admin-integrations > .page-heading > div:first-child { flex: 0 1 auto; min-width: 0; }
html:root.orders-crystal #page-content .compact-admin-integrations > .page-heading > div:first-child > :is(.eyebrow,p) { display: none; }
html:root.orders-crystal #page-content .compact-admin-integrations > .page-heading h1 { margin: 0; }
html:root.orders-crystal #page-content .compact-admin-integrations > .page-heading > .commerce-categories {
  flex: 0 1 auto;
  width: auto;
  min-width: 0;
  margin: 0!important;
}
html:root.orders-crystal #page-content .compact-admin-integrations > .page-heading > :is(button,.heading-actions) { margin-inline-start: auto; }
html:root.orders-crystal #page-content .compact-admin-integrations .commerce-grid { gap: 16px; align-items: start; }
html:root.orders-crystal #page-content .compact-admin-integrations .commerce-grid.commerce-payments {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,420px),1fr))!important;
  width: 100%;
  max-width: none;
}
html:root.orders-crystal #page-content .compact-admin-integrations .commerce-payments > .commerce-card {
  grid-column: auto!important;
  min-width: 0;
  padding: 18px!important;
  container: compact-admin-provider / inline-size;
}
html:root.orders-crystal #page-content .compact-admin-integrations .commerce-payments .commerce-card-head { gap: 10px; }
html:root.orders-crystal #page-content .compact-admin-integrations .commerce-payments .commerce-card-head h2 { margin: 0; }
html:root.orders-crystal #page-content .compact-admin-integrations .commerce-payments .commerce-card-actions {
  align-items: center;
  justify-content: flex-start;
  margin-top: 12px;
  padding-top: 0;
  gap: 8px;
}
html:root.orders-crystal #page-content .compact-admin-integrations .commerce-payments [data-square-settings] { min-width: 0; }
html:root.orders-crystal #page-content .compact-admin-integrations .commerce-payments [data-square-settings] > label { display: grid; gap: 6px; min-width: 0; margin: 12px 0; }
html:root.orders-crystal #page-content .compact-admin-integrations .commerce-payments .stripe-qr-grid {
  grid-template-columns: minmax(0,1fr)!important;
  gap: 16px!important;
  margin-top: 14px;
}
html:root.orders-crystal #page-content .compact-admin-integrations .commerce-payments .stripe-qr-grid > section {
  min-width: 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
html:root.orders-crystal #page-content .compact-admin-integrations .commerce-payments .stripe-qr-grid > section > h3 { margin: 0 0 8px; font-size: 16px; font-weight: 500; }
html:root.orders-crystal #page-content .compact-admin-integrations .commerce-payments .stripe-qr-grid > section > p { margin: 8px 0; }
html:root.orders-crystal #page-content .compact-admin-integrations .commerce-payments .stripe-qr-grid > section > :is(button,a.button) { margin: 4px 4px 4px 0; }
html:root.orders-crystal #page-content .compact-admin-integrations .commerce-payments .stripe-qr-card label { margin: 0; gap: 6px; }
html:root.orders-crystal #page-content .compact-admin-integrations .commerce-payments [data-stripe-static-form] {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  gap: 12px;
  margin-top: 12px;
  align-items: start;
}
html:root.orders-crystal #page-content .compact-admin-integrations .commerce-payments [data-stripe-static-form] > button[type="submit"] { grid-column: 1 / -1; justify-self: start; margin: 0; }
@container compact-admin-provider (min-width: 500px) {
  html:root.orders-crystal #page-content .compact-admin-integrations .commerce-payments .stripe-qr-grid { grid-template-columns: repeat(2,minmax(0,1fr))!important; }
  html:root.orders-crystal #page-content .compact-admin-integrations .commerce-payments .stripe-qr-grid > section:has(> [data-stripe-static-form]) { grid-column: 1 / -1; }
  html:root.orders-crystal #page-content .compact-admin-integrations .commerce-payments [data-stripe-static-form] { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@container compact-admin-provider (min-width: 650px) {
  html:root.orders-crystal #page-content .compact-admin-integrations .commerce-payments [data-stripe-static-form] { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@container compact-admin-integrations (max-width: 700px) {
  html:root.orders-crystal #page-content .compact-admin-integrations > .page-heading > .commerce-categories { order: 3; flex-basis: 100%; width: 100%; }
  html:root.orders-crystal #page-content .compact-admin-integrations > .page-heading > div:first-child { flex: 1 1 auto; }
}

/* Team: one native heading row; the list/detail/permissions panes and Back
   behavior keep their existing main-column breakpoints. */
html:root.orders-crystal #page-content .compact-admin-team > .team-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px 20px;
  margin: 0 0 14px;
}
html:root.orders-crystal #page-content .compact-admin-team > .team-head > div:first-child { min-width: 0; flex: 0 1 auto; }
html:root.orders-crystal #page-content .compact-admin-team > .team-head > div:first-child > :is(.eyebrow,p) { display: none; }
html:root.orders-crystal #page-content .compact-admin-team > .team-head > .team-tabs { width: auto; margin: 0; flex: 0 1 auto; }
html:root.orders-crystal #page-content .compact-admin-team > .team-head > .team-refresh { margin-inline-start: auto; }
html:root.orders-crystal #page-content .compact-admin-team .team-content { gap: 14px; }
html:root.orders-crystal #page-content .compact-admin-team .team-list { padding: 14px; }
html:root.orders-crystal #page-content .compact-admin-team .team-search { margin: 12px 0; }
html:root.orders-crystal #page-content .compact-admin-team .team-selection-empty { min-height: 220px; padding: 28px 20px; gap: 10px; }
@container people-team (max-width: 680px) {
  html:root.orders-crystal #page-content .compact-admin-team > .team-head > div:first-child { flex: 1 1 auto; }
  html:root.orders-crystal #page-content .compact-admin-team > .team-head > .team-tabs { order: 3; flex-basis: 100%; width: 100%; }
  html:root.orders-crystal #page-content .compact-admin-team > .team-head > .team-refresh { order: 2; }
}

/* Settings: tighter hierarchy, three short Order cards on a genuinely wide
   main column, and printer choice/actions together when the content permits.
   Search stays within the native navigation; all seven groups still filter it. */
html:root.orders-crystal #page-content.compact-admin-settings > .page-heading { margin-bottom: 14px!important; }
html:root.orders-crystal #page-content.compact-admin-settings > .page-heading > div:first-child > :is(.eyebrow,p) { display: none; }
html:root.orders-crystal #page-content.compact-admin-settings > .page-heading h1 { margin: 0; }
html:root.orders-crystal #page-content.compact-admin-settings > .settings-grid.settings-redesign-grid { gap: 12px!important; }
html:root.orders-crystal #page-content.compact-admin-settings .settings-grid.settings-redesign-grid > [data-ops-settings-card] { padding: 18px!important; }
html:root.orders-crystal #page-content.compact-admin-settings .settings-grid.settings-redesign-grid > [data-ops-settings-card] :is(h2,h3) { margin-bottom: 12px; }
html:root.orders-crystal #page-content.compact-admin-settings .settings-redesign-grid :is(.vstack,.field-row,.settings-language-fields) { gap: 12px; }
html:root.orders-crystal #page-content.compact-admin-settings .settings-redesign-grid .compact-admin-printer {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  gap: 8px 12px;
  min-width: 0;
  margin: 12px 0!important;
}
html:root.orders-crystal #page-content.compact-admin-settings .compact-admin-printer > .field-label { margin: 0; }
html:root.orders-crystal #page-content.compact-admin-settings .compact-admin-printer > .subline { margin: 2px 0; }
html:root.orders-crystal #page-content.compact-admin-settings .compact-admin-printer > .compact-admin-printer-actions { align-items: center; gap: 8px!important; }
html:root.orders-crystal #page-content.compact-admin-settings .compact-admin-printer > .compact-admin-printer-select { min-width: 0; max-width: 100%; }
@container order-settings (min-width: 1120px) {
  html:root.orders-crystal #page-content.compact-admin-settings > .settings-grid.settings-redesign-grid[data-settings-active="orders"] { grid-template-columns: repeat(3,minmax(0,1fr)); }
  html:root.orders-crystal #page-content.compact-admin-settings .settings-redesign-grid .compact-admin-printer { grid-template-columns: minmax(220px,1fr) minmax(0,max-content); }
  html:root.orders-crystal #page-content.compact-admin-settings .compact-admin-printer > :is(.field-label,.subline) { grid-column: 1 / -1; }
  html:root.orders-crystal #page-content.compact-admin-settings .compact-admin-printer > .compact-admin-printer-select { grid-column: 1; grid-row: 2; }
  html:root.orders-crystal #page-content.compact-admin-settings .compact-admin-printer > .compact-admin-printer-actions { grid-column: 2; grid-row: 2; }
}
@media (max-width: 900px) {
  html:root.orders-crystal #page-content.compact-admin-settings > .settings-redesign-nav { margin-bottom: 12px; }
}

/* Subscriptions: search and refresh join the title/tabs/action header. Native
   status/kind disclosure remains adjacent below, and errors/pending retries
   remain visible between tools and list. Financial forms are untouched. */
html:root.orders-crystal #page-content .compact-admin-subscriptions {
  min-width: 0;
  container: compact-admin-subscriptions / inline-size;
}
html:root.orders-crystal #page-content .compact-admin-subscriptions > .subscriptions-heading {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 10px 14px;
  margin: 0 0 10px;
}
html:root.orders-crystal #page-content .compact-admin-subscriptions > .subscriptions-heading > h1 { grid-column: 1; grid-row: 1; margin: 0; }
html:root.orders-crystal #page-content .compact-admin-subscriptions > .subscriptions-heading > .subscriptions-primary-action { grid-column: 2; grid-row: 1; margin: 0; }
html:root.orders-crystal #page-content .compact-admin-subscriptions > .subscriptions-heading > .subscriptions-tabs { grid-column: 1 / -1; grid-row: 2; justify-self: start; margin: 0; }
html:root.orders-crystal #page-content .compact-admin-subscriptions .compact-admin-subscription-search {
  display: grid;
  grid-column: 1 / -1;
  grid-row: 3;
  grid-template-columns: minmax(0,360px) 44px;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
html:root.orders-crystal #page-content .compact-admin-subscriptions .compact-admin-subscription-search > .subscriptions-search { grid-column: 1; grid-row: 1; max-width: 100%; }
html:root.orders-crystal #page-content .compact-admin-subscriptions .compact-admin-subscription-search > .subscriptions-refresh { grid-column: 2; grid-row: 1; }
html:root.orders-crystal #page-content .compact-admin-subscriptions > .subscriptions-toolbar {
  display: block;
  margin: 0 0 14px;
  min-width: 0;
}
html:root.orders-crystal #page-content .compact-admin-subscriptions .subscriptions-filter-options { flex-wrap: wrap; }
html:root.orders-crystal #page-content .compact-admin-subscriptions .subscriptions-workspace { gap: 14px; }
html:root.orders-crystal #page-content .compact-admin-subscriptions .subscriptions-empty { min-height: 160px; padding: 24px 20px; }
@container compact-admin-subscriptions (min-width: 780px) {
  html:root.orders-crystal #page-content .compact-admin-subscriptions > .subscriptions-heading { grid-template-columns: auto minmax(0,1fr) auto; }
  html:root.orders-crystal #page-content .compact-admin-subscriptions > .subscriptions-heading > .subscriptions-tabs { grid-column: 2; grid-row: 1; }
  html:root.orders-crystal #page-content .compact-admin-subscriptions > .subscriptions-heading > .subscriptions-primary-action { grid-column: 3; grid-row: 1; }
  html:root.orders-crystal #page-content .compact-admin-subscriptions .compact-admin-subscription-search { grid-column: 1 / -1; grid-row: 2; }
}
@container compact-admin-subscriptions (min-width: 1080px) {
  html:root.orders-crystal #page-content .compact-admin-subscriptions > .subscriptions-heading { grid-template-columns: auto auto minmax(180px,1fr) auto; }
  html:root.orders-crystal #page-content .compact-admin-subscriptions .compact-admin-subscription-search { grid-column: 3; grid-row: 1; justify-self: end; width: 100%; max-width: 368px; }
  html:root.orders-crystal #page-content .compact-admin-subscriptions > .subscriptions-heading > .subscriptions-primary-action { grid-column: 4; }
}
@container compact-admin-subscriptions (max-width: 600px) {
  html:root.orders-crystal #page-content .compact-admin-subscriptions > .subscriptions-heading > .subscriptions-tabs { width: 100%; justify-self: stretch; }
  html:root.orders-crystal #page-content .compact-admin-subscriptions .compact-admin-subscription-search { grid-template-columns: minmax(0,1fr) 44px; }
}
html:root.orders-crystal #page-content .compact-admin-chats-host { min-width: 0; }

/* END COMPACT administration */


/* BEGIN COMPACT shared */
/* One title scale for every workspace heading. Individual modules inherit the
   same geometry instead of picking a new size as their toolbar gets denser. */
html:root.orders-crystal {
  --orders-page-title-size:28px;
  --orders-page-title-tracking:-.035em;
}
@media (max-width:760px) {
  html:root.orders-crystal { --orders-page-title-size:24px; }
}
html:root.orders-crystal body #page-content :is(.page-heading,.page-head,.team-head,.transactions-head,.subscriptions-heading,.doc-library-intro) h1,
html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on .compact-workflow-title h1,
html:root.orders-crystal body #page-content.compact-ops-page .compact-ops-title > h1 {
  margin:0!important;
  font-size:var(--orders-page-title-size)!important;
  font-weight:500!important;
  line-height:1.2!important;
  letter-spacing:var(--orders-page-title-tracking)!important;
  color:var(--text,var(--ink))!important;
}

/* END COMPACT shared */

/* BEGIN RETAKE compact-operations-retake.css */
/* Purchases desktop retake. Append after compact-operations.css.
   At a 1056px+ main column, use a 200px search and 150px warehouse field.
   Native actions retain their intrinsic width; long dates/labels may wrap the
   filter group instead of truncating buttons. Smaller columns keep two rows. */
@container compact-ops (min-width: 1056px) {
  html:root.orders-crystal body #page-content.compact-ops-purchases .compact-ops-title {
    flex: 0 1 auto;
  }
  html:root.orders-crystal body #page-content.compact-ops-purchases .compact-ops-actions {
    flex: 0 0 auto!important;
    max-width: none;
    margin-inline-start: auto!important;
  }
  html:root.orders-crystal body #page-content.compact-ops-purchases .compact-ops-actions > .button {
    flex: 0 0 auto;
    max-width: none;
    white-space: nowrap!important;
  }
  html:root.orders-crystal body #page-content.compact-ops-purchases > .compact-ops-tools:not(:has(.stock-date-filters[open])) {
    order: 15;
    flex: 1 1 640px;
    flex-wrap: nowrap;
    min-width: 0;
    gap: 8px;
  }
  html:root.orders-crystal body #page-content.compact-ops-purchases .compact-ops-tools > .procurement-search {
    flex: 0 0 200px;
    width: 200px!important;
    min-width: 200px;
    max-width: 200px;
  }
  html:root.orders-crystal body #page-content.compact-ops-purchases .procurement-stock-disclosure {
    flex: 1 1 430px;
    min-width: 0;
  }
  html:root.orders-crystal body #page-content.compact-ops-purchases .procurement-stock-filters {
    gap: 8px;
    flex-wrap: wrap;
  }
  html:root.orders-crystal body #page-content.compact-ops-purchases .procurement-stock-filters > .procurement-warehouse-field {
    flex: 0 0 150px;
    width: 150px;
    min-width: 150px;
    max-width: 150px;
  }
  html:root.orders-crystal body #page-content.compact-ops-purchases .procurement-stock-filters > .stock-date-filters:not([open]) {
    flex: 0 0 auto;
    min-width: 130px;
    max-width: 100%;
  }
  html:root.orders-crystal body #page-content.compact-ops-purchases .procurement-stock-filters > .button {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
  }
}
/* END RETAKE compact-operations-retake.css */


/* BEGIN RETAKE compact-admin-retake.css */
/* V17 Overview retake: native dashboard gap22 plus child margin14 produced
   36px between sections. Let one shared grid gap own vertical spacing. */
html:root.orders-crystal #page-content .overview-dashboard.compact-admin-overview {
  gap: 14px!important;
}
html:root.orders-crystal #page-content .overview-dashboard.compact-admin-overview > :is(.page-heading,.page-head) {
  margin-bottom: 0!important;
}
html:root.orders-crystal #page-content .overview-dashboard.compact-admin-overview > .ov-kpis {
  margin-bottom: 0!important;
}

/* Without a Refresh control, native space-between pushed payment categories
   to the far edge. Keep the same title/navigation anchor on every category. */
html:root.orders-crystal #page-content .commerce-integrations.compact-admin-integrations > .page-heading {
  justify-content: flex-start;
}

/* Native provider helpers render these exact save actions as .button.glass,
   without .primary. Apply existing primary tokens to only these two CTAs. */
html:root.orders-crystal #page-content .commerce-integrations.compact-admin-integrations .commerce-payments button:is([data-stripe-action="mode"],[data-square-action="location"]) {
  --orders-primary-current: var(--orders-primary-fill);
  --orders-control-fill: var(--orders-primary-current);
  --orders-control-hover: var(--orders-primary-current);
  --orders-control-shadow: var(--orders-primary-shadow);
  --hover-bg: var(--orders-primary-current);
  --ink: var(--orders-primary-ink);
  --navy: var(--orders-primary-ink);
  --text: var(--orders-primary-ink);
  --muted: var(--orders-primary-ink);
  background: var(--orders-primary-current)!important;
  color: var(--orders-primary-ink)!important;
  -webkit-text-fill-color: var(--orders-primary-ink)!important;
  border: 0!important;
  border-radius: var(--orders-radius-control,999px)!important;
  box-shadow: var(--orders-primary-shadow)!important;
}
html:root.orders-crystal #page-content .commerce-integrations.compact-admin-integrations .commerce-payments button:is([data-stripe-action="mode"],[data-square-action="location"]):hover:not(:disabled):not([aria-disabled="true"]) {
  --orders-primary-current: var(--orders-primary-hover);
}
html:root.orders-crystal #page-content .commerce-integrations.compact-admin-integrations .commerce-payments button:is([data-stripe-action="mode"],[data-square-action="location"]):active:not(:disabled):not([aria-disabled="true"]) {
  --orders-primary-current: var(--orders-primary-active);
}
html:root.orders-crystal #page-content .commerce-integrations.compact-admin-integrations .commerce-payments button:is([data-stripe-action="mode"],[data-square-action="location"]):is(:disabled,[aria-disabled="true"]) {
  opacity: .55!important;
  cursor: not-allowed;
}
html:root.orders-crystal #page-content .commerce-integrations.compact-admin-integrations .commerce-payments button:is([data-stripe-action="mode"],[data-square-action="location"]):focus-visible {
  outline: 2px solid var(--orders-focus);
  outline-offset: 3px;
}

/* At the captured main width1062, Stripe's content is about482px. Two compact
   inner sections fit here. Keep the wider650px three-field form breakpoint. */
@container compact-admin-provider (min-width: 460px) {
  html:root.orders-crystal #page-content .compact-admin-integrations .commerce-payments .stripe-qr-grid { grid-template-columns: repeat(2,minmax(0,1fr))!important; }
  html:root.orders-crystal #page-content .compact-admin-integrations .commerce-payments .stripe-qr-grid > section:has(> [data-stripe-static-form]) { grid-column: 1 / -1; }
  html:root.orders-crystal #page-content .compact-admin-integrations .commerce-payments [data-stripe-static-form] { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@container compact-admin-provider (min-width: 650px) {
  html:root.orders-crystal #page-content .compact-admin-integrations .commerce-payments [data-stripe-static-form] { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

/* Native Team outer grid reserved three columns for separate heading/tabs.
   The compact header owns those nodes now; list/detail remains its inner grid. */
html:root.orders-crystal #page-content .order-team-page.compact-admin-team {
  grid-template-columns: minmax(0,1fr);
  gap: 14px;
}
html:root.orders-crystal #page-content .order-team-page.compact-admin-team > .team-head {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

/* Actual1062px main has enough space for title, tabs, bounded search and CTA.
   The original1080px threshold unnecessarily created a third toolbar row. */
@container compact-admin-subscriptions (min-width: 980px) {
  html:root.orders-crystal #page-content .compact-admin-subscriptions > .subscriptions-heading { grid-template-columns: auto auto minmax(180px,1fr) auto; }
  html:root.orders-crystal #page-content .compact-admin-subscriptions .compact-admin-subscription-search { grid-column: 3; grid-row: 1; justify-self: end; width: 100%; max-width: 368px; }
  html:root.orders-crystal #page-content .compact-admin-subscriptions > .subscriptions-heading > .subscriptions-primary-action { grid-column: 4; }
}

/* Three short Order cards have roughly260px each at this main width.
   Printer choice/actions stay in the existing full-width receipt card. */
@container order-settings (min-width: 1050px) {
  html:root.orders-crystal #page-content.compact-admin-settings > .settings-grid.settings-redesign-grid[data-settings-active="orders"] { grid-template-columns: repeat(3,minmax(0,1fr)); }
  html:root.orders-crystal #page-content.compact-admin-settings .settings-redesign-grid .compact-admin-printer { grid-template-columns: minmax(220px,1fr) minmax(0,max-content); }
  html:root.orders-crystal #page-content.compact-admin-settings .compact-admin-printer > :is(.field-label,.subline) { grid-column: 1 / -1; }
  html:root.orders-crystal #page-content.compact-admin-settings .compact-admin-printer > .compact-admin-printer-select { grid-column: 1; grid-row: 2; }
  html:root.orders-crystal #page-content.compact-admin-settings .compact-admin-printer > .compact-admin-printer-actions { grid-column: 2; grid-row: 2; }
}

/* The native210px flex basis plus146px NFC action and10px gap barely exceeds
   the captured365px card interior. Retain a useful180px field beside the CTA.
   Existing mobile full-width stacking remains authoritative below521px. */
@media (min-width: 521px) {
  html:root.orders-crystal #page-content.compact-admin-settings .settings-redesign-grid .settings-nfc-write-row > .field-shell { flex-basis: 180px; }
}

/* Restore the native paired editors only when the settings work area fits.
   Both original sections, descriptions and configure buttons remain in place. */
@container order-settings (min-width: 1000px) {
  html:root.orders-crystal #page-content.compact-admin-settings .settings-redesign-grid [data-location-settings] {
    grid-template-columns: repeat(2,minmax(0,1fr));
    column-gap: 20px;
  }
  html:root.orders-crystal #page-content.compact-admin-settings .settings-redesign-grid [data-location-settings] > .location-status-inline {
    grid-column: 2;
    grid-row: 1 / 5;
    margin: 0;
    padding: 0 0 0 20px;
    border-top: 0;
    border-left: 1px solid var(--line);
  }
  html:root.orders-crystal #page-content.compact-admin-settings > .settings-grid.settings-redesign-grid[data-settings-active="delivery"] > [data-ops-settings-card="delivery"]:has(> .shipping-print-settings:not([open])) {
    grid-column: auto;
    align-self: start;
  }
}
html:root.orders-crystal #page-content.compact-admin-settings .settings-redesign-grid > [data-ops-settings-card="delivery"] > .shipping-print-settings { margin-top: 0; }
/* END RETAKE compact-admin-retake.css */


/* BEGIN RETAKE compact-order-summary-retake.css */
/* Desktop Order summary retake. Append after order-flow.css and followups.
   The live 1363x988 capture has a 198px empty-customer card + 537px totals
   card. Remove stacked section margins/padding; retain every amount, customer
   detail and the native 44px Pay action. Existing scrollport/AI clearance stay.
   No sticky action overlay: the normal-flow footer cannot cover totals. */
@media (min-width: 1181px) {
  html:root.orders-crystal body #page-content.flow-order-detail .side-summary {
    gap: 10px;
  }
  html:root.orders-crystal body #page-content.flow-order-detail .side-summary > :is(.customer-panel,.order-customer-panel,.summary-panel) {
    padding: 16px!important;
  }
  html:root.orders-crystal body #page-content.flow-order-detail .side-summary > :is(.customer-panel,.order-customer-panel) > .section-top {
    min-height: 44px;
    margin: 0 0 4px!important;
    gap: 8px;
  }
  html:root.orders-crystal body #page-content.flow-order-detail .side-summary :is(.customer-panel,.order-customer-panel) [data-act="choose-customer"] {
    min-height: 44px;
    min-width: 44px;
    padding: 6px 10px;
  }
  html:root.orders-crystal body #page-content.flow-order-detail .side-summary > :is(.customer-panel,.order-customer-panel) > .empty {
    min-height: 0!important;
    padding: 4px 0 0!important;
    gap: 4px;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: start;
  }
  html:root.orders-crystal body #page-content.flow-order-detail .side-summary :is(.customer-panel,.order-customer-panel) .empty > :is(h3,p) {
    margin: 0!important;
  }
  html:root.orders-crystal body #page-content.flow-order-detail .side-summary :is(.customer-panel,.order-customer-panel) .empty > h3 { font-size: 14px; line-height: 1.4; }
  html:root.orders-crystal body #page-content.flow-order-detail .side-summary :is(.customer-panel,.order-customer-panel) .empty > p { font-size: 12px; line-height: 1.45; }

  html:root.orders-crystal body #page-content.flow-order-detail .side-summary > .summary-panel > .section-top {
    min-height: 0;
    margin: 0 0 8px!important;
  }
  html:root.orders-crystal body #page-content.flow-order-detail .side-summary > :is(.customer-panel,.order-customer-panel,.summary-panel) > .section-top h2 {
    margin: 0;
    font-size: 17px;
    line-height: 1.4;
  }
  html:root.orders-crystal body #page-content.flow-order-detail .side-summary > .summary-panel .summary-lines {
    padding: 0;
    gap: 6px;
  }
  html:root.orders-crystal body #page-content.flow-order-detail .side-summary > .summary-panel .summary-lines > div { min-height: 20px; align-items: center; }
  html:root.orders-crystal body #page-content.flow-order-detail .side-summary > .summary-panel .summary-lines [data-act="adjust-totals"] { min-height: 44px; }
  html:root.orders-crystal body #page-content.flow-order-detail .side-summary > .summary-panel > .commercial-order-summary {
    padding: 8px 0 0;
    margin: 8px 0 0;
  }
  html:root.orders-crystal body #page-content.flow-order-detail .side-summary > .summary-panel > .commercial-order-summary > div { margin: 0; min-height: 44px; gap: 8px; }
  html:root.orders-crystal body #page-content.flow-order-detail .side-summary > .summary-panel > .summary-total {
    margin: 8px 0 0;
    padding: 10px 0 0;
  }
  html:root.orders-crystal body #page-content.flow-order-detail .side-summary > .summary-panel > .summary-due {
    margin: 10px 0;
    padding: 10px 12px;
  }
  html:root.orders-crystal body #page-content.flow-order-detail .side-summary > .summary-panel > [data-act="pay"] {
    min-height: 44px;
    width: 100%;
    margin: 0;
  }
}
/* END RETAKE compact-order-summary-retake.css */


/* BEGIN FINAL overview-axis-followup.css */
/* Native day buttons, dates, tooltips and accessible names stay intact.
   Only colliding interior tick text is visually suppressed; endpoints remain. */
html:root.orders-crystal #page-content .overview-dashboard .ts-chart-dates > button[data-act="overview-day"] > span:first-child.compact-admin-axis-suppressed {
  opacity: 0!important;
}

/* END FINAL overview-axis-followup.css */

/* BEGIN FINAL settings-final-refinement.css */
/* Focused form improvements after V18. Shared neutral glass/primary tokens stay
   authoritative. No native values, permissions, visibility or save semantics change. */

/* The status must not shrink into individual letters in a short Order card. */
html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid button[data-act="round-order-totals"][role="switch"] {
  align-items: center;
  text-align: start;
  gap: 12px!important;
}
html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid button[data-act="round-order-totals"][role="switch"] > span {
  flex: 1 1 auto;
  min-width: 0;
  white-space: normal;
  text-align: start;
}
html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid button[data-act="round-order-totals"][role="switch"] > strong {
  flex: 0 0 auto;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

/* Native directory refresh inserts its new list immediately before this exact
   Save node. Keep it a direct child; align it visually without a wrapper. */
html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid .ops-payment-settings > [data-act="live-save-methods"] {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin: 16px 0 0 auto;
}
html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid .payment-method-visibility > span { min-width: 0; }
html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid .payment-method-visibility small {
  max-height: none;
  overflow: visible;
  line-height: 1.45;
}

/* Opening the detailed Delivery editor gives it a full row. The short default
   selector then becomes a compact complete row above it, avoiding a half-empty
   row at the top (including native loading/error/retry states). */
@container order-settings (min-width: 1000px) {
  html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid[data-settings-active="delivery"]:has(.shipping-print-settings[open]) > [data-ops-settings-card="delivery"]:has([data-act="default-delivery-mode-setting"]) {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(130px,160px) minmax(0,1fr);
    align-items: center;
    gap: 16px 20px;
  }
  html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid[data-settings-active="delivery"]:has(.shipping-print-settings[open]) > [data-ops-settings-card="delivery"]:has([data-act="default-delivery-mode-setting"]) > .section-top {
    min-width: 0;
    margin: 0;
  }
  html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid[data-settings-active="delivery"]:has(.shipping-print-settings[open]) > [data-ops-settings-card="delivery"]:has([data-act="default-delivery-mode-setting"]) > .section-top > h2 { margin: 0; }
  html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid[data-settings-active="delivery"]:has(.shipping-print-settings[open]) > [data-ops-settings-card="delivery"] > .vstack:has([data-act="default-delivery-mode-setting"]) {
    display: grid;
    grid-template-columns: minmax(180px,1fr) minmax(180px,1fr);
    align-items: center;
    gap: 7px 20px;
  }
  html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid[data-settings-active="delivery"]:has(.shipping-print-settings[open]) .vstack > label[for="default-delivery-mode-setting"] { grid-column: 1; grid-row: 1; margin: 0; }
  html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid[data-settings-active="delivery"]:has(.shipping-print-settings[open]) .vstack > [data-act="default-delivery-mode-setting"] { grid-column: 1; grid-row: 2; }
  html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid[data-settings-active="delivery"]:has(.shipping-print-settings[open]) .vstack:has([data-act="default-delivery-mode-setting"]) > .subline { grid-column: 2; grid-row: 1 / 3; margin: 0; }
}

/* The native expanded Delivery form keeps its slot, form, notice and submit.
   One outer glass card owns the surface; inner groups own only field layout. */
html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid .shipping-print-settings [data-order-shipping-settings-slot] form[data-shipping-settings] {
  container: settings-final-shipping / inline-size;
  min-width: 0;
  margin: 12px 0 0;
  padding: 14px 0 0;
  border: 0!important;
  border-top: 1px solid var(--line)!important;
  border-radius: 0!important;
  background: transparent!important;
  box-shadow: none!important;
  -webkit-backdrop-filter: none!important;
  backdrop-filter: none!important;
}
html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid form[data-shipping-settings] > :is(h2,h3) {
  margin: 16px 0 10px;
}
html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid form[data-shipping-settings] > h2:first-child { margin-top: 0; }
html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid form[data-shipping-settings] > p { margin: 0 0 12px; }
html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid form[data-shipping-settings] > .shipping-fields {
  grid-template-columns: minmax(0,1fr);
  gap: 12px 16px;
  margin: 12px 0 18px;
  min-width: 0;
}
html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid form[data-shipping-settings] .shipping-field {
  min-width: 0;
  gap: 7px;
}
html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid form[data-shipping-settings] .shipping-field > .field-label { margin: 0; }
html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid form[data-shipping-settings] > .shipping-checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,160px),1fr));
  gap: 2px 20px;
  margin: 12px 0;
}
html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid form[data-shipping-settings] > .shipping-checkboxes > label {
  min-width: 0;
  min-height: var(--orders-control-height,44px);
}
html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid form[data-shipping-settings] > .shipping-actions {
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid form[data-shipping-settings] > .shipping-actions > [data-shipping-action="preview"] { margin-inline-end: auto; }
@container settings-final-shipping (min-width: 400px) {
  html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid form[data-shipping-settings] > .shipping-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@container settings-final-shipping (min-width: 560px) {
  html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid form[data-shipping-settings] > .shipping-fields:has([data-shipping-field="settingsDraft.standard"]) { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@container settings-final-shipping (min-width: 760px) {
  html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid form[data-shipping-settings] > .shipping-fields:has([data-shipping-picker="settingsDraft.preset"]) { grid-template-columns: repeat(4,minmax(0,1fr)); }
}

/* Existing receipt template selection stays immediately available. Its sample
   is secondary; original thumbnail action and document reference remain inside
   an accessible native details disclosure created by the companion script. */
html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid .receipt-settings-selection { margin: 14px 0; gap: 8px; }
html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid .settings-final-receipt-preview {
  min-width: 0;
  margin: 2px 0 0;
}
html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid .settings-final-receipt-preview > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--orders-control-height,44px);
  box-sizing: border-box;
  padding: 10px 16px;
  border: 0;
  border-radius: var(--orders-radius-control,999px);
  background: var(--orders-control-fill,var(--control-surface));
  box-shadow: var(--orders-control-shadow,none);
  color: var(--text);
  -webkit-backdrop-filter: blur(var(--glass-blur,18px));
  backdrop-filter: blur(var(--glass-blur,18px));
  font-size: 14px;
  line-height: 1.45;
  list-style: none;
  cursor: pointer;
}
html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid .settings-final-receipt-preview > summary::-webkit-details-marker { display: none; }
html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid .settings-final-receipt-preview > summary::after {
  content: '';
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  margin: -3px 3px 0;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}
html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid .settings-final-receipt-preview[open] > summary::after { margin-top: 3px; transform: rotate(225deg); }
html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid .settings-final-receipt-preview > summary:focus-visible { outline: 2px solid var(--orders-focus); outline-offset: 3px; }
html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid .settings-final-receipt-preview > .receipt-settings-thumbnail { margin-top: 12px; }
html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid .settings-final-receipt-preview > .receipt-template-id { display: block; margin-top: 8px; overflow-wrap: anywhere; }
html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid .settings-final-print-row {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  align-items: end;
  gap: 12px 16px;
  min-width: 0;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid .settings-final-print-field { display: grid; gap: 7px; min-width: 0; }
html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid .settings-final-print-field > .field-label { margin: 0; }
html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid .settings-final-print-field > .field-shell { width: 100%; margin: 0; }
html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid .settings-final-print-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}
@container order-settings (min-width: 1000px) {
  html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid .settings-final-print-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(0,max-content); }
  html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid .settings-final-print-actions { grid-column: 3; }
}

/* Optical settings are already secondary. On wide Settings pages, pair their
   short ranges; toggles, titles and notices keep the full row and remain visible. */
@container order-settings (min-width: 1000px) {
  html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid .settings-appearance-advanced .appearance-control-grid > section:has([data-appearance-range="magnify"]) {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 12px 24px;
  }
  html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid .settings-appearance-advanced .appearance-control-grid > section:has([data-appearance-range="magnify"]) > :is(h3,p,.appearance-toggle) { grid-column: 1 / -1; margin: 0; }
  html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid .settings-appearance-advanced .appearance-control-grid > section:has([data-appearance-range="magnify"]) > .appearance-range { min-width: 0; margin-top: 0; }
}
@media (max-width: 600px) {
  html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid .ops-payment-settings > [data-act="live-save-methods"],
  html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid .settings-final-print-actions > [data-act="live-save-print"] { width: 100%; justify-content: center; }
}
@media (max-width: 359px) {
  html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid .settings-final-print-row { grid-template-columns: minmax(0,1fr); }
}
@media (prefers-reduced-transparency: reduce) {
  html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid .settings-final-receipt-preview > summary { -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (forced-colors: active) {
  html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid .settings-final-receipt-preview > summary { background: Canvas; color: CanvasText; border: 1px solid CanvasText; box-shadow: none; }
}
/* END FINAL settings-final-refinement.css */

/* BEGIN FINAL order-heading-final.css */
/* Order detail only. Append after workspace-audit-followup.css.
   The native title/meta/actions wrappers and all controls remain unchanged. */

@media (min-width:761px) {
  html:root.orders-crystal body #page-content.flow-order-detail > .detail-heading {
    display:flex!important;
    flex-direction:row!important;
    flex-wrap:wrap!important;
    align-items:center!important;
    justify-content:flex-start;
    gap:10px 12px!important;
    margin-bottom:12px!important;
    padding-bottom:0!important;
  }

  /* Native wrapper used to force title and metadata into two rows. Keep it
     in the DOM and let its two original groups share the available width. */
  html:root.orders-crystal body #page-content.flow-order-detail > .detail-heading > div:first-child:not(.heading-actions) {
    display:flex!important;
    flex:1 1 auto!important;
    flex-direction:row!important;
    flex-wrap:wrap!important;
    align-items:center!important;
    justify-content:flex-start;
    gap:10px 14px!important;
    width:auto!important;
    min-width:0;
    max-width:100%;
  }

  html:root.orders-crystal body #page-content.flow-order-detail > .detail-heading > div:first-child > .detail-title {
    display:flex!important;
    flex:0 1 auto!important;
    flex-wrap:wrap!important;
    align-items:center;
    gap:8px 10px!important;
    width:auto!important;
    min-width:0;
    max-width:100%;
  }

  html:root.orders-crystal body #page-content.flow-order-detail > .detail-heading > div:first-child > .detail-title > h1 {
    flex:0 1 auto!important;
    min-width:0;
    margin:0!important;
    overflow:visible!important;
    text-overflow:clip!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }

  html:root.orders-crystal body #page-content.flow-order-detail > .detail-heading > div:first-child > .detail-title > :is(.state-pill,.status-pill,.status-badge,.badge) {
    flex:0 0 auto;
    margin-inline-start:0!important;
  }

  html:root.orders-crystal body #page-content.flow-order-detail > .detail-heading > div:first-child > .detail-meta {
    display:flex!important;
    flex:0 1 auto!important;
    flex-wrap:wrap!important;
    align-items:center;
    justify-content:flex-start!important;
    gap:8px!important;
    width:auto!important;
    min-width:0;
    max-width:100%;
    margin:0!important;
    padding:0!important;
  }

  html:root.orders-crystal body #page-content.flow-order-detail > .detail-heading > .heading-actions {
    flex:0 1 auto!important;
    flex-wrap:wrap!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:8px!important;
    width:auto!important;
    min-width:0;
    max-width:100%;
    margin:0 0 0 auto!important;
    padding:0!important;
  }
}

/* Local backing and readable text for metadata over the scene photograph.
   The receiving button retains the shared control material. The native date
   action, or its permission-dependent read-only span, gets the same target. */
html:root.orders-crystal body #page-content.flow-order-detail > .detail-heading .detail-meta {
  color:var(--text)!important;
  font-size:13px!important;
  line-height:1.4;
}
html:root.orders-crystal body #page-content.flow-order-detail > .detail-heading .detail-meta > :is(button:not(:disabled),span) {
  color:var(--text)!important;
  opacity:1!important;
  text-shadow:none;
}
html:root.orders-crystal body #page-content.flow-order-detail > .detail-heading .detail-meta > :is([data-act="order-document-date"],span:first-child) {
  box-sizing:border-box;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:var(--orders-control-height,44px);
  max-width:100%;
  padding:10px 12px;
  border:0;
  border-radius:var(--orders-radius-control,999px);
  background:var(--orders-control-fill,var(--control-surface))!important;
  box-shadow:var(--orders-control-shadow,none)!important;
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  font-size:13px!important;
  line-height:1.4;
}

/* Only the native timeline directly inside the current order page.
   A temporary native .order-saving node may appear after the heading.
   Status colors and current/reached states are kept on the original bars. */
html:root.orders-crystal body #page-content.flow-order-detail > .timeline-steps {
  box-sizing:border-box;
  padding:8px 12px 10px!important;
  border-radius:var(--orders-radius-inset,20px);
  background:var(--card-surface)!important;
  box-shadow:var(--orders-control-shadow,none);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}
html:root.orders-crystal body #page-content.flow-order-detail > .timeline-steps > .timeline-step > span {
  color:var(--text)!important;
  opacity:1!important;
  font-size:12px!important;
  line-height:1.4!important;
  font-weight:500;
  white-space:normal!important;
  overflow-wrap:anywhere;
  text-shadow:none;
}
html:root.orders-crystal body #page-content.flow-order-detail > .timeline-steps > .timeline-step.current > span {
  font-weight:650;
}
/* END FINAL order-heading-final.css */

/* BEGIN FINAL integrations-narrow-final.css */
/* V18 narrow live retake: native payment action groups switch to column below
   600px, while the shared 140px flex-basis then becomes button HEIGHT.
   Keep the existing actions in a wrapping row; basis now describes width.
   No payment state, connection, label, handler or primary/glass color changes. */
@media (max-width: 600px) {
  html:root.orders-crystal #page-content .commerce-integrations .commerce-payments .commerce-card-actions {
    display: flex;
    flex-direction: row!important;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 8px;
    min-width: 0;
  }
  html:root.orders-crystal #page-content .commerce-integrations .commerce-payments .commerce-card-actions > .button {
    box-sizing: border-box;
    flex: 1 1 160px!important;
    width: auto!important;
    min-width: 0;
    max-width: 100%;
    height: auto!important;
    min-height: var(--orders-control-height,44px)!important;
    aspect-ratio: auto!important;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    line-height: 1.4;
    white-space: normal;
    overflow-wrap: break-word;
    text-align: center;
  }
}
/* END FINAL integrations-narrow-final.css */

/* BEGIN FINAL tasks-narrow-final.css */
/* Tasks only: keep the existing mobile summary and native refresh in one row.
   No DOM moves, new controls or changes to the desktop toolbar. */
@media (max-width:760px) {
  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on.compact-workflow-tasks .ts-task-surface > details.compact-workflow-mobile-tools {
    order:3!important;
    flex:1 1 calc(100% - var(--orders-control-height,44px) - 8px)!important;
    width:calc(100% - var(--orders-control-height,44px) - 8px)!important;
    min-width:0!important;
    max-width:calc(100% - var(--orders-control-height,44px) - 8px)!important;
    align-self:flex-start;
  }
  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on.compact-workflow-tasks .ts-task-filters > [data-act="tasks-refresh"].compact-workflow-refresh {
    order:4!important;
    flex:0 0 var(--orders-control-height,44px)!important;
    align-self:flex-start;
  }
}
/* END FINAL tasks-narrow-final.css */

/* BEGIN FINAL shifts-narrow-final.css */
/* Shifts only, <=760px: one tabs row, then advanced filter + period together.
   Native open-details layout and all controls/state remain unchanged. */
@media (max-width:760px) {
  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on.compact-workflow-shifts .shift-journal-toolbar > .tabs.compact-workflow-types {
    flex:1 0 100%!important;
    width:100%!important;
    max-width:100%!important;
  }
  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on.compact-workflow-shifts .shift-journal-toolbar > .tabs.compact-workflow-types > .tab {
    flex:1 1 auto;
    min-width:0;
  }
  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on.compact-workflow-shifts .shift-journal-filters > .compact-workflow-shift-advanced:not([open]) {
    flex:1 1 0!important;
    width:auto!important;
    min-width:0!important;
  }
  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on.compact-workflow-shifts .shift-journal-filters > .compact-workflow-period {
    flex:0 1 auto!important;
    width:auto!important;
    min-width:0!important;
  }
}
/* END FINAL shifts-narrow-final.css */

/* BEGIN VERIFIED settings-delivery-surface-final.css */
/* V19 visual retake: the expanded Delivery form shares its outer details surface.
   Native form, field surfaces, submit handler, errors and notices stay intact. */
html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid .shipping-print-settings [data-order-shipping-settings-slot] form[data-shipping-settings] {
  background: transparent!important;
  box-shadow: none!important;
  backdrop-filter: none!important;
  -webkit-backdrop-filter: none!important;
}
html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid .shipping-print-settings [data-order-shipping-settings-slot] form[data-shipping-settings] > canvas.sg-pane {
  display: none!important;
  visibility: hidden!important;
}
html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid .shipping-print-settings [data-order-shipping-settings-slot] form[data-shipping-settings]::before,
html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid .shipping-print-settings [data-order-shipping-settings-slot] form[data-shipping-settings]::after {
  content: none!important;
  display: none!important;
}
/* The desktop assistant launcher remains fixed in its native owner. Reserve only
   this form's action edge; the launcher is hidden on the narrow layout. */
@media (min-width:761px) {
  html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid .shipping-print-settings [data-order-shipping-settings-slot] form[data-shipping-settings] > .shipping-actions {
    box-sizing: border-box;
    padding-inline-end: 60px!important;
  }
}
/* END VERIFIED settings-delivery-surface-final.css */

/* BEGIN VERIFIED settings-printing-footer-final.css */
/* V19 expanded receipt preview: keep the native print Save clear of the fixed
   desktop assistant launcher. The narrow layout has no launcher reservation. */
@media (min-width:761px) {
  html:root.orders-crystal #page-content.settings-redesign-layout .settings-redesign-grid .settings-final-print-row > .settings-final-print-actions {
    box-sizing: border-box;
    padding-inline-end: 60px!important;
  }
}
/* END VERIFIED settings-printing-footer-final.css */

/* BEGIN VERIFIED compact-workflows-ru-final.css */
/* V20 RU header retake: only Tasks and Shifts, desktop/tablet above 760px.
   Append after the current compact and narrow CSS. The matching JS replaces
   compact-workflows-retake.js; do not load a second enhancer instance. */
@media (min-width:761px) {
  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on.compact-workflow-tasks .compact-workflow-mobile-tools,
  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on.compact-workflow-shifts .compact-workflow-shift-tools {
    order:3;
  }

  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on.compact-workflow-tasks .compact-workflow-mobile-tools:not([open]),
  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on.compact-workflow-shifts .compact-workflow-shift-tools:not([open]) {
    flex:0 1 auto!important;
    max-width:min(360px,100%)!important;
  }

  /* Keep native trailing actions on the first row when the disclosure opens.
     Its original summary/body then occupy a full row before page content. */
  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on.compact-workflow-tasks .compact-workflow-mobile-tools[open],
  html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on.compact-workflow-shifts .compact-workflow-shift-tools[open] {
    order:20!important;
  }

  /* Existing workspace containers reflect an expanded sidebar too. At an
     actually tight width, reserve the title/primary pair before other tools. */
  @container tasks-workspace (max-width:979px) {
    html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on.compact-workflow-tasks .compact-workflow-action.primary {
      order:1!important;
      margin-inline-start:0!important;
    }
  }
  @container shifts-workspace (max-width:979px) {
    html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on.compact-workflow-shifts .compact-workflow-action.primary {
      order:1!important;
      margin-inline-start:0!important;
    }
  }
}
/* END VERIFIED compact-workflows-ru-final.css */

/* BEGIN VERIFIED operations-final-safety.css */
/* V21 isolated follow-up. Append after workspace-audit-followup.css.
   CMP-CUS-02: the fixed AI launcher touches the last card's Offers action.
   Reserve a desktop gutter in the native grid, rather than squeezing each
   card's action row. At main width 1062px, 1014px remain: three native 320px
   minimum columns plus their two 18px gaps still fit. No DOM or handler changes. */
@media (min-width: 761px) {
  html:root.orders-crystal[data-orders-route="customers"] body #page-content > .client-grid {
    box-sizing: border-box;
    padding-inline-end: 48px;
  }
}

/* CW-V18-L01: these native helper labels sit directly over the photograph,
   outside the Transactions list panel. Give only those labels the shared
   neutral surface and foreground; rows, amounts, forms and Accounts are intact. */
html:root.orders-crystal[data-orders-route="transactions"] body #page-content .order-transactions-page .transactions-cash-details > summary,
html:root.orders-crystal[data-orders-route="transactions"] body #page-content .order-transactions-page .transactions-results-meta > :is(span, small) {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  color: var(--text, var(--ink)) !important;
  background: var(--card-surface) !important;
  box-shadow: var(--orders-control-shadow, none) !important;
  -webkit-backdrop-filter: blur(var(--glass-blur, 18px));
  backdrop-filter: blur(var(--glass-blur, 18px));
  border-radius: var(--orders-radius-control, 999px);
  opacity: 1;
  line-height: 1.5;
}

html:root.orders-crystal[data-orders-route="transactions"] body #page-content .order-transactions-page .transactions-cash-details > summary {
  display: inline-flex;
  align-items: center;
  min-height: var(--orders-control-height, 44px);
  padding-block: 8px;
  padding-inline-start: 14px;
  /* Keep the dropdown layer's existing 44px end padding and SVG arrow. */
  font-size: 13px;
}

html:root.orders-crystal[data-orders-route="transactions"] body #page-content .order-transactions-page .transactions-results-meta > :is(span, small) {
  padding: 6px 12px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
/* END VERIFIED operations-final-safety.css */

/* BEGIN VERIFIED tasks-tablet-refresh-final.css */
/* V21 Tasks tablet retake: closed header only, after compact-workflows-ru-final.css.
   The existing summary title keeps its complete selected-state caption.
   Mobile <=760 and open tools retain their verified geometry. */
@media (min-width:761px) {
  @container tasks-workspace (max-width:979px) {
    html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on.compact-workflow-tasks .compact-workflow-search {
      flex:1 1 180px!important;
      width:180px!important;
      max-width:200px!important;
    }
    html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on.compact-workflow-tasks .compact-workflow-mobile-tools:not([open]) {
      flex:0 1 240px!important;
      width:240px!important;
      max-width:240px!important;
    }
    html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on.compact-workflow-tasks .compact-workflow-mobile-tools:not([open]) > .compact-workflow-summary {
      min-width:0;
      width:100%;
      max-width:100%;
    }
    html:root.orders-crystal body #page-content.compact-workflow-page.compact-workflow-on.compact-workflow-tasks .compact-workflow-mobile-tools:not([open]) > .compact-workflow-summary > .compact-workflow-summary-copy {
      overflow:hidden;
      text-overflow:ellipsis;
      white-space:nowrap;
      overflow-wrap:normal;
    }
  }
}
/* END VERIFIED tasks-tablet-refresh-final.css */

/* BEGIN VERIFIED transactions-action-clearance-final.css */
/* V22: keep the native row actions clear of the fixed AI launcher.
   Matching end padding preserves header/body column alignment. Desktop only;
   no element, business handler or narrow-card layout is replaced. */
@media (min-width: 761px) {
  html:root.orders-crystal[data-orders-route="transactions"] body #page-content .order-transactions-page :is(.transactions-list-head, .transactions-row) {
    padding-inline-end: 66px;
  }
}
/* END VERIFIED transactions-action-clearance-final.css */
