html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

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

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.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."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.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;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2000;
    padding: 0.75rem 1.25rem;
    background: #fff3cd;
    color: #664d03;
    border-top: 1px solid #ffecb5;
    box-shadow: 0 -1px 8px rgba(0, 0, 0, 0.12);
}

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


/* Account and Identity */
.account-page {
    min-height: calc(100vh - 8rem);
    display: grid;
    place-items: center;
    padding: 2.5rem 1rem;
}
.account-card {
    width: min(100%, 36rem);
    padding: clamp(1.25rem, 3vw, 2.25rem);
    border-radius: 1rem;
}
.account-heading {
    text-align: center;
}
.account-heading-icon {
    font-size: 2.75rem;
    color: var(--rz-primary);
}
.account-title {
    margin: 0;
}
.account-subtitle {
    color: var(--rz-text-secondary-color);
}
.account-heading .account-subtitle {
    text-align: center;
}
.account-form {
    width: 100%;
}
.account-validation,
.account-field-error {
    color: var(--rz-danger);
}
.account-field-error {
    display: block;
    margin-top: -0.75rem;
    font-size: 0.875rem;
}
.account-links {
    text-align: center;
}
.account-external-button,
.account-button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}
.account-external-button {
    width: 100%;
    min-height: 2.5rem;
    color: var(--rz-primary);
    border-color: var(--rz-primary);
    background: transparent;
}

.account-external-button .rz-button-text,
.account-external-button-icon {
    color: inherit;
}

.account-external-button:hover,
.account-external-button:focus-visible,
.account-external-button:active {
    color: var(--rz-on-primary, #fff);
    border-color: var(--rz-primary);
    background: var(--rz-primary);
}

.account-external-button:focus-visible {
    outline: 2px solid var(--rz-primary);
    outline-offset: 2px;
}
.account-manage-page {
    padding: 1rem 0 2rem;
}
.account-manage-nav-card,
.account-manage-content {
    height: 100%;
}
.account-manage-menu {
    width: 100%;
}
.account-manage-content {
    padding: clamp(1rem, 2.5vw, 2rem);
}
.account-manage-content h1,
.account-manage-content h2,
.account-manage-content h3 {
    margin-top: 0;
}
.account-secret-card {
    overflow-wrap: anywhere;
    font-size: 1.05rem;
}
.account-security-icon {
    font-size: 2rem;
    color: var(--rz-primary);
}
.account-recovery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: 0.75rem;
}
.account-recovery-code {
    display: block;
    padding: 0.75rem;
    text-align: center;
    border: 1px solid var(--rz-base-300);
    border-radius: var(--rz-border-radius);
    background: var(--rz-base-100);
    font-size: 1rem;
}
@media (max-width: 767px) {
    .account-page {
        padding: 1rem 0.25rem;
    }
    .account-card {
        border-radius: 0.75rem;
    }
    .account-manage-content {
        padding: 1rem;
    }
}


.account-divider {
    border-top: 1px solid var(--rz-base-300);
    margin: 0.5rem 0;
    width: 100%;
}

.account-divider-with-text {
    align-items: center;
    border-top: 0;
    display: flex;
    gap: 0.75rem;
    margin: 0.25rem 0;
}

.account-divider-with-text::before,
.account-divider-with-text::after {
    border-top: 1px solid var(--rz-base-300);
    content: "";
    flex: 1;
}

.account-divider-with-text span {
    color: var(--rz-text-secondary-color);
    font-size: 0.875rem;
    white-space: nowrap;
}


/* Portal responsive design system */
:root {
    --portal-page-max-width: 1600px;
    --portal-page-gutter: clamp(0.75rem, 2vw, 1.75rem);
    --portal-surface-radius: 0.875rem;
    --portal-control-min-height: 2.75rem;
}

html {
    min-width: 320px;
    background: var(--rz-body-background-color);
}

body {
    margin: 0;
    color: var(--rz-text-color);
    background: var(--rz-body-background-color);
    overflow-x: hidden;
}

main,
.content,
.rz-body {
    min-width: 0;
}

.content {
    width: min(100%, var(--portal-page-max-width));
    margin-inline: auto;
    padding: var(--portal-page-gutter);
}

.rz-card {
    border-radius: var(--portal-surface-radius);
    box-shadow: var(--rz-card-shadow, 0 1px 3px rgba(0, 0, 0, 0.12));
}

