.mud-button,
.mud-menu .mud-button,
.mud-tab {
    text-transform: none;
}

.mud-menu .mud-button:hover {
    background: transparent;
}

.mud-switch-span {
    height: auto !important;
}

.mud-switch-span .mud-switch-track {
    background-color: #7F7F91;
    border-radius: 32px;
    height: 20px;
    opacity: 1;
    width: 36px;
}

.mud-switch-base-medium.mud-switch-base {
    padding: 14px !important;
}

.mud-switch-base.mud-checked {
    transform: translateX(14px) !important;
}

.mud-switch-button {
    height: 16px !important;
    width: 16px !important;
}

.mud-switch-button .mud-switch-thumb,
.mud-switch-button .mud-switch-thumb-medium,
.mud-switch-button .mud-switch-thumb-small {
    background-color: white !important;
    height: 16px !important;
    width: 16px !important;
}

.mud-switch-base.mud-checked + .mud-switch-track {
    opacity: 1 !important;
}

.mud-picker-popover-paper:has(.app-date-range__preset-panel) {
    display: grid;
    width: max-content;
    grid-template-columns: 11.5rem auto;
    align-items: stretch;
    overflow: hidden;
}

.mud-picker-popover-paper:has(.app-date-range__preset-panel) > .mud-picker-container {
    grid-column: 2;
    grid-row: 1;
}

.mud-picker-popover-paper:has(.app-date-range__preset-panel) > .app-date-range__preset-actions {
    display: flex;
    width: 11.5rem;
    grid-column: 1;
    grid-row: 1;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0 !important;
}

.app-date-range__preset-panel {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    border-right: 1px solid var(--app-border);
    background: var(--app-surface-soft);
}

.app-date-range__preset-option {
    width: 100%;
    border-radius: 0.65rem;
    padding: 0.62rem 0.7rem;
    color: var(--app-text-soft);
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.app-date-range__preset-option:hover,
.app-date-range__preset-option:focus-visible {
    background: var(--app-hover-surface);
    color: var(--app-text);
    outline: none;
}

.app-date-range__preset-option:focus-visible {
    box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.45);
}

.app-date-range__preset-option.is-active {
    background: rgba(20, 184, 166, 0.14);
    color: var(--app-text);
    box-shadow: inset 0 0 0 1px rgba(20, 184, 166, 0.28);
}

.app-date-range__preset-option.is-active:focus-visible {
    box-shadow: inset 0 0 0 1px rgba(20, 184, 166, 0.28), 0 0 0 2px rgba(20, 184, 166, 0.45);
}

body.theme-light .app-date-range__preset-option.is-active {
    background: rgba(15, 118, 110, 0.12);
    box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.22);
}

body.theme-light .app-date-range__preset-option:focus-visible {
    box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.38);
}

body.theme-light .app-date-range__preset-option.is-active:focus-visible {
    box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.22), 0 0 0 2px rgba(15, 118, 110, 0.38);
}

@media (max-width: 760px) {
    .mud-picker-popover-paper:has(.app-date-range__preset-panel) {
        width: min(100vw - 1rem, 40rem);
        grid-template-columns: 1fr;
    }

    .mud-picker-popover-paper:has(.app-date-range__preset-panel) > .mud-picker-container,
    .mud-picker-popover-paper:has(.app-date-range__preset-panel) > .app-date-range__preset-actions {
        width: 100%;
        grid-column: 1;
    }

    .mud-picker-popover-paper:has(.app-date-range__preset-panel) > .mud-picker-container {
        grid-row: 1;
    }

    .mud-picker-popover-paper:has(.app-date-range__preset-panel) > .app-date-range__preset-actions {
        grid-row: 2;
    }

    .app-date-range__preset-panel {
        border-top: 1px solid var(--app-border);
        border-right: 0;
    }
}

#blazor-error-ui {
    background: rgba(248, 113, 113, 0.92);
    bottom: 1rem;
    color: white;
    display: none;
    left: 1rem;
    padding: 0.75rem 1rem;
    position: fixed;
    right: 1rem;
    border-radius: 1rem;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    float: right;
}

.mud-button-root .mud-button-label,
.mud-button-root .mud-button-label > .mud-typography {
    color: inherit !important;
}

.app-skeleton-group {
    width: 100%;
}

.app-skeleton-grid {
    display: grid;
    grid-template-columns: var(--app-skeleton-grid-template, minmax(0, 1fr));
    gap: var(--app-skeleton-grid-gap, 1rem);
    width: 100%;
}

.app-skeleton-card,
.app-skeleton-form,
.app-skeleton-table {
    width: 100%;
    border: 1px solid var(--app-skeleton-border);
    border-radius: var(--app-panel-radius);
    background: var(--app-skeleton-surface);
    box-shadow: var(--app-panel-shadow);
}

.app-skeleton-card,
.app-skeleton-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.15rem;
}

.app-skeleton-card.is-dense {
    gap: 0.75rem;
    padding: 0.95rem;
}

.app-skeleton-card__header,
.app-skeleton-form__header,
.app-skeleton-table__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.app-skeleton-card__heading,
.app-skeleton-form__header > div,
.app-skeleton-table__toolbar > div {
    display: grid;
    flex: 1 1 auto;
    gap: 0.55rem;
    min-width: 0;
}

.app-skeleton-card__avatar,
.app-skeleton-card__action {
    flex: 0 0 auto;
}

.app-skeleton-card__media {
    border-radius: calc(var(--app-panel-radius) - 4px);
}

.app-skeleton-card__lines,
.app-skeleton-form__field {
    display: grid;
    gap: 0.6rem;
}

.app-skeleton-card__footer,
.app-skeleton-form__actions,
.app-skeleton-table__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.app-skeleton-chip,
.app-skeleton-button,
.app-skeleton-field {
    border-radius: var(--app-control-radius);
}

.app-skeleton-form__grid {
    align-items: end;
}

.app-skeleton-table {
    overflow: hidden;
}

.app-skeleton-table__toolbar {
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--app-skeleton-border);
    background: var(--app-skeleton-surface-soft);
}

.app-skeleton-table__scroll {
    width: 100%;
    overflow-x: auto;
}

.app-skeleton-table__grid {
    display: grid;
    min-width: var(--app-skeleton-table-min-width, 42rem);
}

.app-skeleton-table__header-cell,
.app-skeleton-table__cell {
    display: flex;
    min-width: 0;
    align-items: center;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--app-skeleton-border);
}

.app-skeleton-table.is-dense .app-skeleton-table__header-cell,
.app-skeleton-table.is-dense .app-skeleton-table__cell {
    padding-block: 0.68rem;
}

.app-skeleton-table__header-cell {
    min-height: 2.65rem;
    background: var(--app-skeleton-surface-soft);
    color: var(--app-text-muted);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.app-skeleton-table__cell.is-end {
    justify-content: flex-end;
}

@media (max-width: 760px) {
    .app-skeleton-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .app-skeleton-card__header,
    .app-skeleton-form__header,
    .app-skeleton-table__toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .app-skeleton-card__action,
    .app-skeleton-form__actions,
    .app-skeleton-table__toolbar > .app-skeleton {
        width: 100% !important;
    }

    .app-skeleton-card__footer,
    .app-skeleton-form__actions {
        justify-content: stretch;
    }
}

.app-brand-mark {
    display: block;
    flex: 0 0 auto;
    height: 2.5rem;
    object-fit: contain;
    width: 2.5rem;
}

.app-auth-login-form,
.app-auth-login {
    min-height: 100vh;
}

.app-auth-login {
    background: var(--app-bg);
    color: var(--app-text);
}

.app-auth-login__container {
    align-items: center;
    display: flex;
    margin: 0 auto;
    max-width: 72rem;
    min-height: 100vh;
    padding: 2.5rem 1.5rem;
}

.app-auth-login__frame {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-panel-radius);
    box-shadow: var(--app-panel-shadow);
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1fr) minmax(22rem, 26.875rem);
    min-width: 0;
    padding: 1rem;
    width: 100%;
}

.app-auth-login__hero,
.app-auth-login__panel {
    border: 1px solid var(--app-border);
    border-radius: var(--app-panel-radius);
    min-width: 0;
}

.app-auth-login__hero {
    background: var(--app-surface-soft);
    overflow: hidden;
    padding: 2.25rem;
}

.app-auth-login__brand {
    align-items: center;
    background: rgba(20, 184, 166, 0.1);
    border: 1px solid rgba(45, 212, 191, 0.22);
    border-radius: 999px;
    color: var(--app-accent);
    display: inline-flex;
    gap: 0.65rem;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1;
    padding: 0.45rem 0.9rem 0.45rem 0.45rem;
    text-transform: uppercase;
}

.app-auth-login__brand-mark {
    border-radius: 0.8rem;
    box-shadow: 0 14px 32px rgba(2, 6, 23, 0.18);
    height: 2.35rem;
    width: 2.35rem;
}

.app-auth-login__hero h1 {
    color: var(--app-text);
    font-size: clamp(2rem, 3vw, 2.75rem);
    font-weight: 650;
    letter-spacing: -0.025em;
    line-height: 1.08;
    margin: 1.75rem 0 0;
    max-width: 36rem;
}

.app-auth-login__hero > p {
    color: var(--app-text-soft);
    font-size: 0.9375rem;
    line-height: 1.65;
    margin: 1rem 0 0;
    max-width: 38rem;
}

.app-auth-login__features {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 2.5rem;
}

.app-auth-login__feature {
    background: var(--app-surface-alt) !important;
    border: 1px solid var(--app-border);
    border-radius: var(--app-control-radius);
    color: var(--app-text);
    padding: 1rem;
}

.app-auth-login__feature-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1.2;
    text-transform: uppercase;
}

.app-auth-login__feature-label.is-control {
    color: #38bdf8;
}

.app-auth-login__feature-label.is-tenant {
    color: var(--app-accent);
}

.app-auth-login__feature-label.is-insight {
    color: #fb923c;
}

.app-auth-login__feature p {
    color: var(--app-text-soft);
    font-size: 0.88rem;
    line-height: 1.55;
    margin: 0.75rem 0 0;
}

.app-auth-login__form-region {
    align-items: center;
    display: flex;
    min-width: 0;
}

.app-auth-login__panel {
    background: var(--app-surface-strong) !important;
    box-shadow: var(--app-panel-shadow);
    padding: 1.75rem;
    width: 100%;
}

.app-auth-login__panel-header {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.app-auth-login__panel-header p {
    color: var(--app-text-muted);
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1.2;
    margin: 0;
    text-transform: uppercase;
}

.app-auth-login__panel-title {
    color: var(--app-text) !important;
    font-weight: 650 !important;
}

.app-auth-login__panel-header span {
    color: var(--app-text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.app-auth-login__field {
    min-width: 0;
}

.app-auth-login__recovery {
    display: flex;
    justify-content: flex-end;
    margin-top: -0.5rem;
}

.app-auth-login__recovery a {
    color: var(--app-accent);
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
}

.app-auth-login__recovery a:hover {
    text-decoration: underline;
}

.app-onboarding {
    background: var(--app-bg);
    color: var(--app-text);
    min-height: 100vh;
    padding: 2rem 1rem;
}

.app-onboarding__container {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(18rem, 0.68fr) minmax(0, 1fr);
    margin: 0 auto;
    max-width: 78rem;
    min-height: calc(100vh - 4rem);
}

.app-onboarding__hero,
.app-onboarding__panel,
.app-onboarding-expired {
    border: 1px solid var(--app-border);
    border-radius: var(--app-panel-radius);
    box-shadow: var(--app-panel-shadow);
}

.app-onboarding__hero {
    align-content: space-between;
    background:
        linear-gradient(160deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.72)),
        radial-gradient(circle at top left, rgba(45, 212, 191, 0.14), transparent 30%);
    display: grid;
    min-width: 0;
    overflow: hidden;
    padding: 2rem;
}

body.theme-light .app-onboarding__hero {
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 249, 0.82)),
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.12), transparent 30%);
}

.app-onboarding__brand {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.app-onboarding__brand-name,
.app-onboarding__brand-badge {
    align-items: center;
    border: 1px solid var(--app-border);
    border-radius: 999px;
    color: var(--app-text-soft);
    display: inline-flex;
    gap: 0.6rem;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}

.app-onboarding__brand-name {
    background: rgba(20, 184, 166, 0.12);
    border-color: rgba(45, 212, 191, 0.24);
    color: var(--app-accent);
    padding: 0.45rem 0.85rem 0.45rem 0.45rem;
}

.app-onboarding__brand-badge {
    padding: 0.7rem 0.85rem;
}

.app-onboarding__brand-mark {
    border-radius: 0.72rem;
    height: 2.1rem;
    width: 2.1rem;
}

.app-onboarding__headline {
    display: grid;
    gap: 1rem;
    margin: 4rem 0;
}

.app-onboarding__headline p,
.app-onboarding-step__header p,
.app-onboarding-expired p {
    color: var(--app-accent);
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1.2;
    margin: 0;
    text-transform: uppercase;
}

.app-onboarding__headline h1,
.app-onboarding-expired h1 {
    color: var(--app-text);
    font-size: clamp(2.1rem, 4vw, 3.35rem);
    font-weight: 950;
    line-height: 1.04;
    margin: 0;
}

.app-onboarding__headline span,
.app-onboarding-step__header span,
.app-onboarding-expired span {
    color: var(--app-text-soft);
    font-size: 1rem;
    line-height: 1.7;
}

.app-onboarding__signals {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.app-onboarding__signals span {
    align-items: center;
    background: var(--app-surface-alt);
    border: 1px solid var(--app-border);
    border-radius: 999px;
    color: var(--app-text-soft);
    display: inline-flex;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
    padding: 0.65rem 0.78rem;
}

.app-onboarding__panel {
    background: var(--app-surface-strong);
    min-width: 0;
    padding: 1rem;
}

.app-onboarding__hp {
    height: 0;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    width: 0;
}

.app-onboarding-stepper {
    background: transparent !important;
    box-shadow: none !important;
}

.app-onboarding-stepper .mud-stepper-nav {
    border-bottom: 1px solid var(--app-border);
    padding: 0.25rem 0.25rem 1rem;
}

.app-onboarding-stepper .mud-stepper-content {
    padding: 1rem 0.75rem 0;
}

.app-onboarding-stepper .mud-card-actions {
    border-top: 1px solid var(--app-border);
    margin-top: 0.85rem;
    padding: 0.85rem 0.75rem 0.25rem;
}

.app-onboarding-step {
    align-content: start;
    display: grid;
    gap: 1rem;
    min-height: 25rem;
}

.app-onboarding-step--company {
    gap: 0.85rem;
    min-height: 22rem;
}

.app-onboarding-step__header {
    display: grid;
    gap: 0.55rem;
    max-width: 40rem;
}

.app-onboarding-step__header h2 {
    color: var(--app-text);
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1.18;
    margin: 0;
}

.app-onboarding-step--company .app-onboarding-step__header {
    gap: 0.42rem;
}

.app-onboarding-step--company .app-onboarding-step__header span {
    line-height: 1.5;
}

.app-onboarding-form-grid {
    align-items: flex-start;
}

.app-onboarding-select-field {
    min-width: 0;
    position: relative;
}

.app-onboarding-select-option__flag {
    border-radius: 2px;
    margin: 0 !important;
}

.app-onboarding-select-option {
    align-items: center;
    display: inline-flex;
    gap: 0.55rem;
    min-width: 0;
}

.app-onboarding-password {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.app-onboarding-password__item {
    align-items: center;
    background: var(--app-surface-alt);
    border: 1px solid var(--app-border);
    border-radius: var(--app-control-radius);
    color: var(--app-text-muted);
    display: inline-flex;
    gap: 0.5rem;
    min-height: 2.85rem;
    padding: 0.75rem 0.85rem;
}

.app-onboarding-password__item.is-pass {
    background: rgba(20, 184, 166, 0.1);
    border-color: rgba(45, 212, 191, 0.24);
    color: var(--app-text);
}

.app-onboarding-summary {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.app-onboarding-summary div {
    background: var(--app-surface-alt);
    border: 1px solid var(--app-border);
    border-radius: var(--app-control-radius);
    display: grid;
    gap: 0.35rem;
    min-width: 0;
    padding: 1rem;
}

.app-onboarding-summary span {
    color: var(--app-text-muted);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.app-onboarding-summary strong {
    color: var(--app-text);
    font-size: 0.96rem;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.app-onboarding-confirmation {
    padding: 0;
}

.app-onboarding-confirmation-panel {
    background: var(--app-surface-alt);
    border: 1px solid var(--app-border);
    border-radius: var(--app-control-radius);
    display: grid;
    gap: 0.45rem;
    grid-template-columns: auto minmax(0, 1fr);
    padding: 0.75rem 0.85rem;
}

.app-onboarding-privacy-consent__copy {
    color: var(--app-text-soft);
    font-size: 0.9rem;
    font-weight: 650;
    line-height: 1.55;
    padding-top: 0.45rem;
}

.app-onboarding-privacy-consent__copy span {
    margin-right: 0.2rem;
}

.app-onboarding-privacy-consent__link {
    color: var(--app-accent);
    font-weight: 900;
    margin-right: 0.2rem;
    text-decoration: underline;
    text-underline-offset: 0.18rem;
}

.app-onboarding-privacy-consent__link:focus-visible {
    border-radius: 0.35rem;
    outline: 2px solid var(--app-accent);
    outline-offset: 0.18rem;
}

.app-onboarding-confirmation-panel__help {
    background: rgba(185, 28, 28, 0.10);
    border: 1px solid rgba(248, 113, 113, 0.28);
    border-radius: 0.5rem;
    color: #fca5a5;
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    grid-column: 2;
    line-height: 1.45;
    padding: 0.45rem 0.65rem;
}

.app-legal {
    background:
        radial-gradient(circle at 14% 12%, rgba(20, 184, 166, 0.12), transparent 26rem),
        linear-gradient(180deg, var(--app-bg), var(--app-surface));
    color: var(--app-text);
    min-height: 100vh;
    padding: 2rem 1rem;
}

.app-legal__container {
    display: grid;
    gap: 1rem;
    margin: 0 auto;
    max-width: 72rem;
}

.app-legal__hero,
.app-legal-card {
    border: 1px solid var(--app-border);
    border-radius: var(--app-panel-radius);
    box-shadow: var(--app-panel-shadow);
}

.app-legal__hero {
    background:
        linear-gradient(150deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.78)),
        radial-gradient(circle at top right, rgba(45, 212, 191, 0.16), transparent 28rem);
    display: grid;
    gap: 1rem;
    padding: 2rem;
}

body.theme-light .app-legal__hero {
    background:
        linear-gradient(150deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.88)),
        radial-gradient(circle at top right, rgba(20, 184, 166, 0.12), transparent 28rem);
}

.app-legal__brand {
    align-items: center;
    background: rgba(20, 184, 166, 0.1);
    border: 1px solid rgba(45, 212, 191, 0.24);
    border-radius: 999px;
    color: var(--app-accent);
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 900;
    gap: 0.6rem;
    justify-self: start;
    line-height: 1;
    padding: 0.45rem 0.85rem 0.45rem 0.45rem;
    text-decoration: none;
    text-transform: uppercase;
}

.app-legal__brand:focus-visible {
    outline: 2px solid var(--app-accent);
    outline-offset: 0.18rem;
}

.app-legal__brand-mark {
    border-radius: 0.72rem;
    height: 2.1rem;
    width: 2.1rem;
}

.app-legal__hero > p,
.app-legal-card > p:first-child {
    color: var(--app-accent);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    margin: 0;
    text-transform: uppercase;
}

.app-legal__hero h1 {
    color: var(--app-text);
    font-size: clamp(2.1rem, 5vw, 4rem);
    font-weight: 950;
    line-height: 1.02;
    margin: 0;
    max-width: 48rem;
}

.app-legal__hero > span {
    color: var(--app-text-soft);
    font-size: 1.03rem;
    line-height: 1.7;
    max-width: 52rem;
}

.app-legal__meta {
    align-items: center;
    background: var(--app-surface-alt);
    border: 1px solid var(--app-border);
    border-radius: var(--app-control-radius);
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-self: start;
    padding: 0.75rem 0.9rem;
}

.app-legal__meta strong {
    color: var(--app-text);
    font-size: 0.78rem;
    font-weight: 900;
}

.app-legal__meta span {
    color: var(--app-text-soft);
    font-size: 0.84rem;
    font-weight: 750;
}

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

.app-legal-card {
    background: var(--app-surface-strong);
    display: grid;
    gap: 0.65rem;
    padding: 1.35rem;
}

.app-legal-card h2 {
    color: var(--app-text);
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1.25;
    margin: 0;
}

.app-legal-card p,
.app-legal-card span {
    color: var(--app-text-soft);
    font-size: 0.94rem;
    line-height: 1.7;
    margin: 0;
}

.app-legal-card--contact {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.12), var(--app-surface-strong));
    grid-column: 1 / -1;
}

.app-legal-card--contact a {
    color: var(--app-accent);
    font-size: 1rem;
    font-weight: 900;
    justify-self: start;
    text-decoration: underline;
    text-underline-offset: 0.18rem;
}

.app-privacy-consent__container {
    max-width: 54rem;
}

.app-privacy-consent__hero {
    min-height: 21rem;
}

.app-privacy-consent__card {
    gap: 1rem;
}

.app-privacy-consent__notice-link {
    align-items: center;
    background: var(--app-surface-alt);
    border: 1px solid var(--app-border);
    border-radius: var(--app-control-radius);
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0.9rem 1rem;
}

.app-privacy-consent__notice-link span {
    color: var(--app-text-soft);
    font-size: 0.92rem;
    font-weight: 750;
}

.app-privacy-consent__notice-link a {
    color: var(--app-accent);
    font-weight: 900;
    text-decoration: underline;
    text-underline-offset: 0.18rem;
}

.app-privacy-consent__confirmation {
    margin: 0;
}

.app-privacy-consent__actions {
    display: flex;
    justify-content: flex-end;
}

.app-onboarding-actions {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    width: 100%;
}

.app-onboarding--expired {
    align-items: center;
    display: flex;
    justify-content: center;
}

.app-onboarding-expired {
    background: var(--app-surface-strong);
    display: grid;
    gap: 1rem;
    max-width: 36rem;
    padding: 2rem;
    text-align: center;
}

.app-onboarding-expired__mark {
    align-items: center;
    background: rgba(251, 146, 60, 0.13);
    border: 1px solid rgba(251, 146, 60, 0.24);
    border-radius: 999px;
    color: #fb923c;
    display: inline-flex;
    height: 4rem;
    justify-content: center;
    justify-self: center;
    width: 4rem;
}

.app-onboarding-expired__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 0.5rem;
}

.app-error-layout {
    min-height: 100vh;
    position: relative;
}

.app-error-layout__brand {
    align-items: center;
    color: var(--app-text);
    display: inline-flex;
    font-size: 0.9375rem;
    font-weight: 650;
    gap: 0.5rem;
    left: clamp(1rem, 3vw, 2.5rem);
    letter-spacing: -0.01em;
    position: absolute;
    top: clamp(1rem, 3vw, 2.25rem);
    z-index: 1;
}

.app-error-layout__brand-mark {
    display: block;
    height: 1.5rem;
    width: 1.5rem;
}

.app-error-state {
    align-items: center;
    background: var(--app-bg);
    color: var(--app-text);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    --app-error-tone: var(--app-accent);
    --app-error-soft: rgba(20, 184, 166, 0.12);
    --app-error-border: rgba(20, 184, 166, 0.28);
    --app-error-glow: rgba(20, 184, 166, 0.1);
}

.app-error-state__panel {
    background:
        radial-gradient(circle at top left, var(--app-error-glow), transparent 30%),
        var(--app-surface) !important;
    border: 1px solid var(--app-border);
    border-radius: var(--app-panel-radius);
    box-shadow: var(--app-panel-shadow);
    max-width: 42rem;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    text-align: center;
    width: 100%;
}

.app-error-state__visual {
    align-items: center;
    display: inline-grid;
    gap: 0.85rem;
    grid-template-columns: auto auto;
    justify-content: center;
}

.app-error-state__code {
    color: var(--app-error-tone);
    font-size: clamp(3rem, 9vw, 5.75rem);
    font-weight: 950;
    line-height: 0.9;
}

.app-error-state__icon {
    align-items: center;
    background: var(--app-error-soft);
    border: 1px solid var(--app-error-border);
    border-radius: 999px;
    color: var(--app-error-tone);
    display: inline-flex;
    height: 4rem;
    justify-content: center;
    width: 4rem;
}

.app-error-state__eyebrow {
    color: var(--app-text-muted);
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1.2;
    margin: 1.65rem 0 0;
    text-transform: uppercase;
}

.app-error-state__title {
    color: var(--app-text);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 950;
    line-height: 1.05;
    margin: 0.75rem 0 0;
}

.app-error-state__description {
    color: var(--app-text-soft);
    font-size: 1rem;
    line-height: 1.65;
    margin: 1rem auto 0;
    max-width: 34rem;
}

.app-error-state__details {
    margin-top: 1.25rem;
}

.app-error-state__request {
    align-items: center;
    background: var(--app-surface-soft);
    border: 1px solid var(--app-border);
    border-radius: var(--app-control-radius);
    color: var(--app-text-muted);
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    padding: 0.7rem 0.85rem;
}

.app-error-state__request code {
    color: var(--app-text);
    font-size: 0.82rem;
    overflow-wrap: anywhere;
}

.app-error-state__actions {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.75rem;
}

.app-error-state__primary-action {
    background: var(--app-accent) !important;
    color: #ffffff !important;
    box-shadow: 0 14px 24px rgba(20, 184, 166, 0.22) !important;
}

.app-error-state__primary-action:hover {
    background: #0f766e !important;
}

.app-error-state.is-warning {
    --app-error-tone: #f59e0b;
    --app-error-soft: rgba(245, 158, 11, 0.12);
    --app-error-border: rgba(245, 158, 11, 0.28);
    --app-error-glow: rgba(245, 158, 11, 0.1);
}

.app-error-state.is-info,
.app-error-state.is-neutral {
    --app-error-tone: var(--app-accent);
    --app-error-soft: rgba(20, 184, 166, 0.12);
    --app-error-border: rgba(20, 184, 166, 0.28);
    --app-error-glow: rgba(20, 184, 166, 0.1);
}

.app-error-state.is-danger {
    --app-error-tone: #ef4444;
    --app-error-soft: rgba(239, 68, 68, 0.12);
    --app-error-border: rgba(239, 68, 68, 0.28);
    --app-error-glow: rgba(239, 68, 68, 0.1);
}

.app-route-authorizing {
    display: flex;
    min-height: calc(100vh - 8rem);
    align-items: flex-start;
    justify-content: center;
    padding: clamp(4.5rem, 14vh, 9rem) 1rem 3rem;
    background: transparent;
    color: var(--app-text);
}

.app-route-authorizing__panel {
    display: grid;
    width: min(100%, 31rem);
    justify-items: center;
    gap: 1.1rem;
    padding: 0;
    border: 0;
    border-radius: var(--app-panel-radius);
    background: transparent;
    box-shadow: none;
    text-align: center;
}

body.theme-light .app-route-authorizing__panel {
    background: transparent;
}

.app-route-authorizing__motion {
    position: relative;
    display: grid;
    width: 8.4rem;
    height: 8.4rem;
    place-items: center;
}

.app-route-authorizing__glyph {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.app-route-authorizing__track,
.app-route-authorizing__arc {
    fill: none;
    stroke-width: 5.6;
}

.app-route-authorizing__track {
    stroke: var(--app-border-strong);
}

.app-route-authorizing__arc,
.app-route-authorizing__gateway {
    transform-box: view-box;
    transform-origin: 80px 80px;
}

.app-route-authorizing__arc {
    animation: app-route-authorizing-spin 1.65s cubic-bezier(0.65, 0, 0.35, 1) infinite;
    stroke-dasharray: 24 76;
    stroke-linecap: round;
    stroke-opacity: 0.78;
}

.app-route-authorizing__gateway {
    opacity: 0.76;
}

.app-route-authorizing__pulse,
.app-route-authorizing__inner-ring {
    fill: rgba(20, 184, 166, 0.055);
    stroke: rgba(125, 211, 252, 0.18);
    stroke-width: 1.5;
}

.app-route-authorizing__pulse {
    animation: app-route-authorizing-pulse-ring 2.8s ease-in-out infinite;
    transform-box: fill-box;
    transform-origin: center;
}

body.theme-light .app-route-authorizing__pulse,
body.theme-light .app-route-authorizing__inner-ring {
    fill: rgba(15, 118, 110, 0.04);
    stroke: rgba(15, 118, 110, 0.18);
}

.app-route-authorizing__signal {
    fill: none;
    opacity: 0.62;
    stroke: var(--app-text-muted);
    stroke-linecap: round;
    stroke-width: 3.2;
}

.app-route-authorizing__dot {
    fill: var(--app-accent);
    opacity: 0.72;
    transform-box: fill-box;
    transform-origin: center;
}

.app-route-authorizing__dot.is-second {
    fill: #fbbf24;
}

.app-route-authorizing__brand-mark {
    position: absolute;
    width: 2.65rem;
    height: 2.65rem;
    border-radius: 0.72rem;
    box-shadow: 0 12px 26px rgba(2, 6, 23, 0.26);
}

.app-route-authorizing__copy {
    display: grid;
    justify-items: center;
    gap: 0.18rem;
    text-align: center;
}

.app-route-authorizing__copy h1 {
    margin: 0;
    color: var(--app-text);
    font-size: 1.68rem;
    font-weight: 950;
    line-height: 1.16;
}

.app-route-authorizing__copy p:last-child {
    max-width: 28rem;
    margin: 0;
    color: var(--app-text-soft);
    font-size: 0.96rem;
    line-height: 1.42;
    text-align: center;
}

@media (max-width: 480px) {
    .app-route-authorizing {
        min-height: calc(100vh - 7rem);
        padding: clamp(3rem, 11vh, 5.25rem) 1rem 2rem;
    }

    .app-route-authorizing__panel {
        gap: 1rem;
    }

    .app-route-authorizing__motion {
        width: 7.7rem;
        height: 7.7rem;
    }

    .app-route-authorizing__copy h1 {
        font-size: 1.48rem;
    }
}

.app-startup-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(2, 6, 23, 0.64);
    backdrop-filter: blur(20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

body.theme-light .app-startup-overlay {
    background: rgba(241, 245, 249, 0.76);
}

.app-startup-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.app-startup-overlay__panel {
    width: min(100%, 28rem);
    padding: 1.75rem;
    border-radius: 1.75rem;
    border: 1px solid var(--app-border-strong);
    background: var(--app-surface-strong);
    box-shadow: 0 32px 72px var(--app-shadow);
    text-align: center;
}

.app-startup-overlay__badge {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #0891b2;
}

.app-startup-overlay__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    margin: 1.2rem 0 1rem;
}

.app-startup-overlay__mark span {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #14b8a6, #0891b2);
    box-shadow: 0 0 0 0.45rem rgba(20, 184, 166, 0.08);
    animation: app-startup-pulse 1.05s ease-in-out infinite;
}

.app-startup-overlay__mark span:nth-child(2) {
    animation-delay: 0.14s;
}

.app-startup-overlay__mark span:nth-child(3) {
    animation-delay: 0.28s;
}

.app-startup-overlay__title {
    margin: 0;
    color: var(--app-text);
    font-size: 1.4rem;
    font-weight: 900;
    line-height: 1.2;
}

.app-startup-overlay__message {
    margin: 0.7rem 0 0;
    color: var(--app-text-soft);
    font-size: 0.96rem;
    line-height: 1.6;
}

@keyframes app-startup-pulse {
    0%, 80%, 100% {
        transform: translateY(0) scale(0.9);
        opacity: 0.5;
    }

    40% {
        transform: translateY(-0.35rem) scale(1);
        opacity: 1;
    }
}

@keyframes app-route-authorizing-pulse-ring {
    0%, 100% {
        opacity: 0.34;
        transform: scale(0.95);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.02);
    }
}

@keyframes app-route-authorizing-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes appPulse {
    0%, 100% {
        opacity: 0.45;
    }

    50% {
        opacity: 1;
    }
}

.app-shell-frame {
    background: transparent;
    color: var(--app-text);
    min-height: 100vh;
}

.theme-light.app-shell-frame {
    background: transparent;
}

.app-drawer {
    background: var(--app-drawer-bg);
    border-right: 1px solid var(--app-border);
    box-shadow: 1px 0 0 rgba(255, 255, 255, 0.015);
}

.app-side-nav {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0.875rem;
}

.nav-hero {
    background: var(--app-surface-soft);
    border: 1px solid var(--app-border);
    border-left: 2px solid var(--app-accent);
    border-radius: var(--app-control-radius);
    color: var(--app-text);
    padding: 0.875rem 0.875rem 0.9rem;
}

.nav-hero__badge {
    color: var(--app-accent);
    font-size: 0.625rem;
    font-weight: 650;
    letter-spacing: 0.12em;
    line-height: 1.2;
    margin: 0;
    text-transform: uppercase;
}

.nav-hero__title {
    color: var(--app-text);
    font-size: 1.125rem;
    font-weight: 650;
    letter-spacing: -0.015em;
    line-height: 1.2;
    margin: 0.45rem 0 0;
}

.nav-hero__description {
    color: var(--app-text-soft);
    font-size: 0.75rem;
    line-height: 1.45;
    margin: 0.55rem 0 0;
}

.app-nav {
    margin-top: 0.875rem;
}

.app-nav .mud-nav-link {
    margin-bottom: 0.25rem;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--app-nav-link);
    font-weight: 600;
    min-height: 44px;
    padding: 0.6rem 0.75rem;
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.app-nav .mud-nav-link .mud-nav-link-text,
.app-nav .mud-nav-link .mud-icon-root {
    color: inherit;
}

.app-nav .mud-nav-link:hover {
    background: var(--app-hover-surface);
    border-color: color-mix(in srgb, var(--app-accent) 28%, var(--app-border));
    color: var(--app-nav-hover-text);
}

.app-nav .mud-nav-link.active,
.app-nav .mud-nav-link.active:hover {
    background: color-mix(in srgb, var(--app-accent) 10%, var(--app-surface));
    border-color: color-mix(in srgb, var(--app-accent) 28%, var(--app-border));
    box-shadow: inset 2px 0 0 var(--app-accent);
    color: var(--app-nav-active-text);
}

.app-nav .mud-nav-link.active .mud-icon-root {
    color: var(--app-accent);
}

.app-nav .mud-nav-group .mud-nav-link-text,
.app-nav .mud-nav-group .mud-nav-group-text,
.app-nav .mud-nav-group .mud-icon-root {
    color: inherit;
}

.app-nav .mud-nav-group {
    border: 0;
    border-radius: 0;
    color: var(--app-nav-hover-text);
    margin-bottom: 0.5rem;
    overflow: visible;
}

.app-nav .mud-nav-group > .mud-nav-link {
    margin-bottom: 0;
}

.app-nav .mud-nav-group > .mud-nav-link,
.app-nav .mud-nav-group > .mud-nav-link.active,
.app-nav .mud-nav-group > .mud-nav-link:hover {
    margin-left: 0;
    min-height: 48px;
}

.app-nav .mud-nav-group .mud-collapse-container .mud-nav-link {
    margin-left: 0;
    min-height: 44px;
}

.app-nav .mud-nav-group .mud-collapse-container {
    padding: 0.25rem 0.45rem 0.45rem 0.9rem;
}

.app-status-filter-select {
    min-width: 180px;
}

.mud-popover .app-status-filter-option.mud-list-item.mud-selected-item {
    background: transparent !important;
    color: var(--app-text-soft) !important;
}

.mud-popover .app-status-filter-option.mud-list-item.mud-selected-item:hover {
    background: var(--app-hover-surface) !important;
    color: var(--app-text) !important;
}

.tenant-switcher .mud-input-control {
    margin-top: 0;
}

.tenant-switcher .mud-input-slot {
    background: var(--app-surface);
}

.tenant-switcher__logo {
    background: var(--app-surface-soft);
    border: 1px solid var(--app-border);
    border-radius: 0.55rem;
    display: block;
    flex: 0 0 auto;
    height: 1.75rem;
    object-fit: contain;
    width: 1.75rem;
}

.compact-picker-group .mud-input-control {
    margin-top: 0 !important;
}

.compact-picker-group .mud-input-control .mud-input-label-inputcontrol,
.compact-picker-group .mud-input-control .mud-input-label-animated {
    top: 0;
}

.compact-picker-group .mud-input-control .mud-input-slot {
    margin-top: 0;
}

.app-topbar {
    background: var(--app-topbar-bg);
    border-color: var(--app-border) !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.015);
    padding-block: 0.4rem;
}

