/*
 * Final enterprise refinement
 * Presentation-only, dark-theme-only overrides.
 * Loaded after the module theme so it can standardize density without
 * changing markup, data, render flow, or the light theme.
 */

html[data-theme="dark"] {
  --bg: #070b10;
  --bg-sidebar: #0b1016;
  --panel: #141a22;
  --card: #141a22;
  --primary: #2d8cff;
  --primary-2: #4aa3ff;
  --success: #38d996;
  --warning: #f2c14e;
  --danger: #ff6b81;
  --accent-purple: #8e7cff;

  --color-bg-app: #090e14;
  --color-bg-shell: #0d131b;
  --color-bg-surface: #141a22;
  --color-bg-surface-raised: #191f29;
  --color-bg-surface-hover: #202733;
  --color-border-default: #252c38;
  --color-border-subtle: #1a212b;

  --module-surface: #141a22;
  --module-surface-subtle: #191f29;
  --module-surface-hover: #202733;
  --module-line: #252c38;
  --module-line-soft: #1a212b;
  --module-table-head: #1d202a;
  --module-table-row: #0d131b;
  --module-table-row-alt: #101721;
  --module-radius: 1rem;
  --module-control-radius: 0.75rem;
}

@media (min-width: 901px) {
  html[data-theme="dark"] {
    --size-sidebar-expanded: 14.5rem;
    --size-header: 4rem;
  }

  html[data-theme="dark"] #layout.layout {
    padding: 1rem 1.25rem 1.5rem calc(var(--size-sidebar-expanded) + 1.25rem);
  }

  html[data-theme="dark"] #layout.layout.sidebar-collapsed {
    padding-left: calc(var(--size-sidebar-collapsed) + 1.25rem);
  }

  html[data-theme="dark"] #layout.layout > .main-panel {
    padding: 0;
  }
}

html[data-theme="dark"] body,
html[data-theme="dark"] #app-shell,
html[data-theme="dark"] .screen {
  background: #090e14;
}

html[data-theme="dark"] .layout,
html[data-theme="dark"] .main-panel {
  background: #0d131b;
}

html[data-theme="dark"] .app-header {
  background: #0e131a;
  border-bottom-color: #252c38;
  box-shadow: none;
}

html[data-theme="dark"] .sidebar {
  padding: 1rem 0.75rem;
  background: #0b1016;
  border-right-color: #252c38;
  border-radius: 0 1rem 1rem 0;
  box-shadow: none;
}

html[data-theme="dark"] .sidebar-brand {
  min-height: 3.25rem;
  margin-bottom: 0.5rem;
  padding: 0 0.5rem 0.875rem;
}

html[data-theme="dark"] .sidebar-menu {
  gap: 0.125rem;
  padding: 0.5rem 0 0.75rem;
}

html[data-theme="dark"] .nav-section {
  margin: 0.65rem 0 0.3rem;
  padding: 0.65rem 0.75rem 0.25rem;
}

html[data-theme="dark"] .nav-item {
  min-height: 2.75rem;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
}

html[data-theme="dark"] .sidebar-divider {
  margin: 0.55rem 0.5rem;
  border-color: #1a212b;
}

html[data-theme="dark"] .sidebar-footer {
  padding: 0.75rem 0.5rem 0;
}

html[data-theme="dark"] .theme-btn {
  min-height: 2.75rem;
}

html[data-theme="dark"] :is(
  .page-header,
  .dashboard-page-header,
  .reports-page-header,
  .receipts-page-header,
  .vendor-payments-page-header,
  .monthly-page-header,
  .sales-page-header,
  .outstanding-vendors-page-header
) {
  min-height: 0;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
  padding: 0 0 1rem;
  border-bottom-color: #1a212b;
}

html[data-theme="dark"] :is(
  .page-header h1,
  .ui-page-title,
  .dashboard-page-header h1,
  .reports-page-header h1,
  .receipts-page-header h1,
  .vendor-payments-page-header h1,
  .monthly-page-header h1,
  .sales-page-header h1,
  .outstanding-vendors-page-header h1
) {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.05;
}

html[data-theme="dark"] :is(
  .page-header p,
  .dashboard-page-header p,
  .reports-page-header p,
  .receipts-page-header p,
  .vendor-payments-page-header p,
  .monthly-page-header p,
  .sales-page-header p,
  .outstanding-vendors-page-header p
) {
  margin: 0;
  line-height: 1.45;
}

html[data-theme="dark"] :is(
  .card,
  .ui-card,
  .toolbar,
  .data-toolbar,
  .filter-bar,
  .filter-panel,
  .form-card,
  .import-stage,
  .settings-panel,
  .commitment-section
) {
  background: #141a22;
  border-color: #252c38;
  box-shadow: 0 6px 18px rgb(0 0 0 / 18%);
}

html[data-theme="dark"] :is(
  .kpi-grid,
  .dashboard-kpi-grid,
  .reports-kpi-grid,
  .receipts-kpi-grid,
  .monthly-kpi-grid,
  .sales-master-kpi-grid,
  .sales-receivables-kpi-grid,
  .outstanding-vendors-kpi-grid,
  .report-summary,
  .bank-summary
) {
  gap: 1rem !important;
  margin-block: 1rem !important;
}

html[data-theme="dark"] :is(
  .kpi-card,
  .ui-card-kpi,
  .summary-card,
  .receipt-summary-card,
  .reports-kpi-grid > .card,
  .receipts-kpi-grid > .card,
  .monthly-kpi-grid > .card,
  .sales-master-kpi-grid > .card,
  .sales-receivables-kpi-grid > .card,
  .outstanding-vendors-kpi-grid > .card,
  .report-summary > .card,
  .bank-summary > .card
) {
  min-height: 10rem !important;
  height: auto !important;
  padding: 1.125rem !important;
}

html[data-theme="dark"] :is(
  .kpi-card h3,
  .ui-card-kpi h3,
  .summary-card h3,
  .receipt-summary-card h3,
  .kpi-title,
  .ui-card-title
) {
  margin: 0;
  line-height: 1.25;
}

html[data-theme="dark"] :is(
  .kpi-value,
  .summary-value,
  .receipt-summary-value,
  .stat-value,
  .metric-value
) {
  margin: 0.75rem 0 0.45rem !important;
  font-size: clamp(2rem, 2.7vw, 3rem);
  line-height: 1.05;
}

html[data-theme="dark"] :is(
  .kpi-card p,
  .summary-card p,
  .receipt-summary-card p,
  .kpi-meta,
  .metric-meta
) {
  margin: 0;
}

html[data-theme="dark"] :is(
  .toolbar,
  .data-toolbar,
  .filter-bar,
  .reports-toolbar,
  .receipts-toolbar,
  .vendor-payment-toolbar,
  .monthly-primary-toolbar,
  .monthly-matrix-toolbar,
  .sales-master-toolbar,
  .sales-receivables-toolbar,
  .outstanding-vendors-toolbar
) {
  gap: 0.75rem !important;
  margin-block: 1rem !important;
  padding: 1rem !important;
}

html[data-theme="dark"] :is(
  .toolbar,
  .data-toolbar,
  .filter-bar,
  .reports-toolbar,
  .receipts-toolbar,
  .vendor-payment-toolbar,
  .monthly-primary-toolbar,
  .monthly-matrix-toolbar,
  .sales-master-toolbar,
  .sales-receivables-toolbar,
  .outstanding-vendors-toolbar
) :is(input, select, textarea, button) {
  min-height: 2.75rem;
}

html[data-theme="dark"] :is(
  .toolbar,
  .data-toolbar,
  .filter-bar,
  .reports-toolbar,
  .receipts-toolbar,
  .vendor-payment-toolbar,
  .monthly-primary-toolbar,
  .monthly-matrix-toolbar,
  .sales-master-toolbar,
  .sales-receivables-toolbar,
  .outstanding-vendors-toolbar
) label {
  margin-bottom: 0.35rem;
}

html[data-theme="dark"] :is(.tabs, .segmented-control, .tab-list) {
  gap: 0.5rem;
  margin-bottom: 1rem;
}

html[data-theme="dark"] :is(.tab-btn, .ui-tab, [role="tab"]) {
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
}

html[data-theme="dark"] :is(
  .commitment-section,
  .settings-panel,
  .import-stage,
  .vendor-payments-import-card,
  .outstanding-table-card,
  .report-card
) {
  margin-block: 1rem !important;
  padding: 1rem !important;
}

html[data-theme="dark"] :is(
  .table-shell,
  .ui-table-container,
  .table-card,
  .table-scroll,
  .table-wrapper
) {
  margin-top: 0.875rem;
}

html[data-theme="dark"] :is(
  .modal-card,
  .dialog-card,
  [role="dialog"]
) {
  background: #191f29;
  border-color: #252c38;
}

html[data-theme="dark"] :is(input, select, textarea) {
  background-color: #191f29;
  border-color: #252c38;
}

html[data-theme="dark"] :is(input, select, textarea):focus {
  border-color: #2d8cff;
  box-shadow: 0 0 0 3px rgb(45 140 255 / 16%);
}

html[data-theme="dark"] :is(.btn-primary, .ui-btn-primary, button.primary) {
  background: #2d8cff;
}

html[data-theme="dark"] :is(.btn-primary, .ui-btn-primary, button.primary):hover {
  background: #4aa3ff;
}

html[data-theme="dark"] :is(
  .table-shell,
  .ui-table-container,
  .table-card,
  .table-scroll,
  .table-wrapper
) {
  border-color: #252c38;
  box-shadow: none;
}

