@media (min-width: 1024px) {
.fi-mobile-panel-bar {
    display: none;
}

.fi-body .fi-sidebar {
    --sidebar-width: 15rem;
}

.fi-body .fi-panel-dashboard-group > .fi-sidebar-group-items {
    gap: 0;
}

.fi-body .fi-panel-dashboard-group .fi-sidebar-item-button {
    min-height: 2.05rem;
    padding-top: 0.3rem;
    padding-bottom: 0.2rem;
}

.fi-body .fi-sidebar-nav {
    padding-top: 0.8rem;
}

.fi-body .fi-sidebar-nav-groups {
    gap: 0.45rem;
}

.fi-body .fi-sidebar-group {
    gap: 0.2rem;
}

.fi-body .fi-sidebar-group-button {
    padding-bottom: 0.2rem;
}

.fi-body .fi-sidebar-group-items {
    gap: 0.08rem;
}

/* Collapsed: keep nav item badges (e.g. Action Center warning count) visible.
   Filament hides the badge's wrapper span via x-show when the sidebar closes,
   so the Alpine inline display:none must be overridden with !important; the
   badge becomes a mini pill pinned to the button's top-right corner. The
   panel-switcher group is excluded — its badges (bell unread + per-panel
   unseen-rows counts) have their own corner-pill rules below. */
.fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-group:not(.fi-panel-switcher-group) .fi-sidebar-item-button > span:has(> .fi-badge) {
    display: flex !important;
    position: absolute;
    top: -0.15rem;
    inset-inline-end: -0.15rem;
    pointer-events: none;
}

.fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-group:not(.fi-panel-switcher-group) .fi-sidebar-item-button > span > .fi-badge {
    min-width: 1rem;
    height: 1rem;
    padding: 0 0.25rem;
    font-size: 0.58rem;
    line-height: 1;
    border-radius: 9999px;
}

.fi-body .fi-sidebar {
    background-color: #fafafa;
    z-index: 50;
    overflow: visible;
}

/* z-index 50 lets the sidebar's flyouts and collapsed badges spill over the page, but it
   also beats Filament's modal layers (z-40): a wide modal (7xl on a 1600px screen) slid
   UNDER the sidebar. While any modal is open the sidebar drops below them; toasts (z-50)
   stay above the modal as Filament intends. */
.fi-body:has(.fi-modal.fi-modal-open) .fi-sidebar {
    z-index: 30;
}

.fi-body .fi-main-sidebar {
        translate: none !important;
    }

.fi-body .fi-sidebar > div:first-child {
        overflow: visible;
    }

/* One bar height shared by the sidebar's brand row and footer and, on workspace
   pages, the datagrid's header row and pagination footer (app.css), so their
   edges run straight across the sidebar line. */
.fi-body {
    --tact-bar-h: 3.1rem;
}

/* Header: no divider (Filament's ring + shadow are dropped too) and the nav's
   flat top colour, so brand and menu read as one surface. */
.fi-body .fi-sidebar-header {
        position: relative;
        overflow: visible;
        height: var(--tact-bar-h);
        padding-inline: 0.95rem 0.6rem;
        box-shadow: none;
        background-color: #f5f5f5;
    }

.fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-header > div:first-child {
        display: flex !important;
        flex: 1 1 auto;
        align-items: center;
        justify-content: center;
    }

.fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-header > div:first-child .gap-3 {
        gap: 0;
        justify-content: center;
    }

.fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-header > div:first-child .gap-3 > span {
        display: none;
    }

/* Brand-integrated expand/collapse chevron (replaces Filament's floating circle). */
.fi-body .fi-sidebar-header > .fi-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.6rem;
    color: #64748b !important;
    box-shadow: none;
    backdrop-filter: none;
    transition: opacity 200ms ease, background-color 150ms ease, color 150ms ease, transform 200ms ease;
}

.dark .fi-body .fi-sidebar-header > .fi-icon-btn {
    color: #94a3b8 !important;
}

.fi-body .fi-sidebar-header > .fi-icon-btn .fi-icon-btn-icon {
    height: 1.2rem;
    width: 1.2rem;
    stroke-width: 2;
}

/* Expanded: collapse chevron sits to the right of the app name, subtle until hover. */
.fi-body .fi-sidebar.fi-sidebar-open .fi-sidebar-header > .fi-icon-btn {
    height: 2rem;
    width: 2rem;
    opacity: 0.5;
}

.fi-body .fi-sidebar.fi-sidebar-open .fi-sidebar-header:hover > .fi-icon-btn {
    opacity: 1;
}

.fi-body .fi-sidebar.fi-sidebar-open .fi-sidebar-header > .fi-icon-btn:hover {
    background: rgba(var(--primary-600), 0.12);
    color: rgba(var(--primary-600), 1) !important;
}

.dark .fi-body .fi-sidebar.fi-sidebar-open .fi-sidebar-header > .fi-icon-btn:hover {
    background: rgba(var(--primary-400), 0.18);
    color: rgba(var(--primary-300), 1) !important;
}

/* Collapsed: chevron fills the header and cross-fades in over the logo on hover. */
.fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-header > div:first-child {
    transition: opacity 200ms ease;
    pointer-events: none;
}

.fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-header > .fi-icon-btn {
    position: absolute;
    inset: 0;
    height: auto;
    width: auto;
    opacity: 0;
}

.fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-header > .fi-icon-btn .fi-icon-btn-icon {
    transform: scale(0.8);
    transition: transform 200ms ease;
}

.fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-header:hover > div:first-child {
    opacity: 0;
}

.fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-header:hover > .fi-icon-btn {
    opacity: 1;
}

.fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-header:hover > .fi-icon-btn .fi-icon-btn-icon {
    transform: scale(1);
}

.fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-header > .fi-icon-btn:hover {
    color: rgba(var(--primary-600), 1) !important;
}

.dark .fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-header > .fi-icon-btn:hover {
    color: rgba(var(--primary-300), 1) !important;
}

.fi-body .fi-sidebar-nav,
.fi-body .fi-sidebar-user-menu-panel {
    background-image: linear-gradient(180deg, rgba(245, 245, 245, 0.98) 0%, rgba(229, 229, 229, 0.92) 100%);
    background-color: transparent;
}

.dark .fi-body .fi-sidebar {
    background-color: #27272a;
}

.dark .fi-body .fi-sidebar-header {
    background-color: #27272a;
}


.dark .fi-body .fi-sidebar-nav,
.dark .fi-body .fi-sidebar-user-menu-panel {
    background-image: linear-gradient(180deg, rgba(39, 39, 42, 0.98) 0%, rgba(24, 24, 27, 1) 100%);
    background-color: #18181b;
}

.fi-body .fi-sidebar-user-menu-panel {
    border-top-color: rgba(148, 163, 184, 0.16);
}

.fi-body .fi-sidebar-group-label {
    color: #64748b;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.72rem;
    font-weight: 600;
}

.fi-body .fi-sidebar-group-icon {
    opacity: 0.7;
}

/* Menu rows + footer buttons: flat (no border, no shadow). Hover is a soft
   tinted pill that fades in; on menu rows the icon takes the panel's primary
   colour and the label full contrast. Press deepens the tint; keyboard focus
   gets an inset primary ring. The active row keeps its slit, no pill. */
.fi-body .fi-sidebar-item-button,
.fi-body .fi-sidebar-user-menu-panel .fi-sidebar-footer-btn,
.fi-body .fi-sidebar-user-menu-panel .fi-sidebar-user-trigger {
    border: 1px solid transparent;
    border-radius: 0.6rem;
    box-shadow: none;
    transition: background-color 160ms ease, color 160ms ease;
}

.fi-body .fi-sidebar-item-button :is(.fi-sidebar-item-icon, .fi-sidebar-item-label) {
    transition: color 160ms ease;
}

.fi-body .fi-sidebar-item-button:hover,
.fi-body .fi-sidebar-user-menu-panel .fi-sidebar-footer-btn:hover,
.fi-body .fi-sidebar-user-menu-panel .fi-sidebar-user-trigger:hover {
    background-color: rgba(15, 23, 42, 0.05);
}

.fi-body .fi-sidebar-item-button:active,
.fi-body .fi-sidebar-user-menu-panel .fi-sidebar-footer-btn:active,
.fi-body .fi-sidebar-user-menu-panel .fi-sidebar-user-trigger:active {
    background-color: rgba(15, 23, 42, 0.08);
}

.fi-body .fi-sidebar-item-button:focus-visible,
.fi-body .fi-sidebar-user-menu-panel .fi-sidebar-footer-btn:focus-visible,
.fi-body .fi-sidebar-user-menu-panel .fi-sidebar-user-trigger:focus-visible {
    outline: 2px solid rgba(var(--primary-500), 0.55);
    outline-offset: -2px;
}

.fi-body .fi-sidebar-item:not(.fi-active) > .fi-sidebar-item-button:is(:hover, :focus-visible) .fi-sidebar-item-icon {
    color: rgba(var(--primary-600), 1);
}

.fi-body .fi-sidebar-item:not(.fi-active) > .fi-sidebar-item-button:is(:hover, :focus-visible) .fi-sidebar-item-label {
    color: #0f172a;
}

.fi-body .fi-sidebar-group-button {
    border: 1px solid transparent;
    border-radius: 0.875rem;
    box-shadow: none;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.fi-body .fi-sidebar-group-button:hover,
.fi-body .fi-sidebar-group-button:focus-visible {
    background-color: transparent;
    border-color: transparent;
}

.dark .fi-body .fi-sidebar-item-button:hover,
.dark .fi-body .fi-sidebar-user-menu-panel .fi-sidebar-footer-btn:hover,
.dark .fi-body .fi-sidebar-user-menu-panel .fi-sidebar-user-trigger:hover {
    background-color: rgba(255, 255, 255, 0.06);
}

.dark .fi-body .fi-sidebar-item-button:active,
.dark .fi-body .fi-sidebar-user-menu-panel .fi-sidebar-footer-btn:active,
.dark .fi-body .fi-sidebar-user-menu-panel .fi-sidebar-user-trigger:active {
    background-color: rgba(255, 255, 255, 0.09);
}

.dark .fi-body .fi-sidebar-item:not(.fi-active) > .fi-sidebar-item-button:is(:hover, :focus-visible) .fi-sidebar-item-icon {
    color: rgba(var(--primary-400), 1);
}

.dark .fi-body .fi-sidebar-item:not(.fi-active) > .fi-sidebar-item-button:is(:hover, :focus-visible) .fi-sidebar-item-label {
    color: #fff;
}

.dark .fi-body .fi-sidebar-group-button:hover,
.dark .fi-body .fi-sidebar-group-button:focus-visible {
    background-color: transparent;
}

.fi-body .fi-sidebar-item.fi-active .fi-sidebar-item-button {
    background-color: transparent;
    border-color: transparent;
    box-shadow: none;
    position: relative;
}

.dark .fi-body .fi-sidebar-item.fi-active .fi-sidebar-item-button {
    background-color: transparent;
    border-color: transparent;
    box-shadow: none;
}

/* Active row marker, the same bar as the selected row of a browse rail
   (pcb-rail-row--selected): 4px wide, flat against the sidebar's left edge
   and rounded on the right. Rows start 1rem from that edge in every state
   (expanded, collapsed rail, mobile sheet). */
.fi-body .fi-sidebar-item.fi-active .fi-sidebar-item-button::before {
    content: '';
    position: absolute;
    inset-inline-start: -1rem;
    top: 0.375rem;
    bottom: 0.375rem;
    width: 0.25rem;
    border-start-start-radius: 0;
    border-end-start-radius: 0;
    border-start-end-radius: 9999px;
    border-end-end-radius: 9999px;
    background: rgba(var(--primary-500), 1);
}

.fi-body .fi-sidebar-group.fi-active > .fi-sidebar-group-button {
    background-color: transparent;
    border-color: transparent;
    box-shadow: none;
}

.dark .fi-body .fi-sidebar-group.fi-active > .fi-sidebar-group-button {
    background-color: transparent;
}

.fi-body .fi-sidebar-item-icon,
.fi-body .fi-sidebar-group-icon,
.fi-body .fi-sidebar-user-menu-panel svg {
    color: #64748b;
}

.dark .fi-body .fi-sidebar-item-icon,
.dark .fi-body .fi-sidebar-group-icon,
.dark .fi-body .fi-sidebar-user-menu-panel svg {
    color: #94a3b8;
}

.fi-body .fi-sidebar-item.fi-active .fi-sidebar-item-icon,
.fi-body .fi-sidebar-item.fi-active .fi-sidebar-item-label {
    color: rgba(var(--primary-600), 1);
}

.fi-body .fi-sidebar-item.fi-active .fi-sidebar-item-label {
    font-weight: 700;
}

.fi-body .fi-sidebar-item.fi-active .fi-sidebar-item-icon {
    stroke-width: 2.15;
}

.dark .fi-body .fi-sidebar-item.fi-active .fi-sidebar-item-icon,
.dark .fi-body .fi-sidebar-item.fi-active .fi-sidebar-item-label {
    color: rgba(var(--primary-300), 1);
}

.fi-body .fi-sidebar,
.fi-body .fi-sidebar-nav {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.fi-body .fi-sidebar:hover,
.fi-body .fi-sidebar-nav:hover {
    scrollbar-color: rgba(148, 163, 184, 0.5) rgba(15, 23, 42, 0.2);
}

.fi-body .fi-sidebar::-webkit-scrollbar,
.fi-body .fi-sidebar-nav::-webkit-scrollbar {
    width: 0.32rem;
    height: 0.32rem;
}

.fi-body .fi-sidebar::-webkit-scrollbar-track,
.fi-body .fi-sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.fi-body .fi-sidebar:hover::-webkit-scrollbar-track,
.fi-body .fi-sidebar-nav:hover::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.2);
}

