/* Workspace composition (redesign 2026-12, the frame every board of the design canvas uses): a flush
   navy sidebar, a neutral zinc canvas, and on desktop one white content frame — 8px off the canvas,
   12px corners, a hairline and a soft shadow — that holds the command bar and the page. Metronic
   remains the palette and component foundation. */
.bz-workspace-frame {
    --bz-global-sticky-top: var(--bz-workspace-bar-height);
    --bz-top-navigation-height: var(--bz-workspace-bar-height);
    height: 100dvh;
    overflow-y: auto;
    background: var(--bz-color-canvas);
    color: var(--bz-color-fg);
}
.bz-shell-layout { min-height: 100%; }
.bz-workspace-panel { background: var(--bz-color-page); min-width: 0; }
/* The command bar is part of the frame, not a second surface: same colour, one hairline under it. */
.bz-workspace-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--bz-layout-gap);
    padding: var(--bz-space-1) var(--bz-layout-gutter);
    background: var(--bz-color-surface);
    border-bottom: 1px solid var(--bz-color-border-subtle);
    min-height: var(--bz-workspace-bar-height);
    flex: none;
}
.bz-workspace-location { flex: 1 1 10rem; min-width: 0; }
.bz-workspace-location .bz-shell-title { display: none; }
.bz-workspace-bar > .bz-mobile-header, .bz-mobile-breadcrumb { display: none; }
.bz-workspace-tools { display: flex; align-items: center; gap: var(--bz-space-2); flex-wrap: wrap; max-width: 100%; }
/* The canvas's quiet field and default button: 32px, 8px corners, hairline, no tint. */
.bz-workspace-search, .bz-workspace-assistant {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--bz-space-2);
    min-height: var(--bz-control-height);
    padding: 0 10px;
    border: 1px solid var(--bz-color-border);
    border-radius: var(--bz-radius-md);
    background: var(--bz-color-surface);
    color: var(--bz-color-fg-muted);
    font-size: var(--bz-fs-sm);
    font-weight: var(--bz-fw-medium);
    cursor: pointer;
    transition: background var(--bz-duration-fast) var(--bz-ease), border-color var(--bz-duration-fast) var(--bz-ease), color var(--bz-duration-fast) var(--bz-ease);
}
.bz-workspace-search { justify-content: flex-start; min-width: 200px; font-weight: var(--bz-fw-regular); }
.bz-workspace-search > span { flex: 1; text-align: start; }
.bz-workspace-search:hover, .bz-workspace-assistant:hover { background: color-mix(in srgb, var(--bz-color-fg) 6%, var(--bz-color-surface)); border-color: var(--bz-color-border-strong); color: var(--bz-color-fg); }
.bz-workspace-search kbd { font: inherit; font-size: 11px; font-weight: var(--bz-fw-semibold); line-height: 1.4; padding: 0 5px; color: var(--bz-color-fg-secondary); background: var(--bz-color-wash); border: 1px solid var(--bz-color-border); border-radius: 4px; }
.bz-workspace-assistant { color: var(--bz-color-fg); }
.bz-workspace-assistant > i { color: var(--bz-color-accent-text); }
.bz-shell-content { padding-top: var(--bz-layout-gutter); }
.bz-shell-main { background: transparent; }
/* The footer is chrome: one quiet line, not a 60px band. */
.bz-workspace-panel .footer { opacity: .8; font-size: var(--bz-fs-xs); }
.bz-workspace-panel .footer .kt-container-fluid > div { padding-block: var(--bz-space-3); }

/* Navigation: one flat navy column (both themes) with quiet blue-grey labels, a raised translucent
   step under the current page and the BIZS cyan on its icon. Colours come from the sidebar's own
   `.dark`-scoped tokens (tokens.css), never from the page's --bz-* colours. */
