﻿:root {
    --erp-primary: #1B4F72;
    --erp-primary-hover: #163F5B;
    --erp-primary-contrast: #FFFFFF;
    --erp-secondary: #5D6D7E;
    --erp-text: #2F2B3D;
    --erp-text-muted: #6F6B7D;
    --erp-bg: #F8F8F8;
    --erp-surface: #FFFFFF;
    --erp-border: #E6E6EA;
    --erp-radius: 6px;
    --erp-shadow: 0 4px 18px rgba(47, 43, 61, 0.08);
    --erp-shadow-sm: 0 2px 8px rgba(47, 43, 61, 0.06);
    --erp-font: "Tajawal", "Roboto", "Segoe UI", sans-serif;
    --erp-appbar-height: 56px;
    --mud-appbar-height: 56px;
    --erp-drawer-width: 260px;
    --erp-control-height: 38px;
    --erp-table-row-height: 45px;
    --mud-palette-primary: #1B4F72;
    --mud-palette-primary-rgb: 27, 79, 114;
    --mud-palette-primary-text: #FFFFFF;
    --mud-palette-secondary: #5D6D7E;
    --mud-palette-background: #F8F7FA;
    --mud-palette-surface: #FFFFFF;
    --mud-palette-drawer-background: #FFFFFF;
    --mud-palette-appbar-background: #FFFFFF;
    --mud-palette-text-primary: #2F2B3D;
    --mud-palette-text-secondary: #6F6B7D;
    --mud-palette-lines-default: #E6E6EA;
    --mud-default-borderradius: 6px;
}

html,
body,
.erp-application-layout {
    font-family: var(--erp-font);
    background: var(--erp-bg);
    color: var(--erp-text);
}

body.erp-application-layout {
    margin: 0;
}

.erp-appbar.mud-appbar {
    height: var(--erp-appbar-height);
    min-height: var(--erp-appbar-height);
    background: var(--erp-surface) !important;
    color: var(--erp-text) !important;
    border-bottom: 1px solid var(--erp-border);
    box-shadow: none;
    padding-inline: 0.65rem 1rem;
    overflow: visible;
}

/* MudAppBar renders its flex items inside the nested toolbar. */
.erp-appbar .mud-toolbar {
    gap: 0.75rem;
}

.erp-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    color: inherit;
    min-height: 2rem;
    min-width: unset;
    padding: 0;
    text-transform: none;
}

.erp-brand-wordmark {
    display: block;
    width: 12.5rem;
    height: auto;
    object-fit: contain;
}

.erp-appbar-action {
    text-transform: none;
    font-weight: 600;
    color: var(--erp-text);
}

.erp-context-bar {
    flex: 0 0 auto;
    margin-inline-end: 0.35rem;
    min-height: 2.25rem;
}

    .erp-context-select {
    width: 12.5rem;
    min-width: 9.5rem;
    max-width: 14.5rem;
}

.erp-context-select .mud-input-control {
    margin-top: 2px;
}

.erp-context-select .mud-input-control,
.erp-context-select .mud-input-slot,
.erp-context-select .mud-input-label {
    color: var(--erp-text);
    font-size: 0.8125rem;
}

.erp-context-select .mud-input {
    min-height: var(--erp-control-height);
    font-size: 0.8125rem;
}

.erp-context-select .mud-input-outlined .mud-input-outlined-border {
    border-color: var(--erp-border);
}

.erp-user-activator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.15rem;
    min-width: auto;
    padding-inline: 0.35rem 0.15rem;
    text-transform: none;
    color: var(--erp-text);
    cursor: pointer;
}

.erp-user-menu-popover {
    z-index: calc(var(--mud-zindex-popover, 1200) + 2);
}

.erp-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}

.erp-user-menu-identity {
    pointer-events: none;
    max-width: 16rem;
}

.erp-user-menu-identity .erp-user-name,
.erp-user-menu-identity .erp-user-tenant {
    font-size: 0.8125rem;
    font-weight: 600;
}

.erp-user-name,
.erp-user-tenant {
    font-size: 0.8125rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-user-identity-sep {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--erp-text-muted);
    flex-shrink: 0;
}

.erp-user-tenant {
    font-weight: 500;
    color: var(--erp-text-muted);
}

.erp-user-avatar {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.erp-user-form-avatar {
    width: 3.5rem;
    height: 3.5rem;
}

.erp-user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.erp-picture-upload-label {
    display: inline-flex;
    margin: 0;
    cursor: pointer;
}

.erp-hidden-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.erp-item-image,
.erp-item-image-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    object-fit: cover;
    display: block;
}

.erp-pos-quick-image,
.erp-pos-product-image {
    width: 56px;
    height: 56px;
    border-radius: 4px;
    object-fit: cover;
    display: block;
}

.erp-user-caret {
    color: var(--erp-text-muted);
}

.erp-nav-search-wrap {
    padding: 0.75rem 0.85rem 0.25rem;
}

.erp-nav-search .mud-input {
    font-size: 0.8125rem;
    min-height: var(--erp-control-height);
}

.erp-page-map {
    position: relative;
    z-index: 1;
    overflow: visible;
}

.erp-breadcrumbs.mud-breadcrumbs,
.erp-breadcrumbs {
    min-height: 1.8rem;
    padding: 0;
    margin: 0 0 0.15rem;
    overflow: visible;
}

.erp-breadcrumbs .mud-breadcrumb-item,
.erp-breadcrumbs .mud-breadcrumb-separator,
.erp-breadcrumbs .mud-typography {
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--erp-text-muted);
    font-weight: 400;
}

.erp-breadcrumbs .mud-breadcrumb-item:last-child .mud-typography {
    color: var(--erp-text);
    font-weight: 500;
}

.erp-text-muted {
    color: var(--erp-text-muted);
}

.erp-small-box {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 8.75rem;
    overflow: hidden;
    border-radius: var(--erp-radius);
    box-shadow: var(--erp-shadow-sm);
    color: #fff;
}

.erp-small-box-primary {
    background: #0d6efd;
}

.erp-small-box-success {
    background: #198754;
}

.erp-small-box-warning {
    background: #ffc107;
    color: #1f2d3d;
}

.erp-small-box-danger {
    background: #dc3545;
}

.erp-small-box-body {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    padding: 0.85rem 1rem 0.65rem;
    padding-inline-end: 4.75rem;
}

.erp-small-box-value {
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.erp-small-box-label {
    margin-top: 0.35rem;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.35;
}

.erp-small-box-hint {
    margin-top: 0.2rem;
    font-size: 0.8rem;
    line-height: 1.35;
    opacity: 0.9;
}

.erp-small-box .erp-small-box-watermark.mud-icon-root {
    position: absolute;
    z-index: 0;
    top: 0.45rem;
    inset-inline-end: 0.35rem;
    width: 4.75rem;
    height: 4.75rem;
    font-size: 4.75rem;
    color: rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

.erp-small-box-footer {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    margin-top: auto;
    padding: 0.32rem 0.75rem;
    background: rgba(0, 0, 0, 0.1);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.875rem;
    line-height: 1.4;
    text-decoration: none;
}

a.erp-small-box-footer:hover {
    background: rgba(0, 0, 0, 0.16);
    color: #fff;
    text-decoration: none;
}

.erp-small-box-warning .erp-small-box-footer,
.erp-small-box-warning a.erp-small-box-footer:hover {
    color: rgba(31, 45, 61, 0.9);
}

a.erp-small-box-footer:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -2px;
}

.mud-rtl .erp-small-box-footer-chevron,
[dir="rtl"] .erp-small-box-footer-chevron {
    transform: scaleX(-1);
}

@media (max-width: 599.98px) {
    .erp-small-box-body {
        padding-inline-end: 3.4rem;
    }

    .erp-small-box-value {
        font-size: 1.45rem;
    }

    .erp-small-box .erp-small-box-watermark.mud-icon-root {
        top: 0.7rem;
        width: 3.4rem;
        height: 3.4rem;
        font-size: 3.4rem;
    }
}

.erp-dashboard-kpis > .mud-grid-item,
.erp-dashboard-charts > .mud-grid-item {
    display: flex;
}


.erp-notification-badge .mud-badge-icon {
    font-size: 0.7rem;
}

.erp-notification-popover {
    min-width: 22rem;
    max-width: 28rem;
}

.erp-notification-header {
    padding: 0.75rem 1rem 0.35rem;
}

.erp-notification-group {
    padding: 0.5rem 1rem 0.15rem;
    color: var(--erp-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.erp-dashboard-section {
    margin-bottom: 1.75rem;
}

.erp-dashboard-tabs {
    margin-top: 0.25rem;
}

.erp-dashboard-tabs .mud-tab {
    min-height: 2.5rem;
}

.erp-dashboard-tabs .mud-tab.mud-tab-active,
.erp-dashboard-tabs .mud-tab[aria-selected="true"] {
    color: var(--erp-primary);
    font-weight: 700;
    background: var(--erp-surface);
}

.erp-dashboard-tabs .mud-tabs-slider,
.erp-dashboard-tabs .mud-tab-slider {
    background: var(--erp-primary);
}

.erp-dashboard-kpis {
    margin-bottom: 1rem;
}

.erp-chart-card {
    min-height: 22rem;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: var(--erp-radius);
    background: var(--erp-surface);
}

.erp-chart-card-lg {
    min-height: 26rem;
}

.erp-chart-card .mud-chart {
    flex: 1 1 auto;
    min-height: 16rem;
}

.erp-rank-list {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.9rem;
    flex: 1 1 auto;
    min-height: 16rem;
    padding-top: 0.35rem;
}

.erp-rank-list-lg {
    gap: 1.15rem;
}

.erp-rank-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.erp-rank-label {
    flex: 0 1 38%;
    min-width: 7.5rem;
    font-size: 0.95rem;
    line-height: 1.35;
    color: var(--erp-text);
    overflow-wrap: anywhere;
}

.erp-rank-list-lg .erp-rank-label {
    font-size: 1.05rem;
}

.erp-rank-track {
    flex: 1 1 auto;
    height: 0.9rem;
    min-width: 4rem;
    background: var(--erp-bg);
    border-radius: 999px;
    overflow: hidden;
}

.erp-rank-list-lg .erp-rank-track {
    height: 1.15rem;
}

.erp-rank-bar {
    height: 100%;
    min-width: 0.35rem;
    border-radius: 999px;
}

.erp-rank-value {
    flex: 0 0 auto;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--erp-text);
}

.erp-rank-list-lg .erp-rank-value {
    font-size: 1.05rem;
}

.erp-alert-link {
    text-decoration: none;
}

.erp-hub-section {
    margin-bottom: 1.75rem;
}

.erp-hub-section-title {
    margin-bottom: 0.85rem;
    font-weight: 600;
}

.erp-hub-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-width: 8.5rem;
    min-height: 8.5rem;
    aspect-ratio: 1;
    height: 100%;
    padding: 1rem 0.75rem;
    text-align: center;
    color: var(--erp-text);
    background: var(--erp-surface);
    border: 1px solid var(--erp-border);
    border-radius: var(--erp-radius);
    box-shadow: none;
    text-decoration: none;
}

.erp-hub-tile:hover {
    background: var(--erp-bg);
    color: var(--erp-text);
    text-decoration: none;
}

.erp-hub-tile:focus-visible {
    outline: 2px solid var(--erp-primary);
    outline-offset: 2px;
}

.erp-hub-tile-icon {
    font-size: 2rem;
    color: var(--erp-primary);
}

.erp-permission-pane {
    min-height: 22rem;
    max-height: 60vh;
    overflow: auto;
}

.erp-pos-quick-tile {
    min-width: 7.5rem;
    min-height: 6.25rem;
    text-transform: none;
    padding: 0.5rem 0.65rem;
}

.erp-pos-pay {
    min-height: 2.75rem;
    font-weight: 700;
    text-transform: none;
}

.erp-pos-page {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.erp-pos-page--workspace {
    height: calc(100dvh - var(--erp-appbar-height) - 2.85rem);
    min-height: 28rem;
    overflow: hidden;
}

.erp-pos-page--workspace .erp-breadcrumbs {
    display: none;
}

.erp-pos-page--workspace .erp-page-toolbar-title .mud-typography-h4 {
    font-size: 1.25rem;
}

.erp-pos-page--workspace .erp-page-toolbar-subtitle {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-pos-page--workspace > .erp-page-toolbar {
    flex: 0 0 auto;
    margin-bottom: 0.5rem;
}

.erp-pos-notices {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 0 1 auto;
    min-height: 0;
}

.erp-pos-notices:not(:empty) {
    margin-bottom: 0.5rem;
}

.erp-pos-notice {
    max-height: 9.5rem;
    overflow: auto;
}

.erp-pos-quick-panel {
    width: min(100%, 42rem);
    margin-top: 0.05rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--erp-border);
    border-radius: var(--erp-radius);
    background: var(--erp-surface);
    box-shadow: var(--erp-shadow-sm);
}

.erp-pos-quick-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-bottom: 0.45rem;
    margin-bottom: 0.55rem;
    border-bottom: 1px solid var(--erp-border);
}

.erp-pos-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.45rem;
}

