.catalog-page-header {
    border-radius: 14px;
    background: linear-gradient(135deg,
        rgba(var(--theme-primary-rgb, 37, 99, 235), 0.06) 0%,
        rgba(var(--theme-primary-rgb, 37, 99, 235), 0.02) 100%);
}

.perf-std-disclaimer {
    border-radius: 12px;
    border-inline-start-width: 4px !important;
    background: linear-gradient(135deg,
        rgba(14, 165, 233, 0.08) 0%,
        rgba(14, 165, 233, 0.02) 100%);
}

.perf-std-disclaimer-title {
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 0.25rem;
}

.perf-std-disclaimer-body {
    line-height: 1.75;
    opacity: 0.92;
}

.catalog-page-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--theme-gradient-primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(var(--theme-primary-rgb, 37, 99, 235), 0.25);
}

.catalog-page-header-actions {
    flex-shrink: 0;
    overflow: visible;
    position: relative;
    z-index: 5;
}

.catalog-toolbar {
    border-radius: 12px;
}

.catalog-table-paper {
    border-radius: 12px;
    overflow-x: auto;
    overflow-y: clip;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y pinch-zoom;
}

.account-tree-toolbar {
    border-radius: 12px;
}

.account-tree-paper {
    border-radius: 12px;
    max-height: calc(100vh - 280px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y pinch-zoom;
    overscroll-behavior: contain;
}

.account-tree-row {
    width: 100%;
    min-height: 32px;
    flex-wrap: wrap;
    gap: 8px;
}

.account-tree-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85rem;
    direction: ltr;
    unicode-bidi: isolate;
    white-space: nowrap;
}

.account-tree-level-group {
    --mud-palette-text-primary: #1565c0;
}

.account-tree-level-kol {
    --mud-palette-text-primary: #2e7d32;
}

.account-tree-level-moein {
    --mud-palette-text-primary: #6a1b9a;
}

