.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}


/* Portal Administration — MudBlazor visual alignment */
html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--mud-palette-background);
    color: var(--mud-palette-text-primary);
    font-family: Roboto, Arial, Helvetica, sans-serif;
}

.admin-loading {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.language-selector {
    width: 108px;
}

.language-selector .mud-input-control {
    margin: 0;
}

.language-selector .mud-input-outlined-border {
    border-radius: 20px;
}

.admin-public-page {
    min-height: 100vh;
    background: var(--mud-palette-background);
}

.admin-public-toolbar {
    min-height: 64px;
    padding: 0 28px;
}

.admin-public-brand {
    min-width: 0;
}

.admin-public-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.admin-public-center {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 48px;
    padding-bottom: 48px;
}

.admin-landing-card {
    width: 640px;
    max-width: 100%;
    padding: 44px;
    border-radius: 8px;
}

.admin-source-chip {
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 700;
}

.admin-landing-title {
    margin-bottom: 14px;
    line-height: 1.18;
}

.admin-landing-description {
    max-width: 500px;
    line-height: 1.55;
}

.admin-landing-actions {
    margin-top: 30px;
}

.admin-landing-signin {
    width: 176px;
}

.admin-landing-divider {
    margin: 24px 0 18px;
}

.customer-landing-actions {
    margin-top: 30px;
    flex-wrap: wrap;
}

.customer-landing-action {
    min-width: 176px;
}

/* Authenticated shell */
.admin-layout {
    min-height: 100vh;
    background: var(--mud-palette-background);
}

.admin-appbar {
    height: 64px;
}

.admin-app-brand {
    min-width: 0;
}

.admin-app-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.admin-app-title {
    color: inherit;
    white-space: nowrap;
}

.admin-drawer-toggle {
    display: none;
}

.admin-account-pill {
    min-width: 0;
    margin-left: 8px;
    padding: 4px 8px !important;
    border-radius: 24px !important;
    text-transform: none !important;
    background: rgba(255, 255, 255, .14) !important;
}

.admin-account-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    line-height: 1.1;
    margin-left: 8px;
    max-width: 240px;
}

.admin-account-copy strong,
.admin-account-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.admin-account-copy strong {
    font-size: 13.5px;
}

.admin-account-copy small {
    margin-top: 3px;
    font-size: 11px;
    opacity: .82;
}

/* The account circle of the app bar (approved mockups 13-18): a white circle with bold initials in the colour of the bar itself, which keeps them readable in the light and
   the dark theme. Only this avatar: the pictures of users in the tables are other components. */
.admin-account-avatar {
    background-color: #fff !important;
    color: var(--mud-palette-appbar-background, var(--mud-palette-primary)) !important;
    font-weight: 700;
}

.admin-drawer {
    width: 248px;
    border-right: 1px solid var(--mud-palette-divider);
}

.admin-nav {
    padding: 14px 10px;
}

.admin-nav .mud-nav-link {
    margin-bottom: 2px;
    border-radius: 10px;
}

.admin-nav .mud-nav-link.active {
    background: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent);
    color: var(--mud-palette-primary);
    font-weight: 700;
}

.admin-main-content {
    background: var(--mud-palette-background);
}

/* The current Super Administrator marker next to a name, and the hint under a locked "active" switch (0015.2). */
.admin-super-chip {
    margin: 0 0 0 8px;
    vertical-align: middle;
}

.admin-deactivation-hint {
    display: block;
    margin-top: 4px;
}

.admin-main-inner {
    min-height: calc(100vh - 64px);
    padding: 28px 32px;
}

.admin-account-overlay {
    z-index: 1200;
    background: transparent !important;
}

.admin-account-menu {
    position: fixed;
    z-index: 1300;
    top: 68px;
    right: 20px;
    width: 300px;
    overflow: hidden;
    border-radius: 8px;
}

.admin-account-menu-head {
    padding: 16px 18px;
}

.admin-account-menu-identity {
    min-width: 0;
}

