.sidebar {
    width: 250px;
    height: 100vh;
    min-height: 0;
    background: #111112;
    box-shadow: 4px 0 24px 0 rgba(229, 57, 53, 0.10), 0 2px 10px rgba(0, 0, 0, 0.18);
    padding: 2rem 0;
    border-right: 2px solid #e53935;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    flex-shrink: 0;
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: 8rem;
    box-sizing: border-box;
    max-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
    position: sticky;
    top: 0;
}
.sidebar::-webkit-scrollbar {
    width: 0 !important;
    background: transparent;
}

.nav-item {
    display: block;
    padding: 1rem 2rem;
    color: #fff;
    text-decoration: none;
    border-left: 4px solid transparent;
    transition: all 0.3s cubic-bezier(.4,0,.2,1);
    font-weight: 600;
    letter-spacing: 1px;
    text-shadow: 0 1px 6px rgba(0,0,0,0.18);
    border-radius: 0 20px 20px 0;
    margin-right: 1rem;
    font-size: 1.08rem;
    margin-bottom: 0.2rem;
    margin-top: 0.2rem;
    width: 100%;
    box-sizing: border-box;
}

.nav-item:last-child {
    margin-bottom: 0;
}

.nav-item:hover, .nav-item.active {
    background: linear-gradient(90deg, #1a1a1d 60%, #e53935 100%);
    color: #fff;
    border-left-color: #e53935;
    box-shadow: 2px 0 16px 0 rgba(229,57,53,0.10);
    text-shadow: 0 2px 8px rgba(229,57,53,0.10);
}

.nav-item.active {
    font-weight: bold;
    background: linear-gradient(90deg, #1a1a1d 60%, #e53935 100%);
    color: #fff;
    border-left: 4px solid #e53935;
}

/* Responsividade para tablet */
@media (max-width: 1024px) {
    .sidebar {
        width: 180px;
        height: 100vh;
        min-height: 0;
        max-height: 100vh;
        padding: 1.2rem 0;
        overflow-y: auto;
        overflow-x: hidden;
    }
    .nav-item {
        font-size: 0.98rem;
        padding: 0.8rem 1.2rem;
    }
}

/* Responsividade para mobile */
@media (max-width: 600px) {
    .sidebar {
        width: 100vw;
        height: 100vh;
        min-height: 0;
        max-height: 100vh;
        flex-direction: row;
        padding: 0.5rem 0;
        border-right: none;
        background: #111112;
        box-shadow: none;
        overflow-y: auto;
        overflow-x: hidden;
        gap: 0;
        justify-content: flex-start;
        scrollbar-width: none;
    }
    .nav-item {
        white-space: nowrap;
        min-width: 100px;
        text-align: center;
        color: #fff;
        border-radius: 20px;
        margin: 0 0.2rem;
        font-size: 0.92rem;
        padding: 0.7rem 0.7rem;
    }
}

/* Sidebar oculta para mobile/tablet */
@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: -29rem;
        top: 0;
        height: 100vh;
        z-index: 2000;
        transition: left 1s cubic-bezier(.4,0,.2,1);
        box-shadow: 4px 0 24px 0 rgba(229,57,53,0.10), 0 2px 10px rgba(0,0,0,0.18);
        flex-direction: column !important;
    }
    .sidebar.active {
        left: 0;
        transition: left 1s cubic-bezier(.4,0,.2,1);
    }
}

@media (max-width: 600px) {
    .sidebar {
        width: 80vw;
        min-width: 180px;
        max-width: 320px;
        flex-direction: column !important;
    }
} 

@media (max-width: 1024px) {
    .sidebar {
        align-items: flex-start !important;
    }
    .nav-item {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
        display: block;
    }
}

@media (max-width: 600px) {
    .sidebar {
        align-items: flex-start !important;
        justify-content: center;
        padding: 1rem;
    }
    .nav-item {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
        display: block;
    }
} 

/* --- Sidebar Desktop --- */
#sidebar-componente {
    min-width: 250px;
    max-width: 250px;
    flex-shrink: 0;
    height: 100vh;
    position: sticky;
    top: 0;
    left: 0;
    z-index: 100;
    transition: left 0.4s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
}

/* --- Sidebar Mobile/Tablet --- */
@media (max-width: 1024px) {
    #sidebar-componente {
        position: fixed;
        left: -29rem !important;
        top: 0;
        z-index: 2000;
        transition: left 0.4s cubic-bezier(.4,0,.2,1);
    }
    #sidebar-componente.active {
        left: 0 !important;
        transition: left 0.4s cubic-bezier(.4,0,.2,1);
    }
} 

.sidebar.active {
    left: 0;
    z-index: 2000;
    transition: left 1s cubic-bezier(.4,0,.2,1);
} 