.account-hierarchy-table-paper {
    max-height: calc(100vh - 280px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y pinch-zoom;
    overscroll-behavior: contain;
}

.account-hierarchy-table .account-table-title-cell {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.account-hierarchy-table .account-table-leaf-spacer {
    display: inline-block;
    width: 28px;
    flex-shrink: 0;
}

.account-hierarchy-table .account-table-toggle {
    flex-shrink: 0;
}

.account-hierarchy-table .account-table-level-icon {
    flex-shrink: 0;
}

.account-hierarchy-table .account-table-title {
    min-width: 0;
    word-break: break-word;
}

.account-hierarchy-table tr.account-table-row-group {
    background: rgba(var(--theme-primary-rgb, 37, 99, 235), 0.08);
    font-weight: 600;
}

.account-hierarchy-table tr.account-table-row-kol {
    background: rgba(46, 125, 50, 0.06);
}

.account-hierarchy-table tr.account-table-row-moein {
    background: transparent;
}

.catalog-type-chip {
    font-weight: 600;
}

@media (max-width: 768px) {
    .catalog-page-header {
        padding: 0.75rem !important;
    }

    .catalog-page-header .mud-stack-row {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.65rem;
    }

    .catalog-page-header-actions {
        width: 100%;
    }

    .catalog-page-header-actions .mud-button-root {
        flex: 1 1 auto;
    }

    .catalog-toolbar {
        padding: 0.65rem !important;
    }

    .catalog-table-paper {
        border-radius: 10px;
    }
}

[data-theme="dark"] .catalog-page-header,
.mud-theme-dark .catalog-page-header {
    background: linear-gradient(135deg,
        rgba(var(--theme-primary-rgb, 59, 130, 246), 0.18) 0%,
        rgba(var(--theme-primary-rgb, 59, 130, 246), 0.05) 100%) !important;
}

[data-theme="dark"] .perf-std-disclaimer,
.mud-theme-dark .perf-std-disclaimer {
    background: linear-gradient(135deg,
        rgba(14, 165, 233, 0.16) 0%,
        rgba(14, 165, 233, 0.05) 100%);
}

[data-theme="dark"] .catalog-toolbar,
.mud-theme-dark .catalog-toolbar {
    background: var(--ps-surface) !important;
}

/* ── Items catalog page ─────────────────────────────────────────── */
.items-page .items-toolbar {
    border-radius: 14px;
    border: 1px solid rgba(var(--theme-primary-rgb, 37, 99, 235), 0.12);
}

.items-page .items-table-paper {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(var(--theme-primary-rgb, 37, 99, 235), 0.1);
}

.items-page .items-table .mud-table-head .mud-table-cell {
    font-weight: 800;
    background: rgba(var(--theme-primary-rgb, 37, 99, 235), 0.08);
    white-space: nowrap;
}

.items-page .items-table.mud-table-striped .mud-table-body .mud-table-row:nth-of-type(odd) .mud-table-cell {
    background: rgba(var(--theme-primary-rgb, 37, 99, 235), 0.035);
}

.items-page .items-table.mud-table-striped .mud-table-body .mud-table-row:nth-of-type(even) .mud-table-cell {
    background: transparent;
}

.items-page .items-table .mud-table-body .mud-table-row:hover .mud-table-cell {
    background: rgba(var(--theme-primary-rgb, 37, 99, 235), 0.09) !important;
}

.items-page .items-code {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--theme-primary, #2563eb);
}

.items-page .items-balance-chip {
    min-width: 3.2rem;
    justify-content: center;
}

.item-edit-dialog .item-edit-inventory-section {
    background: linear-gradient(160deg,
        rgba(14, 165, 233, 0.08) 0%,
        rgba(var(--theme-primary-rgb, 37, 99, 235), 0.03) 100%);
    border-color: rgba(14, 165, 233, 0.28);
}

[data-theme="dark"] .items-page .items-table .mud-table-head .mud-table-cell,
.mud-theme-dark .items-page .items-table .mud-table-head .mud-table-cell {
    background: rgba(59, 130, 246, 0.18);
}

[data-theme="dark"] .items-page .items-table.mud-table-striped .mud-table-body .mud-table-row:nth-of-type(odd) .mud-table-cell,
.mud-theme-dark .items-page .items-table.mud-table-striped .mud-table-body .mud-table-row:nth-of-type(odd) .mud-table-cell {
    background: rgba(148, 163, 184, 0.08);
}

[data-theme="dark"] .items-page .items-table.mud-table-striped .mud-table-body .mud-table-row:nth-of-type(even) .mud-table-cell,
.mud-theme-dark .items-page .items-table.mud-table-striped .mud-table-body .mud-table-row:nth-of-type(even) .mud-table-cell {
    background: rgba(15, 23, 42, 0.25);
}

[data-theme="dark"] .items-page .items-table .mud-table-body .mud-table-row:hover .mud-table-cell,
.mud-theme-dark .items-page .items-table .mud-table-body .mud-table-row:hover .mud-table-cell {
    background: rgba(59, 130, 246, 0.16) !important;
}

[data-theme="dark"] .item-edit-dialog .item-edit-inventory-section,
.mud-theme-dark .item-edit-dialog .item-edit-inventory-section {
    background: linear-gradient(160deg,
        rgba(14, 165, 233, 0.14) 0%,
        rgba(59, 130, 246, 0.06) 100%);
}

@media (max-width: 768px) {
    .items-page .catalog-page-header-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .items-page .catalog-page-header-actions .mud-button-root {
        flex: 1 1 calc(50% - 0.4rem);
    }
}

.formulas-page.buildable .items-code {
    color: #ad1457;
}

.formulas-page.readyfeed .items-code,
.formulas-page:not(.buildable) .items-code {
    color: #558b2f;
}

.formula-edit-dialog .formula-ingredients-table .mud-table-head .mud-table-cell {
    font-weight: 800;
    background: rgba(var(--theme-primary-rgb, 37, 99, 235), 0.08);
}

[data-theme="dark"] .formula-edit-dialog .formula-ingredients-table .mud-table-head .mud-table-cell,
.mud-theme-dark .formula-edit-dialog .formula-ingredients-table .mud-table-head .mud-table-cell {
    background: rgba(59, 130, 246, 0.18);
}

.party-edit-dialog .party-edit-finance-section {
    background: linear-gradient(160deg,
        rgba(16, 185, 129, 0.08) 0%,
        rgba(var(--theme-primary-rgb, 37, 99, 235), 0.03) 100%);
    border-color: rgba(16, 185, 129, 0.28);
}

[data-theme="dark"] .party-edit-dialog .party-edit-finance-section,
.mud-theme-dark .party-edit-dialog .party-edit-finance-section {
    background: linear-gradient(160deg,
        rgba(16, 185, 129, 0.14) 0%,
        rgba(59, 130, 246, 0.06) 100%);
}

.parties-page .items-code {
    color: #0f766e;
}

.period-edit-dialog .period-edit-standard-section {
    background: linear-gradient(160deg,
        rgba(37, 99, 235, 0.08) 0%,
        rgba(14, 165, 233, 0.03) 100%);
    border-color: rgba(37, 99, 235, 0.28);
}

[data-theme="dark"] .period-edit-dialog .period-edit-standard-section,
.mud-theme-dark .period-edit-dialog .period-edit-standard-section {
    background: linear-gradient(160deg,
        rgba(59, 130, 246, 0.14) 0%,
        rgba(14, 165, 233, 0.06) 100%);
}

.periods-page .items-code {
    color: #1d4ed8;
}

.master-salon-edit-dialog .master-salon-standard-section {
    background: linear-gradient(160deg,
        rgba(14, 116, 144, 0.1) 0%,
        rgba(var(--theme-primary-rgb, 37, 99, 235), 0.03) 100%);
    border-color: rgba(14, 116, 144, 0.32);
}

[data-theme="dark"] .master-salon-edit-dialog .master-salon-standard-section,
.mud-theme-dark .master-salon-edit-dialog .master-salon-standard-section {
    background: linear-gradient(160deg,
        rgba(14, 116, 144, 0.18) 0%,
        rgba(59, 130, 246, 0.06) 100%);
}

.master-salons-page .items-code {
    color: #0e7490;
}

.chick-purchases-page .items-code {
    color: #ca8a04;
}

.chick-purchases-page .items-table .mud-table-foot .mud-table-cell {
    background: #fef3c7;
    border-top: 2px solid #ca8a04;
    font-weight: 800;
    color: #92400e;
    padding-top: 8px;
    padding-bottom: 8px;
}

.chick-purchases-page .items-table .mud-table-foot .cp-foot-label {
    color: #78350f;
}

[data-theme="dark"] .chick-purchases-page .items-table .mud-table-foot .mud-table-cell,
.mud-theme-dark .chick-purchases-page .items-table .mud-table-foot .mud-table-cell {
    background: rgba(202, 138, 4, 0.22);
    border-top-color: #fbbf24;
    color: #fde68a;
}

[data-theme="dark"] .chick-purchases-page .items-table .mud-table-foot .cp-foot-label,
.mud-theme-dark .chick-purchases-page .items-table .mud-table-foot .cp-foot-label {
    color: #fcd34d;
}

.chick-purchase-part-dialog .chick-purchase-chick-section {
    background: linear-gradient(160deg,
        rgba(202, 138, 4, 0.1) 0%,
        rgba(var(--theme-primary-rgb, 37, 99, 235), 0.03) 100%);
    border-color: rgba(202, 138, 4, 0.35);
}

.chick-purchase-part-dialog .chick-purchase-parent-section {
    background: linear-gradient(160deg,
        rgba(124, 58, 237, 0.08) 0%,
        rgba(var(--theme-primary-rgb, 37, 99, 235), 0.03) 100%);
    border-color: rgba(124, 58, 237, 0.28);
}

.chick-purchase-part-dialog .chick-purchase-health-section {
    background: linear-gradient(160deg,
        rgba(37, 99, 235, 0.08) 0%,
        rgba(14, 165, 233, 0.03) 100%);
    border-color: rgba(37, 99, 235, 0.28);
}

.chick-purchase-part-dialog .chick-purchase-transport-section {
    background: linear-gradient(160deg,
        rgba(15, 118, 110, 0.1) 0%,
        rgba(var(--theme-primary-rgb, 37, 99, 235), 0.03) 100%);
    border-color: rgba(15, 118, 110, 0.32);
}

[data-theme="dark"] .chick-purchase-part-dialog .chick-purchase-chick-section,
.mud-theme-dark .chick-purchase-part-dialog .chick-purchase-chick-section {
    background: linear-gradient(160deg,
        rgba(202, 138, 4, 0.16) 0%,
        rgba(59, 130, 246, 0.06) 100%);
}

[data-theme="dark"] .chick-purchase-part-dialog .chick-purchase-parent-section,
.mud-theme-dark .chick-purchase-part-dialog .chick-purchase-parent-section {
    background: linear-gradient(160deg,
        rgba(124, 58, 237, 0.16) 0%,
        rgba(59, 130, 246, 0.06) 100%);
}

[data-theme="dark"] .chick-purchase-part-dialog .chick-purchase-health-section,
.mud-theme-dark .chick-purchase-part-dialog .chick-purchase-health-section {
    background: linear-gradient(160deg,
        rgba(59, 130, 246, 0.16) 0%,
        rgba(14, 165, 233, 0.06) 100%);
}

[data-theme="dark"] .chick-purchase-part-dialog .chick-purchase-transport-section,
.mud-theme-dark .chick-purchase-part-dialog .chick-purchase-transport-section {
    background: linear-gradient(160deg,
        rgba(15, 118, 110, 0.18) 0%,
        rgba(59, 130, 246, 0.06) 100%);
}





.period-close-dialog .period-close-summary {
    background: rgba(var(--theme-primary-rgb, 37, 99, 235), 0.03);
}

.period-close-dialog .period-close-date-section {
    background: linear-gradient(160deg,
        rgba(245, 158, 11, 0.1) 0%,
        rgba(var(--theme-primary-rgb, 37, 99, 235), 0.03) 100%);
    border-color: rgba(245, 158, 11, 0.35);
}

[data-theme="dark"] .period-close-dialog .period-close-date-section,
.mud-theme-dark .period-close-dialog .period-close-date-section {
    background: linear-gradient(160deg,
        rgba(245, 158, 11, 0.16) 0%,
        rgba(59, 130, 246, 0.06) 100%);
}



