/* ── App wrapper ─────────────────────────────── */
.app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── Header ──────────────────────────────────── */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--primary);
    z-index: 100;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.headerInner {
    height: 100%;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.headerLeft {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.headerLogo {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    transition: var(--transition);
}

.headerLogo:hover {
    transform: scale(1.08);
}

.headerTitle {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary);
    letter-spacing: 0.01em;
}

.menuBtn {
    color: var(--secondary);
    font-size: 1.3rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: var(--transition);
}

.menuBtn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ── Overlay ─────────────────────────────────── */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 149;
    pointer-events: none;
    transition: background 0.3s ease;
}

.overlayVisible {
    background: rgba(0, 0, 0, 0.6);
    pointer-events: all;
}

/* ── Sidebar ─────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    z-index: 150;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
    overflow-y: auto;
}

.sidebarOpen {
    transform: translateX(0);
}

.sidebarHeader {
    padding: 2rem 1.5rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--card-border);
}

.sidebarLogo {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.sidebarBrand {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-light);
    line-height: 1.3;
}

.sidebarBrand span {
    color: var(--secondary);
    font-weight: 400;
}

.sidebarNav {
    flex: 1;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebarSection {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--secondary);
    opacity: 0.6;
    padding: 0 0.5rem;
    margin-bottom: 0.5rem;
}

.navLink {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    color: rgba(245, 240, 238, 0.75);
    transition: var(--transition);
}

.navLink i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.navLink:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-light);
}

.navLinkActive {
    background: var(--primary) !important;
    color: var(--secondary) !important;
    font-weight: 600;
}

.sidebarFooter {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--card-border);
    font-size: 0.75rem;
    color: rgba(245, 240, 238, 0.35);
    text-align: center;
}

/* ── Main content ────────────────────────────── */
.main {
    flex: 1;
    padding-top: var(--header-height);
    padding-bottom: var(--bottom-nav-height);
}

/* ── Bottom Nav (mobile only) ─────────────────── */
.bottomNav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: var(--sidebar-bg);
    display: flex;
    align-items: stretch;
    border-top: 1px solid var(--card-border);
    z-index: 90;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.bottomNavItem {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 0.65rem;
    font-weight: 500;
    color: rgba(245, 240, 238, 0.5);
    transition: var(--transition);
}

.bottomNavItem i {
    font-size: 1.15rem;
}

.bottomNavActive {
    color: var(--secondary) !important;
}

.bottomNavItem:hover {
    color: var(--text-light);
}

/* Desktop: sidebar fixa, esconder bottom nav e botão menu */
@media (min-width: 768px) {
    .sidebar {
        transform: translateX(0);
        box-shadow: 2px 0 12px rgba(0, 0, 0, 0.2);
    }

    .overlay {
        display: none;
    }

    .menuBtn {
        display: none !important;
    }

    .header {
        left: var(--sidebar-width);
    }

    .headerInner {
        padding: 0 2rem;
    }

    .main {
        padding-left: var(--sidebar-width);
        padding-bottom: 0;
    }

    .bottomNav {
        display: none;
    }
}