.erp-pos-summary-item {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
    padding: 0.45rem 0.5rem;
    border: 1px solid var(--erp-border);
    border-radius: calc(var(--erp-radius) - 1px);
    background: var(--erp-bg);
}

.erp-pos-summary-item span {
    color: var(--erp-text-muted);
    font-size: 0.7rem;
    line-height: 1.25;
}

.erp-pos-summary-item strong {
    color: var(--erp-text);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.erp-pos-summary-item--emphasis strong {
    color: var(--erp-primary);
}

.erp-pos-summary-item--difference strong {
    color: var(--erp-primary);
}

.erp-pos-recent-receipts {
    margin-top: 0.6rem;
    max-height: 8rem;
    overflow: auto;
}

.erp-pos-recent-receipts-title {
    display: block;
    margin-bottom: 0.2rem;
    color: var(--erp-text-muted);
    font-weight: 600;
}

.erp-pos-receipt-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.2rem 0;
    border-top: 1px solid var(--erp-border);
}

.erp-pos-receipt-info {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-pos-cash-panel {
    width: min(100%, 30rem);
}

.erp-pos-cash-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    align-items: start;
}

.erp-pos-cash-form .mud-input-control {
    margin-top: 0;
}

.erp-pos-cash-actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding-top: 0.05rem;
}

.erp-pos-cash-actions .mud-button-root {
    text-transform: none;
}

@media (max-width: 959.98px) {
    .erp-pos-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .erp-pos-cash-form {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .erp-pos-cash-form > :nth-child(3) {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .erp-pos-quick-panel {
        width: 100%;
        padding: 0.65rem;
        margin-top: 0.05rem;
    }

    .erp-pos-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .erp-pos-recent-receipts {
        max-height: 10rem;
    }

    .erp-pos-receipt-row {
        align-items: flex-start;
    }

    .erp-pos-receipt-info {
        white-space: normal;
    }

    .erp-pos-receipt-row .mud-button-root {
        flex: 0 0 auto;
    }

    .erp-pos-cash-form {
        grid-template-columns: 1fr;
    }

    .erp-pos-cash-form > :nth-child(3) {
        grid-column: auto;
    }

    .erp-pos-cash-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .erp-pos-cash-actions .mud-button-root {
        width: 100%;
        min-height: 2.5rem;
    }
}

.erp-pos-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(21rem, 24.5rem);
    gap: 0.75rem;
    flex: 1 1 auto;
    min-height: 0;
}

.erp-pos-catalog,
.erp-pos-sale {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    height: 100%;
    padding: 0.75rem;
}

.erp-pos-catalog-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 0 0 auto;
}

.erp-pos-session-actions,
.erp-pos-categories {
    row-gap: 0.35rem;
}

.erp-pos-search {
    min-width: 0;
}

.erp-pos-catalog-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    margin-top: 0.65rem;
}

.erp-pos-catalog-loading {
    margin-bottom: 0.35rem;
}

.erp-pos-catalog-more {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.65rem 0 0.35rem;
}

.erp-pos-section-label {
    color: var(--erp-text-muted);
    margin-bottom: 0.35rem;
}

.erp-pos-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9rem, 10.75rem));
    justify-content: start;
    gap: 0.5rem;
    align-items: stretch;
}

.erp-pos-product-grid + .erp-pos-product-grid {
    margin-top: 0.65rem;
}

.erp-pos-product-card.mud-button-root {
    height: 100%;
    min-height: 8.75rem;
    padding: 0.45rem 0.5rem 0.55rem;
    text-transform: none;
    justify-content: flex-start;
    align-items: stretch;
    border: 1px solid var(--erp-border);
    box-shadow: none;
}

.erp-pos-product-card .mud-button-label {
    width: 100%;
    white-space: normal;
}

.erp-pos-product-card-inner {
    width: 100%;
}

.erp-pos-product-placeholder {
    width: 56px;
    height: 56px;
    color: var(--erp-text-muted);
}

.erp-pos-product-meta {
    width: 100%;
    min-width: 0;
}

.erp-pos-product-name,
.erp-pos-product-code {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: start;
    width: 100%;
}

.erp-pos-product-code {
    -webkit-line-clamp: 1;
    color: var(--erp-text-muted);
}

.erp-pos-product-price {
    color: var(--erp-primary);
    font-weight: 700;
}

.erp-pos-catalog-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
    align-items: end;
    flex: 0 0 auto;
    padding-top: 0.65rem;
}

.erp-pos-barcode-add {
    min-height: var(--erp-control-height);
    height: var(--erp-control-height);
    text-transform: none;
}

.erp-pos-sale-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex: 0 0 auto;
}

.erp-pos-sale-complete {
    flex: 0 1 auto;
    max-height: 8.5rem;
    overflow: auto;
    margin-top: 0.5rem;
}

.erp-pos-customer {
    flex: 0 0 auto;
    margin: 0.5rem 0;
}

.erp-pos-cart-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.erp-pos-cart-head,
.erp-pos-cart-line {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) 7.25rem 3.6rem 3.9rem 1.75rem;
    gap: 0.25rem 0.35rem;
    align-items: center;
}

.erp-pos-cart-head {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 0.15rem 0 0.35rem;
    color: var(--erp-text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    background: var(--erp-surface);
}

.erp-pos-cart-line {
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--erp-border);
}

.erp-pos-cart-item {
    min-width: 0;
}

.erp-pos-cart-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-pos-qty {
    justify-content: center;
}

.erp-pos-qty-field {
    width: 3.35rem;
    min-width: 3.35rem;
}

.erp-pos-qty-field .mud-input-control {
    margin: 0;
}

.erp-pos-cart-num {
    text-align: end;
    font-variant-numeric: tabular-nums;
}

.erp-pos-sale-footer {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    flex: 0 0 auto;
    padding-top: 0.65rem;
}

.erp-pos-totals {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
}

.erp-pos-total-row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--erp-text-muted);
    font-size: 0.875rem;
}

.erp-pos-total-row--grand {
    margin-top: 0.15rem;
    padding: 0.5rem 0.65rem;
    border-radius: var(--erp-radius);
    background: rgba(27, 79, 114, 0.08);
    color: var(--erp-primary);
    font-size: 1.05rem;
    font-weight: 700;
}

.erp-pos-tenders {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.erp-pos-tenders .mud-input-control {
    margin-top: 0;
}

@media (max-width: 959.98px) {
    .erp-pos-page--workspace {
        height: auto;
        min-height: 0;
        overflow: visible;
    }

    .erp-pos-workspace {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .erp-pos-catalog,
    .erp-pos-sale {
        height: auto;
    }

    .erp-pos-catalog-body {
        overflow: visible;
        min-height: 16rem;
    }

    .erp-pos-cart-body {
        max-height: min(18rem, 40vh);
        overflow: auto;
    }
}

@media (max-width: 600px) {
    .erp-pos-catalog-footer {
        grid-template-columns: 1fr;
    }

    .erp-pos-cart-head {
        display: none;
    }

    .erp-pos-cart-line {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "item delete"
            "qty totals";
    }

    .erp-pos-cart-item { grid-area: item; }
    .erp-pos-qty { grid-area: qty; justify-content: flex-start; }
    .erp-pos-cart-line > .erp-pos-cart-num:nth-of-type(1) { display: none; }
    .erp-pos-cart-line > .erp-pos-cart-num:nth-of-type(2) { grid-area: totals; }
    .erp-pos-cart-line > .mud-icon-button { grid-area: delete; justify-self: end; }
}

.erp-page-toolbar-actions .mud-input-control {
    min-width: 10.5rem;
}

.erp-active-status {
    height: 1.4rem;
    font-size: 0.72rem;
}

.erp-drawer.mud-drawer {
    --erp-drawer-bg: #343a40;
    --erp-drawer-text: rgba(255, 255, 255, 0.85);
    background: var(--erp-drawer-bg);
    color: var(--erp-drawer-text);
    border-inline-end: 0;
    box-shadow: none;
    width: var(--erp-drawer-width);
}

.erp-drawer .mud-drawer-content {
    background: var(--erp-drawer-bg);
    color: var(--erp-drawer-text);
}

.erp-drawer .erp-nav-search .mud-input,
.erp-drawer .erp-nav-search input,
.erp-drawer .erp-nav-search .mud-icon-root {
    color: var(--erp-drawer-text);
}

.erp-drawer .erp-nav-search .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.28);
}