#sidebar {
    background-color: var(--background);
    background-image: none;
    /* Transparent, not removed: the width toggle is centred on this edge (CompactErpLayoutSmokeTests). */
    border: 1px solid transparent;
}
#sidebar_header { padding-block: var(--bz-space-3) var(--bz-space-2); }
.bz-sidebar-brand { min-height: 44px; }
.bz-sidebar-brand > .kt-menu { min-width: 0; }
.bz-sidebar-controls { display: none; }
#sidebar_menu { margin-block: var(--bz-space-2); }
/* Section headings ("Pages", "Favorites" …): small, sentence case, muted. */
#sidebar_menu h3 { text-transform: none; font-size: var(--bz-fs-xs); font-weight: var(--bz-fw-medium); letter-spacing: 0; color: var(--muted-foreground); }
#sidebar :is(.kt-menu-link, .bz-nav-leaf) { border-radius: var(--bz-radius-md); transition: background var(--bz-duration-fast) var(--bz-ease), color var(--bz-duration-fast) var(--bz-ease); }
/* One step larger than a grid row (owner request, December 2026): 14px labels, 18px icons, 34px rows. */
#sidebar .kt-menu-link { min-height: 34px; padding-block: 6px; padding-inline: var(--bz-space-2); gap: 10px; }
#sidebar .kt-menu-title { font-size: var(--bz-fs-md); font-weight: var(--bz-fw-medium); color: var(--secondary-foreground); }
#sidebar .kt-menu-icon { font-size: 18px; color: var(--muted-foreground); }
#sidebar :is(.kt-menu-link, .bz-nav-leaf):hover { background-color: color-mix(in srgb, var(--foreground) 6%, transparent); }
#sidebar :is(.kt-menu-link.active, .bz-nav-leaf.active) {
    background: var(--bz-nav-current-bg);
    box-shadow: none;
}
#sidebar .kt-menu-link.active .kt-menu-title { color: var(--foreground); font-weight: var(--bz-fw-semibold); }
#sidebar .kt-menu-link.active .kt-menu-icon { color: var(--bz-nav-current-icon); }
/* A module or group that holds the current page: label in full foreground, icon in the cyan, no fill. */
#sidebar .kt-menu-item.here > .kt-menu-label { background: transparent; }
#sidebar .kt-menu-item.here > .kt-menu-label .kt-menu-title { color: var(--foreground); font-weight: var(--bz-fw-semibold); }
#sidebar .kt-menu-item.here > .kt-menu-label .kt-menu-icon { color: var(--bz-nav-current-icon); }
#sidebar .kt-menu-label + .kt-menu-accordion { padding-block-start: 2px; }
/* A module's pages hang off a thin guide line, as on the canvas. */
#sidebar_primary_menu .kt-menu-item > .kt-menu-accordion:not(.bz-nav-flyout) { margin-inline-start: 15px; padding-inline-start: var(--bz-space-2); border-inline-start: 1px solid var(--border); }
/* Paint the whole leaf, including its separate favorite action, without a second pill on the link. */
#sidebar .bz-nav-leaf > .kt-menu-link { background: transparent; box-shadow: none; }
#sidebar_footer { padding-top: var(--bz-space-2); border-top: 1px solid var(--border); margin-inline: var(--bz-space-3); padding-inline: var(--bz-space-1); }
/* Section headings over the module groups (canvas "Shell-Sidebar"): 12px, muted, sentence case, with a fold chevron
   that points up while the section is open. Folded items carry data-bz-folded (NavMenu.razor.js). */
#sidebar_primary_menu > .bz-nav-section { margin: var(--bz-space-2) 0 0; }
.bz-nav-section-toggle { display: flex; align-items: center; gap: 6px; width: 100%; padding: 3px var(--bz-space-2); border: 0; border-radius: var(--bz-radius-sm); background: transparent; font: inherit; color: inherit; text-align: start; cursor: pointer; transition: color var(--bz-duration-fast) var(--bz-ease), background var(--bz-duration-fast) var(--bz-ease); }
.bz-nav-section-toggle > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bz-nav-section-toggle > i { flex: none; font-size: var(--bz-fs-xs); transition: transform var(--bz-duration-fast) var(--bz-ease); }
.bz-nav-section-toggle[aria-expanded="true"] > i { transform: rotate(180deg); }
.bz-nav-section-toggle:hover { color: var(--foreground); background-color: color-mix(in srgb, var(--foreground) 6%, transparent); }
.bz-nav-section-toggle:focus-visible { outline: 2px solid color-mix(in srgb, var(--foreground) 70%, transparent); outline-offset: -2px; color: var(--foreground); }
#sidebar_primary_menu > [data-bz-folded] { display: none; }
/* The running timer in the sidebar foot (RunningTimerIndicator, desktop instance): a full-width row above the account
   row, on the sidebar's own (.dark-scoped) tokens. In the rail it is one icon button carrying the running state. */
