/*
 * Enterprise operations-page migration layer.
 *
 * Phase 3 moves the remaining merchandise, supply-chain, AI and data pages
 * onto the shared premium tokens. Rules are route-scoped through
 * body[data-current-page] so business renderers keep their existing markup,
 * event handlers and API contracts.
 */

/* Shared operational trust and source notices */
body.premium-ui:is(
  [data-current-page="trials"],
  [data-current-page="sales-ranking"],
  [data-current-page="sales-orders"],
  [data-current-page="sales"],
  [data-current-page="capacity"],
  [data-current-page="replenishment"],
  [data-current-page="brakes"],
  [data-current-page="decision-center-v1"],
  [data-current-page="orders"],
  [data-current-page="production-control"],
  [data-current-page="receiving"],
  [data-current-page="fulfillment"],
  [data-current-page="samples"],
  [data-current-page="supplier-execution-v1"]
) #content > :where(
  .global-trust-banner,
  .ops-trust-banner,
  .ops-source-panel,
  .ops-quality-ok,
  .ops-footnote
) {
  margin-bottom: 16px !important;
  border-radius: var(--wx-radius-md) !important;
  background-image: none !important;
  box-shadow: none !important;
}

body.premium-ui :where(
  .global-trust-banner,
  .ops-trust-banner,
  .ops-source-panel,
  .ops-quality-ok,
  .ops-footnote,
  .sync-notice
) :where(b, strong) {
  font-weight: 600 !important;
}

/* Owner approvals and durable background jobs */
body.premium-ui[data-current-page="operations-hub-v1"] .workflow-hero,
body.premium-ui[data-current-page="background-jobs"] .foundation-job-actions {
  margin-bottom: 16px !important;
  border: 1px solid var(--wx-border) !important;
  border-radius: var(--wx-radius-md) !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: var(--wx-shadow-card) !important;
}

body.premium-ui[data-current-page="background-jobs"] .foundation-job-actions {
  gap: 10px !important;
  padding: 12px 14px !important;
}

body.premium-ui[data-current-page="background-jobs"] .foundation-job-actions > span {
  margin-left: auto !important;
  color: var(--wx-text-muted) !important;
  font-size: 13px !important;
}

body.premium-ui[data-current-page="background-jobs"] .foundation-job-stats > .stat {
  min-height: 94px !important;
}

body.premium-ui[data-current-page="background-jobs"] .table-wrap :where(th, td):last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  min-width: 84px;
  background: #fff;
  box-shadow: -1px 0 var(--wx-border);
}

body.premium-ui[data-current-page="background-jobs"] .table-wrap th:last-child {
  z-index: 3;
  background: var(--wx-surface-subtle) !important;
}

/* New-product trial monitoring */
body.premium-ui[data-current-page="trials"] .trial-explain {
  gap: 12px !important;
  padding: 12px 14px !important;
  margin-bottom: 16px !important;
  border-color: var(--wx-info-border) !important;
  border-radius: var(--wx-radius-md) !important;
  background: var(--wx-info-soft) !important;
}

body.premium-ui[data-current-page="trials"] .trial-explain b {
  color: var(--wx-info) !important;
  font-weight: 600 !important;
}

body.premium-ui[data-current-page="trials"] .trial-toolbar {
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(128px, 164px)) auto auto !important;
  gap: 9px !important;
  padding: 11px 12px !important;
  margin-bottom: 16px !important;
  border: 1px solid var(--wx-border) !important;
  border-radius: var(--wx-radius-md) !important;
  background: #fff !important;
  box-shadow: var(--wx-shadow-card) !important;
}

body.premium-ui[data-current-page="trials"] .trial-toolbar :where(input, select, button) {
  min-height: var(--wx-control-height) !important;
}

body.premium-ui[data-current-page="trials"] .trial-grid {
  gap: 14px !important;
}

body.premium-ui[data-current-page="trials"] .trial-card {
  padding: 17px !important;
  border-color: var(--wx-border) !important;
  border-radius: var(--wx-radius-md) !important;
  box-shadow: var(--wx-shadow-card) !important;
}

body.premium-ui[data-current-page="trials"] .trial-card-head h3 {
  margin: 6px 0 4px !important;
  font-size: 17px !important;
  font-weight: 600 !important;
}