.rz-button,
.rz-textbox,
.rz-dropdown,
.rz-multiselect,
.rz-numeric,
.rz-datepicker,
.rz-password {
    min-height: var(--portal-control-min-height);
}

.rz-button {
    border-radius: 0.625rem;
    touch-action: manipulation;
}

.rz-fieldset {
    min-width: 0;
    border-radius: var(--portal-surface-radius);
}

.rz-data-grid {
    width: 100%;
    border-radius: var(--portal-surface-radius);
    overflow: visible;
}

.rz-data-grid-data {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
}

.rz-dialog-wrapper {
    padding: clamp(0.5rem, 2vw, 1.5rem);
}

.rz-dialog {
    width: min(var(--rz-dialog-width, 720px), calc(100vw - 1rem)) !important;
    max-height: calc(100dvh - 1rem);
    border-radius: var(--portal-surface-radius);
}

.rz-dialog-content {
    max-height: calc(100dvh - 8rem);
    overflow: auto;
}

.rz-notification {
    max-width: min(28rem, calc(100vw - 1rem));
}

.rz-panel-menu,
.rz-navigation-item-link {
    touch-action: manipulation;
}

img,
svg,
video,
canvas {
    max-width: 100%;
}

.portal-page-actions,
.page-actions,
.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.625rem;
}

.portal-form-grid,
.form-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1rem;
}

.portal-form-grid > *,
.form-grid > * {
    min-width: 0;
}

@media (max-width: 991.98px) {
    :root {
        --portal-page-gutter: 1rem;
    }

    .rz-dialog {
        width: calc(100vw - 1rem) !important;
    }

    .portal-form-grid,
    .form-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    :root {
        --portal-page-gutter: 0.75rem;
        --portal-control-min-height: 3rem;
    }

    .content {
        padding-top: 0.75rem;
    }

    .rz-card,
    .rz-fieldset {
        border-radius: 0.75rem;
    }

    .rz-data-grid {
        font-size: 0.9375rem;
    }

    .rz-paginator {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem;
    }

    .rz-dialog-wrapper {
        align-items: flex-end;
        padding: 0;
    }

    .rz-dialog {
        width: 100vw !important;
        max-width: none !important;
        max-height: 92dvh;
        margin: 0;
        border-radius: 1rem 1rem 0 0;
    }

    .rz-dialog-content {
        max-height: calc(92dvh - 7rem);
    }

    .portal-page-actions,
    .page-actions,
    .form-actions {
        align-items: stretch;
    }

    .portal-page-actions > .rz-button,
    .page-actions > .rz-button,
    .form-actions > .rz-button {
        flex: 1 1 10rem;
    }

    .portal-form-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .portal-form-grid > *,
    .form-grid > * {
        grid-column: 1 / -1 !important;
    }
}

@media (max-width: 479.98px) {
    .rz-notification {
        inset-inline: 0.5rem !important;
        width: auto !important;
    }

    .rz-button {
        white-space: normal;
    }

    .account-card {
        box-shadow: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}


/* Release accessibility and resilient error states */
.portal-error-card {
    width: min(100%, 42rem);
    margin: clamp(2rem, 8vh, 6rem) auto;
    padding: clamp(1.25rem, 4vw, 2.5rem);
}
.portal-error-icon {
    color: var(--rz-danger);
    font-size: 3rem;
}
:focus-visible {
    outline: 3px solid var(--rz-primary);
    outline-offset: 2px;
}
.rz-button:focus-visible,
.rz-inputtext:focus-visible,
.rz-dropdown:focus-within,
.rz-checkbox:focus-within {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--rz-primary) 35%, transparent);
}
.rz-button[disabled],
.rz-state-disabled {
    cursor: not-allowed;
}
iframe {
    max-width: 100%;
}
@media (max-width: 767.98px) {
    .portal-error-card {
        margin: 1rem auto;
    }
    .rz-data-grid .rz-column-title {
        white-space: normal;
    }
    .rz-dialog-titlebar {
        position: sticky;
        top: 0;
        z-index: 1;
        background: var(--rz-dialog-background-color);
    }
}


