.foco-detalhe {
    background-color: #fffbeb;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border-left: 4px solid #f59e0b;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

/* === ESTILOS PARA DETALHAMENTO DO PLANO DE AÇÃO === */

/* === NOVOS ESTILOS MINI-DASHBOARD PLANO DE AÇÃO === */
.plano-card-v2 {
    background-color: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 12px -1px rgb(0 0 0 / 0.07);
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.secao-titulo {
    font-size: 0.875rem;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}
.badge-medalha {
    background-color: #f97316;
    color: white;
    padding: 0.15rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    margin-left: 0.5rem;
    text-transform: uppercase;
}
.metrica-progresso {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    transition: all 0.2s ease-in-out;
}
.metrica-progresso.metrica-foco {
    background-color: #fffbeb;
    border-color: #fde68a;
}
.metrica-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}
.metrica-nome {
    font-weight: 500;
    color: #374151;
}
.metrica-valor {
    color: #6b7280;
}
.progress-bar-container {
    width: 100%;
    background-color: #e5e7eb;
    border-radius: 9999px;
    height: 0.75rem;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    background-color: #f97316;
    border-radius: 9999px;
    transition: width 0.5s ease-in-out;
}
.metrica-foco .progress-bar {
    background-color: #f59e0b;
}
.plano-sugerido {
    font-size: 0.9rem;
    line-height: 1.6;
}
.detalhamento-plano {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}
.detalhamento-titulo {
    font-size: 0.875rem;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 0.5rem;
}
.detalhamento-plano ul {
    list-style: none;
    padding-left: 0;
    font-size: 0.875rem;
}
.detalhamento-plano li {
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
}
.detalhamento-plano li.foco-detalhe {
    background-color: #fefce8;
    font-weight: 600;
}
/* --- ESTILOS GERAIS --- */
html, body {
    overflow-x: hidden;
    height: 100%;
}
body {
    font-family: 'Poppins', sans-serif;
    position: relative;
    transition: background-color 0.5s ease-in-out;
}

/* --- ESTILOS DO LAYOUT INICIAL (Página de Portais) --- */
#background-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: -2; transition: opacity 0.5s ease-in-out;
    background-image: url('../img/fundo-estatico.jpg');
    background-size: cover;
    background-position: center center;
}
#background-container::before {
    content: ''; position: fixed; inset: 0;
    background-color: rgba(29, 25, 23, 0.6);
    z-index: -1;
}
#particles-js {
    position: absolute; width: 100%; height: 100%; top: 0; left: 0;
}
.portal-card {
    background-color: rgba(29, 25, 23, 0.5);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.5), 0 4px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease-in-out; text-decoration: none; cursor: pointer;
}
.portal-card:hover {
    background-color: rgba(29, 25, 23, 0.7);
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.5), 0 10px 30px rgba(0,0,0,0.4);
}

