.app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--accent);
    z-index: 2000;
    transition: width 0.1s;
}

.topbar {
    position: sticky;
    top: 0;
    background: rgba(11, 18, 32, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.5rem;
}

.topbar-inner {
    max-width: var(--max-width);
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.current-section-display {
    font-size: 0.9rem;
    color: var(--muted);
    font-weight: 500;
    border-left: 1px solid var(--glass-border);
    padding-left: 1rem;
    margin-left: 1rem;
    display: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

@media (min-width: 769px) {
    .current-section-display {
        display: block;
    }
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text);
}

.brand .logo {
    width: 32px;
    height: 32px;
}

.brand h1 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.container {
    max-width: var(--max-width);
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    flex: 1;
}

.dashboard-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .dashboard-shell {
        grid-template-columns: 1fr;
    }
}

.sidebar {
    position: sticky;
    top: calc(var(--topbar-height) + 2rem);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        top: var(--topbar-height);
        left: -100%;
        width: 280px;
        height: calc(100vh - var(--topbar-height));
        background: var(--card);
        z-index: 1001;
        transition: left 0.3s ease;
        padding: 1.5rem;
        border-right: 1px solid var(--glass-border);
        box-shadow: 20px 0 40px rgba(0, 0, 0, 0.4);
        overflow-y: auto;
    }

    .sidebar.is-open {
        left: 0;
    }
}

.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 768px) {
    .brand h1 {
        font-size: 1.1rem;
    }

    .brand .logo {
        width: 24px;
        height: 24px;
    }

    .mobile-nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .topbar {
        padding: 0 1rem;
    }

    .topbar-inner {
        gap: 0.5rem;
    }

    .top-actions {
        gap: 0.5rem;
    }
}
