/* Approved AOE Workbench design. Loaded after module CSS in the shared layout.
 * Presentation only: original forms, report columns, precision and workflows remain authoritative. */
body.erp-modern.erp-app.erp-stitch {
    --erp-font: "Inter", "Noto Sans Arabic", Arial, sans-serif;
    --erp-font-ar: "Noto Sans Arabic", "Inter", Arial, sans-serif;
    --erp-bg: #f4f6f8;
    --erp-surface: #ffffff;
    --erp-surface-alt: #edf2f5;
    --erp-surface-muted: var(--erp-surface-alt);
    --erp-surface-raised: var(--erp-surface);
    --erp-surface-panel: var(--erp-surface);
    --erp-surface-hover: #e5eeef;
    --erp-hover: var(--erp-surface-hover);
    --erp-text: #182b3d;
    --erp-muted: #536678;
    --erp-border: #d9e2e9;
    --erp-control-border: #74879a;
    --erp-primary: #086d6a;
    --erp-primary-hover: #075b58;
    --erp-primary-pressed: #064a48;
    --erp-on-primary: #ffffff;
    --erp-primary-contrast: var(--erp-on-primary);
    --erp-primary-soft: #ddf2ee;
    --erp-link: #086562;
    --erp-focus: #086d6a;
    --erp-accent: #94701c;
    --erp-accent-ink: #806016;
    --erp-accent-soft: #faf2dc;
    --erp-success: #176b4c;
    --erp-success-surface: #e7f4ed;
    --erp-warning: #8b5b0d;
    --erp-warning-surface: #fff4db;
    --erp-danger: #ae303f;
    --erp-danger-surface: #fcecf0;
    --erp-info: #285ea4;
    --erp-info-surface: #eaf1fc;
    --erp-success-soft: var(--erp-success-surface);
    --erp-warning-soft: var(--erp-warning-surface);
    --erp-danger-soft: var(--erp-danger-surface);
    --erp-info-soft: var(--erp-info-surface);
    --erp-chart-1: #086d6a;
    --erp-chart-2: #285ea4;
    --erp-chart-3: #94701c;
    --erp-chart-4: #7955bb;
    --erp-chart-5: #a9522c;
    --erp-chart-6: #a23968;
    --erp-radius-control: .5rem;
    --erp-radius-small: .375rem;
    --erp-radius-card: .625rem;
    --erp-radius-panel: .625rem;
    --erp-shadow: 0 1px 3px rgb(16 46 73 / 5%);
    --erp-shadow-soft: var(--erp-shadow);
    --erp-shadow-card: var(--erp-shadow);
    --erp-shadow-panel: none;
    --erp-shadow-control: none;
    --shell-sidebar-wide: 15.5rem;
    --shell-navy: #102e49;
    --shell-ink: #f1f6fa;
    --shell-muted: #b9cad9;
    --shell-line: #34516a;
    --shell-hover: #1a405f;
    --shell-gold: #d7b968;
    --workbench-control-size: 2.75rem;
    --workbench-gutter: 1.5rem;
    --workbench-panel-gutter: 1.25rem;
    color-scheme: light;
    color: var(--erp-text);
    background: var(--erp-bg);
    font-family: var(--erp-font);
    font-size: .9375rem;
    line-height: 1.5;
    font-optical-sizing: auto;
    font-variant-numeric: lining-nums;
    text-underline-offset: .2em;
    accent-color: var(--erp-primary);
}

:is(html.dark, html[data-theme="dark"]) body.erp-modern.erp-app.erp-stitch,
body.erp-modern.erp-app.erp-stitch:is(.dark, [data-theme="dark"]) {
    --erp-bg: #0d1520;
    --erp-surface: #141f2d;
    --erp-surface-alt: #1b2a3b;
    --erp-surface-hover: #223746;
    --erp-text: #edf3f8;
    --erp-muted: #a8b8c8;
    --erp-border: #2c3d50;
    --erp-control-border: #75899d;
    --erp-primary: #65d4c7;
    --erp-primary-hover: #84e0d5;
    --erp-primary-pressed: #4abdb0;
    --erp-on-primary: #092924;
    --erp-primary-soft: #173e3b;
    --erp-link: #79dcd0;
    --erp-focus: #65d4c7;
    --erp-accent: #d7b968;
    --erp-accent-ink: #e7ce8f;
    --erp-accent-soft: #3b321f;
    --erp-success: #77d6aa;
    --erp-success-surface: #18372d;
    --erp-warning: #e8bf70;
    --erp-warning-surface: #3a301f;
    --erp-danger: #ff9ba7;
    --erp-danger-surface: #41252f;
    --erp-info: #95c2ff;
    --erp-info-surface: #1d324d;
    --erp-chart-1: #65d4c7;
    --erp-chart-2: #95c2ff;
    --erp-chart-3: #d7b968;
    --erp-chart-4: #b8a0ef;
    --erp-chart-5: #ebaa80;
    --erp-chart-6: #e89abb;
    --erp-shadow: 0 1px 3px rgb(0 0 0 / 14%);
    --shell-navy: #0a121d;
    --shell-ink: #edf3f8;
    --shell-muted: #a8b8c8;
    --shell-line: #293a4c;
    --shell-hover: #182a3b;
    color-scheme: dark;
}

