/*
 * eHQ Design System Integration for Office and Royalty Hub plugins
 *
 * This stylesheet overrides the default colours and surfaces used
 * by the e‑office‑financial and e‑royalty‑hub plugins so that they
 * inherit the dark design tokens from the eHQ theme. No changes
 * are made to plugin functionality or logic—only visual styling
 * adjustments are applied. You can safely include this file in
 * both the admin and frontend contexts.
 */

/*
 * Override Office plugin variables to match the eHQ theme tokens.
 * The admin stylesheet of the Office plugin defines `--eof-*`
 * variables on `:root`, which control backgrounds, surfaces,
 * typography and borders. Redefining them here forces the plugin
 * to adopt the dark palette without rewriting its core CSS.
 */
:root {
    --ehq-text: #ffffff;
    --ehq-text-muted: var(--ehq3-text-muted, #d5dbe7);
    --ehq-text-soft: var(--ehq3-text-dim, #a6afbf);
    --ehq-border: rgba(255,255,255,0.14);
    --ehq-border-strong: rgba(255,255,255,0.26);
    --ehq-table-bg: var(--ehq-ui-panel, #0b0e16);
    --ehq-table-head-bg: var(--ehq-ui-table-head, rgba(255,255,255,0.07));
    --ehq-table-row-bg: var(--ehq-ui-table-row, rgba(255,255,255,0.025));
    --ehq-table-hover-bg: var(--ehq-ui-table-hover, rgba(255,255,255,0.075));
    --ehq-table-text: var(--ehq-ui-text, #ffffff);
    --ehq-table-border: var(--ehq-ui-line, rgba(255,255,255,0.18));
    --ehq-button-bg: var(--ehq-ui-button-bg, rgba(255,255,255,0.07));
    --ehq-button-text: var(--ehq-ui-button-text, #ffffff);
    --ehq-button-primary-bg: var(--ehq-ui-primary-bg, #f2cf2f);
    --ehq-button-primary-text: var(--ehq-ui-primary-text, #05070d);

    /* Core colours */
    --eof-bg: var(--ehq-bg);
    --eof-surface: var(--ehq-surface);
    --eof-subtle: var(--ehq-surface-alt);
    --eof-text: var(--ehq-text);
    --eof-muted: var(--ehq-text-muted);
    --eof-border: var(--ehq-border);
    --eof-rule: var(--ehq-border);
    --eof-selected-bg: var(--ehq-primary-soft);
    --eof-nav-hover: rgba(255,255,255,0.05);
    --eof-nav-active-bg: rgba(255,255,255,0.1);
}

/* Neutral module primitives: plugins output these, theme owns their look. */
.ehq-module-canvas,
.erh-front-shell,
.erh-front-workspace,
.erh-render-context {
    font-family: var(--ehq3-font, var(--ehq-font-sans, inherit));
    color: var(--ehq-ui-text, var(--ehq-text));
}

.ehq-module-canvas h1,
.ehq-module-canvas h2,
.ehq-module-canvas h3,
.erh-render-context h1,
.erh-render-context h2,
.erh-render-context h3 {
    font-family: var(--ehq3-font-head, var(--ehq3-font, inherit));
    letter-spacing: 0;
}

.ehq-card,
.ehq-panel,
.ehq-metric-card,
.erh-panel,
.erh-card,
.erh-mini-card,
.erh-health-item,
.erh-kpi-card,
.erh-top-payees,
.erh-top-tracks,
.erh-top-stores {
    background: var(--ehq-ui-panel, var(--ehq-surface)) !important;
    border: 1px solid var(--ehq-ui-line, var(--ehq-border)) !important;
    border-radius: var(--ehq3-r-sm, 8px) !important;
    color: var(--ehq-ui-text, var(--ehq-text)) !important;
}

.ehq-link,
.erh-panel-heading a,
.erh-render-context a:not(.ehq-btn):not(.erh-action-row) {
    color: var(--ehq-ui-link, var(--ehq-primary)) !important;
}

.ehq-button,
.ehq-btn,
.erh-front-button,
.erh-render-context button,
.erh-render-context input[type="submit"] {
    border-color: var(--ehq-ui-line, var(--ehq-border)) !important;
    background: var(--ehq-button-bg) !important;
    color: var(--ehq-button-text) !important;
    font-family: var(--ehq3-font, inherit) !important;
}

.ehq-button.is-primary,
.ehq-btn-primary,
.erh-front-button.is-primary,
.erh-render-context button.button-primary,
.erh-render-context input[type="submit"].button-primary {
    border-color: var(--ehq-button-primary-bg) !important;
    background: var(--ehq-button-primary-bg) !important;
    color: var(--ehq-button-primary-text) !important;
}

/*
 * Override Royalty Hub containers to remove hard‑coded light backgrounds.
 * Many panels and sections in the plugin use inline or CSS backgrounds
 * like `#fff7e6`, `#f1f5fb` or `#ffffff`. These selectors ensure
 * the containers become transparent or use the theme surface colour.
 */
.erh-admin,
.erh-dashboard,
.erh-page,
.erh-render-context,
.ehq-v2 {
    background-color: transparent !important;
    color: var(--ehq-text);
}

/* Panels, cards and tables should use the theme surface and border */
.erh-panel,
.erh-card,
.erh-contracts-section,
.erh-table,
.erh-imports-table,
.erh-table-scroll,
.ehq-table-scroll,
.ehq-table-wrap,
.erh-section,
.erh-box,
.erh-kpi-card {
    background-color: var(--ehq-surface) !important;
    border-color: var(--ehq-border) !important;
    color: var(--ehq-text) !important;
}

/* Muted text inside panels */
.erh-panel .erh-muted,
.erh-card .erh-muted,
.erh-section .erh-muted,
.erh-contracts-section .erh-muted,
.erh-note,
.erh-page p,
.erh-render-context p,
.erh-render-context small,
.erh-render-context em,
.erh-kpi-card small,
.erh-kpi-card > div > span,
.erh-health-item small,
.erh-action-row span,
.erh-front-shell {
    color: var(--ehq-text-muted) !important;
}

.erh-panel h1,
.erh-panel h2,
.erh-panel h3,
.erh-card h1,
.erh-card h2,
.erh-card h3,
.erh-section h1,
.erh-section h2,
.erh-section h3,
.erh-kpi-card strong,
.erh-mini-card strong,
.erh-health-item strong,
.erh-action-row strong,
.erh-render-context b,
.erh-render-context strong {
    color: #ffffff !important;
}

/* Remove any remaining light backgrounds on alerts or notices */
.erh-notice,
.erh-alert,
.erh-warning {
    background-color: var(--ehq-surface-alt) !important;
    border-color: var(--ehq-border) !important;
    color: var(--ehq-text) !important;
}

/* Adjust Office KPI cards to dark */
.eof-kpi-card,
.eof-card {
    background-color: var(--ehq-surface) !important;
    border-color: var(--ehq-border) !important;
    color: var(--ehq-text) !important;
}

/* Ensure buttons from plugins have sufficient contrast */
.eof-btn,
.erh-button {
    color: var(--ehq-text);
}
.eof-btn.primary,
.erh-button.primary {
    background-color: var(--ehq-primary);
    border-color: var(--ehq-primary);
    color: #000;
}
.eof-btn.primary:hover,
.erh-button.primary:hover {
    background-color: var(--ehq-primary-hover);
    border-color: var(--ehq-primary-hover);
    color: #000;
}

/* Tables: header and cell backgrounds */
.erh-render-context table,
.erh-front-shell table,
.erh-front-workspace table,
.erh-panel table,
.erh-card table,
.erh-section table,
.ehq-table,
.erh-drawer-table,
.erh-top-tracks table {
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0;
    background-color: var(--ehq-table-bg) !important;
    border: 1px solid var(--ehq-table-border) !important;
    border-radius: 8px;
    overflow: hidden;
    color: #ffffff !important;
}

.erh-render-context table thead,
.erh-front-shell table thead,
.erh-front-workspace table thead,
.erh-panel table thead,
.erh-card table thead,
.erh-section table thead,
.ehq-table thead,
.erh-drawer-table thead,
.erh-top-tracks table thead {
    background-color: var(--ehq-table-head-bg) !important;
}

.erh-render-context table th,
.erh-front-shell table th,
.erh-front-workspace table th,
.erh-panel table th,
.erh-card table th,
.erh-section table th,
.erh-table th,
.erh-table td,
.ehq-table th,
.ehq-table td,
.erh-drawer-table th,
.erh-drawer-table td,
.erh-top-tracks table th,
.erh-top-tracks table td,
.eof-table th,
.eof-table td {
    border-color: var(--ehq-table-border) !important;
    color: var(--ehq-table-text) !important;
}

.erh-render-context table th,
.erh-front-shell table th,
.erh-front-workspace table th,
.erh-panel table th,
.erh-card table th,
.erh-section table th,
.erh-table th,
.ehq-table th,
.erh-drawer-table th,
.erh-top-tracks table th,
.eof-table th {
    background-color: var(--ehq-table-head-bg) !important;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.erh-render-context table td,
.erh-front-shell table td,
.erh-front-workspace table td,
.erh-panel table td,
.erh-card table td,
.erh-section table td,
.erh-table td,
.ehq-table td,
.erh-drawer-table td,
.erh-top-tracks table td,
.eof-table td {
    background-color: var(--ehq-table-row-bg) !important;
}

.erh-render-context table tr:hover td,
.erh-front-shell table tr:hover td,
.erh-front-workspace table tr:hover td,
.erh-panel table tr:hover td,
.erh-card table tr:hover td,
.erh-section table tr:hover td,
.ehq-table tr:hover td,
.erh-top-tracks table tr:hover td {
    background-color: var(--ehq-table-hover-bg) !important;
}

/* Forms and inputs within plugins */
.erh-form input,
.erh-form select,
.erh-form textarea,
.eof-form input,
.eof-form select,
.eof-form textarea {
    background-color: var(--ehq-surface-alt) !important;
    border-color: var(--ehq-border) !important;
    color: var(--ehq-text) !important;
}

/* Tabs or nav elements inside Royalty Hub */
.erh-tabs,
.erh-nav {
    background-color: var(--ehq-surface) !important;
    border-color: var(--ehq-border) !important;
    color: var(--ehq-text) !important;
}

/* Ensure progress bars and status pills follow theme colours */
.erh-progress-bar {
    background-color: var(--ehq-primary);
}
.erh-pill-success {
    background-color: var(--ehq-success);
    color: #000;
}
.erh-pill-warning {
    background-color: var(--ehq-warning);
    color: #000;
}
.erh-pill-danger {
    background-color: var(--ehq-danger);
    color: #fff;
}

/* Hide redundant WordPress admin `.wrap` styles inside plugin pages */
body .wrap > .erh-admin,
body .wrap > .erh-dashboard {
    margin-top: 0;
    padding-top: 0;
    max-width: 100%;
}

/* v3.0.9 — Shared module system.
   Plugins should output neutral structures; the theme owns the visual language.
   These primitives are intentionally generic and can be reused by dashboard,
   imports, mapping, catalogue, contracts, allocations and office pages. */
.ehq3 .ehq-module-canvas,
.ehq3 .erh-render-context,
.ehq3 .eof-app {
    --ehq-module-gap: var(--ehq3-s4, 16px);
    --ehq-module-pad: var(--ehq3-s5, 20px);
    --ehq-module-pad-sm: var(--ehq3-s4, 16px);
    --ehq-module-panel-bg: var(--ehq-ui-panel, var(--ehq3-card, #0b0e16));
    --ehq-module-panel-bg-2: var(--ehq-ui-panel-2, var(--ehq3-card-2, #0e1220));
    --ehq-module-line: var(--ehq-ui-line, var(--ehq3-line, rgba(255,255,255,0.12)));
    --ehq-module-line-strong: var(--ehq-ui-line-strong, var(--ehq3-line-strong, rgba(255,255,255,0.18)));
    --ehq-module-text: var(--ehq-ui-text, #fff);
    --ehq-module-muted: var(--ehq-ui-text-muted, var(--ehq3-text-muted, #d5dbe7));
    --ehq-module-radius: var(--ehq3-r-sm, 8px);
    background: transparent !important;
    color: var(--ehq-module-text) !important;
    font-family: var(--ehq3-font, "Open Sans", system-ui, sans-serif) !important;
    letter-spacing: 0 !important;
    min-width: 0 !important;
}

.ehq3 .ehq-module-stack {
    display: grid !important;
    gap: var(--ehq-module-gap) !important;
    min-width: 0 !important;
}

.ehq3 .ehq-module-toolbar,
.ehq3 .erh-actionbar,
.ehq3 .erh-toolbar,
.ehq3 .erh-filter-toolbar {
    align-items: center !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: var(--ehq3-s2, 8px) !important;
    min-width: 0 !important;
}

.ehq3 .ehq-panel,
.ehq3 .ehq-card,
.ehq3 .ehq-metric-card,
.ehq3 .erh-panel,
.ehq3 .erh-card,
.ehq3 .erh-section,
.ehq3 .erh-box,
.ehq3 .erh-health-item,
.ehq3 .eof-card,
.ehq3 .eof-panel {
    background: var(--ehq-module-panel-bg) !important;
    border: 1px solid var(--ehq-module-line) !important;
    border-radius: var(--ehq-module-radius) !important;
    box-shadow: none !important;
    color: var(--ehq-module-text) !important;
    min-width: 0 !important;
}

.ehq3 .ehq-panel,
.ehq3 .erh-panel,
.ehq3 .eof-panel {
    padding: var(--ehq-module-pad-sm) !important;
}

.ehq3 .ehq-card,
.ehq3 .erh-card,
.ehq3 .eof-card {
    padding: var(--ehq-module-pad-sm) !important;
}

.ehq3 .ehq-panel-heading,
.ehq3 .erh-panel-heading,
.ehq3 .eof-card-header {
    align-items: center !important;
    display: flex !important;
    gap: var(--ehq3-s3, 12px) !important;
    justify-content: space-between !important;
    min-width: 0 !important;
}

.ehq3 .ehq-panel-title,
.ehq3 .erh-panel-title {
    align-items: center !important;
    display: flex !important;
    gap: var(--ehq3-s2, 8px) !important;
    min-width: 0 !important;
}

.ehq3 .ehq-panel-title h1,
.ehq3 .ehq-panel-title h2,
.ehq3 .ehq-panel-title h3,
.ehq3 .erh-panel-title h1,
.ehq3 .erh-panel-title h2,
.ehq3 .erh-panel-title h3,
.ehq3 .eof-card-header {
    color: var(--ehq-module-text) !important;
    font-family: var(--ehq3-font-head, var(--ehq3-font, sans-serif)) !important;
    letter-spacing: 0 !important;
    margin: 0 !important;
}

.ehq3 .ehq-panel-title small,
.ehq3 .erh-panel-title small,
.ehq3 .ehq-muted,
.ehq3 .erh-muted,
.ehq3 .erh-note,
.ehq3 .eof-muted {
    color: var(--ehq-module-muted) !important;
}

.ehq3 .erh-action-row.is-priority {
    background: var(--ehq3-primary-soft, rgba(242, 207, 47, 0.12)) !important;
    border-color: var(--ehq3-primary-line, rgba(242, 207, 47, 0.35)) !important;
}

.ehq3 .erh-action-row.is-priority strong,
.ehq3 .erh-action-row.is-priority .dashicons {
    color: var(--ehq3-primary, #f2cf2f) !important;
}

.ehq3 .erh-action-row.is-success strong,
.ehq3 .erh-action-row.is-success .dashicons {
    color: var(--ehq3-green, #36c98a) !important;
}

.ehq3 .ehq-table-wrap,
.ehq3 .ehq-table-scroll,
.ehq3 .erh-table-scroll,
.ehq3 .eof-table-wrap {
    background: transparent !important;
    border: 0 !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

.ehq3 .ehq-table,
.ehq3 .erh-table,
.ehq3 .eof-table,
.ehq3 .erh-render-context table,
.ehq3 .eof-app table {
    background: var(--ehq-table-bg, var(--ehq-module-panel-bg)) !important;
    border: 1px solid var(--ehq-table-border, var(--ehq-module-line)) !important;
    border-collapse: separate !important;
    border-radius: var(--ehq-module-radius) !important;
    border-spacing: 0 !important;
    color: var(--ehq-table-text, var(--ehq-module-text)) !important;
    overflow: hidden !important;
    width: 100% !important;
}

.ehq3 .ehq-table th,
.ehq3 .erh-table th,
.ehq3 .eof-table th,
.ehq3 .erh-render-context table th,
.ehq3 .eof-app table th {
    background: var(--ehq-table-head-bg, var(--ehq-ui-table-head, rgba(255,255,255,0.07))) !important;
    border-color: var(--ehq-table-border, var(--ehq-module-line)) !important;
    color: var(--ehq-table-text, var(--ehq-module-text)) !important;
    font-family: var(--ehq3-font, inherit) !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
}

.ehq3 .ehq-table td,
.ehq3 .erh-table td,
.ehq3 .eof-table td,
.ehq3 .erh-render-context table td,
.ehq3 .eof-app table td {
    background: var(--ehq-table-row-bg, rgba(255,255,255,0.025)) !important;
    border-color: var(--ehq-table-border, var(--ehq-module-line)) !important;
    color: var(--ehq-table-text, var(--ehq-module-text)) !important;
}

.ehq3 .ehq-form,
.ehq3 .erh-form,
.ehq3 .eof-form {
    display: grid !important;
    gap: var(--ehq3-s3, 12px) !important;
    min-width: 0 !important;
}

.ehq3 .ehq-field,
.ehq3 .erh-field,
.ehq3 .eof-field {
    display: grid !important;
    gap: 6px !important;
    min-width: 0 !important;
}

.ehq3 .ehq-field label,
.ehq3 .erh-field label,
.ehq3 .eof-field label {
    color: var(--ehq-module-text) !important;
    font-weight: 800 !important;
}

.ehq3 .ehq-field input,
.ehq3 .ehq-field select,
.ehq3 .ehq-field textarea,
.ehq3 .erh-render-context input,
.ehq3 .erh-render-context select,
.ehq3 .erh-render-context textarea,
.ehq3 .eof-app input,
.ehq3 .eof-app select,
.ehq3 .eof-app textarea {
    background: var(--ehq-ui-input-bg, var(--ehq3-bg-deep, #05070d)) !important;
    border: 1px solid var(--ehq-module-line) !important;
    border-radius: var(--ehq-module-radius) !important;
    color: var(--ehq-module-text) !important;
    box-shadow: none !important;
}

.ehq3 .ehq-btn,
.ehq3 .ehq-button,
.ehq3 .erh-button,
.ehq3 .eof-btn,
.ehq3 .erh-render-context button,
.ehq3 .erh-render-context input[type="button"],
.ehq3 .erh-render-context input[type="submit"],
.ehq3 .eof-app button {
    align-items: center !important;
    border: 1px solid var(--ehq-module-line) !important;
    border-radius: var(--ehq-module-radius) !important;
    background: var(--ehq-button-bg, rgba(255,255,255,0.07)) !important;
    box-shadow: none !important;
    color: var(--ehq-button-text, var(--ehq-module-text)) !important;
    display: inline-flex !important;
    font-family: var(--ehq3-font, inherit) !important;
    font-weight: 800 !important;
    gap: 7px !important;
    justify-content: center !important;
    letter-spacing: 0 !important;
    min-height: 38px !important;
    padding: 0 var(--ehq3-s4, 16px) !important;
    text-shadow: none !important;
}

.ehq3 .ehq-btn-primary,
.ehq3 .ehq-button.is-primary,
.ehq3 .erh-button.primary,
.ehq3 .eof-btn-primary,
.ehq3 .button-primary {
    background: var(--ehq-button-primary-bg, var(--ehq3-primary, #f2cf2f)) !important;
    border-color: var(--ehq-button-primary-bg, var(--ehq3-primary, #f2cf2f)) !important;
    color: var(--ehq-button-primary-text, var(--ehq3-on-primary, #05070d)) !important;
}

.ehq3 .ehq-notice,
.ehq3 .erh-notice,
.ehq3 .erh-alert,
.ehq3 .erh-warning,
.ehq3 .eof-alert {
    background: var(--ehq-module-panel-bg-2) !important;
    border: 1px solid var(--ehq-module-line) !important;
    border-radius: var(--ehq-module-radius) !important;
    color: var(--ehq-module-text) !important;
    padding: var(--ehq3-s3, 12px) var(--ehq3-s4, 16px) !important;
}

.ehq3 .ehq-pagination,
.ehq3 .erh-pagination,
.ehq3 .eof-pagination {
    align-items: center !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: var(--ehq3-s2, 8px) !important;
    justify-content: flex-end !important;
}
.ehq3 .erh-pagination .ehq-btn.is-disabled,
.ehq3 .ehq-pagination .is-disabled,
.ehq3 .erh-pagination .is-disabled {
    background: rgba(255,255,255,0.06) !important;
    border-color: rgba(255,255,255,0.2) !important;
    color: rgba(255,255,255,0.6) !important;
    cursor: not-allowed !important;
    opacity: 0.72 !important;
}
.ehq3 .erh-pagination .ehq-btn,
.ehq3 .eof-pagination .ehq-btn {
    border-radius: var(--ehq3-r-sm, 8px) !important;
    height: 34px !important;
    line-height: 1 !important;
    min-height: 34px !important;
    padding-inline: 12px !important;
}
.ehq3 .erh-pagination .erh-page-current,
.ehq3 .erh-page-current {
    background: var(--ehq3-primary-soft, rgba(242,207,47,0.16)) !important;
    border-color: rgba(242,207,47,0.42) !important;
    color: var(--ehq3-primary, #f2cf2f) !important;
    cursor: default !important;
}

/* v3.0.10 — Imports module polish.
   The plugin keeps import data/render structure; the theme owns spacing,
   surfaces and readable table treatment. */
.ehq3.ehq-suite-distribution .erh-imports-page {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: var(--ehq3-s3, 12px) !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
}

.ehq3.ehq-suite-distribution .erh-imports-page > * {
    grid-column: 1 / -1 !important;
    min-width: 0 !important;
}

.ehq3.ehq-suite-distribution .erh-imports-page .erh-actionbar {
    background: transparent !important;
    border: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(220px, 1fr) auto !important;
    gap: var(--ehq3-s2, 8px) !important;
    margin: 0 0 var(--ehq3-s1, 4px) !important;
    padding: 0 !important;
}

.ehq3.ehq-suite-distribution .erh-imports-page .erh-actionbar-search {
    margin: 0 !important;
}

.ehq3.ehq-suite-distribution .erh-imports-page .erh-actionbar-search input {
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 var(--ehq3-s3, 12px) !important;
}

.ehq3.ehq-suite-distribution .erh-imports-page .erh-actionbar-actions {
    align-items: center !important;
    display: flex !important;
    justify-content: flex-end !important;
}

.ehq3.ehq-suite-distribution .erh-imports-page .erh-actionbar-actions .ehq-btn {
    min-height: 40px !important;
    padding-inline: var(--ehq3-s4, 16px) !important;
}

.ehq3.ehq-suite-distribution .erh-imports-page .erh-imports-limits,
.ehq3.ehq-suite-distribution .erh-imports-page .erh-imports-panel,
.ehq3.ehq-suite-distribution .erh-imports-page .erh-import-diagnostics-panel {
    display: grid !important;
    align-content: start !important;
    gap: var(--ehq3-s3, 12px) !important;
    padding: var(--ehq3-s3, 12px) !important;
    width: 100% !important;
}

.ehq3.ehq-suite-distribution .erh-imports-page .erh-imports-panel-head {
    align-items: center !important;
    border-bottom: 1px solid var(--ehq-ui-line, rgba(255,255,255,0.12)) !important;
    display: grid !important;
    gap: var(--ehq3-s3, 12px) !important;
    grid-template-columns: minmax(220px, 1fr) auto !important;
    padding-bottom: var(--ehq3-s2, 8px) !important;
}

.ehq3.ehq-suite-distribution .erh-imports-page .erh-imports-panel-head .erh-panel-heading {
    border: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.ehq3.ehq-suite-distribution .erh-imports-page .erh-imports-panel-pagination .erh-pagination {
    border: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.ehq3.ehq-suite-distribution .erh-imports-page .erh-imports-panel-pagination.is-bottom {
    border-top: 1px solid var(--ehq-ui-line, rgba(255,255,255,0.12)) !important;
    padding-top: var(--ehq3-s2, 8px) !important;
}

.ehq3.ehq-suite-distribution .erh-imports-page .erh-imports-limits-grid,
.ehq3.ehq-suite-distribution .erh-imports-page .erh-import-diagnostics-grid {
    display: grid !important;
    gap: var(--ehq3-s2, 8px) !important;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
}

.ehq3.ehq-suite-distribution .erh-imports-page .erh-card {
    min-height: 74px !important;
    padding: var(--ehq3-s3, 12px) !important;
}

.ehq3.ehq-suite-distribution .erh-imports-page .erh-card span {
    color: var(--ehq-ui-text-muted, #fff) !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em !important;
    line-height: 1.2 !important;
    text-transform: uppercase !important;
}

.ehq3.ehq-suite-distribution .erh-imports-page .erh-card strong {
    color: var(--ehq-ui-text, #fff) !important;
    display: block !important;
    font-family: var(--ehq3-font-head, var(--ehq3-font, sans-serif)) !important;
    font-size: clamp(20px, 1.45vw, 25px) !important;
    line-height: 1.08 !important;
    margin-top: var(--ehq3-s1, 4px) !important;
}

.ehq3.ehq-suite-distribution .erh-imports-page .erh-note {
    font-size: 13px !important;
    line-height: 1.5 !important;
    margin: 0 !important;
    max-width: 110ch !important;
}

.ehq3.ehq-suite-distribution .erh-imports-page .erh-imports-table-scroll,
.ehq3.ehq-suite-distribution .erh-imports-page .erh-import-issues-table-scroll {
    border-radius: var(--ehq3-r-sm, 8px) !important;
    overflow: auto !important;
}

.ehq3.ehq-suite-distribution .erh-imports-page .erh-imports-table th,
.ehq3.ehq-suite-distribution .erh-imports-page .erh-imports-table td {
    font-size: 12px !important;
    line-height: 1.35 !important;
    padding: 9px 10px !important;
    white-space: nowrap !important;
}

.ehq3.ehq-suite-distribution .erh-imports-page .erh-imports-table th {
    color: rgba(255,255,255,0.82) !important;
    font-size: 10px !important;
    letter-spacing: 0.04em !important;
}

.ehq3.ehq-suite-distribution .erh-imports-page .erh-imports-table td:nth-child(3) {
    max-width: 280px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.ehq3.ehq-suite-distribution .erh-imports-page .erh-imports-table td:nth-child(7) strong {
    color: var(--ehq3-text, #fff) !important;
    font-size: 12.5px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
}

.ehq3.ehq-suite-distribution .erh-imports-page .erh-imports-table td:last-child .ehq-btn {
    min-height: 32px !important;
    padding: 0 10px !important;
}

.ehq3.ehq-suite-distribution .erh-imports-page .erh-status-badge {
    background: rgba(38, 197, 133, 0.12) !important;
    border: 1px solid rgba(38, 197, 133, 0.28) !important;
    border-radius: 999px !important;
    color: #c9ffe8 !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: 0.035em !important;
    padding: 4px 9px !important;
}

.ehq3.ehq-suite-distribution .erh-imports-page .erh-mini-progress {
    background: rgba(255,255,255,0.08) !important;
    border-radius: 999px !important;
    display: block !important;
    height: 4px !important;
    margin-top: 6px !important;
    overflow: hidden !important;
    width: 100% !important;
}

.ehq3.ehq-suite-distribution .erh-imports-page .erh-mini-progress span {
    background: linear-gradient(90deg, var(--ehq3-blue, #0f6bff), var(--ehq3-green, #26c585)) !important;
    border-radius: inherit !important;
    display: block !important;
    height: 100% !important;
}

@media (max-width: 760px) {
    .ehq3.ehq-suite-distribution .erh-imports-page .erh-actionbar {
        grid-template-columns: 1fr !important;
    }

    .ehq3.ehq-suite-distribution .erh-imports-page .erh-imports-panel-head {
        grid-template-columns: 1fr !important;
    }

    .ehq3.ehq-suite-distribution .erh-imports-page .erh-actionbar-actions,
    .ehq3.ehq-suite-distribution .erh-imports-page .erh-actionbar-actions .ehq-btn {
        width: 100% !important;
    }
}

/* Canonical eHQ v3 module bridge.
   This final layer neutralizes older v2/admin-era chrome so plugin modules
   inherit the cockpit shell instead of carrying their own visual language. */
.ehq3 .ehq-module-canvas,
.ehq3 .erh-front-shell,
.ehq3 .erh-front-workspace,
.ehq3 .erh-render-context,
.ehq3 .eof-app {
    color: var(--ehq-ui-text, #fff) !important;
    font-family: var(--ehq3-font, "Open Sans", system-ui, sans-serif) !important;
    letter-spacing: 0 !important;
}

.ehq3 .erh-render-context,
.ehq3 .erh-front-shell {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* v3.0.32 — Office SPA bridge.
   Office remains a React business app; the active theme owns the dark cockpit
   surface, typography, and module chrome in the hosted /office/ route. */
.ehq3 .ehq3-module-host.is-office .eof-app,
.ehq3 .ehq3-module-host.is-office .eof-main,
.ehq3 .ehq3-module-host.is-office .eof-page {
    background: transparent !important;
    color: var(--ehq-ui-text, #fff) !important;
    font-family: var(--ehq3-font, "Open Sans", system-ui, sans-serif) !important;
    max-width: none !important;
    min-width: 0 !important;
}

.ehq3 .ehq3-module-host.is-office .eof-sidebar {
    background: var(--ehq3-bg-panel, #070a10) !important;
    border-color: var(--ehq3-line, rgba(255,255,255,0.12)) !important;
    color: var(--ehq-ui-text, #fff) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-sidebar-brand,
.ehq3 .ehq3-module-host.is-office .eof-sidebar-footer {
    border-color: var(--ehq3-line, rgba(255,255,255,0.12)) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-sidebar-brand-text strong,
.ehq3 .ehq3-module-host.is-office .eof-nav-link,
.ehq3 .ehq3-module-host.is-office .eof-sidebar-link {
    color: var(--ehq-ui-text, #fff) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-sidebar-brand-text small,
.ehq3 .ehq3-module-host.is-office .eof-page-sub,
.ehq3 .ehq3-module-host.is-office .eof-muted,
.ehq3 .ehq3-module-host.is-office .eof-table-note,
.ehq3 .ehq3-module-host.is-office .eof-chart-empty {
    color: var(--ehq-ui-text-muted, rgba(255,255,255,0.78)) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-module-nav {
    align-items: center !important;
    background: var(--ehq-ui-panel, var(--ehq3-card, #0b0e16)) !important;
    border: 1px solid var(--ehq-ui-line, var(--ehq3-line, rgba(255,255,255,0.12))) !important;
    border-radius: var(--ehq3-r-sm, 8px) !important;
    box-shadow: none !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    height: auto !important;
    margin-bottom: var(--ehq3-s5, 20px) !important;
    max-width: 100% !important;
    overflow: visible !important;
    padding: 7px 8px !important;
    width: 100% !important;
}

.ehq3 .ehq3-module-host.is-office .eof-module-nav-link,
.ehq3 .ehq3-module-host.is-office .eof-module-nav-link:visited {
    align-items: center !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    border-radius: var(--ehq3-r-sm, 8px) !important;
    color: var(--ehq-ui-text, #fff) !important;
    display: inline-flex !important;
    flex: 0 0 auto !important;
    font-family: var(--ehq3-font, inherit) !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    gap: 6px !important;
    justify-content: center !important;
    letter-spacing: 0 !important;
    line-height: 1.2 !important;
    min-height: 32px !important;
    padding: 6px 8px !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    width: auto !important;
}

.ehq3 .ehq3-module-host.is-office .eof-module-nav-link .dashicons {
    font-size: 15px !important;
    height: 15px !important;
    width: 15px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-module-nav-link:hover,
.ehq3 .ehq3-module-host.is-office .eof-module-nav-link.is-active {
    background: rgba(242, 207, 47, 0.13) !important;
    border-color: rgba(242, 207, 47, 0.45) !important;
    color: var(--ehq3-primary, #f2cf2f) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-module-version {
    background: rgba(255,255,255,0.04) !important;
    border-color: var(--ehq-ui-line, rgba(255,255,255,0.12)) !important;
    color: var(--ehq-ui-text-muted, rgba(255,255,255,0.78)) !important;
}

/* Office dashboard finish pass.
   The plugin provides neutral React structures; the theme owns density,
   readable contrast, dark chart surfaces, and dashboard rhythm. */
.ehq3 .ehq3-module-host.is-office .eof-page {
    max-width: none !important;
    width: 100% !important;
}

.ehq3 .ehq3-module-host.is-office .eof-page-header {
    align-items: center !important;
    gap: var(--ehq3-s4, 16px) !important;
    margin-bottom: var(--ehq3-s5, 20px) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-page-header h1 {
    color: #fff !important;
    font-family: var(--ehq3-font-head, var(--ehq3-font, inherit)) !important;
    font-size: clamp(24px, 2vw, 34px) !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
    line-height: 1.05 !important;
}

.ehq3 .ehq3-module-host.is-office .eof-date-filter,
.ehq3 .ehq3-module-host.is-office .eof-toolbar {
    align-items: center !important;
    background: rgba(255,255,255,0.035) !important;
    border: 1px solid var(--ehq-ui-line, rgba(255,255,255,0.12)) !important;
    border-radius: var(--ehq3-r-sm, 8px) !important;
    display: flex !important;
    gap: 8px !important;
    padding: 8px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-date-filter label,
.ehq3 .ehq3-module-host.is-office .eof-toolbar-label {
    color: var(--ehq-ui-text-muted, rgba(255,255,255,0.78)) !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
}

.ehq3 .ehq3-module-host.is-office .eof-date-filter input {
    min-height: 34px !important;
    min-width: 136px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-kpi-grid {
    gap: var(--ehq3-s4, 16px) !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    margin-bottom: var(--ehq3-s5, 20px) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-kpi-grid-sm {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-kpi-card {
    min-height: 112px !important;
    padding: var(--ehq3-s4, 16px) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-kpi-label {
    color: var(--ehq-ui-text-muted, rgba(255,255,255,0.78)) !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    letter-spacing: 0.06em !important;
    line-height: 1.2 !important;
}

.ehq3 .ehq3-module-host.is-office .eof-kpi-value {
    color: #fff !important;
    font-family: var(--ehq3-font-head, var(--ehq3-font, inherit)) !important;
    font-size: clamp(24px, 1.8vw, 32px) !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
    line-height: 1.05 !important;
    margin-top: 8px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-kpi-sub {
    color: var(--ehq-ui-text-muted, rgba(255,255,255,0.78)) !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
    margin-top: 8px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-section-grid {
    gap: var(--ehq3-s4, 16px) !important;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) !important;
    margin-bottom: var(--ehq3-s5, 20px) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-card {
    margin-bottom: var(--ehq3-s4, 16px) !important;
    overflow: hidden !important;
}

.ehq3 .ehq3-module-host.is-office .eof-card-header {
    background: rgba(255,255,255,0.055) !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
    min-height: 44px !important;
    padding: 12px 16px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-chart {
    min-height: 292px !important;
    padding: 14px 16px 16px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-financial-health-card {
    background: var(--ehq-ui-panel, var(--ehq3-card, #0b0e16)) !important;
    border-color: var(--ehq-ui-line, var(--ehq3-line, rgba(255,255,255,0.12))) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-health-grid {
    background: transparent !important;
    gap: var(--ehq3-s3, 12px) !important;
    padding: var(--ehq3-s4, 16px) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-health-item {
    background: var(--ehq-ui-panel-2, var(--ehq3-card-2, #0e1220)) !important;
    border: 1px solid var(--ehq-ui-line, var(--ehq3-line, rgba(255,255,255,0.12))) !important;
    border-top-width: 3px !important;
    border-radius: var(--ehq3-r-sm, 8px) !important;
    box-shadow: none !important;
    color: var(--ehq-ui-text, #fff) !important;
    min-height: 112px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-health-item::before {
    content: none !important;
}

.ehq3 .ehq3-module-host.is-office .eof-health-item.is-ok {
    border-top-color: var(--ehq3-green, #26c585) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-health-item.is-warning {
    border-top-color: var(--ehq3-primary, #f2cf2f) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-health-item.is-bad {
    border-top-color: var(--ehq3-red, #ef4444) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-health-label,
.ehq3 .ehq3-module-host.is-office .eof-health-item small {
    color: var(--ehq-ui-text-muted, rgba(255,255,255,0.78)) !important;
    letter-spacing: 0 !important;
}

.ehq3 .ehq3-module-host.is-office .eof-health-item strong,
.ehq3 .ehq3-module-host.is-office .eof-health-item .eof-money {
    color: var(--ehq-ui-text, #fff) !important;
    font-family: var(--ehq3-font-head, var(--ehq3-font, inherit)) !important;
    letter-spacing: 0 !important;
}

.ehq3 .ehq3-module-host.is-office .eof-chart-empty,
.ehq3 .ehq3-module-host.is-office .eof-loading,
.ehq3 .ehq3-module-host.is-office .eof-empty {
    align-items: center !important;
    color: var(--ehq-ui-text-muted, rgba(255,255,255,0.78)) !important;
    display: flex !important;
    justify-content: center !important;
    min-height: 180px !important;
}

.ehq3 .ehq3-module-host.is-office .recharts-cartesian-grid line {
    stroke: rgba(255,255,255,0.09) !important;
}

.ehq3 .ehq3-module-host.is-office .recharts-text,
.ehq3 .ehq3-module-host.is-office .recharts-legend-item-text {
    fill: rgba(255,255,255,0.78) !important;
    color: rgba(255,255,255,0.78) !important;
}

.ehq3 .ehq3-module-host.is-office .recharts-tooltip-wrapper {
    color: #0b0e16 !important;
}

.ehq3 .ehq3-module-host.is-office .eof-table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    overflow: hidden !important;
}

.ehq3 .ehq3-module-host.is-office .eof-table th {
    background: rgba(255,255,255,0.06) !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    letter-spacing: 0.06em !important;
    padding: 11px 14px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-table td {
    color: #fff !important;
    padding: 11px 14px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-table-compact td,
.ehq3 .ehq3-module-host.is-office .eof-table-compact th {
    padding: 9px 12px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-row-highlight td,
.ehq3 .ehq3-module-host.is-office .eof-table tr:hover td {
    background: rgba(242,207,47,0.075) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-badge {
    border: 1px solid rgba(255,255,255,0.12) !important;
    color: #fff !important;
    font-weight: 900 !important;
}

@media (max-width: 1100px) {
    .ehq3 .ehq3-module-host.is-office .eof-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .ehq3 .ehq3-module-host.is-office .eof-section-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 700px) {
    .ehq3 .ehq3-module-host.is-office .eof-page-header {
        align-items: stretch !important;
        flex-direction: column !important;
    }

    .ehq3 .ehq3-module-host.is-office .eof-kpi-grid,
    .ehq3 .ehq3-module-host.is-office .eof-kpi-grid-sm {
        grid-template-columns: 1fr !important;
    }
}

/* Office Pass 1 — shared surfaces across table/form-heavy pages.
   One theme-owned layer for repeated cards, filters, tables, forms, modals,
   alerts, chips and action bars used by Transactions, Bank, Pending, Projects,
   Settings, Monitoring, Audit Log and import pages. */
.ehq3 .ehq3-module-host.is-office .eof-toolbar,
.ehq3 .ehq3-module-host.is-office .eof-form-inline-panel,
.ehq3 .ehq3-module-host.is-office .eof-bulk-bar,
.ehq3 .ehq3-module-host.is-office .eof-reconciliation-link-body {
    background: rgba(255,255,255,0.035) !important;
    border: 1px solid var(--ehq-ui-line, rgba(255,255,255,0.12)) !important;
    border-radius: var(--ehq3-r-sm, 8px) !important;
    box-shadow: none !important;
    color: #fff !important;
    gap: var(--ehq3-s3, 12px) !important;
    margin-bottom: var(--ehq3-s4, 16px) !important;
    padding: var(--ehq3-s3, 12px) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-card-body,
.ehq3 .ehq3-module-host.is-office .eof-modal-body,
.ehq3 .ehq3-module-host.is-office .eof-form {
    color: #fff !important;
}

.ehq3 .ehq3-module-host.is-office .eof-form label,
.ehq3 .ehq3-module-host.is-office .eof-form-check,
.ehq3 .ehq3-module-host.is-office .eof-checkbox-inline,
.ehq3 .ehq3-module-host.is-office .eof-help-copy,
.ehq3 .ehq3-module-host.is-office .eof-card-copy,
.ehq3 .ehq3-module-host.is-office .eof-card-note,
.ehq3 .ehq3-module-host.is-office .eof-table-note,
.ehq3 .ehq3-module-host.is-office .eof-text-muted,
.ehq3 .ehq3-module-host.is-office .eof-alert-meta,
.ehq3 .ehq3-module-host.is-office .eof-section-title {
    color: var(--ehq-ui-text-muted, rgba(255,255,255,0.78)) !important;
    letter-spacing: 0 !important;
}

.ehq3 .ehq3-module-host.is-office .eof-form input,
.ehq3 .ehq3-module-host.is-office .eof-form select,
.ehq3 .ehq3-module-host.is-office .eof-form textarea,
.ehq3 .ehq3-module-host.is-office .eof-toolbar select,
.ehq3 .ehq3-module-host.is-office .eof-select,
.ehq3 .ehq3-module-host.is-office .eof-control-fluid,
.ehq3 .ehq3-module-host.is-office .eof-input-user-id,
.ehq3 .ehq3-module-host.is-office .eof-chip-pct,
.ehq3 .ehq3-module-host.is-office .eof-alloc-select,
.ehq3 .ehq3-module-host.is-office .eof-alloc-pct {
    background: var(--ehq-ui-input-bg, #05070d) !important;
    border: 1px solid var(--ehq-ui-line, rgba(255,255,255,0.12)) !important;
    border-radius: var(--ehq3-r-sm, 8px) !important;
    color: #fff !important;
    min-height: 34px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-form textarea {
    min-height: 88px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-form input::placeholder,
.ehq3 .ehq3-module-host.is-office .eof-form textarea::placeholder {
    color: rgba(255,255,255,0.45) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-btn,
.ehq3 .ehq3-module-host.is-office .eof-btn-ghost,
.ehq3 .ehq3-module-host.is-office .eof-btn-secondary,
.ehq3 .ehq3-module-host.is-office button.eof-btn {
    align-items: center !important;
    background: rgba(255,255,255,0.07) !important;
    border: 1px solid var(--ehq-ui-line, rgba(255,255,255,0.12)) !important;
    border-radius: var(--ehq3-r-sm, 8px) !important;
    color: #fff !important;
    display: inline-flex !important;
    font-weight: 800 !important;
    justify-content: center !important;
    letter-spacing: 0 !important;
    min-height: 34px !important;
    text-decoration: none !important;
}

.ehq3 .ehq3-module-host.is-office .eof-btn:hover,
.ehq3 .ehq3-module-host.is-office button.eof-btn:hover {
    background: rgba(255,255,255,0.12) !important;
    color: #fff !important;
}

.ehq3 .ehq3-module-host.is-office .eof-btn-primary,
.ehq3 .ehq3-module-host.is-office .eof-btn-success {
    background: var(--ehq3-primary, #f2cf2f) !important;
    border-color: var(--ehq3-primary, #f2cf2f) !important;
    color: var(--ehq3-on-primary, #05070d) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-btn-danger {
    background: rgba(220,38,38,0.18) !important;
    border-color: rgba(248,113,113,0.48) !important;
    color: #fff !important;
}

.ehq3 .ehq3-module-host.is-office .eof-btn:disabled,
.ehq3 .ehq3-module-host.is-office button:disabled {
    cursor: not-allowed !important;
    opacity: 0.48 !important;
}

.ehq3 .ehq3-module-host.is-office .eof-modal-backdrop {
    background: rgba(0,0,0,0.72) !important;
    backdrop-filter: blur(10px) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-modal {
    background: var(--ehq-ui-panel, var(--ehq3-card, #0b0e16)) !important;
    border: 1px solid var(--ehq-ui-line, rgba(255,255,255,0.12)) !important;
    border-radius: var(--ehq3-r-md, 10px) !important;
    box-shadow: 0 24px 70px rgba(0,0,0,0.45) !important;
    color: #fff !important;
}

.ehq3 .ehq3-module-host.is-office .eof-modal-header,
.ehq3 .ehq3-module-host.is-office .eof-modal-footer,
.ehq3 .ehq3-module-host.is-office .eof-card-footer {
    background: rgba(255,255,255,0.045) !important;
    border-color: var(--ehq-ui-line, rgba(255,255,255,0.12)) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-modal-header h2 {
    color: #fff !important;
    font-family: var(--ehq3-font-head, var(--ehq3-font, inherit)) !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
}

.ehq3 .ehq3-module-host.is-office .eof-modal-close {
    color: #fff !important;
}

.ehq3 .ehq3-module-host.is-office .eof-alert {
    background: rgba(255,255,255,0.045) !important;
    border: 1px solid var(--ehq-ui-line, rgba(255,255,255,0.12)) !important;
    border-left-width: 4px !important;
    color: #fff !important;
}

.ehq3 .ehq3-module-host.is-office .eof-alert-success {
    border-left-color: #22c55e !important;
}

.ehq3 .ehq3-module-host.is-office .eof-alert-error,
.ehq3 .ehq3-module-host.is-office .eof-alert-item.eof-alert-error {
    border-left-color: #ef4444 !important;
}

.ehq3 .ehq3-module-host.is-office .eof-alert-info,
.ehq3 .ehq3-module-host.is-office .eof-alert-item.eof-alert-info {
    border-left-color: #3b82f6 !important;
}

.ehq3 .ehq3-module-host.is-office .eof-alert-item.eof-alert-warn {
    border-left-color: #f59e0b !important;
}

.ehq3 .ehq3-module-host.is-office .eof-alert-list {
    display: grid !important;
    gap: 10px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-alert-item {
    background: rgba(255,255,255,0.04) !important;
    border-color: var(--ehq-ui-line, rgba(255,255,255,0.12)) !important;
    color: #fff !important;
    margin: 0 !important;
}

.ehq3 .ehq3-module-host.is-office .eof-badge,
.ehq3 .ehq3-module-host.is-office .eof-chip,
.ehq3 .ehq3-module-host.is-office .eof-division-badge {
    align-items: center !important;
    background: rgba(255,255,255,0.065) !important;
    border: 1px solid var(--ehq-ui-line, rgba(255,255,255,0.12)) !important;
    border-radius: 999px !important;
    color: #fff !important;
    display: inline-flex !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    letter-spacing: 0.02em !important;
    min-height: 24px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-chip.is-on {
    background: rgba(242,207,47,0.14) !important;
    border-color: rgba(242,207,47,0.45) !important;
    color: var(--ehq3-primary, #f2cf2f) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-clickable,
.ehq3 .ehq3-module-host.is-office .eof-row-selected {
    cursor: pointer !important;
}

.ehq3 .ehq3-module-host.is-office .eof-clickable.is-selected td,
.ehq3 .ehq3-module-host.is-office .eof-row-selected td {
    background: rgba(242,207,47,0.12) !important;
    color: #fff !important;
}

.ehq3 .ehq3-module-host.is-office .eof-pagination,
.ehq3 .ehq3-module-host.is-office .eof-inline-actions,
.ehq3 .ehq3-module-host.is-office .eof-toolbar-spacer,
.ehq3 .ehq3-module-host.is-office .eof-input-action-row,
.ehq3 .ehq3-module-host.is-office .eof-alert-actions,
.ehq3 .ehq3-module-host.is-office .eof-alloc-actions {
    align-items: center !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-page-count {
    color: var(--ehq-ui-text-muted, rgba(255,255,255,0.78)) !important;
    font-size: 12px !important;
    font-weight: 800 !important;
}

.ehq3 .ehq3-module-host.is-office .eof-reconciliation-panels,
.ehq3 .ehq3-module-host.is-office .eof-two-col {
    display: grid !important;
    gap: var(--ehq3-s4, 16px) !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-bank-raw-table,
.ehq3 .ehq3-module-host.is-office .eof-alloc-table {
    table-layout: fixed !important;
}

.ehq3 .ehq3-module-host.is-office .eof-cell-ellipsis,
.ehq3 .ehq3-module-host.is-office .eof-audit-json {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.ehq3 .ehq3-module-host.is-office .eof-audit-json pre,
.ehq3 .ehq3-module-host.is-office .eof-code,
.ehq3 .ehq3-module-host.is-office code {
    background: rgba(255,255,255,0.055) !important;
    border: 1px solid var(--ehq-ui-line, rgba(255,255,255,0.12)) !important;
    border-radius: var(--ehq3-r-sm, 8px) !important;
    color: #fff !important;
}

.ehq3 .ehq3-module-host.is-office .eof-color-swatch {
    border-color: var(--ehq-ui-line, rgba(255,255,255,0.12)) !important;
}

@media (max-width: 900px) {
    .ehq3 .ehq3-module-host.is-office .eof-reconciliation-panels,
    .ehq3 .ehq3-module-host.is-office .eof-two-col {
        grid-template-columns: 1fr !important;
    }
}

.ehq3 .ehq3-module-host.is-office .eof-nav-link:hover,
.ehq3 .ehq3-module-host.is-office .eof-sidebar-link:hover {
    background: rgba(255,255,255,0.06) !important;
    color: var(--ehq-ui-text, #fff) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-nav-link.is-active {
    background: rgba(242,207,47,0.13) !important;
    border-color: var(--ehq3-primary, #f2cf2f) !important;
    color: var(--ehq3-primary, #f2cf2f) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-page-header h1,
.ehq3 .ehq3-module-host.is-office .eof-card-header,
.ehq3 .ehq3-module-host.is-office .eof-kpi-label,
.ehq3 .ehq3-module-host.is-office .eof-kpi-value,
.ehq3 .ehq3-module-host.is-office .eof-table th,
.ehq3 .ehq3-module-host.is-office .eof-table td,
.ehq3 .ehq3-module-host.is-office .eof-table strong {
    color: var(--ehq-ui-text, #fff) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-card,
.ehq3 .ehq3-module-host.is-office .eof-kpi-card,
.ehq3 .ehq3-module-host.is-office .eof-stub-card {
    background: var(--ehq-ui-panel, var(--ehq3-card, #0b0e16)) !important;
    border-color: var(--ehq-ui-line, var(--ehq3-line, rgba(255,255,255,0.12))) !important;
    color: var(--ehq-ui-text, #fff) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-card-header,
.ehq3 .ehq3-module-host.is-office .eof-card-footer {
    background: rgba(255,255,255,0.045) !important;
    border-color: var(--ehq-ui-line, var(--ehq3-line, rgba(255,255,255,0.12))) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-table {
    background: var(--ehq-table-bg, var(--ehq-ui-panel, #0b0e16)) !important;
    border-color: var(--ehq-table-border, var(--ehq-ui-line, rgba(255,255,255,0.12))) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-table th {
    background: var(--ehq-table-head-bg, rgba(255,255,255,0.07)) !important;
    border-color: var(--ehq-table-border, var(--ehq-ui-line, rgba(255,255,255,0.12))) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-table td {
    background: rgba(255,255,255,0.025) !important;
    border-color: var(--ehq-table-border, var(--ehq-ui-line, rgba(255,255,255,0.12))) !important;
}

.ehq3 .ehq3-module-host.is-office input,
.ehq3 .ehq3-module-host.is-office select,
.ehq3 .ehq3-module-host.is-office textarea {
    background: var(--ehq-ui-input-bg, #05070d) !important;
    border-color: var(--ehq-ui-line, rgba(255,255,255,0.12)) !important;
    color: var(--ehq-ui-text, #fff) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-btn,
.ehq3 .ehq3-module-host.is-office button {
    background: var(--ehq-button-bg, rgba(255,255,255,0.07)) !important;
    border-color: var(--ehq-ui-line, rgba(255,255,255,0.12)) !important;
    color: var(--ehq-button-text, #fff) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-btn-primary {
    background: var(--ehq3-primary, #f2cf2f) !important;
    border-color: var(--ehq3-primary, #f2cf2f) !important;
    color: var(--ehq3-on-primary, #05070d) !important;
}

/* Office Pass 2 — page-specific density and layout polish.
   Theme-owned cleanup for Transactions, Bank, Projects and Settings while
   keeping the Office plugin engine, REST calls and React views untouched. */
.ehq3 .ehq3-module-host.is-office .eof-page-header:has(.eof-toolbar) {
    align-items: flex-start !important;
    gap: var(--ehq3-s4, 16px) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-page-header > .eof-toolbar {
    flex: 1 1 520px !important;
    justify-content: flex-end !important;
    margin-bottom: 0 !important;
    margin-left: auto !important;
    max-width: 900px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-page-header > .eof-toolbar .eof-date-filter {
    background: transparent !important;
    border: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.ehq3 .ehq3-module-host.is-office .eof-page-header > .eof-toolbar label {
    min-width: 0 !important;
}

.ehq3 .ehq3-module-host.is-office .eof-page-header > .eof-toolbar select,
.ehq3 .ehq3-module-host.is-office .eof-page-header > .eof-toolbar input {
    max-width: 230px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-tabs {
    align-items: center !important;
    background: rgba(255,255,255,0.035) !important;
    border: 1px solid var(--ehq-ui-line, rgba(255,255,255,0.12)) !important;
    border-radius: var(--ehq3-r-sm, 8px) !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    padding: 6px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-tabs button {
    background: transparent !important;
    border: 1px solid transparent !important;
    border-radius: var(--ehq3-r-sm, 8px) !important;
    color: rgba(255,255,255,0.76) !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    min-height: 32px !important;
    padding: 0 11px !important;
    white-space: nowrap !important;
}

.ehq3 .ehq3-module-host.is-office .eof-tabs button:hover,
.ehq3 .ehq3-module-host.is-office .eof-tabs button.is-active {
    background: rgba(242,207,47,0.13) !important;
    border-color: rgba(242,207,47,0.42) !important;
    color: var(--ehq3-primary, #f2cf2f) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-card:has(.eof-table),
.ehq3 .ehq3-module-host.is-office .eof-table-wrap {
    overflow-x: auto !important;
}

.ehq3 .ehq3-module-host.is-office .eof-card .eof-table {
    min-width: 0 !important;
}

.ehq3 .ehq3-module-host.is-office .eof-table th,
.ehq3 .ehq3-module-host.is-office .eof-table td {
    font-size: 12px !important;
    line-height: 1.35 !important;
    padding: 8px 10px !important;
    vertical-align: middle !important;
}

.ehq3 .ehq3-module-host.is-office .eof-table th {
    letter-spacing: 0.025em !important;
}

.ehq3 .ehq3-module-host.is-office .eof-table .eof-badge,
.ehq3 .ehq3-module-host.is-office .eof-table .eof-chip {
    min-height: 20px !important;
    padding: 2px 7px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-select-col {
    width: 34px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-actions,
.ehq3 .ehq3-module-host.is-office .eof-table-actions {
    align-items: center !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 5px !important;
    justify-content: flex-end !important;
}

.ehq3 .ehq3-module-host.is-office .eof-actions .eof-btn-sm,
.ehq3 .ehq3-module-host.is-office .eof-table-actions .eof-btn-sm {
    font-size: 11px !important;
    min-height: 28px !important;
    padding: 4px 7px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-pagination {
    background: rgba(255,255,255,0.035) !important;
    border: 1px solid var(--ehq-ui-line, rgba(255,255,255,0.12)) !important;
    border-radius: var(--ehq3-r-sm, 8px) !important;
    justify-content: space-between !important;
    margin-top: var(--ehq3-s3, 12px) !important;
    padding: 8px 10px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-form-inline {
    align-items: end !important;
    background: rgba(255,255,255,0.035) !important;
    border: 1px solid var(--ehq-ui-line, rgba(255,255,255,0.12)) !important;
    border-radius: var(--ehq3-r-sm, 8px) !important;
    gap: 10px !important;
    padding: 12px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-card > .eof-form-inline {
    margin: 0 !important;
}

.ehq3 .ehq3-module-host.is-office .eof-form-inline label {
    min-width: min(220px, 100%) !important;
}

.ehq3 .ehq3-module-host.is-office input[type="file"] {
    background: var(--ehq-ui-input-bg, #05070d) !important;
    border: 1px solid var(--ehq-ui-line, rgba(255,255,255,0.12)) !important;
    border-radius: var(--ehq3-r-sm, 8px) !important;
    color: #fff !important;
    padding: 7px !important;
}

.ehq3 .ehq3-module-host.is-office input[type="file"]::file-selector-button {
    background: var(--ehq3-primary, #f2cf2f) !important;
    border: 0 !important;
    border-radius: 6px !important;
    color: var(--ehq3-on-primary, #05070d) !important;
    font-weight: 900 !important;
    margin-right: 10px !important;
    min-height: 28px !important;
    padding: 0 10px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-bank-raw-table {
    min-width: 1120px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-bank-raw-table .eof-col-date {
    width: 110px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-bank-raw-table .eof-col-account {
    width: 150px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-bank-raw-table .eof-col-debit,
.ehq3 .ehq3-module-host.is-office .eof-bank-raw-table .eof-col-credit {
    width: 110px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-bank-raw-table .eof-col-status {
    width: 120px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-bank-raw-table .eof-col-actions {
    width: 300px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-bank-raw-table .eof-raw-account-select {
    max-width: 145px !important;
    min-width: 120px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-reconciliation-bank-table {
    min-width: 760px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-reconciliation-history-table {
    min-width: 920px !important;
}

/* Office Settings cleanup: plugin emits neutral table/row classes, theme owns
   hierarchy spacing, table widths and form density. */
.ehq3 .ehq3-module-host.is-office .eof-page-settings .eof-settings-rates-table,
.ehq3 .ehq3-module-host.is-office .eof-page-settings .eof-settings-ref-table,
.ehq3 .ehq3-module-host.is-office .eof-page-settings .eof-settings-departments-table,
.ehq3 .ehq3-module-host.is-office .eof-page-settings .eof-settings-info-table,
.ehq3 .ehq3-module-host.is-office .eof-page-settings .eof-settings-diagnostic-table {
    min-width: 720px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-page-settings .eof-settings-info-table,
.ehq3 .ehq3-module-host.is-office .eof-page-settings .eof-settings-diagnostic-table {
    min-width: 560px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-page-settings .eof-department-name-cell {
    align-items: center !important;
    display: flex !important;
    gap: 8px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-page-settings .is-section-row .eof-department-name-cell {
    padding-left: 28px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-page-settings .eof-department-indent {
    color: var(--ehq-ui-text-muted, rgba(255,255,255,0.72)) !important;
    font-weight: 900 !important;
}

/* Office Pending + Audit cleanup. The plugin now emits page/table intent
   classes; table geometry and long-value behavior live here in the theme. */
.ehq3 .ehq3-module-host.is-office .eof-pending-drafts-table {
    min-width: 960px !important;
    table-layout: fixed !important;
}

.ehq3 .ehq3-module-host.is-office .eof-pending-drafts-table .eof-col-date {
    width: 112px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-pending-drafts-table .eof-col-status,
.ehq3 .ehq3-module-host.is-office .eof-pending-drafts-table .eof-col-money {
    width: 112px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-pending-drafts-table .eof-col-category,
.ehq3 .ehq3-module-host.is-office .eof-pending-drafts-table .eof-col-partner {
    width: 150px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-pending-drafts-table .eof-col-actions {
    width: 170px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-pending-drafts-table .eof-actions {
    white-space: nowrap !important;
}

.ehq3 .ehq3-module-host.is-office .eof-audit-events-table {
    min-width: 1080px !important;
    table-layout: fixed !important;
}

.ehq3 .ehq3-module-host.is-office .eof-audit-events-table .eof-col-date {
    width: 180px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-audit-events-table .eof-col-action {
    width: 220px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-audit-events-table .eof-col-entity {
    width: 140px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-audit-events-table .eof-col-id,
.ehq3 .ehq3-module-host.is-office .eof-audit-events-table .eof-col-actor {
    width: 90px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-audit-events-table .eof-col-ip {
    width: 145px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-audit-events-table .eof-code {
    display: inline-block !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
}

.ehq3 .ehq3-module-host.is-office .eof-audit-events-table details summary {
    color: var(--ehq-ui-text, #fff) !important;
    cursor: pointer !important;
    font-weight: 800 !important;
}

/* Office import pages cleanup: PDF Import + Cash Flow Import emit neutral
   table/card intent classes; theme owns geometry and long text behavior. */
.ehq3 .ehq3-module-host.is-office .eof-pdf-summary-table {
    min-width: 560px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-pdf-division-table {
    min-width: 760px !important;
    table-layout: fixed !important;
}

.ehq3 .ehq3-module-host.is-office .eof-pdf-division-table .eof-col-department {
    width: 34% !important;
}

.ehq3 .ehq3-module-host.is-office .eof-pdf-division-table .eof-col-linked,
.ehq3 .ehq3-module-host.is-office .eof-pdf-division-table .eof-col-division {
    width: 33% !important;
}

.ehq3 .ehq3-module-host.is-office .eof-pdf-generic-table {
    min-width: 720px !important;
    table-layout: fixed !important;
}

.ehq3 .ehq3-module-host.is-office .eof-pdf-generic-table .eof-col-line {
    width: 72px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-pdf-history-table {
    min-width: 920px !important;
    table-layout: fixed !important;
}

.ehq3 .ehq3-module-host.is-office .eof-pdf-history-table .eof-col-type,
.ehq3 .ehq3-module-host.is-office .eof-pdf-history-table .eof-col-engine,
.ehq3 .ehq3-module-host.is-office .eof-pdf-history-table .eof-col-status {
    width: 130px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-pdf-history-table .eof-col-date {
    width: 145px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-pdf-history-table .eof-col-actions {
    width: 110px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-cashflow-preview-table {
    min-width: 1040px !important;
    table-layout: fixed !important;
}

.ehq3 .ehq3-module-host.is-office .eof-cashflow-preview-table .eof-col-date {
    width: 112px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-cashflow-preview-table .eof-col-type,
.ehq3 .ehq3-module-host.is-office .eof-cashflow-preview-table .eof-col-money,
.ehq3 .ehq3-module-host.is-office .eof-cashflow-preview-table .eof-col-status {
    width: 120px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-cashflow-preview-table .eof-col-partner,
.ehq3 .ehq3-module-host.is-office .eof-cashflow-preview-table .eof-col-category {
    width: 150px !important;
}

/* Office project allocation window cleanup. Projects can touch several
   financial divisions/departments; the plugin emits grouped neutral structure,
   and the theme owns the layout density. */
.ehq3 .ehq3-module-host.is-office .eof-page-projects .eof-project-dept-groups {
    display: grid !important;
    gap: 10px !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-page-projects .eof-project-dept-group {
    background: rgba(255,255,255,0.035) !important;
    border: 1px solid var(--ehq-ui-line, rgba(255,255,255,0.12)) !important;
    border-radius: var(--ehq3-r-sm, 8px) !important;
    padding: 10px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-page-projects .eof-project-dept-group-title {
    color: var(--ehq-ui-text, #fff) !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
    margin-bottom: 8px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-page-projects .eof-project-dept-group .eof-dept-chips {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-page-projects .eof-project-budget-table,
.ehq3 .ehq3-module-host.is-office .eof-page-projects .eof-project-members-table {
    min-width: 720px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-page-projects .eof-projects-list-table {
    min-width: 0 !important;
    table-layout: fixed !important;
    width: 100% !important;
}

.ehq3 .ehq3-module-host.is-office .eof-page-projects .eof-projects-list-table .eof-col-state,
.ehq3 .ehq3-module-host.is-office .eof-page-projects .eof-projects-list-table .eof-col-alerts {
    width: 84px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-page-projects .eof-projects-list-table .eof-col-period {
    width: 142px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-page-projects .eof-projects-list-table .eof-col-actions {
    width: 136px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-page-projects .eof-projects-list-table .eof-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-page-projects .eof-projects-list-table .eof-actions .eof-btn-sm {
    font-size: 11px !important;
    min-height: 26px !important;
    padding: 5px 7px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-card:has(.eof-actions) .eof-table,
.ehq3 .ehq3-module-host.is-office .eof-card:has(.eof-table-actions) .eof-table,
.ehq3 .ehq3-module-host.is-office .eof-card:has(.eof-pagination) .eof-table {
    min-width: 760px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-page-projects .eof-projects-list-card .eof-table {
    min-width: 0 !important;
}

.ehq3 .ehq3-module-host.is-office .eof-two-col {
    align-items: start !important;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.9fr) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-page-projects .eof-projects-layout.is-list-only {
    grid-template-columns: minmax(0, 1fr) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-two-col > .eof-card,
.ehq3 .ehq3-module-host.is-office .eof-section-grid > .eof-card {
    min-width: 0 !important;
}

.ehq3 .ehq3-module-host.is-office .eof-card-header .eof-ml-auto,
.ehq3 .ehq3-module-host.is-office .eof-toolbar .eof-ml-auto {
    margin-left: auto !important;
}

/* Office reporting cleanup — CEO, Department P&L and Division P&L now emit
   intent classes; the theme controls table geometry and chart rhythm. */
.ehq3 .ehq3-module-host.is-office .eof-page-ceo .eof-ceo-department-table,
.ehq3 .ehq3-module-host.is-office .eof-page-division-pl .eof-division-detail-table {
    min-width: 0 !important;
    table-layout: fixed !important;
    width: 100% !important;
}

.ehq3 .ehq3-module-host.is-office .eof-page-ceo .eof-ceo-department-table .eof-col-money,
.ehq3 .ehq3-module-host.is-office .eof-page-division-pl .eof-division-detail-table .eof-col-money {
    width: 18% !important;
}

.ehq3 .ehq3-module-host.is-office .eof-page-ceo .eof-ceo-department-table .eof-col-count {
    width: 112px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-page-ceo .eof-ceo-department-table .eof-col-department,
.ehq3 .ehq3-module-host.is-office .eof-page-division-pl .eof-division-detail-table .eof-col-department {
    width: auto !important;
}

.ehq3 .ehq3-module-host.is-office .eof-page-ceo .eof-ceo-chart-card,
.ehq3 .ehq3-module-host.is-office .eof-page-department-pl .eof-department-chart-card {
    min-height: 360px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-page-ceo .eof-ceo-breakdown-card .eof-table-note {
    padding-inline: 16px !important;
}

@media (max-width: 900px) {
    .ehq3 .ehq3-module-host.is-office .eof-page-header > .eof-toolbar {
        flex: 1 1 100% !important;
        justify-content: flex-start !important;
        margin-left: 0 !important;
        max-width: none !important;
    }

    .ehq3 .ehq3-module-host.is-office .eof-page-header > .eof-toolbar select,
    .ehq3 .ehq3-module-host.is-office .eof-page-header > .eof-toolbar input {
        max-width: none !important;
    }
}

/* Office Transactions polish — neutral classes emitted by the plugin, visual
   density and scanability owned here by the theme. */
.ehq3 .ehq3-module-host.is-office .eof-page-transactions .eof-page-header {
    align-items: center !important;
}

.ehq3 .ehq3-module-host.is-office .eof-page-transactions .eof-page-header .eof-btn-primary {
    min-height: 38px !important;
    padding-inline: 14px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-transactions-toolbar {
    align-items: center !important;
    justify-content: flex-start !important;
    margin-bottom: 12px !important;
    padding: 10px 12px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-transactions-toolbar .eof-toolbar-field {
    align-items: center !important;
    display: inline-flex !important;
    flex-direction: row !important;
    gap: 9px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-transactions-toolbar .eof-toolbar-label {
    color: rgba(255,255,255,0.72) !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
}

.ehq3 .ehq3-module-host.is-office .eof-transactions-toolbar select {
    min-width: 230px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-transactions-table-card {
    border-radius: var(--ehq3-r-sm, 8px) !important;
}

.ehq3 .ehq3-module-host.is-office .eof-transactions-table {
    table-layout: fixed !important;
    min-width: 1040px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-transactions-table th,
.ehq3 .ehq3-module-host.is-office .eof-transactions-table td {
    padding: 7px 9px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-transactions-table .eof-date-col,
.ehq3 .ehq3-module-host.is-office .eof-transactions-table .eof-date-cell {
    width: 92px !important;
    white-space: nowrap !important;
}

.ehq3 .ehq3-module-host.is-office .eof-transactions-table .eof-select-col {
    width: 36px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-transactions-table .eof-money-col,
.ehq3 .ehq3-module-host.is-office .eof-transactions-table .eof-money-cell {
    text-align: right !important;
    width: 105px !important;
    white-space: nowrap !important;
}

.ehq3 .ehq3-module-host.is-office .eof-transactions-table .eof-description-cell,
.ehq3 .ehq3-module-host.is-office .eof-transactions-table .eof-meta-cell {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.ehq3 .ehq3-module-host.is-office .eof-transactions-table .eof-actions-col {
    text-align: right !important;
    width: 176px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-transactions-table .eof-actions {
    flex-wrap: nowrap !important;
}

.ehq3 .ehq3-module-host.is-office .eof-transactions-table .eof-actions .eof-btn-sm {
    min-width: 30px !important;
}

.ehq3 .ehq3-module-host.is-office .eof-page-transactions .eof-pagination {
    margin-bottom: 0 !important;
}

@media (max-width: 900px) {
    .ehq3 .ehq3-module-host.is-office .eof-page-transactions .eof-page-header {
        align-items: flex-start !important;
    }

    .ehq3 .ehq3-module-host.is-office .eof-transactions-toolbar .eof-toolbar-field {
        align-items: stretch !important;
        flex-direction: column !important;
        width: 100% !important;
    }

    .ehq3 .ehq3-module-host.is-office .eof-transactions-toolbar select {
        min-width: 0 !important;
        width: 100% !important;
    }
}

.ehq3 .erh-render-context h1,
.ehq3 .erh-render-context h2,
.ehq3 .erh-render-context h3,
.ehq3 .erh-render-context h4,
.ehq3 .erh-render-context strong,
.ehq3 .erh-render-context b,
.ehq3 .erh-render-context th,
.ehq3 .erh-front-shell h1,
.ehq3 .erh-front-shell h2,
.ehq3 .erh-front-shell h3,
.ehq3 .erh-front-shell strong,
.ehq3 .erh-front-shell b,
.ehq3 .erh-front-shell th {
    color: var(--ehq-ui-text, #fff) !important;
}

.ehq3 .erh-render-context p,
.ehq3 .erh-render-context small,
.ehq3 .erh-render-context em,
.ehq3 .erh-render-context label,
.ehq3 .erh-render-context td,
.ehq3 .erh-render-context .erh-note,
.ehq3 .erh-render-context .erh-muted,
.ehq3 .erh-render-context .erh-kpi-card > div > span,
.ehq3 .erh-render-context .erh-kpi-card small,
.ehq3 .erh-render-context .erh-action-row span,
.ehq3 .erh-render-context .erh-health-item small,
.ehq3 .erh-render-context .erh-top-stores-row,
.ehq3 .erh-render-context .erh-top-payees-row {
    color: var(--ehq-ui-text-muted, #fff) !important;
}

.ehq3 .erh-render-context .ehq-card,
.ehq3 .erh-render-context .ehq-panel,
.ehq3 .erh-render-context .ehq-metric-card,
.ehq3 .erh-render-context .erh-panel,
.ehq3 .erh-render-context .erh-card,
.ehq3 .erh-render-context .erh-section,
.ehq3 .erh-render-context .erh-box,
.ehq3 .erh-render-context .erh-contracts-section,
.ehq3 .erh-render-context .erh-kpi-card,
.ehq3 .erh-render-context .erh-mini-card,
.ehq3 .erh-render-context .erh-health-item,
.ehq3 .erh-render-context .erh-top-payees,
.ehq3 .erh-render-context .erh-top-tracks,
.ehq3 .erh-render-context .erh-top-stores {
    background: var(--ehq-ui-panel, var(--ehq3-card, #0b0e16)) !important;
    border: 1px solid var(--ehq-ui-line, var(--ehq3-line, rgba(255,255,255,0.12))) !important;
    border-radius: var(--ehq3-r-sm, 8px) !important;
    box-shadow: none !important;
    color: var(--ehq-ui-text, #fff) !important;
}

.ehq3 .erh-render-context .erh-kpi-grid,
.ehq3 .erh-render-context .ehq-kpi-grid {
    gap: var(--ehq3-s4, 16px) !important;
}

.ehq3 .erh-render-context .erh-kpi-card {
    min-height: 132px !important;
    padding: var(--ehq3-s5, 20px) !important;
}

.ehq3 .erh-render-context .erh-kpi-card strong {
    display: grid !important;
    gap: 3px !important;
    margin-top: var(--ehq3-s2, 8px) !important;
    font-family: var(--ehq3-font-head, var(--ehq3-font, sans-serif)) !important;
    font-size: clamp(20px, 1.45vw, 28px) !important;
    line-height: 1.08 !important;
    letter-spacing: 0 !important;
}

.ehq3 .erh-render-context .erh-kpi-card strong span {
    display: block !important;
}

.ehq3 .erh-render-context .erh-kpi-card > i,
.ehq3 .erh-render-context .erh-panel-title > .dashicons,
.ehq3 .erh-render-context .erh-section-icon {
    color: var(--ehq3-primary, #f2cf2f) !important;
}

.ehq3 .erh-render-context a:not(.erh-front-nav-link):not(.erh-action-row),
.ehq3 .erh-render-context .ehq-link {
    color: var(--ehq-ui-link, var(--ehq3-primary, #f2cf2f)) !important;
    text-decoration-color: color-mix(in srgb, currentColor 35%, transparent) !important;
}

.ehq3 .erh-render-context .ehq-table-wrap,
.ehq3 .erh-render-context .erh-table-scroll,
.ehq3 .erh-render-context .ehq-table-scroll {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.ehq3 .erh-render-context table,
.ehq3 .erh-render-context .ehq-table,
.ehq3 .erh-render-context .erh-table,
.ehq3 .erh-render-context .erh-imports-table,
.ehq3 .erh-render-context .erh-drawer-table {
    width: 100% !important;
    background: var(--ehq-table-bg, var(--ehq-ui-panel, #0b0e16)) !important;
    border: 1px solid var(--ehq-table-border, var(--ehq-ui-line, rgba(255,255,255,0.12))) !important;
    border-radius: var(--ehq3-r-sm, 8px) !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    color: var(--ehq-table-text, #fff) !important;
    overflow: hidden !important;
}

.ehq3 .erh-render-context table th,
.ehq3 .erh-render-context .ehq-table th,
.ehq3 .erh-render-context .erh-table th,
.ehq3 .erh-render-context .erh-imports-table th,
.ehq3 .erh-render-context .erh-drawer-table th {
    background: var(--ehq-table-head-bg, rgba(255,255,255,0.07)) !important;
    border-color: var(--ehq-table-border, var(--ehq-ui-line, rgba(255,255,255,0.12))) !important;
    color: var(--ehq-table-text, #fff) !important;
    font-family: var(--ehq3-font, inherit) !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
}

.ehq3 .erh-render-context table td,
.ehq3 .erh-render-context .ehq-table td,
.ehq3 .erh-render-context .erh-table td,
.ehq3 .erh-render-context .erh-imports-table td,
.ehq3 .erh-render-context .erh-drawer-table td {
    background: var(--ehq-table-row-bg, rgba(255,255,255,0.025)) !important;
    border-color: var(--ehq-table-border, var(--ehq-ui-line, rgba(255,255,255,0.12))) !important;
    color: var(--ehq-table-text, #fff) !important;
}

.ehq3 .erh-render-context table tr:hover td,
.ehq3 .erh-render-context .ehq-table tr:hover td,
.ehq3 .erh-render-context .erh-table tr:hover td {
    background: var(--ehq-table-hover-bg, rgba(255,255,255,0.075)) !important;
}

.ehq3 .erh-render-context .ehq-button,
.ehq3 .erh-render-context .ehq-btn,
.ehq3 .erh-render-context .erh-button,
.ehq3 .erh-render-context .erh-front-button,
.ehq3 .erh-render-context .erh-action-link,
.ehq3 .erh-render-context button,
.ehq3 .erh-render-context input[type="button"],
.ehq3 .erh-render-context input[type="submit"] {
    min-height: 40px !important;
    border: 1px solid var(--ehq-ui-line, var(--ehq3-line, rgba(255,255,255,0.12))) !important;
    border-radius: var(--ehq3-r-sm, 8px) !important;
    background: var(--ehq-button-bg, rgba(255,255,255,0.07)) !important;
    color: var(--ehq-button-text, #fff) !important;
    box-shadow: none !important;
    font-family: var(--ehq3-font, inherit) !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    text-shadow: none !important;
}

.ehq3 .erh-render-context .ehq-button.is-primary,
.ehq3 .erh-render-context .ehq-btn-primary,
.ehq3 .erh-render-context .erh-button.primary,
.ehq3 .erh-render-context .erh-front-button.is-primary,
.ehq3 .erh-render-context .button-primary,
.ehq3 .erh-render-context button.button-primary,
.ehq3 .erh-render-context input[type="submit"].button-primary {
    background: var(--ehq-button-primary-bg, var(--ehq3-primary, #f2cf2f)) !important;
    border-color: var(--ehq-button-primary-bg, var(--ehq3-primary, #f2cf2f)) !important;
    color: var(--ehq-button-primary-text, var(--ehq3-on-primary, #05070d)) !important;
}

.ehq3 .erh-render-context input,
.ehq3 .erh-render-context select,
.ehq3 .erh-render-context textarea {
    background: var(--ehq-ui-input-bg, var(--ehq3-bg-deep, #05070d)) !important;
    border: 1px solid var(--ehq-ui-line, var(--ehq3-line, rgba(255,255,255,0.12))) !important;
    border-radius: var(--ehq3-r-sm, 8px) !important;
    color: var(--ehq-ui-text, #fff) !important;
    box-shadow: none !important;
}

.ehq3 .erh-render-context input::placeholder,
.ehq3 .erh-render-context textarea::placeholder {
    color: var(--ehq3-text-dim, rgba(255,255,255,0.65)) !important;
}

.ehq3 .erh-render-context .erh-notice,
.ehq3 .erh-render-context .erh-alert,
.ehq3 .erh-render-context .erh-warning,
.ehq3 .erh-render-context .ehq-notice {
    background: var(--ehq-ui-panel-2, var(--ehq3-card-2, #0e1220)) !important;
    border: 1px solid var(--ehq-ui-line, var(--ehq3-line, rgba(255,255,255,0.12))) !important;
    border-radius: var(--ehq3-r-sm, 8px) !important;
    color: var(--ehq-ui-text, #fff) !important;
}

/* v3.0.3 — Distribution dashboard containment.
   The generic .ehq-module-canvas grid is useful for some module shells, but the
   distribution dashboard body is already self-composed. Force it back to a
   single-column flow so KPI cards, charts and tables cannot be auto-placed into
   a narrow right rail by legacy grid rules. */
.ehq3 .ehq-canvas-flow.ehq-module-canvas,
.ehq3 .ehq-canvas-dashboard.ehq-module-canvas,
.ehq3 .erh-front-workspace > .ehq-canvas-dashboard {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: var(--ehq3-s4, 16px) !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
}

.ehq3.ehq-suite-distribution .ehq3-content.ehq3-content-module {
    padding-top: var(--ehq3-s5, 20px) !important;
    padding-left: clamp(14px, 1.35vw, 20px) !important;
    padding-right: clamp(14px, 1.35vw, 20px) !important;
}

.ehq3.ehq-suite-distribution .ehq3-content-module > .erh-front-shell.ehq-module-canvas {
    padding-left: clamp(10px, 0.95vw, 12px) !important;
    padding-right: clamp(10px, 0.95vw, 12px) !important;
}

.ehq3.ehq-suite-distribution .ehq3-module-host.is-distribution {
    margin-top: 0 !important;
}

.ehq3.ehq-suite-distribution .ehq-canvas-dashboard > .erh-actionbar:has(.erh-actionbar-actions:empty) {
    display: none !important;
}

.ehq3 .ehq-canvas-flow.ehq-module-canvas > *,
.ehq3 .ehq-canvas-dashboard.ehq-module-canvas > * {
    grid-column: 1 / -1 !important;
    min-width: 0 !important;
}

.ehq3 .erh-front-shell .erh-front-nav {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: var(--ehq3-s2, 8px) !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: var(--ehq3-s2, 8px) !important;
    background: var(--ehq-ui-panel, var(--ehq3-card, #0b0e16)) !important;
    border: 1px solid var(--ehq-ui-line, var(--ehq3-line, rgba(255,255,255,0.12))) !important;
    border-radius: var(--ehq3-r-sm, 8px) !important;
    box-shadow: none !important;
}

.ehq3 .erh-front-shell .erh-front-nav-link,
.ehq3 .erh-front-shell .erh-front-nav-link:visited {
    background: transparent !important;
    border-color: transparent !important;
    color: var(--ehq-ui-text, #fff) !important;
    flex: 0 0 auto !important;
    font-family: var(--ehq3-font, inherit) !important;
    justify-content: center !important;
    letter-spacing: 0 !important;
    width: auto !important;
}

.ehq3 .erh-front-shell .erh-front-nav-link:hover,
.ehq3 .erh-front-shell .erh-front-nav-link.is-active {
    background: rgba(242, 207, 47, 0.13) !important;
    border-color: rgba(242, 207, 47, 0.45) !important;
    color: var(--ehq3-primary, #f2cf2f) !important;
}

.ehq3 .erh-render-context .erh-actionbar {
    width: 100% !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.ehq3 .erh-render-context .erh-kpi-grid,
.ehq3 .erh-render-context .ehq-kpi-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    gap: var(--ehq3-s4, 16px) !important;
    width: 100% !important;
    margin: 0 !important;
}

@media (min-width: 1280px) {
    .ehq3 .erh-render-context .erh-kpi-grid,
    .ehq3 .erh-render-context .ehq-kpi-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 1600px) {
    .ehq3 .erh-render-context .erh-kpi-grid,
    .ehq3 .erh-render-context .ehq-kpi-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }
}

.ehq3 .erh-render-context .erh-kpi-card {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    min-width: 0 !important;
    min-height: 132px !important;
    padding: var(--ehq3-s5, 20px) !important;
    overflow: hidden !important;
}

.ehq3 .erh-render-context .erh-kpi-card > div {
    min-width: 0 !important;
}

.ehq3 .erh-render-context .erh-kpi-card strong {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
}

.ehq3 .erh-render-context .erh-kpi-card .dashicons {
    display: inline-flex !important;
    flex: 0 0 34px !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px !important;
    height: 34px !important;
    color: var(--ehq3-primary, #f2cf2f) !important;
    background: rgba(242, 207, 47, 0.12) !important;
}

.ehq3 .erh-render-context .erh-catalog-grid,
.ehq3 .erh-render-context .erh-dashboard-panels {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
    gap: var(--ehq3-s4, 16px) !important;
    width: 100% !important;
    margin: 0 !important;
}

.ehq3 .erh-render-context .erh-dashboard-panels {
    grid-template-columns: minmax(0, 1fr) !important;
}

.ehq3 .erh-render-context .erh-dashboard-analytics-row {
    display: grid !important;
    gap: var(--ehq-dashboard-gap, var(--ehq3-s4, 16px)) !important;
    width: 100% !important;
    min-width: 0 !important;
}

.ehq3 .erh-render-context .erh-dashboard-analytics-row-main {
    grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.85fr) minmax(220px, 0.85fr) !important;
}

.ehq3 .erh-render-context .erh-dashboard-analytics-row:not(.erh-dashboard-analytics-row-main) {
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr) !important;
}

.ehq3 .erh-render-context .erh-dashboard-analytics-row .erh-chart-panel {
    margin: 0 !important;
}

.ehq3 .erh-render-context .erh-dashboard-main {
    display: grid !important;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr) !important;
    gap: var(--ehq3-s4, 16px) !important;
    align-items: stretch !important;
    width: 100% !important;
    margin: 0 !important;
}

.ehq3 .erh-render-context .erh-dashboard-main > * {
    min-width: 0 !important;
    max-width: 100% !important;
}

.ehq3 .erh-render-context .erh-earnings-timeline {
    grid-column: 1 / 2 !important;
    grid-row: 1 / 2 !important;
}

.ehq3 .erh-render-context .erh-top-payees {
    grid-column: 2 / 3 !important;
    grid-row: 1 / 2 !important;
}

.ehq3 .erh-render-context .erh-top-tracks {
    grid-column: 1 / 2 !important;
    grid-row: 2 / 3 !important;
}

.ehq3 .erh-render-context .erh-top-stores {
    grid-column: 2 / 3 !important;
    grid-row: 2 / 3 !important;
}

.ehq3 .erh-render-context .erh-top-payees,
.ehq3 .erh-render-context .erh-top-tracks,
.ehq3 .erh-render-context .erh-top-stores,
.ehq3 .erh-render-context .erh-panel {
    overflow: hidden !important;
}

.ehq3 .erh-render-context .erh-table-scroll {
    max-width: 100% !important;
    overflow-x: auto !important;
}

.ehq3 .erh-render-context .erh-action-row {
    background: rgba(255,255,255,0.04) !important;
    border: 1px solid var(--ehq-ui-line, rgba(255,255,255,0.12)) !important;
    color: var(--ehq-ui-text, #fff) !important;
}

/* v3.0.7 — Distribution dashboard polish.
   Theme-owned finishing layer for the dashboard canvas. The plugin still
   provides neutral KPI, panel, chart and table structures; this layer controls
   density, hierarchy and containment. */
.ehq3.ehq-suite-distribution .erh-render-context {
    --ehq-dashboard-gap: var(--ehq3-s4, 16px);
    --ehq-dashboard-pad: var(--ehq3-s5, 20px);
    --ehq-dashboard-pad-sm: var(--ehq3-s4, 16px);
    --ehq-dashboard-card-min: 118px;
    --ehq-dashboard-chart-h: 190px;
}

.ehq3.ehq-suite-distribution .erh-front-workspace {
    margin-top: 0 !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-kpi-card,
.ehq3.ehq-suite-distribution .erh-render-context .erh-front-kpi,
.ehq3.ehq-suite-distribution .erh-render-context .erh-mini-card,
.ehq3.ehq-suite-distribution .erh-render-context .erh-health-item,
.ehq3.ehq-suite-distribution .erh-render-context .erh-panel,
.ehq3.ehq-suite-distribution .erh-render-context .erh-dashboard-table-panel,
.ehq3.ehq-suite-distribution .erh-render-context .erh-chart-panel {
    background: var(--ehq-ui-panel, var(--ehq3-card, #0b0e16)) !important;
    border-color: var(--ehq-ui-line, rgba(255,255,255,0.12)) !important;
    box-shadow: none !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-kpi-card,
.ehq3.ehq-suite-distribution .erh-render-context .erh-front-kpi {
    min-height: var(--ehq-dashboard-card-min) !important;
    padding: var(--ehq-dashboard-pad-sm) !important;
    position: relative !important;
    display: grid !important;
    gap: 7px !important;
    grid-template-columns: minmax(0, 1fr) 34px !important;
    grid-template-rows: auto auto auto !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-kpi-card > div,
.ehq3.ehq-suite-distribution .erh-render-context .erh-front-kpi > div {
    display: grid !important;
    gap: 7px !important;
    padding-right: 42px !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-kpi-card > div > span,
.ehq3.ehq-suite-distribution .erh-render-context .erh-front-kpi > div > span,
.ehq3.ehq-suite-distribution .erh-render-context .erh-mini-card span,
.ehq3.ehq-suite-distribution .erh-render-context .erh-health-item span {
    color: #fff !important;
    font-family: var(--ehq3-font, inherit) !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: 0.06em !important;
    line-height: 1.25 !important;
    text-transform: uppercase !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-kpi-card strong,
.ehq3.ehq-suite-distribution .erh-render-context .erh-front-kpi strong {
    color: #fff !important;
    display: grid !important;
    gap: 2px !important;
    font-size: clamp(22px, 1.5vw, 28px) !important;
    line-height: 1.08 !important;
    margin: 0 !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-kpi-card strong span,
.ehq3.ehq-suite-distribution .erh-render-context .erh-front-kpi strong span {
    color: #fff !important;
    font-family: var(--ehq3-font, inherit) !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-kpi-card small,
.ehq3.ehq-suite-distribution .erh-render-context .erh-front-kpi small,
.ehq3.ehq-suite-distribution .erh-render-context .erh-health-item small,
.ehq3.ehq-suite-distribution .erh-render-context .erh-note {
    color: #fff !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-kpi-card .dashicons,
.ehq3.ehq-suite-distribution .erh-render-context .erh-front-kpi .dashicons {
    position: absolute !important;
    right: var(--ehq3-s4, 16px) !important;
    top: var(--ehq3-s4, 16px) !important;
    align-items: center !important;
    background: rgba(255,255,255,0.08) !important;
    border-radius: 10px !important;
    color: var(--ehq3-text, #fff) !important;
    display: inline-flex !important;
    height: 34px !important;
    justify-content: center !important;
    width: 34px !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-front-kpi.is-accent .dashicons {
    background: var(--ehq3-primary-soft, rgba(242,207,47,0.12)) !important;
    color: var(--ehq3-primary, #f2cf2f) !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-front-kpi.is-warn .dashicons {
    background: rgba(255, 122, 26, 0.12) !important;
    color: #ffb56f !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-kpi-grid,
.ehq3.ehq-suite-distribution .erh-render-context .erh-front-kpi-grid {
    display: grid !important;
    gap: var(--ehq3-s4, 16px) !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
}

@media (min-width: 1280px) {
    .ehq3.ehq-suite-distribution .erh-render-context .erh-kpi-grid,
    .ehq3.ehq-suite-distribution .erh-render-context .erh-front-kpi-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-horizontal-bars {
    display: grid !important;
    gap: var(--ehq3-s3, 12px) !important;
    min-height: var(--ehq-dashboard-chart-h) !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-horizontal-bar {
    border-bottom: 1px solid var(--ehq-ui-line, rgba(255,255,255,0.12)) !important;
    display: grid !important;
    gap: 8px !important;
    padding: 0 2px 10px !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-horizontal-bar:last-child {
    border-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-horizontal-bar-head {
    align-items: baseline !important;
    display: flex !important;
    justify-content: space-between !important;
    gap: var(--ehq3-s2, 8px) !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-horizontal-bar-head strong {
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-horizontal-bar-head span {
    color: var(--ehq3-text-soft, rgba(255,255,255,0.72)) !important;
    flex: 0 0 auto !important;
    font-family: var(--ehq3-font-mono, ui-monospace, monospace) !important;
    font-size: 11px !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-horizontal-bar-track {
    align-items: center !important;
    background: rgba(255,255,255,0.06) !important;
    border: 1px solid var(--ehq-ui-line, rgba(255,255,255,0.12)) !important;
    border-radius: 999px !important;
    display: flex !important;
    height: 10px !important;
    overflow: hidden !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-horizontal-bar-fill {
    background: var(--ehq3-primary, #f2cf2f) !important;
    border-radius: inherit !important;
    height: 100% !important;
    min-width: 2px !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-donut-wrap {
    align-items: center !important;
    display: grid !important;
    gap: var(--ehq3-s3, 12px) !important;
    justify-items: center !important;
    min-height: var(--ehq-dashboard-chart-h) !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-donut {
    --erh-donut-size: 138px;
    aspect-ratio: 1 !important;
    align-items: center !important;
    background:
        conic-gradient(
            var(--ehq3-primary, #f2cf2f) calc(var(--erh-donut-percent, 0) * 1%),
            rgba(255,255,255,0.10) 0
        ) !important;
    border: 1px solid var(--ehq-ui-line, rgba(255,255,255,0.15)) !important;
    border-radius: 999px !important;
    display: grid !important;
    height: var(--erh-donut-size) !important;
    justify-items: center !important;
    padding: 7px !important;
    place-items: center !important;
    position: relative !important;
    width: var(--erh-donut-size) !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-donut::before {
    background: var(--ehq-ui-panel, #0b0e16) !important;
    border-radius: 999px !important;
    content: "";
    inset: 10px !important;
    position: absolute !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-donut-inner {
    align-items: center !important;
    color: #fff !important;
    display: grid !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    inset: 0 !important;
    line-height: 1.15 !important;
    position: relative !important;
    text-align: center !important;
    z-index: 1 !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-donut-inner small {
    color: var(--ehq3-text-soft, rgba(255,255,255,0.72)) !important;
    font-family: var(--ehq3-font-mono, ui-monospace, monospace) !important;
    font-size: 11px !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-donut-legend {
    display: inline-flex !important;
    gap: var(--ehq3-s3, 12px) !important;
    justify-content: center !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-donut-legend span {
    color: var(--ehq3-text-soft, rgba(255,255,255,0.72)) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    font-size: 11px !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-dot {
    border-radius: 999px !important;
    display: inline-block !important;
    height: 9px !important;
    width: 9px !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-dot-covered {
    background: var(--ehq3-primary, #f2cf2f) !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-dot-missing {
    background: rgba(255,255,255,0.28) !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-chart-value {
    color: var(--ehq3-text-soft, rgba(255,255,255,0.72)) !important;
    display: inline-block !important;
    font-size: 11px !important;
    margin-top: 2px !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-dashboard-task-list {
    display: grid !important;
    gap: 7px !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-dashboard-task,
.ehq3 .erh-action-row.erh-dashboard-task {
    align-items: center !important;
    border-radius: var(--ehq3-r-sm, 8px) !important;
    display: grid !important;
    gap: 8px !important;
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    min-height: 42px !important;
    padding: 10px 12px !important;
    text-decoration: none !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-dashboard-task-copy {
    display: grid !important;
    gap: 2px !important;
    min-width: 0 !important;
    overflow: hidden !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-dashboard-task strong,
.ehq3.ehq-suite-distribution .erh-render-context .erh-dashboard-task small {
    overflow-wrap: anywhere !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-dashboard-task-copy strong {
    color: #fff !important;
    display: block !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-dashboard-task-copy small {
    color: var(--ehq3-text-soft, rgba(255,255,255,0.72)) !important;
    display: block !important;
    font-size: 11px !important;
    line-height: 1.3 !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-dashboard-task-value {
    color: #fff !important;
    font-family: var(--ehq3-font-mono, ui-monospace, monospace) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-align: right !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-dashboard-task .dashicons {
    color: rgba(255,255,255,0.72) !important;
    justify-self: end !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-mini-card {
    align-items: center !important;
    display: grid !important;
    gap: var(--ehq3-s2, 8px) !important;
    justify-items: center !important;
    min-height: 90px !important;
    padding: var(--ehq-dashboard-pad-sm) !important;
    text-align: center !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-mini-card strong,
.ehq3.ehq-suite-distribution .erh-render-context .erh-health-item strong {
    color: #fff !important;
    font-size: clamp(22px, 1.6vw, 28px) !important;
    line-height: 1.1 !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-panel,
.ehq3.ehq-suite-distribution .erh-render-context .erh-dashboard-table-panel,
.ehq3.ehq-suite-distribution .erh-render-context .erh-chart-panel {
    padding: var(--ehq-dashboard-pad-sm) !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-panel-heading {
    align-items: center !important;
    display: flex !important;
    gap: var(--ehq3-s3, 12px) !important;
    justify-content: space-between !important;
    margin: 0 0 var(--ehq3-s3, 12px) !important;
    min-width: 0 !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-panel-title {
    align-items: center !important;
    display: flex !important;
    gap: var(--ehq3-s2, 8px) !important;
    min-width: 0 !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-panel-title h2,
.ehq3.ehq-suite-distribution .erh-render-context .erh-section-title {
    color: #fff !important;
    font-size: 14px !important;
    line-height: 1.25 !important;
    margin: 0 !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-panel-title small {
    color: #fff !important;
    display: block !important;
    margin-top: 2px !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-dashboard-main,
.ehq3.ehq-suite-distribution .erh-render-context .erh-dashboard-panels,
.ehq3.ehq-suite-distribution .erh-render-context .erh-catalog-grid,
.ehq3.ehq-suite-distribution .erh-render-context .erh-kpi-grid {
    gap: var(--ehq-dashboard-gap) !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-bar-chart {
    align-items: end !important;
    display: flex !important;
    gap: 7px !important;
    min-height: var(--ehq-dashboard-chart-h) !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    padding: var(--ehq3-s2, 8px) 0 0 !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-bar-item {
    flex: 1 0 42px !important;
    min-width: 42px !important;
    position: relative !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-bar-track {
    align-items: end !important;
    background: rgba(255,255,255,0.06) !important;
    border: 1px solid var(--ehq-ui-line, rgba(255,255,255,0.12)) !important;
    border-radius: 6px !important;
    display: flex !important;
    height: 145px !important;
    overflow: hidden !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-bar-track span,
.ehq3.ehq-suite-distribution .erh-render-context .erh-store-meter span {
    background: var(--ehq3-blue, #5b9dff) !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-bar-item small {
    color: #fff !important;
    display: block !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
    margin-top: 6px !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-store-list,
.ehq3.ehq-suite-distribution .erh-render-context .erh-action-list,
.ehq3.ehq-suite-distribution .erh-render-context .erh-health-grid {
    display: grid !important;
    gap: var(--ehq3-s3, 12px) !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-health-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-store-row,
.ehq3.ehq-suite-distribution .erh-render-context .erh-action-row {
    border-radius: var(--ehq3-r-sm, 8px) !important;
    min-width: 0 !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-store-row {
    align-items: center !important;
    display: grid !important;
    gap: var(--ehq3-s2, 8px) !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-store-row strong,
.ehq3.ehq-suite-distribution .erh-render-context .erh-store-row em {
    color: #fff !important;
    min-width: 0 !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-dashboard-table-scroll {
    border: 0 !important;
    border-radius: var(--ehq3-r-sm, 8px) !important;
    margin: 0 !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-dashboard-table-panel table {
    table-layout: fixed !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-dashboard-table-panel th,
.ehq3.ehq-suite-distribution .erh-render-context .erh-dashboard-table-panel td {
    overflow-wrap: anywhere !important;
    padding: 11px 12px !important;
    vertical-align: top !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-dashboard-table-pager {
    align-items: center !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: var(--ehq3-s2, 8px) !important;
    justify-content: flex-end !important;
    background: rgba(255,255,255,0.04) !important;
    border: 1px solid var(--ehq-ui-line, rgba(255,255,255,0.12)) !important;
    border-radius: var(--ehq3-r-sm, 8px) !important;
    padding: 8px !important;
    margin-top: var(--ehq3-s3, 12px) !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-dashboard-table-pager span {
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    margin-right: auto !important;
    opacity: 0.85 !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-dashboard-table-pager button {
    border-radius: var(--ehq3-r-sm, 8px) !important;
    min-height: 34px !important;
    padding: 0 var(--ehq3-s3, 12px) !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-dashboard-table-pager button[disabled] {
    color: rgba(255,255,255,0.38) !important;
    opacity: 0.7 !important;
    cursor: not-allowed !important;
}

/* v3.0.8 — Dashboard finish pass.
   Balance the first viewport: denser nav, four-column KPI rhythm on common
   desktop widths, and tighter card/panel heights without touching data output. */
.ehq3.ehq-suite-distribution .erh-front-shell .erh-front-nav {
    align-items: center !important;
    gap: 6px !important;
    padding: 7px 8px !important;
}

.ehq3.ehq-suite-distribution .erh-front-shell .erh-front-nav-link,
.ehq3.ehq-suite-distribution .erh-front-shell .erh-front-nav-link:visited {
    align-items: center !important;
    display: inline-flex !important;
    gap: 6px !important;
    min-height: 32px !important;
    padding: 6px 8px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

.ehq3.ehq-suite-distribution .erh-front-shell .erh-front-nav-link .dashicons {
    font-size: 15px !important;
    height: 15px !important;
    width: 15px !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-kpi-grid,
.ehq3.ehq-suite-distribution .erh-render-context .ehq-kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)) !important;
}

@media (min-width: 1280px) {
    .ehq3.ehq-suite-distribution .erh-render-context .erh-kpi-grid,
    .ehq3.ehq-suite-distribution .erh-render-context .ehq-kpi-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 1900px) {
    .ehq3.ehq-suite-distribution .erh-render-context .erh-kpi-grid,
    .ehq3.ehq-suite-distribution .erh-render-context .ehq-kpi-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-kpi-card {
    min-height: 112px !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-mini-card {
    min-height: 82px !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-catalog-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-panel,
.ehq3.ehq-suite-distribution .erh-render-context .erh-dashboard-table-panel,
.ehq3.ehq-suite-distribution .erh-render-context .erh-chart-panel {
    min-width: 0 !important;
}

@media (max-width: 900px) {
    .ehq3.ehq-suite-distribution .erh-render-context .erh-catalog-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
    }
}

@media (max-width: 1180px) {
    .ehq3 .erh-render-context .erh-dashboard-main,
    .ehq3 .erh-render-context .erh-dashboard-panels {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .ehq3 .erh-render-context .erh-dashboard-analytics-row-main,
    .ehq3 .erh-render-context .erh-dashboard-analytics-row:not(.erh-dashboard-analytics-row-main) {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .ehq3 .erh-render-context .erh-earnings-timeline,
    .ehq3 .erh-render-context .erh-top-payees,
    .ehq3 .erh-render-context .erh-top-tracks,
    .ehq3 .erh-render-context .erh-top-stores {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
    }
}

/* v3.0.34 — Distribution module canvas cleanup.
   Keep non-dashboard distribution pages in one clean module flow. Several
   legacy pages output note/filter/table siblings directly in the canvas; the
   old generic canvas grid could place filters and tables in a narrow right
   rail and expose light admin-era form surfaces. */
.ehq3.ehq-suite-distribution .erh-render-context.ehq-module-canvas {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: var(--ehq3-s4, 16px) !important;
    max-width: none !important;
    min-width: 0 !important;
    width: 100% !important;
}

.ehq3.ehq-suite-distribution .erh-render-context.ehq-module-canvas > * {
    grid-column: 1 / -1 !important;
    min-width: 0 !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-filter-toolbar,
.ehq3.ehq-suite-distribution .erh-render-context .erh-toolbar {
    align-items: end !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    display: grid !important;
    gap: var(--ehq3-s3, 12px) !important;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-filter-toolbar label,
.ehq3.ehq-suite-distribution .erh-render-context .erh-toolbar label {
    color: #fff !important;
    display: grid !important;
    gap: 6px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em !important;
    line-height: 1.25 !important;
    margin: 0 !important;
    min-width: 0 !important;
    text-transform: uppercase !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-filter-toolbar input,
.ehq3.ehq-suite-distribution .erh-render-context .erh-filter-toolbar select,
.ehq3.ehq-suite-distribution .erh-render-context .erh-toolbar input,
.ehq3.ehq-suite-distribution .erh-render-context .erh-toolbar select {
    min-height: 40px !important;
    width: 100% !important;
}

.ehq3.ehq-suite-distribution .erh-render-context.erh-aliases-page .erh-note {
    max-width: 110ch !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-aliases-table {
    min-width: 980px !important;
}

/* v3.0.43 — Distribution page-by-page polish.
   Adds page-specific rhythm for every Distribution module so empty states,
   bulk bars, filters and tables align to the same cockpit geometry. */
.ehq3.ehq-suite-distribution .erh-page-hero {
    background: var(--ehq-ui-card, var(--ehq3-card, #0b0e16)) !important;
    border: 1px solid var(--ehq-ui-line, var(--ehq3-line, rgba(255,255,255,0.12))) !important;
    border-radius: var(--ehq3-r-sm, 8px) !important;
    display: grid !important;
    gap: var(--ehq3-s2, 8px) !important;
    margin: 0 0 var(--ehq3-s4, 16px) !important;
    padding: var(--ehq3-s4, 16px) !important;
}

.ehq3.ehq-suite-distribution .erh-page-summary-cards {
    gap: var(--ehq3-s3, 12px) !important;
    margin: 0 0 var(--ehq3-s4, 16px) !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-filter-toolbar,
.ehq3.ehq-suite-distribution .erh-render-context .erh-toolbar,
.ehq3.ehq-suite-distribution .erh-render-context .erh-bulk-toolbar,
.ehq3.ehq-suite-distribution .erh-render-context .erh-toolbar-tight {
    align-items: center !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: var(--ehq3-s2, 8px) !important;
    width: 100% !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-toolbar label,
.ehq3.ehq-suite-distribution .erh-render-context .erh-filter-toolbar label {
    margin: 0 !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-bulk-bar {
    align-items: center !important;
    background: rgba(255,255,255,0.025) !important;
    border: 1px solid var(--ehq-ui-line, rgba(255,255,255,0.12)) !important;
    border-radius: var(--ehq3-r-sm, 8px) !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: var(--ehq3-s2, 8px) !important;
    margin: 0 0 var(--ehq3-s3, 12px) !important;
    padding: var(--ehq3-s3, 12px) !important;
}

.ehq3.ehq-suite-distribution .erh-render-context .erh-bulk-count {
    color: var(--ehq-ui-text-muted, rgba(255,255,255,0.85)) !important;
    flex: 1 1 auto !important;
    font-size: 12px !important;
    letter-spacing: 0.03em !important;
}

.ehq3.ehq-suite-distribution .erh-catalog-page .erh-filter-toolbar,
.ehq3.ehq-suite-distribution .erh-mapping-page .erh-mapping-toolbar {
    align-items: end !important;
    display: grid !important;
    gap: var(--ehq3-s2, 8px) !important;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important;
    width: 100% !important;
}

.ehq3.ehq-suite-distribution .erh-catalog-page .erh-table-scroll,
.ehq3.ehq-suite-distribution .erh-mapping-page .erh-table-scroll {
    border-radius: var(--ehq3-r-sm, 8px) !important;
}

.ehq3.ehq-suite-distribution .erh-catalog-page .erh-catalog-table-scroll {
    max-height: min(70vh, 980px) !important;
    overflow: auto !important;
}

.ehq3.ehq-suite-distribution .erh-catalog-table td.col-check,
.ehq3.ehq-suite-distribution .erh-catalog-table th.col-check,
.ehq3.ehq-suite-distribution .erh-mapping-table th.col-check,
.ehq3.ehq-suite-distribution .erh-mapping-table td.col-check {
    text-align: center !important;
    width: 38px !important;
}

.ehq3.ehq-suite-distribution .erh-catalog-page .erh-badge {
    font-weight: 800 !important;
}

.ehq3.ehq-suite-distribution .erh-aliases-page .erh-table-scroll {
    border-radius: var(--ehq3-r-sm, 8px) !important;
    overflow: auto !important;
}

.ehq3.ehq-suite-distribution .erh-duplicates-page .erh-two {
    align-items: start !important;
    display: grid !important;
    gap: var(--ehq3-s4, 16px) !important;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)) !important;
}

.ehq3.ehq-suite-distribution .erh-duplicates-page .erh-note {
    max-width: 75ch !important;
}

.ehq3.ehq-suite-distribution .erh-splits-expenses-page .erh-panel {
    padding: var(--ehq3-s3, 12px) !important;
}

.ehq3.ehq-suite-distribution .erh-contracts-page .erh-mini-cards {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
    margin-bottom: var(--ehq3-s4, 16px) !important;
}

.ehq3.ehq-suite-distribution .erh-contracts-page .erh-contracts-section {
    display: grid !important;
    gap: var(--ehq3-s3, 12px) !important;
}

.ehq3.ehq-suite-distribution .erh-contracts-page .erh-contracts-section-head,
.ehq3.ehq-suite-distribution .erh-contracts-page .erh-contracts-actionbar {
    align-items: center !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: var(--ehq3-s3, 12px) !important;
}

.ehq3.ehq-suite-distribution .erh-contracts-page .erh-contracts-section-title,
.ehq3.ehq-suite-distribution .erh-contracts-page .erh-contracts-section-actions {
    width: auto !important;
}

.ehq3.ehq-suite-distribution .erh-contracts-page .erh-contracts-actionbar label,
.ehq3.ehq-suite-distribution .erh-actionbar label,
.ehq3.ehq-suite-distribution .erh-audit-page .erh-audit-toolbar label,
.ehq3.ehq-suite-distribution .erh-payments-page .erh-inline-filter label,
.ehq3.ehq-suite-distribution .erh-revenue-page .erh-filter-toolbar label {
    min-width: 0 !important;
}

.ehq3.ehq-suite-distribution .erh-contracts-page .erh-contracts-actionbar .erh-contracts-search,
.ehq3.ehq-suite-distribution .erh-contracts-page .erh-contracts-actionbar .erh-contracts-statusfilter {
    flex: 1 1 220px !important;
    min-width: 0 !important;
}

.ehq3.ehq-suite-distribution .erh-contracts-page .erh-actions,
.ehq3.ehq-suite-distribution .erh-statements-page .erh-actions,
.ehq3.ehq-suite-distribution .erh-suspense-page .erh-actions {
    align-items: center !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: var(--ehq3-s2, 8px) !important;
}

.ehq3.ehq-suite-distribution .erh-contracts-page .erh-state,
.ehq3.ehq-suite-distribution .erh-allocations-page .erh-state,
.ehq3.ehq-suite-distribution .erh-revenue-page .erh-state,
.ehq3.ehq-suite-distribution .erh-suspense-page .erh-state,
.ehq3.ehq-suite-distribution .erh-statements-page .erh-state {
    background: transparent !important;
    border: 1px dashed var(--ehq-ui-line, rgba(255,255,255,0.18)) !important;
    padding: var(--ehq3-s5, 20px) !important;
}

.ehq3.ehq-suite-distribution .erh-allocations-page .erh-mini-cards,
.ehq3.ehq-suite-distribution .erh-statements-page .erh-mini-cards,
.ehq3.ehq-suite-distribution .erh-payments-page .erh-mini-cards {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
}

.ehq3.ehq-suite-distribution .erh-allocations-page .erh-toolbar,
.ehq3.ehq-suite-distribution .erh-suspense-page .erh-filter-toolbar,
.ehq3.ehq-suite-distribution .erh-statements-page .erh-filter-toolbar,
.ehq3.ehq-suite-distribution .erh-payments-page .erh-filter-toolbar,
.ehq3.ehq-suite-distribution .erh-revenue-page .erh-filter-toolbar,
.ehq3.ehq-suite-distribution .erh-audit-page .erh-filter-toolbar,
.ehq3.ehq-suite-distribution .erh-settings-page .erh-panel {
    margin-bottom: var(--ehq3-s3, 12px) !important;
}

.ehq3.ehq-suite-distribution .erh-payments-page .erh-inline-filter {
    max-width: 360px !important;
}

.ehq3.ehq-suite-distribution .erh-payments-page .erh-inline-filter label {
    width: 100% !important;
}

.ehq3.ehq-suite-distribution .erh-revenue-page .erh-toolbar + .erh-toolbar {
    margin-top: var(--ehq3-s2, 8px) !important;
}

.ehq3.ehq-suite-distribution .erh-audit-page .erh-audit-toolbar {
    align-items: end !important;
}

.ehq3.ehq-suite-distribution .erh-audit-page .erh-audit-toolbar label {
    min-width: 150px !important;
}

.ehq3.ehq-suite-distribution .erh-settings-page .erh-panel {
    gap: var(--ehq3-s2, 8px) !important;
}

@media (max-width: 980px) {
    .ehq3.ehq-suite-distribution .erh-catalog-page .erh-filter-toolbar,
    .ehq3.ehq-suite-distribution .erh-mapping-page .erh-mapping-toolbar {
        grid-template-columns: 1fr !important;
    }

    .ehq3.ehq-suite-distribution .erh-page-hero {
        padding: var(--ehq3-s3, 12px) !important;
    }
}

/* v3.0.15 — Shared drawer/window dark integration.
   The drawer shell is appended to <body>, so keep these selectors outside the
   module canvas and force every plugin window back onto the cockpit tokens. */
body.ehq3 .erh-drawer-shell .erh-drawer,
body.ehq3 .erh-drawer-shell .ehq-drawer {
    background: var(--ehq3-bg-panel, #0b0f17) !important;
    border-left: 1px solid var(--ehq3-line, rgba(255,255,255,0.12)) !important;
    box-shadow: -24px 0 64px rgba(0,0,0,0.55) !important;
    color: var(--ehq3-text, #fff) !important;
}

body.ehq3 .erh-drawer-shell .erh-drawer-form {
    background: transparent !important;
    color: inherit !important;
}

body.ehq3 .erh-drawer-shell .erh-drawer-head,
body.ehq3 .erh-drawer-shell .ehq-drawer-head,
body.ehq3 .erh-drawer-shell .erh-drawer-foot,
body.ehq3 .erh-drawer-shell .ehq-drawer-foot {
    background: rgba(255,255,255,0.035) !important;
    border-color: var(--ehq3-line, rgba(255,255,255,0.12)) !important;
    color: var(--ehq3-text, #fff) !important;
}

body.ehq3 .erh-drawer-shell .erh-drawer-body,
body.ehq3 .erh-drawer-shell .ehq-drawer-body {
    background: var(--ehq3-bg-panel, #0b0f17) !important;
    color: var(--ehq3-text, #fff) !important;
}

body.ehq3 .erh-drawer-shell .erh-drawer-title,
body.ehq3 .erh-drawer-shell h2,
body.ehq3 .erh-drawer-shell h3,
body.ehq3 .erh-drawer-shell strong,
body.ehq3 .erh-drawer-shell label {
    color: var(--ehq3-text, #fff) !important;
}

body.ehq3 .erh-drawer-shell .erh-note,
body.ehq3 .erh-drawer-shell p,
body.ehq3 .erh-drawer-shell .ehq-muted,
body.ehq3 .erh-drawer-shell [data-erh-drawer-subtitle-el] {
    color: rgba(255,255,255,0.74) !important;
}

body.ehq3 .erh-drawer-shell .erh-detail-grid {
    display: grid !important;
    gap: 10px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body.ehq3 .erh-drawer-shell .erh-detail-grid > div {
    background: rgba(255,255,255,0.045) !important;
    border: 1px solid var(--ehq3-line, rgba(255,255,255,0.12)) !important;
    border-radius: var(--ehq3-r-sm, 8px) !important;
    color: var(--ehq3-text, #fff) !important;
    min-width: 0 !important;
    padding: 12px !important;
}

body.ehq3 .erh-drawer-shell .erh-detail-grid > div > strong {
    color: rgba(255,255,255,0.64) !important;
    display: block !important;
    font-size: 10.5px !important;
    font-weight: 800 !important;
    letter-spacing: 0.05em !important;
    margin-bottom: 5px !important;
    text-transform: uppercase !important;
}

body.ehq3 .erh-drawer-shell .erh-detail-grid > div > div {
    color: var(--ehq3-text, #fff) !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
    overflow-wrap: anywhere !important;
}

body.ehq3 .erh-drawer-shell .erh-detail-grid .erh-detail-item-file {
    grid-column: 1 / -1 !important;
}

body.ehq3 .erh-drawer-shell .erh-detail-grid .erh-detail-item-file > div {
    font-family: var(--ehq3-font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace) !important;
    font-size: 12.5px !important;
    line-height: 1.45 !important;
    overflow-wrap: anywhere !important;
}

body.ehq3 .erh-drawer-shell input,
body.ehq3 .erh-drawer-shell select,
body.ehq3 .erh-drawer-shell textarea {
    background: var(--ehq3-bg-deep, #070a10) !important;
    border: 1px solid var(--ehq3-line, rgba(255,255,255,0.12)) !important;
    color: var(--ehq3-text, #fff) !important;
}

body.ehq3 .erh-drawer-shell .ehq-btn,
body.ehq3 .erh-drawer-shell .btn {
    align-items: center !important;
    border-radius: var(--ehq3-r-sm, 8px) !important;
    display: inline-flex !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    gap: 7px !important;
    justify-content: center !important;
    min-height: 38px !important;
    padding: 0 14px !important;
}

body.ehq3 .erh-drawer-shell .ehq-btn-secondary,
body.ehq3 .erh-drawer-shell .btn-secondary,
body.ehq3 .erh-drawer-shell .ehq-btn-ghost,
body.ehq3 .erh-drawer-shell .btn-ghost {
    background: rgba(255,255,255,0.07) !important;
    border: 1px solid var(--ehq3-line, rgba(255,255,255,0.12)) !important;
    color: var(--ehq3-text, #fff) !important;
}

body.ehq3 .erh-drawer-shell .ehq-btn-primary,
body.ehq3 .erh-drawer-shell .btn-primary {
    background: var(--ehq3-primary, #f2cf2f) !important;
    border: 1px solid var(--ehq3-primary, #f2cf2f) !important;
    color: var(--ehq3-on-primary, #070a10) !important;
}

body.ehq3 .erh-drawer-shell .ehq-btn-danger,
body.ehq3 .erh-drawer-shell .btn-danger {
    background: rgba(255,74,103,0.12) !important;
    border: 1px solid rgba(255,74,103,0.32) !important;
    color: #ffd6de !important;
}

/* v3.0.37 — Distribution legacy modal/drawer dark integration.
   These catalog and contracts windows are still emitted by the plugin UI
   layer, sometimes directly under <body>, so theme tokens must catch them
   outside the module canvas too. */
body.ehq3 .erh-modal,
body.ehq3.ehq-suite-distribution .erh-modal {
    background: rgba(0, 0, 0, 0.72) !important;
    backdrop-filter: blur(8px) !important;
    color: var(--ehq3-text, #fff) !important;
}

body.ehq3 .erh-modal-dialog,
body.ehq3 .erh-modal-card,
body.ehq3.ehq-suite-distribution .erh-modal-dialog,
body.ehq3.ehq-suite-distribution .erh-modal-card,
body.ehq3.ehq-suite-distribution .erh-drawer,
body.ehq3.ehq-suite-distribution .ehq-drawer,
body.ehq3.ehq-suite-distribution .erh-state {
    background: var(--ehq3-bg-panel, #0b0f17) !important;
    border: 1px solid var(--ehq3-line, rgba(255,255,255,0.12)) !important;
    box-shadow: 0 28px 80px rgba(0,0,0,0.56) !important;
    color: var(--ehq3-text, #fff) !important;
}

body.ehq3 .erh-modal-card,
body.ehq3 .erh-modal-dialog,
body.ehq3.ehq-suite-distribution .erh-drawer {
    border-radius: var(--ehq3-r-md, 12px) !important;
    max-height: min(88vh, 820px) !important;
}

body.ehq3 .erh-modal-head,
body.ehq3 .erh-modal-actions,
body.ehq3.ehq-suite-distribution .erh-modal-head,
body.ehq3.ehq-suite-distribution .erh-modal-actions,
body.ehq3.ehq-suite-distribution .erh-drawer-head,
body.ehq3.ehq-suite-distribution .erh-drawer-foot,
body.ehq3.ehq-suite-distribution .ehq-drawer-head,
body.ehq3.ehq-suite-distribution .ehq-drawer-foot {
    background: rgba(255,255,255,0.035) !important;
    border-color: var(--ehq3-line, rgba(255,255,255,0.12)) !important;
    color: var(--ehq3-text, #fff) !important;
}

body.ehq3 .erh-modal-actions,
body.ehq3.ehq-suite-distribution .erh-drawer-foot {
    bottom: 0;
    position: sticky;
    z-index: 2;
}

body.ehq3 .erh-modal-body,
body.ehq3.ehq-suite-distribution .erh-modal-body,
body.ehq3.ehq-suite-distribution .erh-drawer-body,
body.ehq3.ehq-suite-distribution .ehq-drawer-body {
    background: transparent !important;
    color: var(--ehq3-text, #fff) !important;
}

body.ehq3 .erh-modal h1,
body.ehq3 .erh-modal h2,
body.ehq3 .erh-modal h3,
body.ehq3 .erh-modal h4,
body.ehq3 .erh-modal label,
body.ehq3 .erh-modal strong,
body.ehq3.ehq-suite-distribution .erh-drawer h1,
body.ehq3.ehq-suite-distribution .erh-drawer h2,
body.ehq3.ehq-suite-distribution .erh-drawer h3,
body.ehq3.ehq-suite-distribution .erh-drawer h4,
body.ehq3.ehq-suite-distribution .erh-drawer label,
body.ehq3.ehq-suite-distribution .erh-drawer strong,
body.ehq3.ehq-suite-distribution .erh-state strong {
    color: var(--ehq3-text, #fff) !important;
}

body.ehq3 .erh-modal p,
body.ehq3 .erh-modal small,
body.ehq3 .erh-modal .description,
body.ehq3 .erh-modal .erh-note,
body.ehq3.ehq-suite-distribution .erh-drawer p,
body.ehq3.ehq-suite-distribution .erh-drawer small,
body.ehq3.ehq-suite-distribution .erh-drawer .description,
body.ehq3.ehq-suite-distribution .erh-drawer .erh-note,
body.ehq3.ehq-suite-distribution .erh-state,
body.ehq3.ehq-suite-distribution .erh-state p {
    color: rgba(255,255,255,0.76) !important;
}

body.ehq3 .erh-modal input,
body.ehq3 .erh-modal select,
body.ehq3 .erh-modal textarea,
body.ehq3.ehq-suite-distribution .erh-drawer input,
body.ehq3.ehq-suite-distribution .erh-drawer select,
body.ehq3.ehq-suite-distribution .erh-drawer textarea {
    background: var(--ehq3-bg-deep, #070a10) !important;
    border: 1px solid var(--ehq3-line, rgba(255,255,255,0.12)) !important;
    color: var(--ehq3-text, #fff) !important;
}

body.ehq3 .erh-modal input::placeholder,
body.ehq3 .erh-modal textarea::placeholder,
body.ehq3.ehq-suite-distribution .erh-drawer input::placeholder,
body.ehq3.ehq-suite-distribution .erh-drawer textarea::placeholder {
    color: rgba(255,255,255,0.46) !important;
}

body.ehq3 .erh-modal table,
body.ehq3.ehq-suite-distribution .erh-drawer table {
    background: transparent !important;
    color: var(--ehq3-text, #fff) !important;
}

body.ehq3 .erh-modal th,
body.ehq3 .erh-modal td,
body.ehq3.ehq-suite-distribution .erh-drawer th,
body.ehq3.ehq-suite-distribution .erh-drawer td {
    border-color: var(--ehq3-line, rgba(255,255,255,0.12)) !important;
    color: var(--ehq3-text, #fff) !important;
}

body.ehq3 .erh-modal .button,
body.ehq3 .erh-modal button,
body.ehq3.ehq-suite-distribution .erh-drawer .button,
body.ehq3.ehq-suite-distribution .erh-drawer button {
    border-radius: var(--ehq3-r-sm, 8px) !important;
    font-weight: 800 !important;
}

body.ehq3 .erh-modal .button:not(.button-primary):not(.erh-danger),
body.ehq3 .erh-modal button:not(.button-primary):not(.erh-danger),
body.ehq3.ehq-suite-distribution .erh-drawer .button:not(.button-primary):not(.erh-danger),
body.ehq3.ehq-suite-distribution .erh-drawer button:not(.button-primary):not(.erh-danger) {
    background: rgba(255,255,255,0.07) !important;
    border: 1px solid var(--ehq3-line, rgba(255,255,255,0.12)) !important;
    color: var(--ehq3-text, #fff) !important;
}

body.ehq3 .erh-modal .button-primary,
body.ehq3 .erh-modal button[type="submit"],
body.ehq3.ehq-suite-distribution .erh-drawer .button-primary,
body.ehq3.ehq-suite-distribution .erh-drawer button[type="submit"] {
    background: var(--ehq3-primary, #f2cf2f) !important;
    border-color: var(--ehq3-primary, #f2cf2f) !important;
    color: var(--ehq3-on-primary, #070a10) !important;
}

body.ehq3 .erh-render-context :is(.ehq-btn, .ehq-button, button, input[type="button"], input[type="submit"]):hover,
body.ehq3 .erh-modal :is(.ehq-btn, button):hover,
body.ehq3.ehq-suite-distribution .erh-drawer :is(.ehq-btn, button):hover {
    border-color: var(--ehq3-primary, #f2cf2f) !important;
    box-shadow: 0 0 0 3px rgba(242, 207, 47, 0.22) !important;
    filter: brightness(1.1);
    transform: translateY(-1px);
}

body.ehq3 .erh-render-context :is(.ehq-btn, .ehq-button, button, input[type="button"], input[type="submit"]):focus-visible,
body.ehq3 .erh-modal :is(.ehq-btn, button):focus-visible,
body.ehq3.ehq-suite-distribution .erh-drawer :is(.ehq-btn, button):focus-visible {
    outline: 2px solid var(--ehq3-primary, #f2cf2f) !important;
    outline-offset: 2px !important;
}

@media (max-width: 640px) {
    body.ehq3 .erh-drawer-shell .erh-detail-grid {
        grid-template-columns: 1fr !important;
    }
}

/* WordPress admin Distribution canvas ---------------------------------- */
body.ehq-admin-distribution {
    --ehq-admin-bg: #05070d;
    --ehq-admin-panel: rgba(9, 13, 22, 0.9);
    --ehq-admin-panel-soft: rgba(255, 255, 255, 0.055);
    --ehq-admin-line: rgba(255, 255, 255, 0.12);
    --ehq-admin-text: #f8fafc;
    --ehq-admin-muted: rgba(248, 250, 252, 0.68);
    --ehq-admin-primary: #f2cf2f;
    --ehq-admin-on-primary: #070a10;
    background:
        radial-gradient(circle at 8% 0%, rgba(242, 207, 47, 0.16), transparent 30rem),
        radial-gradient(circle at 92% 10%, rgba(56, 189, 248, 0.1), transparent 26rem),
        linear-gradient(135deg, #05070d 0%, #0c111c 54%, #111827 100%) !important;
}

body.ehq-admin-distribution #wpwrap,
body.ehq-admin-distribution #wpcontent,
body.ehq-admin-distribution #wpbody,
body.ehq-admin-distribution #wpbody-content {
    background: transparent !important;
}

body.ehq-admin-distribution #wpcontent {
    padding-left: 0;
}

body.ehq-admin-distribution #wpbody-content {
    box-sizing: border-box;
    min-height: calc(100vh - 32px);
    padding: clamp(16px, 2vw, 28px) clamp(16px, 2.4vw, 34px) 56px;
}

body.ehq-admin-distribution #wpbody-content > .wrap,
body.ehq-admin-distribution .wrap {
    margin: 0;
}

body.ehq-admin-distribution #screen-meta-links {
    margin: 0 0 12px;
}

body.ehq-admin-distribution .notice,
body.ehq-admin-distribution .updated,
body.ehq-admin-distribution .error {
    background: rgba(255, 255, 255, 0.94);
    border-radius: 14px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
    margin: 0 0 14px;
}

body.ehq-admin-distribution #wpbody-content > .erh-render-context,
body.ehq-admin-distribution #wpbody-content > .wrap > .erh-render-context,
body.ehq-admin-distribution .erh-wrap.erh-render-context {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.035)),
        var(--ehq-admin-panel);
    border: 1px solid var(--ehq-admin-line);
    border-radius: clamp(20px, 2.4vw, 34px);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.36);
    box-sizing: border-box;
    color: var(--ehq-admin-text);
    margin: 0;
    max-width: none;
    overflow: clip;
    padding: clamp(18px, 2.5vw, 34px);
}

body.ehq-admin-distribution .erh-render-context .erh-render-context {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    margin: 0;
    padding: 0;
}

body.ehq-admin-distribution .erh-render-context script[type="application/json"] {
    display: none !important;
}

body.ehq-admin-distribution .erh-render-context h1,
body.ehq-admin-distribution .erh-render-context h2,
body.ehq-admin-distribution .erh-render-context h3,
body.ehq-admin-distribution .erh-render-context h4,
body.ehq-admin-distribution .erh-render-context label,
body.ehq-admin-distribution .erh-render-context strong {
    color: var(--ehq-admin-text) !important;
}

body.ehq-admin-distribution .erh-render-context p,
body.ehq-admin-distribution .erh-render-context small,
body.ehq-admin-distribution .erh-render-context .description,
body.ehq-admin-distribution .erh-render-context .erh-note,
body.ehq-admin-distribution .erh-render-context .ehq-muted,
body.ehq-admin-distribution .erh-render-context .erh-muted {
    color: var(--ehq-admin-muted) !important;
}

body.ehq-admin-distribution .erh-render-context :is(.ehq-card, .ehq-panel, .erh-panel, .erh-card, .erh-mini-card, .erh-kpi-card, .erh-stat-card, .erh-box) {
    background: var(--ehq-admin-panel-soft) !important;
    border: 1px solid var(--ehq-admin-line) !important;
    border-radius: 18px !important;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22) !important;
    color: var(--ehq-admin-text) !important;
}

body.ehq-admin-distribution .erh-render-context :is(.nav-tab-wrapper, .erh-tabs, .erh-module-nav, .subsubsub) {
    align-items: center;
    border: 0 !important;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 20px;
    padding: 0;
}

body.ehq-admin-distribution .erh-render-context :is(.nav-tab, .erh-tab, .erh-module-nav a, .subsubsub a) {
    background: rgba(255, 255, 255, 0.075) !important;
    border: 1px solid var(--ehq-admin-line) !important;
    border-radius: 999px !important;
    color: var(--ehq-admin-text) !important;
    display: inline-flex;
    font-weight: 800;
    line-height: 1;
    margin: 0 !important;
    padding: 10px 14px !important;
    text-decoration: none !important;
}

body.ehq-admin-distribution .erh-render-context :is(.nav-tab-active, .erh-tab.is-active, .erh-module-nav a.is-active, .subsubsub a.current),
body.ehq-admin-distribution .erh-render-context :is(.nav-tab, .erh-tab, .erh-module-nav a, .subsubsub a):hover {
    background: var(--ehq-admin-primary) !important;
    border-color: var(--ehq-admin-primary) !important;
    color: var(--ehq-admin-on-primary) !important;
}

body.ehq-admin-distribution .erh-render-context :is(.widefat, .wp-list-table, table) {
    background: rgba(7, 10, 16, 0.62) !important;
    border: 1px solid var(--ehq-admin-line) !important;
    border-collapse: separate !important;
    border-radius: 18px !important;
    border-spacing: 0 !important;
    color: var(--ehq-admin-text) !important;
    overflow: hidden;
}

body.ehq-admin-distribution .erh-render-context :is(.widefat, .wp-list-table, table) th,
body.ehq-admin-distribution .erh-render-context :is(.widefat, .wp-list-table, table) td {
    border-color: var(--ehq-admin-line) !important;
    color: var(--ehq-admin-text) !important;
    vertical-align: middle;
}

body.ehq-admin-distribution .erh-render-context :is(.widefat, .wp-list-table, table) thead th,
body.ehq-admin-distribution .erh-render-context :is(.widefat, .wp-list-table, table) tfoot th {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--ehq-admin-text) !important;
    font-weight: 900;
}

body.ehq-admin-distribution .erh-render-context :is(.widefat, .wp-list-table, table) tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.035) !important;
}

body.ehq-admin-distribution .erh-render-context :is(input[type="text"], input[type="search"], input[type="number"], input[type="email"], input[type="url"], input[type="date"], select, textarea) {
    background: rgba(3, 6, 12, 0.76) !important;
    border: 1px solid var(--ehq-admin-line) !important;
    border-radius: 12px !important;
    color: var(--ehq-admin-text) !important;
    min-height: 38px;
}

body.ehq-admin-distribution .erh-render-context :is(input, textarea)::placeholder {
    color: rgba(248, 250, 252, 0.44) !important;
}

body.ehq-admin-distribution .erh-render-context :is(.button, .ehq-btn, .ehq-button, button, input[type="button"], input[type="submit"]) {
    border-radius: 12px !important;
    font-weight: 850 !important;
    min-height: 36px;
    transition: box-shadow 0.18s ease, transform 0.18s ease, filter 0.18s ease;
}

body.ehq-admin-distribution .erh-render-context :is(.button:not(.button-primary):not(.erh-danger), .ehq-btn:not(.ehq-btn-primary), .ehq-button:not(.ehq-button-primary), button:not(.button-primary):not([type="submit"])) {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid var(--ehq-admin-line) !important;
    color: var(--ehq-admin-text) !important;
}

body.ehq-admin-distribution .erh-render-context :is(.button-primary, .ehq-btn-primary, .ehq-button-primary, button[type="submit"], input[type="submit"]) {
    background: var(--ehq-admin-primary) !important;
    border-color: var(--ehq-admin-primary) !important;
    color: var(--ehq-admin-on-primary) !important;
}

body.ehq-admin-distribution .erh-render-context :is(.button, .ehq-btn, .ehq-button, button, input[type="button"], input[type="submit"]):hover {
    box-shadow: 0 0 0 3px rgba(242, 207, 47, 0.22) !important;
    filter: brightness(1.08);
    transform: translateY(-1px);
}

body.ehq-admin-distribution :is(.erh-modal, .erh-drawer, .ehq-drawer, .erh-drawer-shell) {
    background: rgba(7, 10, 16, 0.98) !important;
    border: 1px solid var(--ehq-admin-line) !important;
    border-radius: 22px !important;
    box-shadow: 0 28px 96px rgba(0, 0, 0, 0.48) !important;
    color: var(--ehq-admin-text) !important;
}

body.ehq-admin-distribution :is(.erh-modal-head, .erh-modal-actions, .erh-drawer-head, .erh-drawer-foot, .ehq-drawer-head, .ehq-drawer-foot) {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: var(--ehq-admin-line) !important;
    color: var(--ehq-admin-text) !important;
}

body.ehq-admin-distribution :is(.erh-modal-body, .erh-drawer-body, .ehq-drawer-body) {
    background: transparent !important;
    color: var(--ehq-admin-text) !important;
}

body.ehq-admin-distribution :is(.erh-modal, .erh-drawer, .ehq-drawer) :is(input, select, textarea) {
    background: rgba(3, 6, 12, 0.82) !important;
    border: 1px solid var(--ehq-admin-line) !important;
    color: var(--ehq-admin-text) !important;
}

@media (max-width: 782px) {
    body.ehq-admin-distribution #wpbody-content {
        padding: 12px 12px 44px;
    }

    body.ehq-admin-distribution #wpbody-content > .erh-render-context,
    body.ehq-admin-distribution #wpbody-content > .wrap > .erh-render-context,
    body.ehq-admin-distribution .erh-wrap.erh-render-context {
        border-radius: 18px;
        padding: 14px;
    }
}

/* Distribution dashboard carousel + catalog sort polish ------------------ */
.erh-render-context .erh-top-carousel {
    display: grid;
    gap: 14px;
}

.erh-render-context .erh-top-carousel-head {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: -8px;
}

.erh-render-context .erh-top-carousel-status {
    color: var(--ehq3-muted, rgba(255,255,255,0.68));
    font-family: var(--ehq3-font-mono, "Open Sans", system-ui, sans-serif);
    font-size: 12px;
    font-weight: 800;
    min-width: 36px;
    text-align: center;
}

.erh-render-context .erh-top-carousel-dots {
    display: inline-flex;
    gap: 6px;
    justify-content: center;
}

.erh-render-context .erh-top-carousel-dots span {
    background: rgba(255,255,255,0.22);
    border-radius: 999px;
    display: block;
    height: 7px;
    width: 7px;
}

.erh-render-context .erh-top-carousel-dots span.is-active {
    background: var(--ehq3-primary, #f2cf2f);
    box-shadow: 0 0 0 4px rgba(242,207,47,0.16);
    width: 18px;
}

.erh-render-context .erh-top-carousel-panel[hidden] {
    display: none !important;
}

.erh-render-context .erh-top-carousel-panel h3 {
    color: var(--ehq3-text, #fff);
    font-family: var(--ehq3-font-head, "Open Sans", system-ui, sans-serif);
    font-size: clamp(16px, 1.1vw, 20px);
    margin: 0 0 10px;
}

.erh-render-context .erh-top-list {
    display: grid;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.erh-render-context .erh-top-list li {
    align-items: center;
    background: rgba(255,255,255,0.055);
    border: 1px solid var(--ehq3-line, rgba(255,255,255,0.12));
    border-radius: 14px;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 10px 12px;
}

.erh-render-context .erh-top-list-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.erh-render-context .erh-top-list-copy strong,
.erh-render-context .erh-top-list-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erh-render-context .erh-top-list-amount {
    color: var(--ehq3-text, #fff);
    font-family: var(--ehq3-font-head, "Open Sans", system-ui, sans-serif);
    font-size: clamp(13px, 0.95vw, 16px);
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
}

.erh-render-context .erh-sort-link {
    align-items: center;
    color: inherit !important;
    display: inline-flex;
    gap: 4px;
    text-decoration: none !important;
}

.erh-render-context .erh-sort-link:hover,
.erh-render-context .erh-sort-link:focus-visible {
    color: var(--ehq3-primary, #f2cf2f) !important;
}

@media (max-width: 720px) {
    .erh-render-context .erh-top-list li {
        grid-template-columns: 1fr;
    }

    .erh-render-context .erh-top-list-amount {
        text-align: left;
    }
}

/* Distribution dashboard: Top royalties KPI sheet v2 -------------------- */
.erh-render-context .erh-top-sheet {
    background: var(--ehq3-card, #0b0e16);
    border: 1px solid var(--ehq3-line, rgba(255,255,255,.08));
    border-radius: var(--ehq3-r-md, 12px);
    box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.4);
    color: var(--ehq3-text, #fff);
    overflow: hidden;
    width: 100%;
}

.erh-render-context .erh-top-sheet:focus-visible,
.erh-render-context .erh-top-sheet :is(button, .ts-list):focus-visible {
    outline: 2px solid var(--ehq-ui-focus, var(--ehq3-primary, #f2cf2f));
    outline-offset: 2px;
}

.erh-render-context .erh-top-sheet .ts-head {
    align-items: center;
    background: linear-gradient(160deg, var(--ehq3-card-2, #0e1220), var(--ehq3-card, #0b0e16));
    border-bottom: 1px solid var(--ehq3-line, rgba(255,255,255,.08));
    display: flex;
    gap: 12px;
    padding: 16px 18px 14px;
}

.erh-render-context .erh-top-sheet .ttl {
    min-width: 0;
}

.erh-render-context .erh-top-sheet h2 {
    color: var(--ehq3-text, #fff) !important;
    font-family: var(--ehq3-font-head, "Open Sans", system-ui, sans-serif);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    margin: 0;
}

.erh-render-context .erh-top-sheet .view-name {
    color: var(--ehq3-primary, #f2cf2f);
    display: block;
    font-family: var(--ehq3-font-head, "Open Sans", system-ui, sans-serif);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .05em;
    margin-top: 2px;
    text-transform: uppercase;
}

.erh-render-context .erh-top-sheet .ts-nav {
    align-items: center;
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.erh-render-context .erh-top-sheet .ts-dots {
    display: flex;
    gap: 5px;
    margin-right: 4px;
}

.erh-render-context .erh-top-sheet .ts-dot {
    appearance: none;
    background: rgba(255,255,255,.16) !important;
    border: 0 !important;
    border-radius: 50% !important;
    cursor: pointer;
    height: 7px;
    min-height: 7px;
    padding: 0 !important;
    transition: background .15s ease, transform .15s ease;
    width: 7px;
}

.erh-render-context .erh-top-sheet .ts-dot.is-on {
    background: var(--ehq3-primary, #f2cf2f) !important;
    transform: scale(1.15);
}

.erh-render-context .erh-top-sheet .ts-counter {
    color: var(--ehq3-text-dim, #a6afbf);
    font-family: var(--ehq3-font-mono, "Open Sans", system-ui, sans-serif);
    font-size: 11px;
    min-width: 26px;
    text-align: center;
}

.erh-render-context .erh-top-sheet .ts-arrow {
    align-items: center;
    appearance: none;
    background: rgba(255,255,255,.05) !important;
    border: 1px solid var(--ehq3-line-strong, rgba(255,255,255,.16)) !important;
    border-radius: var(--ehq3-r-sm, 8px) !important;
    color: var(--ehq3-muted, #d5dbe7) !important;
    cursor: pointer;
    display: grid;
    height: 30px;
    justify-content: center;
    min-height: 30px;
    padding: 0 !important;
    place-items: center;
    transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
    width: 30px;
}

.erh-render-context .erh-top-sheet .ts-arrow:hover {
    background: var(--ehq3-primary-soft, rgba(242,207,47,.12)) !important;
    border-color: var(--ehq3-primary-line, rgba(242,207,47,.35)) !important;
    color: var(--ehq3-primary, #f2cf2f) !important;
}

.erh-render-context .erh-top-sheet .ts-arrow svg {
    height: 14px;
    stroke-width: 2.2;
    width: 14px;
}

.erh-render-context .erh-top-sheet .ts-viewport {
    overflow: hidden;
}

.erh-render-context .erh-top-sheet .ts-track {
    display: flex;
    transition: transform .32s cubic-bezier(.22,.8,.3,1);
    width: 300%;
}

.erh-render-context .erh-top-sheet .ts-page {
    flex: 0 0 33.3333%;
    width: 33.3333%;
}

.erh-render-context .erh-top-sheet .ts-pagewrap {
    position: relative;
}

.erh-render-context .erh-top-sheet .ts-list {
    height: 300px;
    overflow-y: auto;
    overscroll-behavior: contain;
    position: relative;
    scrollbar-color: rgba(242,207,47,.35) transparent;
    scrollbar-width: thin;
}

.erh-render-context .erh-top-sheet .ts-list::-webkit-scrollbar {
    width: 5px;
}

.erh-render-context .erh-top-sheet .ts-list::-webkit-scrollbar-thumb {
    background: rgba(242,207,47,.3);
    border-radius: 99px;
}

.erh-render-context .erh-top-sheet .ts-list::-webkit-scrollbar-thumb:hover {
    background: rgba(242,207,47,.55);
}

.erh-render-context .erh-top-sheet .ts-list::-webkit-scrollbar-track {
    background: transparent;
}

.erh-render-context .erh-top-sheet .ts-row {
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,.05);
    display: grid;
    gap: 12px;
    grid-template-columns: 26px 40px minmax(0, 1fr) auto;
    height: 60px;
    padding: 0 16px;
    transition: background .12s ease;
}

.erh-render-context .erh-top-sheet .ts-row:hover {
    background: rgba(255,255,255,.04);
}

.erh-render-context .erh-top-sheet .ts-rank {
    color: var(--ehq3-text-dim, #a6afbf);
    font-family: var(--ehq3-font-mono, "Open Sans", system-ui, sans-serif);
    font-size: 11.5px;
    text-align: right;
}

.erh-render-context .erh-top-sheet .ts-row:nth-child(-n+3) .ts-rank {
    color: var(--ehq3-primary, #f2cf2f);
    font-weight: 700;
}

.erh-render-context .erh-top-sheet .ts-ava {
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 10px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
    color: #fff;
    display: grid;
    flex: none;
    font-family: var(--ehq3-font-head, "Open Sans", system-ui, sans-serif);
    font-size: 13px;
    font-weight: 700;
    height: 40px;
    overflow: hidden;
    place-items: center;
    width: 40px;
}

.erh-render-context .erh-top-sheet .ts-ava svg {
    height: 20px;
    width: 20px;
}

.erh-render-context .erh-top-sheet .ts-ava.cover {
    border-radius: 8px;
    position: relative;
}

.erh-render-context .erh-top-sheet .ts-ava.cover::after {
    background: linear-gradient(145deg, rgba(255,255,255,.14), transparent 55%);
    content: "";
    inset: 0;
    position: absolute;
}

.erh-render-context .erh-top-sheet .ts-store-logo.is-youtube { background: #1a0506 !important; }
.erh-render-context .erh-top-sheet .ts-store-logo.is-spotify { background: #06170c !important; }
.erh-render-context .erh-top-sheet .ts-store-logo.is-apple-music { background: linear-gradient(140deg,#2b0a12,#180409) !important; }
.erh-render-context .erh-top-sheet .ts-store-logo.is-itunes { background: linear-gradient(140deg,#2a123e,#13061e) !important; }
.erh-render-context .erh-top-sheet .ts-store-logo.is-deezer { background: linear-gradient(140deg,#30114f,#140622) !important; }
.erh-render-context .erh-top-sheet .ts-store-logo.is-tiktok { background: #05070d !important; }
.erh-render-context .erh-top-sheet .ts-store-logo.is-amazon { background: linear-gradient(140deg,#07313a,#04161a) !important; }
.erh-render-context .erh-top-sheet .ts-store-logo.is-generic { background: linear-gradient(140deg,#344055,#111827) !important; }

.erh-render-context .erh-top-sheet .ts-name {
    min-width: 0;
}

.erh-render-context .erh-top-sheet .ts-name b {
    color: var(--ehq3-text, #fff);
    display: block;
    font-family: var(--ehq3-font-head, "Open Sans", system-ui, sans-serif);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erh-render-context .erh-top-sheet .ts-name small {
    color: var(--ehq3-text-dim, #a6afbf) !important;
    display: block;
    font-size: 11.5px;
    margin-top: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erh-render-context .erh-top-sheet .ts-amt {
    text-align: right;
    white-space: nowrap;
}

.erh-render-context .erh-top-sheet .ts-amt b {
    color: var(--ehq3-text, #fff);
    display: block;
    font-family: var(--ehq3-font-head, "Open Sans", system-ui, sans-serif);
    font-size: 14px;
    font-weight: 700;
}

.erh-render-context .erh-top-sheet .ts-amt small {
    color: var(--ehq3-text-dim, #a6afbf) !important;
    display: block;
    font-family: var(--ehq3-font-mono, "Open Sans", system-ui, sans-serif);
    font-size: 10.5px;
    margin-top: 1px;
}

.erh-render-context .erh-top-sheet .ts-fade {
    background: linear-gradient(to top, var(--ehq3-card, #0b0e16) 15%, transparent);
    bottom: 0;
    height: 34px;
    left: 0;
    opacity: 1;
    pointer-events: none;
    position: absolute;
    right: 8px;
    transition: opacity .2s ease;
}

.erh-render-context .erh-top-sheet .ts-pagewrap.at-end .ts-fade {
    opacity: 0;
}

.erh-render-context .erh-top-sheet .ts-foot {
    align-items: center;
    border-top: 1px solid var(--ehq3-line, rgba(255,255,255,.08));
    color: var(--ehq3-text-dim, #a6afbf);
    display: flex;
    font-size: 11px;
    gap: 8px;
    padding: 10px 16px;
}

.erh-render-context .erh-top-sheet .ts-foot .mono {
    font-family: var(--ehq3-font-mono, "Open Sans", system-ui, sans-serif);
    font-size: 10.5px;
}

.erh-render-context .erh-top-sheet .scroll-hint {
    align-items: center;
    display: inline-flex;
    gap: 5px;
    margin-left: auto;
    white-space: nowrap;
}

.erh-render-context .erh-top-sheet .scroll-hint svg {
    animation: erhTopSheetNudge 1.6s ease-in-out infinite;
    height: 11px;
    stroke-width: 2.5;
    width: 11px;
}

.erh-render-context .erh-top-sheet .ts-empty {
    align-items: center;
    color: var(--ehq3-text-dim, #a6afbf);
    display: flex;
    height: 300px;
    justify-content: center;
    padding: 24px;
    text-align: center;
}

@keyframes erhTopSheetNudge {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(2px); }
}

@media (max-width: 520px) {
    .erh-render-context .erh-top-sheet .ts-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .erh-render-context .erh-top-sheet .ts-nav {
        margin-left: 0;
        width: 100%;
    }

    .erh-render-context .erh-top-sheet .ts-row {
        grid-template-columns: 24px 36px minmax(0, 1fr);
        padding: 0 12px;
    }

    .erh-render-context .erh-top-sheet .ts-ava {
        height: 36px;
        width: 36px;
    }

    .erh-render-context .erh-top-sheet .ts-amt {
        grid-column: 3;
        text-align: left;
    }
}