body.premium-ui[data-current-page="trials"] .trial-kpis {
  gap: 8px !important;
  margin: 15px 0 !important;
}

body.premium-ui[data-current-page="trials"] .trial-kpis > div,
body.premium-ui[data-current-page="trials"] .trial-supply > div,
body.premium-ui[data-current-page="trials"] .trial-reason,
body.premium-ui[data-current-page="trials"] .trial-detail-score {
  border-radius: var(--wx-radius-sm) !important;
  background: var(--wx-surface-subtle) !important;
}

body.premium-ui[data-current-page="trials"] .trial-kpis b,
body.premium-ui[data-current-page="trials"] .trial-supply b {
  font-size: 18px !important;
  font-weight: 600 !important;
}

/* Sales ranking */
body.premium-ui[data-current-page="sales-ranking"] .ranking-hero {
  gap: 20px !important;
  padding: 19px 20px !important;
  margin-bottom: 14px !important;
  border: 1px solid var(--wx-border) !important;
  border-radius: var(--wx-radius-md) !important;
  color: var(--wx-text) !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: var(--wx-shadow-card) !important;
}

body.premium-ui[data-current-page="sales-ranking"] .ranking-hero :where(h2, p) {
  color: inherit !important;
}

body.premium-ui[data-current-page="sales-ranking"] .ranking-hero h2 {
  margin: 6px 0 !important;
  font-size: 20px !important;
  font-weight: 600 !important;
}

body.premium-ui[data-current-page="sales-ranking"] .ranking-hero .kicker {
  color: var(--wx-primary) !important;
}

body.premium-ui[data-current-page="sales-ranking"] .ranking-window-tabs {
  gap: 4px !important;
  padding: 4px !important;
  border-color: var(--wx-border) !important;
  border-radius: var(--wx-radius-sm) !important;
  background: var(--wx-surface-muted) !important;
}

body.premium-ui[data-current-page="sales-ranking"] .ranking-window-tabs button {
  min-width: 64px !important;
  height: 32px !important;
  color: var(--wx-text-muted) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

body.premium-ui[data-current-page="sales-ranking"] .ranking-window-tabs button.active {
  color: var(--wx-primary) !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08) !important;
}

body.premium-ui[data-current-page="sales-ranking"] .ranking-meta-strip {
  gap: 10px !important;
  margin: 12px 0 16px !important;
}

body.premium-ui[data-current-page="sales-ranking"] .ranking-meta-strip > div {
  min-height: 92px !important;
  padding: 14px 15px !important;
  border-color: var(--wx-border) !important;
  border-radius: var(--wx-radius-md) !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: var(--wx-shadow-card) !important;
}

body.premium-ui[data-current-page="sales-ranking"] .ranking-meta-strip span {
  margin-bottom: 5px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

body.premium-ui[data-current-page="sales-ranking"] .ranking-meta-strip b {
  margin-bottom: 5px !important;
  font-size: 18px !important;
  font-weight: 600 !important;
}

body.premium-ui[data-current-page="sales-ranking"] .ranking-leader {
  border-color: var(--wx-primary-border) !important;
  background: var(--wx-primary-soft) !important;
  background-image: none !important;
}

body.premium-ui[data-current-page="sales-ranking"] .ranking-filters {
  gap: 8px !important;
  padding: 11px 12px !important;
  background: var(--wx-surface-subtle) !important;
}

body.premium-ui[data-current-page="sales-ranking"] .ranking-filters :where(input, select, button) {
  height: var(--wx-control-height) !important;
}

body.premium-ui[data-current-page="sales-ranking"] .ranking-table :where(th, td):last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  min-width: 88px;
  background: #fff;
  box-shadow: -1px 0 var(--wx-border);
}

body.premium-ui[data-current-page="sales-ranking"] .ranking-table th:last-child {
  z-index: 3;
  background: var(--wx-surface-subtle) !important;
}

body.premium-ui[data-current-page="sales-ranking"] .ranking-definition {
  padding: 12px 14px !important;
  border-color: var(--wx-info-border) !important;
  border-radius: var(--wx-radius-sm) !important;
  color: var(--wx-text-muted) !important;
  background: var(--wx-info-soft) !important;
}

