:root {
    --purple: #6f42c1;
    --purple-light: #f3eafa;
    --dark-text: #2c3e50;
}

body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', sans-serif;
    padding-top: 60px;
}

.bg-purple { background-color: var(--purple) !important; }
.text-purple { color: var(--purple) !important; }

.navbar-brand i {
    color: #fff;
}

.dropdown-list.show {
    display: block;
}

#menuToggle {
    position: fixed;
    top: 14px;
    right: 20px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    cursor: pointer;
}

#menuToggle span {
    background: white;
    height: 4px;
    border-radius: 2px;
    transition: 0.3s ease-in-out;
}

#menuToggle.open span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
}

#menuToggle.open span:nth-child(2) {
    opacity: 0;
}

#menuToggle.open span:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
}

#sidebar {
    position: fixed;
    top: 56px;
    right: -300px;
    width: 280px;
    height: calc(100% - 56px);
    background-color: var(--purple);
    color: white;
    padding-top: 1rem;
    padding-bottom: 1rem;
    transition: right 0.3s ease-in-out;
    z-index: 1050;
    overflow-y: auto;
}
#sidebar {
    scroll-behavior: smooth;
    padding: 1.5rem 1rem;
}


#sidebar.open {
    right: 0;
}

#sidebar .nav-link {
    color: white;
    font-weight: 600;
}

#sidebar .nav-link:hover,
#sidebar .dropdown-menu a:hover {
    background-color: var(--purple-dark);
    color: #ddd;
}

#sidebar .dropdown-toggle {
    width: 100%;
    text-align: left;
    font-weight: 600;
    color: white;
    border: none;
}

#sidebar .dropdown-menu {
    background-color: var(--purple);
    border: none;
    padding-left: 1rem;
    margin-top: 0.25rem;
}

#sidebar .dropdown-menu .dropdown-item {
    color: white;
    padding-left: 1rem;
    font-weight: 500;
}

#sidebar .btn-outline-light {
    border-color: white;
    color: white;
}

#sidebar .btn-outline-light:hover {
    background-color: white;
    color: var(--purple);
}

#sidebar button.btn-success {
    background-color: #8cc63f;
    border: none;
    color: white;
    font-weight: 600;
}

#sidebar button.btn-success:hover {
    background-color: #7bb432;
}
.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
}
#overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
    display: none;
    pointer-events: none;
}

#overlay.active {
    display: block;
}

.user-avatar-icon {
    font-size: 42px;
    color: #adb5bd;
}

/* Hero */
.comunidade-hero h1 {
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -1px;
}
.btn-cta {
    background: linear-gradient(135deg, #6f42c1, #8e5ad7);
    border: none;
    box-shadow: 0 4px 15px rgba(111, 66, 193, 0.3);
    transition: transform 0.2s;
}
.btn-cta:hover { transform: translateY(-2px); }

/* Card de Pedido */
.pedido-card {
    background: white;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    margin-bottom: 24px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.pedido-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.pedido-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--purple-light);
}

.pedido-body {
    padding: 0 20px 20px;
}

.pedido-text {
    font-size: 1.1rem;
    color: var(--dark-text);
    line-height: 1.5;
}

.pedido-footer {
    background-color: #fcfcfc;
    padding: 12px 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-responder {
    font-weight: 600;
    color: var(--purple);
    border-radius: 20px;
}

.btn-responder:hover { background-color: var(--purple-light); }

/* Área de Respostas (Expansível) */
.respostas-container {
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
    padding: 0;
    display: none; /* Escondido por padrão */
}

.respostas-container.active { display: block; animation: slideDown 0.3s ease; }

.resposta-item {
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 15px;
}

.resposta-obra-card {
    min-width: 80px;
    width: 80px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.resposta-obra-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.resposta-content {
    flex: 1;
}

.justificativa {
    font-size: 0.95rem;
    color: #555;
    background: white;
    padding: 10px;
    border-radius: 8px;
    margin-top: 8px;
    border-left: 3px solid var(--purple);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.search-result-item {
    cursor: pointer;
    transition: background 0.2s;
}
.search-result-item:hover { background-color: #f0f0f0; }

.tag-chip {
    border: 1px solid #dee2e6;
    background: #f8f9fa;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: .8rem;
    cursor: pointer;
    transition: all .15s ease;
}

.tag-chip:hover {
    background: #e9ecef;
}

.tag-chip.active {
    background: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}
.notificacao-item {
    cursor: pointer;
    transition: background 0.2s;
}

.notificacao-item:hover {
    background-color: #f5f5f5;
}

.notificacao-nao-lida {
    background-color: #eef3ff;
    font-weight: 500;
}
#notificacaoBtn {
    position: relative;
    z-index: 3000;
}