/* Release-ready theme, density, recovery and responsive states */
[data-portal-theme="dark"] {
    color-scheme: dark;
    --rz-body-background-color: #111827;
    --rz-base-background-color: #182235;
    --rz-base-50: #111827;
    --rz-base-100: #182235;
    --rz-base-200: #233047;
    --rz-base-300: #344258;
    --rz-text-color: #f3f4f6;
    --rz-text-secondary-color: #cbd5e1;
    --rz-card-background-color: #182235;
    --rz-panel-menu-item-color: #e5e7eb;
    --rz-grid-cell-color: #e5e7eb;
    --rz-grid-header-color: #f8fafc;
    --rz-input-background-color: #111827;
    --rz-input-value-color: #f3f4f6;
}

[data-portal-theme="dark"] body,
[data-portal-theme="dark"] .rz-body,
[data-portal-theme="dark"] .rz-layout,
[data-portal-theme="dark"] .rz-sidebar,
[data-portal-theme="dark"] .rz-header,
[data-portal-theme="dark"] .rz-card,
[data-portal-theme="dark"] .rz-dialog {
    background-color: var(--rz-body-background-color);
    color: var(--rz-text-color);
}

[data-portal-theme="dark"] .rz-card,
[data-portal-theme="dark"] .rz-dialog,
[data-portal-theme="dark"] .rz-data-grid,
[data-portal-theme="dark"] .rz-panel-menu {
    border-color: var(--rz-base-300);
}

[data-portal-density="compact"] {
    --portal-control-min-height: 2.25rem;
}

[data-portal-density="compact"] .rz-cell-data,
[data-portal-density="compact"] .rz-grid-table td,
[data-portal-density="compact"] .rz-grid-table th {
    padding-block: .4rem;
}

.impersonation-banner {
    position: sticky;
    top: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    min-height: 2.75rem;
    padding: .5rem var(--portal-page-gutter);
    background: #7c2d12;
    color: #fff;
    box-shadow: 0 2px 8px rgb(0 0 0 / 20%);
}

.impersonation-banner form {
    margin: 0;
}

.portal-state-card {
    display: grid;
    place-items: center;
    min-height: 12rem;
    padding: clamp(1rem, 4vw, 2.5rem);
    text-align: center;
}

.portal-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .625rem;
}

.portal-toolbar > .rz-button:last-child {
    margin-inline-start: auto;
}

.rz-data-grid .rz-button {
    white-space: nowrap;
}

/* Grid actions must be sized by their controls, not by the cell's ellipsis box. */
.rz-data-grid .portal-grid-action-cell {
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
}

.portal-grid-actions {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: .5rem;
    min-width: max-content;
    padding: .25rem;
    overflow: visible;
}

.portal-grid-actions > *,
.portal-grid-actions .rz-button {
    flex: 0 0 auto;
    min-width: max-content;
    max-width: none;
}

.portal-grid-actions .rz-button-label,
.portal-grid-actions .rz-button-text {
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}

.rz-data-grid td:has(.rz-button),
.rz-data-grid td:has(.rz-menu-button) {
    min-width: max-content;
    overflow: visible !important;
    text-overflow: clip !important;
}

.rz-data-grid td:has(.rz-button) > .rz-stack,
.rz-data-grid td:has(.rz-menu-button) > .rz-stack {
    min-width: max-content;
    overflow: visible;
    padding: .25rem;
}

.rz-data-grid td .rz-button,
.rz-data-grid td .rz-menu-button {
    flex-shrink: 0;
    max-width: none;
}

.portal-job-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr));
    gap: .75rem;
}

.portal-job-field {
    display: grid;
    gap: .2rem;
    min-width: 0;
    padding: .75rem;
    border: 1px solid var(--rz-base-300);
    border-radius: .625rem;
}

.portal-job-field__label {
    color: var(--rz-text-secondary-color);
    font-size: .8125rem;
    font-weight: 600;
}

.portal-job-field__value {
    overflow-wrap: anywhere;
}

