.research-results {
    margin-top: .75rem;
    padding: .75rem;
    background: #f7f7f9;
    border: 1px solid #e4e5f0;
    border-radius: 6px;
    max-height: 240px;
    overflow: auto;
    font-size: .95rem;
    color: #333;
}

.research-results .job-item { margin-bottom: .5rem; }
.research-results .job-item .status { font-weight: 600; }
/* ======================================= */
/* RESET E CONFIGURAÇÕES GLOBAIS         */
/* ======================================= */
:root {
    --cor-fundo: #F8F9FA;
    --cor-container: #FFFFFF;
    --cor-borda: #DEE2E6;
    --cor-texto-principal: #212529;
    --cor-texto-secundario: #6C757D;
    --cor-destaque-btg: #00529B;
    --cor-destaque-btg-hover: #003F7A;
    
    --cor-p1: #D9534F; /* Vermelho Sóbrio */
    --cor-p2: #F0AD4E; /* Dourado/Âmbar */
    --cor-p3: #5BC0DE; /* Azul-Céu */

    --sombra-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--cor-fundo);
    color: var(--cor-texto-principal);
    line-height: 1.6;
}
html, body { height: 100%; overflow: hidden; }

/* ======================================= */
/* ESTRUTURA PRINCIPAL                     */
/* ======================================= */
.container { display: flex; height: 100vh; overflow: hidden; }
.sidebar-closed .painel-controle { display: none; }
.sidebar-closed .conteudo-principal { width: 100%; }

.painel-controle {
    width: 22%;
    min-width: 240px;
    background-color: var(--cor-container);
    padding: 1rem;
    border-right: 1px solid var(--cor-borda);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: 0.92rem;
}

.conteudo-principal {
    width: 78%;
    display: flex;
    flex-direction: column;
    min-height: 0; /* permite que filhos flex com overflow funcionem sem criar scroll externo */
}

.feed-noticias { 
    padding: 0 2rem; 
    overflow-y: auto; 
    flex: 1;
    min-height: 0;
}

/* ======================================= */
/* SELETOR DE DATA                         */
/* ======================================= */
.seletor-data {
    background-color: var(--cor-container);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--cor-borda);
    display: grid;
    grid-template-columns: 160px 1fr auto;
    align-items: center;
    flex-shrink: 0;
    gap: 1rem;
}

.data-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.data-label {
    font-size: 1rem;
    color: var(--cor-texto-secundario);
    font-weight: 500;
}

.data-navegacao { display: inline-flex; align-items: center; gap: 0.25rem; }

.data-nav-btn {
    background-color: var(--cor-fundo);
    border: 1px solid var(--cor-borda);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-size: 1rem;
    font-weight: 600;
    color: var(--cor-texto-secundario);
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.data-nav-btn:hover {
    background-color: #e9ecef;
    border-color: var(--cor-destaque-btg);
    color: var(--cor-destaque-btg);
}

.data-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.data-nav-btn:disabled:hover {
    background-color: var(--cor-fundo);
    border-color: var(--cor-borda);
    color: var(--cor-texto-secundario);
}

.data-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--cor-fundo);
    border: 1px solid var(--cor-borda);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-size: 1rem;
    font-weight: 600;
    color: var(--cor-destaque-btg);
    min-width: 120px;
    justify-content: center;
}

.data-btn:hover {
    background-color: #e9ecef;
    border-color: var(--cor-destaque-btg);
}

