/* ===== FICHA ===== */
#ficha-panel {
    position: fixed; right: 0; top: 70px; bottom: 0; width: 360px;
    background: var(--bg-panel); border-left: 1px solid var(--border);
    display: none; flex-direction: column; z-index: 100; box-shadow: var(--shadow);
}
.ficha-header {
    display: flex; align-items: center; gap: 8px; padding: 12px 14px;
    border-bottom: 1px solid var(--border);
}
.ficha-title { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.ficha-icon { font-size: 16px; }
.ficha-label { font-size: 14px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ficha-tipo { font-size: 10px; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.ficha-close { background: none; border: none; font-size: 20px; color: var(--text-muted); cursor: pointer; }
.ficha-close:hover { color: var(--text-primary); }
.ficha-abas { display: flex; border-bottom: 1px solid var(--border); overflow-x: auto; }
.aba-btn {
    padding: 8px 14px; background: none; border: none; font-size: 12px;
    color: var(--text-secondary); cursor: pointer; border-bottom: 2px solid transparent;
}
.aba-btn.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.ficha-conteudo { flex: 1; overflow-y: auto; padding: 14px; }
.ficha-campos { display: flex; flex-direction: column; gap: 10px; }
.ficha-campo { display: flex; flex-direction: column; gap: 2px; }
.ficha-campo.destaque { padding: 8px; border-radius: 6px; background: rgba(233,69,96,0.08); border-left: 3px solid #e94560; }
.campo-rotulo { font-size: 10px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.campo-valor { font-size: 13px; color: var(--text-primary); word-break: break-word; }
.campo-valor.vazio { color: var(--text-muted); font-style: italic; }
.ficha-empty { padding: 24px; text-align: center; color: var(--text-muted); font-size: 13px; }
/* ===== ANOTAÇÕES (POSTITS) ===== */
.node-anotacao {
    width: 120px; height: 90px;
    background: var(--postit-bg, #f9e79f);
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 3px;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
    display: flex; align-items: center; justify-content: center;
    padding: 6px; font-size: 11px; color: #333; text-align: center;
    white-space: normal; word-break: break-word;
}
.node-anotacao.imp-low    { background: #f9e79f; }
.node-anotacao.imp-normal { background: #a9dfbf; }
.node-anotacao.imp-high   { background: #f5b7b1; }
/* ===== MODAL DO MAPA (OPENSTREETMAP) ===== */
#mapa-modal { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 2500;
    display: none; align-items: center; justify-content: center;
}
#mapa-modal.visivel { display: flex; }
.mapa-modal-conteudo {
    background: var(--bg-panel); border-radius: 12px; width: min(92vw, 900px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5); overflow: hidden;
}
.mapa-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.mapa-modal-title { font-size: 14px; font-weight: 600; color: var(--text-primary); } 
.mapa-modal-close { background: none; border: none; color: var(--text-muted); font-size: 22px; cursor: pointer; line-height: 1; } 
#mapa-container { width: 100%; height: 480px; } 
.mapa-status { padding: 8px 16px; font-size: 12px; color: var(--text-muted); min-height: 16px; }
/* Quantidade de homônimos potenciais — destaque de alerta */
.ficha-campo-alerta .campo-rotulo,
.ficha-campo-alerta .campo-valor {
    color: #e94560;   /* vermelho padrão do projeto */
    font-weight: 700; /* bold */
}