/* ============================================================
   SIDE NAV
   ============================================================
   Promoted from Bootstrapper/Layout/SideMenu.razor.css and shared by
   every shell. This file previously existed as three byte-identical
   1268-line copies (HR, POS, Admin) plus the portal's evolved 1466-line
   version. HR's was unreachable and has been deleted; POS and Admin
   were carrying a fork that never received any of the portal's fixes,
   including the parent/child selection model.

   The portal version is a strict superset of the other copies (zero
   selectors present there and missing here), so promoting it loses
   nothing and gives every shell the same behaviour.

   Load AFTER cockpit.css. As scoped CSS these rules carried a
   [b-xxxxx] attribute and outranked the shared layer; as a plain
   stylesheet they rely on source order instead.
   ============================================================ */

/* ── Root panel ──────────────────────────────────────────────────── */
.side-nav {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    padding: 15px 20px;
    overflow: hidden;
    transition: background-color 0.2s ease;
}

.side-nav--light {
    background-color: #ffffff;
}

.side-nav--dark {
    background-color: #1e293b;
}

/* ── Icon-only state (collapsed + not hovering) ──────────────────── */
.side-nav--icon-only {
    padding: 15px 8px;
}

/* ── Hover overlay: floats over content, does not push layout ────── */
.side-nav--hovering {
    position: absolute;
    top: 0;
    width: 250px;
    padding: 15px 20px;
    overflow: hidden;
    border-radius: 16px;
    z-index: 500;
}

.side-nav--hovering:not(.side-nav--rtl) {
    left: 0;
}

.side-nav--hovering.side-nav--rtl {
    right: 0;
}

.side-nav--light.side-nav--hovering {
    box-shadow: 0 8px 40px rgba(21, 101, 192, 0.18);
}

.side-nav--dark.side-nav--hovering {
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

/* ── Header ─────────────────────────────────────────────────────── */
.side-nav__header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 8px 4px 16px;
    flex-shrink: 0;
}

.side-nav--icon-only .side-nav__header {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 0 16px;
}

.side-nav__logo {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.side-nav__logo-image {
    display: block;
    height: auto;
    object-fit: contain;
}

.side-nav__logo-image--full {
    width: 100%;
    max-height: 52px;
}

.side-nav__logo-image--icon {
    width: 56px;
    height: 56px;
}

.side-nav__logo--icon {
    justify-content: center;
    opacity: 0.85;
}

.side-nav__toggle-wrap {
    flex-shrink: 0;
    opacity: 0.5;
    transition: opacity 0.15s ease;
}

.side-nav__toggle-wrap:hover {
    opacity: 1;
}

.side-nav--icon-only .side-nav__toggle-wrap {
    opacity: 0.85;
}

/* ── Nav content scroll area ────────────────────────────────────── */
.side-nav__content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
}

.side-nav--light .side-nav__content {
    scrollbar-color: rgba(21, 101, 192, 0.15) transparent;
}

.side-nav--dark .side-nav__content {
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.side-nav__content::-webkit-scrollbar {
    width: 4px;
}

.side-nav__content::-webkit-scrollbar-track {
    background: transparent;
}

.side-nav--light .side-nav__content::-webkit-scrollbar-thumb {
    background: rgba(21, 101, 192, 0.15);
    border-radius: 2px;
}

.side-nav--dark .side-nav__content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

/* ── Search field ───────────────────────────────────────────────── */
.side-nav__search {
    padding: 0 4px 14px;
}

.side-nav__search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    border-radius: 10px;
    border: 1.5px solid transparent;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.side-nav--light .side-nav__search-wrap {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.07);
}

.side-nav--dark .side-nav__search-wrap {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}

.side-nav__search-wrap:focus-within {
    border-color: rgba(21, 101, 192, 0.55);
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.12);
}

.side-nav--light .side-nav__search-wrap:focus-within {
    background: #fff;
}

.side-nav--dark .side-nav__search-wrap:focus-within {
    background: rgba(255, 255, 255, 0.07);
}

.side-nav__search-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    margin-left: 10px;
    pointer-events: none;
    transition: color 0.18s ease;
}

.side-nav--light .side-nav__search-icon {
    color: rgba(0, 0, 0, 0.32);
}

.side-nav--dark .side-nav__search-icon {
    color: rgba(255, 255, 255, 0.30);
}

.side-nav__search-wrap:focus-within .side-nav__search-icon {
    color: rgba(21, 101, 192, 0.8);
}

.side-nav__search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 7px 8px;
    font-family: inherit;
    font-size: 0.8375rem;
    line-height: 1.4;
    min-width: 0;
}

.side-nav--light .side-nav__search-input {
    color: #212529;
}

.side-nav--dark .side-nav__search-input {
    color: rgba(255, 255, 255, 0.88);
}

.side-nav__search-input::placeholder {
    transition: color 0.15s ease;
}

.side-nav--light .side-nav__search-input::placeholder {
    color: rgba(0, 0, 0, 0.3);
}

.side-nav--dark .side-nav__search-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.side-nav__search-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-right: 6px;
    flex-shrink: 0;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.side-nav__search-clear svg {
    width: 12px;
    height: 12px;
}

.side-nav--light .side-nav__search-clear {
    color: rgba(0, 0, 0, 0.35);
}

.side-nav--dark .side-nav__search-clear {
    color: rgba(255, 255, 255, 0.30);
}

.side-nav--light .side-nav__search-clear:hover {
    background: rgba(0, 0, 0, 0.07);
    color: rgba(0, 0, 0, 0.65);
}

.side-nav--dark .side-nav__search-clear:hover {
    background: rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.70);
}