.data-btn.historico {
    background-color: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.data-btn.historico:hover {
    background-color: #ffeaa7;
    border-color: #f39c12;
}

.data-input {
    padding: 0.5rem;
    border: 1px solid var(--cor-borda);
    border-radius: 6px;
    font-size: 1rem;
    color: var(--cor-texto-principal);
    background-color: var(--cor-container);
}

.data-input:focus {
    outline: none;
    border-color: var(--cor-destaque-btg);
    box-shadow: 0 0 0 2px rgba(0, 82, 155, 0.1);
}

/* ======================================= */
/* PAINEL DE CONTROLE (SIDEBAR)            */
/* ======================================= */
.logo h1 { color: var(--cor-destaque-btg); font-weight: 700; font-size: 1.5rem; }
.logo-subtitle { margin-top: 4px; font-size: 0.8rem; color: rgba(0,0,0,0.55); line-height: 1.2; }
.logo-subtitle .sigla { color: var(--cor-destaque-btg); font-weight: 700; }

.secao-filtro h2 {
    font-size: 0.8rem;
    color: var(--cor-texto-secundario);
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
}

.filtros-rapidos { display: flex; flex-direction: column; gap: 0.5rem; }

.filtro-btn {
    width: 100%; text-align: left; padding: 0.5rem 0.75rem;
    border: 1px solid var(--cor-borda); background-color: var(--cor-container);
    color: var(--cor-texto-principal); border-radius: 6px; cursor: pointer;
    transition: all 0.2s ease-in-out;
}
.filtro-btn:hover { border-color: var(--cor-destaque-btg); color: var(--cor-destaque-btg); }
.filtro-btn.ativo { background-color: var(--cor-destaque-btg); color: var(--cor-container); border-color: var(--cor-destaque-btg); font-weight: 600; }

.feeds-personalizados { display: flex; flex-direction: column; }
.feed-link {
    color: var(--cor-texto-principal); font-size: 0.9rem; text-decoration: none;
    padding: 0.35rem 0.6rem; border-radius: 5px; transition: color 0.2s, background-color 0.2s;
}
.feed-link:hover { background-color: #eef2ff; color: var(--cor-destaque-btg); }
.feed-link.ativo { background-color: #deeaff; color: var(--cor-destaque-btg); font-weight: 600; }

#btn-criar-feed { margin-top: 0.75rem; }

.filtros-categorias { 
    display: flex; 
    flex-direction: column; 
    gap: 0.5rem; 
}

.filtros-categorias label { 
    display: flex; 
    align-items: center; 
    gap: 0.5rem; 
    cursor: pointer; 
    font-size: 0.85rem; 
    padding: 0.4rem 0.6rem;
    border-radius: 9999px;
    background-color: transparent;
    color: var(--cor-texto-principal);
    font-weight: 500;
    transition: all 0.2s;
    width: fit-content;
}

.filtros-categorias label:hover {
    background-color: var(--cor-fundo);
}

.filtros-categorias label.desabilitado {
    opacity: 0.4;
}

.filtros-categorias label.desabilitado .tag {
    opacity: 0.4;
}

.filtros-categorias input[type="checkbox"] {
    display: none;
}

/* ======================================= */
/* CONTEÚDO PRINCIPAL                      */
/* ======================================= */
/* Removido .painel-metricas - agora integrado ao .seletor-data */

.header-actions { display: flex; gap: 6px; align-items: center; flex-direction: column; }
.header-actions .btn-terciario, .header-actions .btn-secondary { font-size: 0.8rem; padding: 6px 8px; width: 100%; }
.header-actions #btn-toggle-sidebar {
    border: 1px solid var(--cor-borda);
    background: linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%);
    color: var(--cor-texto-principal);
    border-radius: 8px;
    padding: 6px 10px;
}
.header-actions #btn-toggle-sidebar:hover {
    background: #f1f3f5;
    border-color: #cfd4da;
}