.erp-drawer.erp-nav-locked {
    pointer-events: none;
    opacity: 0.55;
}

.erp-home-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    min-height: calc(100vh - 8rem);
    padding: 2rem 1rem;
    text-align: center;
}

.erp-startup-loading {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem;
    background: var(--erp-bg);
    color: var(--erp-text);
    text-align: center;
}

.erp-startup-spinner {
    width: 2.25rem;
    height: 2.25rem;
    border: 3px solid var(--erp-border);
    border-top-color: var(--erp-primary);
    border-radius: 50%;
    animation: erp-startup-spin 0.8s linear infinite;
}

.erp-startup-wordmark {
    display: block;
    width: min(20rem, 88vw);
    height: auto;
    object-fit: contain;
}

.erp-startup-copy {
    margin: 0;
    font-size: 0.95rem;
    color: var(--erp-text-muted);
}

@keyframes erp-startup-spin {
    to {
        transform: rotate(360deg);
    }
}

html[dir="rtl"] .erp-startup-spinner {
    animation-name: erp-startup-spin-rtl;
}

@keyframes erp-startup-spin-rtl {
    to {
        transform: rotate(-360deg);
    }
}

body:has(.mud-layout) #erp-startup-loading,
body:has(.erp-setup-layout) #erp-startup-loading,
body:has(.erp-public-service-request-page) #erp-startup-loading {
    display: none !important;
}

.erp-public-service-request-success.mud-container {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: max(1.5rem, env(safe-area-inset-top)) 1.25rem max(1.5rem, env(safe-area-inset-bottom));
}

.erp-public-intake-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: min(100%, 26rem);
    gap: 0.75rem;
}

.erp-public-intake-success-mark {
    width: clamp(5.5rem, 24vw, 7rem);
    height: auto;
    margin-bottom: 0.35rem;
}

.erp-public-intake-success-circle {
    fill: #e8f5ee;
    stroke: #1b7a4a;
    stroke-width: 2;
    transform-box: fill-box;
    transform-origin: center;
    animation: erp-public-intake-circle 0.45s ease-out both;
}

.erp-public-intake-success-check {
    fill: none;
    stroke: #1b7a4a;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: erp-public-intake-check 0.55s ease-out 0.28s forwards;
}

.erp-public-intake-success-title {
    margin: 0.4rem 0 0;
    font-family: var(--erp-font);
    font-size: clamp(1.35rem, 4.6vw, 1.75rem);
    font-weight: 700;
    line-height: 1.45;
    color: var(--erp-text);
}

.erp-public-intake-success-copy {
    margin: 0;
    max-width: 22rem;
    font-family: var(--erp-font);
    font-size: clamp(1rem, 3.6vw, 1.125rem);
    font-weight: 400;
    line-height: 1.75;
    color: var(--erp-text-muted);
}

@keyframes erp-public-intake-circle {
    from {
        opacity: 0;
        transform: scale(0.86);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes erp-public-intake-check {
    to {
        stroke-dashoffset: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .erp-public-intake-success-circle,
    .erp-public-intake-success-check {
        animation: none;
    }

    .erp-public-intake-success-check {
        stroke-dashoffset: 0;
    }
}

.erp-drawer .mud-nav-group {
    margin-block: 0.15rem;
}

.erp-drawer .mud-nav-link .mud-nav-link-icon,
.erp-drawer .mud-nav-group .mud-nav-link-icon {
    color: #fff !important;
    min-width: 1.5rem;
}

.mud-snackbar {
    border-radius: var(--erp-radius);
    font-family: var(--erp-font);
}

.erp-drawer .mud-nav-link {
    border-radius: var(--erp-radius);
    margin-block: 0.05rem;
    min-height: 2.4rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--erp-drawer-text);
}

.erp-drawer .mud-nav-link:hover:not(.active) {
    background: rgba(255, 255, 255, 0.06);
    color: var(--erp-drawer-text);
}

.erp-drawer .mud-nav-group > .mud-nav-link {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    min-height: 2.15rem;
}

.erp-drawer .mud-nav-link.active,
.erp-drawer .mud-nav-link.active:hover {
    background: var(--erp-primary);
    color: var(--erp-primary-contrast);
    font-weight: 600;
}

.erp-drawer .mud-nav-group:has(.mud-nav-link.active) > .mud-nav-link:not(.active),
.erp-drawer .mud-nav-group:has(.mud-nav-link.active) > .mud-nav-link:not(.active):hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--erp-primary-contrast);
    border-inline-start: 3px solid var(--erp-primary);
}

.erp-main {
    display: flex;
    flex-direction: column;
    padding-inline: 1.75rem;
    padding-bottom: 1.75rem;
    min-height: 100vh;
}

.erp-site-footer {
    flex: 0 0 auto;
    margin-top: auto;
    padding: 0.85rem 1rem 0.15rem;
    text-align: center;
}

.erp-site-footer p {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--erp-text-muted);
}

/* AppBar and main are siblings; beat MudBlazor dense padding (48px) that tucks crumbs under the 56px bar. */
.erp-appbar.mud-appbar-dense ~ .erp-main.mud-main-content,
.erp-appbar ~ .erp-main.mud-main-content {
    padding-top: calc(var(--erp-appbar-height) + 1rem);
}

.erp-page-toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.1rem;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 0;
}

.erp-page-header-row {
    position: relative;
    z-index: 0;
    min-height: 1.85rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.erp-page-help {
    flex: 0 0 auto;
    margin-top: 0.15rem;
}

.erp-page-toolbar-title .mud-typography-h4,
.erp-page-toolbar-title .mud-typography-h5 {
    font-size: 1.5rem;
    line-height: 1.2;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--erp-text);
}

.erp-page-toolbar-subtitle {
    color: var(--erp-text-muted);
    margin-top: 0.2rem;
    font-size: 0.875rem;
}

.erp-page-toolbar-actions {
    margin-inline-start: auto;
}

.erp-list-surface {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.erp-list-toolbar-card {
    background: var(--erp-surface);
    border: 1px solid var(--erp-border);
    border-radius: var(--erp-radius);
    box-shadow: var(--erp-shadow-sm);
    padding: 1rem 1.15rem 0.95rem;
}

.erp-page-toolbar > .erp-list-toolbar-card {
    margin-top: 0.75rem;
}

.erp-page-host:has(> .erp-list-surface) > .erp-page-toolbar > .erp-list-toolbar-card,
.erp-page-host:has(> .mud-alert + .erp-list-surface) > .erp-page-toolbar > .erp-list-toolbar-card {
    display: none;
}

.erp-list-toolbar-row-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: var(--erp-control-height);
}

.erp-list-toolbar-primary,
.erp-list-toolbar-secondary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.erp-list-toolbar-secondary {
    margin-inline-start: auto;
}

.erp-list-toolbar-row-actions + .erp-list-toolbar-row-query {
    margin-top: 0.9rem;
}

.erp-list-toolbar-row-query {
    display: flex;
    justify-content: flex-end;
}

.erp-list-toolbar-query {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
}

.erp-list-toolbar-card .mud-input-control {
    margin-top: 0;
    margin-bottom: 0;
    height: var(--erp-control-height);
    min-height: var(--erp-control-height);
}

.erp-list-toolbar-card .mud-input-control .mud-input-control-input-container {
    margin-top: 0;
}

.erp-list-toolbar-card .mud-input,
.erp-list-toolbar-card .mud-input-outlined,
.erp-list-toolbar-card .mud-select .mud-input,
.erp-list-toolbar-card .mud-picker .mud-input {
    min-height: var(--erp-control-height);
    height: var(--erp-control-height);
    font-size: 0.875rem;
}

.erp-list-toolbar-card .mud-button {
    height: var(--erp-control-height);
    min-height: var(--erp-control-height);
    padding-inline: 1.15rem;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: none;
}

.erp-list-toolbar-card .mud-button .mud-button-label,
.erp-list-toolbar-card .mud-button .mud-icon-root {
    font-size: 0.875rem;
}

.erp-list-toolbar-card .mud-button-filled-primary {
    padding-inline: 1.25rem;
}

.erp-card.mud-paper,
.erp-table.mud-table,
.erp-table-paper.mud-paper {
    background: var(--erp-surface);
    border: 0;
    border-radius: var(--erp-radius);
    box-shadow: var(--erp-shadow-sm);
    overflow: hidden;
}

.erp-list-card.erp-card.mud-paper {
    border: 1px solid var(--erp-border);
    box-shadow: 0 4px 18px rgba(47, 43, 61, 0.06);
}

.erp-table.mud-table {
    overflow: hidden;
    font-size: 0.8125rem;
}

.erp-table .mud-table-container {
    overflow-x: auto;
}

.erp-bidi-text,
.erp-bidi-text input,
.erp-bidi-text textarea {
    unicode-bidi: plaintext;
    direction: auto;
    text-align: start;
}

.erp-table .mud-table-head .mud-table-cell {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--erp-text-muted);
    background: transparent;
    border-bottom: 1px solid var(--erp-border);
    height: var(--erp-table-row-height);
    padding: 0.65rem 0.9rem;
    white-space: nowrap;
}

.erp-table .mud-table-body .mud-table-cell {
    height: var(--erp-table-row-height);
    padding: 0.5rem 0.9rem;
    font-size: 0.8125rem;
    color: var(--erp-text);
    border-bottom: 1px solid var(--erp-border);
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 14rem;
}

.erp-einvoice-cell {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.125rem;
    max-height: var(--erp-table-row-height);
    white-space: nowrap;
    vertical-align: middle;
}

