body.with-fixed-topbar {
    padding-top: var(--topbar-height);
}

.navbar.fixed {
    position: fixed;
    inset: 0 0 auto 0;
    background: color-mix(in srgb, var(--sys-color-surface) 82%, transparent);
    border-bottom: 1px solid var(--sys-color-outline);
    backdrop-filter: blur(18px);
    z-index: 1000;
    min-height: var(--topbar-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem max(1.25rem, 5vw);
}

.landing-shell .navbar.fixed {
    min-height: 72px;
    padding: 0.8rem max(1rem, 5vw);
    background: transparent;
    border-bottom-color: transparent;
    backdrop-filter: none;
}

.nav-cluster {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.app-layout {
    display: flex;
    min-height: 100vh;
    background: transparent;
}

.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background: color-mix(in srgb, var(--sys-color-surface-raised) 92%, transparent);
    border-right: 1px solid var(--sys-color-outline);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    transition: var(--transition-standard);
    z-index: 2000;
    backdrop-filter: blur(16px);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-brand {
    padding: 2rem 1.5rem 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex-grow: 1;
    padding: 0 1rem;
    list-style: none;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    color: var(--sys-color-on-surface-variant);
    font-weight: 600;
    font-size: 0.94rem;
    transition: var(--transition-standard);
    cursor: pointer;
    background-color: transparent;
    border: none;
    text-align: left;
    width: 100%;
}

.sidebar-item .material-symbols-rounded {
    color: inherit;
    font-size: 19px;
}

.sidebar-item:hover {
    color: var(--sys-color-on-surface);
    background-color: var(--sys-color-outline-variant);
}

.sidebar-item.selected {
    background: linear-gradient(135deg, var(--sys-color-primary), color-mix(in srgb, var(--sys-color-primary) 70%, #4d7cff));
    color: var(--sys-color-on-primary);
    box-shadow: var(--shadow-sm);
}

.sidebar-footer {
    padding: 1.25rem;
    border-top: 1px solid var(--sys-color-outline);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.main-content {
    flex-grow: 1;
    padding: 2.5rem;
    max-width: calc(var(--content-max-width) + 4rem);
    margin: 0 auto;
    width: 100%;
}

.page-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-header h1 {
    font-family: var(--font-title);
    font-size: clamp(2rem, 3vw, 2.8rem);
    line-height: 1.02;
    margin-bottom: 0.45rem;
}

.page-header p {
    color: var(--sys-color-on-surface-variant);
    max-width: 680px;
}

.topbar-mobile {
    display: none;
    height: var(--topbar-height);
    background: color-mix(in srgb, var(--sys-color-surface) 88%, transparent);
    border-bottom: 1px solid var(--sys-color-outline);
    padding: 0 1rem;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(18px);
}

.logo-text {
    font-family: var(--font-title);
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--sys-color-on-surface);
    letter-spacing: -0.04em;
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.brand-lockup img {
    width: 30px;
    height: 30px;
    border-radius: 10px;
}

.brand-lockup .logo-text {
    font-size: 1.05rem;
}

@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        width: min(86vw, 320px);
        box-shadow: none;
        border-right: 1px solid var(--sys-color-outline);
        height: 100vh;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar.open {
        left: 0;
        box-shadow: var(--shadow-lg);
    }

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

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

    .sidebar::-webkit-scrollbar-thumb {
        background: color-mix(in srgb, var(--sys-color-outline) 40%, transparent);
        border-radius: 3px;
    }

    .topbar-mobile {
        display: flex;
    }

    .main-content {
        padding: 1.5rem;
        max-width: 100%;
    }
}