/* --- ESTILOS DO DASHBOARD E MODAIS --- */
.medalha-sombra { filter: grayscale(100%) opacity(0.3); }
.medalha-carregando { animation: spin 1.5s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.progress-step { flex: 1; text-align: center; padding: 0.5rem; border-radius: 0.5rem; background-color: #f3f4f6; color: #6b7280; font-weight: 600; font-size: 0.875rem; transition: all 0.3s ease; border: 2px solid transparent; display: flex; flex-direction: column; justify-content: center; min-height: 3.5rem; }
.progress-step-active { background-color: #fef3c7; color: #b45309; border-color: #f59e0b; transform: scale(1.05); box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); }
#aiAnalysisResult { white-space: pre-wrap; }

/* --- CORREÇÃO PARA FUNCIONALIDADE DAS ABAS PRINCIPAIS --- */
.main-tab-content {
    display: none; /* Esconde o conteúdo por padrão */
}
.main-tab-content.active {
    display: block; /* Mostra apenas o conteúdo da aba ativa */
}

#chat-fab { transition: all 0.3s ease-in-out; }
#chat-fab.hidden { transform: scale(0); opacity: 0; }
#chat-window { display: flex; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); transform-origin: bottom right; }
#chat-window.hidden { transform: scale(0.5); opacity: 0; pointer-events: none; }
.message-container { display: flex; align-items: flex-end; gap: 0.75rem; }
.message-container.user { justify-content: flex-end; }
.chat-avatar { width: 2rem; height: 2rem; border-radius: 9999px; flex-shrink: 0; }
.chat-bubble { max-width: 85%; padding: 0.75rem 1.25rem; border-radius: 1.25rem; line-height: 1.6; white-space: pre-wrap; }
.user-bubble { background-color: #ffedd5 !important; color: #9a3412; align-self: flex-end; border-bottom-right-radius: 0.5rem; }
.model-bubble { background-color: #f3f4f6 !important; color: #1f2937; border-bottom-left-radius: 0.5rem; }
#side-buttons-container { position: fixed; left: 0; top: 50%; transform: translateY(-50%); z-index: 50; flex-direction: column; gap: 10px; }
#start-tour-btn i,
#feedback-btn i {
    transform: rotate(90deg);
    transition: transform 0.3s ease;
}
.side-button-content { display: inline-block; transition: transform 0.3s ease; }
#start-tour-btn, #feedback-btn { writing-mode: vertical-rl; text-orientation: mixed; color: white; font-family: 'Poppins', sans-serif; font-weight: 600; padding: 16px 10px; border: none; border-top-right-radius: 12px; border-bottom-right-radius: 12px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25); cursor: pointer; transition: background-color 0.3s ease; }
#start-tour-btn { background-color: #ea580c; }
#feedback-btn { background-color: #4f46e5; }
#start-tour-btn:hover .side-button-content, #feedback-btn:hover .side-button-content { transform: translateX(4px); }

/* CORREÇÃO FORÇADA PARA O CHAT DA VIVI */
#chat-fab {
    width: 80px !important;
    height: 80px !important;
}
#chat-fab img {
    width: 72px !important;
    height: 72px !important;
}

/* --- ESTILOS DO TOUR CORRIGIDOS --- */
#tour-overlay {
    position: fixed;
    z-index: 1000;
}
#tour-tooltip {
    position: fixed;
    z-index: 9999;
}
.tour-highlight {
    outline: 3px solid #ea580c;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6);
    position: relative;
    z-index: 1001;
    border-radius: 8px;
    transition: outline 0.3s ease;
}

/* --- ESTILOS PARA ABAS NO HEADER LARANJA --- */
#main-header .main-tab-button {
    color: rgba(255, 255, 255, 0.7);
    border-bottom: 4px solid transparent;
    transition: all 0.2s ease-in-out;
}
#main-header .main-tab-button:hover {
    color: white;
}
#main-header .main-tab-button.active {
    color: white;
    border-bottom-color: white;
}

/* --- ESTILOS PARA AS ABAS INTERNAS DO FAQ --- */
.faq-tab-button {
    padding: 0.75rem 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #4b5563; /* Cor cinza para texto */
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}
.faq-tab-button.active {
    color: #4f46e5; /* Cor indigo para texto ativo */
    border-bottom-color: #4f46e5;
}
.faq-tab-content {
    display: none;
}
.faq-tab-content.active {
    display: block;
}

/* --- ESTILOS PARA AS ABAS DO MODAL DE PRODUÇÃO --- */
.tab-button-producao {
    padding: 0.75rem 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #4b5563;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}
.tab-button-producao.active {
    color: #ea580c;
    border-bottom-color: #ea580c;
}
.tab-content-producao {
    display: none;
}
.tab-content-producao.active {
    display: block;
}

/* --- ESTILOS PARA OS BOTÕES DE ANO (DENTRO DO FAQ) --- */
.year-tab-button {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    color: #4b5563;
    background-color: transparent;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}
.year-tab-button:hover {
    background-color: #f3f4f6;
}
.year-tab-button.active {
    color: #4f46e5;
    background-color: #eef2ff;
    border-color: #c7d2fe;
}
.year-tab-content {
    display: none;
}
.year-tab-content.active {
    display: block;
}

/* Estilos para o FAQ de perguntas e respostas */
.faq-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}
.faq-question {
    cursor: pointer;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}
.faq-question:hover {
    background-color: #f9fafb;
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.5s ease;
    padding: 0 1.5rem;
}
.faq-answer.open {
    max-height: 500px;
    padding: 1rem 1.5rem;
}
.faq-question .icon {
    transition: transform 0.5s ease;
}
.faq-question.open .icon {
    transform: rotate(180deg);
}


/* =================================================================== */
/* --- ESTILOS REFINADOS PARA O DASHBOARD DE LIDERANÇA (VERSÃO FINAL) --- */
/* =================================================================== */

/* Card principal do colaborador */
.colaborador-card {
    transition: box-shadow 0.3s ease;
}