#sidebar_footer { flex-wrap: wrap; row-gap: var(--bz-space-2); }
.bz-sidebar-timer { flex: 1 0 100%; display: flex; align-items: center; gap: var(--bz-space-1); min-width: 0; }
.bz-sidebar-timer:not(:has(button)) { display: none; }
/* #sidebar_footer outranks the component's scoped header-chip rules (RunningTimerIndicator.razor.css). */
#sidebar_footer .bz-timer-chip { flex: 1; min-width: 0; max-width: none; min-height: 34px; padding: 0 10px; gap: var(--bz-space-2); border: 1px solid var(--border); border-radius: var(--bz-radius-md); background: color-mix(in srgb, var(--foreground) 7%, transparent); color: var(--foreground); font-size: 13px; font-weight: var(--bz-fw-medium); text-align: start; }
#sidebar_footer .bz-timer-chip:hover { border-color: color-mix(in srgb, var(--foreground) 30%, transparent); background: color-mix(in srgb, var(--foreground) 12%, transparent); }
#sidebar_footer :is(.bz-timer-chip, .bz-timer-action):focus-visible { outline: 2px solid color-mix(in srgb, var(--foreground) 70%, transparent); outline-offset: 1px; }
#sidebar_footer .bz-timer-chip > i { flex: none; font-size: 15px; color: var(--muted-foreground); }
#sidebar_footer :is(.bz-timer-chip-label, .bz-timer-chip-text) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#sidebar_footer .bz-timer-chip-label { color: var(--muted-foreground); font-weight: var(--bz-fw-regular); }
#sidebar_footer .bz-timer-chip-idle { display: inline; flex: none; color: var(--muted-foreground); font-size: var(--bz-fs-xs); font-weight: var(--bz-fw-regular); font-variant-numeric: tabular-nums; }
#sidebar_footer .bz-timer-action { flex: none; width: 34px; height: 34px; border: 1px solid var(--border); background: transparent; color: var(--foreground); }
#sidebar_footer .bz-timer-action:hover { background: color-mix(in srgb, var(--foreground) 12%, transparent); }

/* Content surfaces inside the frame are bordered, not lifted: the frame is the only elevated plane. */
.bz-page-card, .bz-dash-section, .bz-dash-kpi, .bz-dash-nav-card, .bz-card {
    box-shadow: none;
    border-color: var(--bz-color-border);
}
.bz-page-card-head, .bz-dash-section-head { background: var(--bz-color-wash); }
.bz-dash-section-head { gap: var(--bz-space-3); flex-wrap: wrap; }
.bz-dash-section-title { font-size: var(--bz-fs-md); letter-spacing: var(--bz-tracking-tight); }
.bz-dash-kpi { position: relative; overflow: hidden; gap: 2px; }
.bz-dash-kpi-value { font-size: var(--bz-fs-kpi); font-weight: var(--bz-fw-semibold); letter-spacing: var(--bz-tracking-tight); font-variant-numeric: tabular-nums; }
.bz-dash-kpi-label { text-transform: none; letter-spacing: 0; font-size: var(--bz-fs-sm); }
.bz-dash-kpi-icon { border-radius: var(--bz-radius-md); }
.bz-dash-nav-card:hover { text-decoration: none; }
.bz-toolbar, .bz-filter-bar { gap: var(--bz-layout-gap); }

