/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR — ENTERPRISE PLATINUM v10.0 ULTRA
   Inspired by Linear, Vercel, Notion, GitHub
   NOTE: This file is intentionally a GLOBAL CSS file (not component-scoped).
   NavLink child components do not inherit Blazor scoped b-xxxx attributes,
   so NavMenu.razor.css (scoped) would silently fail in production.
   Same fix pattern used for flyout-menu CSS (moved to financial-planning-design-system.css).
   ═══════════════════════════════════════════════════════════════════════════ */

/* Sidebar */
.sidebar {
    /* Design Tokens */
    --sb-bg:            #0c1222;
    --sb-bg-hover:      rgba(255, 255, 255, 0.04);
    --sb-bg-active:     rgba(14, 165, 233, 0.12);
    --sb-border:        rgba(71, 85, 105, 0.3);
    --sb-accent:        #0ea5e9;
    --sb-accent-glow:   rgba(14, 165, 233, 0.4);
    --sb-teal:          #14b8a6;
    --sb-violet:        #8b5cf6;
    --sb-gold:          #fbbf24;
    --sb-ink:           #f1f5f9;
    --sb-link:          rgba(203, 213, 225, 0.82);
    --sb-link-hover:    rgba(203, 213, 225, 0.92);
    --sb-link-active:   rgba(203, 213, 225, 0.96);
    --sb-ink-muted:     rgba(241, 245, 249, 0.65);
    --sb-ink-faint:     rgba(241, 245, 249, 0.4);
    --sb-icon-muted:    rgba(100, 116, 139, 0.9);
    --sb-ease:          cubic-bezier(0.22, 1, 0.36, 1);

    width: 300px;
    max-width: 300px;
    min-width: 300px;
    transition: width 0.3s var(--sb-ease), max-width 0.3s var(--sb-ease), min-width 0.3s var(--sb-ease);
    background: linear-gradient(180deg, var(--sb-bg) 0%, #0f172a 100%);
    color: var(--sb-ink);
    height: 100vh;
    overflow: hidden;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4), 1px 0 0 var(--sb-border);
}

.sidebar.collapsed { 
    width: 78px; 
    max-width: 78px;
    min-width: 78px;
    overflow: visible; 
}

.sidebar.collapsed .sidebar-brand,
.sidebar.collapsed .nav-text,
.sidebar.collapsed .category-title,
.sidebar.collapsed .group-arrow {
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: opacity 0.25s var(--sb-ease), width 0.25s var(--sb-ease);
}

.sidebar.collapsed .nav-group-items {
    display: none !important;
}

/* Sidebar Header */
.sidebar-header { 
    padding: 0 16px; 
    border-bottom: 1px solid var(--sb-border); 
    display: flex; 
    align-items: center; 
    height: 56px;
    min-height: 56px;
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.08), transparent);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    color: var(--sb-ink);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
    transition: all 0.3s var(--sb-ease);
    letter-spacing: -0.02em;
}

.sidebar-logo i { 
    font-size: 28px; 
    margin-right: 10px; 
    color: var(--sb-accent); 
    min-width: 26px; 
    filter: drop-shadow(0 0 8px var(--sb-accent-glow)); 
    transition: transform 0.3s var(--sb-ease);
}

.sidebar-logo:hover i {
    transform: scale(1.1) rotate(-5deg);
}

.sidebar-brand {
    transition: opacity 0.3s var(--sb-ease);
    white-space: nowrap;
}

/* Toggle Button */
.sidebar-toggle {
    border: none;
    background: rgba(14, 165, 233, 0.1);
    color: var(--sb-accent);
    font-size: 1.1rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.25s var(--sb-ease);
    border: 1px solid transparent;
}

.sidebar-toggle:hover {
    background: rgba(14, 165, 233, 0.2);
    color: var(--sb-ink);
    border-color: var(--sb-accent);
    transform: scale(1.05);
}