/* Resolve module aliases at the selected theme rather than pinning a light palette. */
body.erp-modern.erp-app.erp-stitch {
    --aoe-page: var(--erp-bg);
    --aoe-raised: var(--erp-surface);
    --aoe-hover: var(--erp-hover);
    --aoe-pressed: var(--erp-primary-soft);
    --aoe-navy: var(--erp-primary);
    --aoe-navy-hover: var(--erp-primary-hover);
    --aoe-navy-pressed: var(--erp-primary-pressed);
    --aoe-muted: var(--erp-muted);
    --aoe-line: var(--erp-border);
    --aoe-control: var(--erp-control-border);
    --aoe-focus: var(--erp-focus);
    --aoe-gold: var(--erp-accent);
    --aoe-gold-ink: var(--erp-accent-ink);
    --surface: var(--erp-surface);
    --text: var(--erp-text);
    --muted: var(--erp-muted);
    --border: var(--erp-border);
    --accent: var(--erp-accent);
    --erp-page: var(--erp-bg);
    --erp-navy: var(--erp-text);
    --erp-gold: var(--erp-accent);
    --erp-gold-dark: var(--erp-accent-ink);
    --surface-page: var(--erp-bg);
    --surface-raised: var(--erp-surface);
    --surface-hover: var(--erp-hover);
    --text-primary: var(--erp-text);
    --text-secondary: var(--erp-muted);
    --border-subtle: var(--erp-border);
    --border-control: var(--erp-control-border);
    --focus-ring: var(--erp-focus);
    --help-bg: var(--erp-bg);
    --help-card: var(--erp-surface);
    --help-text: var(--erp-text);
    --help-muted: var(--erp-muted);
    --help-border: var(--erp-border);
    --help-soft: var(--erp-surface-alt);
    --help-gold: var(--erp-accent-ink);
}

html:lang(ar) body.erp-modern.erp-app.erp-stitch {
    font-family: var(--erp-font-ar);
    line-height: 1.6;
    letter-spacing: normal;
}
body.erp-modern.erp-app.erp-stitch :is(button, input, select, textarea, table, h1, h2, h3, h4, h5, h6, .erp-global-search kbd) {
    font-family: inherit;
}
body.erp-modern.erp-app.erp-stitch :is(table, input[type="number"], input[inputmode="decimal"], .erp-numeric, .numeric, .rpt-number, .bi-kpi, .cw-kpi, .hr-metric, .ops-kpi, .business-dashboard__metric, .help-stats, .erp-table-count) {
    font-variant-numeric: tabular-nums lining-nums;
}
body.erp-modern.erp-app.erp-stitch :is(bdi, [dir="ltr"]) { unicode-bidi: isolate; }
body.erp-modern.erp-app.erp-stitch ::selection { color: var(--erp-text); background: var(--erp-primary-soft); }
body.erp-modern.erp-app.erp-stitch :is(input, textarea) { caret-color: var(--erp-primary); }
body.erp-modern.erp-app.erp-stitch :is(a, button, summary, input, select, textarea):focus-visible {
    outline: 2px solid var(--erp-focus);
    outline-offset: 3px;
}

/* Keep the existing searchable navigation, compact rail and focus-managed mobile drawer. */
body.erp-authenticated.erp-modern.erp-app.erp-stitch .erp-sidebar { background: var(--shell-navy); border-color: var(--shell-line); }
body.erp-authenticated.erp-modern.erp-app.erp-stitch .erp-navigation :is(a, summary, .erp-group-heading) {
    font-size: .875rem;
    font-weight: 500;
    border-radius: .5rem;
}
body.erp-authenticated.erp-modern.erp-app.erp-stitch .erp-navigation a[aria-current="page"] {
    color: var(--erp-primary);
    background: var(--erp-primary-soft);
    border-color: transparent;
    font-weight: 600;
}
body.erp-authenticated.erp-modern.erp-app.erp-stitch .erp-navigation a[aria-current="page"] img { filter: var(--erp-icon-filter, none); }
body.erp-authenticated.erp-modern.erp-app.erp-stitch .erp-sidebar :is(input, .erp-sidebar-collapse, .erp-sidebar-close, .erp-menu-filter-open) {
    border-color: var(--shell-line);
    background: var(--shell-hover);
    color: var(--shell-ink);
}
body.erp-authenticated.erp-modern.erp-app.erp-stitch .erp-sidebar :is(a, button, summary, input):focus-visible { outline-color: var(--shell-gold); }
body.erp-authenticated.erp-modern.erp-app.erp-stitch .erp-workbench-topbar .header-content {
    min-block-size: 4rem;
    column-gap: 1rem;
}
body.erp-authenticated.erp-modern.erp-app.erp-stitch .erp-workbench-topbar {
    background: var(--erp-surface);
    border-color: var(--erp-border);
    box-shadow: none;
}
body.erp-authenticated.erp-modern.erp-app.erp-stitch .erp-global-search input { border-color: var(--erp-border); background: var(--erp-surface-alt); }
body.erp-authenticated.erp-modern.erp-app.erp-stitch .erp-company-context { font-weight: 500; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch .erp-workbench-topbar .account-menu-trigger { min-inline-size: max-content; }
@media (min-width: 1024px) {
    body.erp-authenticated.erp-modern.erp-app.erp-stitch .erp-workbench-topbar .erp-header-controls { min-inline-size: max-content; }
}

/* A shared fixed type scale keeps reports stable at different viewport widths. */
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content { font-size: .9375rem; padding-inline: var(--workbench-gutter); }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content h1 { font-size: 1.75rem; font-weight: 600; line-height: 1.35; letter-spacing: -.02em; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content h2 { font-size: 1.125rem; font-weight: 600; line-height: 1.5; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(h3, h4) { font-size: 1rem; font-weight: 600; line-height: 1.5; }
html:lang(ar) body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(h1, h2, h3, h4) { letter-spacing: normal; line-height: 1.6; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.intro, .field-help, .form-text, .erp-table-context, .erp-table-scope) { color: var(--erp-muted); font-size: .875rem; }

/* Existing module panels receive the same restrained surface and section radius. */
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.card, .panel, .aoe-card, .erp-customer-panel, .erp-directory-panel, .erp-overview-panel, .erp-app-panel, .erp-record-panel, .erp-detail-panel, .erp-entry-card, .erp-entry-section, .cw-panel, .cw-form-card, .cw-record-card, .cw-filter-panel, .sw-panel, .hr-panel, .ops-task, .ops-guidance, .insights-panel, .bi-card, .bi-panel, .finance-work-area, .finance-setup, .fin-invoice-panel, .admin-access__panel, .business-dashboard__module-card) {
    background-color: var(--erp-surface);
    border-color: var(--erp-border);
    border-radius: var(--erp-radius-card);
    box-shadow: none;
}
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.cw-hero, .sw-hero, .hr-hero, .ops-hero, .erp-customer-hero) {
    background: var(--erp-surface);
    color: var(--erp-text);
    border: 1px solid var(--erp-border);
    border-radius: var(--erp-radius-card);
    box-shadow: none;
}
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.bi-kpi, .cw-kpi, .sw-kpi, .hr-metric, .ops-kpi, .insights-kpi, .business-dashboard__metric, .admin-access__metric) {
    background: var(--erp-surface);
    color: var(--erp-text);
    border: 1px solid var(--erp-border);
    border-radius: var(--erp-radius-card);
    box-shadow: none;
}
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.bi-kpi, .cw-kpi, .sw-kpi, .hr-metric, .ops-kpi, .insights-kpi, .business-dashboard__metric, .admin-access__metric) > strong {
    color: var(--erp-text);
    font-size: 1.875rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: normal;
}
/* BI domain reports and personal dashboards use the same foundations. */
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.erp-bi-kpi, .erp-bi-attention, .erp-bi-family, .erp-bi-tool-group, .daily-card, .daily-metric, .daily-actions) {
    background: var(--erp-surface);
    color: var(--erp-text);
    border-color: var(--erp-border);
    border-radius: var(--erp-radius-card);
    box-shadow: none;
}
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .erp-bi-workspace :is(.erp-bi-filters, .erp-bi-library-search) { border-radius: var(--erp-radius-card); }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.erp-bi-kpi-value bdi, .daily-metric-value) {
    font-size: 1.875rem;
    font-weight: 600;
    line-height: 1.35;
    font-variant-numeric: tabular-nums lining-nums;
}