/* Sales-order control center */
body.premium-ui[data-current-page="sales-orders"] .sales-order-notice {
  gap: 20px !important;
  padding: 18px 20px !important;
  margin-bottom: 16px !important;
  border: 1px solid var(--wx-border) !important;
  border-radius: var(--wx-radius-md) !important;
  color: var(--wx-text) !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: var(--wx-shadow-card) !important;
}

body.premium-ui[data-current-page="sales-orders"] .sales-order-notice :where(h2, p, .kicker) {
  color: inherit !important;
}

body.premium-ui[data-current-page="sales-orders"] .sales-order-notice h2 {
  margin: 5px 0 !important;
  font-size: 20px !important;
  font-weight: 600 !important;
}

body.premium-ui[data-current-page="sales-orders"] .sales-order-notice .kicker {
  color: var(--wx-primary) !important;
}

body.premium-ui[data-current-page="sales-orders"] .sales-order-sync {
  min-width: 238px !important;
  padding: 12px 14px !important;
  border-color: var(--wx-border) !important;
  border-radius: var(--wx-radius-sm) !important;
  background: var(--wx-surface-subtle) !important;
}

body.premium-ui[data-current-page="sales-orders"] .sales-order-sync :where(span, small) {
  color: var(--wx-text-muted) !important;
}

body.premium-ui[data-current-page="sales-orders"] :where(
  .sales-order-sync-health,
  .sales-order-reconciliation-panel
) {
  border-radius: var(--wx-radius-sm) !important;
  box-shadow: none !important;
}

body.premium-ui[data-current-page="sales-orders"] .sales-order-reconciliation-workbench {
  gap: 8px !important;
  padding: 10px !important;
  margin-bottom: 16px !important;
  border-color: var(--wx-border) !important;
  border-radius: var(--wx-radius-md) !important;
  box-shadow: var(--wx-shadow-card) !important;
}

body.premium-ui[data-current-page="sales-orders"] .sales-order-reconciliation-workbench button {
  padding: 11px 12px !important;
  border-color: var(--wx-border) !important;
  border-radius: var(--wx-radius-sm) !important;
  background: #fff !important;
}

body.premium-ui[data-current-page="sales-orders"] .sales-order-reconciliation-workbench button.active {
  border-color: var(--wx-primary-border) !important;
  color: var(--wx-primary) !important;
  background: var(--wx-primary-soft) !important;
}

body.premium-ui[data-current-page="sales-orders"] .sales-order-reconciliation-workbench b {
  font-size: 20px !important;
  font-weight: 600 !important;
}

/* Sales, inventory and replenishment */
body.premium-ui:is([data-current-page="sales"], [data-current-page="replenishment"]) .ops-filterbar {
  gap: 8px !important;
  padding: 10px 12px !important;
  border: 1px solid var(--wx-border) !important;
  border-radius: var(--wx-radius-md) !important;
  background: #fff !important;
  box-shadow: var(--wx-shadow-card) !important;
}

body.premium-ui:is([data-current-page="sales"], [data-current-page="replenishment"]) .ops-filterbar :where(input, select, button) {
  min-height: var(--wx-control-height) !important;
}

body.premium-ui:is([data-current-page="sales"], [data-current-page="replenishment"], [data-current-page="fulfillment"]) .ops-source-panel {
  padding: 13px 15px !important;
  border-color: var(--wx-border) !important;
  background: var(--wx-surface-subtle) !important;
}

body.premium-ui:is([data-current-page="sales"], [data-current-page="replenishment"], [data-current-page="fulfillment"]) .table-wrap :where(th, td):last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  box-shadow: -1px 0 var(--wx-border);
}

body.premium-ui:is([data-current-page="sales"], [data-current-page="replenishment"], [data-current-page="fulfillment"]) .table-wrap th:last-child {
  z-index: 3;
  background: var(--wx-surface-subtle) !important;
}

/* Capacity and first-order decisions */
body.premium-ui[data-current-page="capacity"] .capacity-rule {
  gap: 10px !important;
  margin-bottom: 16px !important;
}

body.premium-ui[data-current-page="capacity"] .capacity-rule > div {
  padding: 14px 16px !important;
  border-color: var(--wx-border) !important;
  border-radius: var(--wx-radius-md) !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: none !important;
}

