/* ============================================
   GENZFLOW — APP SHELL LAYOUT
   ============================================ */

.app-shell {
    display: flex;
    min-height: 100vh;
}

/* ---- MAIN CONTENT ---- */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: var(--space-4);
    overflow-y: auto;
}

.page-header {
    margin-bottom: var(--space-4);
}

.page-title {
    font-size: var(--font-size-h1);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
}

.page-subtitle {
    font-size: var(--font-size-body);
    color: var(--text-secondary);
    margin-top: var(--space-1);
}

/* ---- SIDEBAR TOGGLE (Tablet) ---- */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: var(--space-2);
    left: var(--space-2);
    z-index: 1001;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.sidebar-toggle:hover {
    background-color: var(--bg-hover);
}

/* ---- SIDEBAR OVERLAY (Tablet/Mobile) ---- */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.sidebar-overlay.active {
    display: block;
}

/* ---- MOBILE BOTTOM NAV ---- */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background-color: var(--bg-sidebar);
    border-top: 1px solid var(--border-subtle);
    z-index: 1000;
    padding: 0 var(--space-1);
}

.bottom-nav-list {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 100%;
    gap: 0;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 1;
    height: 100%;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: var(--font-weight-medium);
    transition: color var(--transition-fast);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item i {
    width: 22px;
    height: 22px;
    stroke-width: 1.75;
}

.bottom-nav-item.active {
    color: var(--primary-accent);
}

.bottom-nav-item:hover {
    color: var(--text-primary);
}

/* ============================================
   RESPONSIVE — TABLET (≤ 1024px)
   ============================================ */
@media (max-width: 1024px) {
    .sidebar-toggle {
        display: flex;
    }

    .main-content {
        margin-left: 0;
        padding-top: 64px;
    }

    .sidebar {
        transform: translateX(-100%);
        z-index: 999;
        transition: transform var(--transition-normal);
    }

    .sidebar.open {
        transform: translateX(0);
    }
}

/* ============================================
   RESPONSIVE — MOBILE (≤ 768px)
   ============================================ */
@media (max-width: 768px) {
    .main-content {
        padding: var(--space-2);
        padding-top: 56px;
        padding-bottom: 80px;
        /* space for bottom nav */
    }

    .bottom-nav {
        display: block;
    }

    .bottom-nav-list {
        display: flex;
    }

    .sidebar-toggle {
        top: var(--space-1);
        left: var(--space-1);
        width: 36px;
        height: 36px;
    }
}