:root {
    --fx-primary: #0D47A1;
    --fx-primary-rgb: 13, 71, 161;
    --fx-primary-dark: #072B61;
    --fx-primary-dark-rgb: 7, 43, 97;
    --fx-secondary: #009688;
    --fx-secondary-rgb: 0, 150, 136;
    --fx-success: #2E7D32;
    --fx-success-rgb: 46, 125, 50;
    --fx-info: #0288D1;
    --fx-info-rgb: 2, 136, 209;
    --fx-warning: #FB8C00;
    --fx-warning-rgb: 251, 140, 0;
    --fx-error: #D32F2F;
    --fx-error-rgb: 211, 47, 47;
    --fx-surface: #FFFFFF;
    --fx-background: #F5F7FA;
    --fx-background-soft: #EEF6FB;
    --fx-on-surface: #1F2937;
    --fx-muted: #64748B;
    --fx-line: #D9E2EC;
    --fx-line-strong: #C6D4E1;
    --fx-radius-sm: .5rem;
    --fx-radius-md: .875rem;
    --fx-radius-lg: 1.25rem;
    --fx-radius-xl: 1.75rem;
    --fx-shadow-sm: 0 1px 3px rgba(15, 23, 42, .08);
    --fx-shadow-md: 0 12px 30px rgba(15, 23, 42, .10);
    --fx-shadow-lg: 0 22px 55px rgba(7, 43, 97, .15);
    --fx-page-max: 1180px;
    /* Bootstrap 5.3 bridge */
    --bs-primary: var(--fx-primary);
    --bs-secondary: var(--fx-secondary);
    --bs-success: var(--fx-success);
    --bs-info: var(--fx-info);
    --bs-warning: var(--fx-warning);
    --bs-danger: var(--fx-error);
    --bs-body-bg: var(--fx-background);
    --bs-body-color: var(--fx-on-surface);
    --bs-border-color: var(--fx-line);
    --bs-border-radius: var(--fx-radius-sm);
    --bs-border-radius-lg: var(--fx-radius-md);
    --bs-link-color: var(--fx-primary);
    --bs-link-hover-color: var(--fx-primary-dark);
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: var(--fx-background);
    color: var(--fx-on-surface);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#app,
.fx-app-root {
    min-height: 100dvh;
}

/* MudBlazor / Bootstrap coexistence helpers */
.mud-typography,
.mud-button-root,
.mud-input,
.mud-input-label,
.mud-select,
.mud-list,
.mud-card,
.mud-paper,
.btn,
.form-control,
.form-select {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.fx-public-main {
    min-height: 100dvh;
    background: var(--fx-background);
}

.fx-public-shell {
    min-height: 100dvh;
    padding-block: clamp(1rem, 3vw, 2rem) 3rem;
    background: radial-gradient(circle at 86% 10%, rgba(var(--fx-info-rgb), .14), transparent 31rem), radial-gradient(circle at 8% 86%, rgba(var(--fx-secondary-rgb), .13), transparent 30rem), linear-gradient(180deg, rgba(255,255,255,.82), rgba(245,247,250,.96)), var(--fx-background);
}

.fx-page-container {
    width: min(100% - 2rem, var(--fx-page-max));
    margin-inline: auto;
}

.fx-public-topbar {
    min-height: 68px;
    padding: .7rem 1.25rem;
    border: 1px solid var(--fx-line);
    border-radius: var(--fx-radius-md);
    background: rgba(255,255,255,.94);
    box-shadow: var(--fx-shadow-sm);
    backdrop-filter: blur(16px);
}

.fx-brand {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    color: var(--fx-primary-dark);
    font-size: 1.05rem;
    font-weight: 850;
    letter-spacing: .01em;
    text-decoration: none;
    white-space: nowrap;
}

    .fx-brand:hover {
        color: var(--fx-primary-dark);
    }

.fx-brand-axis {
    color: var(--fx-secondary);
}

.fx-brand-mark {
    flex: 0 0 auto;
    display: inline-flex;
    width: 30px;
    height: 30px;
}

.fx-public-nav {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 3vw, 2rem);
}

    .fx-public-nav a,
    .fx-inline-link,
    .fx-link-button {
        color: var(--fx-primary-dark);
        font-weight: 750;
        text-decoration: none;
    }

        .fx-public-nav a:hover,
        .fx-inline-link:hover,
        .fx-link-button:hover {
            color: var(--fx-secondary);
        }

.fx-mud-btn-primary.mud-button-filled {
    background-color: var(--fx-primary) !important;
    color: #fff !important;
}

.fx-mud-btn-secondary.mud-button-filled {
    background-color: var(--fx-secondary) !important;
    color: #fff !important;
}

.fx-mud-btn-outline.mud-button-outlined {
    border-color: var(--fx-primary) !important;
    color: var(--fx-primary) !important;
    background: rgba(255,255,255,.86) !important;
}

.fx-mud-btn-primary,
.fx-mud-btn-secondary,
.fx-mud-btn-outline {
    border-radius: var(--fx-radius-sm) !important;
    font-weight: 800 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.fx-auth-grid,
.fx-select-grid,
.fx-access-grid {
    margin-top: clamp(2rem, 5vw, 4rem);
}

.fx-gradient-card {
    color: #fff;
    background: linear-gradient(145deg, var(--fx-primary-dark), var(--fx-primary));
    border-radius: var(--fx-radius-xl) !important;
    box-shadow: var(--fx-shadow-lg) !important;
    overflow: hidden;
}

    .fx-gradient-card::after {
        content: "";
        position: absolute;
        inset: auto -6rem -8rem auto;
        width: 16rem;
        height: 16rem;
        border-radius: 50%;
        background: rgba(0,150,136,.22);
        pointer-events: none;
    }

.fx-auth-side-card,
.fx-access-intro-card,
.fx-select-intro-card {
    position: relative;
    min-height: 100%;
    padding: clamp(1.5rem, 4vw, 2.75rem);
}

.fx-auth-card,
.fx-access-card,
.fx-select-card {
    padding: clamp(1.25rem, 4vw, 2.25rem);
    border: 1px solid var(--fx-line);
    border-radius: var(--fx-radius-xl) !important;
    background: rgba(255,255,255,.96);
    box-shadow: var(--fx-shadow-md) !important;
}

.fx-card-soft {
    border: 1px solid var(--fx-line);
    border-radius: var(--fx-radius-md) !important;
    background: rgba(255,255,255,.92);
    box-shadow: var(--fx-shadow-sm) !important;
}

.fx-card-muted {
    border: 1px solid rgba(var(--fx-primary-rgb), .14);
    border-radius: var(--fx-radius-md) !important;
    background: rgba(var(--fx-primary-rgb), .04);
}

.fx-card-success {
    border: 1px solid rgba(var(--fx-secondary-rgb), .25);
    border-radius: var(--fx-radius-md) !important;
    background: rgba(var(--fx-secondary-rgb), .08);
}

.fx-icon-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 999px;
    background: var(--fx-secondary);
    color: #fff;
    font-weight: 850;
    flex: 0 0 auto;
}

.fx-step-list {
    display: grid;
    gap: .85rem;
    margin: 1.8rem 0 0;
    padding: 0;
    list-style: none;
}

.fx-step-item {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: .75rem;
    align-items: start;
    padding: .9rem;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: var(--fx-radius-md);
    background: rgba(255,255,255,.08);
}

.fx-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    color: var(--fx-primary-dark);
    background: rgba(255,255,255,.92);
    font-weight: 900;
}