.fi-body .fi-sidebar::-webkit-scrollbar-thumb,
.fi-body .fi-sidebar-nav::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 9999px;
}

.fi-body .fi-sidebar:hover::-webkit-scrollbar-thumb,
.fi-body .fi-sidebar-nav:hover::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.5);
}

.fi-body .fi-sidebar::-webkit-scrollbar-thumb:hover,
.fi-body .fi-sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(203, 213, 225, 0.7);
}

.dark .fi-body .fi-sidebar,
.dark .fi-body .fi-sidebar-nav {
    scrollbar-color: transparent transparent;
}

.dark .fi-body .fi-sidebar:hover,
.dark .fi-body .fi-sidebar-nav:hover {
    scrollbar-color: rgba(100, 116, 139, 0.68) rgba(2, 6, 23, 0.4);
}

.dark .fi-body .fi-sidebar::-webkit-scrollbar-track,
.dark .fi-body .fi-sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.dark .fi-body .fi-sidebar:hover::-webkit-scrollbar-track,
.dark .fi-body .fi-sidebar-nav:hover::-webkit-scrollbar-track {
    background: rgba(2, 6, 23, 0.4);
}

.dark .fi-body .fi-sidebar:hover::-webkit-scrollbar-thumb,
.dark .fi-body .fi-sidebar-nav:hover::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.68);
}

.dark .fi-body .fi-sidebar::-webkit-scrollbar-thumb:hover,
.dark .fi-body .fi-sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.82);
}

/* --- Search + panel switcher header ---
   One block between the sidebar header and the nav: the search trigger above
   the Management | Execution switch. The navigation-search-sidebar blade moves
   the trigger into the switcher group and the group out of the nav, so it stays
   put while only the menu scrolls, and the nav's scrollbar starts under it.
   Search and switch sit 10px from both sidebar edges. Expanded, the switch is
   underline tabs (last section of this file); collapsed, search and switch
   become stacked icon pills. Radii nest: inner = outer - padding - border. */
.fi-body .fi-panel-switcher-group > .fi-sidebar-group-button {
    display: none;
}

.fi-body .fi-panel-switcher-group {
    flex: none;
    padding: 0.35rem 0.625rem;
    background-color: #f5f5f5;
}

.dark .fi-body .fi-panel-switcher-group {
    background-color: #27272a;
}

.fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-panel-switcher-group {
    align-items: center;
    padding: 0.6rem 0 0.35rem;
}

.fi-body .fi-panel-switcher-group > .fi-sidebar-group-items {
    box-sizing: border-box;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    width: 100%;
    height: 2.1rem;
    gap: 0.15rem;
    padding: 0.15rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 0.65rem;
    background-color: rgba(255, 255, 255, 0.6);
}

.dark .fi-body .fi-panel-switcher-group > .fi-sidebar-group-items {
    border-color: rgba(148, 163, 184, 0.16);
    background-color: rgba(0, 0, 0, 0.22);
}

.fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-panel-switcher-group > .fi-sidebar-group-items {
    flex-direction: column;
    justify-content: center;
    width: auto;
    height: auto;
    gap: 0.2rem;
    padding: 0.2rem;
    border-radius: 0.85rem;
}

.fi-body .fi-panel-switcher-group .fi-sidebar-item {
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
}

.fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-panel-switcher-group .fi-sidebar-item {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
}

/* Collapsed, the switcher offers only the way out: the panel you are on is
   dropped, leaving the other one (with its count). Configuration marks neither
   active, so it keeps both; a user with a single panel gets no pill at all. */
.fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-panel-switcher-group .fi-sidebar-item.fi-active {
    display: none;
}

.fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-panel-switcher-group > .fi-sidebar-group-items:not(:has(> .fi-sidebar-item:not(.fi-active))) {
    display: none;
}

.fi-body .fi-panel-switcher-group .fi-sidebar-item-button {
    gap: 0.3rem;
    justify-content: center;
    width: 100%;
    min-width: 0;
    height: 100%;
    min-height: 0;
    padding: 0 0.25rem;
    border-color: transparent;
    border-radius: calc(0.65rem - 0.15rem - 1px);
    box-shadow: none;
}

.fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-panel-switcher-group .fi-sidebar-item-button {
    width: auto;
    height: auto;
    min-width: 2.35rem;
    min-height: 2.35rem;
    padding: 0;
    border-radius: calc(0.85rem - 0.2rem - 1px);
}

.fi-body .fi-panel-switcher-group .fi-sidebar-item-button::before,
.fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-panel-switcher-group .fi-sidebar-item-label {
    display: none !important;
}

.fi-body .fi-sidebar.fi-sidebar-open .fi-panel-switcher-group .fi-sidebar-item-icon {
    display: none;
}

.fi-body .fi-sidebar.fi-sidebar-open .fi-panel-switcher-group .fi-sidebar-item-label {
    display: block;
    order: 2;
    flex: 0 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.8rem;
}

