body.app-body,
body.public-body {
    /* Compatibility: these selectors supersede the legacy shell generation. */
    background: var(--mw-canvas) !important;
}

.mw-app-shell:where(:not(.mw76-root):not(.mw76-root *)),
.mw-public-shell:where(:not(.mw76-root):not(.mw76-root *)) {
    min-height: 100vh;
}

/* Shared brand */
.app-brand:where(:not(.mw76-root):not(.mw76-root *)) {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: var(--mw-space-3);
    color: var(--mw-text-primary);
    text-decoration: none;
}

.app-brand:hover:where(:not(.mw76-root):not(.mw76-root *)) {
    color: var(--mw-text-primary);
}

.app-brand-mark:where(:not(.mw76-root):not(.mw76-root *)) {
    display: grid;
    width: 2.25rem;
    height: 2.25rem;
    flex: 0 0 2.25rem;
    place-items: center;
    border: 1px solid var(--mw-palette-ink);
    border-radius: var(--mw-radius-sm);
    color: var(--mw-text-inverse);
    background: var(--mw-brand-primary) !important;
    font-family: var(--mw-font-display);
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: 0;
    box-shadow: none !important;
}

[lang="ar"] .app-brand-mark:where(:not(.mw76-root):not(.mw76-root *)) {
    font-family: var(--mw-font-arabic);
}

.app-brand-copy:where(:not(.mw76-root):not(.mw76-root *)) {
    display: grid;
    min-width: 0;
    gap: 0.0625rem;
}

.app-brand-name:where(:not(.mw76-root):not(.mw76-root *)) {
    color: var(--mw-text-primary);
    font-family: var(--mw-font-display);
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0;
}

[lang="ar"] .app-brand-name:where(:not(.mw76-root):not(.mw76-root *)) {
    font-family: var(--mw-font-arabic);
}

.app-brand-subtitle:where(:not(.mw76-root):not(.mw76-root *)) {
    overflow: hidden;
    color: var(--mw-text-muted) !important;
    font-size: 0.625rem;
    font-weight: 600;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Tenant and platform shells */
.mw-app-shell:where(:not(.mw76-root):not(.mw76-root *)) {
    display: flex;
}

.mw-app-sidebar:where(:not(.mw76-root):not(.mw76-root *)) {
    position: sticky;
    inset-block-start: 0;
    width: var(--mw-sidebar-width);
    height: 100vh;
    flex: 0 0 var(--mw-sidebar-width);
    padding: 0;
    border-inline-end: 1px solid var(--mw-border-default);
    background: var(--mw-surface);
}

.mw-app-sidebar .app-sidebar-inner:where(:not(.mw76-root):not(.mw76-root *)) {
    display: flex;
    width: 100%;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    padding: var(--mw-space-5) var(--mw-space-4);
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--mw-surface) !important;
    box-shadow: none !important;
    backdrop-filter: none;
}

.mw-app-sidebar .app-sidebar-inner:where(:not(.mw76-root):not(.mw76-root *))::before,
.mw-app-sidebar .app-sidebar-inner:where(:not(.mw76-root):not(.mw76-root *))::after,
.mw-app-sidebar-support:where(:not(.mw76-root):not(.mw76-root *)) {
    display: none;
}

.mw-app-sidebar .app-brand:where(:not(.mw76-root):not(.mw76-root *)) {
    min-height: 2.75rem;
    padding-inline: var(--mw-space-2);
}

.app-nav:where(:not(.mw76-root):not(.mw76-root *)) {
    position: relative;
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
    gap: var(--mw-space-5);
    margin-block-start: var(--mw-space-6);
    padding: 0 var(--mw-space-1) var(--mw-space-4);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: var(--mw-border-strong) transparent;
    scrollbar-width: thin;
}

.app-nav:where(:not(.mw76-root):not(.mw76-root *))::-webkit-scrollbar-thumb {
    border-color: var(--mw-surface);
    background: var(--mw-border-strong);
}

.mw-app-sidebar-section:where(:not(.mw76-root):not(.mw76-root *)) {
    display: grid;
    gap: var(--mw-space-1);
}

.app-nav-title:where(:not(.mw76-root):not(.mw76-root *)) {
    margin: 0;
    padding: 0 var(--mw-space-3) var(--mw-space-1);
    color: var(--mw-text-muted) !important;
    font-size: 0.625rem;
    font-weight: 750;
    letter-spacing: 0;
    text-transform: uppercase;
}