.admin-account-menu-identity .mud-typography {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-account-menu-item {
    justify-content: flex-start !important;
    text-transform: none !important;
    border-radius: 0 !important;
    padding: 10px 18px !important;
}

/* Home */
.admin-home-placeholder-wrap {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-home-placeholder {
    width: 460px;
    max-width: 100%;
    padding: 48px;
    text-align: center;
    border-style: dashed !important;
}

/* Profile */
.admin-profile-container {
    padding-top: 32px;
    padding-bottom: 32px;
}

.admin-profile-card {
    max-width: 960px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
}

.admin-profile-header {
    padding: 28px 32px 20px;
}

.admin-profile-identity {
    min-width: 0;
}

.admin-profile-avatar-wrap {
    position: relative;
    flex: none;
}

.admin-profile-avatar {
    width: 76px !important;
    height: 76px !important;
    font-size: 23px !important;
}

.admin-profile-file-upload {
    position: absolute;
    right: -3px;
    bottom: -3px;
}

.admin-avatar-change {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    border: 2px solid var(--mud-palette-surface) !important;
}

.admin-profile-body {
    padding: 20px 32px;
}

.admin-profile-onboarding {
    margin-bottom: 24px;
}

.admin-profile-section {
    height: 100%;
    padding: 22px;
}

.admin-profile-section-title {
    margin-bottom: 24px;
    font-weight: 700;
}

.admin-profile-actions {
    padding: 18px 32px 22px;
}

/* Administrators & Invitations */
.admin-management-main {
    min-height: calc(100vh - 120px);
}

.admin-management-head {
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.admin-management-tabs .mud-tabs-panels {
    padding-top: 18px;
}

.admin-filter-panel {
    padding: 16px;
    margin-bottom: 18px;
}

.admin-filter-grow {
    flex: 1 1 360px;
}

.admin-filter-select {
    width: 210px;
}

.admin-list-head {
    gap: 16px;
    margin-bottom: 12px;
}

.admin-data-table {
    width: 100%;
}

.admin-data-table .mud-table-head .mud-button-root {
    justify-content: flex-start;
    min-width: 0;
    padding-inline: 0;
    text-transform: none;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .04em;
}

.admin-actions-column {
    text-align: right !important;
}

.admin-mobile-only {
    display: none !important;
}

.admin-mobile-card {
    padding: 18px;
}

.admin-mobile-card-main {
    min-width: 0;
}

.admin-mobile-card-main .mud-typography {
    overflow-wrap: anywhere;
}

.admin-invitation-list-head {
    align-items: flex-start !important;
}

/* Public invitation/onboarding card */
.admin-auth-card {
    width: 436px;
    max-width: 100%;
    padding: 36px 38px;
    border-radius: 8px;
}

.admin-auth-icon {
    margin-bottom: 18px;
}

.admin-auth-title {
    margin-bottom: 6px;
}

.admin-auth-lead {
    margin-bottom: 24px;
    line-height: 1.5;
}

.admin-invitation-decision {
    margin-top: 8px;
}

.admin-auth-divider {
    margin: 22px 0 10px;
}

.admin-social-actions {
    margin-top: 10px;
}

.admin-social-button .mud-button-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.admin-social-icon {
    display: inline-flex;
    flex: 0 0 auto;
}

.admin-social-icon svg {
    width: 18px;
    height: 18px;
}


@media (max-width: 959.98px) {
    .admin-drawer-toggle {
        display: inline-flex;
    }

    .admin-app-language {
        display: none;
    }

    .admin-account-copy {
        display: none;
    }

    .admin-account-pill {
        padding: 3px !important;
        background: transparent !important;
    }

    .admin-account-pill .mud-button-end-icon {
        display: none;
    }

    .admin-main-inner {
        padding: 16px 14px;
    }

    .admin-desktop-only {
        display: none !important;
    }

    .admin-mobile-only {
        display: flex !important;
    }

    .admin-mobile-controls {
        margin-bottom: 18px;
    }

    .admin-list-head {
        align-items: flex-start !important;
    }

    .admin-management-head > .mud-button-root {
        width: 100%;
    }
}

@media (max-width: 599.98px) {
    .admin-public-toolbar {
        min-height: 56px;
        padding: 0 16px;
    }

    .admin-public-brand .mud-typography {
        display: none;
    }

    .admin-public-center {
        min-height: calc(100vh - 56px);
        padding: 24px 16px;
    }

    .admin-landing-card {
        padding: 30px 24px;
    }

    .admin-landing-title {
        font-size: 1.65rem !important;
    }

    .admin-landing-signin {
        width: 100%;
    }

    .customer-landing-actions {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .customer-landing-action {
        width: 100%;
    }

    .language-selector {
        width: 92px;
    }

    .admin-app-title {
        max-width: 155px;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 14.5px !important;
    }

    .admin-app-logo {
        width: 28px;
        height: 28px;
    }

    .admin-account-menu {
        top: 60px;
        right: 8px;
        width: calc(100vw - 16px);
        max-width: 320px;
    }

    .admin-home-placeholder {
        padding: 36px 24px;
    }

    .admin-profile-container {
        padding: 0;
    }

    .admin-profile-card {
        width: 100%;
        border-radius: 0;
        box-shadow: none !important;
    }

    .admin-profile-header {
        padding: 16px;
        gap: 12px;
        align-items: center !important;
    }

    .admin-profile-avatar {
        width: 52px !important;
        height: 52px !important;
        font-size: 17px !important;
    }

    .admin-avatar-change {
        width: 26px !important;
        height: 26px !important;
        min-width: 26px !important;
        min-height: 26px !important;
    }

    .admin-avatar-delete {
        font-size: 0 !important;
        min-width: 40px !important;
    }

    .admin-avatar-delete .mud-icon-root {
        margin: 0 !important;
    }

    .admin-profile-body {
        padding: 20px 16px 24px;
    }

    .admin-profile-section {
        padding: 20px 16px;
    }

    .admin-profile-actions {
        position: sticky;
        bottom: 0;
        background: var(--mud-palette-surface);
        padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
        box-shadow: 0 -4px 12px rgba(0, 0, 0, .08);
    }

    .admin-profile-actions .mud-button-root {
        width: 100%;
    }

    .admin-management-head {
        margin-bottom: 12px;
    }

    .admin-management-tabs .mud-tab {
        flex: 1 1 50%;
        min-width: 0;
        padding-inline: 8px;
    }

    .admin-list-head {
        flex-direction: column;
        gap: 4px;
    }

    .admin-invitation-list-head .mud-button-root {
        width: 100%;
        margin-top: 8px;
    }

    .admin-auth-card {
        width: 100%;
        padding: 26px 20px;
    }

    .admin-invitation-decision,
    .admin-social-actions {
        flex-direction: column !important;
    }
}

 
/* Administrators & Invitations: the page itself does not scroll. Title, tabs, filters and counts stay in place and only the list scrolls -
   the table body (header row pinned) on desktop, the card list on phones - once the rows no longer fit. The main area is exactly one
   viewport tall (the app bar's own padding included, so no app-bar height is hard-coded). Very short windows keep the normal page scroll. */
@media (min-height: 560px) {
    .admin-main-content:has(.admin-management-main) {
        height: 100vh;
        height: 100dvh;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .admin-main-content > .admin-main-inner {
        flex: 1 1 auto;
        min-height: 0;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .admin-main-inner > .admin-management-main {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    .admin-management-head {
        flex: none;
    }

    .admin-management-tabs {
        flex: 1 1 auto;
        min-height: 0;
    }

    .admin-management-tabs .mud-tabs-tabbar {
        flex: none;
    }

    .admin-management-tabs .mud-tabs-panels {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    .admin-filter-panel,
    .admin-list-head,
    .admin-mobile-controls {
        flex: none;
    }

    .admin-data-table.mud-table {
        flex: 0 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    .admin-data-table .mud-table-container {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
    }

    .admin-mobile-card-list {
        flex: 0 1 auto;
        min-height: 0;
        overflow-y: auto;
        padding-bottom: 4px;
    }
}

/* Session-expired dialog: the shared error dialog look with a neutral (primary) status icon instead of the error red. */
.amt-session-expired-icon {
    border-color: var(--mud-palette-primary, #594ae2);
    color: var(--mud-palette-primary, #594ae2);
    background: color-mix(in srgb, var(--mud-palette-primary, #594ae2) 10%, transparent);
    box-shadow: 0 0 0 0.75rem color-mix(in srgb, var(--mud-palette-primary, #594ae2) 9%, transparent);
}

/* Dialogs must read as a separate layer above the page: a visible edge and a strong shadow (the backdrop scrim itself is the theme's OverlayDark). */
.mud-dialog {
    border: 1px solid color-mix(in srgb, var(--mud-palette-text-primary) 24%, transparent);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}