.fi-body .fi-panel-switcher-group .fi-sidebar-item.fi-active .fi-sidebar-item-button {
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.dark .fi-body .fi-panel-switcher-group .fi-sidebar-item.fi-active .fi-sidebar-item-button {
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

/* Hovering a segment only recolours it, in ITS panel's colour (Management
   indigo, Execution amber) rather than the current panel's primary. */
.fi-body .fi-panel-switcher-group .fi-sidebar-item:not(.fi-active) .fi-sidebar-item-button:is(:hover, :focus-visible) {
    background-color: transparent;
    border-color: transparent;
    box-shadow: none;
}

.fi-body .fi-panel-switcher-group .fi-sidebar-item:not(.fi-active) .fi-sidebar-item-button[href$="/management"]:is(:hover, :focus-visible) :is(.fi-sidebar-item-label, .fi-sidebar-item-icon) {
    color: #4f46e5;
}

.fi-body .fi-panel-switcher-group .fi-sidebar-item:not(.fi-active) .fi-sidebar-item-button[href$="/execution"]:is(:hover, :focus-visible) :is(.fi-sidebar-item-label, .fi-sidebar-item-icon) {
    color: #d97706;
}

.dark .fi-body .fi-panel-switcher-group .fi-sidebar-item:not(.fi-active) .fi-sidebar-item-button[href$="/management"]:is(:hover, :focus-visible) :is(.fi-sidebar-item-label, .fi-sidebar-item-icon) {
    color: #818cf8;
}

.dark .fi-body .fi-panel-switcher-group .fi-sidebar-item:not(.fi-active) .fi-sidebar-item-button[href$="/execution"]:is(:hover, :focus-visible) :is(.fi-sidebar-item-label, .fi-sidebar-item-icon) {
    color: #fbbf24;
}

/* Panel counts: after the label when expanded, pinned to the segment corner
   when collapsed (Filament x-show-hides the wrapper there, hence !important).
   The badge itself is styled by the shared nav-badge rule. */
.fi-body .fi-sidebar.fi-sidebar-open .fi-panel-switcher-group .fi-sidebar-item-button > span:has(> .fi-badge) {
    display: flex;
    position: relative;
    z-index: 1;
    order: 3;
    align-self: center;
    margin: 0 0 0 0.05rem;
    pointer-events: none;
}

.fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-panel-switcher-group .fi-sidebar-item-button > span:has(> .fi-badge) {
    display: flex !important;
    position: absolute;
    top: -0.28rem;
    inset-inline-end: -0.1rem;
    pointer-events: none;
}

.fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-nav-search-trigger-row {
    padding: 0.2rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 0.85rem;
    background-color: rgba(255, 255, 255, 0.6);
}

.dark .fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-nav-search-trigger-row {
    border-color: rgba(148, 163, 184, 0.16);
    background-color: rgba(0, 0, 0, 0.22);
}

/* --- Brand --- */
.fi-body .fi-sidebar-header .gap-3 {
    gap: 0.55rem;
}

.fi-body .fi-sidebar-header .gap-3 > img {
    width: 1.55rem;
    height: 1.55rem;
}

.fi-body .fi-sidebar-header .gap-3 > span {
    font-size: 1.2rem;
}

/* --- Collapsed rail ---
   One centre line for logo, nav icons and footer: the nav's inline
   scrollbar-gutter (vendor style attribute, hence !important) would reserve
   10px on the right and shift every nav icon 5px left of the header/footer;
   the rail scrolls by wheel/touch without a visible bar. A faint rule
   separates the menu groups whose labels are hidden. */
.fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-nav {
    scrollbar-gutter: auto !important;
    scrollbar-width: none;
}

.fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-nav::-webkit-scrollbar {
    display: none;
}

.fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-header {
    padding-inline: 0;
}

.fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-nav-groups > .fi-sidebar-group:not(.fi-panel-switcher-group):not(.fi-nav-search-group) + .fi-sidebar-group,
.fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-nav-groups > .fi-nav-search-group:has(.fi-nav-search-pinned-item) + .fi-sidebar-group,
.fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-nav-groups > .fi-panel-dashboard-group + .fi-nav-search-group:not(:has(.fi-nav-search-pinned-item)) + .fi-sidebar-group {
    position: relative;
    padding-top: 0.5rem;
}

.fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-nav-groups > .fi-sidebar-group:not(.fi-panel-switcher-group):not(.fi-nav-search-group) + .fi-sidebar-group::before,
.fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-nav-groups > .fi-nav-search-group:has(.fi-nav-search-pinned-item) + .fi-sidebar-group::before,
.fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-nav-groups > .fi-panel-dashboard-group + .fi-nav-search-group:not(:has(.fi-nav-search-pinned-item)) + .fi-sidebar-group::before {
    content: '';
    position: absolute;
    top: 0;
    inset-inline: 0.55rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.dark .fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-nav-groups > .fi-sidebar-group:not(.fi-panel-switcher-group):not(.fi-nav-search-group) + .fi-sidebar-group::before,
.dark .fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-nav-groups > .fi-nav-search-group:has(.fi-nav-search-pinned-item) + .fi-sidebar-group::before,
.dark .fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-nav-groups > .fi-panel-dashboard-group + .fi-nav-search-group:not(:has(.fi-nav-search-pinned-item)) + .fi-sidebar-group::before {
    border-top-color: rgba(148, 163, 184, 0.12);
}
}

/* --- Customer brand (App\Support\Brand) ---
   A 32px tile (logo, else initials), the company name on one truncated line
   and a quiet TACT.mes credit under it. Expanded, the brand takes the free
   width so a long name ellipsises before the collapse button; collapsed, the
   rail rules above hide the text and leave the tile. Also styles the preview
   on Configuration › Company profile. */
.fi-body .fi-sidebar.fi-sidebar-open .fi-sidebar-header > div:first-child:has(.tact-brand) {
    flex: 1 1 auto;
    min-width: 0;
}

/* The link and both logo copies (light + dark; Filament hides one with
   `hidden`, so no display override here) must be allowed to shrink. */
.fi-body .fi-sidebar-header > div:first-child:has(.tact-brand) > a {
    display: flex;
    min-width: 0;
}

.fi-body .fi-sidebar-header .fi-logo:has(.tact-brand) {
    min-width: 0;
}

.fi-body .tact-brand {
    min-width: 0;
}

.fi-body .tact-brand-tile {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    overflow: hidden;
    border-radius: 0.5rem;
}

.fi-body .tact-brand-tile--logo {
    padding: 3px;
    border: 1px solid #e4e4e7;
    background: #ffffff;
}

.dark .fi-body .tact-brand-tile--logo {
    border-color: #3f3f46;
    background: #27272a;
}

.fi-body .tact-brand-tile--logo > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.fi-body .tact-brand-tile--initials {
    background: #27272a;
    color: #fafafa;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.dark .fi-body .tact-brand-tile--initials {
    background: #3f3f46;
}

.fi-body .tact-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
}

.fi-body .tact-brand-name {
    overflow: hidden;
    color: #18181b;
    font-size: 0.9375rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dark .fi-body .tact-brand-name {
    color: #fafafa;
}

.fi-body .tact-brand-credit {
    color: #71717a;
    font-size: 0.6875rem;
    font-weight: 500;
}

.fi-body .tact-brand-credit-dot {
    color: #d90429;
}


@media (max-width: 1023.98px) {
    /* Sidebar becomes a slide-up bottom sheet on mobile. */
    .fi-body .fi-sidebar {
        position: fixed;
        inset-inline: 0;
        bottom: 0;
        top: auto;
        width: 100% !important;
        max-width: 100%;
        height: auto;
        max-height: 85vh;
        border-radius: 1.25rem 1.25rem 0 0;
        box-shadow: 0 -18px 40px rgba(15, 23, 42, 0.22);
        overflow-y: auto;
        overflow-x: hidden;
        transition: transform 300ms ease;
        background-color: #fafafa;
    }

    .dark .fi-body .fi-sidebar {
        background-color: #27272a;
    }

    .fi-body .fi-sidebar > div:first-child {
        min-height: 0;
        overflow: visible;
    }

    /* Closed = slid down off-screen; open = slid up into view. */
    .fi-body .fi-sidebar:not(.fi-sidebar-open) {
        transform: translateY(100%) !important;
        translate: none;
    }

    .fi-body .fi-sidebar.fi-sidebar-open {
        transform: translateY(0) !important;
        translate: none;
    }

    /* Opaque, sticky sheet header so menu items don't show through under the logo while scrolling. */
    .fi-body .fi-sidebar-header {
        position: sticky;
        top: 0;
        z-index: 10;
        overflow: visible;
        background-color: #fafafa;
        border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    }

    .dark .fi-body .fi-sidebar-header {
        background-color: #27272a;
    }

    .fi-body .fi-sidebar-header::before {
        content: '';
        position: absolute;
        top: 0.4rem;
        left: 50%;
        transform: translateX(-50%);
        width: 2.5rem;
        height: 0.28rem;
        border-radius: 9999px;
        background: rgba(148, 163, 184, 0.5);
    }

    /* The header chevron is hidden on mobile; the bottom bar handles navigation. */
    .fi-body .fi-sidebar-header > .fi-icon-btn {
        display: none !important;
    }

    /* The panels live in the fixed bottom bar; hide the switcher inside the
       open sheet — but not its group, which also hosts the search trigger. */
    .fi-body .fi-panel-switcher-group > .fi-sidebar-group-button,
    .fi-body .fi-panel-switcher-group > .fi-sidebar-group-items {
        display: none;
    }

    /* --- Sheet menu list styled to match the desktop sidebar (background, fonts, padding, hover, active slit) --- */
    .fi-body .fi-sidebar-nav {
        padding-top: 1.3rem;
        border-top: 1px solid rgba(148, 163, 184, 0.16);
    }

    .fi-body .fi-sidebar-nav-groups {
        gap: 0.45rem;
    }

    .fi-body .fi-sidebar-group {
        gap: 0.2rem;
    }

    .fi-body .fi-sidebar-group-button {
        padding-bottom: 0.2rem;
    }

    .fi-body .fi-sidebar-group-items {
        gap: 0.08rem;
    }

    .fi-body .fi-panel-dashboard-group > .fi-sidebar-group-items {
        gap: 0;
    }

    .fi-body .fi-panel-dashboard-group .fi-sidebar-item-button {
        min-height: 2.05rem;
        padding-top: 0.3rem;
        padding-bottom: 0.2rem;
    }

    .fi-body .fi-sidebar-nav {
        background-image: linear-gradient(180deg, rgba(245, 245, 245, 0.98) 0%, rgba(229, 229, 229, 0.92) 100%);
        background-color: transparent;
    }

    .fi-body .fi-sidebar-group-label {
        color: #64748b;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        font-size: 0.72rem;
        font-weight: 600;
    }

    .fi-body .fi-sidebar-group-icon {
        opacity: 0.7;
    }

    .fi-body .fi-sidebar-item-button {
        border: 1px solid transparent;
        border-radius: 0.6rem;
        box-shadow: none;
        transition: background-color 160ms ease, color 160ms ease;
    }

    .fi-body .fi-sidebar-item:not(.fi-active) .fi-sidebar-item-button:is(:hover, :active) {
        background-color: rgba(15, 23, 42, 0.06);
    }

    .fi-body .fi-sidebar-item-icon,
    .fi-body .fi-sidebar-group-icon {
        color: #64748b;
    }

    .fi-body .fi-sidebar-item.fi-active .fi-sidebar-item-button {
        background-color: transparent;
        border-color: transparent;
        box-shadow: none;
        position: relative;
    }

    .fi-body .fi-sidebar-item.fi-active .fi-sidebar-item-button::before {
        content: '';
        position: absolute;
        inset-inline-start: -1rem;
        top: 0.375rem;
        bottom: 0.375rem;
        width: 0.25rem;
        border-start-start-radius: 0;
        border-end-start-radius: 0;
        border-start-end-radius: 9999px;
        border-end-end-radius: 9999px;
        background: rgba(var(--primary-500), 1);
    }

    .fi-body .fi-sidebar-item.fi-active .fi-sidebar-item-icon,
    .fi-body .fi-sidebar-item.fi-active .fi-sidebar-item-label {
        color: rgba(var(--primary-600), 1);
    }

    .fi-body .fi-sidebar-item.fi-active .fi-sidebar-item-label {
        font-weight: 700;
    }

    .fi-body .fi-sidebar-item.fi-active .fi-sidebar-item-icon {
        stroke-width: 2.15;
    }

    .dark .fi-body .fi-sidebar-nav {
        background-image: linear-gradient(180deg, rgba(39, 39, 42, 0.98) 0%, rgba(24, 24, 27, 1) 100%);
        background-color: #18181b;
    }

    .dark .fi-body .fi-sidebar-item:not(.fi-active) .fi-sidebar-item-button:is(:hover, :active) {
        background-color: rgba(255, 255, 255, 0.07);
    }

    .dark .fi-body .fi-sidebar-item-icon,
    .dark .fi-body .fi-sidebar-group-icon {
        color: #94a3b8;
    }


    .dark .fi-body .fi-sidebar-item.fi-active .fi-sidebar-item-icon,
    .dark .fi-body .fi-sidebar-item.fi-active .fi-sidebar-item-label {
        color: rgba(var(--primary-300), 1);
    }

    /* Keep page content clear of the fixed bottom panel bar. */
    .fi-body .fi-main {
        padding-bottom: 5rem;
    }

    /* The user menu now lives in the bottom bar; hide the sheet's footer copy. */
    .fi-body .fi-sidebar-user-menu-panel {
        display: none !important;
    }

    /* Let the last menu items scroll clear of the fixed bottom bar. */
    .fi-body .fi-sidebar-nav {
        padding-bottom: 4.5rem;
    }

    /* === Mobile bottom panel bar (icon-only; active accent = panel primary, like desktop) === */
    .fi-mobile-panel-bar {
        position: fixed;
        inset-inline: 0;
        bottom: 0;
        z-index: 40;
        display: flex;
        align-items: stretch;
        border-top: 1px solid rgba(226, 232, 240, 0.7);
        background-color: rgba(255, 255, 255, 0.95);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        padding-bottom: env(safe-area-inset-bottom);
    }

    /* Hide the bar while a modal/slide-over is open so it never overlaps the
       modal's sticky footer (the save/submit button sits at screen bottom). */
    body:has(.fi-modal.fi-modal-open) .fi-mobile-panel-bar {
        display: none;
    }

    .dark .fi-mobile-panel-bar {
        border-top-color: rgba(255, 255, 255, 0.1);
        background-color: rgba(24, 24, 27, 0.95);
    }

    .fi-mobile-panel-bar-dropdown,
    .fi-mobile-panel-bar-dropdown > .fi-dropdown-trigger {
        display: flex;
        flex: 1 1 0;
        min-width: 0;
    }

    .fi-mobile-panel-bar-item {
        position: relative;
        display: flex;
        flex: 1 1 0;
        width: 100%;
        align-items: center;
        justify-content: center;
        padding-block: 0.85rem;
        color: #64748b;
        transition: color 150ms ease;
        -webkit-tap-highlight-color: transparent;
    }

    .fi-mobile-panel-bar-item:hover {
        color: #334155;
    }

    .dark .fi-mobile-panel-bar-item {
        color: #94a3b8;
    }

    .dark .fi-mobile-panel-bar-item:hover {
        color: #e2e8f0;
    }

    .fi-mobile-panel-bar-item.fi-active {
        color: rgba(var(--primary-600), 1);
    }

    .dark .fi-mobile-panel-bar-item.fi-active {
        color: rgba(var(--primary-300), 1);
    }

    .fi-mobile-panel-bar-icon {
        height: 1.5rem;
        width: 1.5rem;
        flex-shrink: 0;
    }

    /* Slit indicator centered below the active icon (mobile mirror of the desktop left-slit). */
    .fi-mobile-panel-bar-item.fi-active::after {
        content: '';
        position: absolute;
        bottom: 0.3rem;
        left: 50%;
        transform: translateX(-50%);
        height: 0.2rem;
        width: 1.1rem;
        border-radius: 9999px;
        background-color: rgba(var(--primary-600), 1);
    }

    .dark .fi-mobile-panel-bar-item.fi-active::after {
        background-color: rgba(var(--primary-300), 1);
    }

    .fi-mobile-panel-bar-user .fi-avatar {
        height: 1.6rem !important;
        width: 1.6rem !important;
        min-width: 1.6rem;
    }

    .fi-mobile-panel-bar-bell-dot {
        position: absolute;
        top: 0.4rem;
        left: calc(50% + 0.3rem);
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 1rem;
        height: 1rem;
        padding: 0 0.25rem;
        border-radius: 9999px;
        background: #dc2626;
        color: #fff;
        font-size: 0.58rem;
        font-weight: 600;
        line-height: 1;
    }
}
/* Remove number input spinners */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] {
    -moz-appearance: textfield;
}

/* Compact nav item rows (desktop + mobile). Lower specificity than the switcher/dashboard
   rules so those keep their own sizing. */
.fi-body .fi-sidebar-item-button {
    min-height: 1.9rem;
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
}


/* === Notifications feed ===
   Rendered inside the notifications drawer (notifications-panel-host blade),
   opened by the sidebar footer bell and the mobile bar bell. The feed rules
   further down style its cards. Unscoped by media on purpose: the drawer is
   the same on desktop and mobile. */


/* === Sidebar footer (sidebar-user-menu blade) ===
   Expanded: one row — the user (avatar + name + role line → user menu,
   opening upward), then the bell and the AI assistant. Collapsed: bell,
   assistant and avatar stacked. Configuration + Help live in the user menu. */
.fi-body .fi-sidebar-user-menu-panel {
    border-top-width: 1px;
    border-top-style: solid;
    padding: 0.4rem 0.6rem 0.45rem;
}

.fi-body .fi-sidebar-footer-expanded {
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.fi-body .fi-sidebar-footer-collapsed {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}

.fi-body .fi-sidebar-user-menu-panel .fi-sidebar-footer-btn {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 0.7rem;
    box-shadow: none;
}

.fi-body .fi-sidebar-user-menu-panel .fi-sidebar-footer-btn svg {
    width: 1.3rem;
    height: 1.3rem;
}

.fi-body .fi-sidebar-footer-btn-badge {
    position: absolute;
    top: 0.05rem;
    inset-inline-start: 1.25rem;
    display: flex;
    pointer-events: none;
}

.fi-body .fi-sidebar-user-dropdown {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
}

.fi-body .fi-sidebar-user-dropdown > .fi-dropdown-trigger {
    display: block;
    width: 100%;
}

.fi-body .fi-sidebar-user-menu-panel .fi-sidebar-user-trigger {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.3rem 0.4rem;
    text-align: start;
    box-shadow: none;
}

.fi-body .fi-sidebar-user-trigger .fi-avatar,
.fi-body .fi-sidebar-user-avatar-trigger .fi-avatar {
    width: 2.25rem;
    height: 2.25rem;
    flex-shrink: 0;
}

.fi-body .fi-sidebar-user-text {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
}

.fi-body .fi-sidebar-user-name,
.fi-body .fi-sidebar-user-role {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fi-body .fi-sidebar-user-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}

.dark .fi-body .fi-sidebar-user-name {
    color: #fff;
}

.fi-body .fi-sidebar-user-role {
    font-size: 0.78rem;
    color: #64748b;
}

.dark .fi-body .fi-sidebar-user-role {
    color: #94a3b8;
}

.fi-body .fi-sidebar-user-avatar-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
}

/* === Notifications drawer chrome (notifications-panel-host blade) ===
   Header in the navbar's language: a soft primary tile + bold title, a quiet
   rounded close button, one hairline under it; it stays pinned while the
   feed scrolls. The content box drops the modal's px-6/py-6 so the rows run
   edge to edge — the rows carry their own inline padding. */
.fi-body [data-fi-modal-id="notifications-panel"] .fi-modal-header {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    background: inherit;
}

.fi-body [data-fi-modal-id="notifications-panel"] .fi-modal-header > .absolute {
    top: 0.85rem;
    inset-inline-end: 0.85rem;
}

.fi-body [data-fi-modal-id="notifications-panel"] .fi-modal-close-btn {
    width: 2rem;
    height: 2rem;
    border-radius: 0.6rem;
    transition: background-color 160ms ease, color 160ms ease;
}

.fi-body [data-fi-modal-id="notifications-panel"] .fi-modal-close-btn:hover {
    background-color: rgba(15, 23, 42, 0.05);
}

.dark .fi-body [data-fi-modal-id="notifications-panel"] .fi-modal-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.06);
}

