/*
 * Module presentation for the shared workspace.
 * Screen-only: document printing and accounting state styles keep their own rules.
 */
@media screen {
  body.erp-body .sale-v2-page {
    --si-ink: var(--ui-ink, #182d27);
    --si-muted: var(--ui-muted, #617169);
    --si-border: var(--ui-line, #dfe7df);
    --si-brand: var(--ui-accent, #0c6655);
    --si-glow: 0 8px 26px rgb(23 48 37 / 4%);
  }

  body.erp-body .task-ui {
    --task-ink: var(--ui-ink, #182d27);
    --task-muted: var(--ui-muted, #617169);
    --task-accent: var(--ui-accent, #0c6655);
    --task-line: var(--ui-line, #dfe7df);
    --task-soft: var(--ui-surface-muted, #f8faf7);
  }

  body.erp-body .archive-ui {
    --archive-ink: var(--ui-ink, #182d27);
    --archive-muted: var(--ui-muted, #617169);
    --archive-line: var(--ui-line, #dfe7df);
    --archive-brand: var(--ui-accent, #0c6655);
  }

  /* Filters have the same rhythm without changing their fields or grid contracts. */
  body.erp-body :is(.report-filter, .sales-tools, .person-list-filters, .pv-filters,
    .pv-sort-toolbar, .archive-filters, .assembly-filter, .task-filters) {
    gap: 16px;
    align-items: end;
    border-color: var(--ui-line, #dfe7df);
    border-radius: var(--ui-radius, 16px);
    background: var(--ui-surface, #fff);
    box-shadow: 0 4px 18px rgb(23 48 37 / 2%);
  }

  body.erp-body :is(.report-filter, .sales-tools, .person-list-filters, .pv-filters,
    .archive-filters, .assembly-filter) {
    padding: 20px;
  }

  body.erp-body :is(.report-filter, .sales-tools, .person-list-filters, .pv-filters,
    .archive-filters, .assembly-filter) > label {
    min-width: 0;
    line-height: 1.8;
    font-size: 12px;
    font-weight: 550;
  }

  body.erp-body :is(.sales-tools-actions, .pv-filter-actions, .archive-filter-actions,
    .task-filter-actions, .cashdesk-tender-actions) {
    gap: 8px;
    min-width: 0;
  }

  body.erp-body :is(.ifx-filter-note, .purchase-copy-help, .purchase-copy-hint,
    .keyboard-help, .cashdesk-hint, .archive-help, .assembly-field-hint) {
    line-height: 1.95;
    font-size: 12px;
    color: var(--ui-muted, #617169);
  }

  /* Tables retain their existing responsive card/scroll behavior and row semantics. */
  body.erp-body :is(.table-wrap, .pv-table-wrap, .wf-table) {
    max-width: 100%;
    min-width: 0;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    border-color: var(--ui-line, #dfe7df);
    scrollbar-color: #b4c6b9 transparent;
    scrollbar-width: thin;
  }

  body.erp-body :is(.table-wrap, .pv-table-wrap, .wf-table) thead th {
    background: var(--ui-surface-muted, #f8faf7);
    color: #55675d;
    border-bottom-color: var(--ui-line-strong, #c6d3c9);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.85;
    padding-block: 14px;
  }

  body.erp-body :is(.table-wrap, .pv-table-wrap, .wf-table) td {
    border-bottom-color: #e9eee8;
    line-height: 1.85;
  }

  body.erp-body :is(.cell-number, .cell-date, .cell-code, .sales-amount,
    .sales-card-total strong, .wf-number, .pv-profit-value > strong) {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
  }

  body.erp-body :is(.cell-date, .cell-code, .sales-docno, .sales-card-doc, .wf-number) {
    unicode-bidi: isolate;
  }

  body.erp-body :is(.ifx-sort, .pv-sort-link) {
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
  }

  body.erp-body :is(.ifx-sort.active, .pv-sort-link.is-active) {
    color: var(--ui-accent, #0c6655);
    font-weight: 750;
  }

  body.erp-body :is(.ifx-toolbar, .pv-sort-toolbar) {
    border: 1px solid var(--ui-line, #dfe7df);
    background: var(--ui-surface-muted, #f8faf7);
    border-radius: 12px;
    padding: 15px 18px;
    gap: 12px;
  }

  body.erp-body .products-table .product-thumb {
    width: 56px;
    height: 56px;
    object-fit: contain;
    padding: 5px;
    border: 1px solid var(--ui-line, #dfe7df);
    border-radius: 12px;
    background: #fff;
  }

  body.erp-body .products-table .image-placeholder {
    width: 56px;
    height: 56px;
    border: 1px dashed var(--ui-line-strong, #c6d3c9);
    border-radius: 12px;
    background: var(--ui-surface-muted, #f8faf7);
    font-size: 10px;
  }

  /* Invoice entry: calm section structure and a legible financial summary. */
  body.erp-body .sale-v2-hero {
    background: linear-gradient(110deg, #eef5ee 0%, #fff 60%);
    border-color: var(--ui-line, #dfe7df);
    border-radius: 20px;
    box-shadow: none;
  }

  body.erp-body .sale-v2-hero:before {
    background: rgb(12 102 85 / 4%);
  }

  body.erp-body :is(.sale-v2-eyebrow, .sale-v2-heading-icon, .sale-v2-glance-icon,
    .assembly-kicker, .archive-eyebrow, .wf-eyebrow, .settings-section-kicker) {
    color: var(--ui-accent, #0c6655);
  }

  body.erp-body :is(.sale-v2-glance-card, .sale-v2-panel, .purchase-card) {
    border-color: var(--ui-line, #dfe7df);
    border-radius: var(--ui-radius, 16px);
  }

  body.erp-body .sale-v2-panel-head {
    border-bottom-color: var(--ui-line, #dfe7df);
    padding-bottom: 16px;
    margin-bottom: 18px;
  }

  body.erp-body :is(.header-grid, .sales-header-grid) {
    gap: 16px;
    background: var(--ui-surface-muted, #f8faf7);
    border-color: var(--ui-line, #dfe7df);
  }

  body.erp-body .responsive-entry-table td {
    vertical-align: top;
  }

  body.erp-body .responsive-entry-table :is(input, select, textarea) {
    box-shadow: none;
  }

  body.erp-body :is(.sale-v2-panel-tag, .sale-v2-status) {
    border-color: #d1e2d5;
    background: var(--ui-accent-soft, #eaf4ee);
    color: var(--ui-accent, #0c6655);
  }

  body.erp-body :is(.summary-bar, .sales-summary) {
    gap: 16px 24px;
    border-color: var(--ui-line, #dfe7df);
    border-radius: 12px;
    background: var(--ui-surface-muted, #f8faf7);
    line-height: 1.9;
  }

  body.erp-body .sale-v2-footer-total {
    min-width: 0;
    gap: 8px 18px;
  }

  body.erp-body .sale-v2-footer-amount {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  body.erp-body .sale-v2-page .sale-v2-footer-actions > button.btn.primary[type="submit"] {
    background: var(--ui-accent, #0c6655);
    border-color: var(--ui-accent, #0c6655);
    color: #fff;
  }

  body.erp-body .sale-v2-page .sale-v2-footer-actions > button.btn.primary[type="submit"]:hover:not(:disabled) {
    background: var(--ui-accent-hover, #084e41);
    border-color: var(--ui-accent-hover, #084e41);
  }

  /* The legacy invoice layer marks this low-contrast help color important. */
  body.erp-body .sale-v2-page .check-repeat-help {
    color: var(--ui-muted, #617169) !important;
  }

  body.erp-body :is(.purchase-offset-panel, .sale-offset-picker) {
    border-color: var(--ui-line, #dfe7df);
    border-radius: 12px;
    background: var(--ui-surface-muted, #f8faf7);
  }

  /* Cashdesk and banking use the same section weight as invoice entry. */
  body.erp-body .cashdesk-grid {
    gap: 18px;
    align-items: start;
  }

  body.erp-body .cashdesk-group {
    padding: 22px;
    border-color: var(--ui-line, #dfe7df);
    border-radius: var(--ui-radius, 16px);
    box-shadow: 0 5px 20px rgb(23 48 37 / 3%);
  }

  body.erp-body .cashdesk-group > h3 {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--ui-line, #dfe7df);
    font-size: 15px;
    line-height: 1.9;
    color: var(--ui-ink, #182d27);
  }

  body.erp-body :is(.cashdesk-tender, .cashdesk-inline-person) {
    border-color: var(--ui-line, #dfe7df);
    background: var(--ui-surface-muted, #f8faf7);
    border-radius: 12px;
    padding: 16px;
  }

  body.erp-body .cashdesk-total {
    padding: 16px;
    border: 1px solid #d2e5d7;
    border-radius: 12px;
    background: var(--ui-accent-soft, #eaf4ee);
    font-size: 14px;
    line-height: 2;
    font-variant-numeric: tabular-nums;
  }

  body.erp-body .cash-action-grid {
    gap: 14px;
    margin-block: 20px;
  }

  body.erp-body .cash-action {
    border-color: var(--ui-line, #dfe7df);
    border-radius: var(--ui-radius, 16px);
    background: #fff;
    box-shadow: 0 4px 18px rgb(23 48 37 / 2%);
    padding: 21px;
    text-decoration: none;
  }

  body.erp-body .cash-action strong {
    color: var(--ui-ink, #182d27);
    font-size: 14px;
    line-height: 1.9;
  }

  body.erp-body .cash-action:hover {
    border-color: #96b6a3;
    background: #fbfdfb;
  }

  /* Reports remain readable at their full financial width. */
  body.erp-body :is(.pv-summary > div, .pv-leaders article, .wf-kpis article:not(.wf-kpi-review)) {
    border-color: var(--ui-line, #dfe7df);
    border-radius: var(--ui-radius, 16px);
    padding: 20px;
    box-shadow: 0 4px 18px rgb(23 48 37 / 2%);
  }

  body.erp-body :is(.pv-summary, .pv-leaders, .pv-chart-grid) {
    gap: 16px;
  }

  body.erp-body :is(.pv-summary span, .pv-leaders span) {
    font-size: 12px;
    line-height: 1.9;
  }

  body.erp-body :is(.pv-summary strong, .pv-leaders strong) {
    font-variant-numeric: tabular-nums;
    line-height: 1.65;
  }

  body.erp-body .pv-rate-context {
    background: linear-gradient(115deg, #edf5ef, #fff 75%);
    border-color: #d5e4d8;
  }

  body.erp-body .pv-rate-context > div > strong {
    color: #215544;
  }

  body.erp-body .pv-chart-track {
    background: #eff3ee;
    height: 12px;
    border-radius: 6px;
  }

  body.erp-body .pv-chart-bar:not(.negative):not(.discount) {
    background: #488a78;
  }

  body.erp-body .pv-chart-label {
    gap: 14px;
    line-height: 1.9;
  }

  body.erp-body .pv-chart-label > span {
    min-width: 0;
  }

  body.erp-body .pv-drill:hover {
    background: var(--ui-accent-soft, #eaf4ee);
  }

  body.erp-body .pv-inline-costs summary {
    background: var(--ui-surface-muted, #f8faf7);
    color: #315b49;
    border: 1px solid var(--ui-line, #dfe7df);
  }

  body.erp-body .pv-cost-table .pv-current-cost {
    background: #f3f8f2;
  }

  body.erp-body .pv-tab.active {
    border-color: var(--ui-accent, #0c6655);
    background: var(--ui-accent, #0c6655);
    color: #fff;
  }

  /* CRM and people share the workspace rather than a separate visual theme. */
  body.erp-body .task-ui .page-head {
    background: #fff;
    border: 1px solid var(--ui-line, #dfe7df);
    border-radius: 18px;
    box-shadow: none;
  }

  body.erp-body .task-ui .page-head h1 {
    color: var(--ui-ink, #182d27);
  }

  body.erp-body .task-ui .page-head :is(p, .task-head-link) {
    color: var(--ui-muted, #617169);
  }

  body.erp-body .task-ui .page-head .task-eyebrow {
    color: var(--ui-accent, #0c6655);
  }

  body.erp-body .task-ui .page-head .btn {
    color: var(--ui-ink, #182d27);
    border-color: var(--ui-line-strong, #c6d3c9);
    background: #fff;
  }

  body.erp-body .task-ui .page-head .btn.primary {
    color: #fff;
    background: var(--ui-accent, #0c6655);
    border-color: var(--ui-accent, #0c6655);
  }

  body.erp-body .task-ui :is(.task-record:not(.is-overdue), .task-report:not(.is-latest):not(.is-final), .task-kind-option:not(:has(input:checked)),
    .task-assignment-cards > div, .task-overview) {
    border-radius: 14px;
    border-color: var(--ui-line, #dfe7df);
  }

  body.erp-body .task-ui .task-record-heading h3 {
    line-height: 1.9;
  }

  body.erp-body .task-ui :is(.task-record-customer, .task-profile-editor,
    .task-followup-hint) {
    background: var(--ui-surface-muted, #f8faf7);
  }

  body.erp-body .task-ui .task-report-body {
    line-height: 2.1;
    color: var(--ui-ink, #182d27);
  }

  body.erp-body .task-ui .task-record-customer p {
    color: var(--ui-muted, #617169);
  }

  /* Attendance retains separate present/leave/missing colors. */
  body.erp-body :is(.wf-card:not(.wf-review-panel), .att-capture) {
    border-color: var(--ui-line, #dfe7df);
    border-radius: 18px;
    box-shadow: 0 5px 20px rgb(23 48 37 / 3%);
  }

  body.erp-body .wf-tabs {
    gap: 8px;
    padding-block: 6px 14px;
    border-bottom-color: var(--ui-line, #dfe7df);
  }

  body.erp-body .wf-tabs a {
    color: #315d4a;
    background: #edf4ee;
    border: 1px solid #e0e9df;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.8;
    padding: 9px 14px;
  }

  body.erp-body .wf-tabs a:hover {
    background: #e3eee5;
    border-color: #bdd3c3;
  }

  body.erp-body :is(.wf-card h2, .att-card-heading h2) {
    color: var(--ui-ink, #182d27);
    font-size: 18px;
    line-height: 1.9;
  }

  body.erp-body .wf-kpis article:not(.wf-kpi-review) {
    background: #fff;
  }

  body.erp-body .wf-ui :is(.wf-usage, .wf-people) {
    border-radius: 12px;
    background: var(--ui-surface-muted, #f8faf7);
  }

  body.erp-body .attendance-ui .att-current {
    border-radius: 14px;
    box-shadow: none;
  }

  body.erp-body .attendance-ui video {
    border-radius: 14px;
  }

  /* Assembly, upgrade and evidence panels keep their existing responsive model. */
  body.erp-body :is(.assembly-section, .assembly-part, .upgrade-batch-line,
    .archive-image-card, .archive-upload-card) {
    border-color: var(--ui-line, #dfe7df);
    border-radius: var(--ui-radius, 16px);
  }

  body.erp-body :is(.assembly-part, .upgrade-batch-line) {
    padding: 20px;
  }

  body.erp-body :is(.assembly-part-head, .upgrade-batch-line-head) {
    border-bottom-color: var(--ui-line, #dfe7df);
    padding-bottom: 14px;
    margin-bottom: 16px;
  }

  body.erp-body .upgrade-batch-line-head h3 {
    color: var(--ui-ink, #182d27);
  }

  body.erp-body :is(.assembly-step, .assembly-part-index) {
    color: var(--ui-accent, #0c6655);
    background: var(--ui-accent-soft, #eaf4ee);
  }

  body.erp-body .upgrade-batch-summary {
    background: var(--ui-surface-muted, #f8faf7);
    border-color: var(--ui-line, #dfe7df);
    border-radius: 12px;
    line-height: 1.95;
  }

  body.erp-body .assembly-cost-total {
    border-top-color: var(--ui-line-strong, #c6d3c9);
  }

  body.erp-body .archive-image-card.is-withdrawn {
    border-color: #e6d6d1;
  }

  body.erp-body .archive-pending-item {
    border-color: #c4d7c7;
    background: var(--ui-surface-muted, #f8faf7);
  }

  body.erp-body .archive-preview-scroll {
    background: #f1f4ef;
  }

  body.erp-body :is(.product-search-results, .cashdesk-search-results,
    .upgrade-search-results, .assembly-search-results) {
    border-color: var(--ui-line-strong, #c6d3c9);
    border-radius: 12px;
    box-shadow: 0 14px 36px rgb(23 48 37 / 12%);
  }
}

@media screen and (min-width:1101px) {
  body.erp-body :is(.pv-cost-table-wrap, .pv-invoice-table-wrap) {
    overflow-x: auto;
    scrollbar-gutter: stable;
    padding-bottom: 4px;
  }

  body.erp-body .pv-cost-table td[data-profit-metric] {
    min-width: 210px;
    padding-inline: 16px;
  }

  body.erp-body .pv-cost-table :is(th:last-child, td:last-child) {
    padding-inline-end: 20px;
  }
}

@media screen and (min-width:761px) {
  body.erp-body :is(.table-wrap, .pv-table-wrap) > table:not(.responsive-entry-table) td {
    padding-block: 14px;
  }

  body.erp-body .products-table td:nth-child(3) {
    min-width: 220px;
    max-width: 380px;
    white-space: normal;
    line-height: 1.9;
  }

  body.erp-body #ifx-table td:nth-last-child(-n+8) {
    white-space: nowrap;
  }

  body.erp-body #ifx-table td:nth-last-child(11) {
    min-width: 210px;
    max-width: 370px;
    white-space: normal;
    line-height: 1.9;
  }
}

@media screen and (max-width:850px) {
  body.erp-body .sales-index .sales-invoice-card {
    border-radius: 16px;
    box-shadow: 0 4px 18px rgb(23 48 37 / 3%);
  }

  body.erp-body .sales-index :is(.sales-card-heading, .sales-card-total) {
    border-color: var(--ui-line, #dfe7df);
  }

  body.erp-body .sales-index .sales-card-open {
    background: var(--ui-accent, #0c6655);
    min-height: 46px;
    font-size: 13px;
    font-weight: 650;
  }

  body.erp-body .sales-index .sales-card-label {
    color: var(--ui-muted, #617169);
  }
}

@media screen and (max-width:760px) {
  body.erp-body :is(.report-filter, .sales-tools, .person-list-filters, .pv-filters,
    .archive-filters, .assembly-filter, .task-filters) {
    gap: 12px;
    padding: 16px;
  }

  body.erp-body .cashdesk-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  body.erp-body :is(.cashdesk-group, .assembly-part, .upgrade-batch-line) {
    padding: 16px;
    border-radius: 14px;
  }

  body.erp-body .cashdesk-group > h3 {
    font-size: 14px;
    padding-bottom: 12px;
    margin-bottom: 14px;
  }

  body.erp-body .cash-action-grid {
    gap: 12px;
  }

  body.erp-body .cash-action {
    padding: 18px;
  }

  body.erp-body :is(.pv-summary > div, .pv-leaders article, .wf-kpis article) {
    padding: 16px;
    border-radius: 14px;
  }

  body.erp-body :is(.pv-summary, .pv-leaders, .pv-chart-grid, .wf-kpis) {
    gap: 12px;
  }

  body.erp-body .pv-sort-toolbar {
    padding: 14px;
    gap: 12px;
  }

  body.erp-body .sale-v2-footer-amount {
    font-size: clamp(16px, 4.5vw, 23px);
  }

  body.erp-body :is(.summary-bar, .sales-summary) {
    gap: 10px 16px;
  }

  body.erp-body .wf-tabs {
    gap: 7px;
  }

  body.erp-body .wf-tabs a {
    padding: 8px 11px;
    font-size: 12px;
  }

  body.erp-body .task-ui .page-head {
    padding: 20px;
  }

  body.erp-body .mobile-record-table > tbody > tr {
    border-radius: 14px;
    border-color: var(--ui-line, #dfe7df);
    box-shadow: 0 4px 16px rgb(23 48 37 / 2%);
  }

  body.erp-body .mobile-record-table > tbody > tr > td[data-label]::before {
    color: var(--ui-muted, #617169);
    font-size: 11px;
  }

  body.erp-body .mobile-record-table .cell-actions {
    border-top-color: var(--ui-line, #dfe7df);
    gap: 8px;
  }
}

@media screen and (max-width:480px) {
  body.erp-body :is(.report-filter, .person-list-filters) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  body.erp-body :is(.report-filter, .person-list-filters) > label {
    width: 100%;
    min-width: 0;
  }

  body.erp-body .pv-profit-value {
    gap: 6px;
  }

  body.erp-body .cashdesk-total {
    font-size: 13px;
    padding: 13px;
  }
}

/* Management modules share the workspace palette; public partner/club portals
   use their own body/template and are intentionally outside these selectors. */
@media screen {
  body.erp-body :is(.club-shell .club-hero, .seller-quote .page-head) {
    background: linear-gradient(115deg, #123d32, #175b48);
    color: #fff;
    border: 1px solid #1a5846;
    border-radius: 18px;
    box-shadow: none;
  }

  body.erp-body :is(.club-shell .club-hero h1, .seller-quote .page-head h1) {
    color: #fff;
    line-height: 1.7;
  }

  body.erp-body :is(.club-shell .club-hero p, .seller-quote .page-head .muted) {
    color: #dceee3;
    line-height: 1.95;
  }

  body.erp-body .club-shell .club-eyebrow {
    color: #b9dfc8;
    font-family: inherit;
    letter-spacing: .04em;
  }

  body.erp-body .club-shell .club-hero-icon {
    color: #c7e8d3;
    opacity: .85;
  }

  body.erp-body :is(.club-tabs, .an-ui .an-nav, .payroll .pay-nav, .investor-detail-nav) {
    gap: 8px;
    min-width: 0;
    max-width: 100%;
  }

  body.erp-body :is(.club-tabs a, .an-ui .an-nav a, .payroll .pay-nav a) {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 9px 14px;
    border: 1px solid var(--ui-line, #dfe7df);
    border-radius: 10px;
    background: #fff;
    color: #355d49;
    font-size: 12px;
    line-height: 1.8;
    text-decoration: none;
  }

  body.erp-body :is(.club-tabs a, .an-ui .an-nav a, .payroll .pay-nav a):hover {
    border-color: #bdd3c3;
    background: var(--ui-accent-soft, #eaf4ee);
  }

  body.erp-body :is(.club-tabs a, .an-ui .an-nav a, .payroll .pay-nav a)[aria-current="page"] {
    background: var(--ui-accent, #0c6655);
    border-color: var(--ui-accent, #0c6655);
    color: #fff;
  }

  body.erp-body :is(.club-metrics article, .club-links a, .club-tiles > article,
    .an-ui .an-card, .an-ui .an-stat) {
    border-color: var(--ui-line, #dfe7df);
    border-radius: var(--ui-radius, 16px);
    box-shadow: 0 4px 18px rgb(23 48 37 / 2%);
  }

  body.erp-body .club-metrics article {
    background: #fff;
  }

  body.erp-body .club-metrics strong {
    color: #215544;
    line-height: 1.7;
  }

  body.erp-body :is(.club-empty, .club-message-preview, .an-ui .an-recorder,
    .payroll .pay-summary > div) {
    border-radius: 12px;
    background: var(--ui-surface-muted, #f8faf7);
  }

  body.erp-body :is(.club-table-scroll, .an-ui .an-table, .investor-table-wrap) {
    min-width: 0;
    max-width: 100%;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-color: #b4c6b9 transparent;
    scrollbar-width: thin;
  }

  body.erp-body :is(.club-table-scroll, .an-ui .an-table) thead th {
    background: var(--ui-surface-muted, #f8faf7);
    color: #55675d;
    border-bottom-color: var(--ui-line-strong, #c6d3c9);
    line-height: 1.85;
  }

  body.erp-body .an-ui .an-eyebrow {
    color: var(--ui-accent, #0c6655);
  }

  body.erp-body .an-ui .an-callout {
    background: var(--ui-accent-soft, #eaf4ee);
    color: #285341;
    border: 1px solid #d4e5d8;
  }

  body.erp-body .an-ui .an-card.an-new {
    border-inline-start-color: var(--ui-accent, #0c6655);
    background: linear-gradient(125deg, #fff, #f3f9f3);
  }

  body.erp-body .an-ui .an-message h2 a {
    color: var(--ui-ink, #182d27);
  }

  body.erp-body .an-ui .an-progress span {
    background: #488a78;
  }

  body.erp-body .payroll .pay-nav {
    padding: 12px;
    border: 1px solid var(--ui-line, #dfe7df);
    background: var(--ui-surface-muted, #f8faf7);
  }

  body.erp-body .payroll fieldset {
    border-color: var(--ui-line, #dfe7df);
  }

  body.erp-body .payroll .pay-summary strong {
    font-variant-numeric: tabular-nums;
    line-height: 1.8;
  }

  body.erp-body .investor-page {
    --investor-accent: var(--ui-accent, #0c6655);
    --investor-soft: var(--ui-accent-soft, #eaf4ee);
    --investor-border: var(--ui-line, #dfe7df);
  }

  body.erp-body .investor-page :is(.investor-kpi.primary, .investor-receipt-panel) {
    border-color: #c4ddd0;
  }

  body.erp-body .investor-page :is(.investor-filters, .investor-person-card) {
    border-radius: var(--ui-radius, 16px);
  }

  body.erp-body .campaign-category-picker {
    padding: 14px;
    border: 1px solid var(--ui-line, #dfe7df);
    border-radius: 12px;
    background: var(--ui-surface-muted, #f8faf7);
  }

  body.erp-body :is(.club-shell .club-links small, .club-shell .club-empty,
    .club-shell .club-form small, .an-ui .an-muted, .an-ui .an-card small:not([class])):not(.alert *):not(.an-error *):not(.text-danger):not(.danger):not(.warn):not(.error) {
    color: var(--ui-muted, #617169);
  }
}

@media screen and (max-width:600px) {
  body.erp-body .page-head > .page-actions:has(> a[href="/inventory/receipts"]) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
    align-items: stretch;
  }

  body.erp-body .page-head > .page-actions:has(> a[href="/inventory/receipts"]) > .btn {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    line-height: 1.7;
    white-space: normal;
    justify-content: center;
  }
}