/* Use native inputs and actions, including validation, required labels and disabled states. */
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), select, textarea) {
    min-block-size: 2.75rem;
    border-radius: var(--erp-radius-control);
    background-color: var(--erp-surface);
    color: var(--erp-text);
    font-size: 1rem;
    line-height: 1.5;
}
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(input, textarea)::placeholder { color: var(--erp-muted); opacity: 1; }
/* Match the legacy form scope so its font shorthand cannot shrink entry text. */
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content form :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="image"]), select, textarea) { font-size: 1rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(input, select, textarea)[aria-invalid="true"] { border-color: var(--erp-danger); }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(input, select, textarea):disabled { color: var(--erp-muted); background: var(--erp-surface-alt); }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(label, legend) { font-weight: 500; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.button, .btn, .erp-button, .aoe-button, .erp-table-button, .report-export-toolbar__button, .admin-access__button) {
    min-block-size: 2.75rem;
    border-radius: var(--erp-radius-control);
    font-size: .875rem;
    font-weight: 500;
    box-shadow: none;
}
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.button, .btn, .erp-button, .aoe-button):not(:is(.button-secondary, .btn-secondary, .btn-outline-primary, .button-danger, .btn-danger, .admin-access__button--danger)) {
    background: var(--erp-primary);
    color: var(--erp-on-primary);
    border-color: var(--erp-primary);
}
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.button, .btn, .erp-button, .aoe-button):not(:is(.button-secondary, .btn-secondary, .btn-outline-primary, .button-danger, .btn-danger, .admin-access__button--danger)):hover:not(:disabled):not([aria-disabled="true"]) { background: var(--erp-primary-hover); }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.button-secondary, .btn-secondary, .btn-outline-primary, .erp-table-button) { background: var(--erp-surface); color: var(--erp-text); border-color: var(--erp-control-border); }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.button-secondary, .btn-secondary, .btn-outline-primary, .erp-table-button):hover:not(:disabled):not([aria-disabled="true"]) { background: var(--erp-surface-hover); }