body.premium-ui[data-current-page="capacity"] .capacity-rule b {
  margin-bottom: 5px !important;
  color: var(--wx-ink) !important;
  font-weight: 600 !important;
}

body.premium-ui[data-current-page="capacity"] :where(.capacity-settings, .capacity-filters) {
  gap: 10px !important;
  padding: 13px 16px !important;
}

body.premium-ui[data-current-page="capacity"] .capacity-settings input {
  min-height: var(--wx-control-height) !important;
}

body.premium-ui[data-current-page="capacity"] .capacity-detail,
body.premium-ui[data-current-page="capacity"] .capacity-formula {
  border-radius: var(--wx-radius-sm) !important;
  background: var(--wx-surface-subtle) !important;
}

body.premium-ui[data-current-page="capacity"] .capacity-formula strong {
  color: var(--wx-primary) !important;
  font-size: 22px !important;
  font-weight: 600 !important;
}

body.premium-ui[data-current-page="capacity"] .capacity-table :where(th, td):last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  min-width: 126px;
  background: #fff;
  box-shadow: -1px 0 var(--wx-border);
}

body.premium-ui[data-current-page="capacity"] .capacity-table th:last-child {
  z-index: 3;
  background: var(--wx-surface-subtle) !important;
}

/* Brake center and deterministic decision center */
body.premium-ui[data-current-page="brakes"] .brake-hero {
  padding: 18px 20px !important;
  margin-bottom: 16px !important;
  border: 1px solid var(--wx-border) !important;
  border-radius: var(--wx-radius-md) !important;
  color: var(--wx-text) !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: var(--wx-shadow-card) !important;
}

body.premium-ui[data-current-page="brakes"] .brake-hero :where(h2, p, span) {
  color: inherit !important;
}

body.premium-ui[data-current-page="brakes"] .brake-hero h2 {
  font-size: 20px !important;
  font-weight: 600 !important;
}

body.premium-ui:is([data-current-page="brakes"], [data-current-page="decision-center-v1"]) .card {
  border-radius: var(--wx-radius-md) !important;
}

body.premium-ui[data-current-page="decision-center-v1"] .table-wrap :where(th, td):last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  box-shadow: -1px 0 var(--wx-border);
}

body.premium-ui[data-current-page="decision-center-v1"] .table-wrap th:last-child {
  z-index: 3;
  background: var(--wx-surface-subtle) !important;
}

/* Production order list */
body.premium-ui[data-current-page="orders"] #content > .toolbar {
  gap: 9px !important;
  padding: 10px 12px !important;
  margin-bottom: 16px !important;
  border: 1px solid var(--wx-border) !important;
  border-radius: var(--wx-radius-md) !important;
  background: #fff !important;
  box-shadow: var(--wx-shadow-card) !important;
}

body.premium-ui[data-current-page="orders"] #content > .toolbar input {
  min-width: min(360px, 100%) !important;
}

body.premium-ui[data-current-page="orders"] .order-manage-table :where(th, td):last-child {
  box-shadow: -1px 0 var(--wx-border) !important;
}

/* Production progress and delivery exceptions */
body.premium-ui[data-current-page="production-control"] :where(
  .production-followup-card,
  .delivery-exception-card
) {
  overflow: hidden;
  border-top-width: 1px !important;
  border-radius: var(--wx-radius-md) !important;
}

body.premium-ui[data-current-page="production-control"] .production-followup-row {
  gap: 12px !important;
  padding: 13px 16px !important;
}

body.premium-ui[data-current-page="production-control"] .production-filters {
  gap: 9px !important;
  padding: 12px 14px !important;
  background: var(--wx-surface-subtle) !important;
}

body.premium-ui[data-current-page="production-control"] .delivery-exception {
  gap: 14px !important;
  padding: 12px 16px !important;
}

body.premium-ui[data-current-page="production-control"] .production-progress i {
  background: var(--wx-primary) !important;
  background-image: none !important;
}

body.premium-ui[data-current-page="production-control"] .production-control-table :where(th, td):last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  min-width: 126px;
  background: #fff;
  box-shadow: -1px 0 var(--wx-border);
}