.fx-step-item.is-active {
    background: rgba(0,150,136,.22);
    border-color: rgba(255,255,255,.45);
}

.fx-step-item.is-complete .fx-step-number {
    color: #fff;
    background: var(--fx-secondary);
}

.fx-step-tag,
.fx-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: .35rem .7rem;
    color: var(--fx-secondary);
    background: rgba(var(--fx-secondary-rgb), .10);
    font-size: .78rem;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.fx-policy-card {
    margin-top: 1.5rem;
    padding: 1rem;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: var(--fx-radius-md);
    background: rgba(255,255,255,.08);
}

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

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

.fx-provider-grid,
.fx-membership-list {
    display: grid;
    gap: .85rem;
}

.fx-provider-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fx-provider-button {
    min-height: 72px;
    border: 1px solid var(--fx-line) !important;
    border-radius: var(--fx-radius-md) !important;
    background: #fff !important;
    justify-content: flex-start !important;
    text-align: left !important;
}

.fx-membership-card {
    padding: 1rem;
    border: 1px solid var(--fx-line);
    border-radius: var(--fx-radius-md);
    background: #fff;
    cursor: pointer;
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

    .fx-membership-card:hover {
        transform: translateY(-1px);
        border-color: rgba(var(--fx-primary-rgb), .35);
        box-shadow: var(--fx-shadow-sm);
    }

    .fx-membership-card.is-selected {
        border-color: var(--fx-secondary);
        background: rgba(var(--fx-secondary-rgb), .08);
        box-shadow: 0 0 0 3px rgba(var(--fx-secondary-rgb), .12);
    }

.fx-tenant-logo {
    width: 3rem;
    height: 3rem;
    border-radius: var(--fx-radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(145deg, var(--fx-primary), var(--fx-secondary));
    flex: 0 0 auto;
}

.fx-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: .65rem;
}

.fx-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .8rem;
}