@media (min-width: 901px) and (max-width: 1536px) {
  html[data-theme="dark"] #layout.layout {
    padding-right: 1rem;
    padding-left: calc(var(--size-sidebar-expanded) + 1rem);
  }

  html[data-theme="dark"] #layout.layout.sidebar-collapsed {
    padding-left: calc(var(--size-sidebar-collapsed) + 1rem);
  }

  html[data-theme="dark"] :is(
    .kpi-grid,
    .dashboard-kpi-grid,
    .reports-kpi-grid,
    .receipts-kpi-grid,
    .monthly-kpi-grid,
    .sales-master-kpi-grid,
    .sales-receivables-kpi-grid,
    .outstanding-vendors-kpi-grid,
    .report-summary,
    .bank-summary
  ) {
    gap: 0.875rem !important;
  }

  html[data-theme="dark"] :is(
    .kpi-card,
    .ui-card-kpi,
    .summary-card,
    .receipt-summary-card,
    .reports-kpi-grid > .card,
    .receipts-kpi-grid > .card,
    .monthly-kpi-grid > .card,
    .sales-master-kpi-grid > .card,
    .sales-receivables-kpi-grid > .card,
    .outstanding-vendors-kpi-grid > .card,
    .report-summary > .card,
    .bank-summary > .card
  ) {
    min-height: 9.5rem !important;
    padding: 1rem !important;
  }
}

@media (max-width: 1100px) {
  html[data-theme="dark"] :is(
    .kpi-grid,
    .dashboard-kpi-grid,
    .reports-kpi-grid,
    .receipts-kpi-grid,
    .monthly-kpi-grid,
    .sales-master-kpi-grid,
    .sales-receivables-kpi-grid,
    .outstanding-vendors-kpi-grid,
    .report-summary,
    .bank-summary
  ) {
    grid-auto-rows: auto;
  }
}

/* Sprint 11 — Global enterprise density optimization.
 * Spacing and sizing only. Colors, charts, tables, content, and behavior
 * continue to come from the existing application styles.
 */
html[data-theme="dark"] {
  --size-sidebar-expanded: 14.25rem;
  --size-header: 3.75rem;
  --size-control-md: 2.375rem;
  --card-padding: 1rem;
}

html[data-theme="dark"] #app-shell > .app-header {
  min-height: var(--size-header);
}

html[data-theme="dark"] #layout > .sidebar {
  width: var(--size-sidebar-expanded);
  padding: 0.75rem 0.625rem;
}

html[data-theme="dark"] #layout > .sidebar :is(.sidebar-top, .sidebar-brand) {
  min-height: 2.75rem;
}

html[data-theme="dark"] #layout > .sidebar .sidebar-menu {
  gap: 0;
  padding-block: 0.25rem 0.5rem;
}

html[data-theme="dark"] #layout > .sidebar .nav-section {
  margin: 0.375rem 0 0.125rem;
  padding: 0.5rem 0.5rem 0.125rem;
}

html[data-theme="dark"] #layout > .sidebar .nav-section-label {
  margin-bottom: 0.25rem;
  font-size: 0.625rem;
  letter-spacing: 0.09em;
}

html[data-theme="dark"] #layout > .sidebar .nav-btn {
  min-height: 2.375rem;
  gap: 0.625rem;
  padding: 0.5rem 0.625rem;
}

html[data-theme="dark"] #layout > .sidebar .sidebar-footer {
  padding: 0.5rem 0.375rem 0;
}

html[data-theme="dark"] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) {
  padding: 0 !important;
}

html[data-theme="dark"] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) > .page-header {
  min-height: 0 !important;
  margin: 0 0 1.25rem !important;
  padding: 0 0 1rem !important;
  gap: 0.75rem !important;
}

html[data-theme="dark"] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) > .page-header :is(h1, h2, .ui-page-title) {
  margin: 0 0 0.5rem !important;
  font-size: clamp(1.625rem, 2vw, 2.125rem) !important;
  line-height: 1.1 !important;
}

html[data-theme="dark"] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) > .page-header p {
  margin: 0 !important;
  line-height: 1.4;
}

html[data-theme="dark"] :is(
  .grid.cards-grid,
  .kpi-grid,
  .dashboard-kpi-grid,
  .receipt-summary-grid,
  .reports-kpi-grid,
  .monthly-kpi-grid,
  .sales-master-kpi-grid,
  .sales-receivables-kpi-grid,
  .outstanding-summary,
  .bank-summary,
  .report-summary
) {
  gap: 0.875rem !important;
  margin: 0 0 1.25rem !important;
}

html[data-theme="dark"] :is(
  .kpi-card,
  .ui-card-kpi,
  .receipt-summary-card,
  .outstanding-metric,
  .dashboard-module-card,
  .bank-summary-block,
  .summary-card
) {
  min-height: 9.5rem !important;
  height: auto !important;
  padding: 1rem !important;
}

html[data-theme="dark"] :is(
  .ui-card-kpi__label,
  .kpi-label,
  .outstanding-metric-label,
  .receipt-summary-card > span,
  .summary-card > span
) {
  margin: 0 !important;
  line-height: 1.2 !important;
}

html[data-theme="dark"] :is(
  .ui-card-kpi__value,
  .ui-kpi-value,
  .kpi-value,
  .outstanding-metric-value,
  .receipt-summary-card > strong,
  .summary-value,
  .stat-value,
  .metric-value
) {
  margin: 0.625rem 0 0.375rem !important;
  font-size: clamp(1.75rem, 2.35vw, 2.625rem) !important;
  line-height: 1 !important;
}

html[data-theme="dark"] :is(
  .ui-card-kpi__meta,
  .kpi-meta,
  .metric-meta,
  .receipt-summary-card > small,
  .summary-card > small
) {
  margin: 0 !important;
  line-height: 1.3 !important;
}

html[data-theme="dark"] :is(
  .toolbar,
  .ui-toolbar,
  .ui-table-toolbar,
  .data-toolbar,
  .filter-bar,
  .commitment-filter-bar,
  .commitment-matrix-toolbar,
  .outstanding-toolbar,
  .settings-tabs,
  .vendor-import-card
) {
  gap: 0.625rem !important;
  margin: 0 0 0.875rem !important;
  padding: 0.75rem !important;
}

html[data-theme="dark"] :is(
  .toolbar,
  .ui-toolbar,
  .ui-table-toolbar,
  .data-toolbar,
  .filter-bar,
  .commitment-filter-bar,
  .commitment-matrix-toolbar,
  .outstanding-toolbar
) :is(input, select, button) {
  min-height: 2.375rem !important;
}

html[data-theme="dark"] :is(.filter-field, .form-field, .form-grid > div) {
  gap: 0.25rem;
}

html[data-theme="dark"] :is(.filter-field, .form-field, .form-grid > div) > label {
  margin: 0 0 0.25rem !important;
}

html[data-theme="dark"] :is(.form-grid, .sales-manual-grid) {
  gap: 0.75rem !important;
}

html[data-theme="dark"] :is(.form-actions, .sales-manual-actions) {
  gap: 0.625rem !important;
  margin-top: 1rem !important;
}

html[data-theme="dark"] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(input:not([type="checkbox"]):not([type="radio"]), select) {
  min-height: 2.375rem !important;
  padding-block: 0.5rem !important;
  font-size: 0.8125rem;
}

html[data-theme="dark"] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(.primary-btn, .secondary-btn, .ghost-btn, .danger-btn, .file-btn) {
  min-height: 2.375rem !important;
  padding: 0.5rem 0.75rem !important;
  font-size: 0.75rem;
}

html[data-theme="dark"] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(.primary-btn, .secondary-btn, .ghost-btn, .danger-btn).mini {
  min-height: 1.875rem !important;
  padding: 0.3125rem 0.5rem !important;
  font-size: 0.6875rem;
}

html[data-theme="dark"] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(.page-header p, .ui-helper-text) {
  font-size: 0.8125rem;
}

html[data-theme="dark"] :is(
  .subtabs,
  .sales-tabs,
  .outstanding-tabs,
  .settings-tabs,
  .sheet-tabs
) {
  gap: 0.375rem !important;
  margin: 0 0 0.875rem !important;
}

html[data-theme="dark"] :is(
  .subtabs,
  .sales-tabs,
  .outstanding-tabs,
  .settings-tabs,
  .sheet-tabs
) > button {
  min-height: 2.375rem !important;
  padding: 0.5rem 0.875rem !important;
}

html[data-theme="dark"] :is(
  .table-wrap,
  .ui-table-container,
  .report-table-shell,
  .outstanding-table-wrap,
  .commitment-table-wrap,
  .commitment-matrix-wrap
) {
  margin-top: 0 !important;
}

html[data-theme="dark"] .commitment-section {
  margin: 0 0 1rem !important;
  padding: 1rem !important;
}

html[data-theme="dark"] .commitment-section-head {
  margin-bottom: 0.75rem !important;
}

html[data-theme="dark"] :is(.dashboard-shell, .dashboard-content, .dashboard-primary) {
  gap: 1.25rem !important;
}

html[data-theme="dark"] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) > :last-child {
  margin-bottom: 0 !important;
}

@media (min-width: 901px) {
  html[data-theme="dark"] #layout.layout {
    padding: 0.875rem 1rem 1rem calc(var(--size-sidebar-expanded) + 1rem) !important;
    gap: 1rem !important;
  }

  html[data-theme="dark"] #layout.layout.sidebar-collapsed {
    padding-left: calc(var(--size-sidebar-collapsed) + 1rem) !important;
  }
}

@media (min-width: 1367px) {
  html[data-theme="dark"] :is(
    .grid.cards-grid,
    .kpi-grid,
    .dashboard-kpi-grid,
    .receipt-summary-grid,
    .reports-kpi-grid,
    .monthly-kpi-grid,
    .sales-master-kpi-grid,
    .sales-receivables-kpi-grid,
    .outstanding-summary,
    .bank-summary,
    .report-summary
  ) {
    grid-auto-rows: minmax(9.5rem, auto) !important;
  }
}