body.premium-ui[data-current-page="production-control"] .production-control-table th:last-child {
  z-index: 3;
  background: var(--wx-surface-subtle) !important;
}

/* Receiving workbench */
body.premium-ui[data-current-page="receiving"] .receiving-toolbar {
  gap: 10px !important;
  padding: 11px 12px !important;
  margin: 0 0 14px !important;
  border: 1px solid var(--wx-border) !important;
  border-radius: var(--wx-radius-md) !important;
  background: #fff !important;
  box-shadow: var(--wx-shadow-card) !important;
}

body.premium-ui[data-current-page="receiving"] .receiving-toolbar > div {
  gap: 8px !important;
}

body.premium-ui[data-current-page="receiving"] .receiving-toolbar :where(input, select, button) {
  min-height: var(--wx-control-height) !important;
}

body.premium-ui[data-current-page="receiving"] .receiving-guide {
  gap: 10px !important;
  padding: 11px 13px !important;
  margin-bottom: 12px !important;
  border-color: var(--wx-border) !important;
  border-radius: var(--wx-radius-sm) !important;
  background: var(--wx-surface-subtle) !important;
}

body.premium-ui[data-current-page="receiving"] .receiving-orders {
  gap: 10px !important;
}

body.premium-ui[data-current-page="receiving"] .receiving-order {
  border-color: var(--wx-border) !important;
  border-radius: var(--wx-radius-md) !important;
  box-shadow: var(--wx-shadow-card) !important;
}

body.premium-ui[data-current-page="receiving"] .receiving-order-main {
  gap: 14px !important;
  padding: 15px 16px !important;
}

body.premium-ui[data-current-page="receiving"] .receiving-style {
  color: var(--wx-ink) !important;
  font-size: 17px !important;
  font-weight: 600 !important;
}

body.premium-ui[data-current-page="receiving"] .receiving-numbers div,
body.premium-ui[data-current-page="receiving"] .receiving-history-grid > div {
  border-radius: var(--wx-radius-sm) !important;
  background: var(--wx-surface-subtle) !important;
}

body.premium-ui[data-current-page="receiving"] .receiving-progress i {
  background: var(--wx-primary) !important;
  background-image: none !important;
}

/* Fulfillment and receipt analysis */
body.premium-ui[data-current-page="fulfillment"] :where(
  .fulfillment-hero,
  .fulfillment-hero-v3,
  .fulfillment-hero-v4
) {
  border-radius: var(--wx-radius-md) !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: var(--wx-shadow-card) !important;
}

body.premium-ui[data-current-page="fulfillment"] :where(
  .fulfillment-hero,
  .fulfillment-hero-v3,
  .fulfillment-hero-v4
) :where(h2, p, span, strong) {
  color: inherit !important;
}

body.premium-ui[data-current-page="fulfillment"] .fulfillment-table :where(th, td):last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  box-shadow: -1px 0 var(--wx-border);
}

body.premium-ui[data-current-page="fulfillment"] .fulfillment-table th:last-child {
  z-index: 3;
  background: var(--wx-surface-subtle) !important;
}

/* Sample garment ledger */
body.premium-ui[data-current-page="samples"] .sample-hero {
  gap: 18px !important;
  padding: 18px 20px !important;
  margin-bottom: 14px !important;
  border-color: var(--wx-border) !important;
  border-radius: var(--wx-radius-md) !important;
  color: var(--wx-text) !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: var(--wx-shadow-card) !important;
}

body.premium-ui[data-current-page="samples"] .sample-hero :where(h2, p, span) {
  color: inherit !important;
}

body.premium-ui[data-current-page="samples"] .sample-hero h2 {
  margin: 4px 0 !important;
  font-size: 20px !important;
  font-weight: 600 !important;
}

body.premium-ui[data-current-page="samples"] .sample-hero .secondary {
  border-color: var(--wx-border) !important;
  color: var(--wx-text) !important;
  background: #fff !important;
}

body.premium-ui[data-current-page="samples"] .sample-operation-legend {
  gap: 8px !important;
  padding: 10px 13px !important;
  margin-bottom: 14px !important;
  border-color: var(--wx-border) !important;
  border-radius: var(--wx-radius-sm) !important;
}

