

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Arial, sans-serif;
}

body {
    background-color: #e9e9e9;
    display: flex;
    justify-content: center;
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    min-width: 0;
}

.app {
    width: 100%;
    max-width: 75rem;
    min-height: 100dvh;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-bottom: 90px;
}

.cabecalho {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px clamp(16px, 4vw, 48px);
}

.cabecalho h1 {
    font-size: 14px;
    font-weight: 700;
    color: #222;
}

.botao-voltar {
    text-decoration: none;
    font-size: 28px;
    line-height: 1;
    color: #ff1f2d;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.foto-perfil {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #ddd;
}

.comunidade {
    background-color: #a9c3f5;
    border-radius: 12px;
    margin: 0 12px 12px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
}

.comunidade-info h2 {
    font-size: 10px;
    font-weight: 700;
    margin-bottom: 4px;
}

.comunidade-info p {
    font-size: 9px;
    opacity: 0.95;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.comunidade img {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: 10px;
}

#map {
    width: calc(100% - 24px);
    height: clamp(300px, 65vh, 620px);
    border-radius: 12px;
    margin: 0 12px 10px;
    overflow: hidden;
}

.legenda {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 4px 8px 12px;
    margin-top: auto; 
}

.btn-vazamento-agua, .legenda-falta-agua, .legenda-vazamento, .legenda-esgoto, .legenda-lixo, .legenda-outros {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #222;
    background-color: transparent;
    border-radius: 0;
}

.btn-vazamento-agua > span:last-child,
.legenda-falta-agua > span:last-child {
    font-weight: 900;
     font-family: 'Segoe UI', Arial, sans-serif;
}

.btn-vazamento-agua img,
.legenda-falta-agua img,
.legenda-vazamento img,
.legenda-esgoto img,
.legenda-lixo img,
.legenda-outros img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

@media (min-width: 576px) {
    .comunidade {
        margin-left: clamp(16px, 4vw, 48px);
        margin-right: clamp(16px, 4vw, 48px);
    }

    #map {
        height: clamp(360px, 62vh, 680px);
    }
}

@media (min-width: 768px) {
    .comunidade {
        padding: 16px 20px;
    }

    .comunidade-info h2 {
        font-size: 1rem;
    }

    .comunidade-info p {
        font-size: 0.9rem;
    }

    #map {
        width: calc(100% - clamp(32px, 8vw, 96px));
        margin-left: clamp(16px, 4vw, 48px);
        margin-right: clamp(16px, 4vw, 48px);
    }

    .legenda {
        justify-content: center;
        gap: 48px;
    }
}

@media (min-width: 992px) {
    .app {
        margin: 24px auto;
        min-height: calc(100dvh - 48px);
        border-radius: 20px;
        overflow: hidden;
        box-shadow: 0 0 24px rgba(0, 0, 0, 0.12);
    }

}

@media (min-width: 1200px) {
    #map {
        height: min(68vh, 760px);
    }
}

@media (min-width: 992px) {
    .app {
        margin: 0 auto;
        max-width: none;
        border-radius: 0;
        box-shadow: none;
    }
}

.app {
    border-radius: 0;
    box-shadow: none;
    padding-bottom: 64px;
    overflow-x: hidden;
}

/* Menu lateral compartilhado com a tela inicial */
.menu-lateral {
    position: absolute;
    z-index: 10;
    top: 0;
    left: 0;
    width: min(82vw, 320px);
    height: 100%;
    padding: 20px 15px;
    background-color: #dbeeff;
    border-right: 2px solid #3b9cff;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.app.menu-aberto .menu-lateral {
    transform: translateX(0);
}

.menu-fechar {
    width: 44px;
    height: 44px;
    margin-bottom: 40px;
    border: none;
    background: none;
    font-size: 22px;
    cursor: pointer;
}

.menu-lista {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-lista li {
    min-height: 44px;
    padding: 10px 0;
    color: #222;
    font-size: 16px;
    cursor: pointer;
}

.divisor {
    margin: 30px 0;
    border: none;
    border-top: 1px dashed #3b9cff;
}

.overlay {
    position: absolute;
    z-index: 5;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.app.menu-aberto .overlay {
    opacity: 1;
    pointer-events: auto;
}

.bottom-nav {
    width: 100%;
    max-width: none;
}

.bottom-nav .nav-item {
    display: flex;
    min-width: 44px;
    min-height: 44px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 3px 2px;
    color: #4a6a8a;
    font-size: 10px;
    text-align: center;
    text-decoration: none;
}

.bottom-nav .nav-item img,
.bottom-nav .nav-item svg {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.bottom-nav .nav-item.active {
    color: #1a56db;
    font-weight: 700;
}

.bottom-nav .nav-item:hover {
    background: #f3f3f3;
}

.bottom-nav .nav-item {
    padding: 4px 2px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.bottom-nav .nav-item svg {
    width: 25px;
    height: 25px;
}

.bottom-nav .nav-item.active {
    font-weight: 800;
}

.bottom-nav .nav-item.active svg {
    stroke-width: 2.3;
}

/* Regra final da navegação inferior: aplica em qualquer largura */
.bottom-nav {
    position: fixed;
    z-index: 20;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    min-height: 64px;
    height: auto;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
    padding: 4px 8px max(4px, env(safe-area-inset-bottom));
    background-color: #d7e9fb;
    border-top: 1px solid #c7ddf7;
    border-radius: 0;
}

.bottom-nav .nav-item {
    display: flex;
    min-width: 44px;
    min-height: 44px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 3px 2px;
    color: #4a6a8a;
    font-size: 10px;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
}

.bottom-nav .nav-item svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

.bottom-nav .nav-item.active {
    color: #1a56db;
    font-weight: 700;
}

