/* Facility Pro Enterprise sidebar - presentation-only. Permissions are enforced in Blazor. */
.app-shell:not(.fm-amana-layout) .fm-enterprise-sidebar {
    background: linear-gradient(165deg, #153b55 0%, #102b40 53%, #0b2132 100%);
    border-inline-end: 1px solid rgba(255,255,255,.08);
    box-shadow: 8px 0 30px rgba(15, 41, 58, .12);
}

.fm-enterprise-sidebar .sidebar-brand { flex-shrink: 0; }
.fm-enterprise-sidebar .sidebar-brand .brand-subtitle { letter-spacing: .015em; }

.fm-enterprise-sidebar .fm-sidebar-search-area {
    flex: 0 0 auto;
    padding: 14px 14px 10px;
    border-bottom: 1px solid rgba(255,255,255,.075);
}

.fm-enterprise-sidebar .fm-sidebar-search {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 11px;
    color: rgba(255,255,255,.64);
    background: rgba(255,255,255,.065);
    transition: border-color .16s ease, background .16s ease;
}
.fm-enterprise-sidebar .fm-sidebar-search:focus-within {
    border-color: rgba(249,197,102,.8);
    background: rgba(255,255,255,.11);
}
.fm-enterprise-sidebar .fm-sidebar-search input {
    width: 100%;
    min-width: 0;
    padding: 0;
    outline: 0;
    border: 0;
    color: #fff;
    font: inherit;
    font-size: .8rem;
    background: transparent;
}
.fm-enterprise-sidebar .fm-sidebar-search input::placeholder { color: rgba(255,255,255,.54); }
.fm-enterprise-sidebar .fm-sidebar-search-clear {
    border: 0;
    color: rgba(255,255,255,.75);
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    flex: 0 0 auto;
}
.fm-enterprise-sidebar .fm-sidebar-search-clear:hover { background: rgba(255,255,255,.14); }

.fm-enterprise-sidebar .fm-enterprise-nav {
    min-height: 0;
    padding: 10px 10px 18px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.22) transparent;
    overscroll-behavior: contain;
}
.fm-enterprise-sidebar .fm-sidebar-group { margin: 2px 0 6px; }
.fm-enterprise-sidebar .fm-sidebar-section-button {
    width: calc(100% - 4px);
    min-height: 38px;
    margin: 3px 2px 5px;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: rgba(226,240,246,.68);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 9px;
    font-family: inherit;
    font-size: .71rem;
    line-height: 1.35;
    letter-spacing: .025em;
    text-align: start;
    text-transform: none;
    cursor: pointer;
    transition: color .15s ease, background .15s ease;
}
.fm-enterprise-sidebar .fm-sidebar-section-button:hover,
.fm-enterprise-sidebar .fm-sidebar-section-button[aria-expanded="true"] {
    background: rgba(255,255,255,.065);
    color: #fff;
}
.fm-enterprise-sidebar .fm-sidebar-section-label,
.fm-enterprise-sidebar .fm-sidebar-section-meta {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
}
.fm-enterprise-sidebar .fm-sidebar-section-label > i {
    font-size: 14px;
    width: 18px;
    flex: 0 0 18px;
    text-align: center;
    color: rgba(255,255,255,.60);
}
.fm-enterprise-sidebar .fm-sidebar-section-label > span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 600;
}
.fm-enterprise-sidebar .fm-sidebar-section-meta { gap: 9px; flex: 0 0 auto; }
.fm-enterprise-sidebar .fm-sidebar-section-meta > i { font-size: 10px; opacity: .6; }
.fm-enterprise-sidebar .fm-sidebar-section-count {
    min-width: 22px;
    height: 20px;
    padding: 1px 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 6px;
    color: rgba(255,255,255,.60);
    background: rgba(255,255,255,.045);
    font-size: .67rem;
    font-variant-numeric: tabular-nums;
}
.fm-enterprise-sidebar .fm-sidebar-group-content { padding: 0 0 1px; }