body.premium-ui[data-current-page="samples"] .sample-summary {
  gap: 12px !important;
  margin-bottom: 16px !important;
}

body.premium-ui[data-current-page="samples"] .sample-summary > div {
  padding: 15px 16px !important;
  border-color: var(--wx-border) !important;
  border-radius: var(--wx-radius-md) !important;
  box-shadow: var(--wx-shadow-card) !important;
}

body.premium-ui[data-current-page="samples"] .sample-summary > div::after {
  display: none !important;
}

body.premium-ui[data-current-page="samples"] .sample-summary strong {
  margin: 5px 0 2px !important;
  font-size: 24px !important;
  font-weight: 600 !important;
}

body.premium-ui[data-current-page="samples"] .sample-inventory-filters,
body.premium-ui[data-current-page="samples"] .sample-history-filters-v2 {
  gap: 8px !important;
  padding: 11px 12px !important;
  background: var(--wx-surface-subtle) !important;
}

body.premium-ui[data-current-page="samples"] .sample-two-col {
  gap: 16px !important;
}

body.premium-ui[data-current-page="samples"] .sample-batch-card,
body.premium-ui[data-current-page="samples"] .sample-form-note,
body.premium-ui[data-current-page="samples"] .operation-badge,
body.premium-ui[data-current-page="samples"] .brand-badge {
  border-radius: var(--wx-radius-sm) !important;
}

body.premium-ui[data-current-page="samples"] .table-wrap :where(th, td):last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  box-shadow: -1px 0 var(--wx-border);
}

body.premium-ui[data-current-page="samples"] .table-wrap th:last-child {
  z-index: 3;
  background: var(--wx-surface-subtle) !important;
}

/* Supplier execution */
body.premium-ui[data-current-page="supplier-execution-v1"] .table-wrap :where(th, td):last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  min-width: 108px;
  background: #fff;
  box-shadow: -1px 0 var(--wx-border);
}

body.premium-ui[data-current-page="supplier-execution-v1"] .table-wrap th:last-child {
  z-index: 3;
  background: var(--wx-surface-subtle) !important;
}

/* AI workbench and content production */
body.premium-ui:is([data-current-page="ai-workbench"], [data-current-page="ai-content-center"]) #content > .card,
body.premium-ui:is([data-current-page="ai-workbench"], [data-current-page="ai-content-center"]) #content > section.card {
  border-radius: var(--wx-radius-md) !important;
  box-shadow: var(--wx-shadow-card) !important;
}

body.premium-ui:is([data-current-page="ai-workbench"], [data-current-page="ai-content-center"]) .finance-profit-boundary {
  gap: 10px !important;
  padding: 12px 14px !important;
  margin-bottom: 16px !important;
  border-color: var(--wx-warning-border) !important;
  border-radius: var(--wx-radius-md) !important;
  background: var(--wx-warning-soft) !important;
}

body.premium-ui:is([data-current-page="ai-workbench"], [data-current-page="ai-content-center"]) .finance-profit-boundary span {
  color: var(--wx-text-muted) !important;
}

body.premium-ui[data-current-page="ai-content-center"] :where(.ai-uat-preflight, .ai-uat-workbench) {
  border-color: var(--wx-border) !important;
  border-radius: var(--wx-radius-md) !important;
  box-shadow: var(--wx-shadow-card) !important;
}

body.premium-ui[data-current-page="ai-content-center"] :where(
  .ai-uat-preflight-meta,
  .ai-uat-summary,
  .ai-uat-empty,
  .ai-uat-finalize
) {
  background: var(--wx-surface-subtle) !important;
  background-image: none !important;
}

body.premium-ui[data-current-page="ai-content-center"] :where(
  .ai-uat-preflight-meta > div,
  .ai-uat-summary > div,
  .ai-uat-preflight-candidate,
  .ai-uat-product,
  .ai-uat-facts-product,
  .ai-uat-intake-product
) {
  border-radius: var(--wx-radius-sm) !important;
  box-shadow: none !important;
}

body.premium-ui[data-current-page="ai-content-center"] .ai-uat-workbench :where(strong, b) {
  font-weight: 600 !important;
}

body.premium-ui[data-current-page="ai-content-center"] .table-wrap :where(th, td):last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  box-shadow: -1px 0 var(--wx-border);
}