[lang="ar"] .app-nav-title:where(:not(.mw76-root):not(.mw76-root *)) {
    text-transform: none;
}

.mw-app-sidebar-link:where(:not(.mw76-root):not(.mw76-root *)) {
    position: relative;
    display: flex;
    min-height: 2.5rem;
    align-items: center;
    gap: var(--mw-space-3);
    padding: var(--mw-space-2) var(--mw-space-3);
    border: 0;
    border-radius: var(--mw-radius-md);
    color: var(--mw-text-secondary);
    background: transparent;
    font-size: var(--mw-type-secondary);
    font-weight: 650;
    line-height: 1.3;
    text-decoration: none;
    box-shadow: none;
    transition:
        color var(--mw-motion-fast) var(--mw-ease-standard),
        background-color var(--mw-motion-fast) var(--mw-ease-standard);
}

.mw-app-sidebar-link:hover:where(:not(.mw76-root):not(.mw76-root *)) {
    color: var(--mw-text-primary);
    background: var(--mw-surface-interactive);
    transform: none;
}

.mw-app-sidebar-link.is-active:where(:not(.mw76-root):not(.mw76-root *)) {
    border: 0;
    color: var(--mw-brand-primary);
    background: #f5e9ea !important;
    box-shadow: none;
}

.mw-app-sidebar-link.is-active:where(:not(.mw76-root):not(.mw76-root *))::before {
    content: "";
    position: absolute;
    inset-block: 0.5rem;
    inset-inline-start: -0.25rem;
    width: 0.1875rem;
    border-radius: var(--mw-radius-pill);
    background: var(--mw-brand-primary);
}

.mw-app-sidebar-icon:where(:not(.mw76-root):not(.mw76-root *)) {
    display: inline-flex;
    width: 1.125rem;
    height: 1.125rem;
    flex: 0 0 1.125rem;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0;
    color: currentColor;
    background: transparent;
    font-size: 0;
}

.mw-app-sidebar-link.is-active .mw-app-sidebar-icon:where(:not(.mw76-root):not(.mw76-root *)) {
    color: currentColor;
    background: transparent;
}

.app-nav-link .badge:where(:not(.mw76-root):not(.mw76-root *)),
.app-nav-link .rounded-pill:where(:not(.mw76-root):not(.mw76-root *)) {
    margin-inline-start: auto;
}

.app-main:where(:not(.mw76-root):not(.mw76-root *)) {
    display: flex;
    min-width: 0;
    min-height: 100vh;
    flex: 1;
    flex-direction: column;
}

.mw-app-topbar:where(:not(.mw76-root):not(.mw76-root *)) {
    position: sticky;
    inset-block-start: 0;
    z-index: var(--mw-z-sticky);
    display: flex;
    min-height: var(--mw-topbar-height);
    align-items: center;
    justify-content: space-between;
    gap: var(--mw-space-4);
    padding: var(--mw-space-3) var(--mw-page-gutter);
    border: 0 !important;
    border-bottom: 1px solid var(--mw-border-default) !important;
    background: var(--mw-canvas) !important;
    box-shadow: none !important;
    backdrop-filter: none;
}

.app-topbar-left:where(:not(.mw76-root):not(.mw76-root *)),
.app-topbar-right:where(:not(.mw76-root):not(.mw76-root *)) {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: var(--mw-space-3);
}

.app-topbar-left:where(:not(.mw76-root):not(.mw76-root *)) {
    flex: 1;
}