.fx-summary-tile {
    padding: .85rem;
    border: 1px solid var(--fx-line);
    border-radius: var(--fx-radius-sm);
    background: rgba(255,255,255,.78);
}

    .fx-summary-tile span {
        display: block;
        color: var(--fx-muted);
        font-size: .78rem;
        font-weight: 750;
    }

    .fx-summary-tile strong {
        display: block;
        margin-top: .18rem;
        color: var(--fx-primary-dark);
    }

.fx-success-panel {
    max-width: 760px;
    margin: clamp(2rem, 6vw, 4rem) auto 0;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    text-align: center;
    border: 1px solid rgba(var(--fx-secondary-rgb), .25);
    border-radius: var(--fx-radius-xl) !important;
    background: rgba(255,255,255,.95);
    box-shadow: var(--fx-shadow-md) !important;
}

.fx-reference-box {
    display: inline-flex;
    margin-block: 1rem;
    padding: .75rem 1rem;
    border-radius: var(--fx-radius-sm);
    color: var(--fx-primary-dark);
    background: rgba(var(--fx-primary-rgb), .08);
    font-weight: 900;
}

.validation-message,
.mud-input-helper-text .mud-input-error,
.fx-field-error {
    color: var(--fx-error);
    font-size: .83rem;
    font-weight: 650;
}

.fx-muted {
    color: var(--fx-muted) !important;
}

.fx-text-primary-dark {
    color: var(--fx-primary-dark) !important;
}

.fx-text-secondary {
    color: var(--fx-secondary) !important;
}

@media (max-width: 991.98px) {
    .fx-public-nav {
        display: none;
    }

    .fx-auth-side-card,
    .fx-access-intro-card,
    .fx-select-intro-card {
        min-height: auto;
    }
}

@media (max-width: 767.98px) {
    .fx-public-shell {
        padding-block: .75rem 2rem;
    }

    .fx-page-container {
        width: min(100% - 1rem, var(--fx-page-max));
    }

    .fx-public-topbar {
        padding: .65rem .8rem;
    }

    .fx-form-grid-2,
    .fx-form-grid-3,
    .fx-provider-grid,
    .fx-summary-grid {
        grid-template-columns: 1fr;
    }

    .fx-auth-grid,
    .fx-select-grid,
    .fx-access-grid {
        margin-top: 1.25rem;
    }
}

/* --------------------------------------------------------------------------
   FreshAxis Home Page - MudBlazor + Bootstrap 5.3.8 compatible additions
   -------------------------------------------------------------------------- */
.fx-home-page {
    overflow-x: hidden;
}

.fx-public-header {
    position: sticky;
    top: 0;
    z-index: 30;
    padding-top: .25rem;
}

.fx-home-login-button {
    min-width: 7rem;
}

.fx-home-hero {
    padding-block: clamp(2.5rem, 6vw, 5.75rem) clamp(1.5rem, 4vw, 3rem);
}

.fx-home-title {
    margin: 0;
    color: var(--fx-primary-dark);
    font-weight: 900 !important;
    font-size: clamp(3rem, 8vw, 5.7rem) !important;
    line-height: .95 !important;
    letter-spacing: -.055em !important;
}

    .fx-home-title span {
        color: var(--fx-secondary);
    }

.fx-home-copy {
    max-width: 54ch;
    color: var(--fx-muted);
    font-size: clamp(1.05rem, 2vw, 1.28rem) !important;
    line-height: 1.65 !important;
}

.fx-home-highlight {
    padding: 1rem;
    min-height: 118px;
}

.fx-home-preview-frame {
    padding: .95rem;
    border: 1px solid var(--fx-line);
    border-radius: var(--fx-radius-xl) !important;
    background: radial-gradient(circle at 85% 16%, rgba(var(--fx-secondary-rgb), .14), transparent 14rem), rgba(255,255,255,.72);
    box-shadow: var(--fx-shadow-lg) !important;
}

.fx-home-preview-shell {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    min-height: 420px;
    overflow: hidden;
    border: 1px solid var(--fx-line);
    border-radius: var(--fx-radius-lg);
    background: #fff;
}

.fx-home-preview-rail {
    display: grid;
    align-content: start;
    justify-items: center;
    gap: 1rem;
    padding: 1rem .65rem;
    color: #fff;
    background: linear-gradient(180deg, var(--fx-primary-dark), var(--fx-primary));
}

