:root {
    --hub-primary: #DC3545;
    --hub-primary-dark: #c82333;
    --hub-primary-soft: rgba(220, 53, 69, 0.12);
}

/* Fixed shell for app-wide professional sidebar */
.hub-sidebar-shell,
.hub-sidebar-shell.sidebar-nav {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    padding: 1rem 0.75rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #fce4ec 100%) !important;
    z-index: 1000;
    border-right: none !important;
    box-shadow: none !important;
    backdrop-filter: none;
}

.hub-sidebar-shell.collapsed {
    width: 280px;
}

.hub-sidebar {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    padding: 1.25rem 0.75rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.hub-sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.hub-sidebar-brand {
    padding: 0 0.5rem 1rem;
    border-bottom: 1px solid #f1f3f5;
    margin-bottom: 0.75rem;
    flex-shrink: 0;
}

.hub-sidebar-brand .hub-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.hub-sidebar-brand .hub-brand-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    font-weight: 700;
    color: var(--hub-primary-dark);
    font-size: 0.95rem;
}

.hub-sidebar-brand .hub-brand-logo img {
    height: 32px;
    max-width: 120px;
    object-fit: contain;
}

.hub-badge {
    background: var(--hub-primary);
    color: #fff;
    font-size: 0.72rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-weight: 600;
    display: inline-block;
}

.hub-sidebar-section-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #adb5bd;
    padding: 0.5rem 0.85rem 0.35rem;
}

.hub-sidebar-nav .nav-link {
    color: #495057;
    font-weight: 600;
    border-radius: 0.5rem;
    padding: 0.6rem 0.85rem;
    font-size: 0.875rem;
    transition: background 0.2s ease, color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hub-sidebar-nav .nav-link:hover:not(.active) {
    background: var(--hub-primary-soft);
    color: var(--hub-primary-dark);
}

.hub-sidebar-nav .nav-link.active {
    background: linear-gradient(135deg, var(--hub-primary) 0%, var(--hub-primary-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.25);
}

.hub-sidebar-footer {
    margin-top: auto;
    padding: 0.75rem 0.5rem 0;
    border-top: 1px solid #f1f3f5;
    flex-shrink: 0;
}

/* NGO in-content sidebar (inside base_ngo layout) */
.ngo-layout .hub-sidebar-inset {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
}

.ngo-layout .hub-sidebar-inset .hub-sidebar {
    height: auto;
    max-height: calc(100vh - 2rem);
}

.hub-mobile-bar {
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    padding: 0.65rem 0.85rem;
    margin-bottom: 1rem;
}

#mobileSidebar .hub-sidebar-nav .nav-link,
#ngoMobileNav .hub-sidebar-nav .nav-link {
    border-radius: 0.5rem;
}

#mobileSidebar .hub-sidebar-nav .nav-link.active,
#ngoMobileNav .hub-sidebar-nav .nav-link.active {
    background: linear-gradient(135deg, var(--hub-primary) 0%, var(--hub-primary-dark) 100%);
    color: #fff;
}

@media (max-width: 991.98px) {
    .hub-sidebar-shell {
        display: none !important;
    }
}