.app-page-eyebrow:where(:not(.mw76-root):not(.mw76-root *)) {
    overflow: hidden;
    margin: 0;
    color: var(--mw-text-muted) !important;
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

[lang="ar"] .app-page-eyebrow:where(:not(.mw76-root):not(.mw76-root *)) {
    text-transform: none;
}

.mw-app-page-title:where(:not(.mw76-root):not(.mw76-root *)) {
    overflow: hidden;
    margin: 0;
    color: var(--mw-text-primary);
    font-size: 1rem;
    font-weight: 750;
    line-height: 1.35;
    letter-spacing: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mw-app-page-subtitle:where(:not(.mw76-root):not(.mw76-root *)) {
    display: none;
}

.mw-app-user-context:where(:not(.mw76-root):not(.mw76-root *)) {
    display: inline-flex;
    min-width: 0;
    min-height: 2.625rem;
    align-items: center;
    gap: var(--mw-space-2);
    padding: 0.25rem 0.375rem;
    border: 1px solid var(--mw-border-default) !important;
    border-radius: var(--mw-radius-md);
    color: var(--mw-text-primary);
    background: var(--mw-surface) !important;
    box-shadow: none !important;
}

.mw-app-user-context:hover:where(:not(.mw76-root):not(.mw76-root *)),
.mw-app-user-context[aria-expanded="true"]:where(:not(.mw76-root):not(.mw76-root *)) {
    border-color: var(--mw-border-strong);
    background: var(--mw-surface-interactive);
}

.app-user-avatar:where(:not(.mw76-root):not(.mw76-root *)) {
    display: grid;
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    place-items: center;
    border: 1px solid var(--mw-border-default);
    border-radius: var(--mw-radius-sm);
    color: var(--mw-brand-primary);
    background: #f5e9ea !important;
    font-size: 0.6875rem;
    font-weight: 750;
}

.app-user-meta:where(:not(.mw76-root):not(.mw76-root *)) {
    min-width: 0;
    padding: 0;
    text-align: start;
}

.app-user-name:where(:not(.mw76-root):not(.mw76-root *)),
.app-user-role:where(:not(.mw76-root):not(.mw76-root *)) {
    max-width: 10rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-user-name:where(:not(.mw76-root):not(.mw76-root *)) {
    color: var(--mw-text-primary);
    font-size: var(--mw-type-caption);
    font-weight: 750;
    line-height: 1.25;
}

.app-user-role:where(:not(.mw76-root):not(.mw76-root *)) {
    color: var(--mw-text-muted);
    font-size: 0.625rem;
    line-height: 1.2;
}

.mw-account-menu:where(:not(.mw76-root):not(.mw76-root *)) {
    inset-inline-end: 0 !important;
    inset-inline-start: auto !important;
}

.mw-account-menu form {
    margin: 0;
}

.mw-account-menu .dropdown-item:where(:not(.mw76-root):not(.mw76-root *)) {
    width: 100%;
    border: 0;
}

.mw-page-shell {
    width: 100%;
    max-width: var(--mw-content-max);
    flex: 1;
    margin-inline: auto;
    padding: var(--mw-space-6) var(--mw-page-gutter) var(--mw-space-10);
}

.app-footer:where(:not(.mw76-root):not(.mw76-root *)) {
    display: flex;
    width: 100%;
    max-width: var(--mw-content-max);
    align-items: center;
    gap: var(--mw-space-2);
    margin: auto auto 0;
    padding: var(--mw-space-3) var(--mw-page-gutter) var(--mw-space-5);
    color: var(--mw-text-muted);
    font-size: var(--mw-type-caption);
}

.mw-shell-platform .mw-app-sidebar-link.is-active:where(:not(.mw76-root):not(.mw76-root *)) {
    color: var(--mw-brand-secondary);
    background: #e9efed !important;
}

.mw-shell-platform .mw-app-sidebar-link.is-active:where(:not(.mw76-root):not(.mw76-root *))::before {
    background: var(--mw-brand-secondary);
}

.app-mobile-nav:where(:not(.mw76-root):not(.mw76-root *)) {
    width: min(21rem, calc(100vw - 2rem));
    border-radius: 0;
    background: var(--mw-surface);
}

.app-mobile-nav .offcanvas-header:where(:not(.mw76-root):not(.mw76-root *)) {
    padding: var(--mw-space-4);
}

.app-mobile-nav .offcanvas-body:where(:not(.mw76-root):not(.mw76-root *)) {
    min-height: 0;
    padding: 0 var(--mw-space-3) var(--mw-space-4);
}

.app-mobile-nav .app-nav:where(:not(.mw76-root):not(.mw76-root *)) {
    margin-block-start: var(--mw-space-3);
    overflow-y: auto;
}

/* Public shell */
.mw-public-shell {
    display: flex;
    flex-direction: column;
}

.public-header:where(:not(.mw76-root):not(.mw76-root *)) {
    position: sticky;
    inset-block-start: 0;
    z-index: var(--mw-z-sticky);
    min-height: var(--mw-public-header-height);
    padding: 0 var(--mw-page-gutter);
    border-bottom: 1px solid var(--mw-border-default);
    background: var(--mw-canvas);
    backdrop-filter: none;
}

.mw-public-nav:where(:not(.mw76-root):not(.mw76-root *)) {
    display: flex;
    min-height: var(--mw-public-header-height);
    max-width: var(--mw-public-content-max);
    align-items: center;
    justify-content: space-between;
    gap: var(--mw-space-4);
    margin-inline: auto;
    padding: 0;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none;
}

.mw-public-brand .app-brand-name:where(:not(.mw76-root):not(.mw76-root *)) {
    font-size: 1.25rem;
}

.mw-public-nav-toggle {
    display: none;
}

.mw-public-nav-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--mw-space-2);
}

.mw-public-nav-links {
    display: flex;
    align-items: center;
    gap: var(--mw-space-1);
}

.public-nav-link:where(:not(.mw76-root):not(.mw76-root *)) {
    display: inline-flex;
    min-height: 2.625rem;
    align-items: center;
    padding: var(--mw-space-2) var(--mw-space-3);
    border-radius: var(--mw-radius-md);
    color: var(--mw-text-secondary);
    font-size: var(--mw-type-secondary);
    font-weight: 650;
    text-decoration: none;
}

.public-nav-link:hover:where(:not(.mw76-root):not(.mw76-root *)),
.public-nav-link.is-active:where(:not(.mw76-root):not(.mw76-root *)) {
    color: var(--mw-text-primary);
    background: var(--mw-surface-interactive);
}

.public-nav-link.is-active:where(:not(.mw76-root):not(.mw76-root *)) {
    box-shadow: inset 0 -2px 0 var(--mw-brand-primary);
}

.public-content:where(:not(.mw76-root):not(.mw76-root *)) {
    width: 100%;
    max-width: var(--mw-public-content-max);
    margin-inline: auto;
    padding: var(--mw-space-8) var(--mw-page-gutter) var(--mw-space-12);
}

.mw-public-footer {
    display: flex;
    width: 100%;
    max-width: var(--mw-public-content-max);
    align-items: center;
    justify-content: space-between;
    gap: var(--mw-space-5);
    margin: auto auto 0;
    padding: var(--mw-space-6) var(--mw-page-gutter) var(--mw-space-8);
    border-top: 1px solid var(--mw-border-default);
    color: var(--mw-text-muted);
    font-size: var(--mw-type-caption);
}

.public-footer-brand:where(:not(.mw76-root):not(.mw76-root *)),
.public-footer-links:where(:not(.mw76-root):not(.mw76-root *)) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--mw-space-4);
}

