/* BPI Ops app shell navigation, topbar, sidebar, and mobile polish */

.nav a {
        display: flex;
        align-items: center;
        gap: 11px;
    }

    .nav-icon {
        width: 22px;
        height: 22px;
        border-radius: 8px;
        display: inline-grid;
        place-items: center;
        flex: 0 0 22px;
        font-size: 12px;
        color: #8fb4d9;
        background: rgba(148, 163, 184, 0.08);
        border: 1px solid rgba(148, 163, 184, 0.10);
    }

    .nav a.active .nav-icon {
        color: #e0f2fe;
        background: rgba(56, 189, 248, 0.16);
        border-color: rgba(56, 189, 248, 0.30);
    }

    .nav-admin-section {
        margin-top: 14px;
        padding-top: 14px;
        border-top: 1px solid rgba(148, 163, 184, 0.12);
    }

    .admin-gear-wrap {
        position: relative;
        display: inline-flex;
    }

    .admin-gear-btn {
        border: 1px solid rgba(148, 163, 184, 0.18);
        background: rgba(15, 23, 42, 0.78);
        color: #e5eefb;
        border-radius: 999px;
        padding: 9px 13px;
        font-weight: 900;
        font-size: 12px;
        cursor: pointer;
        box-shadow: 0 10px 30px rgba(0,0,0,0.20);
    }

    .admin-gear-menu {
        position: absolute;
        right: 0;
        top: calc(100% + 10px);
        width: 245px;
        border: 1px solid rgba(148, 163, 184, 0.16);
        border-radius: 18px;
        background: rgba(2, 6, 23, 0.98);
        box-shadow: 0 24px 70px rgba(0,0,0,0.42);
        padding: 8px;
        display: none;
        z-index: 50;
    }

    .admin-gear-wrap:hover .admin-gear-menu,
    .admin-gear-wrap:focus-within .admin-gear-menu {
        display: grid;
        gap: 4px;
    }

    .admin-gear-menu a {
        text-decoration: none;
        color: #dbeafe;
        padding: 11px 12px;
        border-radius: 13px;
        font-size: 13px;
        font-weight: 800;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .admin-gear-menu a:hover {
        background: rgba(56, 189, 248, 0.12);
        color: #ffffff;
    }

    .admin-gear-menu .muted {
        color: #7dd3fc;
        font-size: 11px;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        padding: 9px 12px 5px;
        font-weight: 900;
    }
    .premium-panel {
        border-radius: 22px;
    }

    .command-chip {
        backdrop-filter: blur(12px);
    }

    @media (max-width: 900px) {
        .admin-gear-wrap {
            display: none;
        }
    }

    .topbar {
        min-height: 74px;
        padding: 18px 24px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 18px;
        border-bottom: 1px solid rgba(148, 163, 184, 0.10);
        background:
            linear-gradient(180deg, rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0.40));
        backdrop-filter: blur(14px);
    }

    .topbar-left {
        display: flex;
        align-items: center;
        gap: 14px;
        min-width: 0;
    }

    .topbar-title-wrap {
        min-width: 0;
    }

    .topbar-title-wrap h2 {
        margin: 0;
        color: #f8fafc;
        font-size: 22px;
        line-height: 1.05;
        letter-spacing: -0.045em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .topbar-title-wrap .subtitle {
        margin: 5px 0 0;
        color: rgba(203, 213, 225, 0.62);
        font-size: 12px;
        font-weight: 750;
    }

    .topbar-right {
        display: flex;
        align-items: center;
        gap: 10px;
        flex: 0 0 auto;
    }

    .topbar-user-pill {
        display: flex;
        align-items: center;
        gap: 10px;
        border: 1px solid rgba(148, 163, 184, 0.14);
        background: rgba(15, 23, 42, 0.56);
        border-radius: 999px;
        padding: 7px 11px 7px 7px;
        color: #e5eefb;
    }

    .topbar-avatar {
        width: 28px;
        height: 28px;
        border-radius: 999px;
        display: grid;
        place-items: center;
        background: rgba(56, 189, 248, 0.16);
        border: 1px solid rgba(56, 189, 248, 0.24);
        color: #bae6fd;
        font-size: 12px;
        font-weight: 950;
        text-transform: uppercase;
    }

    .topbar-user-meta {
        display: grid;
        line-height: 1.1;
    }

    .topbar-user-meta strong {
        font-size: 12px;
        font-weight: 950;
        color: #f8fafc;
        max-width: 130px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .topbar-user-meta span {
        margin-top: 2px;
        font-size: 10px;
        font-weight: 900;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: #8fa3bd;
    }

    .topbar-logout {
        text-decoration: none;
        border: 1px solid rgba(248, 113, 113, 0.16);
        background: rgba(127, 29, 29, 0.10);
        color: #fecaca;
        border-radius: 999px;
        padding: 9px 12px;
        font-size: 12px;
        font-weight: 950;
    }

    .topbar-logout:hover {
        background: rgba(127, 29, 29, 0.20);
        color: #fff;
    }

    @media (max-width: 860px) {
        .topbar {
            padding: 14px 16px;
            min-height: 66px;
        }

        .topbar-right {
            display: none;
        }

        .topbar-title-wrap h2 {
            font-size: 19px;
        }
    }



    .sidebar {
        border-right: 1px solid rgba(148, 163, 184, 0.10);
        background:
            linear-gradient(180deg, rgba(2, 6, 23, 0.98), rgba(8, 13, 28, 0.98));
    }

    .brand {
        padding: 18px 18px 14px !important;
        border-bottom: 1px solid rgba(148, 163, 184, 0.10);
        margin-bottom: 8px;
    }

    .brand-logo {
        height: 32px !important;
        width: 32px !important;
        border-radius: 10px !important;
        box-shadow: 0 8px 22px rgba(0,0,0,0.24);
    }

    .brand h1 {
        font-size: 16px !important;
        letter-spacing: -0.04em;
        color: #f8fafc;
    }

    .brand p {
        font-size: 10px !important;
        font-weight: 850;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: rgba(203, 213, 225, 0.52);
    }

    .nav {
        padding: 10px 12px 16px;
    }

    .nav-section {
        margin-bottom: 16px;
    }

    .nav-section-label {
        margin: 0 8px 7px;
        color: rgba(148, 163, 184, 0.62);
        font-size: 10px;
        font-weight: 950;
        letter-spacing: 0.15em;
        text-transform: uppercase;
    }

    .nav a {
        min-height: 38px;
        padding: 8px 10px;
        border-radius: 13px;
        color: rgba(226, 232, 240, 0.78);
        font-size: 13px;
        font-weight: 850;
        border: 1px solid transparent;
        background: transparent;
        transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, transform 0.14s ease;
    }

    .nav a:hover {
        color: #ffffff;
        background: rgba(148, 163, 184, 0.075);
        border-color: rgba(148, 163, 184, 0.10);
    }

    .nav a.active {
        color: #ffffff;
        background:
            linear-gradient(135deg, rgba(37, 99, 235, 0.26), rgba(14, 165, 233, 0.14));
        border-color: rgba(96, 165, 250, 0.26);
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 24px rgba(37, 99, 235, 0.10);
    }

    .nav-icon {
        width: 20px !important;
        height: 20px !important;
        flex-basis: 20px !important;
        border-radius: 7px !important;
        font-size: 11px !important;
    }

    .nav-admin-section {
        margin-top: 8px !important;
        padding-top: 12px !important;
    }

    .nav-logout-section {
        margin-top: 10px !important;
        padding-top: 12px !important;
    }

    .logout-link {
        color: rgba(254, 202, 202, 0.88) !important;
        background: transparent !important;
        border-color: rgba(248, 113, 113, 0.10) !important;
    }

    .logout-link:hover {
        background: rgba(127, 29, 29, 0.18) !important;
        color: #fecaca !important;
    }

    .mobile-nav-close {
        border: 1px solid rgba(148, 163, 184, 0.14);
        background: rgba(15, 23, 42, 0.72);
        color: #cbd5e1;
        border-radius: 10px;
    }



    @media (max-width: 860px) {
        body {
            font-size: 14px;
        }

        .layout {
            min-height: 100vh;
        }

        .main-content {
            padding-bottom: 68px !important;
        }

        .page-content {
            padding: 14px !important;
        }

        .topbar {
            min-height: 58px !important;
            padding: 10px 12px !important;
            gap: 10px !important;
        }

        .topbar-left {
            gap: 10px !important;
            width: 100%;
        }

        .mobile-nav-toggle {
            width: 36px !important;
            height: 36px !important;
            min-width: 36px !important;
            border-radius: 12px !important;
            font-size: 18px !important;
            display: grid !important;
            place-items: center !important;
            padding: 0 !important;
        }

        .topbar-title-wrap h2 {
            font-size: 17px !important;
            line-height: 1.05 !important;
            letter-spacing: -0.035em !important;
            max-width: calc(100vw - 82px);
        }

        .topbar-title-wrap .subtitle {
            margin-top: 3px !important;
            font-size: 10px !important;
            line-height: 1.1 !important;
        }

        .sidebar {
            width: min(82vw, 310px) !important;
        }

        .brand {
            padding: 14px 14px 10px !important;
            gap: 10px !important;
        }

        .brand-logo {
            height: 30px !important;
            width: 30px !important;
        }

        .brand h1 {
            font-size: 15px !important;
        }

        .brand p {
            font-size: 9px !important;
        }

        .mobile-nav-close {
            width: 32px !important;
            height: 32px !important;
            padding: 0 !important;
            display: grid !important;
            place-items: center !important;
        }

        .nav {
            padding: 8px 10px 14px !important;
        }

        .nav-section {
            margin-bottom: 11px !important;
        }

        .nav-section-label {
            margin: 0 8px 5px !important;
            font-size: 9px !important;
            letter-spacing: 0.14em !important;
        }

        .nav a {
            min-height: 35px !important;
            padding: 7px 9px !important;
            border-radius: 12px !important;
            font-size: 12px !important;
            gap: 9px !important;
        }

        .nav-icon {
            width: 18px !important;
            height: 18px !important;
            flex-basis: 18px !important;
            font-size: 10px !important;
            border-radius: 6px !important;
        }

        .nav-admin-section,
        .nav-logout-section {
            margin-top: 7px !important;
            padding-top: 9px !important;
        }

        .mobile-bottom-nav {
            height: 58px !important;
            padding: 6px 8px calc(6px + env(safe-area-inset-bottom)) !important;
            border-top: 1px solid rgba(148, 163, 184, 0.12) !important;
            background: rgba(2, 6, 23, 0.94) !important;
            backdrop-filter: blur(16px) !important;
        }

        .mobile-bottom-nav a,
        .mobile-bottom-nav button {
            min-height: 44px !important;
            border-radius: 13px !important;
            font-size: 11px !important;
            padding: 5px 6px !important;
        }

        .mobile-bottom-nav span {
            font-size: 17px !important;
            line-height: 1 !important;
        }

        .mobile-bottom-nav small {
            font-size: 9px !important;
            margin-top: 2px !important;
        }

        .flash-wrap {
            padding: 0 14px !important;
            margin-top: 10px !important;
        }

        .flash {
            font-size: 12px !important;
            padding: 10px 12px !important;
            border-radius: 13px !important;
        }
    }

    @media (max-width: 420px) {
        .page-content {
            padding: 12px !important;
        }

        .topbar-title-wrap h2 {
            font-size: 16px !important;
        }

        .sidebar {
            width: 86vw !important;
        }
    }

/* =========================================================
   REAL layout scroll fix
   Actual wrapper is .layout, not .app-shell
   ========================================================= */

@media (min-width: 861px) {
    html,
    body {
        height: 100% !important;
        overflow: hidden !important;
    }

    body {
        margin: 0 !important;
        background: #050b16 !important;
    }

    .layout {
        height: 100vh !important;
        min-height: 100vh !important;
        display: grid !important;
        grid-template-columns: 286px minmax(0, 1fr) !important;
        overflow: hidden !important;
        background: #050b16 !important;
    }

    .sidebar {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        width: 286px !important;
        height: 100vh !important;
        max-height: 100vh !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        border-right: 1px solid rgba(148, 163, 184, 0.10) !important;
        background: #050b16 !important;
        scrollbar-width: thin;
        scrollbar-color: rgba(148, 163, 184, 0.26) transparent;
    }

    .sidebar::-webkit-scrollbar {
        width: 8px;
    }

    .sidebar::-webkit-scrollbar-thumb {
        background: rgba(148, 163, 184, 0.24);
        border-radius: 999px;
    }

    .sidebar::-webkit-scrollbar-track {
        background: transparent;
    }

    .main-content {
        height: 100vh !important;
        max-height: 100vh !important;
        min-width: 0 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        background: #050b16 !important;
        scrollbar-width: thin;
        scrollbar-color: rgba(148, 163, 184, 0.26) transparent;
    }

    .main-content::-webkit-scrollbar {
        width: 8px;
    }

    .main-content::-webkit-scrollbar-thumb {
        background: rgba(148, 163, 184, 0.24);
        border-radius: 999px;
    }

    .main-content::-webkit-scrollbar-track {
        background: transparent;
    }

    .topbar {
        position: sticky !important;
        top: 0 !important;
        z-index: 40 !important;
        min-height: 58px !important;
        height: 58px !important;
        padding: 0 22px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        background: #050b16 !important;
        border-bottom: 1px solid rgba(148, 163, 184, 0.10) !important;
        box-shadow: none !important;
    }

    .topbar-left {
        display: none !important;
    }

    .mobile-nav-toggle {
        display: none !important;
    }

    .topbar-right {
        margin-left: auto !important;
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
    }

    .nav-logout-section {
        display: none !important;
    }
}

/* Mobile keeps normal page scroll/drawer behavior */
@media (max-width: 860px) {
    html,
    body {
        height: auto !important;
        overflow: auto !important;
    }

    .layout {
        display: block !important;
        min-height: 100vh !important;
        overflow: visible !important;
    }

    .main-content {
        height: auto !important;
        min-height: 100vh !important;
        overflow: visible !important;
    }
}

/* Keep logout visible on mobile topbar */
@media (max-width: 860px) {
    .topbar-right {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        margin-left: auto !important;
    }

    .topbar-logout {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        min-height: 36px !important;
        padding: 0 10px !important;
        font-size: 12px !important;
        white-space: nowrap !important;
    }

    .topbar-user-pill {
        display: inline-flex !important;
        min-height: 36px !important;
    }

    .topbar-avatar {
        width: 28px !important;
        height: 28px !important;
        font-size: 11px !important;
    }
}

/* ==========================================================
   Premium sidebar + topbar polish
   Scoped shell-only cleanup
   ========================================================== */

.sidebar {
    box-shadow: 18px 0 40px rgba(2, 6, 23, 0.22);
}

.brand {
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 14px;
    margin-bottom: 8px;
}

.nav {
    gap: 14px;
}

.nav-section {
    padding-top: 2px;
}

.nav-section + .nav-section {
    margin-top: 6px;
}

.nav-section-label {
    font-size: 10px !important;
    letter-spacing: .13em !important;
    font-weight: 850 !important;
    color: rgba(226, 232, 240, 0.48) !important;
    padding: 0 10px 6px !important;
}

.nav a {
    position: relative;
    min-height: 38px;
    border-radius: 12px;
    padding: 9px 10px;
    color: rgba(226, 232, 240, 0.78);
    transition: background .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.nav a:hover {
    background: rgba(255,255,255,0.075);
    color: #ffffff;
    transform: translateX(1px);
}

.nav a.active {
    background: linear-gradient(135deg, rgba(47,140,255,.24), rgba(37,99,235,.14)) !important;
    color: #ffffff !important;
    box-shadow: inset 0 0 0 1px rgba(96,165,250,.22), 0 10px 22px rgba(2,6,23,.16);
}

.nav a.active::before {
    content: "";
    position: absolute;
    left: -8px;
    top: 9px;
    bottom: 9px;
    width: 3px;
    border-radius: 999px;
    background: #60a5fa;
}

.nav-icon {
    width: 22px !important;
    height: 22px !important;
    display: inline-grid !important;
    place-items: center !important;
    border-radius: 8px;
    background: rgba(255,255,255,0.055);
    color: rgba(226,232,240,.82);
    font-size: 13px;
}

.nav a.active .nav-icon {
    background: rgba(96,165,250,.18);
    color: #bfdbfe;
}

.nav-utility-section {
    margin-top: auto !important;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.admin-center-link {
    background: rgba(255,255,255,0.045);
    border: 1px solid rgba(255,255,255,0.075);
}

.admin-center-link .nav-icon {
    background: rgba(255,255,255,0.08);
}

.nav-logout-section {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 10px;
}

.topbar {
    backdrop-filter: blur(14px);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.topbar-command-search {
    height: 38px;
    min-width: 320px;
    max-width: 520px;
    width: min(44vw, 520px);
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    padding: 0 10px 0 12px;
    box-shadow: 0 8px 18px rgba(15,23,42,0.05);
}

.topbar-command-search input {
    border: 0;
    outline: 0;
    background: transparent;
    width: 100%;
    min-width: 0;
    font-size: 13px;
    color: #0f172a;
}

.topbar-command-search input::placeholder {
    color: #94a3b8;
}

.topbar-search-icon {
    color: #64748b;
    font-size: 15px;
}

.topbar-command-search kbd {
    border: 1px solid #d8dee8;
    background: #f8fafc;
    color: #64748b;
    border-radius: 7px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.topbar-context-pill {
    height: 34px;
    display: flex;
    align-items: center;
    padding: 0 11px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .topbar-command-search {
        min-width: 0;
        width: 100%;
    }

    .topbar-context-pill {
        display: none;
    }
}

@media (max-width: 720px) {
    .topbar-command-search {
        display: none;
    }
}

/* Topbar admin gear */
.topbar-admin-gear {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    text-decoration: none;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(148, 163, 184, 0.24);
    color: #e2e8f0;
    font-size: 15px;
    transition: background .16s ease, transform .16s ease, box-shadow .16s ease, color .16s ease;
}

.topbar-admin-gear:hover {
    background: rgba(59,130,246,0.18);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(2,6,23,.18);
}

.topbar-admin-gear.active {
    background: linear-gradient(135deg, rgba(47,140,255,.28), rgba(37,99,235,.18));
    color: #ffffff;
    border-color: rgba(96,165,250,.35);
}

/* ==========================================================
   Sharp UI polish — clearer font, less cartoon, better contrast
   ========================================================== */

html,
body,
button,
input,
select,
textarea {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: geometricPrecision;
}

/* Brand: sharper, less fuzzy */
.brand h1 {
    font-weight: 900 !important;
    letter-spacing: -0.035em !important;
    color: #f8fafc !important;
}

.brand p {
    font-weight: 800 !important;
    letter-spacing: .14em !important;
    color: rgba(226, 232, 240, 0.58) !important;
}

/* Sidebar labels: clearer but still premium */
.nav-section-label {
    color: rgba(226, 232, 240, 0.62) !important;
    font-weight: 900 !important;
    letter-spacing: .16em !important;
}

/* Sidebar links: make readable, not gray mush */
.nav a {
    color: rgba(241, 245, 249, 0.86) !important;
    font-weight: 800 !important;
    letter-spacing: -0.015em !important;
}

.nav a span:not(.nav-icon) {
    color: inherit !important;
}

.nav a:hover {
    color: #ffffff !important;
}

/* Active state: crisp, not bubbly */
.nav a.active {
    background: rgba(37, 99, 235, 0.22) !important;
    border: 1px solid rgba(96, 165, 250, 0.34) !important;
    box-shadow: inset 3px 0 0 #38bdf8, 0 8px 18px rgba(2, 6, 23, 0.18) !important;
}

/* Remove cartoon icon bubbles */
.nav-icon {
    background: transparent !important;
    border: 0 !important;
    color: rgba(203, 213, 225, 0.82) !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Symbol", "Segoe UI", Arial, sans-serif !important;
}

.nav a.active .nav-icon,
.nav a:hover .nav-icon {
    color: #93c5fd !important;
    background: transparent !important;
}

/* Topbar user pill: sharper text */
.topbar-user-pill strong {
    font-weight: 900 !important;
    letter-spacing: -0.025em !important;
    color: #f8fafc !important;
}

.topbar-user-pill span {
    font-weight: 850 !important;
    letter-spacing: .12em !important;
    color: rgba(226, 232, 240, 0.62) !important;
}

/* Admin gear: no emoji/cartoon rendering */
.topbar-admin-gear {
    font-family: Arial, "Helvetica Neue", sans-serif !important;
    font-weight: 900 !important;
    font-size: 14px !important;
    line-height: 1 !important;
    border-radius: 8px !important;
    background: rgba(15, 23, 42, 0.84) !important;
    color: rgba(226, 232, 240, 0.88) !important;
}

/* Buttons/chips: sharper text */
.command-chip,
.summary-pill,
.btn-primary,
button,
a.btn-primary {
    font-weight: 850 !important;
    letter-spacing: -0.015em;
}

/* Dashboard headings: cleaner and more legible */
.main-content h1,
.main-content h2,
.main-content h3,
.panel h1,
.panel h2,
.panel h3,
.premium-panel h1,
.premium-panel h2,
.premium-panel h3 {
    font-weight: 900 !important;
    letter-spacing: -0.04em !important;
}

/* Small helper text should still be visible */
.main-content p,
.panel p,
.premium-panel p,
.stat-label,
.metric-label {
    color: rgba(203, 213, 225, 0.78);
    font-weight: 650;
}

/* Topbar notification bell */
.topbar-notification-bell {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: rgba(226, 232, 240, .92);
    background: rgba(15, 23, 42, .76);
    border: 1px solid rgba(148, 163, 184, .22);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 10px 24px rgba(0,0,0,.18);
    transition: transform .14s ease, border-color .14s ease, background .14s ease;
}

.topbar-notification-bell:hover,
.topbar-notification-bell.active {
    transform: translateY(-1px);
    background: rgba(30, 41, 59, .92);
    border-color: rgba(96, 165, 250, .42);
}

.topbar-bell-icon {
    font-size: 18px;
    line-height: 1;
    filter: drop-shadow(0 5px 12px rgba(59, 130, 246, .18));
}

.topbar-notification-badge {
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border: 2px solid #020617;
    font-size: 11px;
    font-weight: 950;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .35);
}

/* Clean compact sidebar nav polish */
.sidebar .nav {
    padding: 10px 10px 18px;
}

.sidebar .nav-section {
    margin: 0;
    padding: 0;
}

.sidebar .nav-section + .nav-section {
    margin-top: 18px;
}

.sidebar .nav-section-label {
    margin: 0 0 7px;
    padding: 0 12px;
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-weight: 900;
    color: rgba(203, 213, 225, 0.58);
}

.sidebar .nav-section a {
    min-height: 42px;
    margin: 2px 0;
    padding: 0 12px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(226, 232, 240, 0.86);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-decoration: none;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.sidebar .nav-section a:hover {
    background: rgba(148, 163, 184, 0.10);
    color: #ffffff;
    transform: translateX(2px);
}

.sidebar .nav-section a.active {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.20), rgba(59, 130, 246, 0.13));
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.sidebar .nav-icon {
    width: 22px;
    min-width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    font-size: 15px;
    line-height: 1;
    color: rgba(203, 213, 225, 0.72);
    opacity: 1;
}

.sidebar .nav-section a.active .nav-icon,
.sidebar .nav-section a:hover .nav-icon {
    color: #ffffff;
}

.sidebar .nav-section a span:last-child {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
}

.sidebar .nav-logout-section {
    margin-top: 22px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.13);
}
