/* /Layout/MainLayout.razor.rz.scp.css */
/* ============================================================
   App shell: sidebar (desktop) + topbar + bottom nav (mobile)
   ============================================================ */
.app-shell[b-iip87g36ih] {
    display: grid;
    min-height: 100dvh;
    grid-template-columns: 1fr;
    grid-template-rows: var(--es-header-h) var(--es-mobilenav-h) 1fr;
    grid-template-areas:
        "topbar"
        "topnav"
        "main";
}

/* ===== Top bar (mobile) — glass on scroll ===== */
.app-topbar[b-iip87g36ih] {
    grid-area: topbar;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: env(safe-area-inset-top, 0) 1rem 0;
    padding-left: max(1rem, env(safe-area-inset-left, 0));
    padding-right: max(1rem, env(safe-area-inset-right, 0));
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--es-border);
    position: sticky;
    top: 0;
    z-index: 20;
}
.app-topbar__brand[b-iip87g36ih] {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--es-text);
    font-size: 1.05rem;
}

/* ===== Sidebar (desktop) ===== */
.app-sidebar[b-iip87g36ih] {
    display: none;
}

/* ===== Main content ===== */
.app-main[b-iip87g36ih] {
    grid-area: main;
    overflow-y: auto;
    background: var(--es-bg);
}
.app-main__inner[b-iip87g36ih] {
    max-width: 760px;
    margin: 0 auto;
    padding: 1rem 1rem calc(1.5rem + env(safe-area-inset-bottom, 0));
}

/* ===== Top nav (mobile) — sits directly under the topbar ===== */
.app-topnav[b-iip87g36ih] {
    grid-area: topnav;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--es-border);
    position: sticky;
    top: var(--es-header-h);
    z-index: 19;
}

/* ============================================================
   Desktop layout: sidebar replaces topbar+bottomnav
   ============================================================ */
@media (min-width: 900px) {
    .app-shell[b-iip87g36ih] {
        /* Lock the shell to the viewport so the grid row is bounded.
           Without this, .app-main grows to fit its content, the whole page
           scrolls, and the sticky sidebar's grid cell scrolls away with it. */
        height: 100dvh;
        min-height: 0;
        grid-template-columns: var(--es-sidebar-w) 1fr;
        grid-template-rows: 1fr;
        grid-template-areas: "sidebar main";
        overflow: hidden;
    }
    .app-topbar[b-iip87g36ih] { display: none; }
    .app-topnav[b-iip87g36ih] { display: none; }

    .app-sidebar[b-iip87g36ih] {
        grid-area: sidebar;
        display: flex;
        flex-direction: column;
        background: var(--es-surface);
        border-right: 1px solid var(--es-border);
        padding: 1.6rem 1rem 1.2rem;
        /* Sticky no longer needed once the shell is viewport-locked, but keep it
           as a fallback for any future layout tweak that re-enables page scroll. */
        position: sticky;
        top: 0;
        height: 100dvh;
        overflow-y: auto;
    }
    .app-sidebar__brand[b-iip87g36ih] {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 0 0.5rem 1.8rem;
        font-weight: 700;
        font-size: 1.12rem;
        letter-spacing: -0.02em;
        color: var(--es-text);
    }
    .app-sidebar__name[b-iip87g36ih] { letter-spacing: -0.015em; }
    .app-sidebar__footer[b-iip87g36ih] {
        margin-top: auto;
        padding: 1.2rem 0.5rem 0;
        border-top: 1px solid var(--es-border);
    }
    .app-main[b-iip87g36ih] {
        /* min-height:0 lets the grid row shrink to the available 1fr space
           so that overflow-y:auto on this element actually creates a scrollbox
           instead of the row stretching to fit its content. */
        min-height: 0;
    }
    .app-main__inner[b-iip87g36ih] {
        max-width: 880px;
        padding: 1.6rem 2rem 2.5rem;
    }
}

.app-sidebar__logo[b-iip87g36ih] {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--es-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    box-shadow: 0 2px 8px rgba(14, 163, 114, 0.25);
}
/* /Layout/NavMenu.razor.rz.scp.css */
/* ============================================================
   Side navigation (desktop)
   ============================================================ */
.sidenav[b-wgiy8hsq20] {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sidenav__item[b-wgiy8hsq20] {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.6rem 0.85rem 0.6rem 0.95rem;
    border-radius: var(--es-radius);
    color: var(--es-nav-fg);
    font-size: 0.94rem;
    font-weight: 500;
    text-decoration: none !important;
    transition: background-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
    position: relative;
    overflow: hidden;
}
/* Left accent bar (hidden until hover/active) */
.sidenav__item[b-wgiy8hsq20]::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translate(-4px, -50%) scaleY(0.4);
    width: 3px;
    height: 60%;
    border-radius: 0 3px 3px 0;
    background: var(--es-primary);
    opacity: 0;
    transition: transform .2s ease, opacity .2s ease;
}
.sidenav__item svg[b-wgiy8hsq20] {
    flex: 0 0 auto;
    width: 20px; height: 20px;
    stroke-width: 1.75;
    color: var(--es-text-soft);
    transition: color .18s ease, transform .18s ease;
}
.sidenav__item:hover[b-wgiy8hsq20] {
    background: var(--es-surface-2);
    color: var(--es-nav-fg-hover);
    transform: translateX(2px);
}
.sidenav__item:hover svg[b-wgiy8hsq20] {
    color: var(--es-primary-dark);
    transform: scale(1.06);
}
.sidenav__item:hover[b-wgiy8hsq20]::before {
    opacity: 0.5;
    transform: translate(0, -50%) scaleY(0.6);
}
.sidenav__item:active[b-wgiy8hsq20] {
    transform: translateX(2px) scale(0.99);
}
.sidenav__item--active[b-wgiy8hsq20] {
    background: var(--es-primary-soft);
    color: var(--es-primary-dark);
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(14, 163, 114, 0.12);
}
.sidenav__item--active[b-wgiy8hsq20]::before {
    opacity: 1;
    transform: translate(0, -50%) scaleY(1);
}
.sidenav__item--active svg[b-wgiy8hsq20] {
    color: var(--es-primary-dark);
}
.sidenav__item--active:hover[b-wgiy8hsq20] {
    background: var(--es-primary-soft);
    color: var(--es-primary-dark);
    transform: translateX(2px);
}
.sidenav__item--active:hover svg[b-wgiy8hsq20] {
    color: var(--es-primary-dark);
}

/* ============================================================
   Top navigation strip (mobile)
   ============================================================ */
.mobilenav[b-wgiy8hsq20] {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 56px;
    padding: 0 16px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.mobilenav[b-wgiy8hsq20]::-webkit-scrollbar {
    display: none;
}
.mobilenav__item[b-wgiy8hsq20] {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 14px;
    min-width: 64px;
    border-radius: 14px;
    color: var(--es-nav-fg);
    font-size: 0.72rem;
    font-weight: 500;
    text-decoration: none !important;
    transition: background-color .15s ease, color .15s ease;
}
.mobilenav__item svg[b-wgiy8hsq20] {
    width: 20px; height: 20px;
    stroke-width: 1.85;
    color: var(--es-text-soft);
    transition: color .15s ease;
}
.mobilenav__item--active[b-wgiy8hsq20] {
    color: var(--es-nav-active-fg);
    background: var(--es-nav-active-bg);
    font-weight: 600;
}
.mobilenav__item--active svg[b-wgiy8hsq20] {
    color: var(--es-nav-active-fg);
}
.mobilenav__label[b-wgiy8hsq20] { 
    line-height: 1; 
    margin-top: 1px;
}