/* Botão para expandir/recolher os detalhes */
.btn-ver-detalhes {
    background-color: #f8f9fa; /* Um cinza muito claro */
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 0.6rem 1rem;
    width: 100%;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #495057;
    transition: all 0.2s ease-in-out;
}

.btn-ver-detalhes:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
}

.btn-ver-detalhes .seta {
    font-size: 1em;
    transition: transform 0.3s ease;
}

.detalhes-container {
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s ease-in-out; /* Anima todas as propriedades suavemente */
    
    /* Prepara o espaço e o separador, mas os mantém "invisíveis" */
    margin-top: 0;
    padding-top: 0;
    border-top: 1px solid transparent;
}

.detalhes-container.expandido {
    max-height: 800px; /* Altura generosa para comportar o conteúdo */
    
    /* Cria o espaçamento e torna o separador visível ao expandir */
    margin-top: 1.5rem;  /* 24px de margem para separar do botão */
    padding-top: 1.5rem; /* 24px de padding interno */
    border-top-color: #e5e7eb; /* Cor suave para a linha separadora */
}

/* Estilização da área de cálculo dentro do container */
.calculo-resultados .metrica {
    margin-bottom: 1.5rem;
}

.calculo-resultados .metrica:last-child {
    margin-bottom: 0;
}

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

.calculo-resultados .metrica-header h4 {
    margin: 0;
    font-size: 1em;
    font-weight: 600;
    color: #343a40;
}

.calculo-resultados .metrica-header .valor-metrica {
    font-weight: 700;
    color: #c2410c; /* Laranja escuro VIVA */
    font-size: 1.1em;
    background-color: #fff7ed;
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    border: 1px solid #fed7aa;
}

/* Barra com os níveis de medalha */
.niveis-barra {
    display: flex;
    width: 100%;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    background-color: #ffffff;
}

.niveis-barra .nivel {
    flex: 1;
    text-align: center;
    padding: 0.5rem 0.25rem;
    background-color: #f8f9fa;
    color: #adb5bd;
    border-right: 1px solid #e9ecef;
    transition: all 0.3s;
}

.niveis-barra .nivel:last-child {
    border-right: none;
}

.niveis-barra .nivel span {
    font-size: 0.8em;
    font-weight: 700;
    display: block;
}
.niveis-barra .nivel small {
    font-size: 0.7em;
    display: block;
}

/* Destaque para o nível ATIVO com cores diferentes */
.niveis-barra .nivel.ativo {
    color: white;
    transform: scale(1.05);
    z-index: 1;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

.lideranca-card-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* Espaçamento entre os botões */
    width: 100%;
    margin-top: 1rem;
}

/* Estilo geral para o container das abas */
#main-tabs-nav {
    margin-bottom: 2rem; /* Adiciona um espaço entre as abas e o conteúdo abaixo */
}

/* Estilo para cada botão de aba (inativo) */
#main-tabs-nav .main-tab-button {
    padding: 0.5rem 0.25rem;
    padding-bottom: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: #6b7280; /* Cinza escuro para texto inativo */
    background-color: transparent;
    border: none;
    border-bottom: 4px solid transparent; /* Deixa o espaço da borda, mas invisível */
    transition: all 0.2s ease-in-out;
}

/* Efeito ao passar o mouse por cima */
#main-tabs-nav .main-tab-button:hover {
    color: #f97316; /* Laranja VIVA para o hover */
}

/* Estilo da aba ATIVA */
#main-tabs-nav .main-tab-button.active {
    color: #ea580c; /* Laranja VIVA mais forte para a aba ativa */
    border-bottom-color: #ea580c; /* Borda inferior laranja */
}

.setor-dashboard {
    margin-bottom: 4rem; /* Espaço entre as seções de cada setor */
}

.chart-container {
    position: relative;
    height: 400px; /* Altura fixa para cada gráfico */
    padding: 1.5rem;
    background-color: white;
    border-radius: 1rem; /* Cantos arredondados */
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.niveis-barra .nivel.one.ativo { background-color: #cd7f32; } /* Bronze */
.niveis-barra .nivel.pro.ativo { background-color: #718096; } /* Cinza/Prata */
.niveis-barra .nivel.master.ativo { background-color: #f59e0b; } /* Ambar */
.niveis-barra .nivel.star.ativo { background-color: #8b5cf6; } /* Roxo */
.niveis-barra .nivel.legend.ativo { background-color: #10b981; } /* Verde Esmeralda */