.erp-einvoice-cell .erp-einvoice-chip.mud-chip {
    height: 1.375rem;
    min-height: 1.375rem;
    padding-inline: 0.5rem;
    font-size: 0.7rem;
}

.erp-einvoice-cell .mud-icon-button {
    width: 1.75rem;
    height: 1.75rem;
    padding: 0.125rem;
}

.erp-table .mud-table-row:nth-of-type(even) .mud-table-cell {
    background: transparent;
}

.erp-table .mud-table-body .mud-table-row:hover .mud-table-cell {
    background: rgba(47, 43, 61, 0.035);
}

.erp-table .mud-table-body .mud-table-row:last-child .mud-table-cell {
    border-bottom: 0;
}

.erp-table .mud-table-cell:last-child {
    width: 1%;
    white-space: nowrap;
    overflow: visible;
    max-width: none;
    text-overflow: clip;
}

.erp-table .mud-table-cell:last-child .mud-button {
    min-width: auto;
    padding-inline: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 500;
}

.erp-table .mud-table-pagination {
    border-top: 1px solid var(--erp-border);
    min-height: 3.25rem;
    padding-inline: 0.5rem 0.75rem;
    color: var(--erp-text-muted);
    font-size: 0.8125rem;
}

.erp-table .mud-table-pagination-toolbar {
    min-height: 3.25rem;
    padding: 0.2rem 0;
    align-items: center;
}

.erp-table .mud-table-pagination .mud-input,
.erp-table .mud-table-pagination .mud-select .mud-input {
    min-height: 2rem;
    font-size: 0.8125rem;
}

.erp-table .mud-table-pagination .mud-input-control {
    margin-top: 0;
}

.erp-table.mud-table-striped .mud-table-row:nth-of-type(even) {
    background: transparent;
}

.erp-table .mud-table-cell {
    border-bottom-color: var(--erp-border);
}

.erp-section {
    margin-top: 1.15rem;
}

.erp-nav-menu {
    padding: 0.35rem 0.75rem 1rem;
}

.erp-nav-icon {
    width: 1.15rem;
    text-align: center;
    margin-inline-end: 0.5rem;
    color: var(--erp-secondary);
}

.erp-application-layout .mud-button {
    text-transform: none;
    font-weight: 500;
    border-radius: var(--erp-radius);
}

.erp-application-layout .mud-button-filled-primary {
    box-shadow: none;
    background: var(--erp-primary);
    color: var(--erp-primary-contrast);
}

.erp-application-layout .mud-button-filled-primary:hover {
    background: var(--erp-primary-hover);
}

.erp-application-layout .mud-button-text-primary {
    color: var(--erp-primary);
}

.erp-application-layout .mud-button-outlined-primary {
    color: var(--erp-primary);
    border-color: var(--erp-primary);
}

.erp-application-layout .mud-input-outlined,
.erp-application-layout .mud-input-filled {
    border-radius: var(--erp-radius);
}

.erp-application-layout .mud-alert,
.erp-application-layout .mud-chip {
    border-radius: var(--erp-radius);
}

.mud-nav-link,
.mud-nav-group,
.mud-input-label,
.mud-button-label,
.mud-typography {
    font-family: var(--erp-font);
}

.mud-paper {
    border-radius: var(--erp-radius);
}

.mud-table-head .mud-table-cell {
    font-weight: 600;
    color: var(--erp-text);
}

.erp-account-body {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background: var(--erp-bg);
    font-family: var(--erp-font);
    color: var(--erp-text);
}

.erp-account-shell {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 0;
}

.erp-account-aside {
    display: none;
    width: 32%;
    max-width: none;
    padding: 2.5rem 2rem;
    background:
        radial-gradient(circle at 18% 20%, rgba(27, 79, 114, 0.08), transparent 42%),
        linear-gradient(180deg, #F3F2F7 0%, #F8F8F8 100%);
    color: var(--erp-text);
}

.erp-account-body .erp-account-aside,
.erp-setup-shell .erp-account-aside {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background-color: #163F5B;
    background-image: url("/images/account/erp-panel.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #FFFFFF;
}

.erp-account-body .erp-account-aside::before,
.erp-setup-shell .erp-account-aside::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(180deg, rgba(27, 79, 114, 0.62) 0%, rgba(22, 63, 91, 0.78) 100%);
    pointer-events: none;
}

.erp-account-body .erp-account-aside > *,
.erp-setup-shell .erp-account-aside > * {
    position: relative;
    z-index: 1;
}

.erp-account-identity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 0.5rem;
}

.erp-account-identity-text {
    min-width: 0;
}

.erp-account-wordmark {
    display: block;
    width: min(18rem, 100%);
    height: auto;
    object-fit: contain;
}

.erp-account-aside .erp-account-identity {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin: 0;
}

.erp-account-aside .erp-account-wordmark {
    width: min(20rem, 100%);
    background: #ffffff;
    padding: 0.45rem 0.7rem;
    border-radius: 8px;
}

.erp-account-aside--flows {
    justify-content: flex-start;
    gap: 0.85rem;
    padding: 1.35rem 1.15rem 1.15rem;
    overflow: hidden;
}

.erp-account-aside--flows .erp-account-identity {
    flex: 0 0 auto;
    gap: 0;
}

.erp-account-aside--flows .erp-account-wordmark {
    width: min(12.5rem, 86%);
    padding: 0.32rem 0.5rem;
}

.erp-account-flows {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.erp-account-flow-title {
    margin: 0;
    max-width: 18rem;
    color: #ffffff;
    font-size: clamp(0.95rem, 1.5vw, 1.2rem);
    font-weight: 700;
    line-height: 1.35;
}

.erp-account-flow-list {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    gap: 0.35rem;
}

.erp-flow {
    --erp-flow-delay: 0s;
    min-width: 0;
}

.erp-flow-name {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 0.28rem;
    color: #ffffff;
    font-size: clamp(0.72rem, 1vw, 0.84rem);
    font-weight: 700;
    line-height: 1.2;
}

.erp-flow-icon {
    display: inline-flex;
    flex: 0 0 auto;
    width: 1.15rem;
    height: 1.15rem;
    color: #d7e7f4;
}

.erp-flow-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.erp-flow-steps {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: min(100%, 22rem);
    gap: 0.28rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.erp-flow-node {
    flex: 1 1 0;
    min-width: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(0.62rem, 0.85vw, 0.72rem);
    font-weight: 500;
    line-height: 1.25;
    text-align: center;
    animation: erp-flow-node 5.4s ease-in-out infinite;
    animation-delay: calc(var(--erp-flow-delay) + var(--erp-node-delay, 0s));
}

.erp-flow-link {
    position: relative;
    display: flex;
    flex: 0 0 1.7rem;
    align-items: center;
    width: 1.7rem;
    min-width: 1.7rem;
    height: 0.7rem;
}

.erp-flow-track {
    position: relative;
    display: block;
    width: 100%;
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    overflow: visible;
}

.erp-flow-track::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 72%;
    height: 3px;
    margin-top: -1.5px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.25) 28%, #ffffff 100%);
    box-shadow: 0 0 7px 1px rgba(232, 244, 252, 0.95);
    animation: erp-flow-travel 2.6s ease-in-out infinite;
    animation-delay: var(--erp-flow-delay);
}

.erp-flow-steps .erp-flow-link:nth-child(4) .erp-flow-track::before,
.erp-flow-steps .erp-flow-link:nth-child(4)::after {
    animation-delay: calc(var(--erp-flow-delay) + 1.3s);
}

.erp-flow-link::after {
    content: "";
    position: absolute;
    top: 50%;
    inset-inline-end: -0.02rem;
    z-index: 1;
    width: 0.42rem;
    height: 0.42rem;
    border-top: 2px solid rgba(255, 255, 255, 0.72);
    border-inline-end: 2px solid rgba(255, 255, 255, 0.72);
    transform: translateY(-50%) rotate(45deg);
    animation: erp-flow-arrow 2.6s ease-in-out infinite;
    animation-delay: var(--erp-flow-delay);
}

[dir="rtl"] .erp-flow-link::after {
    transform: translateY(-50%) rotate(-45deg);
}

[dir="rtl"] .erp-flow-track::before {
    background: linear-gradient(90deg, #ffffff 0%, rgba(255, 255, 255, 0.25) 72%, transparent 100%);
    animation-name: erp-flow-travel-rtl;
}

@keyframes erp-flow-travel {
    0% { transform: translateX(-130%); opacity: 0.15; }
    12% { opacity: 1; }
    78% { opacity: 1; }
    100% { transform: translateX(210%); opacity: 0.15; }
}

@keyframes erp-flow-travel-rtl {
    0% { transform: translateX(130%); opacity: 0.15; }
    12% { opacity: 1; }
    78% { opacity: 1; }
    100% { transform: translateX(-210%); opacity: 0.15; }
}

@keyframes erp-flow-arrow {
    0%, 100% { opacity: 0.55; filter: none; }
    46% { opacity: 1; filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.95)); }
    70% { opacity: 0.72; filter: none; }
}

