/* Shared desktop navigation; visual grouping does not grant product access. */
:root { --shared-topbar-offset: 4.25rem; }
.shared-topbar-compact-actions { display: none; }
@media (max-width: 900px) {
    :root { --shared-topbar-offset: 4rem; }
    .top-navigation:has(.shared-topbar-compact-actions) .app-method-nav-wrap,
    .top-navigation:has(.shared-topbar-compact-actions) .report-header-onto-switch {
        display: none !important;
    }
    .top-navigation .shared-topbar-compact-actions {
        display: flex; align-items: center; justify-content: flex-end;
        gap: .4rem; flex: 1; min-width: 0;
    }
    .shared-topbar-compact-actions button {
        display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
        height: 44px; padding: 0 .65rem; border: 1px solid #e6d6bd; border-radius: 8px;
        background: #fffdf8; color: #79541f; font: inherit; font-size: .8rem;
        font-weight: 700; white-space: nowrap; cursor: pointer;
    }
    .shared-topbar-compact-actions button:focus-visible { outline: 2px solid #bb8737; outline-offset: 2px; }
    body:has(.shared-topbar-compact-actions) .unified-floating-dock { display: none !important; }
    html[data-theme="dark"] .shared-topbar-compact-actions button { background: #17202c; color: #f3d08a; border-color: #475569; }
}
@media (max-width: 420px) {
    .top-navigation:has(.shared-topbar-compact-actions) .logo-text { display: none !important; }
    .shared-topbar-compact-actions button { padding-inline: .5rem; font-size: .75rem; }
}
.workbench-method-topbar { z-index: 1500 !important; overflow: visible !important; }
.workbench-method-topbar .workbench-nav,
.workbench-method-topbar .workbench-nav-item { overflow: visible !important; }
.workbench-method-topbar .workbench-nav-item { position: relative; }
.workbench-method-topbar .app-method-nav-wrap { overflow: visible !important; }
.workbench-method-topbar .workbench-nav { gap: clamp(.2rem, .65vw, .8rem) !important; }
@media (min-width: 901px) {
    .workbench-dashboard--lean .workbench-topbar.workbench-method-topbar {
        grid-template-columns: minmax(9rem, 1fr) auto auto;
        gap: .75rem;
    }
}
/* Match the dashboard's uncropped brand mark on all standard headers. */
.workbench-method-topbar :is(.logo-icon, .workbench-brand > img) {
    width: 2.6rem !important;
    height: 2.6rem !important;
    flex: 0 0 2.6rem !important;
    object-fit: contain !important;
    object-position: center;
    border-radius: 0 !important;
    box-shadow: none !important;
}
.workbench-dashboard--lean .workbench-topbar .shared-header-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .55rem;
    width: auto;
    min-width: 0;
    max-width: none;
}
@media (max-width: 900px) {
    .workbench-dashboard--lean .workbench-topbar .workbench-compact-action {
        box-sizing: border-box;
        height: 44px;
        min-height: 44px;
        min-width: 44px;
        border-radius: 8px;
    }
    .workbench-dashboard--lean .shared-header-controls .report-header-onto-switch { display: none !important; }
    .workbench-dashboard--lean .shared-header-controls .shared-user-menu-trigger {
        display: inline-flex !important;
        width: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        padding: 0 !important;
        justify-content: center;
    }
    .workbench-dashboard--lean .shared-header-controls :is(.shared-user-menu-identity, .shared-user-menu-chevron) { display: none !important; }
}
.workbench-method-topbar .workbench-nav-link {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    min-height: 42px; padding: .6rem .8rem; margin: 0; border: 1px solid transparent;
    border-radius: 10px; background: transparent; color: #4e4539; cursor: pointer;
    font-family: inherit; font-size: .9rem; font-weight: 750; line-height: 1.4;
    white-space: nowrap; text-decoration: none; transition: background .15s, border-color .15s;
}
.workbench-method-topbar .workbench-nav-link:hover,
.workbench-method-topbar .workbench-nav-link:focus-visible,
.workbench-method-topbar .workbench-nav-link.is-active,
.workbench-method-topbar .workbench-nav-link[aria-expanded="true"] {
    color: #79541f; background: #fbf2e3; border-color: #e9d6b6;
}
.workbench-method-topbar .workbench-nav-link::before,
.workbench-method-topbar .workbench-nav-link::after { content: none !important; }
.workbench-method-topbar .workbench-nav-link:focus-visible { outline: 2px solid #bb8737; outline-offset: 3px; }
.workbench-method-topbar .workbench-nav-link-icon { display: none; }
.workbench-method-topbar .workbench-nav-link-label { white-space: nowrap; }
/* Standard desktop pages share a compact header; menu backgrounds remain inset. */
@media (min-width: 901px) {
    #appLayoutContainer:has(> .top-navigation.workbench-method-topbar) {
        --standard-topbar-height: 3.5rem;
        --shared-topbar-offset: var(--standard-topbar-height);
    }
    #appLayoutContainer > .top-navigation.workbench-method-topbar {
        box-sizing: border-box;
        height: var(--standard-topbar-height) !important;
        min-height: var(--standard-topbar-height) !important;
        padding-block: 0 !important;
    }
    #appLayoutContainer > .top-navigation.workbench-method-topbar :is(.app-method-nav-wrap, .app-method-nav, .app-method-nav-item) {
        height: var(--standard-topbar-height) !important;
        min-height: 0 !important;
        align-items: center;
    }
    #appLayoutContainer > .top-navigation.workbench-method-topbar .workbench-nav-link {
        box-sizing: border-box;
        height: 36px !important;
        min-height: 36px !important;
        max-height: 36px;
        padding-block: .35rem !important;
        border-radius: 6px;
    }
    /* Legacy report/record styles use !important offsets; the shared header owns this spacing. */
    #appLayoutContainer:has(> .top-navigation.workbench-method-topbar) > .main-content { padding-top: var(--shared-topbar-offset) !important; }
    /* Only page roots: nested analysis dialogs retain their own internal spacing. */
    #appLayoutContainer:has(> .top-navigation.workbench-method-topbar) > .main-content > :is(.content-wrapper, .content-wrapper-wide) > .analysis-business-page {
        padding-top: 0;
        margin-top: 0;
    }
    #appLayoutContainer:has(> .top-navigation.workbench-method-topbar) > .app-sidebar { top: var(--standard-topbar-height); }
}
@media (min-width: 901px) and (max-width: 1440px) {
    .top-navigation.workbench-method-topbar .workbench-nav-link { font-size: .8rem; padding: .5rem .4rem; gap: .3rem; }
}
@media (min-width: 901px) and (max-width: 1440px) {
    .workbench-dashboard--lean .workbench-topbar.workbench-method-topbar .workbench-nav-link {
        font-size: .8rem;
        padding-inline: .4rem;
        gap: .3rem;
    }
}
.workbench-method-topbar .method-nav-chevron { font-size: .6rem; opacity: .65; transition: transform .15s; }
.workbench-method-topbar [aria-expanded="true"] .method-nav-chevron { transform: rotate(180deg); }
.workbench-method-topbar .workbench-nav-card.workbench-nav-card--unified {
    position: absolute; top: calc(100% + .45rem); left: 50%; z-index: 1800;
    display: none; box-sizing: border-box; width: min(29rem, calc(100vw - 2rem));
    max-height: min(78dvh, 50rem); overflow: auto; overscroll-behavior: contain;
    padding: 1rem; border: 1px solid #e6d6bd; border-radius: 16px;
    background: #fffdf9; box-shadow: 0 18px 50px #49311626;
    opacity: 0; visibility: hidden; pointer-events: none; transform: translateX(-50%);
    transition: opacity .12s, visibility .12s; backdrop-filter: none;
}
.workbench-method-topbar .workbench-nav-card.workbench-nav-card--sectioned {
    width: min(calc(var(--method-nav-section-count, 3) * 21rem), calc(100vw - 2rem));
}
.workbench-method-topbar .workbench-nav-item:hover .workbench-nav-card--unified,
.workbench-method-topbar .workbench-nav-item:focus-within .workbench-nav-card--unified {
    display: block; opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%);
}
.workbench-method-topbar .workbench-nav-item[data-method-nav-ready] .workbench-nav-card--unified {
    left: var(--method-nav-left, 0px); top: var(--method-nav-top, 100%);
    max-height: var(--method-nav-height, 78dvh); transform: none !important;
    display: none; opacity: 0; visibility: hidden; pointer-events: none;
}
.workbench-method-topbar .workbench-nav-item[data-method-nav-ready].is-menu-open .workbench-nav-card--unified {
    display: block; opacity: 1; visibility: visible; pointer-events: auto;
}
.workbench-method-topbar .workbench-nav-card--unified .workbench-nav-card-head {
    display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: .75rem;
    align-items: center; padding: .1rem .2rem .85rem; border-bottom: 1px solid #ebdfcd;
}
.workbench-method-topbar .workbench-nav-card--unified .workbench-nav-card-icon {
    display: inline-flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem;
    background: #faf0dd; color: #b8812b; border-radius: 10px; font-size: 1.15rem;
}
.workbench-method-topbar .workbench-nav-card--unified .workbench-nav-card-title {
    display: block; color: #3e352a; font-size: 1rem; font-weight: 800; line-height: 1.45;
}
.workbench-method-topbar .workbench-nav-card--unified .workbench-nav-card-desc {
    display: block; margin-top: .25rem; color: #817361; font-size: .78rem; line-height: 1.55; font-weight: 400;
}
.workbench-nav-card-context { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem .2rem; color: #8e7b60; font-size: .7rem; }
.workbench-nav-card-subheading { margin: .5rem .3rem 0; padding-top: .55rem; border-top: 1px solid #e9dfd0; color: #85745b; font-size: .7rem; font-weight: 600; }
.workbench-nav-card-subheading:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
html[data-theme="dark"] .workbench-nav-card-subheading { color: #a6b2c4; border-color: #475569; }
.workbench-nav-card-context i { margin-right: .3rem; }
.workbench-nav-overview-link { color: #956a2b; margin-left: auto; white-space: nowrap; text-decoration: none; }
.workbench-nav-overview-link:hover { text-decoration: underline; }
.workbench-method-topbar .workbench-nav-card--unified .workbench-nav-card-sections {
    display: grid; grid-template-columns: repeat(var(--method-nav-section-count, 3), minmax(0, 1fr)); gap: .8rem; padding: 0;
}
.workbench-method-topbar .workbench-nav-card--unified .workbench-nav-card-section {
    min-width: 0; padding: .65rem; background: #faf7f0; border: 1px solid #eee4d6; border-radius: 12px;
}
.workbench-method-topbar .workbench-nav-card--unified .workbench-nav-card-section-title {
    display: block; color: #956a2b; font-size: .78rem; font-weight: 800; padding: .15rem .3rem .5rem; line-height: 1.4;
}
.workbench-method-topbar .workbench-nav-card--unified .workbench-nav-card-links {
    display: grid; grid-template-columns: minmax(0, 1fr); gap: .25rem; padding: 0;
}
.workbench-method-topbar .workbench-nav-card--unified .workbench-nav-card-link {
    display: grid; grid-template-columns: 1.3rem minmax(0, 1fr); align-items: start; gap: .55rem;
    padding: .6rem .5rem; border: 1px solid transparent; border-radius: 8px; color: #3e4650; text-decoration: none;
}
.workbench-method-topbar .workbench-nav-card--unified .workbench-nav-card-link > i { color: #b88739; padding-top: .2rem; text-align: center; }
.workbench-method-topbar .workbench-nav-card--unified .workbench-nav-card-link strong { display: block; font-size: .84rem; font-weight: 750; line-height: 1.4; color: inherit; overflow-wrap: anywhere; }
.workbench-method-topbar .workbench-nav-card--unified .workbench-nav-card-link span span { display: block; margin-top: .18rem; color: #857866; font-size: .73rem; line-height: 1.5; font-weight: 400; overflow-wrap: anywhere; }
.workbench-method-topbar .workbench-nav-card--unified .workbench-nav-card-link:hover,
.workbench-method-topbar .workbench-nav-card--unified .workbench-nav-card-link:focus-visible,
.workbench-method-topbar .workbench-nav-card--unified .workbench-nav-card-link.is-active { background: #fff; border-color: #dec49c; color: #77511c; outline: none; }
html[data-theme="dark"] .workbench-method-topbar { --nav-dark: #17202c; }
html[data-theme="dark"] .workbench-method-topbar .workbench-nav-card.workbench-nav-card--unified { background: #17202c; border-color: #475569; }
html[data-theme="dark"] .workbench-method-topbar .workbench-nav-card--unified .workbench-nav-card-section { background: #202c3b; border-color: #475569; }
html[data-theme="dark"] .workbench-method-topbar .workbench-nav-link,
html[data-theme="dark"] .workbench-method-topbar .workbench-nav-card--unified .workbench-nav-card-title,
html[data-theme="dark"] .workbench-method-topbar .workbench-nav-card--unified .workbench-nav-card-link { color: #e2e8f0; }
html[data-theme="dark"] .workbench-method-topbar .workbench-nav-link:hover,
html[data-theme="dark"] .workbench-method-topbar .workbench-nav-link.is-active,
html[data-theme="dark"] .workbench-method-topbar .workbench-nav-link[aria-expanded="true"],
html[data-theme="dark"] .workbench-method-topbar .workbench-nav-card--unified .workbench-nav-card-link:hover,
html[data-theme="dark"] .workbench-method-topbar .workbench-nav-card--unified .workbench-nav-card-link:focus-visible { background: #334155; color: #f3d08a; }
html[data-theme="dark"] .workbench-method-topbar .workbench-nav-card--unified .workbench-nav-card-desc,
html[data-theme="dark"] .workbench-method-topbar .workbench-nav-card--unified .workbench-nav-card-link span span { color: #a6b2c4; }
@media (max-width: 900px) {
    .workbench-method-topbar .workbench-nav-card.workbench-nav-card--unified { width: min(34rem, calc(100vw - 2rem)); }
    .workbench-method-topbar .workbench-nav-card--unified .workbench-nav-card-sections { grid-template-columns: minmax(0, 1fr); }
    .top-navigation.workbench-method-topbar .workbench-nav-link,
    .app-center-topbar.workbench-method-topbar .workbench-nav-link { padding: .4rem; min-height: 36px; }
    .workbench-method-topbar .method-nav-chevron { display: none; }
    .workbench-nav-card-context { flex-wrap: wrap; gap: .4rem; }
}
@media (prefers-reduced-motion: reduce) { .workbench-method-topbar * { transition: none !important; } }

.enterprise-operations-module-links {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    margin-bottom: .6rem;
    padding: .35rem .45rem;
    overflow-x: auto;
    border: 1px solid #d8e0ea;
    border-radius: .55rem;
    background: #fff;
}
.enterprise-operations-module-links a {
    display: inline-flex;
    min-height: 1.85rem;
    align-items: center;
    gap: .35rem;
    border: 1px solid transparent;
    border-radius: .4rem;
    padding: .25rem .55rem;
    color: #52687d;
    font-size: .7rem;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
}
.enterprise-operations-module-links a:hover,
.enterprise-operations-module-links a[aria-current="page"] {
    color: #7c4813;
    border-color: #ead7bd;
    background: #fff8ed;
}
html[data-theme="dark"] .enterprise-operations-module-links { border-color: #334155; background: #0f172a; }
html[data-theme="dark"] .enterprise-operations-module-links a { color: #cbd5e1; }
html[data-theme="dark"] .enterprise-operations-module-links a:hover,
html[data-theme="dark"] .enterprise-operations-module-links a[aria-current="page"] { color: #f6d58b; border-color: #786044; background: #34302a; }

/* Dashboard header: compact means a narrow CSS viewport, not a laptop screen. */
@media (min-width: 901px) {
    .workbench-dashboard--lean .workbench-topbar.workbench-method-topbar {
        grid-template-rows: 1fr;
        align-items: center;
    }
    .workbench-dashboard--lean .workbench-topbar.workbench-method-topbar .workbench-brand {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
    }
    .workbench-dashboard--lean .workbench-topbar.workbench-method-topbar .workbench-nav {
        display: flex !important;
        grid-column: 2;
        grid-row: 1;
        min-height: 0;
        flex-wrap: nowrap;
        justify-content: center;
    }
    .workbench-dashboard--lean .workbench-topbar.workbench-method-topbar .shared-header-controls {
        grid-column: 3;
        grid-row: 1;
    }
    .workbench-dashboard--lean .workbench-topbar.workbench-method-topbar .workbench-compact-actions {
        display: none !important;
    }
}
@media (min-width: 901px) and (max-width: 1180px) {
    .workbench-dashboard--lean .workbench-topbar.workbench-method-topbar {
        grid-template-columns: minmax(8.5rem, 1fr) auto auto;
        gap: .5rem;
        padding-inline: .75rem;
    }
    .workbench-dashboard--lean .workbench-topbar.workbench-method-topbar .workbench-nav {
        gap: .12rem !important;
    }
    .workbench-dashboard--lean .workbench-topbar.workbench-method-topbar .workbench-nav-link {
        font-size: .76rem;
        padding-inline: .32rem;
    }
    .workbench-dashboard--lean .workbench-topbar.workbench-method-topbar .workbench-brand-title {
        min-width: 0;
        max-width: 7.5rem;
        flex: 1 1 auto;
    }
    .workbench-dashboard--lean .workbench-topbar.workbench-method-topbar .workbench-brand-title strong {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .workbench-dashboard--lean .workbench-topbar.workbench-method-topbar .report-header-onto-trigger {
        width: clamp(10.5rem, 16vw, 12rem) !important;
        max-width: clamp(10.5rem, 16vw, 12rem) !important;
        min-width: 0;
    }
}

/* Reserve the actual brand width; fit the remaining controls before collapsing navigation. */
@media (min-width: 901px) {
    .workbench-dashboard--lean .workbench-topbar.workbench-method-topbar {
        grid-template-columns: max-content minmax(max-content, 1fr) max-content;
        column-gap: clamp(.65rem, 1vw, 1rem);
    }
    .workbench-dashboard--lean .workbench-topbar.workbench-method-topbar .workbench-brand {
        width: max-content;
        max-width: none;
        flex-shrink: 0;
    }
    .workbench-dashboard--lean .workbench-topbar.workbench-method-topbar .workbench-brand-title {
        min-width: max-content;
        max-width: none;
        flex: 0 0 auto;
    }
    .workbench-dashboard--lean .workbench-topbar.workbench-method-topbar .workbench-brand-title strong {
        overflow: visible;
        text-overflow: clip;
        white-space: nowrap;
    }
    .workbench-dashboard--lean .workbench-topbar.workbench-method-topbar .workbench-nav {
        width: max-content;
        min-width: max-content;
        max-width: none;
        justify-self: center;
    }
    .workbench-dashboard--lean .workbench-topbar.workbench-method-topbar .shared-header-controls {
        width: max-content;
        justify-self: end;
        gap: .5rem;
        flex-wrap: nowrap;
    }
    .workbench-dashboard--lean .workbench-topbar.workbench-method-topbar .report-header-onto-trigger {
        width: clamp(10rem, 13.5vw, 13rem) !important;
        min-width: 0 !important;
        max-width: clamp(10rem, 13.5vw, 13rem) !important;
        padding-inline: .6rem;
    }
    .workbench-dashboard--lean .workbench-topbar.workbench-method-topbar.is-header-onto-compact .report-header-onto-trigger {
        width: 7.5rem !important;
        max-width: 7.5rem !important;
        padding-inline: .45rem;
    }
    .workbench-dashboard--lean .workbench-topbar.workbench-method-topbar.is-header-nav-dense .workbench-nav {
        gap: .1rem !important;
    }
    .workbench-dashboard--lean .workbench-topbar.workbench-method-topbar.is-header-nav-dense .workbench-nav-link {
        padding-inline: .3rem !important;
        font-size: .78rem !important;
    }
    .workbench-dashboard--lean .workbench-topbar.workbench-method-topbar.is-header-nav-compact .workbench-nav,
    .workbench-dashboard--lean .workbench-topbar.workbench-method-topbar.is-header-nav-compact .report-header-onto-switch {
        display: none !important;
    }
    .workbench-dashboard--lean .workbench-topbar.workbench-method-topbar.is-header-nav-compact .workbench-compact-actions {
        display: flex !important;
        grid-column: 2;
        grid-row: 1;
        justify-content: flex-end;
        align-items: center;
        min-width: 0;
        gap: .4rem;
    }
    .workbench-dashboard--lean .workbench-topbar.workbench-method-topbar.is-header-nav-compact .workbench-compact-action {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: .4rem;
        box-sizing: border-box;
        height: 44px;
        padding: 0 .6rem;
        border: 1px solid #e6d6bd;
        border-radius: 8px;
        background: #fffdf8;
        color: #79541f;
        font: inherit;
        font-size: .8rem;
        white-space: nowrap;
        cursor: pointer;
    }
    .workbench-dashboard--lean .workbench-topbar.workbench-method-topbar.is-header-nav-compact .workbench-compact-onto-name {
        max-width: 9rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Follow the actual content-card edges, including responsive page gutters. */
.workbench-dashboard--lean .workbench-topbar.workbench-method-topbar {
    padding-inline: var(--dashboard-header-inset-left, clamp(.75rem, 1.35vw, 1.8rem)) var(--dashboard-header-inset-right, clamp(.75rem, 1.35vw, 1.8rem)) !important;
}

/* Standard business pages share one horizontal gutter with their topbar. */
:root { --shared-content-inline-gutter: clamp(.75rem, 1.35vw, 1.8rem); }
#appLayoutContainer > .top-navigation.workbench-method-topbar {
    padding-inline: var(--shared-content-inline-gutter) !important;
}
#appLayoutContainer:has(> .top-navigation.workbench-method-topbar) > .main-content {
    min-width: 0;
    max-width: none !important;
    padding-inline: 0 !important;
}
#appLayoutContainer:has(> .top-navigation.workbench-method-topbar) > .main-content > :is(.content-wrapper, .content-wrapper-wide) {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: none !important;
    margin-inline: 0 !important;
    padding-inline: var(--shared-content-inline-gutter) !important;
}
@media (max-width: 640px) {
    :root { --shared-content-inline-gutter: .5rem; }
}

/* Opted-in business pages: the shared content wrapper supplies the only outer gutter. */
#appLayoutContainer :is(.data-foundation-page, .data-foundation-content, .shared-business-page, .shared-business-content) {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: none !important;
    margin-inline: 0 !important;
    padding-inline: 0 !important;
}
