html body #appHeaderInner {
    width: min(1380px, calc(100% - 2.5rem)) !important;
    min-height: 58px !important;
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: .75rem !important;
    padding: .5rem 0 !important;
}

html body #appHeaderInner .app-header-brand { min-width: auto !important; flex: 0 0 auto !important; }
html body #appHeaderInner .app-nav-actions {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scrollbar-width: none;
}
html body #appHeaderInner .app-nav-actions > a.nav-pill { white-space: nowrap !important; }
html body .app-header .app-nav-actions::-webkit-scrollbar { display: none; }
html body #appHeaderInner :is(.nav-user-status,.nav-pill--admin,.nav-pill--settings,.nav-pill--logout) { display: none !important; }

html body .app-header-utilities { margin-left: auto !important; display: flex !important; align-items: center !important; gap: .4rem !important; }
html body .header-popover { position: relative !important; display: block !important; }
html body .header-popover > summary {
    list-style: none !important;
    min-height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: .35rem !important;
    padding: .45rem .65rem !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 5px !important;
    background: var(--theme-card-bg-strong) !important;
    color: var(--theme-text) !important;
    font-size: .75rem !important;
    font-weight: 800 !important;
    cursor: pointer !important;
}
html body .header-popover > summary::-webkit-details-marker { display: none !important; }
html body .header-count { min-width: 19px; height: 19px; display: inline-grid; place-items: center; padding: 0 4px; border-radius: 10px; background: #b91c1c; color: #fff; font-size: .68rem; }
html body .header-popover-panel {
    position: fixed !important;
    z-index: 1500 !important;
    top: 62px !important;
    right: max(1rem, calc((100vw - 1380px) / 2)) !important;
    width: min(390px, calc(100vw - 2rem)) !important;
    max-height: min(70vh, 560px) !important;
    overflow: auto !important;
    padding: .65rem !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 7px !important;
    background: var(--theme-card-bg-strong) !important;
    box-shadow: 0 24px 60px rgba(15,23,42,.2) !important;
}
html body .header-account .header-popover-panel { width: min(330px, calc(100vw - 2rem)) !important; overflow-x: hidden !important; }
html body :is(.header-popover-head,.header-account-name) { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .55rem .65rem .75rem; border-bottom: 1px solid var(--theme-border-soft); }
html body .header-notification { display: grid !important; gap: .2rem; padding: .7rem; border-bottom: 1px solid var(--theme-border-soft); color: var(--theme-text) !important; }
html body .header-notification.is-unread { border-left: 3px solid var(--theme-accent); background: var(--theme-accent-faint); }
html body :is(.header-notification span,.header-notification small,.header-popover-empty,.header-account-name span) { color: var(--theme-muted); font-size: .76rem; }
html body .header-account .header-popover-panel > a { display: block !important; padding: .65rem !important; border-bottom: 1px solid var(--theme-border-soft) !important; color: var(--theme-text) !important; font-weight: 750; }
html body .header-account .app-impersonation-controls { margin: .55rem 0 !important; padding: .65rem !important; border: 1px solid var(--theme-border-soft) !important; border-radius: 5px !important; }
html body:not(.login-page):not(.map-embed) header.app-header .header-account .app-impersonation-controls {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    gap: .4rem !important;
}
html body:not(.login-page):not(.map-embed) header.app-header .header-account .app-impersonation-label {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 28px !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}
html body:not(.login-page):not(.map-embed) header.app-header .header-account .app-impersonation-controls :is(.impersonation-start-form,.impersonation-demo-form,.impersonation-stop-form) {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}
html body:not(.login-page):not(.map-embed) header.app-header .header-account .app-impersonation-controls .impersonation-demo-toggle,
html body:not(.login-page):not(.map-embed) header.app-header .header-account .app-impersonation-controls .impersonation-stop-form .nav-pill {
    width: 100% !important;
    min-width: 0 !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}
html body:not(.login-page):not(.map-embed) header.app-header .header-account .app-impersonation-controls .impersonation-demo-toggle {
    justify-content: space-between !important;
}
html body:not(.login-page):not(.map-embed) header.app-header .header-account .app-impersonation-controls .impersonation-stop-form .nav-pill {
    white-space: normal !important;
}
html body:not(.login-page):not(.map-embed) header.app-header .header-account .impersonation-start-form {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
}
html body:not(.login-page):not(.map-embed) header.app-header .header-account .impersonation-start-form select {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
}
html body .scan-context-bar {
    position: relative !important;
    z-index: 2 !important;
    width: min(1380px, calc(100% - 2.5rem)) !important;
    min-height: 34px !important;
    margin: -.15rem auto .3rem !important;
    display: flex !important;
    align-items: center !important;
    gap: .6rem !important;
    overflow-x: auto !important;
    color: var(--theme-muted) !important;
    font-size: .73rem !important;
    white-space: nowrap !important;
}
html body .scan-context-bar label { color: var(--theme-heading) !important; font-weight: 800 !important; }
html body .scan-context-bar select { width: auto !important; min-height: 29px !important; max-width: 240px !important; padding: .3rem 1.7rem .3rem .45rem !important; border: 1px solid var(--theme-border) !important; border-radius: 3px !important; background: var(--theme-card-bg-strong) !important; color: var(--theme-text) !important; }
html body .scan-readiness { padding: .22rem .45rem !important; border: 1px solid var(--theme-border) !important; border-radius: 3px !important; font-weight: 850 !important; }
html body .scan-readiness.is-ready { color: #166534 !important; background: rgba(22,101,52,.09) !important; }
html body .scan-readiness.is-review { color: #92400e !important; background: rgba(146,64,14,.09) !important; }
html body :is(.scan-readiness.is-incomplete,.scan-readiness.is-empty) { color: #991b1b !important; background: rgba(153,27,27,.09) !important; }
html body .active-pole-set { margin-left: auto; display: flex; align-items: center; gap: .5rem; padding-left: .75rem; border-left: 1px solid var(--theme-border); }
html body .active-pole-set[hidden] { display: none !important; }
html body .active-pole-set-label { color: var(--theme-heading) !important; font-size: .68rem; font-weight: 850; text-transform: uppercase; }
html body .active-pole-set strong { max-width: 190px; overflow: hidden; text-overflow: ellipsis; color: var(--theme-text); }
html body .active-pole-set :is(a,button) { padding: .2rem .35rem !important; border: 0 !important; background: transparent !important; color: var(--theme-accent-strong) !important; font: inherit; font-weight: 850 !important; cursor: pointer; }
html body .active-pole-set button { color: var(--theme-muted) !important; }
html body .asset-intelligence-nav { min-height: 52px; display: flex; align-items: stretch; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--theme-border); }
html body .asset-intelligence-nav-title { display: grid; align-content: center; gap: .1rem; }
html body .asset-intelligence-nav-title span { color: var(--theme-muted); font-size: .66rem; font-weight: 850; text-transform: uppercase; }
html body .asset-intelligence-nav-title strong { color: var(--theme-heading); font-size: .9rem; }
html body .asset-intelligence-tabs { display: flex; align-items: stretch; }
html body .asset-intelligence-tabs a { min-width: 88px; display: grid; place-items: center; padding: 0 .9rem; border-bottom: 3px solid transparent; color: var(--theme-muted); font-size: .78rem; font-weight: 850; }
html body .asset-intelligence-tabs a[aria-current="page"] { border-bottom-color: var(--theme-accent); color: var(--theme-accent-strong); background: var(--theme-accent-faint); }
html body .intelligence-follow-through { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--theme-border); background: var(--theme-card-bg-strong); }
html body .intelligence-follow-through a { display: grid; gap: .25rem; padding: .85rem 1rem; border-right: 1px solid var(--theme-border-soft); color: var(--theme-text); }
html body .intelligence-follow-through a:last-child { border-right: 0; }
html body .intelligence-follow-through span { color: var(--theme-muted); font-size: .7rem; font-weight: 800; text-transform: uppercase; }
html body .intelligence-follow-through strong { font-size: 1.25rem; }
html body .ticket-source-context { margin: 0 1rem 1rem; padding: .7rem .8rem; border-left: 3px solid var(--theme-accent); background: var(--theme-accent-faint); }
html body .ticket-source-context span { display: block; color: var(--theme-muted); font-size: .68rem; font-weight: 850; text-transform: uppercase; }
html body .ticket-source-context strong { display: block; margin-top: .2rem; }
html body .ticket-source-context p { margin: .25rem 0 0; color: var(--theme-muted); font-size: .76rem; }
html body .mobile-bottom-nav { display: none !important; }
html body .pole-lookup-option small { display: block; margin-top: 2px; color: var(--theme-muted); font-size: .7rem; }

html body .inventory-analysis-actions { display: flex !important; align-items: center !important; justify-content: flex-end !important; gap: .4rem !important; flex-wrap: wrap !important; }
html body .inventory-analysis-actions .btn { min-height: 34px !important; padding: .4rem .6rem !important; font-size: .72rem !important; }
html body .compare-action-strip { display: flex !important; align-items: center !important; gap: .65rem !important; padding: .85rem 1rem !important; border: 1px solid var(--theme-border) !important; background: var(--theme-card-bg-strong) !important; }
html body .compare-action-strip > div { margin-right: auto; display: grid; gap: .15rem; }
html body .compare-action-strip span { color: var(--theme-muted); font-size: .76rem; }
html body .compare-action-strip .is-disabled { pointer-events: none; opacity: .45; }
html body .compare-trends { border: 1px solid var(--theme-border) !important; background: var(--theme-card-bg-strong) !important; }
html body .compare-trends > header { padding: 1rem !important; border-bottom: 1px solid var(--theme-border) !important; }
html body .compare-trends h2 { margin: 0; font-size: 1rem; }
html body .compare-trends header p { margin: .25rem 0 0; color: var(--theme-muted); font-size: .8rem; }
html body .compare-trend-metrics { display: grid !important; grid-template-columns: repeat(5,1fr) !important; border-bottom: 1px solid var(--theme-border) !important; }
html body .compare-trend-metrics div { display: grid; gap: .25rem; padding: .85rem 1rem; border-right: 1px solid var(--theme-border-soft); }
html body .compare-trend-metrics span { color: var(--theme-muted); font-size: .7rem; font-weight: 800; text-transform: uppercase; }
html body .compare-trend-table-wrap { overflow-x: auto; }
html body .compare-trend-table { width: 100%; min-width: 620px; }
html body .compare-trend-table td:first-child { display: grid; gap: .15rem; }
html body .compare-trend-table small { color: var(--theme-muted); }
html body .pole-activity-timeline { display: grid; }
html body .pole-activity-event { position: relative; margin-left: 8px; padding: 0 0 1rem 1.25rem; border-left: 2px solid var(--theme-border); }
html body .pole-activity-event::before { content: ""; position: absolute; left: -6px; top: 3px; width: 10px; height: 10px; border-radius: 50%; background: var(--theme-accent); }
html body .pole-activity-event p { margin: .25rem 0; line-height: 1.45; }
html body .pole-activity-event span { color: var(--theme-muted); font-size: .75rem; }

@media (max-width: 1180px) {
    html body .app-header-context { display: none !important; }
}

@media (max-width: 760px) {
    html body:not(.login-page) { padding-bottom: 62px !important; }
    html body #appHeaderInner { width: calc(100% - 1rem) !important; min-height: 54px !important; padding: .4rem 0 !important; }
    html body .app-header .logo { --logo-width: 174px !important; }
    html body #appHeaderInner .app-header-brand { width: auto !important; max-width: 190px !important; }
    html body #appHeaderInner .logo { width: 178px !important; min-width: 0 !important; }
    html body #appHeaderInner .app-nav-actions { display: none !important; }
    html body .app-header-utilities { gap: .25rem !important; }
    html body .header-popover > summary { min-height: 33px !important; padding: .4rem .48rem !important; font-size: .68rem !important; }
    html body .header-notifications > summary,
    html body .header-account > summary { width: 52px !important; justify-content: center !important; overflow: hidden !important; font-size: 0 !important; }
    html body .header-notifications > summary::before { content: "Inbox"; font-size: .68rem; }
    html body .header-account > summary::before { content: "Menu"; font-size: .68rem; }
    html body .header-popover-panel { top: 56px !important; right: .6rem !important; width: calc(100vw - 1.2rem) !important; max-height: calc(100vh - 130px) !important; }
    html body .scan-context-bar { width: calc(100% - 1rem) !important; min-height: 34px !important; margin-bottom: .2rem !important; }
    html body .scan-context-bar { flex-wrap: wrap !important; overflow-x: hidden !important; white-space: normal !important; padding: .25rem 0 !important; }
    html body .scan-context-bar > label { display: none !important; }
    html body .scan-context-bar > select { flex: 1 1 200px !important; max-width: none !important; }
    html body .scan-context-bar > span:not(.scan-readiness) { display: none !important; }
    html body .scan-context-bar .active-pole-set { width: 100%; display: flex !important; margin-left: 0; padding: .35rem 0 0 !important; border-left: 0; border-top: 1px solid var(--theme-border-soft); }
    html body .scan-context-bar .active-pole-set[hidden] { display: none !important; }
    html body .active-pole-set-label,
    html body .active-pole-set > span:not(.active-pole-set-label),
    html body .active-pole-set [data-active-pole-set-explore] { display: none !important; }
    html body .active-pole-set strong { max-width: none; min-width: 0; flex: 1 1 auto; }
    html body .asset-intelligence-nav { min-height: 46px; overflow-x: auto; }
    html body .asset-intelligence-nav-title { display: none; }
    html body .asset-intelligence-tabs { width: 100%; }
    html body .asset-intelligence-tabs a { min-width: 92px; flex: 1; }
    html body .intelligence-follow-through { grid-template-columns: 1fr 1fr; }
    html body .intelligence-follow-through a:nth-child(2) { border-right: 0; }
    html body .intelligence-follow-through a:nth-child(-n+2) { border-bottom: 1px solid var(--theme-border-soft); }
    html body .mobile-bottom-nav {
        position: fixed !important; left: 0 !important; right: 0 !important; bottom: 0 !important; z-index: 1400 !important;
        height: 58px !important; display: grid !important; grid-template-columns: repeat(5,1fr) !important;
        border-top: 1px solid var(--theme-border) !important; background: var(--theme-card-bg-strong) !important;
        box-shadow: 0 -8px 24px rgba(15,23,42,.12) !important;
    }
    html body .mobile-bottom-nav a { display: grid !important; place-items: center !important; color: var(--theme-muted) !important; font-size: .76rem !important; font-weight: 850 !important; }
    html body .mobile-bottom-nav a[aria-current="page"] { color: var(--theme-accent-strong) !important; background: var(--theme-accent-faint) !important; box-shadow: inset 0 3px 0 var(--theme-accent) !important; }
    html body.ticket-page :is(.ticket-command-center,.ticket-command-center > form,.ticket-bulk-bar) { min-width: 0 !important; max-width: 100% !important; }
    html body.ticket-page .ticket-bulk-bar { overflow-x: auto !important; overflow-y: hidden !important; }
    html body.ticket-page .ticket-detail-drawer { left: 0 !important; right: 0 !important; width: 100% !important; }
    html body .compare-action-strip { align-items: stretch !important; flex-wrap: wrap !important; }
    html body .compare-action-strip > div { width: 100%; }
    html body .compare-action-strip .btn { flex: 1 1 120px; }
    html body .compare-trend-metrics { grid-template-columns: 1fr 1fr !important; }
}
