: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;
    gap: 0.5rem;
    padding-inline: 0.65rem 1rem;
    overflow: visible;
}

.erp-brand {
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--erp-primary);
    margin-inline-start: 0.15rem;
}

.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;
    max-width: 14rem;
}

.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 {
    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-kpi-card {
    min-height: 5.5rem;
    border-radius: var(--erp-radius);
    background: var(--erp-surface);
}

.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-dashboard-tabs .mud-tabs-panels,
.erp-dashboard-tabs .mud-tabs-panel {
    padding: 0.75rem 0.25rem 0;
}

.erp-dashboard-tabs .mud-tabs-toolbar {
    min-height: 2.75rem;
}

.erp-dashboard-tabs .mud-tab {
    text-transform: none;
    font-weight: 600;
    min-height: 2.5rem;
}

.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-page-toolbar-actions .mud-input-control {
    min-width: 10.5rem;
}

.erp-active-status {
    height: 1.4rem;
    font-size: 0.72rem;
}

.erp-drawer.mud-drawer {
    background: var(--erp-surface);
    border-inline-end: 1px solid var(--erp-border);
    box-shadow: none;
    width: var(--erp-drawer-width);
}

.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-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--erp-text);
}

.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 {
    display: none !important;
}

.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: var(--erp-secondary);
    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;
}

.erp-drawer .mud-nav-group > .mud-nav-link {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--erp-text-muted);
    min-height: 2.15rem;
}

.erp-drawer .mud-nav-link.active {
    background: rgba(27, 79, 114, 0.08);
    color: var(--erp-primary);
    font-weight: 600;
}

.erp-main {
    padding-inline: 1.75rem;
    padding-bottom: 1.75rem;
    min-height: 100vh;
}

/* 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;
}

.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-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;
}

.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;
}

.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-drawer .mud-nav-link.active {
    background: rgba(27, 79, 114, 0.08);
    color: var(--erp-primary);
    font-weight: 600;
}

.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;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background: var(--erp-bg);
    font-family: var(--erp-font);
    color: var(--erp-text);
}

.erp-account-shell {
    min-height: 100vh;
    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-aside .erp-account-brand {
    color: var(--erp-primary);
    font-size: 1.35rem;
}

.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-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-register-form.is-submitting .erp-account-submit-label {
    display: none;
}

.erp-register-form.is-submitting .erp-account-submit-progress {
    display: inline-flex;
}

.erp-register-form.is-submitting .erp-account-field input,
.erp-register-form.is-submitting .erp-account-links,
.erp-register-form.is-submitting .erp-account-back {
    pointer-events: none;
}

.erp-register-form.is-submitting .erp-account-submit {
    cursor: wait;
}

.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 {
    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;
    min-height: 100vh;
    background: var(--erp-bg);
    font-family: var(--erp-font);
    color: var(--erp-text);
}

.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-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-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;
}

.erp-guid-select {
    position: relative;
    width: 100%;
}

.erp-guid-select__field {
    width: 100%;
}

.erp-guid-select--actions .erp-guid-select__actions {
    position: absolute;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0;
    inset-inline-end: calc(1.5rem + (var(--erp-guid-select-clear, 0) * 1.375rem));
    bottom: 0.55rem;
    pointer-events: none;
}

.erp-guid-select--actions.erp-guid-select--dense .erp-guid-select__actions,
.erp-guid-select--actions.erp-guid-select--no-label .erp-guid-select__actions {
    bottom: 0.4rem;
}

.erp-guid-select--actions .erp-guid-select__actions .mud-icon-button {
    width: 1.625rem;
    height: 1.625rem;
    min-width: 1.625rem;
    min-height: 1.625rem;
    padding: 0.125rem;
    pointer-events: auto;
}

.erp-guid-select--actions .erp-guid-select__actions .mud-icon-button .mud-icon-root {
    font-size: 1.125rem;
}

.erp-guid-select--actions .erp-guid-select__field .mud-input-slot {
    padding-inline-end: calc((var(--erp-guid-select-actions, 0) * 1.5rem) + 0.125rem);
}

@media (max-width: 599px) {
    .erp-guid-select--actions .erp-guid-select__actions .mud-icon-button {
        width: 1.5rem;
        height: 1.5rem;
        min-width: 1.5rem;
        min-height: 1.5rem;
    }

    .erp-guid-select--actions .erp-guid-select__actions .mud-icon-button .mud-icon-root {
        font-size: 1rem;
    }

    .erp-guid-select--actions .erp-guid-select__field .mud-input-slot {
        padding-inline-end: calc((var(--erp-guid-select-actions, 0) * 1.375rem) + 0.125rem);
    }
}

.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,
    .erp-user-identity,
    .erp-user-caret {
        display: none;
    }

    .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;
}