/* ── MudTooltip wrapper must be block + full width ──────────────── */
/* Scoped to the rail on purpose: unqualified, this rule would stretch
   every tooltip in the app to full width. */
.side-nav .mud-tooltip-root {
    display: block !important;
    width: 100% !important;
}

/* ── Nav item ────────────────────────────────────────────────────── */
.side-nav__item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 14px;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none !important;
    font-size: 0.875rem;
    font-weight: 400;
    transition: background-color 0.15s ease, color 0.15s ease;
    user-select: none;
    box-sizing: border-box;
}

.side-nav--light .side-nav__item,
.side-nav--dark .side-nav__item {
    color: var(--mud-palette-text-secondary);
}

/* Hover and active were one grouped rule painting both as a solid navy
   pill. Separated: hover is a faint wash, active is a quiet surface with
   full-contrast text. !important kept because other rules here rely on
   this rule winning. */
.side-nav__item:hover {
    background-color: rgb(128 128 128 / .09) !important;
    text-decoration: none !important;
}

.side-nav__item--active {
    background-color: rgb(128 128 128 / .14) !important;
    color: var(--mud-palette-primary) !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

.side-nav--icon-only .side-nav__item {
    justify-content: center;
    padding: 10px;
    gap: 0;
    width: 100%;
}

.side-nav__item-icon {
    flex-shrink: 0;
    font-size: 1.1rem;
    color: inherit;
}

.side-nav__item-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 015-enhanced-side-navigation US9: wraps every non-collapsed, non-standalone leaf item so its
   optional pin-toggle button (FR-028) can sit beside it without becoming part of the <a>/<button>
   itself — nesting a <button> inside an <a> would be invalid HTML, and stealing space from
   .side-nav__item's own flex layout would fight its existing hover/active backgrounds. */
.side-nav__item-row {
    display: flex;
    align-items: center;
    gap: 2px;
}

.side-nav__item-row .side-nav__item {
    flex: 1;
    min-width: 0;
}

.side-nav__pin-toggle {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
    opacity: 0;
    transition: opacity 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

/* Visible on hover/focus like the search-clear button, but a pinned item's star stays visible
   at all times — otherwise there'd be no way to tell what's pinned without hovering every row. */
.side-nav__item-row:hover .side-nav__pin-toggle,
.side-nav__item-row:focus-within .side-nav__pin-toggle,
.side-nav__pin-toggle--pinned {
    opacity: 1;
}

.side-nav--light .side-nav__pin-toggle {
    color: rgba(0, 0, 0, 0.35);
}

.side-nav--dark .side-nav__pin-toggle {
    color: rgba(255, 255, 255, 0.30);
}

.side-nav--light .side-nav__pin-toggle:hover {
    background: rgba(0, 0, 0, 0.07);
    color: rgba(0, 0, 0, 0.65);
}

.side-nav--dark .side-nav__pin-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.75);
}

.side-nav__pin-toggle--pinned {
    color: #f5a623 !important;
}

/* ── Standalone item (dashboard, not in a group) ─────────────────── */
.side-nav__item--standalone {
    margin-bottom: 10px;
}

/* ── Child item (inside group, indented) ────────────────────────── */
.side-nav__item--child {
    padding-inline-start: 32px !important;
    font-size: 0.8375rem;
}

/* ── Section separators ─────────────────────────────────────────── */
.side-nav__sep {
    padding: 10px 10px 4px;
}

.side-nav__sep-text {
    font-size: 0.8375rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.side-nav--light .side-nav__sep-text {
    color: rgba(0, 0, 0, 0.28);
}

.side-nav--dark .side-nav__sep-text {
    color: rgba(255, 255, 255, 0.22);
}

.side-nav__sep-line {
    height: 1px;
    background: var(--mud-palette-divider);
    opacity: 0.45;
    margin: 6px 8px;
}

/* ── Group container ─────────────────────────────────────────────── */
.side-nav__group {
    display: flex;
    flex-direction: column;
    margin-bottom: 2px;
}

/* ── Group header (clickable row) ───────────────────────────────── */
.side-nav__group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 7px 10px;
    border-radius: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: start;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: background 0.15s ease, color 0.15s ease;
    box-sizing: border-box;
}

.side-nav--light .side-nav__group-header {
    color: rgba(21, 101, 192, 0.6);
}

.side-nav--dark .side-nav__group-header {
    color: rgba(255, 255, 255, 0.45);
}

.side-nav--light .side-nav__group-header:hover {
    background: rgba(21, 101, 192, 0.06);
    color: rgba(21, 101, 192, 0.85);
}

.side-nav--dark .side-nav__group-header:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.75);
}

.side-nav--light .side-nav__group-header--active {
    color: var(--mud-palette-primary) !important;
}

.side-nav--dark .side-nav__group-header--active {
    color: color-mix(in srgb, var(--mud-palette-primary) 80%, white) !important;
}

.side-nav__group-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.side-nav__group-header-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Chevron with rotation animation */
.side-nav__group-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.45;
    transform: rotate(0deg);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.18s ease;
    will-change: transform;
}

.side-nav__group-chevron--open {
    transform: rotate(90deg);
    opacity: 0.82;
}

/* ── Animated group body (grid-template-rows trick) ──────────────── */
.side-nav__group-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.side-nav__group-body--open {
    grid-template-rows: 1fr;
}

.side-nav__group-body-inner {
    overflow: hidden;
    min-height: 0;
}

