/* Account settings are loaded after page-specific styles so explicit user
   preferences remain authoritative across every section. */
body.app-compact-tables table th,
body.app-compact-tables table td {
  padding-top: 7px !important;
  padding-bottom: 7px !important;
}

/* User-controlled interface preferences. All selectors are opt-in via body classes. */
body.app-hide-update-badges .data-refresh-badge,
body.app-hide-update-badges .hero-banner-refresh,
body.app-hide-update-badges [data-hero-updated-badge] {
  display: none !important;
}

body.app-sticky-table-headers :is(
  .data-table-wrap,
  .pricing-table-wrap,
  .products-modern-table-wrap,
  .orders-table-wrap,
  .warehouse-stock-table-wrap,
  .responsive-table-wrap,
  .table-scroll,
  .fs-table-wrap,
  .ad-table-wrap,
  .sales-table-wrap,
  .comparison-table-wrap,
  .abc-table-wrap
) table thead th {
  position: sticky;
  top: 0;
  z-index: 6;
  background: var(--app-surface, #fff);
  box-shadow: inset 0 -1px 0 var(--app-border, #e5e9f0);
}

body.app-highlight-table-rows :is(
  .data-table,
  .pricing-table,
  .products-modern-table,
  .orders-table,
  .warehouse-stock-table,
  .fs-table,
  .ad-table,
  .sales-table,
  .comparison-table,
  .abc-table
) tbody tr:hover > td {
  background-color: rgba(84, 103, 128, .055);
}

html[data-app-theme="dark"] body.app-sticky-table-headers :is(
  .data-table-wrap,
  .pricing-table-wrap,
  .products-modern-table-wrap,
  .orders-table-wrap,
  .warehouse-stock-table-wrap,
  .responsive-table-wrap,
  .table-scroll,
  .fs-table-wrap,
  .ad-table-wrap,
  .sales-table-wrap,
  .comparison-table-wrap,
  .abc-table-wrap
) table thead th {
  background: var(--dark-surface-2, #171c22);
  box-shadow: inset 0 -1px 0 #2b333d;
}

html[data-app-theme="dark"] body.app-highlight-table-rows :is(
  .data-table,
  .pricing-table,
  .products-modern-table,
  .orders-table,
  .warehouse-stock-table,
  .fs-table,
  .ad-table,
  .sales-table,
  .comparison-table,
  .abc-table
) tbody tr:hover > td {
  background-color: rgba(255, 255, 255, .035);
}


/* Account preference: hide notification surfaces, including transient toasts,
   redirect flash messages and dashboard warning banners. Inline validation,
   form help and content-level warning notes remain visible. */
body.app-popup-notifications-off :is(
  .app-error-toast,
  .app-success-toast,
  .app-toast,
  .toast,
  .wh-toast,
  .returns-toast,
  .promotion-toast-stack,
  .promotion-toast,
  .flash-list,
  .dashboard-warning-list,
  [data-return-toast],
  [data-return-workflow-toast]
) {
  display: none !important;
}

/* Generic fallback for tables that use page-specific class names. */
body.app-highlight-table-rows table tbody tr:hover > td {
  background-color: rgba(84, 103, 128, .055) !important;
}
html[data-app-theme="dark"] body.app-highlight-table-rows table tbody tr:hover > td {
  background-color: rgba(255, 255, 255, .035) !important;
}

/* V868: optional knowledge/help cards are controlled by the account setting.
   Only blocks explicitly marked with data-optional-help-block are affected, so
   validation hints, warnings and operational notices always remain visible. */
body.app-hide-help-blocks [data-optional-help-block] {
    display: none !important;
}