@keyframes erp-flow-node {
    0%, 100% { color: rgba(255, 255, 255, 0.72); }
    18% { color: #ffffff; }
    36% { color: rgba(255, 255, 255, 0.78); }
}

@media (max-height: 820px) {
    .erp-account-aside--flows {
        padding-top: 1rem;
        padding-bottom: 0.85rem;
        gap: 0.45rem;
    }

    .erp-account-flow-title {
        font-size: 0.92rem;
    }

    .erp-flow-name {
        margin-bottom: 0.16rem;
    }
}

@media (max-height: 700px) {
    .erp-account-aside--flows .erp-account-wordmark {
        width: min(10rem, 78%);
    }

    .erp-account-flow-title {
        font-size: 0.84rem;
    }

    .erp-flow-name,
    .erp-flow-node {
        font-size: 0.62rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .erp-flow-node,
    .erp-flow-track::before,
    [dir="rtl"] .erp-flow-track::before,
    .erp-flow-link::after,
    [dir="rtl"] .erp-flow-link::after,
    .erp-flow-steps .erp-flow-link:nth-child(4) .erp-flow-track::before,
    .erp-flow-steps .erp-flow-link:nth-child(4)::after {
        animation: none;
    }

    .erp-flow-node {
        color: rgba(255, 255, 255, 0.92);
    }

    .erp-flow-link::after,
    [dir="rtl"] .erp-flow-link::after {
        opacity: 1;
        filter: none;
        border-top-color: rgba(255, 255, 255, 0.95);
        border-inline-end-color: rgba(255, 255, 255, 0.95);
    }

    .erp-flow-track {
        background: rgba(255, 255, 255, 0.72);
    }

    .erp-flow-track::before,
    [dir="rtl"] .erp-flow-track::before {
        opacity: 0;
    }
}

@media (max-width: 480px) {
    .erp-account-aside .erp-account-tagline {
        display: none;
    }
}

.erp-account-body .erp-account-aside .erp-account-brand,
.erp-account-body .erp-account-aside .erp-account-tagline,
.erp-setup-shell .erp-account-aside .erp-account-brand,
.erp-setup-shell .erp-account-aside .erp-account-tagline {
    color: #FFFFFF;
    max-width: 22rem;
}

.erp-account-tagline {
    margin: 0.75rem 0 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--erp-text-muted);
    max-width: 22rem;
}

.erp-account-stage {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.erp-account-card {
    width: 100%;
    max-width: 28rem;
    background: var(--erp-surface);
    border: 1px solid var(--erp-border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(47, 43, 61, 0.10);
    padding: 1.75rem 2rem 1.75rem;
    margin: 1.5rem 1rem;
    align-self: center;
}

.erp-account-brand-mobile {
    display: block;
}

@media (min-width: 900px) {
    .erp-account-shell {
        justify-content: flex-start;
        background: var(--erp-bg);
    }

    .erp-account-aside {
        display: flex;
        min-width: 0;
        flex-direction: column;
        justify-content: center;
    }

    .erp-account-aside--flows {
        justify-content: center;
        overflow: hidden;
    }

    .erp-setup-shell .erp-account-aside--flows {
        position: sticky;
        top: 0;
        align-self: flex-start;
        height: calc(100vh - 2.75rem);
        max-height: calc(100vh - 2.75rem);
    }

    .erp-account-body .erp-account-aside,
    .erp-setup-shell .erp-account-aside {
        flex: 0 0 32%;
        width: 32%;
        max-width: 32%;
    }

    .erp-account-brand-mobile {
        display: none;
    }

    .erp-account-stage {
        flex: 1 1 68%;
        padding: 2.5rem 2.25rem;
        background: var(--erp-bg);
    }

    .erp-account-card {
        margin: 0;
        padding: 1.75rem 2.25rem 2rem;
    }
}

@media (min-width: 900px) and (max-width: 1199px) {
    .erp-account-body .erp-account-aside,
    .erp-setup-shell .erp-account-aside {
        flex: 0 0 28%;
        width: 28%;
        max-width: 28%;
    }
}

.erp-account-brand {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--erp-primary);
    margin: 0 0 0.35rem;
}

.erp-account-title {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.25;
    margin: 0 0 0.4rem;
}

.erp-account-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.erp-account-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--erp-text-muted);
}

.erp-account-field input[type="text"],
.erp-account-field input[type="password"],
.erp-account-field input[type="email"] {
    height: var(--erp-control-height);
    border: 1px solid var(--erp-border);
    border-radius: var(--erp-radius);
    padding: 0 0.85rem;
    font-family: var(--erp-font);
    font-size: 0.875rem;
}

.erp-account-field input:focus {
    outline: 2px solid rgba(27, 79, 114, 0.25);
    border-color: var(--erp-primary);
}

.erp-account-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

.erp-account-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.erp-account-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: var(--erp-control-height);
    width: 100%;
    border: 0;
    border-radius: var(--erp-radius);
    background: var(--erp-primary);
    color: var(--erp-primary-contrast);
    font-family: var(--erp-font);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
}

.erp-account-submit:hover {
    filter: brightness(1.05);
}

.erp-account-submit-progress {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.erp-account-form.is-submitting .erp-account-submit-label,
.erp-register-form.is-submitting .erp-account-submit-label {
    display: none;
}

.erp-account-form.is-submitting .erp-account-submit-progress,
.erp-register-form.is-submitting .erp-account-submit-progress {
    display: inline-flex;
}

.erp-account-form.is-submitting .erp-account-field input,
.erp-account-form.is-submitting .erp-account-field textarea,
.erp-account-form.is-submitting .erp-account-row input,
.erp-register-form.is-submitting .erp-account-field input {
    pointer-events: none;
}

.erp-account-form.is-submitting .erp-account-submit,
.erp-register-form.is-submitting .erp-account-submit {
    cursor: wait;
    pointer-events: none;
}

.erp-account-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: erp-spin 0.7s linear infinite;
}

@keyframes erp-spin {
    to {
        transform: rotate(360deg);
    }
}