/* ── Icon-only group button ─────────────────────────────────────── */
.side-nav__group-icon-only {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    margin: 0 auto 2px;
    transition: background 0.15s ease, color 0.15s ease;
    /* 015-enhanced-side-navigation US4: this class is now also used on a real <button> (the
       flyout trigger), not just the legacy hand-written <div>s — reset native button chrome so
       both render identically. */
    border: none;
    background: none;
    padding: 0;
    font: inherit;
}

.side-nav--light .side-nav__group-icon-only {
    color: rgba(21, 101, 192, 0.55);
}

.side-nav--dark .side-nav__group-icon-only {
    color: rgba(255, 255, 255, 0.45);
}

.side-nav--light .side-nav__group-icon-only:hover {
    background: rgba(21, 101, 192, 0.08);
    color: rgba(21, 101, 192, 0.85);
}

.side-nav--dark .side-nav__group-icon-only:hover {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.80);
}

.side-nav__group-icon-only--active {
    background: var(--mud-palette-primary) !important;
    color: #fff !important;
}

/* Dot indicator for expanded group in icon-only mode */
.side-nav__group-dot {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--mud-palette-primary);
    box-shadow: 0 0 0 1.5px var(--mud-palette-surface);
    pointer-events: none;
}

.side-nav__group-icon-only--active .side-nav__group-dot {
    background: rgba(255, 255, 255, 0.9);
}

/* ════════════════════════════════════════════════════════════════════
   US4 — collapsed-rail group flyout
   ════════════════════════════════════════════════════════════════════ */

.side-nav__group--collapsed {
    position: relative;
    margin-bottom: 2px;
}

/* Full-viewport, invisible click-catcher — see SideNavGroup.razor's own comment on why this
   replaces JS-interop-based outside-click detection. */
.side-nav__flyout-backdrop {
    position: fixed;
    inset: 0;
    z-index: 499;
    background: transparent;
}

.side-nav__flyout {
    position: absolute;
    top: 0;
    z-index: 500;
    min-width: 200px;
    max-width: 280px;
    padding: 6px;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
}

/* research.md #8: RTL handled via explicit mirrored rules throughout this file (matching
   .side-nav--hovering's identical left/right split above), not bare logical properties alone. */
.side-nav__flyout {
    left: 100%;
    margin-inline-start: 6px;
}

.side-nav--rtl .side-nav__flyout {
    left: auto;
    right: 100%;
    margin-inline-start: 0;
    margin-inline-end: 6px;
}

