@font-face {
    font-family: "ERPFont";
    src: url("/fonts/Vazirmatn-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "ERPFont";
    src: url("/fonts/Vazirmatn-Medium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "ERPFont";
    src: url("/fonts/Vazirmatn-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "ERPFont";
    src: url("/fonts/Vazirmatn-ExtraBold.woff2") format("woff2");
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --erp-final-bg: #f5f7fc;
    --erp-final-border: #e2e8f0;
    --erp-final-text: #0f172a;
    --erp-final-muted: #64748b;
    --erp-final-primary: var(--erp-primary, #2563eb);
    --erp-final-purple: var(--erp-accent, #7c3aed);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    width: 100%;
    max-width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    direction: rtl;
    overflow-x: hidden !important;
    background: var(--erp-final-bg);
}

body {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    direction: rtl;
    text-align: right;
    background: var(--erp-final-bg);
    color: var(--erp-final-text);
    font-family: "ERPFont", "Segoe UI", Tahoma, Arial, sans-serif;
    overflow-x: hidden !important;
}

body,
button,
input,
select,
textarea,
table,
.mud-typography,
.mud-button-root,
.mud-input,
.mud-input-control,
.form-control,
.form-select,
.btn {
    font-family: "ERPFont", "Segoe UI", Tahoma, Arial, sans-serif !important;
}

a { color: inherit; }

img,
svg,
canvas,
video,
iframe {
    max-width: 100%;
}

.mud-icon-root,
.mud-svg-icon {
    width: 1em !important;
    height: 1em !important;
    min-width: 1em !important;
    min-height: 1em !important;
    max-width: 1em !important;
    max-height: 1em !important;
    display: inline-block !important;
    line-height: 1 !important;
    flex: 0 0 auto !important;
    vertical-align: middle !important;
    color: inherit !important;
}

#app,
app,
body > div,
body > .page,
.mud-layout,
.mud-main-content,
.mud-container,
.mud-container-maxwidth-xl,
.mud-container-maxwidth-lg,
.mud-container-maxwidth-md {
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: clip;
}

.erp-route-state {
    padding: 24px;
    color: var(--erp-final-text);
    font-weight: 850;
}

.erp-shell-reference,
.erp-shell-clean,
.erp-shell-final,
.erp-main-reference,
.erp-workspace-clean,
.erp-main-final,
.erp-page-reference,
.erp-page-clean,
.erp-content-final,
.erpdb-reference,
.erpdb-dashboard,
.erpdb-board,
.erpdb-widget,
.erpdb-widget-body {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.erp-main-reference,
.erp-workspace-clean,
.erp-main-final,
.erp-page-reference,
.erp-page-clean,
.erp-content-final {
    overflow-x: hidden !important;
}

.erp-page-reference > *,
.erp-page-clean > *,
.erp-content-final > * {
    min-width: 0;
    max-width: 100%;
}

.erp-panel,
.dash-panel,
.plan-card,
.module-card,
.kpi-card,
.dashboard-card,
.erp-table-card,
.erp-filter-card,
.erp-state-card {
    background: #ffffff;
    border: 1px solid var(--erp-final-border);
    border-radius: 22px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
}

.form-control,
.form-select,
.erp-input,
.erp-select {
    min-height: 46px;
    border-radius: 14px;
    border: 1px solid #dbe4f0;
    font-weight: 700;
}

.table-wrap,
.erp-table-card {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

#blazor-error-ui {
    color-scheme: light only;
    background: #fff7ed;
    color: #9a3412;
    bottom: 0;
    box-shadow: 0 -1px 8px rgba(15, 23, 42, .12);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: .75rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 10000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: .75rem;
    top: .5rem;
}

/* =========================================================
   ERPPlus Global Theme Fix
   نکته مهم: پروژه فعلی از کلاس‌های reference استفاده می‌کند، نه فقط final.
   این بخش باعث می‌شود Light/Dark کل صفحه را تغییر دهد، نه فقط کارت‌ها.
   ========================================================= */

body.erpdb-light,
body:has(.erp-shell-reference.erpdb-light),
body:has(.erp-shell-clean.erpdb-light),
body:has(.erp-shell-final.erpdb-light) {
    --erp-final-bg: #f5f7fc;
    --erp-final-border: #e2e8f0;
    --erp-final-text: #0f172a;
    --erp-final-muted: #64748b;
    background: #f5f7fc !important;
    color: #0f172a !important;
    color-scheme: light !important;
}

body.erpdb-dark,
body:has(.erp-shell-reference.erpdb-dark),
body:has(.erp-shell-clean.erpdb-dark),
body:has(.erp-shell-final.erpdb-dark),
body:has(.erp-shell-reference:not(.erpdb-light)),
body:has(.erp-shell-clean:not(.erpdb-light)),
body:has(.erp-shell-final:not(.erpdb-light)) {
    --erp-final-bg: #020617;
    --erp-final-border: #1e293b;
    --erp-final-text: #f8fafc;
    --erp-final-muted: #cbd5e1;
    background: #020617 !important;
    color: #f8fafc !important;
    color-scheme: dark !important;
}

body.erpdb-light .erp-shell-reference,
body.erpdb-light .erp-shell-clean,
body.erpdb-light .erp-shell-final,
body:has(.erp-shell-reference.erpdb-light) .erp-shell-reference,
body:has(.erp-shell-clean.erpdb-light) .erp-shell-clean,
body:has(.erp-shell-final.erpdb-light) .erp-shell-final {
    background:
        radial-gradient(circle at 70% 0%, rgba(37, 99, 235, .10), transparent 380px),
        radial-gradient(circle at 14% 14%, rgba(124, 58, 237, .07), transparent 360px),
        linear-gradient(180deg, #f8fafc 0%, #eef4ff 100%) !important;
    color: #0f172a !important;
}

body.erpdb-dark .erp-shell-reference,
body.erpdb-dark .erp-shell-clean,
body.erpdb-dark .erp-shell-final,
body:has(.erp-shell-reference.erpdb-dark) .erp-shell-reference,
body:has(.erp-shell-clean.erpdb-dark) .erp-shell-clean,
body:has(.erp-shell-final.erpdb-dark) .erp-shell-final,
body:has(.erp-shell-reference:not(.erpdb-light)) .erp-shell-reference,
body:has(.erp-shell-clean:not(.erpdb-light)) .erp-shell-clean,
body:has(.erp-shell-final:not(.erpdb-light)) .erp-shell-final {
    background:
        radial-gradient(circle at 74% 0%, rgba(37, 99, 235, .14), transparent 340px),
        radial-gradient(circle at 14% 16%, rgba(124, 58, 237, .10), transparent 360px),
        #020617 !important;
    color: #f8fafc !important;
}

body.erpdb-light .erp-main-reference,
body.erpdb-light .erp-workspace-clean,
body.erpdb-light .erp-main-final,
body.erpdb-light .erp-page-reference,
body.erpdb-light .erp-page-clean,
body.erpdb-light .erp-content-final,
body:has(.erp-shell-reference.erpdb-light) .erp-main-reference,
body:has(.erp-shell-reference.erpdb-light) .erp-page-reference,
body:has(.erp-shell-clean.erpdb-light) .erp-workspace-clean,
body:has(.erp-shell-clean.erpdb-light) .erp-page-clean,
body:has(.erp-shell-final.erpdb-light) .erp-main-final,
body:has(.erp-shell-final.erpdb-light) .erp-content-final {
    background:
        radial-gradient(circle at 68% 0%, rgba(37, 99, 235, .08), transparent 360px),
        linear-gradient(180deg, #f8fafc 0%, #eef4ff 100%) !important;
    color: #0f172a !important;
}

body.erpdb-dark .erp-main-reference,
body.erpdb-dark .erp-workspace-clean,
body.erpdb-dark .erp-main-final,
body.erpdb-dark .erp-page-reference,
body.erpdb-dark .erp-page-clean,
body.erpdb-dark .erp-content-final,
body:has(.erp-shell-reference.erpdb-dark) .erp-main-reference,
body:has(.erp-shell-reference:not(.erpdb-light)) .erp-main-reference,
body:has(.erp-shell-reference.erpdb-dark) .erp-page-reference,
body:has(.erp-shell-reference:not(.erpdb-light)) .erp-page-reference,
body:has(.erp-shell-clean.erpdb-dark) .erp-workspace-clean,
body:has(.erp-shell-clean:not(.erpdb-light)) .erp-workspace-clean,
body:has(.erp-shell-clean.erpdb-dark) .erp-page-clean,
body:has(.erp-shell-clean:not(.erpdb-light)) .erp-page-clean,
body:has(.erp-shell-final.erpdb-dark) .erp-main-final,
body:has(.erp-shell-final:not(.erpdb-light)) .erp-main-final,
body:has(.erp-shell-final.erpdb-dark) .erp-content-final,
body:has(.erp-shell-final:not(.erpdb-light)) .erp-content-final {
    background:
        radial-gradient(circle at 68% 0%, rgba(37, 99, 235, .10), transparent 360px),
        #020617 !important;
    color: #f8fafc !important;
}

body.erpdb-light .erp-panel,
body.erpdb-light .dash-panel,
body.erpdb-light .plan-card,
body.erpdb-light .module-card,
body.erpdb-light .kpi-card,
body.erpdb-light .dashboard-card,
body.erpdb-light .erp-table-card,
body.erpdb-light .erp-filter-card,
body.erpdb-light .erp-state-card,
body:has(.erp-shell-reference.erpdb-light) .erp-panel,
body:has(.erp-shell-reference.erpdb-light) .dash-panel,
body:has(.erp-shell-reference.erpdb-light) .plan-card,
body:has(.erp-shell-reference.erpdb-light) .module-card,
body:has(.erp-shell-reference.erpdb-light) .kpi-card,
body:has(.erp-shell-reference.erpdb-light) .dashboard-card,
body:has(.erp-shell-reference.erpdb-light) .erp-table-card,
body:has(.erp-shell-reference.erpdb-light) .erp-filter-card,
body:has(.erp-shell-reference.erpdb-light) .erp-state-card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .05) !important;
}

body.erpdb-dark .erp-panel,
body.erpdb-dark .dash-panel,
body.erpdb-dark .plan-card,
body.erpdb-dark .module-card,
body.erpdb-dark .kpi-card,
body.erpdb-dark .dashboard-card,
body.erpdb-dark .erp-table-card,
body.erpdb-dark .erp-filter-card,
body.erpdb-dark .erp-state-card,
body:has(.erp-shell-reference.erpdb-dark) .erp-panel,
body:has(.erp-shell-reference:not(.erpdb-light)) .erp-panel,
body:has(.erp-shell-reference.erpdb-dark) .dash-panel,
body:has(.erp-shell-reference:not(.erpdb-light)) .dash-panel,
body:has(.erp-shell-reference.erpdb-dark) .plan-card,
body:has(.erp-shell-reference:not(.erpdb-light)) .plan-card,
body:has(.erp-shell-reference.erpdb-dark) .module-card,
body:has(.erp-shell-reference:not(.erpdb-light)) .module-card,
body:has(.erp-shell-reference.erpdb-dark) .kpi-card,
body:has(.erp-shell-reference:not(.erpdb-light)) .kpi-card,
body:has(.erp-shell-reference.erpdb-dark) .dashboard-card,
body:has(.erp-shell-reference:not(.erpdb-light)) .dashboard-card,
body:has(.erp-shell-reference.erpdb-dark) .erp-table-card,
body:has(.erp-shell-reference:not(.erpdb-light)) .erp-table-card,
body:has(.erp-shell-reference.erpdb-dark) .erp-filter-card,
body:has(.erp-shell-reference:not(.erpdb-light)) .erp-filter-card,
body:has(.erp-shell-reference.erpdb-dark) .erp-state-card,
body:has(.erp-shell-reference:not(.erpdb-light)) .erp-state-card {
    background: #0f172a !important;
    border-color: #1e293b !important;
    color: #f8fafc !important;
    box-shadow: 0 18px 44px rgba(0, 0, 0, .28) !important;
}

body.erpdb-light .erp-sidebar-footer-final,
body.erpdb-dark .erp-sidebar-footer-final,
body.erpdb-light .erp-nav-footer,
body.erpdb-dark .erp-nav-footer {
    background: transparent !important;
}


/* =========================================================
   ERPPlus Global Theme Sync Final
   ========================================================= */
html.erpdb-dark,
body.erpdb-dark {
    --erp-final-bg: #020617;
    --erp-final-border: #1e293b;
    --erp-final-text: #f8fafc;
    --erp-final-muted: #cbd5e1;
    background: #020617 !important;
    color: #f8fafc !important;
    color-scheme: dark;
}

html.erpdb-light,
body.erpdb-light {
    --erp-final-bg: #f5f7fc;
    --erp-final-border: #e2e8f0;
    --erp-final-text: #0f172a;
    --erp-final-muted: #64748b;
    background: #f5f7fc !important;
    color: #0f172a !important;
    color-scheme: light;
}

body.erpdb-dark #app,
body.erpdb-dark app,
body.erpdb-dark .mud-layout,
body.erpdb-dark .mud-main-content,
body.erpdb-dark .mud-container,
body.erpdb-dark .mud-container-maxwidth-xl,
body.erpdb-dark .mud-container-maxwidth-lg,
body.erpdb-dark .mud-container-maxwidth-md {
    background: #020617 !important;
    color: #f8fafc !important;
}

body.erpdb-light #app,
body.erpdb-light app,
body.erpdb-light .mud-layout,
body.erpdb-light .mud-main-content,
body.erpdb-light .mud-container,
body.erpdb-light .mud-container-maxwidth-xl,
body.erpdb-light .mud-container-maxwidth-lg,
body.erpdb-light .mud-container-maxwidth-md {
    background: #f5f7fc !important;
    color: #0f172a !important;
}

body.erpdb-dark .erp-panel,
body.erpdb-dark .dash-panel,
body.erpdb-dark .plan-card,
body.erpdb-dark .module-card,
body.erpdb-dark .kpi-card,
body.erpdb-dark .dashboard-card,
body.erpdb-dark .erp-table-card,
body.erpdb-dark .erp-filter-card,
body.erpdb-dark .erp-state-card {
    background: #0f172a !important;
    color: #f8fafc !important;
    border-color: #1e293b !important;
}

body.erpdb-light .erp-panel,
body.erpdb-light .dash-panel,
body.erpdb-light .plan-card,
body.erpdb-light .module-card,
body.erpdb-light .kpi-card,
body.erpdb-light .dashboard-card,
body.erpdb-light .erp-table-card,
body.erpdb-light .erp-filter-card,
body.erpdb-light .erp-state-card {
    background: #ffffff !important;
    color: #0f172a !important;
    border-color: #e2e8f0 !important;
}

/* =========================================================
   ERPPlus Final Patch - Global Theme Sync
   ========================================================= */
html.erpdb-dark,
body.erpdb-dark {
    background: #020617 !important;
    color: #f8fafc !important;
    color-scheme: dark !important;
}

html.erpdb-light,
body.erpdb-light {
    background: #eef3fb !important;
    color: #0f172a !important;
    color-scheme: light !important;
}

body.erpdb-dark .mud-popover,
body.erpdb-dark .mud-paper,
body.erpdb-dark .mud-card,
body.erpdb-dark .mud-menu,
body.erpdb-dark .mud-list,
body.erpdb-dark .mud-dialog {
    background-color: #0f172a !important;
    color: #f8fafc !important;
}

body.erpdb-light .mud-popover,
body.erpdb-light .mud-paper,
body.erpdb-light .mud-card,
body.erpdb-light .mud-menu,
body.erpdb-light .mud-list,
body.erpdb-light .mud-dialog {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

body.erpdb-dark .erp-panel,
body.erpdb-dark .dash-panel,
body.erpdb-dark .plan-card,
body.erpdb-dark .module-card,
body.erpdb-dark .kpi-card,
body.erpdb-dark .dashboard-card,
body.erpdb-dark .erp-table-card,
body.erpdb-dark .erp-filter-card,
body.erpdb-dark .erp-state-card {
    background: #0f172a !important;
    border-color: #1e293b !important;
    color: #f8fafc !important;
}

body.erpdb-light .erp-panel,
body.erpdb-light .dash-panel,
body.erpdb-light .plan-card,
body.erpdb-light .module-card,
body.erpdb-light .kpi-card,
body.erpdb-light .dashboard-card,
body.erpdb-light .erp-table-card,
body.erpdb-light .erp-filter-card,
body.erpdb-light .erp-state-card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
}


/* =========================================================
   ERPPlus Global Print System
   چاپ استاندارد A4 برای تمام گزارش‌ها و صفحات
   ========================================================= */
@page {
    size: A4 portrait;
    margin: 12mm;
}

@media print {
    html,
    body {
        width: 100% !important;
        max-width: none !important;
        min-height: 0 !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        direction: rtl !important;
        color: #000 !important;
        background: #fff !important;
        overflow: visible !important;
        color-scheme: light !important;
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
    }

    #app,
    app,
    body > div,
    body > .page,
    .mud-layout,
    .mud-main-content,
    .mud-container,
    .mud-container-maxwidth-xl,
    .mud-container-maxwidth-lg,
    .mud-container-maxwidth-md {
        position: static !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        min-height: 0 !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        color: #000 !important;
        background: #fff !important;
        overflow: visible !important;
    }

    .erp-sidebar-reference,
    .erp-sidebar-clean,
    .erp-sidebar-final,
    .erp-topbar-reference,
    .erp-topbar-clean,
    .erp-topbar-final,
    .mud-drawer,
    .mud-appbar,
    .mud-popover,
    .mud-overlay,
    .mud-dialog-container,
    .mud-snackbar-provider,
    #blazor-error-ui {
        display: none !important;
        visibility: hidden !important;
    }

    .erp-shell-reference,
    .erp-shell-clean,
    .erp-shell-final,
    .erp-main-reference,
    .erp-workspace-clean,
    .erp-main-final,
    .erp-page-reference,
    .erp-page-clean,
    .erp-content-final {
        position: static !important;
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        min-height: 0 !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        color: #000 !important;
        background: #fff !important;
        overflow: visible !important;
        transform: none !important;
    }

    .erp-page-reference > *,
    .erp-page-clean > *,
    .erp-content-final > * {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
    }

    button,
    .btn,
    .mud-button-root,
    [role="button"],
    input[type="button"],
    input[type="submit"],
    .no-print,
    .print-hidden {
        display: none !important;
    }

    input,
    select,
    textarea {
        border: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    .table-wrap,
    .journal-table-wrap,
    .trial-table-wrap,
    .ledger-table-wrap,
    .document-lines-wrap,
    .accounting-table-wrap,
    .erp-table-card {
        width: 100% !important;
        max-width: none !important;
        overflow: visible !important;
    }

    table {
        width: 100% !important;
        max-width: 100% !important;
        border-collapse: collapse !important;
        page-break-inside: auto;
    }

    thead {
        display: table-header-group !important;
    }

    tfoot {
        display: table-footer-group !important;
    }

    tr {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    th,
    td {
        color: #000 !important;
        background: #fff !important;
        border-color: #cbd5e1 !important;
        box-shadow: none !important;
    }

    a,
    a:visited {
        color: #000 !important;
        text-decoration: none !important;
    }

    a[href]::after {
        content: none !important;
    }

    img,
    svg,
    canvas {
        max-width: 100% !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    section,
    article,
    .erp-panel,
    .dash-panel,
    .plan-card,
    .module-card,
    .kpi-card,
    .dashboard-card,
    .erp-table-card,
    .erp-filter-card,
    .erp-state-card {
        box-shadow: none !important;
    }

    .journal-document,
    .trial-summary-card,
    .ledger-summary-card,
    .pnl-summary-card,
    .balance-sheet-summary-card,
    .document-meta-card {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    * {
        animation: none !important;
        transition: none !important;
        text-shadow: none !important;
    }
}

/* =========================================================
   ERPPlus Treasury Module
   ========================================================= */

.treasury-page {
    direction: rtl;
    width: 100%;
    max-width: 100% !important;
    padding: 28px 24px 36px !important;
    overflow: visible !important;
}

.treasury-header {
    width: 100%;
    margin-bottom: 26px;
    padding: 4px 2px;
}

.treasury-title {
    margin: 0 0 8px !important;
    color: var(--erp-final-text) !important;
    font-weight: 900 !important;
    line-height: 1.3 !important;
}

.treasury-subtitle {
    color: var(--erp-final-muted) !important;
    font-weight: 500 !important;
}

.treasury-header-icon {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    min-height: 56px !important;
    padding: 14px;
    border-radius: 18px;
    color: var(--erp-on-brand, #ffffff) !important;
    background: linear-gradient(135deg, var(--erp-primary, #2563eb), var(--erp-accent, #7c3aed));
    box-shadow: 0 14px 30px rgba(79, 70, 229, .24);
}

.treasury-grid {
    width: 100%;
    margin: 0 !important;
}

.treasury-card {
    position: relative;
    width: 100%;
    min-height: 150px;
    height: 100%;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--erp-final-border) !important;
    border-radius: 22px !important;
    background: #ffffff !important;
    color: var(--erp-final-text) !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .07) !important;
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        border-color .18s ease !important;
}

.treasury-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 10% 10%, rgba(99, 102, 241, .08), transparent 130px),
        linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(248, 250, 252, .98));
}

.treasury-card:hover {
    transform: translateY(-4px);
    border-color: var(--erp-primary, #818cf8) !important;
    box-shadow: 0 20px 44px rgba(15, 23, 42, .14) !important;
}

.treasury-card:active {
    transform: translateY(-1px);
}

.treasury-card-content {
    position: relative;
    z-index: 1;
    min-height: 150px;
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    padding: 22px !important;
}

.treasury-icon-box {
    width: 58px;
    height: 58px;
    min-width: 58px;
    min-height: 58px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .18);
}

.treasury-icon-box--cash {
    background: linear-gradient(135deg, #059669, #10b981);
}

.treasury-icon-box--bank {
    background: linear-gradient(135deg, var(--erp-primary, #2563eb), var(--erp-primary, #3b82f6));
}

.treasury-icon-box--payment {
    background: linear-gradient(135deg, var(--erp-accent, #7c3aed), var(--erp-accent, #8b5cf6));
}

.treasury-icon-box--received {
    background: linear-gradient(135deg, #0891b2, #06b6d4);
}

.treasury-icon-box--issued {
    background: linear-gradient(135deg, #ea580c, #f97316);
}

.treasury-icon-box--transfer {
    background: linear-gradient(135deg, #475569, #64748b);
}

.treasury-card-icon {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    color: #ffffff !important;
}

.treasury-card-text {
    min-width: 0;
    flex: 1 1 auto;
}

.treasury-card-title {
    margin-bottom: 8px !important;
    color: var(--erp-final-text) !important;
    font-size: 20px !important;
    font-weight: 900 !important;
    line-height: 1.4 !important;
}

.treasury-card-description {
    color: var(--erp-final-muted) !important;
    font-size: 14px !important;
    line-height: 1.8 !important;
    font-weight: 500 !important;
}

.treasury-card-arrow {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    color: #94a3b8 !important;
    transition: transform .18s ease, color .18s ease;
}

.treasury-card:hover .treasury-card-arrow {
    color: var(--erp-primary, #6366f1) !important;
    transform: translateX(-4px);
}

body.erpdb-dark .treasury-card {
    background: #0f172a !important;
    border-color: #1e293b !important;
    color: #f8fafc !important;
    box-shadow: 0 18px 44px rgba(0, 0, 0, .28) !important;
}

body.erpdb-dark .treasury-card::before {
    background:
        radial-gradient(circle at 10% 10%, rgba(99, 102, 241, .14), transparent 140px),
        linear-gradient(180deg, rgba(15, 23, 42, .96), rgba(2, 6, 23, .98));
}

body.erpdb-dark .treasury-card-title {
    color: #f8fafc !important;
}

body.erpdb-dark .treasury-card-description,
body.erpdb-dark .treasury-subtitle {
    color: #cbd5e1 !important;
}

body.erpdb-dark .treasury-card:hover {
    border-color: var(--erp-primary, #6366f1) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .38) !important;
}

@media (max-width: 960px) {
    .treasury-page {
        padding: 22px 16px 30px !important;
    }

    .treasury-header-icon {
        display: none !important;
    }
}

@media (max-width: 600px) {
    .treasury-page {
        padding: 18px 10px 24px !important;
    }

    .treasury-header {
        margin-bottom: 18px;
    }

    .treasury-title {
        font-size: 28px !important;
    }

    .treasury-card,
    .treasury-card-content {
        min-height: 128px;
    }

    .treasury-card-content {
        padding: 18px !important;
    }

    .treasury-icon-box {
        width: 50px;
        height: 50px;
        min-width: 50px;
        min-height: 50px;
        border-radius: 15px;
    }

    .treasury-card-title {
        font-size: 18px !important;
    }
}

/* ERPPlus Treasury interactive modal fix */
.modal.show.d-block {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483001 !important;
    display: block !important;
    width: 100vw !important;
    height: 100vh !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding: 24px 12px !important;
    background: rgba(15, 23, 42, .48) !important;
    pointer-events: auto !important;
}

.modal.show.d-block .modal-dialog {
    position: relative !important;
    z-index: 2147483002 !important;
    margin: 1.75rem auto !important;
    pointer-events: auto !important;
}

.modal.show.d-block .modal-content {
    position: relative !important;
    z-index: 2147483003 !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.modal-backdrop.fade.show {
    display: none !important;
}


/* ERPPLUS_TREASURY_MODAL_FINAL_20260714 */
.treasury-dialog-layer {
    position: fixed !important;
    inset: 0 340px 0 0 !important;
    z-index: 2147483646 !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    padding: 118px 24px 22px !important;
    overflow: auto !important;
    pointer-events: auto !important;
}

.treasury-dialog-backdrop {
    position: fixed !important;
    inset: 0 !important;
    z-index: 0 !important;
    background: rgba(15, 23, 42, .58) !important;
    backdrop-filter: blur(4px) !important;
}

.treasury-dialog-card {
    position: relative !important;
    z-index: 1 !important;
    width: min(720px, calc(100vw - 410px)) !important;
    max-width: 100% !important;
    max-height: calc(100vh - 142px) !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    border-radius: 22px !important;
    background: #fff !important;
    box-shadow: 0 28px 90px rgba(2, 6, 23, .42) !important;
}

.treasury-dialog-card--wide {
    width: min(860px, calc(100vw - 410px)) !important;
}

.treasury-dialog-card--small {
    width: min(460px, calc(100vw - 410px)) !important;
}

.treasury-dialog-header {
    flex: 0 0 auto !important;
    padding: 18px 22px !important;
}

.treasury-dialog-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 22px !important;
}

.treasury-dialog-footer {
    flex: 0 0 auto !important;
    padding: 15px 22px !important;
}

.treasury-dialog-body > .row,
.treasury-dialog-body .row.g-3 {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
    width: 100% !important;
    margin: 0 !important;
}

.treasury-dialog-card--wide .treasury-dialog-body > .row,
.treasury-dialog-card--wide .treasury-dialog-body .row.g-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.treasury-dialog-body .row > [class*="col-"] {
    width: auto !important;
    max-width: none !important;
    flex: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.treasury-dialog-body .row > .col-12 {
    grid-column: 1 / -1 !important;
}

.treasury-dialog-body input.form-control,
.treasury-dialog-body select.form-select,
.treasury-dialog-body textarea.form-control,
.treasury-dialog-body .persian-date-input,
.treasury-dialog-body .persian-date-input input {
    width: 100% !important;
    max-width: none !important;
}

@media (max-width: 1180px) {
    .treasury-dialog-layer {
        inset: 0 280px 0 0 !important;
    }

    .treasury-dialog-card,
    .treasury-dialog-card--wide,
    .treasury-dialog-card--small {
        width: min(760px, calc(100vw - 330px)) !important;
    }

    .treasury-dialog-card--wide .treasury-dialog-body > .row,
    .treasury-dialog-card--wide .treasury-dialog-body .row.g-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 860px) {
    .treasury-dialog-layer {
        inset: 0 !important;
        padding: 88px 10px 10px !important;
    }

    .treasury-dialog-card,
    .treasury-dialog-card--wide,
    .treasury-dialog-card--small {
        width: 100% !important;
        max-height: calc(100vh - 98px) !important;
    }

    .treasury-dialog-body > .row,
    .treasury-dialog-body .row.g-3,
    .treasury-dialog-card--wide .treasury-dialog-body > .row,
    .treasury-dialog-card--wide .treasury-dialog-body .row.g-3 {
        grid-template-columns: 1fr !important;
    }

    .treasury-dialog-body .row > .col-12 {
        grid-column: auto !important;
    }
}

.erp-organization-report-identity {
    direction: rtl;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin: 0 0 18px;
    padding: 14px 18px;
    border: 1px solid #dbe4f0;
    border-radius: 18px;
    background: rgba(255,255,255,.92);
    box-shadow: 0 10px 28px rgba(15,23,42,.05);
}

@media print {
    .erp-organization-report-identity {
        margin-bottom: 10px;
        padding: 8px 0;
        border: 0;
        border-bottom: 1px solid #cbd5e1;
        border-radius: 0;
        box-shadow: none;
        background: #fff;
    }
}

/* ERPPlus professional access loader */
.erp-access-loader {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: grid;
    place-items: center;
    min-height: 100dvh;
    padding: 24px;
    overflow: hidden;
    direction: rtl;
    font-family: inherit;
    background:
        radial-gradient(circle at 15% 20%, rgba(99, 102, 241, .20), transparent 34%),
        radial-gradient(circle at 85% 80%, rgba(14, 165, 233, .15), transparent 32%),
        linear-gradient(145deg, #eef4ff 0%, #f8fbff 52%, #edf2ff 100%);
}

.erp-access-loader__backdrop {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(78, 90, 140, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(78, 90, 140, .045) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), transparent 86%);
    pointer-events: none;
}

.erp-access-loader__card {
    position: relative;
    width: min(520px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 34px 34px 30px;
    border: 1px solid rgba(255, 255, 255, .86);
    border-radius: 30px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 32px 90px rgba(30, 41, 82, .18), inset 0 1px 0 rgba(255,255,255,.95);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    text-align: center;
}

.erp-access-loader__brand {
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    padding-bottom: 22px;
    border-bottom: 1px solid #e8edf7;
}

.erp-access-loader__brand > div:last-child {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.35;
}

.erp-access-loader__brand strong {
    color: #111936;
    font-size: 22px;
    font-weight: 950;
    letter-spacing: -.4px;
}

.erp-access-loader__brand span {
    margin-top: 3px;
    color: #6b7895;
    font-size: 12px;
    font-weight: 750;
}

.erp-access-loader__logo {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    flex: 0 0 50px;
    border-radius: 16px;
    background: linear-gradient(145deg, #3157f5, #733df0);
    color: #fff;
    box-shadow: 0 12px 28px rgba(76, 76, 226, .30);
    font-size: 14px;
    font-weight: 950;
}

.erp-access-loader__visual {
    position: relative;
    width: 132px;
    height: 132px;
    display: grid;
    place-items: center;
    margin: 32px 0 22px;
}

.erp-access-loader__ring {
    position: absolute;
    border-radius: 50%;
    border-style: solid;
}

.erp-access-loader__ring--one {
    inset: 0;
    border-width: 4px;
    border-color: rgba(79, 70, 229, .12);
    border-top-color: var(--erp-primary, #4f46e5);
    border-right-color: var(--erp-accent, #7c3aed);
    animation: erp-access-spin 1.15s linear infinite;
}

.erp-access-loader__ring--two {
    inset: 14px;
    border-width: 3px;
    border-color: rgba(14, 165, 233, .12);
    border-bottom-color: #0ea5e9;
    border-left-color: #22c55e;
    animation: erp-access-spin-reverse 1.65s linear infinite;
}

.erp-access-loader__core {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    border-radius: 24px;
    background: linear-gradient(145deg, #eef2ff, #f5f3ff);
    color: var(--erp-primary, #4f46e5);
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, .10), 0 10px 26px rgba(79, 70, 229, .13);
    font-size: 31px;
    font-weight: 950;
}

.erp-access-loader__content h1 {
    margin: 0;
    color: #10162f;
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 950;
    letter-spacing: -.6px;
}

.erp-access-loader__content p {
    margin: 10px 0 0;
    color: #687590;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.9;
}

.erp-access-loader__progress {
    width: 100%;
    height: 8px;
    margin-top: 26px;
    overflow: hidden;
    border-radius: 999px;
    background: #e9edf7;
}

.erp-access-loader__progress span {
    display: block;
    width: 38%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #3157f5, var(--erp-accent, #7c3aed), #0ea5e9);
    animation: erp-access-progress 1.45s ease-in-out infinite;
}

.erp-access-loader__status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    color: #55627e;
    font-size: 12px;
    font-weight: 800;
}

.erp-access-loader__pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, .35);
    animation: erp-access-pulse 1.4s ease-out infinite;
}

.erpdb-dark .erp-access-loader {
    background:
        radial-gradient(circle at 15% 20%, rgba(99, 102, 241, .22), transparent 36%),
        radial-gradient(circle at 85% 80%, rgba(14, 165, 233, .12), transparent 34%),
        linear-gradient(145deg, #0b1020 0%, #111827 55%, #0b1220 100%);
}

.erpdb-dark .erp-access-loader__card {
    border-color: rgba(148, 163, 184, .15);
    background: rgba(17, 24, 39, .88);
    box-shadow: 0 32px 90px rgba(0, 0, 0, .46), inset 0 1px 0 rgba(255,255,255,.04);
}

.erpdb-dark .erp-access-loader__brand { border-bottom-color: rgba(148, 163, 184, .16); }
.erpdb-dark .erp-access-loader__brand strong,
.erpdb-dark .erp-access-loader__content h1 { color: #f8fafc; }
.erpdb-dark .erp-access-loader__brand span,
.erpdb-dark .erp-access-loader__content p,
.erpdb-dark .erp-access-loader__status { color: #a8b3c7; }
.erpdb-dark .erp-access-loader__core { background: linear-gradient(145deg, #18223b, #1f2542); color: #a5b4fc; }
.erpdb-dark .erp-access-loader__progress { background: #202a3f; }

@keyframes erp-access-spin { to { transform: rotate(360deg); } }
@keyframes erp-access-spin-reverse { to { transform: rotate(-360deg); } }
@keyframes erp-access-progress {
    0% { transform: translateX(175%); }
    50% { transform: translateX(0); }
    100% { transform: translateX(-175%); }
}
@keyframes erp-access-pulse {
    70% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@media (max-width: 600px) {
    .erp-access-loader { padding: 14px; }
    .erp-access-loader__card { padding: 26px 20px 24px; border-radius: 24px; }
    .erp-access-loader__visual { width: 112px; height: 112px; margin-top: 26px; }
    .erp-access-loader__core { width: 62px; height: 62px; border-radius: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .erp-access-loader__ring,
    .erp-access-loader__progress span,
    .erp-access-loader__pulse { animation-duration: 3s; }
}


/* ERPPlus organization font-size system */
:root {
    --erp-font-size: 15px;
}

html,
body,
.erp-shell-reference {
    font-size: var(--erp-font-size, 15px);
}

.erp-shell-reference :where(
    button,
    input,
    select,
    textarea,
    option,
    table,
    td,
    th,
    label,
    .btn,
    .form-control,
    .form-select,
    .mud-typography,
    .mud-button-root,
    .mud-input,
    .mud-input-control,
    .mud-select,
    .mud-table,
    .mud-table-cell,
    .mud-chip,
    .mud-menu-item,
    .mud-list-item-text,
    .mud-tab
) {
    font-size: var(--erp-font-size, 15px) !important;
}

/* Keep semantic titles proportional to the selected application font size. */
.erp-shell-reference h1 { font-size: calc(var(--erp-font-size, 15px) * 2.15); }
.erp-shell-reference h2 { font-size: calc(var(--erp-font-size, 15px) * 1.75); }
.erp-shell-reference h3 { font-size: calc(var(--erp-font-size, 15px) * 1.45); }
.erp-shell-reference h4 { font-size: calc(var(--erp-font-size, 15px) * 1.25); }
.erp-shell-reference h5 { font-size: calc(var(--erp-font-size, 15px) * 1.10); }
.erp-shell-reference h6 { font-size: var(--erp-font-size, 15px); }


/* Sales list: global dark-theme bridge for page-isolated fixed light colors. */
body.erpdb-dark .sales-list-page {
    --sales-bg: #020617;
    --sales-card: #0f172a;
    --sales-text: #f8fafc;
    --sales-muted: #a8b3c7;
    --sales-border: #334155;
    --sales-soft-border: #273449;
    background:
        radial-gradient(circle at 18% 0%, rgba(var(--erp-accent-rgb, 124, 58, 237), .14), transparent 340px),
        linear-gradient(180deg, #020617 0%, #07101f 48%, #020617 100%) !important;
    color: var(--sales-text) !important;
}
body.erpdb-dark .sales-list-page .sales-list-hero,
body.erpdb-dark .sales-list-page .sales-card,
body.erpdb-dark .sales-list-page .sales-state,
body.erpdb-dark .sales-list-page .sales-stat-card {
    color: #f8fafc !important;
    border-color: #273449 !important;
    background: linear-gradient(180deg, rgba(15,23,42,.99), rgba(10,18,34,.97)) !important;
    box-shadow: 0 22px 64px rgba(0,0,0,.28) !important;
}
body.erpdb-dark .sales-list-page .sales-list-hero::before {
    background: linear-gradient(90deg, transparent, rgba(148,163,184,.08), transparent) !important;
}
body.erpdb-dark .sales-list-page .sales-breadcrumb span {
    color: #cbd5e1 !important;
    border-color: #334155 !important;
    background: #172033 !important;
}
body.erpdb-dark .sales-list-page .sales-breadcrumb b,
body.erpdb-dark .sales-list-page .sales-eyebrow {
    border-color: rgba(var(--erp-primary-rgb,37,99,235),.36) !important;
    background: rgba(var(--erp-primary-rgb,37,99,235),.16) !important;
}
body.erpdb-dark .sales-list-page .sales-hero-icon {
    border-color: rgba(var(--erp-accent-rgb,124,58,237),.34) !important;
    background: rgba(var(--erp-accent-rgb,124,58,237),.15) !important;
}
body.erpdb-dark .sales-list-page :is(
    .sales-filter-select,
    .sales-filter-input,
    .form-control,
    .sales-delete-reason
) {
    color: #f8fafc !important;
    border-color: #334155 !important;
    background: #111c30 !important;
    box-shadow: none !important;
}
body.erpdb-dark .sales-list-page :is(
    .sales-filter-select,
    .sales-filter-input,
    .form-control,
    .sales-delete-reason
)::placeholder {
    color: #7f8ca3 !important;
    opacity: 1;
}
body.erpdb-dark .sales-list-page :is(.sales-filter-select, .sales-filter-input, .form-control):focus {
    border-color: var(--erp-accent, #7c3aed) !important;
    background: #142038 !important;
}
body.erpdb-dark .sales-list-page .sales-btn:not(.primary):not(.pay):not(.print-list) {
    color: #dbe7f7 !important;
    border-color: #3a4960 !important;
    background: #172033 !important;
}
body.erpdb-dark .sales-list-page .sales-table-wrap {
    border-color: #273449 !important;
    background: #0b1425 !important;
}
body.erpdb-dark .sales-list-page .sales-table thead th {
    color: #cbd5e1 !important;
    border-color: #334155 !important;
    background: linear-gradient(180deg, #172033, #111827) !important;
}
body.erpdb-dark .sales-list-page .sales-table tbody td {
    color: #e5edf8 !important;
    border-color: #223047 !important;
    background: transparent !important;
}
body.erpdb-dark .sales-list-page .sales-table tbody tr:hover,
body.erpdb-dark .sales-list-page .sales-row.selected {
    background: #17233a !important;
}
body.erpdb-dark .sales-list-page .sales-table tfoot td {
    color: #f8fafc !important;
    border-color: #334155 !important;
    background: #111c30 !important;
}
body.erpdb-dark .sales-list-page :is(
    h1, h2, h3, h4, h5, h6,
    .sales-stat-card strong,
    .sales-number-cell strong,
    .sales-empty-modern strong
) {
    color: #f8fafc !important;
}
body.erpdb-dark .sales-list-page :is(
    .sales-list-hero p,
    .sales-card-head p,
    .sales-number-cell span,
    .sales-empty-modern span,
    .sales-last-payment
) {
    color: #a8b3c7 !important;
}
body.erpdb-dark .sales-list-page .sales-empty-modern {
    color: #f8fafc !important;
    border-color: #334155 !important;
    background: linear-gradient(180deg, #111c30, #0b1425) !important;
}
body.erpdb-dark .sales-list-page .sales-empty-visual {
    border-color: #334155 !important;
    background: #172033 !important;
}
body.erpdb-dark .sales-list-page :is(.sales-payment-shell, .sales-delete-dialog) {
    color: #f8fafc !important;
    border: 1px solid #334155 !important;
    background: #0f172a !important;
}


/* =========================================================
   ERPPlus application-wide theme bridge
   Covers isolated page CSS that still contains fixed light colors.
   Public/auth/print layouts are intentionally excluded.
   ========================================================= */
body.erpdb-dark .erp-page-reference {
    --erp-page-bg: #020617;
    --erp-surface: #0f172a;
    --erp-surface-raised: #111c30;
    --erp-surface-soft: #172033;
    --erp-border: #2a394f;
    --erp-text: #f8fafc;
    --erp-muted: #a8b3c7;
    background:
        radial-gradient(circle at 68% 0%, rgba(var(--erp-primary-rgb,37,99,235),.10), transparent 360px),
        #020617 !important;
    color: var(--erp-text) !important;
}

body.erpdb-dark .erp-page-reference :is(
    [class$="-page"],
    [class*="-page "],
    [class$="-layout"],
    [class*="-layout "],
    [class$="-content"],
    [class*="-content "]
) {
    color: var(--erp-text) !important;
}

body.erpdb-dark .erp-page-reference :is(
    [class$="-card"],
    [class*="-card "],
    [class$="-panel"],
    [class*="-panel "],
    [class$="-surface"],
    [class*="-surface "],
    [class$="-section"],
    [class*="-section "],
    [class$="-widget"],
    [class*="-widget "],
    [class$="-toolbar"],
    [class*="-toolbar "],
    [class$="-hero"],
    [class*="-hero "],
    [class$="-modal"],
    [class*="-modal "],
    [class$="-dialog"],
    [class*="-dialog "],
    [class$="-drawer"],
    [class*="-drawer "]
):not([class*="status"]):not([class*="badge"]):not([class*="chip"]):not([class*="alert"]):not([class*="action"]):not([class*="button"]) {
    color: var(--erp-text) !important;
    border-color: var(--erp-border) !important;
    background-color: var(--erp-surface) !important;
}

body.erpdb-dark .erp-page-reference :is(
    .card,
    .modal-content,
    .dropdown-menu,
    .offcanvas,
    fieldset,
    details
) {
    color: var(--erp-text) !important;
    border-color: var(--erp-border) !important;
    background-color: var(--erp-surface) !important;
}

body.erpdb-dark .erp-page-reference :is(
    input:not([type="checkbox"]):not([type="radio"]),
    select,
    textarea,
    .form-control,
    .form-select,
    .mud-input-root,
    .mud-input-slot,
    .mud-select-input,
    .mud-picker-input-button
) {
    color: var(--erp-text) !important;
    border-color: #3a4960 !important;
    background-color: var(--erp-surface-raised) !important;
    box-shadow: none !important;
}

body.erpdb-dark .erp-page-reference :is(input, textarea)::placeholder {
    color: #7f8ca3 !important;
    opacity: 1 !important;
}

body.erpdb-dark .erp-page-reference :is(table, .table, .mud-table-root, .mud-table-container) {
    color: var(--erp-text) !important;
    border-color: var(--erp-border) !important;
    background-color: var(--erp-surface) !important;
}

body.erpdb-dark .erp-page-reference :is(thead, thead tr, thead th, .mud-table-head, .mud-table-head .mud-table-cell) {
    color: #dbe7f7 !important;
    border-color: var(--erp-border) !important;
    background-color: var(--erp-surface-soft) !important;
}

body.erpdb-dark .erp-page-reference :is(tbody, tbody tr, tbody td, tfoot, tfoot tr, tfoot td, .mud-table-body, .mud-table-row, .mud-table-cell) {
    color: var(--erp-text) !important;
    border-color: #223047 !important;
}

body.erpdb-dark .erp-page-reference :is(tbody tr, .mud-table-row):hover {
    background-color: #17233a !important;
}

body.erpdb-dark .erp-page-reference :is(
    h1, h2, h3, h4, h5, h6,
    legend,
    label,
    .mud-typography,
    .mud-input-label,
    .mud-select
) {
    color: var(--erp-text) !important;
}

body.erpdb-dark .erp-page-reference :is(
    p,
    small,
    .text-muted,
    [class$="-subtitle"],
    [class*="-subtitle "],
    [class$="-description"],
    [class*="-description "],
    [class$="-hint"],
    [class*="-hint "],
    [class$="-meta"],
    [class*="-meta "]
) {
    color: var(--erp-muted) !important;
}

body.erpdb-dark .mud-popover-provider :is(
    .mud-popover,
    .mud-paper,
    .mud-list,
    .mud-menu,
    .mud-dialog,
    .mud-picker,
    .mud-tooltip
) {
    color: var(--erp-text, #f8fafc) !important;
    border-color: var(--erp-border, #2a394f) !important;
    background-color: var(--erp-surface, #0f172a) !important;
}

body.erpdb-dark .mud-popover-provider :is(
    .mud-list-item,
    .mud-menu-item,
    .mud-picker-calendar-header,
    .mud-picker-calendar-content
) {
    color: #f8fafc !important;
}

@media print {
    body.erpdb-dark .erp-page-reference,
    body.erpdb-dark .erp-page-reference * {
        color: #000 !important;
        background: #fff !important;
    }
}