body.premium-ui[data-current-page="ai-content-center"] .table-wrap th:last-child {
  z-index: 3;
  background: var(--wx-surface-subtle) !important;
}

/* Jushuitan synchronization and trust governance */
body.premium-ui[data-current-page="jst-center"] :where(
  .jst-op-deck,
  .jst-trust-closure-panel,
  .jst-stability-panel,
  .jst-field-diagnostic,
  .jst-inventory-readiness,
  .jst-acceptance-v5,
  .acceptance-center > header
) {
  border-color: var(--wx-border) !important;
  border-radius: var(--wx-radius-md) !important;
  background-image: none !important;
  box-shadow: var(--wx-shadow-card) !important;
}

body.premium-ui[data-current-page="jst-center"] .jst-op-deck {
  margin: 16px 0 !important;
  background: #fff !important;
}

body.premium-ui[data-current-page="jst-center"] :where(
  .returns-permission-alert,
  .sync-notice,
  .jst-upload-warning,
  .jst-warehouse-config-alert,
  .jst-warehouse-v3-alert,
  .jst-safe-match-error
) {
  border-radius: var(--wx-radius-sm) !important;
  box-shadow: none !important;
}

body.premium-ui[data-current-page="jst-center"] .acceptance-center {
  margin: 16px 0 !important;
}

body.premium-ui[data-current-page="jst-center"] .acceptance-center > header {
  gap: 18px !important;
  padding: 17px 18px !important;
  background: #fff !important;
}

body.premium-ui[data-current-page="jst-center"] .acceptance-gates {
  gap: 9px !important;
  margin: 10px 0 16px !important;
}

body.premium-ui[data-current-page="jst-center"] .acceptance-gates > div {
  min-height: 92px !important;
  padding: 13px 14px !important;
  border-radius: var(--wx-radius-sm) !important;
}

body.premium-ui[data-current-page="jst-center"] .acceptance-gates > div > b {
  margin: 5px 0 3px !important;
  font-size: 20px !important;
  font-weight: 600 !important;
}

body.premium-ui[data-current-page="jst-center"] .acceptance-toolbar,
body.premium-ui[data-current-page="jst-center"] :where(
  .jst-field-table-toolbar,
  .jst-sku-repair-toolbar
) {
  gap: 8px !important;
  padding: 10px 12px !important;
  background: var(--wx-surface-subtle) !important;
}

body.premium-ui[data-current-page="jst-center"] .jst-acceptance-v5 {
  margin: 16px 0 20px !important;
  border-radius: var(--wx-radius-md) !important;
}

body.premium-ui[data-current-page="jst-center"] .jst-acceptance-v5-head {
  gap: 18px !important;
  padding: 18px 20px !important;
  color: var(--wx-text) !important;
  background: var(--wx-primary-soft) !important;
  background-image: none !important;
}

body.premium-ui[data-current-page="jst-center"] .jst-acceptance-v5-head :where(h2, p, .eyebrow) {
  color: inherit !important;
}

body.premium-ui[data-current-page="jst-center"] .jst-acceptance-v5-head .eyebrow {
  color: var(--wx-primary) !important;
}

body.premium-ui[data-current-page="jst-center"] .jst-acceptance-v5-result {
  padding: 13px 15px !important;
  border-color: var(--wx-primary-border) !important;
  border-radius: var(--wx-radius-sm) !important;
  background: #fff !important;
}

body.premium-ui[data-current-page="jst-center"] .jst-acceptance-v5-result :where(span, small) {
  color: var(--wx-text-muted) !important;
}

body.premium-ui[data-current-page="jst-center"] .jst-acceptance-v5-metrics > div {
  padding: 14px 16px !important;
}

body.premium-ui[data-current-page="jst-center"] .jst-acceptance-v5-body {
  gap: 16px !important;
  padding: 18px !important;
}

body.premium-ui[data-current-page="jst-center"] .jst-acceptance-v5-actions article,
body.premium-ui[data-current-page="jst-center"] .jst-acceptance-v5-rules,
body.premium-ui[data-current-page="jst-center"] :where(
  .jst-trust-metrics > div,
  .jst-field-audit-metric,
  .jst-field-audit-card,
  .jst-field-style-card,
  .jst-sku-repair-card,
  .jst-warehouse-v3-box,
  .jst-warehouse-v3-steps > div,
  .jst-warehouse-v3-option
) {
  border-radius: var(--wx-radius-sm) !important;
  background-image: none !important;
  box-shadow: none !important;
}