.side-nav--light .side-nav__flyout {
    background: var(--mud-palette-surface, #fff);
    border: 1px solid var(--mud-palette-lines-default);
}

.side-nav--dark .side-nav__flyout {
    background: var(--mud-palette-surface, #1e1e1e);
    border: 1px solid var(--mud-palette-lines-default);
}

.side-nav__flyout-header {
    padding: 6px 10px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.side-nav--light .side-nav__flyout-header {
    color: rgba(0, 0, 0, 0.4);
}

.side-nav--dark .side-nav__flyout-header {
    color: rgba(255, 255, 255, 0.4);
}

/* Flyout items are full-width normal (icon+label) items, same as expanded-mode children — the
   flyout itself is the "expanded" surface, so nothing about the item rendering changes; only its
   container's positioning is collapsed-rail-specific. */
.side-nav__flyout .side-nav__item {
    white-space: nowrap;
}

/* ════════════════════════════════════════════════════════════════════
   PROFILE BLOCK — inline accordion
   ════════════════════════════════════════════════════════════════════ */

.side-nav__profile-block {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    border: 1.5px solid transparent;
    transition: border-color 0.25s ease, background-color 0.25s ease;
    padding: 0 2px;
}

.side-nav--light .side-nav__profile-block--open {
    border-color: color-mix(in srgb, var(--mud-palette-primary) 35%, transparent);
    background-color: color-mix(in srgb, var(--mud-palette-primary) 4%, transparent);
}

.side-nav--dark .side-nav__profile-block--open {
    border-color: color-mix(in srgb, var(--mud-palette-primary) 45%, transparent);
    background-color: color-mix(in srgb, var(--mud-palette-primary) 7%, transparent);
}

.side-nav__profile-block-sep {
    height: 1px;
    margin: 0 4px 4px;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

.side-nav__profile-block--open .side-nav__profile-block-sep {
    opacity: 0;
}

.side-nav--light .side-nav__profile-block-sep {
    background: rgba(21, 101, 192, 0.12);
}

.side-nav--dark .side-nav__profile-block-sep {
    background: rgba(255, 255, 255, 0.08);
}

.side-nav__profile-expand {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.side-nav__profile-block--open .side-nav__profile-expand {
    grid-template-rows: 1fr;
}

.side-nav__profile-expand-inner {
    overflow: hidden;
    min-height: 0;
}

.side-nav__profile-expand-inner > * {
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.22s ease 0s, transform 0.22s ease 0s;
}

.side-nav__profile-block--open .side-nav__profile-expand-inner > * {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.22s ease 0.08s, transform 0.22s ease 0.08s;
}

.side-nav__profile-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 4px 8px;
}

.side-nav--icon-only .side-nav__profile-card {
    padding: 10px 0 8px;
    justify-content: center;
}

.side-nav__profile-card-avatar {
    position: relative;
    flex-shrink: 0;
}

.side-nav__profile-avatar {
    width: 38px !important;
    height: 38px !important;
    font-size: 0.875rem !important;
}

.side-nav__profile-avatar-glow {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid var(--mud-palette-primary);
    opacity: 0.3;
    pointer-events: none;
}

.side-nav__profile-card-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.side-nav__profile-card-name {
    font-size: 0.8375rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.side-nav__profile-card-email {
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.side-nav__profile-card-role {
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    border-radius: 100px;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-top: 2px;
    width: fit-content;
}

.side-nav--light .side-nav__profile-card-name {
    color: var(--mud-palette-text-primary);
}

.side-nav--light .side-nav__profile-card-email {
    color: var(--mud-palette-text-secondary);
}

.side-nav--light .side-nav__profile-card-role {
    background: color-mix(in srgb, var(--mud-palette-primary) 10%, transparent);
    color: var(--mud-palette-primary);
}

.side-nav--dark .side-nav__profile-card-name {
    color: rgba(255, 255, 255, 0.9);
}

.side-nav--dark .side-nav__profile-card-email {
    color: rgba(255, 255, 255, 0.42);
}

.side-nav--dark .side-nav__profile-card-role {
    background: color-mix(in srgb, var(--mud-palette-primary) 18%, transparent);
    color: color-mix(in srgb, var(--mud-palette-primary) 75%, white);
}

.side-nav__profile-sep {
    height: 1px;
    margin: 6px 4px;
    transition: background-color 0.2s ease;
}

.side-nav__profile-sep--compact {
    margin: 4px 4px;
}

.side-nav--light .side-nav__profile-sep {
    background: rgba(21, 101, 192, 0.1);
}

.side-nav--dark .side-nav__profile-sep {
    background: rgba(255, 255, 255, 0.07);
}

.side-nav__profile-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-bottom: 8px;
}

.side-nav__profile-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 9px;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: start;
    font-size: 0.8375rem;
    font-weight: 450;
    transition: background-color 0.13s ease, color 0.13s ease;
}

.side-nav--light .side-nav__profile-item {
    color: var(--mud-palette-text-primary);
}

.side-nav--dark .side-nav__profile-item {
    color: rgba(255, 255, 255, 0.8);
}

.side-nav--light .side-nav__profile-item:hover {
    background-color: rgba(21, 101, 192, 0.07);
}

.side-nav--dark .side-nav__profile-item:hover {
    background-color: rgba(255, 255, 255, 0.06);
}

.side-nav__profile-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    flex-shrink: 0;
    transition: background-color 0.13s ease, color 0.13s ease;
}

.side-nav--light .side-nav__profile-item-icon {
    background: rgba(21, 101, 192, 0.07);
    color: var(--mud-palette-primary);
}

.side-nav--dark .side-nav__profile-item-icon {
    background: rgba(255, 255, 255, 0.07);
    color: color-mix(in srgb, var(--mud-palette-primary) 80%, white);
}

.side-nav--light .side-nav__profile-item:hover .side-nav__profile-item-icon,
.side-nav--dark .side-nav__profile-item:hover .side-nav__profile-item-icon {
    background: var(--mud-palette-primary);
    color: #fff;
}

.side-nav__profile-item-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.side-nav__profile-item-arrow {
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.13s ease;
}

.side-nav__profile-item:hover .side-nav__profile-item-arrow {
    opacity: 0.4;
}

.side-nav__profile-item--danger {
    color: var(--mud-palette-error) !important;
}

.side-nav--light .side-nav__profile-item--danger:hover {
    background-color: rgba(var(--mud-palette-error-rgb), 0.07) !important;
}

.side-nav--dark .side-nav__profile-item--danger:hover {
    background-color: rgba(var(--mud-palette-error-rgb), 0.1) !important;
}

.side-nav__profile-item-icon--danger {
    background: rgba(var(--mud-palette-error-rgb), 0.09) !important;
    color: var(--mud-palette-error) !important;
}

.side-nav--light .side-nav__profile-item--danger:hover .side-nav__profile-item-icon--danger,
.side-nav--dark .side-nav__profile-item--danger:hover .side-nav__profile-item-icon--danger {
    background: var(--mud-palette-error) !important;
    color: #fff !important;
}

.side-nav__profile-icon-strip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 4px 0 8px;
}

.side-nav__profile-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: background-color 0.13s ease, color 0.13s ease;
}

.side-nav--light .side-nav__profile-icon-btn {
    color: var(--mud-palette-text-secondary);
}

.side-nav--dark .side-nav__profile-icon-btn {
    color: rgba(255, 255, 255, 0.55);
}

.side-nav--light .side-nav__profile-icon-btn:hover {
    background: rgba(21, 101, 192, 0.09);
    color: var(--mud-palette-primary);
}

.side-nav--dark .side-nav__profile-icon-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
}

.side-nav__profile-icon-btn--danger {
    color: var(--mud-palette-error) !important;
}

.side-nav--light .side-nav__profile-icon-btn--danger:hover {
    background: rgba(var(--mud-palette-error-rgb), 0.09) !important;
}

.side-nav--dark .side-nav__profile-icon-btn--danger:hover {
    background: rgba(var(--mud-palette-error-rgb), 0.12) !important;
}

/* ── User trigger row ───────────────────────────────────────────── */
.side-nav__user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    margin-top: 2px;
}

.side-nav--icon-only .side-nav__user {
    justify-content: center;
    gap: 0;
}

.side-nav--light .side-nav__user:hover {
    background-color: rgba(21, 101, 192, 0.07);
}

.side-nav--dark .side-nav__user:hover {
    background-color: rgba(255, 255, 255, 0.07);
}

.side-nav--light .side-nav__user--active {
    background-color: rgba(21, 101, 192, 0.1) !important;
}

