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

:root {
  --cor-fundo: #ffffff;
  --cor-card: #f0f0f0;
  --cor-azul-principal: #1687e8;
  --cor-azul-claro: #d6e8ff;
  --cor-vermelho: #ff2525;
  --cor-texto-principal: #111111;
  --cor-texto-secundario: #555555;
  --raio-card: 14px;
  --largura-maxima-app: 420px;
  --altura-menu-inferior: 64px;
}

body {
    margin: 0;
    padding: 0;
    background-color: #f0f2f5;
    overflow-x: hidden;
}

.app-container {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    position: relative;
    padding-bottom: 80px;
}

/* ===== CABEÇALHO ===== */
.topo-base {
    padding: 12px 20px 4px;
    color: #999;
    font-size: 14px;
    font-weight: 500;
}

.cabecalho {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    justify-content: space-between;
    padding: 8px 20px 16px;
}

.botao-voltar {
  background: none;
  border: none;
  color: var(--cor-vermelho);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.botao-voltar:hover {
  background-color: rgba(255, 37, 37, 0.08);
}

.botao-voltar:focus-visible {
  outline: 2px solid var(--cor-vermelho);
  outline-offset: 2px;
}

.botao-voltar:active {
  transform: scale(0.92);
}

.cabecalho__titulo {
    font-size: 19px;
    font-weight: 700;
}

.cabecalho__perfil {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
}

.cabecalho__perfil img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== NOME DA COMUNIDADE ===== */
.comunidade-nome {
    padding: 0 20px 8px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    overflow-wrap: anywhere;
}

/* ===== ABAS ===== */
.abas {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding: 12px 20px 0;
    border-bottom: 1px solid #eee;
    min-height: 48px;
}

.aba {
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 700;
    color: #000;
    padding-bottom: 10px;
    position: relative;
    cursor: pointer;
}

.aba__indicador {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2.5px;
    background: #2f6fed;
    border-radius: 2px;
}

/* ===== CONTEÚDO ===== */
.conteudo {
    padding: 16px 0 0;
}

.rotulo-secao {
    padding: 0 20px 10px;
    font-size: 13px;
    font-weight: 700;
}

.rotulo-secao--destaque {
    color: #e0483e;
}

/* ===== CARD OCORRÊNCIA DESTAQUE ===== */
.ocorrencia-destaque {
    position: relative;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin: 0 20px 16px;
    padding: 16px;
    background: #f5f6f8;
    border-radius: 14px;
    border: 2px solid transparent;
    transition: border-color 0.3s ease, background 0.3s ease;
    min-width: 0;
}

/* Estados da ocorrência principal conforme feedback */
.ocorrencia-destaque.status-resolvida {
    border-color: #0a7a3f;
    background: #eafaf1;
}

.ocorrencia-destaque.status-adamento {
    border-color: #b5660a;
    background: #fff5e6;
}

.ocorrencia-destaque__icone {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
} 

.ocorrencia-destaque__texto {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.ocorrencia-destaque__titulo {
    font-weight: 700;
    font-size: 15px;
    color: #1a1a1a;
}

.ocorrencia-destaque__local {
    font-size: 13px;
    color: #555;
}

.ocorrencia-destaque__confirmacoes {
    font-size: 13px;
    font-weight: 600;
    margin-top: 4px;
    color: #333;
}

/* ===== SELOS DE STATUS ===== */
.selo-status {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.selo-status--atendimento {
    background: #ffe3c2;
    color: #b5660a;
}

.selo-status--resolvido {
    background: #d4f5e3;
    color: #0a7a3f;
}

/* Selo da ocorrência principal - estados dinâmicos */
.selo-status--principal {
    background: #ffe3c2;
    color: #b5660a;
}

.selo-status--principal.resolvida {
    background: #d4f5e3;
    color: #0a7a3f;
}

.selo-status--principal.adamento {
    background: #ffe0e0;
    color: #c0392b;
}

/* ===== SEÇÃO EXPANSÍVEL ===== */
.secao-expansivel {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 4px 20px 12px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    cursor: pointer;
    padding: 0;
}

.secao-expansivel__seta {
    transition: transform 0.2s;
}

.secao-expansivel[aria-expanded="false"] .secao-expansivel__seta {
    transform: rotate(-90deg);
}

/* ===== LISTA DE PERFIS ===== */
.lista-perfis {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 0 20px 16px;
}

.perfil-comentario {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.perfil-comentario__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    background: #ddd;
}

.perfil-comentario__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.perfil-comentario__conteudo {
    flex: 1;
    min-width: 0;
}

.perfil-comentario__linha-superior {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.perfil-comentario__linha-superior .selo-status {
    position: static;
    padding: 3px 8px;
    font-size: 10px;
    white-space: normal;
    text-align: center;
}

.perfil-comentario__nome {
    font-weight: 700;
    font-size: 14px;
    color: #1a1a1a;
}

.perfil-comentario__comentario {
    font-size: 13px;
    color: #555;
    margin: 3px 0 0;
    overflow-wrap: anywhere;
}

.perfil-comentario__data {
    font-size: 11px;
    color: #999;
    margin: 4px 0 0;
}

/* ===== BOTÃO RESOLVIDA ===== */
.btn-resolvida {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 8px 20px 0;
    padding: 14px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    cursor: pointer;
    width: calc(100% - 40px);
    min-height: 48px;
}

/* ===== BOTÕES LIKE / DESLIKE (FEEDBACK) ===== */
.feedback-container {
    display: flex;
    gap: 12px;
    margin: 12px 20px 24px;
}

.feedback-btn {
    flex: 1;
    background: #fff;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.25s ease;
    min-height: 48px;
}

.feedback-btn:hover {
    border-color: #2f6fed;
    color: #2f6fed;
    background: #f0f5ff;
}

/* Like ativo - verde */
.feedback-btn.like.active {
    border-color: #0a7a3f;
    color: #0a7a3f;
    background: #d4f5e3;
}

.feedback-btn.like.active svg {
    fill: #0a7a3f;
    stroke: #0a7a3f;
}

/* Deslike ativo - vermelho */
.feedback-btn.deslike.active {
    border-color: #c0392b;
    color: #c0392b;
    background: #ffe0e0;
}

.feedback-btn.deslike.active svg {
    fill: #c0392b;
    stroke: #c0392b;
}

.feedback-btn svg {
    transition: all 0.25s ease;
    flex-shrink: 0;
}

/* ===== RODAPÉ ===== */
.rodape {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0 12px;
}

.rodape__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: none;
    border: none;
    font-size: 10px;
    color: #888;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 10px;
    min-width: 44px;
    min-height: 44px;
}

.rodape__item--ativo {
    background: #dbe8ff;
    color: #2f6fed;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 12px;
}

@media (min-width: 576px) {
    .app-container {
        max-width: 640px;
    }

    .ocorrencia-destaque {
        margin-left: 28px;
        margin-right: 28px;
    }

    .lista-perfis {
        padding-left: 28px;
        padding-right: 28px;
    }
}

@media (min-width: 768px) {
    .app-container {
        max-width: 900px;
    }

    .conteudo {
        padding-left: clamp(24px, 5vw, 64px);
        padding-right: clamp(24px, 5vw, 64px);
    }

    .ocorrencia-destaque {
        max-width: 760px;
    }

    .lista-perfis {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 32px;
    }

    .btn-resolvida,
    .feedback-container {
        max-width: 760px;
    }
}

@media (min-width: 992px) {
    body {
        padding: 0;
        background: #fff;
    }

    .app-container {
        max-width: none;
        min-height: 100dvh;
        border-radius: 0;
        box-shadow: none;
        overflow: hidden;
    }

    .app-container {
        border-radius: 0;
        box-shadow: none;
    }

    .bottom-nav {
        position: fixed;
        z-index: 20;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        min-height: 64px;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        padding: 4px 8px max(4px, env(safe-area-inset-bottom));
        background: #dbe8ff;
        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: #888;
        font-size: 10px;
        text-align: center;
        text-decoration: none;
    }

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

    .bottom-nav .nav-item.active {
        color: #2f6fed;
        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%;
        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: #dbe8ff;
        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: #888;
        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: #2f6fed;
        font-weight: 700;
    }

    .conteudo {
        padding-bottom: calc(64px + 20px);
    }

    .rodape {
        position: fixed;
        z-index: 20;
        left: 0;
        right: 0;
        bottom: 0;
        min-height: 64px;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        padding: 4px 8px max(4px, env(safe-area-inset-bottom));
        border-radius: 0;
    }

    .rodape__item {
        min-width: 44px;
        min-height: 44px;
        justify-content: center;
    }

    .conteudo {
        padding-bottom: calc(64px + 20px);
    }

    .rodape {
        position: sticky;
        bottom: 0;
    }
}

@media (min-width: 1200px) {
    .conteudo {
        padding-left: 96px;
        padding-right: 96px;
    }

    .lista-perfis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Layout final da comunidade */
.conteudo {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 16px clamp(16px, 4vw, 48px) 84px;
}

.rotulo-secao,
.ocorrencia-destaque,
.secao-expansivel,
.lista-perfis,
.btn-resolvida,
.feedback-container {
    width: 100%;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.rotulo-secao {
    padding-left: 0;
    padding-right: 0;
}

.ocorrencia-destaque {
    margin-top: 0;
}

.secao-expansivel {
    margin-top: 4px;
}

.lista-perfis {
    padding-left: 0;
    padding-right: 0;
}

.selo-status--principal {
    max-width: 125px;
}

.feedback-container {
    margin-top: 12px;
}

.bottom-nav {
    position: fixed;
    z-index: 20;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    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: #dbe8ff;
    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: #888;
    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: #2f6fed;
    font-weight: 700;
}