.app-topbar .mud-typography,
.app-topbar .mud-icon-root {
    color: var(--app-text) !important;
}

.topbar-brand {
    align-items: center;
    display: flex;
    gap: 0.5rem;
}

.topbar-brand__mark {
    display: block;
    flex: 0 0 auto;
    height: 1.4rem;
    width: 1.4rem;
}

.topbar-menu-button,
.topbar-menu-button.mud-icon-button {
    border: 1px solid var(--app-border);
    border-radius: 10px;
    color: var(--app-text);
    display: none;
    height: 42px;
    width: 42px;
}

.topbar-brand__title {
    color: var(--app-text);
    font-weight: 650;
    letter-spacing: -0.01em;
}

.topbar-meta {
    align-items: center;
    display: flex;
    gap: 0.55rem;
    margin-top: 0;
}

.language-trigger {
    align-items: center;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 10px;
    color: var(--app-text);
    cursor: pointer;
    display: inline-flex;
    gap: 0.6rem;
    min-height: 42px;
    padding: 0.3rem 0.65rem 0.3rem 0.4rem;
}

.language-trigger:disabled {
    cursor: wait;
    opacity: 0.7;
}

.language-trigger__flag {
    align-items: center;
    display: inline-flex;
    height: 2rem;
    justify-content: center;
    width: 2rem;
}

.language-trigger__meta {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
    text-align: left;
}

.language-trigger__label {
    color: var(--app-text-muted);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.language-trigger__value {
    color: var(--app-text);
    font-size: 0.8125rem;
    font-weight: 650;
}

.theme-toggle-button,
.theme-toggle-button.mud-icon-button {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 10px;
    color: var(--app-text);
    height: 42px;
    width: 42px;
}

.theme-toggle-button:hover,
.theme-toggle-button.mud-icon-button:hover {
    background: var(--app-hover-surface);
}

.language-option {
    align-items: center;
    display: inline-flex;
    gap: 0.7rem;
}

.language-option__flag {
    align-items: center;
    display: inline-flex;
    height: 1.25rem;
    justify-content: center;
    width: 1.5rem;
}

.language-option__text {
    font-weight: 600;
}

.profile-trigger {
    align-items: center;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 10px;
    color: var(--app-text);
    cursor: pointer;
    display: inline-flex;
    gap: 0.6rem;
    min-height: 42px;
    padding: 0.3rem 0.65rem 0.3rem 0.3rem;
}

.profile-trigger__avatar {
    align-items: center;
    border: 1px solid var(--app-border-strong);
    border-radius: 999px;
    color: var(--app-text);
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 700;
    height: 2rem;
    justify-content: center;
    width: 2.1rem;
}

.profile-trigger__meta {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    text-align: left;
}

.profile-trigger__name {
    font-size: 0.8125rem;
    font-weight: 650;
}

.profile-trigger__role {
    color: var(--app-text-muted);
    font-size: 0.625rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.reports-filter-panel {
    background: var(--app-surface-soft);
    border: 1px solid var(--app-border);
    border-radius: 1.35rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    padding: 0.85rem;
}

.reports-filter-grid {
    align-items: flex-end;
}

.reports-filter-panel .mud-grid-item {
    min-width: 0;
}

.reports-filter-panel .mud-input-control {
    width: 100%;
}

.reports-filter-panel .mud-input-label {
    color: var(--app-text-muted);
    font-size: 0.78rem;
    font-weight: 750;
    line-height: 1.2;
}

.reports-filter-control,
.reports-summary-search {
    border-radius: var(--app-control-radius);
}

.reports-filter-control.is-disabled {
    opacity: 0.68;
}

.reports-filter-action {
    align-self: flex-end;
    display: flex;
    margin-bottom: 4px;
    padding-top: 4px !important;
}

.reports-filter-action__inner {
    display: flex;
    width: 100%;
}

.reports-filter-action .compact-action,
.reports-filter-action .compact-action.mud-button-root {
    height: 40px;
    min-height: 40px;
}

.app-filter-panel {
    background: var(--app-surface-soft);
    border: 1px solid var(--app-border);
    border-radius: var(--app-panel-radius);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
    padding: 0.9rem;
}

.app-filter-panel__header {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 0.65rem;
}

.app-filter-panel__title {
    color: var(--app-text-muted);
    font-size: 0.74rem;
    font-weight: 650;
    letter-spacing: 0.12em;
    line-height: 1.2;
    margin: 0;
    text-transform: uppercase;
}

.app-filter-panel__clear,
.app-filter-panel__clear.mud-button-root {
    border-radius: var(--app-control-radius);
    min-height: 34px;
}

.app-filter-panel__clear:disabled,
.app-filter-panel__clear.mud-disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

.compact-action:focus-visible,
.compact-action.mud-button-root:focus-visible,
.theme-toggle-button:focus-visible,
.theme-toggle-button.mud-icon-button:focus-visible,
.app-filter-panel__clear:focus-visible,
.app-filter-panel__clear.mud-button-root:focus-visible,
.app-ledger-icon-action .mud-icon-button:focus-visible,
.insight-grid .app-options-cell .mud-icon-button:focus-visible {
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.32) !important;
    outline: none;
}

body.theme-light .compact-action:focus-visible,
body.theme-light .compact-action.mud-button-root:focus-visible,
body.theme-light .theme-toggle-button:focus-visible,
body.theme-light .theme-toggle-button.mud-icon-button:focus-visible,
body.theme-light .app-filter-panel__clear:focus-visible,
body.theme-light .app-filter-panel__clear.mud-button-root:focus-visible,
body.theme-light .app-ledger-icon-action .mud-icon-button:focus-visible,
body.theme-light .insight-grid .app-options-cell .mud-icon-button:focus-visible {
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.28) !important;
}

.app-filter-grid {
    align-items: flex-end;
}

.app-filter-grid .mud-grid-item {
    min-width: 0;
}

.app-filter-panel .mud-input-control {
    width: 100%;
}

.inventory-alert-filter__secondary {
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    margin-top: 0.65rem;
    max-width: 68rem;
    padding-top: 0.65rem;
}

.inventory-alert-filter__advanced-row {
    display: flex;
    justify-content: flex-start;
    margin-top: 0.65rem;
}

.inventory-alert-filter__advanced-toggle,
.inventory-alert-filter__advanced-toggle.mud-button-root {
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    color: var(--app-text);
    font-size: 0.76rem;
    font-weight: 700;
    min-height: 28px;
    padding-inline: 0.45rem 0.7rem;
}

.inventory-alert-filter__advanced-toggle:hover,
.inventory-alert-filter__advanced-toggle.mud-button-root:hover {
    background: rgba(148, 163, 184, 0.18);
    border-color: rgba(148, 163, 184, 0.34);
}

body.theme-light .inventory-alert-filter__secondary {
    border-top-color: rgba(148, 163, 184, 0.28);
}

body.theme-light .inventory-alert-filter__advanced-toggle,
body.theme-light .inventory-alert-filter__advanced-toggle.mud-button-root {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(148, 163, 184, 0.34);
}

.inventory-alerts-grid .inventory-alerts-grid__product {
    min-width: 16rem;
    width: 24%;
}

.inventory-alerts-grid .inventory-alerts-grid__location {
    min-width: 18rem;
    width: 26%;
}

.inventory-alerts-grid .inventory-alerts-grid__code {
    white-space: nowrap;
}

.app-date-range input[id$='-start']::placeholder,
.app-date-range input[id$='-end']::placeholder {
    color: var(--app-text);
    opacity: 1;
}

.app-metric-summary {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-panel-radius);
    box-shadow: var(--app-panel-shadow);
    color: var(--app-text);
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.app-metric-summary__header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem 1.1rem;
}

.app-metric-summary__title {
    color: var(--app-text);
    font-size: 0.9375rem;
    font-weight: 650;
    line-height: 1.35;
}

.app-metric-summary__description {
    color: var(--app-text-muted);
    font-size: 0.8125rem;
    line-height: 1.5;
}

.app-metric-summary__header-end {
    display: flex;
    flex: 0 0 auto;
    max-width: 100%;
}

.app-metric-summary__header-chip {
    background: var(--app-surface-strong);
    border: 1px solid var(--app-border);
    border-radius: 999px;
    color: var(--app-text-soft);
    flex: 0 0 auto;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    padding: 0.58rem 0.8rem;
}

.app-metric-summary__header-chip .mud-chip-content {
    color: inherit;
    padding-inline: 0 !important;
}

.app-metric-summary__grid {
    background: var(--app-border);
    display: grid;
    gap: 1px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.app-metric-summary.has-header .app-metric-summary__grid {
    border-top: 1px solid var(--app-border);
}

.app-metric-summary__item {
    background: var(--app-surface-soft);
    min-width: 0;
    padding: 0.9rem 1rem 1rem;
    position: relative;
}

.app-metric-summary__item::before {
    background: var(--metric-summary-accent, var(--app-accent));
    border-radius: 999px;
    content: "";
    display: block;
    height: 0.18rem;
    margin-bottom: 0.8rem;
    width: 2rem;
}

.app-metric-summary__title,
.app-metric-summary__description,
.app-metric-summary__label,
.app-metric-summary__value,
.app-metric-summary__meta {
    margin: 0 !important;
}

.app-metric-summary__item.is-accent,
.app-metric-summary__item.is-neutral {
    --metric-summary-accent: var(--app-accent);
}

.app-metric-summary__item.is-positive {
    --metric-summary-accent: #34d399;
}

.app-metric-summary__item.is-negative {
    --metric-summary-accent: #fb7185;
}

.app-metric-summary__item.is-warning {
    --metric-summary-accent: #f59e0b;
}

.app-metric-summary__item.is-info {
    --metric-summary-accent: #38bdf8;
}

.app-metric-summary__item.is-muted {
    --metric-summary-accent: var(--app-text-muted);
}

.app-metric-summary__item.is-interactive {
    cursor: pointer;
    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease;
}

.app-metric-summary__item.is-interactive:hover,
.app-metric-summary__item.is-interactive:focus-visible {
    background: var(--app-hover-surface);
    border-color: color-mix(in srgb, var(--metric-summary-accent) 55%, var(--app-border) 45%);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--metric-summary-accent) 18%, transparent);
    outline: none;
}

.app-metric-summary__label {
    color: var(--app-text-muted);
    display: block;
    font-size: 0.6875rem;
    font-weight: 650;
    letter-spacing: 0.09em;
    line-height: 1.3;
    text-transform: uppercase;
}

