
    /* ==================== SHARED ==================== */
    .notification-bell-container { position: relative; display: inline-block; }
    .notification-bell-icon { font-size: 16px; color: rgba(255,255,255,0.75); transition: color 0.3s ease; }
    .notification-bell-link:hover .notification-bell-icon { color: rgba(255,255,255,0.9); }
    .notification-badge {
        position: absolute; top: -8px; right: -10px;
        background-color: var(--alv-accent); color: var(--alv-on-accent); border-radius: 50%;
        width: 16px; height: 16px; display: flex; align-items: center;
        justify-content: center; font-size: 10px; font-weight: bold;
        line-height: 1; border: 2px solid var(--alv-ink);
        box-shadow: 0 1px 3px rgba(0,0,0,0.3); z-index: 1;
    }
    .notification-badge[data-count="0"], .notification-badge[data-count=""] { display: none; }
    .notification-badge.large-count { width: 20px; height: 16px; border-radius: 8px; right: -14px; font-size: 9px; }
    @keyframes subtlePulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
    .notification-badge.has-notifications { animation: subtlePulse 3s ease-in-out infinite; }
    .notification-bell-link { color: rgba(255,255,255,.5) !important; transition: color 0.3s ease; padding: 8px 16px !important; }
    .notification-bell-link:hover { color: rgba(255,255,255,.75) !important; text-decoration: none; }

    /* ==================== TOP NAV DROPDOWNS ==================== */
    .dropdown-menu { background-color: var(--alv-ink-strong); border: 1px solid var(--alv-ink-soft); border-radius: var(--alv-radius-sm); box-shadow: 0 4px 12px rgba(0,0,0,0.3); margin-top: 0; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease; }
    .dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
    .dropdown-menu:hover { display: block; opacity: 1; visibility: visible; transform: translateY(0); }
    .dropdown-item { color: rgba(255,255,255,0.8) !important; padding: 10px 20px; transition: all 0.3s ease; }
    .dropdown-item:hover { background-color: var(--alv-accent); color: var(--alv-on-accent) !important; }
    .dropdown-divider { border-color: var(--alv-ink-soft); }

    /* ==================== LAYOUT ==================== */
    body.has-sidebar { margin: 0; padding: 0; }

    /* Sidebar */
    .sidebar {
        position: fixed; top: 0; left: 0; height: 100vh; width: 240px;
        background-color: var(--alv-ink); z-index: 1000;
        display: flex; flex-direction: column;
        transition: width 0.3s ease; overflow: hidden;
    }
    .sidebar.minimised {
        width: 60px;
        overflow: visible;
    }
    .sidebar.minimised .sidebar-nav {
        overflow: visible;
    }
    .sidebar.minimised .sidebar-section-items {
        overflow: visible;
    }
    .sidebar.minimised .sidebar-user {
        overflow: visible;
    }

    .sidebar-logo { padding: 16px 12px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid rgba(255,255,255,0.1); flex-shrink: 0; text-decoration: none; }
    .sidebar-logo:hover { background: rgba(255,255,255,0.05); text-decoration: none; }
    .sidebar-logo img { width: 40px; height: 40px; object-fit: contain; flex-shrink: 0; }
    .sidebar-logo-text { color: var(--alv-on-accent); font-weight: 700; font-size: 14px; white-space: nowrap; transition: opacity 0.2s ease; }
    .sidebar.minimised .sidebar-logo-text { opacity: 0; width: 0; overflow: hidden; }

    .sidebar-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 8px 0; }
    .sidebar-nav::-webkit-scrollbar { width: 4px; }
    .sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }

    .sidebar-section-header { display: flex; align-items: center; padding: 10px 16px 6px; color: rgba(255,255,255,0.5); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; cursor: pointer; transition: color 0.2s; white-space: nowrap; user-select: none; }
    .sidebar-section-header:hover { color: rgba(255,255,255,0.8); }
    .sidebar-section-header i.section-icon { width: 28px; font-size: 13px; flex-shrink: 0; }
    .sidebar-section-header .section-label { flex: 1; transition: opacity 0.2s; }
    .sidebar-section-header .chevron { font-size: 10px; transition: transform 0.2s, opacity 0.2s; }
    .sidebar-section-header.collapsed .chevron { transform: rotate(-90deg); }
    .sidebar.minimised .sidebar-section-header .section-label,
    .sidebar.minimised .sidebar-section-header .chevron { opacity: 0; width: 0; overflow: hidden; }

    .sidebar-section-items { overflow: hidden; transition: max-height 0.3s ease; max-height: 500px; }
    .sidebar-section-items.collapsed { max-height: 0; }
    .sidebar.minimised .sidebar-section-items { max-height: 500px !important; }

    .sidebar-link { display: flex; align-items: center; padding: 9px 16px; color: rgba(255,255,255,0.7); text-decoration: none; font-size: 13px; transition: all 0.2s; white-space: nowrap; position: relative; }
    .sidebar-link:hover { background: rgba(255,255,255,0.08); color: var(--alv-on-accent); text-decoration: none; }
    .sidebar-link.active { background: var(--alv-accent); color: var(--alv-on-accent); }
    .sidebar-link.active:hover { background: var(--alv-accent-ink); }
    .sidebar-link i { width: 28px; font-size: 14px; flex-shrink: 0; text-align: center; }
    .sidebar-link .link-text { transition: opacity 0.2s; }
    .sidebar.minimised .sidebar-link .link-text { opacity: 0; width: 0; overflow: hidden; }
    .sidebar.minimised .sidebar-link:hover::after {
        content: attr(data-tooltip);
        position: absolute;
        left: 65px;
        top: 50%;
        transform: translateY(-50%);
        background: var(--alv-ink-strong);
        color: var(--alv-on-accent);
        padding: 4px 10px;
        border-radius: 4px;
        font-size: 12px;
        white-space: nowrap;
        z-index: 9999;
        box-shadow: 0 2px 8px rgba(0,0,0,0.3);
        pointer-events: none;
    }

    .sidebar-divider { border: none; border-top: 1px solid rgba(255,255,255,0.1); margin: 4px 0; }

    .sidebar-toggle { position: absolute; top: 50%; right: -12px; transform: translateY(-50%); width: 24px; height: 24px; background: var(--alv-accent); border: none; border-radius: 50%; color: var(--alv-on-accent); font-size: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 1001; box-shadow: 0 2px 6px rgba(0,0,0,0.3); transition: background 0.2s; }
    .sidebar-toggle:hover { background: var(--alv-accent-ink); }

    .sidebar-user { padding: 12px 16px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; gap: 10px; flex-shrink: 0; overflow: hidden; }
    .sidebar-user-info { flex: 1; min-width: 0; transition: opacity 0.2s; }
    .sidebar.minimised .sidebar-user-info { opacity: 0; width: 0; overflow: hidden; }
    .sidebar-username { color: var(--alv-on-accent); font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .sidebar-user-role { color: rgba(255,255,255,0.5); font-size: 10px; }
    .sidebar-logout { color: rgba(255,255,255,0.5); font-size: 13px; text-decoration: none; padding: 4px; transition: color 0.2s; flex-shrink: 0; }
    .sidebar-logout:hover { color: var(--alv-on-accent); text-decoration: none; }
    .sidebar.minimised .sidebar-logout { display: none; }

    /* Content wrapper */
    .main-content { transition: margin-left 0.3s ease; }
    .main-content.with-sidebar { margin-left: 240px; padding: 20px; min-height: 100vh; }
    .main-content.with-sidebar.minimised { margin-left: 60px; }
    .main-content.with-topnav { padding: 0; }

    /* ==================== MOBILE OVERRIDES (≤991px) ==================== */
    /* When viewport drops below 992px, sidebar users get the top nav instead. */
    @media (max-width: 991px) {
        .sidebar { display: none !important; }
        body.has-sidebar { margin: 0; padding: 0; }
        body.has-sidebar .main-content.with-sidebar {
            margin-left: 0 !important;
            /* Match the top-nav layout's Bootstrap .container gutters on mobile
               so Side Menu mode isn't full-bleed (buttons no longer touch edges). */
            padding: 15px 15px !important;
        }
        body.has-sidebar .main-content.with-sidebar.minimised {
            margin-left: 0 !important;
        }
        /* Ensure mobile-fallback top nav is visible for sidebar users */
        body.has-sidebar .navbar.mobile-fallback-nav { display: flex !important; }
    }
    /* On desktop, hide the mobile-fallback nav when user prefers sidebar */
    @media (min-width: 992px) {
        body.has-sidebar .navbar.mobile-fallback-nav { display: none !important; }
    }
    