.public-footer-brand strong:where(:not(.mw76-root):not(.mw76-root *)) {
    color: var(--mw-text-primary);
    font-family: var(--mw-font-display);
    font-size: 1rem;
}

[lang="ar"] .public-footer-brand strong:where(:not(.mw76-root):not(.mw76-root *)) {
    font-family: var(--mw-font-arabic);
}

.public-footer-links a:where(:not(.mw76-root):not(.mw76-root *)) {
    color: var(--mw-text-secondary);
}

/* Language control */
.mw-language-switcher:where(:not(.mw76-root):not(.mw76-root *)) {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: var(--mw-space-2);
}

.mw-language-label:where(:not(.mw76-root):not(.mw76-root *)) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    clip-path: inset(50%);
}

.mw-language-options:where(:not(.mw76-root):not(.mw76-root *)) {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 0.1875rem;
    border: 1px solid var(--mw-border-default);
    border-radius: var(--mw-radius-md);
    background: var(--mw-surface);
    box-shadow: none;
}

.mw-language-form:where(:not(.mw76-root):not(.mw76-root *)) {
    margin: 0;
}

.mw-language-button:where(:not(.mw76-root):not(.mw76-root *)) {
    min-width: 2.25rem;
    min-height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 var(--mw-space-2);
    border: 0;
    border-radius: var(--mw-radius-sm);
    color: var(--mw-text-muted);
    background: transparent;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
}

.mw-language-button:hover:where(:not(.mw76-root):not(.mw76-root *)),
.mw-language-button.is-active:where(:not(.mw76-root):not(.mw76-root *)) {
    color: var(--mw-text-primary);
    background: var(--mw-surface-interactive);
}

.mw-language-button.is-active:where(:not(.mw76-root):not(.mw76-root *)) {
    box-shadow: inset 0 -2px 0 var(--mw-brand-primary);
}