.app-metric-summary__value {
    color: var(--app-text);
    display: block;
    font-feature-settings: "tnum" 1, "lnum" 1;
    font-size: 1.25rem;
    font-variant-numeric: tabular-nums lining-nums;
    font-weight: 650;
    line-height: 1.15;
    margin-top: 0.45rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.app-metric-summary__meta {
    color: var(--app-text-soft);
    display: block;
    font-size: 0.75rem;
    line-height: 1.45;
    margin-top: 0.4rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.app-ledger-surface,
.app-dialog-surface {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-panel-radius);
    box-shadow: var(--app-panel-shadow);
    color: var(--app-text);
    min-width: 0;
}

.app-ledger-header {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.app-ledger-actions {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.app-ledger-header--date-range {
    align-items: flex-start;
}

.app-ledger-header--date-range > :first-child {
    min-width: 0;
}

.app-ledger-date-range {
    min-width: 0;
}

.app-ledger-date-range .app-date-range,
.app-ledger-date-range .mud-input-control {
    width: 100%;
}

.app-summary-grid {
    display: grid;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
    min-width: 0;
}

.app-summary-grid .app-metric-summary {
    height: 100%;
    margin-bottom: 0;
}

.billing-pricing-shell {
    align-items: stretch;
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.42fr);
}

.billing-pricing-status,
.billing-plan-stage {
    border: 1px solid var(--app-border);
    border-radius: 8px;
    min-width: 0;
}

.billing-pricing-status {
    background: color-mix(in srgb, var(--app-surface-alt) 82%, var(--app-surface) 18%);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.25rem;
}

.billing-pricing-status__headline {
    align-items: flex-start;
    display: flex;
    gap: 0.9rem;
}

.billing-pricing-status__headline h2,
.billing-plan-stage__header h2 {
    color: var(--app-text);
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1.15;
    margin: 0.2rem 0 0;
}

.billing-pricing-status__headline p:not(.app-dialog-eyebrow),
.billing-plan-stage__header p,
.billing-plan-card__header p,
.billing-plan-card__note,
.billing-trust-item p {
    color: var(--app-text-soft);
}

.billing-pricing-status__headline p:not(.app-dialog-eyebrow),
.billing-plan-stage__header p {
    line-height: 1.5;
    margin: 0.45rem 0 0;
}

.billing-status-icon {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    flex: 0 0 auto;
    height: 2.75rem;
    justify-content: center;
    width: 2.75rem;
}

.billing-status-icon.is-ok {
    background: color-mix(in srgb, #34d399 18%, transparent);
    color: #34d399;
}

.billing-status-icon.is-warning {
    background: color-mix(in srgb, #f59e0b 18%, transparent);
    color: #f59e0b;
}

.billing-pricing-facts {
    display: grid;
    gap: 0.75rem;
    margin: 0;
}

.billing-pricing-facts div {
    align-items: center;
    border-top: 1px solid var(--app-border);
    display: grid;
    column-gap: 0.75rem;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
    padding-top: 0.75rem;
}

.billing-pricing-facts div:first-child {
    border-top: 0;
    padding-top: 0;
}

.billing-pricing-facts dt {
    color: var(--app-text-muted);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
}

.billing-pricing-facts dd {
    color: var(--app-text);
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.25;
    margin: 0;
    min-width: 0;
    text-align: right;
}

.billing-pricing-facts__status {
    align-items: center;
    display: flex;
    justify-content: flex-end;
    justify-self: stretch;
    width: 100%;
}

.billing-pricing-facts__status .billing-status-chip {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    min-height: 1.55rem;
    min-width: 4.1rem;
    white-space: nowrap;
    width: auto !important;
}

.billing-pricing-facts__status .mud-chip-container {
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.billing-pricing-facts__status .billing-status-chip .mud-chip-content {
    font-size: 0.74rem;
    line-height: 1;
    padding-inline: 0.55rem;
}

.billing-trust-stack {
    display: grid;
    gap: 0.75rem;
    margin-top: auto;
}

.billing-trust-item {
    align-items: center;
    display: flex;
    gap: 0.65rem;
    min-height: 2rem;
}

.billing-trust-item span {
    align-items: center;
    background: color-mix(in srgb, var(--app-accent) 16%, transparent);
    border-radius: 8px;
    color: var(--app-accent);
    display: inline-flex;
    flex: 0 0 auto;
    height: 2rem;
    justify-content: center;
    width: 2rem;
}

.billing-trust-item p {
    font-size: 0.9rem;
    line-height: 1.32;
    margin: 0;
    padding-top: 0.02rem;
}

.billing-plan-stage {
    background: var(--app-surface);
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
}

.billing-plan-stage__header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.billing-plan-stage__header > p {
    max-width: 28rem;
    text-align: right;
}

.billing-plan-grid {
    align-items: stretch;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.billing-plan-card {
    background: color-mix(in srgb, var(--app-surface-alt) 76%, var(--app-surface) 24%);
    border: 1px solid var(--app-border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 28rem;
    min-width: 0;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
}

.billing-plan-card.is-recommended {
    border-color: color-mix(in srgb, var(--app-accent) 52%, var(--app-border) 48%);
    box-shadow: 0 18px 42px color-mix(in srgb, var(--app-accent) 18%, transparent);
}

.billing-plan-card.is-current {
    background: color-mix(in srgb, var(--app-surface-alt) 72%, var(--app-accent) 8%);
    border-color: color-mix(in srgb, var(--app-accent) 68%, var(--app-border) 32%);
    box-shadow: 0 18px 42px color-mix(in srgb, var(--app-accent) 14%, transparent);
}

.billing-plan-card.is-disabled {
    opacity: 0.72;
}

.billing-plan-card__corner {
    align-items: center;
    color: #ffffff;
    display: flex;
    height: 4.75rem;
    justify-content: center;
    position: absolute;
    right: 0;
    top: 0;
    width: 4.75rem;
    z-index: 1;
    pointer-events: none;
}

.billing-plan-card__corner::before {
    border-left: 4.75rem solid transparent;
    border-top: 4.75rem solid var(--app-accent);
    content: "";
    position: absolute;
    right: 0;
    top: 0;
}

.billing-plan-card__corner-icon {
    align-items: center;
    background: color-mix(in srgb, #ffffff 92%, var(--app-accent) 8%);
    border: 1px solid color-mix(in srgb, #ffffff 72%, var(--app-accent) 28%);
    border-radius: 999px;
    box-shadow: 0 10px 24px color-mix(in srgb, #0f172a 22%, transparent);
    color: color-mix(in srgb, var(--app-accent) 62%, #0f172a 38%);
    display: inline-flex;
    height: 1.9rem;
    justify-content: center;
    position: absolute;
    right: 0.48rem;
    top: 0.48rem;
    width: 1.9rem;
    z-index: 2;
}

.billing-plan-card__corner-icon .mud-icon-root {
    color: currentColor;
    display: block;
    height: 1.05rem;
    width: 1.05rem;
}

.billing-plan-card__header {
    display: grid;
    gap: 0.7rem;
}

.billing-plan-card__header > p:first-child {
    color: var(--app-text);
    font-size: 0.84rem;
    font-weight: 900;
    line-height: 1.2;
    margin: 0;
    text-transform: uppercase;
}

.billing-plan-card__header > p:last-child {
    font-size: 0.95rem;
    line-height: 1.45;
    margin: 0;
}

.billing-price-lockup {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
}

.billing-price-main {
    align-items: baseline;
    display: flex;
    gap: 0.5rem;
    min-width: 0;
    white-space: nowrap;
}

.billing-price-main span {
    color: var(--app-text);
    font-size: clamp(1.9rem, 2.6vw, 2.45rem);
    font-weight: 950;
    letter-spacing: 0;
    line-height: 1;
    min-width: 0;
}

.billing-price-main small {
    color: var(--app-text-muted);
    font-size: clamp(0.85rem, 1.05vw, 0.98rem);
    font-weight: 900;
    letter-spacing: 0.02em;
    line-height: 1;
}

.billing-price-lockup > p {
    color: var(--app-text-muted);
    font-size: 0.9rem;
    font-weight: 850;
    line-height: 1.2;
    margin: 0;
}

.billing-plan-features {
    display: grid;
    gap: 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.billing-plan-features li {
    align-items: flex-start;
    color: var(--app-text-soft);
    display: flex;
    font-size: 0.92rem;
    gap: 0.55rem;
    line-height: 1.35;
}

.billing-plan-features .mud-icon-root {
    color: var(--app-accent);
    flex: 0 0 auto;
    margin-top: 0.08rem;
}

.billing-plan-card__action {
    margin-top: auto;
    width: 100%;
}

.billing-plan-card__note {
    font-size: 0.84rem;
    line-height: 1.35;
    margin: -0.45rem 0 0;
    text-align: center;
}

.billing-history-section {
    border: 1px solid var(--app-border);
    border-radius: 8px;
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
}

.billing-return-page {
    align-items: flex-start;
    background: var(--app-bg);
    color: var(--app-text);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: clamp(4.5rem, 12vh, 7rem) 1rem 3rem;
}

.billing-return-panel {
    --billing-return-tone: var(--app-accent);
    --billing-return-soft: rgba(20, 184, 166, 0.12);
    --billing-return-border: rgba(20, 184, 166, 0.28);
    --billing-return-glow: rgba(20, 184, 166, 0.1);
    background:
        radial-gradient(circle at top left, var(--billing-return-glow), transparent 30%),
        var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: var(--app-panel-shadow);
    max-width: 46rem;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    text-align: center;
    width: 100%;
}

.billing-return-panel.is-success {
    --billing-return-tone: #10b981;
    --billing-return-soft: rgba(16, 185, 129, 0.12);
    --billing-return-border: rgba(16, 185, 129, 0.28);
    --billing-return-glow: rgba(16, 185, 129, 0.1);
}

.billing-return-panel.is-pending {
    --billing-return-tone: #f59e0b;
    --billing-return-soft: rgba(245, 158, 11, 0.12);
    --billing-return-border: rgba(245, 158, 11, 0.28);
    --billing-return-glow: rgba(245, 158, 11, 0.1);
}

.billing-return-panel.is-danger {
    --billing-return-tone: #ef4444;
    --billing-return-soft: rgba(239, 68, 68, 0.12);
    --billing-return-border: rgba(239, 68, 68, 0.28);
    --billing-return-glow: rgba(239, 68, 68, 0.1);
}

.billing-return-mark {
    align-items: center;
    background: var(--billing-return-soft);
    border: 1px solid var(--billing-return-border);
    border-radius: 999px;
    color: var(--billing-return-tone);
    display: inline-flex;
    height: 4rem;
    justify-content: center;
    width: 4rem;
}

.billing-return-title {
    color: var(--app-text);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 950;
    letter-spacing: 0;
    line-height: 1.05;
    margin: 0.75rem 0 0;
}

.billing-return-description {
    color: var(--app-text-soft);
    font-size: 1rem;
    line-height: 1.65;
    margin: 1rem auto 0;
    max-width: 34rem;
}

.billing-return-alert {
    margin-top: 1.25rem;
}

.billing-return-loading {
    align-items: center;
    background: var(--app-surface-alt);
    border: 1px dashed var(--app-border);
    border-radius: 8px;
    color: var(--app-text-soft);
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    margin-top: 1.5rem;
    min-height: 5.25rem;
    padding: 1rem;
}

.billing-return-loading p {
    font-size: 0.92rem;
    line-height: 1.45;
    margin: 0;
}

.billing-return-facts {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 1.5rem 0 0;
}

.billing-return-facts div {
    background: var(--app-surface-alt);
    border: 1px solid var(--app-border);
    border-radius: 8px;
    min-width: 0;
    padding: 0.95rem;
}

.billing-return-facts dt {
    color: var(--app-text-muted);
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1.2;
    text-transform: uppercase;
}

.billing-return-facts dd {
    color: var(--app-text);
    font-size: 0.96rem;
    font-weight: 850;
    line-height: 1.35;
    margin: 0.35rem 0 0;
    overflow-wrap: anywhere;
}

.billing-return-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.75rem;
}

.kpi-ledger-surface .app-ledger-header {
    gap: 0.45rem;
    margin-bottom: 0.8rem;
}

.kpi-ledger-surface .app-ledger-title {
    font-size: 1.28rem;
}

.kpi-ledger-surface .app-ledger-description {
    font-size: 0.8rem;
    line-height: 1.35;
    margin-top: 0.28rem;
}

.kpi-ledger-surface .app-filter-panel {
    padding: 0.78rem;
}

.kpi-ledger-surface .app-filter-panel__header {
    margin-bottom: 0.45rem;
}

.kpi-ledger-surface .app-filter-panel__title {
    font-size: 0.68rem;
}

.kpi-filter-actions__compare {
    align-items: center;
    background: color-mix(in srgb, var(--app-surface-alt) 72%, transparent);
    border: 1px solid var(--app-border);
    border-radius: var(--app-control-radius);
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    min-height: 44px;
    min-width: min(100%, 18.5rem);
    padding: 0.34rem 0.58rem 0.34rem 0.78rem;
}

.kpi-filter-actions__compare-text {
    display: grid;
    gap: 0.16rem;
    min-width: 0;
}

.kpi-filter-actions__compare-text > span {
    color: var(--app-text);
    font-size: 0.8rem;
    font-weight: 750;
    line-height: 1.25;
}

.kpi-filter-actions__compare-text > small {
    color: var(--app-text-muted);
    font-size: 0.68rem;
    font-weight: 650;
    line-height: 1.2;
}

.kpi-filter-actions__compare .mud-input-control {
    flex: 0 0 auto;
    width: auto;
}

.kpi-filter-actions {
    align-items: center;
    border-top: 1px solid var(--app-border);
    display: flex;
    gap: 0.85rem;
    justify-content: space-between;
    margin-top: 0.9rem;
    padding-top: 0.9rem;
}

.kpi-filter-actions__submit,
.kpi-filter-actions__submit.mud-button-root {
    min-width: 8.5rem;
}

.kpi-summary-grid {
    gap: 0.85rem;
    margin-bottom: 0.85rem;
}

.kpi-summary-grid .app-metric-summary__header {
    gap: 0.7rem;
    padding: 0.78rem 0.9rem;
}

.kpi-summary-grid .app-metric-summary__title {
    font-size: 0.92rem;
}

.kpi-summary-grid .app-metric-summary__description {
    display: none;
    font-size: 0.76rem;
    line-height: 1.35;
}

.kpi-summary-grid .app-metric-summary__item {
    padding: 0.62rem 0.78rem 0.68rem;
}

.kpi-summary-grid .app-metric-summary__item::before {
    height: 0.14rem;
    margin-bottom: 0.54rem;
    width: 1.45rem;
}

.kpi-summary-grid .app-metric-summary__label {
    font-size: 0.66rem;
}

.kpi-summary-grid .app-metric-summary__value {
    font-size: 1.04rem;
    margin-top: 0.32rem;
}

.kpi-summary-grid .app-metric-summary__meta {
    font-size: 0.74rem;
    line-height: 1.3;
    margin-top: 0.28rem;
    white-space: normal;
}

.kpi-comparison-strip {
    --kpi-chart-positive: #34d399;
    --kpi-chart-negative: #fb7185;
    --kpi-chart-warning: #f59e0b;
    --kpi-chart-muted: #94a3b8;
    background: var(--app-surface-soft);
    border: 1px solid var(--app-border);
    border-radius: var(--app-panel-radius);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    color: var(--app-text);
    display: grid;
    gap: 0.6rem;
    margin-bottom: 0.85rem;
    min-width: 0;
    padding: 0.68rem;
}

.kpi-comparison-strip__header {
    align-items: flex-start;
    display: flex;
    gap: 0.9rem;
    justify-content: space-between;
    min-width: 0;
}

.kpi-comparison-strip__title,
.kpi-comparison-strip__description,
.app-info-card p,
.app-info-card span {
    margin: 0;
}

.kpi-comparison-strip__title {
    color: var(--app-text);
    font-size: 0.92rem;
    font-weight: 900;
    line-height: 1.25;
}

.kpi-comparison-strip__description {
    color: var(--app-text-muted);
    font-size: 0.76rem;
    font-weight: 650;
    line-height: 1.35;
    margin-top: 0.22rem;
}

.kpi-comparison-strip__header > span {
    background: var(--app-surface-strong);
    border: 1px solid var(--app-border);
    border-radius: 999px;
    color: var(--app-text-soft);
    flex: 0 0 auto;
    font-size: 0.68rem;
    font-weight: 850;
    line-height: 1;
    padding: 0.45rem 0.62rem;
    white-space: nowrap;
}

.kpi-comparison-strip__grid {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-width: 0;
}

.app-info-card {
    --app-info-card-color: var(--app-text-muted);
    background: var(--app-surface-alt);
    border: 1px solid var(--app-border);
    border-left: 3px solid var(--app-info-card-color);
    border-radius: calc(var(--app-panel-radius) - 6px);
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    min-width: 0;
    padding: 0.5rem 0.58rem;
}

.app-info-card.is-positive {
    --app-info-card-color: var(--kpi-chart-positive, #34d399);
}

.app-info-card.is-negative {
    --app-info-card-color: var(--kpi-chart-negative, #fb7185);
}

.app-info-card.is-warning {
    --app-info-card-color: var(--kpi-chart-warning, #f59e0b);
}

.app-info-card.is-muted {
    --app-info-card-color: var(--kpi-chart-muted, #94a3b8);
}

.app-info-card.is-accent {
    --app-info-card-color: var(--app-accent);
}

.app-info-card p {
    color: var(--app-text-muted);
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.2;
    text-transform: uppercase;
}

.app-info-card strong {
    color: var(--app-text);
    display: block;
    font-size: 0.9rem;
    font-weight: 950;
    line-height: 1.12;
    margin-top: 0.2rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-info-card span {
    color: var(--app-text-soft);
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.3;
}

.summary-metric-strip-skeleton {
    background: var(--app-surface-soft);
    border: 1px solid var(--app-border);
    border-radius: var(--app-panel-radius);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    display: grid;
    gap: 0.6rem;
    margin-bottom: 0.85rem;
    min-width: 0;
    padding: 0.68rem;
    pointer-events: none;
}

.summary-metric-strip-skeleton__header {
    align-items: flex-start;
    display: flex;
    gap: 0.9rem;
    justify-content: space-between;
    min-width: 0;
}

.summary-metric-strip-skeleton__header > div {
    min-width: 0;
    width: min(18rem, 100%);
}

.summary-metric-strip-skeleton__grid {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-width: 0;
}

.summary-metric-strip-skeleton__item {
    background: var(--app-surface-alt);
    border: 1px solid var(--app-border);
    border-left: 3px solid rgba(148, 163, 184, 0.34);
    border-radius: calc(var(--app-panel-radius) - 6px);
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    min-width: 0;
    padding: 0.5rem 0.58rem;
}

.summary-metric-strip-skeleton__line,
.summary-metric-strip-skeleton__pill {
    animation: ui-skeleton-pulse 1.4s ease-in-out infinite;
    background: linear-gradient(90deg, rgba(148, 163, 184, 0.14), rgba(148, 163, 184, 0.28), rgba(148, 163, 184, 0.14));
    background-size: 220% 100%;
    border-radius: 999px;
    display: block;
}

.summary-metric-strip-skeleton__line.is-title {
    height: 0.82rem;
    width: min(12rem, 68%);
}

.summary-metric-strip-skeleton__line.is-description {
    height: 0.62rem;
    margin-top: 0.38rem;
    width: min(18rem, 92%);
}

.summary-metric-strip-skeleton__pill {
    height: 1.45rem;
    width: 7.5rem;
}

.summary-metric-strip-skeleton__line.is-label {
    height: 0.5rem;
    width: 46%;
}

.summary-metric-strip-skeleton__line.is-value {
    height: 0.9rem;
    margin-top: 0.42rem;
    width: 58%;
}

.summary-metric-strip-skeleton__line.is-meta {
    height: 0.56rem;
    width: 82%;
}

@keyframes ui-skeleton-pulse {
    0% {
        background-position: 120% 0;
    }

    100% {
        background-position: -120% 0;
    }
}

.kpi-dashboard-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
}

.kpi-dashboard-grid .is-wide {
    grid-column: auto;
}

.kpi-chart-card {
    --kpi-chart-accent: var(--app-accent);
    --kpi-chart-positive: var(--app-positive);
    --kpi-chart-negative: var(--app-negative);
    --kpi-chart-info: var(--app-info);
    --kpi-chart-warning: var(--app-warning);
    --kpi-chart-muted: var(--app-text-muted);
    background: var(--app-surface-soft);
    border: 1px solid var(--app-border);
    border-radius: var(--app-panel-radius);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    color: var(--app-text);
    display: flex;
    flex-direction: column;
    gap: 0.72rem;
    min-height: 18rem;
    min-width: 0;
    overflow: hidden;
    padding: 0.86rem;
}

.kpi-chart-card__header {
    align-items: flex-start;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    min-width: 0;
}

.kpi-chart-card__heading {
    display: grid;
    gap: 0.22rem;
    min-width: 0;
}

.kpi-chart-card__title,
.kpi-chart-card__description,
.kpi-chart-card__empty p,
.kpi-ranking-list__label,
.kpi-expense-split__label,
.kpi-expense-split__summary p,
.kpi-budget-list__label,
.kpi-risk-panel__score p {
    margin: 0;
}

.kpi-chart-card__title {
    color: var(--app-text);
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1.25;
}

.kpi-chart-card__description {
    color: var(--app-text-muted);
    font-size: 0.75rem;
    line-height: 1.34;
}

.kpi-chart-card__badge {
    background: var(--app-surface-strong);
    border: 1px solid var(--app-border);
    border-radius: 999px;
    color: var(--app-text-soft);
    flex: 0 0 auto;
    font-size: 0.66rem;
    font-weight: 850;
    line-height: 1;
    max-width: 12rem;
    overflow: hidden;
    padding: 0.42rem 0.58rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kpi-chart-card__empty {
    align-items: center;
    background: var(--app-surface-alt);
    border: 1px dashed var(--app-border);
    border-radius: calc(var(--app-panel-radius) - 4px);
    color: var(--app-text-muted);
    display: flex;
    flex: 1 1 auto;
    justify-content: center;
    min-height: 9.5rem;
    padding: 1rem;
    text-align: center;
}

.kpi-chart-card__empty p {
    font-size: 0.78rem;
    font-weight: 750;
    line-height: 1.45;
}

.kpi-chart-stage {
    min-height: 10.85rem;
    min-width: 0;
    position: relative;
    width: 100%;
}

.kpi-svg-chart {
    aspect-ratio: 16 / 5.2;
    display: block;
    min-height: 10.85rem;
    overflow: visible;
    width: 100%;
}

.kpi-svg-chart__grid {
    pointer-events: none;
    stroke: var(--app-border-strong);
    stroke-width: 1;
}

.kpi-svg-chart__baseline {
    pointer-events: none;
    stroke: color-mix(in srgb, var(--app-text-muted) 66%, var(--app-border) 34%);
    stroke-width: 1.25;
}

.kpi-svg-chart__axis-label {
    fill: var(--app-text-muted);
    font-size: 0.62rem;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    pointer-events: none;
}

.kpi-svg-chart__x-label {
    fill: var(--app-text-muted);
    font-size: 0.64rem;
    font-weight: 600;
    pointer-events: none;
}

.kpi-svg-chart__line {
    fill: none;
    pointer-events: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.25;
    vector-effect: non-scaling-stroke;
}

.kpi-svg-chart__line.is-net {
    stroke: var(--app-text);
}

.kpi-svg-chart__line.is-dashed {
    stroke-dasharray: 6 4;
}

.kpi-svg-chart__point {
    fill: var(--app-surface-strong);
    pointer-events: none;
    stroke-width: 1.5;
    vector-effect: non-scaling-stroke;
}

.kpi-svg-chart__point.is-net {
    stroke: var(--app-text);
}

.kpi-svg-chart__bar {
    opacity: 0.92;
    pointer-events: none;
}

.kpi-svg-chart__bar.is-positive-flow {
    fill: var(--kpi-chart-positive);
}

.kpi-svg-chart__bar.is-negative-flow {
    fill: var(--kpi-chart-negative);
}

.kpi-chart-tooltip-layer {
    inset: 0;
    pointer-events: none;
    position: absolute;
    z-index: 4;
}

.kpi-chart-tooltip-trigger {
    --tooltip-guide-left: 50%;
    --tooltip-top: 8%;
    bottom: 0;
    cursor: pointer;
    pointer-events: auto;
    position: absolute;
    top: 0;
}

.kpi-chart-tooltip-trigger:focus-visible {
    outline: 2px solid var(--app-accent);
    outline-offset: -2px;
}

.kpi-chart-tooltip__guide {
    background: color-mix(in srgb, var(--app-text-muted) 42%, transparent);
    bottom: 0.65rem;
    left: var(--tooltip-guide-left, 50%);
    opacity: 0;
    position: absolute;
    top: 0.15rem;
    transition: opacity 140ms ease;
    width: 1px;
}

.kpi-chart-tooltip {
    background: var(--app-surface-strong);
    border: 1px solid color-mix(in srgb, var(--app-border-strong) 82%, var(--app-text-muted) 18%);
    border-radius: 8px;
    box-shadow: 0 16px 38px color-mix(in srgb, var(--app-shadow) 70%, transparent);
    color: var(--app-text);
    display: grid;
    gap: 0.42rem;
    left: var(--tooltip-guide-left, 50%);
    max-width: min(13.75rem, calc(100vw - 2rem));
    opacity: 0;
    padding: 0.62rem 0.68rem;
    pointer-events: none;
    position: absolute;
    top: clamp(0.35rem, var(--tooltip-top, 8%), calc(100% - 7rem));
    transform: translateX(-50%);
    transition: opacity 140ms ease, transform 140ms ease;
    width: max-content;
    z-index: 5;
}

.kpi-chart-tooltip-trigger.is-start .kpi-chart-tooltip {
    left: 0;
    transform: translateX(0);
}

.kpi-chart-tooltip-trigger.is-end .kpi-chart-tooltip {
    left: auto;
    right: 0;
    transform: translateX(0);
}

.kpi-chart-tooltip-trigger:hover .kpi-chart-tooltip,
.kpi-chart-tooltip-trigger:focus .kpi-chart-tooltip,
.kpi-chart-tooltip-trigger:hover .kpi-chart-tooltip__guide,
.kpi-chart-tooltip-trigger:focus .kpi-chart-tooltip__guide {
    opacity: 1;
}

.kpi-chart-tooltip-trigger:hover .kpi-chart-tooltip,
.kpi-chart-tooltip-trigger:focus .kpi-chart-tooltip {
    transform: translateX(-50%) translateY(-0.12rem);
}

.kpi-chart-tooltip-trigger.is-start:hover .kpi-chart-tooltip,
.kpi-chart-tooltip-trigger.is-start:focus .kpi-chart-tooltip,
.kpi-chart-tooltip-trigger.is-end:hover .kpi-chart-tooltip,
.kpi-chart-tooltip-trigger.is-end:focus .kpi-chart-tooltip {
    transform: translateX(0) translateY(-0.12rem);
}

.kpi-chart-tooltip__title,
.kpi-chart-tooltip__row span,
.kpi-chart-tooltip__row strong {
    line-height: 1.2;
    margin: 0;
}

.kpi-chart-tooltip__title {
    color: var(--app-text);
    font-size: 0.72rem;
    font-weight: 900;
}

.kpi-chart-tooltip__row {
    align-items: center;
    display: grid;
    gap: 0.85rem;
    grid-template-columns: minmax(5.4rem, 1fr) auto;
    min-width: 12.25rem;
}

.kpi-chart-tooltip__row span {
    align-items: center;
    color: var(--app-text-soft);
    display: inline-flex;
    font-size: 0.68rem;
    font-weight: 760;
    gap: 0.38rem;
    min-width: 0;
    white-space: nowrap;
}

.kpi-chart-tooltip__row strong {
    color: var(--app-text);
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
    font-weight: 920;
    justify-self: end;
    white-space: nowrap;
}

.kpi-chart-tooltip__row.is-net {
    border-top: 1px solid color-mix(in srgb, var(--app-border) 72%, transparent);
    padding-top: 0.42rem;
}

.kpi-chart-tooltip__row i {
    border-radius: 999px;
    display: inline-block;
    height: 0.44rem;
    width: 0.44rem;
}

.kpi-chart-tooltip__row i.is-positive-flow {
    background: var(--kpi-chart-positive);
}

.kpi-chart-tooltip__row i.is-negative-flow {
    background: var(--kpi-chart-negative);
}

.kpi-chart-tooltip__row i.is-net {
    background: var(--app-text);
    border-radius: 0;
    height: 2px;
    width: 0.8rem;
}

.kpi-chart-tooltip__row.is-net.is-positive strong {
    color: var(--kpi-chart-positive);
}

.kpi-chart-tooltip__row.is-net.is-negative strong {
    color: var(--kpi-chart-negative);
}

.kpi-chart-legend {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.85rem;
}

.kpi-chart-legend span {
    align-items: center;
    color: var(--app-text-soft);
    display: inline-flex;
    font-size: 0.7rem;
    font-weight: 750;
    gap: 0.34rem;
    line-height: 1.2;
}

.kpi-chart-legend i {
    border-radius: 999px;
    display: inline-block;
    height: 0.55rem;
    width: 0.55rem;
}

.kpi-chart-legend i.is-positive-flow {
    background: var(--kpi-chart-positive);
}

.kpi-chart-legend i.is-negative-flow {
    background: var(--kpi-chart-negative);
}

.kpi-chart-legend i.is-net {
    background: var(--app-text);
    border-radius: 0;
    height: 2px;
    width: 1rem;
}

.kpi-chart-legend.is-net-dashed i.is-net {
    background: repeating-linear-gradient(to right, var(--app-text) 0 0.25rem, transparent 0.25rem 0.42rem);
}

.kpi-chart-data {
    border-top: 1px solid var(--app-border);
    margin-top: auto;
    padding-top: 0.62rem;
}

.kpi-chart-data summary {
    color: var(--app-accent);
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 850;
    list-style-position: inside;
    width: fit-content;
}

.kpi-chart-data summary:focus-visible {
    border-radius: 4px;
    outline: 2px solid var(--app-accent);
    outline-offset: 3px;
}

.kpi-chart-data__scroll {
    margin-top: 0.6rem;
    overflow-x: auto;
}

.kpi-chart-data table {
    border-collapse: collapse;
    font-size: 0.72rem;
    min-width: 28rem;
    width: 100%;
}

.kpi-chart-data th,
.kpi-chart-data td {
    border-bottom: 1px solid var(--app-border);
    color: var(--app-text-soft);
    padding: 0.42rem 0.5rem;
    text-align: right;
    white-space: nowrap;
}

.kpi-chart-data thead th {
    color: var(--app-text-muted);
    font-size: 0.66rem;
    font-weight: 850;
}

.kpi-chart-data th:first-child,
.kpi-chart-data tbody th {
    color: var(--app-text);
    text-align: left;
}

.kpi-chart-data td {
    font-variant-numeric: tabular-nums;
}

.kpi-ranking-list,
.kpi-expense-split__list,
.kpi-budget-list {
    display: grid;
    gap: 0.55rem;
}

.kpi-ranking-list__item,
.kpi-expense-split__item,
.kpi-budget-list__item,
.kpi-risk-matrix__row {
    --kpi-row-color: var(--kpi-chart-accent);
    background: var(--app-surface-alt);
    border: 1px solid var(--app-border);
    border-radius: calc(var(--app-panel-radius) - 6px);
    display: grid;
    gap: 0.42rem;
    min-width: 0;
    padding: 0.58rem 0.62rem;
}

.kpi-ranking-list__item.is-positive,
.kpi-expense-split__item.is-positive,
.kpi-budget-list__item.is-healthy {
    --kpi-row-color: var(--kpi-chart-positive);
}

.kpi-ranking-list__item.is-info,
.kpi-expense-split__item.is-info,
.kpi-risk-matrix__row.is-info {
    --kpi-row-color: var(--kpi-chart-info);
}

.kpi-ranking-list__item.is-warning,
.kpi-expense-split__item.is-warning,
.kpi-budget-list__item.is-watch,
.kpi-risk-matrix__row.is-warning {
    --kpi-row-color: var(--kpi-chart-warning);
}

.kpi-ranking-list__item.is-muted,
.kpi-expense-split__item.is-muted {
    --kpi-row-color: var(--kpi-chart-muted);
}

.kpi-budget-list__item.is-over,
.kpi-risk-matrix__row.is-critical,
.kpi-risk-matrix__row.is-negative {
    --kpi-row-color: var(--kpi-chart-negative);
}

.kpi-ranking-list__meta,
.kpi-expense-split__meta,
.kpi-budget-list__meta,
.kpi-budget-list__values,
.kpi-risk-matrix__meta {
    align-items: flex-start;
    display: flex;
    gap: 0.65rem;
    justify-content: space-between;
    min-width: 0;
}

.kpi-ranking-list__meta > div,
.kpi-expense-split__meta > div,
.kpi-budget-list__meta > div {
    min-width: 0;
}

.kpi-ranking-list__label,
.kpi-expense-split__label,
.kpi-budget-list__label {
    color: var(--app-text);
    font-size: 0.78rem;
    font-weight: 850;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kpi-ranking-list__share,
.kpi-expense-split__meta span,
.kpi-budget-list__meta span,
.kpi-budget-list__values,
.kpi-risk-matrix__meta span {
    color: var(--app-text-muted);
    font-size: 0.68rem;
    font-weight: 750;
    line-height: 1.35;
}

.kpi-ranking-list__meta strong,
.kpi-expense-split__meta strong,
.kpi-budget-list__meta strong,
.kpi-risk-matrix__meta strong {
    color: var(--app-text);
    flex: 0 0 auto;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1.2;
    max-width: 9.5rem;
    overflow: hidden;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kpi-ranking-list__track,
.kpi-expense-split__track,
.kpi-budget-list__track,
.kpi-risk-matrix__track {
    background: rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    height: 0.42rem;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.kpi-ranking-list__track span,
.kpi-expense-split__track span,
.kpi-budget-list__track span,
.kpi-risk-matrix__track span {
    background: linear-gradient(90deg, color-mix(in srgb, var(--kpi-row-color) 74%, transparent), var(--kpi-row-color));
    border-radius: inherit;
    display: block;
    height: 100%;
    min-width: 0.28rem;
}

.kpi-expense-split {
    display: grid;
    gap: 0.7rem;
    min-width: 0;
}

.kpi-expense-split__summary {
    background: linear-gradient(135deg, color-mix(in srgb, var(--kpi-chart-accent) 13%, transparent), var(--app-surface-alt));
    border: 1px solid color-mix(in srgb, var(--kpi-chart-accent) 28%, var(--app-border));
    border-radius: calc(var(--app-panel-radius) - 6px);
    display: grid;
    gap: 0.22rem;
    min-width: 0;
    padding: 0.72rem 0.78rem;
}

.kpi-expense-split__summary span {
    color: var(--app-text-muted);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.02em;
    line-height: 1.2;
    text-transform: uppercase;
}

.kpi-expense-split__summary strong {
    color: var(--app-text);
    font-size: 1.12rem;
    font-weight: 950;
    line-height: 1.12;
}

.kpi-expense-split__summary p {
    color: var(--app-text-soft);
    font-size: 0.72rem;
    font-weight: 750;
    line-height: 1.28;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kpi-expense-split__list {
    max-height: min(22.5rem, 58vh);
    overflow-y: auto;
    padding-right: 0.1rem;
}

.kpi-budget-list__track i {
    background: var(--app-text);
    bottom: -0.18rem;
    display: block;
    opacity: 0.75;
    position: absolute;
    right: 0;
    top: -0.18rem;
    width: 2px;
}

.kpi-budget-list__values {
    align-items: center;
    flex-wrap: wrap;
}

.kpi-risk-panel {
    display: grid;
    gap: 0.62rem;
}

.kpi-risk-panel__score {
    background: linear-gradient(135deg, rgba(251, 113, 133, 0.14), rgba(56, 189, 248, 0.09));
    border: 1px solid var(--app-border);
    border-radius: calc(var(--app-panel-radius) - 6px);
    display: grid;
    gap: 0.32rem;
    min-width: 0;
    padding: 0.72rem;
}

.kpi-risk-panel__score span {
    color: var(--app-text-muted);
    font-size: 0.66rem;
    font-weight: 900;
    line-height: 1.2;
    text-transform: uppercase;
}

.kpi-risk-panel__score strong {
    color: var(--app-text);
    font-size: 1.45rem;
    font-weight: 950;
    line-height: 1;
}

.kpi-risk-panel__score p {
    color: var(--app-text-soft);
    font-size: 0.74rem;
    font-weight: 750;
    line-height: 1.35;
}

.kpi-risk-matrix {
    display: grid;
    gap: 0.5rem;
}

.analytics-panel-grid-skeleton {
    --analytics-panel-skeleton-positive: #34d399;
    --analytics-panel-skeleton-negative: #fb7185;
    display: grid;
    gap: 0.85rem;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    pointer-events: none;
}

.analytics-panel-grid-skeleton__panel {
    background: var(--app-surface-soft);
    border: 1px solid var(--app-border);
    border-radius: var(--app-panel-radius);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    gap: 0.72rem;
    min-height: 18rem;
    min-width: 0;
    overflow: hidden;
    padding: 0.86rem;
}

.analytics-panel-grid-skeleton__panel.is-wide {
    grid-column: auto;
}

.analytics-panel-grid-skeleton__header {
    align-items: flex-start;
    display: flex;
    gap: 0.8rem;
    justify-content: space-between;
    min-width: 0;
}

.analytics-panel-grid-skeleton__header > div {
    display: grid;
    gap: 0.42rem;
    min-width: 0;
    width: min(20rem, 68%);
}

.analytics-panel-grid-skeleton__line,
.analytics-panel-grid-skeleton__badge,
.analytics-panel-grid-skeleton__score,
.analytics-panel-grid-skeleton__row,
.analytics-panel-grid-skeleton__row-meta span,
.analytics-panel-grid-skeleton__legend span {
    animation: ui-skeleton-pulse 1.4s ease-in-out infinite;
    background: linear-gradient(90deg, rgba(148, 163, 184, 0.13), rgba(148, 163, 184, 0.27), rgba(148, 163, 184, 0.13));
    background-size: 220% 100%;
    border-radius: 999px;
    display: block;
}

.analytics-panel-grid-skeleton__line.is-title {
    height: 0.82rem;
    width: min(11rem, 82%);
}

.analytics-panel-grid-skeleton__line.is-description {
    height: 0.56rem;
    width: min(18rem, 100%);
}

.analytics-panel-grid-skeleton__badge {
    flex: 0 0 auto;
    height: 1.35rem;
    width: 7.4rem;
}

.analytics-panel-grid-skeleton__badge.is-small {
    width: 4.8rem;
}

.analytics-panel-grid-skeleton__plot {
    background: color-mix(in srgb, var(--app-surface-alt) 74%, transparent);
    border: 1px solid color-mix(in srgb, var(--app-border) 72%, transparent);
    border-radius: calc(var(--app-panel-radius) - 6px);
    min-height: 10.85rem;
    overflow: hidden;
}

.analytics-panel-grid-skeleton__plot svg {
    aspect-ratio: 16 / 5.2;
    display: block;
    min-height: 10.85rem;
    width: 100%;
}

.analytics-panel-grid-skeleton__grid-line {
    stroke: color-mix(in srgb, var(--app-border-strong) 62%, transparent);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.analytics-panel-grid-skeleton__stroke {
    animation: ui-skeleton-opacity 1.4s ease-in-out infinite alternate;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 8;
    vector-effect: non-scaling-stroke;
}

.analytics-panel-grid-skeleton__stroke.is-positive {
    stroke: color-mix(in srgb, var(--analytics-panel-skeleton-positive) 48%, rgba(148, 163, 184, 0.2));
}

.analytics-panel-grid-skeleton__stroke.is-negative {
    stroke: color-mix(in srgb, var(--analytics-panel-skeleton-negative) 48%, rgba(148, 163, 184, 0.2));
}

.analytics-panel-grid-skeleton__bar {
    animation: ui-skeleton-opacity 1.4s ease-in-out infinite alternate;
    opacity: 0.62;
}

.analytics-panel-grid-skeleton__bar.is-positive {
    fill: color-mix(in srgb, var(--analytics-panel-skeleton-positive) 56%, rgba(148, 163, 184, 0.18));
}

.analytics-panel-grid-skeleton__bar.is-negative {
    fill: color-mix(in srgb, var(--analytics-panel-skeleton-negative) 56%, rgba(148, 163, 184, 0.18));
}

.analytics-panel-grid-skeleton__legend {
    align-items: center;
    display: flex;
    gap: 0.7rem;
}

.analytics-panel-grid-skeleton__legend span {
    height: 0.56rem;
    width: 5.2rem;
}

.analytics-panel-grid-skeleton__score {
    border-radius: calc(var(--app-panel-radius) - 6px);
    display: grid;
    gap: 0.42rem;
    padding: 0.78rem;
}

.analytics-panel-grid-skeleton__score span,
.analytics-panel-grid-skeleton__score strong {
    background: rgba(148, 163, 184, 0.26);
    border-radius: 999px;
    display: block;
}

.analytics-panel-grid-skeleton__score span:first-child {
    height: 0.55rem;
    width: 36%;
}

.analytics-panel-grid-skeleton__score strong {
    height: 1.55rem;
    width: 22%;
}

.analytics-panel-grid-skeleton__score span:last-child {
    height: 0.58rem;
    width: 68%;
}

.analytics-panel-grid-skeleton__rows {
    display: grid;
    gap: 0.55rem;
}

.analytics-panel-grid-skeleton__row {
    border-radius: calc(var(--app-panel-radius) - 6px);
    display: grid;
    gap: 0.42rem;
    padding: 0.58rem 0.62rem;
}

.analytics-panel-grid-skeleton__row-meta {
    align-items: center;
    display: flex;
    gap: 0.7rem;
    justify-content: space-between;
    min-width: 0;
}

.analytics-panel-grid-skeleton__row-meta span,
.analytics-panel-grid-skeleton__row .is-label,
.analytics-panel-grid-skeleton__row .is-value,
.analytics-panel-grid-skeleton__row .is-track {
    background: rgba(148, 163, 184, 0.26);
    border-radius: 999px;
    display: block;
}

.analytics-panel-grid-skeleton__row .is-label {
    height: 0.55rem;
    width: 42%;
}

.analytics-panel-grid-skeleton__row .is-value {
    height: 0.55rem;
    width: 22%;
}

.analytics-panel-grid-skeleton__row .is-track {
    height: 0.42rem;
    width: 100%;
}

@keyframes ui-skeleton-opacity {
    from {
        opacity: 0.42;
    }

    to {
        opacity: 0.76;
    }
}

@media (prefers-reduced-motion: reduce) {
    .summary-metric-strip-skeleton__line,
    .summary-metric-strip-skeleton__pill,
    .analytics-panel-grid-skeleton__line,
    .analytics-panel-grid-skeleton__badge,
    .analytics-panel-grid-skeleton__score,
    .analytics-panel-grid-skeleton__row,
    .analytics-panel-grid-skeleton__row-meta span,
    .analytics-panel-grid-skeleton__legend span,
    .analytics-panel-grid-skeleton__stroke,
    .analytics-panel-grid-skeleton__bar {
        animation: none;
    }
}

body.theme-light .kpi-comparison-strip {
    --kpi-chart-positive: #059669;
    --kpi-chart-negative: #e11d48;
    --kpi-chart-warning: #d97706;
    --kpi-chart-muted: #64748b;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

body.theme-light .kpi-risk-panel__score {
    background: linear-gradient(135deg, rgba(225, 29, 72, 0.09), rgba(2, 132, 199, 0.08));
}

.app-ledger-icon-action {
    margin-left: auto;
}

.app-ledger-icon-action .mud-icon-button:hover,
.insight-grid .app-options-cell .mud-icon-button:hover {
    background: var(--app-hover-surface);
}

.app-ledger-title,
.app-dialog-title {
    color: var(--app-text);
    font-weight: 650;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0;
}

.app-ledger-title {
    font-size: clamp(1.375rem, 1vw + 1rem, 1.625rem);
}

.app-dialog-title {
    font-size: 1.375rem;
    margin-top: 0.55rem;
}

.app-ledger-description,
.app-dialog-description {
    color: var(--app-text-muted);
    font-size: 0.8125rem;
    line-height: 1.5;
    margin: 0.4rem 0 0;
}

.app-dialog-eyebrow {
    color: var(--app-accent);
    font-size: 0.6875rem;
    font-weight: 650;
    letter-spacing: 0.12em;
    margin: 0;
    text-transform: uppercase;
}

.app-editor-container {
    max-width: 100%;
    width: 100%;
}

.app-editor {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
}

.app-editor--line-workflow {
    max-height: calc(100vh - 14rem);
    min-height: 0;
}

.app-editor__header {
    min-width: 0;
}

.app-editor__actions {
    border-top: 1px solid var(--app-border);
    display: flex;
    flex-direction: column-reverse;
    gap: 0.75rem;
    padding-top: 1rem;
}

.app-editor__actions .compact-action,
.app-editor__actions .mud-button-root {
    min-height: 40px;
    width: 100%;
}

.app-editor--line-workflow .app-editor__actions {
    background: linear-gradient(180deg, color-mix(in srgb, var(--app-surface) 84%, transparent) 0%, var(--app-surface) 28%);
    bottom: 0;
    flex-shrink: 0;
    margin: 0 -1rem -1rem;
    padding: 1rem;
    position: sticky;
    z-index: 3;
}

.app-editor--line-workflow .app-form {
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 0.25rem;
}

.inventory-movement-editor,
.inventory-import-editor,
.inventory-count-editor {
    max-height: none;
}

.inventory-movement-editor .app-form,
.inventory-import-editor .app-form,
.inventory-count-editor .app-form {
    overflow-y: visible;
}

.app-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-width: 0;
}

.app-form__section {
    background: var(--app-surface-soft);
    border: 1px solid var(--app-border);
    border-radius: var(--app-control-radius);
    min-width: 0;
    padding: 0.85rem;
}

.app-form__section-title {
    color: var(--app-text-muted);
    font-size: 0.6875rem;
    font-weight: 650;
    letter-spacing: 0.1em;
    line-height: 1.3;
    margin: 0 0 0.7rem;
    text-transform: uppercase;
}

.app-field-with-help {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.app-field-with-help > .mud-input-control {
    margin-top: 0;
}

.app-field-with-help > .mud-input-label {
    display: none;
}

.app-field-help-label {
    align-items: center;
    display: flex;
    gap: 0.35rem;
    justify-content: flex-start;
    min-height: 1.25rem;
    width: fit-content;
}

.app-field-help-label span:first-child {
    color: var(--app-text);
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.app-field-help-label__required {
    color: var(--app-required-marker);
    margin-left: -0.2rem;
}

.app-field-help-label__button {
    color: var(--app-text-muted);
    height: 1.25rem;
    min-height: 1.25rem;
    padding: 0;
    width: 1.25rem;
}

.app-row-edit-actions {
    align-items: center;
    display: inline-flex;
    gap: 0.35rem;
    justify-content: flex-end;
    min-width: 4.75rem;
    white-space: nowrap;
}

.app-row-edit-action {
    flex: 0 0 auto;
}

.inventory-import-product-cell,
.inventory-import-tracking-cell {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.inventory-import-product-cell__sku {
    color: var(--app-text);
    font-weight: 800;
}

.inventory-import-product-cell__name,
.inventory-import-product-cell__meta,
.inventory-import-tracking-cell__detail {
    color: var(--app-text-muted);
    font-size: 0.82rem;
    line-height: 1.35;
}

.inventory-import-product-editor {
    display: grid;
    gap: 0.5rem;
    min-width: 8.5rem;
    width: 100%;
}

.inventory-import-product-editor__field {
    min-width: 0;
}

.inventory-import-rows-grid .mud-table-cell,
.inventory-import-rows-grid .mud-table tbody td {
    padding-left: 0.45rem;
    padding-right: 0.45rem;
}

.inventory-import-rows-grid .mud-table-container table {
    min-width: 64rem;
    table-layout: fixed;
    width: 100%;
}

.inventory-movement-lines-grid .mud-table-container table {
    min-width: 76rem;
}

.inventory-count-lines-grid .mud-table-container table {
    min-width: 76rem;
}

.inventory-action-gate-alert.mud-alert {
    background: color-mix(in srgb, var(--app-accent) 8%, var(--app-surface-alt)) !important;
    border-color: color-mix(in srgb, var(--app-accent) 28%, var(--app-border)) !important;
    border-radius: var(--app-panel-radius);
    box-shadow: none;
    color: var(--app-text-soft) !important;
    margin: 0.35rem 0 1rem;
}

.inventory-action-gate-alert .mud-alert-icon {
    color: var(--app-accent) !important;
}

.inventory-action-gate-alert .mud-alert-message {
    color: var(--app-text-soft) !important;
    font-size: 0.9rem;
    line-height: 1.5;
}

.inventory-import-rows-grid .mud-table-head .mud-table-cell,
.inventory-import-rows-grid .mud-table thead .mud-table-cell,
.inventory-import-rows-grid .mud-table-container table thead th {
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.inventory-import-rows-grid .mud-input-control,
.inventory-import-rows-grid .mud-input {
    min-width: 0;
}

.inventory-import-number-field,
.inventory-movement-number-field,
.inventory-count-number-field {
    display: inline-block;
    max-width: 100%;
    vertical-align: top;
}

.inventory-import-number-field .mud-input-control,
.inventory-import-number-field .mud-input,
.inventory-movement-number-field .mud-input-control,
.inventory-movement-number-field .mud-input,
.inventory-count-number-field .mud-input-control,
.inventory-count-number-field .mud-input {
    min-width: 0 !important;
    width: 100% !important;
}

.inventory-import-number-field--quantity {
    width: 3.75rem;
}

.inventory-import-number-field--cost {
    width: 7rem;
}

.inventory-movement-number-field--quantity {
    width: 5rem;
}

.inventory-movement-number-field--cost {
    width: 7rem;
}

.inventory-movement-cost-cell {
    align-items: flex-end;
    display: inline-flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 7rem;
}

.inventory-movement-cost-cell__source {
    color: var(--app-text-muted);
    font-size: 0.72rem;
    font-weight: 750;
    line-height: 1.15;
    white-space: nowrap;
}

.inventory-movement-cost-preview {
    align-items: center;
    border: 1px solid var(--app-border);
    border-radius: var(--app-control-radius);
    display: inline-grid;
    gap: 0.35rem;
    grid-template-columns: auto minmax(3.5rem, 1fr);
    min-height: 42px;
    min-width: 8.75rem;
    padding: 0.4rem 0.55rem;
    text-align: left;
}

.inventory-movement-cost-preview.is-ready {
    background: color-mix(in srgb, #0f766e 7%, var(--app-surface));
    border-color: color-mix(in srgb, #0f766e 28%, var(--app-border));
}

.inventory-movement-cost-preview.is-pending {
    background: var(--app-surface-alt);
}

.inventory-movement-cost-preview .mud-icon-root {
    color: var(--app-text-muted);
    grid-row: 1 / span 2;
}

.inventory-movement-cost-preview.is-ready .mud-icon-root {
    color: #0f766e;
}

.inventory-movement-cost-preview__value {
    color: var(--app-text);
    font-size: 0.9rem;
    font-weight: 850;
    line-height: 1.1;
    min-width: 0;
    overflow-wrap: anywhere;
}

.inventory-movement-cost-preview__label {
    color: var(--app-text-muted);
    font-size: 0.72rem;
    font-weight: 750;
    line-height: 1.1;
    min-width: 0;
}

.inventory-movement-cost-status {
    align-items: flex-start;
    background: color-mix(in srgb, var(--app-accent) 6%, var(--app-surface-alt));
    border: 1px solid color-mix(in srgb, var(--app-accent) 22%, var(--app-border));
    border-radius: var(--app-control-radius);
    color: var(--app-text-soft);
    display: flex;
    gap: 0.45rem;
    margin-top: 0.75rem;
    padding: 0.55rem 0.7rem;
}

.inventory-movement-cost-status .mud-icon-root {
    color: var(--app-accent);
    flex: 0 0 auto;
    margin-top: 0.05rem;
}

.inventory-movement-cost-status span {
    font-size: 0.86rem;
    line-height: 1.35;
    min-width: 0;
}

.inventory-count-number-field--quantity {
    width: 5rem;
}

.inventory-count-number-field--cost {
    width: 7rem;
}

.inventory-import-tracking-editor {
    display: grid;
    gap: 0.5rem;
    min-width: 7.25rem;
}

.inventory-line-section-header,
.inventory-line-section-header > div {
    min-width: 0;
}

@media (max-width: 600px) {
    .app-editor--line-workflow {
        max-height: none;
        overflow: visible;
    }

    .app-editor--line-workflow .app-form {
        overflow-y: visible;
        padding-bottom: 0;
    }

    .inventory-line-section-header {
        align-items: stretch !important;
        display: grid !important;
        gap: 0.85rem !important;
        grid-template-columns: minmax(0, 1fr);
    }

    .inventory-line-section-header .compact-action,
    .inventory-line-section-header .mud-button-root {
        width: 100%;
    }

    .inventory-line-edit-grid .mud-table-container {
        overflow: visible;
        overflow-x: hidden;
    }

    .inventory-line-edit-grid .mud-table-container table {
        min-width: 0 !important;
        table-layout: auto;
        width: 100%;
    }

    .inventory-line-edit-grid .mud-table,
    .inventory-line-edit-grid .mud-table-root,
    .inventory-line-edit-grid .mud-table-container table,
    .inventory-line-edit-grid .mud-table tbody,
    .inventory-line-edit-grid .mud-table tbody tr,
    .inventory-line-edit-grid .mud-table-body,
    .inventory-line-edit-grid .mud-table-body .mud-table-row {
        display: block;
        max-width: 100%;
        width: 100% !important;
    }

    .inventory-line-edit-grid colgroup {
        display: none;
    }

    .inventory-line-edit-grid .mud-table-cell,
    .inventory-line-edit-grid .mud-table tbody td {
        align-items: stretch;
        box-sizing: border-box;
        display: grid !important;
        gap: 0.45rem;
        grid-template-columns: minmax(0, 1fr);
        max-width: 100%;
        min-width: 0;
        padding-left: 0.85rem;
        padding-right: 0.85rem;
        text-align: left !important;
        width: 100% !important;
    }

    .inventory-line-edit-grid .mud-table-cell::before,
    .inventory-line-edit-grid .mud-table tbody td::before {
        color: var(--app-text);
        font-size: 0.87rem;
        font-weight: 700;
        letter-spacing: 0;
        line-height: 1.35;
        min-width: 0;
        white-space: normal;
    }

    .inventory-line-edit-grid .mud-table-cell > *,
    .inventory-line-edit-grid .mud-table tbody td > * {
        grid-column: 1;
        max-width: 100%;
        min-width: 0;
    }

    .inventory-line-edit-grid .mud-input-control,
    .inventory-line-edit-grid .mud-input,
    .inventory-line-edit-grid .mud-select,
    .inventory-line-edit-grid .inventory-import-product-editor,
    .inventory-line-edit-grid .inventory-import-tracking-editor,
    .inventory-line-edit-grid .inventory-import-number-field,
    .inventory-line-edit-grid .inventory-movement-number-field,
    .inventory-line-edit-grid .inventory-count-number-field {
        max-width: 100%;
        min-width: 0 !important;
        width: 100% !important;
    }

    .app-editor--line-workflow .app-editor__actions {
        background: transparent;
        margin: 0;
        position: static;
    }

    .inventory-import-rows-grid .inventory-import-number-field--quantity,
    .inventory-import-rows-grid .inventory-import-number-field--quantity .mud-input-control,
    .inventory-import-rows-grid .inventory-import-number-field--quantity .mud-input {
        min-width: 0 !important;
        width: 100% !important;
    }

    .inventory-import-rows-grid .inventory-import-number-field--cost,
    .inventory-import-rows-grid .inventory-import-number-field--cost .mud-input-control,
    .inventory-import-rows-grid .inventory-import-number-field--cost .mud-input {
        min-width: 0 !important;
        width: 100% !important;
    }

    .inventory-movement-lines-grid .inventory-movement-number-field--quantity,
    .inventory-movement-lines-grid .inventory-movement-number-field--quantity .mud-input-control,
    .inventory-movement-lines-grid .inventory-movement-number-field--quantity .mud-input {
        min-width: 0 !important;
        width: 100% !important;
    }

    .inventory-movement-lines-grid .inventory-movement-number-field--cost,
    .inventory-movement-lines-grid .inventory-movement-number-field--cost .mud-input-control,
    .inventory-movement-lines-grid .inventory-movement-number-field--cost .mud-input {
        min-width: 0 !important;
        width: 100% !important;
    }

    .inventory-movement-cost-cell,
    .inventory-movement-cost-preview {
        align-items: stretch;
        min-width: 0;
        width: 100%;
    }

    .inventory-count-lines-grid .inventory-count-number-field--quantity,
    .inventory-count-lines-grid .inventory-count-number-field--quantity .mud-input-control,
    .inventory-count-lines-grid .inventory-count-number-field--quantity .mud-input {
        min-width: 0 !important;
        width: 100% !important;
    }

    .inventory-count-lines-grid .inventory-count-number-field--cost,
    .inventory-count-lines-grid .inventory-count-number-field--cost .mud-input-control,
    .inventory-count-lines-grid .inventory-count-number-field--cost .mud-input {
        min-width: 0 !important;
        width: 100% !important;
    }

    .inventory-line-edit-grid .app-row-edit-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
        min-width: 0;
        width: 100%;
    }
}

.app-empty-state {
    background: var(--app-surface-alt);
    border: 1px dashed var(--app-border);
    border-radius: var(--app-control-radius);
    padding: clamp(1.25rem, 2vw, 1.75rem);
    text-align: center;
}

.app-empty-state__title {
    color: var(--app-text-muted);
    font-size: 0.78rem;
    font-weight: 650;
    letter-spacing: 0.12em;
    line-height: 1.25;
    margin: 0;
    text-transform: uppercase;
}

.app-empty-state__description {
    color: var(--app-text-soft);
    font-size: 0.88rem;
    line-height: 1.5;
    margin: 0.7rem 0 0;
}

.tenant-navigation-list-section {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.tenant-navigation-list {
    display: grid;
    gap: 0.65rem;
    min-width: 0;
}

.tenant-navigation-row {
    background: var(--app-surface-alt);
    border: 1px solid var(--app-border);
    border-radius: var(--app-control-radius);
    color: var(--app-text);
    min-width: 0;
}

.tenant-navigation-row.is-section {
    background: color-mix(in srgb, var(--app-surface-alt) 82%, var(--app-accent) 18%);
    border-color: color-mix(in srgb, var(--app-border) 72%, var(--app-accent) 28%);
}

.tenant-navigation-row__body {
    align-items: center;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    min-width: 0;
    padding: 0.85rem 0.85rem 0.85rem calc(0.85rem + (var(--app-navigation-level) * 1.125rem));
}

.tenant-navigation-row__toggle-placeholder {
    display: inline-block;
    height: 1.625rem;
    width: 1.625rem;
}

.tenant-navigation-row__icon {
    align-items: center;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-control-radius);
    color: var(--app-text);
    display: inline-flex;
    flex: 0 0 auto;
    height: 2.4rem;
    justify-content: center;
    width: 2.4rem;
}

.tenant-navigation-row__icon.is-section {
    background: color-mix(in srgb, var(--app-surface-alt) 72%, var(--app-accent) 28%);
}

.tenant-navigation-row__content {
    min-width: 0;
}

.tenant-navigation-row__title-line {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.tenant-navigation-row__title {
    color: var(--app-text);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.tenant-navigation-row__meta {
    color: var(--app-text-muted);
    font-size: 0.82rem;
    line-height: 1.45;
    margin: 0.35rem 0 0;
    overflow-wrap: anywhere;
}

.tenant-navigation-row__action {
    align-items: center;
    display: flex;
    justify-content: flex-end;
    min-width: 0;
}

.tenant-navigation-section-status {
    align-items: center;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-control-radius);
    color: var(--app-text-muted);
    display: inline-flex;
    gap: 0.4rem;
    min-height: 2.25rem;
    padding: 0.35rem 0.65rem;
}

.tenant-navigation-section-status span {
    font-size: 0.82rem;
    line-height: 1.25;
}

.tenant-features-list-section {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.tenant-features-list {
    display: grid;
    gap: 0.65rem;
    min-width: 0;
}

.tenant-feature-row {
    align-items: center;
    background: var(--app-surface-alt);
    border: 1px solid var(--app-border);
    border-radius: var(--app-control-radius);
    color: var(--app-text);
    display: grid;
    gap: 0.85rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-width: 0;
    padding: 0.85rem;
}

.tenant-feature-row__icon {
    align-items: center;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-control-radius);
    color: var(--app-accent);
    display: inline-flex;
    height: 2.4rem;
    justify-content: center;
    width: 2.4rem;
}

.tenant-feature-row__content {
    min-width: 0;
}

.tenant-feature-row__title-line {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.tenant-feature-row__title {
    color: var(--app-text);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.tenant-feature-row__description {
    color: var(--app-text-muted);
    font-size: 0.82rem;
    line-height: 1.45;
    margin: 0.35rem 0 0;
    overflow-wrap: anywhere;
}

.tenant-feature-row__action {
    align-items: center;
    display: flex;
    justify-content: flex-end;
    min-width: 0;
}

.tenant-permissions-list-section {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.tenant-permissions-dialog .app-editor {
    gap: 0.72rem;
    padding: 0.82rem;
}

.tenant-permissions-dialog .app-dialog-title {
    font-size: 1.28rem;
    margin-top: 0.45rem;
}

.tenant-permissions-dialog .app-dialog-description {
    font-size: 0.82rem;
    margin-top: 0.35rem;
}

.tenant-permissions-dialog .app-dialog-eyebrow,
.tenant-permissions-dialog .app-filter-panel__title,
.tenant-permissions-dialog .app-form__section-title {
    letter-spacing: 0.16em;
}

.tenant-permissions-dialog .app-metric-summary__item {
    padding: 0.72rem 0.85rem;
}

.tenant-permissions-dialog .app-metric-summary__label {
    font-size: 0.68rem;
}

.tenant-permissions-dialog .app-metric-summary__value {
    font-size: 1.05rem;
    line-height: 1.05;
}

.tenant-permissions-dialog .app-metric-summary__meta {
    font-size: 0.78rem;
    margin-top: 0.2rem;
}

.tenant-permissions-dialog .app-filter-panel {
    padding: 0.75rem;
}

.tenant-permissions-dialog .app-filter-panel__header {
    margin-bottom: 0.45rem;
}

.tenant-permissions-dialog .app-form__section {
    padding: 0.75rem;
}

.tenant-permissions-dialog .insight-grid .mud-table-cell,
.tenant-permissions-dialog .insight-grid .mud-table tbody td {
    padding-bottom: 0.72rem;
    padding-top: 0.72rem;
}

.tenant-permissions-dialog .app-editor__actions {
    gap: 0.55rem;
    padding-top: 0.75rem;
}

.tenant-permission-matrix {
    min-width: 0;
    overflow-x: auto;
}

.tenant-permission-matrix .mud-table-cell.header-center,
.tenant-permission-matrix .mud-table-cell.text-center {
    text-align: center !important;
    vertical-align: middle;
}

.tenant-permission-check-cell,
.tenant-permission-status-cell {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 2.75rem;
    min-width: 0;
    width: 100%;
}

.tenant-permission-check-cell .mud-checkbox,
.tenant-permission-check-cell .mud-button-root,
.tenant-permission-check-cell .mud-icon-button {
    margin-inline: auto;
}

.tenant-permission-mobile {
    display: none;
}

.tenant-permission-card {
    align-items: center;
    background: var(--app-surface-alt);
    border: 1px solid var(--app-border);
    border-radius: var(--app-control-radius);
    color: var(--app-text);
    display: grid;
    gap: 0.85rem;
    grid-template-columns: minmax(0, 1fr) auto;
    min-width: 0;
    padding: 0.85rem;
}

.tenant-permission-card__content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tenant-permission-card__title {
    color: var(--app-text);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.tenant-permission-card__description {
    color: var(--app-text-muted);
    font-size: 0.82rem;
    line-height: 1.45;
    margin-top: 0.35rem;
    overflow-wrap: anywhere;
}

.tenant-user-permissions-inherit {
    align-items: center;
    color: var(--app-text);
    display: inline-grid;
    gap: 0.65rem;
    grid-template-columns: auto minmax(0, 1fr);
    justify-content: end;
    justify-self: end;
    margin-left: auto;
    min-height: 2.75rem;
    min-width: 0;
    padding: 0.35rem 0;
    width: auto;
}

.tenant-user-permissions-inherit__switch {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: center;
    min-width: 3.25rem;
}

.tenant-user-permissions-inherit__label {
    font-size: 0.88rem;
    font-weight: 750;
    line-height: 1.3;
    min-width: 0;
    overflow-wrap: normal;
    white-space: normal;
}

.app-compact-switch .mud-switch-base.mud-checked + .mud-switch-track,
.app-compact-switch .mud-switch-track.mud-success {
    background: #0f766e !important;
    border-color: rgba(45, 212, 191, 0.58);
}

.tenant-user-permissions-context {
    align-items: flex-start;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-control-radius);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    min-width: 0;
    padding: 0.95rem 1rem;
}

.tenant-user-permissions-context__copy {
    min-width: 0;
}

.tenant-user-permissions-context__copy span {
    color: var(--app-text);
    display: block;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    line-height: 1.35;
    text-transform: uppercase;
}

.tenant-user-permissions-context__copy p {
    color: var(--app-text-muted);
    font-size: 0.88rem;
    line-height: 1.45;
    margin: 0.35rem 0 0;
    overflow-wrap: anywhere;
}

.tenant-user-permissions-role-list {
    align-items: center;
    display: flex;
    flex: 0 1 auto;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
    min-width: min(18rem, 100%);
}

.tenant-user-permissions-notice {
    margin-top: 0.85rem;
}

.tenant-user-permissions-filter-set {
    align-items: center;
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: 3.5rem;
    min-width: 0;
}

.tenant-user-permissions-filter,
.tenant-user-permissions-filter.mud-button-root {
    min-height: 2.55rem;
    min-width: 0;
    padding-inline: 0.55rem;
    width: 100%;
}

.tenant-user-permissions-filter .mud-button-label {
    overflow-wrap: anywhere;
    text-align: center;
    white-space: normal;
}

.tenant-user-permissions-decision {
    display: grid;
    gap: 0.35rem;
    min-width: min(18rem, 100%);
}

.tenant-user-permissions-decision span {
    color: var(--app-text-muted);
    font-size: 0.78rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

@media (max-width: 600px) {
    .tenant-feature-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .tenant-feature-row__action {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .tenant-role-permission-matrix {
        display: none;
    }

    .tenant-permission-mobile {
        display: grid;
        gap: 0.65rem;
        min-width: 0;
    }

    .tenant-user-permissions-context {
        flex-direction: column;
    }

    .tenant-user-permissions-role-list {
        justify-content: flex-start;
        min-width: 0;
        width: 100%;
    }

    .tenant-user-permissions-filter-set {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 601px) and (max-width: 960px) {
    .tenant-user-permissions-filter-set {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.signals-policy-dialog {
    min-width: 0;
}

.signals-parameter-label {
    align-items: center;
    color: var(--app-text);
    display: flex;
    font-size: 0.86rem;
    font-weight: 800;
    gap: 0.25rem;
    line-height: 1.3;
    margin-bottom: 0.35rem;
}

.signals-parameter-help {
    display: grid;
    gap: 0.25rem;
    max-width: 14rem;
    overflow-wrap: anywhere;
    text-align: left;
}

.signals-parameter-help-button {
    min-height: 1.6rem !important;
    min-width: 1.6rem !important;
    padding: 0 !important;
}

.signals-run-action {
    align-items: end;
    display: flex;
}

.signals-run-action .compact-action,
.signals-run-action .mud-button-root {
    min-height: 40px;
    width: 100%;
}

.signals-summary-skeleton {
    background: var(--app-surface-soft);
    border: 1px solid var(--app-border);
    border-radius: var(--app-control-radius);
    display: grid;
    gap: 1px;
    grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
    overflow: hidden;
}

.signals-summary-skeleton__item {
    background: var(--app-surface-soft);
    min-height: 6.5rem;
    padding: 1rem 1.15rem;
}

.signals-summary-skeleton__line,
.signals-summary-skeleton__value {
    animation: appPulse 1.4s ease-in-out infinite;
    background: color-mix(in srgb, var(--app-text-muted) 26%, transparent);
}

.signals-summary-skeleton__line {
    border-radius: 999px;
    height: 0.75rem;
    width: 68%;
}

.signals-summary-skeleton__value {
    border-radius: var(--app-control-radius);
    height: 2rem;
    margin-top: 1rem;
    width: 36%;
}

.signals-finding-description {
    color: var(--app-text-soft);
    font-size: 0.86rem;
    line-height: 1.45;
    max-width: 22.5rem;
    overflow-wrap: anywhere;
}

.app-tag-field {
    min-width: 0;
}

.app-tag-field .mud-chipset {
    gap: 0.35rem;
    min-height: 2.35rem;
}

.app-tag-field .mud-chip {
    background: rgba(45, 212, 191, 0.12) !important;
    border: 1px solid rgba(45, 212, 191, 0.28) !important;
    color: var(--app-text) !important;
    font-weight: 800;
    min-height: 1.9rem;
}

.app-tag-field .mud-chip-content {
    color: var(--app-text) !important;
    font-size: 0.78rem;
}

.app-tag-field .mud-chip-close-button,
.app-tag-field .mud-chip-close-button .mud-icon-root {
    color: var(--app-text-soft) !important;
}

.app-tag-field .mud-chip-close-button:hover {
    background: rgba(45, 212, 191, 0.14) !important;
}

body.theme-light .app-tag-field .mud-chip {
    background: rgba(15, 118, 110, 0.1) !important;
    border-color: rgba(15, 118, 110, 0.24) !important;
}

.app-upload-dropzone {
    min-width: 0;
}

.inventory-import-mode-section {
    padding: 1rem;
}

.inventory-import-mode-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.inventory-import-mode-option {
    align-items: center;
    background: var(--app-surface) !important;
    border: 1px solid var(--app-border) !important;
    border-radius: var(--app-control-radius) !important;
    color: var(--app-text) !important;
    display: inline-flex;
    justify-content: flex-start;
    min-height: 3.25rem;
    min-width: 11rem;
    padding: 0.55rem 1rem !important;
    text-transform: none !important;
    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease;
}

.inventory-import-mode-option__content {
    align-items: center;
    display: inline-flex;
    gap: 0.95rem;
    justify-content: flex-start;
    min-width: 0;
    width: 100%;
}

.inventory-import-mode-option:hover,
.inventory-import-mode-option:focus-visible {
    background: var(--app-surface-strong) !important;
    border-color: color-mix(in srgb, var(--app-accent) 42%, var(--app-border)) !important;
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.1);
}

.inventory-import-mode-option--active {
    background: color-mix(in srgb, var(--app-accent) 16%, var(--app-surface)) !important;
    border-color: color-mix(in srgb, var(--app-accent) 64%, var(--app-border)) !important;
}

.inventory-import-mode-option__icon {
    align-items: center;
    background: var(--app-surface-alt);
    border: 1px solid var(--app-border);
    border-radius: 999px;
    color: var(--app-text);
    display: inline-flex;
    flex: 0 0 auto;
    height: 2.15rem;
    justify-content: center;
    width: 2.15rem;
}

.inventory-import-mode-option--active .inventory-import-mode-option__icon {
    background: var(--app-accent);
    border-color: var(--app-accent);
    color: #ffffff;
}

.inventory-import-mode-option__label {
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.2;
    min-width: 0;
}

body.theme-light .inventory-import-mode-option {
    background: #ffffff !important;
}

body.theme-light .inventory-import-mode-option--active {
    background: rgba(15, 118, 110, 0.08) !important;
}

.app-upload-dropzone .mud-file-upload .mud-paper {
    background: var(--app-surface) !important;
    border: 2px dashed rgba(45, 212, 191, 0.34) !important;
    border-radius: var(--app-control-radius) !important;
    min-height: 6.75rem;
    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease;
}

.app-upload-dropzone .mud-file-upload .mud-paper:hover,
.app-upload-dropzone .mud-file-upload .mud-paper:focus-within {
    background: var(--app-surface-strong) !important;
    border-color: rgba(45, 212, 191, 0.58) !important;
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.12);
}

.app-upload-dropzone .mud-file-upload .text-center {
    justify-content: center;
    min-height: 5.75rem !important;
    padding-inline: 1rem !important;
}

.app-upload-dropzone .mud-file-upload .text-center .mud-icon-root {
    color: var(--app-accent) !important;
    font-size: 2rem !important;
    height: 2rem !important;
    width: 2rem !important;
}

.app-upload-dropzone .mud-file-upload .text-center .mud-typography-h6 {
    color: var(--app-text) !important;
    font-size: 0.95rem !important;
    font-weight: 800;
    line-height: 1.35;
    max-width: 100%;
    white-space: normal;
}

body.theme-light .app-upload-dropzone .mud-file-upload .mud-paper {
    border-color: rgba(15, 118, 110, 0.3) !important;
}

.app-upload-dropzone > .app-file-upload.app-file-upload {
    --cuc-file-upload-accent: var(--app-accent);
    --cuc-file-upload-bg: var(--app-surface);
    --cuc-file-upload-bg-hover: var(--app-surface-strong);
    --cuc-file-upload-border: rgba(45, 212, 191, 0.34);
    --cuc-file-upload-border-hover: rgba(45, 212, 191, 0.62);
    --cuc-file-upload-border-radius: var(--app-control-radius);
    --cuc-file-upload-error: #fb7185;
    --cuc-file-upload-focus-ring: rgba(45, 212, 191, 0.12);
    --cuc-file-upload-text: var(--app-text);
    --cuc-file-upload-muted: var(--app-text-muted);
    display: block;
    min-width: 0;
}

.app-file-upload .mud-input-control-input-container {
    position: relative;
}

.app-file-upload__native-input {
    cursor: pointer;
    height: 100% !important;
    inset: 0;
    opacity: 0;
    position: absolute !important;
    width: 100% !important;
    z-index: 2;
}

.app-file-upload__native-input:focus-visible + .mud-file-upload-custom-content .app-file-upload__dropzone {
    background: var(--app-surface-strong) !important;
    border-color: rgba(45, 212, 191, 0.62) !important;
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.12);
}

.app-file-upload__label {
    color: var(--app-text);
    display: block;
    font-size: 0.85rem;
    font-weight: 800;
    margin-bottom: 0.45rem;
}

.app-file-upload__dropzone {
    align-items: center;
    background: var(--app-surface) !important;
    border: 2px dashed rgba(45, 212, 191, 0.34) !important;
    border-radius: var(--app-control-radius) !important;
    color: var(--app-text);
    cursor: pointer;
    display: flex;
    min-height: 7rem;
    padding: 1rem !important;
    position: relative;
    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease;
    width: 100%;
}

.app-file-upload__dropzone:hover,
.app-file-upload__dropzone:focus,
.app-file-upload__dropzone:focus-visible,
.app-file-upload__dropzone--dragging {
    background: var(--app-surface-strong) !important;
    border-color: rgba(45, 212, 191, 0.62) !important;
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.12);
    outline: none;
}

.app-file-upload__state,
.app-file-upload__file {
    align-items: center;
    display: flex;
    gap: 0.9rem;
    min-width: 0;
    width: 100%;
}

.app-file-upload__state--empty {
    justify-content: flex-start;
}

.app-file-upload__icon,
.app-file-upload__file-icon {
    align-items: center;
    background: rgba(45, 212, 191, 0.12);
    border: 1px solid rgba(45, 212, 191, 0.26);
    border-radius: 999px;
    color: var(--app-accent);
    display: inline-flex;
    flex: 0 0 auto;
    height: 2.5rem;
    justify-content: center;
    width: 2.5rem;
}

.app-file-upload__copy,
.app-file-upload__file-copy {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.app-file-upload__title,
.app-file-upload__file-name {
    color: var(--app-text);
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.app-file-upload__hint,
.app-file-upload__file-meta {
    color: var(--app-text-muted);
    font-size: 0.8rem;
    line-height: 1.45;
}

.app-file-upload__files {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.app-file-upload__file {
    background: color-mix(in srgb, var(--app-surface-alt) 74%, transparent);
    border: 1px solid var(--app-border);
    border-radius: calc(var(--app-control-radius) - 0.25rem);
    padding: 0.85rem;
}

.app-file-upload__file--error {
    border-color: rgba(244, 63, 94, 0.46);
}

.app-file-upload__file--error .app-file-upload__file-icon {
    background: rgba(244, 63, 94, 0.12);
    border-color: rgba(244, 63, 94, 0.28);
    color: #fb7185;
}

.app-file-upload__file-error,
.app-file-upload__validation {
    color: #fb7185;
    font-size: 0.78rem;
    line-height: 1.45;
}

.app-file-upload__validation {
    margin: 0.5rem 0 0;
}

.inventory-import-file-upload-shell {
    width: 100%;
}

.inventory-import-file-dropzone {
    min-height: 7.4rem;
}

body.theme-light .app-file-upload__dropzone {
    background: #ffffff !important;
    border-color: rgba(15, 118, 110, 0.3) !important;
}

body.theme-light .app-upload-dropzone > .app-file-upload.app-file-upload {
    --cuc-file-upload-accent: var(--app-accent);
    --cuc-file-upload-bg: #ffffff;
    --cuc-file-upload-bg-hover: rgba(15, 118, 110, 0.04);
    --cuc-file-upload-border: rgba(15, 118, 110, 0.3);
    --cuc-file-upload-border-hover: rgba(15, 118, 110, 0.54);
    --cuc-file-upload-focus-ring: rgba(15, 118, 110, 0.1);
    --cuc-file-upload-text: var(--app-text);
    --cuc-file-upload-muted: var(--app-text-muted);
}

body.theme-light .app-file-upload__dropzone:hover,
body.theme-light .app-file-upload__dropzone:focus,
body.theme-light .app-file-upload__dropzone:focus-visible,
body.theme-light .app-file-upload__dropzone--dragging {
    background: rgba(15, 118, 110, 0.04) !important;
    border-color: rgba(15, 118, 110, 0.54) !important;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

body.theme-light .app-file-upload__icon,
body.theme-light .app-file-upload__file-icon {
    background: rgba(15, 118, 110, 0.1);
    border-color: rgba(15, 118, 110, 0.22);
    color: var(--app-accent);
}

body.theme-light .app-file-upload__file {
    background: rgba(15, 23, 42, 0.02);
}

.inventory-import-processing {
    align-items: center;
    background: color-mix(in srgb, var(--app-accent) 8%, var(--app-surface));
    border: 1px solid color-mix(in srgb, var(--app-accent) 28%, var(--app-border));
    border-radius: var(--app-control-radius);
    color: var(--app-text);
    display: flex;
    gap: 0.85rem;
    margin-top: 0.5rem;
    padding: 0.85rem 1rem;
}

.inventory-import-processing__copy {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.inventory-import-processing__title {
    color: var(--app-text);
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.35;
}

.inventory-import-processing__description {
    color: var(--app-text-soft);
    font-size: 0.82rem;
    line-height: 1.45;
}

body.theme-light .inventory-import-processing {
    background: rgba(15, 118, 110, 0.06);
    border-color: rgba(15, 118, 110, 0.24);
}

@media (min-width: 640px) {
    .app-ledger-header {
        align-items: center;
        flex-direction: row;
    }

    .app-ledger-actions {
        flex-direction: row;
        justify-content: flex-end;
        width: auto;
    }

    .app-ledger-header--date-range {
        align-items: flex-end;
        flex-wrap: wrap;
    }

    .app-ledger-header--date-range > :first-child {
        flex: 1 1 24rem;
    }

    .app-ledger-date-range {
        flex: 0 1 28rem;
        max-width: 32rem;
        min-width: min(100%, 20rem);
    }

    .app-ledger-icon-action {
        margin-left: 0;
    }

    .app-editor {
        gap: 1.15rem;
        padding: 1.25rem;
    }

    .app-editor__actions {
        flex-direction: row;
        justify-content: flex-end;
    }

    .app-editor__actions .compact-action,
    .app-editor__actions .mud-button-root {
        min-width: 120px;
        width: auto;
    }

    .app-editor--line-workflow .app-editor__actions {
        margin: 0 -1.25rem -1.25rem;
        padding: 1rem 1.25rem 1.25rem;
    }

    .app-editor--line-workflow .app-form {
        padding-bottom: 0.25rem;
    }
}

@media (max-width: 600px) {
    .tenant-navigation-row__body {
        align-items: flex-start;
        grid-template-columns: auto minmax(0, 1fr);
        padding: 0.85rem;
    }

    .tenant-navigation-row__toggle-placeholder,
    .tenant-navigation-row__icon {
        display: none;
    }

    .tenant-navigation-row__action {
        grid-column: 1 / -1;
        justify-content: flex-start;
        padding-left: 2.4rem;
    }

    .app-upload-dropzone .mud-file-upload .mud-paper {
        min-height: 5.75rem;
    }

    .app-upload-dropzone .mud-file-upload .text-center {
        min-height: 4.9rem !important;
    }

    .app-upload-dropzone .mud-file-upload .text-center .mud-typography-h6 {
        font-size: 0.82rem !important;
    }

    .inventory-import-mode-option {
        min-width: 0;
        width: 100%;
    }

    .app-file-upload__dropzone {
        min-height: 6.25rem;
        padding: 0.85rem !important;
    }

    .inventory-import-file-dropzone {
        min-height: 6.5rem;
    }

    .app-file-upload__state,
    .app-file-upload__file {
        align-items: flex-start;
        gap: 0.75rem;
    }

    .app-file-upload__icon,
    .app-file-upload__file-icon {
        height: 2.25rem;
        width: 2.25rem;
    }

    .app-file-upload__title,
    .app-file-upload__file-name {
        font-size: 0.88rem;
    }

    .app-file-upload__hint,
    .app-file-upload__file-meta {
        font-size: 0.76rem;
    }

    .inventory-import-processing {
        align-items: flex-start;
    }
}

@media (min-width: 1024px) {
    .app-metric-summary__grid {
        grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
    }
}

@media (min-width: 1280px) {
    .app-summary-grid {
        align-items: stretch;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .app-summary-grid .app-metric-summary__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.insight-grid {
    background: var(--app-surface);
    color: var(--app-text-soft);
    overflow: hidden;
    border-radius: var(--app-control-radius);
    border: 1px solid var(--app-border);
    border-top: 0;
    box-shadow: none;
    max-width: 100%;
    min-width: 0;
}

.insight-grid .mud-table-head,
.insight-grid .mud-table thead,
.insight-grid .mud-table-header,
.insight-grid .column-header,
.insight-grid .mud-table-container table thead tr,
.insight-grid .mud-table-container table thead th,
.insight-grid .table-head {
    background: var(--app-grid-header);
    border-top: 0;
}

.insight-grid .mud-table-head .mud-table-cell,
.insight-grid .mud-table thead .mud-table-cell,
.insight-grid .column-header,
.insight-grid .column-header-title,
.insight-grid .table-head,
.insight-grid .mud-table-container table thead th {
    color: var(--app-text-soft);
    font-size: 0.6875rem;
    font-weight: 650;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.insight-grid .mud-table-container {
    border-radius: var(--app-control-radius);
    max-width: 100%;
    overflow-x: auto;
}

.insight-grid .mud-table-root,
.insight-grid .mud-table,
.insight-grid .mud-data-grid {
    background: transparent;
}

.insight-grid .mud-table tbody tr,
.insight-grid .mud-table-body .mud-table-row {
    background: var(--app-grid-row);
}

.insight-grid .mud-table-body .mud-table-row:hover,
.insight-grid .mud-table-row:hover {
    background: var(--app-grid-row-hover);
}

.insight-grid .mud-table-cell,
.insight-grid .mud-table tbody td {
    border-bottom: 1px solid rgba(148, 163, 184, 0.12) !important;
    padding-bottom: 0.875rem;
    padding-top: 0.875rem;
}

.insight-grid .mud-icon-button,
.insight-grid .mud-button-root.mud-icon-button {
    background: var(--app-surface-strong);
    border: 1px solid var(--app-border);
    color: var(--app-text);
    height: 40px;
    padding: 0.45rem;
    width: 40px;
}

.insight-grid .mud-chip {
    border-color: rgba(103, 232, 249, 0.2);
}

.app-data-chip {
    background: var(--app-chip-bg) !important;
    border: 1px solid var(--app-chip-border) !important;
    border-radius: 999px !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
    color: var(--app-chip-color) !important;
    font-weight: 700 !important;
    min-height: 1.9rem;
    padding-inline: 0.15rem;
}

.app-data-chip .mud-chip-content {
    color: inherit !important;
    font-size: 0.78rem;
    letter-spacing: 0.01em;
    padding-inline: 0.45rem !important;
}

.inventory-line-count-chip {
    min-width: 2.35rem;
}

.app-inventory-detail {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.15rem;
    max-width: 100%;
    width: 100%;
}

.app-inventory-detail__header {
    align-items: flex-start;
    display: flex;
    gap: 0.85rem;
    justify-content: space-between;
    min-width: 0;
}

.app-inventory-detail__header-copy {
    min-width: 0;
}

.app-inventory-detail__header-status {
    align-items: flex-start;
    display: flex;
    flex: 0 0 auto;
    justify-content: flex-end;
    padding-right: 0.25rem;
    padding-top: 0.4rem;
}

.app-inventory-detail__summary {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.app-inventory-detail__item {
    padding: 0.72rem 0.78rem;
}

.app-inventory-detail__item strong {
    overflow-wrap: anywhere;
    white-space: normal;
}

.app-inventory-detail__section {
    border: 1px solid var(--app-border);
    border-radius: 0.5rem;
    overflow: hidden;
}

.app-inventory-detail__section-header {
    align-items: center;
    background: var(--app-surface-alt);
    border-bottom: 1px solid var(--app-border);
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
}

.app-inventory-detail__section-header p {
    color: var(--app-text);
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    margin: 0;
    text-transform: uppercase;
}

.app-inventory-detail__grid {
    border: 0 !important;
    border-radius: 0 !important;
}

.app-inventory-detail__status-cell {
    display: flex;
    justify-content: center;
    width: 100%;
}

@media (max-width: 640px) {
    .app-inventory-detail {
        padding: 1rem;
    }

    .app-inventory-detail__header {
        flex-direction: column;
    }

    .app-inventory-detail__header-status {
        justify-content: flex-start;
        padding-right: 0;
        padding-top: 0;
    }

    .app-inventory-detail__summary {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 641px) and (max-width: 960px) {
    .app-inventory-detail__summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.insight-grid .mud-icon-button:hover,
.insight-grid .mud-button-root.mud-icon-button:hover {
    background: var(--app-hover-surface);
    border-color: rgba(45, 212, 191, 0.2);
}

.header-center .column-header {
    display: flex !important;
    justify-content: center !important;
}

.insight-grid .mud-table-cell.header-center {
    text-align: center !important;
}

.header-right .column-header {
    display: flex !important;
    justify-content: flex-end !important;
}

.insight-grid .mud-table-cell.header-right {
    text-align: right !important;
}

.text-left {
    text-align: left !important;
}

.text-center {
    text-align: center !important;
}

.text-right {
    text-align: right !important;
}

.app-audit-cell {
    border-radius: 0.35rem;
    cursor: help;
    max-width: 100%;
    width: fit-content;
}

.app-audit-cell:focus-visible {
    outline: 2px solid rgba(45, 212, 191, 0.45);
    outline-offset: 3px;
}

.app-metadata-tooltip {
    color: #f8fafc;
    display: flex;
    flex-direction: column;
    font-size: 0.8125rem;
    gap: 0.25rem;
    line-height: 1.4;
    max-width: 16rem;
}

.app-metadata-tooltip strong {
    color: #f8fafc;
    font-weight: 800;
}

.insight-grid .text-right .mud-icon-button,
.insight-grid td.text-right .mud-icon-button {
    margin-left: auto;
}

.import-correction-history-row {
    cursor: pointer;
}

.import-correction-history-row.is-selected {
    background: rgba(15, 118, 110, 0.10) !important;
    box-shadow: inset 3px 0 0 #0f766e;
}

.import-correction-selected-indicator.is-selected {
    background: var(--app-chip-bg) !important;
    border-color: var(--app-chip-border) !important;
    color: var(--app-chip-color) !important;
}

.insight-grid .app-options-cell {
    align-items: center;
    display: inline-flex;
    gap: 0.1rem;
    justify-content: flex-end;
    margin-left: auto;
    width: auto;
}

.app-association-list {
    align-items: stretch;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.app-association-item {
    align-items: center;
    background: var(--app-surface-soft);
    border: 1px solid var(--app-border);
    border-radius: var(--app-control-radius);
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    min-width: 0;
    padding: 0.55rem 0.65rem;
}

.app-association-item__body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.app-association-item__title,
.app-association-item__meta {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-association-item__title {
    color: var(--app-text);
    font-size: 0.86rem;
    font-weight: 650;
}

.app-association-item__meta {
    color: var(--app-text-muted);
    font-size: 0.75rem;
}

.mud-menu .mud-paper,
.mud-popover .mud-paper {
    background: var(--app-menu-bg);
    border: 1px solid var(--app-border);
    border-radius: var(--app-control-radius);
    box-shadow: 0 16px 36px var(--app-shadow);
    color: var(--app-text-soft);
}

.mud-menu .mud-list,
.mud-popover .mud-list {
    padding: 0.35rem;
}

.mud-menu .mud-list-item,
.mud-popover .mud-list-item {
    border-radius: 8px;
    color: var(--app-text-soft);
    font-weight: 550;
    min-height: 44px;
}

.mud-menu .mud-list-item:hover,
.mud-popover .mud-list-item:hover {
    background: var(--app-hover-surface);
}

.mud-menu .mud-list-item-icon,
.mud-menu .mud-list-item-icon .mud-icon-root,
.mud-popover .mud-list-item-icon,
.mud-popover .mud-list-item-icon .mud-icon-root {
    color: var(--app-accent);
    margin-right: 0.85rem;
}

.mud-dialog {
    background: var(--app-dialog-bg);
    border: 1px solid var(--app-border-strong);
    border-radius: var(--app-panel-radius);
    box-shadow: 0 22px 56px var(--app-shadow);
    overflow: hidden;
}

.mud-dialog .mud-dialog-title {
    align-items: center;
    background: var(--app-dialog-title-bg);
    border-bottom: 1px solid var(--app-border);
    color: var(--app-text);
    display: flex;
    font-size: 1rem;
    font-weight: 650;
    letter-spacing: -0.01em;
    min-height: 56px;
    padding: 0.85rem 1.1rem;
}

.mud-dialog .mud-dialog-content {
    background: transparent;
    color: var(--app-text-soft);
    padding: 1.25rem 1.25rem 1.35rem;
}

.mud-dialog .mud-dialog-content > .pt-2 {
    padding: 0;
}

.mud-dialog .mud-dialog-content > .pt-2 h6 {
    color: var(--app-text);
    font-weight: 800;
    margin: 0 0 0.65rem;
}

.mud-dialog .mud-dialog-content > .pt-2 p {
    color: var(--app-text-soft);
    line-height: 1.65;
    margin: 0;
}

.mud-dialog:has(.app-editor) {
    max-height: calc(100dvh - 1.5rem);
    overflow-y: auto;
}

.mud-dialog .mud-dialog-content:has(.app-editor) {
    max-height: calc(100dvh - 5rem);
    overflow-y: auto;
}

.mud-dialog > .mud-container > .mud-paper,
.mud-dialog > .mud-container > div > .mud-paper,
.mud-dialog .mud-dialog-content > .mud-container > .mud-paper,
.mud-dialog .mud-dialog-content > .mud-container > div > .mud-paper {
    margin: 10px;
}

.mud-dialog:has(.app-editor) .mud-dialog-content > .mud-container > .mud-paper {
    margin: 0;
}

.mud-dialog:has(> .mud-container > .app-dialog-shell--natural),
.mud-dialog:has(.mud-dialog-content > .mud-container > .app-dialog-shell--natural) {
    max-height: none;
    overflow: visible;
}

.mud-dialog-container:has(> .mud-dialog > .mud-container > .app-dialog-shell--natural),
.mud-dialog-container:has(> .mud-dialog > .mud-dialog-content > .mud-container > .app-dialog-shell--natural) {
    overflow-y: auto;
    padding-bottom: 2rem;
}

.app-dialog-shell--natural > .mud-grid > .mud-grid-item {
    padding-top: 0;
}

.mud-dialog .mud-dialog-actions {
    background: transparent;
    border-top: 1px solid var(--app-border);
    gap: 0.75rem;
    justify-content: flex-end;
    padding: 1rem 1.35rem 1.35rem;
}

.mud-dialog .mud-dialog-actions .mud-button-root {
    border-radius: var(--app-control-radius);
    font-weight: 650;
    min-height: 44px;
    min-width: 120px;
}

.mud-dialog .mud-dialog-actions .mud-button-text {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    color: var(--app-text-soft);
}

.mud-dialog .mud-dialog-actions .mud-button-text:hover {
    background: var(--app-hover-surface);
}

.mud-dialog .mud-button-close {
    color: var(--app-text-soft);
}

.mud-dialog .mud-button-close:hover {
    background: var(--app-hover-surface);
    color: var(--app-text);
}

.mud-file-upload .mud-typography-h6 {
    font-size: 0.72rem;
    line-height: 1.25;
    max-width: 100%;
    white-space: nowrap;
}

.mud-file-upload .mud-paper-outlined .d-flex.align-center.mb-2 > .me-1 {
    background-color: var(--app-surface-alt) !important;
    border: 1px solid var(--app-border);
}

.mud-file-upload .mud-paper-outlined .d-flex.align-center.mb-2 > .me-1 .mud-icon-root {
    color: var(--app-text-soft) !important;
}

.import-transaction-modal {
    gap: 1.4rem;
}

.import-transaction-dialog-shell {
    max-height: calc(100dvh - 4rem);
    overflow-y: auto;
}

.import-template-card__copy {
    min-width: 0;
}

.import-template-card__copy span {
    overflow-wrap: anywhere;
}

.import-upload-panel {
    padding: 1.35rem !important;
}

.import-upload-dropzone .mud-file-upload .mud-paper {
    border-radius: 1.15rem !important;
    min-height: 8.5rem;
}

.import-upload-dropzone .mud-file-upload .text-center {
    justify-content: center;
    min-height: 7.5rem !important;
}

.import-upload-dropzone .mud-file-upload .text-center .mud-icon-root {
    font-size: 2.25rem !important;
    height: 2.25rem !important;
    width: 2.25rem !important;
}

.import-upload-dropzone .mud-file-upload .text-center .mud-typography-h6 {
    font-size: 1.15rem !important;
    font-weight: 500;
    line-height: 1.4;
}

@media (max-width: 600px) {
    .import-transaction-dialog-shell {
        max-height: calc(100dvh - 1.5rem);
        padding: 0.35rem !important;
    }

    .import-transaction-surface {
        border-radius: 1.25rem !important;
        padding: 1rem !important;
    }

    .import-transaction-modal {
        gap: 1rem;
    }

    .import-template-card {
        border-radius: 1rem !important;
        padding: 1rem !important;
    }

    .import-template-card__content {
        align-items: flex-start !important;
        gap: 0.85rem !important;
    }

    .import-template-card__icon {
        border-radius: 0.85rem !important;
        padding: 0.65rem !important;
    }

    .import-upload-panel {
        border-radius: 1.15rem !important;
        padding: 1rem !important;
    }

    .import-upload-dropzone .mud-file-upload .mud-paper {
        border-radius: 1rem !important;
        min-height: 8rem;
    }

    .import-upload-dropzone .mud-file-upload .text-center {
        min-height: 7rem !important;
        padding-inline: 1rem !important;
    }
}

body.theme-dark .mud-picker-calendar button.mud-picker-calendar-day.mud-range-between,
body.theme-dark .mud-picker-calendar button.mud-day.mud-range-between {
    background-color: rgba(45, 212, 191, 0.16) !important;
    color: var(--app-text) !important;
}

body.theme-dark .mud-picker-calendar button.mud-picker-calendar-day.mud-range-start-selected,
body.theme-dark .mud-picker-calendar button.mud-picker-calendar-day.mud-range-end-selected {
    background: transparent !important;
}

.compact-action,
.compact-action.mud-button-root {
    border-radius: var(--app-control-radius);
    font-weight: 650;
    min-height: 44px;
    padding-inline: 1rem;
}

.app-stat-grid {
    display: grid;
    gap: 0.75rem;
}

.app-stat-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 5.5rem;
}

.app-compact-switch {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    margin: 0;
}

.app-compact-switch .mud-input-label {
    display: none;
}

.app-compact-switch .mud-input-control,
.app-compact-switch .mud-input-control-input-container,
.app-compact-switch .mud-switch {
    margin: 0 !important;
}

.app-compact-switch .mud-switch-base,
.app-compact-switch .mud-switch-button {
    padding: 0 !important;
}

.app-compact-switch .mud-switch-button {
    margin-top: 11px;
}

.app-compact-switch .mud-switch-base {
    background: transparent !important;
    border: 0 !important;
    border-radius: 999px !important;
    box-shadow: none !important;
    color: #f8fafc !important;
    height: 32px !important;
    inset: 0 auto auto 6px !important;
    min-height: 32px !important;
    min-width: 32px !important;
    width: 32px !important;
}

.app-compact-switch .mud-switch-base.mud-checked {
    color: #14b8a6 !important;
}

.insight-grid .app-compact-switch .mud-icon-button,
.insight-grid .app-compact-switch .mud-button-root.mud-icon-button {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    height: 32px !important;
    min-height: 32px !important;
    min-width: 32px !important;
    padding: 0 !important;
    width: 32px !important;
}

.app-compact-switch .mud-switch-track {
    background: #475569 !important;
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 999px;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.24), 0 0 0 1px rgba(15, 23, 42, 0.04);
    opacity: 1 !important;
}

.app-compact-switch .mud-switch-track.mud-success {
    background: #0f766e !important;
    border-color: rgba(45, 212, 191, 0.46);
}

.app-compact-switch .mud-switch-thumb,
.app-compact-switch .mud-switch-thumb-medium,
.app-compact-switch .mud-switch-thumb-small {
    background: #f8fafc !important;
    border: 1px solid rgba(100, 116, 139, 0.18);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.24);
}

.tenant-user-assign-slot {
    align-items: flex-end;
    display: flex;
    justify-content: flex-end;
}

.tenant-user-assign-button,
.tenant-user-assign-button.mud-button-root {
    height: 44px !important;
    min-height: 44px !important;
    padding-block: 0 !important;
    white-space: nowrap !important;
    width: 100%;
}

.navigation-tree-cell {
    align-items: center;
    display: flex;
    gap: 0.65rem;
}

.navigation-tree-toggle,
.navigation-tree-toggle.mud-button-root.mud-icon-button {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    color: var(--app-text-soft);
    flex: 0 0 auto;
    height: 1.9rem;
    width: 1.9rem;
}

.navigation-tree-toggle .mud-icon-root {
    transition: transform 0.18s ease;
}

.navigation-tree-toggle--expanded .mud-icon-root {
    transform: rotate(180deg);
}

.navigation-tree-toggle-placeholder {
    display: inline-flex;
    flex: 0 0 auto;
    width: 1.9rem;
}

.tenant-navigation-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    justify-content: flex-end;
}

@media (min-width: 960px) {
    .app-stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tenant-user-assign-button,
    .tenant-user-assign-button.mud-button-root {
        min-width: 172px;
        width: 172px;
    }
}

@media (min-width: 1024px) {
    .summary-metric-strip-skeleton {
        align-items: start;
        grid-template-columns: minmax(13rem, 0.95fr) minmax(0, 3.05fr);
    }

    .summary-metric-strip-skeleton__header {
        display: grid;
        gap: 0.48rem;
    }

    .summary-metric-strip-skeleton__pill {
        width: 7.5rem;
    }

    .kpi-comparison-strip {
        align-items: start;
        grid-template-columns: minmax(13rem, 0.95fr) minmax(0, 3.05fr);
    }

    .kpi-comparison-strip__header {
        display: grid;
        gap: 0.48rem;
    }

    .kpi-comparison-strip__header > span {
        width: fit-content;
    }

    .kpi-dashboard-grid {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }

    .analytics-panel-grid-skeleton {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }

    .kpi-chart-card {
        grid-column: span 6;
    }

    .analytics-panel-grid-skeleton__panel {
        grid-column: span 6;
    }

    .kpi-dashboard-grid .is-wide {
        grid-column: span 12;
    }

    .kpi-dashboard-grid--1 > .kpi-chart-card {
        grid-column: span 12;
    }

    .kpi-dashboard-grid--2 > .kpi-chart-card {
        grid-column: span 6;
    }

    .kpi-dashboard-grid--3.kpi-dashboard-grid--wide-0 > .kpi-chart-card,
    .kpi-dashboard-grid--3.kpi-dashboard-grid--wide-2 > .kpi-chart-card,
    .kpi-dashboard-grid--3.kpi-dashboard-grid--wide-3 > .kpi-chart-card {
        grid-column: span 4;
    }

    .kpi-dashboard-grid--3.kpi-dashboard-grid--wide-1 > .is-wide {
        grid-column: span 12;
    }

    .kpi-dashboard-grid--3.kpi-dashboard-grid--wide-1 > .kpi-chart-card:not(.is-wide) {
        grid-column: span 6;
    }

    .kpi-dashboard-grid--4.kpi-dashboard-grid--wide-0 > .kpi-chart-card,
    .kpi-dashboard-grid--4.kpi-dashboard-grid--wide-2 > .kpi-chart-card:not(.is-wide) {
        grid-column: span 6;
    }

    .kpi-dashboard-grid--4.kpi-dashboard-grid--wide-1 > .is-wide,
    .kpi-dashboard-grid--4.kpi-dashboard-grid--wide-2 > .is-wide {
        grid-column: span 12;
    }

    .kpi-dashboard-grid--4.kpi-dashboard-grid--wide-1 > .kpi-chart-card:not(.is-wide) {
        grid-column: span 4;
    }

    .kpi-dashboard-grid--5.kpi-dashboard-grid--wide-1 > .is-wide,
    .kpi-dashboard-grid--5.kpi-dashboard-grid--wide-2 > .is-wide,
    .kpi-dashboard-grid--6.kpi-dashboard-grid--wide-2 > .is-wide {
        grid-column: span 12;
    }

    .kpi-dashboard-grid--5.kpi-dashboard-grid--wide-1 > .kpi-chart-card:not(.is-wide),
    .kpi-dashboard-grid--6.kpi-dashboard-grid--wide-2 > .kpi-chart-card:not(.is-wide) {
        grid-column: span 6;
    }

    .kpi-dashboard-grid--5.kpi-dashboard-grid--wide-2 > .kpi-chart-card:not(.is-wide) {
        grid-column: span 4;
    }

    .analytics-panel-grid-skeleton__panel.is-wide {
        grid-column: span 12;
    }
}

@media (min-width: 1360px) {
    .kpi-chart-card {
        grid-column: span 4;
    }

    .analytics-panel-grid-skeleton__panel {
        grid-column: span 4;
    }

    .kpi-dashboard-grid .is-wide {
        grid-column: span 8;
    }

    .analytics-panel-grid-skeleton__panel.is-wide {
        grid-column: span 8;
    }
}

@media (min-width: 1360px) {
    .kpi-dashboard-grid .is-wide,
    .kpi-dashboard-grid--1 > .kpi-chart-card,
    .kpi-dashboard-grid--3.kpi-dashboard-grid--wide-1 > .is-wide,
    .kpi-dashboard-grid--3.kpi-dashboard-grid--wide-2 > .is-wide,
    .kpi-dashboard-grid--4.kpi-dashboard-grid--wide-1 > .is-wide,
    .kpi-dashboard-grid--4.kpi-dashboard-grid--wide-2 > .is-wide,
    .kpi-dashboard-grid--5.kpi-dashboard-grid--wide-1 > .is-wide,
    .kpi-dashboard-grid--5.kpi-dashboard-grid--wide-2 > .is-wide,
    .kpi-dashboard-grid--6.kpi-dashboard-grid--wide-2 > .is-wide {
        grid-column: span 12;
    }

    .kpi-dashboard-grid--2.kpi-dashboard-grid--wide-0 > .kpi-chart-card,
    .kpi-dashboard-grid--3.kpi-dashboard-grid--wide-1 > .kpi-chart-card:not(.is-wide),
    .kpi-dashboard-grid--4.kpi-dashboard-grid--wide-0 > .kpi-chart-card,
    .kpi-dashboard-grid--4.kpi-dashboard-grid--wide-2 > .kpi-chart-card:not(.is-wide),
    .kpi-dashboard-grid--5.kpi-dashboard-grid--wide-1 > .kpi-chart-card:not(.is-wide),
    .kpi-dashboard-grid--6.kpi-dashboard-grid--wide-2 > .kpi-chart-card:not(.is-wide) {
        grid-column: span 6;
    }

    .kpi-dashboard-grid--3.kpi-dashboard-grid--wide-0 > .kpi-chart-card,
    .kpi-dashboard-grid--4.kpi-dashboard-grid--wide-1 > .kpi-chart-card:not(.is-wide),
    .kpi-dashboard-grid--5.kpi-dashboard-grid--wide-2 > .kpi-chart-card:not(.is-wide) {
        grid-column: span 4;
    }

    .kpi-dashboard-grid--2.kpi-dashboard-grid--wide-1 > .kpi-chart-card:not(.is-wide),
    .kpi-dashboard-grid--3.kpi-dashboard-grid--wide-2 > .kpi-chart-card:not(.is-wide) {
        grid-column: span 12;
    }
}

@media (max-width: 980px) {
    .summary-metric-strip-skeleton__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kpi-comparison-strip__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .kpi-filter-actions {
        align-items: stretch;
        flex-direction: column;
        justify-content: stretch;
    }

    .kpi-filter-actions__compare {
        width: 100%;
    }

    .kpi-filter-actions__submit,
    .kpi-filter-actions__submit.mud-button-root {
        width: 100%;
    }

    .kpi-comparison-strip__header {
        flex-direction: column;
    }

    .kpi-comparison-strip__header > span {
        width: fit-content;
    }

    .kpi-comparison-strip__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .summary-metric-strip-skeleton__header {
        flex-direction: column;
    }

    .summary-metric-strip-skeleton__pill {
        width: 7.5rem;
    }

    .summary-metric-strip-skeleton__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .kpi-chart-card {
        min-height: 0;
        padding: 0.78rem;
    }

    .analytics-panel-grid-skeleton__panel {
        min-height: 0;
        padding: 0.78rem;
    }

    .analytics-panel-grid-skeleton__header {
        flex-direction: column;
    }

    .analytics-panel-grid-skeleton__header > div {
        width: 100%;
    }

    .analytics-panel-grid-skeleton__badge {
        width: 6.2rem;
    }

    .analytics-panel-grid-skeleton__plot,
    .analytics-panel-grid-skeleton__plot svg {
        min-height: 9.8rem;
    }

    .kpi-chart-card__header,
    .kpi-ranking-list__meta,
    .kpi-expense-split__meta,
    .kpi-budget-list__meta,
    .kpi-risk-matrix__meta {
        align-items: stretch;
        flex-direction: column;
    }

    .kpi-chart-card__badge {
        max-width: 100%;
        width: fit-content;
    }

    .kpi-ranking-list__meta strong,
    .kpi-expense-split__meta strong,
    .kpi-budget-list__meta strong,
    .kpi-risk-matrix__meta strong {
        max-width: 100%;
        text-align: left;
        white-space: normal;
    }

    .kpi-chart-stage,
    .kpi-svg-chart {
        min-height: 9.8rem;
    }
}

@media (max-width: 480px) {
    .kpi-chart-tooltip-trigger.is-mobile-start .kpi-chart-tooltip {
        left: 0;
        transform: translateX(0);
    }

    .kpi-chart-tooltip-trigger.is-mobile-end .kpi-chart-tooltip {
        left: auto;
        right: 0;
        transform: translateX(0);
    }

    .kpi-chart-tooltip-trigger.is-mobile-start:hover .kpi-chart-tooltip,
    .kpi-chart-tooltip-trigger.is-mobile-start:focus .kpi-chart-tooltip,
    .kpi-chart-tooltip-trigger.is-mobile-end:hover .kpi-chart-tooltip,
    .kpi-chart-tooltip-trigger.is-mobile-end:focus .kpi-chart-tooltip {
        transform: translateX(0) translateY(-0.12rem);
    }

    .kpi-ledger-surface .app-date-range input[id$='-start'],
    .kpi-ledger-surface .app-date-range input[id$='-end'] {
        font-size: 0.82rem !important;
        padding-left: 0.5rem !important;
    }

    .kpi-ledger-surface .app-date-range .mud-range-input-separator {
        height: 1rem;
        width: 1rem;
    }

    .kpi-ledger-surface .app-date-range .mud-input-adornment {
        margin-left: 0.15rem;
    }

    .kpi-ledger-surface .app-date-range .mud-input-adornment-icon-button {
        padding: 0.35rem;
    }
}

.settings-reset-action-slot {
    align-items: flex-end;
    display: flex;
}

.settings-reset-action-button,
.settings-reset-action-button.mud-button-root {
    height: 56px;
}

.responsive-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    width: 100%;
}

.responsive-actions > * {
    flex: 1 1 100%;
}

.ai-signal-list-shell {
    margin-top: 1rem;
    max-height: 17rem;
    overflow-y: auto;
    padding-right: 0.35rem;
}

.ai-signal-list-shell::-webkit-scrollbar {
    width: 8px;
}

.ai-signal-list-shell::-webkit-scrollbar-thumb {
    background: rgba(71, 85, 105, 0.9);
    border-radius: 999px;
}

body.theme-light .text-white,
body.theme-light .text-slate-50 {
    color: #0f172a !important;
}

body.theme-light .text-slate-300 {
    color: #334155 !important;
}

body.theme-light .text-slate-400 {
    color: #64748b !important;
}

body.theme-light .bg-slate-900\/70,
body.theme-light .bg-slate-900\/80,
body.theme-light .bg-slate-900\/90,
body.theme-light .bg-slate-950\/70,
body.theme-light .bg-slate-950\/90,
body.theme-light .bg-slate-950\/95 {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.96)) !important;
}

body.theme-light .bg-white\/5 {
    background: rgba(255, 255, 255, 0.92) !important;
}

body.theme-light .border-white\/10 {
    border-color: rgba(148, 163, 184, 0.22) !important;
}

body.theme-light .app-nav .mud-nav-link:hover {
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(15, 118, 110, 0.22);
    color: #0f172a;
}

body.theme-light .app-nav .mud-nav-link.active,
body.theme-light .app-nav .mud-nav-link.active:hover {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.16), rgba(255, 255, 255, 0.98));
    border-color: rgba(13, 148, 136, 0.42);
    color: #0f766e;
}

body.theme-light .app-nav .mud-nav-link,
body.theme-light .app-nav .mud-nav-group {
    color: #1e293b;
}

body.theme-light .app-nav .mud-nav-link.active .mud-icon-root,
body.theme-light .app-nav .mud-nav-link.active .mud-nav-link-text {
    color: #0f766e !important;
}

body.theme-light .shadow-xl,
body.theme-light .shadow-2xl {
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.07) !important;
}

body.theme-light .text-teal-300,
body.theme-light .text-teal-400 {
    color: #0f766e !important;
}

body.theme-light .text-teal-200 {
    color: #0f766e !important;
}

body.theme-light .text-cyan-300 {
    color: #0369a1 !important;
}

body.theme-light .text-orange-300 {
    color: #c2410c !important;
}

body.theme-light .mud-main-content,
body.theme-light .content-shell {
    background: transparent !important;
}

body.theme-light .mud-paper {
    color: var(--app-text);
}

body.theme-light .mud-input-control .mud-input-label,
body.theme-light .mud-input-control-input-container .mud-input-slot,
body.theme-light .mud-input-slot,
body.theme-light .mud-select-input,
body.theme-light .mud-input > input,
body.theme-light .mud-input textarea {
    color: #0f172a !important;
}

body.theme-light .mud-input-control .mud-input-label {
    color: #475569 !important;
}

body.theme-light .mud-input-outlined-border,
body.theme-light .mud-input-control .mud-input-outlined-border {
    border-color: rgba(148, 163, 184, 0.42) !important;
}

body.theme-light .mud-input-control:hover .mud-input-outlined-border,
body.theme-light .mud-input-control.mud-input-focused .mud-input-outlined-border {
    border-color: rgba(15, 118, 110, 0.48) !important;
}

.reports-summary-tabs .mud-tabs-tabbar {
    background: transparent !important;
    border-bottom: 1px solid var(--app-border);
    border-radius: 0;
    box-shadow: none;
}

.reports-summary-tabs .mud-tab {
    min-height: 3rem;
}

body.theme-light .reports-summary-tabs .mud-tabs-tabbar {
    background: transparent !important;
    border-bottom-color: rgba(148, 163, 184, 0.28);
}

body.theme-light .mud-tab {
    color: #475569 !important;
}

body.theme-light .mud-tab.mud-tab-active {
    color: #0f172a !important;
}

body.theme-light .reports-filter-panel {
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

body.theme-light .app-filter-panel {
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

body.theme-light .reports-filter-panel .mud-input-control .mud-input-label,
body.theme-light .reports-filter-panel .mud-input-control .mud-input-label-inputcontrol,
body.theme-light .reports-filter-panel .mud-input-control .mud-input-label-animated {
    color: #475569 !important;
}

body.theme-light .app-metric-summary {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

body.theme-light .app-metric-summary__grid {
    background: rgba(148, 163, 184, 0.26);
    border-top-color: rgba(148, 163, 184, 0.26);
}

body.theme-light .app-metric-summary__item {
    background: rgba(248, 250, 252, 0.82);
}

body.theme-light .app-metric-summary__header-chip {
    background: rgba(248, 250, 252, 0.95);
}

body.theme-light .insight-grid {
    background: rgba(255, 255, 255, 0.98);
    color: var(--app-text);
}

body.theme-light .insight-grid .mud-table tbody tr,
body.theme-light .insight-grid .mud-table-body .mud-table-row {
    background: rgba(255, 255, 255, 0.98);
    color: var(--app-text);
}

body.theme-light .insight-grid .mud-table-cell,
body.theme-light .insight-grid .mud-table tbody td,
body.theme-light .insight-grid .mud-table-cell::before,
body.theme-light .insight-grid .mud-table-cell .column-value,
body.theme-light .insight-grid .mud-table-cell .column-header,
body.theme-light .insight-grid .mud-table-cell .column-header-title {
    color: var(--app-text) !important;
}

body.theme-light .insight-grid .mud-table-head,
body.theme-light .insight-grid .mud-table thead,
body.theme-light .insight-grid .mud-table-header,
body.theme-light .insight-grid .column-header,
body.theme-light .insight-grid .mud-table-container table thead tr,
body.theme-light .insight-grid .mud-table-container table thead th,
body.theme-light .insight-grid .table-head {
    background: var(--app-grid-header);
    color: var(--app-text-soft) !important;
}

body.theme-light .insight-grid .mud-table-cell {
    border-bottom-color: rgba(148, 163, 184, 0.18) !important;
}

body.theme-light .insight-grid .mud-table-body .mud-table-row:hover,
body.theme-light .insight-grid .mud-table-row:hover {
    background: var(--app-grid-row-hover);
}

body.theme-light .mud-chip {
    background: rgba(255, 255, 255, 0.94) !important;
    color: #0f172a !important;
}

body.theme-light .app-data-chip {
    background: var(--app-chip-bg-light) !important;
    border-color: var(--app-chip-border-light) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), 0 1px 1px rgba(15, 23, 42, 0.04);
    color: var(--app-chip-color) !important;
}

body.theme-light .import-correction-history-row.is-selected {
    background: rgba(15, 118, 110, 0.08) !important;
}

body.theme-light .import-correction-selected-indicator.is-selected {
    background: var(--app-chip-bg-light) !important;
    border-color: var(--app-chip-border-light) !important;
    color: var(--app-chip-color) !important;
}

body.theme-light .app-compact-switch .mud-switch-track {
    background: #94a3b8 !important;
    border-color: rgba(71, 85, 105, 0.44);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.5);
}

body.theme-light .app-compact-switch .mud-switch-base {
    color: #ffffff !important;
}

body.theme-light .app-compact-switch .mud-switch-track.mud-success {
    background: #0f766e !important;
    border-color: rgba(13, 148, 136, 0.42);
}

body.theme-light .app-compact-switch .mud-switch-thumb,
body.theme-light .app-compact-switch .mud-switch-thumb-medium,
body.theme-light .app-compact-switch .mud-switch-thumb-small {
    background: #ffffff !important;
    border-color: rgba(148, 163, 184, 0.4);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.16);
}

body.theme-light .mud-list {
    color: var(--app-text);
}

body.theme-light .mud-chart-serie,
body.theme-light .mud-chart-legend text,
body.theme-light .mud-chart-axis text {
    color: #334155 !important;
    fill: #334155 !important;
}

body.theme-light .platform-hero,
body.theme-light .anomaly-hero {
    background:
        radial-gradient(circle at top left, rgba(6, 182, 212, 0.1), transparent 28%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.98)) !important;
    border-color: rgba(125, 211, 252, 0.32) !important;
    box-shadow: 0 22px 44px rgba(15, 23, 42, 0.08) !important;
}

body.theme-light .platform-hero .text-white,
body.theme-light .anomaly-hero .text-white {
    color: #0f172a !important;
}

body.theme-light .platform-hero .text-slate-300,
body.theme-light .anomaly-hero .text-slate-300 {
    color: #475569 !important;
}

body.theme-light .platform-hero .bg-white\/5,
body.theme-light .anomaly-hero .bg-white\/5 {
    background: rgba(255, 255, 255, 0.96) !important;
}

body.theme-light .role-directory-card {
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.98)) !important;
    border-color: rgba(148, 163, 184, 0.2) !important;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08) !important;
}

body.theme-light .role-member-card {
    background: rgba(255, 255, 255, 0.98) !important;
    border-color: rgba(148, 163, 184, 0.18) !important;
}

body.theme-light .insight-grid .mud-table-cell,
body.theme-light .insight-grid .mud-table tbody td {
    border-bottom-color: rgba(148, 163, 184, 0.16);
}

@media (min-width: 640px) {
    .responsive-actions > * {
        flex: 0 0 auto;
    }
}

@media (max-width: 1024px) {
    .app-metric-summary__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .app-metric-summary.has-odd-items .app-metric-summary__item:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .app-metric-summary__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .app-metric-summary.has-odd-items .app-metric-summary__item:last-child {
        grid-column: auto;
    }

    .reports-filter-panel {
        padding: 0.75rem;
    }

    /* Keep the complete four-digit years visible in the compact range control. */
    .app-filter-panel .app-date-range input[id$='-start'],
    .app-filter-panel .app-date-range input[id$='-end'] {
        font-size: 0.8125rem !important;
        letter-spacing: -0.02em;
        padding-left: 0.5rem !important;
    }

    .app-metric-summary__header,
    .app-metric-summary__item {
        padding-inline: 1rem;
    }
}

@media (max-width: 768px) {
    .app-metric-summary__header {
        align-items: flex-start !important;
        flex-direction: column !important;
    }

    .app-metric-summary__header-chip {
        max-width: 100%;
        width: fit-content;
    }

    .app-topbar {
        gap: 0.4rem;
        padding-block: 0.4rem;
    }

    .app-topbar .mud-spacer,
    .app-topbar .flex-grow-1 {
        display: none;
    }

    .content-shell {
        padding: 1rem;
    }

    .topbar-meta {
        display: flex;
        flex: 1 1 auto;
        gap: 0.2rem;
        justify-content: flex-start;
        margin-left: 0;
        min-width: 0;
        padding-left: 0.5rem;
    }

    .topbar-meta > .mud-input-label {
        display: none !important;
    }

    .topbar-menu-button,
    .topbar-menu-button.mud-icon-button {
        display: inline-flex;
    }

    .topbar-brand__title {
        display: none;
    }

    .topbar-brand__mark {
        display: none;
    }

    .tenant-switcher {
        flex: 1 1 auto;
        min-width: 0 !important;
        max-width: none;
        width: auto;
    }

    .tenant-switcher .mud-input-control {
        margin-block: 0 !important;
        width: 100%;
    }

    .tenant-switcher .mud-input-control-input-container,
    .tenant-switcher .mud-input,
    .tenant-switcher .mud-select-input,
    .tenant-switcher .mud-input-slot[tabindex="0"] {
        height: 40px !important;
        min-height: 40px !important;
    }

    .tenant-switcher .mud-input {
        align-items: center;
        display: flex !important;
        width: 100% !important;
    }

    .tenant-switcher .mud-input-slot {
        align-items: center;
        height: 40px;
        min-height: 40px;
        padding-inline: 0.7rem !important;
    }

    .tenant-switcher .mud-input-slot[tabindex="0"] {
        align-items: center !important;
        display: flex !important;
        flex: 1 1 auto;
        justify-content: flex-start !important;
        width: 100% !important;
        line-height: 1 !important;
        overflow: hidden;
        padding-block: 0 !important;
    }

    .tenant-switcher .mud-select-input,
    .tenant-switcher .mud-input > input {
        flex: 1 1 auto;
        font-size: 0.92rem;
        line-height: 1.1;
        max-width: none !important;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .tenant-switcher .mud-input-adornment {
        align-items: center;
        display: inline-flex;
        height: 40px;
        margin-left: auto;
    }

    .tenant-switcher .mud-input-outlined-border {
        inset: 0 !important;
    }

    .theme-toggle-button,
    .theme-toggle-button.mud-icon-button {
        height: 40px;
        min-height: 40px;
        width: 40px;
    }

    .language-trigger__meta {
        display: none;
    }

    .language-trigger {
        gap: 0;
        min-height: 40px;
        padding: 0.2rem;
        width: 40px;
    }

    .language-trigger__flag {
        height: 1.2rem;
        width: 1.2rem;
    }

    .profile-trigger {
        gap: 0;
        min-height: 40px;
        padding: 0.2rem;
        width: 40px;
    }

    .profile-trigger__role,
    .profile-trigger__meta {
        display: none;
    }

    .profile-trigger__avatar {
        height: 1.45rem;
        width: 1.45rem;
    }

    .mud-dialog {
        margin: 0.75rem;
        width: calc(100vw - 1.5rem);
    }

    .insight-grid .mud-table-cell,
    .insight-grid .mud-table tbody td {
        padding-bottom: 0.85rem;
        padding-top: 0.85rem;
    }
}

.app-account-view {
    display: grid;
    gap: 1.5rem;
}

.app-account-header {
    align-items: flex-end;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.app-account-header h1 {
    color: var(--app-text);
    font-size: clamp(1.9rem, 2vw, 2.45rem);
    font-weight: 900;
    line-height: 1.08;
    margin: 0.35rem 0 0;
}

.app-account-header p {
    color: var(--app-text-soft);
    line-height: 1.65;
    margin: 0.65rem 0 0;
    max-width: 56rem;
}

.app-account-eyebrow,
.app-tfa-eyebrow {
    color: #0891b2;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    margin: 0;
    text-transform: uppercase;
}

.app-tfa-status {
    align-items: center;
    background: rgba(20, 184, 166, 0.12);
    border: 1px solid rgba(20, 184, 166, 0.24);
    border-radius: 999px;
    color: var(--app-text);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.82rem;
    font-weight: 800;
    gap: 0.5rem;
    min-height: 2.25rem;
    padding: 0.45rem 0.8rem;
}

.app-tfa-status span {
    background: #14b8a6;
    border-radius: 999px;
    display: inline-flex;
    height: 0.55rem;
    width: 0.55rem;
}

.app-account-shell {
    background: var(--app-surface) !important;
    border: 1px solid var(--app-border);
    border-radius: var(--app-panel-radius);
    box-shadow: 0 24px 48px var(--app-shadow);
    overflow: hidden;
}

.app-account-layout {
    display: grid;
    grid-template-columns: minmax(15rem, 17rem) minmax(0, 1fr);
    min-height: 40.5rem;
}

.app-account-sidebar {
    background: var(--app-surface-soft);
    border-right: 1px solid var(--app-border);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-width: 0;
    padding: 1.1rem;
}

.app-account-sidebar-user {
    align-items: center;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 1rem;
    display: flex;
    gap: 0.85rem;
    min-width: 0;
    padding: 0.85rem;
}

.app-account-avatar,
.app-account-table-avatar {
    background: rgba(8, 145, 178, 0.13) !important;
    border: 1px solid rgba(8, 145, 178, 0.24);
    color: #0f766e !important;
    font-weight: 900;
}

.app-account-user-name,
.app-account-user-email {
    display: block;
    max-width: 11rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-account-user-name {
    color: var(--app-text) !important;
    font-weight: 800 !important;
}

.app-account-user-email,
.app-account-muted {
    color: var(--app-text-muted) !important;
}

.app-account-nav {
    display: grid;
    gap: 0.5rem;
}

.app-account-nav-item {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 0.9rem;
    color: var(--app-text-soft);
    cursor: pointer;
    display: grid;
    gap: 0.7rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 4.25rem;
    padding: 0.75rem;
    text-align: left;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
    width: 100%;
}

.app-account-nav-item:hover {
    background: var(--app-hover-surface);
    border-color: var(--app-border);
}

.app-account-nav-item:focus-visible {
    border-color: rgba(45, 212, 191, 0.46);
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.14);
    outline: 0;
}

.app-account-nav-item.is-active {
    background: rgba(8, 145, 178, 0.13);
    border-color: rgba(8, 145, 178, 0.32);
    color: var(--app-text);
}

.app-account-tab-icon {
    color: #0891b2 !important;
}

.app-account-tab-copy {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.app-account-tab-copy > span {
    color: var(--app-text);
    font-size: 0.92rem;
    font-weight: 850;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-account-tab-copy small {
    color: var(--app-text-muted);
    font-size: 0.74rem;
    line-height: 1.25;
}

.app-account-tab-badge {
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 850;
    padding: 0.25rem 0.45rem;
    white-space: nowrap;
}

.app-account-tab-badge.is-success {
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a;
}

.app-account-tab-badge.is-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.app-account-content {
    min-width: 0;
    padding: 1.25rem;
}

.app-account-tab-header,
.app-account-panel-heading,
.app-account-admin-header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1.1rem;
}

.app-account-tab-title {
    align-items: center;
    display: flex;
    gap: 0.85rem;
    min-width: 0;
}

.app-account-section-icon {
    align-items: center;
    background: rgba(8, 145, 178, 0.12);
    border: 1px solid rgba(8, 145, 178, 0.22);
    border-radius: 0.85rem;
    color: #0891b2;
    display: inline-flex;
    flex: 0 0 auto;
    height: 2.5rem;
    justify-content: center;
    width: 2.5rem;
}

.app-account-panel {
    background: var(--app-surface-alt) !important;
    border: 1px solid var(--app-border);
    border-radius: 1rem;
    display: grid;
    gap: 1rem;
    padding: 1rem;
}

.app-account-form-panel,
.app-account-assigned-panel {
    margin-bottom: 1rem;
}

.app-account-alert {
    margin-top: 1rem;
}

.app-account-info-grid,
.app-account-context-grid,
.app-account-security-grid,
.app-account-settings-grid {
    display: grid;
    gap: 1rem;
}

.app-account-info-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.app-account-context-grid,
.app-account-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.app-account-security-grid {
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.8fr);
}

.app-account-security-column {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.app-account-info-card {
    background: var(--app-surface) !important;
    border: 1px solid var(--app-border);
    border-radius: 0.9rem;
    display: grid;
    gap: 0.6rem;
    min-width: 0;
    padding: 0.9rem;
}

.app-account-info-label {
    color: var(--app-text-muted) !important;
    font-size: 0.72rem !important;
    font-weight: 850 !important;
    letter-spacing: 0 !important;
    text-transform: uppercase;
}

.app-account-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    min-width: 0;
}

.app-account-tfa-status.is-active {
    background: rgba(34, 197, 94, 0.08) !important;
    border-color: rgba(34, 197, 94, 0.24);
}

.app-account-tfa-status.is-pending {
    background: rgba(245, 158, 11, 0.08) !important;
    border-color: rgba(245, 158, 11, 0.24);
}

.app-account-security-status {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.app-account-security-steps {
    gap: 0.75rem;
}

.app-account-step {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: auto minmax(0, 1fr);
}

.app-account-step > span {
    align-items: center;
    background: rgba(8, 145, 178, 0.13);
    border: 1px solid rgba(8, 145, 178, 0.24);
    border-radius: 999px;
    color: #0891b2;
    display: inline-flex;
    font-size: 0.8rem;
    font-weight: 900;
    height: 1.8rem;
    justify-content: center;
    width: 1.8rem;
}

.app-account-security-note,
.app-account-context-note,
.app-account-tfa-note {
    margin-top: 0.9rem;
}

.app-account-actions,
.app-account-tfa-actions,
.branding-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.app-account-tfa-action-panel {
    align-content: start;
}

.app-account-tfa-setup,
.app-account-tfa-manage,
.app-account-tfa-start {
    display: grid;
    gap: 1rem;
}

.app-account-tfa-qr-wrap,
.app-tfa-qr-panel {
    align-items: center;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 1rem;
    display: flex;
    justify-content: center;
    min-height: 17rem;
    overflow: hidden;
    padding: 1rem;
}

.app-account-tfa-qr,
.app-tfa-qr {
    display: block;
    height: auto;
    max-height: 15rem;
    max-width: 15rem;
    width: 100%;
}

.app-account-tfa-qr-state,
.app-tfa-qr-empty {
    min-height: 12rem;
    text-align: center;
}

.app-account-branding-panel,
.app-account-admin-panel {
    margin-top: 1rem;
}

.branding-workbench {
    display: grid;
    gap: 1rem;
}

.branding-panel {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 21rem;
    padding: 1rem;
}

.branding-panel--actions {
    justify-content: stretch;
}

.branding-panel--preview {
    gap: 1rem;
}

.branding-upload-shell {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 1rem;
    min-height: 100%;
}

.branding-upload-dropzone {
    display: flex;
    flex: 1 1 auto;
    min-height: 20rem;
}

.branding-upload-dropzone > * {
    flex: 1 1 auto;
}

.branding-upload-dropzone .mud-file-upload,
.branding-upload-dropzone .mud-input-control-input-container,
.branding-upload-dropzone .mud-input-control-input-container > div,
.branding-upload-dropzone .mud-paper {
    height: 100%;
}

.branding-upload-dropzone .mud-paper {
    min-height: 100%;
}

.branding-upload-dropzone .mud-paper[style*="height:auto"] {
    height: 100% !important;
}

.branding-upload-dropzone .text-center {
    justify-content: center;
    min-height: 100% !important;
}

.branding-preview__frame {
    align-items: center;
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.14), rgba(15, 23, 42, 0.04));
    border: 1px solid var(--app-border);
    border-radius: 1rem;
    display: flex;
    justify-content: center;
    max-height: 18rem;
    min-height: 18rem;
    overflow: hidden;
    padding: 1.25rem;
    width: 100%;
}

.branding-preview__image {
    display: block;
    height: 100%;
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    width: 100%;
}

.app-account-user-cell {
    align-items: center;
    display: flex;
    gap: 0.7rem;
    min-width: 0;
}

.app-account-table-avatar {
    align-items: center;
    border-radius: 0.9rem;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.75rem;
    height: 2.35rem;
    justify-content: center;
    width: 2.35rem;
}

.app-account-user-cell span,
.app-account-user-cell small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-account-user-cell span {
    color: var(--app-text);
    font-weight: 800;
}

.app-account-user-cell small {
    color: var(--app-text-muted);
}

body.theme-light .app-account-shell {
    background: rgba(255, 255, 255, 0.98) !important;
    border-color: rgba(148, 163, 184, 0.2);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.08);
}

body.theme-light .app-account-sidebar {
    background: rgba(248, 250, 252, 0.92);
}

body.theme-light .app-account-sidebar-user,
body.theme-light .app-account-panel,
body.theme-light .app-account-info-card,
body.theme-light .branding-panel {
    background: rgba(255, 255, 255, 0.98) !important;
    border-color: rgba(148, 163, 184, 0.2);
}

body.theme-light .app-account-content {
    background: rgba(255, 255, 255, 0.74);
}

body.theme-light .app-account-panel {
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.045);
}

body.theme-light .app-account-muted,
body.theme-light .app-account-user-email,
body.theme-light .app-account-tab-copy small,
body.theme-light .app-account-info-label {
    color: #475569 !important;
}

body.theme-light .app-account-nav-item {
    color: #334155;
}

body.theme-light .app-account-nav-item:hover {
    background: rgba(241, 245, 249, 0.92);
    border-color: rgba(15, 118, 110, 0.18);
}

body.theme-light .app-account-nav-item.is-active {
    background: rgba(20, 184, 166, 0.12);
    border-color: rgba(13, 148, 136, 0.34);
    color: #0f766e;
}

body.theme-light .app-account-tab-copy > span {
    color: #0f172a !important;
}

body.theme-light .app-account-nav-item.is-active .app-account-tab-copy > span,
body.theme-light .app-account-nav-item.is-active .app-account-tab-icon {
    color: #0f766e !important;
}

body.theme-light .branding-preview__frame {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.08), rgba(255, 255, 255, 0.98));
}

.app-help-view {
    display: grid;
    gap: 1.25rem;
}

.app-help-hero {
    align-items: flex-start;
    background:
        radial-gradient(circle at top left, rgba(45, 212, 191, 0.18), transparent 30%),
        linear-gradient(135deg, var(--app-surface-strong), var(--app-surface));
    border: 1px solid var(--app-border);
    border-radius: var(--app-panel-radius);
    box-shadow: var(--app-panel-shadow);
    display: flex;
    gap: 1.25rem;
    overflow: hidden;
    padding: clamp(1.25rem, 3vw, 2rem);
}

.app-help-hero__copy {
    min-width: 0;
}

.app-help-hero h1 {
    color: var(--app-text);
    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: 900;
    line-height: 1.02;
    margin: 0.45rem 0 0;
}

.app-help-hero p:not(.app-dialog-eyebrow) {
    color: var(--app-text-soft);
    line-height: 1.65;
    margin: 0.75rem 0 0;
    max-width: 52rem;
}

.app-help-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.08fr) minmax(18rem, 0.92fr);
}

.app-help-card,
.app-help-faq {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-panel-radius);
    box-shadow: var(--app-panel-shadow);
    color: var(--app-text);
}

.app-help-card {
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
}

.app-help-card__icon {
    align-items: center;
    background: rgba(20, 184, 166, 0.12);
    border: 1px solid rgba(20, 184, 166, 0.24);
    border-radius: 1rem;
    color: var(--app-accent);
    display: inline-flex;
    height: 2.75rem;
    justify-content: center;
    width: 2.75rem;
}

.app-help-card h2 {
    color: var(--app-text);
    font-size: 1.1rem;
    font-weight: 900;
    margin: 0;
}

.app-help-card p {
    color: var(--app-text-muted);
    line-height: 1.55;
    margin: 0.45rem 0 0;
}

.app-help-card__action {
    justify-self: start;
}

.app-help-download-action {
    align-items: center;
    background: #0f766e;
    border: 1px solid rgba(15, 118, 110, 0.32);
    border-radius: 0.75rem;
    box-sizing: border-box;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    font-size: 0.84rem;
    font-weight: 900;
    gap: 0.5rem;
    height: 2.875rem;
    line-height: 1;
    padding: 0 0.95rem;
    text-decoration: none;
    width: fit-content;
    transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 160ms ease;
}

.app-help-download-action:hover {
    background: #0d9488;
    border-color: rgba(13, 148, 136, 0.5);
    box-shadow: 0 10px 24px rgba(20, 184, 166, 0.14);
    color: #ffffff;
    transform: translateY(-1px);
}

.app-help-download-action:focus-visible {
    outline: 2px solid var(--app-accent);
    outline-offset: 3px;
}

.app-help-support-list {
    color: var(--app-text-soft);
    display: grid;
    gap: 0.55rem;
    line-height: 1.5;
    margin: 0;
    padding-left: 1.15rem;
}

.app-help-faq {
    padding: clamp(1.1rem, 2vw, 1.5rem);
}

.app-help-faq-list {
    display: grid;
    gap: 0.7rem;
}

.app-help-faq-item {
    background: var(--app-surface-alt);
    border: 1px solid var(--app-border);
    border-radius: 1rem;
    overflow: hidden;
}

.app-help-faq-item summary {
    align-items: center;
    color: var(--app-text);
    cursor: pointer;
    display: flex;
    font-weight: 850;
    gap: 1rem;
    justify-content: space-between;
    list-style: none;
    padding: 1rem 1.1rem;
}

.app-help-faq-item summary::-webkit-details-marker {
    display: none;
}

.app-help-faq-item summary:focus-visible {
    outline: 2px solid var(--app-accent);
    outline-offset: -4px;
}

.app-help-faq-item__icon {
    color: var(--app-accent);
    flex: 0 0 auto;
    transition: transform 160ms ease;
}

.app-help-faq-item[open] .app-help-faq-item__icon {
    transform: rotate(180deg);
}

.app-help-faq-item p {
    border-top: 1px solid var(--app-border);
    color: var(--app-text-muted);
    line-height: 1.65;
    margin: 0;
    padding: 1rem 1.1rem;
}

body.theme-light .app-help-card__icon {
    background: rgba(15, 118, 110, 0.1);
    border-color: rgba(15, 118, 110, 0.2);
}

body.theme-light .app-help-download-action {
    background: #0f766e;
    border-color: rgba(15, 118, 110, 0.32);
    color: #ffffff;
}

body.theme-light .app-help-download-action:hover {
    background: #0d9488;
    border-color: rgba(13, 148, 136, 0.5);
    color: #ffffff;
}

.app-tfa-verification {
    background:
        radial-gradient(circle at top left, rgba(45, 212, 191, 0.14), transparent 30%),
        radial-gradient(circle at bottom right, rgba(249, 115, 22, 0.12), transparent 24%),
        linear-gradient(145deg, #020617 0%, #0b1120 55%, #131a2b 100%);
    color: #f8fafc;
    min-height: 100vh;
}

.app-tfa-shell {
    display: grid;
    gap: 1.5rem;
    margin: 0 auto;
    max-width: 72rem;
    min-height: 100vh;
    padding: 2rem;
}

.app-tfa-topbar,
.app-tfa-brand {
    align-items: center;
    display: flex;
}

.app-tfa-topbar {
    justify-content: space-between;
}

.app-tfa-brand {
    gap: 0.75rem;
}

.app-tfa-brand strong,
.app-tfa-brand small {
    display: block;
}

.app-tfa-brand small {
    color: #94a3b8;
    font-size: 0.78rem;
}

.app-tfa-mark {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 0.9rem;
    box-shadow: 0 16px 34px rgba(2, 6, 23, 0.22);
    display: inline-flex;
    height: 2.5rem;
    justify-content: center;
    overflow: hidden;
    width: 2.5rem;
}

.app-tfa-mark__image {
    height: 100%;
    width: 100%;
}

.app-tfa-grid {
    align-items: center;
    display: grid;
    gap: 2rem;
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 27rem);
}

.app-tfa-copy h1 {
    color: #fff;
    font-size: clamp(2.4rem, 4vw, 4.4rem);
    font-weight: 950;
    line-height: 1.02;
    margin: 1rem 0 0;
    max-width: 44rem;
}

.app-tfa-copy p {
    color: #cbd5e1;
    font-size: 1rem;
    line-height: 1.75;
    margin-top: 1.25rem;
    max-width: 38rem;
}

.app-tfa-card {
    background: rgba(15, 23, 42, 0.92) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    box-shadow: 0 28px 56px rgba(0, 0, 0, 0.32);
    color: #f8fafc;
    padding: 1.5rem;
}

.app-tfa-card-header {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.app-tfa-card-header span {
    color: #67e8f9;
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.app-tfa-card-header p {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 900;
    margin: 0;
}

.app-tfa-card-header small {
    color: #94a3b8;
    line-height: 1.55;
}

.app-tfa-loading {
    min-height: 24rem;
}

.app-tfa-setup-panel,
.app-tfa-form {
    display: grid;
    gap: 1rem;
}

.app-tfa-form {
    margin-top: 1rem;
}

.app-tfa-code-label {
    color: #cbd5e1;
    font-size: 0.78rem;
    font-weight: 800;
}

.app-tfa-code-input {
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 0.85rem;
    color: #f8fafc;
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: 0;
    min-height: 3.25rem;
    outline: none;
    padding: 0.7rem 0.9rem;
    text-align: center;
    width: 100%;
}

.app-tfa-code-input:focus {
    border-color: rgba(20, 184, 166, 0.72);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.16);
}

.app-tfa-alert,
.app-tfa-cancel-form {
    margin-top: 0.25rem;
}

body.theme-light .app-tfa-verification {
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.08), transparent 26%),
        radial-gradient(circle at bottom right, rgba(249, 115, 22, 0.08), transparent 20%),
        linear-gradient(145deg, #f6f9fc 0%, #edf3f9 56%, #e6edf6 100%);
    color: #0f172a;
}

body.theme-light .app-tfa-copy h1,
body.theme-light .app-tfa-card-header p,
body.theme-light .app-tfa-card {
    color: #0f172a;
}

body.theme-light .app-tfa-copy p,
body.theme-light .app-tfa-brand small,
body.theme-light .app-tfa-card-header small,
body.theme-light .app-tfa-code-label {
    color: #475569;
}

body.theme-light .app-tfa-card {
    background: rgba(255, 255, 255, 0.96) !important;
    border-color: rgba(148, 163, 184, 0.22);
    box-shadow: 0 28px 56px rgba(15, 23, 42, 0.12);
}

body.theme-light .app-tfa-code-input {
    background: #fff;
    border-color: rgba(148, 163, 184, 0.42);
    color: #0f172a;
}

.app-auth-recovery {
    background:
        radial-gradient(circle at top left, rgba(45, 212, 191, 0.14), transparent 30%),
        radial-gradient(circle at bottom right, rgba(249, 115, 22, 0.12), transparent 24%),
        linear-gradient(145deg, #020617 0%, #0b1120 55%, #131a2b 100%);
    color: #f8fafc;
    min-height: 100vh;
}

.app-auth-recovery__shell {
    display: grid;
    gap: 1.5rem;
    margin: 0 auto;
    max-width: 72rem;
    min-height: 100vh;
    padding: 2rem;
}

.app-auth-recovery__topbar {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.app-auth-recovery__link {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    color: #cbd5e1;
    font-size: 0.82rem;
    font-weight: 800;
    padding: 0.65rem 0.95rem;
    text-decoration: none;
}

.app-auth-recovery__link:hover {
    border-color: rgba(45, 212, 191, 0.42);
    color: #f8fafc;
}

.app-auth-recovery__grid {
    align-items: center;
    display: grid;
    gap: 2rem;
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 27rem);
}

.app-auth-recovery__copy h1 {
    color: #fff;
    font-size: clamp(2.4rem, 4vw, 4.4rem);
    font-weight: 950;
    line-height: 1.02;
    margin: 1rem 0 0;
    max-width: 44rem;
}

.app-auth-recovery__copy p {
    color: #cbd5e1;
    font-size: 1rem;
    line-height: 1.75;
    margin-top: 1.25rem;
    max-width: 38rem;
}

.app-auth-recovery__card {
    background: rgba(15, 23, 42, 0.92) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    box-shadow: 0 28px 56px rgba(0, 0, 0, 0.32);
    color: #f8fafc;
    padding: 1.5rem;
}

.app-auth-recovery__form {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.app-auth-recovery__note {
    margin-top: 0.1rem;
}

.app-auth-recovery__result {
    align-items: flex-start;
    display: grid;
    gap: 1rem;
    min-height: 22rem;
    place-content: center;
}

.app-auth-recovery__status-icon {
    align-items: center;
    background: rgba(20, 184, 166, 0.16);
    border: 1px solid rgba(45, 212, 191, 0.34);
    border-radius: 1rem;
    color: #5eead4;
    display: inline-flex;
    height: 3rem;
    justify-content: center;
    width: 3rem;
}

.app-auth-recovery__result h2 {
    color: #fff;
    font-size: 1.55rem;
    font-weight: 900;
    margin: 0;
}

.app-auth-recovery__result p {
    color: #cbd5e1;
    font-size: 0.96rem;
    line-height: 1.7;
    margin: 0;
}

.app-auth-recovery__button {
    background: var(--app-accent);
    border-radius: 0.9rem;
    color: #042f2e;
    display: inline-flex;
    font-size: 0.92rem;
    font-weight: 900;
    justify-content: center;
    padding: 0.85rem 1rem;
    text-decoration: none;
}

body.theme-light .app-auth-recovery {
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.08), transparent 26%),
        radial-gradient(circle at bottom right, rgba(249, 115, 22, 0.08), transparent 20%),
        linear-gradient(145deg, #f6f9fc 0%, #edf3f9 56%, #e6edf6 100%);
    color: #0f172a;
}

body.theme-light .app-auth-recovery__copy h1,
body.theme-light .app-auth-recovery__card,
body.theme-light .app-auth-recovery__result h2 {
    color: #0f172a;
}

body.theme-light .app-auth-recovery__copy p,
body.theme-light .app-auth-recovery__result p,
body.theme-light .app-auth-recovery__link {
    color: #475569;
}

body.theme-light .app-auth-recovery__card {
    background: rgba(255, 255, 255, 0.96) !important;
    border-color: rgba(148, 163, 184, 0.22);
    box-shadow: 0 28px 56px rgba(15, 23, 42, 0.12);
}

body.theme-light .app-auth-recovery__link {
    border-color: rgba(148, 163, 184, 0.32);
}

@media (min-width: 1280px) {
    .branding-workbench {
        align-items: stretch;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

@media (max-width: 940px) {
    .app-auth-login__frame,
    .app-onboarding__container,
    .app-account-layout,
    .app-account-security-grid,
    .app-account-settings-grid,
    .app-help-grid,
    .app-tfa-grid,
    .app-auth-recovery__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .app-account-sidebar {
        border-bottom: 1px solid var(--app-border);
        border-right: 0;
    }

    .app-account-nav {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .app-account-nav-item {
        align-content: start;
        grid-template-columns: minmax(0, 1fr);
    }

    .app-account-tab-badge {
        justify-self: start;
    }
}

@media (max-width: 760px) {
    .app-auth-login__container {
        align-items: flex-start;
        padding: 1rem;
    }

    .app-auth-login__frame {
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .app-auth-login__form-region {
        order: -1;
    }

    .app-auth-login__hero,
    .app-auth-login__panel {
        padding: 1.25rem;
    }

    .app-auth-login__hero h1 {
        font-size: 2rem;
        margin-top: 1.5rem;
    }

    .app-auth-login__features {
        gap: 0.75rem;
        grid-template-columns: minmax(0, 1fr);
        margin-top: 1.5rem;
    }

    .app-onboarding {
        padding: 1rem;
    }

    .app-onboarding__container {
        min-height: calc(100vh - 2rem);
    }

    .app-onboarding__hero,
    .app-onboarding__panel,
    .app-onboarding-expired {
        padding: 1.25rem;
    }

    .app-legal {
        padding: 1rem;
    }

    .app-legal__hero,
    .app-legal-card {
        padding: 1.25rem;
    }

    .app-legal__content {
        grid-template-columns: minmax(0, 1fr);
    }

    .app-onboarding-confirmation-panel {
        grid-template-columns: minmax(0, 1fr);
    }

    .app-onboarding-confirmation-panel__help {
        grid-column: 1;
    }

    .app-onboarding__headline {
        margin: 2.25rem 0;
    }

    .app-onboarding-stepper .mud-stepper-content,
    .app-onboarding-stepper .mud-card-actions {
        padding-left: 0;
        padding-right: 0;
    }

    .app-onboarding-stepper .mud-stepper-nav {
        justify-content: center;
        overflow: hidden;
        padding-top: 0;
    }

    .app-onboarding-stepper .mud-step {
        flex: 0 0 auto;
        min-width: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .app-onboarding-stepper .mud-step-label {
        justify-content: center;
        min-width: 0;
    }

    .app-onboarding-stepper .mud-step-label-content {
        display: none;
    }

    .app-onboarding-stepper .mud-stepper-nav-connector {
        flex: 0 1 3rem;
        min-width: 2.5rem;
    }

    .app-onboarding-step {
        min-height: 0;
    }

    .app-onboarding-password,
    .app-onboarding-summary {
        grid-template-columns: minmax(0, 1fr);
    }

    .app-onboarding-actions,
    .app-onboarding-actions .mud-button-root,
    .app-privacy-consent__actions,
    .app-privacy-consent__actions .mud-button-root,
    .app-onboarding-expired__actions,
    .app-onboarding-expired__actions .mud-button-root {
        width: 100%;
    }

    .app-error-state {
        align-items: flex-start;
        padding: 1rem;
    }

    .app-error-state__panel {
        padding: 1.25rem;
    }

    .app-error-state__actions,
    .app-error-state__actions .mud-button-root {
        width: 100%;
    }

    .app-account-header,
    .app-account-tab-header,
    .app-account-panel-heading,
    .app-account-admin-header,
    .app-tfa-topbar,
    .app-auth-recovery__topbar {
        align-items: stretch;
        flex-direction: column;
    }

    .app-account-content,
    .app-account-sidebar,
    .app-tfa-shell,
    .app-auth-recovery__shell {
        padding: 1rem;
    }

    .app-account-info-grid,
    .app-account-context-grid,
    .app-account-nav {
        grid-template-columns: minmax(0, 1fr);
    }

    .app-account-actions > *,
    .app-account-tfa-actions > *,
    .branding-actions > *,
    .app-account-tab-header > .mud-button-root,
    .app-account-panel-heading > .mud-button-root {
        width: 100%;
    }

    .app-account-security-status {
        align-items: flex-start;
        flex-direction: column;
    }

    .app-tfa-card,
    .app-auth-recovery__card {
        order: -1;
    }

    .app-tfa-copy h1,
    .app-auth-recovery__copy h1 {
        font-size: 2.2rem;
    }
}

/* ===================================================
   Help Assistant Widget
   =================================================== */

.app-help-widget {
    position: fixed;
    bottom: 1.5rem;
    right: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .75rem;
    z-index: 10000;
    pointer-events: none;
}

.app-help-widget > * {
    pointer-events: auto;
}

.app-help-fab {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 50% !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
    transition: transform 250ms cubic-bezier(.34,1.56,.64,1), box-shadow 250ms ease;
}

.app-help-fab .mud-icon-button-label {
    width: 28px;
    height: 28px;
}

.app-help-fab .mud-icon-button-label svg {
    width: 28px;
    height: 28px;
}

.app-help-fab:hover {
    transform: scale(1.06);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.30);
}

.app-help-fab--active {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

/* Panel */

.app-help-panel {
    width: 520px;
    max-height: min(75vh, 760px);
    display: flex;
    flex-direction: column;
    background: var(--app-dialog-bg);
    border: 1px solid var(--app-border);
    border-radius: var(--app-panel-radius);
    box-shadow: var(--app-panel-shadow);
    backdrop-filter: blur(20px);
    overflow: hidden;
    animation: app-help-slide-up 250ms ease-out;
}

@keyframes app-help-slide-up {
    from {
        opacity: 0;
        transform: translateY(12px) scale(.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.app-help-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--app-border);
    flex-shrink: 0;
}

.app-help-panel__header-left {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.app-help-panel__header-icon {
    color: var(--app-accent);
}

.app-help-panel__title {
    font-weight: 600;
    font-size: .95rem;
    color: var(--app-text);
}

.app-help-panel__header-actions {
    display: flex;
    align-items: center;
    gap: .25rem;
}

.app-help-panel__header-actions .mud-icon-button {
    color: var(--app-text-muted);
}

.app-help-panel__header-actions .mud-icon-button:hover {
    color: var(--app-text);
}

/* Messages area */

.app-help-panel__messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    scroll-behavior: smooth;
}

.app-help-panel__welcome {
    text-align: center;
    padding: 1rem .5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
    flex-shrink: 0;
}

.app-help-panel__welcome-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    opacity: .85;
}

.app-help-panel__welcome-text {
    color: var(--app-text-soft);
    font-size: .9rem;
    line-height: 1.5;
    margin: 0;
}

.app-help-panel__privacy-note {
    color: var(--app-text-muted);
    font-size: .78rem;
    line-height: 1.45;
    margin: 0;
    max-width: 30rem;
}

.app-help-chat {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: .75rem;
}

.app-help-panel__quick-actions {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    width: 100%;
}

.app-help-panel__quick-action {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 10px;
    padding: .65rem 1rem;
    color: var(--app-text-soft);
    font-size: .85rem;
    cursor: pointer;
    transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
    text-align: left;
}

.app-help-panel__quick-action {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 8px;
    padding: .35rem .6rem;
    color: var(--app-text-soft);
    font-size: .75rem;
    cursor: pointer;
    transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
    white-space: nowrap;
}

.app-help-panel__quick-action:hover:not(:disabled) {
    background: var(--app-hover-surface);
    color: var(--app-text);
    border-color: var(--app-accent);
}

.app-help-panel__quick-action:disabled {
    opacity: .5;
    cursor: default;
}

/* Messages */

.app-help-message {
    max-width: 85%;
}

.app-help-message--user {
    align-self: flex-end;
}

.app-help-message--assistant {
    align-self: flex-start;
}

body:not(.theme-light) .app-help-message--assistant .app-help-message__bubble.mudx-chat-filled-default {
    background: var(--app-surface-strong);
    color: var(--app-text);
}

.app-help-message--assistant .app-help-message__bubble {
    font-weight: 400;
}

.mudx-chat .app-help-message__avatar {
    align-self: start;
}

.app-help-message__avatar {
    border: 1px solid var(--app-border);
    background: var(--app-surface-strong);
    box-shadow: 0 6px 16px rgba(2, 6, 23, 0.18);
}

.app-help-message__avatar-logo {
    width: 1.55rem;
    height: 1.55rem;
    object-fit: contain;
}

.app-help-message__avatar-initials {
    color: var(--app-text);
    font-size: .82rem;
    font-weight: 800;
    line-height: 1;
}

.app-help-message__bubble p {
    margin: 0 0 .4rem;
}

.app-help-message__bubble p:last-child {
    margin-bottom: 0;
}

.app-help-message__bubble ul,
.app-help-message__bubble ol {
    margin: .4rem 0;
    padding-left: 1.25rem;
}

.app-help-message__bubble li {
    margin-bottom: .25rem;
}

.app-help-message__bubble strong {
    font-weight: 700;
}

.app-help-message__bubble blockquote {
    border-left: 3px solid var(--app-accent);
    margin: .5rem 0;
    padding: .25rem .75rem;
    background: var(--app-surface-soft);
    border-radius: 0 6px 6px 0;
    font-size: .85rem;
    color: var(--app-text-soft);
}

.app-help-message__meta {
    display: flex;
    justify-content: flex-end;
    margin-top: .25rem;
    opacity: 0;
    transition: opacity 150ms ease;
}

.app-help-message__bubble:hover .app-help-message__meta {
    opacity: 1;
}

.app-help-message__copy {
    color: var(--app-text-muted) !important;
}

.app-help-message__copy:hover {
    color: var(--app-text) !important;
}

.app-help-message__time {
    font-size: .7rem;
    color: var(--app-text-muted);
    margin-top: .2rem;
    padding: 0 .25rem;
}

/* Typing indicator */

.app-help-message__bubble--typing {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.app-help-typing-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--app-text-muted);
    animation: app-help-typing-pulse 1.2s ease-in-out infinite;
}

.app-help-typing__label {
    font-size: .75rem;
    color: var(--app-text-muted);
    margin-left: .35rem;
}

@keyframes app-help-typing-pulse {
    0%, 60%, 100% {
        opacity: .3;
        transform: scale(.85);
    }
    30% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* Input bar */

.app-help-panel__input-bar {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1rem;
    border-top: 1px solid var(--app-border);
    flex-shrink: 0;
}

.app-help-panel__input {
    flex: 1;
}

.app-help-panel__send-btn {
    flex-shrink: 0;
}

/* Mobile */

@media (max-width: 640px) {
    .app-help-widget {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }

    .app-help-panel {
        width: 100%;
        max-height: 75vh;
    }

    .app-help-fab {
        width: 48px;
        height: 48px;
    }

    .app-help-fab .mud-icon-button-label,
    .app-help-fab .mud-icon-button-label svg {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 1100px) {
    .billing-pricing-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .billing-pricing-status {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.8fr);
    }

    .billing-trust-stack {
        margin-top: 0;
    }
}

@media (max-width: 760px) {
    .billing-pricing-status,
    .billing-plan-stage__header {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .billing-plan-stage__header > p {
        max-width: none;
        text-align: left;
    }

    .billing-plan-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .billing-plan-card {
        min-height: 0;
    }

    .billing-return-facts {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 520px) {
    .billing-pricing-status,
    .billing-plan-stage,
    .billing-plan-card {
        padding: 1rem;
    }

    .billing-pricing-status__headline {
        flex-direction: column;
    }

    .billing-pricing-facts div {
        grid-template-columns: minmax(0, 1fr);
    }

    .billing-pricing-facts dd {
        text-align: left;
    }

    .billing-pricing-facts__status {
        justify-content: flex-start;
    }

    .billing-return-page {
        padding: 1rem;
    }

    .billing-return-panel {
        padding: 1.25rem;
    }

    .billing-return-actions,
    .billing-return-actions .mud-button-root {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-date-range__preset-option,
    .app-upload-dropzone .mud-file-upload .mud-paper,
    .app-filter-panel__clear,
    .app-metric-summary__item.is-interactive,
    .app-ledger-icon-action .mud-icon-button,
    .app-tag-field .mud-chip,
    .app-tag-field .mud-chip-close-button,
    .insight-grid .app-options-cell .mud-icon-button,
    .theme-toggle-button,
    .compact-action,
    .compact-action.mud-button-root,
    .reports-filter-action .compact-action,
    .reports-filter-action .compact-action.mud-button-root,
    .app-nav .mud-nav-link,
    .navigation-tree-toggle .mud-icon-root,
    .app-account-nav-item,
    .app-help-download-action,
    .app-help-faq-item__icon,
    .app-help-fab,
    .app-help-panel__quick-action,
    .app-help-message__meta {
        transition-duration: 1ms !important;
    }

    .app-help-panel {
        animation-duration: 1ms !important;
    }

    .app-help-typing-dot {
        animation-duration: 1ms !important;
    }

    .app-route-authorizing__arc,
    .app-route-authorizing__pulse {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
    }

    .app-startup-brandmark {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
    }

    .signals-summary-skeleton__line,
    .signals-summary-skeleton__value {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
    }
}