.erp-account-meta,
.erp-account-links {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.erp-account-meta a,
.erp-account-links a,
.erp-account-row a {
    color: var(--erp-primary);
    text-decoration: none;
    font-weight: 600;
}

.erp-account-alert {
    margin-bottom: 1rem;
    padding: 0.75rem 0.85rem;
    border-radius: var(--erp-radius);
    background: #FDEDEC;
    color: #7B241C;
    font-size: 0.9rem;
}

.erp-account-body .lpx-content-container,
.erp-account-body .lpx-footbar,
.erp-account-body .lpx-login-bg {
    background: transparent;
}

.erp-account-body .card {
    border: 1px solid var(--erp-border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(28, 40, 51, 0.08);
}

.erp-account-body .btn-primary {
    background: var(--erp-primary);
    border-color: var(--erp-primary);
}

.erp-mvc-app {
    min-height: 100vh;
    margin: 0;
    background: var(--erp-bg);
    font-family: var(--erp-font);
    color: var(--erp-text);
}

.erp-mvc-bar {
    height: 64px;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0 1.5rem;
    background: var(--erp-surface);
    color: var(--erp-text);
    border-bottom: 1px solid var(--erp-border);
    box-shadow: var(--erp-shadow-sm);
}

.erp-mvc-brand,
.erp-mvc-home {
    color: var(--erp-text);
    text-decoration: none;
    font-weight: 600;
}

.erp-mvc-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.05rem;
    color: var(--erp-primary);
}

.erp-mvc-main {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.5rem;
}

.erp-mvc-app .lpx-footbar,
.erp-mvc-app .lpx-sidebar,
.erp-mvc-app .lpx-header {
    display: none;
}

.erp-mvc-app .card {
    border: 1px solid var(--erp-border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(28, 40, 51, 0.08);
}

.erp-mvc-app .btn-primary {
    background: var(--erp-primary);
    border-color: var(--erp-primary);
}

.erp-mvc-app .nav-pills .nav-link.active,
.erp-mvc-app .nav-tabs .nav-link.active,
.erp-mvc-app .nav-link.active {
    background: rgba(27, 79, 114, 0.12);
    color: var(--erp-primary);
}

.erp-mvc-app .input-group-text {
    background: var(--erp-primary);
    border-color: var(--erp-primary);
    color: var(--erp-primary-contrast);
}

.erp-mvc-app .form-control:focus {
    border-color: var(--erp-primary);
    box-shadow: 0 0 0 0.2rem rgba(27, 79, 114, 0.2);
}

.erp-mvc-app .card-header {
    background: var(--erp-surface);
    border-bottom: 1px solid var(--erp-border);
}

.erp-account-tenant {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.erp-account-tenant input {
    flex: 1;
    height: var(--erp-control-height);
    border: 1px solid var(--erp-border);
    border-radius: var(--erp-radius);
    padding: 0 0.75rem;
    font-family: var(--erp-font);
    font-size: 0.875rem;
    background: var(--erp-bg);
    color: var(--erp-text);
}

.erp-account-tenant-switch {
    height: var(--erp-control-height);
    border: 1px solid var(--erp-border);
    border-radius: var(--erp-radius);
    background: var(--erp-surface);
    color: var(--erp-primary);
    font-family: var(--erp-font);
    font-weight: 600;
    padding: 0 0.85rem;
    cursor: pointer;
}

.erp-account-field-error,
.erp-account-field .field-validation-error {
    display: block;
    margin-top: 0.35rem;
    color: #7B241C;
    font-size: 0.8rem;
    line-height: 1.4;
}

.erp-account-hint,
.erp-account-copy {
    display: block;
    margin-top: 0.35rem;
    color: var(--erp-text-muted);
    font-size: 0.8rem;
    line-height: 1.4;
}

.erp-account-copy {
    margin: 0 0 1.35rem;
    font-size: 0.9375rem;
}

.erp-account-languages {
    position: absolute;
    top: 1rem;
    inset-inline-end: 1.25rem;
    z-index: 20;
}

.erp-account-card .erp-account-languages {
    position: static;
    display: flex;
    justify-content: flex-end;
    margin: 0 0 1.15rem;
    inset: auto;
}

.erp-account-lang {
    position: relative;
    min-width: 9.75rem;
}

.erp-account-lang summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    height: 2.25rem;
    padding: 0 0.75rem;
    border: 1px solid var(--erp-border);
    border-radius: var(--erp-radius);
    background: var(--erp-surface);
    box-shadow: var(--erp-shadow-sm);
    color: var(--erp-text);
    font-family: var(--erp-font);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.erp-account-lang summary::-webkit-details-marker {
    display: none;
}

.erp-account-lang summary::after {
    content: "";
    width: 0.4rem;
    height: 0.4rem;
    border-right: 1.5px solid var(--erp-text-muted);
    border-bottom: 1.5px solid var(--erp-text-muted);
    transform: rotate(45deg) translateY(-0.12rem);
    flex: 0 0 auto;
}

.erp-account-lang[open] summary {
    border-color: var(--erp-primary);
}

.erp-account-lang[open] summary::after {
    transform: rotate(-135deg) translateY(-0.08rem);
}

.erp-account-lang-current {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-account-lang ul {
    position: absolute;
    inset-inline-end: 0;
    top: calc(100% + 0.35rem);
    margin: 0;
    padding: 0.35rem 0;
    min-width: 100%;
    max-height: 16rem;
    overflow: auto;
    list-style: none;
    background: var(--erp-surface);
    border: 1px solid var(--erp-border);
    border-radius: var(--erp-radius);
    box-shadow: var(--erp-shadow);
}

.erp-account-lang a {
    display: block;
    padding: 0.45rem 0.75rem;
    color: var(--erp-text);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.erp-account-lang a.is-active,
.erp-account-lang a:hover {
    background: rgba(27, 79, 114, 0.08);
    color: var(--erp-primary);
}

.erp-account-back {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.85rem;
    color: var(--erp-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.erp-setup-layout {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--erp-bg);
    font-family: var(--erp-font);
    color: var(--erp-text);
}

.erp-setup-layout > .erp-setup-shell {
    flex: 1 1 auto;
    min-height: 0;
}

.erp-setup-checking {
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    background: var(--erp-bg);
}

.erp-setup-card {
    max-width: 42rem;
}

@media (min-width: 900px) {
    .erp-setup-card {
        max-width: 42rem;
        padding: 2.5rem 2rem;
    }
}

.erp-setup-layout .erp-account-languages .erp-account-lang {
    min-width: 9.75rem;
}

.erp-account-lang-button.mud-button-root,
.erp-account-lang-button.mud-button {
    height: 2.25rem;
    min-height: 2.25rem;
    min-width: 9.75rem;
    padding: 0 0.75rem;
    border: 1px solid var(--erp-border);
    border-radius: var(--erp-radius);
    background: var(--erp-surface);
    box-shadow: var(--erp-shadow-sm);
    color: var(--erp-text);
    font-family: var(--erp-font);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: none;
    line-height: 1.2;
}

.erp-account-lang-button .mud-button-label {
    width: 100%;
    justify-content: space-between;
    gap: 0.65rem;
}

.erp-account-lang-button .erp-account-lang-current {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-account-lang-button::after {
    content: "";
    width: 0.4rem;
    height: 0.4rem;
    border-right: 1.5px solid var(--erp-text-muted);
    border-bottom: 1.5px solid var(--erp-text-muted);
    transform: rotate(45deg) translateY(-0.12rem);
    flex: 0 0 auto;
}

.erp-account-lang [aria-expanded="true"].erp-account-lang-button,
.erp-account-lang [aria-expanded="true"] .erp-account-lang-button {
    border-color: var(--erp-primary);
}

.erp-account-lang [aria-expanded="true"].erp-account-lang-button::after,
.erp-account-lang [aria-expanded="true"] .erp-account-lang-button::after {
    transform: rotate(-135deg) translateY(-0.08rem);
}

.erp-account-lang-popover {
    margin-top: 0.35rem !important;
}

.erp-account-lang-popover .mud-paper {
    min-width: 9.75rem;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--erp-border);
    border-radius: var(--erp-radius) !important;
    box-shadow: var(--erp-shadow) !important;
    background: var(--erp-surface);
}

.erp-account-lang-popover .mud-list {
    padding: 0.35rem 0 !important;
}

.erp-account-lang-item.mud-menu-item,
.erp-account-lang-popover .mud-menu-item {
    min-height: unset;
    padding: 0.45rem 0.75rem;
    font-family: var(--erp-font);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--erp-text);
}

.erp-account-lang-item.mud-menu-item:hover,
.erp-account-lang-popover .mud-menu-item:hover {
    background: rgba(27, 79, 114, 0.08);
    color: var(--erp-primary);
}

.erp-setup-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    min-height: 14rem;
    padding: 1.5rem 0;
    text-align: center;
}

.erp-setup-progress-copy,
.erp-setup-saving-copy {
    margin: 0;
    color: var(--erp-text);
    font-family: var(--erp-font);
    font-size: 0.95rem;
    font-weight: 600;
}

.erp-setup-saving-copy {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--erp-text-muted);
}

.erp-setup-stepper {
    font-family: var(--erp-font);
}

.erp-setup-stepper-nav {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--erp-border);
    overflow-x: auto;
}

.erp-setup-stepper .mud-step {
    color: var(--erp-text-muted);
}

.erp-setup-stepper .mud-step.active,
.erp-setup-stepper .mud-step-completed {
    color: var(--erp-primary);
}

.erp-setup-stepper .mud-step-label-icon {
    background: var(--erp-bg);
    border: 1px solid var(--erp-border);
    color: var(--erp-text-muted);
}

.erp-setup-stepper .mud-step.active .mud-step-label-icon,
.erp-setup-stepper .mud-step-completed .mud-step-label-icon {
    background: var(--erp-primary);
    border-color: var(--erp-primary);
    color: var(--erp-primary-contrast);
}

.erp-setup-stepper .mud-stepper-nav-connector,
.erp-setup-stepper .mud-stepper-connector {
    background: var(--erp-border);
}

.erp-setup-stepper-body {
    padding-top: 0.25rem;
}

.erp-setup-stepper .mud-input-helper-text {
    margin-top: 0.2rem;
    color: var(--erp-text-muted);
    font-size: 0.8rem;
    line-height: 1.35;
}

.erp-setup-stepper .mud-stepper-actions {
    margin-top: 1.25rem;
    padding-top: 0.25rem;
}

@media (max-width: 600px) {
    .erp-setup-stepper-nav {
        margin-inline: -0.25rem;
    }

    .erp-setup-stepper .mud-step-label-content {
        font-size: 0.75rem;
    }
}

.erp-toolbar-search {
    width: 12.5rem;
    min-width: 12.5rem;
    max-width: 12.5rem;
}

.erp-table-actions-head {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.15rem;
    white-space: nowrap;
}

.erp-table-actions-head .mud-icon-button {
    margin-inline-end: -0.35rem;
}

.erp-list-toolbar-query .erp-toolbar-search {
    position: relative;
    top: 2px;
}

.erp-toolbar-filter {
    width: 11rem;
    min-width: 11rem;
    max-width: 11rem;
}

.erp-toolbar-date {
    width: 10.75rem;
    min-width: 10.75rem;
    max-width: 10.75rem;
}

.erp-page-toolbar-actions .mud-input-control,
.erp-list-toolbar-card .mud-input-control {
    margin-top: 0;
}

.erp-application-layout .mud-paper.mud-paper-outlined {
    background: var(--erp-surface);
    border: 0;
    border-radius: var(--erp-radius);
    box-shadow: var(--erp-shadow-sm);
}

.erp-page-host > .mud-paper.mud-paper-outlined,
.erp-form-card {
    padding: 1.25rem 1.35rem !important;
}

.erp-form-actions {
    margin-top: 1.15rem;
    flex-wrap: wrap;
}

.erp-guid-select {
    position: relative;
    width: 100%;
}

.erp-guid-select__field .mud-input-adornment-end {
    gap: 0.15rem;
}

.erp-table .erp-guid-select {
    align-self: center;
}

.erp-table .erp-guid-select .mud-input-control {
    margin-top: 0;
}

.erp-guid-select__popover .mud-list {
    overflow-y: auto;
    max-height: min(18.75rem, 50vh);
}

.erp-guid-select__popover .mud-list-item:has(.erp-guid-select__footer-bar) {
    position: sticky;
    bottom: 0;
    z-index: 3;
    padding-block: 0;
    padding-inline: 0;
    background: var(--mud-palette-surface);
    cursor: default;
}

.erp-guid-select__footer-bar {
    position: sticky;
    bottom: 0;
    z-index: 3;
    background: var(--mud-palette-background-gray);
    box-shadow: 0 -1px 0 var(--mud-palette-lines-default);
}

.erp-guid-select__footer-divider {
    margin: 0;
}

.erp-guid-select__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.15rem 0.35rem 0.25rem;
}

.erp-guid-select__footer-action {
    text-transform: none;
    min-height: 1.75rem;
    padding-inline: 0.35rem;
}

.erp-application-layout .mud-grid {
    --mud-grid-spacing-xs: 12px;
}

.erp-page-toolbar {
    position: relative;
    z-index: 0;
}

.erp-application-layout .mud-data-grid,
.erp-application-layout .mud-table {
    font-family: var(--erp-font);
}

.erp-application-layout .mud-data-grid .mud-table-head .mud-table-cell,
.erp-application-layout .mud-table .mud-table-head .mud-table-cell {
    font-weight: 700;
    color: var(--erp-text-muted);
    background: transparent;
}

.erp-table .mud-table-empty,
.erp-table .mud-table-loading {
    padding: 1.5rem;
    color: var(--erp-text-muted);
}

html[dir="rtl"],
body.rtl {
    font-family: var(--erp-font);
}

@media (max-width: 960px) {
    .erp-brand-wordmark {
        width: 9.5rem;
        height: auto;
    }

    .erp-list-toolbar-card {
        padding: 0.85rem 0.9rem;
    }

    .erp-list-toolbar-row-actions {
        flex-wrap: wrap;
    }

    .erp-list-toolbar-row-query {
        justify-content: flex-start;
    }

    .erp-list-toolbar-query {
        width: 100%;
        justify-content: flex-start;
    }

    .erp-toolbar-search,
    .erp-toolbar-filter,
    .erp-toolbar-date {
        width: auto;
        min-width: 9.5rem;
        max-width: none;
        flex: 1 1 9.5rem;
    }

    .erp-context-select {
        width: 10.5rem;
        min-width: 8.5rem;
    }
}

@media (max-width: 600px) {
    .erp-appbar.mud-appbar {
        padding-inline: 0.35rem 0.5rem;
    }

    .erp-context-bar {
        margin-inline-end: 0;
    }
}

.erp-account-statement-preview {
    width: 100%;
    min-height: 70vh;
    border: 1px solid var(--erp-border);
    background: #fff;
}

html[dir=rtl] .erp-account-statement-table,
html[dir=rtl] .erp-finance-report-table {
    width: 100%;
    font-family: Tahoma, Arial, sans-serif;
}

html[dir=rtl] .erp-account-statement-table .mud-table-head .mud-table-cell,
html[dir=rtl] .erp-finance-report-table .mud-table-head .mud-table-cell {
    text-transform: none;
    letter-spacing: 0;
    white-space: normal;
    color: #1F4E79;
}

html[dir=rtl] .erp-account-statement-table .mud-table-body .mud-table-cell,
html[dir=rtl] .erp-finance-report-table .mud-table-body .mud-table-cell {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    max-width: none;
    vertical-align: top;
}

html[dir=rtl] .erp-account-statement-table .mud-table-cell:last-child,
html[dir=rtl] .erp-finance-report-table .mud-table-cell:last-child {
    width: auto;
}

html[dir=rtl] .erp-account-statement-table .erp-num,
html[dir=rtl] .erp-finance-report-table .erp-num {
    direction: ltr;
    unicode-bidi: isolate;
    text-align: end;
    white-space: nowrap;
}

.erp-code-suggest {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 0.5rem;
    padding-bottom: 1.25em;
}

.erp-code-suggest-field {
    min-width: 0;
    position: relative;
    align-self: start;
    display: flex;
    line-height: 0;
    font-size: 0;
}

.erp-code-suggest-field .mud-input-control,
.erp-code-suggest-field .mud-input-control.mud-input-control-margin-dense,
.erp-code-suggest-field .mud-input-control.mud-input-outlined-with-label,
.erp-code-suggest-field .mud-input-control.mud-input-control-margin-dense.mud-input-outlined-with-label {
    position: relative;
    margin-bottom: 0;
    font-size: 1rem;
    line-height: normal;
}

.erp-code-suggest-field .mud-input-control-helper-container {
    position: absolute;
    inset-inline: 0;
    top: 100%;
}

.erp-code-suggest-action {
    display: flex;
    align-items: stretch;
    align-self: stretch;
}

.erp-code-suggest-action .erp-suggest-code-button.mud-button-root {
    box-sizing: border-box;
    min-height: 0;
    flex: 1 1 auto;
}

.erp-learn-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgb(15 23 42 / 32%);
}