.metricas-container {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.metrica-item { text-align: center; }
.metrica-label { font-size: 0.8rem; color: var(--cor-texto-secundario); text-transform: uppercase; }
.metrica-valor { display: block; font-size: 1.75rem; font-weight: 600; color: var(--cor-destaque-btg); }

.card-sintese {
    background-color: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}
.card-sintese .card-titulo { color: var(--cor-destaque-btg); font-size: 1.25rem; }
.card-sintese .card-resumo { font-size: 1rem; color: #3730a3; }

/* ======================================= */
/* CARD DE CLUSTER                         */
/* ======================================= */
.card-cluster {
    background-color: var(--cor-container); border: 1px solid var(--cor-borda); border-radius: 8px;
    padding: 1.25rem; margin-bottom: 1rem; box-shadow: var(--sombra-card);
    position: relative; overflow: hidden;
}
.card-cluster::before { content: ''; position: absolute; left: 0; top: 0; width: 6px; height: 100%; }
.card-cluster.p1::before { background-color: var(--cor-p1); }
.card-cluster.p2::before { background-color: var(--cor-p2); }
.card-cluster.p3::before { background-color: var(--cor-p3); }

.card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.75rem; }
.card-titulo { font-size: 1.35rem; font-weight: 600; }
.card-title-area { display: flex; align-items: center; gap: .5rem; }
.card-actions-feedback { display: inline-flex; gap: .25rem; margin-left: .5rem; }
.btn-thumb { border: none; background: #e9ecef; color: #6c757d; border-radius: 6px; padding: .15rem .45rem; cursor: pointer; font-size: .95rem; }
.btn-thumb:hover { background: #dee2e6; color: #495057; }
.btn-thumb.up.active { background: #d1e7dd; color: #0f5132; }
.btn-thumb.down.active { background: #f8d7da; color: #842029; }
.card-contador-fontes { display: flex; align-items: center; gap: 0.25rem; color: var(--cor-texto-secundario); font-size: 0.9rem; }
.card-resumo { color: var(--cor-texto-secundario); margin-bottom: 0.75rem; font-size: 0.95rem; }
.card-footer { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 0.75rem; 
    gap: 0.5rem; 
}

.card-footer-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-footer-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.card-timestamp { font-size: 0.8rem; color: var(--cor-texto-secundario); flex-shrink: 0; }
.card-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.tag { 
    padding: 0.2rem 0.6rem; 
    border-radius: 9999px; 
    font-size: 0.7rem; 
    font-weight: 500; 
    display: inline-block;
    color: var(--cor-texto-principal);
}

/* Paleta de cores otimizada para categorias com melhor contraste */
.tag.tag-1 { background-color: rgba(37, 99, 235, 0.18); box-shadow: none; }
.tag.tag-2 { background-color: rgba(220, 38, 38, 0.18); box-shadow: none; }
.tag.tag-3 { background-color: rgba(5, 150, 105, 0.18); box-shadow: none; }
.tag.tag-4 { background-color: rgba(124, 58, 237, 0.18); box-shadow: none; }
.tag.tag-5 { background-color: rgba(234, 88, 12, 0.18); box-shadow: none; }
.tag.tag-6 { background-color: rgba(8, 145, 178, 0.18); box-shadow: none; }
.tag.tag-7 { background-color: rgba(190, 24, 93, 0.18); box-shadow: none; }
.tag.tag-8 { background-color: rgba(133, 77, 14, 0.18); box-shadow: none; }
.tag.tag-9 { background-color: rgba(71, 85, 105, 0.18); box-shadow: none; }
.tag.tag-10 { background-color: rgba(30, 41, 59, 0.18); box-shadow: none; }

/* Efeito hover para todas as tags */
.tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

/* ======================================= */
/* BOTÕES                                */
/* ======================================= */
.btn {
    padding: 0.6rem 1.2rem; border: none; border-radius: 6px;
    font-weight: 600; cursor: pointer; transition: all 0.2s;
    background-color: var(--cor-destaque-btg); color: var(--cor-container); font-size: 0.9rem;
}
.btn:hover { background-color: var(--cor-destaque-btg-hover); }

.btn-deep-dive { display: block; margin-left: auto; }

.btn-secundario { background-color: var(--cor-borda); color: var(--cor-texto-principal); }
.btn-secundario:hover { background-color: #ced4da; }
.btn-terciario { background-color: transparent; border: 1px solid var(--cor-borda); color: var(--cor-texto-principal); }
.btn-terciario:hover { background-color: var(--cor-fundo); border-color: var(--cor-texto-secundario); }

/* Estado desativado para botões (cinza e não clicáveis) */
.btn[disabled],
button[disabled],
.btn:disabled,
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(100%);
}

/* Tooltip simples em hover mostrando "Desativado" - via title já funciona nativo.
   Para garantir feedback visual, manter o cursor not-allowed acima. */

/* Estado de loading para botões */
.btn.loading {
    position: relative;
    color: transparent !important;
}
.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Indicador de carregamento melhorado */
.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    color: var(--cor-texto-secundario);
    font-style: italic;
}

.loading-indicator i {
    margin-right: 0.5rem;
}

/* Melhorias para notificações de erro */
.error-message {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.error-message::before {
    content: '⚠️';
    margin-right: 0.5rem;
    font-size: 1.1em;
}

/* Notificações de sucesso melhoradas */
.success-message {
    background-color: #d1e7dd;
    border: 1px solid #badbcc;
    color: #0f5132;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.success-message::before {
    content: '✅';
    margin-right: 0.5rem;
    font-size: 1.1em;
}

/* ======================================= */
/* MODAL DEEP DIVE                         */
/* ======================================= */
.oculto { display: none !important; }
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(33, 37, 41, 0.6);
    display: flex; justify-content: center; align-items: center; z-index: 1000;
}

/* Modal específico do estagiário */
#modal-estagiario-chat {
    z-index: 1001;
}

#modal-estagiario-chat .modal-container {
    z-index: 1002;
}

#modal-estagiario-chat .chat-input-area {
    z-index: 1003;
    position: relative;
}
.modal-container {
    background-color: var(--cor-container); width: 90%; max-width: 900px;
    height: 90vh; border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    display: flex; flex-direction: column; position: relative;
}
.modal-overlay > .modal-content {
    /* Fallback para modais antigos que usam .modal-content */
    background-color: var(--cor-container);
    width: 90%;
    max-width: 900px;
    height: 90vh;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    position: relative;
}
.modal-content .modal-header { padding: 1.5rem 2rem; border-bottom: 1px solid var(--cor-borda); }
.modal-content .modal-body { padding: 0 2rem 2rem 2rem; overflow-y: auto; display: flex; flex-direction: column; }
.modal-content .modal-close { position: absolute; top: 1rem; right: 1.5rem; background: none; border: none; color: var(--cor-texto-secundario); font-size: 2rem; cursor: pointer; }
.modal-close-btn { position: absolute; top: 1rem; right: 1.5rem; background: none; border: none; color: var(--cor-texto-secundario); font-size: 2rem; cursor: pointer; }
.modal-header { padding: 1.5rem 2rem; border-bottom: 1px solid var(--cor-borda); }
.modal-header h2 { font-size: 1.5rem; }
.modal-body { padding: 0 2rem 2rem 2rem; overflow-y: auto; display: flex; flex-direction: column; }
.modal-tabs { display: flex; border-bottom: 1px solid var(--cor-borda); margin-bottom: 1.5rem; }
.tab-btn { padding: 0.8rem 1.2rem; cursor: pointer; background: none; border: none; color: var(--cor-texto-secundario); border-bottom: 3px solid transparent; transition: all 0.2s; }
.tab-btn.ativo { color: var(--cor-destaque-btg); border-bottom-color: var(--cor-destaque-btg); font-weight: 600; }
.tab-btn:hover { color: var(--cor-texto-principal); }

hr { border: none; border-top: 1px solid var(--cor-borda); margin: 1.5rem 0; }
.tab-content h3 { margin-bottom: 1rem; font-size: 1.1rem; }
.botoes-analise { display: flex; gap: 1rem; }

.lista-fontes { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.lista-fontes li { display: flex; align-items: center; gap: 0.75rem; background-color: var(--cor-fundo); padding: 0.75rem; border-radius: 6px; }
.lista-fontes span { flex-grow: 1; }
.lista-fontes .btn { flex-shrink: 0; }
.fonte-titulo { font-weight: 500; color: var(--cor-texto-principal); margin-bottom: 0.25rem; font-size: 0.95rem; }
.fonte-info { color: var(--cor-texto-secundario); font-size: 0.85rem; }

.chat-container { display: flex; flex-direction: column; height: 50vh; }
.chat-messages { flex-grow: 1; overflow-y: auto; padding: 1rem; border: 1px solid var(--cor-borda); border-radius: 6px; margin-bottom: 1rem; }
.message.system { color: var(--cor-texto-secundario); font-style: italic; }
.chat-input-area { display: flex; gap: 1rem; }
.chat-input-area input { flex-grow: 1; background-color: var(--cor-fundo); border: 1px solid var(--cor-borda); color: var(--cor-texto-principal); padding: 0.75rem; border-radius: 6px; }
.chat-input-area button { 
    flex-shrink: 0; 
    z-index: 1001; 
    position: relative; 
    pointer-events: auto !important; 
}

#prompt-display { width: 100%; min-height: 150px; background-color: var(--cor-fundo); border: 1px solid var(--cor-borda); color: var(--cor-texto-secundario); padding: 1rem; border-radius: 6px; resize: vertical; margin-bottom: 1rem; }
#prompt-display:not([readonly]) { color: var(--cor-texto-principal); }
#reprocess-controls { display: flex; gap: 1rem; }

/* ======================================= */
/* LOADING E ESTADOS                       */
/* ======================================= */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--cor-texto-secundario);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--cor-borda);
    border-top: 4px solid var(--cor-destaque-btg);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.erro {
    background-color: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    color: #c33;
    text-align: center;
}