.fi-body [data-fi-modal-id="notifications-panel"] .fi-modal-close-btn .fi-icon-btn-icon {
    width: 1.15rem;
    height: 1.15rem;
}

.fi-body [data-fi-modal-id="notifications-panel"] .fi-modal-content {
    gap: 0;
    padding: 0;
}

.fi-body .fi-notifications-panel-heading {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 2rem;
    padding-inline-end: 2.5rem;
}

.fi-body .fi-notifications-panel-heading-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.6rem;
    background-color: rgba(var(--primary-500), 0.12);
    color: rgba(var(--primary-600), 1);
}

.dark .fi-body .fi-notifications-panel-heading-icon {
    background-color: rgba(var(--primary-400), 0.14);
    color: rgba(var(--primary-300), 1);
}

.fi-body .fi-notifications-panel-heading-icon svg {
    width: 1.1rem;
    height: 1.1rem;
}

.fi-body .fi-notifications-panel-heading-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #0f172a;
}

.dark .fi-body .fi-notifications-panel-heading-title {
    color: #fff;
}

/* Toolbar: unread status on the left, quiet icon+label buttons on the right
   (the navbar's hover tint and focus ring; Clear tints red on hover). */
.fi-body .fi-sidebar-notifications-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.6rem 0.5rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.fi-body .fi-sidebar-notifications-status {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

.dark .fi-body .fi-sidebar-notifications-status {
    color: #94a3b8;
}

.fi-body .fi-sidebar-notifications-status.fi-has-unread {
    color: rgba(var(--primary-600), 1);
}

.dark .fi-body .fi-sidebar-notifications-status.fi-has-unread {
    color: rgba(var(--primary-300), 1);
}

.fi-body .fi-sidebar-notifications-action-buttons {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 0.15rem;
}

.fi-body .fi-sidebar-notifications-action {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    height: 1.85rem;
    padding: 0 0.55rem;
    border-radius: 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    transition: background-color 160ms ease, color 160ms ease;
}

.dark .fi-body .fi-sidebar-notifications-action {
    color: #cbd5e1;
}

.fi-body .fi-sidebar-notifications-action svg {
    width: 0.95rem;
    height: 0.95rem;
    flex-shrink: 0;
}

.fi-body .fi-sidebar-notifications-action:hover {
    background-color: rgba(15, 23, 42, 0.05);
    color: #0f172a;
}

.dark .fi-body .fi-sidebar-notifications-action:hover {
    background-color: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.fi-body .fi-sidebar-notifications-action.fi-danger:hover {
    background-color: rgba(220, 38, 38, 0.08);
    color: #dc2626;
}

.dark .fi-body .fi-sidebar-notifications-action.fi-danger:hover {
    background-color: rgba(248, 113, 113, 0.12);
    color: #f87171;
}

.fi-body .fi-sidebar-notifications-action:focus-visible {
    outline: 2px solid rgba(var(--primary-500), 0.55);
    outline-offset: -2px;
}

.fi-body .fi-sidebar-notifications-action:disabled {
    opacity: 0.6;
}

/* Compact the cards: Filament's inline notification ships p-4 / gap-3 / h-6
   icons. Rows run edge to edge of the drawer, so the inline padding here is
   the drawer's gutter. (.p-4 targets the card's own layout div — vendor
   markup.) */
.fi-body .fi-sidebar-notifications-item .fi-notification .p-4 {
    padding: 0.75rem 1.1rem 0.75rem 1rem;
    gap: 0.65rem;
}

.fi-body .fi-sidebar-notifications-item .fi-no-notification-icon {
    height: 1.1rem;
    width: 1.1rem;
}

/* Filament's "×" deletes the entry; the drawer replaces it with its own read
   toggle + Remove (SidebarDatabaseNotifications), so the vendor button is gone. */
.fi-body .fi-sidebar-notifications-item .fi-no-notification-close-btn {
    display: none;
}

/* The card's own icon is its read marker: in colour while unread, grey once read. A
   transparent button laid exactly over it (above the stretched link, z 1) toggles read.
   Remove sits where the "open" chevron used to be, bottom-right, shown on hover (touch
   devices keep it visible). Geometry follows the compact card: .p-4 is 0.75rem / 1rem,
   the icon 1.1rem. */
.fi-body .fi-sidebar-notifications-item:not(.fi-unread) .fi-no-notification-icon {
    color: #94a3b8 !important;
}

.dark .fi-body .fi-sidebar-notifications-item:not(.fi-unread) .fi-no-notification-icon {
    color: #64748b !important;
}

.fi-body .fi-sidebar-notifications-read-toggle {
    position: absolute;
    top: 0.75rem;
    inset-inline-start: 0.75rem;
    z-index: 2;
    height: 1.6rem;
    width: 1.6rem;
    border-radius: 9999px;
    transition: background-color 120ms ease, box-shadow 120ms ease;
}

.fi-body .fi-sidebar-notifications-read-toggle:hover {
    background: rgba(148, 163, 184, 0.18);
    box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.45);
}

.dark .fi-body .fi-sidebar-notifications-read-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
}

.fi-body .fi-sidebar-notifications-read-toggle:focus-visible {
    outline: 2px solid rgba(var(--primary-500), 0.55);
    outline-offset: 1px;
}

.fi-body .fi-sidebar-notifications-remove {
    position: absolute;
    bottom: 0.45rem;
    inset-inline-end: 0.6rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 1.45rem;
    width: 1.45rem;
    border-radius: 9999px;
    color: #94a3b8;
    transition: background-color 120ms ease, color 120ms ease, opacity 120ms ease;
}

.fi-body .fi-sidebar-notifications-remove:hover {
    background: rgba(var(--danger-500), 0.1);
    color: rgba(var(--danger-600), 1);
}

.fi-body .fi-sidebar-notifications-remove svg {
    height: 0.85rem;
    width: 0.85rem;
}

.fi-body .fi-sidebar-notifications-item.fi-marks-read-on-click {
    cursor: pointer;
}

@media (hover: hover) {
    .fi-body .fi-sidebar-notifications-remove {
        opacity: 0;
    }

    .fi-body .fi-sidebar-notifications-item:hover .fi-sidebar-notifications-remove,
    .fi-body .fi-sidebar-notifications-remove:focus-visible {
        opacity: 1;
    }
}

/* Unread / All: a segmented pair on the toolbar's left, the unread count as a pill. */
.fi-body .fi-sidebar-notifications-tabs {
    display: inline-flex;
    gap: 0.1rem;
    padding: 0.15rem;
    border-radius: 0.65rem;
    background: rgba(148, 163, 184, 0.14);
}

.fi-body .fi-sidebar-notifications-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    height: 1.6rem;
    padding: 0 0.6rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    transition: background-color 120ms ease, color 120ms ease;
}

.dark .fi-body .fi-sidebar-notifications-tab {
    color: #94a3b8;
}

.fi-body .fi-sidebar-notifications-tab.fi-active {
    background: #fff;
    color: #0f172a;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}

.dark .fi-body .fi-sidebar-notifications-tab.fi-active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.fi-body .fi-sidebar-notifications-tab-count {
    min-width: 1.1rem;
    padding: 0 0.3rem;
    border-radius: 9999px;
    background: rgba(var(--primary-500), 1);
    color: #fff;
    font-size: 0.65rem;
    line-height: 1.1rem;
    text-align: center;
}

/* The drawer autofocuses its first control on open: no ring for that, only for keyboard focus. */
.fi-body .fi-sidebar-notifications-tab:focus:not(:focus-visible) {
    outline: none;
}

.fi-body .fi-sidebar-notifications-tab:focus-visible {
    outline: 2px solid rgba(var(--primary-500), 0.55);
    outline-offset: 1px;
}

/* Day groups: Today / Yesterday / Earlier. */
.fi-body .fi-sidebar-notifications-group {
    padding: 0.6rem 1rem 0.3rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
}

.fi-body .fi-sidebar-notifications-item .fi-no-notification-title {
    font-size: 0.8rem;
    line-height: 1.3;
}

.fi-body .fi-sidebar-notifications-item .fi-no-notification-body {
    font-size: 0.75rem;
    line-height: 1.35;
}

/* Age: small, muted, pushed to the card bottom (grid order beats DOM position). */
.fi-body .fi-sidebar-notifications-item .fi-no-notification-date {
    order: 10;
    margin-top: 0.35rem;
    font-size: 0.65rem;
    line-height: 1;
    opacity: 0.7;
}

/* The whole card navigates: the View action anchor is collapsed to zero size
   and stretched over the card via ::after, so a click anywhere hits the REAL
   link — its markAsRead handler and wire:navigate included. (Single-action
   cards only; a second action's overlay would cover the first.) The anchor's
   ::after escapes .fi-notification's overflow-hidden because its containing
   block is the item, which sits outside that box. */
.fi-body .fi-sidebar-notifications-item .fi-no-notification-actions {
    margin: 0;
    height: 0;
    /* Hides the "View ..." label (its inner span carries its own font-size, so
       font-size:0 cannot); the stretched ::after re-enables visibility on itself. */
    visibility: hidden;
}

.fi-body .fi-sidebar-notifications-item .fi-no-notification-actions .fi-link {
    position: static;
}

.fi-body .fi-sidebar-notifications-item .fi-no-notification-actions .fi-link::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    visibility: visible;
}