.portal-job-field__value--monospace {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

@media (max-width: 767.98px) {
    .impersonation-banner {
        align-items: stretch;
        flex-direction: column;
        text-align: center;
    }

    .portal-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .portal-toolbar > *,
    .portal-toolbar .rz-button,
    .form-actions > .rz-button {
        width: 100%;
    }

    .rz-data-grid {
        font-size: .875rem;
    }

    .rz-data-grid .rz-grid-table {
        min-width: 42rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}


/* Release architecture and productivity additions */
.entity-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
}

.entity-toolbar-start,
.entity-toolbar-end,
.responsive-form-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.entity-toolbar-start {
    flex: 1 1 24rem;
}

.entity-toolbar-end {
    justify-content: flex-end;
}

.notification-bell {
    position: relative;
    display: inline-flex;
}

.notification-bell-badge {
    position: absolute;
    top: -.25rem;
    right: -.35rem;
    pointer-events: none;
    min-width: 1.25rem;
    justify-content: center;
}

.notification-card {
    border-inline-start: .25rem solid transparent;
}

.notification-card.is-unread {
    border-inline-start-color: var(--rz-info);
}

.notification-card.is-read {
    opacity: .78;
}

.search-result,
.settings-area {
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: start;
    cursor: pointer;
    border-radius: var(--rz-border-radius);
    transition: background-color .15s ease, transform .15s ease;
}

.search-result {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .75rem;
    padding: .75rem;
}

.search-result:hover,
.search-result:focus-visible,
.settings-area:hover,
.settings-area:focus-visible {
    background: var(--rz-base-200);
}

.search-result:focus-visible,
.settings-area:focus-visible {
    outline: 2px solid var(--rz-primary);
    outline-offset: 2px;
}

.search-result-content {
    display: grid;
    min-width: 0;
}

.search-result-content span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--rz-text-secondary-color);
}

.search-result-icon,
.operation-area-icon {
    font-size: 1.75rem;
    color: var(--rz-primary);
}

.activity-feed {
    display: grid;
    gap: .75rem;
}

.activity-feed-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1rem;
    border: 1px solid var(--rz-base-300);
    border-radius: var(--rz-border-radius);
    background: var(--rz-panel-background-color);
}

.activity-feed-icon {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--rz-base-200);
    color: var(--rz-primary);
}

.activity-feed-content {
    min-width: 0;
}

.operation-area-card {
    height: 100%;
}

.settings-area {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .75rem;
    min-height: 5rem;
    padding: .85rem;
    border: 1px solid var(--rz-base-300);
}

.settings-area > span {
    display: grid;
    gap: .2rem;
}

.settings-area small {
    color: var(--rz-text-secondary-color);
}

.section-card {
    height: 100%;
}

.state-card {
    max-width: 48rem;
    margin-inline: auto;
}

.state-card-icon {
    font-size: 2.5rem;
}

.error-state .state-card-icon {
    color: var(--rz-danger);
}

