:root {
    --app-bg:
        radial-gradient(circle at top left, rgba(45, 212, 191, 0.08), transparent 26%),
        radial-gradient(circle at bottom right, rgba(249, 115, 22, 0.08), transparent 20%),
        linear-gradient(145deg, #020617 0%, #0b1120 55%, #131a2b 100%);
    --app-text: #f8fafc;
    --app-text-soft: #cbd5e1;
    --app-text-muted: #94a3b8;
    --app-accent: #2dd4bf;
    --app-border: rgba(148, 163, 184, 0.12);
    --app-border-strong: rgba(148, 163, 184, 0.14);
    --app-drawer-bg: rgba(2, 6, 23, 0.9);
    --app-topbar-bg: rgba(2, 6, 23, 0.72);
    --app-surface: rgba(15, 23, 42, 0.72);
    --app-surface-strong: rgba(15, 23, 42, 0.85);
    --app-surface-soft: rgba(15, 23, 42, 0.42);
    --app-surface-alt: rgba(255, 255, 255, 0.05);
    --app-hover-surface: rgba(30, 41, 59, 0.9);
    --app-nav-link: #cbd5e1;
    --app-nav-hover-text: #e2e8f0;
    --app-nav-active-text: #f8fafc;
    --app-grid-header: #182235;
    --app-grid-row: rgba(15, 23, 42, 0.28);
    --app-grid-row-hover: rgba(20, 184, 166, 0.09);
    --app-menu-bg: rgba(15, 23, 42, 0.98);
    --app-dialog-bg: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(11, 18, 32, 0.98));
    --app-dialog-title-bg: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(24, 34, 53, 0.96));
    --app-chip-bg: rgba(15, 23, 42, 0.92);
    --app-chip-bg-light: rgba(255, 255, 255, 0.94);
    --app-chip-border: rgba(103, 232, 249, 0.18);
    --app-chip-border-light: rgba(148, 163, 184, 0.28);
    --app-chip-color: #e2e8f0;
    --app-control-radius: 12px;
    --app-panel-radius: 16px;
    --app-panel-shadow: 0 20px 48px rgba(2, 6, 23, 0.28);
    --app-shadow: rgba(2, 6, 23, 0.55);
    --app-navigation-level: 0;
}

body.theme-light {
    --app-bg:
        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%);
    --app-text: #0f172a;
    --app-text-soft: #334155;
    --app-text-muted: #64748b;
    --app-accent: #0f766e;
    --app-border: rgba(148, 163, 184, 0.18);
    --app-border-strong: rgba(148, 163, 184, 0.24);
    --app-drawer-bg: rgba(248, 250, 252, 0.92);
    --app-topbar-bg: rgba(255, 255, 255, 0.82);
    --app-surface: rgba(255, 255, 255, 0.88);
    --app-surface-strong: rgba(255, 255, 255, 0.96);
    --app-surface-soft: rgba(255, 255, 255, 0.9);
    --app-surface-alt: rgba(15, 23, 42, 0.04);
    --app-hover-surface: rgba(241, 245, 249, 0.95);
    --app-nav-link: #334155;
    --app-nav-hover-text: #0f172a;
    --app-nav-active-text: #0f172a;
    --app-grid-header: #f1f5f9;
    --app-grid-row: rgba(255, 255, 255, 0.94);
    --app-grid-row-hover: rgba(15, 118, 110, 0.06);
    --app-menu-bg: rgba(255, 255, 255, 0.98);
    --app-dialog-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.98));
    --app-dialog-title-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(237, 243, 249, 0.96));
    --app-chip-color: #0f172a;
    --app-panel-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    --app-shadow: rgba(15, 23, 42, 0.12);
}

html, body {
    margin: 0;
    min-height: 100%;
    font-family: "Aptos", "Segoe UI", sans-serif;
    background: var(--app-bg);
    color: var(--app-text);
}

body.app-shell {
    min-height: 100vh;
}

body.app-theme-pending {
    visibility: hidden;
}

body.app-startup-transitioning {
    overflow-x: hidden;
}

.mud-picker-popover-paper:has(.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(.date-range-preset-panel) > .mud-picker-container {
    grid-column: 2;
    grid-row: 1;
}

.mud-picker-popover-paper:has(.date-range-preset-panel) > .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;
}

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

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

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

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

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

.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 .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 .date-range-preset-option:focus-visible {
    box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.38);
}

body.theme-light .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(.date-range-preset-panel) {
        width: min(100vw - 1rem, 40rem);
        grid-template-columns: 1fr;
    }

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

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

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

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

.content-shell {
    padding: 1.5rem;
}

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

.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:
        radial-gradient(circle at top left, rgba(45, 212, 191, 0.1), transparent 28%),
        linear-gradient(160deg, var(--app-surface-strong), var(--app-surface-soft));
    overflow: hidden;
    padding: 2.5rem;
}

.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(2.3rem, 4vw, 3.55rem);
    font-weight: 950;
    line-height: 1.05;
    margin: 2.2rem 0 0;
    max-width: 42rem;
}

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

.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: 0 20px 44px var(--app-shadow);
    padding: 2rem;
    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: 950 !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-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.25rem;
    padding: 0.75rem 0.85rem;
}

.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;
    line-height: 1.45;
    margin-left: 2.35rem;
    padding: 0.45rem 0.65rem;
}

.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-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-startup-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    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 appPulse {
    0%, 100% {
        opacity: 0.45;
    }

    50% {
        opacity: 1;
    }
}

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

.theme-light.app-shell-frame {
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.05), transparent 24%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 249, 0.96));
}

.app-drawer {
    background: var(--app-drawer-bg);
    border-right: 1px solid var(--app-border);
}

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