@media (min-width: 1180px) {
  html[data-theme="dark"] .dashboard-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  html[data-theme="dark"] :is(.kpi-grid, .grid.cards-grid) {
    grid-template-columns: repeat(auto-fit, minmax(11.875rem, 1fr)) !important;
  }

  html[data-theme="dark"] :is(.receipt-summary-grid, .outstanding-summary, .bank-summary) {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 1366px) and (min-width: 901px) {
  html[data-theme="dark"] {
    --size-sidebar-expanded: 15rem;
  }

  html[data-theme="dark"] :is(
    .kpi-card,
    .ui-card-kpi,
    .receipt-summary-card,
    .outstanding-metric,
    .dashboard-module-card,
    .bank-summary-block,
    .summary-card
  ) {
    min-height: 9.25rem !important;
    padding: 0.875rem !important;
  }

  html[data-theme="dark"] :is(
    .ui-card-kpi__value,
    .ui-kpi-value,
    .kpi-value,
    .outstanding-metric-value,
    .receipt-summary-card > strong,
    .summary-value,
    .stat-value,
    .metric-value
  ) {
    font-size: clamp(1.625rem, 2.2vw, 2.25rem) !important;
  }
}

/* Final UI scale recalibration.
 * Theme-independent sizing overrides: typography, spacing and proportions only.
 * No color, branding, chart, content or interaction rules belong in this block.
 */
html[data-theme] {
  --size-sidebar-expanded: 15rem;
  --size-header: 3.75rem;
  --size-control-md: 2.5rem;
  --card-padding: 1.125rem;
  --font-size-page-title: clamp(2.375rem, 2.5vw, 2.5rem);
  --font-size-kpi: 1.875rem;
}

html[data-theme] body {
  font-size: 0.875rem;
  line-height: 1.45;
}

html[data-theme] #app-shell > .app-header {
  min-height: 3.75rem;
  padding-block: 0.75rem;
}

html[data-theme] #layout > .sidebar {
  width: 15rem;
  padding: 0.75rem;
}

html[data-theme] #layout > .sidebar :is(.sidebar-top, .sidebar-brand) {
  min-height: 2.75rem;
  margin-bottom: 0.5rem;
}

html[data-theme] #layout > .sidebar .sidebar-menu {
  gap: 0;
  padding-block: 0.25rem 0.5rem;
}

html[data-theme] #layout > .sidebar .nav-section {
  margin: 0.5rem 0 0.25rem;
  padding: 0.5rem 0.5rem 0.25rem;
}

html[data-theme] #layout > .sidebar .nav-section-label {
  margin-bottom: 0.375rem;
  font-size: 0.6875rem;
  line-height: 1.25;
}

html[data-theme] #layout > .sidebar .nav-btn {
  min-height: 2.5rem;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.25;
}

html[data-theme] #layout > .sidebar .sidebar-footer {
  padding: 0.5rem 0.5rem 0;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) {
  font-size: 0.875rem;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) > .page-header {
  min-height: 0 !important;
  gap: 0.75rem !important;
  margin: 0 0 1.25rem !important;
  padding: 0 0 1rem !important;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) > .page-header :is(h1, h2, .ui-page-title) {
  margin: 0 0 0.5rem !important;
  font-size: clamp(2.375rem, 2.5vw, 2.5rem) !important;
  line-height: 1.05 !important;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) > .page-header p {
  margin: 0 !important;
  font-size: 0.875rem !important;
  line-height: 1.4;
}

html[data-theme] :is(
  .ui-section-title,
  .section-title,
  .section-header > h2,
  .settings-panel > h3,
  .commitment-section-head h3
) {
  font-size: clamp(1.25rem, 1.5vw, 1.375rem) !important;
  line-height: 1.2;
}

html[data-theme] :is(
  .card-title,
  .ui-card-title,
  .kpi-label,
  .ui-card-kpi__label,
  .outstanding-metric-label,
  .receipt-summary-card > span,
  .summary-card > span,
  .dashboard-card-head h3,
  .side-card h3
) {
  font-size: 0.8125rem !important;
  line-height: 1.25 !important;
}

html[data-theme] :is(
  .grid.cards-grid,
  .kpi-grid,
  .dashboard-kpi-grid,
  .receipt-summary-grid,
  .reports-kpi-grid,
  .monthly-kpi-grid,
  .sales-master-kpi-grid,
  .sales-receivables-kpi-grid,
  .outstanding-summary,
  .bank-summary,
  .report-summary
) {
  gap: 1rem !important;
  margin: 0 0 1.25rem !important;
}

html[data-theme] :is(
  .kpi-card,
  .ui-card-kpi,
  .receipt-summary-card,
  .outstanding-metric,
  .dashboard-module-card,
  .bank-summary-block,
  .summary-card,
  .reports-kpi-grid > .card,
  .monthly-kpi-grid > .card,
  .sales-master-kpi-grid > .card,
  .sales-receivables-kpi-grid > .card
) {
  min-height: 10rem !important;
  height: auto !important;
  padding: 1.125rem !important;
}

html[data-theme] :is(
  .ui-card-kpi__value,
  .ui-kpi-value,
  .kpi-value,
  .outstanding-metric-value,
  .receipt-summary-card > strong,
  .summary-value,
  .stat-value,
  .metric-value,
  .bank-summary-block > strong
) {
  margin: 0.625rem 0 0.375rem !important;
  font-size: 1.875rem !important;
  line-height: 1.05 !important;
}

html[data-theme] #page-dashboard :is(
  .dashboard-kpi-grid,
  .dashboard-module-grid
) :is(
  .ui-card-kpi__value,
  .ui-kpi-value,
  .kpi-value,
  .outstanding-metric-value
) {
  font-size: clamp(2.125rem, 2.4vw, 2.25rem) !important;
}

html[data-theme] :is(
  .ui-card-kpi__meta,
  .kpi-meta,
  .kpi-caption,
  .metric-meta,
  .receipt-summary-card > small,
  .summary-card > small,
  .bank-summary-block > small,
  .ui-helper-text,
  .helper-text,
  .entity-subline
) {
  font-size: 0.75rem !important;
  line-height: 1.35 !important;
}

html[data-theme] :is(
  .toolbar,
  .ui-toolbar,
  .ui-table-toolbar,
  .data-toolbar,
  .filter-bar,
  .commitment-filter-bar,
  .commitment-matrix-toolbar,
  .outstanding-toolbar,
  .settings-tabs,
  .vendor-import-card
) {
  gap: 0.75rem !important;
  margin: 0 0 1rem !important;
  padding: 0.75rem !important;
}

html[data-theme] :is(.filter-field, .form-field, .form-grid > div) {
  gap: 0.25rem !important;
}

html[data-theme] :is(
  .filter-field,
  .form-field,
  .form-grid > div,
  .sales-manual-grid
) > label,
html[data-theme] .ui-label {
  margin: 0 0 0.25rem !important;
  font-size: 0.8125rem !important;
  line-height: 1.25;
}

html[data-theme] :is(.form-grid, .sales-manual-grid) {
  gap: 0.75rem !important;
}

html[data-theme] :is(.form-actions, .sales-manual-actions) {
  gap: 0.75rem !important;
  margin-top: 1rem !important;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  .ui-input,
  .ui-select
) {
  min-height: 2.5rem !important;
  height: 2.5rem;
  padding: 0.5rem 0.75rem !important;
  font-size: 0.875rem !important;
  line-height: 1.25;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(textarea, .ui-textarea) {
  min-height: 4.5rem !important;
  padding: 0.625rem 0.75rem !important;
  font-size: 0.875rem !important;
  line-height: 1.4;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(
  .primary-btn,
  .secondary-btn,
  .ghost-btn,
  .danger-btn,
  .file-btn,
  .ui-btn,
  .action-menu summary
) {
  min-height: 2.5rem !important;
  padding: 0.5rem 0.875rem !important;
  font-size: 0.875rem !important;
  line-height: 1.25;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(.primary-btn, .secondary-btn, .ghost-btn, .danger-btn, .ui-btn).mini {
  min-height: 2rem !important;
  padding: 0.375rem 0.625rem !important;
  font-size: 0.75rem !important;
}

html[data-theme] :is(
  .subtabs,
  .sales-tabs,
  .outstanding-tabs,
  .settings-tabs,
  .sheet-tabs
) {
  gap: 0.5rem !important;
  margin: 0 0 1rem !important;
}

html[data-theme] :is(
  .subtabs,
  .sales-tabs,
  .outstanding-tabs,
  .settings-tabs,
  .sheet-tabs
) > button {
  min-height: 2.5rem !important;
  padding: 0.5rem 0.875rem !important;
  font-size: 0.875rem !important;
  line-height: 1.25;
}

html[data-theme] :is(
  .table-wrap,
  .ui-table-container,
  .report-table-shell,
  .outstanding-table-wrap,
  .commitment-table-wrap,
  .commitment-matrix-wrap
) {
  margin-top: 0 !important;
}

html[data-theme] :is(
  .data-table,
  .ui-table,
  .sales-master-table,
  .commitment-table,
  .commitment-matrix,
  .reports-table,
  .receipts-table
) thead th {
  height: 2.625rem !important;
  min-height: 2.625rem !important;
  padding: 0.625rem 0.75rem !important;
  font-size: 0.8125rem !important;
  line-height: 1.25 !important;
}

html[data-theme] :is(
  .data-table,
  .ui-table,
  .sales-master-table,
  .commitment-table,
  .commitment-matrix,
  .reports-table,
  .receipts-table
) tbody tr {
  height: 2.75rem !important;
  min-height: 2.75rem !important;
}

html[data-theme] :is(
  .data-table,
  .ui-table,
  .sales-master-table,
  .commitment-table,
  .commitment-matrix,
  .reports-table,
  .receipts-table
) tbody td {
  height: 2.75rem !important;
  min-height: 2.75rem !important;
  padding: 0.5rem 0.75rem !important;
  font-size: 0.875rem !important;
  line-height: 1.35 !important;
}

html[data-theme] :is(
  .badge,
  .pill,
  .status-badge,
  .ui-badge,
  .commitment-status,
  .user-badge
) {
  min-height: 1.5rem;
  padding: 0.25rem 0.5rem !important;
  font-size: 0.75rem !important;
  line-height: 1.2;
}

html[data-theme] :is(
  .card,
  .ui-card,
  .bank-card,
  .report-table-card,
  .reports-visual-card,
  .outstanding-table-card,
  .vendor-import-card,
  .project-form-card,
  .settings-panel,
  .commitment-section
) {
  padding: 1.125rem;
}

html[data-theme] :is(
  .commitment-section,
  .report-card,
  .settings-panel,
  .import-stage,
  .vendor-payments-import-card,
  .outstanding-table-card
) {
  margin-block: 1rem !important;
}

html[data-theme] :is(
  .dashboard-shell,
  .dashboard-content,
  .dashboard-primary,
  .analytics-grid,
  .dashboard-content-grid
) {
  gap: 1rem !important;
}

@media (min-width: 901px) {
  html[data-theme] #layout.layout {
    padding: 1rem 1rem 1.25rem calc(15rem + 1rem) !important;
    gap: 1rem !important;
  }

  html[data-theme] #layout.layout.sidebar-collapsed {
    padding-left: calc(var(--size-sidebar-collapsed) + 1rem) !important;
  }
}

@media (max-width: 1366px) and (min-width: 901px) {
  html[data-theme] {
    --size-sidebar-expanded: 15rem;
  }

  html[data-theme] #layout.layout {
    padding-left: 16rem !important;
  }
}