.mw-toast-region {
    position: fixed;
    inset-block-end: var(--mw-space-4);
    inset-inline-end: var(--mw-space-4);
    z-index: var(--mw-z-toast);
    display: grid;
    width: min(24rem, calc(100vw - 2rem));
    gap: var(--mw-space-2);
}

@media (max-width: 61.998rem) {
    .mw-app-topbar:where(:not(.mw76-root):not(.mw76-root *)) {
        min-height: 4rem;
        padding-block: var(--mw-space-2);
    }

    .mw-public-nav {
        align-items: center;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .mw-public-nav-toggle {
        display: inline-flex;
        margin-inline-start: auto;
    }

    .mw-public-nav-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
        padding-block-end: var(--mw-space-4);
    }

    .mw-public-nav-actions:not(.show) {
        display: none;
    }

    .mw-public-nav-links {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mw-public-nav-actions .mw-language-switcher:where(:not(.mw76-root):not(.mw76-root *)) {
        order: initial;
        justify-content: flex-start;
    }

    .mw-public-nav-actions .btn:where(:not(.mw76-root):not(.mw76-root *)) {
        width: 100%;
    }
}

@media (min-width: 62rem) {
    .mw-public-nav-actions.collapse:where(:not(.mw76-root):not(.mw76-root *)) {
        display: flex !important;
    }
}

@media (max-width: 47.998rem) {
    .mw-app-topbar:where(:not(.mw76-root):not(.mw76-root *)) {
        align-items: center;
        flex-direction: row;
    }

    .app-topbar-right:where(:not(.mw76-root):not(.mw76-root *)) {
        flex: 0 0 auto;
    }

    .app-topbar-right .mw-language-switcher:where(:not(.mw76-root):not(.mw76-root *)),
    .app-user-meta:where(:not(.mw76-root):not(.mw76-root *)),
    .mw-account-chevron:where(:not(.mw76-root):not(.mw76-root *)) {
        display: none;
    }

    .mw-app-user-context:where(:not(.mw76-root):not(.mw76-root *)) {
        width: 2.625rem;
        justify-content: center;
        padding: 0.25rem;
    }

    .mw-page-shell:where(:not(.mw76-root):not(.mw76-root *)),
    .public-content:where(:not(.mw76-root):not(.mw76-root *)) {
        padding-block-start: var(--mw-space-5);
        padding-block-end: var(--mw-space-8);
    }

    .mw-public-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .public-footer-links:where(:not(.mw76-root):not(.mw76-root *)) {
        gap: var(--mw-space-3);
    }

    .mw-pwa-install,
    .mw-pwa-update,
    .mw-push-settings {
        border-radius: var(--mw-radius-lg);
    }
}

@media (max-width: 24rem) {
    .app-page-eyebrow:where(:not(.mw76-root):not(.mw76-root *)) {
        display: none;
    }

    .mw-app-page-title:where(:not(.mw76-root):not(.mw76-root *)) {
        max-width: 8rem;
    }
}

[dir="rtl"] .offcanvas-start:where(:not(.mw76-root):not(.mw76-root *)),
[dir="rtl"] .offcanvas-end:where(:not(.mw76-root):not(.mw76-root *)) {
    right: 0;
    left: auto;
}

[dir="rtl"] .mw-directional-icon {
    transform: scaleX(-1);
}

@media print {
    .mw-app-sidebar:where(:not(.mw76-root):not(.mw76-root *)),
    .mw-app-topbar:where(:not(.mw76-root):not(.mw76-root *)),
    .app-footer:where(:not(.mw76-root):not(.mw76-root *)),
    .public-header:where(:not(.mw76-root):not(.mw76-root *)),
    .mw-public-footer:where(:not(.mw76-root):not(.mw76-root *)),
    .mw-pwa-region:where(:not(.mw76-root):not(.mw76-root *)),
    .mw-push-settings:where(:not(.mw76-root):not(.mw76-root *)),
    .mw-toast-region:where(:not(.mw76-root):not(.mw76-root *)) {
        display: none !important;
    }

    .mw-page-shell:where(:not(.mw76-root):not(.mw76-root *)),
    .public-content:where(:not(.mw76-root):not(.mw76-root *)) {
        max-width: none;
        padding: 0;
    }
}