body.premium-ui[data-current-page="jst-center"] .table-wrap :where(th, td):last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  box-shadow: -1px 0 var(--wx-border);
}

body.premium-ui[data-current-page="jst-center"] .table-wrap th:last-child {
  z-index: 3;
  background: var(--wx-surface-subtle) !important;
}

/* Deterministic data-governance queue */
body.premium-ui[data-current-page="data-governance-v1"] #content > .card {
  border-radius: var(--wx-radius-md) !important;
  box-shadow: var(--wx-shadow-card) !important;
}

body.premium-ui[data-current-page="data-governance-v1"] .table-wrap :where(th, td):last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  box-shadow: -1px 0 var(--wx-border);
}

body.premium-ui[data-current-page="data-governance-v1"] .table-wrap th:last-child {
  z-index: 3;
  background: var(--wx-surface-subtle) !important;
}

@media (max-width: 1200px) {
  body.premium-ui[data-current-page="trials"] .trial-toolbar,
  body.premium-ui[data-current-page="production-control"] .production-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.premium-ui[data-current-page="sales-ranking"] .ranking-meta-strip,
  body.premium-ui[data-current-page="samples"] .sample-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.premium-ui[data-current-page="sales-orders"] .sales-order-reconciliation-workbench {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 900px) {
  body.premium-ui[data-current-page="sales-ranking"] .ranking-hero,
  body.premium-ui[data-current-page="sales-orders"] .sales-order-notice,
  body.premium-ui[data-current-page="samples"] .sample-hero,
  body.premium-ui[data-current-page="background-jobs"] .foundation-job-actions {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  body.premium-ui[data-current-page="sales-ranking"] .ranking-filters,
  body.premium-ui[data-current-page="capacity"] .capacity-filters,
  body.premium-ui[data-current-page="samples"] :where(.sample-inventory-filters, .sample-history-filters-v2) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.premium-ui[data-current-page="receiving"] .receiving-toolbar {
    align-items: stretch !important;
    flex-direction: column !important;
  }

  body.premium-ui[data-current-page="receiving"] .receiving-toolbar > div {
    flex-wrap: wrap !important;
  }

  body.premium-ui[data-current-page="background-jobs"] .foundation-job-actions > span {
    margin-left: 0 !important;
  }
}

@media (max-width: 640px) {
  body.premium-ui[data-current-page="trials"] .trial-toolbar,
  body.premium-ui[data-current-page="production-control"] .production-filters,
  body.premium-ui[data-current-page="sales-ranking"] .ranking-filters,
  body.premium-ui[data-current-page="capacity"] .capacity-filters,
  body.premium-ui[data-current-page="samples"] :where(.sample-inventory-filters, .sample-history-filters-v2) {
    grid-template-columns: 1fr !important;
  }

  body.premium-ui[data-current-page="sales-ranking"] .ranking-meta-strip,
  body.premium-ui[data-current-page="sales-orders"] .sales-order-reconciliation-workbench,
  body.premium-ui[data-current-page="samples"] .sample-summary {
    grid-template-columns: 1fr !important;
  }

  body.premium-ui[data-current-page="sales-ranking"] .ranking-window-tabs {
    display: grid !important;
    width: 100% !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  body.premium-ui[data-current-page="sales-ranking"] .ranking-window-tabs button {
    min-width: 0 !important;
    padding-inline: 6px !important;
  }

  body.premium-ui[data-current-page="sales-orders"] .sales-order-sync {
    width: 100% !important;
    min-width: 0 !important;
  }

  body.premium-ui[data-current-page="receiving"] .receiving-toolbar :where(input, select, button),
  body.premium-ui[data-current-page="samples"] .sample-actions button {
    width: 100% !important;
  }

  body.premium-ui[data-current-page="jst-center"] .jst-acceptance-v5-head,
  body.premium-ui[data-current-page="jst-center"] .acceptance-center > header {
    align-items: flex-start !important;
    flex-direction: column !important;
  }
}