/* Screenshot-calibrated laptop density correction.
 * This final layer deliberately uses page-scoped selectors so it also overrides
 * the older, high-specificity module rules. Presentation only.
 */
html[data-theme] {
  --size-sidebar-expanded: 15.75rem;
  --size-header: 3.5rem;
  --size-control-md: 2.25rem;
  --card-padding: 0.875rem;
  --font-size-page-title: clamp(1.75rem, 2vw, 1.875rem);
  --font-size-kpi: 1.625rem;
}

html[data-theme] #app-shell > .app-header {
  min-height: 3.5rem !important;
  padding: 0.5rem 1rem !important;
}

html[data-theme] #layout > .sidebar {
  width: 15.75rem !important;
  padding: 0.625rem !important;
}

html[data-theme] #layout > .sidebar .sidebar-top {
  display: grid !important;
  min-height: 2.625rem !important;
  grid-template-columns: minmax(0, 1fr) 2.25rem;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.375rem !important;
  padding: 0 0.25rem 0.5rem !important;
}

html[data-theme] #layout > .sidebar .sidebar-brand {
  display: flex;
  min-width: 0;
  min-height: 2.25rem !important;
  align-items: center;
  gap: 0.625rem;
  margin: 0 !important;
}

html[data-theme] #layout > .sidebar .sidebar-brand img {
  width: 2.25rem !important;
  height: 2.25rem !important;
  flex: 0 0 2.25rem;
}

html[data-theme] #layout > .sidebar .sidebar-brand .nav-label {
  min-width: 0;
  margin: 0 !important;
  overflow: hidden;
  font-size: 0.6875rem !important;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-theme] #layout > .sidebar .collapse-btn {
  width: 2.25rem !important;
  min-width: 2.25rem !important;
  height: 2.25rem !important;
  min-height: 2.25rem !important;
  padding: 0 !important;
}

html[data-theme] #layout > .sidebar .sidebar-menu {
  gap: 0 !important;
  padding-block: 0.125rem 0.375rem !important;
}

html[data-theme] #layout > .sidebar .nav-section {
  margin: 0.375rem 0 0.125rem !important;
  padding: 0.375rem 0.25rem 0.25rem !important;
}

html[data-theme] #layout > .sidebar .nav-section-label {
  margin: 0 0.5rem 0.375rem !important;
  font-size: 0.625rem !important;
  line-height: 1.25;
}

html[data-theme] #layout > .sidebar .nav-btn {
  min-height: 2.625rem !important;
  gap: 0.625rem !important;
  margin: 0.0625rem 0 !important;
  padding: 0.5rem 0.625rem !important;
  font-size: 0.84375rem !important;
  line-height: 1.25 !important;
}

html[data-theme] #layout > .sidebar .nav-icon {
  width: 1.375rem !important;
  height: 1.375rem !important;
  flex: 0 0 1.375rem;
}

html[data-theme] #layout > .sidebar .sidebar-footer {
  padding: 0.375rem 0.25rem 0 !important;
}

html[data-theme] #layout > .sidebar .sidebar-theme-control {
  min-height: 2.75rem !important;
  padding: 0.5rem 0.75rem !important;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) {
  font-size: 0.8125rem !important;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) .page-header {
  min-height: 0 !important;
  gap: 0.75rem !important;
  margin: 0 0 0.875rem !important;
  padding: 0 0 0.75rem !important;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) .page-header :is(h1, h2, .ui-page-title) {
  margin: 0 0 0.25rem !important;
  font-size: clamp(1.75rem, 2vw, 1.875rem) !important;
  line-height: 1.1 !important;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) .page-header p {
  margin: 0 !important;
  font-size: 0.8125rem !important;
  line-height: 1.35 !important;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(
  .card,
  .ui-card,
  .bank-card,
  .report-table-card,
  .reports-visual-card,
  .outstanding-table-card,
  .vendor-import-card,
  .project-form-card,
  .settings-panel,
  .commitment-section
) {
  padding: 0.875rem !important;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(
  .kpi-card,
  .ui-card-kpi,
  .receipt-summary-card,
  .outstanding-metric,
  .dashboard-module-card,
  .bank-summary-block,
  .summary-card,
  .reports-kpi-card,
  .monthly-kpi-grid > .card,
  .sales-master-kpi-grid > .card,
  .sales-receivables-kpi-grid > .card
) {
  min-height: 8.25rem !important;
  height: 8.25rem !important;
  padding: 0.875rem !important;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(
  .ui-card-kpi__value,
  .ui-kpi-value,
  .kpi-value,
  .outstanding-metric-value,
  .receipt-summary-card > strong,
  .summary-value,
  .stat-value,
  .metric-value,
  .bank-summary-block > strong
) {
  margin: 0.375rem 0 0.25rem !important;
  font-size: 1.625rem !important;
  line-height: 1.05 !important;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(
  .card-title,
  .ui-card-title,
  .kpi-label,
  .ui-card-kpi__label,
  .outstanding-metric-label,
  .receipt-summary-card > span,
  .summary-card > span,
  .dashboard-card-head h3
) {
  font-size: 0.75rem !important;
  line-height: 1.25 !important;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(
  .ui-card-kpi__meta,
  .kpi-meta,
  .kpi-caption,
  .metric-meta,
  .receipt-summary-card > small,
  .summary-card > small,
  .bank-summary-block > small,
  .ui-helper-text,
  .helper-text
) {
  font-size: 0.6875rem !important;
  line-height: 1.3 !important;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(
  .toolbar,
  .ui-toolbar,
  .ui-table-toolbar,
  .data-toolbar,
  .filter-bar,
  .commitment-filter-bar,
  .commitment-matrix-toolbar,
  .outstanding-toolbar,
  .settings-tabs,
  .vendor-import-card
) {
  gap: 0.625rem !important;
  margin: 0 0 0.75rem !important;
  padding: 0.625rem 0.75rem !important;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  .ui-input,
  .ui-select
) {
  min-height: 2.25rem !important;
  height: 2.25rem !important;
  padding: 0.375rem 0.625rem !important;
  font-size: 0.8125rem !important;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(
  .primary-btn,
  .secondary-btn,
  .ghost-btn,
  .danger-btn,
  .file-btn,
  .ui-btn,
  .action-menu summary
) {
  min-height: 2.25rem !important;
  height: 2.25rem !important;
  padding: 0.375rem 0.75rem !important;
  font-size: 0.8125rem !important;
}

/* Dashboard: the page header is nested inside .dashboard-main, so it needs
 * explicit selectors rather than direct-child page rules.
 */
html[data-theme] #page-dashboard .dashboard-main {
  gap: 0.75rem !important;
  padding: 0.875rem !important;
}

html[data-theme] #page-dashboard .dashboard-page-header .page-title-block {
  gap: 0.25rem !important;
}

html[data-theme] #page-dashboard :is(
  .dashboard-highlight-grid,
  .dashboard-module-grid
) {
  gap: 0.75rem !important;
  margin: 0 !important;
}

html[data-theme] #page-dashboard .dashboard-module-column {
  grid-auto-rows: minmax(8.25rem, auto) !important;
  gap: 0.625rem !important;
}

html[data-theme] #page-dashboard .dashboard-module-column > h3 {
  min-height: 2.75rem !important;
  padding: 0.625rem 0.875rem !important;
  font-size: 0.8125rem !important;
  line-height: 1.2 !important;
}

html[data-theme] #page-dashboard .dashboard-module-column > h3::before {
  width: 0.5rem !important;
  height: 0.5rem !important;
  flex-basis: 0.5rem !important;
}

html[data-theme] #page-dashboard .dashboard-module-card {
  min-height: 8.25rem !important;
  height: 8.25rem !important;
  grid-template-rows: auto auto auto 1fr !important;
  gap: 0.25rem !important;
  padding: 0.875rem !important;
}

html[data-theme] #page-dashboard .dashboard-module-card .ui-card-kpi__value,
html[data-theme] #page-dashboard .dashboard-highlight-grid .dashboard-module-card strong,
html[data-theme] #page-dashboard .dashboard-module-grid .dashboard-module-card strong {
  margin: 0.25rem 0 0.125rem !important;
  font-size: 1.75rem !important;
  line-height: 1.05 !important;
}

html[data-theme] #page-dashboard .dashboard-module-card .dashboard-module-open {
  margin-top: 0.25rem !important;
  padding-top: 0.25rem !important;
  font-size: 0.6875rem !important;
}

/* Reports: compact the high-specificity module cards and filter band. */
html[data-theme] #page-reports.reports-page {
  gap: 0.875rem !important;
  padding-bottom: 1rem !important;
}

html[data-theme] #page-reports .reports-page-header {
  gap: 0.75rem !important;
  padding-bottom: 0.75rem !important;
}

html[data-theme] #page-reports .reports-page-header .ui-page-heading__content {
  gap: 0.25rem !important;
}

html[data-theme] #page-reports .reports-kpi-grid {
  gap: 0.75rem !important;
}

