/* =========================
   ESTRUTURA PRINCIPAL
   ========================= */
body {
    background-color: #f8f9fa;
    position: relative;
    overflow-x: hidden;
}

.wrapper {
    padding-top: 58px;
    display: flex;
}

/* =========================
   SIDEBAR (MENU LATERAL)
   ========================= */
.sidebar {
    width: 416px; /* AJUSTE: Aumentado de 320px para 416px (30% maior) */
    background-color: #fff;
    border-right: 1px solid #dee2e6;
    z-index: 1045;
    transition: transform 0.3s ease-in-out, margin-left 0.3s ease-in-out;
    overflow-y: auto;
}

.sidebar-content {
    padding: 1rem;
}

/* =========================
   CONTEÚDO PRINCIPAL
   ========================= */
.main-content {
    flex-grow: 1;
    transition: margin-left 0.3s ease-in-out;
}

/* =========================
   BACKDROP (FUNDO OPACO) - APENAS MOBILE
   ========================= */
.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

body.sidebar-is-open .sidebar-backdrop {
    opacity: 1;
    visibility: visible;
}

/* ===============================================================
   COMPORTAMENTO RESPONSIVO
   =============================================================== */

/* --- LAYOUT DESKTOP (telas de 992px para cima) --- */
@media (min-width: 992px) {
    .sidebar {
        position: fixed;
        top: 58px;
        left: 0;
        bottom: 0;
    }
    .main-content {
        margin-left: 416px; /* AJUSTE: Aumentado de 320px para 416px */
    }

    /* Estado fechado no desktop */
    body.sidebar-is-closed .sidebar {
        margin-left: -416px; /* AJUSTE: Aumentado de -320px para -416px */
    }
    body.sidebar-is-closed .main-content {
        margin-left: 0;
    }
}

/* --- LAYOUT MOBILE (telas de 991.98px para baixo) --- */
@media (max-width: 991.98px) {
    .sidebar {
        width: 90%; /* AJUSTE: Largura definida para 90% da tela */
        position: fixed;
        top: 58px;
        left: 0;
        bottom: 0;
        transform: translateX(-100%);
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    }
    .main-content {
        margin-left: 0;
    }
    
    /* Estado aberto no mobile */
    body.sidebar-is-open .sidebar {
        transform: translateX(0);
    }
}


/* =========================
   Estilos dos Cards de Anúncio
   ========================= */
.anuncio-card {
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    border: 0;
}
.anuncio-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}
.anuncio-card .card-body {
    padding-bottom: 40px;
    border-radius: 12px;
}
.stats-pill {
    position: absolute;
    bottom: 10px;
    left: 15px;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    color: #333;
    padding: 0.25rem 0.6rem;
    border-radius: 50rem;
    font-size: 0.8em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.stats-pill i {
    color: #6c757d;
}