.side-nav--dark .side-nav__user--active {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.side-nav__user-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.side-nav__user-name {
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.side-nav__user-sub {
    font-size: 0.67rem;
    white-space: nowrap;
}

.side-nav--light .side-nav__user-name {
    color: var(--mud-palette-text-primary);
}

.side-nav--light .side-nav__user-sub {
    color: var(--mud-palette-text-secondary);
}

.side-nav--light .side-nav__user-chevron {
    color: var(--mud-palette-text-secondary);
}

.side-nav--dark .side-nav__user-name {
    color: rgba(255, 255, 255, 0.87);
}

.side-nav--dark .side-nav__user-sub {
    color: rgba(255, 255, 255, 0.38);
}

.side-nav--dark .side-nav__user-chevron {
    color: rgba(255, 255, 255, 0.35);
}

.side-nav__user-chevron {
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.side-nav__user-chevron--open {
    transform: rotate(180deg);
}

.side-nav__user .mud-avatar {
    width: 30px;
    height: 30px;
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════════
   SUPABASE-LANGUAGE LAYER
   Adopts Supabase's structural vocabulary only: compact rows, hairline
   borders, monochrome icons, restrained active state. Colours stay on
   the existing MudBlazor palette variables, so the brand is unchanged.
   Appended deliberately: scoped-CSS specificity is uniform, so these
   win by order without touching the markup or its permission logic.
   ══════════════════════════════════════════════════════════════════ */

/* Panel: hairline instead of a floating rounded card */
.side-nav {
    border-radius: 10px;
    padding: 10px 8px;
    border: 1px solid var(--mud-palette-lines-default);
}

.side-nav--icon-only { padding: 10px 6px; }
.side-nav--hovering  { padding: 10px 8px; border-radius: 10px; }

/* Rows: 30px, tight, small radius */
.side-nav__item {
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 0.8125rem;
    line-height: 1.35;
    min-height: 30px;
    font-weight: 450;
    transition: background-color .12s ease, color .12s ease;
}

.side-nav__item--child {
    font-size: 0.8125rem;
    min-height: 28px;
    padding-block: 5px;
}

/* Icons: monochrome, muted until the row matters */
.side-nav__item .mud-icon-root,
.side-nav__group-header-icon .mud-icon-root {
    font-size: 1rem !important;
    width: 1rem;
    height: 1rem;
    opacity: .72;
    transition: opacity .12s ease;
}

.side-nav__item:hover .mud-icon-root { opacity: .9; }

/* Hover: barely there */
.side-nav--light .side-nav__item:hover { background-color: rgb(0 0 0 / .04); }
.side-nav--dark  .side-nav__item:hover { background-color: rgb(255 255 255 / .05); }

/* Active: a quiet surface and full-contrast text, not a heavy filled pill */
/* Active colours are set once, in the base rule near the top of this file. */
.side-nav__item--active { position: relative; }

.side-nav__item--active .mud-icon-root { opacity: 1; }

/* Child rows get a rail that reads as tree depth, not decoration */
.side-nav__item--child.side-nav__item--active::before {
    content: "";
    position: absolute;
    inset-block: 5px;
    inset-inline-start: -8px;
    width: 2px;
    border-radius: 1px;
    background: var(--mud-palette-primary);
}

/* Group headers: quiet labels, not buttons */
.side-nav__group-header {
    padding: 6px 8px;
    border-radius: 6px;
    min-height: 30px;
    font-size: 0.8125rem;
    font-weight: 450;
}

.side-nav__group-header-label {
    font-size: 0.8125rem;
    letter-spacing: 0;
    text-transform: none;
    font-weight: 450;
}

.side-nav__group-header--active .side-nav__group-header-label { font-weight: 600; }

.side-nav__group-chevron { opacity: .55; font-size: .95rem !important; }

/* Section captions */
.side-nav__sep-text {
    font-size: 0.6875rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: .62;
    font-weight: 600;
}

.side-nav__sep { margin-block: 10px 4px; }
.side-nav__sep-line { opacity: .5; }

/* Search: compact field */
.side-nav__search-wrap { margin-bottom: 8px; }

.side-nav__search-input {
    font-size: 0.8125rem;
    min-height: 30px;
    border-radius: 6px;
}

/* Child list indentation reads as hierarchy */
.side-nav__group-body-inner {
    padding-inline-start: 16px;
    margin-inline-start: 8px;
    border-inline-start: 1px solid var(--mud-palette-lines-default);
}

/* Profile block: one compact row */
.side-nav__profile-card { padding: 7px 8px; border-radius: 6px; }
.side-nav__profile-card-name { font-size: 0.8125rem; font-weight: 600; }
.side-nav__profile-card-email,
.side-nav__profile-card-role { font-size: 0.6875rem; opacity: .7; }
.side-nav__profile-item { padding: 6px 8px; border-radius: 6px; font-size: 0.8125rem; min-height: 30px; }

@media (prefers-reduced-motion: reduce) {
    .side-nav__item,
    .side-nav__group-header,
    .side-nav__item .mud-icon-root { transition: none; }
}

/* Header: Supabase keeps the brand row the same height as a nav row so the
   panel reads as one continuous list rather than a card with a banner. */
.side-nav__header {
    padding: 2px 4px 10px;
}

.side-nav__logo-image--full { max-height: 30px; width: auto; }
.side-nav__logo-image--icon { width: 26px; height: 26px; }

.side-nav--icon-only .side-nav__header { padding: 2px 0 10px; gap: 6px; }

/* Search sits directly under the brand row, same rhythm as nav rows */
.side-nav__search { padding: 0 0 10px; }
.side-nav__search-wrap { border-radius: 6px; border-width: 1px; }
.side-nav__search-input { padding: 5px 8px; font-size: 0.8125rem; }
.side-nav__search-icon { margin-left: 8px; width: 14px; height: 14px; }

/* ══════════════════════════════════════════════════════════════════
   ARTIFACT TOKEN LAYER
   Moves the panel off MudBlazor's generic palette and onto the navy
   and slate set from the design document. Tokens hang off the panel's
   own --light / --dark modifier classes rather than a global theme
   signal, so the two themes resolve independently of MudBlazor.
   ══════════════════════════════════════════════════════════════════ */

.side-nav--light {
    --nav-surface:   #FFFFFF;
    --nav-border:    #DCE3EC;
    --nav-ink:       #101A28;
    --nav-ink-2:     #4A5A70;
    --nav-ink-3:     #7C8CA3;
    --nav-hover:     rgb(16 26 40 / .05);
    --nav-active-bg: #E4EDF7;
    --nav-active-fg: #1B3A63;
    --nav-rail:      #2F6FB2;
    --nav-field:     #F7F9FC;
}

.side-nav--dark {
    --nav-surface:   #141E2C;
    --nav-border:    #26344A;
    --nav-ink:       #E8EEF7;
    --nav-ink-2:     #A6B4C8;
    --nav-ink-3:     #73849C;
    --nav-hover:     rgb(255 255 255 / .06);
    --nav-active-bg: #17293F;
    --nav-active-fg: #8FBCEC;
    --nav-rail:      #5FA3E0;
    --nav-field:     #1A2536;
}

/* Panel */
.side-nav--light,
.side-nav--dark {
    background-color: var(--nav-surface);
    border-color: var(--nav-border);
    color: var(--nav-ink-2);
}

.side-nav--light.side-nav--hovering,
.side-nav--dark.side-nav--hovering {
    box-shadow: 0 8px 32px rgb(8 15 26 / .18);
}

/* Rows */
.side-nav--light .side-nav__item,
.side-nav--dark .side-nav__item,
.side-nav--light .side-nav__group-header,
.side-nav--dark .side-nav__group-header {
    color: var(--nav-ink-2);
}

.side-nav--light .side-nav__item:hover,
.side-nav--dark .side-nav__item:hover,
.side-nav--light .side-nav__group-header:hover,
.side-nav--dark .side-nav__group-header:hover {
    background-color: var(--nav-hover) !important;
    color: var(--nav-ink) !important;
}

/* Active: brand wash carrying brand ink, one step above hover */
.side-nav--light .side-nav__item--active,
.side-nav--dark .side-nav__item--active,
.side-nav--light .side-nav__group-header--active,
.side-nav--dark .side-nav__group-header--active {
    background-color: var(--nav-active-bg) !important;
    color: var(--nav-active-fg) !important;
}

.side-nav__item--active .mud-icon-root,
.side-nav__group-header--active .mud-icon-root {
    color: var(--nav-active-fg);
    opacity: 1;
}

/* Tree rail on active children picks up the interactive blue */
.side-nav__item--child.side-nav__item--active::before {
    background: var(--nav-rail);
}

.side-nav__group-body-inner {
    border-inline-start-color: var(--nav-border);
}

/* Section captions and separators */
.side-nav--light .side-nav__sep-text,
.side-nav--dark .side-nav__sep-text {
    color: var(--nav-ink-3);
    opacity: 1;
}

.side-nav--light .side-nav__sep-line,
.side-nav--dark .side-nav__sep-line {
    background: var(--nav-border);
    opacity: 1;
}

/* Search field */
.side-nav--light .side-nav__search-wrap,
.side-nav--dark .side-nav__search-wrap {
    background: var(--nav-field);
    border-color: var(--nav-border);
}

.side-nav--light .side-nav__search-input,
.side-nav--dark .side-nav__search-input {
    color: var(--nav-ink);
}

.side-nav--light .side-nav__search-input::placeholder,
.side-nav--dark .side-nav__search-input::placeholder {
    color: var(--nav-ink-3);
}

.side-nav--light .side-nav__search-icon,
.side-nav--dark .side-nav__search-icon {
    color: var(--nav-ink-3);
}

.side-nav__search-wrap:focus-within {
    border-color: var(--nav-rail);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--nav-rail) 18%, transparent);
}

.side-nav--light .side-nav__search-wrap:focus-within,
.side-nav--dark .side-nav__search-wrap:focus-within {
    background: var(--nav-surface);
}

/* Profile block */
.side-nav--light .side-nav__profile-card-name,
.side-nav--dark .side-nav__profile-card-name { color: var(--nav-ink); }

.side-nav--light .side-nav__profile-card-email,
.side-nav--dark .side-nav__profile-card-email,
.side-nav--light .side-nav__profile-card-role,
.side-nav--dark .side-nav__profile-card-role { color: var(--nav-ink-3); }

.side-nav--light .side-nav__profile-card:hover,
.side-nav--dark .side-nav__profile-card:hover {
    background-color: var(--nav-hover);
}

/* Scrollbar picks up the border tone rather than a blue tint */
.side-nav--light .side-nav__content,
.side-nav--dark .side-nav__content {
    scrollbar-color: var(--nav-border) transparent;
}

.side-nav--light .side-nav__content::-webkit-scrollbar-thumb,
.side-nav--dark .side-nav__content::-webkit-scrollbar-thumb {
    background: var(--nav-border);
}

/* ── Colophon ────────────────────────────────────────────────────────
   Product mark, year and vendor credit at the foot of the rail.

   The first attempt was a bordered strip reading "Crafted by Ebtkar
   Solutions" in sentence case, which looked like a disabled nav row.
   This version behaves like a colophon: the product wordmark carries
   the weight, the metadata sits under it at half the size, and there
   is no box. Contrast is the lowest on the screen by design.
   ------------------------------------------------------------------ */
.side-nav__colophon {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0.75rem 0.9rem 0.9rem;
    margin-top: auto;
    user-select: none;
}

.side-nav__colophon-brand {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    line-height: 1;
}

.side-nav__colophon-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.625rem;
    letter-spacing: 0.01em;
    line-height: 1.3;
    font-variant-numeric: tabular-nums;
}

/* A 3px rule rather than a middle dot: quieter, and it does not get
   mistaken for punctuation in Arabic. */
.side-nav__colophon-sep {
    width: 10px;
    height: 1px;
    flex: none;
    background: currentColor;
    opacity: 0.4;
}

.side-nav__colophon-link {
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.side-nav__colophon-link:hover {
    color: var(--mud-palette-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Collapsed rail: the product initial only. */
.side-nav__colophon-mark {
    align-self: center;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    padding: 4px 6px;
    border-radius: var(--radius-control, 4px);
    border: 1px solid currentColor;
    opacity: 0.5;
}

/* Two tones: the wordmark is readable, the metadata recedes. Tuned per
   theme so neither disappears. */
.side-nav--light .side-nav__colophon-brand { color: rgba(21, 38, 76, 0.55); }
.side-nav--light .side-nav__colophon-meta,
.side-nav--light .side-nav__colophon-mark  { color: rgba(21, 38, 76, 0.38); }

.side-nav--dark .side-nav__colophon-brand  { color: rgba(255, 255, 255, 0.52); }
.side-nav--dark .side-nav__colophon-meta,
.side-nav--dark .side-nav__colophon-mark   { color: rgba(255, 255, 255, 0.34); }

/* ── Account row ─────────────────────────────────────────────────────
   Now a <button>; strip the UA chrome and keep the row layout it had as a div. */
button.side-nav__user {
    width: 100%;
    background: none;
    border: none;
    font: inherit;
    color: inherit;
    text-align: start;
    cursor: pointer;
}

button.side-nav__user:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: -2px;
    border-radius: var(--radius-md, 12px);
}

/* Long addresses must not blow out the rail width. */
.side-nav__profile-card-email {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* ══════════════════════════════════════════════════════════════════
   SELECTION MODEL
   ══════════════════════════════════════════════════════════════════
   Earlier rules gave .side-nav__group-header--active the same
   --nav-active-bg fill as .side-nav__item--active. On /Portal/Employees
   that painted two identical pills stacked on top of each other, one
   for the parent "Human Resources" and one for the child "Employees",
   with a third signal (the rail) beside the child. Three marks, one
   selection, and the two pills collided where their rounded corners met.

   Exactly one row is ever the destination, so exactly one row carries
   the fill. The parent is an ancestor, not a target: it says "the
   current page lives in here" through ink and weight alone.

     ancestor      no fill, full-contrast ink, 600 weight
     destination   tinted surface + accent rail + accent ink
   ────────────────────────────────────────────────────────────────── */

/* Ancestor: strip the fill the earlier rule applied. */
.side-nav--light .side-nav__group-header--active,
.side-nav--dark  .side-nav__group-header--active {
    background-color: transparent !important;
}

.side-nav--light .side-nav__group-header--active {
    color: var(--nav-ink, #192028) !important;
}

.side-nav--dark .side-nav__group-header--active {
    color: #E7EDF6 !important;
}

.side-nav__group-header--active .side-nav__group-header-label {
    font-weight: 600;
}

/* The ancestor's icon should not read as accented; only the
   destination gets brand colour. */
.side-nav__group-header--active .mud-icon-root {
    color: inherit !important;
    opacity: 0.85;
}

/* Destination keeps the single fill, and its corners now sit alone. */
.side-nav--light .side-nav__item--child.side-nav__item--active,
.side-nav--dark  .side-nav__item--child.side-nav__item--active {
    background-color: var(--nav-active-bg) !important;
    color: var(--nav-active-fg) !important;
    font-weight: 600;
}

/* Rail sits ON the indent guide rather than floating 8px left of it,
   so the tree line and the selection marker are the same vertical axis
   instead of two competing verticals. */
.side-nav__item--child.side-nav__item--active::before {
    inset-inline-start: -1px;
    inset-block: 4px;
    width: 2px;
}

/* ── Density ───────────────────────────────────────────────────────
   Rows were ~36px with 24px icons, so the rail showed ~9 items before
   scrolling on a 950px viewport. This is a navigation tree that people
   traverse constantly; tightening it to ~30px shows a third more of the
   structure without crowding the text. */
.side-nav__item {
    min-height: 30px;
    padding-block: 5px;
}

.side-nav__item .mud-icon-root,
.side-nav__group-header .mud-icon-root {
    font-size: 1.05rem !important;
    width: 1.05rem;
    height: 1.05rem;
}

/* Right edges align: children were inset only on the start side, so
   their pill ran wider than the parent's and the two never squared up. */
.side-nav__item--child {
    margin-inline-end: 0;
}

/* Indent guide: one continuous hairline, low contrast. It marks depth;
   it is not a divider. */
.side-nav__group-body-inner {
    border-inline-start-width: 1px;
}

/* ============================================================
   015-enhanced-side-navigation — responsive breakpoint scaffolding
   ============================================================
   research.md #8: before this feature, this file had exactly one
   @media rule in 1487 lines (prefers-reduced-motion) — zero responsive
   breakpoint rules existed anywhere. This establishes the breakpoint
   value the shared shell's mobile-drawer mode (US5) switches on; the
   actual drawer/backdrop styling is added by that story, not here.
   ============================================================ */
:root {
    --side-nav-mobile-breakpoint: 768px;
}

@media (max-width: 768px) {
    /* Below the mobile breakpoint, the desktop hover-expand behavior
       does not apply — touch devices must not depend on hover (spec
       FR-004's last bullet). The mobile drawer itself (US5) is a
       separate render path, not a narrowed version of this one. */
    .side-nav--hovering {
        width: inherit;
    }
}

/* ============================================================
   015-enhanced-side-navigation US2 — focus-visible styling
   ============================================================
   research.md #8: before this feature, :focus-visible appeared exactly
   once in this file (button.side-nav__user, above). Every interactive
   control the new shared shell renders (SideNavItem's link/button
   variants, SideNavGroup's toggle) gets the same treatment here.
   --mud-palette-primary is theme-aware on its own (MudBlazor sets it
   per-theme), so one rule covers both light and dark without a
   separate dark-mode block.
   ============================================================ */
.side-nav__item:focus-visible,
.side-nav__group-header:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: -2px;
    border-radius: var(--radius-md, 12px);
}

/* ============================================================
   015-enhanced-side-navigation US5 — mobile drawer
   ============================================================
   Visibility is CSS-only: the drawer's own root rule hides it entirely
   above the mobile breakpoint, regardless of Open state, so a window
   resize from mobile to desktop while it happens to be open never needs
   a JS resize listener to correct it. Body-scroll lock and the focus
   trap are handled in SideNavMobileDrawer.razor's own code.
   ============================================================ */
.side-nav-drawer-backdrop,
.side-nav-drawer {
    display: none;
}

@media (max-width: 768px) {
    .side-nav-drawer-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 998;
        background: rgba(0, 0, 0, 0.4);
        /* 015-enhanced-side-navigation US5/T060: each consuming app hides its own desktop
           sidebar rail below this same breakpoint via `visibility: hidden` + `pointer-events:
           none` on the <aside> wrapper (not `display: none` — that would remove this
           fixed-position descendant from the render tree entirely, drawer included, since
           display:none on an ancestor takes the whole subtree with it regardless of
           position:fixed). Explicitly opting back in to visible/interactive here is what lets
           the drawer still show and respond through that hidden, inert ancestor. */
        visibility: visible !important;
        pointer-events: auto !important;
    }

    .side-nav-drawer {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        bottom: 0;
        z-index: 999;
        width: min(85vw, 320px);
        padding: 12px;
        padding-top: calc(12px + env(safe-area-inset-top));
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
        overflow-y: auto;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    /* research.md #8: explicit mirrored rules, matching every other RTL split in this file. */
    .side-nav-drawer {
        left: 0;
        padding-left: calc(12px + env(safe-area-inset-left));
    }

    .side-nav--rtl .side-nav-drawer {
        left: auto;
        right: 0;
        padding-right: calc(12px + env(safe-area-inset-right));
    }

    .side-nav--light .side-nav-drawer {
        background: var(--mud-palette-surface, #fff);
    }

    .side-nav--dark .side-nav-drawer {
        background: var(--mud-palette-surface, #1e1e1e);
    }
}

.side-nav-drawer__header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}

.side-nav-drawer__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    border-radius: 10px;
    cursor: pointer;
    color: inherit;
}

.side-nav--light .side-nav-drawer__close:hover {
    background: rgba(21, 101, 192, 0.08);
}

.side-nav--dark .side-nav-drawer__close:hover {
    background: rgba(255, 255, 255, 0.06);
}

.side-nav-drawer__content {
    flex: 1;
    min-height: 0;
}

/* Body-scroll lock while the drawer is open (SideNavMobileDrawer.razor toggles this class via
   JS interop — document.body isn't reachable through the component's own render tree). */
body.side-nav-drawer-open {
    overflow: hidden;
}

/* 015-enhanced-side-navigation US6/FR-022: shown by AppSideNav.razor in place of an empty tree
   when an active search matched nothing. */
.side-nav__empty-state {
    padding: 16px 20px;
    font-size: 13px;
    text-align: center;
}

.side-nav--light .side-nav__empty-state {
    color: rgba(0, 0, 0, 0.45);
}

.side-nav--dark .side-nav__empty-state {
    color: rgba(255, 255, 255, 0.4);
}

/* 015-enhanced-side-navigation US7: the Ctrl+K/Cmd+K command palette (NavigationCommandPalette.razor).
   Deliberately theme-neutral (light surface, dark text) rather than following side-nav--light/dark —
   it's a page-level overlay triggered from anywhere, not scoped under the sidebar's own root class. */
.nav-palette-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1200;
}

.nav-palette {
    position: fixed;
    top: 15vh;
    left: 50%;
    transform: translateX(-50%);
    width: min(560px, calc(100vw - 32px));
    max-height: 60vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    z-index: 1201;
    overflow: hidden;
}

.nav-palette__search {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.nav-palette__input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 16px;
    background: transparent;
    color: rgba(0, 0, 0, 0.87);
}

.nav-palette__status {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.nav-palette__empty {
    padding: 24px 16px;
    text-align: center;
    font-size: 13px;
    color: rgba(0, 0, 0, 0.45);
}

.nav-palette__results {
    list-style: none;
    margin: 0;
    padding: 6px;
    overflow-y: auto;
}

.nav-palette__result-button {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    border: none;
    background: transparent;
    text-align: start;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: rgba(0, 0, 0, 0.87);
}

.nav-palette__result--selected .nav-palette__result-button {
    background: rgba(21, 101, 192, 0.1);
}

.nav-palette__result-group {
    font-size: 11px;
    color: rgba(0, 0, 0, 0.45);
}