.fx-home-preview-content {
    padding: clamp(1rem, 2vw, 1.25rem);
    background: linear-gradient(135deg, #fff 0%, #f2fbfb 100%);
}

.fx-home-metric {
    padding: .85rem;
}

.fx-home-status-dot {
    width: .9rem;
    height: .9rem;
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(255,255,255,.85);
    flex: 0 0 auto;
}

.fx-dot-secondary {
    background: var(--fx-secondary);
}

.fx-dot-info {
    background: var(--fx-info);
}

.fx-dot-success {
    background: var(--fx-success);
}

.fx-dot-warning {
    background: var(--fx-warning);
}

.fx-note-success {
    color: var(--fx-secondary) !important;
    font-weight: 850 !important;
}

.fx-note-warning {
    color: var(--fx-warning) !important;
    font-weight: 850 !important;
}

.fx-note-error {
    color: var(--fx-error) !important;
    font-weight: 850 !important;
}

.fx-home-chart-card {
    min-height: 160px;
    padding: 1rem;
}

.fx-donut-chart {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: conic-gradient(var(--fx-primary) 0 42%, var(--fx-secondary) 42% 72%, var(--fx-info) 72% 88%, #cbd5e1 88% 100%);
    position: relative;
    flex: 0 0 auto;
}

    .fx-donut-chart::after {
        content: "";
        position: absolute;
        inset: 17px;
        border-radius: 50%;
        background: #fff;
    }

.fx-home-chart-legend,
.fx-home-alert-list {
    display: grid;
    gap: .45rem;
    color: var(--fx-muted);
    font-size: .84rem;
}

.fx-home-dispatch-card {
    padding: 1rem;
}

.fx-route-line {
    height: 46px;
    margin-top: .85rem;
    border-bottom: 3px solid #dbeafe;
    background: radial-gradient(circle at 12% 82%, var(--fx-primary) 0 .28rem, transparent .3rem), radial-gradient(circle at 42% 42%, var(--fx-secondary) 0 .28rem, transparent .3rem), radial-gradient(circle at 76% 78%, var(--fx-info) 0 .28rem, transparent .3rem), linear-gradient(112deg, transparent 0 10%, rgba(var(--fx-primary-rgb), .72) 10% 11%, transparent 11% 39%, rgba(var(--fx-secondary-rgb), .72) 39% 40%, transparent 40% 74%, rgba(var(--fx-info-rgb), .72) 74% 75%, transparent 75% 100%);
}

.fx-section {
    padding-block: clamp(2rem, 5vw, 3.5rem);
}

.fx-section-title {
    margin: 0 0 1.25rem;
    color: var(--fx-primary-dark);
    font-weight: 900 !important;
    font-size: clamp(1.75rem, 4vw, 2.45rem) !important;
    letter-spacing: -.035em !important;
}

.fx-home-module-card,
.fx-home-pack-card,
.fx-home-benefit-card {
    padding: 1.25rem;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

    .fx-home-module-card:hover,
    .fx-home-pack-card:hover,
    .fx-home-benefit-card:hover {
        transform: translateY(-2px);
        border-color: rgba(var(--fx-primary-rgb), .28);
        box-shadow: var(--fx-shadow-md) !important;
    }

.fx-home-module-icon,
.fx-home-pack-icon {
    width: 3rem !important;
    height: 3rem !important;
}

.fx-home-benefit-card {
    text-align: center;
    min-height: 150px;
}

.fx-home-access-banner {
    padding: clamp(1.5rem, 4vw, 2.25rem);
    overflow: hidden;
    color: #fff;
    border-radius: var(--fx-radius-xl) !important;
    background: radial-gradient(circle at 88% 20%, rgba(var(--fx-secondary-rgb), .45), transparent 18rem), linear-gradient(135deg, var(--fx-primary-dark), var(--fx-primary));
    box-shadow: var(--fx-shadow-lg) !important;
}

.fx-kicker-on-dark {
    color: #90f1df;
    background: rgba(255,255,255,.12);
}

.fx-home-banner-title {
    margin: 0;
    font-weight: 900 !important;
    letter-spacing: -.035em !important;
}

.fx-home-banner-copy {
    max-width: 66ch;
    color: #dbeafe;
    line-height: 1.65 !important;
}

.fx-mud-btn-outline-on-dark.mud-button-outlined {
    color: #fff !important;
    border-color: rgba(255,255,255,.75) !important;
    background: rgba(255,255,255,.08) !important;
}

.fx-home-footer {
    margin-top: 2rem;
    padding-block: 2.5rem 1.5rem;
    color: #fff;
    background: var(--fx-primary-dark);
}

.fx-brand-footer,
.fx-brand-footer:hover {
    color: #fff !important;
}

.fx-home-footer-copy,
.fx-home-footer-bottom,
.fx-footer-links a {
    color: #dbeafe !important;
}

.fx-footer-links {
    display: grid;
    gap: .45rem;
}

    .fx-footer-links a:hover {
        color: #90f1df !important;
    }

.fx-footer-divider {
    border-color: rgba(255,255,255,.18) !important;
}

@media (max-width: 1199.98px) {
    .fx-home-preview-shell {
        min-height: 390px;
    }
}

@media (max-width: 991.98px) {
    .fx-home-title {
        font-size: clamp(2.7rem, 11vw, 4.5rem) !important;
    }

    .fx-home-preview-shell {
        min-height: auto;
    }
}

@media (max-width: 767.98px) {
    .fx-home-login-button {
        display: none !important;
    }

    .fx-home-hero {
        padding-block: 2rem 1.25rem;
    }

    .fx-home-title {
        font-size: clamp(2.45rem, 14vw, 3.65rem) !important;
    }

    .fx-home-preview-frame {
        padding: .6rem;
    }

    .fx-home-preview-shell {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .fx-home-preview-rail {
        gap: .75rem;
        padding: .85rem .45rem;
    }

    .fx-home-chart-card {
        min-height: auto;
    }

    .fx-home-access-banner .mud-button-root {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .fx-public-topbar .mud-button-label {
        font-size: .82rem;
    }

    .fx-public-topbar .mud-button-root {
        padding-inline: .65rem !important;
    }
}

/* FreshAxis authorized MudBlazor workspace shell */
.fx-auth-layout {
    min-height: 100dvh;
    background: radial-gradient(circle at 92% 0%, rgba(var(--fx-info-rgb), .14), transparent 28rem), radial-gradient(circle at 6% 92%, rgba(var(--fx-secondary-rgb), .12), transparent 28rem), var(--fx-background);
}

.fx-tenant-appbar-mud.mud-appbar {
    background: rgba(255,255,255,.96) !important;
    color: var(--fx-primary-dark) !important;
    border-bottom: 1px solid var(--fx-line);
    backdrop-filter: blur(16px);
    box-shadow: var(--fx-shadow-sm) !important;
}

.fx-tenant-brand-link {
    display: inline-flex !important;
    align-items: center;
    gap: .55rem;
    color: var(--fx-primary-dark) !important;
    font-weight: 900 !important;
    letter-spacing: .01em;
    white-space: nowrap;
}

.fx-tenant-brand-mark {
    display: inline-flex;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
}

.fx-tenant-brand-name span {
    color: var(--fx-secondary);
    margin-left: .25rem;
}

.fx-tenant-name {
    max-width: 280px;
    color: var(--fx-primary-dark) !important;
    font-weight: 850 !important;
}

.fx-tenant-context-button-mud,
.fx-user-menu-button {
    font-weight: 850 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.fx-tenant-search-field {
    width: min(32vw, 380px);
    margin-inline: .75rem;
}

    .fx-tenant-search-field .mud-input-root {
        background: #fff;
        border-radius: var(--fx-radius-sm) !important;
    }

.fx-tenant-drawer.mud-drawer {
    background: var(--fx-primary-dark) !important;
    color: #fff !important;
    border-right: 0 !important;
    box-shadow: 10px 0 30px rgba(7,43,97,.12) !important;
}

.fx-tenant-drawer-header {
    min-height: 84px !important;
    padding: 1.25rem 1rem .75rem !important;
    border-bottom: 1px solid rgba(255,255,255,.12);
}

.fx-tenant-drawer-title {
    color: #fff !important;
    font-weight: 850 !important;
}

.fx-tenant-drawer-caption {
    color: rgba(255,255,255,.70) !important;
    font-weight: 650 !important;
}

.fx-tenant-nav {
    padding: .75rem .75rem 1rem;
}

    .fx-tenant-nav .mud-nav-link {
        min-height: 44px;
        margin-bottom: .35rem;
        border-radius: var(--fx-radius-sm) !important;
        color: rgba(255,255,255,.88) !important;
        font-weight: 800 !important;
        letter-spacing: .01em;
    }

        .fx-tenant-nav .mud-nav-link .mud-nav-link-icon {
            color: rgba(255,255,255,.92) !important;
        }

        .fx-tenant-nav .mud-nav-link:hover {
            background: rgba(255,255,255,.12) !important;
            color: #fff !important;
        }

        .fx-tenant-nav .mud-nav-link.active,
        .fx-tenant-nav .mud-nav-link.active:not(.mud-nav-link-disabled) {
            background: #1C5BC0 !important;
            color: #fff !important;
            box-shadow: 0 10px 24px rgba(0,0,0,.14);
        }

            .fx-tenant-nav .mud-nav-link.active .mud-nav-link-icon {
                color: #fff !important;
            }

.fx-tenant-main-content {
    min-height: 100dvh;
    background: radial-gradient(circle at 88% 4%, rgba(var(--fx-info-rgb), .13), transparent 32rem), radial-gradient(circle at 4% 96%, rgba(var(--fx-secondary-rgb), .12), transparent 28rem), var(--fx-background);
}

.fx-tenant-content-container {
    padding: clamp(1rem, 2.7vw, 2rem) !important;
}

/* FreshAxis authorized MudBlazor dashboard */
.fx-dashboard-page {
    display: grid;
    gap: 1.35rem;
}

.fx-dashboard-title-row {
    min-width: 0;
}

.fx-dashboard-kicker {
    color: var(--fx-secondary) !important;
    font-weight: 900 !important;
    letter-spacing: .08em !important;
}

.fx-dashboard-title {
    color: var(--fx-primary-dark) !important;
    font-weight: 900 !important;
    letter-spacing: -.035em !important;
    line-height: 1 !important;
}

.fx-dashboard-subtitle,
.fx-dashboard-muted {
    color: var(--fx-muted) !important;
    font-weight: 650 !important;
}

.fx-live-chip {
    border-color: rgba(var(--fx-secondary-rgb), .35) !important;
    background: rgba(var(--fx-secondary-rgb), .08) !important;
    font-weight: 850 !important;
}

.fx-dashboard-kpi,
.fx-dashboard-panel,
.fx-dashboard-snapshot,
.fx-dashboard-context-card {
    border: 1px solid var(--fx-line);
    border-radius: var(--fx-radius-md) !important;
    background: rgba(255,255,255,.96) !important;
    box-shadow: var(--fx-shadow-sm) !important;
}

.fx-dashboard-kpi {
    position: relative;
    overflow: hidden;
    padding: 1.1rem;
    min-height: 126px;
}

    .fx-dashboard-kpi::after {
        content: "";
        position: absolute;
        width: 110px;
        height: 110px;
        border-radius: 50%;
        right: -52px;
        top: -52px;
        background: rgba(var(--fx-primary-rgb), .05);
        pointer-events: none;
    }

.fx-dashboard-kpi-label,
.fx-dashboard-panel-title,
.fx-dashboard-snapshot-title {
    color: var(--fx-primary-dark) !important;
    font-weight: 900 !important;
}

.fx-dashboard-kpi-value {
    display: block;
    margin-top: .5rem !important;
    color: var(--fx-primary-dark) !important;
    font-weight: 900 !important;
    letter-spacing: -.025em !important;
}

.fx-dashboard-kpi-detail {
    color: var(--fx-muted) !important;
    font-weight: 750 !important;
}

.fx-dot-secondary {
    background: var(--fx-secondary) !important;
    color: #fff !important;
}

.fx-dot-info {
    background: var(--fx-info) !important;
    color: #fff !important;
}

.fx-dot-warning {
    background: var(--fx-warning) !important;
    color: #fff !important;
}

.fx-dot-success {
    background: var(--fx-success) !important;
    color: #fff !important;
}

.fx-dashboard-panel {
    padding: 1.25rem;
}

.fx-dashboard-list .mud-list-item {
    min-height: 44px;
    border-radius: var(--fx-radius-sm);
    margin-bottom: .35rem;
}

.fx-alert-list-item:hover {
    background: rgba(var(--fx-warning-rgb), .08) !important;
}

.fx-task-button.mud-button-root {
    min-height: 42px;
    justify-content: space-between !important;
    border-radius: var(--fx-radius-sm) !important;
    color: var(--fx-primary-dark) !important;
    font-weight: 750 !important;
    text-transform: none !important;
    box-shadow: none !important;
}

.fx-task-soft-blue.mud-button-root {
    background: #E9F3FF !important;
    border: 1px solid #CFE2FF !important;
}

.fx-task-soft-green.mud-button-root {
    background: rgba(var(--fx-secondary-rgb), .10) !important;
    border: 1px solid rgba(var(--fx-secondary-rgb), .18) !important;
}

.fx-dashboard-quick-actions .mud-button-root {
    min-height: 38px;
}

.fx-dashboard-snapshot {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.1rem;
}

.fx-dashboard-snapshot-avatar,
.fx-dashboard-context-avatar {
    background: rgba(var(--fx-secondary-rgb), .10) !important;
    color: var(--fx-secondary) !important;
}

.fx-dashboard-context-card {
    padding: 1.25rem;
    background: linear-gradient(180deg, rgba(var(--fx-secondary-rgb), .10), rgba(255,255,255,.96)) !important;
    border-color: rgba(var(--fx-secondary-rgb), .25) !important;
}

.fx-context-row {
    display: grid;
    gap: .15rem;
}

.fx-context-label {
    color: var(--fx-muted) !important;
    font-weight: 850 !important;
}

.fx-context-value {
    color: var(--fx-primary-dark) !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
}

@media (max-width: 991.98px) {
    .fx-tenant-search-field {
        width: min(48vw, 340px);
    }

    .fx-tenant-content-container {
        padding: 1rem !important;
    }
}

@media (max-width: 767.98px) {
    .fx-user-menu-button .mud-button-label {
        max-width: 86px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .fx-dashboard-action-row,
    .fx-dashboard-action-row .mud-button-root {
        width: 100%;
    }

    .fx-dashboard-action-row {
        display: grid !important;
        grid-template-columns: 1fr;
    }
}
/* FreshAxis authorized workspace: top app bar spacing fix
   Add this below the existing authorized MudBlazor CSS rules in freshaxis-base.css. */

.fx-tenant-appbar-mud.mud-appbar {
    min-height: 76px !important;
    padding: 0 !important;
}

.fx-tenant-appbar-mud .mud-toolbar {
    width: 100%;
    min-height: 76px !important;
    padding-inline: clamp(.75rem, 1.4vw, 1.5rem) !important;
}

.fx-tenant-topbar-grid {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(240px, max-content) minmax(260px, 430px) auto;
    align-items: center;
    column-gap: clamp(.65rem, 1.2vw, 1.25rem);
}

.fx-tenant-topbar-brand {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.fx-tenant-brand-link {
    min-width: 0;
    flex: 0 0 auto;
}

.fx-tenant-brand-name {
    white-space: nowrap !important;
}

.fx-tenant-context-group {
    min-width: 0;
    overflow: hidden;
}

.fx-tenant-context-divider {
    margin-inline: .75rem !important;
}

.fx-tenant-name {
    display: block !important;
    max-width: clamp(11rem, 17vw, 19rem);
    min-width: 0;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    color: var(--fx-primary-dark) !important;
    font-weight: 850 !important;
}

.fx-tenant-context-button-mud {
    min-width: max-content;
    max-width: 12rem;
    white-space: nowrap !important;
    flex: 0 0 auto;
    padding-inline: .75rem !important;
}

    .fx-tenant-context-button-mud .mud-button-label {
        min-width: 0;
        white-space: nowrap !important;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.fx-tenant-search-field {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 430px;
    margin-inline: 0 !important;
}

    .fx-tenant-search-field .mud-input-root {
        min-height: 44px;
    }

.fx-tenant-topbar-actions {
    min-width: max-content;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: .25rem;
    white-space: nowrap;
}

.fx-user-menu-button {
    max-width: 10.5rem;
    min-width: max-content;
    padding-inline: .65rem !important;
}

    .fx-user-menu-button .mud-button-label {
        min-width: 0;
        max-width: 8.25rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap !important;
    }

@media (max-width: 1399.98px) {
    .fx-tenant-topbar-grid {
        grid-template-columns: auto minmax(180px, 320px) minmax(220px, 1fr) auto;
    }

    .fx-tenant-name {
        max-width: 11rem;
    }
}

@media (max-width: 1199.98px) {
    .fx-tenant-brand-name {
        display: none;
    }

    .fx-tenant-topbar-grid {
        grid-template-columns: auto minmax(180px, 300px) minmax(210px, 1fr) auto;
    }
}

@media (max-width: 991.98px) {
    .fx-tenant-topbar-grid {
        grid-template-columns: auto 1fr auto;
        row-gap: .35rem;
    }

    .fx-tenant-context-group {
        grid-column: 2 / 3;
    }

    .fx-tenant-search-field {
        grid-column: 1 / -1;
        max-width: none;
    }
}

@media (max-width: 767.98px) {
    .fx-tenant-appbar-mud.mud-appbar,
    .fx-tenant-appbar-mud .mud-toolbar {
        min-height: 64px !important;
    }

    .fx-tenant-topbar-grid {
        grid-template-columns: auto 1fr auto;
    }

    .fx-tenant-search-field {
        display: none !important;
    }

    .fx-user-menu-button .mud-button-label {
        max-width: 5rem;
    }
}


/* FreshAxis authorized workspace: topbar alignment refinement
   Place this after the existing MudBlazor authorized layout CSS. */

.fx-tenant-appbar-mud.mud-appbar {
    min-height: 66px !important;
    padding: 0 !important;
}

.fx-tenant-appbar-mud .mud-toolbar {
    width: 100%;
    min-height: 66px !important;
    padding-inline: clamp(.85rem, 1.5vw, 1.65rem) !important;
}

.fx-tenant-topbar-grid {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(140px, 170px) minmax(430px, 580px) minmax(280px, 430px) minmax(128px, auto);
    align-items: center;
    column-gap: clamp(.75rem, 1.2vw, 1.35rem);
}

.fx-tenant-topbar-brand {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}

.fx-tenant-brand-link {
    min-width: 0;
    flex: 0 0 auto;
}

.fx-tenant-brand-name {
    white-space: nowrap !important;
}

.fx-tenant-context-group {
    min-width: 0;
    height: 100%;
    display: flex !important;
    align-items: center !important;
    overflow: hidden;
}

.fx-tenant-context-divider {
    align-self: stretch;
    margin-inline: 0 .9rem !important;
}

.fx-tenant-context-shell {
    min-width: 0;
    width: 100%;
    display: flex;
    align-items: center;
    gap: clamp(.8rem, 1.1vw, 1.15rem);
}

.fx-tenant-company-slot {
    flex: 1 1 auto;
    min-width: 230px;
    max-width: 360px;
    display: flex;
    align-items: center;
}

.fx-tenant-name {
    display: block !important;
    width: 100%;
    min-width: 0;
    max-width: 100% !important;
    color: var(--fx-primary-dark) !important;
    font-weight: 850 !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.fx-tenant-context-button-mud,
.fx-tenant-location-button-mud {
    flex: 0 0 132px;
    width: 132px;
    min-width: 132px !important;
    max-width: 132px;
    height: 38px !important;
    min-height: 38px !important;
    padding-inline: .65rem .5rem !important;
    justify-content: space-between !important;
    border-radius: .55rem !important;
    line-height: 1 !important;
}

    .fx-tenant-location-button-mud .mud-button-label,
    .fx-tenant-location-button-mud .mud-button-label span,
    .fx-tenant-location-label {
        min-width: 0;
        max-width: 250px;
        display: inline-block;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        line-height: 1.1 !important;
    }

    .fx-tenant-location-button-mud .mud-button-end-icon {
        margin-left: .25rem !important;
        margin-right: 0 !important;
        flex: 0 0 auto;
    }

.fx-tenant-search-field {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 430px;
    margin: 0 !important;
}

    .fx-tenant-search-field .mud-input-control {
        margin-top: 0 !important;
    }

    .fx-tenant-search-field .mud-input,
    .fx-tenant-search-field .mud-input-root,
    .fx-tenant-search-field .mud-input-outlined,
    .fx-tenant-search-field .mud-input-control-input-container {
        min-height: 38px !important;
        height: 38px !important;
    }

        .fx-tenant-search-field .mud-input > input,
        .fx-tenant-search-field input.mud-input-root {
            height: 38px !important;
            min-height: 38px !important;
            padding-top: .42rem !important;
            padding-bottom: .42rem !important;
            font-size: .92rem !important;
            line-height: 1.2 !important;
        }

    .fx-tenant-search-field .mud-input-adornment {
        height: 38px !important;
        margin-top: 0 !important;
        align-self: center !important;
    }

    .fx-tenant-search-field .mud-input-outlined-border {
        border-color: rgba(100, 116, 139, .45) !important;
    }

.fx-tenant-topbar-actions {
    min-width: max-content;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: .25rem;
    white-space: nowrap;
}

.fx-user-menu-button {
    max-width: 10.5rem;
    min-width: max-content;
    height: 38px !important;
    min-height: 38px !important;
    padding-inline: .65rem !important;
}

    .fx-user-menu-button .mud-button-label {
        min-width: 0;
        max-width: 8.25rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap !important;
    }

@media (max-width: 1399.98px) {
    .fx-tenant-topbar-grid {
        grid-template-columns: minmax(116px, 150px) minmax(360px, 470px) minmax(250px, 1fr) minmax(116px, auto);
    }

    .fx-tenant-company-slot {
        min-width: 210px;
        max-width: 300px;
    }
}

@media (max-width: 1199.98px) {
    .fx-tenant-brand-name {
        display: none;
    }

    .fx-tenant-topbar-grid {
        grid-template-columns: minmax(52px, 64px) minmax(330px, 430px) minmax(220px, 1fr) minmax(108px, auto);
    }

    .fx-tenant-company-slot {
        min-width: 190px;
        max-width: 270px;
    }

    .fx-tenant-context-button-mud,
    .fx-tenant-location-button-mud {
        flex-basis: 120px;
        width: 120px;
        min-width: 120px !important;
        max-width: 120px;
    }
}

@media (max-width: 991.98px) {
    .fx-tenant-appbar-mud.mud-appbar,
    .fx-tenant-appbar-mud .mud-toolbar {
        min-height: 64px !important;
    }

    .fx-tenant-topbar-grid {
        grid-template-columns: auto 1fr auto;
        row-gap: .35rem;
    }

    .fx-tenant-context-group {
        grid-column: 2 / 3;
    }

    .fx-tenant-search-field {
        grid-column: 1 / -1;
        max-width: none;
    }
}

@media (max-width: 767.98px) {
    .fx-tenant-context-group,
    .fx-tenant-search-field {
        display: none !important;
    }

    .fx-tenant-topbar-grid {
        grid-template-columns: auto 1fr auto;
    }

    .fx-user-menu-button .mud-button-label {
        max-width: 5rem;
    }
}