.empty-feed-message {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--cor-texto-secundario);
    background-color: var(--cor-fundo);
    border-radius: 8px;
    margin: 2rem 0;
}

/* ======================================= */
/* BARRA DE LOADING PROGRESSIVO            */
/* ======================================= */
.loading-progress {
    background: var(--cor-fundo-secundaria);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.loading-bar-container {
    width: 100%;
    height: 8px;
    background: var(--cor-borda);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.loading-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--cor-primaria), var(--cor-secundaria));
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

.loading-text {
    font-size: 0.9rem;
    color: var(--cor-texto-secundaria);
    text-align: center;
    font-weight: 500;
}

/* ======================================= */
/* RESPONSIVIDADE                          */
/* ======================================= */
@media (max-width: 768px) {
    .container { flex-direction: column; height: 100vh; overflow: hidden; }
    
    .painel-controle { width: 100%; min-width: auto; border-right: none; border-bottom: 1px solid var(--cor-borda); }
    .painel-controle #btn-toggle-sidebar { margin-bottom: 0.5rem; width: auto; }
    
    .conteudo-principal { width: 100%; min-height: 0; }
    
    .modal-container {
        width: 95%;
        height: 95%;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-header h2 {
        font-size: 1.2rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .seletor-data { grid-template-columns: 1fr; gap: 0.5rem; padding: 0.5rem; }
    .header-actions { order: -1; justify-content: flex-start; align-items: stretch; }
    .header-actions .btn-terciario, .header-actions .btn-secondary { width: auto; }
    /* Oculta controles de data no topo (serão acessados via Filtros) */
    .data-info { display: none; }
    
    /* Oculta métricas no mobile */
    .metricas-container { display: none; }

    /* Cards ocupando quase toda a largura */
    .feed-noticias { padding: 0 0.5rem; }
    .card-cluster { margin-bottom: 0.75rem; }

    /* Footer em duas linhas para caber botões */
    .card-footer { flex-direction: column; align-items: stretch; gap: 0.5rem; }
    .card-footer-right { 
        display: flex;
        justify-content: space-evenly; 
        align-items: center;
        gap: 0.5rem; 
        flex-wrap: nowrap; 
        width: 100%; 
    }
    .card-footer-right .btn { 
        flex: 1 1 auto; 
        text-align: center;
        min-width: 0;
    }
    /* Mostrar Expandir ao lado de Detalhes na linha de botões */
    .btn-expand-summary { display: inline-flex; }
    .card-contador-fontes { display: none !important; }

    /* Remover like/dislike no mobile para dar espaço ao título */
    .card-actions-feedback { display: none !important; }
    .btn-thumb { display: none !important; }

    /* Ocultar card do Estagiário no mobile */
    .estagiario-card { display: none !important; }

    /* Data nav dentro da sidebar no mobile */
    .painel-controle .data-navegacao { 
        margin: 1rem 0;
        padding: 0.75rem;
        background: rgba(255, 255, 255, 0.5);
        border-radius: 8px;
        display: flex;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .painel-controle .data-navegacao .data-nav-btn,
    .painel-controle .data-navegacao .data-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    /* Abas compactas no mobile */
    .news-tabs-container { padding: 0 0.5rem; margin-top: 0.5rem; }
    .news-tab-btn { padding: 0.5rem 0.75rem; font-size: 0.9rem; }
}

/* =======================================
   ESTILOS PARA CARDS P3 AGRUPADOS
   ======================================= */

.card-cluster.p3-grupo {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid #6c757d;
    margin-bottom: 1.5rem;
}

.card-cluster.p3-grupo .card-header {
    background: rgba(108, 117, 125, 0.1);
    border-bottom: 1px solid #dee2e6;
}

.card-cluster.p3-grupo .card-titulo {
    color: #495057;
    font-size: 1.1rem;
    font-weight: 600;
}

.card-cluster.p3-grupo .card-content {
    padding: 1rem 0;
}

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

.item-noticia-p3 {
    padding: 0.75rem 1rem;
    margin: 0.25rem 0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.item-noticia-p3:hover {
    background-color: rgba(108, 117, 125, 0.1);
    border-left-color: #6c757d;
    transform: translateX(4px);
}

.item-noticia-p3 .texto-noticia {
    font-size: 0.95rem;
    line-height: 1.4;
    color: #495057;
}

.item-noticia-p3 .texto-noticia strong {
    color: #212529;
    font-weight: 600;
}

/* Responsividade para cards P3 */
@media (max-width: 768px) {
    .card-cluster.p3-grupo {
        margin: 0 0.5rem 1rem 0.5rem;
    }
    
    .item-noticia-p3 {
        padding: 0.5rem 0.75rem;
    }
    
    .item-noticia-p3 .texto-noticia {
        font-size: 0.9rem;
    }
}

/* ======================================= */
/* ESTILOS PARA CHAT E GERENCIAMENTO      */
/* ======================================= */

/* Modal reorganizado */
.modal-resumo-section {
    margin-bottom: 2rem;
}

.modal-resumo-section h3 {
    color: var(--cor-destaque-btg);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.modal-resumo-section p {
    color: var(--cor-texto-principal);
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Chat melhorado */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 60vh;
    border: 1px solid var(--cor-borda);
    border-radius: 8px;
    overflow: hidden;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem;
    background-color: var(--cor-fundo);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.message {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    max-width: 80%;
    word-wrap: break-word;
}

.message.user {
    background-color: var(--cor-destaque-btg);
    color: white;
    align-self: flex-end;
    margin-left: auto;
}

.message.assistant {
    background-color: var(--cor-container);
    border: 1px solid var(--cor-borda);
    color: var(--cor-texto-principal);
    align-self: flex-start;
}

/* Estilo do conteúdo em Markdown nas mensagens do Estagiário */
.estagiario-msg.assistant h1 { font-size: 1.4rem; margin-top: 1rem; margin-bottom: .35rem; }
.estagiario-msg.assistant h2 { font-size: 1.25rem; margin-top: .85rem; margin-bottom: .25rem; }
.estagiario-msg.assistant h3 { font-size: 1.1rem; margin-top: .8rem; margin-bottom: .2rem; }
.estagiario-msg.assistant p { margin: .15rem 0 .6rem 0; }
.estagiario-msg.assistant ul { margin: .2rem 0 .6rem 1.25rem; }
.estagiario-msg.assistant ol { margin: .2rem 0 .6rem 1.25rem; }
.estagiario-msg.assistant li { margin: .15rem 0; }
.estagiario-msg.assistant strong { font-weight: 700; }

.message.system {
    background-color: #e3f2fd;
    color: #1976d2;
    align-self: center;
    font-style: italic;
    font-size: 0.9rem;
}

.message.loading {
    background-color: #f5f5f5;
    color: var(--cor-texto-secundario);
    align-self: flex-start;
    font-style: italic;
}

.message.error {
    background-color: #ffebee;
    color: #c62828;
    align-self: flex-start;
    border: 1px solid #ffcdd2;
}

.chat-input-area {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background-color: var(--cor-container);
    border-top: 1px solid var(--cor-borda);
}

.chat-input-area input {
    flex-grow: 1;
    padding: 0.75rem;
    border: 1px solid var(--cor-borda);
    border-radius: 6px;
    font-size: 0.9rem;
}

.chat-input-area input:focus {
    outline: none;
    border-color: var(--cor-destaque-btg);
    box-shadow: 0 0 0 2px rgba(0, 82, 155, 0.1);
}

.chat-input-area button {
    padding: 0.75rem 1.5rem;
    background-color: var(--cor-destaque-btg);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.chat-input-area button:hover {
    background-color: var(--cor-destaque-btg-hover);
}

/* Formulário de edição */
.edit-form {
    background-color: var(--cor-fundo);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--cor-borda);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--cor-texto-principal);
}

.form-group select,
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--cor-borda);
    border-radius: 6px;
    font-size: 0.9rem;
    background-color: var(--cor-container);
}

.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--cor-destaque-btg);
    box-shadow: 0 0 0 2px rgba(0, 82, 155, 0.1);
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

/* Tags input */
.tags-input {
    position: relative;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--cor-destaque-btg);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 500;
}

.remove-tag {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.remove-tag:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Botões de ação */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-primary {
    background-color: var(--cor-destaque-btg);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: var(--cor-destaque-btg-hover);
}

/* Histórico de alterações */
.alteracoes-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--cor-borda);
    border-radius: 6px;
    background-color: var(--cor-fundo);
}