.fm-enterprise-sidebar .fm-enterprise-nav .nav-parent,
.fm-enterprise-sidebar .fm-enterprise-nav .nav-item {
    width: 100%;
    min-height: 40px;
    height: auto;
    margin: 2px 0;
    padding: 10px 11px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: rgba(249,251,253,.85);
    background: transparent;
    box-shadow: none;
    text-align: start;
    text-decoration: none;
    font-family: inherit;
    font-size: .81rem;
    line-height: 1.3;
    font-weight: 500;
    cursor: pointer;
    transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.fm-enterprise-sidebar .fm-enterprise-nav .nav-parent:hover,
.fm-enterprise-sidebar .fm-enterprise-nav .nav-item:hover,
.fm-enterprise-sidebar .fm-enterprise-nav .fm-sidebar-parent-open {
    color: #fff;
    border-color: rgba(255,255,255,.055);
    background: rgba(255,255,255,.095);
}
.fm-enterprise-sidebar .fm-sidebar-parent-label {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.fm-enterprise-sidebar .fm-sidebar-parent-label > i,
.fm-enterprise-sidebar .fm-enterprise-nav .nav-item > i {
    width: 19px;
    flex: 0 0 19px;
    text-align: center;
    font-size: 16px;
    opacity: .9;
}
.fm-enterprise-sidebar .fm-sidebar-parent-label > span,
.fm-enterprise-sidebar .fm-enterprise-nav .nav-item > span,
.fm-enterprise-sidebar .fm-sidebar-subnav .nav-child span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fm-enterprise-sidebar .fm-sidebar-parent-arrow { font-size: 11px; opacity: .55; }
.fm-enterprise-sidebar .fm-sidebar-subnav {
    margin: 3px 0 10px 12px;
    padding: 2px 0 2px 12px;
    border-inline-start: 1px solid rgba(255,255,255,.14);
}
.fm-enterprise-sidebar .fm-sidebar-subnav .nav-child {
    height: auto;
    min-height: 35px;
    margin: 1px 0;
    padding: 8px 10px;
    border-radius: 8px;
    gap: 10px;
    font-size: .78rem;
    line-height: 1.35;
    color: rgba(239,247,250,.70);
}
.fm-enterprise-sidebar .fm-sidebar-subnav .nav-child > i { font-size: 11px; width: 13px; flex: 0 0 13px; }
.fm-enterprise-sidebar .fm-sidebar-subnav .nav-child:hover { background: rgba(255,255,255,.08); color: #fff; }
.fm-enterprise-sidebar .fm-enterprise-nav .nav-item.active,
.fm-enterprise-sidebar .fm-sidebar-subnav .nav-child.active {
    color: #f9d99d;
    font-weight: 650;
    background: rgba(249,199,107,.115);
    border-color: rgba(249,199,107,.14);
    box-shadow: inset 3px 0 0 #e9bd66;
}
.app-shell.rtl .fm-enterprise-sidebar .fm-enterprise-nav .nav-item.active,
.app-shell.rtl .fm-enterprise-sidebar .fm-sidebar-subnav .nav-child.active {
    box-shadow: inset -3px 0 0 #e9bd66;
}
.fm-enterprise-sidebar .fm-sidebar-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    padding: 32px 10px;
    color: rgba(255,255,255,.7);
    font-size: .8rem;
    text-align: center;
}
.fm-enterprise-sidebar .fm-sidebar-section-button:focus-visible,
.fm-enterprise-sidebar .nav-parent:focus-visible,
.fm-enterprise-sidebar .nav-item:focus-visible,
.fm-enterprise-sidebar .nav-child:focus-visible,
.fm-enterprise-sidebar .fm-sidebar-search-clear:focus-visible {
    outline: 2px solid #f8cb7f;
    outline-offset: 2px;
}
.app-shell.sidebar-collapsed .fm-enterprise-sidebar .fm-enterprise-nav { padding-inline: 6px; }
.app-shell.sidebar-collapsed .fm-enterprise-sidebar .fm-sidebar-group { margin-bottom: 8px; }
.app-shell.sidebar-collapsed .fm-enterprise-sidebar .fm-enterprise-nav .nav-parent,
.app-shell.sidebar-collapsed .fm-enterprise-sidebar .fm-enterprise-nav .nav-item {
    justify-content: center;
    padding: 10px 0;
}
.app-shell.sidebar-collapsed .fm-enterprise-sidebar .fm-sidebar-parent-label { gap: 0; }

/* The municipal branded layout retains its green identity. */
.app-shell.fm-amana-layout .fm-enterprise-sidebar .fm-enterprise-nav .nav-item.active,
.app-shell.fm-amana-layout .fm-enterprise-sidebar .fm-sidebar-subnav .nav-child.active {
    color: #ddf5ce;
    border-color: rgba(140,216,112,.24);
    background: rgba(117,193,85,.14);
    box-shadow: inset 3px 0 0 #88d166;
}
.app-shell.fm-amana-layout.rtl .fm-enterprise-sidebar .fm-enterprise-nav .nav-item.active,
.app-shell.fm-amana-layout.rtl .fm-enterprise-sidebar .fm-sidebar-subnav .nav-child.active {
    box-shadow: inset -3px 0 0 #88d166;
}
.app-shell.fm-amana-layout .fm-enterprise-sidebar .fm-sidebar-search:focus-within { border-color: #88d166; }

@media (max-width: 768px) {
    .fm-enterprise-sidebar .fm-sidebar-search-area { padding: 11px 12px 8px; }
    .fm-enterprise-sidebar .fm-enterprise-nav { padding-bottom: 30px; }
}
@media (prefers-reduced-motion: reduce) {
    .fm-enterprise-sidebar * { transition-duration: 0s !important; }
}

/* Override the legacy span-hiding rule: the icon is inside this wrapper. */
.app-shell.sidebar-collapsed .fm-enterprise-sidebar .nav-parent > .fm-sidebar-parent-label {
    display: flex !important;
    align-items: center;
    justify-content: center;
}
.app-shell.sidebar-collapsed .fm-enterprise-sidebar .fm-sidebar-parent-label > span {
    display: none !important;
}