@media (max-width: 767px) {
    .entity-toolbar,
    .entity-toolbar-start,
    .entity-toolbar-end,
    .responsive-form-actions {
        align-items: stretch;
        width: 100%;
    }

    .entity-toolbar-start > *,
    .entity-toolbar-end > *,
    .responsive-form-actions > * {
        flex: 1 1 100%;
        width: 100%;
    }

    .activity-feed-item {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .activity-feed-item > :last-child {
        grid-column: 1 / -1;
        width: 100%;
    }

    .notification-bell .rz-button {
        min-width: 2.75rem;
        min-height: 2.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .search-result,
    .settings-area {
        transition: none;
    }
}


/* Final pre-release operational and mobile refinements */
.portal-responsive-grid {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.portal-responsive-grid .rz-data-grid-data,
.portal-responsive-grid .rz-grid-table-container {
    overflow-x: auto;
}

.portal-card-action {
    float: inline-end;
}

.portal-inline-actions,
.portal-sticky-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
}

.portal-diagnostic-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-block: .625rem;
    border-bottom: 1px solid var(--rz-base-300);
}

.portal-diagnostic-row:last-child {
    border-bottom: 0;
}

.portal-diagnostic-path {
    color: var(--rz-text-secondary-color);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: .8125rem;
    overflow-wrap: anywhere;
}

.portal-diagnostic-list {
    margin: 0;
    padding-inline-start: 1.25rem;
    overflow-wrap: anywhere;
}

.portal-settings-tabs .rz-tabview-nav {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
}

.portal-settings-tabs .rz-tabview-nav li {
    flex: 0 0 auto;
}

.portal-dialog-form {
    min-width: 0;
}

.notification-card-header > div {
    min-width: 0;
}

.notification-card-header .rz-text {
    overflow-wrap: anywhere;
}

@media (max-width: 767.98px) {
    .portal-card-action {
        float: none;
        width: 100%;
        margin-top: .75rem;
    }

    .portal-inline-actions,
    .portal-sticky-actions {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .portal-inline-actions > *,
    .portal-sticky-actions > *,
    .portal-sticky-actions .rz-button {
        width: 100%;
    }

    .portal-sticky-actions {
        position: sticky;
        bottom: 0;
        z-index: 10;
        margin-inline: calc(var(--portal-page-gutter) * -1);
        padding: .75rem var(--portal-page-gutter);
        border-top: 1px solid var(--rz-base-300);
        background: var(--rz-body-background-color);
        box-shadow: 0 -.25rem .75rem rgb(0 0 0 / 8%);
    }

    .portal-diagnostic-row {
        align-items: stretch;
        flex-direction: column;
    }

    .portal-responsive-grid .rz-grid-table {
        min-width: 44rem;
    }

    .portal-settings-tabs .rz-tabview-panels {
        padding-inline: 0;
    }

    .notification-card-header {
        align-items: flex-start !important;
        flex-direction: column !important;
    }

    .search-result-content span {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .rz-dialog {
        inset: auto 0 0 !important;
        width: 100vw !important;
        max-width: none !important;
        max-height: 94dvh;
        margin: 0 !important;
        border-radius: 1rem 1rem 0 0;
    }

    .rz-dialog-content {
        max-height: calc(94dvh - 4.5rem);
        overflow-y: auto;
        overscroll-behavior: contain;
    }
}

@media (max-width: 399.98px) {
    .portal-responsive-grid .rz-grid-table {
        min-width: 40rem;
    }

    .search-result {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .search-result > :last-child {
        display: none;
    }
}


/* Installation and reconfiguration wizard */
.portal-installation-steps .rz-steps-content {
    padding-inline: 0;
}

.portal-installation-setting {
    overflow-wrap: anywhere;
}

.portal-installation-admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.portal-compact-list {
    margin: .5rem 0 0;
    padding-inline-start: 1.25rem;
}

@media (max-width: 700px) {
    .portal-installation-admin-grid {
        grid-template-columns: 1fr;
    }

    .portal-installation-steps .rz-steps-header {
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .portal-installation-steps .rz-steps-title {
        white-space: nowrap;
    }
}


/* Platform studio and productivity */
.quick-create-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: .75rem;
}
.productivity-favorite {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: .75rem;
    padding: .7rem 0;
    border-bottom: 1px solid var(--rz-base-300);
}
.productivity-favorite a { overflow-wrap: anywhere; font-weight: 600; }
.productivity-favorite span { color: var(--rz-text-secondary-color); font-size: .85rem; }
.entity-comment { margin-block: .5rem; }
.entity-comment__meta { color: var(--rz-text-secondary-color); font-size: .8rem; margin-bottom: .35rem; }
.entity-comment__body { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 600px) {
    .productivity-favorite { grid-template-columns: auto minmax(0, 1fr) auto; }
    .productivity-favorite span { display: none; }
    .quick-create-grid { grid-template-columns: 1fr; }
}


/* Platform Studio visual designers */
.automation-canvas {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .25rem;
    padding: .75rem;
    min-height: 12rem;
    border: 1px dashed var(--rz-base-400);
    border-radius: .75rem;
    background: var(--rz-base-50);
}
.automation-node {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: .75rem;
    padding: .75rem;
    border: 1px solid var(--rz-base-300);
    border-radius: .65rem;
    background: var(--rz-base-background-color);
    cursor: grab;
}
.automation-node:active { cursor: grabbing; }
.automation-node__handle,
.report-layout-item__handle,
.dashboard-editor-widget__handle {
    font-weight: 700;
    color: var(--rz-text-secondary-color);
    cursor: grab;
}
.automation-node__content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.automation-node__content span {
    color: var(--rz-text-secondary-color);
    overflow-wrap: anywhere;
}
.automation-edge {
    align-self: center;
    font-size: 1.5rem;
    color: var(--rz-primary);
}
.report-field-list,
.report-layout-zone {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    min-height: 12rem;
}
.report-field,
.report-layout-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    width: 100%;
    padding: .65rem .75rem;
    border: 1px solid var(--rz-base-300);
    border-radius: .55rem;
    background: var(--rz-base-background-color);
    text-align: left;
}
.report-layout-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
}
.dashboard-layout-editor {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: .75rem;
    margin-bottom: 1rem;
}
.dashboard-editor-widget {
    display: grid;
    grid-template-columns: auto auto minmax(10rem, 1fr) minmax(8rem, auto) minmax(7rem, auto);
    align-items: center;
    gap: .65rem;
    padding: .75rem;
    border: 1px solid var(--rz-base-300);
    border-radius: .65rem;
    background: var(--rz-base-background-color);
}
.dashboard-editor-widget--small { grid-column: span 3; }
.dashboard-editor-widget--medium { grid-column: span 6; }
.dashboard-editor-widget--large { grid-column: span 9; }
.dashboard-editor-widget--full { grid-column: 1 / -1; }
[data-dashboard-widget][data-widget-size="small"] { grid-column: span 3; }
[data-dashboard-widget][data-widget-size="medium"] { grid-column: span 6; }
[data-dashboard-widget][data-widget-size="large"] { grid-column: span 9; }
[data-dashboard-widget][data-widget-size="full"] { grid-column: 1 / -1; }
.markdown-content {
    line-height: 1.55;
    overflow-wrap: anywhere;
}
.markdown-content > :last-child { margin-bottom: 0; }
.markdown-content pre {
    overflow-x: auto;
    padding: .75rem;
    border-radius: .5rem;
    background: var(--rz-base-100);
}
.comment-file-list,
.comment-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.comment-attachment {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .45rem .65rem;
    border: 1px solid var(--rz-base-300);
    border-radius: .5rem;
    text-decoration: none;
}
.comment-attachment small { color: var(--rz-text-secondary-color); }

@media (max-width: 767px) {
    .dashboard-layout-editor { grid-template-columns: 1fr; }
    .dashboard-editor-widget,
    .dashboard-editor-widget--small,
    .dashboard-editor-widget--medium,
    .dashboard-editor-widget--large,
    .dashboard-editor-widget--full {
        grid-column: 1;
        grid-template-columns: auto auto 1fr;
    }
    .dashboard-editor-widget .rz-dropdown,
    .dashboard-editor-widget .rz-numeric {
        grid-column: 2 / -1;
        width: 100% !important;
    }
    [data-dashboard-widget][data-widget-size] { grid-column: 1 / -1; }
}


/* Organisation-wide finance */
.finance-kpi-positive { color: var(--rz-success); }
.finance-kpi-negative { color: var(--rz-danger); }
@media (max-width: 600px) {
  .portal-responsive-grid .rz-cell-data { overflow-wrap: anywhere; }
  .rz-dialog-wrapper .rz-dialog { width: calc(100vw - 1rem) !important; max-height: calc(100vh - 1rem); }
}

.portal-editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0,0,0,.35);
  display: grid;
  place-items: center;
  padding: 1rem;
}
.portal-editor-panel {
  width: min(760px, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
}
/* Clear, inline explanations for unfamiliar fields and workflows. */
.portal-field-help {
    display: flex;
    align-items: flex-start;
    gap: .4rem;
    margin-top: .35rem;
    color: var(--rz-text-secondary-color);
    font-size: .875rem;
    line-height: 1.4;
}
.portal-field-help .rzi {
    flex: 0 0 auto;
    margin-top: .1rem;
    font-size: 1rem;
}
.portal-workflow-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding: .75rem;
    border: 1px solid var(--rz-base-300);
    border-radius: var(--rz-border-radius);
    background: var(--rz-base-50);
}
.portal-readonly-value {
    padding: .65rem .75rem;
    border: 1px solid var(--rz-base-300);
    border-radius: var(--rz-border-radius);
    background: var(--rz-base-100);
}

/* Keyboard, screen-reader and reduced-motion support shared by every portal screen. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 3px solid var(--rz-primary);
    outline-offset: 2px;
}

.rz-button:focus-visible,
.rz-inputtext:focus-visible,
.rz-dropdown:focus-within,
.rz-multiselect:focus-within,
.rz-datepicker:focus-within {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--rz-primary) 30%, transparent);
}

.rz-button:disabled,
.rz-state-disabled {
    cursor: not-allowed;
}

.portal-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (pointer: coarse) {
    .rz-button {
        min-height: 2.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