.alteracao-item {
    padding: 1rem;
    border-bottom: 1px solid var(--cor-borda);
}

.alteracao-item:last-child {
    border-bottom: none;
}

.alteracao-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.alteracao-header .campo {
    font-weight: 600;
    color: var(--cor-destaque-btg);
    text-transform: uppercase;
    font-size: 0.8rem;
}

.alteracao-header .timestamp {
    font-size: 0.8rem;
    color: var(--cor-texto-secundario);
}

.alteracao-content {
    font-size: 0.9rem;
}

.alteracao-content .valor-anterior,
.alteracao-content .valor-novo {
    margin-bottom: 0.25rem;
}

.alteracao-content .valor-anterior {
    color: var(--cor-texto-secundario);
}

.alteracao-content .valor-novo {
    color: var(--cor-texto-principal);
    font-weight: 500;
}

.alteracao-content .motivo {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background-color: var(--cor-container);
    border-radius: 4px;
    font-style: italic;
    color: var(--cor-texto-secundario);
}

/* Responsividade para chat */
@media (max-width: 768px) {
    .chat-container {
        height: 50vh;
    }
    
    .message {
        max-width: 90%;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .alteracao-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

/* ==============================================================================
   MODAL DE CONFIGURAÇÃO DE PROMPTS
   ============================================================================== */

.modal-large {
    max-width: 90vw;
    max-height: 90vh;
    width: 1200px;
}

.prompts-config-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.prompts-tabs {
    display: flex;
    border-bottom: 1px solid var(--cor-borda);
    margin-bottom: 1.5rem;
}

.prompt-tab-btn {
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--cor-texto-secundario);
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.prompt-tab-btn.ativo {
    color: var(--cor-destaque-btg);
    border-bottom-color: var(--cor-destaque-btg);
    font-weight: 600;
}

.prompt-tab-btn:hover {
    color: var(--cor-texto-principal);
}

.prompts-content {
    flex-grow: 1;
    overflow-y: auto;
}

.prompt-tab-content {
    display: none;
}

.prompt-tab-content.ativo {
    display: block;
}

.config-description {
    color: var(--cor-texto-secundario);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.config-editor {
    background-color: var(--cor-fundo);
    border: 1px solid var(--cor-borda);
    border-radius: 6px;
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

/* Compact accordion styles for prompts config */
.accordion-toggle {
    background: none;
    border: none;
    color: var(--cor-texto-principal);
    font-weight: 600;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}
.accordion-toggle:hover {
    background-color: var(--cor-fundo);
}

.chip-close {
    background: none;
    border: 1px solid var(--cor-borda);
    color: var(--cor-texto-secundario);
    width: 24px;
    height: 24px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.chip-close:hover {
    background-color: var(--cor-fundo);
    color: var(--cor-texto-principal);
}

.exemplo-inline,
.assunto-inline {
    width: 100%;
    padding: 0.5rem;
    border: 1px dashed var(--cor-borda);
    background: var(--cor-container);
    border-radius: 4px;
    font-size: 0.85rem;
}

.prompt-editor {
    background-color: var(--cor-fundo);
    border: 1px solid var(--cor-borda);
    border-radius: 6px;
    padding: 1rem;
}

.prompt-textarea {
    width: 100%;
    min-height: 300px;
    background-color: var(--cor-container);
    border: 1px solid var(--cor-borda);
    color: var(--cor-texto-principal);
    padding: 1rem;
    border-radius: 6px;
    resize: vertical;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.4;
}

.prompt-textarea:focus {
    outline: none;
    border-color: var(--cor-destaque-btg);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

/* Editor de Tags */
.tag-config-item {
    background-color: var(--cor-container);
    border: 1px solid var(--cor-borda);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.tag-config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.tag-config-title {
    font-weight: 600;
    color: var(--cor-destaque-btg);
    font-size: 1rem;
}

.tag-config-actions {
    display: flex;
    gap: 0.5rem;
}

.tag-config-actions button {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    border-radius: 4px;
}

.tag-config-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tag-config-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.tag-config-field label {
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--cor-texto-secundario);
}

.tag-config-field input,
.tag-config-field textarea {
    background-color: var(--cor-fundo);
    border: 1px solid var(--cor-borda);
    color: var(--cor-texto-principal);
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.tag-config-field input:focus,
.tag-config-field textarea:focus {
    outline: none;
    border-color: var(--cor-destaque-btg);
}

.tag-config-field textarea {
    min-height: 80px;
    resize: vertical;
}

.exemplos-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.exemplo-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--cor-fundo);
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--cor-borda);
}

.exemplo-item input {
    flex-grow: 1;
    background: none;
    border: none;
    color: var(--cor-texto-principal);
    font-size: 0.85rem;
}

.exemplo-item input:focus {
    outline: none;
}

.exemplo-item button {
    background: none;
    border: none;
    color: var(--cor-texto-secundario);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 2px;
}

.exemplo-item button:hover {
    background-color: var(--cor-borda);
    color: var(--cor-texto-principal);
}

.add-exemplo-btn {
    background-color: var(--cor-container);
    border: 1px dashed var(--cor-borda);
    color: var(--cor-texto-secundario);
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.add-exemplo-btn:hover {
    background-color: var(--cor-fundo);
    border-color: var(--cor-destaque-btg);
    color: var(--cor-destaque-btg);
}

/* Editor de Prioridades */
.prioridade-config-item {
    background-color: var(--cor-container);
    border: 1px solid var(--cor-borda);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.prioridade-config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.prioridade-config-title {
    font-weight: 600;
    color: var(--cor-destaque-btg);
    font-size: 1rem;
}

.prioridade-config-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.assuntos-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.assunto-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--cor-fundo);
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--cor-borda);
}

.assunto-item input {
    flex-grow: 1;
    background: none;
    border: none;
    color: var(--cor-texto-principal);
    font-size: 0.85rem;
}

.assunto-item input:focus {
    outline: none;
}

.assunto-item button {
    background: none;
    border: none;
    color: var(--cor-texto-secundario);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 2px;
}

.assunto-item button:hover {
    background-color: var(--cor-borda);
    color: var(--cor-texto-principal);
}

.add-assunto-btn {
    background-color: var(--cor-container);
    border: 1px dashed var(--cor-borda);
    color: var(--cor-texto-secundario);
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.add-assunto-btn:hover {
    background-color: var(--cor-fundo);
    border-color: var(--cor-destaque-btg);
    color: var(--cor-destaque-btg);
}

/* Botões de ação */
.prompts-actions {
    display: flex;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--cor-borda);
    margin-top: 1.5rem;
}

.prompts-actions .btn {
    flex: 1;
}

/* Responsividade para modal de prompts */
@media (max-width: 768px) {
    .modal-large {
        max-width: 95vw;
        max-height: 95vh;
        width: 95vw;
    }
    
    .prompts-tabs {
        flex-wrap: wrap;
    }
    
    .prompt-tab-btn {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
    
    .prompts-actions {
        flex-direction: column;
    }
    
    .tag-config-header,
    .prioridade-config-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .tag-config-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

.estagiario-card { border-left: 6px solid #0d6efd; }
.estagiario-chat { margin-top: .75rem; border: 1px solid var(--cor-borda); border-radius: 8px; overflow: hidden; }
.estagiario-chat-thread { max-height: 220px; overflow: auto; padding: .75rem; background: #f8f9fb; }
.estagiario-msg { padding: .4rem .6rem; margin-bottom: .4rem; border-radius: 6px; font-size: .95rem; }
.estagiario-msg.user { background: #e7f1ff; color: #0b4aa1; align-self: flex-end; }
.estagiario-msg.assistant { background: #eef7ee; color: #155724; }
.estagiario-msg.assistant table.md-table { width: 100%; border-collapse: collapse; margin: .5rem 0; background: #fff; }
.estagiario-msg.assistant table.md-table th, .estagiario-msg.assistant table.md-table td { border: 1px solid var(--cor-borda); padding: .4rem .5rem; text-align: left; }
.estagiario-msg.assistant table.md-table th { background: #f1f3f5; font-weight: 600; }
.estagiario-chat-input { display: flex; gap: .5rem; padding: .5rem; border-top: 1px solid var(--cor-borda); background: white; }
.estagiario-chat-input input { flex: 1; padding: .5rem .6rem; border: 1px solid var(--cor-borda); border-radius: 6px; }

/* ======================================= */
/* ABAS BRASIL/INTERNACIONAL               */
/* ======================================= */
.news-tabs-container {
    padding: 0 2rem;
    margin-top: 1rem;
}

.news-tabs {
    display: flex;
    gap: 0; /* separadores serão bordas, não gap */
    border: 1px solid var(--cor-borda);
    border-bottom: 2px solid var(--cor-borda);
    border-radius: 8px 8px 0 0;
    padding: 0;
    width: 100%;
    background: #fff;
    overflow: hidden; /* bordas de separação visíveis como abas de navegador */
}

.news-tab-btn {
    background: transparent;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--cor-texto-secundario);
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px; /* alinha com borda inferior do container */
    flex: 1; /* divide 50/50 */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
}

/* Separadores verticais entre abas (estilo navegador) */
.news-tab-btn:not(:last-child) {
    border-right: 1px solid var(--cor-borda);
}

.news-tab-btn:hover {
    color: var(--cor-destaque-btg);
    background-color: rgba(0, 82, 155, 0.05);
}

.news-tab-btn.ativo {
    color: var(--cor-destaque-btg);
    border-bottom-color: var(--cor-destaque-btg);
    background-color: #fff; /* ativa visual de aba selecionada */
    box-shadow: inset 0 -2px 0 var(--cor-destaque-btg);
    position: relative;
}

.news-tab-btn.ativo::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    background: var(--cor-destaque-btg);
}

/* Bordas arredondadas nas extremidades como abas de navegador */
.news-tab-btn:first-child {
    border-top-left-radius: 8px;
}
.news-tab-btn:last-child {
    border-top-right-radius: 8px;
}

/* Flags */
.flag-svg { width: 22px; height: 16px; display: inline-block; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.05); }
.tab-img { width: 22px; height: 22px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.05); }

/* Charts Section Styles */
.charts-section {
    margin: 2rem 0;
}

.chart-legend {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.2rem 0;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-text {
    flex: 1;
    font-weight: 500;
    color: var(--cor-texto-principal);
    font-size: 0.9rem;
}

.legend-percentage {
    font-weight: bold;
    color: var(--cor-destaque-btg);
    min-width: 50px;
    text-align: right;
    font-size: 0.9rem;
}

.chart-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-top: 1rem;
}

.chart-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--cor-borda);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 3rem;
    width: 100%;
}

.chart-card h3 {
    margin: 0 0 1rem 0;
    color: var(--cor-texto-principal);
    font-size: 1.1rem;
    text-align: center;
}

.chart-card canvas {
    width: 400px !important;
    height: 400px !important;
    flex-shrink: 0;
}

/* Resumo de prioridades abaixo do gráfico */
.priority-summary {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.priority-summary h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: #495057;
    text-align: center;
}

.priority-items {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
}

.priority-item {
    text-align: center;
    padding: 0.5rem;
    border-radius: 6px;
    background: white;
    border: 1px solid #dee2e6;
    min-width: 80px;
}

.priority-label {
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.priority-count {
    font-size: 1.1rem;
    font-weight: bold;
}

.priority-p1 { color: #dc3545; }
.priority-p2 { color: #ffc107; }
.priority-p3 { color: #17a2b8; }

/* Stats Grid Styles */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1rem 0;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 2rem 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--cor-borda);
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--cor-destaque-btg), #007bff, #28a745);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--cor-destaque-btg);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #ffffff; /* Branco para máximo contraste */
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stat-label {
    color: #e9ecef; /* Cinza claro para melhor contraste */
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive adjustments for charts */
@media (max-width: 768px) {
    .chart-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
    
    .chart-card {
        flex-direction: column;
        gap: 1rem;
    }
    
    .chart-card canvas {
        width: 300px !important;
        height: 300px !important;
    }
    
    .chart-legend {
        width: 100%;
    }
    
    .legend-item {
        padding: 0.3rem 0;
    }
    
    .legend-text {
        font-size: 0.85rem;
    }
    
    .legend-percentage {
        font-size: 0.85rem;
        min-width: 45px;
    }
}