/* =========================================================
   FAVORITOS.CSS
   Página: Meus Favoritos
   ========================================================= */


/* =========================================================
   1. LISTA E CARDS
   ========================================================= */

.lista {
    max-width: 1000px;
    margin: 40px auto;
}

.item {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .08);
    box-sizing: border-box;
}

.item h3 {
    margin-bottom: 10px;
}

.item p {
    margin: 5px 0;
}

.vazio {
    text-align: center;
    color: #777;
    padding: 50px;
}

.modal-investimento-box { max-width: 540px; }
.modal-investimento-box label { display:grid; gap:6px; margin-top:14px; color:#374151; font-weight:600; }
.modal-investimento-box input, .modal-investimento-box textarea { box-sizing:border-box; width:100%; border:1px solid #d1d5db; border-radius:10px; padding:10px 12px; font:inherit; }
.modal-investimento-box textarea { min-height:82px; resize:vertical; }
.investimento-imovel-leitura { display:grid; gap:4px; padding:12px; border-radius:10px; background:#fff7ed; color:#374151; }
.investimento-imovel-leitura span { font-size:13px; }


/* =========================================================
   2. TÍTULO E LOCALIZAÇÃO
   ========================================================= */

.titulo-imovel {
    margin: 0 0 15px;
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: #24334d;
}

.local-imovel {
    margin-top: 6px;
    color: #6b7280;
    font-size: 15px;
    font-weight: 500;

    display: flex;
    align-items: center;
    gap: 6px;
}


/* =========================================================
   3. FOTO DO IMÓVEL
   ========================================================= */

.foto-imovel {
    width: 100%;
    height: 250px;

    object-fit: cover;

    border-radius: 14px;

    margin-bottom: 18px;

    display: block;
}


/* =========================================================
   4. STATUS
   ========================================================= */

.status-imovel {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    width: 100%;

    margin-bottom: 15px;

    box-sizing: border-box;
}

.select-status {
    border: none;

    background: #ececec;

    border-radius: 25px;

    padding: 8px 14px;

    font-family: inherit;
    font-weight: bold;
    font-size: 14px;

    cursor: pointer;

    outline: none;

    flex-shrink: 0;
}

.status-investimento-ativo {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #fed7aa;
    border-radius: 12px;
    background: #fff7ed;
}

.status-arrematado-bloqueado {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    background: #dcfce7;
    color: #166534;
    font-size: 13px;
    font-weight: 800;
}

.status-investimento-ativo p {
    margin: 8px 0;
    color: #7c2d12;
    font-size: 12px;
    line-height: 1.45;
}

.link-gerenciar-investimento {
    display: inline-flex;
    color: #c2410c;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.link-gerenciar-investimento:hover {
    text-decoration: underline;
}


/* =========================================================
   5. BADGES DE LEILÃO
   ========================================================= */

.badges-leilao {
    display: flex;

    flex-direction: column;

    align-items: flex-end;

    gap: 6px;
}

.badge-leilao {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 6px 12px;

    border-radius: 20px;

    font-size: 12px;
    font-weight: 600;

    width: fit-content;

    white-space: nowrap;
}

.badge-leilao.verde {
    background: #dcfce7;
    color: #15803d;
}

.badge-leilao.azul {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-leilao.amarelo {
    background: #fef9c3;
    color: #a16207;
}

.badge-leilao.laranja {
    background: #ffedd5;
    color: #c2410c;
}

.badge-leilao.vermelho {
    background: #fee2e2;
    color: #b91c1c;
}

.badge-leilao.cinza {
    background: #ececec;
    color: #555;
}


/* =========================================================
   6. BADGE DE SINCRONIZAÇÃO
   ========================================================= */

.badge-sync {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 6px 12px;

    border-radius: 20px;

    font-size: 12px;
    font-weight: 600;

    margin-top: 0;

    width: fit-content;
}

.badge-sync.ativo {
    background: #dcfce7;
    color: #15803d;
}

.badge-sync.removido {
    background: #fee2e2;
    color: #b91c1c;
}

.badge-sync.desconhecido {
    background: #ececec;
    color: #555;
}


/* =========================================================
   7. TOPO DO CARD
   ========================================================= */

.topo-item {
    display: flex;

    justify-content: space-between;
    align-items: center;

    margin-bottom: 15px;

    gap: 15px;
}


/* =========================================================
   8. BOTÕES DE AÇÃO
   ========================================================= */

.acoes-imovel {
    display: flex;

    flex-wrap: wrap;

    gap: 12px;

    margin-top: 20px;

    width: 100%;

    box-sizing: border-box;
}

.btn-anuncio {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    flex: 1;

    min-width: 190px;

    height: 46px;

    padding: 0 16px;

    border-radius: 12px;

    text-decoration: none;

    color: #fff;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;

    border: 2px solid transparent;

    cursor: pointer;

    transition: .25s;

    box-sizing: border-box;
}

.btn-anuncio:hover {
    transform: translateY(-2px);

    box-shadow:
        0 8px 20px rgba(0, 0, 0, .20);
}


/* =========================================================
   9. BOTÃO LEILÃO
   ========================================================= */

.btn-leilao {
    background: #f97316;
    border: 2px solid #f97316;
}

.btn-leilao:hover {
    background: #ea580c;
    border-color: #ea580c;
}


/* =========================================================
   10. BOTÃO PDF
   ========================================================= */

.btn-pdf {
    background: #dc2626;
    border: 2px solid #dc2626;
}

.btn-pdf:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}


/* =========================================================
   11. BOTÃO MAPA
   ========================================================= */

.btn-mapa {
    background: #16a34a;
    border: 2px solid #16a34a;
}

.btn-mapa:hover {
    background: #15803d;
    border-color: #15803d;
}


/* =========================================================
   12. BOTÃO ANALISAR IA
   ========================================================= */

.btn-ia {
    background: #6d28d9;
    border: 2px solid #6d28d9;

    color: #fff;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
}

.btn-ia:hover {
    background: #5b21b6;
    border-color: #5b21b6;
}


/* =========================================================
   13. BOTÃO REMOVER
   ========================================================= */

.btn-remover {
    background: none;

    border: none;

    cursor: pointer;

    font-size: 28px;

    color: #ef4444;

    transition: .3s;
}

.btn-remover:hover {
    transform: scale(1.2);

    color: #dc2626;
}


/* =========================================================
   14. ÁREA DE INVESTIMENTO
   ========================================================= */

.investimento-grid {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 12px;
}

.investimento-campo {
    background: #fff;

    padding: 10px;

    border-radius: 10px;

    box-sizing: border-box;
}

.investimento-campo p {
    margin: 0 0 5px;
}

.investimento-campo input {
    width: 100% !important;

    box-sizing: border-box;
}


/* =========================================================
   15. BLOCO DE INVESTIMENTO
   ========================================================= */

.bloco-investimento {
    margin-top: 12px;

    padding: 12px;

    background: #f7f7f7;

    border-radius: 12px;

    border: 1px solid #ececec;

    box-sizing: border-box;
}

.bloco-investimento p {
    margin: 0 0 8px;

    font-weight: bold;

    color: #24334d;
}

.bloco-investimento input {
    width: 100%;

    padding: 8px;

    border-radius: 6px;

    border: 1px solid #ccc;

    box-sizing: border-box;
}


/* =========================================================
   16. BLOCO DE ANÁLISE
   ========================================================= */

.bloco-analise {
    margin-top: 12px;

    padding: 12px;

    background: #f7f7f7;

    border-radius: 12px;

    border: 1px solid #ececec;

    box-sizing: border-box;
}

.bloco-analise p {
    margin: 0 0 8px;

    font-weight: bold;

    color: #24334d;
}

.bloco-analise label {
    display: block;

    margin: 4px 0;

    cursor: pointer;

    font-size: 14px;
}


/* =========================================================
   17. PROGRESSO DA ANÁLISE
   ========================================================= */

.progresso-analise {
    margin: 20px 0;
}

.progresso-analise h4 {
    margin-bottom: 10px;

    color: #24334d;
}

.barra-progresso {
    width: 100%;

    height: 14px;

    background: #e6e6e6;

    border-radius: 30px;

    overflow: hidden;
}

.barra-verde {
    height: 100%;

    width: 0%;

    transition:
        width .6s ease,
        background .4s ease;
}

.barra-verde.verde {
    background: #22c55e;
}

.barra-verde.amarelo {
    background: #f59e0b;
}

.barra-verde.vermelho {
    background: #ef4444;
}

.texto-progresso {
    margin-top: 8px;

    font-size: 14px;

    font-weight: bold;

    color: #555;
}


/* =========================================================
   18. CARD DE PROGRESSO
   ========================================================= */

.card-progresso {
    margin: 20px 0;

    padding: 18px;

    background: #f9fafb;

    border-radius: 14px;

    border: 1px solid #e8e8e8;

    box-sizing: border-box;
}

.card-progresso ul {
    list-style: none;

    padding: 0;

    margin-top: 12px;
}

.card-progresso li {
    display: inline-block;

    background: #fff3cd;

    color: #856404;

    border: 1px solid #ffe69c;

    border-radius: 20px;

    padding: 6px 12px;

    margin: 4px;

    font-size: 13px;
}


/* =========================================================
   20. RESUMO DO INVESTIMENTO
   ========================================================= */

.resumo-investimento {
    background: #f8fafc;

    border-radius: 15px;

    padding: 18px;

    margin: 20px 0 10px;

    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 12px;

    border: 1px solid #e5e7eb;

    box-sizing: border-box;
}

.resumo-box {
    background: #fff;

    padding: 12px;

    border-radius: 12px;

    min-width: 0;

    box-sizing: border-box;
}

.resumo-box span {
    display: block;

    font-size: 12px;

    color: #6b7280;

    margin-bottom: 5px;
}

.resumo-box strong {
    font-size: 18px;

    color: #24334d;

    word-break: break-word;
}

.resumo-lucro strong {
    color: #16a34a;
}


/* =========================================================
   21. TOAST
   ========================================================= */

.toast {
    position: fixed;

    top: 25px;
    right: 25px;

    background: #16a34a;

    color: #fff;

    padding: 16px 22px;

    border-radius: 12px;

    font-weight: 600;

    box-shadow:
        0 10px 25px rgba(0, 0, 0, .25);

    opacity: 0;

    visibility: hidden;

    transform: translateY(-20px);

    transition: .3s;

    z-index: 999999;
}

.toast.mostrar {
    opacity: 1;

    visibility: visible;

    transform: translateY(0);
}

.toast.erro {
    background: #dc2626;
}

.toast.sucesso {
    background: #16a34a;
}


/* =========================================================
   22. MODAL DE ANÁLISE IA
   ========================================================= */

.modal-ia {
    display: none;

    position: fixed;

    inset: 0;

    background: rgba(0, 0, 0, .6);

    z-index: 999999;

    overflow: auto;
}

.modal-ia-box {
    max-height: 90vh;

    overflow: hidden;

    width: 90%;

    max-width: 650px;

    min-height: 430px;

    background: #fff;

    margin: 70px auto;

    border-radius: 18px;

    padding: 28px;

    box-shadow:
        0 25px 70px rgba(0, 0, 0, .25);

    display: flex;

    flex-direction: column;

    box-sizing: border-box;
}

.modal-ia-header {
    position: relative;

    display: flex;

    justify-content: center;

    align-items: center;

    margin-bottom: 25px;
}

.modal-ia-header button {
    position: absolute;

    right: 0;

    top: 50%;

    transform: translateY(-50%);

    border: none;

    background: none;

    font-size: 28px;

    cursor: pointer;

    color: #555;

    transition: .3s;
}

.modal-ia-header button:hover {
    color: #6d28d9;

    transform:
        translateY(-50%)
        scale(1.15);
}

.tituloIA {
    margin: 0;

    font-size: 34px;

    font-weight: 700;

    color: #24334d;

    text-align: center;
}

.tituloIA.processando {
    animation:
        pulsarTitulo 2s ease-in-out infinite;
}

@keyframes pulsarTitulo {

    0% {
        opacity: 1;

        transform: scale(1);

        text-shadow:
            0 0 0 rgba(109, 40, 217, 0);
    }

    50% {
        opacity: .75;

        transform: scale(1.04);

        text-shadow:
            0 0 18px rgba(109, 40, 217, .45);
    }

    100% {
        opacity: 1;

        transform: scale(1);

        text-shadow:
            0 0 0 rgba(109, 40, 217, 0);
    }

}


/* =========================================================
   23. CONTEÚDO DA IA
   ========================================================= */

#conteudoIA {
    flex: 1;

    line-height: 1.7;

    overflow-y: auto;

    padding-right: 8px;
}

#conteudoIA ul {
    padding-left: 22px;

    margin-top: 10px;
}

#conteudoIA li {
    margin-bottom: 8px;
}