/* Affordance: hovering a card that opens something tints it. */
.fi-body .fi-sidebar-notifications-item:has(.fi-no-notification-actions .fi-link):hover {
    background: rgba(148, 163, 184, 0.12);
}

.dark .fi-body .fi-sidebar-notifications-item:has(.fi-no-notification-actions .fi-link):hover {
    background: rgba(255, 255, 255, 0.05);
}

.fi-body .fi-sidebar-notifications-item {
    position: relative;
}

.fi-body .fi-sidebar-notifications-item + .fi-sidebar-notifications-item {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

/* Unread: a faint primary wash plus a slit on the drawer edge. */
.fi-body .fi-sidebar-notifications-item.fi-unread {
    background: rgba(var(--primary-500), 0.05);
}

.dark .fi-body .fi-sidebar-notifications-item.fi-unread {
    background: rgba(var(--primary-400), 0.06);
}

.fi-body .fi-sidebar-notifications-item.fi-unread::before {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: rgba(var(--primary-600), 1);
}

.dark .fi-body .fi-sidebar-notifications-item.fi-unread::before {
    background: rgba(var(--primary-300), 1);
}

.fi-body .fi-sidebar-notifications-list {
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.fi-body .fi-sidebar-notifications-pagination {
    padding: 0.75rem 1rem;
}

.fi-body .fi-sidebar-notifications-empty {
    padding: 3rem 1rem;
    text-align: center;
    color: #64748b;
}

.dark .fi-body .fi-sidebar-notifications-empty {
    color: #94a3b8;
}

.fi-body .fi-sidebar-notifications-empty-icon {
    height: 1.6rem;
    width: 1.6rem;
    margin: 0 auto 0.5rem;
    opacity: 0.7;
}

.fi-body .fi-sidebar-notifications-empty-heading {
    font-size: 0.85rem;
    font-weight: 600;
}

.fi-body .fi-sidebar-notifications-empty-description {
    font-size: 0.78rem;
    margin-top: 0.2rem;
}

/* Nav count badges — the bell, Action Center, unseen-rows and cluster
   counters: compact solid counters (matching the mobile bar's bell dot).
   Cosmetics only — POSITION lives on the badge's wrapper span (the
   collapsed-state and bell rules above pin it to the button corner; the
   expanded-state rule below pins it to the icon corner), because the
   wrapper is what Filament x-show-toggles and what those rules absolutely
   position. A positioned .fi-badge inside an absolutely-positioned wrapper
   would land outside the collapsed button (that exact bug shipped once).
   The fill comes from each badge's own Filament palette variable (info =
   unseen rows, warning/danger = Action Center, danger = the bell); the
   variables are comma-separated RGB triples, hence rgba(var(), 1). The panel
   switcher sits OUTSIDE .fi-sidebar-nav (it is moved above the scroller, under
   the search), so its per-panel counts are named here too: without it they fell
   back to Filament's square outlined badge. */
.fi-body .fi-sidebar-nav .fi-sidebar-item-button .fi-badge,
.fi-body .fi-sidebar .fi-panel-switcher-group .fi-sidebar-item-button .fi-badge,
.fi-body .fi-sidebar-footer-btn-badge .fi-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 1rem;
    height: 1rem;
    padding: 0 0.25rem;
    border-radius: 9999px;
    background: rgba(var(--c-600, 220, 38, 38), 1);
    color: #fff;
    font-size: 0.58rem;
    font-weight: 600;
    line-height: 1;
    box-shadow: none;
}

/* Expanded sidebar (and the mobile sheet): pin the badge wrapper to the
   item icon's top-right corner — px-2 padding + 1.5rem icon puts the
   corner at ~2rem. Collapsed pinning stays with the collapse rules; the
   panel-switcher bell keeps its own pinning; icon-less sub-grouped rows
   keep the stock inline badge. */
.fi-body .fi-sidebar.fi-sidebar-open .fi-sidebar-group:not(.fi-panel-switcher-group) .fi-sidebar-item-button:has(.fi-sidebar-item-icon) > span:has(> .fi-badge) {
    display: flex;
    position: absolute;
    top: 0.05rem;
    inset-inline-start: 1.45rem;
    pointer-events: none;
}

/* === Collapsible group headers: compact row, chevron on hover ===
   Filament's collapse control is a 2.25rem icon button, which set the header
   row's height; it shrinks to a 1.25rem glyph. The alias icon is chevron-down
   (ConfiguresSidebarChrome): down while the group is open, turned to point
   right when Filament marks it collapsed (its -rotate-180 class). On devices
   with hover it only shows while the header is hovered or focused. */
.fi-body .fi-sidebar-group-button {
    gap: 0.5rem;
    padding-top: 0.15rem;
    padding-bottom: 0.15rem;
}

.fi-body .fi-sidebar-group-label {
    line-height: 1.25rem;
}

.fi-body .fi-sidebar-group-collapse-button {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    padding: 0;
    border-radius: 0.35rem;
    transition: opacity 120ms ease, transform 150ms ease;
}

.fi-body .fi-sidebar-group-collapse-button svg {
    width: 0.9rem;
    height: 0.9rem;
}

.fi-body .fi-sidebar-group-collapse-button.-rotate-180 {
    transform: rotate(-90deg);
}

@media (hover: hover) {
    .fi-body .fi-sidebar-group-collapse-button {
        opacity: 0;
    }

    .fi-body .fi-sidebar-group-button:hover .fi-sidebar-group-collapse-button,
    .fi-body .fi-sidebar-group-collapse-button:focus-visible {
        opacity: 1;
    }
}

/* === Search trigger + Pinned section (navigation-search-sidebar blade) ===
   The trigger is a button styled as an input (the palette owns the real
   input); collapsed, a magnifier icon button. Pinned rows use Filament's item
   markup, so only the inline SVG sizing and the hover unpin ✕ are new. */
.fi-body .fi-nav-search-trigger-row {
    display: flex;
    justify-content: center;
    margin-bottom: 0.3rem;
}

.fi-body .fi-nav-search-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    height: 2.1rem;
    padding: 0 0.55rem;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 0.65rem;
    background-color: rgba(255, 255, 255, 0.6);
    color: #64748b;
    font-size: 0.82rem;
    text-align: start;
    cursor: pointer;
    transition: border-color 150ms ease, background-color 150ms ease;
}

.dark .fi-body .fi-nav-search-trigger {
    border-color: rgba(148, 163, 184, 0.16);
    background-color: rgba(0, 0, 0, 0.22);
    color: #94a3b8;
}

.fi-body .fi-nav-search-trigger:hover {
    border-color: rgba(148, 163, 184, 0.45);
}

.fi-body .fi-nav-search-trigger:focus-visible {
    outline: 2px solid rgba(var(--primary-500), 0.6);
    outline-offset: 1px;
}

.fi-body .fi-nav-search-trigger-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

/* translate: the font's ascent puts the glyphs ~0.9px above the line box's
   middle, so the word read high beside the (centred) magnifier; 1px down
   lines their ink centres up (measured on the rendered pixels). */
.fi-body .fi-nav-search-trigger-label {
    translate: 0 1px;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fi-body .fi-nav-search-trigger-kbd {
    flex-shrink: 0;
    padding: 0.05rem 0.35rem;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 0.3rem;
    font-family: inherit;
    font-size: 0.64rem;
    font-weight: 600;
    line-height: 1.2;
}

.fi-body .fi-nav-search-trigger-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: calc(0.85rem - 0.2rem - 1px);
    color: #64748b;
}

.fi-body .fi-nav-search-trigger-icon-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

.dark .fi-body .fi-nav-search-trigger-icon-btn {
    color: #94a3b8;
}

/* Like the switcher: hover only recolours the glyph (the panel's primary). */
.fi-body .fi-nav-search-trigger-icon-btn:is(:hover, :focus-visible) {
    color: rgba(var(--primary-600), 1);
}

.dark .fi-body .fi-nav-search-trigger-icon-btn:is(:hover, :focus-visible) {
    color: rgba(var(--primary-400), 1);
}

.fi-body .fi-nav-search-pinned-icon {
    display: flex;
    flex-shrink: 0;
}

.fi-body .fi-nav-search-pinned-icon svg {
    width: 100%;
    height: 100%;
}

.fi-body .fi-nav-search-pinned-item {
    position: relative;
}

.fi-body .fi-nav-search-unpin {
    position: absolute;
    top: 50%;
    inset-inline-end: 0.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    transform: translateY(-50%);
    border-radius: 0.4rem;
    color: #94a3b8;
    opacity: 0;
    transition: opacity 120ms ease;
}

.fi-body .fi-nav-search-pinned-item:hover .fi-nav-search-unpin,
.fi-body .fi-nav-search-unpin:focus-visible {
    opacity: 1;
}

.fi-body .fi-nav-search-unpin:hover {
    background-color: rgba(148, 163, 184, 0.16);
    color: #0f172a;
}

.dark .fi-body .fi-nav-search-unpin:hover {
    color: #fff;
}

@media (hover: none) {
    .fi-body .fi-nav-search-unpin {
        opacity: 1;
    }
}

/* User menu header (collapsed sidebar's menu): who is signed in. */
.fi-body .fi-user-menu-header {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    padding: 0.65rem 0.8rem 0.55rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    font-size: 0.85rem;
}

.fi-body .fi-user-menu-header-name {
    font-weight: 700;
    color: #0f172a;
}

.dark .fi-body .fi-user-menu-header-name {
    color: #fff;
}

.fi-body .fi-user-menu-header-role {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.78rem;
    color: #64748b;
}

.dark .fi-body .fi-user-menu-header-role {
    color: #94a3b8;
}

/* User menu appearance rows (theme + language): only the active choice is
   coloured — primary, on a primary-tinted pill; the rest stay gray (Filament's
   theme-switcher binding and the locale buttons' own classes). The sidebar
   user menu paints every svg slate (see the sidebar icon rule above), so these
   icons inherit their button's colour instead. */
.fi-body .fi-user-menu-appearance .fi-theme-switcher-btn.fi-active,
.fi-body .fi-user-menu-appearance .fi-locale-switcher-btn.fi-active {
    background-color: rgb(var(--primary-500) / 0.12);
}

.dark .fi-body .fi-user-menu-appearance .fi-theme-switcher-btn.fi-active,
.dark .fi-body .fi-user-menu-appearance .fi-locale-switcher-btn.fi-active {
    background-color: rgb(var(--primary-400) / 0.16);
}

.fi-body .fi-user-menu-appearance .fi-theme-switcher-btn svg,
.fi-body .fi-user-menu-appearance .fi-locale-switcher-icon svg {
    color: inherit;
}

.fi-body .fi-dropdown-list-item.fi-color-danger .fi-dropdown-list-item-icon {
    color: rgb(var(--danger-500));
}

.dark .fi-body .fi-dropdown-list-item.fi-color-danger .fi-dropdown-list-item-icon {
    color: rgb(var(--danger-400));
}

/* The search group is left empty once its trigger moves into the switcher and
   nothing is pinned — drop it, or the nav-groups gap doubles below the pill. */
.fi-body .fi-nav-search-group:not(:has(.fi-nav-search-pinned-item)):not(:has(.fi-nav-search-trigger-row)) {
    display: none;
}

/* Pinned rows can be dragged to reorder; the ghost marks the slot. */
.fi-body .fi-nav-search-pinned-ghost {
    opacity: 0.35;
}

/* === Collapsed rail: "more below" fade ===
   The rail hides its scrollbar; while there is more to scroll to, the bottom
   of the nav fades out (fi-nav-more-below is kept up to date by the
   sidebar-scroll-memory script). */