html[data-theme] #page-reports .reports-kpi-card {
  min-height: 8.25rem !important;
  height: 8.25rem !important;
  padding: 0.875rem !important;
}

html[data-theme] #page-reports .reports-kpi-card .kpi-copy {
  align-content: initial !important;
  gap: 0.375rem !important;
}

html[data-theme] #page-reports .reports-kpi-card .ui-kpi-value {
  margin: 0.25rem 0 !important;
  font-size: 1.625rem !important;
  line-height: 1.05 !important;
}

html[data-theme] #page-reports .reports-toolbar {
  gap: 0.75rem !important;
  padding: 0.625rem 0.75rem !important;
}

html[data-theme] #page-reports .reports-toolbar-filters {
  gap: 0.75rem !important;
}

html[data-theme] #page-reports .reports-filter-field {
  gap: 0.25rem !important;
}

html[data-theme] #page-reports .reports-table-card {
  padding: 0.75rem !important;
}

/* Consolidated ledger and the other operational pages: remove the legacy
 * 96px finance rows while preserving internal table scrolling.
 */
html[data-theme] #page-summary .two-grid {
  gap: 0.75rem !important;
  margin-bottom: 0.75rem !important;
}

html[data-theme] #page-summary .pool-card {
  min-height: 7rem !important;
  height: 7rem !important;
  padding: 0.875rem !important;
}

html[data-theme] #page-summary .data-toolbar {
  gap: 0.75rem !important;
  padding: 0.625rem 0.75rem !important;
}

html[data-theme] #page-summary .toolbar-filters {
  gap: 0.625rem !important;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(
  .data-table,
  .ui-table,
  .sales-master-table,
  .commitment-table,
  .commitment-matrix,
  .reports-table,
  .receipts-table
) thead th {
  height: 2.5rem !important;
  min-height: 2.5rem !important;
  padding: 0.5rem 0.625rem !important;
  font-size: 0.71875rem !important;
  line-height: 1.2 !important;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(
  .data-table,
  .ui-table,
  .sales-master-table,
  .commitment-table,
  .commitment-matrix,
  .reports-table,
  .receipts-table
) tbody tr {
  height: 2.75rem !important;
  min-height: 2.75rem !important;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(
  .data-table,
  .ui-table,
  .sales-master-table,
  .commitment-table,
  .commitment-matrix,
  .reports-table,
  .receipts-table
) tbody td {
  height: 2.75rem !important;
  min-height: 0 !important;
  padding: 0.4375rem 0.625rem !important;
  font-size: 0.8125rem !important;
  line-height: 1.25 !important;
}

html[data-theme] :is(
  #page-summary,
  #page-receipts,
  #page-vendor-payments
) .data-table tbody tr {
  height: 3rem !important;
  min-height: 3rem !important;
}

html[data-theme] :is(
  #page-summary,
  #page-receipts,
  #page-vendor-payments
) .data-table tbody td {
  height: 3rem !important;
  min-height: 0 !important;
  padding-top: 0.4375rem !important;
  padding-bottom: 0.4375rem !important;
}

html[data-theme] :is(
  #page-summary,
  #page-receipts,
  #page-vendor-payments
) .entity-cell strong {
  font-size: 0.8125rem !important;
  line-height: 1.2 !important;
}

html[data-theme] :is(
  #page-summary,
  #page-receipts,
  #page-vendor-payments
) .entity-subline {
  margin-top: 0.125rem !important;
  font-size: 0.6875rem !important;
  line-height: 1.2 !important;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(
  .badge,
  .pill,
  .status-badge,
  .ui-badge,
  .commitment-status,
  .user-badge,
  .director-chip,
  .type-pill
) {
  min-height: 1.375rem !important;
  padding: 0.1875rem 0.4375rem !important;
  font-size: 0.6875rem !important;
  line-height: 1.2 !important;
}

@media (min-width: 901px) {
  html[data-theme] #layout.layout {
    padding: 0.875rem 0.875rem 1rem calc(15.75rem + 0.875rem) !important;
    gap: 0.875rem !important;
  }

  html[data-theme] #layout.layout.sidebar-collapsed {
    padding-left: calc(var(--size-sidebar-collapsed) + 0.875rem) !important;
  }
}

@media (max-width: 1366px) and (min-width: 901px) {
  html[data-theme] {
    --size-sidebar-expanded: 15.75rem;
  }

  html[data-theme] #layout.layout {
    padding-left: 16.625rem !important;
  }
}

/* Global visual-scale normalization.
 * One semantic type scale across every module, plus strict page-width
 * containment. Wide finance tables continue to scroll inside their wrappers.
 */
html[data-theme] {
  --erp-font-page-title: 1.75rem;
  --erp-font-section-title: 0.875rem;
  --erp-font-card-label: 0.75rem;
  --erp-font-kpi-value: 1.625rem;
  --erp-font-body: 0.8125rem;
  --erp-font-label: 0.75rem;
  --erp-font-helper: 0.6875rem;
  --erp-font-control: 0.8125rem;
  --erp-font-table-head: 0.75rem;
  --erp-font-table-body: 0.8125rem;
  --erp-font-badge: 0.6875rem;
}

html[data-theme],
html[data-theme] body,
html[data-theme] #app-shell,
html[data-theme] #layout.layout,
html[data-theme] #layout .main-panel {
  width: 100%;
  max-width: 100%;
}

html[data-theme] body,
html[data-theme] #app-shell {
  overflow-x: clip;
}

html[data-theme] #layout .main-panel {
  min-width: 0 !important;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: visible;
  font-size: var(--erp-font-body) !important;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(
  .dashboard-shell,
  .dashboard-main,
  .dashboard-highlight-grid,
  .dashboard-module-grid,
  .dashboard-module-column,
  .grid,
  .two-grid,
  .three-grid,
  .four-grid,
  .kpi-grid,
  .report-summary,
  .analytics-grid,
  .bank-summary-flat,
  .bank-card-grid,
  .toolbar,
  .filters,
  .toolbar-search,
  .toolbar-filters,
  .toolbar-actions,
  .card,
  .ui-card,
  .commitment-section,
  .settings-panel
) {
  min-width: 0 !important;
  max-width: 100%;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(
  .dashboard-highlight-grid,
  .dashboard-module-grid,
  .grid,
  .two-grid,
  .three-grid,
  .four-grid,
  .kpi-grid,
  .report-summary,
  .analytics-grid,
  .bank-summary-flat,
  .bank-card-grid
) > * {
  min-width: 0 !important;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) .page-header :is(h1, h2, .ui-page-title) {
  font-size: var(--erp-font-page-title) !important;
  line-height: 1.1 !important;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) .page-header :is(p, .ui-helper-text) {
  font-size: var(--erp-font-body) !important;
  line-height: 1.35 !important;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(
  .ui-section-title,
  .section-title,
  .section-header > h2,
  .dashboard-module-column > h3,
  .dashboard-chart-card h3,
  .reports-visual-card h3,
  .analytics-grid h3,
  .side-card h3,
  .bank-card h3,
  .settings-panel h3,
  .commitment-section h3,
  .commitment-section-title
) {
  font-size: var(--erp-font-section-title) !important;
  line-height: 1.25 !important;
}

html[data-theme] #page-dashboard .dashboard-module-card :is(
  .dashboard-module-label,
  .ui-card-kpi__label
),
html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(
  .card-title,
  .ui-card-title,
  .kpi-label,
  .ui-card-kpi__label,
  .outstanding-metric-label,
  .receipt-summary-card > span,
  .summary-card > span,
  .bank-summary-block > span,
  .dashboard-card-head h3
) {
  font-size: var(--erp-font-card-label) !important;
  line-height: 1.25 !important;
}

html[data-theme] #page-dashboard .dashboard-module-card .ui-card-kpi__value,
html[data-theme] #page-dashboard .dashboard-highlight-grid .dashboard-module-card strong,
html[data-theme] #page-dashboard .dashboard-module-grid .dashboard-module-card strong,
html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(
  .ui-card-kpi__value,
  .ui-kpi-value,
  .kpi-value,
  .outstanding-metric-value,
  .receipt-summary-card > strong,
  .summary-value,
  .stat-value,
  .metric-value,
  .bank-summary-block > strong
) {
  margin: 0.375rem 0 0.25rem !important;
  font-size: var(--erp-font-kpi-value) !important;
  line-height: 1.05 !important;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(
  p,
  td,
  .entity-cell strong,
  .activity-row strong,
  .side-list-row strong,
  .bank-card h3,
  .bank-card-foot,
  .bank-link
) {
  font-size: var(--erp-font-body) !important;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(
  label,
  .ui-label,
  .filter-field > label,
  .form-field > label,
  .form-grid label,
  .reports-filter-field label
) {
  margin-bottom: 0.25rem !important;
  font-size: var(--erp-font-label) !important;
  line-height: 1.25 !important;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(
  small,
  .ui-helper-text,
  .helper-text,
  .entity-subline,
  .kpi-meta,
  .kpi-caption,
  .ui-card-kpi__meta,
  .metric-meta,
  .muted,
  .bank-summary-block > small,
  .bank-gauge-value > span,
  .bank-gauge-value > small,
  .split-meter small,
  .report-bar-set small,
  .monthly-bar-group > span,
  .chart-label,
  .chart-legend,
  .dashboard-legend
) {
  font-size: var(--erp-font-helper) !important;
  line-height: 1.3 !important;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(
  button,
  .ui-btn,
  .primary-btn,
  .secondary-btn,
  .ghost-btn,
  .danger-btn,
  .file-btn,
  .action-menu summary,
  input,
  select,
  textarea,
  .ui-input,
  .ui-select,
  .ui-textarea
) {
  font-size: var(--erp-font-control) !important;
  line-height: 1.25 !important;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(
  .subtabs,
  .sales-tabs,
  .outstanding-tabs,
  .settings-tabs,
  .sheet-tabs
) > button {
  font-size: var(--erp-font-control) !important;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) table thead th {
  font-size: var(--erp-font-table-head) !important;
  line-height: 1.2 !important;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) table tbody td {
  font-size: var(--erp-font-table-body) !important;
  line-height: 1.25 !important;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(
  .badge,
  .pill,
  .status-badge,
  .status-pill,
  .ui-badge,
  .commitment-status,
  .user-badge,
  .director-chip,
  .type-pill
) {
  font-size: var(--erp-font-badge) !important;
  line-height: 1.2 !important;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(
  .bank-gauge-value > strong,
  .split-meter strong,
  .chart-value,
  .chart-total
) {
  font-size: 1.125rem !important;
  line-height: 1.1 !important;
}

html[data-theme] #layout > .sidebar .nav-btn,
html[data-theme] #layout > .sidebar .nav-text {
  font-size: var(--erp-font-control) !important;
}

html[data-theme] #app-shell > .app-header h1 {
  font-size: var(--erp-font-control) !important;
}

html[data-theme] #app-shell > .app-header p,
html[data-theme] #layout > .sidebar :is(.nav-section-label, .sidebar-brand .nav-label) {
  font-size: 0.625rem !important;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(
  .table-wrap,
  .ui-table-container,
  .reports-table-container,
  .report-table-shell,
  .outstanding-table-wrap,
  .commitment-table-wrap,
  .commitment-matrix-wrap
) {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overscroll-behavior-inline: contain;
}

html[data-theme] :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(
  .data-table,
  .ui-table,
  .sales-master-table,
  .commitment-table,
  .commitment-matrix,
  .reports-table,
  .receipts-table
) {
  max-width: none;
}

@media (min-width: 1200px) {
  html[data-theme] :is(
    #page-summary,
    #page-receipts,
    #page-vendor-payments
  ) .data-toolbar {
    grid-template-columns: minmax(11rem, 1fr) minmax(0, auto) auto !important;
    align-items: end !important;
  }

  html[data-theme] :is(
    #page-summary,
    #page-receipts,
    #page-vendor-payments
  ) :is(
    .toolbar-search,
    .toolbar-filters,
    .toolbar-actions
  ) {
    width: auto !important;
  }

  html[data-theme] #page-summary .toolbar-filters {
    grid-template-columns: repeat(3, minmax(7.5rem, 1fr)) !important;
  }

  html[data-theme] #page-receipts .toolbar-filters {
    grid-template-columns: repeat(4, minmax(6.75rem, 1fr)) !important;
  }

  html[data-theme] #page-vendor-payments .toolbar-filters {
    grid-template-columns: repeat(3, minmax(7.25rem, 1fr)) !important;
  }
}

/* Specificity closures for legacy theme rules that include nested :is()
 * selectors. These keep the semantic scale exact in the computed layout.
 */
html[data-theme] body :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances
) :is(
  .ui-card-kpi,
  .kpi-card,
  .receipt-summary-card,
  .outstanding-metric,
  .dashboard-module-card,
  .bank-summary-block
) :is(
  .ui-card-title,
  .kpi-label,
  .outstanding-metric-label,
  .dashboard-module-label,
  .ui-card-kpi__label,
  span:first-child
) {
  font-size: var(--erp-font-card-label) !important;
  line-height: 1.25 !important;
}

html[data-theme] body :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(
  .data-table,
  .ui-table,
  .sales-master-table,
  .commitment-table,
  .commitment-matrix,
  .reports-table,
  .receipts-table
) thead th {
  font-size: var(--erp-font-table-head) !important;
  line-height: 1.2 !important;
}

html[data-theme] body #page-dashboard .dashboard-module-column > h3,
html[data-theme] body #page-dashboard :is(.dashboard-chart-card, .side-card) h3,
html[data-theme] body #page-reports :is(.reports-visual-card, .analytics-grid > .card) h3,
html[data-theme] body #page-bank-balances .bank-card h3 {
  font-size: var(--erp-font-section-title) !important;
  line-height: 1.25 !important;
}

html[data-theme] body :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) h3 {
  font-size: var(--erp-font-section-title) !important;
  line-height: 1.25 !important;
}