.nav-hero {
    background:
        radial-gradient(circle at top left, rgba(45, 212, 191, 0.14), transparent 30%),
        linear-gradient(145deg, 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);
    color: var(--app-text);
    padding: 1.35rem 1.25rem 1.45rem;
}

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

.nav-hero__title {
    color: var(--app-text);
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.05;
    margin: 0.8rem 0 0;
}

.nav-hero__description {
    color: var(--app-text-soft);
    font-size: 0.9rem;
    line-height: 1.65;
    margin: 1rem 0 0;
}

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

.app-nav .mud-nav-link {
    margin-bottom: 0.35rem;
    border: 1px solid transparent;
    border-radius: 1rem;
    color: var(--app-nav-link);
    font-weight: 700;
    min-height: 48px;
    padding: 0.8rem 0.95rem;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s 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: rgba(45, 212, 191, 0.16);
    color: var(--app-nav-hover-text);
    transform: translateX(2px);
}

.app-nav .mud-nav-link.active,
.app-nav .mud-nav-link.active:hover {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.18), rgba(15, 23, 42, 0.96));
    border-color: rgba(45, 212, 191, 0.32);
    box-shadow: inset 0 0 0 1px rgba(45, 212, 191, 0.08);
    color: var(--app-nav-active-text);
}

.app-nav .mud-nav-link.active .mud-icon-root {
    color: #5eead4;
}

.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;
    padding-block: 0.75rem;
}

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

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

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

.topbar-brand__title {
    color: var(--app-text);
}

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

.language-trigger {
    align-items: center;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 999px;
    color: var(--app-text);
    cursor: pointer;
    display: inline-flex;
    gap: 0.7rem;
    min-height: 52px;
    padding: 0.45rem 0.9rem 0.45rem 0.55rem;
}

.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.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

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

.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: 999px;
    color: var(--app-text);
    cursor: pointer;
    display: inline-flex;
    gap: 0.75rem;
    min-height: 52px;
    padding: 0.45rem 0.95rem 0.45rem 0.45rem;
}

.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.82rem;
    font-weight: 800;
    height: 2.1rem;
    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.95rem;
    font-weight: 700;
}

.profile-trigger__role {
    color: var(--app-text-muted);
    font-size: 0.73rem;
    letter-spacing: 0.08em;
    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.03);
    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: 850;
    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%;
}

.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-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);
    margin-bottom: 1.25rem;
    overflow: hidden;
}

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

.app-metric-summary__title {
    color: var(--app-text);
    font-size: 1rem;
    font-weight: 850;
    line-height: 1.25;
}

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

.app-metric-summary__period {
    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.78rem;
    font-weight: 750;
    line-height: 1;
    padding: 0.58rem 0.8rem;
}

.app-metric-summary__period .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: 1rem 1.15rem 1.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.72rem;
    font-weight: 850;
    line-height: 1.2;
    text-transform: uppercase;
}

.app-metric-summary__value {
    color: var(--app-text);
    display: block;
    font-size: 1.2rem;
    font-weight: 900;
    line-height: 1.1;
    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.82rem;
    line-height: 1.35;
    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;
}

.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: 900;
    line-height: 1.25;
    margin: 0;
}

.app-ledger-title {
    font-size: 1.45rem;
}

.app-dialog-title {
    font-size: 1.5rem;
    margin-top: 0.65rem;
}

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

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

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

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

.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-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.72rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    line-height: 1.2;
    margin: 0 0 0.7rem;
    text-transform: uppercase;
}

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

.app-empty-state__title {
    color: var(--app-text-muted);
    font-size: 0.78rem;
    font-weight: 850;
    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;
}

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

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

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

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

@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-soft);
    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.75rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    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: 1rem;
    padding-top: 1rem;
}

.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: 38px;
    padding: 0.45rem;
    width: 38px;
}

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

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

.insight-grid .text-right .mud-icon-button,
.insight-grid td.text-right .mud-icon-button {
    margin-left: auto;
}

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

.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: 1rem;
    box-shadow: 0 24px 48px var(--app-shadow);
    color: var(--app-text-soft);
}

.mud-menu .mud-list,
.mud-popover .mud-list {
    padding: 0.45rem;
}

.mud-menu .mud-list-item,
.mud-popover .mud-list-item {
    border-radius: 0.85rem;
    color: var(--app-text-soft);
    font-weight: 600;
    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: #67e8f9;
    margin-right: 0.85rem;
}

.mud-dialog {
    background: var(--app-dialog-bg);
    border: 1px solid var(--app-border-strong);
    border-radius: 2rem;
    box-shadow: 0 32px 72px 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: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    min-height: 62px;
    padding: 0.95rem 1.2rem;
}

.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: 0.95rem;
    font-weight: 800;
    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: 800;
    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;
    }
}

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

    .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__period {
        max-width: 100%;
        width: fit-content;
    }

    .app-topbar {
        gap: 0.4rem;
        padding-block: 0.55rem;
    }

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

    .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: 36px;
        min-height: 36px;
        width: 36px;
    }

    .language-trigger__meta {
        display: none;
    }

    .language-trigger {
        gap: 0;
        min-height: 36px;
        padding: 0.2rem;
        width: 36px;
    }

    .language-trigger__flag {
        height: 1.2rem;
        width: 1.2rem;
    }

    .profile-trigger {
        gap: 0;
        min-height: 36px;
        padding: 0.2rem;
        width: 36px;
    }

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

@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-tfa-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-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-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 {
        align-items: stretch;
        flex-direction: column;
    }

    .app-account-content,
    .app-account-sidebar,
    .app-tfa-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 {
        order: -1;
    }

    .app-tfa-copy h1 {
        font-size: 2.2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .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 {
        transition-duration: 1ms !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;
    }
}