@media (min-width: 1024px) {
    .fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-nav.fi-nav-more-below {
        -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 2.75rem), transparent);
        mask-image: linear-gradient(to bottom, #000 calc(100% - 2.75rem), transparent);
    }
}

/* === Mobile sheet header ===
   Brand on the left, a quiet ✕ on the right (Filament's own collapse button —
   it calls $store.sidebar.close(), which closes the sheet — restyled; the old
   drag-handle pill did nothing and is gone). The search sits right under it
   and stays pinned at the top of the menu list: the list scrolls on its own
   (Filament centres the active item on load), which used to push the search
   half under the header. The ⌘K hint is dropped — phones have no keyboard. */
@media (max-width: 1023.98px) {
    .fi-body .fi-sidebar-header {
        height: 3.75rem;
        padding-inline: 1.25rem 0.85rem;
        border-bottom: 0;
        box-shadow: none;
    }

    .fi-body .fi-sidebar-header::before {
        content: none;
    }

    .fi-body .fi-sidebar-header .gap-3 {
        gap: 0.6rem;
    }

    .fi-body .fi-sidebar-header .gap-3 > img {
        width: 1.7rem;
        height: 1.7rem;
    }

    .fi-body .fi-sidebar-header .gap-3 > span {
        font-size: 1.3rem;
    }

    .fi-body .fi-sidebar-header > .fi-icon-btn:last-child {
        position: relative;
        display: flex !important;
        width: 2.5rem;
        height: 2.5rem;
        margin-inline-start: auto;
        border-radius: 0.6rem;
        background-color: transparent;
        color: #94a3b8;
        transition: background-color 150ms ease, color 150ms ease;
    }

    .dark .fi-body .fi-sidebar-header > .fi-icon-btn:last-child {
        background-color: transparent;
        color: #71717a;
    }

    .fi-body .fi-sidebar-header > .fi-icon-btn:last-child:active {
        background-color: rgba(148, 163, 184, 0.14);
        color: #475569;
    }

    .dark .fi-body .fi-sidebar-header > .fi-icon-btn:last-child:active {
        background-color: rgba(255, 255, 255, 0.06);
        color: #d4d4d8;
    }

    .fi-body .fi-sidebar-header > .fi-icon-btn:last-child .fi-icon-btn-icon {
        display: none;
    }

    .fi-body .fi-sidebar-header > .fi-icon-btn:last-child::before,
    .fi-body .fi-sidebar-header > .fi-icon-btn:last-child::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 1rem;
        height: 1.5px;
        border-radius: 9999px;
        background-color: currentColor;
    }

    .fi-body .fi-sidebar-header > .fi-icon-btn:last-child::before {
        transform: translate(-50%, -50%) rotate(45deg);
    }

    .fi-body .fi-sidebar-header > .fi-icon-btn:last-child::after {
        transform: translate(-50%, -50%) rotate(-45deg);
    }

    /* One scroller: the sheet is a column capped at 85vh whose header stays
       put and whose menu list scrolls. (The sheet itself used to scroll too,
       sliding the list under the sticky header.) */
    .fi-body .fi-sidebar {
        overflow-y: hidden;
    }

    .fi-body .fi-sidebar > div:first-child {
        flex: none;
    }

    /* Only the menu list scrolls; the search block sits above it (moved out of
       the list by the navigation-search-sidebar blade). */
    .fi-body .fi-sidebar-nav {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        padding-top: 0.25rem;
        border-top: 0;
    }

    /* One flat surface: the sheet colour behind header, search and list alike
       (the list's desktop gradient made the pinned search read as a band). */
    .fi-body .fi-sidebar-nav,
    .dark .fi-body .fi-sidebar-nav {
        background-image: none;
        background-color: transparent;
    }

    .fi-body .fi-panel-switcher-group {
        padding: 0.25rem 1rem 0.75rem;
        background-color: #fafafa;
    }

    .dark .fi-body .fi-panel-switcher-group {
        background-color: #27272a;
    }

    .fi-body .fi-nav-search-trigger-row {
        margin-bottom: 0;
    }

    .fi-body .fi-nav-search-trigger {
        height: 2.85rem;
        padding-inline: 0.9rem;
        gap: 0.65rem;
        border-radius: 0.85rem;
        font-size: 0.95rem;
    }

    .fi-body .fi-nav-search-trigger-icon {
        width: 1.15rem;
        height: 1.15rem;
    }

    .fi-body .fi-nav-search-trigger-kbd {
        display: none;
    }
}


/* === Footer at bar height + search-row utility buttons ===
   The footer is exactly one bar tall in both states (border included), so its
   top edge meets the datagrid footer's on workspace pages. It holds the user
   alone: the bell and the assistant sit in the search row instead
   (navigation-search-sidebar blade) — beside the field when expanded, stacked
   under the magnifier in the collapsed pill. */
@media (min-width: 1024px) {
    .fi-body .fi-sidebar-user-menu-panel {
        display: flex;
        flex-direction: column;
        justify-content: center;
        flex-shrink: 0;
        height: var(--tact-bar-h);
        padding-block: 0;
    }

    .fi-body .fi-sidebar-user-menu-panel .fi-sidebar-user-trigger {
        padding-block: 0.2rem;
    }
}

.fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-nav-search-trigger-row {
    flex-direction: column;
    align-items: center;
}

.fi-body .fi-nav-utility-btns {
    display: flex;
    flex-shrink: 0;
    align-items: center;
}

/* Expanded, the row is one pill — the collapsed pill laid on its side, and the
   same frame as the Management | Execution switch under it: the search field
   (flat, no box of its own), a hairline, then the bell and the assistant as
   segments of the same control. */
.fi-body .fi-sidebar.fi-sidebar-open .fi-nav-search-trigger-row {
    box-sizing: border-box;
    align-items: stretch;
    height: 2.1rem;
    padding: 0.15rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 0.65rem;
    background-color: rgba(255, 255, 255, 0.6);
}

.dark .fi-body .fi-sidebar.fi-sidebar-open .fi-nav-search-trigger-row {
    border-color: rgba(148, 163, 184, 0.16);
    background-color: rgba(0, 0, 0, 0.22);
}

.fi-body .fi-sidebar.fi-sidebar-open .fi-nav-search-trigger-row:focus-within {
    border-color: rgba(148, 163, 184, 0.45);
}

.fi-body .fi-sidebar.fi-sidebar-open .fi-nav-search-trigger {
    flex: 1 1 auto;
    min-width: 0;
    height: auto;
    padding-inline: 0.45rem;
    border-color: transparent;
    border-radius: calc(0.65rem - 0.15rem - 1px);
    background-color: transparent;
}

.dark .fi-body .fi-sidebar.fi-sidebar-open .fi-nav-search-trigger {
    border-color: transparent;
    background-color: transparent;
}

.fi-body .fi-sidebar.fi-sidebar-open .fi-nav-search-trigger:hover {
    border-color: transparent;
    background-color: rgba(148, 163, 184, 0.14);
}

.fi-body .fi-sidebar.fi-sidebar-open .fi-nav-utility-btns {
    align-items: stretch;
    gap: 0.1rem;
    margin-inline-start: 0.15rem;
    padding-inline-start: 0.15rem;
    border-inline-start: 1px solid rgba(148, 163, 184, 0.24);
}

.dark .fi-body .fi-sidebar.fi-sidebar-open .fi-nav-utility-btns {
    border-inline-start-color: rgba(148, 163, 184, 0.16);
}

/* The shortcut hint stays out of the way: no frame, faint, and only while the
   field is hovered or focused (opacity, so the label never shifts). */
.fi-body .fi-sidebar.fi-sidebar-open .fi-nav-search-trigger-kbd {
    padding: 0;
    border: 0;
    font-weight: 500;
    letter-spacing: 0.02em;
    opacity: 0;
    transition: opacity 150ms ease;
}

.fi-body .fi-sidebar.fi-sidebar-open .fi-nav-search-trigger:is(:hover, :focus-visible) .fi-nav-search-trigger-kbd {
    opacity: 0.7;
}

.fi-body .fi-sidebar:not(.fi-sidebar-open) .fi-nav-utility-btns {
    flex-direction: column;
}

/* The mobile sheet: the bottom panel bar already carries the bell. */
@media (max-width: 1023.98px) {
    .fi-body .fi-nav-utility-btns {
        display: none;
    }
}

.fi-body .fi-nav-utility-btns .fi-sidebar-footer-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: calc(0.85rem - 0.2rem - 1px);
    color: #64748b;
}

.fi-body .fi-sidebar.fi-sidebar-open .fi-nav-utility-btns .fi-sidebar-footer-btn {
    width: 1.75rem;
    height: auto;
    border-radius: calc(0.65rem - 0.15rem - 1px);
}

.fi-body .fi-sidebar.fi-sidebar-open .fi-nav-utility-btns .fi-sidebar-footer-btn svg {
    width: 1.1rem;
    height: 1.1rem;
}

.fi-body .fi-sidebar.fi-sidebar-open .fi-nav-utility-btns .fi-sidebar-footer-btn:hover {
    background-color: rgba(148, 163, 184, 0.14);
}

.dark .fi-body .fi-nav-utility-btns .fi-sidebar-footer-btn {
    color: #94a3b8;
}

.fi-body .fi-nav-utility-btns .fi-sidebar-footer-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

.fi-body .fi-nav-utility-btns .fi-sidebar-footer-btn:is(:hover, :focus-visible) {
    color: rgba(var(--primary-600), 1);
}

.dark .fi-body .fi-nav-utility-btns .fi-sidebar-footer-btn:is(:hover, :focus-visible) {
    color: rgba(var(--primary-400), 1);
}


/* === Panel switcher: underline tabs (expanded desktop) ===
   Expanded, Management | Execution are two tabs under the search row rather
   than a segmented pill: plain labels on the header background, a hairline
   along the bottom of the search block (edge to edge), and the active panel in
   its primary colour with a bar sitting on that hairline. The tabs themselves
   span the search row's width so both edges line up with it. Collapsed keeps the icon pill (only the
   other panel), and mobile hides the switcher (the panels are in the bottom
   bar), hence the desktop media query. */
@media (min-width: 1024px) {
    .fi-body .fi-sidebar.fi-sidebar-open .fi-panel-switcher-group {
        padding-bottom: 0;
        border-bottom: 1px solid rgba(148, 163, 184, 0.3);
    }

    .dark .fi-body .fi-sidebar.fi-sidebar-open .fi-panel-switcher-group {
        border-bottom-color: rgba(148, 163, 184, 0.18);
    }

    .fi-body .fi-sidebar.fi-sidebar-open .fi-panel-switcher-group > .fi-sidebar-group-items {
        height: 2.5rem;
        margin-top: 0.15rem;
        gap: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background-color: transparent;
    }

    .dark .fi-body .fi-sidebar.fi-sidebar-open .fi-panel-switcher-group > .fi-sidebar-group-items {
        background-color: transparent;
    }

    .fi-body .fi-sidebar.fi-sidebar-open .fi-panel-switcher-group .fi-sidebar-item-button {
        position: relative;
        padding-inline: 0.35rem;
        border-radius: 0.4rem 0.4rem 0 0;
    }

    .fi-body .fi-sidebar.fi-sidebar-open .fi-panel-switcher-group .fi-sidebar-item-button::after {
        content: "";
        position: absolute;
        inset-inline: 0;
        bottom: -1px;
        height: 2px;
        border-radius: 2px 2px 0 0;
        background-color: transparent;
        transition: background-color 160ms ease;
    }

    /* The outer tabs' bars run on to the sidebar edge (across the group's
       inline padding), like the hairline under them. */
    .fi-body .fi-sidebar.fi-sidebar-open .fi-panel-switcher-group .fi-sidebar-item:first-child .fi-sidebar-item-button::after {
        inset-inline-start: -0.625rem;
        border-start-start-radius: 0;
    }

    .fi-body .fi-sidebar.fi-sidebar-open .fi-panel-switcher-group .fi-sidebar-item:last-child .fi-sidebar-item-button::after {
        inset-inline-end: -0.625rem;
        border-start-end-radius: 0;
    }

    .fi-body .fi-sidebar.fi-sidebar-open .fi-panel-switcher-group .fi-sidebar-item-label {
        font-size: 0.875rem;
        font-weight: 500;
        color: #64748b;
    }

    .dark .fi-body .fi-sidebar.fi-sidebar-open .fi-panel-switcher-group .fi-sidebar-item-label {
        color: #94a3b8;
    }

    .fi-body .fi-sidebar.fi-sidebar-open .fi-panel-switcher-group .fi-sidebar-item.fi-active .fi-sidebar-item-button,
    .dark .fi-body .fi-sidebar.fi-sidebar-open .fi-panel-switcher-group .fi-sidebar-item.fi-active .fi-sidebar-item-button {
        background-color: transparent;
        box-shadow: none;
    }

    .fi-body .fi-sidebar.fi-sidebar-open .fi-panel-switcher-group .fi-sidebar-item.fi-active .fi-sidebar-item-label {
        font-weight: 600;
        color: rgba(var(--primary-600), 1);
    }

    .dark .fi-body .fi-sidebar.fi-sidebar-open .fi-panel-switcher-group .fi-sidebar-item.fi-active .fi-sidebar-item-label {
        color: rgba(var(--primary-300), 1);
    }

    .fi-body .fi-sidebar.fi-sidebar-open .fi-panel-switcher-group .fi-sidebar-item.fi-active .fi-sidebar-item-button::after {
        background-color: rgba(var(--primary-600), 1);
    }

    .dark .fi-body .fi-sidebar.fi-sidebar-open .fi-panel-switcher-group .fi-sidebar-item.fi-active .fi-sidebar-item-button::after {
        background-color: rgba(var(--primary-300), 1);
    }

    /* Hovering the other tab previews it: its label takes its own panel's
       colour (the shared rule above) and a faint bar shows where it would sit. */
    .fi-body .fi-sidebar.fi-sidebar-open .fi-panel-switcher-group .fi-sidebar-item:not(.fi-active) .fi-sidebar-item-button:is(:hover, :focus-visible)::after {
        background-color: rgba(148, 163, 184, 0.45);
    }
}