#conteudoIA h3 {
    margin-top: 25px;
}


/* =========================================================
   24. SPINNER DA IA
   ========================================================= */

.spinnerIA {
    width: 48px;

    height: 48px;

    border: 5px solid #ececec;

    border-top: 5px solid #6d28d9;

    border-radius: 50%;

    margin: auto;

    animation:
        girarIA 1s linear infinite;
}

@keyframes girarIA {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }

}


/* =========================================================
   25. PROGRESSO DA IA
   ========================================================= */

.progressoIA {
    margin-top: 30px;

    width: 100%;

    height: 12px;

    background: #eee;

    border-radius: 20px;

    overflow: hidden;
}

.progressoIA div {
    width: 0%;

    height: 100%;

    background: #6d28d9;

    transition: width .4s;
}

.textoIA {
    margin-top: 25px;

    color: #666;

    font-size: 15px;

    text-align: center;
}


/* =========================================================
   26. RESPONSIVIDADE - TABLET / CELULAR
   ========================================================= */

@media (max-width: 768px) {

    /* -----------------------------------------
       CONTAINER
       ----------------------------------------- */

    .lista {
        width: 100%;

        max-width: 1000px;

        margin: 20px auto;

        padding: 0 12px;

        box-sizing: border-box;
    }


    /* -----------------------------------------
       CARD
       ----------------------------------------- */

    .item {
        width: 100%;

        padding: 15px;

        margin-bottom: 15px;

        box-sizing: border-box;
    }


    /* -----------------------------------------
       TÍTULO
       ----------------------------------------- */

    .titulo-imovel {
        font-size: 22px;

        line-height: 1.3;
    }


    /* -----------------------------------------
       FOTO
       ----------------------------------------- */

    .foto-imovel {
        height: 210px;
    }


    /* -----------------------------------------
       LOCALIZAÇÃO
       ----------------------------------------- */

    .local-imovel {
        font-size: 14px;

        flex-wrap: wrap;
    }


    /* -----------------------------------------
       STATUS
       ----------------------------------------- */

    .status-imovel {
        flex-direction: column;

        align-items: stretch;

        gap: 10px;
    }

    .select-status {
        width: 100%;

        box-sizing: border-box;
    }


    /* -----------------------------------------
       BADGES
       ----------------------------------------- */

    .badges-leilao {
        align-items: flex-start;

        width: 100%;
    }

    .badge-leilao {
        max-width: 100%;

        white-space: normal;

        text-align: center;
    }


    /* -----------------------------------------
       TOPO
       ----------------------------------------- */

    .topo-item {
        flex-direction: column;

        align-items: stretch;

        gap: 10px;
    }


    /* -----------------------------------------
       INVESTIMENTO
       ----------------------------------------- */

    .investimento-grid {
        grid-template-columns: 1fr;
    }


    /* -----------------------------------------
       RESUMO
       ----------------------------------------- */

    .resumo-investimento {
        grid-template-columns: 1fr 1fr;

        padding: 12px;

        gap: 8px;
    }

    .resumo-box {
        padding: 10px;
    }

    .resumo-box strong {
        font-size: 16px;

        word-break: break-word;
    }


    /* -----------------------------------------
       BOTÕES
       ----------------------------------------- */

    .acoes-imovel {
        display: flex;

        flex-direction: column;

        width: 100%;

        gap: 10px;

        margin-top: 15px;
    }

    .btn-anuncio {
        width: 100%;

        min-width: 100%;

        max-width: 100%;

        height: 46px;

        flex: none;

        margin-left: 0 !important;

        margin-right: 0 !important;

        box-sizing: border-box;

        font-size: 14px;
    }


    /* -----------------------------------------
       BOTÕES MERCADO (FASE 6.7)
       ----------------------------------------- */

    .btn-mercado {
        width: 100%;
        min-width: 100%;
    }


    /* -----------------------------------------
       REMOVER
       ----------------------------------------- */

    .btn-remover {
        align-self: flex-end;
    }


    /* -----------------------------------------
       MODAL IA
       ----------------------------------------- */

    .modal-ia-box {
        width: calc(100% - 24px);

        max-width: none;

        min-height: 0;

        margin: 30px auto;

        padding: 20px;

        max-height: calc(100vh - 60px);

        box-sizing: border-box;
    }

    .tituloIA {
        font-size: 26px;

        padding: 0 35px;
    }

    .modal-ia-header {
        margin-bottom: 18px;
    }


    /* -----------------------------------------
       COMPARÁVEIS DE MERCADO (FASE 5.10)
       ----------------------------------------- */

    .detalhes-imoveis-lado-a-lado {
        grid-template-columns: 1fr;
    }

}