/* Contextual navigation and operational dashboards share the same surfaces on every page. */
.bz-module-menu { position: relative; flex: none; }
.bz-module-menu > summary { display: inline-flex; align-items: center; gap: var(--bz-space-2); min-height: var(--bz-control-height); padding: 0 10px; border: 1px solid var(--bz-color-border); border-radius: var(--bz-radius-md); background: var(--bz-color-surface); color: var(--bz-color-fg); font-size: var(--bz-fs-sm); font-weight: var(--bz-fw-medium); cursor: pointer; list-style: none; }
.bz-module-menu > summary:hover { background: color-mix(in srgb, var(--bz-color-fg) 6%, var(--bz-color-surface)); border-color: var(--bz-color-border-strong); }
.bz-module-menu > summary::-webkit-details-marker { display: none; }
.bz-module-menu[open] > summary { border-color: var(--bz-color-accent-text); color: var(--bz-color-accent-text); }
.bz-module-menu-panel { position: absolute; inset-inline-end: 0; top: calc(100% + var(--bz-space-2)); z-index: 50; width: min(360px, calc(100vw - 24px)); max-height: 65dvh; display: flex; flex-direction: column; padding: var(--bz-space-3); border: 1px solid var(--bz-color-border); border-radius: var(--bz-radius-lg); background: var(--bz-color-popover); box-shadow: var(--bz-shadow-lg); }
.bz-module-menu-panel > .bz-search-input { flex: none; }
.bz-module-menu-panel[popover]:not(:popover-open) { display: none; }
.bz-module-menu-links { overflow: auto; min-height: 0; margin-top: var(--bz-space-2); overscroll-behavior: contain; }
.bz-module-menu-links a { display: flex; align-items: center; gap: var(--bz-space-2); min-height: var(--bz-control-height); padding: var(--bz-space-1) 10px; border-radius: var(--bz-radius-md); color: var(--bz-color-fg); font-size: var(--bz-fs-sm); text-decoration: none; }
.bz-module-menu-links a:hover { background: color-mix(in srgb, var(--bz-color-fg) 6%, transparent); text-decoration: none; }
.bz-module-menu-links a[aria-current="page"] { font-weight: var(--bz-fw-semibold); color: var(--bz-color-accent-text); }
.bz-module-menu-links a > i { flex: none; color: var(--bz-color-accent-text); }
.bz-module-workspace-body { padding: var(--bz-space-4) var(--bz-space-5); }
.bz-module-workspace-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: var(--bz-space-3); }
.bz-module-workspace-links a { display: flex; align-items: center; gap: var(--bz-space-3); padding: var(--bz-space-3); border: 1px solid var(--bz-color-border); border-radius: var(--bz-radius-md); background: var(--bz-color-wash); color: var(--bz-color-fg); text-decoration: none; min-width: 0; }
.bz-module-workspace-links a > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.bz-module-workspace-links a > i { color: var(--bz-color-accent-text); flex: none; }
.bz-module-workspace-links a:hover { border-color: var(--bz-color-accent); background: var(--bz-color-surface-2); }
.bz-module-workspace-group { margin-top: var(--bz-space-4); border-top: 1px solid var(--bz-color-border); padding-top: var(--bz-space-2); }
.bz-module-workspace-group > summary { padding-block: var(--bz-space-2); cursor: pointer; color: var(--bz-color-fg-muted); font-weight: var(--bz-fw-medium); }
.bz-module-workspace-group[open] > summary { margin-bottom: var(--bz-space-2); }
.bz-breakdown-body { padding: var(--bz-space-4) var(--bz-space-5); }
.bz-breakdown-track { display: flex; overflow: hidden; gap: 3px; border-radius: var(--bz-radius-pill); height: 14px; margin-block: var(--bz-space-3) var(--bz-space-4); background: var(--bz-color-surface-2); }
.bz-breakdown-track > span, .bz-breakdown-dot { background: currentColor; }
.bz-breakdown-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: var(--bz-space-2); }
.bz-breakdown-item { display: flex; align-items: center; gap: var(--bz-space-2); padding: var(--bz-space-3); min-width: 0; border: 1px solid var(--bz-color-border); border-radius: var(--bz-radius-md); color: var(--bz-color-fg); text-decoration: none; }
.bz-breakdown-item > span:nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.bz-breakdown-item:hover { background: var(--bz-color-wash); border-color: var(--bz-color-accent); }
.bz-breakdown-dot { width: 8px; height: 8px; border-radius: var(--bz-radius-pill); flex: none; }
a:is(.bz-dash-kpi, .bz-card) { position: relative; text-decoration: none; color: var(--bz-color-fg); }
/* The link arrow is for plain cards only: a KPI card carries its icon in that same corner and the arrow
   sat on top of it (home Active users / MFA-secured / Locations / Open / Overdue). */
a.bz-card::before { content: '\e98d' / ''; font-family: 'keenicons-filled' !important; line-height: 1; position: absolute; inset-inline-end: var(--bz-space-4); top: var(--bz-space-4); color: var(--bz-color-fg-subtle); font-size: var(--bz-fs-lg); }
a:is(.bz-dash-kpi, .bz-card):hover { border-color: color-mix(in srgb, var(--bz-color-accent) 45%, var(--bz-color-border)); }
.bz-dash-skeleton > span { height: 14px; border-radius: var(--bz-radius-sm); background: var(--bz-color-surface-2); }
.bz-dash-skeleton > span:first-child { width: 42px; height: 42px; }
.bz-dash-skeleton > span:nth-child(2) { width: 45%; height: 32px; margin-block: var(--bz-space-3); }
.bz-dash-skeleton > span:last-child { width: 70%; }
.bz-dash-table-scroll { overflow: auto; max-width: 100%; overscroll-behavior-inline: contain; }
.bz-dash-table-scroll .bz-dash-table { min-width: 540px; }
.bz-dash-table td { overflow-wrap: anywhere; }
.bz-dash-table tbody tr:focus-within td { background: var(--bz-color-wash); }
.bz-dashboard .bz-dash-kpis { grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); }
/* A list's search, filters and actions are one open row above the list (the canvas's filter row), not a
   boxed card of their own: the content frame already draws the edge. */