/* === Panel home page without a group header (desktop + mobile sheet) ===
   The panel's home page (Overview / Action center) heads the menu on its own:
   the tab above already names the panel, so its group header is not shown.
   The group stays registered (and non-collapsible) because the access matrix
   and the search palette still use its name. */
.fi-body .fi-panel-dashboard-group > .fi-sidebar-group-button {
    display: none;
}


/* === Nav icon hover animations (desktop, pointer only) ===
   The `navicon-*` icons (resources/svg/nav) are heroicons with their moving
   parts split out. Hovering a menu row plays a small gesture on its icon:
   the pie slice lifts out, the chip core shrinks, the two back operators step
   aside, the cube grows, the calendar dots blink in turn, the fingerprint
   ridges shift, the order sheet and its clipboard part, the Buy arrow drops
   into its tray, the Make gear ticks one tooth, the Ship truck idles, the
   article box hops, the cycle arrows turn once, the operation cards ripple,
   the location map folds and opens, the quality tick redraws, the test beaker
   swings, the SPC bars take new readings, the maintenance tools open apart,
   the plan days fill in, the fault sign shakes; in Execution the action-center
   bell rings, the work-order lines nudge, a kanban card moves, the gantt bars
   reschedule, the batch blocks gather, the andon horn buzzes, the deviation
   sliders fine-tune, the transfer arrows push, the inventory layers count,
   the handling-unit lid tips open, the lot tag swings, the inspection sheet
   parts from its clipboard, the insight trend draws, the supplier awning
   ripples, the intervention wrench turns; in Configuration the production
   gear ticks, the order basket bobs, the quality badge stamps, the terminal
   tilts, the display nods on its stand, the printer feeds a page, the scale
   tips, the second user steps aside, the workflow tiles ripple, the label
   brush sweeps, the office lights come on, the license key turns, the AI
   stars twinkle, the API brackets open, the data-exchange arrow lifts out of
   its tray. Cluster tabs people pin side by side get their own: the customer
   contract arrow lifts out and the supplier one drops in, the partners
   briefcase swings, the reservations padlock jiggles, the loads tray lifts,
   the inventory-document lines write, the returns U-turn pushes back (every
   other tab shows its cluster's icon when pinned). Icons shared with another item
   (truck, tools, warning sign, bars, megaphone, list) reuse its gesture. Lengths are in the icon's 24-unit viewBox. Touch devices and
   reduced-motion users get the still icon. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .fi-body :is(.navicon-slice, .navicon-core, .navicon-person-left, .navicon-person-right, .navicon-cube, .navicon-orders-board, .navicon-orders-sheet, .navicon-block-a, .navicon-block-b, .navicon-block-c, .navicon-inspect-board, .navicon-inspect-sheet, .navicon-user-back, .navicon-bracket-l, .navicon-bracket-r) {
        transform-box: fill-box;
        transform-origin: center;
        transition: transform 280ms cubic-bezier(0.34, 1.4, 0.64, 1);
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-slice {
        transform: translate(1.25px, -1.25px);
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-core {
        transform: scale(0.75);
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-person-left {
        transform: translateX(-1.25px);
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-person-right {
        transform: translateX(1.25px);
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-cube {
        transform: scale(1.12);
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-dots > path {
        animation: navicon-dot-blink 700ms ease-in-out calc(var(--i) * 40ms) both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-ridges > path {
        animation: navicon-ridge-shift 650ms ease-in-out both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-orders-board {
        transform: translate(0.75px, -0.75px);
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-orders-sheet {
        transform: translate(-0.75px, 0.75px);
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-buy-arrow {
        animation: navicon-arrow-drop 620ms ease-in-out both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-buy-tray {
        animation: navicon-tray-catch 620ms ease-in-out both;
    }

    /* 45° is one tooth of the 8-tooth gear, so the end pose matches the rest pose. */
    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-gear {
        transform-box: view-box;
        transform-origin: 12px 12px;
        animation: navicon-gear-tick 700ms both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-truck-body {
        animation: navicon-truck-rumble 600ms ease-in-out both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-cube-hop {
        transform-box: fill-box;
        transform-origin: 50% 100%;
        animation: navicon-cube-hop 640ms ease-in-out both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-spin {
        transform-box: view-box;
        transform-origin: 12px 12px;
        animation: navicon-full-turn 760ms cubic-bezier(0.5, 0, 0.3, 1) both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) :is(.navicon-layer-back, .navicon-layer-mid, .navicon-layer-front) {
        animation: navicon-layer-hop 460ms ease-in-out both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-layer-mid {
        animation-delay: 70ms;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-layer-back {
        animation-delay: 140ms;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-map-sheet {
        transform-box: fill-box;
        transform-origin: center;
        animation: navicon-fold-open 640ms ease-in-out both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-tick {
        stroke-dasharray: 1 2;
        animation: navicon-tick-draw 480ms ease-out both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-flask {
        transform-box: view-box;
        transform-origin: 12px 3px;
        animation: navicon-swing 760ms ease-in-out both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-bar {
        transform-box: fill-box;
        transform-origin: 50% 100%;
        animation: navicon-bar-reading 700ms ease-in-out both;
    }

    /* Both tools pivot on the point where they cross. */
    .fi-body :is(.navicon-wrench, .navicon-driver) {
        transform-box: view-box;
        transform-origin: 11.5px 12.5px;
        transition: transform 280ms cubic-bezier(0.34, 1.4, 0.64, 1);
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-wrench {
        transform: rotate(-8deg);
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-driver {
        transform: rotate(8deg);
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-plan-dots > path {
        animation: navicon-dot-fill 360ms ease-out calc(var(--i) * 45ms) both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-alert {
        animation: navicon-shake 520ms ease-in-out both;
    }

    /* The bell and its clapper hang from the top of the bell. */
    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) :is(.navicon-bell, .navicon-clapper) {
        transform-box: view-box;
        transform-origin: 12px 3.5px;
        animation: navicon-bell-ring 760ms ease-in-out both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-clapper {
        animation-name: navicon-clapper-ring;
        animation-delay: 40ms;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-wave-l {
        animation: navicon-wave-l 760ms ease-in-out both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-wave-r {
        animation: navicon-wave-r 760ms ease-in-out both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-row-line {
        animation: navicon-line-nudge 460ms ease-in-out calc(var(--i) * 80ms) both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-kanban-card {
        animation: navicon-card-move 820ms ease-in-out both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-gantt-bar {
        transform-box: fill-box;
        transform-origin: 100% 50%;
        animation: navicon-gantt-resize 700ms ease-in-out both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-block-a {
        transform: translate(0.75px, 0.75px);
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-block-b {
        transform: translateX(-0.75px);
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-block-c {
        transform: translate(0.5px, -0.75px);
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-horn {
        transform-box: view-box;
        transform-origin: 6px 11.25px;
        animation: navicon-horn-buzz 520ms linear both;
    }

    /* Each knob slides; the two halves of its track stretch to follow it. */
    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-knob {
        animation: navicon-knob-tune 700ms ease-in-out both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-track-l {
        transform-box: fill-box;
        transform-origin: 0% 50%;
        animation: navicon-track-l-tune 700ms ease-in-out both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-track-r {
        transform-box: fill-box;
        transform-origin: 100% 50%;
        animation: navicon-track-r-tune 700ms ease-in-out both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-arrow-right {
        animation: navicon-push-right 560ms ease-in-out both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-arrow-left {
        animation: navicon-push-left 560ms ease-in-out 80ms both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-stack-band {
        animation: navicon-band-count 420ms ease-in-out calc(var(--i) * 120ms) both;
    }

    /* The lid hinges on its bottom-left corner. */
    .fi-body .navicon-box-lid {
        transform-box: fill-box;
        transform-origin: 0% 100%;
        transition: transform 280ms cubic-bezier(0.34, 1.4, 0.64, 1);
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-box-lid {
        transform: rotate(-6deg);
    }

    /* The tag swings from its hole. */
    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-tag {
        transform-box: view-box;
        transform-origin: 6px 6px;
        animation: navicon-tag-swing 900ms ease-in-out both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-inspect-board {
        transform: translate(0.75px, -0.75px);
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-inspect-sheet {
        transform: translate(-0.75px, 0.75px);
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-trend {
        stroke-dasharray: 1 2;
        animation: navicon-tick-draw 620ms ease-out both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-awning {
        transform-box: fill-box;
        transform-origin: 50% 0%;
        animation: navicon-awning-wave 640ms ease-in-out both;
    }

    /* The wrench turns on its head, like tightening a bolt. */
    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-spanner {
        transform-box: view-box;
        transform-origin: 17.25px 6.75px;
        animation: navicon-wrench-turn 680ms ease-in-out both;
    }

    /* 60° is one tooth of the 6-tooth gear, so the end pose matches the rest pose. */
    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-cog6 {
        transform-box: view-box;
        transform-origin: 12px 12px;
        animation: navicon-cog6-tick 700ms both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-cart-basket {
        animation: navicon-truck-rumble 600ms ease-in-out both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-badge {
        transform-box: fill-box;
        transform-origin: center;
        animation: navicon-stamp 520ms ease-in-out both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-tablet {
        transform-box: view-box;
        transform-origin: 12px 12px;
        animation: navicon-tablet-tilt 680ms ease-in-out both;
    }

    /* The screen pivots where it meets its stand. */
    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-screen {
        transform-box: view-box;
        transform-origin: 12px 17.25px;
        animation: navicon-screen-nod 640ms ease-in-out both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-sheet-out {
        animation: navicon-sheet-feed 640ms ease-in-out both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-printer-lights > path {
        animation: navicon-light-blink 640ms steps(1, end) calc(var(--i) * 160ms) both;
    }

    /* MQTT connection: the signal rings light up from the centre outwards. */
    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-signal-rings > path {
        animation: navicon-dot-blink 700ms ease-in-out calc(var(--i) * 140ms) both;
    }

    /* The beam tips on its post; each pan follows its end of the beam. */
    .fi-body .navicon-beam {
        transform-box: view-box;
        transform-origin: 12px 4.5px;
    }

    .fi-body :is(.navicon-beam, .navicon-pan-l, .navicon-pan-r) {
        transition: transform 420ms cubic-bezier(0.34, 1.4, 0.64, 1);
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-beam {
        transform: rotate(6deg);
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-pan-l {
        transform: translateY(-0.7px);
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-pan-r {
        transform: translateY(0.7px);
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-user-back {
        transform: translateX(1.25px);
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-tile {
        animation: navicon-layer-hop 420ms ease-in-out calc(var(--i) * 90ms) both;
    }

    /* The brush sweeps from the end of its handle. */
    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-brush {
        transform-box: view-box;
        transform-origin: 20.5px 3.5px;
        animation: navicon-brush-stroke 700ms ease-in-out both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-office-windows > path {
        animation: navicon-dot-fill 320ms ease-out calc(var(--i) * 50ms) both;
    }

    /* The key turns on its head. */
    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-key {
        transform-box: view-box;
        transform-origin: 15.75px 8.25px;
        animation: navicon-key-turn 680ms ease-in-out both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-star {
        transform-box: fill-box;
        transform-origin: center;
        animation: navicon-twinkle 520ms ease-in-out calc(var(--i) * 120ms) both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-bracket-l {
        transform: translateX(-0.75px);
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-bracket-r {
        transform: translateX(0.75px);
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-upload-arrow {
        animation: navicon-arrow-lift 620ms ease-in-out both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-upload-tray {
        animation: navicon-tray-catch 620ms ease-in-out both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-contract-out-arrow {
        animation: navicon-arrow-lift 620ms ease-in-out both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-contract-in-arrow {
        animation: navicon-arrow-drop 620ms ease-in-out both;
    }

    /* The briefcase swings from its handle. */
    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-briefcase {
        transform-box: view-box;
        transform-origin: 12px 3px;
        animation: navicon-case-swing 820ms ease-in-out both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-padlock {
        transform-box: view-box;
        transform-origin: 12px 12px;
        animation: navicon-lock-jiggle 520ms ease-in-out both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-tray-top {
        animation: navicon-tray-lift 560ms ease-in-out both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-text-line {
        transform-box: fill-box;
        transform-origin: 0% 50%;
        animation: navicon-line-write 420ms ease-out calc(var(--i) * 90ms) both;
    }

    .fi-body .fi-sidebar-item-button:is(:hover, :focus-visible) .navicon-uturn {
        animation: navicon-push-left 560ms ease-in-out both;
    }
}

@keyframes navicon-dot-blink {
    0%, 100% {
        opacity: 1;
    }

    35%, 55% {
        opacity: 0;
    }
}

@keyframes navicon-ridge-shift {
    0%, 100% {
        transform: translate(0, 0);
    }

    35% {
        transform: translate(var(--dx), var(--dy));
    }

    70% {
        transform: translate(calc(var(--dx) * -0.5), calc(var(--dy) * -0.5));
    }
}

@keyframes navicon-arrow-drop {
    0%, 100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(2px);
    }

    65% {
        transform: translateY(-0.5px);
    }
}

@keyframes navicon-tray-catch {
    0%, 30%, 100% {
        transform: translateY(0);
    }

    45% {
        transform: translateY(0.6px);
    }
}

@keyframes navicon-gear-tick {
    0% {
        transform: rotate(0deg);
        animation-timing-function: cubic-bezier(0.3, 1.6, 0.6, 1);
    }

    30%, 45% {
        transform: rotate(22.5deg);
        animation-timing-function: cubic-bezier(0.3, 1.6, 0.6, 1);
    }

    75%, 100% {
        transform: rotate(45deg);
    }
}

@keyframes navicon-truck-rumble {
    0%, 50%, 100% {
        transform: translateY(0);
    }

    25% {
        transform: translateY(-0.6px);
    }

    75% {
        transform: translateY(-0.4px);
    }
}

@keyframes navicon-cube-hop {
    0%, 100% {
        transform: translateY(0) scale(1, 1);
    }

    30% {
        transform: translateY(-1.5px) scale(1, 1);
    }

    55% {
        transform: translateY(0) scale(1.05, 0.93);
    }

    75% {
        transform: translateY(0) scale(0.98, 1.02);
    }
}

@keyframes navicon-full-turn {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes navicon-layer-hop {
    0%, 100% {
        transform: translateY(0);
    }

    45% {
        transform: translateY(-0.9px);
    }
}

@keyframes navicon-fold-open {
    0%, 100% {
        transform: scaleX(1);
    }

    35% {
        transform: scaleX(0.82);
    }

    70% {
        transform: scaleX(1.04);
    }
}

@keyframes navicon-tick-draw {
    from {
        stroke-dashoffset: 1;
    }

    to {
        stroke-dashoffset: 0;
    }
}

@keyframes navicon-swing {
    0%, 100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(7deg);
    }

    55% {
        transform: rotate(-5deg);
    }

    80% {
        transform: rotate(2deg);
    }
}

@keyframes navicon-bar-reading {
    0%, 100% {
        transform: scaleY(1);
    }

    45% {
        transform: scaleY(var(--s));
    }
}

@keyframes navicon-dot-fill {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes navicon-shake {
    0%, 100% {
        transform: translateX(0);
    }

    15%, 55% {
        transform: translateX(-1px);
    }

    35%, 75% {
        transform: translateX(1px);
    }
}

@keyframes navicon-bell-ring {
    0%, 100% {
        transform: rotate(0deg);
    }

    15% {
        transform: rotate(12deg);
    }

    35% {
        transform: rotate(-10deg);
    }

    55% {
        transform: rotate(6deg);
    }

    75% {
        transform: rotate(-3deg);
    }
}

@keyframes navicon-clapper-ring {
    0%, 100% {
        transform: rotate(0deg);
    }

    15% {
        transform: rotate(-8deg);
    }

    35% {
        transform: rotate(14deg);
    }

    55% {
        transform: rotate(-8deg);
    }

    75% {
        transform: rotate(4deg);
    }
}

@keyframes navicon-wave-l {
    0%, 50%, 100% {
        transform: translate(0, 0);
        opacity: 1;
    }

    25%, 75% {
        transform: translate(-0.9px, -0.3px);
        opacity: 0.35;
    }
}

@keyframes navicon-wave-r {
    0%, 50%, 100% {
        transform: translate(0, 0);
        opacity: 1;
    }

    25%, 75% {
        transform: translate(0.9px, -0.3px);
        opacity: 0.35;
    }
}

@keyframes navicon-line-nudge {
    0%, 100% {
        transform: translateX(0);
    }

    45% {
        transform: translateX(0.9px);
    }
}

@keyframes navicon-card-move {
    0% {
        opacity: 0;
        transform: translateX(0);
    }

    15% {
        opacity: 1;
        transform: translateX(0);
    }

    65% {
        opacity: 1;
        transform: translateX(6px);
    }

    100% {
        opacity: 0;
        transform: translateX(6px);
    }
}

@keyframes navicon-gantt-resize {
    0%, 100% {
        transform: scaleX(1);
    }

    45% {
        transform: scaleX(var(--s));
    }
}

@keyframes navicon-horn-buzz {
    0%, 100% {
        transform: rotate(0deg);
    }

    12%, 37%, 62%, 87% {
        transform: rotate(-4deg);
    }

    25%, 50%, 75% {
        transform: rotate(4deg);
    }
}

@keyframes navicon-knob-tune {
    0%, 100% {
        transform: translateX(0);
    }

    30% {
        transform: translateX(calc(var(--d) * 0.35));
    }

    65% {
        transform: translateX(calc(var(--d) * -0.2));
    }
}

@keyframes navicon-track-l-tune {
    0%, 100% {
        transform: scaleX(1);
    }

    30% {
        transform: scaleX(var(--lt1));
    }

    65% {
        transform: scaleX(var(--lt2));
    }
}

@keyframes navicon-track-r-tune {
    0%, 100% {
        transform: scaleX(1);
    }

    30% {
        transform: scaleX(var(--rt1));
    }

    65% {
        transform: scaleX(var(--rt2));
    }
}

@keyframes navicon-push-right {
    0%, 100% {
        transform: translateX(0);
    }

    40% {
        transform: translateX(1.5px);
    }

    70% {
        transform: translateX(-0.4px);
    }
}

@keyframes navicon-push-left {
    0%, 100% {
        transform: translateX(0);
    }

    40% {
        transform: translateX(-1.5px);
    }

    70% {
        transform: translateX(0.4px);
    }
}

@keyframes navicon-band-count {
    0%, 100% {
        transform: translateY(0);
    }

    45% {
        transform: translateY(0.9px);
    }
}

@keyframes navicon-tag-swing {
    0%, 100% {
        transform: rotate(0deg);
    }

    20% {
        transform: rotate(7deg);
    }

    45% {
        transform: rotate(-5deg);
    }

    70% {
        transform: rotate(3deg);
    }

    88% {
        transform: rotate(-1deg);
    }
}

@keyframes navicon-awning-wave {
    0%, 100% {
        transform: scaleY(1);
    }

    35% {
        transform: scaleY(1.14);
    }

    70% {
        transform: scaleY(0.94);
    }
}

@keyframes navicon-wrench-turn {
    0%, 100% {
        transform: rotate(0deg);
    }

    40% {
        transform: rotate(-14deg);
    }

    70% {
        transform: rotate(3deg);
    }
}

@keyframes navicon-cog6-tick {
    0% {
        transform: rotate(0deg);
        animation-timing-function: cubic-bezier(0.3, 1.6, 0.6, 1);
    }

    30%, 45% {
        transform: rotate(30deg);
        animation-timing-function: cubic-bezier(0.3, 1.6, 0.6, 1);
    }

    75%, 100% {
        transform: rotate(60deg);
    }
}

@keyframes navicon-stamp {
    0%, 100% {
        transform: scale(1);
    }

    35% {
        transform: scale(0.88);
    }

    70% {
        transform: scale(1.06);
    }
}

@keyframes navicon-tablet-tilt {
    0%, 100% {
        transform: rotate(0deg);
    }

    35% {
        transform: rotate(-9deg);
    }

    70% {
        transform: rotate(3deg);
    }
}

@keyframes navicon-screen-nod {
    0%, 100% {
        transform: rotate(0deg);
    }

    30% {
        transform: rotate(-4deg);
    }

    65% {
        transform: rotate(2deg);
    }
}

@keyframes navicon-sheet-feed {
    0%, 100% {
        transform: translateY(0);
    }

    45% {
        transform: translateY(1.25px);
    }
}

@keyframes navicon-light-blink {
    0%, 50% {
        opacity: 1;
    }

    25%, 75% {
        opacity: 0;
    }
}

@keyframes navicon-brush-stroke {
    0%, 100% {
        transform: rotate(0deg);
    }

    35% {
        transform: rotate(7deg);
    }

    70% {
        transform: rotate(-4deg);
    }
}

@keyframes navicon-key-turn {
    0%, 100% {
        transform: rotate(0deg);
    }

    40% {
        transform: rotate(-22deg);
    }

    70% {
        transform: rotate(4deg);
    }
}

@keyframes navicon-twinkle {
    0%, 100% {
        transform: scale(1);
    }

    45% {
        transform: scale(0.6);
    }
}

@keyframes navicon-arrow-lift {
    0%, 100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-2px);
    }

    65% {
        transform: translateY(0.5px);
    }
}

@keyframes navicon-case-swing {
    0%, 100% {
        transform: rotate(0);
    }

    22% {
        transform: rotate(6deg);
    }

    50% {
        transform: rotate(-4deg);
    }

    76% {
        transform: rotate(2deg);
    }
}

@keyframes navicon-lock-jiggle {
    0%, 100% {
        transform: rotate(0);
    }

    20%, 60% {
        transform: rotate(-6deg);
    }

    40%, 80% {
        transform: rotate(6deg);
    }
}

@keyframes navicon-tray-lift {
    0%, 50%, 100% {
        transform: translateY(0);
    }

    25% {
        transform: translateY(-1.2px);
    }

    75% {
        transform: translateY(-0.6px);
    }
}

@keyframes navicon-line-write {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}
