/* ===================== */
/*      Sidebar          */
/* ===================== */
aside.sidebar {
    width: var(--sidebar-width);
    background-color: var(--panel-bg);
    border-right: 1px solid var(--panel-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    z-index: 50;
    overflow: hidden;
}

aside.sidebar nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 0;
}

/* Thin grey scrollbar */
aside.sidebar nav::-webkit-scrollbar {
    width: 5px;
}

aside.sidebar nav::-webkit-scrollbar-track {
    background: transparent;
}

aside.sidebar nav::-webkit-scrollbar-thumb {
    background: #c4c8cf;
    border-radius: 10px;
}

aside.sidebar nav::-webkit-scrollbar-thumb:hover {
    background: #a0a5ae;
}

/* Firefox scrollbar */
aside.sidebar nav {
    scrollbar-width: thin;
    scrollbar-color: #c4c8cf transparent;
}

aside.sidebar nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

aside.sidebar nav ul li a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 1.25rem 0.55rem 1.6rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted-text);
    text-decoration: none;
    border-radius: 0;
    transition: background var(--transition-fast), color var(--transition-fast);
}

aside.sidebar nav ul li a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: transparent;
    transition: background var(--transition-fast);
}

aside.sidebar nav ul li a:hover {
    background-color: var(--neutral-100);
    color: var(--text-color);
    text-decoration: none;
}

aside.sidebar nav ul li a.active {
    background-color: var(--brand-blue-50);
    color: var(--brand-blue-700);
    font-weight: 600;
}

aside.sidebar nav ul li a.active::before {
    background: var(--brand-blue-600);
}

aside.sidebar nav ul li a:focus-visible {
    outline: none;
    background-color: var(--neutral-100);
    box-shadow: inset 0 0 0 2px var(--brand-blue-600);
}

aside.sidebar nav ul li a svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ── Sidebar nav badge ─────────────────────── */
aside.sidebar nav ul li a .nav-badge {
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #ef4444;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-sizing: border-box;
    display: none;
}
aside.sidebar nav ul li a .nav-badge.visible {
    display: inline-block;
}