/* Navigation */
.sidebar-nav { 
    flex: 1; 
    overflow-y: auto; 
    overflow-x: hidden; 
    padding: 8px 0 80px;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-category { 
    padding: 10px 14px 6px; 
    margin: 0; 
    line-height: 1.1; 
    cursor: pointer; 
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.05), transparent); 
    border-top: 1px solid var(--sb-border); 
    transition: all 0.25s var(--sb-ease);
}

.nav-category + .nav-category { margin-top: 2px; }
.nav-category:first-child { padding-top: 6px; }
.nav-category.open .category-title { color: var(--sb-ink); }
.nav-category.open { position: relative; }
.nav-category.open:before { 
    content: ""; 
    position: absolute; 
    left: 6px; 
    top: 4px; 
    bottom: 4px; 
    width: 3px; 
    background: linear-gradient(180deg, var(--sb-accent), var(--sb-teal)); 
    border-radius: 2px;
    box-shadow: 0 0 8px var(--sb-accent-glow);
}
.nav-category.search-hit .category-title { color: var(--sb-accent); }

.nav-category:first-child {
    margin-top: 0;
}

.category-title { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    gap: 6px; 
    font-size: 0.76rem; 
    font-weight: 700; 
    text-transform: capitalize; 
    letter-spacing: 0.03em; 
    color: var(--sb-ink-muted);
    transition: color 0.2s var(--sb-ease);
}
.cat-emoji { display: none; margin-right: 4px; font-size: 1.25rem; }
.sidebar.collapsed .cat-emoji { display: block; }
.sidebar.collapsed .category-title { display: none; }
.category-title .cat-text { flex: 1; }
.category-arrow { font-size: 11px; opacity: 0.8; transition: transform 0.25s var(--sb-ease); }
.nav-category.open .category-arrow { transform: rotate(180deg); }
.nav-category:hover .category-title { color: var(--sb-accent); }
.nav-category.active-cat .category-title { color: var(--sb-gold); }
.nav-category.active-cat.open:before { background: linear-gradient(180deg, var(--sb-gold), #f59e0b); }

.nav-item { margin: 1px 0; }

/* Favorites & link-row */
.favorites-block { padding: 6px 14px 4px; margin-top: 4px; }
.favorites-block .category-title { 
    font-size: 0.68rem; 
    letter-spacing: 0.06em; 
    color: var(--sb-gold); 
    display: flex; 
    align-items: center; 
    gap: 6px; 
}
.favorites-block .fas.fa-star { color: var(--sb-gold); }

.link-row { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 0 4px 0 0; 
    overflow: hidden;
    max-width: 100%;
}
.link-row .nav-link { 
    flex: 1; 
    margin: 1px 4px 1px 10px; 
    min-width: 0;
    overflow: hidden;
}
.fav-btn { 
    background: transparent; 
    border: none; 
    color: var(--sb-ink-faint); 
    width: 30px; 
    height: 32px; 
    min-width: 30px;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    border-radius: 6px; 
    transition: all 0.2s var(--sb-ease); 
    flex-shrink: 0;
}
.fav-btn:hover { background: rgba(251, 191, 36, 0.1); color: var(--sb-gold); }
.fav-btn.active { color: var(--sb-gold); }
.fav-btn i { pointer-events: none; }

.nav-separator { 
    height: 1px; 
    background: linear-gradient(90deg, transparent, var(--sb-border), transparent); 
    margin: 8px 14px; 
}

/* Sub-group headers (collapsible) */
.sub-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 14px 6px 12px;
    margin: 4px 8px 2px;
    cursor: pointer;
    border-radius: 8px;
    background: rgba(14, 165, 233, 0.04);
    border-left: 2px solid transparent;
    transition: all 0.25s var(--sb-ease);
}
.sub-group-header:hover {
    background: rgba(14, 165, 233, 0.08);
    border-left-color: var(--sb-accent);
}
.sub-group-header.open {
    border-left-color: var(--sb-accent);
    background: rgba(14, 165, 233, 0.12);
}
.sub-group-label {
    font-size: 0.68rem;
    color: var(--sb-ink-faint);
    letter-spacing: 0.04em;
    font-weight: 600;
    text-transform: uppercase;
}
.sub-group-header:hover .sub-group-label,
.sub-group-header.open .sub-group-label {
    color: var(--sb-ink-muted);
}
.sub-group-arrow {
    font-size: 0.6rem;
    color: var(--sb-ink-faint);
    transition: transform 0.25s var(--sb-ease);
}
.sub-group-header.open .sub-group-arrow {
    transform: rotate(180deg);
    color: var(--sb-accent);
}

.nav-link { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    padding: 5px 12px; 
    color: var(--sb-link); 
    text-decoration: none; 
    position: relative; 
    border-radius: 8px; 
    margin: 1px 8px; 
    font-weight: 500; 
    font-size: 0.8rem; 
    letter-spacing: 0.01em; 
    transition: all 0.2s var(--sb-ease); 
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 1px solid transparent;
}

.nav-link:hover { 
    background: rgba(14, 165, 233, 0.1); 
    color: #e2e8f0; 
    transform: translateX(2px);
}

.nav-link.active { 
    color: #7dd3fc; 
    background: rgba(14, 165, 233, 0.14); 
    font-weight: 500;
    box-shadow: none; 
    transform: none;
}

.nav-icon { 
    font-size: 13px; 
    width: 18px; 
    min-width: 18px;
    text-align: center; 
    color: var(--sb-ink-faint); 
    transition: all 0.25s var(--sb-ease); 
    flex-shrink: 0;
}

/* Renkli iconlar - ULTRA palette */
.nav-icon.fa-handshake { color: #10b981; }
.nav-icon.fa-tags { color: #f59e0b; }
.nav-icon.fa-calendar-alt { color: #0ea5e9; }
.nav-icon.fa-money-check-alt { color: #8b5cf6; }
.nav-icon.fa-globe { color: #06b6d4; }
.nav-icon.fa-money-bill-transfer { color: #22c55e; }
.nav-icon.fa-check-circle { color: #10b981; }
.nav-icon.fa-university { color: #0ea5e9; }
.nav-icon.fa-exclamation-triangle { color: #f59e0b; }
.nav-icon.fa-exchange-alt { color: #8b5cf6; }
.nav-icon.fa-tint { color: #06b6d4; }
.nav-icon.fa-clock { color: #ef4444; }
.nav-icon.fa-file-invoice-dollar { color: #22c55e; }
.nav-icon.fa-piggy-bank { color: #ec4899; }
.nav-icon.fa-sitemap { color: #6366f1; }
.nav-icon.fa-chart-pie { color: #f59e0b; }
.nav-icon.fa-layer-group { color: #8b5cf6; }
.nav-icon.fa-building { color: #0ea5e9; }
.nav-icon.fa-chart-bar { color: #10b981; }
.nav-icon.fa-users-cog { color: #6366f1; }
.nav-icon.fa-clipboard-check { color: #22c55e; }
.nav-icon.fa-money-bill-wave { color: #10b981; }
.nav-icon.fa-credit-card { color: #ec4899; }
.nav-icon.fa-user-tie { color: #8b5cf6; }
.nav-icon.fa-money-bill { color: #22c55e; }
.nav-icon.fa-calculator { color: #f59e0b; }
.nav-icon.fa-chart-area { color: #06b6d4; }
.nav-icon.fa-chart-line { color: #10b981; }
.nav-icon.fa-cogs { color: #6366f1; }
.nav-icon.fa-cube { color: #8b5cf6; }
.nav-icon.fa-brain { color: #ec4899; }
.nav-icon.fa-analytics { color: #f59e0b; }
.nav-icon.fa-list-ul { color: #0ea5e9; }
.nav-icon.fa-list { color: #06b6d4; }
.nav-icon.fa-door-open { color: #10b981; }
.nav-icon.fa-code-branch { color: #8b5cf6; }
.nav-icon.fa-bed { color: #ec4899; }
.nav-icon.fa-project-diagram { color: #6366f1; }
.nav-icon.fa-home { color: #f59e0b; }
.nav-icon.fa-shield-alt { color: #ef4444; }
.nav-icon.fa-users { color: #0ea5e9; }
.nav-icon.fa-user-tag { color: #8b5cf6; }
.nav-icon.fa-lock { color: #ef4444; }
.nav-icon.fa-share-alt { color: #06b6d4; }
.nav-icon.fa-coins { color: #f59e0b; }
.nav-icon.fa-tasks { color: #10b981; }
.nav-icon.fa-cog { color: #6366f1; }
.nav-icon.fa-file-alt { color: #8b5cf6; }
.nav-icon.fa-envelope { color: #ec4899; }
.nav-icon.fa-stream { color: #22c55e; }
.nav-icon.fa-sun { color: #f59e0b; }
.nav-icon.fa-snowflake { color: #06b6d4; }

.link-row .nav-link .nav-icon {
    color: var(--sb-icon-muted);
}

.link-row .nav-link:hover .nav-icon {
    color: rgba(148, 163, 184, 0.96);
}

.link-row .nav-link.active .nav-icon {
    color: #38bdf8;
}

.nav-text { 
    font-weight: 500; 
    color: inherit; 
    transition: color 0.2s var(--sb-ease); 
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.8rem;
}

/* Navigation Groups */
.nav-group {
    margin: 0.5rem 0;
}

.nav-group-toggle {
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    color: white;
    text-align: left;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0.375rem;
    margin: 0 0.5rem;
}

.nav-group-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffd700;
}

.nav-group-toggle .nav-icon {
    min-width: 20px;
    margin-right: 0.75rem;
    font-size: 1rem;
}

.nav-group-text {
    flex: 1;
    font-weight: 500;
    transition: opacity 0.3s ease, width 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
}

.nav-group-arrow {
    margin-left: auto;
    transition: transform 0.3s ease, opacity 0.3s ease;
    font-size: 0.75rem;
}

.nav-group-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-group-items.expanded {
    max-height: 500px;
    opacity: 1;
}

.nav-group-items .nav-item {
    padding-left: 1rem;
}

.nav-group-items .nav-link {
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    font-size: 0.9rem;
}

/* Collapsed sidebar states */
.sidebar.collapsed .sidebar-brand {
    opacity: 0;
    transform: scale(0.8);
}

.sidebar.collapsed .nav-text {
    opacity: 0;
    transform: translateX(-10px);
}

.sidebar.collapsed .category-title {
    opacity: 0;
    transform: translateX(-10px);
}

.sidebar.collapsed .nav-link { 
    justify-content:center; 
    margin:3px 6px; 
    padding:11px 8px; 
    border-radius:10px; 
    width: calc(100% - 12px);
    min-width: auto;
    overflow: visible;
}
.sidebar.collapsed .fav-btn { display:none !important; }
.sidebar.collapsed .nav-group-toggle { 
    justify-content:center; 
    padding:11px 8px; 
    margin:3px 6px; 
    border-radius:10px; 
    width: calc(100% - 12px);
}
.sidebar.collapsed .nav-group-toggle .nav-group-text { display:none; }

/* Tooltip support for group toggles */
.sidebar.collapsed .nav-group-toggle:hover::after { 
    content:attr(data-tooltip); 
    position:absolute; 
    left:70px; 
    top:50%; 
    transform:translateY(-50%); 
    background:#1e293b; 
    color:#f8fafc; 
    padding:6px 10px; 
    border-radius:6px; 
    font-size:.7rem; 
    letter-spacing:.3px; 
    white-space:nowrap; 
    z-index:101; 
    pointer-events:none; 
    box-shadow:0 4px 12px rgba(0,0,0,.45); 
    border:1px solid #2f4257; 
}
.sidebar.collapsed .nav-link:hover::before { 
    content:''; 
    position:absolute; 
    left:64px; 
    top:50%; 
    transform:translateY(-50%); 
    border:6px solid transparent; 
    border-right-color:#1e293b; 
    z-index:102; 
    filter:drop-shadow(0 2px 2px rgba(0,0,0,.35)); 
}

.sidebar.collapsed .nav-icon { 
    margin:0; 
    font-size:20px; 
    width: auto;
    min-width: auto;
}

.sidebar.collapsed .nav-category {
    display: none;
}

.sidebar.collapsed .sub-group-header {
    display: none;
}

/* Hover effects for collapsed sidebar */
.sidebar.collapsed .nav-link:hover {
    transform: none;
    margin-right: 0;
}

.sidebar.collapsed .nav-link:hover .nav-text {
    opacity: 0;
}

/* Tooltip for collapsed sidebar */
.sidebar.collapsed .nav-link {
    position: relative;
}

.sidebar.collapsed .nav-link:hover::after { 
    content: attr(data-tooltip); 
    position: absolute; 
    left: 72px; 
    top: 50%; 
    transform: translateY(-50%); 
    background: linear-gradient(135deg, #0c1222, #1e3a5f); 
    color: var(--sb-ink); 
    padding: 8px 12px; 
    border-radius: 8px; 
    font-size: 0.72rem; 
    font-weight: 600;
    letter-spacing: 0.02em; 
    white-space: nowrap; 
    z-index: 101; 
    pointer-events: none; 
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--sb-border); 
}

.sidebar.collapsed .nav-link:hover::before { 
    content: ''; 
    position: absolute; 
    left: 66px; 
    top: 50%; 
    transform: translateY(-50%); 
    border: 6px solid transparent; 
    border-right-color: #0c1222; 
    z-index: 102; 
}

/* Text transitions */
.nav-text, .sidebar-brand {
    transition: opacity 0.3s ease, width 0.3s ease;
    overflow: hidden;
    white-space: nowrap;
}

.sidebar.collapsed .nav-text,
.sidebar.collapsed .sidebar-brand { opacity:0; width:0; }

/* Collapsed: hide everything except category icons */
.sidebar.collapsed .nav-item,
.sidebar.collapsed .favorites-block,
.sidebar.collapsed .sidebar-search,
.sidebar.collapsed .nav-separator { display:none !important; }

/* Branch info (visible only expanded) */
.branch-info { 
    padding: 10px 14px 4px; 
    font-size: 0.78rem; 
    cursor: pointer; 
    display: flex; 
    gap: 6px; 
    align-items: center; 
    color: var(--sb-ink); 
    font-weight: 600;
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.08), transparent);
    border-radius: 8px;
    margin: 4px 8px;
    transition: all 0.25s var(--sb-ease);
}
.branch-info.large { padding: 12px 14px 8px; font-size: 0.9rem; font-weight: 700; }
.branch-info:hover { background: rgba(14, 165, 233, 0.15); }
.sidebar.collapsed .branch-info { display: none; }

/* Collapsed category presentation */
.sidebar.collapsed .nav-category { display:flex; justify-content:center; padding:12px 0; background:transparent; border:none; }
.sidebar.collapsed .nav-category:hover { background:rgba(255,255,255,.12); }

/* Differentiate item background */
.nav-item, .nav-sub-item { background:rgba(255,255,255,.015); border-radius:6px; }
.nav-item:hover { background:rgba(255,255,255,.05); }

/* Search */
.sidebar-search { padding: 12px 14px 4px; }
.search-wrapper { 
    position: relative; 
    display: flex; 
    align-items: center; 
    background: rgba(14, 165, 233, 0.06); 
    border: 1px solid var(--sb-border); 
    border-radius: 10px; 
    padding: 8px 12px;
    transition: all 0.25s var(--sb-ease);
}
.search-wrapper:focus-within {
    border-color: var(--sb-accent);
    background: rgba(14, 165, 233, 0.1);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}
.search-wrapper i { color: var(--sb-ink-faint); font-size: 14px; }
.menu-search-input { 
    flex: 1; 
    background: transparent; 
    border: none; 
    color: var(--sb-ink); 
    font-size: 0.85rem; 
    padding: 0 8px; 
    outline: none; 
}
.menu-search-input::placeholder { color: var(--sb-ink-faint); }
.clear-btn { background: transparent; border: none; color: var(--sb-ink-faint); cursor: pointer; padding: 2px; }
.clear-btn:hover { color: var(--sb-ink); }
.sidebar.collapsed .sidebar-search { display: none; }

/* Footer */
.sidebar-footer { 
    margin-top: auto; 
    padding: 12px 14px 16px; 
    font-size: 0.65rem; 
    color: var(--sb-ink-faint); 
    border-top: 1px solid var(--sb-border);
    background: linear-gradient(0deg, rgba(14, 165, 233, 0.04), transparent);
}
.sidebar-footer .footer-line { font-weight: 700; letter-spacing: 0.04em; color: var(--sb-ink-muted); }
.sidebar-footer .footer-sub { font-size: 0.6rem; margin-top: 2px; opacity: 0.75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-footer .footer-dot { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    width: 30px; 
    height: 30px; 
    border-radius: 50%; 
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(20, 184, 166, 0.15)); 
    font-size: 0.8rem; 
    color: var(--sb-accent); 
    margin: 6px 0 8px;
    border: 1px solid rgba(14, 165, 233, 0.3);
}
.sidebar.collapsed .sidebar-footer { padding: 8px 8px 12px; display: flex; justify-content: center; align-items: center; }

/* Scrollbars */
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { 
    background: linear-gradient(180deg, rgba(14, 165, 233, 0.3), rgba(20, 184, 166, 0.2)); 
    border-radius: 4px; 
}
.sidebar-nav:hover::-webkit-scrollbar-thumb { 
    background: linear-gradient(180deg, rgba(14, 165, 233, 0.5), rgba(20, 184, 166, 0.4)); 
}

/* Mobile styles */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        z-index: 900;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .sidebar-brand {
        opacity: 1 !important;
        transform: none !important;
    }
    
    .nav-text {
        opacity: 1 !important;
        transform: none !important;
    }
    
    .category-title {
        opacity: 1 !important;
        transform: none !important;
        display: block !important;
    }
    
    .nav-category {
        display: block !important;
    }
    
    .nav-link {
        margin-right: 1rem;
        justify-content: flex-start !important;
        border-radius: 0 25px 25px 0;
        padding: 0.75rem 1rem !important;
    }
    
    .nav-icon {
        margin-right: 0.75rem !important;
        font-size: 1.1rem !important;
    }
}

/* Active link enhancements */
.nav-link.active {
    position: relative;
}

.nav-link.active::before {
    content: none;
}

.nav-link.active .nav-icon {
    color: #38bdf8;
    background: rgba(14, 165, 233, 0.2);
    transform: none;
    filter: none;
}

/* Sub-group headers inside expanded nav sections */
/* NOTE: ::deep removed — this is a global CSS file, ::deep is not valid here */
.nav-sub-header {
    list-style: none;
    padding: 10px 16px 4px;
    margin-top: 4px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.nav-sub-header-text {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.40);
    user-select: none;
}

/* Animation for sidebar transitions */
.sidebar {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link,
.nav-icon,
.nav-text,
.sidebar-brand,
.category-title {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading state */
.nav-link.loading {
    pointer-events: none;
    opacity: 0.7;
}

.nav-link.loading .nav-icon {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Mobile-only close header/button */
.mobile-close-header { display: none; }
.mobile-close-btn {
    background: transparent;
    border: none;
    color: #e2e8f0;
    font-size: 20px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
}
.mobile-close-btn:hover { background: rgba(255,255,255,.1); color:#fff; }

@media (max-width: 991.98px) {
    .sidebar.mobile-open .mobile-close-header {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        padding: 8px 10px 0 10px;
    }
}

/* NEW Badge for Treasury pages */
.badge-new {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-size: 0.62rem;
    padding: 3px 8px;
    border-radius: 6px;
    margin-left: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    animation: badge-glow 2s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

@keyframes badge-glow {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(16, 185, 129, 0.4); }
    50% { opacity: 0.85; box-shadow: 0 0 12px rgba(16, 185, 129, 0.6); }
}

.treasury-new .nav-link {
    background: rgba(16, 185, 129, 0.08);
    border-left: 3px solid #10b981;
}

.treasury-new .nav-link:hover {
    background: rgba(16, 185, 129, 0.15);
}