.bz-toolbar:not(.bz-grid-toolbar), .bz-filter-bar { padding: var(--bz-space-2) 0; border: 0; border-radius: 0; background: transparent; margin-bottom: var(--bz-layout-gap); }
.bz-page-card > .bz-filter-bar { border: 0; border-bottom: 1px solid var(--bz-color-border-subtle); border-radius: 0; }
@media (pointer: coarse) {
    .bz-module-menu > summary, .bz-module-menu-links a, .bz-module-workspace-group > summary { min-height: 44px; }
    .bz-dash-table td a { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (max-width: 640px) {
    .bz-module-menu > summary { min-width: 44px; justify-content: center; padding-inline: var(--bz-space-2); }
    .bz-module-menu > summary > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .bz-module-menu > summary > i:last-child { display: none; }
    .bz-dashboard .bz-dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bz-dashboard .bz-dash-kpis > .bz-dash-kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .bz-module-workspace-body, .bz-breakdown-body { padding: var(--bz-space-3); }
    a.bz-card::before { inset-inline-end: var(--bz-space-2); top: var(--bz-space-2); }
}

/* Motion lives on interactive surfaces and entrances, leaving data updates and typing stable. */
.bz-workspace-tools button, .bz-dash-kpi, .bz-bottom-nav-item, .home-create-btn { transition: transform var(--bz-duration-base) var(--bz-ease), box-shadow var(--bz-duration-base) var(--bz-ease), background var(--bz-duration-base) var(--bz-ease), border-color var(--bz-duration-fast) var(--bz-ease), color var(--bz-duration-fast) var(--bz-ease); }
.bz-workspace-tools button:active:not(:disabled) { transform: scale(.97); }
.dxbl-modal .dxbl-modal-content { animation: bz-workspace-dialog var(--bz-duration-slow) var(--bz-ease-drawer); }
@keyframes bz-workspace-dialog { from { opacity: .4; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes bz-sidebar-label-in { from { opacity: 0; } to { opacity: 1; } }
/* KPI tiles no longer lift on hover (redesign 2026-12): they are read, not pressed; a linked tile
   answers with its border (a:is(.bz-dash-kpi, .bz-card):hover above). */

@media (min-width: 1024px) {
    /* The sidebar runs flush and full height; the content frame floats 8px off the canvas beside it. */
    .bz-workspace-frame { --sidebar-width: var(--bz-nav-width); }
    .bz-shell-layout { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); align-items: start; gap: 0; padding: 0; }
    .bz-workspace-frame[data-sidebar-collapsed="true"] { --sidebar-width: var(--bz-nav-rail-width); }
    .bz-workspace-frame #sidebar { position: sticky; top: 0; bottom: auto; inset-inline-start: auto; width: var(--sidebar-width); height: 100dvh; min-height: 0; border-radius: 0; }
    .bz-workspace-panel {
        --bz-color-page: var(--bz-color-surface);
        margin: var(--bz-layout-gap);
        min-height: calc(100dvh - 2 * var(--bz-layout-gap));
        border-radius: var(--bz-radius-lg);
        /* The hairline is a ring, not a border, so --bz-workspace-height (100dvh − 2 gaps − gutter) stays exact. */
        box-shadow: 0 0 0 1px var(--bz-color-border), var(--bz-shadow-sm);
        overflow: clip;
    }
    .bz-workspace-bar { position: sticky; top: 0; z-index: 7; border-radius: var(--bz-radius-lg) var(--bz-radius-lg) 0 0; }
    .bz-workspace-frame[data-top-pinned="false"] .bz-workspace-bar { position: static; }
    #sidebar_menu { min-height: 0; flex: 1 1 auto; }
    #sidebar_menu > [data-kt-scrollable] { min-height: 0; max-height: 100%; }
    #sidebar_primary_menu { gap: var(--bz-space-1); padding-inline: var(--bz-space-2); }
    #sidebar_primary_menu > .kt-menu-item > .kt-menu-label > .kt-menu-link,
    #sidebar_primary_menu > .kt-menu-item > .kt-menu-link { padding-block: var(--bz-space-1); }
    /* The width toggle is centred on the sidebar's outer edge (half outside), level with the logo, in both
       widths; it is out of the logo row's flow, so the logo never moves. Right: -1px puts its centre on the
       1px border. */
    .bz-sidebar-brand { position: relative; }
    .bz-sidebar-controls { display: flex; position: absolute; z-index: 3; top: 50%; inset-inline-end: -1px; translate: 50% -50%; }
    /* #633: the sidebar stays dark in both app themes, so the toggle uses the sidebar's own (.dark-scoped)
       tokens, never the page's. Half of it lies over the page, so it is a small opaque disc in the sidebar's
       surface with a thin border; ::after widens the 28px disc to a 32px hit target (44px on touch). */
    .bz-sidebar-collapse { position: relative; display: inline-flex; justify-content: center; align-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid color-mix(in srgb, var(--foreground) 18%, var(--background)); border-radius: 50%; background: var(--background); color: color-mix(in srgb, var(--foreground) 80%, var(--background)); box-shadow: 0 1px 3px rgb(0 0 0 / .3); cursor: pointer; transition: background var(--bz-duration-fast) var(--bz-ease), color var(--bz-duration-fast) var(--bz-ease), border-color var(--bz-duration-fast) var(--bz-ease); }
    .bz-sidebar-collapse::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; }
    .bz-sidebar-collapse:hover { background: color-mix(in srgb, var(--foreground) 12%, var(--background)); border-color: color-mix(in srgb, var(--foreground) 30%, var(--background)); color: var(--foreground); }
    .bz-sidebar-collapse:active { background: color-mix(in srgb, var(--foreground) 18%, var(--background)); color: var(--foreground); }
    /* The sidebar's --ring (zinc-600) is under 3:1 on its zinc-950 surface; its own foreground is not. */
    .bz-sidebar-collapse:focus-visible { outline: 2px solid color-mix(in srgb, var(--foreground) 70%, transparent); outline-offset: 1px; color: var(--foreground); }
    .bz-sidebar-collapse-icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
    .bz-sidebar-collapse-icon[data-icon="panel-left-open"],
    [data-sidebar-collapsed="true"] .bz-sidebar-collapse-icon[data-icon="panel-left-close"] { display: none; }
    [data-sidebar-collapsed="true"] .bz-sidebar-collapse-icon[data-icon="panel-left-open"] { display: block; }
    /* Width change on a user toggle only (MainLayout.razor.js sets data-sidebar-animating, never on load):
       the rail's width moves while the content panel slides by transform (MainLayout.razor.js, so the page is not
       laid out on every frame); what would overflow clips while the width moves (never
       the logo row itself, which holds the half-outside toggle), and the labels fade in on expand. */
    /* An even ease-in-out for a width change: the drawer curve finished in a few frames and read as a jump. */
    .bz-workspace-frame { --bz-sidebar-ease: cubic-bezier(0.4, 0, 0.2, 1); }
    .bz-workspace-frame[data-sidebar-animating] #sidebar { transition: width var(--bz-duration-slow) var(--bz-sidebar-ease); }
    /* The sliding panel briefly reaches past the right edge; no scrollbar flashes for it. clip, not hidden:
       hidden would make the frame a scroll container and un-stick sticky headers for the length of the move. */
    .bz-workspace-frame[data-sidebar-animating] { overflow-x: clip; }
    .bz-workspace-frame[data-sidebar-animating] :is(.bz-sidebar-brand > .kt-menu, #sidebar_header > :not(.bz-sidebar-brand), #sidebar_menu, #sidebar_footer) { min-width: 0; overflow-x: clip; }
    .bz-workspace-frame[data-sidebar-animating][data-sidebar-collapsed="false"] #sidebar :is(.kt-menu-title, .bz-sidebar-brand > .kt-menu, #sidebar_menu h3, #sidebar_footer > .flex, .nav-fav, .bz-nav-chevron) { animation: bz-sidebar-label-in var(--bz-duration-slow) var(--bz-ease) both; }
    [data-sidebar-collapsed="true"] .bz-sidebar-brand { padding-inline: 0; justify-content: center; }
    [data-sidebar-collapsed="true"] .bz-sidebar-brand > .kt-menu { display: none; }
    /* The search field and the Create control stack as two squares in the rail. */
    [data-sidebar-collapsed="true"] #sidebar_header > .bz-sidebar-actions { padding-inline: var(--bz-space-1); flex-direction: column; gap: var(--bz-space-1); }
    [data-sidebar-collapsed="true"] #sidebar_primary_menu { padding-inline: var(--bz-space-1); }
    [data-sidebar-collapsed="true"] #sidebar_menu h3 { display: none; }
    [data-sidebar-collapsed="true"] #sidebar_primary_menu > .kt-menu-item > :is(.kt-menu-link, .kt-menu-label) .kt-menu-title,
    [data-sidebar-collapsed="true"] #sidebar_primary_menu > .kt-menu-item > .nav-fav,
    [data-sidebar-collapsed="true"] #sidebar_primary_menu > .kt-menu-item > .kt-menu-label > .bz-nav-chevron { display: none; }
    [data-sidebar-collapsed="true"] #sidebar_primary_menu > .kt-menu-item > .kt-menu-link,
    [data-sidebar-collapsed="true"] #sidebar_primary_menu > .kt-menu-item > .kt-menu-label > .kt-menu-link { justify-content: center; padding-inline: 0; gap: 0; min-width: 0; }
    [data-sidebar-collapsed="true"] #sidebar_footer { padding-inline: var(--bz-space-2); margin-inline: 0; justify-content: center; }
    [data-sidebar-collapsed="true"] #sidebar_footer > .flex { display: none; }
    /* The rail lists every module whatever is folded; a section heading becomes a thin divider (the h3 itself is
       hidden with the other sidebar headings above). */
    [data-sidebar-collapsed="true"] #sidebar_primary_menu > [data-bz-folded] { display: flex; }
    [data-sidebar-collapsed="true"] #sidebar_primary_menu > .bz-nav-section + [data-bz-section]::before { content: ""; align-self: center; width: 24px; height: 1px; margin-block: 6px; background: var(--border); }
    /* The timer is one icon button in the rail; a running or paused timer marks its corner, the time is in its name. */
    [data-sidebar-collapsed="true"] .bz-sidebar-timer { justify-content: center; }
    [data-sidebar-collapsed="true"] #sidebar_footer .bz-timer-chip { position: relative; flex: none; width: 40px; height: 36px; min-height: 36px; padding: 0; justify-content: center; border-color: transparent; background: transparent; }
    [data-sidebar-collapsed="true"] #sidebar_footer .bz-timer-chip:hover { background: color-mix(in srgb, var(--foreground) 6%, transparent); }
    [data-sidebar-collapsed="true"] #sidebar_footer :is(.bz-timer-chip-time, .bz-timer-chip-label, .bz-timer-chip-text, .bz-timer-chip-idle, .bz-timer-action) { display: none; }
    [data-sidebar-collapsed="true"] #sidebar_footer .bz-timer-chip > i { display: inline-block; font-size: 18px; color: var(--secondary-foreground); }
    [data-sidebar-collapsed="true"] #sidebar_footer .bz-timer-chip > :is(.bz-timer-chip-dot, .bz-timer-state-icon) { position: absolute; top: 5px; inset-inline-end: 6px; width: 8px; height: 8px; }
    .bz-nav-flyout:not(:popover-open) { display: none; }
    /* Floating navigation uses sidebar-scoped colours; page aliases resolve on :root. */
    .bz-nav-flyout:popover-open { display: flex; flex-direction: column; position: fixed; inset: auto; margin: 0; padding: var(--bz-space-2); overflow: auto; overscroll-behavior: contain; border: 1px solid var(--border); border-radius: var(--bz-radius-lg); background: var(--popover); color: var(--foreground); box-shadow: var(--bz-shadow-lg); }
    #sidebar .bz-nav-flyout:popover-open .kt-menu-title { white-space: normal; overflow-wrap: anywhere; }
    .bz-nav-flyout::backdrop { background: transparent; }
    /* A collapsed rail's flyout eases out of the rail; closing (display: none above) stays instant. */
    .bz-nav-flyout:popover-open { transition: opacity var(--bz-duration-base) var(--bz-ease-out), translate var(--bz-duration-base) var(--bz-ease-out); }
    @starting-style { .bz-nav-flyout:popover-open { opacity: 0; translate: -4px 0; } }
    #sidebar :is(.bz-nav-search, .bz-nav-results)[popover]:popover-open { position: fixed; inset: auto; margin: 0; width: min(360px, calc(100vw - 96px)); max-height: 65dvh; overflow: auto; padding: var(--bz-space-2); border: 1px solid var(--border); border-radius: var(--bz-radius-lg); background: var(--popover); color: var(--foreground); box-shadow: var(--bz-shadow-lg); }
}
@media (min-width: 1024px) and (max-width: 1399px) {
    .bz-workspace-search span, .bz-workspace-assistant span { display: none; }
    .bz-workspace-search { min-width: 0; }
}
@media (min-width: 1024px) and (max-height: 599.98px) {
    .bz-workspace-frame .bz-workspace-bar { position: static; }
}
@media (max-width: 1023.98px) {
    .bz-workspace-frame {
        --bz-workspace-bar-height: 0px;
        --bz-workspace-height: calc(100dvh - var(--header-height) - var(--bz-space-4) - var(--bz-mobile-nav-h) - var(--bz-space-6) - env(safe-area-inset-bottom, 0px));
    }
    .bz-workspace-bar {
        position: fixed;
        inset-block-start: 0;
        inset-inline: 0;
        z-index: 10;
        height: var(--header-height);
        min-height: var(--header-height);
        flex-wrap: nowrap;
        gap: var(--bz-space-2);
        padding: var(--bz-space-2) var(--bz-space-3);
        background: linear-gradient(110deg, var(--bz-color-hero), var(--bz-color-hero-end));
        box-shadow: var(--bz-shadow-md);
    }
    .bz-workspace-bar > .bz-mobile-header { display: flex; align-items: center; gap: var(--bz-space-2); flex: 1; min-width: 0; }
    .bz-mobile-header .bz-mobile-nav-toggle { flex: none; margin-inline-start: 0; }
    .bz-mobile-header .brand { min-width: 0; min-height: 44px; overflow: hidden; }
    .bz-mobile-header .brand strong { max-width: 100%; }
    .bz-mobile-header .brand-logo { max-width: 48px; object-fit: contain; flex: none; }
    .bz-workspace-location { display: none; }
    .bz-workspace-tools { flex: none; flex-wrap: nowrap; gap: var(--bz-space-1); }
    .bz-workspace-bar .bz-workspace-tools :is(.bz-timer-chip, .bz-timer-action) {
        color: var(--bz-color-accent-fg);
        background: color-mix(in srgb, var(--bz-color-accent-fg) 12%, transparent);
        border-color: color-mix(in srgb, var(--bz-color-accent-fg) 22%, transparent);
    }
    .bz-workspace-bar .bz-workspace-tools .bz-bell-trigger { color: var(--bz-color-accent-fg); width: 44px; height: 44px; }
    .bz-workspace-bar .bz-workspace-tools .bz-timer-action :is(i, svg) { color: inherit; }
    .bz-workspace-bar .bz-workspace-tools :is(.bz-bell-trigger, .bz-timer-chip, .bz-timer-action):hover { background: color-mix(in srgb, var(--bz-color-accent-fg) 20%, transparent); }
    .bz-workspace-bar :is(button, summary, .brand):focus-visible { outline: 2px solid var(--bz-color-accent-fg); outline-offset: -2px; }
    .bz-mobile-breadcrumb { display: block; padding: var(--bz-space-2) clamp(var(--bz-space-3), 2vw, var(--bz-space-6)); border-bottom: 1px solid var(--bz-color-border); background: var(--bz-color-surface); }
    .bz-workspace-search, .bz-workspace-assistant { display: none; }
    .bz-workspace-bar .bz-workspace-tools .bz-layout-pin { display: none; }
    .bz-shell-content { padding-top: var(--bz-space-4); }
    .bz-bottom-nav { inset-inline: var(--bz-space-2); bottom: max(var(--bz-space-2), env(safe-area-inset-bottom, 0px)); border: 1px solid var(--bz-color-border); border-radius: var(--bz-radius-xl); padding: var(--bz-space-1); box-shadow: var(--bz-shadow-lg); }
    .bz-bottom-nav-item { border-radius: var(--bz-radius-lg); }
    .bz-bottom-nav-item.is-active { color: var(--bz-color-accent-text); background: color-mix(in srgb, var(--bz-color-accent) 12%, var(--bz-color-surface)); }
    #scrollable_content { padding-bottom: calc(var(--bz-mobile-nav-h) + var(--bz-space-5) + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 380px) {
    .bz-workspace-bar:has([data-testid="shell-timer-resume"]) .brand { display: none; }
}
@media (pointer: coarse) {
    .bz-workspace-tools button { min-height: 44px; }
    .bz-sidebar-collapse::after { inset: -9px; }
    #sidebar .kt-menu-link, #sidebar .bz-nav-chevron, #sidebar .nav-fav, #sidebar .bz-nav-section-toggle { min-height: 44px; }
    #sidebar .bz-nav-chevron, #sidebar .nav-fav { min-width: 44px; }
}
@media (prefers-reduced-motion: reduce) {
    /* No lift or scale; the dialog still fades in (bz-fade-in, shell.css) instead of snapping. */
    .dxbl-modal .dxbl-modal-content { animation-name: bz-fade-in; }
    .bz-nav-flyout:popover-open { transition-property: opacity; }
    .bz-workspace-tools button, .bz-dash-kpi, .bz-bottom-nav-item, .home-create-btn, .bz-dash-nav-card { transition: none; }
    .bz-workspace-tools button:active, .bz-dash-kpi:hover, .bz-dash-nav-card:hover { transform: none; }
}

/* The count, its context and destination stay together. */
.bz-dashboard-attention { display: flex; align-items: center; gap: var(--bz-space-3); padding: var(--bz-space-4) var(--bz-space-5); color: var(--bz-color-fg); text-decoration: none; }
.bz-dashboard-attention > span:nth-child(2) { flex: 1; min-width: 0; }
.bz-dashboard-attention:hover { border-color: var(--bz-color-accent); background: var(--bz-color-wash); }
.bz-dash-note { padding: var(--bz-space-4) var(--bz-space-5); color: var(--bz-color-fg-muted); }
.bz-dashboard .bz-card, .bz-dashboard .bz-dash-kpi { position: relative; }
.bz-summary-cards > a.bz-card { position: relative; color: var(--bz-color-fg); text-decoration: none; }
.bz-summary-cards > a.bz-card:hover { border-color: var(--bz-color-accent); }
.bz-dash-table-scroll:focus-visible { outline: 2px solid var(--bz-color-accent); outline-offset: -2px; }

/* Screen gutters and navigation space must not consume a physical print sheet. */
@media print {
    .bz-mobile-breadcrumb { display: none; }
    #scrollable_content, .bz-shell-layout, .bz-shell-main > .bz-shell-content { padding: 0; }
    .bz-shell-layout { display: block; min-height: 0; }
    .bz-workspace-panel { min-height: 0; overflow: visible; }
}