/* =========================================================
   27. RESPONSIVIDADE - CELULARES PEQUENOS
   ========================================================= */

@media (max-width: 480px) {

    /* -----------------------------------------
       CONTAINER
       ----------------------------------------- */

    .lista {
        padding: 0 8px;

        margin: 15px auto;
    }


    /* -----------------------------------------
       CARD
       ----------------------------------------- */

    .item {
        padding: 12px;

        border-radius: 12px;
    }


    /* -----------------------------------------
       TÍTULO
       ----------------------------------------- */

    .titulo-imovel {
        font-size: 20px;

        line-height: 1.3;
    }


    /* -----------------------------------------
       FOTO
       ----------------------------------------- */

    .foto-imovel {
        height: 180px;

        border-radius: 12px;
    }


    /* -----------------------------------------
       LOCALIZAÇÃO
       ----------------------------------------- */

    .local-imovel {
        font-size: 13px;
    }


    /* -----------------------------------------
       RESUMO
       ----------------------------------------- */

    .resumo-investimento {
        grid-template-columns: 1fr;

        padding: 10px;
    }

    .resumo-box {
        padding: 10px;
    }

    .resumo-box strong {
        font-size: 16px;
    }


    /* -----------------------------------------
       BOTÕES
       ----------------------------------------- */

    .acoes-imovel {
        flex-direction: column;

        width: 100%;

        gap: 10px;
    }

    .btn-anuncio {
        width: 100%;

        min-width: 100%;

        max-width: 100%;

        height: 46px;

        flex: none;

        margin: 0 !important;

        padding-left: 12px;

        padding-right: 12px;
    }

    .btn-mercado {
        width: 100%;
        min-width: 100%;
    }

    .btn-observacao {
        width: 100%;
    }


    /* -----------------------------------------
       BLOCO DE ANÁLISE
       ----------------------------------------- */

    .bloco-analise {
        padding: 10px;
    }


    /* -----------------------------------------
       PROGRESSO
       ----------------------------------------- */

    .card-progresso {
        padding: 12px;
    }

    .card-progresso li {
        font-size: 12px;

        padding: 5px 9px;
    }


    /* -----------------------------------------
       TOAST
       ----------------------------------------- */

    .toast {
        top: 15px;

        left: 10px;

        right: 10px;

        text-align: center;
    }


    /* -----------------------------------------
       MODAL IA
       ----------------------------------------- */

    .modal-ia-box {
        width: calc(100% - 16px);

        margin: 15px auto;

        padding: 16px;

        max-height: calc(100vh - 30px);

        border-radius: 14px;
    }

    .tituloIA {
        font-size: 22px;

        padding: 0 30px;
    }

    .modal-ia-header button {
        font-size: 24px;
    }

    #conteudoIA {
        font-size: 14px;

        line-height: 1.6;

        padding-right: 3px;
    }

    .textoIA {
        font-size: 14px;

        margin-top: 18px;
    }


    /* -----------------------------------------
       COMPARÁVEIS DE MERCADO (FASE 5.10)
       ----------------------------------------- */

    .comparavel-card-header {
        flex-direction: column;
    }

    .comparavel-badge {
        align-self: flex-start;
    }

    .criterio-linha {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .criterio-valores {
        text-align: left;
    }

    .similaridade-final {
        text-align: left;
    }

}