html[data-theme] body :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(
  h3.card-title,
  h3.ui-card-title,
  .commitment-section h3.ui-card-title
) {
  font-size: var(--erp-font-section-title) !important;
  line-height: 1.25 !important;
}

/* --------------------------------------------------------------------------
   Global typeface normalization

   Inter is the single application typeface for interface copy, KPI values,
   financial figures, charts, tables, controls, and authentication screens.
   Numeric alignment remains controlled separately through
   font-variant-numeric, so this does not affect values or calculations.
   -------------------------------------------------------------------------- */
:root {
  --font-family-mono: var(--font-family-sans);
}

html[lang][data-theme] body,
html[lang][data-theme] body #app-shell *,
html[lang][data-theme] body #screen-identity *,
html[lang][data-theme] body #screen-access-denied * {
  font-family: var(--font-family-sans) !important;
}

/* --------------------------------------------------------------------------
   Final enterprise visual unification

   Presentation-only closure for the shared dark palette, flexible KPI system,
   semantic value colours, compact rhythm, and responsive desktop grids.
   -------------------------------------------------------------------------- */
html[data-theme="dark"] {
  --bg: #071018;
  --panel: #12161f;
  --card: #171c25;
  --line: rgb(255 255 255 / 6%);
  --color-bg-app: #071018;
  --color-bg-shell: #071018;
  --color-bg-surface: #171c25;
  --color-bg-surface-raised: #1d2430;
  --color-bg-surface-hover: #202834;
  --color-border-default: rgb(255 255 255 / 6%);
  --color-border-subtle: rgb(255 255 255 / 5%);
  --module-surface: #171c25;
  --module-surface-subtle: #1d2430;
  --module-surface-hover: #202834;
  --module-line: rgb(255 255 255 / 6%);
  --module-line-soft: rgb(255 255 255 / 5%);
  --module-table-head: #1d2430;
  --module-table-row: #12161f;
  --module-table-row-alt: #151a23;
  --enterprise-success: #67c99a;
  --enterprise-blue: #5b7cfa;
  --enterprise-purple: #a78bfa;
  --enterprise-warning: #e6a85b;
  --enterprise-danger: #e88396;
  --enterprise-card-radius: 1.125rem;
  --enterprise-card-padding: 0.875rem;
  --enterprise-kpi-min-height: 8.25rem;
}

html[data-theme="dark"] :is(
  body,
  #app-shell,
  .screen,
  #layout.layout,
  #layout .main-panel
) {
  background: #071018 !important;
  background-image: none !important;
}

html[data-theme="dark"] #app-shell > .app-header {
  background: #0d121a !important;
  background-image: none !important;
  border-bottom-color: rgb(255 255 255 / 6%) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] #layout > .sidebar {
  background: #0b1119 !important;
  background-image: none !important;
  border-color: rgb(255 255 255 / 6%) !important;
  box-shadow: none !important;
}

html[lang][data-theme="dark"] body #app-shell :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) :is(
  .card,
  .ui-card,
  .side-card,
  .commitment-section,
  .outstanding-table-card,
  .report-table-card,
  .reports-visual-card,
  .toolbar,
  .ui-toolbar,
  .ui-table-toolbar,
  .data-toolbar,
  .filter-bar,
  .settings-panel,
  .project-form-card,
  .vendor-import-card
) {
  background-color: #171c25 !important;
  background-image: none !important;
  border-color: rgb(255 255 255 / 6%) !important;
  box-shadow: 0 4px 14px rgb(0 0 0 / 14%) !important;
}

html[lang][data-theme="dark"] body #app-shell :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances
) :is(
  .ui-card-kpi,
  .kpi-card,
  .dashboard-module-card,
  .reports-kpi-card,
  .receipt-summary-card,
  .vendor-payment-summary-card,
  .monthly-kpi-card,
  .sales-master-kpi-card,
  .sales-receivables-kpi-card,
  .outstanding-vendors-kpi-card,
  .outstanding-metric,
  .bank-summary-block,
  .pool-card
) {
  width: 100% !important;
  min-width: 0 !important;
  min-height: var(--enterprise-kpi-min-height) !important;
  height: auto !important;
  max-height: none !important;
  padding: var(--enterprise-card-padding) !important;
  overflow: visible !important;
  align-self: stretch;
  border: 1px solid rgb(255 255 255 / 6%) !important;
  border-radius: var(--enterprise-card-radius) !important;
  background: #171c25 !important;
  background-image: none !important;
  box-shadow: 0 4px 14px rgb(0 0 0 / 12%) !important;
}

html[lang][data-theme] body #app-shell :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances
) :is(
  .ui-card-kpi,
  .kpi-card,
  .dashboard-module-card,
  .reports-kpi-card,
  .receipt-summary-card,
  .vendor-payment-summary-card,
  .monthly-kpi-card,
  .sales-master-kpi-card,
  .sales-receivables-kpi-card,
  .outstanding-vendors-kpi-card,
  .outstanding-metric,
  .bank-summary-block,
  .pool-card
) :is(
  .kpi-copy,
  .ui-card-kpi__content
) {
  display: flex;
  min-width: 0;
  min-height: 100%;
  flex-direction: column;
}

html[lang][data-theme] body #app-shell :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances
) :is(
  .ui-card-kpi__label,
  .ui-card-title,
  .kpi-label,
  .outstanding-metric-label,
  .dashboard-module-label,
  .receipt-summary-card > span,
  .bank-summary-block > span
) {
  min-width: 0;
  max-width: 100%;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  white-space: normal !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere;
}

html[lang][data-theme] body #app-shell :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances
) :is(
  .ui-card-kpi__value,
  .ui-kpi-value,
  .kpi-value,
  .outstanding-metric-value,
  .receipt-summary-card > strong,
  .bank-summary-block > strong,
  .pool-card .kpi-value
) {
  min-width: 0;
  max-width: 100%;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  white-space: normal !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere;
}

html[lang][data-theme] body #app-shell :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances
) :is(
  .ui-card-kpi__meta,
  .ui-helper-text,
  .kpi-caption,
  .outstanding-metric-meta,
  .receipt-summary-card > small,
  .bank-summary-block > small,
  .dashboard-module-open
) {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  white-space: normal !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere;
}

