/* ============================================
   SIDEBAR
   ============================================ */

.admin-layout {
    display: flex;
    height: calc(100vh - 70px);
    overflow: hidden;
}

.admin-sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--bg-card) 0%, rgba(30, 30, 30, 0.98) 100%);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    flex-shrink: 0;
    border-left: 3px solid transparent;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.2);
    position: relative;
}

/* Botão fechar no mobile (dentro da sidebar) */
.sidebar-close-mobile {
    display: none;
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: rgba(255,255,255,0.08);
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    border-radius: var(--border-radius-sm);
}
.sidebar-close-mobile:hover {
    background: rgba(255, 215, 0, 0.2);
    color: var(--primary);
}

/* Overlay do drawer (mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.sidebar-nav {
    padding: 1.5rem 0;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-title {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 1.5rem;
    margin-bottom: 0.75rem;
}

.sidebar-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1.25rem;
    margin: 0 0.5rem;
    border-radius: var(--border-radius-sm);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.sidebar-item:hover {
    background: var(--bg-dark);
    color: var(--text-primary);
}

.sidebar-item.active {
    background: var(--primary);
    color: #1a1a1a;
    font-weight: 600;
}

.sidebar-item.active svg {
    stroke: #1a1a1a;
}

.sidebar-item svg {
    flex-shrink: 0;
    stroke: currentColor;
}

.admin-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.75rem 2rem;
    background: var(--bg-dark);
}

/* ========== MOBILE: sidebar vira drawer ========== */
@media (max-width: 992px) {
    .admin-layout {
        height: calc(100vh - 60px);
    }

    .sidebar-overlay {
        display: block;
    }

    .admin-layout.sidebar-open .sidebar-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 280px;
        max-width: 85vw;
        transform: translateX(-100%);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        z-index: 1001;
        box-shadow: none;
    }

    .admin-layout.sidebar-open .admin-sidebar {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
    }

    .sidebar-close-mobile {
        display: flex;
    }

    .sidebar-nav {
        padding-top: 3.5rem;
    }

    .admin-content {
        width: 100%;
        padding: 1.25rem 1rem;
        margin-left: 0;
    }

    .sidebar-item span {
        display: inline;
    }
}

@media (max-width: 768px) {
    .admin-sidebar {
        width: 260px;
    }
    
    .sidebar-item {
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
    }
}