/* =========================================
   NÚMERO DO LEILÃO
   ========================================= */

.numero-leilao {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    margin-top: 8px;
    padding: 6px 12px;

    background: #f1f5f9;
    border: 1px solid #dbe2ea;
    border-radius: 8px;

    color: #334155;
    font-size: 13px;
    font-weight: 600;

    width: fit-content;
}

.numero-leilao strong {
    color: #1e293b;
}

.numero-leilao i {
    color: #64748b;
}

/* ============================================================
   DOCUMENTOS PARA ANÁLISE IA
   ============================================================ */

.btn-documentos {
    background: #eef2ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}

.documentos-analise h3 {
    margin: 0 0 8px;
    color: #1f2937;
}

.documentos-analise > p {
    color: #64748b;
    line-height: 1.5;
}

.btn-adicionar-documentos {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    color: #fff;
    background: #4f46e5;
    font-weight: 600;
}

.documentos-ajuda {
    font-size: 13px;
    margin: 10px 0;
}

.lista-documentos-ia {
    display: grid;
    gap: 10px;
    margin: 16px 0;
}

.documento-item,
.documentos-vazio,
.documentos-carregando,
.documentos-erro {
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.documento-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.documento-item strong,
.documento-item small {
    display: block;
}

.documento-item small {
    margin-top: 4px;
    color: #64748b;
}

.documento-pendente {
    border-style: dashed;
    border-color: #818cf8;
}

.btn-remover-documento {
    border: 0;
    border-radius: 6px;
    padding: 7px 10px;
    cursor: pointer;
    color: #b91c1c;
    background: #fee2e2;
}

.documentos-erro {
    color: #b91c1c;
    background: #fef2f2;
}

.documentos-acoes {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}


/* =========================================================
   23. COMPARÁVEIS DE MERCADO (FASE 5.10 — transparência da similaridade)
   ========================================================= */

.explicacao-metricas {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.6;
    margin: 8px 0 14px;
}

.comparaveis-mercado-lista {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comparavel-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
    box-sizing: border-box;
}

.comparavel-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.comparavel-anuncio {
    flex: 1;
    min-width: 0;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.4;
}

.comparavel-anuncio a {
    color: #2563eb;
}

.comparavel-badge {
    display: inline-block;
    flex-shrink: 0;
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.badge-ideal {
    color: #16a34a;
    background: #f0fdf4;
}

.badge-alternativo {
    color: #d97706;
    background: #fffbeb;
}

.badge-fraco {
    color: #ea580c;
    background: #fff7ed;
}

.badge-indefinido {
    color: #6b7280;
    background: #f9fafb;
}

/* FASE 7.10 — identificação visual de lançamento/na planta (achado #8
   da auditoria). Azul, deliberadamente diferente das cores de
   classificação (verde/amarelo/roxo/laranja) — não é um nível de
   compatibilidade, é uma característica do imóvel em si. */
.badge-na-planta {
    color: #1d4ed8;
    background: #eff6ff;
}

/* FASE 7.7 — nível LIMITADO (seletorComparaveis.js), roxo pra não se
   confundir com o laranja já usado por FRACO acima. */
.badge-limitado {
    color: #7c3aed;
    background: #f5f3ff;
}

/* FASE 7.7 — Parte 2/3: controle manual de comparáveis. */

.grupo-comparaveis-titulo {
    font-size: 13.5px;
    font-weight: 700;
    color: #374151;
    margin: 14px 0 8px;
}

.grupo-comparaveis-titulo.grupo-utilizados {
    color: #16a34a;
}

.grupo-comparaveis-titulo.grupo-removidos {
    color: #b91c1c;
}

/* FASE 7.8 — grupo novo (achado crítico A1): comparáveis ativos que
   não são o tier usado no cálculo (inclui FRACO). Cinza neutro — não é
   nem "bom" (verde) nem "removido" (vermelho), só "não contou". */
.grupo-comparaveis-titulo.grupo-nao-utilizados {
    color: #6b7280;
}

/* FASE 7.8 (achado crítico A2) — banner do nível da comparação
   (seletorComparaveis.descreverNivelComparacao, via nivelComparacao).
   Cores espelham as badges de classificação já existentes (verde/
   amarelo/roxo), sem inventar paleta nova. */
.nivel-comparacao {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid;
}

.nivel-comparacao-ideal {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #16a34a;
}

.nivel-comparacao-ampliado {
    background: #fffbeb;
    border-color: #fde68a;
    color: #b45309;
}

.nivel-comparacao-limitado {
    background: #f5f3ff;
    border-color: #ddd6fe;
    color: #7c3aed;
}

.nivel-comparacao-nenhum {
    background: #f9fafb;
    border-color: #e5e7eb;
    color: #6b7280;
}

/* FASE 7.7.1 — títulos dos dois grupos do bloco Viabilidade Financeira
   (Resultado esperado x Potencial de mercado). Mesmo padrão visual dos
   grupos de comparáveis acima, cores diferentes pra não confundir com
   utilizados/removidos. */
.grupo-financeiro-titulo {
    font-size: 13.5px;
    font-weight: 700;
    color: #374151;
    margin: 16px 0 8px;
}

.grupo-financeiro-titulo.grupo-resultado-esperado {
    color: #0f766e;
}

.grupo-financeiro-titulo.grupo-potencial-mercado {
    color: #1d4ed8;
}

.comparavel-card-removido {
    background: #f9fafb;
    border-style: dashed;
    opacity: 0.85;
}

.comparavel-card-removido .comparavel-anuncio,
.comparavel-card-removido .comparavel-specs,
.comparavel-card-removido .comparavel-similaridade {
    opacity: 0.6;
}

.comparavel-acoes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.btn-comparavel-remover,
.btn-comparavel-restaurar {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-comparavel-remover {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.btn-comparavel-remover:hover {
    background: #fee2e2;
}

.btn-comparavel-restaurar {
    background: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
}

.btn-comparavel-restaurar:hover {
    background: #dbeafe;
}

.comparavel-removido-info {
    margin-top: 8px;
    padding: 8px 12px;
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-size: 12.5px;
    line-height: 1.6;
}

.comparavel-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
    font-size: 13px;
    color: #374151;
}

.comparavel-similaridade {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #24334d;
}

.comparavel-alerta-alternativo {
    margin-top: 8px;
    padding: 8px 12px;
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
    border-radius: 8px;
    font-size: 12.5px;
    line-height: 1.5;
}

/* FASE 7.9 — problema 1: mesmo padrão visual de
   .comparavel-alerta-alternativo acima, mas com a paleta roxa já usada
   por .badge-limitado/.nivel-comparacao-limitado, pra manter a
   identidade visual do nível LIMITADO consistente na tela inteira.
   Visível sempre (não é tooltip), então funciona igual em mobile. */
.comparavel-alerta-limitado {
    margin-top: 8px;
    padding: 8px 12px;
    background: #f5f3ff;
    color: #6d28d9;
    border: 1px solid #ddd6fe;
    border-radius: 8px;
    font-size: 12.5px;
    line-height: 1.5;
}

/* FASE 7.9 — problema 2: peso real do comparável no cálculo do valor
   de mercado (c.pesoNoCalculo, vindo pronto do backend). */
.comparavel-influencia {
    margin-top: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: #475569;
}

.comparavel-detalhes {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.comparavel-detalhes summary {
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #2563eb;
}

.detalhes-imoveis-lado-a-lado {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 10px 0;
    font-size: 13px;
}

.detalhes-imoveis-lado-a-lado > div {
    background: #f9fafb;
    border-radius: 8px;
    padding: 8px 10px;
    box-sizing: border-box;
}

.criterio-linha {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding: 6px 0;
    border-bottom: 1px solid #f1f1f1;
    font-size: 13px;
}

.criterio-linha:last-child {
    border-bottom: none;
}

.criterio-rotulo {
    color: #374151;
    font-weight: 600;
    flex-shrink: 0;
}

.criterio-valores {
    color: #6b7280;
    text-align: right;
}

.criterio-status-ok {
    color: #16a34a;
    font-weight: 600;
}

.criterio-status-alerta {
    color: #dc2626;
    font-weight: 600;
}

.criterio-status-neutro {
    color: #9ca3af;
}

.diferencas-encontradas,
.motivos-descarte {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
}

.diferencas-encontradas {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.motivos-descarte {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
}

/* FASE 7.7.3 — mesma caixa de .motivos-descarte, mas tom neutro/info
   (azul-acinzentado) em vez de laranja de alerta — usada quando o
   comparável É ideal e as observações não são "motivo de rejeição". */
.observacoes-comparacao {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.diferencas-encontradas ul,
.motivos-descarte ul,
.observacoes-comparacao ul {
    margin: 6px 0 0 18px;
    padding: 0;
}

.similaridade-final {
    margin-top: 12px;
    text-align: right;
    font-weight: 700;
    font-size: 14px;
    color: #24334d;
}


/* =========================================================
   BOTÃO ANALISAR MERCADO (FASE 6.7)

   Segue o mesmo padrão de .btn-anuncio (altura 46px, raio 12px,
   tipografia 14px/600, borda 2px, transição .25s, hover com
   translateY + sombra) — mesma "família" visual dos botões principais
   do portal (Abrir leilão/Exportar PDF/Ver no mapa/Análise IA), só com
   uma cor própria (azul, mesma já usada nos banners de classificação
   BOA em outros pontos do card) pra se diferenciar como ação de
   mercado. Não usa <a>, então precisa declarar border/cursor/etc que
   .btn-anuncio herdava do link.
   ========================================================= */

.btn-mercado {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    min-width: 190px;
    height: 46px;

    padding: 0 20px;

    border-radius: 12px;

    background: #2563eb;
    border: 2px solid #2563eb;
    color: #fff;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;

    cursor: pointer;

    transition: .25s;

    box-sizing: border-box;
}

.btn-mercado:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;

    transform: translateY(-2px);

    box-shadow:
        0 8px 20px rgba(37, 99, 235, .25);
}

.btn-mercado:disabled,
.btn-mercado[disabled] {
    opacity: .7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}


/* =========================================================
   BOTÃO SALVAR OBSERVAÇÃO (FASE 6.7)

   Ação secundária: mesma paleta neutra (preto) já usada nos outros
   botões "Salvar" do portal (não alterados nesta fase), só menor e
   mais compacto — reforça a hierarquia visual sem inventar uma cor
   nova.
   ========================================================= */

.btn-observacao {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    height: 36px;

    padding: 0 16px;

    border-radius: 10px;

    background: #111;
    border: 2px solid #111;
    color: #fff;

    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;

    cursor: pointer;

    transition: .25s;

    box-sizing: border-box;
}

.btn-observacao:hover {
    background: #1f2937;
    border-color: #1f2937;

    transform: translateY(-1px);

    box-shadow:
        0 6px 14px rgba(0, 0, 0, .18);
}

.btn-observacao:disabled,
.btn-observacao[disabled] {
    opacity: .7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}


/* =========================================================
   FASE 6.11 — refinamento visual do dashboard de investimento
   (Favoritos). Só apresentação: hierarquia tipográfica dos
   indicadores prioritários, cabeçalhos de seção recolhível
   consistentes, cards de comparáveis mais compactos e melhor
   separação antes dos botões de ação. Reaproveita as cores e
   classes já existentes (.resumo-box, .comparavel-*, etc.) —
   nenhuma identidade visual nova.
   ========================================================= */

/* ITEM 1/4 — indicadores de prioridade máxima (preço máximo, meu
   lance planejado, ROI) ganham valor maior; .resumo-lucro (já
   existia, sem uso até aqui) cobre o lucro estimado em verde. */
.resumo-box-forte strong {
    font-size: 21px;
}

/* ITEM 7 — cabeçalho comum das seções recolhíveis (Premissas
   Financeiras / Observações): affordance de expandir consistente,
   sem depender do marcador padrão do navegador. */
.secao-colapsavel > summary {
    list-style: none;
    padding: 10px 14px;
    border-radius: 10px;
    background: #f9fafb;
    border: 1px solid #eee;
    transition: background .2s, border-color .2s;
}

.secao-colapsavel > summary::-webkit-details-marker {
    display: none;
}

.secao-colapsavel > summary::before {
    content: "▸ ";
    display: inline-block;
    color: #9ca3af;
    transition: transform .15s ease;
}

.secao-colapsavel[open] > summary::before {
    transform: rotate(90deg);
}

.secao-colapsavel > summary:hover {
    background: #f3f4f6;
    border-color: #e5e7eb;
}

/* ITEM 6 — características do comparável como chips compactos, em
   vez de texto solto separado só por espaço. */
.comparavel-specs span {
    background: #f3f4f6;
    color: #374151;
    padding: 2px 9px;
    border-radius: 6px;
}

/* ITEM 6 — selo de similaridade compacto (era só texto corrido). */
.comparavel-similaridade {
    display: inline-block;
    padding: 3px 10px;
    background: #eff6ff;
    border-radius: 20px;
}

/* ITEM 8 — separa visualmente os botões de ação do conteúdo acima
   (Observações), sem alterar nenhum botão em si. */
.acoes-imovel {
    padding-top: 16px;
    border-top: 1px solid #eee;
}