html[lang][data-theme] body #app-shell #page-dashboard .dashboard-module-open {
  margin-top: auto !important;
  padding-top: 0.5rem !important;
}

html[lang][data-theme] body #app-shell :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances
) :is(
  .grid.cards-grid,
  .kpi-grid,
  .dashboard-highlight-grid,
  .receipt-summary-grid,
  .reports-kpi-grid,
  .vendor-payment-summary-grid,
  .monthly-kpi-grid,
  .sales-master-kpi-grid,
  .sales-receivables-kpi-grid,
  .outstanding-summary,
  .bank-summary-flat,
  .two-grid
) {
  gap: 0.75rem !important;
  align-items: stretch !important;
  grid-auto-rows: auto !important;
}

html[lang][data-theme] body #app-shell :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) > .page-header {
  gap: 0.5rem !important;
  margin-bottom: 0.875rem !important;
  padding-bottom: 0.75rem !important;
}

html[lang][data-theme] body #app-shell :is(
  #page-dashboard,
  #page-reports,
  #page-summary,
  #page-receipts,
  #page-vendor-payments,
  #page-monthly-commitments,
  #page-sales,
  #page-outstanding-vendors,
  #page-bank-balances,
  #page-access-control
) .page-header p {
  margin-top: 0.25rem !important;
  max-width: 72rem;
}

html[lang][data-theme="dark"] body #app-shell :is(
  .green,
  .kpi-value.green,
  .ui-kpi-value.green,
  .receipt-summary-card.tone-green > strong,
  .dashboard-module-card.tone-green .ui-card-kpi__value,
  .bank-summary-block.green > strong
) {
  color: var(--enterprise-success) !important;
}

html[lang][data-theme="dark"] body #app-shell :is(
  .blue,
  .kpi-value.blue,
  .ui-kpi-value.blue,
  .receipt-summary-card.tone-blue > strong,
  .dashboard-module-card.tone-blue .ui-card-kpi__value,
  .bank-summary-block.blue > strong
) {
  color: var(--enterprise-blue) !important;
}

html[lang][data-theme="dark"] body #app-shell :is(
  .purple,
  .kpi-value.purple,
  .ui-kpi-value.purple,
  .receipt-summary-card.tone-purple > strong,
  .dashboard-module-card.tone-purple .ui-card-kpi__value,
  .bank-summary-block.purple > strong
) {
  color: var(--enterprise-purple) !important;
}

html[lang][data-theme="dark"] body #app-shell :is(
  .amber,
  .orange,
  .warning,
  .kpi-value.amber,
  .kpi-value.orange
) {
  color: var(--enterprise-warning) !important;
}

html[lang][data-theme="dark"] body #app-shell :is(
  .red,
  .kpi-value.red,
  .ui-kpi-value.red,
  .receipt-summary-card.tone-red > strong,
  .dashboard-module-card.tone-red .ui-card-kpi__value
) {
  color: var(--enterprise-danger) !important;
}

html[data-theme="dark"] :is(
  .table-wrap,
  .ui-table-container,
  .report-table-shell
) {
  border-color: rgb(255 255 255 / 6%) !important;
  background: #12161f !important;
  box-shadow: none !important;
}

html[data-theme="dark"] :is(
  .data-table,
  .ui-table,
  .reports-table,
  .sales-master-table,
  .commitment-table,
  .commitment-matrix,
  .receipts-table
) thead :is(tr, th) {
  background: #1d2430 !important;
  background-image: none !important;
}

html[data-theme="dark"] :is(
  .data-table,
  .ui-table,
  .reports-table,
  .sales-master-table,
  .commitment-table,
  .commitment-matrix,
  .receipts-table
) tbody tr {
  background: #12161f !important;
}

html[data-theme="dark"] :is(
  .data-table,
  .ui-table,
  .reports-table,
  .sales-master-table,
  .commitment-table,
  .commitment-matrix,
  .receipts-table
) tbody tr:nth-child(even) {
  background: #151a23 !important;
}

@media (min-width: 1024px) {
  html[lang][data-theme] body #app-shell #page-dashboard :is(
    .dashboard-highlight-grid,
    .dashboard-module-grid
  ) {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  html[lang][data-theme] body #app-shell #page-dashboard .dashboard-module-column {
    grid-template-rows: auto !important;
    grid-auto-rows: minmax(var(--enterprise-kpi-min-height), auto) !important;
  }
}

@media (max-width: 1023px) {
  html[lang][data-theme] body #app-shell #page-dashboard :is(
    .dashboard-highlight-grid,
    .dashboard-module-grid
  ) {
    grid-template-columns: 1fr !important;
  }
}

/* --------------------------------------------------------------------------
   Neutral finance tables + director identity restoration

   Keep dense table geometry unchanged while removing the hard-coded cyan/navy
   wash. Director and transaction pills recover their original semantic colors.
   -------------------------------------------------------------------------- */
html[lang][data-theme="dark"] body #app-shell :is(
  table.data-table,
  table.ui-table,
  table.reports-table,
  table.sales-master-table,
  table.commitment-table,
  table.commitment-matrix,
  table.receipts-table,
  table.outstanding-table
) {
  background: #171b24 !important;
}

html[lang][data-theme="dark"] body #app-shell :is(
  table.data-table,
  table.ui-table,
  table.reports-table,
  table.sales-master-table,
  table.commitment-table,
  table.commitment-matrix,
  table.receipts-table,
  table.outstanding-table
) thead :is(tr, th) {
  background: #20212b !important;
  background-image: none !important;
}

html[lang][data-theme="dark"] body #app-shell :is(
  table.data-table,
  table.ui-table,
  table.reports-table,
  table.sales-master-table,
  table.commitment-table,
  table.commitment-matrix,
  table.receipts-table,
  table.outstanding-table
) tbody tr > td {
  border-color: rgb(255 255 255 / 7%) !important;
  background: #171b24 !important;
}

html[lang][data-theme="dark"] body #app-shell :is(
  table.data-table,
  table.ui-table,
  table.reports-table,
  table.sales-master-table,
  table.commitment-table,
  table.commitment-matrix,
  table.receipts-table,
  table.outstanding-table
) tbody tr:nth-child(even) > td {
  background: #1b202b !important;
}

html[lang][data-theme="dark"] body #app-shell :is(
  table.data-table,
  table.ui-table,
  table.reports-table,
  table.sales-master-table,
  table.commitment-table,
  table.commitment-matrix,
  table.receipts-table,
  table.outstanding-table
) tbody tr:hover > td {
  background: #222835 !important;
}

html[lang][data-theme="dark"] body #app-shell .director-chip.praveen {
  border-color: rgb(111 191 154 / 32%) !important;
  background: rgb(111 191 154 / 14%) !important;
  color: #b4efd5 !important;
}

html[lang][data-theme="dark"] body #app-shell .director-chip.rahil {
  border-color: rgb(214 174 91 / 32%) !important;
  background: rgb(214 174 91 / 14%) !important;
  color: #efd899 !important;
}

html[lang][data-theme="dark"] body #app-shell .director-chip.both {
  border-color: rgb(185 167 255 / 32%) !important;
  background: rgb(185 167 255 / 14%) !important;
  color: #d7d0ff !important;
}

html[lang][data-theme="dark"] body #app-shell .type-pill.receipt {
  border-color: rgb(111 191 154 / 32%) !important;
  background: rgb(111 191 154 / 14%) !important;
  color: #b4efd5 !important;
}

html[lang][data-theme="dark"] body #app-shell .type-pill.payment {
  border-color: rgb(217 122 139 / 32%) !important;
  background: rgb(217 122 139 / 14%) !important;
  color: #f0a2af !important;
}

html[lang][data-theme="dark"] body #app-shell :is(
  .table-wrap,
  .ui-table-container,
  .report-table-shell,
  .commitment-table-wrap,
  .commitment-matrix-wrap
) {
  scrollbar-color: #4b5261 #11151c !important;
}

html[lang][data-theme="dark"] body #app-shell :is(
  .table-wrap,
  .ui-table-container,
  .report-table-shell,
  .commitment-table-wrap,
  .commitment-matrix-wrap
)::-webkit-scrollbar-track {
  background: #11151c !important;
}

html[lang][data-theme="dark"] body #app-shell :is(
  .table-wrap,
  .ui-table-container,
  .report-table-shell,
  .commitment-table-wrap,
  .commitment-matrix-wrap
)::-webkit-scrollbar-thumb {
  border-color: #11151c !important;
  background: #4b5261 !important;
}

/* Sales summary: keep every KPI on the same top-aligned content rhythm. */
html[lang][data-theme] body #app-shell #page-sales.sales-master-modernized .sales-master-kpi-card {
  display: flex !important;
  flex-direction: column !important;
  align-content: initial !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  justify-items: stretch !important;
  gap: 0 !important;
  text-align: left !important;
}

html[lang][data-theme] body #app-shell #page-sales.sales-master-modernized .sales-master-kpi-card > .kpi-copy {
  width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  flex: 0 0 auto !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
}

html[lang][data-theme] body #app-shell #page-sales.sales-master-modernized .sales-master-kpi-card > :is(
  .kpi-copy,
  .kpi-label,
  .kpi-value,
  .kpi-caption
) {
  text-align: left !important;
}

/* --------------------------------------------------------------------------
   Seven-metric finance summaries

   Long Indian-currency values must remain intact. These two summaries use a
   deliberately smaller scale than the standard KPI component so seven metrics
   can stay readable without tall presentation-style cards.
   -------------------------------------------------------------------------- */
html[lang][data-theme] body #app-shell #page-sales.sales-receivables-modernized .sales-receivables-kpi-grid,
html[lang][data-theme] body #app-shell #page-outstanding-vendors .outstanding-vendors-kpi-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-auto-rows: 9rem !important;
  gap: 0.75rem !important;
  margin: 0 0 1rem !important;
}