/* Keep the shared table toolbars, sticky headers, original alignment and exact source values. */
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content table { font-size: .875rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content table :is(th, td) { padding: .75rem .875rem; border-color: var(--erp-border); line-height: 1.5; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content table thead th { background: var(--erp-surface-alt); color: var(--erp-muted); font-weight: 600; font-size: .8125rem; letter-spacing: normal; text-transform: none; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content table tbody tr { block-size: 3rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content table tbody td { font-weight: 400; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content table tbody td:has(> a) { padding-block: .125rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content table tbody tr:hover > :is(th, td) { background-color: var(--erp-surface-hover); }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content table.erp-table-compact tbody tr { block-size: 2.5rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .erp-table-tools-shell table.erp-table-compact :is(th, td) { padding-block: .5rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .erp-table-toolbar { gap: .5rem; margin-block-end: .75rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .erp-table-toolbar .erp-table-actions > .erp-pagination-size {
    display: inline-flex;
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    gap: .5rem;
    inline-size: auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .erp-table-toolbar .erp-table-actions > .erp-pagination-size > select {
    flex: 0 0 auto;
    inline-size: 4.5rem;
    block-size: 2.75rem;
    min-block-size: 2.75rem;
    margin: 0;
    padding: .375rem .5rem;
}
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.erp-table-tools-shell, .erp-customer-table-wrap, .erp-directory-table-wrap, .erp-table-scroll, .erp-table-wrap, .table-responsive, .table-scroll, .rw-table-wrap) table :is(th, td):is(.text-right, .text-end, .finance-exact, .fin-invoice-amount, .numeric, .erp-number, .erp-numeric, .bi-number, .cw-number, .sw-number, .erp-record-amount, .finance-report-number, .rpt-number, [data-finance-decimal], [data-finance-decimal-source], [data-erp-cell-kind="number"]) { font-variant-numeric: tabular-nums lining-nums; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.erp-table-scroll, .table-scroll, .table-responsive, .erp-directory-table-wrap, .erp-customer-table-wrap, .ops-table-scroll, .cw-table-scroll) {
    max-inline-size: 100%;
    min-inline-size: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--erp-control-border) var(--erp-surface-alt);
}
body.erp-authenticated.erp-modern.erp-app.erp-stitch :is(dialog, .report-export-panel, .report-export-dialog, .erp-wizard-dialog, .erp-record-selector-dialog) {
    color: var(--erp-text);
    background-color: var(--erp-surface);
    border-color: var(--erp-border);
    border-radius: .75rem;
}

/* Task-oriented screen layouts. Keep density in the information, not in touch targets. */
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.management-overview, .erp-bi-workspace, .sw-dashboard, .daily-dashboard, .finance-section-workspace) { gap: 1rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.management-overview__heading, .erp-bi-heading, .finance-page-heading, .sw-hero) { margin-block: 0 1rem; padding: 0; border: 0; background: transparent; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.management-overview__filters, .erp-bi-filters, .sw-period-panel, .finance-workspace-controls) { margin-block: .75rem; padding: .875rem; border: 1px solid var(--erp-border); border-radius: .5rem; background: var(--erp-surface); }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.bi-card, .bi-panel, .sw-panel, .erp-bi-panel, .daily-card) { min-block-size: 0; padding: 1rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.bi-grid, .erp-bi-chart-grid, .sw-analysis-grid, .sw-queue-grid) { gap: 1rem; align-items: start; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.bi-section-heading, .sw-section-heading, .erp-bi-section-heading) { margin-block: .75rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.bi-card__heading, .sw-panel-heading, .erp-bi-panel-heading) { min-block-size: 0; margin-block-end: .75rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.bi-empty, .erp-bi-empty, .sw-empty, .daily-empty) { min-block-size: 0; padding: .625rem .75rem; margin-block: .5rem; font-size: .875rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.bi-chart--zero, .bi-chart--unknown, .bi-chart--empty-source) { min-block-size: 0; block-size: auto; align-self: start; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.bi-chart--zero, .bi-chart--unknown, .bi-chart--empty-source) .bi-chart__visual { min-block-size: 0; block-size: auto; margin: 0; padding: 0; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.bi-chart--zero, .bi-chart--unknown) .bi-chart__presentation { display: block; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .bi-chart__empty { padding: .375rem 0; font-size: .875rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .bi-chart--zero [data-bi-empty-help] { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .bi-chart--zero .bi-chart__unit { display: none; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .bi-chart--embedded { padding: 0; margin-block: .5rem; border: 0; background: transparent; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .bi-chart__accessible-title { position: absolute; inline-size: 1px; block-size: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .bi-chart__data { margin-block-start: .5rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .bi-chart__data > summary { min-block-size: 2.75rem; display: flex; align-items: center; }
/* Native [hidden] must survive module-level display/grid declarations. */
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content [hidden] { display: none !important; }

.workbench-ledger { overflow: auto; max-inline-size: 100%; border: 1px solid var(--erp-border); border-radius: .5rem; background: var(--erp-surface); }
.workbench-status-table { inline-size: 100%; border-collapse: collapse; margin: 0; }
.workbench-status-table a { display: inline-flex; min-block-size: 2.75rem; align-items: center; gap: .5rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .management-overview__priorities { padding: .75rem 0; margin: 0; border: 0; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .management-overview__financial-strip { padding: .875rem 1rem; margin-block: .75rem; border: 1px solid var(--erp-border); border-radius: .5rem; background: var(--erp-surface); }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .management-overview__financial-strip > h2 { margin: 0; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .management-overview__areas { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,14rem),1fr)); gap: 0 1rem; margin-block: 1rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .management-overview__areas > a { min-block-size: 2.75rem; padding: .5rem 0; border: 0; border-block-end: 1px solid var(--erp-border); border-radius: 0; }

/* Domain dashboards use compact, comparable metric rows; values retain their basis and source. */
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .workbench-metric-ledger { display: grid; grid-template-columns: 1fr; gap: 0; margin-block: .75rem; border: 1px solid var(--erp-border); border-radius: .5rem; overflow: hidden; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .workbench-metric-ledger > .erp-bi-kpi { display: grid; grid-template-columns: minmax(10rem,2fr) minmax(5rem,.7fr) minmax(6rem,1fr) minmax(10rem,2fr) auto; align-items: center; gap: .375rem 1rem; border: 0; border-block-end: 1px solid var(--erp-border); border-radius: 0; padding: .75rem 1rem; min-block-size: 0; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .workbench-metric-ledger > .erp-bi-kpi:last-child { border-block-end: 0; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .workbench-metric-ledger .erp-bi-kpi-value bdi { font-size: 1.25rem; }
.workbench-metric-ledger .erp-bi-domain { grid-column: 1 / -1; font-size: .75rem; }
.workbench-metric-ledger .erp-bi-kpi-label { font-weight: 600; }
.workbench-metric-ledger .erp-bi-comparison { grid-column: 2 / -1; }
.workbench-metric-ledger .erp-bi-source-link { min-block-size: 2.75rem; display: inline-flex; align-items: center; }
.erp-analysis-disclosure { border-block: 1px solid var(--erp-border); margin-block: .75rem; padding: 0; }
.erp-analysis-disclosure > summary { min-block-size: 2.75rem; padding: .625rem 0; cursor: pointer; font-weight: 600; }
.erp-analysis-disclosure > summary > span { margin-inline-start: .5rem; font-weight: 400; color: var(--erp-muted); }
.erp-analysis-disclosure > .erp-bi-chart-grid { padding-block: .75rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .erp-bi-attention { padding: .75rem 0; margin-block: .5rem; border: 0; background: transparent; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .erp-bi-attention > ul > li { min-block-size: 0; padding: .75rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .workbench-report-directory { display: grid; grid-template-columns: 1fr; gap: 0; border: 1px solid var(--erp-border); border-radius: .5rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .workbench-report-directory > article { display: grid; grid-template-columns: minmax(8rem,1fr) minmax(12rem,2fr) minmax(12rem,3fr); align-items: start; gap: .5rem 1rem; padding: .75rem 1rem; border: 0; border-block-end: 1px solid var(--erp-border); border-radius: 0; }
.workbench-report-directory h3, .workbench-report-directory p { margin: 0; }
.workbench-report-directory h3 a { display: inline-flex; min-block-size: 2.75rem; align-items: center; }

/* Table controls have intrinsic widths and can wrap independently of the data region. */
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .erp-table-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .75rem; margin: 0; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .erp-table-actions { display: flex; flex: 1 1 auto; flex-wrap: wrap; justify-content: end; align-items: center; gap: .5rem; min-inline-size: 0; max-inline-size: 100%; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .erp-table-actions > * { position: relative; flex: 0 0 auto; margin: 0; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .erp-table-actions > .erp-table-page-size { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: .5rem; inline-size: max-content; min-inline-size: max-content; max-inline-size: 100%; padding: 0; border: 0; background: transparent; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .erp-table-toolbar .erp-table-actions .erp-table-page-size :is(label,span:not(.sr-only)) { flex: 0 0 auto; position: static; display: inline; inline-size: auto; min-inline-size: 0; margin: 0; padding: 0; white-space: nowrap; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .erp-table-toolbar .erp-table-actions .erp-table-page-size > select { box-sizing: border-box; flex: 0 0 5rem; inline-size: 5rem; min-inline-size: 5rem; max-inline-size: 5rem; padding: .375rem .75rem; margin: 0; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .erp-table-actions :is(.erp-table-button,summary) { white-space: nowrap; min-inline-size: max-content; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .erp-table-tools-shell { border-radius: .5rem; box-shadow: none; }

/* Finance destinations are grouped by actual task kind, with original menu provenance retained. */
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.finance-filter-panel,.finance-results-panel) { padding: .875rem 1rem; margin-block: .75rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .finance-filter-panel > h2 { padding: 0 0 .5rem; margin: 0; min-block-size: 0; font-size: 1rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .finance-filter-panel .finance-report-filters { display: flex; flex-wrap: wrap; align-items: end; padding: 0 !important; margin-block: .75rem 0; gap: .75rem 1rem; border: 0; background: transparent; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .finance-filter-panel .finance-report-filters > .finance-filter-grid { flex: 1 0 100%; inline-size: 100%; gap: .75rem 1rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .finance-filter-panel .finance-report-filters > .finance-display-options { flex: 1 1 auto; padding: 0; border: 0; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .finance-filter-panel .finance-report-filters > .finance-display-options[open] { flex-basis: 100%; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .finance-filter-panel .finance-report-filters > .finance-filter-actions { flex: 0 0 auto; margin: 0; padding: 0; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .finance-results-heading { min-block-size: 0; padding: 0; margin-block: 0 .5rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .finance-results-heading > h2 { margin: 0; padding: 0; }
@media(max-width:639px) {
    body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .finance-filter-panel .finance-report-filters { flex-direction: column; align-items: stretch; }
    body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .finance-filter-panel .finance-report-filters > .finance-filter-actions { flex-wrap: wrap; }
}
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .finance-workspace-controls { display: flex; flex-wrap: wrap; align-items: end; gap: .5rem 1rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .finance-workspace-controls .finance-directory-search { flex: 1 1 24rem; margin: 0; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .finance-workspace-controls .finance-directory-search > .form-field { flex: 1; min-inline-size: 0; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .finance-task-areas { display: flex; flex-wrap: wrap; gap: .25rem; margin: 0; border: 0; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .finance-task-areas button { min-block-size: 2.75rem; padding: .5rem .75rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .workbench-task-directory { display: grid; grid-template-columns: 1fr; gap: .75rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .finance-captured-menu { padding: 0; margin: 0; min-block-size: 0; }
.workbench-directory-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .625rem 0; border-block-end: 1px solid var(--erp-border); }
.workbench-directory-heading > :is(h2,span) { margin: 0; }
.workbench-directory-heading > span, .workbench-source-menu { font-size: .75rem; color: var(--erp-muted); }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .finance-tool-row { display: flex; justify-content: space-between; align-items: center; gap: .5rem 1rem; padding: .5rem .75rem; min-block-size: 3rem; }
.workbench-tool-identity { min-inline-size: 0; display: grid; gap: .125rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .finance-tool-row .finance-directory-link { padding: 0; }
.workbench-tool-identity > a { min-block-size: 2.75rem; display: inline-flex; align-items: center; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .finance-native-workflows { margin-block: 1rem; padding-block: .5rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.sw-facts, .insights-period-metrics, .insights-management-kpis) { gap: 0; margin-block: .75rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.sw-facts, .insights-period-metrics, .insights-management-kpis) > div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem .75rem; padding: .625rem .75rem; min-block-size: 0; border: 0; border-block-end: 1px solid var(--erp-border); border-radius: 0; background: transparent; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.sw-facts, .insights-period-metrics, .insights-management-kpis) dd { font-size: 1.125rem; margin: 0; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .sw-queue-grid { margin-block-start: .5rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .sw-queue-panel[data-queue-populated="false"] { padding: .75rem; }
@media(max-width:1100px) {
    body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .workbench-metric-ledger > .erp-bi-kpi { grid-template-columns: minmax(0,2fr) minmax(4rem,1fr) minmax(0,1fr); }
    .workbench-metric-ledger .erp-bi-basis { grid-column: 1 / 3; }
    body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .workbench-report-directory > article { grid-template-columns: minmax(6rem,1fr) minmax(0,3fr); }
    .workbench-report-directory p { grid-column: 2; }
}
@media(max-width:639px) {
    body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .erp-table-actions { justify-content: start; flex-basis: 100%; }
    body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .workbench-metric-ledger > .erp-bi-kpi { grid-template-columns: minmax(0,1fr) auto; }
    .workbench-metric-ledger :is(.erp-bi-basis,.erp-bi-comparison) { grid-column: 1 / -1; }
    body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .workbench-report-directory > article { display: block; }
    body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .finance-tool-row { flex-wrap: wrap; }
    .workbench-tool-identity { flex-basis: 100%; }
    body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.sw-facts,.insights-period-metrics,.insights-management-kpis) { grid-template-columns: 1fr; }
}

/* Shared directories keep every authorized report visible as a scannable destination. */
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .sw-kpis { display: grid; grid-template-columns: 1fr; gap: 0; border: 1px solid var(--erp-border); border-radius: .5rem; overflow: hidden; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .sw-kpis > .sw-kpi { display: grid; grid-template-columns: minmax(12rem,2fr) minmax(3rem,.4fr) minmax(10rem,2fr) auto; gap: .5rem 1rem; align-items: center; min-block-size: 0; padding: .75rem 1rem; border: 0; border-block-end: 1px solid var(--erp-border); border-radius: 0; box-shadow: none; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .sw-kpis > .sw-kpi :is(h3,p,strong) { margin: 0; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .sw-kpis > .sw-kpi strong { font-size: 1.25rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.workbench-function-list .erp-workspace-entry-grid, .workbench-task-list .ops-task-grid) { display: grid; grid-template-columns: 1fr; gap: 0; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .workbench-function-list .erp-workspace-entry-card { display: grid; grid-template-columns: 1.375rem minmax(0,1fr) auto; align-items: center; gap: .75rem; min-block-size: 3rem; padding: .5rem .75rem; border: 0; border-block-end: 1px solid var(--erp-border); border-radius: 0; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .workbench-task-list .ops-task-card { display: grid; grid-template-columns: minmax(10rem,1fr) minmax(0,2fr); gap: .375rem 1rem; padding: .75rem; border: 0; border-block-end: 1px solid var(--erp-border); border-radius: 0; min-block-size: 0; }
.workbench-task-list .ops-task-related { grid-column: 2; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.hr-metrics, .daily-metrics, .cw-kpis) { display: grid; grid-template-columns: 1fr; gap: 0; border: 1px solid var(--erp-border); border-radius: .5rem; overflow: hidden; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.hr-dashboard-kpi, .daily-metric, .cw-kpi) { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: .75rem 1rem; min-block-size: 0; border: 0; border-block-end: 1px solid var(--erp-border); border-radius: 0; box-shadow: none; background: var(--erp-surface); }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.hr-dashboard-kpi, .daily-metric, .cw-kpi) :is(strong,dd,.daily-metric-value) { margin: 0; font-size: 1.25rem; line-height: 1.5; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .hr-dashboard-kpi > img { grid-column: 1; grid-row: 1; inline-size: 1.5rem; block-size: 1.5rem; box-sizing: border-box; padding: 0; border: 0; border-radius: 0; background: transparent; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .hr-dashboard-kpi > span { flex: 1; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .hr-dashboard-kpi { display: grid; grid-template-columns: 1.5rem minmax(10rem,2fr) 4rem minmax(10rem,3fr) auto; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .hr-dashboard-kpi > strong { text-align: end; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .cw-kpi { display: grid; grid-template-columns: minmax(10rem,2fr) minmax(4rem,1fr) minmax(10rem,2fr) auto; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .daily-metric { display: grid; grid-template-columns: minmax(0,1fr) auto; }
@media(max-width:1100px) {
    body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .hr-dashboard-kpi { grid-template-columns: 1.5rem minmax(0,1fr) auto; }
    body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .hr-dashboard-kpi > small { grid-column: 2 / -1; }
    body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .hr-dashboard-kpi > a { grid-column: 2 / -1; }
    body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .cw-kpi { grid-template-columns: minmax(0,1fr) auto; }
}
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.cw-panel,.hr-panel,.ops-task-area) { padding: 1rem; min-block-size: 0; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .cw-queue-grid { grid-template-columns: 1fr; gap: .5rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .cw-queue-grid > .erp-analysis-disclosure { margin: 0; }
@media(max-width:639px) {
    body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .sw-kpis > .sw-kpi { grid-template-columns: minmax(0,1fr) auto; }
    body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .sw-kpis > .sw-kpi p { grid-column: 1 / -1; }
    body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .workbench-task-list .ops-task-card { grid-template-columns: 1fr; }
    .workbench-task-list .ops-task-related { grid-column: 1; }
    body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .workbench-function-list .erp-workspace-entry-card { grid-template-columns: 1.375rem minmax(0,1fr); }
    .workbench-function-list .erp-workspace-entry-card > span { grid-column: 2; }
}

/* Stable dashboard anatomy: optional context never moves values or actions into another column. */
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .cw-kpi { grid-template-columns: minmax(0, 2fr) minmax(4rem, .65fr) minmax(0, 2fr) minmax(9rem, 1.4fr); text-align: start; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .cw-kpi > :first-child { grid-column: 1; font-weight: 600; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .cw-kpi > strong { grid-column: 2; grid-row: 1; text-align: end; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .cw-kpi > span:not(:first-child) { grid-column: 3; grid-row: 1; padding-inline-start: 1rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .cw-kpi > a { grid-column: 4; grid-row: 1; display: inline-flex; align-items: center; justify-content: start; min-block-size: 2.75rem; padding: .375rem .5rem; margin: 0; border: 0; border-radius: .375rem; text-align: start; color: var(--erp-link); }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .cw-kpi > a:hover { background: var(--erp-surface-hover); text-decoration: underline; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .cw-kpi:last-child { border-block-end: 0; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .management-overview__areas { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: .5rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .management-overview__areas > a { display: flex; justify-content: start; align-items: center; gap: .625rem; padding: .625rem .75rem; border: 1px solid var(--erp-border); border-radius: .5rem; background: var(--erp-surface); text-align: start; text-decoration: none; }
.management-overview__areas .workbench-area-label { flex: 1; min-inline-size: 0; }
.management-overview__areas .workbench-area-arrow { flex: 0 0 auto; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .management-overview__areas > a:hover { background: var(--erp-surface-hover); border-color: var(--erp-control-border); }

/* Actions keep their label/icon together; hover and disabled states remain legible in either theme. */
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.button, .btn, .erp-button, .aoe-button, .erp-table-button) { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; line-height: 1.4; text-align: center; text-decoration: none; white-space: normal; overflow-wrap: anywhere; vertical-align: middle; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.button, .btn, .erp-button, .aoe-button) > :is(img, svg) { flex-shrink: 0; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.button, .btn, .erp-table-button):is(:disabled, [aria-disabled="true"]) { opacity: .6; cursor: not-allowed; box-shadow: none; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.button, .btn):not(:is(.button-secondary, .btn-secondary, .btn-outline-primary, .button-danger, .btn-danger, .admin-access__button--danger)):active:not(:disabled):not([aria-disabled="true"]) { background: var(--erp-primary-pressed); }

/* CRM and field work share a readable card anatomy, with a consistent next action at the end. */
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.crm-lead-card, .engineer-visit-card) { display: flex; flex-direction: column; gap: .5rem; padding: .875rem; border-radius: .5rem; min-inline-size: 0; box-shadow: none; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.crm-lead-card, .engineer-visit-card) > :is(p, h3, dl) { margin: 0; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.crm-card-action, .engineer-card-action) { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-block-size: 2.75rem; margin-block-start: auto; padding: .5rem .625rem; border: 1px solid var(--erp-border); border-radius: .375rem; color: var(--erp-link); background: var(--erp-surface); text-decoration: none; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.crm-card-action, .engineer-card-action, .crm-view-tabs a, .crm-view-switch a):hover { background: var(--erp-surface-hover); color: var(--erp-link); }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.crm-lead-card dl > div, .engineer-card-facts > div) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: .5rem; align-items: baseline; padding-block: .25rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.crm-lead-card dd, .engineer-fact-value) { margin: 0; text-align: start; overflow-wrap: anywhere; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .crm-workbench .erp-customer-heading { padding: 1rem; border-block-start-width: 1px; border-radius: .5rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .crm-workbench .erp-customer-heading :is(h1, .intro) { margin-block: .25rem; }
@media (max-width: 1100px) {
    body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .cw-kpi { grid-template-columns: minmax(0, 1fr) auto; }
    body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .cw-kpi > span:not(:first-child) { grid-column: 1; grid-row: 2; padding: 0; }
    body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .cw-kpi > a { grid-column: 1 / -1; grid-row: 3; justify-self: start; }
}

/* Keep the customer heading and shortcuts above the work without nested card padding. */
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .cw-dashboard-header { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .cw-dashboard-header .cw-hero { margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; gap: .5rem 1rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .cw-dashboard-header .cw-asof { margin: 0; padding: 0; border: 0; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .cw-dashboard-nav { margin-block: .75rem 0; padding: 0; border: 0; gap: .5rem; }

/* Personal and workforce summaries stay compact, with aligned values and explicit next actions. */
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.hr-metrics, .daily-metrics) { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .75rem; border: 0; border-radius: 0; overflow: visible; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .hr-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) {
    body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .hr-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
    body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .hr-metrics { grid-template-columns: minmax(0, 1fr); }
}
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .hr-dashboard-kpi { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); grid-template-rows: auto auto 1fr auto; gap: .5rem; padding: 1rem; border: 1px solid var(--erp-border); border-radius: .5rem; align-items: start; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .hr-dashboard-kpi > span { grid-column: 2; grid-row: 1; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .hr-dashboard-kpi > strong { grid-column: 1 / -1; grid-row: 2; font-size: 1.75rem; text-align: start; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .hr-dashboard-kpi > small { grid-column: 1 / -1; grid-row: 3; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .hr-dashboard-kpi > a { grid-column: 1 / -1; grid-row: 4; display: flex; align-items: center; justify-content: space-between; min-block-size: 2.75rem; margin: 0; padding-block-start: .5rem; border-block-start: 1px solid var(--erp-border); }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .daily-metric { display: grid; grid-template-columns: minmax(0,1fr); align-content: start; gap: .5rem; padding: 1rem; border: 1px solid var(--erp-border); border-radius: .5rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .daily-metric dt { min-block-size: 0; font-size: .875rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .daily-metric .daily-metric-value { font-size: 1.75rem; }

/* Guided entry uses one content surface and stable controls while the owner retains validation. */
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .erp-wizard-dialog :is(.sales-crm-step, .cw-form-section, .ops-wizard-step) { padding: .75rem 0 0; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .erp-wizard-dialog :is(.cw-form-section-heading, .sales-crm-section-heading) { padding: 0 0 .5rem; margin-block: 0 .75rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .erp-wizard-dialog [data-wizard-progress] { margin-block: 0 .75rem; padding: 0; gap: .5rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .erp-wizard-dialog [data-wizard-progress] li { padding: .5rem .75rem; min-block-size: 2.75rem; border-radius: .375rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is([data-wizard-progress], .ops-wizard-steps) .wizard-step-link { display: block; inline-size: 100%; min-block-size: 2.75rem; padding: .375rem .5rem; border: 1px solid transparent; border-radius: .25rem; background: transparent; color: inherit; font: inherit; text-align: start; white-space: normal; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .wizard-step-link:not(:disabled):hover { background: var(--erp-hover); border-color: var(--erp-border); }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .wizard-step-link:focus-visible { outline: 2px solid var(--erp-primary); outline-offset: 2px; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .wizard-step-link:disabled { opacity: .65; cursor: default; }
body.erp-stitch #main-content .employee-entry-wizard { display: block; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .erp-wizard-dialog .employee-entry-wizard { padding: 0; border: 0; background: transparent; box-shadow: none; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .erp-wizard-dialog .employee-entry-wizard > .erp-entry-section { padding: .75rem 0 0; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
body.erp-stitch #main-content .employee-wizard-progress { display: flex; flex-wrap: wrap; list-style: none; gap: .5rem; padding: 0; margin-block: 0 1rem; }
body.erp-stitch #main-content .employee-wizard-progress li { flex: 1 1 9rem; min-inline-size: 0; border-block-end: 2px solid var(--erp-border); }
body.erp-stitch #main-content .employee-wizard-progress li[aria-current] { border-color: var(--erp-primary); font-weight: 600; }
body.erp-stitch #main-content .employee-entry-wizard .cw-wizard-review dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: .5rem 1rem; margin: 0; }
body.erp-stitch #main-content .employee-entry-wizard .cw-wizard-review :is(dt, dd) { margin: 0; min-inline-size: 0; overflow-wrap: anywhere; padding-block: .375rem; border-block-end: 1px solid var(--erp-border); }
body.erp-stitch #main-content .employee-entry-wizard .cw-wizard-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-block-start: 1rem; }
@media (max-width: 639px) { body.erp-stitch #main-content .employee-entry-wizard .cw-wizard-review dl { grid-template-columns: minmax(0, 1fr); } }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .erp-wizard-dialog :is(.cw-wizard-actions, .ops-wizard-controls, .partner-entry-wizard-controls, .partner-entry-review-actions) { position: sticky; inset-block-end: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .75rem 0; margin-block: .75rem 0; border-block-start: 1px solid var(--erp-border); background: var(--erp-surface); }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .erp-wizard-dialog .cw-wizard-actions > :first-child { margin-inline-end: auto; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .erp-wizard-dialog .partner-entry-review-actions > :is(.partner-entry-wizard-controls, .form-actions, .erp-customer-form-footer) { position: static; margin: 0; padding: 0; border: 0; display: contents; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .erp-wizard-dialog .partner-entry-review-actions [data-wizard-back] { margin-inline-end: auto; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .erp-wizard-dialog__body { scroll-padding-block-end: 6rem; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .partner-entry-wizard-review [data-wizard-review] dl { grid-template-columns: minmax(9rem, .7fr) minmax(0, 1.3fr); gap: 0; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .partner-entry-wizard-review [data-wizard-review] :is(dt, dd) { min-inline-size: 0; margin: 0; padding: .625rem; border-block-end: 1px solid var(--erp-border); overflow-wrap: anywhere; }
@media (max-width: 639px) {
    body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .erp-wizard-dialog .partner-entry-review-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .erp-wizard-dialog .partner-entry-review-actions :is(.button, [data-wizard-back]) { inline-size: 100%; margin: 0; }
    body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .erp-wizard-dialog .partner-entry-review-actions [data-wizard-final-submit] { grid-column: 1 / -1; }
    body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .partner-entry-wizard-review [data-wizard-review] dl { grid-template-columns: minmax(0, 1fr); }
    body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .partner-entry-wizard-review [data-wizard-review] dt { padding-block-end: .125rem; border-block-end: 0; }
    body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .partner-entry-wizard-review [data-wizard-review] dd { padding-block-start: .25rem; }
}
/* Help keeps its existing search/filter layout, card grid, contents, steps, FAQs and reading rhythm. */
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.help-hero, .help-article-header, .help-card, .help-section, .help-toc, .help-onboarding, .help-stats > div, .help-step) {
    background: var(--erp-surface);
    border-color: var(--erp-border);
    border-radius: var(--erp-radius-card);
    box-shadow: none;
}
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.help-article-body, .help-hero, .help-article-header) p { line-height: 1.8; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .help-article-body p { max-inline-size: 75ch; }
body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content .help-eyebrow { letter-spacing: normal; color: var(--erp-accent-ink); }

@media (max-width: 1023px) {
    body.erp-modern.erp-app.erp-stitch { --workbench-gutter: 1.25rem; }
}
@media (max-width: 639px) {
    body.erp-modern.erp-app.erp-stitch { --workbench-gutter: 1rem; --workbench-panel-gutter: 1rem; }
    body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content h1 { font-size: 1.5rem; }
    body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content table :is(th, td) { padding-inline: .75rem; }
    body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.erp-entry-actions, .erp-filter-actions, .form-actions) { flex-wrap: wrap; gap: .5rem; }
}
@media (forced-colors: active) {
    body.erp-modern.erp-app.erp-stitch { color: CanvasText; background: Canvas; --erp-focus: Highlight; }
    body.erp-authenticated.erp-modern.erp-app.erp-stitch .erp-sidebar,
    body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content :is(.button, .btn, .erp-table-button, input, select, textarea) { color: CanvasText; background: Canvas; border-color: ButtonText; }
    body.erp-authenticated.erp-modern.erp-app.erp-stitch .erp-navigation a[aria-current="page"] { color: HighlightText; background: Highlight; }
}
@media print {
    body.erp-modern.erp-app.erp-stitch,
    :is(html.dark, html[data-theme="dark"]) body.erp-modern.erp-app.erp-stitch,
    body.erp-modern.erp-app.erp-stitch:is(.dark, [data-theme="dark"]) {
        color-scheme: light;
        color: #182b3d;
        background: #ffffff;
        --erp-bg: #ffffff;
        --erp-surface: #ffffff;
        --erp-surface-alt: #edf2f5;
        --erp-text: #182b3d;
        --erp-muted: #536678;
        --erp-border: #d9e2e9;
        /* Print uses the established light ink pairs, including when dark mode is active. */
        --erp-primary: #086d6a;
        --erp-primary-hover: #075b58;
        --erp-primary-pressed: #064a48;
        --erp-on-primary: #ffffff;
        --erp-primary-soft: #ddf2ee;
        --erp-link: #086562;
        --erp-accent: #94701c;
        --erp-accent-ink: #806016;
        --erp-accent-soft: #faf2dc;
        --erp-success: #176b4c;
        --erp-success-surface: #e7f4ed;
        --erp-warning: #8b5b0d;
        --erp-warning-surface: #fff4db;
        --erp-danger: #ae303f;
        --erp-danger-surface: #fcecf0;
        --erp-info: #285ea4;
        --erp-info-surface: #eaf1fc;
        --erp-chart-1: #086d6a;
        --erp-chart-2: #285ea4;
        --erp-chart-3: #94701c;
        --erp-chart-4: #7955bb;
        --erp-chart-5: #a9522c;
        --erp-chart-6: #a23968;
    }
    body.erp-authenticated.erp-modern.erp-app.erp-stitch #main-content table thead th { color: #182b3d; }
}