.erp-learn-card {
    width: min(42rem, 100%);
    max-height: calc(100vh - 2rem);
    overflow: auto;
    background: var(--erp-surface);
    border: 1px solid var(--erp-border);
    border-radius: var(--erp-radius);
}

.erp-learn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 0.5rem;
}

.erp-learn-area {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    min-height: 5.5rem;
    padding: 0.75rem;
    text-align: start;
    color: var(--erp-text);
    background: var(--erp-surface);
    border: 1px solid var(--erp-border);
    border-radius: var(--erp-radius);
    cursor: pointer;
}

.erp-learn-area:disabled {
    cursor: default;
    opacity: 0.7;
}

.erp-learn-area-title {
    font-weight: 600;
}

.erp-learn-area-copy,
.erp-learn-soon {
    font-size: 0.8rem;
    color: var(--erp-muted, var(--erp-text));
    opacity: 0.8;
}

.erp-help-related {
    border-inline-start: 4px solid var(--mud-palette-primary);
    background: var(--mud-palette-surface);
}

.erp-help-related-card {
    height: 100%;
    cursor: pointer;
}

.erp-help-related-card .mud-link {
    display: block;
}


/* Commercial plans and billing */
.erp-commercial-loading { display:flex; justify-content:center; padding:3rem 1rem; }
.erp-commercial-current-plan,.erp-commercial-plans-panel,.erp-commercial-comparison-panel { background:var(--erp-surface,#fff); border:1px solid var(--erp-border,#e6e6ea); border-radius:12px!important; box-shadow:var(--erp-shadow-sm,0 2px 8px rgba(47,43,61,.06)); }
.erp-commercial-current-plan__header,.erp-commercial-plans-panel__header { display:flex; align-items:center; justify-content:space-between; gap:1.25rem; }
.erp-commercial-current-plan__identity { min-width:0; }
.erp-commercial-current-plan__plan-line { display:flex; align-items:center; flex-wrap:wrap; gap:.65rem; margin-top:.15rem; }
.erp-commercial-current-plan__name,.erp-commercial-section-title { font-weight:700; color:var(--erp-text,#2f2b3d); }
.erp-commercial-muted { color:var(--erp-text-muted,#6f6b7d); }
.erp-commercial-plans-panel__header { align-items:flex-start; }
.erp-commercial-plans-panel__intro { min-width:0; max-width:50rem; }
.erp-commercial-service-note { display:flex; align-items:flex-start; gap:.45rem; font-weight:600; color:var(--erp-primary,#1b4f72); }
.erp-commercial-service-note__mark { display:inline-flex; flex:0 0 1.2rem; justify-content:center; align-items:center; width:1.2rem; height:1.2rem; border-radius:50%; color:#fff; background:var(--erp-primary,#1b4f72); font-size:.75rem; line-height:1; }
.erp-commercial-billing-switch { display:inline-flex; flex:0 0 auto; gap:.25rem; padding:.25rem; border:1px solid var(--erp-border,#e6e6ea); border-radius:10px; background:#f7f9fb; }
.erp-commercial-interval-button { min-width:5.25rem; border-radius:7px!important; text-transform:none!important; font-weight:600; }
.erp-commercial-billing-hint { display:block; margin-top:.65rem; color:var(--erp-text-muted,#6f6b7d); }
.erp-commercial-plan-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:stretch; gap:1rem; margin-top:1rem; }
.erp-commercial-plan-card { position:relative; display:flex; flex-direction:column; min-width:0; padding:1.2rem; border:1px solid var(--erp-border,#e6e6ea); border-radius:12px; background:#fff; transition:transform 160ms ease,box-shadow 160ms ease,border-color 160ms ease; }
.erp-commercial-plan-card:hover { transform:translateY(-3px); border-color:rgba(27,79,114,.48); box-shadow:0 10px 26px rgba(31,55,76,.09); }
.erp-commercial-plan-card--featured { border-color:var(--erp-primary,#1b4f72); box-shadow:0 0 0 1px rgba(27,79,114,.16),0 8px 24px rgba(31,55,76,.08); background:linear-gradient(180deg,rgba(27,79,114,.045),#fff 38%); }
.erp-commercial-plan-card--featured:hover { border-color:var(--erp-primary,#1b4f72); box-shadow:0 0 0 1px rgba(27,79,114,.2),0 12px 28px rgba(31,55,76,.12); }
.erp-commercial-plan-card__badge-row { display:flex; align-items:center; min-height:1.65rem; margin-bottom:.25rem; }
.erp-commercial-plan-card__popular { display:inline-flex; align-items:center; min-height:1.5rem; padding:.2rem .6rem; border-radius:999px; color:#fff; background:var(--erp-primary,#1b4f72); font-size:.72rem; font-weight:700; line-height:1.2; }
.erp-commercial-plan-card__name { font-weight:750; letter-spacing:0; }
.erp-commercial-plan-card__description { min-height:2.7rem; margin-top:.25rem; color:var(--erp-text-muted,#6f6b7d); line-height:1.45; }
.erp-commercial-plan-card__price { display:flex; align-items:baseline; flex-wrap:wrap; column-gap:.45rem; row-gap:.15rem; margin-top:.9rem; }
.erp-commercial-plan-card__amount { color:var(--erp-primary,#1b4f72); font-size:clamp(1.9rem,2.25vw,2.45rem); font-weight:750; line-height:1.1; letter-spacing:-.035em; }
.erp-commercial-plan-card__period { color:var(--erp-text-muted,#6f6b7d); font-size:.85rem; font-weight:500; }
.erp-commercial-plan-card__annual-value { display:flex; align-items:center; flex-wrap:wrap; gap:.45rem; min-height:2.6rem; margin-top:.3rem; }
.erp-commercial-plan-card__annual-value--placeholder { visibility:hidden; }
.erp-commercial-plan-card__saving { display:inline-flex; align-items:center; padding:.2rem .5rem; border:1px solid #cfe7dc; border-radius:6px; background:#eff9f3; color:#216746; font-size:.73rem; font-weight:700; line-height:1.35; }
.erp-commercial-plan-card__limits { margin-top:.45rem; margin-bottom:1.1rem; border-top:1px solid #edf0f3; }
.erp-commercial-plan-card__limit { display:flex; align-items:center; justify-content:space-between; gap:.75rem; min-height:2.45rem; padding:.45rem .1rem; border-bottom:1px solid #edf0f3; font-size:.87rem; line-height:1.35; }
.erp-commercial-plan-card__limit span { color:var(--erp-text-muted,#6f6b7d); }
.erp-commercial-plan-card__limit strong { flex:0 0 auto; color:var(--erp-text,#2f2b3d); font-size:.92rem; font-weight:750; font-variant-numeric:tabular-nums; }
.erp-commercial-plan-card__cta { margin-top:auto; min-height:2.7rem; border-radius:8px!important; font-weight:700!important; text-transform:none!important; box-shadow:none!important; }
.erp-commercial-comparison-wrap { width:100%; overflow-x:auto; overscroll-behavior-inline:contain; border:1px solid var(--erp-border,#e6e6ea); border-radius:10px; }
.erp-commercial-comparison-table table { width:100%; min-width:610px; border-collapse:separate; border-spacing:0; }
.erp-commercial-comparison-table thead th { padding:.9rem 1rem; border-bottom:1px solid var(--erp-border,#e6e6ea); background:#f7f9fb; color:var(--erp-text,#2f2b3d); font-size:.83rem; font-weight:750; text-align:start; white-space:nowrap; }
.erp-commercial-comparison-table thead th:not(:first-child),.erp-commercial-comparison-table tbody td { text-align:center; }
.erp-commercial-comparison-table tbody th,.erp-commercial-comparison-table tbody td { padding:.7rem 1rem; border-bottom:1px solid #edf0f3; font-size:.86rem; line-height:1.4; }
.erp-commercial-comparison-table tbody th { color:var(--erp-text,#2f2b3d); font-weight:600; text-align:start; }
.erp-commercial-comparison-table tbody td { color:var(--erp-text-muted,#6f6b7d); font-variant-numeric:tabular-nums; }
.erp-commercial-comparison-table tbody tr:last-child th,.erp-commercial-comparison-table tbody tr:last-child td { border-bottom:0; }
.erp-commercial-comparison-table tbody tr:not(.erp-commercial-comparison-group):hover th,.erp-commercial-comparison-table tbody tr:not(.erp-commercial-comparison-group):hover td { background:#fafbfd; }
.erp-commercial-comparison-table .erp-commercial-comparison-group th { padding:.7rem 1rem; border-bottom:1px solid #e4e9ef; background:#f3f6f9; color:var(--erp-primary,#1b4f72); font-size:.78rem; font-weight:750; letter-spacing:.025em; text-align:start; }
.erp-commercial-comparison-table .erp-commercial-comparison-feature--highlight th,.erp-commercial-comparison-table .erp-commercial-comparison-feature--highlight td { background:rgba(27,79,114,.045); font-weight:700; }
.erp-commercial-compare-mark { display:inline-flex; justify-content:center; align-items:center; min-width:1.45rem; min-height:1.45rem; border-radius:50%; font-size:.9rem; font-weight:800; line-height:1; }
.erp-commercial-compare-mark--included { color:#1d7650; background:#eaf7ef; }
.erp-commercial-compare-mark--excluded { color:#858b93; background:#f1f2f4; }
@media (max-width:1050px) { .erp-commercial-plan-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .erp-commercial-plan-card:last-child:nth-child(odd) { grid-column:1/-1; } }
@media (max-width:650px) {
 .erp-commercial-plans-panel,.erp-commercial-comparison-panel,.erp-commercial-current-plan { padding:1rem!important; }
 .erp-commercial-plans-panel__header { flex-direction:column; align-items:stretch; gap:.9rem; }
 .erp-commercial-billing-switch { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; }
 .erp-commercial-interval-button { width:100%; min-width:0; }
 .erp-commercial-plan-grid { grid-template-columns:minmax(0,1fr); gap:.85rem; }
 .erp-commercial-plan-card:last-child:nth-child(odd) { grid-column:auto; }
 .erp-commercial-plan-card { padding:1.05rem; }
 .erp-commercial-plan-card__amount { font-size:2rem; }
 .erp-commercial-plan-card__description { min-height:0; }
 .erp-commercial-comparison-table table { min-width:560px; }
 .erp-commercial-comparison-table thead th,.erp-commercial-comparison-table tbody th,.erp-commercial-comparison-table tbody td { padding:.65rem .75rem; }
}
@media (prefers-reduced-motion:reduce) { .erp-commercial-plan-card { transition:none; } .erp-commercial-plan-card:hover { transform:none; } }

/* Logged-in shell below the drawer breakpoint (960px). Account, marketing, and POS rules are unchanged. */
@media (max-width: 959.98px) {
    .erp-application-layout:has(.mud-layout) {
        overflow-x: clip;
    }

    .erp-application-layout:has(.erp-appbar .erp-context-bar) {
        --erp-appbar-height: 7.5rem;
        --mud-appbar-height: 7.5rem;
    }

    .erp-application-layout .erp-main {
        padding-inline: 0.75rem;
        padding-bottom: 1rem;
        min-width: 0;
        max-width: 100%;
    }

    .erp-application-layout .erp-page-host {
        min-width: 0;
        max-width: 100%;
    }

    .erp-application-layout:has(.erp-appbar .erp-context-bar) .erp-appbar.mud-appbar {
        height: auto;
        overflow: visible;
        padding-inline: 0.35rem;
    }

    .erp-application-layout:has(.erp-appbar .erp-context-bar) .erp-appbar .mud-toolbar {
        display: grid;
        grid-template-columns: auto minmax(0, max-content) minmax(0, 1fr) auto auto auto auto;
        align-items: center;
        column-gap: 0.15rem;
        row-gap: 0.35rem;
        height: auto;
        min-height: 0;
        padding-block: 0.35rem 0.45rem;
    }

    .erp-application-layout .erp-appbar .erp-context-bar {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        min-width: 0;
        margin-inline-end: 0;
    }

    .erp-application-layout .erp-appbar .erp-context-bar > *,
    .erp-application-layout .erp-appbar .erp-context-year {
        flex: 1 1 0;
        min-width: 0;
        max-width: none;
    }

    .erp-application-layout .erp-appbar .erp-context-select {
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    .erp-application-layout .erp-appbar .erp-brand-wordmark {
        width: 6.25rem;
    }

    .erp-application-layout .erp-appbar .erp-appbar-action.mud-icon-button {
        width: 2.5rem;
        height: 2.5rem;
    }

    .erp-application-layout .erp-appbar .mud-menu.erp-appbar-action {
        max-width: 4.75rem;
        min-width: 0;
    }

    .erp-application-layout .erp-appbar .mud-menu.erp-appbar-action .mud-button-label {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (max-width: 599.98px) {
    .erp-application-layout .erp-main {
        padding-inline: 0.65rem;
        padding-bottom: 0.85rem;
    }

    .erp-application-layout .erp-appbar .erp-brand-wordmark {
        width: 5rem;
    }

    .erp-application-layout .erp-appbar .mud-menu.erp-appbar-action {
        max-width: 3.25rem;
    }

    .erp-application-layout .mud-dialog:not(.mud-dialog-fullscreen) {
        box-sizing: border-box;
        width: calc(100vw - 1rem);
        max-width: calc(100vw - 1rem);
        max-height: calc(100dvh - 1rem);
        margin: 0.5rem;
    }

    .erp-application-layout .mud-dialog:not(.mud-dialog-fullscreen) .mud-dialog-content {
        max-height: calc(100dvh - 8.5rem);
    }

    .erp-application-layout .mud-dialog:not(.mud-dialog-fullscreen) .mud-dialog-actions {
        flex-wrap: wrap;
    }
}

/* List tables and toolbars. MudTable Breakpoint.Sm stacks at 960px; MudDataGrid defaults to Xs and stacks at 600px. */
@media (max-width: 960px) {
    .erp-application-layout .erp-list-surface,
    .erp-application-layout .erp-list-card {
        min-width: 0;
        max-width: 100%;
    }

    .erp-application-layout .erp-list-card .mud-table-container,
    .erp-application-layout .erp-list-card .mud-table-pagination {
        max-width: 100%;
    }

    .erp-application-layout .erp-list-card .mud-sm-table:not(.erp-finance-report-table):not(.erp-account-statement-table) .mud-table-body .mud-table-cell,
    .erp-application-layout .erp-list-card .mud-sm-table:not(.erp-finance-report-table):not(.erp-account-statement-table) .mud-table-cell:last-child {
        width: 100%;
        max-width: none;
        height: auto;
        min-height: 2.75rem;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        flex-wrap: wrap;
        row-gap: 0.2rem;
    }

    .erp-application-layout .erp-list-card .mud-sm-table:not(.erp-finance-report-table):not(.erp-account-statement-table) .mud-table-cell:before {
        flex: 1 1 8rem;
        min-width: 0;
        white-space: normal;
    }

    .erp-application-layout .erp-list-card .mud-sm-table:not(.erp-finance-report-table):not(.erp-account-statement-table) .mud-icon-button {
        width: 2.75rem;
        height: 2.75rem;
    }

    .erp-application-layout .erp-list-card .erp-finance-report-table.mud-sm-table .mud-table-head .mud-table-row,
    .erp-application-layout .erp-list-card .erp-account-statement-table.mud-sm-table .mud-table-head .mud-table-row {
        display: table-row;
    }

    .erp-application-layout .erp-list-card .erp-finance-report-table.mud-sm-table .mud-table-foot,
    .erp-application-layout .erp-list-card .erp-account-statement-table.mud-sm-table .mud-table-foot {
        display: table-footer-group;
    }

    .erp-application-layout .erp-list-card .erp-finance-report-table.mud-sm-table .mud-table-body .mud-table-row,
    .erp-application-layout .erp-list-card .erp-account-statement-table.mud-sm-table .mud-table-body .mud-table-row {
        display: table-row;
    }

    .erp-application-layout .erp-list-card .erp-finance-report-table.mud-sm-table .mud-table-cell,
    .erp-application-layout .erp-list-card .erp-account-statement-table.mud-sm-table .mud-table-cell {
        display: table-cell;
    }

    .erp-application-layout .erp-list-card .erp-finance-report-table.mud-sm-table .mud-table-cell:before,
    .erp-application-layout .erp-list-card .erp-account-statement-table.mud-sm-table .mud-table-cell:before {
        content: none;
    }

    .erp-application-layout .erp-list-card .erp-finance-report-table.mud-sm-table .mud-table-container,
    .erp-application-layout .erp-list-card .erp-account-statement-table.mud-sm-table .mud-table-container {
        overflow-x: auto;
    }

    .erp-application-layout .erp-list-card .erp-finance-report-table.mud-sm-table .mud-table-pagination .mud-button-root,
    .erp-application-layout .erp-list-card .erp-account-statement-table.mud-sm-table .mud-table-pagination .mud-button-root {
        display: inline-flex;
    }
}

@media (max-width: 600px) {
    .erp-application-layout .erp-list-card .mud-xs-table:not(.erp-finance-report-table):not(.erp-account-statement-table) .mud-table-body .mud-table-cell,
    .erp-application-layout .erp-list-card .mud-xs-table:not(.erp-finance-report-table):not(.erp-account-statement-table) .mud-table-cell:last-child {
        width: 100%;
        max-width: none;
        height: auto;
        min-height: 2.75rem;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        flex-wrap: wrap;
        row-gap: 0.2rem;
    }

    .erp-application-layout .erp-list-card .mud-xs-table:not(.erp-finance-report-table):not(.erp-account-statement-table) .mud-table-cell:before {
        flex: 1 1 8rem;
        min-width: 0;
        white-space: normal;
    }

    .erp-application-layout .erp-list-card .mud-xs-table:not(.erp-finance-report-table):not(.erp-account-statement-table) .mud-icon-button {
        width: 2.75rem;
        height: 2.75rem;
    }

    .erp-application-layout .erp-list-toolbar-row-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .erp-application-layout .erp-list-toolbar-primary,
    .erp-application-layout .erp-list-toolbar-secondary {
        width: 100%;
        margin-inline-start: 0;
    }

    .erp-application-layout .erp-list-toolbar-primary > .mud-button-root,
    .erp-application-layout .erp-list-toolbar-secondary > .mud-button-root {
        width: 100%;
    }

    .erp-application-layout .erp-list-toolbar-card .mud-button {
        height: auto;
        min-height: 2.75rem;
    }

    .erp-application-layout .erp-list-toolbar-query {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .erp-application-layout .erp-list-toolbar-query .erp-toolbar-search,
    .erp-application-layout .erp-list-toolbar-query .erp-toolbar-filter,
    .erp-application-layout .erp-list-toolbar-query .erp-toolbar-date {
        top: 0;
        width: 100%;
        min-width: 0;
        max-width: none;
        flex: 1 1 auto;
    }

    .erp-application-layout .erp-list-toolbar-card .mud-input-control,
    .erp-application-layout .erp-list-toolbar-card .mud-input,
    .erp-application-layout .erp-list-toolbar-card .mud-input-outlined {
        height: auto;
        min-height: 2.75rem;
    }

    .erp-application-layout .erp-list-card .mud-table-pagination-toolbar {
        flex-wrap: wrap;
        height: auto;
        row-gap: 0.35rem;
    }
}