html[lang][data-theme] body #app-shell #page-sales.sales-receivables-modernized .sales-receivables-kpi-card,
html[lang][data-theme] body #app-shell #page-outstanding-vendors .outstanding-vendors-kpi-card {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  min-width: 0 !important;
  min-height: 9rem !important;
  height: 9rem !important;
  max-height: 9rem !important;
  padding: 0.875rem 1rem !important;
  overflow: hidden !important;
  align-items: stretch !important;
  gap: 0.375rem !important;
}

html[lang][data-theme] body #app-shell #page-sales.sales-receivables-modernized .sales-receivables-kpi-card > .kpi-copy,
html[lang][data-theme] body #app-shell #page-outstanding-vendors .outstanding-vendors-kpi-card > .kpi-copy {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  gap: 0.375rem !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
}

html[lang][data-theme] body #app-shell #page-sales.sales-receivables-modernized .sales-receivables-kpi-card :is(
  .ui-card-title,
  .kpi-label
),
html[lang][data-theme] body #app-shell #page-outstanding-vendors .outstanding-vendors-kpi-card :is(
  .ui-card-title,
  .kpi-label
) {
  min-height: 2.4em !important;
  margin: 0 !important;
  font-size: 0.75rem !important;
  line-height: 1.2 !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

html[lang][data-theme] body #app-shell #page-sales.sales-receivables-modernized .sales-receivables-kpi-card :is(
  .ui-kpi-value,
  .kpi-value
),
html[lang][data-theme] body #app-shell #page-outstanding-vendors .outstanding-vendors-kpi-card :is(
  .ui-kpi-value,
  .kpi-value
) {
  align-self: flex-start !important;
  max-width: 100% !important;
  margin: 0 !important;
  font-size: clamp(1.25rem, 1.35vw, 1.5rem) !important;
  line-height: 1.08 !important;
  letter-spacing: -0.025em !important;
  white-space: nowrap !important;
  overflow: visible !important;
  overflow-wrap: normal !important;
  word-break: keep-all !important;
}

html[lang][data-theme] body #app-shell #page-sales.sales-receivables-modernized .sales-receivables-kpi-card :is(
  .ui-helper-text,
  .kpi-caption,
  .muted
),
html[lang][data-theme] body #app-shell #page-outstanding-vendors .outstanding-vendors-kpi-card :is(
  .ui-helper-text,
  .kpi-caption,
  .muted
) {
  align-self: flex-start !important;
  margin: 0 !important;
  font-size: 0.75rem !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

@media (min-width: 760px) {
  html[lang][data-theme] body #app-shell #page-sales.sales-receivables-modernized .sales-receivables-kpi-grid,
  html[lang][data-theme] body #app-shell #page-outstanding-vendors .outstanding-vendors-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 1180px) {
  html[lang][data-theme] body #app-shell #page-sales.sales-receivables-modernized .sales-receivables-kpi-grid,
  html[lang][data-theme] body #app-shell #page-outstanding-vendors .outstanding-vendors-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 1600px) {
  html[lang][data-theme] body #app-shell #page-sales.sales-receivables-modernized .sales-receivables-kpi-grid,
  html[lang][data-theme] body #app-shell #page-outstanding-vendors .outstanding-vendors-kpi-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  }
}

/* --------------------------------------------------------------------------
   Invoice-yet allocation summary

   Six balanced cards replace the previous mixed five-card summary. Business
   ownership remains visually distinct from the existing service-category
   "Business Module" column.
   -------------------------------------------------------------------------- */
html[lang][data-theme] body #app-shell #page-sales .invoice-yet-kpi-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-auto-rows: 9rem !important;
  gap: 0.75rem !important;
  margin: 0 0 1rem !important;
}

html[lang][data-theme] body #app-shell #page-sales .invoice-yet-kpi-card {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  gap: 0.375rem !important;
  min-width: 0 !important;
  min-height: 9rem !important;
  height: 9rem !important;
  max-height: 9rem !important;
  padding: 0.875rem 1rem !important;
  overflow: hidden !important;
  text-align: left !important;
}

html[lang][data-theme] body #app-shell #page-sales .invoice-yet-kpi-card .kpi-label {
  min-height: 2.4em !important;
  margin: 0 !important;
  font-size: 0.75rem !important;
  line-height: 1.2 !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

html[lang][data-theme] body #app-shell #page-sales .invoice-yet-kpi-card .kpi-value {
  align-self: flex-start !important;
  max-width: 100% !important;
  margin: 0 !important;
  font-size: clamp(1.25rem, 1.35vw, 1.5rem) !important;
  line-height: 1.08 !important;
  letter-spacing: -0.025em !important;
  white-space: nowrap !important;
  overflow: visible !important;
  overflow-wrap: normal !important;
  word-break: keep-all !important;
}

html[lang][data-theme] body #app-shell #page-sales .invoice-yet-kpi-card .kpi-caption {
  align-self: flex-start !important;
  margin: 0 !important;
  font-size: 0.75rem !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

html[lang][data-theme] body #app-shell #page-sales .invoice-yet-business-unit-select {
  width: 100% !important;
  min-width: 9.5rem !important;
  min-height: 2.25rem !important;
  height: 2.25rem !important;
  padding: 0.375rem 1.75rem 0.375rem 0.625rem !important;
  border-radius: 0.625rem !important;
  font-size: 0.75rem !important;
  line-height: 1.2 !important;
}

@media (min-width: 760px) {
  html[lang][data-theme] body #app-shell #page-sales .invoice-yet-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 1180px) {
  html[lang][data-theme] body #app-shell #page-sales .invoice-yet-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 1600px) {
  html[lang][data-theme] body #app-shell #page-sales .invoice-yet-kpi-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }
}

/* Invoice-yet table: use the same readable fixed-column enterprise geometry
   as Sales Master instead of squeezing every column into the viewport. */
html[lang][data-theme] body #app-shell #page-sales .invoice-yet-table-wrap {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  max-height: min(72vh, 48rem) !important;
  margin: 0 !important;
  border: 1px solid var(--color-border-subtle) !important;
  border-radius: var(--radius-md) !important;
  overflow: auto !important;
  overscroll-behavior-inline: contain;
}

html[lang][data-theme] body #app-shell #page-sales .invoice-yet-table {
  width: 176.5rem !important;
  min-width: 176.5rem !important;
  max-width: none !important;
  table-layout: fixed !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

html[lang][data-theme] body #app-shell #page-sales .invoice-yet-table th,
html[lang][data-theme] body #app-shell #page-sales .invoice-yet-table td {
  height: 4.25rem !important;
  min-height: 4.25rem !important;
  padding: 0.75rem 0.875rem !important;
  vertical-align: middle !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  line-height: 1.35 !important;
}

html[lang][data-theme] body #app-shell #page-sales .invoice-yet-table thead th {
  height: 3.25rem !important;
  min-height: 3.25rem !important;
  font-size: 0.75rem !important;
  white-space: normal !important;
}

html[lang][data-theme] body #app-shell #page-sales .invoice-yet-table th .table-head-label,
html[lang][data-theme] body #app-shell #page-sales .invoice-yet-table th .table-head-label > span:first-child {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

html[lang][data-theme] body #app-shell #page-sales .invoice-yet-table .invoice-yet-col-slNo {
  width: 5.5rem !important;
  min-width: 5.5rem !important;
}

html[lang][data-theme] body #app-shell #page-sales .invoice-yet-table .invoice-yet-col-financialYear {
  width: 8.5rem !important;
  min-width: 8.5rem !important;
  white-space: nowrap !important;
}

html[lang][data-theme] body #app-shell #page-sales .invoice-yet-table .invoice-yet-col-projectCode {
  width: 10rem !important;
  min-width: 10rem !important;
}

html[lang][data-theme] body #app-shell #page-sales .invoice-yet-table .invoice-yet-col-eventName {
  width: 20rem !important;
  min-width: 20rem !important;
}

html[lang][data-theme] body #app-shell #page-sales .invoice-yet-table .invoice-yet-col-clientName {
  width: 18rem !important;
  min-width: 18rem !important;
}

html[lang][data-theme] body #app-shell #page-sales .invoice-yet-table .invoice-yet-col-estimatedAmount {
  width: 12rem !important;
  min-width: 12rem !important;
  white-space: nowrap !important;
}

html[lang][data-theme] body #app-shell #page-sales .invoice-yet-table .invoice-yet-col-poc {
  width: 10rem !important;
  min-width: 10rem !important;
}

html[lang][data-theme] body #app-shell #page-sales .invoice-yet-table .invoice-yet-col-businessModule {
  width: 18rem !important;
  min-width: 18rem !important;
}

html[lang][data-theme] body #app-shell #page-sales .invoice-yet-table .invoice-yet-col-businessUnit {
  width: 13rem !important;
  min-width: 13rem !important;
}

html[lang][data-theme] body #app-shell #page-sales .invoice-yet-table .invoice-yet-col-eventCompletionDate {
  width: 12.5rem !important;
  min-width: 12.5rem !important;
  white-space: nowrap !important;
}

html[lang][data-theme] body #app-shell #page-sales .invoice-yet-table .invoice-yet-col-outstandingDays {
  width: 10rem !important;
  min-width: 10rem !important;
}

html[lang][data-theme] body #app-shell #page-sales .invoice-yet-table .invoice-yet-col-remarks {
  width: 18rem !important;
  min-width: 18rem !important;
}

html[lang][data-theme] body #app-shell #page-sales .invoice-yet-table .invoice-yet-col-actions {
  width: 11rem !important;
  min-width: 11rem !important;
  white-space: nowrap !important;
}

html[lang][data-theme] body #app-shell #page-sales .invoice-yet-table .invoice-yet-col-actions .ui-btn {
  min-width: 3.75rem !important;
  min-height: 2.25rem !important;
  height: 2.25rem !important;
  padding: 0.375rem 0.625rem !important;
  font-size: 0.75rem !important;
}

@media (min-width: 1200px) {
  html[data-theme] #page-vendor-payments .vendor-payment-records-card .toolbar-filters {
    grid-template-columns: repeat(4, minmax(7.25rem, 1fr)) !important;
  }
}
