/* layout.css - Grid & Positioning */

/* App Shell */
.app {
    display: flex;
    min-height: 100vh;
    overflow: hidden; /* Prevent body scroll if sidebar is long */
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    transition: transform 0.3s ease;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo-icon {
    font-size: 24px;
    color: var(--primary);
}

.app-title {
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.2;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.nav-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin: 24px 0 8px 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--sidebar-text-muted);
    margin-bottom: 4px;
}

.nav-item:hover {
    background-color: rgba(255,255,255,0.05);
    color: var(--text-light);
}

.nav-item.active {
    background-color: var(--primary);
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.nav-item i {
    width: 24px;
    margin-right: 12px;
    text-align: center;
}

/* User/Project Footer */
.sidebar-footer {
    padding: 16px;
    background-color: rgba(0,0,0,0.1);
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-body);
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Topbar */
.topbar {
    height: 64px;
    background-color: var(--surface);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 50;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-menu-btn {
    display: none;
    font-size: 20px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
}

.page-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.topbar-actions {
    display: flex;
    gap: 12px;
}

/* Tab Content Window */
.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        height: 100vh;
        transform: translateX(-100%);
        box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .mobile-menu-btn {
        display: block;
    }
}
